openapi.json 819 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/session/{sessionID}/background": {
  1572. "post": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.session.background",
  1575. "parameters": [
  1576. {
  1577. "name": "sessionID",
  1578. "in": "path",
  1579. "schema": {
  1580. "type": "string",
  1581. "pattern": "^ses"
  1582. },
  1583. "required": true
  1584. },
  1585. {
  1586. "name": "directory",
  1587. "in": "query",
  1588. "schema": {
  1589. "type": "string"
  1590. },
  1591. "required": false
  1592. },
  1593. {
  1594. "name": "workspace",
  1595. "in": "query",
  1596. "schema": {
  1597. "type": "string"
  1598. },
  1599. "required": false
  1600. }
  1601. ],
  1602. "responses": {
  1603. "200": {
  1604. "description": "Backgrounded subagents",
  1605. "content": {
  1606. "application/json": {
  1607. "schema": {
  1608. "type": "boolean",
  1609. "description": "Backgrounded subagents"
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "400": {
  1615. "description": "BadRequest | InvalidRequestError",
  1616. "content": {
  1617. "application/json": {
  1618. "schema": {
  1619. "anyOf": [
  1620. {
  1621. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1622. },
  1623. {
  1624. "$ref": "#/components/schemas/InvalidRequestError"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. }
  1630. }
  1631. },
  1632. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1633. "summary": "Background subagents",
  1634. "x-codeSamples": [
  1635. {
  1636. "lang": "js",
  1637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1638. }
  1639. ]
  1640. }
  1641. },
  1642. "/experimental/resource": {
  1643. "get": {
  1644. "tags": ["experimental"],
  1645. "operationId": "experimental.resource.list",
  1646. "parameters": [
  1647. {
  1648. "name": "directory",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. },
  1655. {
  1656. "name": "workspace",
  1657. "in": "query",
  1658. "schema": {
  1659. "type": "string"
  1660. },
  1661. "required": false
  1662. }
  1663. ],
  1664. "responses": {
  1665. "200": {
  1666. "description": "MCP resources",
  1667. "content": {
  1668. "application/json": {
  1669. "schema": {
  1670. "type": "object",
  1671. "additionalProperties": {
  1672. "$ref": "#/components/schemas/McpResource"
  1673. },
  1674. "description": "MCP resources"
  1675. }
  1676. }
  1677. }
  1678. },
  1679. "400": {
  1680. "description": "Bad request",
  1681. "content": {
  1682. "application/json": {
  1683. "schema": {
  1684. "$ref": "#/components/schemas/BadRequestError"
  1685. }
  1686. }
  1687. }
  1688. }
  1689. },
  1690. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1691. "summary": "Get MCP resources",
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/find": {
  1701. "get": {
  1702. "tags": ["file"],
  1703. "operationId": "find.text",
  1704. "parameters": [
  1705. {
  1706. "name": "directory",
  1707. "in": "query",
  1708. "schema": {
  1709. "type": "string"
  1710. },
  1711. "required": false
  1712. },
  1713. {
  1714. "name": "workspace",
  1715. "in": "query",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": false
  1720. },
  1721. {
  1722. "name": "pattern",
  1723. "in": "query",
  1724. "schema": {
  1725. "type": "string"
  1726. },
  1727. "required": true
  1728. }
  1729. ],
  1730. "responses": {
  1731. "200": {
  1732. "description": "Matches",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "path": {
  1741. "type": "object",
  1742. "properties": {
  1743. "text": {
  1744. "type": "string"
  1745. }
  1746. },
  1747. "required": ["text"],
  1748. "additionalProperties": false
  1749. },
  1750. "lines": {
  1751. "type": "object",
  1752. "properties": {
  1753. "text": {
  1754. "type": "string"
  1755. }
  1756. },
  1757. "required": ["text"],
  1758. "additionalProperties": false
  1759. },
  1760. "line_number": {
  1761. "type": "integer",
  1762. "minimum": 0
  1763. },
  1764. "absolute_offset": {
  1765. "type": "integer",
  1766. "minimum": 0
  1767. },
  1768. "submatches": {
  1769. "type": "array",
  1770. "items": {
  1771. "type": "object",
  1772. "properties": {
  1773. "match": {
  1774. "type": "object",
  1775. "properties": {
  1776. "text": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. "required": ["text"],
  1781. "additionalProperties": false
  1782. },
  1783. "start": {
  1784. "type": "integer",
  1785. "minimum": 0
  1786. },
  1787. "end": {
  1788. "type": "integer",
  1789. "minimum": 0
  1790. }
  1791. },
  1792. "required": ["match", "start", "end"],
  1793. "additionalProperties": false
  1794. }
  1795. }
  1796. },
  1797. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1798. "additionalProperties": false
  1799. },
  1800. "description": "Matches"
  1801. }
  1802. }
  1803. }
  1804. },
  1805. "400": {
  1806. "description": "Bad request",
  1807. "content": {
  1808. "application/json": {
  1809. "schema": {
  1810. "$ref": "#/components/schemas/BadRequestError"
  1811. }
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "description": "Search for text patterns across files in the project using ripgrep.",
  1817. "summary": "Find text",
  1818. "x-codeSamples": [
  1819. {
  1820. "lang": "js",
  1821. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1822. }
  1823. ]
  1824. }
  1825. },
  1826. "/find/file": {
  1827. "get": {
  1828. "tags": ["file"],
  1829. "operationId": "find.files",
  1830. "parameters": [
  1831. {
  1832. "name": "directory",
  1833. "in": "query",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": false
  1838. },
  1839. {
  1840. "name": "workspace",
  1841. "in": "query",
  1842. "schema": {
  1843. "type": "string"
  1844. },
  1845. "required": false
  1846. },
  1847. {
  1848. "name": "query",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": true
  1854. },
  1855. {
  1856. "name": "dirs",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string",
  1860. "enum": ["true", "false"]
  1861. },
  1862. "required": false
  1863. },
  1864. {
  1865. "name": "type",
  1866. "in": "query",
  1867. "schema": {
  1868. "type": "string",
  1869. "enum": ["file", "directory"]
  1870. },
  1871. "required": false
  1872. },
  1873. {
  1874. "name": "limit",
  1875. "in": "query",
  1876. "schema": {
  1877. "type": "integer",
  1878. "minimum": 1,
  1879. "maximum": 200
  1880. },
  1881. "required": false
  1882. }
  1883. ],
  1884. "responses": {
  1885. "200": {
  1886. "description": "File paths",
  1887. "content": {
  1888. "application/json": {
  1889. "schema": {
  1890. "type": "array",
  1891. "items": {
  1892. "type": "string"
  1893. },
  1894. "description": "File paths"
  1895. }
  1896. }
  1897. }
  1898. },
  1899. "400": {
  1900. "description": "Bad request",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/BadRequestError"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Search for files or directories by name or pattern in the project directory.",
  1911. "summary": "Find files",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/find/symbol": {
  1921. "get": {
  1922. "tags": ["file"],
  1923. "operationId": "find.symbols",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. },
  1941. {
  1942. "name": "query",
  1943. "in": "query",
  1944. "schema": {
  1945. "type": "string"
  1946. },
  1947. "required": true
  1948. }
  1949. ],
  1950. "responses": {
  1951. "200": {
  1952. "description": "Symbols",
  1953. "content": {
  1954. "application/json": {
  1955. "schema": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/components/schemas/Symbol"
  1959. },
  1960. "description": "Symbols"
  1961. }
  1962. }
  1963. }
  1964. },
  1965. "400": {
  1966. "description": "Bad request",
  1967. "content": {
  1968. "application/json": {
  1969. "schema": {
  1970. "$ref": "#/components/schemas/BadRequestError"
  1971. }
  1972. }
  1973. }
  1974. }
  1975. },
  1976. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1977. "summary": "Find symbols",
  1978. "x-codeSamples": [
  1979. {
  1980. "lang": "js",
  1981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1982. }
  1983. ]
  1984. }
  1985. },
  1986. "/file": {
  1987. "get": {
  1988. "tags": ["file"],
  1989. "operationId": "file.list",
  1990. "parameters": [
  1991. {
  1992. "name": "directory",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "workspace",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string"
  2004. },
  2005. "required": false
  2006. },
  2007. {
  2008. "name": "path",
  2009. "in": "query",
  2010. "schema": {
  2011. "type": "string"
  2012. },
  2013. "required": true
  2014. }
  2015. ],
  2016. "responses": {
  2017. "200": {
  2018. "description": "Files and directories",
  2019. "content": {
  2020. "application/json": {
  2021. "schema": {
  2022. "type": "array",
  2023. "items": {
  2024. "$ref": "#/components/schemas/FileNode"
  2025. },
  2026. "description": "Files and directories"
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "400": {
  2032. "description": "Bad request",
  2033. "content": {
  2034. "application/json": {
  2035. "schema": {
  2036. "$ref": "#/components/schemas/BadRequestError"
  2037. }
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "description": "List files and directories in a specified path.",
  2043. "summary": "List files",
  2044. "x-codeSamples": [
  2045. {
  2046. "lang": "js",
  2047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2048. }
  2049. ]
  2050. }
  2051. },
  2052. "/file/content": {
  2053. "get": {
  2054. "tags": ["file"],
  2055. "operationId": "file.read",
  2056. "parameters": [
  2057. {
  2058. "name": "directory",
  2059. "in": "query",
  2060. "schema": {
  2061. "type": "string"
  2062. },
  2063. "required": false
  2064. },
  2065. {
  2066. "name": "workspace",
  2067. "in": "query",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": false
  2072. },
  2073. {
  2074. "name": "path",
  2075. "in": "query",
  2076. "schema": {
  2077. "type": "string"
  2078. },
  2079. "required": true
  2080. }
  2081. ],
  2082. "responses": {
  2083. "200": {
  2084. "description": "File content",
  2085. "content": {
  2086. "application/json": {
  2087. "schema": {
  2088. "$ref": "#/components/schemas/FileContent"
  2089. }
  2090. }
  2091. }
  2092. },
  2093. "400": {
  2094. "description": "Bad request",
  2095. "content": {
  2096. "application/json": {
  2097. "schema": {
  2098. "$ref": "#/components/schemas/BadRequestError"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "description": "Read the content of a specified file.",
  2105. "summary": "Read file",
  2106. "x-codeSamples": [
  2107. {
  2108. "lang": "js",
  2109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2110. }
  2111. ]
  2112. }
  2113. },
  2114. "/file/status": {
  2115. "get": {
  2116. "tags": ["file"],
  2117. "operationId": "file.status",
  2118. "parameters": [
  2119. {
  2120. "name": "directory",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "workspace",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": false
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File status",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "type": "array",
  2143. "items": {
  2144. "$ref": "#/components/schemas/File"
  2145. },
  2146. "description": "File status"
  2147. }
  2148. }
  2149. }
  2150. },
  2151. "400": {
  2152. "description": "Bad request",
  2153. "content": {
  2154. "application/json": {
  2155. "schema": {
  2156. "$ref": "#/components/schemas/BadRequestError"
  2157. }
  2158. }
  2159. }
  2160. }
  2161. },
  2162. "description": "Get the git status of all files in the project.",
  2163. "summary": "Get file status",
  2164. "x-codeSamples": [
  2165. {
  2166. "lang": "js",
  2167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2168. }
  2169. ]
  2170. }
  2171. },
  2172. "/instance/dispose": {
  2173. "post": {
  2174. "tags": ["instance"],
  2175. "operationId": "instance.dispose",
  2176. "parameters": [
  2177. {
  2178. "name": "directory",
  2179. "in": "query",
  2180. "schema": {
  2181. "type": "string"
  2182. },
  2183. "required": false
  2184. },
  2185. {
  2186. "name": "workspace",
  2187. "in": "query",
  2188. "schema": {
  2189. "type": "string"
  2190. },
  2191. "required": false
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "description": "Instance disposed",
  2197. "content": {
  2198. "application/json": {
  2199. "schema": {
  2200. "type": "boolean",
  2201. "description": "Instance disposed"
  2202. }
  2203. }
  2204. }
  2205. },
  2206. "400": {
  2207. "description": "Bad request",
  2208. "content": {
  2209. "application/json": {
  2210. "schema": {
  2211. "$ref": "#/components/schemas/BadRequestError"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. },
  2217. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2218. "summary": "Dispose instance",
  2219. "x-codeSamples": [
  2220. {
  2221. "lang": "js",
  2222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2223. }
  2224. ]
  2225. }
  2226. },
  2227. "/path": {
  2228. "get": {
  2229. "tags": ["instance"],
  2230. "operationId": "path.get",
  2231. "parameters": [
  2232. {
  2233. "name": "directory",
  2234. "in": "query",
  2235. "schema": {
  2236. "type": "string"
  2237. },
  2238. "required": false
  2239. },
  2240. {
  2241. "name": "workspace",
  2242. "in": "query",
  2243. "schema": {
  2244. "type": "string"
  2245. },
  2246. "required": false
  2247. }
  2248. ],
  2249. "responses": {
  2250. "200": {
  2251. "description": "Path",
  2252. "content": {
  2253. "application/json": {
  2254. "schema": {
  2255. "$ref": "#/components/schemas/Path"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2272. "summary": "Get paths",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/vcs": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "vcs.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "VCS info",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/VcsInfo"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2326. "summary": "Get VCS info",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs/status": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/VcsFileStatus"
  2366. },
  2367. "description": "VCS status"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "400": {
  2373. "description": "Bad request",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/BadRequestError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "description": "Retrieve changed files in the current working tree without patches.",
  2384. "summary": "Get VCS status",
  2385. "x-codeSamples": [
  2386. {
  2387. "lang": "js",
  2388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2389. }
  2390. ]
  2391. }
  2392. },
  2393. "/vcs/diff": {
  2394. "get": {
  2395. "tags": ["instance"],
  2396. "operationId": "vcs.diff",
  2397. "parameters": [
  2398. {
  2399. "name": "directory",
  2400. "in": "query",
  2401. "schema": {
  2402. "type": "string"
  2403. },
  2404. "required": false
  2405. },
  2406. {
  2407. "name": "workspace",
  2408. "in": "query",
  2409. "schema": {
  2410. "type": "string"
  2411. },
  2412. "required": false
  2413. },
  2414. {
  2415. "name": "mode",
  2416. "in": "query",
  2417. "schema": {
  2418. "type": "string",
  2419. "enum": ["git", "branch"]
  2420. },
  2421. "required": true
  2422. },
  2423. {
  2424. "name": "context",
  2425. "in": "query",
  2426. "schema": {
  2427. "type": "integer",
  2428. "minimum": 0
  2429. },
  2430. "required": false
  2431. }
  2432. ],
  2433. "responses": {
  2434. "200": {
  2435. "description": "VCS diff",
  2436. "content": {
  2437. "application/json": {
  2438. "schema": {
  2439. "type": "array",
  2440. "items": {
  2441. "$ref": "#/components/schemas/VcsFileDiff"
  2442. },
  2443. "description": "VCS diff"
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "400": {
  2449. "description": "Bad request",
  2450. "content": {
  2451. "application/json": {
  2452. "schema": {
  2453. "$ref": "#/components/schemas/BadRequestError"
  2454. }
  2455. }
  2456. }
  2457. }
  2458. },
  2459. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2460. "summary": "Get VCS diff",
  2461. "x-codeSamples": [
  2462. {
  2463. "lang": "js",
  2464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2465. }
  2466. ]
  2467. }
  2468. },
  2469. "/vcs/diff/raw": {
  2470. "get": {
  2471. "tags": ["instance"],
  2472. "operationId": "vcs.diff.raw",
  2473. "parameters": [
  2474. {
  2475. "name": "directory",
  2476. "in": "query",
  2477. "schema": {
  2478. "type": "string"
  2479. },
  2480. "required": false
  2481. },
  2482. {
  2483. "name": "workspace",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. }
  2490. ],
  2491. "responses": {
  2492. "200": {
  2493. "description": "Raw VCS diff",
  2494. "content": {
  2495. "text/x-diff; charset=utf-8": {
  2496. "schema": {
  2497. "type": "string"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve a raw patch for current uncommitted changes.",
  2514. "summary": "Get raw VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/apply": {
  2524. "post": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.apply",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "VCS patch applied",
  2548. "content": {
  2549. "application/json": {
  2550. "schema": {
  2551. "type": "object",
  2552. "properties": {
  2553. "applied": {
  2554. "type": "boolean"
  2555. }
  2556. },
  2557. "required": ["applied"],
  2558. "additionalProperties": false,
  2559. "description": "VCS patch applied"
  2560. }
  2561. }
  2562. }
  2563. },
  2564. "400": {
  2565. "description": "VcsApplyError | InvalidRequestError",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "anyOf": [
  2570. {
  2571. "$ref": "#/components/schemas/VcsApplyError"
  2572. },
  2573. {
  2574. "$ref": "#/components/schemas/InvalidRequestError"
  2575. }
  2576. ]
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "description": "Apply a raw patch to the current working tree.",
  2583. "summary": "Apply VCS patch",
  2584. "requestBody": {
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "type": "object",
  2589. "properties": {
  2590. "patch": {
  2591. "type": "string"
  2592. }
  2593. },
  2594. "required": ["patch"],
  2595. "additionalProperties": false
  2596. }
  2597. }
  2598. }
  2599. },
  2600. "x-codeSamples": [
  2601. {
  2602. "lang": "js",
  2603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2604. }
  2605. ]
  2606. }
  2607. },
  2608. "/command": {
  2609. "get": {
  2610. "tags": ["instance"],
  2611. "operationId": "command.list",
  2612. "parameters": [
  2613. {
  2614. "name": "directory",
  2615. "in": "query",
  2616. "schema": {
  2617. "type": "string"
  2618. },
  2619. "required": false
  2620. },
  2621. {
  2622. "name": "workspace",
  2623. "in": "query",
  2624. "schema": {
  2625. "type": "string"
  2626. },
  2627. "required": false
  2628. }
  2629. ],
  2630. "responses": {
  2631. "200": {
  2632. "description": "List of commands",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "type": "array",
  2637. "items": {
  2638. "$ref": "#/components/schemas/Command"
  2639. },
  2640. "description": "List of commands"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "400": {
  2646. "description": "Bad request",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "$ref": "#/components/schemas/BadRequestError"
  2651. }
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "description": "Get a list of all available commands in the OpenCode system.",
  2657. "summary": "List commands",
  2658. "x-codeSamples": [
  2659. {
  2660. "lang": "js",
  2661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2662. }
  2663. ]
  2664. }
  2665. },
  2666. "/agent": {
  2667. "get": {
  2668. "tags": ["instance"],
  2669. "operationId": "app.agents",
  2670. "parameters": [
  2671. {
  2672. "name": "directory",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. },
  2679. {
  2680. "name": "workspace",
  2681. "in": "query",
  2682. "schema": {
  2683. "type": "string"
  2684. },
  2685. "required": false
  2686. }
  2687. ],
  2688. "responses": {
  2689. "200": {
  2690. "description": "List of agents",
  2691. "content": {
  2692. "application/json": {
  2693. "schema": {
  2694. "type": "array",
  2695. "items": {
  2696. "$ref": "#/components/schemas/Agent"
  2697. },
  2698. "description": "List of agents"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "400": {
  2704. "description": "Bad request",
  2705. "content": {
  2706. "application/json": {
  2707. "schema": {
  2708. "$ref": "#/components/schemas/BadRequestError"
  2709. }
  2710. }
  2711. }
  2712. }
  2713. },
  2714. "description": "Get a list of all available AI agents in the OpenCode system.",
  2715. "summary": "List agents",
  2716. "x-codeSamples": [
  2717. {
  2718. "lang": "js",
  2719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2720. }
  2721. ]
  2722. }
  2723. },
  2724. "/skill": {
  2725. "get": {
  2726. "tags": ["instance"],
  2727. "operationId": "app.skills",
  2728. "parameters": [
  2729. {
  2730. "name": "directory",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. },
  2737. {
  2738. "name": "workspace",
  2739. "in": "query",
  2740. "schema": {
  2741. "type": "string"
  2742. },
  2743. "required": false
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "List of skills",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "array",
  2753. "items": {
  2754. "type": "object",
  2755. "properties": {
  2756. "name": {
  2757. "type": "string"
  2758. },
  2759. "description": {
  2760. "type": "string"
  2761. },
  2762. "location": {
  2763. "type": "string"
  2764. },
  2765. "content": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["name", "location", "content"],
  2770. "additionalProperties": false
  2771. },
  2772. "description": "List of skills"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "400": {
  2778. "description": "Bad request",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/BadRequestError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "description": "Get a list of all available skills in the OpenCode system.",
  2789. "summary": "List skills",
  2790. "x-codeSamples": [
  2791. {
  2792. "lang": "js",
  2793. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2794. }
  2795. ]
  2796. }
  2797. },
  2798. "/lsp": {
  2799. "get": {
  2800. "tags": ["instance"],
  2801. "operationId": "lsp.status",
  2802. "parameters": [
  2803. {
  2804. "name": "directory",
  2805. "in": "query",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": false
  2810. },
  2811. {
  2812. "name": "workspace",
  2813. "in": "query",
  2814. "schema": {
  2815. "type": "string"
  2816. },
  2817. "required": false
  2818. }
  2819. ],
  2820. "responses": {
  2821. "200": {
  2822. "description": "LSP server status",
  2823. "content": {
  2824. "application/json": {
  2825. "schema": {
  2826. "type": "array",
  2827. "items": {
  2828. "$ref": "#/components/schemas/LSPStatus"
  2829. },
  2830. "description": "LSP server status"
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "400": {
  2836. "description": "Bad request",
  2837. "content": {
  2838. "application/json": {
  2839. "schema": {
  2840. "$ref": "#/components/schemas/BadRequestError"
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "description": "Get LSP server status",
  2847. "summary": "Get LSP status",
  2848. "x-codeSamples": [
  2849. {
  2850. "lang": "js",
  2851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2852. }
  2853. ]
  2854. }
  2855. },
  2856. "/formatter": {
  2857. "get": {
  2858. "tags": ["instance"],
  2859. "operationId": "formatter.status",
  2860. "parameters": [
  2861. {
  2862. "name": "directory",
  2863. "in": "query",
  2864. "schema": {
  2865. "type": "string"
  2866. },
  2867. "required": false
  2868. },
  2869. {
  2870. "name": "workspace",
  2871. "in": "query",
  2872. "schema": {
  2873. "type": "string"
  2874. },
  2875. "required": false
  2876. }
  2877. ],
  2878. "responses": {
  2879. "200": {
  2880. "description": "Formatter status",
  2881. "content": {
  2882. "application/json": {
  2883. "schema": {
  2884. "type": "array",
  2885. "items": {
  2886. "$ref": "#/components/schemas/FormatterStatus"
  2887. },
  2888. "description": "Formatter status"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "400": {
  2894. "description": "Bad request",
  2895. "content": {
  2896. "application/json": {
  2897. "schema": {
  2898. "$ref": "#/components/schemas/BadRequestError"
  2899. }
  2900. }
  2901. }
  2902. }
  2903. },
  2904. "description": "Get formatter status",
  2905. "summary": "Get formatter status",
  2906. "x-codeSamples": [
  2907. {
  2908. "lang": "js",
  2909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2910. }
  2911. ]
  2912. }
  2913. },
  2914. "/mcp": {
  2915. "get": {
  2916. "tags": ["mcp"],
  2917. "operationId": "mcp.status",
  2918. "parameters": [
  2919. {
  2920. "name": "directory",
  2921. "in": "query",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": false
  2926. },
  2927. {
  2928. "name": "workspace",
  2929. "in": "query",
  2930. "schema": {
  2931. "type": "string"
  2932. },
  2933. "required": false
  2934. }
  2935. ],
  2936. "responses": {
  2937. "200": {
  2938. "description": "MCP server status",
  2939. "content": {
  2940. "application/json": {
  2941. "schema": {
  2942. "type": "object",
  2943. "additionalProperties": {
  2944. "$ref": "#/components/schemas/MCPStatus"
  2945. },
  2946. "description": "MCP server status"
  2947. }
  2948. }
  2949. }
  2950. },
  2951. "400": {
  2952. "description": "Bad request",
  2953. "content": {
  2954. "application/json": {
  2955. "schema": {
  2956. "$ref": "#/components/schemas/BadRequestError"
  2957. }
  2958. }
  2959. }
  2960. }
  2961. },
  2962. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2963. "summary": "Get MCP status",
  2964. "x-codeSamples": [
  2965. {
  2966. "lang": "js",
  2967. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2968. }
  2969. ]
  2970. },
  2971. "post": {
  2972. "tags": ["mcp"],
  2973. "operationId": "mcp.add",
  2974. "parameters": [
  2975. {
  2976. "name": "directory",
  2977. "in": "query",
  2978. "schema": {
  2979. "type": "string"
  2980. },
  2981. "required": false
  2982. },
  2983. {
  2984. "name": "workspace",
  2985. "in": "query",
  2986. "schema": {
  2987. "type": "string"
  2988. },
  2989. "required": false
  2990. }
  2991. ],
  2992. "responses": {
  2993. "200": {
  2994. "description": "MCP server added successfully",
  2995. "content": {
  2996. "application/json": {
  2997. "schema": {
  2998. "type": "object",
  2999. "additionalProperties": {
  3000. "$ref": "#/components/schemas/MCPStatus"
  3001. },
  3002. "description": "MCP server added successfully"
  3003. }
  3004. }
  3005. }
  3006. },
  3007. "400": {
  3008. "description": "BadRequest | InvalidRequestError",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "anyOf": [
  3013. {
  3014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3015. },
  3016. {
  3017. "$ref": "#/components/schemas/InvalidRequestError"
  3018. }
  3019. ]
  3020. }
  3021. }
  3022. }
  3023. }
  3024. },
  3025. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3026. "summary": "Add MCP server",
  3027. "requestBody": {
  3028. "content": {
  3029. "application/json": {
  3030. "schema": {
  3031. "type": "object",
  3032. "properties": {
  3033. "name": {
  3034. "type": "string"
  3035. },
  3036. "config": {
  3037. "anyOf": [
  3038. {
  3039. "$ref": "#/components/schemas/McpLocalConfig"
  3040. },
  3041. {
  3042. "$ref": "#/components/schemas/McpRemoteConfig"
  3043. }
  3044. ]
  3045. }
  3046. },
  3047. "required": ["name", "config"],
  3048. "additionalProperties": false
  3049. }
  3050. }
  3051. }
  3052. },
  3053. "x-codeSamples": [
  3054. {
  3055. "lang": "js",
  3056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3057. }
  3058. ]
  3059. }
  3060. },
  3061. "/mcp/{name}/auth": {
  3062. "post": {
  3063. "tags": ["mcp"],
  3064. "operationId": "mcp.auth.start",
  3065. "parameters": [
  3066. {
  3067. "name": "name",
  3068. "in": "path",
  3069. "schema": {
  3070. "type": "string"
  3071. },
  3072. "required": true
  3073. },
  3074. {
  3075. "name": "directory",
  3076. "in": "query",
  3077. "schema": {
  3078. "type": "string"
  3079. },
  3080. "required": false
  3081. },
  3082. {
  3083. "name": "workspace",
  3084. "in": "query",
  3085. "schema": {
  3086. "type": "string"
  3087. },
  3088. "required": false
  3089. }
  3090. ],
  3091. "responses": {
  3092. "200": {
  3093. "description": "OAuth flow started",
  3094. "content": {
  3095. "application/json": {
  3096. "schema": {
  3097. "type": "object",
  3098. "properties": {
  3099. "authorizationUrl": {
  3100. "type": "string"
  3101. },
  3102. "oauthState": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. "required": ["authorizationUrl", "oauthState"],
  3107. "additionalProperties": false,
  3108. "description": "OAuth flow started"
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "400": {
  3114. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3115. "content": {
  3116. "application/json": {
  3117. "schema": {
  3118. "anyOf": [
  3119. {
  3120. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3121. },
  3122. {
  3123. "$ref": "#/components/schemas/InvalidRequestError"
  3124. }
  3125. ]
  3126. }
  3127. }
  3128. }
  3129. },
  3130. "404": {
  3131. "description": "McpServerNotFoundError",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/McpServerNotFoundError"
  3136. }
  3137. }
  3138. }
  3139. }
  3140. },
  3141. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3142. "summary": "Start MCP OAuth",
  3143. "x-codeSamples": [
  3144. {
  3145. "lang": "js",
  3146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3147. }
  3148. ]
  3149. },
  3150. "delete": {
  3151. "tags": ["mcp"],
  3152. "operationId": "mcp.auth.remove",
  3153. "parameters": [
  3154. {
  3155. "name": "name",
  3156. "in": "path",
  3157. "schema": {
  3158. "type": "string"
  3159. },
  3160. "required": true
  3161. },
  3162. {
  3163. "name": "directory",
  3164. "in": "query",
  3165. "schema": {
  3166. "type": "string"
  3167. },
  3168. "required": false
  3169. },
  3170. {
  3171. "name": "workspace",
  3172. "in": "query",
  3173. "schema": {
  3174. "type": "string"
  3175. },
  3176. "required": false
  3177. }
  3178. ],
  3179. "responses": {
  3180. "200": {
  3181. "description": "OAuth credentials removed",
  3182. "content": {
  3183. "application/json": {
  3184. "schema": {
  3185. "type": "object",
  3186. "properties": {
  3187. "success": {
  3188. "type": "boolean",
  3189. "enum": [true]
  3190. }
  3191. },
  3192. "required": ["success"],
  3193. "additionalProperties": false,
  3194. "description": "OAuth credentials removed"
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Bad request",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "$ref": "#/components/schemas/BadRequestError"
  3205. }
  3206. }
  3207. }
  3208. },
  3209. "404": {
  3210. "description": "McpServerNotFoundError",
  3211. "content": {
  3212. "application/json": {
  3213. "schema": {
  3214. "$ref": "#/components/schemas/McpServerNotFoundError"
  3215. }
  3216. }
  3217. }
  3218. }
  3219. },
  3220. "description": "Remove OAuth credentials for an MCP server.",
  3221. "summary": "Remove MCP OAuth",
  3222. "x-codeSamples": [
  3223. {
  3224. "lang": "js",
  3225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3226. }
  3227. ]
  3228. }
  3229. },
  3230. "/mcp/{name}/auth/callback": {
  3231. "post": {
  3232. "tags": ["mcp"],
  3233. "operationId": "mcp.auth.callback",
  3234. "parameters": [
  3235. {
  3236. "name": "name",
  3237. "in": "path",
  3238. "schema": {
  3239. "type": "string"
  3240. },
  3241. "required": true
  3242. },
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "schema": {
  3247. "type": "string"
  3248. },
  3249. "required": false
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "schema": {
  3255. "type": "string"
  3256. },
  3257. "required": false
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "OAuth authentication completed",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "$ref": "#/components/schemas/MCPStatus"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "BadRequest | InvalidRequestError",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "anyOf": [
  3277. {
  3278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3279. },
  3280. {
  3281. "$ref": "#/components/schemas/InvalidRequestError"
  3282. }
  3283. ]
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "404": {
  3289. "description": "McpServerNotFoundError",
  3290. "content": {
  3291. "application/json": {
  3292. "schema": {
  3293. "$ref": "#/components/schemas/McpServerNotFoundError"
  3294. }
  3295. }
  3296. }
  3297. }
  3298. },
  3299. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3300. "summary": "Complete MCP OAuth",
  3301. "requestBody": {
  3302. "content": {
  3303. "application/json": {
  3304. "schema": {
  3305. "type": "object",
  3306. "properties": {
  3307. "code": {
  3308. "type": "string"
  3309. }
  3310. },
  3311. "required": ["code"],
  3312. "additionalProperties": false
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "x-codeSamples": [
  3318. {
  3319. "lang": "js",
  3320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3321. }
  3322. ]
  3323. }
  3324. },
  3325. "/mcp/{name}/auth/authenticate": {
  3326. "post": {
  3327. "tags": ["mcp"],
  3328. "operationId": "mcp.auth.authenticate",
  3329. "parameters": [
  3330. {
  3331. "name": "name",
  3332. "in": "path",
  3333. "schema": {
  3334. "type": "string"
  3335. },
  3336. "required": true
  3337. },
  3338. {
  3339. "name": "directory",
  3340. "in": "query",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": false
  3345. },
  3346. {
  3347. "name": "workspace",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. }
  3354. ],
  3355. "responses": {
  3356. "200": {
  3357. "description": "OAuth authentication completed",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/MCPStatus"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "400": {
  3367. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "anyOf": [
  3372. {
  3373. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3374. },
  3375. {
  3376. "$ref": "#/components/schemas/InvalidRequestError"
  3377. }
  3378. ]
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "404": {
  3384. "description": "McpServerNotFoundError",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "$ref": "#/components/schemas/McpServerNotFoundError"
  3389. }
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "description": "Start OAuth flow and wait for callback (opens browser).",
  3395. "summary": "Authenticate MCP OAuth",
  3396. "x-codeSamples": [
  3397. {
  3398. "lang": "js",
  3399. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3400. }
  3401. ]
  3402. }
  3403. },
  3404. "/mcp/{name}/connect": {
  3405. "post": {
  3406. "tags": ["mcp"],
  3407. "operationId": "mcp.connect",
  3408. "parameters": [
  3409. {
  3410. "name": "name",
  3411. "in": "path",
  3412. "schema": {
  3413. "type": "string"
  3414. },
  3415. "required": true
  3416. },
  3417. {
  3418. "name": "directory",
  3419. "in": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": false
  3424. },
  3425. {
  3426. "name": "workspace",
  3427. "in": "query",
  3428. "schema": {
  3429. "type": "string"
  3430. },
  3431. "required": false
  3432. }
  3433. ],
  3434. "responses": {
  3435. "200": {
  3436. "description": "MCP server connected successfully",
  3437. "content": {
  3438. "application/json": {
  3439. "schema": {
  3440. "type": "boolean",
  3441. "description": "MCP server connected successfully"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "400": {
  3447. "description": "Bad request",
  3448. "content": {
  3449. "application/json": {
  3450. "schema": {
  3451. "$ref": "#/components/schemas/BadRequestError"
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "404": {
  3457. "description": "McpServerNotFoundError",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/McpServerNotFoundError"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "description": "Connect an MCP server.",
  3468. "x-codeSamples": [
  3469. {
  3470. "lang": "js",
  3471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3472. }
  3473. ]
  3474. }
  3475. },
  3476. "/mcp/{name}/disconnect": {
  3477. "post": {
  3478. "tags": ["mcp"],
  3479. "operationId": "mcp.disconnect",
  3480. "parameters": [
  3481. {
  3482. "name": "name",
  3483. "in": "path",
  3484. "schema": {
  3485. "type": "string"
  3486. },
  3487. "required": true
  3488. },
  3489. {
  3490. "name": "directory",
  3491. "in": "query",
  3492. "schema": {
  3493. "type": "string"
  3494. },
  3495. "required": false
  3496. },
  3497. {
  3498. "name": "workspace",
  3499. "in": "query",
  3500. "schema": {
  3501. "type": "string"
  3502. },
  3503. "required": false
  3504. }
  3505. ],
  3506. "responses": {
  3507. "200": {
  3508. "description": "MCP server disconnected successfully",
  3509. "content": {
  3510. "application/json": {
  3511. "schema": {
  3512. "type": "boolean",
  3513. "description": "MCP server disconnected successfully"
  3514. }
  3515. }
  3516. }
  3517. },
  3518. "400": {
  3519. "description": "Bad request",
  3520. "content": {
  3521. "application/json": {
  3522. "schema": {
  3523. "$ref": "#/components/schemas/BadRequestError"
  3524. }
  3525. }
  3526. }
  3527. },
  3528. "404": {
  3529. "description": "McpServerNotFoundError",
  3530. "content": {
  3531. "application/json": {
  3532. "schema": {
  3533. "$ref": "#/components/schemas/McpServerNotFoundError"
  3534. }
  3535. }
  3536. }
  3537. }
  3538. },
  3539. "description": "Disconnect an MCP server.",
  3540. "x-codeSamples": [
  3541. {
  3542. "lang": "js",
  3543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3544. }
  3545. ]
  3546. }
  3547. },
  3548. "/project": {
  3549. "get": {
  3550. "tags": ["project"],
  3551. "operationId": "project.list",
  3552. "parameters": [
  3553. {
  3554. "name": "directory",
  3555. "in": "query",
  3556. "schema": {
  3557. "type": "string"
  3558. },
  3559. "required": false
  3560. },
  3561. {
  3562. "name": "workspace",
  3563. "in": "query",
  3564. "schema": {
  3565. "type": "string"
  3566. },
  3567. "required": false
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "description": "List of projects",
  3573. "content": {
  3574. "application/json": {
  3575. "schema": {
  3576. "type": "array",
  3577. "items": {
  3578. "$ref": "#/components/schemas/Project"
  3579. },
  3580. "description": "List of projects"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "400": {
  3586. "description": "Bad request",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/BadRequestError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Get a list of projects that have been opened with OpenCode.",
  3597. "summary": "List all projects",
  3598. "x-codeSamples": [
  3599. {
  3600. "lang": "js",
  3601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3602. }
  3603. ]
  3604. }
  3605. },
  3606. "/project/current": {
  3607. "get": {
  3608. "tags": ["project"],
  3609. "operationId": "project.current",
  3610. "parameters": [
  3611. {
  3612. "name": "directory",
  3613. "in": "query",
  3614. "schema": {
  3615. "type": "string"
  3616. },
  3617. "required": false
  3618. },
  3619. {
  3620. "name": "workspace",
  3621. "in": "query",
  3622. "schema": {
  3623. "type": "string"
  3624. },
  3625. "required": false
  3626. }
  3627. ],
  3628. "responses": {
  3629. "200": {
  3630. "description": "Current project information",
  3631. "content": {
  3632. "application/json": {
  3633. "schema": {
  3634. "$ref": "#/components/schemas/Project"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Retrieve the currently active project that OpenCode is working with.",
  3651. "summary": "Get current project",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/git/init": {
  3661. "post": {
  3662. "tags": ["project"],
  3663. "operationId": "project.initGit",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Project information after git initialization",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Create a git repository for the current project and return the refreshed project info.",
  3705. "summary": "Initialize git repository",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/{projectID}": {
  3715. "patch": {
  3716. "tags": ["project"],
  3717. "operationId": "project.update",
  3718. "parameters": [
  3719. {
  3720. "name": "projectID",
  3721. "in": "path",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": true
  3726. },
  3727. {
  3728. "name": "directory",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. },
  3735. {
  3736. "name": "workspace",
  3737. "in": "query",
  3738. "schema": {
  3739. "type": "string"
  3740. },
  3741. "required": false
  3742. }
  3743. ],
  3744. "responses": {
  3745. "200": {
  3746. "description": "Updated project information",
  3747. "content": {
  3748. "application/json": {
  3749. "schema": {
  3750. "$ref": "#/components/schemas/Project"
  3751. }
  3752. }
  3753. }
  3754. },
  3755. "400": {
  3756. "description": "BadRequest | InvalidRequestError",
  3757. "content": {
  3758. "application/json": {
  3759. "schema": {
  3760. "anyOf": [
  3761. {
  3762. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3763. },
  3764. {
  3765. "$ref": "#/components/schemas/InvalidRequestError"
  3766. }
  3767. ]
  3768. }
  3769. }
  3770. }
  3771. },
  3772. "404": {
  3773. "description": "ProjectNotFoundError",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "$ref": "#/components/schemas/ProjectNotFoundError"
  3778. }
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "description": "Update project properties such as name, icon, and commands.",
  3784. "summary": "Update project",
  3785. "requestBody": {
  3786. "content": {
  3787. "application/json": {
  3788. "schema": {
  3789. "type": "object",
  3790. "properties": {
  3791. "name": {
  3792. "type": "string"
  3793. },
  3794. "icon": {
  3795. "type": "object",
  3796. "properties": {
  3797. "url": {
  3798. "type": "string"
  3799. },
  3800. "override": {
  3801. "type": "string"
  3802. },
  3803. "color": {
  3804. "type": "string"
  3805. }
  3806. },
  3807. "additionalProperties": false
  3808. },
  3809. "commands": {
  3810. "type": "object",
  3811. "properties": {
  3812. "start": {
  3813. "type": "string",
  3814. "description": "Startup script to run when creating a new workspace (worktree)"
  3815. }
  3816. },
  3817. "additionalProperties": false
  3818. }
  3819. },
  3820. "additionalProperties": false
  3821. }
  3822. }
  3823. }
  3824. },
  3825. "x-codeSamples": [
  3826. {
  3827. "lang": "js",
  3828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3829. }
  3830. ]
  3831. }
  3832. },
  3833. "/project/{projectID}/directories": {
  3834. "get": {
  3835. "tags": ["project"],
  3836. "operationId": "project.directories",
  3837. "parameters": [
  3838. {
  3839. "name": "projectID",
  3840. "in": "path",
  3841. "schema": {
  3842. "type": "string"
  3843. },
  3844. "required": true
  3845. },
  3846. {
  3847. "name": "directory",
  3848. "in": "query",
  3849. "schema": {
  3850. "type": "string"
  3851. },
  3852. "required": false
  3853. },
  3854. {
  3855. "name": "workspace",
  3856. "in": "query",
  3857. "schema": {
  3858. "type": "string"
  3859. },
  3860. "required": false
  3861. }
  3862. ],
  3863. "responses": {
  3864. "200": {
  3865. "description": "Project directories",
  3866. "content": {
  3867. "application/json": {
  3868. "schema": {
  3869. "$ref": "#/components/schemas/ProjectDirectories"
  3870. }
  3871. }
  3872. }
  3873. },
  3874. "400": {
  3875. "description": "Bad request",
  3876. "content": {
  3877. "application/json": {
  3878. "schema": {
  3879. "$ref": "#/components/schemas/BadRequestError"
  3880. }
  3881. }
  3882. }
  3883. }
  3884. },
  3885. "description": "List known local absolute directories for a project.",
  3886. "summary": "List project directories",
  3887. "x-codeSamples": [
  3888. {
  3889. "lang": "js",
  3890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3891. }
  3892. ]
  3893. }
  3894. },
  3895. "/experimental/project/{projectID}/copy": {
  3896. "post": {
  3897. "tags": ["projectCopy"],
  3898. "operationId": "experimental.projectCopy.create",
  3899. "parameters": [
  3900. {
  3901. "name": "projectID",
  3902. "in": "path",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project copy created",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectCopyCopy"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "ProjectCopyError | InvalidRequestError",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "anyOf": [
  3934. {
  3935. "$ref": "#/components/schemas/ProjectCopyError"
  3936. },
  3937. {
  3938. "$ref": "#/components/schemas/InvalidRequestError"
  3939. }
  3940. ]
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Create a local physical copy of a project using the selected strategy.",
  3947. "summary": "Create project copy",
  3948. "requestBody": {
  3949. "content": {
  3950. "application/json": {
  3951. "schema": {
  3952. "type": "object",
  3953. "properties": {
  3954. "strategy": {
  3955. "type": "string",
  3956. "enum": ["git_worktree"]
  3957. },
  3958. "directory": {
  3959. "type": "string"
  3960. },
  3961. "name": {
  3962. "type": "string"
  3963. },
  3964. "context": {
  3965. "type": "string"
  3966. }
  3967. },
  3968. "required": ["strategy", "directory"],
  3969. "additionalProperties": false
  3970. }
  3971. }
  3972. }
  3973. },
  3974. "x-codeSamples": [
  3975. {
  3976. "lang": "js",
  3977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3978. }
  3979. ]
  3980. },
  3981. "delete": {
  3982. "tags": ["projectCopy"],
  3983. "operationId": "experimental.projectCopy.remove",
  3984. "parameters": [
  3985. {
  3986. "name": "projectID",
  3987. "in": "path",
  3988. "schema": {
  3989. "type": "string"
  3990. },
  3991. "required": true
  3992. },
  3993. {
  3994. "name": "workspace",
  3995. "in": "query",
  3996. "schema": {
  3997. "type": "string"
  3998. },
  3999. "required": false
  4000. }
  4001. ],
  4002. "responses": {
  4003. "204": {
  4004. "description": "Project copy removed"
  4005. },
  4006. "400": {
  4007. "description": "ProjectCopyError | InvalidRequestError",
  4008. "content": {
  4009. "application/json": {
  4010. "schema": {
  4011. "anyOf": [
  4012. {
  4013. "$ref": "#/components/schemas/ProjectCopyError"
  4014. },
  4015. {
  4016. "$ref": "#/components/schemas/InvalidRequestError"
  4017. }
  4018. ]
  4019. }
  4020. }
  4021. }
  4022. }
  4023. },
  4024. "description": "Remove a local physical copy of a project using the selected strategy.",
  4025. "summary": "Remove project copy",
  4026. "requestBody": {
  4027. "content": {
  4028. "application/json": {
  4029. "schema": {
  4030. "type": "object",
  4031. "properties": {
  4032. "directory": {
  4033. "type": "string"
  4034. },
  4035. "force": {
  4036. "type": "boolean"
  4037. }
  4038. },
  4039. "required": ["directory", "force"],
  4040. "additionalProperties": false
  4041. }
  4042. }
  4043. }
  4044. },
  4045. "x-codeSamples": [
  4046. {
  4047. "lang": "js",
  4048. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  4049. }
  4050. ]
  4051. }
  4052. },
  4053. "/experimental/project/{projectID}/copy/refresh": {
  4054. "post": {
  4055. "tags": ["projectCopy"],
  4056. "operationId": "experimental.projectCopy.refresh",
  4057. "parameters": [
  4058. {
  4059. "name": "projectID",
  4060. "in": "path",
  4061. "schema": {
  4062. "type": "string"
  4063. },
  4064. "required": true
  4065. },
  4066. {
  4067. "name": "directory",
  4068. "in": "query",
  4069. "schema": {
  4070. "type": "string"
  4071. },
  4072. "required": false
  4073. },
  4074. {
  4075. "name": "workspace",
  4076. "in": "query",
  4077. "schema": {
  4078. "type": "string"
  4079. },
  4080. "required": false
  4081. }
  4082. ],
  4083. "responses": {
  4084. "204": {
  4085. "description": "Project copies refreshed"
  4086. },
  4087. "400": {
  4088. "description": "ProjectCopyError | InvalidRequestError",
  4089. "content": {
  4090. "application/json": {
  4091. "schema": {
  4092. "anyOf": [
  4093. {
  4094. "$ref": "#/components/schemas/ProjectCopyError"
  4095. },
  4096. {
  4097. "$ref": "#/components/schemas/InvalidRequestError"
  4098. }
  4099. ]
  4100. }
  4101. }
  4102. }
  4103. }
  4104. },
  4105. "description": "Discover local project copies using one or all configured strategies.",
  4106. "summary": "Refresh project copies",
  4107. "x-codeSamples": [
  4108. {
  4109. "lang": "js",
  4110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4111. }
  4112. ]
  4113. }
  4114. },
  4115. "/pty/shells": {
  4116. "get": {
  4117. "tags": ["pty"],
  4118. "operationId": "pty.shells",
  4119. "parameters": [
  4120. {
  4121. "name": "directory",
  4122. "in": "query",
  4123. "schema": {
  4124. "type": "string"
  4125. },
  4126. "required": false
  4127. },
  4128. {
  4129. "name": "workspace",
  4130. "in": "query",
  4131. "schema": {
  4132. "type": "string"
  4133. },
  4134. "required": false
  4135. }
  4136. ],
  4137. "responses": {
  4138. "200": {
  4139. "description": "List of shells",
  4140. "content": {
  4141. "application/json": {
  4142. "schema": {
  4143. "type": "array",
  4144. "items": {
  4145. "type": "object",
  4146. "properties": {
  4147. "path": {
  4148. "type": "string"
  4149. },
  4150. "name": {
  4151. "type": "string"
  4152. },
  4153. "acceptable": {
  4154. "type": "boolean"
  4155. }
  4156. },
  4157. "required": ["path", "name", "acceptable"],
  4158. "additionalProperties": false
  4159. },
  4160. "description": "List of shells"
  4161. }
  4162. }
  4163. }
  4164. },
  4165. "400": {
  4166. "description": "Bad request",
  4167. "content": {
  4168. "application/json": {
  4169. "schema": {
  4170. "$ref": "#/components/schemas/BadRequestError"
  4171. }
  4172. }
  4173. }
  4174. }
  4175. },
  4176. "description": "Get a list of available shells on the system.",
  4177. "summary": "List available shells",
  4178. "x-codeSamples": [
  4179. {
  4180. "lang": "js",
  4181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4182. }
  4183. ]
  4184. }
  4185. },
  4186. "/pty": {
  4187. "get": {
  4188. "tags": ["pty"],
  4189. "operationId": "pty.list",
  4190. "parameters": [
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "List of sessions",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "type": "array",
  4215. "items": {
  4216. "$ref": "#/components/schemas/Pty"
  4217. },
  4218. "description": "List of sessions"
  4219. }
  4220. }
  4221. }
  4222. },
  4223. "400": {
  4224. "description": "Bad request",
  4225. "content": {
  4226. "application/json": {
  4227. "schema": {
  4228. "$ref": "#/components/schemas/BadRequestError"
  4229. }
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4235. "summary": "List PTY sessions",
  4236. "x-codeSamples": [
  4237. {
  4238. "lang": "js",
  4239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4240. }
  4241. ]
  4242. },
  4243. "post": {
  4244. "tags": ["pty"],
  4245. "operationId": "pty.create",
  4246. "parameters": [
  4247. {
  4248. "name": "directory",
  4249. "in": "query",
  4250. "schema": {
  4251. "type": "string"
  4252. },
  4253. "required": false
  4254. },
  4255. {
  4256. "name": "workspace",
  4257. "in": "query",
  4258. "schema": {
  4259. "type": "string"
  4260. },
  4261. "required": false
  4262. }
  4263. ],
  4264. "responses": {
  4265. "200": {
  4266. "description": "Created session",
  4267. "content": {
  4268. "application/json": {
  4269. "schema": {
  4270. "$ref": "#/components/schemas/Pty"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "description": "BadRequest | InvalidRequestError",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "anyOf": [
  4281. {
  4282. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4283. },
  4284. {
  4285. "$ref": "#/components/schemas/InvalidRequestError"
  4286. }
  4287. ]
  4288. }
  4289. }
  4290. }
  4291. }
  4292. },
  4293. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4294. "summary": "Create PTY session",
  4295. "requestBody": {
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "object",
  4300. "properties": {
  4301. "command": {
  4302. "type": "string"
  4303. },
  4304. "args": {
  4305. "type": "array",
  4306. "items": {
  4307. "type": "string"
  4308. }
  4309. },
  4310. "cwd": {
  4311. "type": "string"
  4312. },
  4313. "title": {
  4314. "type": "string"
  4315. },
  4316. "env": {
  4317. "type": "object",
  4318. "additionalProperties": {
  4319. "type": "string"
  4320. }
  4321. }
  4322. },
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/pty/{ptyID}": {
  4337. "get": {
  4338. "tags": ["pty"],
  4339. "operationId": "pty.get",
  4340. "parameters": [
  4341. {
  4342. "name": "ptyID",
  4343. "in": "path",
  4344. "schema": {
  4345. "type": "string",
  4346. "pattern": "^pty"
  4347. },
  4348. "required": true
  4349. },
  4350. {
  4351. "name": "directory",
  4352. "in": "query",
  4353. "schema": {
  4354. "type": "string"
  4355. },
  4356. "required": false
  4357. },
  4358. {
  4359. "name": "workspace",
  4360. "in": "query",
  4361. "schema": {
  4362. "type": "string"
  4363. },
  4364. "required": false
  4365. }
  4366. ],
  4367. "responses": {
  4368. "200": {
  4369. "description": "Session info",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/Pty"
  4374. }
  4375. }
  4376. }
  4377. },
  4378. "400": {
  4379. "description": "Bad request",
  4380. "content": {
  4381. "application/json": {
  4382. "schema": {
  4383. "$ref": "#/components/schemas/BadRequestError"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "404": {
  4389. "description": "PtyNotFoundError",
  4390. "content": {
  4391. "application/json": {
  4392. "schema": {
  4393. "$ref": "#/components/schemas/PtyNotFoundError"
  4394. }
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4400. "summary": "Get PTY session",
  4401. "x-codeSamples": [
  4402. {
  4403. "lang": "js",
  4404. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4405. }
  4406. ]
  4407. },
  4408. "put": {
  4409. "tags": ["pty"],
  4410. "operationId": "pty.update",
  4411. "parameters": [
  4412. {
  4413. "name": "ptyID",
  4414. "in": "path",
  4415. "schema": {
  4416. "type": "string",
  4417. "pattern": "^pty"
  4418. },
  4419. "required": true
  4420. },
  4421. {
  4422. "name": "directory",
  4423. "in": "query",
  4424. "schema": {
  4425. "type": "string"
  4426. },
  4427. "required": false
  4428. },
  4429. {
  4430. "name": "workspace",
  4431. "in": "query",
  4432. "schema": {
  4433. "type": "string"
  4434. },
  4435. "required": false
  4436. }
  4437. ],
  4438. "responses": {
  4439. "200": {
  4440. "description": "Updated session",
  4441. "content": {
  4442. "application/json": {
  4443. "schema": {
  4444. "$ref": "#/components/schemas/Pty"
  4445. }
  4446. }
  4447. }
  4448. },
  4449. "400": {
  4450. "description": "BadRequest | InvalidRequestError",
  4451. "content": {
  4452. "application/json": {
  4453. "schema": {
  4454. "anyOf": [
  4455. {
  4456. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4457. },
  4458. {
  4459. "$ref": "#/components/schemas/InvalidRequestError"
  4460. }
  4461. ]
  4462. }
  4463. }
  4464. }
  4465. },
  4466. "404": {
  4467. "description": "PtyNotFoundError",
  4468. "content": {
  4469. "application/json": {
  4470. "schema": {
  4471. "$ref": "#/components/schemas/PtyNotFoundError"
  4472. }
  4473. }
  4474. }
  4475. }
  4476. },
  4477. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4478. "summary": "Update PTY session",
  4479. "requestBody": {
  4480. "content": {
  4481. "application/json": {
  4482. "schema": {
  4483. "type": "object",
  4484. "properties": {
  4485. "title": {
  4486. "type": "string"
  4487. },
  4488. "size": {
  4489. "type": "object",
  4490. "properties": {
  4491. "rows": {
  4492. "type": "integer",
  4493. "exclusiveMinimum": 0
  4494. },
  4495. "cols": {
  4496. "type": "integer",
  4497. "exclusiveMinimum": 0
  4498. }
  4499. },
  4500. "required": ["rows", "cols"],
  4501. "additionalProperties": false
  4502. }
  4503. },
  4504. "additionalProperties": false
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "x-codeSamples": [
  4510. {
  4511. "lang": "js",
  4512. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4513. }
  4514. ]
  4515. },
  4516. "delete": {
  4517. "tags": ["pty"],
  4518. "operationId": "pty.remove",
  4519. "parameters": [
  4520. {
  4521. "name": "ptyID",
  4522. "in": "path",
  4523. "schema": {
  4524. "type": "string",
  4525. "pattern": "^pty"
  4526. },
  4527. "required": true
  4528. },
  4529. {
  4530. "name": "directory",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. },
  4537. {
  4538. "name": "workspace",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. }
  4545. ],
  4546. "responses": {
  4547. "200": {
  4548. "description": "Session removed",
  4549. "content": {
  4550. "application/json": {
  4551. "schema": {
  4552. "type": "boolean",
  4553. "description": "Session removed"
  4554. }
  4555. }
  4556. }
  4557. },
  4558. "400": {
  4559. "description": "Bad request",
  4560. "content": {
  4561. "application/json": {
  4562. "schema": {
  4563. "$ref": "#/components/schemas/BadRequestError"
  4564. }
  4565. }
  4566. }
  4567. },
  4568. "404": {
  4569. "description": "PtyNotFoundError",
  4570. "content": {
  4571. "application/json": {
  4572. "schema": {
  4573. "$ref": "#/components/schemas/PtyNotFoundError"
  4574. }
  4575. }
  4576. }
  4577. }
  4578. },
  4579. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4580. "summary": "Remove PTY session",
  4581. "x-codeSamples": [
  4582. {
  4583. "lang": "js",
  4584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4585. }
  4586. ]
  4587. }
  4588. },
  4589. "/pty/{ptyID}/connect-token": {
  4590. "post": {
  4591. "tags": ["pty"],
  4592. "operationId": "pty.connectToken",
  4593. "parameters": [
  4594. {
  4595. "name": "ptyID",
  4596. "in": "path",
  4597. "schema": {
  4598. "type": "string",
  4599. "pattern": "^pty"
  4600. },
  4601. "required": true
  4602. },
  4603. {
  4604. "name": "directory",
  4605. "in": "query",
  4606. "schema": {
  4607. "type": "string"
  4608. },
  4609. "required": false
  4610. },
  4611. {
  4612. "name": "workspace",
  4613. "in": "query",
  4614. "schema": {
  4615. "type": "string"
  4616. },
  4617. "required": false
  4618. }
  4619. ],
  4620. "responses": {
  4621. "200": {
  4622. "description": "WebSocket connect token",
  4623. "content": {
  4624. "application/json": {
  4625. "schema": {
  4626. "type": "object",
  4627. "properties": {
  4628. "ticket": {
  4629. "type": "string"
  4630. },
  4631. "expires_in": {
  4632. "type": "integer",
  4633. "exclusiveMinimum": 0
  4634. }
  4635. },
  4636. "required": ["ticket", "expires_in"],
  4637. "additionalProperties": false,
  4638. "description": "WebSocket connect token"
  4639. }
  4640. }
  4641. }
  4642. },
  4643. "400": {
  4644. "description": "Bad request",
  4645. "content": {
  4646. "application/json": {
  4647. "schema": {
  4648. "$ref": "#/components/schemas/BadRequestError"
  4649. }
  4650. }
  4651. }
  4652. },
  4653. "403": {
  4654. "description": "PtyForbiddenError",
  4655. "content": {
  4656. "application/json": {
  4657. "schema": {
  4658. "$ref": "#/components/schemas/PtyForbiddenError"
  4659. }
  4660. }
  4661. }
  4662. },
  4663. "404": {
  4664. "description": "PtyNotFoundError",
  4665. "content": {
  4666. "application/json": {
  4667. "schema": {
  4668. "$ref": "#/components/schemas/PtyNotFoundError"
  4669. }
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4675. "summary": "Create PTY WebSocket token",
  4676. "x-codeSamples": [
  4677. {
  4678. "lang": "js",
  4679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4680. }
  4681. ]
  4682. }
  4683. },
  4684. "/question": {
  4685. "get": {
  4686. "tags": ["question"],
  4687. "operationId": "question.list",
  4688. "parameters": [
  4689. {
  4690. "name": "directory",
  4691. "in": "query",
  4692. "schema": {
  4693. "type": "string"
  4694. },
  4695. "required": false
  4696. },
  4697. {
  4698. "name": "workspace",
  4699. "in": "query",
  4700. "schema": {
  4701. "type": "string"
  4702. },
  4703. "required": false
  4704. }
  4705. ],
  4706. "responses": {
  4707. "200": {
  4708. "description": "List of pending questions",
  4709. "content": {
  4710. "application/json": {
  4711. "schema": {
  4712. "type": "array",
  4713. "items": {
  4714. "$ref": "#/components/schemas/QuestionRequest"
  4715. },
  4716. "description": "List of pending questions"
  4717. }
  4718. }
  4719. }
  4720. },
  4721. "400": {
  4722. "description": "Bad request",
  4723. "content": {
  4724. "application/json": {
  4725. "schema": {
  4726. "$ref": "#/components/schemas/BadRequestError"
  4727. }
  4728. }
  4729. }
  4730. }
  4731. },
  4732. "description": "Get all pending question requests across all sessions.",
  4733. "summary": "List pending questions",
  4734. "x-codeSamples": [
  4735. {
  4736. "lang": "js",
  4737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4738. }
  4739. ]
  4740. }
  4741. },
  4742. "/question/{requestID}/reply": {
  4743. "post": {
  4744. "tags": ["question"],
  4745. "operationId": "question.reply",
  4746. "parameters": [
  4747. {
  4748. "name": "requestID",
  4749. "in": "path",
  4750. "schema": {
  4751. "type": "string",
  4752. "pattern": "^que"
  4753. },
  4754. "required": true
  4755. },
  4756. {
  4757. "name": "directory",
  4758. "in": "query",
  4759. "schema": {
  4760. "type": "string"
  4761. },
  4762. "required": false
  4763. },
  4764. {
  4765. "name": "workspace",
  4766. "in": "query",
  4767. "schema": {
  4768. "type": "string"
  4769. },
  4770. "required": false
  4771. }
  4772. ],
  4773. "responses": {
  4774. "200": {
  4775. "description": "Question answered successfully",
  4776. "content": {
  4777. "application/json": {
  4778. "schema": {
  4779. "type": "boolean",
  4780. "description": "Question answered successfully"
  4781. }
  4782. }
  4783. }
  4784. },
  4785. "400": {
  4786. "description": "BadRequest | InvalidRequestError",
  4787. "content": {
  4788. "application/json": {
  4789. "schema": {
  4790. "anyOf": [
  4791. {
  4792. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4793. },
  4794. {
  4795. "$ref": "#/components/schemas/InvalidRequestError"
  4796. }
  4797. ]
  4798. }
  4799. }
  4800. }
  4801. },
  4802. "404": {
  4803. "description": "QuestionNotFoundError",
  4804. "content": {
  4805. "application/json": {
  4806. "schema": {
  4807. "$ref": "#/components/schemas/QuestionNotFoundError"
  4808. }
  4809. }
  4810. }
  4811. }
  4812. },
  4813. "description": "Provide answers to a question request from the AI assistant.",
  4814. "summary": "Reply to question request",
  4815. "requestBody": {
  4816. "content": {
  4817. "application/json": {
  4818. "schema": {
  4819. "type": "object",
  4820. "properties": {
  4821. "answers": {
  4822. "type": "array",
  4823. "items": {
  4824. "$ref": "#/components/schemas/QuestionAnswer"
  4825. },
  4826. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4827. }
  4828. },
  4829. "required": ["answers"],
  4830. "additionalProperties": false
  4831. }
  4832. }
  4833. }
  4834. },
  4835. "x-codeSamples": [
  4836. {
  4837. "lang": "js",
  4838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4839. }
  4840. ]
  4841. }
  4842. },
  4843. "/question/{requestID}/reject": {
  4844. "post": {
  4845. "tags": ["question"],
  4846. "operationId": "question.reject",
  4847. "parameters": [
  4848. {
  4849. "name": "requestID",
  4850. "in": "path",
  4851. "schema": {
  4852. "type": "string",
  4853. "pattern": "^que"
  4854. },
  4855. "required": true
  4856. },
  4857. {
  4858. "name": "directory",
  4859. "in": "query",
  4860. "schema": {
  4861. "type": "string"
  4862. },
  4863. "required": false
  4864. },
  4865. {
  4866. "name": "workspace",
  4867. "in": "query",
  4868. "schema": {
  4869. "type": "string"
  4870. },
  4871. "required": false
  4872. }
  4873. ],
  4874. "responses": {
  4875. "200": {
  4876. "description": "Question rejected successfully",
  4877. "content": {
  4878. "application/json": {
  4879. "schema": {
  4880. "type": "boolean",
  4881. "description": "Question rejected successfully"
  4882. }
  4883. }
  4884. }
  4885. },
  4886. "400": {
  4887. "description": "BadRequest | InvalidRequestError",
  4888. "content": {
  4889. "application/json": {
  4890. "schema": {
  4891. "anyOf": [
  4892. {
  4893. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4894. },
  4895. {
  4896. "$ref": "#/components/schemas/InvalidRequestError"
  4897. }
  4898. ]
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "404": {
  4904. "description": "QuestionNotFoundError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "$ref": "#/components/schemas/QuestionNotFoundError"
  4909. }
  4910. }
  4911. }
  4912. }
  4913. },
  4914. "description": "Reject a question request from the AI assistant.",
  4915. "summary": "Reject question request",
  4916. "x-codeSamples": [
  4917. {
  4918. "lang": "js",
  4919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4920. }
  4921. ]
  4922. }
  4923. },
  4924. "/permission": {
  4925. "get": {
  4926. "tags": ["permission"],
  4927. "operationId": "permission.list",
  4928. "parameters": [
  4929. {
  4930. "name": "directory",
  4931. "in": "query",
  4932. "schema": {
  4933. "type": "string"
  4934. },
  4935. "required": false
  4936. },
  4937. {
  4938. "name": "workspace",
  4939. "in": "query",
  4940. "schema": {
  4941. "type": "string"
  4942. },
  4943. "required": false
  4944. }
  4945. ],
  4946. "responses": {
  4947. "200": {
  4948. "description": "List of pending permissions",
  4949. "content": {
  4950. "application/json": {
  4951. "schema": {
  4952. "type": "array",
  4953. "items": {
  4954. "$ref": "#/components/schemas/PermissionRequest"
  4955. },
  4956. "description": "List of pending permissions"
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "400": {
  4962. "description": "Bad request",
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "$ref": "#/components/schemas/BadRequestError"
  4967. }
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "description": "Get all pending permission requests across all sessions.",
  4973. "summary": "List pending permissions",
  4974. "x-codeSamples": [
  4975. {
  4976. "lang": "js",
  4977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4978. }
  4979. ]
  4980. }
  4981. },
  4982. "/permission/{requestID}/reply": {
  4983. "post": {
  4984. "tags": ["permission"],
  4985. "operationId": "permission.reply",
  4986. "parameters": [
  4987. {
  4988. "name": "requestID",
  4989. "in": "path",
  4990. "schema": {
  4991. "type": "string",
  4992. "pattern": "^per"
  4993. },
  4994. "required": true
  4995. },
  4996. {
  4997. "name": "directory",
  4998. "in": "query",
  4999. "schema": {
  5000. "type": "string"
  5001. },
  5002. "required": false
  5003. },
  5004. {
  5005. "name": "workspace",
  5006. "in": "query",
  5007. "schema": {
  5008. "type": "string"
  5009. },
  5010. "required": false
  5011. }
  5012. ],
  5013. "responses": {
  5014. "200": {
  5015. "description": "Permission processed successfully",
  5016. "content": {
  5017. "application/json": {
  5018. "schema": {
  5019. "type": "boolean",
  5020. "description": "Permission processed successfully"
  5021. }
  5022. }
  5023. }
  5024. },
  5025. "400": {
  5026. "description": "BadRequest | InvalidRequestError",
  5027. "content": {
  5028. "application/json": {
  5029. "schema": {
  5030. "anyOf": [
  5031. {
  5032. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5033. },
  5034. {
  5035. "$ref": "#/components/schemas/InvalidRequestError"
  5036. }
  5037. ]
  5038. }
  5039. }
  5040. }
  5041. },
  5042. "404": {
  5043. "description": "PermissionNotFoundError",
  5044. "content": {
  5045. "application/json": {
  5046. "schema": {
  5047. "$ref": "#/components/schemas/PermissionNotFoundError"
  5048. }
  5049. }
  5050. }
  5051. }
  5052. },
  5053. "description": "Approve or deny a permission request from the AI assistant.",
  5054. "summary": "Respond to permission request",
  5055. "requestBody": {
  5056. "content": {
  5057. "application/json": {
  5058. "schema": {
  5059. "type": "object",
  5060. "properties": {
  5061. "reply": {
  5062. "type": "string",
  5063. "enum": ["once", "always", "reject"]
  5064. },
  5065. "message": {
  5066. "type": "string"
  5067. }
  5068. },
  5069. "required": ["reply"],
  5070. "additionalProperties": false
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "x-codeSamples": [
  5076. {
  5077. "lang": "js",
  5078. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5079. }
  5080. ]
  5081. }
  5082. },
  5083. "/provider": {
  5084. "get": {
  5085. "tags": ["provider"],
  5086. "operationId": "provider.list",
  5087. "parameters": [
  5088. {
  5089. "name": "directory",
  5090. "in": "query",
  5091. "schema": {
  5092. "type": "string"
  5093. },
  5094. "required": false
  5095. },
  5096. {
  5097. "name": "workspace",
  5098. "in": "query",
  5099. "schema": {
  5100. "type": "string"
  5101. },
  5102. "required": false
  5103. }
  5104. ],
  5105. "responses": {
  5106. "200": {
  5107. "description": "List of providers",
  5108. "content": {
  5109. "application/json": {
  5110. "schema": {
  5111. "type": "object",
  5112. "properties": {
  5113. "all": {
  5114. "type": "array",
  5115. "items": {
  5116. "$ref": "#/components/schemas/Provider"
  5117. }
  5118. },
  5119. "default": {
  5120. "type": "object",
  5121. "additionalProperties": {
  5122. "type": "string"
  5123. }
  5124. },
  5125. "connected": {
  5126. "type": "array",
  5127. "items": {
  5128. "type": "string"
  5129. }
  5130. }
  5131. },
  5132. "required": ["all", "default", "connected"],
  5133. "additionalProperties": false,
  5134. "description": "List of providers"
  5135. }
  5136. }
  5137. }
  5138. },
  5139. "400": {
  5140. "description": "Bad request",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/BadRequestError"
  5145. }
  5146. }
  5147. }
  5148. }
  5149. },
  5150. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5151. "summary": "List providers",
  5152. "x-codeSamples": [
  5153. {
  5154. "lang": "js",
  5155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5156. }
  5157. ]
  5158. }
  5159. },
  5160. "/provider/auth": {
  5161. "get": {
  5162. "tags": ["provider"],
  5163. "operationId": "provider.auth",
  5164. "parameters": [
  5165. {
  5166. "name": "directory",
  5167. "in": "query",
  5168. "schema": {
  5169. "type": "string"
  5170. },
  5171. "required": false
  5172. },
  5173. {
  5174. "name": "workspace",
  5175. "in": "query",
  5176. "schema": {
  5177. "type": "string"
  5178. },
  5179. "required": false
  5180. }
  5181. ],
  5182. "responses": {
  5183. "200": {
  5184. "description": "Provider auth methods",
  5185. "content": {
  5186. "application/json": {
  5187. "schema": {
  5188. "type": "object",
  5189. "additionalProperties": {
  5190. "type": "array",
  5191. "items": {
  5192. "$ref": "#/components/schemas/ProviderAuthMethod"
  5193. }
  5194. },
  5195. "description": "Provider auth methods"
  5196. }
  5197. }
  5198. }
  5199. },
  5200. "400": {
  5201. "description": "Bad request",
  5202. "content": {
  5203. "application/json": {
  5204. "schema": {
  5205. "$ref": "#/components/schemas/BadRequestError"
  5206. }
  5207. }
  5208. }
  5209. }
  5210. },
  5211. "description": "Retrieve available authentication methods for all AI providers.",
  5212. "summary": "Get provider auth methods",
  5213. "x-codeSamples": [
  5214. {
  5215. "lang": "js",
  5216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5217. }
  5218. ]
  5219. }
  5220. },
  5221. "/provider/{providerID}/oauth/authorize": {
  5222. "post": {
  5223. "tags": ["provider"],
  5224. "operationId": "provider.oauth.authorize",
  5225. "parameters": [
  5226. {
  5227. "name": "providerID",
  5228. "in": "path",
  5229. "schema": {
  5230. "type": "string"
  5231. },
  5232. "required": true
  5233. },
  5234. {
  5235. "name": "directory",
  5236. "in": "query",
  5237. "schema": {
  5238. "type": "string"
  5239. },
  5240. "required": false
  5241. },
  5242. {
  5243. "name": "workspace",
  5244. "in": "query",
  5245. "schema": {
  5246. "type": "string"
  5247. },
  5248. "required": false
  5249. }
  5250. ],
  5251. "responses": {
  5252. "200": {
  5253. "description": "Authorization URL and method",
  5254. "content": {
  5255. "application/json": {
  5256. "schema": {
  5257. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5258. }
  5259. }
  5260. }
  5261. },
  5262. "400": {
  5263. "description": "ProviderAuthError | InvalidRequestError",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "anyOf": [
  5268. {
  5269. "$ref": "#/components/schemas/ProviderAuthError1"
  5270. },
  5271. {
  5272. "$ref": "#/components/schemas/InvalidRequestError"
  5273. }
  5274. ]
  5275. }
  5276. }
  5277. }
  5278. }
  5279. },
  5280. "description": "Start the OAuth authorization flow for a provider.",
  5281. "summary": "Start OAuth authorization",
  5282. "requestBody": {
  5283. "content": {
  5284. "application/json": {
  5285. "schema": {
  5286. "type": "object",
  5287. "properties": {
  5288. "method": {
  5289. "type": "number",
  5290. "description": "Auth method index"
  5291. },
  5292. "inputs": {
  5293. "type": "object",
  5294. "additionalProperties": {
  5295. "type": "string"
  5296. }
  5297. }
  5298. },
  5299. "required": ["method"],
  5300. "additionalProperties": false
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "x-codeSamples": [
  5306. {
  5307. "lang": "js",
  5308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5309. }
  5310. ]
  5311. }
  5312. },
  5313. "/provider/{providerID}/oauth/callback": {
  5314. "post": {
  5315. "tags": ["provider"],
  5316. "operationId": "provider.oauth.callback",
  5317. "parameters": [
  5318. {
  5319. "name": "providerID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string"
  5323. },
  5324. "required": true
  5325. },
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. }
  5342. ],
  5343. "responses": {
  5344. "200": {
  5345. "description": "OAuth callback processed successfully",
  5346. "content": {
  5347. "application/json": {
  5348. "schema": {
  5349. "type": "boolean",
  5350. "description": "OAuth callback processed successfully"
  5351. }
  5352. }
  5353. }
  5354. },
  5355. "400": {
  5356. "description": "ProviderAuthError | InvalidRequestError",
  5357. "content": {
  5358. "application/json": {
  5359. "schema": {
  5360. "anyOf": [
  5361. {
  5362. "$ref": "#/components/schemas/ProviderAuthError1"
  5363. },
  5364. {
  5365. "$ref": "#/components/schemas/InvalidRequestError"
  5366. }
  5367. ]
  5368. }
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "description": "Handle the OAuth callback from a provider after user authorization.",
  5374. "summary": "Handle OAuth callback",
  5375. "requestBody": {
  5376. "content": {
  5377. "application/json": {
  5378. "schema": {
  5379. "type": "object",
  5380. "properties": {
  5381. "method": {
  5382. "type": "number",
  5383. "description": "Auth method index"
  5384. },
  5385. "code": {
  5386. "type": "string"
  5387. }
  5388. },
  5389. "required": ["method"],
  5390. "additionalProperties": false
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "x-codeSamples": [
  5396. {
  5397. "lang": "js",
  5398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5399. }
  5400. ]
  5401. }
  5402. },
  5403. "/session": {
  5404. "get": {
  5405. "tags": ["session"],
  5406. "operationId": "session.list",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. },
  5424. {
  5425. "name": "scope",
  5426. "in": "query",
  5427. "schema": {
  5428. "type": "string",
  5429. "enum": ["project"]
  5430. },
  5431. "required": false
  5432. },
  5433. {
  5434. "name": "path",
  5435. "in": "query",
  5436. "schema": {
  5437. "type": "string"
  5438. },
  5439. "required": false
  5440. },
  5441. {
  5442. "name": "roots",
  5443. "in": "query",
  5444. "schema": {
  5445. "anyOf": [
  5446. {
  5447. "type": "boolean"
  5448. },
  5449. {
  5450. "type": "string",
  5451. "enum": ["true", "false"]
  5452. }
  5453. ]
  5454. },
  5455. "required": false
  5456. },
  5457. {
  5458. "name": "start",
  5459. "in": "query",
  5460. "schema": {
  5461. "type": "number"
  5462. },
  5463. "required": false
  5464. },
  5465. {
  5466. "name": "search",
  5467. "in": "query",
  5468. "schema": {
  5469. "type": "string"
  5470. },
  5471. "required": false
  5472. },
  5473. {
  5474. "name": "limit",
  5475. "in": "query",
  5476. "schema": {
  5477. "type": "number"
  5478. },
  5479. "required": false
  5480. }
  5481. ],
  5482. "responses": {
  5483. "200": {
  5484. "description": "List of sessions",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "type": "array",
  5489. "items": {
  5490. "$ref": "#/components/schemas/Session"
  5491. },
  5492. "description": "List of sessions"
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "400": {
  5498. "description": "Bad request",
  5499. "content": {
  5500. "application/json": {
  5501. "schema": {
  5502. "$ref": "#/components/schemas/BadRequestError"
  5503. }
  5504. }
  5505. }
  5506. }
  5507. },
  5508. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5509. "summary": "List sessions",
  5510. "x-codeSamples": [
  5511. {
  5512. "lang": "js",
  5513. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5514. }
  5515. ]
  5516. },
  5517. "post": {
  5518. "tags": ["session"],
  5519. "operationId": "session.create",
  5520. "parameters": [
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "Successfully created session",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5568. "summary": "Create session",
  5569. "requestBody": {
  5570. "content": {
  5571. "application/json": {
  5572. "schema": {
  5573. "type": "object",
  5574. "properties": {
  5575. "parentID": {
  5576. "type": "string",
  5577. "pattern": "^ses"
  5578. },
  5579. "title": {
  5580. "type": "string"
  5581. },
  5582. "agent": {
  5583. "type": "string"
  5584. },
  5585. "model": {
  5586. "type": "object",
  5587. "properties": {
  5588. "id": {
  5589. "type": "string"
  5590. },
  5591. "providerID": {
  5592. "type": "string"
  5593. },
  5594. "variant": {
  5595. "type": "string"
  5596. }
  5597. },
  5598. "required": ["id", "providerID"],
  5599. "additionalProperties": false
  5600. },
  5601. "metadata": {
  5602. "type": "object"
  5603. },
  5604. "permission": {
  5605. "$ref": "#/components/schemas/PermissionRuleset"
  5606. },
  5607. "workspaceID": {
  5608. "type": "string",
  5609. "pattern": "^wrk"
  5610. }
  5611. },
  5612. "additionalProperties": false
  5613. }
  5614. }
  5615. }
  5616. },
  5617. "x-codeSamples": [
  5618. {
  5619. "lang": "js",
  5620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5621. }
  5622. ]
  5623. }
  5624. },
  5625. "/session/status": {
  5626. "get": {
  5627. "tags": ["session"],
  5628. "operationId": "session.status",
  5629. "parameters": [
  5630. {
  5631. "name": "directory",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. },
  5638. {
  5639. "name": "workspace",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. }
  5646. ],
  5647. "responses": {
  5648. "200": {
  5649. "description": "Get session status",
  5650. "content": {
  5651. "application/json": {
  5652. "schema": {
  5653. "type": "object",
  5654. "additionalProperties": {
  5655. "$ref": "#/components/schemas/SessionStatus"
  5656. },
  5657. "description": "Get session status"
  5658. }
  5659. }
  5660. }
  5661. },
  5662. "400": {
  5663. "description": "BadRequest | InvalidRequestError",
  5664. "content": {
  5665. "application/json": {
  5666. "schema": {
  5667. "anyOf": [
  5668. {
  5669. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5670. },
  5671. {
  5672. "$ref": "#/components/schemas/InvalidRequestError"
  5673. }
  5674. ]
  5675. }
  5676. }
  5677. }
  5678. }
  5679. },
  5680. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5681. "summary": "Get session status",
  5682. "x-codeSamples": [
  5683. {
  5684. "lang": "js",
  5685. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5686. }
  5687. ]
  5688. }
  5689. },
  5690. "/session/{sessionID}": {
  5691. "get": {
  5692. "tags": ["session"],
  5693. "operationId": "session.get",
  5694. "parameters": [
  5695. {
  5696. "name": "sessionID",
  5697. "in": "path",
  5698. "schema": {
  5699. "type": "string",
  5700. "pattern": "^ses"
  5701. },
  5702. "required": true
  5703. },
  5704. {
  5705. "name": "directory",
  5706. "in": "query",
  5707. "schema": {
  5708. "type": "string"
  5709. },
  5710. "required": false
  5711. },
  5712. {
  5713. "name": "workspace",
  5714. "in": "query",
  5715. "schema": {
  5716. "type": "string"
  5717. },
  5718. "required": false
  5719. }
  5720. ],
  5721. "responses": {
  5722. "200": {
  5723. "description": "Get session",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/Session"
  5728. }
  5729. }
  5730. }
  5731. },
  5732. "400": {
  5733. "description": "BadRequest | InvalidRequestError",
  5734. "content": {
  5735. "application/json": {
  5736. "schema": {
  5737. "anyOf": [
  5738. {
  5739. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5740. },
  5741. {
  5742. "$ref": "#/components/schemas/InvalidRequestError"
  5743. }
  5744. ]
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "404": {
  5750. "description": "NotFoundError",
  5751. "content": {
  5752. "application/json": {
  5753. "schema": {
  5754. "$ref": "#/components/schemas/NotFoundError"
  5755. }
  5756. }
  5757. }
  5758. }
  5759. },
  5760. "description": "Retrieve detailed information about a specific OpenCode session.",
  5761. "summary": "Get session",
  5762. "x-codeSamples": [
  5763. {
  5764. "lang": "js",
  5765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5766. }
  5767. ]
  5768. },
  5769. "delete": {
  5770. "tags": ["session"],
  5771. "operationId": "session.delete",
  5772. "parameters": [
  5773. {
  5774. "name": "sessionID",
  5775. "in": "path",
  5776. "schema": {
  5777. "type": "string",
  5778. "pattern": "^ses"
  5779. },
  5780. "required": true
  5781. },
  5782. {
  5783. "name": "directory",
  5784. "in": "query",
  5785. "schema": {
  5786. "type": "string"
  5787. },
  5788. "required": false
  5789. },
  5790. {
  5791. "name": "workspace",
  5792. "in": "query",
  5793. "schema": {
  5794. "type": "string"
  5795. },
  5796. "required": false
  5797. }
  5798. ],
  5799. "responses": {
  5800. "200": {
  5801. "description": "Successfully deleted session",
  5802. "content": {
  5803. "application/json": {
  5804. "schema": {
  5805. "type": "boolean",
  5806. "description": "Successfully deleted session"
  5807. }
  5808. }
  5809. }
  5810. },
  5811. "400": {
  5812. "description": "BadRequest | InvalidRequestError",
  5813. "content": {
  5814. "application/json": {
  5815. "schema": {
  5816. "anyOf": [
  5817. {
  5818. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5819. },
  5820. {
  5821. "$ref": "#/components/schemas/InvalidRequestError"
  5822. }
  5823. ]
  5824. }
  5825. }
  5826. }
  5827. },
  5828. "404": {
  5829. "description": "NotFoundError",
  5830. "content": {
  5831. "application/json": {
  5832. "schema": {
  5833. "$ref": "#/components/schemas/NotFoundError"
  5834. }
  5835. }
  5836. }
  5837. }
  5838. },
  5839. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5840. "summary": "Delete session",
  5841. "x-codeSamples": [
  5842. {
  5843. "lang": "js",
  5844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5845. }
  5846. ]
  5847. },
  5848. "patch": {
  5849. "tags": ["session"],
  5850. "operationId": "session.update",
  5851. "parameters": [
  5852. {
  5853. "name": "sessionID",
  5854. "in": "path",
  5855. "schema": {
  5856. "type": "string",
  5857. "pattern": "^ses"
  5858. },
  5859. "required": true
  5860. },
  5861. {
  5862. "name": "directory",
  5863. "in": "query",
  5864. "schema": {
  5865. "type": "string"
  5866. },
  5867. "required": false
  5868. },
  5869. {
  5870. "name": "workspace",
  5871. "in": "query",
  5872. "schema": {
  5873. "type": "string"
  5874. },
  5875. "required": false
  5876. }
  5877. ],
  5878. "responses": {
  5879. "200": {
  5880. "description": "Successfully updated session",
  5881. "content": {
  5882. "application/json": {
  5883. "schema": {
  5884. "$ref": "#/components/schemas/Session"
  5885. }
  5886. }
  5887. }
  5888. },
  5889. "400": {
  5890. "description": "BadRequest | InvalidRequestError",
  5891. "content": {
  5892. "application/json": {
  5893. "schema": {
  5894. "anyOf": [
  5895. {
  5896. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5897. },
  5898. {
  5899. "$ref": "#/components/schemas/InvalidRequestError"
  5900. }
  5901. ]
  5902. }
  5903. }
  5904. }
  5905. },
  5906. "404": {
  5907. "description": "NotFoundError",
  5908. "content": {
  5909. "application/json": {
  5910. "schema": {
  5911. "$ref": "#/components/schemas/NotFoundError"
  5912. }
  5913. }
  5914. }
  5915. }
  5916. },
  5917. "description": "Update properties of an existing session, such as title or other metadata.",
  5918. "summary": "Update session",
  5919. "requestBody": {
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "object",
  5924. "properties": {
  5925. "title": {
  5926. "type": "string"
  5927. },
  5928. "metadata": {
  5929. "type": "object"
  5930. },
  5931. "permission": {
  5932. "$ref": "#/components/schemas/PermissionRuleset"
  5933. },
  5934. "time": {
  5935. "type": "object",
  5936. "properties": {
  5937. "archived": {
  5938. "type": "number"
  5939. }
  5940. },
  5941. "additionalProperties": false
  5942. }
  5943. },
  5944. "additionalProperties": false
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "x-codeSamples": [
  5950. {
  5951. "lang": "js",
  5952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5953. }
  5954. ]
  5955. }
  5956. },
  5957. "/session/{sessionID}/children": {
  5958. "get": {
  5959. "tags": ["session"],
  5960. "operationId": "session.children",
  5961. "parameters": [
  5962. {
  5963. "name": "sessionID",
  5964. "in": "path",
  5965. "schema": {
  5966. "type": "string",
  5967. "pattern": "^ses"
  5968. },
  5969. "required": true
  5970. },
  5971. {
  5972. "name": "directory",
  5973. "in": "query",
  5974. "schema": {
  5975. "type": "string"
  5976. },
  5977. "required": false
  5978. },
  5979. {
  5980. "name": "workspace",
  5981. "in": "query",
  5982. "schema": {
  5983. "type": "string"
  5984. },
  5985. "required": false
  5986. }
  5987. ],
  5988. "responses": {
  5989. "200": {
  5990. "description": "List of children",
  5991. "content": {
  5992. "application/json": {
  5993. "schema": {
  5994. "type": "array",
  5995. "items": {
  5996. "$ref": "#/components/schemas/Session"
  5997. },
  5998. "description": "List of children"
  5999. }
  6000. }
  6001. }
  6002. },
  6003. "400": {
  6004. "description": "BadRequest | InvalidRequestError",
  6005. "content": {
  6006. "application/json": {
  6007. "schema": {
  6008. "anyOf": [
  6009. {
  6010. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6011. },
  6012. {
  6013. "$ref": "#/components/schemas/InvalidRequestError"
  6014. }
  6015. ]
  6016. }
  6017. }
  6018. }
  6019. },
  6020. "404": {
  6021. "description": "NotFoundError",
  6022. "content": {
  6023. "application/json": {
  6024. "schema": {
  6025. "$ref": "#/components/schemas/NotFoundError"
  6026. }
  6027. }
  6028. }
  6029. }
  6030. },
  6031. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  6032. "summary": "Get session children",
  6033. "x-codeSamples": [
  6034. {
  6035. "lang": "js",
  6036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  6037. }
  6038. ]
  6039. }
  6040. },
  6041. "/session/{sessionID}/todo": {
  6042. "get": {
  6043. "tags": ["session"],
  6044. "operationId": "session.todo",
  6045. "parameters": [
  6046. {
  6047. "name": "sessionID",
  6048. "in": "path",
  6049. "schema": {
  6050. "type": "string",
  6051. "pattern": "^ses"
  6052. },
  6053. "required": true
  6054. },
  6055. {
  6056. "name": "directory",
  6057. "in": "query",
  6058. "schema": {
  6059. "type": "string"
  6060. },
  6061. "required": false
  6062. },
  6063. {
  6064. "name": "workspace",
  6065. "in": "query",
  6066. "schema": {
  6067. "type": "string"
  6068. },
  6069. "required": false
  6070. }
  6071. ],
  6072. "responses": {
  6073. "200": {
  6074. "description": "Todo list",
  6075. "content": {
  6076. "application/json": {
  6077. "schema": {
  6078. "type": "array",
  6079. "items": {
  6080. "$ref": "#/components/schemas/Todo"
  6081. },
  6082. "description": "Todo list"
  6083. }
  6084. }
  6085. }
  6086. },
  6087. "400": {
  6088. "description": "BadRequest | InvalidRequestError",
  6089. "content": {
  6090. "application/json": {
  6091. "schema": {
  6092. "anyOf": [
  6093. {
  6094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/InvalidRequestError"
  6098. }
  6099. ]
  6100. }
  6101. }
  6102. }
  6103. },
  6104. "404": {
  6105. "description": "NotFoundError",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "$ref": "#/components/schemas/NotFoundError"
  6110. }
  6111. }
  6112. }
  6113. }
  6114. },
  6115. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6116. "summary": "Get session todos",
  6117. "x-codeSamples": [
  6118. {
  6119. "lang": "js",
  6120. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6121. }
  6122. ]
  6123. }
  6124. },
  6125. "/session/{sessionID}/diff": {
  6126. "get": {
  6127. "tags": ["session"],
  6128. "operationId": "session.diff",
  6129. "parameters": [
  6130. {
  6131. "name": "sessionID",
  6132. "in": "path",
  6133. "schema": {
  6134. "type": "string",
  6135. "pattern": "^ses"
  6136. },
  6137. "required": true
  6138. },
  6139. {
  6140. "name": "directory",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  6146. },
  6147. {
  6148. "name": "workspace",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "messageID",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string",
  6160. "pattern": "^msg"
  6161. },
  6162. "required": false
  6163. }
  6164. ],
  6165. "responses": {
  6166. "200": {
  6167. "description": "Successfully retrieved diff",
  6168. "content": {
  6169. "application/json": {
  6170. "schema": {
  6171. "type": "array",
  6172. "items": {
  6173. "$ref": "#/components/schemas/SnapshotFileDiff"
  6174. },
  6175. "description": "Successfully retrieved diff"
  6176. }
  6177. }
  6178. }
  6179. },
  6180. "400": {
  6181. "description": "Bad request",
  6182. "content": {
  6183. "application/json": {
  6184. "schema": {
  6185. "$ref": "#/components/schemas/BadRequestError"
  6186. }
  6187. }
  6188. }
  6189. }
  6190. },
  6191. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6192. "summary": "Get message diff",
  6193. "x-codeSamples": [
  6194. {
  6195. "lang": "js",
  6196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6197. }
  6198. ]
  6199. }
  6200. },
  6201. "/session/{sessionID}/message": {
  6202. "get": {
  6203. "tags": ["session"],
  6204. "operationId": "session.messages",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "limit",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "integer",
  6236. "minimum": 0,
  6237. "maximum": 9007199254740991
  6238. },
  6239. "required": false
  6240. },
  6241. {
  6242. "name": "before",
  6243. "in": "query",
  6244. "schema": {
  6245. "type": "string"
  6246. },
  6247. "required": false
  6248. }
  6249. ],
  6250. "responses": {
  6251. "200": {
  6252. "description": "List of messages",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "type": "array",
  6257. "items": {
  6258. "type": "object",
  6259. "properties": {
  6260. "info": {
  6261. "$ref": "#/components/schemas/Message"
  6262. },
  6263. "parts": {
  6264. "type": "array",
  6265. "items": {
  6266. "$ref": "#/components/schemas/Part"
  6267. }
  6268. }
  6269. },
  6270. "required": ["info", "parts"],
  6271. "additionalProperties": false
  6272. },
  6273. "description": "List of messages"
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "400": {
  6279. "description": "BadRequest | InvalidRequestError",
  6280. "content": {
  6281. "application/json": {
  6282. "schema": {
  6283. "anyOf": [
  6284. {
  6285. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6286. },
  6287. {
  6288. "$ref": "#/components/schemas/InvalidRequestError"
  6289. }
  6290. ]
  6291. }
  6292. }
  6293. }
  6294. },
  6295. "404": {
  6296. "description": "NotFoundError",
  6297. "content": {
  6298. "application/json": {
  6299. "schema": {
  6300. "$ref": "#/components/schemas/NotFoundError"
  6301. }
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6307. "summary": "Get session messages",
  6308. "x-codeSamples": [
  6309. {
  6310. "lang": "js",
  6311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6312. }
  6313. ]
  6314. },
  6315. "post": {
  6316. "tags": ["session"],
  6317. "operationId": "session.prompt",
  6318. "parameters": [
  6319. {
  6320. "name": "sessionID",
  6321. "in": "path",
  6322. "schema": {
  6323. "type": "string",
  6324. "pattern": "^ses"
  6325. },
  6326. "required": true
  6327. },
  6328. {
  6329. "name": "directory",
  6330. "in": "query",
  6331. "schema": {
  6332. "type": "string"
  6333. },
  6334. "required": false
  6335. },
  6336. {
  6337. "name": "workspace",
  6338. "in": "query",
  6339. "schema": {
  6340. "type": "string"
  6341. },
  6342. "required": false
  6343. }
  6344. ],
  6345. "responses": {
  6346. "200": {
  6347. "description": "Created message",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "type": "object",
  6352. "required": ["info", "parts"],
  6353. "properties": {
  6354. "info": {
  6355. "$ref": "#/components/schemas/AssistantMessage"
  6356. },
  6357. "parts": {
  6358. "type": "array",
  6359. "items": {
  6360. "$ref": "#/components/schemas/Part"
  6361. }
  6362. }
  6363. }
  6364. }
  6365. }
  6366. }
  6367. },
  6368. "400": {
  6369. "description": "BadRequest | InvalidRequestError",
  6370. "content": {
  6371. "application/json": {
  6372. "schema": {
  6373. "anyOf": [
  6374. {
  6375. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6376. },
  6377. {
  6378. "$ref": "#/components/schemas/InvalidRequestError"
  6379. }
  6380. ]
  6381. }
  6382. }
  6383. }
  6384. },
  6385. "404": {
  6386. "description": "NotFoundError",
  6387. "content": {
  6388. "application/json": {
  6389. "schema": {
  6390. "$ref": "#/components/schemas/NotFoundError"
  6391. }
  6392. }
  6393. }
  6394. }
  6395. },
  6396. "description": "Create and send a new message to a session, streaming the AI response.",
  6397. "summary": "Send message",
  6398. "requestBody": {
  6399. "content": {
  6400. "application/json": {
  6401. "schema": {
  6402. "type": "object",
  6403. "properties": {
  6404. "messageID": {
  6405. "type": "string",
  6406. "pattern": "^msg"
  6407. },
  6408. "model": {
  6409. "type": "object",
  6410. "properties": {
  6411. "providerID": {
  6412. "type": "string"
  6413. },
  6414. "modelID": {
  6415. "type": "string"
  6416. }
  6417. },
  6418. "required": ["providerID", "modelID"],
  6419. "additionalProperties": false
  6420. },
  6421. "agent": {
  6422. "type": "string"
  6423. },
  6424. "noReply": {
  6425. "type": "boolean"
  6426. },
  6427. "tools": {
  6428. "type": "object",
  6429. "additionalProperties": {
  6430. "type": "boolean"
  6431. }
  6432. },
  6433. "format": {
  6434. "$ref": "#/components/schemas/OutputFormat"
  6435. },
  6436. "system": {
  6437. "type": "string"
  6438. },
  6439. "variant": {
  6440. "type": "string"
  6441. },
  6442. "parts": {
  6443. "type": "array",
  6444. "items": {
  6445. "anyOf": [
  6446. {
  6447. "$ref": "#/components/schemas/TextPartInput"
  6448. },
  6449. {
  6450. "$ref": "#/components/schemas/FilePartInput"
  6451. },
  6452. {
  6453. "$ref": "#/components/schemas/AgentPartInput"
  6454. },
  6455. {
  6456. "$ref": "#/components/schemas/SubtaskPartInput"
  6457. }
  6458. ]
  6459. }
  6460. }
  6461. },
  6462. "required": ["parts"],
  6463. "additionalProperties": false
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "x-codeSamples": [
  6469. {
  6470. "lang": "js",
  6471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6472. }
  6473. ]
  6474. }
  6475. },
  6476. "/session/{sessionID}/message/{messageID}": {
  6477. "get": {
  6478. "tags": ["session"],
  6479. "operationId": "session.message",
  6480. "parameters": [
  6481. {
  6482. "name": "sessionID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^ses"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "messageID",
  6492. "in": "path",
  6493. "schema": {
  6494. "type": "string",
  6495. "pattern": "^msg"
  6496. },
  6497. "required": true
  6498. },
  6499. {
  6500. "name": "directory",
  6501. "in": "query",
  6502. "schema": {
  6503. "type": "string"
  6504. },
  6505. "required": false
  6506. },
  6507. {
  6508. "name": "workspace",
  6509. "in": "query",
  6510. "schema": {
  6511. "type": "string"
  6512. },
  6513. "required": false
  6514. }
  6515. ],
  6516. "responses": {
  6517. "200": {
  6518. "description": "Message",
  6519. "content": {
  6520. "application/json": {
  6521. "schema": {
  6522. "type": "object",
  6523. "properties": {
  6524. "info": {
  6525. "$ref": "#/components/schemas/Message"
  6526. },
  6527. "parts": {
  6528. "type": "array",
  6529. "items": {
  6530. "$ref": "#/components/schemas/Part"
  6531. }
  6532. }
  6533. },
  6534. "required": ["info", "parts"],
  6535. "additionalProperties": false,
  6536. "description": "Message"
  6537. }
  6538. }
  6539. }
  6540. },
  6541. "400": {
  6542. "description": "BadRequest | InvalidRequestError",
  6543. "content": {
  6544. "application/json": {
  6545. "schema": {
  6546. "anyOf": [
  6547. {
  6548. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6549. },
  6550. {
  6551. "$ref": "#/components/schemas/InvalidRequestError"
  6552. }
  6553. ]
  6554. }
  6555. }
  6556. }
  6557. },
  6558. "404": {
  6559. "description": "NotFoundError",
  6560. "content": {
  6561. "application/json": {
  6562. "schema": {
  6563. "$ref": "#/components/schemas/NotFoundError"
  6564. }
  6565. }
  6566. }
  6567. }
  6568. },
  6569. "description": "Retrieve a specific message from a session by its message ID.",
  6570. "summary": "Get message",
  6571. "x-codeSamples": [
  6572. {
  6573. "lang": "js",
  6574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6575. }
  6576. ]
  6577. },
  6578. "delete": {
  6579. "tags": ["session"],
  6580. "operationId": "session.deleteMessage",
  6581. "parameters": [
  6582. {
  6583. "name": "sessionID",
  6584. "in": "path",
  6585. "schema": {
  6586. "type": "string",
  6587. "pattern": "^ses"
  6588. },
  6589. "required": true
  6590. },
  6591. {
  6592. "name": "messageID",
  6593. "in": "path",
  6594. "schema": {
  6595. "type": "string",
  6596. "pattern": "^msg"
  6597. },
  6598. "required": true
  6599. },
  6600. {
  6601. "name": "directory",
  6602. "in": "query",
  6603. "schema": {
  6604. "type": "string"
  6605. },
  6606. "required": false
  6607. },
  6608. {
  6609. "name": "workspace",
  6610. "in": "query",
  6611. "schema": {
  6612. "type": "string"
  6613. },
  6614. "required": false
  6615. }
  6616. ],
  6617. "responses": {
  6618. "200": {
  6619. "description": "Successfully deleted message",
  6620. "content": {
  6621. "application/json": {
  6622. "schema": {
  6623. "type": "boolean",
  6624. "description": "Successfully deleted message"
  6625. }
  6626. }
  6627. }
  6628. },
  6629. "400": {
  6630. "description": "BadRequest | InvalidRequestError",
  6631. "content": {
  6632. "application/json": {
  6633. "schema": {
  6634. "anyOf": [
  6635. {
  6636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6637. },
  6638. {
  6639. "$ref": "#/components/schemas/InvalidRequestError"
  6640. }
  6641. ]
  6642. }
  6643. }
  6644. }
  6645. },
  6646. "404": {
  6647. "description": "NotFoundError",
  6648. "content": {
  6649. "application/json": {
  6650. "schema": {
  6651. "$ref": "#/components/schemas/NotFoundError"
  6652. }
  6653. }
  6654. }
  6655. },
  6656. "409": {
  6657. "description": "SessionBusyError",
  6658. "content": {
  6659. "application/json": {
  6660. "schema": {
  6661. "$ref": "#/components/schemas/SessionBusyError"
  6662. }
  6663. }
  6664. }
  6665. }
  6666. },
  6667. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6668. "summary": "Delete message",
  6669. "x-codeSamples": [
  6670. {
  6671. "lang": "js",
  6672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6673. }
  6674. ]
  6675. }
  6676. },
  6677. "/session/{sessionID}/fork": {
  6678. "post": {
  6679. "tags": ["session"],
  6680. "operationId": "session.fork",
  6681. "parameters": [
  6682. {
  6683. "name": "sessionID",
  6684. "in": "path",
  6685. "schema": {
  6686. "type": "string",
  6687. "pattern": "^ses"
  6688. },
  6689. "required": true
  6690. },
  6691. {
  6692. "name": "directory",
  6693. "in": "query",
  6694. "schema": {
  6695. "type": "string"
  6696. },
  6697. "required": false
  6698. },
  6699. {
  6700. "name": "workspace",
  6701. "in": "query",
  6702. "schema": {
  6703. "type": "string"
  6704. },
  6705. "required": false
  6706. }
  6707. ],
  6708. "responses": {
  6709. "200": {
  6710. "description": "200",
  6711. "content": {
  6712. "application/json": {
  6713. "schema": {
  6714. "$ref": "#/components/schemas/Session"
  6715. }
  6716. }
  6717. }
  6718. },
  6719. "400": {
  6720. "description": "BadRequest | InvalidRequestError",
  6721. "content": {
  6722. "application/json": {
  6723. "schema": {
  6724. "anyOf": [
  6725. {
  6726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6727. },
  6728. {
  6729. "$ref": "#/components/schemas/InvalidRequestError"
  6730. }
  6731. ]
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "404": {
  6737. "description": "NotFoundError",
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "$ref": "#/components/schemas/NotFoundError"
  6742. }
  6743. }
  6744. }
  6745. }
  6746. },
  6747. "description": "Create a new session by forking an existing session at a specific message point.",
  6748. "summary": "Fork session",
  6749. "requestBody": {
  6750. "content": {
  6751. "application/json": {
  6752. "schema": {
  6753. "type": "object",
  6754. "properties": {
  6755. "messageID": {
  6756. "type": "string",
  6757. "pattern": "^msg"
  6758. }
  6759. },
  6760. "additionalProperties": false
  6761. }
  6762. }
  6763. }
  6764. },
  6765. "x-codeSamples": [
  6766. {
  6767. "lang": "js",
  6768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6769. }
  6770. ]
  6771. }
  6772. },
  6773. "/session/{sessionID}/abort": {
  6774. "post": {
  6775. "tags": ["session"],
  6776. "operationId": "session.abort",
  6777. "parameters": [
  6778. {
  6779. "name": "sessionID",
  6780. "in": "path",
  6781. "schema": {
  6782. "type": "string",
  6783. "pattern": "^ses"
  6784. },
  6785. "required": true
  6786. },
  6787. {
  6788. "name": "directory",
  6789. "in": "query",
  6790. "schema": {
  6791. "type": "string"
  6792. },
  6793. "required": false
  6794. },
  6795. {
  6796. "name": "workspace",
  6797. "in": "query",
  6798. "schema": {
  6799. "type": "string"
  6800. },
  6801. "required": false
  6802. }
  6803. ],
  6804. "responses": {
  6805. "200": {
  6806. "description": "Aborted session",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "type": "boolean",
  6811. "description": "Aborted session"
  6812. }
  6813. }
  6814. }
  6815. },
  6816. "400": {
  6817. "description": "BadRequest | InvalidRequestError",
  6818. "content": {
  6819. "application/json": {
  6820. "schema": {
  6821. "anyOf": [
  6822. {
  6823. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6824. },
  6825. {
  6826. "$ref": "#/components/schemas/InvalidRequestError"
  6827. }
  6828. ]
  6829. }
  6830. }
  6831. }
  6832. }
  6833. },
  6834. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6835. "summary": "Abort session",
  6836. "x-codeSamples": [
  6837. {
  6838. "lang": "js",
  6839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6840. }
  6841. ]
  6842. }
  6843. },
  6844. "/session/{sessionID}/init": {
  6845. "post": {
  6846. "tags": ["session"],
  6847. "operationId": "session.init",
  6848. "parameters": [
  6849. {
  6850. "name": "sessionID",
  6851. "in": "path",
  6852. "schema": {
  6853. "type": "string",
  6854. "pattern": "^ses"
  6855. },
  6856. "required": true
  6857. },
  6858. {
  6859. "name": "directory",
  6860. "in": "query",
  6861. "schema": {
  6862. "type": "string"
  6863. },
  6864. "required": false
  6865. },
  6866. {
  6867. "name": "workspace",
  6868. "in": "query",
  6869. "schema": {
  6870. "type": "string"
  6871. },
  6872. "required": false
  6873. }
  6874. ],
  6875. "responses": {
  6876. "200": {
  6877. "description": "200",
  6878. "content": {
  6879. "application/json": {
  6880. "schema": {
  6881. "type": "boolean",
  6882. "description": "200"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "400": {
  6888. "description": "BadRequest | InvalidRequestError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "anyOf": [
  6893. {
  6894. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6895. },
  6896. {
  6897. "$ref": "#/components/schemas/InvalidRequestError"
  6898. }
  6899. ]
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "404": {
  6905. "description": "NotFoundError",
  6906. "content": {
  6907. "application/json": {
  6908. "schema": {
  6909. "$ref": "#/components/schemas/NotFoundError"
  6910. }
  6911. }
  6912. }
  6913. }
  6914. },
  6915. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6916. "summary": "Initialize session",
  6917. "requestBody": {
  6918. "content": {
  6919. "application/json": {
  6920. "schema": {
  6921. "type": "object",
  6922. "properties": {
  6923. "modelID": {
  6924. "type": "string"
  6925. },
  6926. "providerID": {
  6927. "type": "string"
  6928. },
  6929. "messageID": {
  6930. "type": "string",
  6931. "pattern": "^msg"
  6932. }
  6933. },
  6934. "required": ["modelID", "providerID", "messageID"],
  6935. "additionalProperties": false
  6936. }
  6937. }
  6938. }
  6939. },
  6940. "x-codeSamples": [
  6941. {
  6942. "lang": "js",
  6943. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6944. }
  6945. ]
  6946. }
  6947. },
  6948. "/session/{sessionID}/share": {
  6949. "post": {
  6950. "tags": ["session"],
  6951. "operationId": "session.share",
  6952. "parameters": [
  6953. {
  6954. "name": "sessionID",
  6955. "in": "path",
  6956. "schema": {
  6957. "type": "string",
  6958. "pattern": "^ses"
  6959. },
  6960. "required": true
  6961. },
  6962. {
  6963. "name": "directory",
  6964. "in": "query",
  6965. "schema": {
  6966. "type": "string"
  6967. },
  6968. "required": false
  6969. },
  6970. {
  6971. "name": "workspace",
  6972. "in": "query",
  6973. "schema": {
  6974. "type": "string"
  6975. },
  6976. "required": false
  6977. }
  6978. ],
  6979. "responses": {
  6980. "200": {
  6981. "description": "Successfully shared session",
  6982. "content": {
  6983. "application/json": {
  6984. "schema": {
  6985. "$ref": "#/components/schemas/Session"
  6986. }
  6987. }
  6988. }
  6989. },
  6990. "400": {
  6991. "description": "Bad request",
  6992. "content": {
  6993. "application/json": {
  6994. "schema": {
  6995. "$ref": "#/components/schemas/BadRequestError"
  6996. }
  6997. }
  6998. }
  6999. },
  7000. "404": {
  7001. "description": "NotFoundError",
  7002. "content": {
  7003. "application/json": {
  7004. "schema": {
  7005. "$ref": "#/components/schemas/NotFoundError"
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "500": {
  7011. "description": "InternalServerError",
  7012. "content": {
  7013. "application/json": {
  7014. "schema": {
  7015. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. },
  7021. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  7022. "summary": "Share session",
  7023. "x-codeSamples": [
  7024. {
  7025. "lang": "js",
  7026. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  7027. }
  7028. ]
  7029. },
  7030. "delete": {
  7031. "tags": ["session"],
  7032. "operationId": "session.unshare",
  7033. "parameters": [
  7034. {
  7035. "name": "sessionID",
  7036. "in": "path",
  7037. "schema": {
  7038. "type": "string",
  7039. "pattern": "^ses"
  7040. },
  7041. "required": true
  7042. },
  7043. {
  7044. "name": "directory",
  7045. "in": "query",
  7046. "schema": {
  7047. "type": "string"
  7048. },
  7049. "required": false
  7050. },
  7051. {
  7052. "name": "workspace",
  7053. "in": "query",
  7054. "schema": {
  7055. "type": "string"
  7056. },
  7057. "required": false
  7058. }
  7059. ],
  7060. "responses": {
  7061. "200": {
  7062. "description": "Successfully unshared session",
  7063. "content": {
  7064. "application/json": {
  7065. "schema": {
  7066. "$ref": "#/components/schemas/Session"
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "400": {
  7072. "description": "Bad request",
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "$ref": "#/components/schemas/BadRequestError"
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "404": {
  7082. "description": "NotFoundError",
  7083. "content": {
  7084. "application/json": {
  7085. "schema": {
  7086. "$ref": "#/components/schemas/NotFoundError"
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "500": {
  7092. "description": "InternalServerError",
  7093. "content": {
  7094. "application/json": {
  7095. "schema": {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7097. }
  7098. }
  7099. }
  7100. }
  7101. },
  7102. "description": "Remove the shareable link for a session, making it private again.",
  7103. "summary": "Unshare session",
  7104. "x-codeSamples": [
  7105. {
  7106. "lang": "js",
  7107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7108. }
  7109. ]
  7110. }
  7111. },
  7112. "/session/{sessionID}/summarize": {
  7113. "post": {
  7114. "tags": ["session"],
  7115. "operationId": "session.summarize",
  7116. "parameters": [
  7117. {
  7118. "name": "sessionID",
  7119. "in": "path",
  7120. "schema": {
  7121. "type": "string",
  7122. "pattern": "^ses"
  7123. },
  7124. "required": true
  7125. },
  7126. {
  7127. "name": "directory",
  7128. "in": "query",
  7129. "schema": {
  7130. "type": "string"
  7131. },
  7132. "required": false
  7133. },
  7134. {
  7135. "name": "workspace",
  7136. "in": "query",
  7137. "schema": {
  7138. "type": "string"
  7139. },
  7140. "required": false
  7141. }
  7142. ],
  7143. "responses": {
  7144. "200": {
  7145. "description": "Summarized session",
  7146. "content": {
  7147. "application/json": {
  7148. "schema": {
  7149. "type": "boolean",
  7150. "description": "Summarized session"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. }
  7182. },
  7183. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7184. "summary": "Summarize session",
  7185. "requestBody": {
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "type": "object",
  7190. "properties": {
  7191. "providerID": {
  7192. "type": "string"
  7193. },
  7194. "modelID": {
  7195. "type": "string"
  7196. },
  7197. "auto": {
  7198. "type": "boolean"
  7199. }
  7200. },
  7201. "required": ["providerID", "modelID"],
  7202. "additionalProperties": false
  7203. }
  7204. }
  7205. }
  7206. },
  7207. "x-codeSamples": [
  7208. {
  7209. "lang": "js",
  7210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7211. }
  7212. ]
  7213. }
  7214. },
  7215. "/session/{sessionID}/prompt_async": {
  7216. "post": {
  7217. "tags": ["session"],
  7218. "operationId": "session.prompt_async",
  7219. "parameters": [
  7220. {
  7221. "name": "sessionID",
  7222. "in": "path",
  7223. "schema": {
  7224. "type": "string",
  7225. "pattern": "^ses"
  7226. },
  7227. "required": true
  7228. },
  7229. {
  7230. "name": "directory",
  7231. "in": "query",
  7232. "schema": {
  7233. "type": "string"
  7234. },
  7235. "required": false
  7236. },
  7237. {
  7238. "name": "workspace",
  7239. "in": "query",
  7240. "schema": {
  7241. "type": "string"
  7242. },
  7243. "required": false
  7244. }
  7245. ],
  7246. "responses": {
  7247. "204": {
  7248. "description": "Prompt accepted"
  7249. },
  7250. "400": {
  7251. "description": "BadRequest | InvalidRequestError",
  7252. "content": {
  7253. "application/json": {
  7254. "schema": {
  7255. "anyOf": [
  7256. {
  7257. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7258. },
  7259. {
  7260. "$ref": "#/components/schemas/InvalidRequestError"
  7261. }
  7262. ]
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "404": {
  7268. "description": "NotFoundError",
  7269. "content": {
  7270. "application/json": {
  7271. "schema": {
  7272. "$ref": "#/components/schemas/NotFoundError"
  7273. }
  7274. }
  7275. }
  7276. }
  7277. },
  7278. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7279. "summary": "Send async message",
  7280. "requestBody": {
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "type": "object",
  7285. "properties": {
  7286. "messageID": {
  7287. "type": "string",
  7288. "pattern": "^msg"
  7289. },
  7290. "model": {
  7291. "type": "object",
  7292. "properties": {
  7293. "providerID": {
  7294. "type": "string"
  7295. },
  7296. "modelID": {
  7297. "type": "string"
  7298. }
  7299. },
  7300. "required": ["providerID", "modelID"],
  7301. "additionalProperties": false
  7302. },
  7303. "agent": {
  7304. "type": "string"
  7305. },
  7306. "noReply": {
  7307. "type": "boolean"
  7308. },
  7309. "tools": {
  7310. "type": "object",
  7311. "additionalProperties": {
  7312. "type": "boolean"
  7313. }
  7314. },
  7315. "format": {
  7316. "$ref": "#/components/schemas/OutputFormat"
  7317. },
  7318. "system": {
  7319. "type": "string"
  7320. },
  7321. "variant": {
  7322. "type": "string"
  7323. },
  7324. "parts": {
  7325. "type": "array",
  7326. "items": {
  7327. "anyOf": [
  7328. {
  7329. "$ref": "#/components/schemas/TextPartInput"
  7330. },
  7331. {
  7332. "$ref": "#/components/schemas/FilePartInput"
  7333. },
  7334. {
  7335. "$ref": "#/components/schemas/AgentPartInput"
  7336. },
  7337. {
  7338. "$ref": "#/components/schemas/SubtaskPartInput"
  7339. }
  7340. ]
  7341. }
  7342. }
  7343. },
  7344. "required": ["parts"],
  7345. "additionalProperties": false
  7346. }
  7347. }
  7348. }
  7349. },
  7350. "x-codeSamples": [
  7351. {
  7352. "lang": "js",
  7353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7354. }
  7355. ]
  7356. }
  7357. },
  7358. "/session/{sessionID}/command": {
  7359. "post": {
  7360. "tags": ["session"],
  7361. "operationId": "session.command",
  7362. "parameters": [
  7363. {
  7364. "name": "sessionID",
  7365. "in": "path",
  7366. "schema": {
  7367. "type": "string",
  7368. "pattern": "^ses"
  7369. },
  7370. "required": true
  7371. },
  7372. {
  7373. "name": "directory",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. },
  7380. {
  7381. "name": "workspace",
  7382. "in": "query",
  7383. "schema": {
  7384. "type": "string"
  7385. },
  7386. "required": false
  7387. }
  7388. ],
  7389. "responses": {
  7390. "200": {
  7391. "description": "Created message",
  7392. "content": {
  7393. "application/json": {
  7394. "schema": {
  7395. "type": "object",
  7396. "required": ["info", "parts"],
  7397. "properties": {
  7398. "info": {
  7399. "$ref": "#/components/schemas/AssistantMessage"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "$ref": "#/components/schemas/Part"
  7405. }
  7406. }
  7407. }
  7408. }
  7409. }
  7410. }
  7411. },
  7412. "400": {
  7413. "description": "BadRequest | InvalidRequestError",
  7414. "content": {
  7415. "application/json": {
  7416. "schema": {
  7417. "anyOf": [
  7418. {
  7419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7420. },
  7421. {
  7422. "$ref": "#/components/schemas/InvalidRequestError"
  7423. }
  7424. ]
  7425. }
  7426. }
  7427. }
  7428. },
  7429. "404": {
  7430. "description": "NotFoundError",
  7431. "content": {
  7432. "application/json": {
  7433. "schema": {
  7434. "$ref": "#/components/schemas/NotFoundError"
  7435. }
  7436. }
  7437. }
  7438. }
  7439. },
  7440. "description": "Send a new command to a session for execution by the AI assistant.",
  7441. "summary": "Send command",
  7442. "requestBody": {
  7443. "content": {
  7444. "application/json": {
  7445. "schema": {
  7446. "type": "object",
  7447. "properties": {
  7448. "messageID": {
  7449. "type": "string",
  7450. "pattern": "^msg"
  7451. },
  7452. "agent": {
  7453. "type": "string"
  7454. },
  7455. "model": {
  7456. "type": "string"
  7457. },
  7458. "arguments": {
  7459. "type": "string"
  7460. },
  7461. "command": {
  7462. "type": "string"
  7463. },
  7464. "variant": {
  7465. "type": "string"
  7466. },
  7467. "parts": {
  7468. "type": "array",
  7469. "items": {
  7470. "type": "object",
  7471. "properties": {
  7472. "id": {
  7473. "type": "string",
  7474. "pattern": "^prt"
  7475. },
  7476. "type": {
  7477. "type": "string",
  7478. "enum": ["file"]
  7479. },
  7480. "mime": {
  7481. "type": "string"
  7482. },
  7483. "filename": {
  7484. "type": "string"
  7485. },
  7486. "url": {
  7487. "type": "string"
  7488. },
  7489. "source": {
  7490. "$ref": "#/components/schemas/FilePartSource"
  7491. }
  7492. },
  7493. "required": ["type", "mime", "url"],
  7494. "additionalProperties": false
  7495. }
  7496. }
  7497. },
  7498. "required": ["arguments", "command"],
  7499. "additionalProperties": false
  7500. }
  7501. }
  7502. }
  7503. },
  7504. "x-codeSamples": [
  7505. {
  7506. "lang": "js",
  7507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7508. }
  7509. ]
  7510. }
  7511. },
  7512. "/session/{sessionID}/shell": {
  7513. "post": {
  7514. "tags": ["session"],
  7515. "operationId": "session.shell",
  7516. "parameters": [
  7517. {
  7518. "name": "sessionID",
  7519. "in": "path",
  7520. "schema": {
  7521. "type": "string",
  7522. "pattern": "^ses"
  7523. },
  7524. "required": true
  7525. },
  7526. {
  7527. "name": "directory",
  7528. "in": "query",
  7529. "schema": {
  7530. "type": "string"
  7531. },
  7532. "required": false
  7533. },
  7534. {
  7535. "name": "workspace",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. }
  7542. ],
  7543. "responses": {
  7544. "200": {
  7545. "description": "Created message",
  7546. "content": {
  7547. "application/json": {
  7548. "schema": {
  7549. "type": "object",
  7550. "properties": {
  7551. "info": {
  7552. "$ref": "#/components/schemas/Message"
  7553. },
  7554. "parts": {
  7555. "type": "array",
  7556. "items": {
  7557. "$ref": "#/components/schemas/Part"
  7558. }
  7559. }
  7560. },
  7561. "required": ["info", "parts"],
  7562. "additionalProperties": false,
  7563. "description": "Created message"
  7564. }
  7565. }
  7566. }
  7567. },
  7568. "400": {
  7569. "description": "BadRequest | InvalidRequestError",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "anyOf": [
  7574. {
  7575. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7576. },
  7577. {
  7578. "$ref": "#/components/schemas/InvalidRequestError"
  7579. }
  7580. ]
  7581. }
  7582. }
  7583. }
  7584. },
  7585. "404": {
  7586. "description": "NotFoundError",
  7587. "content": {
  7588. "application/json": {
  7589. "schema": {
  7590. "$ref": "#/components/schemas/NotFoundError"
  7591. }
  7592. }
  7593. }
  7594. },
  7595. "409": {
  7596. "description": "SessionBusyError",
  7597. "content": {
  7598. "application/json": {
  7599. "schema": {
  7600. "$ref": "#/components/schemas/SessionBusyError"
  7601. }
  7602. }
  7603. }
  7604. }
  7605. },
  7606. "description": "Execute a shell command within the session context and return the AI's response.",
  7607. "summary": "Run shell command",
  7608. "requestBody": {
  7609. "content": {
  7610. "application/json": {
  7611. "schema": {
  7612. "type": "object",
  7613. "properties": {
  7614. "messageID": {
  7615. "type": "string",
  7616. "pattern": "^msg"
  7617. },
  7618. "agent": {
  7619. "type": "string"
  7620. },
  7621. "model": {
  7622. "type": "object",
  7623. "properties": {
  7624. "providerID": {
  7625. "type": "string"
  7626. },
  7627. "modelID": {
  7628. "type": "string"
  7629. }
  7630. },
  7631. "required": ["providerID", "modelID"],
  7632. "additionalProperties": false
  7633. },
  7634. "command": {
  7635. "type": "string"
  7636. }
  7637. },
  7638. "required": ["agent", "command"],
  7639. "additionalProperties": false
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "x-codeSamples": [
  7645. {
  7646. "lang": "js",
  7647. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7648. }
  7649. ]
  7650. }
  7651. },
  7652. "/session/{sessionID}/revert": {
  7653. "post": {
  7654. "tags": ["session"],
  7655. "operationId": "session.revert",
  7656. "parameters": [
  7657. {
  7658. "name": "sessionID",
  7659. "in": "path",
  7660. "schema": {
  7661. "type": "string",
  7662. "pattern": "^ses"
  7663. },
  7664. "required": true
  7665. },
  7666. {
  7667. "name": "directory",
  7668. "in": "query",
  7669. "schema": {
  7670. "type": "string"
  7671. },
  7672. "required": false
  7673. },
  7674. {
  7675. "name": "workspace",
  7676. "in": "query",
  7677. "schema": {
  7678. "type": "string"
  7679. },
  7680. "required": false
  7681. }
  7682. ],
  7683. "responses": {
  7684. "200": {
  7685. "description": "Updated session",
  7686. "content": {
  7687. "application/json": {
  7688. "schema": {
  7689. "$ref": "#/components/schemas/Session"
  7690. }
  7691. }
  7692. }
  7693. },
  7694. "400": {
  7695. "description": "BadRequest | InvalidRequestError",
  7696. "content": {
  7697. "application/json": {
  7698. "schema": {
  7699. "anyOf": [
  7700. {
  7701. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7702. },
  7703. {
  7704. "$ref": "#/components/schemas/InvalidRequestError"
  7705. }
  7706. ]
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "404": {
  7712. "description": "NotFoundError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "$ref": "#/components/schemas/NotFoundError"
  7717. }
  7718. }
  7719. }
  7720. },
  7721. "409": {
  7722. "description": "SessionBusyError",
  7723. "content": {
  7724. "application/json": {
  7725. "schema": {
  7726. "$ref": "#/components/schemas/SessionBusyError"
  7727. }
  7728. }
  7729. }
  7730. }
  7731. },
  7732. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7733. "summary": "Revert message",
  7734. "requestBody": {
  7735. "content": {
  7736. "application/json": {
  7737. "schema": {
  7738. "type": "object",
  7739. "properties": {
  7740. "messageID": {
  7741. "type": "string",
  7742. "pattern": "^msg"
  7743. },
  7744. "partID": {
  7745. "type": "string",
  7746. "pattern": "^prt"
  7747. }
  7748. },
  7749. "required": ["messageID"],
  7750. "additionalProperties": false
  7751. }
  7752. }
  7753. }
  7754. },
  7755. "x-codeSamples": [
  7756. {
  7757. "lang": "js",
  7758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7759. }
  7760. ]
  7761. }
  7762. },
  7763. "/session/{sessionID}/unrevert": {
  7764. "post": {
  7765. "tags": ["session"],
  7766. "operationId": "session.unrevert",
  7767. "parameters": [
  7768. {
  7769. "name": "sessionID",
  7770. "in": "path",
  7771. "schema": {
  7772. "type": "string",
  7773. "pattern": "^ses"
  7774. },
  7775. "required": true
  7776. },
  7777. {
  7778. "name": "directory",
  7779. "in": "query",
  7780. "schema": {
  7781. "type": "string"
  7782. },
  7783. "required": false
  7784. },
  7785. {
  7786. "name": "workspace",
  7787. "in": "query",
  7788. "schema": {
  7789. "type": "string"
  7790. },
  7791. "required": false
  7792. }
  7793. ],
  7794. "responses": {
  7795. "200": {
  7796. "description": "Updated session",
  7797. "content": {
  7798. "application/json": {
  7799. "schema": {
  7800. "$ref": "#/components/schemas/Session"
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "400": {
  7806. "description": "BadRequest | InvalidRequestError",
  7807. "content": {
  7808. "application/json": {
  7809. "schema": {
  7810. "anyOf": [
  7811. {
  7812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7813. },
  7814. {
  7815. "$ref": "#/components/schemas/InvalidRequestError"
  7816. }
  7817. ]
  7818. }
  7819. }
  7820. }
  7821. },
  7822. "404": {
  7823. "description": "NotFoundError",
  7824. "content": {
  7825. "application/json": {
  7826. "schema": {
  7827. "$ref": "#/components/schemas/NotFoundError"
  7828. }
  7829. }
  7830. }
  7831. },
  7832. "409": {
  7833. "description": "SessionBusyError",
  7834. "content": {
  7835. "application/json": {
  7836. "schema": {
  7837. "$ref": "#/components/schemas/SessionBusyError"
  7838. }
  7839. }
  7840. }
  7841. }
  7842. },
  7843. "description": "Restore all previously reverted messages in a session.",
  7844. "summary": "Restore reverted messages",
  7845. "x-codeSamples": [
  7846. {
  7847. "lang": "js",
  7848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7849. }
  7850. ]
  7851. }
  7852. },
  7853. "/session/{sessionID}/permissions/{permissionID}": {
  7854. "post": {
  7855. "tags": ["session"],
  7856. "operationId": "permission.respond",
  7857. "parameters": [
  7858. {
  7859. "name": "sessionID",
  7860. "in": "path",
  7861. "schema": {
  7862. "type": "string",
  7863. "pattern": "^ses"
  7864. },
  7865. "required": true
  7866. },
  7867. {
  7868. "name": "permissionID",
  7869. "in": "path",
  7870. "schema": {
  7871. "type": "string",
  7872. "pattern": "^per"
  7873. },
  7874. "required": true
  7875. },
  7876. {
  7877. "name": "directory",
  7878. "in": "query",
  7879. "schema": {
  7880. "type": "string"
  7881. },
  7882. "required": false
  7883. },
  7884. {
  7885. "name": "workspace",
  7886. "in": "query",
  7887. "schema": {
  7888. "type": "string"
  7889. },
  7890. "required": false
  7891. }
  7892. ],
  7893. "responses": {
  7894. "200": {
  7895. "description": "Permission processed successfully",
  7896. "content": {
  7897. "application/json": {
  7898. "schema": {
  7899. "type": "boolean",
  7900. "description": "Permission processed successfully"
  7901. }
  7902. }
  7903. }
  7904. },
  7905. "400": {
  7906. "description": "BadRequest | InvalidRequestError",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "anyOf": [
  7911. {
  7912. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7913. },
  7914. {
  7915. "$ref": "#/components/schemas/InvalidRequestError"
  7916. }
  7917. ]
  7918. }
  7919. }
  7920. }
  7921. },
  7922. "404": {
  7923. "description": "NotFoundError | PermissionNotFoundError",
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "anyOf": [
  7928. {
  7929. "$ref": "#/components/schemas/NotFoundError"
  7930. },
  7931. {
  7932. "$ref": "#/components/schemas/PermissionNotFoundError"
  7933. }
  7934. ]
  7935. }
  7936. }
  7937. }
  7938. }
  7939. },
  7940. "description": "Approve or deny a permission request from the AI assistant.",
  7941. "summary": "Respond to permission",
  7942. "deprecated": true,
  7943. "requestBody": {
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "object",
  7948. "properties": {
  7949. "response": {
  7950. "type": "string",
  7951. "enum": ["once", "always", "reject"]
  7952. }
  7953. },
  7954. "required": ["response"],
  7955. "additionalProperties": false
  7956. }
  7957. }
  7958. }
  7959. },
  7960. "x-codeSamples": [
  7961. {
  7962. "lang": "js",
  7963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7964. }
  7965. ]
  7966. }
  7967. },
  7968. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7969. "delete": {
  7970. "tags": ["session"],
  7971. "operationId": "part.delete",
  7972. "parameters": [
  7973. {
  7974. "name": "sessionID",
  7975. "in": "path",
  7976. "schema": {
  7977. "type": "string",
  7978. "pattern": "^ses"
  7979. },
  7980. "required": true
  7981. },
  7982. {
  7983. "name": "messageID",
  7984. "in": "path",
  7985. "schema": {
  7986. "type": "string",
  7987. "pattern": "^msg"
  7988. },
  7989. "required": true
  7990. },
  7991. {
  7992. "name": "partID",
  7993. "in": "path",
  7994. "schema": {
  7995. "type": "string",
  7996. "pattern": "^prt"
  7997. },
  7998. "required": true
  7999. },
  8000. {
  8001. "name": "directory",
  8002. "in": "query",
  8003. "schema": {
  8004. "type": "string"
  8005. },
  8006. "required": false
  8007. },
  8008. {
  8009. "name": "workspace",
  8010. "in": "query",
  8011. "schema": {
  8012. "type": "string"
  8013. },
  8014. "required": false
  8015. }
  8016. ],
  8017. "responses": {
  8018. "200": {
  8019. "description": "Successfully deleted part",
  8020. "content": {
  8021. "application/json": {
  8022. "schema": {
  8023. "type": "boolean",
  8024. "description": "Successfully deleted part"
  8025. }
  8026. }
  8027. }
  8028. },
  8029. "400": {
  8030. "description": "BadRequest | InvalidRequestError",
  8031. "content": {
  8032. "application/json": {
  8033. "schema": {
  8034. "anyOf": [
  8035. {
  8036. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8037. },
  8038. {
  8039. "$ref": "#/components/schemas/InvalidRequestError"
  8040. }
  8041. ]
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "404": {
  8047. "description": "NotFoundError",
  8048. "content": {
  8049. "application/json": {
  8050. "schema": {
  8051. "$ref": "#/components/schemas/NotFoundError"
  8052. }
  8053. }
  8054. }
  8055. }
  8056. },
  8057. "description": "Delete a part from a message.",
  8058. "x-codeSamples": [
  8059. {
  8060. "lang": "js",
  8061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  8062. }
  8063. ]
  8064. },
  8065. "patch": {
  8066. "tags": ["session"],
  8067. "operationId": "part.update",
  8068. "parameters": [
  8069. {
  8070. "name": "sessionID",
  8071. "in": "path",
  8072. "schema": {
  8073. "type": "string",
  8074. "pattern": "^ses"
  8075. },
  8076. "required": true
  8077. },
  8078. {
  8079. "name": "messageID",
  8080. "in": "path",
  8081. "schema": {
  8082. "type": "string",
  8083. "pattern": "^msg"
  8084. },
  8085. "required": true
  8086. },
  8087. {
  8088. "name": "partID",
  8089. "in": "path",
  8090. "schema": {
  8091. "type": "string",
  8092. "pattern": "^prt"
  8093. },
  8094. "required": true
  8095. },
  8096. {
  8097. "name": "directory",
  8098. "in": "query",
  8099. "schema": {
  8100. "type": "string"
  8101. },
  8102. "required": false
  8103. },
  8104. {
  8105. "name": "workspace",
  8106. "in": "query",
  8107. "schema": {
  8108. "type": "string"
  8109. },
  8110. "required": false
  8111. }
  8112. ],
  8113. "responses": {
  8114. "200": {
  8115. "description": "Successfully updated part",
  8116. "content": {
  8117. "application/json": {
  8118. "schema": {
  8119. "$ref": "#/components/schemas/Part"
  8120. }
  8121. }
  8122. }
  8123. },
  8124. "400": {
  8125. "description": "BadRequest | InvalidRequestError",
  8126. "content": {
  8127. "application/json": {
  8128. "schema": {
  8129. "anyOf": [
  8130. {
  8131. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8132. },
  8133. {
  8134. "$ref": "#/components/schemas/InvalidRequestError"
  8135. }
  8136. ]
  8137. }
  8138. }
  8139. }
  8140. },
  8141. "404": {
  8142. "description": "NotFoundError",
  8143. "content": {
  8144. "application/json": {
  8145. "schema": {
  8146. "$ref": "#/components/schemas/NotFoundError"
  8147. }
  8148. }
  8149. }
  8150. }
  8151. },
  8152. "description": "Update a part in a message.",
  8153. "requestBody": {
  8154. "content": {
  8155. "application/json": {
  8156. "schema": {
  8157. "$ref": "#/components/schemas/Part"
  8158. }
  8159. }
  8160. }
  8161. },
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/sync/start": {
  8171. "post": {
  8172. "tags": ["sync"],
  8173. "operationId": "sync.start",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "schema": {
  8179. "type": "string"
  8180. },
  8181. "required": false
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "schema": {
  8187. "type": "string"
  8188. },
  8189. "required": false
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Workspace sync started",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Workspace sync started"
  8200. }
  8201. }
  8202. }
  8203. },
  8204. "400": {
  8205. "description": "Bad request",
  8206. "content": {
  8207. "application/json": {
  8208. "schema": {
  8209. "$ref": "#/components/schemas/BadRequestError"
  8210. }
  8211. }
  8212. }
  8213. }
  8214. },
  8215. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8216. "summary": "Start workspace sync",
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/replay": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.replay",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Replayed sync events",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string"
  8257. }
  8258. },
  8259. "required": ["sessionID"],
  8260. "additionalProperties": false,
  8261. "description": "Replayed sync events"
  8262. }
  8263. }
  8264. }
  8265. },
  8266. "400": {
  8267. "description": "BadRequest | InvalidRequestError",
  8268. "content": {
  8269. "application/json": {
  8270. "schema": {
  8271. "anyOf": [
  8272. {
  8273. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8274. },
  8275. {
  8276. "$ref": "#/components/schemas/InvalidRequestError"
  8277. }
  8278. ]
  8279. }
  8280. }
  8281. }
  8282. }
  8283. },
  8284. "description": "Validate and replay a complete sync event history.",
  8285. "summary": "Replay sync events",
  8286. "requestBody": {
  8287. "content": {
  8288. "application/json": {
  8289. "schema": {
  8290. "type": "object",
  8291. "properties": {
  8292. "directory": {
  8293. "type": "string"
  8294. },
  8295. "events": {
  8296. "type": "array",
  8297. "minItems": 1,
  8298. "items": {
  8299. "type": "object",
  8300. "properties": {
  8301. "id": {
  8302. "type": "string",
  8303. "pattern": "^evt_"
  8304. },
  8305. "aggregateID": {
  8306. "type": "string"
  8307. },
  8308. "seq": {
  8309. "type": "integer",
  8310. "minimum": 0
  8311. },
  8312. "type": {
  8313. "type": "string"
  8314. },
  8315. "data": {
  8316. "type": "object"
  8317. }
  8318. },
  8319. "required": ["id", "aggregateID", "seq", "type", "data"],
  8320. "additionalProperties": false
  8321. }
  8322. }
  8323. },
  8324. "required": ["directory", "events"],
  8325. "additionalProperties": false
  8326. }
  8327. }
  8328. }
  8329. },
  8330. "x-codeSamples": [
  8331. {
  8332. "lang": "js",
  8333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8334. }
  8335. ]
  8336. }
  8337. },
  8338. "/sync/steal": {
  8339. "post": {
  8340. "tags": ["sync"],
  8341. "operationId": "sync.steal",
  8342. "parameters": [
  8343. {
  8344. "name": "directory",
  8345. "in": "query",
  8346. "schema": {
  8347. "type": "string"
  8348. },
  8349. "required": false
  8350. },
  8351. {
  8352. "name": "workspace",
  8353. "in": "query",
  8354. "schema": {
  8355. "type": "string"
  8356. },
  8357. "required": false
  8358. }
  8359. ],
  8360. "responses": {
  8361. "200": {
  8362. "description": "Session stolen into workspace",
  8363. "content": {
  8364. "application/json": {
  8365. "schema": {
  8366. "type": "object",
  8367. "properties": {
  8368. "sessionID": {
  8369. "type": "string",
  8370. "pattern": "^ses"
  8371. }
  8372. },
  8373. "required": ["sessionID"],
  8374. "additionalProperties": false,
  8375. "description": "Session stolen into workspace"
  8376. }
  8377. }
  8378. }
  8379. },
  8380. "400": {
  8381. "description": "BadRequest | InvalidRequestError",
  8382. "content": {
  8383. "application/json": {
  8384. "schema": {
  8385. "anyOf": [
  8386. {
  8387. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8388. },
  8389. {
  8390. "$ref": "#/components/schemas/InvalidRequestError"
  8391. }
  8392. ]
  8393. }
  8394. }
  8395. }
  8396. }
  8397. },
  8398. "description": "Update a session to belong to the current workspace through the sync event system.",
  8399. "summary": "Steal session into workspace",
  8400. "requestBody": {
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "type": "object",
  8405. "properties": {
  8406. "sessionID": {
  8407. "type": "string",
  8408. "pattern": "^ses"
  8409. }
  8410. },
  8411. "required": ["sessionID"],
  8412. "additionalProperties": false
  8413. }
  8414. }
  8415. }
  8416. },
  8417. "x-codeSamples": [
  8418. {
  8419. "lang": "js",
  8420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8421. }
  8422. ]
  8423. }
  8424. },
  8425. "/sync/history": {
  8426. "post": {
  8427. "tags": ["sync"],
  8428. "operationId": "sync.history.list",
  8429. "parameters": [
  8430. {
  8431. "name": "directory",
  8432. "in": "query",
  8433. "schema": {
  8434. "type": "string"
  8435. },
  8436. "required": false
  8437. },
  8438. {
  8439. "name": "workspace",
  8440. "in": "query",
  8441. "schema": {
  8442. "type": "string"
  8443. },
  8444. "required": false
  8445. }
  8446. ],
  8447. "responses": {
  8448. "200": {
  8449. "description": "Sync events",
  8450. "content": {
  8451. "application/json": {
  8452. "schema": {
  8453. "type": "array",
  8454. "items": {
  8455. "type": "object",
  8456. "properties": {
  8457. "id": {
  8458. "type": "string",
  8459. "pattern": "^evt_"
  8460. },
  8461. "aggregate_id": {
  8462. "type": "string"
  8463. },
  8464. "seq": {
  8465. "type": "integer",
  8466. "minimum": 0
  8467. },
  8468. "type": {
  8469. "type": "string"
  8470. },
  8471. "data": {
  8472. "type": "object"
  8473. }
  8474. },
  8475. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8476. "additionalProperties": false
  8477. },
  8478. "description": "Sync events"
  8479. }
  8480. }
  8481. }
  8482. },
  8483. "400": {
  8484. "description": "BadRequest | InvalidRequestError",
  8485. "content": {
  8486. "application/json": {
  8487. "schema": {
  8488. "anyOf": [
  8489. {
  8490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8491. },
  8492. {
  8493. "$ref": "#/components/schemas/InvalidRequestError"
  8494. }
  8495. ]
  8496. }
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8502. "summary": "List sync events",
  8503. "requestBody": {
  8504. "content": {
  8505. "application/json": {
  8506. "schema": {
  8507. "type": "object",
  8508. "additionalProperties": {
  8509. "type": "integer",
  8510. "minimum": 0
  8511. }
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "x-codeSamples": [
  8517. {
  8518. "lang": "js",
  8519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8520. }
  8521. ]
  8522. }
  8523. },
  8524. "/tui/append-prompt": {
  8525. "post": {
  8526. "tags": ["tui"],
  8527. "operationId": "tui.appendPrompt",
  8528. "parameters": [
  8529. {
  8530. "name": "directory",
  8531. "in": "query",
  8532. "schema": {
  8533. "type": "string"
  8534. },
  8535. "required": false
  8536. },
  8537. {
  8538. "name": "workspace",
  8539. "in": "query",
  8540. "schema": {
  8541. "type": "string"
  8542. },
  8543. "required": false
  8544. }
  8545. ],
  8546. "responses": {
  8547. "200": {
  8548. "description": "Prompt processed successfully",
  8549. "content": {
  8550. "application/json": {
  8551. "schema": {
  8552. "type": "boolean",
  8553. "description": "Prompt processed successfully"
  8554. }
  8555. }
  8556. }
  8557. },
  8558. "400": {
  8559. "description": "BadRequest | InvalidRequestError",
  8560. "content": {
  8561. "application/json": {
  8562. "schema": {
  8563. "anyOf": [
  8564. {
  8565. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8566. },
  8567. {
  8568. "$ref": "#/components/schemas/InvalidRequestError"
  8569. }
  8570. ]
  8571. }
  8572. }
  8573. }
  8574. }
  8575. },
  8576. "description": "Append prompt to the TUI.",
  8577. "summary": "Append TUI prompt",
  8578. "requestBody": {
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "type": "object",
  8583. "properties": {
  8584. "text": {
  8585. "type": "string"
  8586. }
  8587. },
  8588. "required": ["text"],
  8589. "additionalProperties": false
  8590. }
  8591. }
  8592. }
  8593. },
  8594. "x-codeSamples": [
  8595. {
  8596. "lang": "js",
  8597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8598. }
  8599. ]
  8600. }
  8601. },
  8602. "/tui/open-help": {
  8603. "post": {
  8604. "tags": ["tui"],
  8605. "operationId": "tui.openHelp",
  8606. "parameters": [
  8607. {
  8608. "name": "directory",
  8609. "in": "query",
  8610. "schema": {
  8611. "type": "string"
  8612. },
  8613. "required": false
  8614. },
  8615. {
  8616. "name": "workspace",
  8617. "in": "query",
  8618. "schema": {
  8619. "type": "string"
  8620. },
  8621. "required": false
  8622. }
  8623. ],
  8624. "responses": {
  8625. "200": {
  8626. "description": "Help dialog opened successfully",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "type": "boolean",
  8631. "description": "Help dialog opened successfully"
  8632. }
  8633. }
  8634. }
  8635. },
  8636. "400": {
  8637. "description": "Bad request",
  8638. "content": {
  8639. "application/json": {
  8640. "schema": {
  8641. "$ref": "#/components/schemas/BadRequestError"
  8642. }
  8643. }
  8644. }
  8645. }
  8646. },
  8647. "description": "Open the help dialog in the TUI to display user assistance information.",
  8648. "summary": "Open help dialog",
  8649. "x-codeSamples": [
  8650. {
  8651. "lang": "js",
  8652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8653. }
  8654. ]
  8655. }
  8656. },
  8657. "/tui/open-sessions": {
  8658. "post": {
  8659. "tags": ["tui"],
  8660. "operationId": "tui.openSessions",
  8661. "parameters": [
  8662. {
  8663. "name": "directory",
  8664. "in": "query",
  8665. "schema": {
  8666. "type": "string"
  8667. },
  8668. "required": false
  8669. },
  8670. {
  8671. "name": "workspace",
  8672. "in": "query",
  8673. "schema": {
  8674. "type": "string"
  8675. },
  8676. "required": false
  8677. }
  8678. ],
  8679. "responses": {
  8680. "200": {
  8681. "description": "Session dialog opened successfully",
  8682. "content": {
  8683. "application/json": {
  8684. "schema": {
  8685. "type": "boolean",
  8686. "description": "Session dialog opened successfully"
  8687. }
  8688. }
  8689. }
  8690. },
  8691. "400": {
  8692. "description": "Bad request",
  8693. "content": {
  8694. "application/json": {
  8695. "schema": {
  8696. "$ref": "#/components/schemas/BadRequestError"
  8697. }
  8698. }
  8699. }
  8700. }
  8701. },
  8702. "description": "Open the session dialog.",
  8703. "summary": "Open sessions dialog",
  8704. "x-codeSamples": [
  8705. {
  8706. "lang": "js",
  8707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8708. }
  8709. ]
  8710. }
  8711. },
  8712. "/tui/open-themes": {
  8713. "post": {
  8714. "tags": ["tui"],
  8715. "operationId": "tui.openThemes",
  8716. "parameters": [
  8717. {
  8718. "name": "directory",
  8719. "in": "query",
  8720. "schema": {
  8721. "type": "string"
  8722. },
  8723. "required": false
  8724. },
  8725. {
  8726. "name": "workspace",
  8727. "in": "query",
  8728. "schema": {
  8729. "type": "string"
  8730. },
  8731. "required": false
  8732. }
  8733. ],
  8734. "responses": {
  8735. "200": {
  8736. "description": "Theme dialog opened successfully",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "type": "boolean",
  8741. "description": "Theme dialog opened successfully"
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "400": {
  8747. "description": "Bad request",
  8748. "content": {
  8749. "application/json": {
  8750. "schema": {
  8751. "$ref": "#/components/schemas/BadRequestError"
  8752. }
  8753. }
  8754. }
  8755. }
  8756. },
  8757. "description": "Open the theme dialog.",
  8758. "summary": "Open themes dialog",
  8759. "x-codeSamples": [
  8760. {
  8761. "lang": "js",
  8762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8763. }
  8764. ]
  8765. }
  8766. },
  8767. "/tui/open-models": {
  8768. "post": {
  8769. "tags": ["tui"],
  8770. "operationId": "tui.openModels",
  8771. "parameters": [
  8772. {
  8773. "name": "directory",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. },
  8780. {
  8781. "name": "workspace",
  8782. "in": "query",
  8783. "schema": {
  8784. "type": "string"
  8785. },
  8786. "required": false
  8787. }
  8788. ],
  8789. "responses": {
  8790. "200": {
  8791. "description": "Model dialog opened successfully",
  8792. "content": {
  8793. "application/json": {
  8794. "schema": {
  8795. "type": "boolean",
  8796. "description": "Model dialog opened successfully"
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "Bad request",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/BadRequestError"
  8807. }
  8808. }
  8809. }
  8810. }
  8811. },
  8812. "description": "Open the model dialog.",
  8813. "summary": "Open models dialog",
  8814. "x-codeSamples": [
  8815. {
  8816. "lang": "js",
  8817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8818. }
  8819. ]
  8820. }
  8821. },
  8822. "/tui/submit-prompt": {
  8823. "post": {
  8824. "tags": ["tui"],
  8825. "operationId": "tui.submitPrompt",
  8826. "parameters": [
  8827. {
  8828. "name": "directory",
  8829. "in": "query",
  8830. "schema": {
  8831. "type": "string"
  8832. },
  8833. "required": false
  8834. },
  8835. {
  8836. "name": "workspace",
  8837. "in": "query",
  8838. "schema": {
  8839. "type": "string"
  8840. },
  8841. "required": false
  8842. }
  8843. ],
  8844. "responses": {
  8845. "200": {
  8846. "description": "Prompt submitted successfully",
  8847. "content": {
  8848. "application/json": {
  8849. "schema": {
  8850. "type": "boolean",
  8851. "description": "Prompt submitted successfully"
  8852. }
  8853. }
  8854. }
  8855. },
  8856. "400": {
  8857. "description": "Bad request",
  8858. "content": {
  8859. "application/json": {
  8860. "schema": {
  8861. "$ref": "#/components/schemas/BadRequestError"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "description": "Submit the prompt.",
  8868. "summary": "Submit TUI prompt",
  8869. "x-codeSamples": [
  8870. {
  8871. "lang": "js",
  8872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8873. }
  8874. ]
  8875. }
  8876. },
  8877. "/tui/clear-prompt": {
  8878. "post": {
  8879. "tags": ["tui"],
  8880. "operationId": "tui.clearPrompt",
  8881. "parameters": [
  8882. {
  8883. "name": "directory",
  8884. "in": "query",
  8885. "schema": {
  8886. "type": "string"
  8887. },
  8888. "required": false
  8889. },
  8890. {
  8891. "name": "workspace",
  8892. "in": "query",
  8893. "schema": {
  8894. "type": "string"
  8895. },
  8896. "required": false
  8897. }
  8898. ],
  8899. "responses": {
  8900. "200": {
  8901. "description": "Prompt cleared successfully",
  8902. "content": {
  8903. "application/json": {
  8904. "schema": {
  8905. "type": "boolean",
  8906. "description": "Prompt cleared successfully"
  8907. }
  8908. }
  8909. }
  8910. },
  8911. "400": {
  8912. "description": "Bad request",
  8913. "content": {
  8914. "application/json": {
  8915. "schema": {
  8916. "$ref": "#/components/schemas/BadRequestError"
  8917. }
  8918. }
  8919. }
  8920. }
  8921. },
  8922. "description": "Clear the prompt.",
  8923. "summary": "Clear TUI prompt",
  8924. "x-codeSamples": [
  8925. {
  8926. "lang": "js",
  8927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8928. }
  8929. ]
  8930. }
  8931. },
  8932. "/tui/execute-command": {
  8933. "post": {
  8934. "tags": ["tui"],
  8935. "operationId": "tui.executeCommand",
  8936. "parameters": [
  8937. {
  8938. "name": "directory",
  8939. "in": "query",
  8940. "schema": {
  8941. "type": "string"
  8942. },
  8943. "required": false
  8944. },
  8945. {
  8946. "name": "workspace",
  8947. "in": "query",
  8948. "schema": {
  8949. "type": "string"
  8950. },
  8951. "required": false
  8952. }
  8953. ],
  8954. "responses": {
  8955. "200": {
  8956. "description": "Command executed successfully",
  8957. "content": {
  8958. "application/json": {
  8959. "schema": {
  8960. "type": "boolean",
  8961. "description": "Command executed successfully"
  8962. }
  8963. }
  8964. }
  8965. },
  8966. "400": {
  8967. "description": "BadRequest | InvalidRequestError",
  8968. "content": {
  8969. "application/json": {
  8970. "schema": {
  8971. "anyOf": [
  8972. {
  8973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8974. },
  8975. {
  8976. "$ref": "#/components/schemas/InvalidRequestError"
  8977. }
  8978. ]
  8979. }
  8980. }
  8981. }
  8982. }
  8983. },
  8984. "description": "Execute a TUI command.",
  8985. "summary": "Execute TUI command",
  8986. "requestBody": {
  8987. "content": {
  8988. "application/json": {
  8989. "schema": {
  8990. "type": "object",
  8991. "properties": {
  8992. "command": {
  8993. "type": "string"
  8994. }
  8995. },
  8996. "required": ["command"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/show-toast": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.showToast",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Toast notification shown successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Toast notification shown successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "Bad request",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "$ref": "#/components/schemas/BadRequestError"
  9050. }
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "description": "Show a toast notification in the TUI.",
  9056. "summary": "Show TUI toast",
  9057. "requestBody": {
  9058. "content": {
  9059. "application/json": {
  9060. "schema": {
  9061. "type": "object",
  9062. "properties": {
  9063. "title": {
  9064. "type": "string"
  9065. },
  9066. "message": {
  9067. "type": "string"
  9068. },
  9069. "variant": {
  9070. "type": "string",
  9071. "enum": ["info", "success", "warning", "error"]
  9072. },
  9073. "duration": {
  9074. "type": "integer",
  9075. "exclusiveMinimum": 0
  9076. }
  9077. },
  9078. "required": ["message", "variant"],
  9079. "additionalProperties": false
  9080. }
  9081. }
  9082. }
  9083. },
  9084. "x-codeSamples": [
  9085. {
  9086. "lang": "js",
  9087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9088. }
  9089. ]
  9090. }
  9091. },
  9092. "/tui/publish": {
  9093. "post": {
  9094. "tags": ["tui"],
  9095. "operationId": "tui.publish",
  9096. "parameters": [
  9097. {
  9098. "name": "directory",
  9099. "in": "query",
  9100. "schema": {
  9101. "type": "string"
  9102. },
  9103. "required": false
  9104. },
  9105. {
  9106. "name": "workspace",
  9107. "in": "query",
  9108. "schema": {
  9109. "type": "string"
  9110. },
  9111. "required": false
  9112. }
  9113. ],
  9114. "responses": {
  9115. "200": {
  9116. "description": "Event published successfully",
  9117. "content": {
  9118. "application/json": {
  9119. "schema": {
  9120. "type": "boolean",
  9121. "description": "Event published successfully"
  9122. }
  9123. }
  9124. }
  9125. },
  9126. "400": {
  9127. "description": "BadRequest | InvalidRequestError",
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "anyOf": [
  9132. {
  9133. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9134. },
  9135. {
  9136. "$ref": "#/components/schemas/InvalidRequestError"
  9137. }
  9138. ]
  9139. }
  9140. }
  9141. }
  9142. }
  9143. },
  9144. "description": "Publish a TUI event.",
  9145. "summary": "Publish TUI event",
  9146. "requestBody": {
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "anyOf": [
  9151. {
  9152. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventTuiToastShow"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9162. }
  9163. ]
  9164. }
  9165. }
  9166. }
  9167. },
  9168. "x-codeSamples": [
  9169. {
  9170. "lang": "js",
  9171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9172. }
  9173. ]
  9174. }
  9175. },
  9176. "/tui/select-session": {
  9177. "post": {
  9178. "tags": ["tui"],
  9179. "operationId": "tui.selectSession",
  9180. "parameters": [
  9181. {
  9182. "name": "directory",
  9183. "in": "query",
  9184. "schema": {
  9185. "type": "string"
  9186. },
  9187. "required": false
  9188. },
  9189. {
  9190. "name": "workspace",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. }
  9197. ],
  9198. "responses": {
  9199. "200": {
  9200. "description": "Session selected successfully",
  9201. "content": {
  9202. "application/json": {
  9203. "schema": {
  9204. "type": "boolean",
  9205. "description": "Session selected successfully"
  9206. }
  9207. }
  9208. }
  9209. },
  9210. "400": {
  9211. "description": "BadRequest | InvalidRequestError",
  9212. "content": {
  9213. "application/json": {
  9214. "schema": {
  9215. "anyOf": [
  9216. {
  9217. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9218. },
  9219. {
  9220. "$ref": "#/components/schemas/InvalidRequestError"
  9221. }
  9222. ]
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "404": {
  9228. "description": "NotFoundError",
  9229. "content": {
  9230. "application/json": {
  9231. "schema": {
  9232. "$ref": "#/components/schemas/NotFoundError"
  9233. }
  9234. }
  9235. }
  9236. }
  9237. },
  9238. "description": "Navigate the TUI to display the specified session.",
  9239. "summary": "Select session",
  9240. "requestBody": {
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "object",
  9245. "properties": {
  9246. "sessionID": {
  9247. "type": "string",
  9248. "pattern": "^ses",
  9249. "description": "Session ID to navigate to"
  9250. }
  9251. },
  9252. "required": ["sessionID"],
  9253. "additionalProperties": false
  9254. }
  9255. }
  9256. }
  9257. },
  9258. "x-codeSamples": [
  9259. {
  9260. "lang": "js",
  9261. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9262. }
  9263. ]
  9264. }
  9265. },
  9266. "/tui/control/next": {
  9267. "get": {
  9268. "tags": ["tui"],
  9269. "operationId": "tui.control.next",
  9270. "parameters": [
  9271. {
  9272. "name": "directory",
  9273. "in": "query",
  9274. "schema": {
  9275. "type": "string"
  9276. },
  9277. "required": false
  9278. },
  9279. {
  9280. "name": "workspace",
  9281. "in": "query",
  9282. "schema": {
  9283. "type": "string"
  9284. },
  9285. "required": false
  9286. }
  9287. ],
  9288. "responses": {
  9289. "200": {
  9290. "description": "Next TUI request",
  9291. "content": {
  9292. "application/json": {
  9293. "schema": {
  9294. "type": "object",
  9295. "properties": {
  9296. "path": {
  9297. "type": "string"
  9298. },
  9299. "body": {}
  9300. },
  9301. "required": ["path", "body"],
  9302. "additionalProperties": false,
  9303. "description": "Next TUI request"
  9304. }
  9305. }
  9306. }
  9307. },
  9308. "400": {
  9309. "description": "Bad request",
  9310. "content": {
  9311. "application/json": {
  9312. "schema": {
  9313. "$ref": "#/components/schemas/BadRequestError"
  9314. }
  9315. }
  9316. }
  9317. }
  9318. },
  9319. "description": "Retrieve the next TUI request from the queue for processing.",
  9320. "summary": "Get next TUI request",
  9321. "x-codeSamples": [
  9322. {
  9323. "lang": "js",
  9324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9325. }
  9326. ]
  9327. }
  9328. },
  9329. "/tui/control/response": {
  9330. "post": {
  9331. "tags": ["tui"],
  9332. "operationId": "tui.control.response",
  9333. "parameters": [
  9334. {
  9335. "name": "directory",
  9336. "in": "query",
  9337. "schema": {
  9338. "type": "string"
  9339. },
  9340. "required": false
  9341. },
  9342. {
  9343. "name": "workspace",
  9344. "in": "query",
  9345. "schema": {
  9346. "type": "string"
  9347. },
  9348. "required": false
  9349. }
  9350. ],
  9351. "responses": {
  9352. "200": {
  9353. "description": "Response submitted successfully",
  9354. "content": {
  9355. "application/json": {
  9356. "schema": {
  9357. "type": "boolean",
  9358. "description": "Response submitted successfully"
  9359. }
  9360. }
  9361. }
  9362. },
  9363. "400": {
  9364. "description": "Bad request",
  9365. "content": {
  9366. "application/json": {
  9367. "schema": {
  9368. "$ref": "#/components/schemas/BadRequestError"
  9369. }
  9370. }
  9371. }
  9372. }
  9373. },
  9374. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9375. "summary": "Submit TUI response",
  9376. "requestBody": {
  9377. "content": {
  9378. "application/json": {
  9379. "schema": {}
  9380. }
  9381. }
  9382. },
  9383. "x-codeSamples": [
  9384. {
  9385. "lang": "js",
  9386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9387. }
  9388. ]
  9389. }
  9390. },
  9391. "/experimental/workspace/adapter": {
  9392. "get": {
  9393. "tags": ["workspace"],
  9394. "operationId": "experimental.workspace.adapter.list",
  9395. "parameters": [
  9396. {
  9397. "name": "directory",
  9398. "in": "query",
  9399. "schema": {
  9400. "type": "string"
  9401. },
  9402. "required": false
  9403. },
  9404. {
  9405. "name": "workspace",
  9406. "in": "query",
  9407. "schema": {
  9408. "type": "string"
  9409. },
  9410. "required": false
  9411. }
  9412. ],
  9413. "responses": {
  9414. "200": {
  9415. "description": "Workspace adapters",
  9416. "content": {
  9417. "application/json": {
  9418. "schema": {
  9419. "type": "array",
  9420. "items": {
  9421. "type": "object",
  9422. "properties": {
  9423. "type": {
  9424. "type": "string"
  9425. },
  9426. "name": {
  9427. "type": "string"
  9428. },
  9429. "description": {
  9430. "type": "string"
  9431. }
  9432. },
  9433. "required": ["type", "name", "description"],
  9434. "additionalProperties": false
  9435. },
  9436. "description": "Workspace adapters"
  9437. }
  9438. }
  9439. }
  9440. },
  9441. "400": {
  9442. "description": "Bad request",
  9443. "content": {
  9444. "application/json": {
  9445. "schema": {
  9446. "$ref": "#/components/schemas/BadRequestError"
  9447. }
  9448. }
  9449. }
  9450. }
  9451. },
  9452. "description": "List all available workspace adapters for the current project.",
  9453. "summary": "List workspace adapters",
  9454. "x-codeSamples": [
  9455. {
  9456. "lang": "js",
  9457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9458. }
  9459. ]
  9460. }
  9461. },
  9462. "/experimental/workspace": {
  9463. "get": {
  9464. "tags": ["workspace"],
  9465. "operationId": "experimental.workspace.list",
  9466. "parameters": [
  9467. {
  9468. "name": "directory",
  9469. "in": "query",
  9470. "schema": {
  9471. "type": "string"
  9472. },
  9473. "required": false
  9474. },
  9475. {
  9476. "name": "workspace",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. }
  9483. ],
  9484. "responses": {
  9485. "200": {
  9486. "description": "Workspaces",
  9487. "content": {
  9488. "application/json": {
  9489. "schema": {
  9490. "type": "array",
  9491. "items": {
  9492. "$ref": "#/components/schemas/Workspace"
  9493. },
  9494. "description": "Workspaces"
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "400": {
  9500. "description": "Bad request",
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "$ref": "#/components/schemas/BadRequestError"
  9505. }
  9506. }
  9507. }
  9508. }
  9509. },
  9510. "description": "List all workspaces.",
  9511. "summary": "List workspaces",
  9512. "x-codeSamples": [
  9513. {
  9514. "lang": "js",
  9515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9516. }
  9517. ]
  9518. },
  9519. "post": {
  9520. "tags": ["workspace"],
  9521. "operationId": "experimental.workspace.create",
  9522. "parameters": [
  9523. {
  9524. "name": "directory",
  9525. "in": "query",
  9526. "schema": {
  9527. "type": "string"
  9528. },
  9529. "required": false
  9530. },
  9531. {
  9532. "name": "workspace",
  9533. "in": "query",
  9534. "schema": {
  9535. "type": "string"
  9536. },
  9537. "required": false
  9538. }
  9539. ],
  9540. "responses": {
  9541. "200": {
  9542. "description": "Workspace created",
  9543. "content": {
  9544. "application/json": {
  9545. "schema": {
  9546. "$ref": "#/components/schemas/Workspace"
  9547. }
  9548. }
  9549. }
  9550. },
  9551. "400": {
  9552. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "anyOf": [
  9557. {
  9558. "$ref": "#/components/schemas/WorkspaceCreateError"
  9559. },
  9560. {
  9561. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9562. },
  9563. {
  9564. "$ref": "#/components/schemas/InvalidRequestError"
  9565. }
  9566. ]
  9567. }
  9568. }
  9569. }
  9570. }
  9571. },
  9572. "description": "Create a workspace for the current project.",
  9573. "summary": "Create workspace",
  9574. "requestBody": {
  9575. "content": {
  9576. "application/json": {
  9577. "schema": {
  9578. "type": "object",
  9579. "properties": {
  9580. "id": {
  9581. "type": "string",
  9582. "pattern": "^wrk"
  9583. },
  9584. "type": {
  9585. "type": "string"
  9586. },
  9587. "branch": {
  9588. "anyOf": [
  9589. {
  9590. "type": "string"
  9591. },
  9592. {
  9593. "type": "null"
  9594. }
  9595. ]
  9596. },
  9597. "extra": {
  9598. "anyOf": [
  9599. {},
  9600. {
  9601. "type": "null"
  9602. }
  9603. ]
  9604. }
  9605. },
  9606. "required": ["type"],
  9607. "additionalProperties": false
  9608. }
  9609. }
  9610. }
  9611. },
  9612. "x-codeSamples": [
  9613. {
  9614. "lang": "js",
  9615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9616. }
  9617. ]
  9618. }
  9619. },
  9620. "/experimental/workspace/sync-list": {
  9621. "post": {
  9622. "tags": ["workspace"],
  9623. "operationId": "experimental.workspace.syncList",
  9624. "parameters": [
  9625. {
  9626. "name": "directory",
  9627. "in": "query",
  9628. "schema": {
  9629. "type": "string"
  9630. },
  9631. "required": false
  9632. },
  9633. {
  9634. "name": "workspace",
  9635. "in": "query",
  9636. "schema": {
  9637. "type": "string"
  9638. },
  9639. "required": false
  9640. }
  9641. ],
  9642. "responses": {
  9643. "204": {
  9644. "description": "Workspace list synced"
  9645. },
  9646. "400": {
  9647. "description": "Bad request",
  9648. "content": {
  9649. "application/json": {
  9650. "schema": {
  9651. "$ref": "#/components/schemas/BadRequestError"
  9652. }
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "description": "Register missing workspaces returned by workspace adapters.",
  9658. "summary": "Sync workspace list",
  9659. "x-codeSamples": [
  9660. {
  9661. "lang": "js",
  9662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9663. }
  9664. ]
  9665. }
  9666. },
  9667. "/experimental/workspace/status": {
  9668. "get": {
  9669. "tags": ["workspace"],
  9670. "operationId": "experimental.workspace.status",
  9671. "parameters": [
  9672. {
  9673. "name": "directory",
  9674. "in": "query",
  9675. "schema": {
  9676. "type": "string"
  9677. },
  9678. "required": false
  9679. },
  9680. {
  9681. "name": "workspace",
  9682. "in": "query",
  9683. "schema": {
  9684. "type": "string"
  9685. },
  9686. "required": false
  9687. }
  9688. ],
  9689. "responses": {
  9690. "200": {
  9691. "description": "Workspace status",
  9692. "content": {
  9693. "application/json": {
  9694. "schema": {
  9695. "type": "array",
  9696. "items": {
  9697. "type": "object",
  9698. "properties": {
  9699. "workspaceID": {
  9700. "type": "string",
  9701. "pattern": "^wrk"
  9702. },
  9703. "status": {
  9704. "type": "string",
  9705. "enum": ["connected", "connecting", "disconnected", "error"]
  9706. }
  9707. },
  9708. "required": ["workspaceID", "status"],
  9709. "additionalProperties": false
  9710. },
  9711. "description": "Workspace status"
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "400": {
  9717. "description": "Bad request",
  9718. "content": {
  9719. "application/json": {
  9720. "schema": {
  9721. "$ref": "#/components/schemas/BadRequestError"
  9722. }
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "description": "Get connection status for workspaces in the current project.",
  9728. "summary": "Workspace status",
  9729. "x-codeSamples": [
  9730. {
  9731. "lang": "js",
  9732. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9733. }
  9734. ]
  9735. }
  9736. },
  9737. "/experimental/workspace/{id}": {
  9738. "delete": {
  9739. "tags": ["workspace"],
  9740. "operationId": "experimental.workspace.remove",
  9741. "parameters": [
  9742. {
  9743. "name": "id",
  9744. "in": "path",
  9745. "schema": {
  9746. "type": "string",
  9747. "pattern": "^wrk"
  9748. },
  9749. "required": true
  9750. },
  9751. {
  9752. "name": "directory",
  9753. "in": "query",
  9754. "schema": {
  9755. "type": "string"
  9756. },
  9757. "required": false
  9758. },
  9759. {
  9760. "name": "workspace",
  9761. "in": "query",
  9762. "schema": {
  9763. "type": "string"
  9764. },
  9765. "required": false
  9766. }
  9767. ],
  9768. "responses": {
  9769. "200": {
  9770. "description": "Workspace removed",
  9771. "content": {
  9772. "application/json": {
  9773. "schema": {
  9774. "$ref": "#/components/schemas/Workspace"
  9775. }
  9776. }
  9777. }
  9778. },
  9779. "400": {
  9780. "description": "BadRequest | InvalidRequestError",
  9781. "content": {
  9782. "application/json": {
  9783. "schema": {
  9784. "anyOf": [
  9785. {
  9786. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9787. },
  9788. {
  9789. "$ref": "#/components/schemas/InvalidRequestError"
  9790. }
  9791. ]
  9792. }
  9793. }
  9794. }
  9795. }
  9796. },
  9797. "description": "Remove an existing workspace.",
  9798. "summary": "Remove workspace",
  9799. "x-codeSamples": [
  9800. {
  9801. "lang": "js",
  9802. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9803. }
  9804. ]
  9805. }
  9806. },
  9807. "/experimental/workspace/warp": {
  9808. "post": {
  9809. "tags": ["workspace"],
  9810. "operationId": "experimental.workspace.warp",
  9811. "parameters": [
  9812. {
  9813. "name": "directory",
  9814. "in": "query",
  9815. "schema": {
  9816. "type": "string"
  9817. },
  9818. "required": false
  9819. },
  9820. {
  9821. "name": "workspace",
  9822. "in": "query",
  9823. "schema": {
  9824. "type": "string"
  9825. },
  9826. "required": false
  9827. }
  9828. ],
  9829. "responses": {
  9830. "204": {
  9831. "description": "Session warped"
  9832. },
  9833. "400": {
  9834. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9835. "content": {
  9836. "application/json": {
  9837. "schema": {
  9838. "anyOf": [
  9839. {
  9840. "$ref": "#/components/schemas/WorkspaceWarpError"
  9841. },
  9842. {
  9843. "$ref": "#/components/schemas/VcsApplyError"
  9844. },
  9845. {
  9846. "$ref": "#/components/schemas/InvalidRequestError"
  9847. }
  9848. ]
  9849. }
  9850. }
  9851. }
  9852. },
  9853. "404": {
  9854. "description": "NotFoundError",
  9855. "content": {
  9856. "application/json": {
  9857. "schema": {
  9858. "$ref": "#/components/schemas/NotFoundError"
  9859. }
  9860. }
  9861. }
  9862. }
  9863. },
  9864. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9865. "summary": "Warp session into workspace",
  9866. "requestBody": {
  9867. "content": {
  9868. "application/json": {
  9869. "schema": {
  9870. "type": "object",
  9871. "properties": {
  9872. "id": {
  9873. "anyOf": [
  9874. {
  9875. "type": "string",
  9876. "pattern": "^wrk"
  9877. },
  9878. {
  9879. "type": "null"
  9880. }
  9881. ]
  9882. },
  9883. "sessionID": {
  9884. "type": "string",
  9885. "pattern": "^ses"
  9886. },
  9887. "copyChanges": {
  9888. "type": "boolean"
  9889. }
  9890. },
  9891. "required": ["id", "sessionID"],
  9892. "additionalProperties": false
  9893. }
  9894. }
  9895. }
  9896. },
  9897. "x-codeSamples": [
  9898. {
  9899. "lang": "js",
  9900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9901. }
  9902. ]
  9903. }
  9904. },
  9905. "/api/health": {
  9906. "get": {
  9907. "tags": ["opencode HttpApi"],
  9908. "operationId": "v2.health.get",
  9909. "parameters": [],
  9910. "security": [],
  9911. "responses": {
  9912. "200": {
  9913. "description": "Success",
  9914. "content": {
  9915. "application/json": {
  9916. "schema": {
  9917. "type": "object",
  9918. "properties": {
  9919. "healthy": {
  9920. "type": "boolean",
  9921. "enum": [true]
  9922. }
  9923. },
  9924. "required": ["healthy"],
  9925. "additionalProperties": false
  9926. }
  9927. }
  9928. }
  9929. },
  9930. "400": {
  9931. "description": "InvalidRequestError",
  9932. "content": {
  9933. "application/json": {
  9934. "schema": {
  9935. "$ref": "#/components/schemas/InvalidRequestError"
  9936. }
  9937. }
  9938. }
  9939. },
  9940. "401": {
  9941. "description": "UnauthorizedError",
  9942. "content": {
  9943. "application/json": {
  9944. "schema": {
  9945. "$ref": "#/components/schemas/UnauthorizedError"
  9946. }
  9947. }
  9948. }
  9949. }
  9950. },
  9951. "description": "Check whether the API server is ready to accept requests.",
  9952. "summary": "Check server health",
  9953. "x-codeSamples": [
  9954. {
  9955. "lang": "js",
  9956. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9957. }
  9958. ]
  9959. }
  9960. },
  9961. "/api/agent": {
  9962. "get": {
  9963. "tags": ["opencode HttpApi"],
  9964. "operationId": "v2.agent.list",
  9965. "parameters": [
  9966. {
  9967. "name": "location",
  9968. "in": "query",
  9969. "schema": {
  9970. "type": "object",
  9971. "properties": {
  9972. "directory": {
  9973. "type": "string"
  9974. },
  9975. "workspace": {
  9976. "type": "string"
  9977. }
  9978. },
  9979. "additionalProperties": false
  9980. },
  9981. "required": false,
  9982. "style": "deepObject",
  9983. "explode": true
  9984. }
  9985. ],
  9986. "security": [],
  9987. "responses": {
  9988. "200": {
  9989. "description": "Success",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "type": "object",
  9994. "properties": {
  9995. "location": {
  9996. "$ref": "#/components/schemas/LocationInfo"
  9997. },
  9998. "data": {
  9999. "type": "array",
  10000. "items": {
  10001. "$ref": "#/components/schemas/AgentV2Info"
  10002. }
  10003. }
  10004. },
  10005. "required": ["location", "data"],
  10006. "additionalProperties": false
  10007. }
  10008. }
  10009. }
  10010. },
  10011. "400": {
  10012. "description": "InvalidRequestError",
  10013. "content": {
  10014. "application/json": {
  10015. "schema": {
  10016. "$ref": "#/components/schemas/InvalidRequestError"
  10017. }
  10018. }
  10019. }
  10020. },
  10021. "401": {
  10022. "description": "UnauthorizedError",
  10023. "content": {
  10024. "application/json": {
  10025. "schema": {
  10026. "$ref": "#/components/schemas/UnauthorizedError"
  10027. }
  10028. }
  10029. }
  10030. }
  10031. },
  10032. "description": "Retrieve currently registered agents.",
  10033. "summary": "List agents",
  10034. "x-codeSamples": [
  10035. {
  10036. "lang": "js",
  10037. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10038. }
  10039. ]
  10040. }
  10041. },
  10042. "/api/session": {
  10043. "get": {
  10044. "tags": ["sessions"],
  10045. "operationId": "v2.session.list",
  10046. "parameters": [
  10047. {
  10048. "name": "workspace",
  10049. "in": "query",
  10050. "schema": {
  10051. "type": "string",
  10052. "pattern": "^wrk"
  10053. },
  10054. "required": false
  10055. },
  10056. {
  10057. "name": "limit",
  10058. "in": "query",
  10059. "schema": {
  10060. "type": "number"
  10061. },
  10062. "required": false
  10063. },
  10064. {
  10065. "name": "order",
  10066. "in": "query",
  10067. "schema": {
  10068. "type": "string",
  10069. "enum": ["asc", "desc"]
  10070. },
  10071. "required": false
  10072. },
  10073. {
  10074. "name": "search",
  10075. "in": "query",
  10076. "schema": {
  10077. "type": "string"
  10078. },
  10079. "required": false
  10080. },
  10081. {
  10082. "name": "directory",
  10083. "in": "query",
  10084. "schema": {
  10085. "type": "string"
  10086. },
  10087. "required": false
  10088. },
  10089. {
  10090. "name": "project",
  10091. "in": "query",
  10092. "schema": {
  10093. "type": "string"
  10094. },
  10095. "required": false
  10096. },
  10097. {
  10098. "name": "subpath",
  10099. "in": "query",
  10100. "schema": {
  10101. "type": "string"
  10102. },
  10103. "required": false
  10104. },
  10105. {
  10106. "name": "cursor",
  10107. "in": "query",
  10108. "schema": {
  10109. "type": "string",
  10110. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10111. },
  10112. "required": false
  10113. }
  10114. ],
  10115. "security": [],
  10116. "responses": {
  10117. "200": {
  10118. "description": "SessionsResponse",
  10119. "content": {
  10120. "application/json": {
  10121. "schema": {
  10122. "$ref": "#/components/schemas/SessionsResponse"
  10123. }
  10124. }
  10125. }
  10126. },
  10127. "400": {
  10128. "description": "InvalidCursorError | InvalidRequestError",
  10129. "content": {
  10130. "application/json": {
  10131. "schema": {
  10132. "anyOf": [
  10133. {
  10134. "$ref": "#/components/schemas/InvalidCursorError"
  10135. },
  10136. {
  10137. "$ref": "#/components/schemas/InvalidRequestError"
  10138. },
  10139. {
  10140. "$ref": "#/components/schemas/InvalidRequestError"
  10141. }
  10142. ]
  10143. }
  10144. }
  10145. }
  10146. },
  10147. "401": {
  10148. "description": "UnauthorizedError",
  10149. "content": {
  10150. "application/json": {
  10151. "schema": {
  10152. "$ref": "#/components/schemas/UnauthorizedError"
  10153. }
  10154. }
  10155. }
  10156. }
  10157. },
  10158. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10159. "summary": "List sessions",
  10160. "x-codeSamples": [
  10161. {
  10162. "lang": "js",
  10163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10164. }
  10165. ]
  10166. }
  10167. },
  10168. "/api/session/{sessionID}/prompt": {
  10169. "post": {
  10170. "tags": ["sessions"],
  10171. "operationId": "v2.session.prompt",
  10172. "parameters": [
  10173. {
  10174. "name": "sessionID",
  10175. "in": "path",
  10176. "schema": {
  10177. "type": "string",
  10178. "pattern": "^ses"
  10179. },
  10180. "required": true
  10181. }
  10182. ],
  10183. "security": [],
  10184. "responses": {
  10185. "200": {
  10186. "description": "Success",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "type": "object",
  10191. "properties": {
  10192. "data": {
  10193. "$ref": "#/components/schemas/SessionInputAdmitted"
  10194. }
  10195. },
  10196. "required": ["data"],
  10197. "additionalProperties": false
  10198. }
  10199. }
  10200. }
  10201. },
  10202. "400": {
  10203. "description": "InvalidRequestError",
  10204. "content": {
  10205. "application/json": {
  10206. "schema": {
  10207. "$ref": "#/components/schemas/InvalidRequestError"
  10208. }
  10209. }
  10210. }
  10211. },
  10212. "401": {
  10213. "description": "UnauthorizedError",
  10214. "content": {
  10215. "application/json": {
  10216. "schema": {
  10217. "$ref": "#/components/schemas/UnauthorizedError"
  10218. }
  10219. }
  10220. }
  10221. },
  10222. "404": {
  10223. "description": "SessionNotFoundError",
  10224. "content": {
  10225. "application/json": {
  10226. "schema": {
  10227. "anyOf": [
  10228. {
  10229. "$ref": "#/components/schemas/SessionNotFoundError"
  10230. },
  10231. {
  10232. "$ref": "#/components/schemas/SessionNotFoundError"
  10233. }
  10234. ]
  10235. }
  10236. }
  10237. }
  10238. },
  10239. "409": {
  10240. "description": "ConflictError",
  10241. "content": {
  10242. "application/json": {
  10243. "schema": {
  10244. "$ref": "#/components/schemas/ConflictError"
  10245. }
  10246. }
  10247. }
  10248. }
  10249. },
  10250. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10251. "summary": "Send message",
  10252. "requestBody": {
  10253. "content": {
  10254. "application/json": {
  10255. "schema": {
  10256. "type": "object",
  10257. "properties": {
  10258. "id": {
  10259. "type": "string",
  10260. "pattern": "^msg_"
  10261. },
  10262. "prompt": {
  10263. "$ref": "#/components/schemas/Prompt"
  10264. },
  10265. "delivery": {
  10266. "type": "string",
  10267. "enum": ["steer", "queue"]
  10268. },
  10269. "resume": {
  10270. "type": "boolean"
  10271. }
  10272. },
  10273. "required": ["prompt"],
  10274. "additionalProperties": false
  10275. }
  10276. }
  10277. },
  10278. "required": true
  10279. },
  10280. "x-codeSamples": [
  10281. {
  10282. "lang": "js",
  10283. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10284. }
  10285. ]
  10286. }
  10287. },
  10288. "/api/session/{sessionID}/compact": {
  10289. "post": {
  10290. "tags": ["sessions"],
  10291. "operationId": "v2.session.compact",
  10292. "parameters": [
  10293. {
  10294. "name": "sessionID",
  10295. "in": "path",
  10296. "schema": {
  10297. "type": "string",
  10298. "pattern": "^ses"
  10299. },
  10300. "required": true
  10301. }
  10302. ],
  10303. "security": [],
  10304. "responses": {
  10305. "204": {
  10306. "description": "<No Content>"
  10307. },
  10308. "400": {
  10309. "description": "InvalidRequestError",
  10310. "content": {
  10311. "application/json": {
  10312. "schema": {
  10313. "$ref": "#/components/schemas/InvalidRequestError"
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "401": {
  10319. "description": "UnauthorizedError",
  10320. "content": {
  10321. "application/json": {
  10322. "schema": {
  10323. "$ref": "#/components/schemas/UnauthorizedError"
  10324. }
  10325. }
  10326. }
  10327. },
  10328. "404": {
  10329. "description": "SessionNotFoundError",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "anyOf": [
  10334. {
  10335. "$ref": "#/components/schemas/SessionNotFoundError"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/SessionNotFoundError"
  10339. }
  10340. ]
  10341. }
  10342. }
  10343. }
  10344. },
  10345. "503": {
  10346. "description": "ServiceUnavailableError",
  10347. "content": {
  10348. "application/json": {
  10349. "schema": {
  10350. "$ref": "#/components/schemas/ServiceUnavailableError"
  10351. }
  10352. }
  10353. }
  10354. }
  10355. },
  10356. "description": "Compact a session conversation.",
  10357. "summary": "Compact session",
  10358. "x-codeSamples": [
  10359. {
  10360. "lang": "js",
  10361. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10362. }
  10363. ]
  10364. }
  10365. },
  10366. "/api/session/{sessionID}/wait": {
  10367. "post": {
  10368. "tags": ["sessions"],
  10369. "operationId": "v2.session.wait",
  10370. "parameters": [
  10371. {
  10372. "name": "sessionID",
  10373. "in": "path",
  10374. "schema": {
  10375. "type": "string",
  10376. "pattern": "^ses"
  10377. },
  10378. "required": true
  10379. }
  10380. ],
  10381. "security": [],
  10382. "responses": {
  10383. "204": {
  10384. "description": "<No Content>"
  10385. },
  10386. "400": {
  10387. "description": "InvalidRequestError",
  10388. "content": {
  10389. "application/json": {
  10390. "schema": {
  10391. "$ref": "#/components/schemas/InvalidRequestError"
  10392. }
  10393. }
  10394. }
  10395. },
  10396. "401": {
  10397. "description": "UnauthorizedError",
  10398. "content": {
  10399. "application/json": {
  10400. "schema": {
  10401. "$ref": "#/components/schemas/UnauthorizedError"
  10402. }
  10403. }
  10404. }
  10405. },
  10406. "404": {
  10407. "description": "SessionNotFoundError",
  10408. "content": {
  10409. "application/json": {
  10410. "schema": {
  10411. "anyOf": [
  10412. {
  10413. "$ref": "#/components/schemas/SessionNotFoundError"
  10414. },
  10415. {
  10416. "$ref": "#/components/schemas/SessionNotFoundError"
  10417. }
  10418. ]
  10419. }
  10420. }
  10421. }
  10422. },
  10423. "503": {
  10424. "description": "ServiceUnavailableError",
  10425. "content": {
  10426. "application/json": {
  10427. "schema": {
  10428. "$ref": "#/components/schemas/ServiceUnavailableError"
  10429. }
  10430. }
  10431. }
  10432. }
  10433. },
  10434. "description": "Wait for a session agent loop to become idle.",
  10435. "summary": "Wait for session",
  10436. "x-codeSamples": [
  10437. {
  10438. "lang": "js",
  10439. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10440. }
  10441. ]
  10442. }
  10443. },
  10444. "/api/session/{sessionID}/context": {
  10445. "get": {
  10446. "tags": ["sessions"],
  10447. "operationId": "v2.session.context",
  10448. "parameters": [
  10449. {
  10450. "name": "sessionID",
  10451. "in": "path",
  10452. "schema": {
  10453. "type": "string",
  10454. "pattern": "^ses"
  10455. },
  10456. "required": true
  10457. }
  10458. ],
  10459. "security": [],
  10460. "responses": {
  10461. "200": {
  10462. "description": "Success",
  10463. "content": {
  10464. "application/json": {
  10465. "schema": {
  10466. "type": "object",
  10467. "properties": {
  10468. "data": {
  10469. "type": "array",
  10470. "items": {
  10471. "$ref": "#/components/schemas/SessionMessage"
  10472. }
  10473. }
  10474. },
  10475. "required": ["data"],
  10476. "additionalProperties": false
  10477. }
  10478. }
  10479. }
  10480. },
  10481. "400": {
  10482. "description": "InvalidRequestError",
  10483. "content": {
  10484. "application/json": {
  10485. "schema": {
  10486. "$ref": "#/components/schemas/InvalidRequestError"
  10487. }
  10488. }
  10489. }
  10490. },
  10491. "401": {
  10492. "description": "UnauthorizedError",
  10493. "content": {
  10494. "application/json": {
  10495. "schema": {
  10496. "$ref": "#/components/schemas/UnauthorizedError"
  10497. }
  10498. }
  10499. }
  10500. },
  10501. "404": {
  10502. "description": "SessionNotFoundError",
  10503. "content": {
  10504. "application/json": {
  10505. "schema": {
  10506. "anyOf": [
  10507. {
  10508. "$ref": "#/components/schemas/SessionNotFoundError"
  10509. },
  10510. {
  10511. "$ref": "#/components/schemas/SessionNotFoundError"
  10512. }
  10513. ]
  10514. }
  10515. }
  10516. }
  10517. },
  10518. "500": {
  10519. "description": "UnknownError",
  10520. "content": {
  10521. "application/json": {
  10522. "schema": {
  10523. "$ref": "#/components/schemas/UnknownError1"
  10524. }
  10525. }
  10526. }
  10527. }
  10528. },
  10529. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10530. "summary": "Get session context",
  10531. "x-codeSamples": [
  10532. {
  10533. "lang": "js",
  10534. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10535. }
  10536. ]
  10537. }
  10538. },
  10539. "/api/session/{sessionID}/message": {
  10540. "get": {
  10541. "tags": ["messages"],
  10542. "operationId": "v2.session.messages",
  10543. "parameters": [
  10544. {
  10545. "name": "sessionID",
  10546. "in": "path",
  10547. "schema": {
  10548. "type": "string",
  10549. "pattern": "^ses"
  10550. },
  10551. "required": true
  10552. },
  10553. {
  10554. "name": "limit",
  10555. "in": "query",
  10556. "schema": {
  10557. "type": "number"
  10558. },
  10559. "required": false
  10560. },
  10561. {
  10562. "name": "order",
  10563. "in": "query",
  10564. "schema": {
  10565. "type": "string",
  10566. "enum": ["asc", "desc"]
  10567. },
  10568. "required": false
  10569. },
  10570. {
  10571. "name": "cursor",
  10572. "in": "query",
  10573. "schema": {
  10574. "type": "string",
  10575. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10576. },
  10577. "required": false
  10578. }
  10579. ],
  10580. "security": [],
  10581. "responses": {
  10582. "200": {
  10583. "description": "SessionMessagesResponse",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/SessionMessagesResponse"
  10588. }
  10589. }
  10590. }
  10591. },
  10592. "400": {
  10593. "description": "InvalidCursorError | InvalidRequestError",
  10594. "content": {
  10595. "application/json": {
  10596. "schema": {
  10597. "anyOf": [
  10598. {
  10599. "$ref": "#/components/schemas/InvalidCursorError"
  10600. },
  10601. {
  10602. "$ref": "#/components/schemas/InvalidRequestError"
  10603. }
  10604. ]
  10605. }
  10606. }
  10607. }
  10608. },
  10609. "401": {
  10610. "description": "UnauthorizedError",
  10611. "content": {
  10612. "application/json": {
  10613. "schema": {
  10614. "$ref": "#/components/schemas/UnauthorizedError"
  10615. }
  10616. }
  10617. }
  10618. },
  10619. "404": {
  10620. "description": "SessionNotFoundError",
  10621. "content": {
  10622. "application/json": {
  10623. "schema": {
  10624. "anyOf": [
  10625. {
  10626. "$ref": "#/components/schemas/SessionNotFoundError"
  10627. },
  10628. {
  10629. "$ref": "#/components/schemas/SessionNotFoundError"
  10630. }
  10631. ]
  10632. }
  10633. }
  10634. }
  10635. },
  10636. "500": {
  10637. "description": "UnknownError",
  10638. "content": {
  10639. "application/json": {
  10640. "schema": {
  10641. "$ref": "#/components/schemas/UnknownError1"
  10642. }
  10643. }
  10644. }
  10645. }
  10646. },
  10647. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10648. "summary": "Get session messages",
  10649. "x-codeSamples": [
  10650. {
  10651. "lang": "js",
  10652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10653. }
  10654. ]
  10655. }
  10656. },
  10657. "/api/model": {
  10658. "get": {
  10659. "tags": ["models"],
  10660. "operationId": "v2.model.list",
  10661. "parameters": [
  10662. {
  10663. "name": "location",
  10664. "in": "query",
  10665. "schema": {
  10666. "type": "object",
  10667. "properties": {
  10668. "directory": {
  10669. "type": "string"
  10670. },
  10671. "workspace": {
  10672. "type": "string"
  10673. }
  10674. },
  10675. "additionalProperties": false
  10676. },
  10677. "required": false,
  10678. "style": "deepObject",
  10679. "explode": true
  10680. }
  10681. ],
  10682. "security": [],
  10683. "responses": {
  10684. "200": {
  10685. "description": "Success",
  10686. "content": {
  10687. "application/json": {
  10688. "schema": {
  10689. "type": "object",
  10690. "properties": {
  10691. "location": {
  10692. "$ref": "#/components/schemas/LocationInfo"
  10693. },
  10694. "data": {
  10695. "type": "array",
  10696. "items": {
  10697. "$ref": "#/components/schemas/ModelV2Info"
  10698. }
  10699. }
  10700. },
  10701. "required": ["location", "data"],
  10702. "additionalProperties": false
  10703. }
  10704. }
  10705. }
  10706. },
  10707. "400": {
  10708. "description": "InvalidRequestError",
  10709. "content": {
  10710. "application/json": {
  10711. "schema": {
  10712. "$ref": "#/components/schemas/InvalidRequestError"
  10713. }
  10714. }
  10715. }
  10716. },
  10717. "401": {
  10718. "description": "UnauthorizedError",
  10719. "content": {
  10720. "application/json": {
  10721. "schema": {
  10722. "$ref": "#/components/schemas/UnauthorizedError"
  10723. }
  10724. }
  10725. }
  10726. },
  10727. "503": {
  10728. "description": "ServiceUnavailableError",
  10729. "content": {
  10730. "application/json": {
  10731. "schema": {
  10732. "$ref": "#/components/schemas/ServiceUnavailableError"
  10733. }
  10734. }
  10735. }
  10736. }
  10737. },
  10738. "description": "Retrieve available models ordered by release date.",
  10739. "summary": "List models",
  10740. "x-codeSamples": [
  10741. {
  10742. "lang": "js",
  10743. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10744. }
  10745. ]
  10746. }
  10747. },
  10748. "/api/provider": {
  10749. "get": {
  10750. "tags": ["providers"],
  10751. "operationId": "v2.provider.list",
  10752. "parameters": [
  10753. {
  10754. "name": "location",
  10755. "in": "query",
  10756. "schema": {
  10757. "type": "object",
  10758. "properties": {
  10759. "directory": {
  10760. "type": "string"
  10761. },
  10762. "workspace": {
  10763. "type": "string"
  10764. }
  10765. },
  10766. "additionalProperties": false
  10767. },
  10768. "required": false,
  10769. "style": "deepObject",
  10770. "explode": true
  10771. }
  10772. ],
  10773. "security": [],
  10774. "responses": {
  10775. "200": {
  10776. "description": "Success",
  10777. "content": {
  10778. "application/json": {
  10779. "schema": {
  10780. "type": "object",
  10781. "properties": {
  10782. "location": {
  10783. "$ref": "#/components/schemas/LocationInfo"
  10784. },
  10785. "data": {
  10786. "type": "array",
  10787. "items": {
  10788. "$ref": "#/components/schemas/ProviderV2Info"
  10789. }
  10790. }
  10791. },
  10792. "required": ["location", "data"],
  10793. "additionalProperties": false
  10794. }
  10795. }
  10796. }
  10797. },
  10798. "400": {
  10799. "description": "InvalidRequestError",
  10800. "content": {
  10801. "application/json": {
  10802. "schema": {
  10803. "$ref": "#/components/schemas/InvalidRequestError"
  10804. }
  10805. }
  10806. }
  10807. },
  10808. "401": {
  10809. "description": "UnauthorizedError",
  10810. "content": {
  10811. "application/json": {
  10812. "schema": {
  10813. "$ref": "#/components/schemas/UnauthorizedError"
  10814. }
  10815. }
  10816. }
  10817. },
  10818. "503": {
  10819. "description": "ServiceUnavailableError",
  10820. "content": {
  10821. "application/json": {
  10822. "schema": {
  10823. "$ref": "#/components/schemas/ServiceUnavailableError"
  10824. }
  10825. }
  10826. }
  10827. }
  10828. },
  10829. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  10830. "summary": "List providers",
  10831. "x-codeSamples": [
  10832. {
  10833. "lang": "js",
  10834. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10835. }
  10836. ]
  10837. }
  10838. },
  10839. "/api/provider/{providerID}": {
  10840. "get": {
  10841. "tags": ["providers"],
  10842. "operationId": "v2.provider.get",
  10843. "parameters": [
  10844. {
  10845. "name": "providerID",
  10846. "in": "path",
  10847. "schema": {
  10848. "type": "string"
  10849. },
  10850. "required": true
  10851. },
  10852. {
  10853. "name": "location",
  10854. "in": "query",
  10855. "schema": {
  10856. "type": "object",
  10857. "properties": {
  10858. "directory": {
  10859. "type": "string"
  10860. },
  10861. "workspace": {
  10862. "type": "string"
  10863. }
  10864. },
  10865. "additionalProperties": false
  10866. },
  10867. "required": false,
  10868. "style": "deepObject",
  10869. "explode": true
  10870. }
  10871. ],
  10872. "security": [],
  10873. "responses": {
  10874. "200": {
  10875. "description": "Success",
  10876. "content": {
  10877. "application/json": {
  10878. "schema": {
  10879. "type": "object",
  10880. "properties": {
  10881. "location": {
  10882. "$ref": "#/components/schemas/LocationInfo"
  10883. },
  10884. "data": {
  10885. "$ref": "#/components/schemas/ProviderV2Info"
  10886. }
  10887. },
  10888. "required": ["location", "data"],
  10889. "additionalProperties": false
  10890. }
  10891. }
  10892. }
  10893. },
  10894. "400": {
  10895. "description": "InvalidRequestError",
  10896. "content": {
  10897. "application/json": {
  10898. "schema": {
  10899. "$ref": "#/components/schemas/InvalidRequestError"
  10900. }
  10901. }
  10902. }
  10903. },
  10904. "401": {
  10905. "description": "UnauthorizedError",
  10906. "content": {
  10907. "application/json": {
  10908. "schema": {
  10909. "$ref": "#/components/schemas/UnauthorizedError"
  10910. }
  10911. }
  10912. }
  10913. },
  10914. "404": {
  10915. "description": "ProviderNotFoundError",
  10916. "content": {
  10917. "application/json": {
  10918. "schema": {
  10919. "$ref": "#/components/schemas/ProviderNotFoundError"
  10920. }
  10921. }
  10922. }
  10923. },
  10924. "503": {
  10925. "description": "ServiceUnavailableError",
  10926. "content": {
  10927. "application/json": {
  10928. "schema": {
  10929. "$ref": "#/components/schemas/ServiceUnavailableError"
  10930. }
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  10936. "summary": "Get provider",
  10937. "x-codeSamples": [
  10938. {
  10939. "lang": "js",
  10940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10941. }
  10942. ]
  10943. }
  10944. },
  10945. "/api/permission/request": {
  10946. "get": {
  10947. "tags": ["permissions"],
  10948. "operationId": "v2.permission.request.list",
  10949. "parameters": [
  10950. {
  10951. "name": "location",
  10952. "in": "query",
  10953. "schema": {
  10954. "type": "object",
  10955. "properties": {
  10956. "directory": {
  10957. "type": "string"
  10958. },
  10959. "workspace": {
  10960. "type": "string"
  10961. }
  10962. },
  10963. "additionalProperties": false
  10964. },
  10965. "required": false,
  10966. "style": "deepObject",
  10967. "explode": true
  10968. }
  10969. ],
  10970. "security": [],
  10971. "responses": {
  10972. "200": {
  10973. "description": "Success",
  10974. "content": {
  10975. "application/json": {
  10976. "schema": {
  10977. "type": "object",
  10978. "properties": {
  10979. "location": {
  10980. "$ref": "#/components/schemas/LocationInfo"
  10981. },
  10982. "data": {
  10983. "type": "array",
  10984. "items": {
  10985. "$ref": "#/components/schemas/PermissionV2Request"
  10986. }
  10987. }
  10988. },
  10989. "required": ["location", "data"],
  10990. "additionalProperties": false
  10991. }
  10992. }
  10993. }
  10994. },
  10995. "400": {
  10996. "description": "InvalidRequestError",
  10997. "content": {
  10998. "application/json": {
  10999. "schema": {
  11000. "$ref": "#/components/schemas/InvalidRequestError"
  11001. }
  11002. }
  11003. }
  11004. },
  11005. "401": {
  11006. "description": "UnauthorizedError",
  11007. "content": {
  11008. "application/json": {
  11009. "schema": {
  11010. "$ref": "#/components/schemas/UnauthorizedError"
  11011. }
  11012. }
  11013. }
  11014. }
  11015. },
  11016. "description": "Retrieve pending permission requests for a location.",
  11017. "summary": "List pending permission requests",
  11018. "x-codeSamples": [
  11019. {
  11020. "lang": "js",
  11021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  11022. }
  11023. ]
  11024. }
  11025. },
  11026. "/api/permission/saved": {
  11027. "get": {
  11028. "tags": ["permissions"],
  11029. "operationId": "v2.permission.saved.list",
  11030. "parameters": [
  11031. {
  11032. "name": "projectID",
  11033. "in": "query",
  11034. "schema": {
  11035. "type": "string"
  11036. },
  11037. "required": false
  11038. }
  11039. ],
  11040. "security": [],
  11041. "responses": {
  11042. "200": {
  11043. "description": "Success",
  11044. "content": {
  11045. "application/json": {
  11046. "schema": {
  11047. "type": "object",
  11048. "properties": {
  11049. "data": {
  11050. "type": "array",
  11051. "items": {
  11052. "$ref": "#/components/schemas/PermissionSavedInfo"
  11053. }
  11054. }
  11055. },
  11056. "required": ["data"],
  11057. "additionalProperties": false
  11058. }
  11059. }
  11060. }
  11061. },
  11062. "400": {
  11063. "description": "InvalidRequestError",
  11064. "content": {
  11065. "application/json": {
  11066. "schema": {
  11067. "$ref": "#/components/schemas/InvalidRequestError"
  11068. }
  11069. }
  11070. }
  11071. },
  11072. "401": {
  11073. "description": "UnauthorizedError",
  11074. "content": {
  11075. "application/json": {
  11076. "schema": {
  11077. "$ref": "#/components/schemas/UnauthorizedError"
  11078. }
  11079. }
  11080. }
  11081. }
  11082. },
  11083. "description": "Retrieve saved permissions, optionally filtered by project.",
  11084. "summary": "List saved permissions",
  11085. "x-codeSamples": [
  11086. {
  11087. "lang": "js",
  11088. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11089. }
  11090. ]
  11091. }
  11092. },
  11093. "/api/permission/saved/{id}": {
  11094. "delete": {
  11095. "tags": ["permissions"],
  11096. "operationId": "v2.permission.saved.remove",
  11097. "parameters": [
  11098. {
  11099. "name": "id",
  11100. "in": "path",
  11101. "schema": {
  11102. "type": "string"
  11103. },
  11104. "required": true
  11105. }
  11106. ],
  11107. "security": [],
  11108. "responses": {
  11109. "204": {
  11110. "description": "<No Content>"
  11111. },
  11112. "400": {
  11113. "description": "InvalidRequestError",
  11114. "content": {
  11115. "application/json": {
  11116. "schema": {
  11117. "$ref": "#/components/schemas/InvalidRequestError"
  11118. }
  11119. }
  11120. }
  11121. },
  11122. "401": {
  11123. "description": "UnauthorizedError",
  11124. "content": {
  11125. "application/json": {
  11126. "schema": {
  11127. "$ref": "#/components/schemas/UnauthorizedError"
  11128. }
  11129. }
  11130. }
  11131. }
  11132. },
  11133. "description": "Remove a saved permission by ID.",
  11134. "summary": "Remove saved permission",
  11135. "x-codeSamples": [
  11136. {
  11137. "lang": "js",
  11138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11139. }
  11140. ]
  11141. }
  11142. },
  11143. "/api/session/{sessionID}/permission": {
  11144. "get": {
  11145. "tags": ["permissions"],
  11146. "operationId": "v2.session.permission.list",
  11147. "parameters": [
  11148. {
  11149. "name": "sessionID",
  11150. "in": "path",
  11151. "schema": {
  11152. "type": "string",
  11153. "pattern": "^ses"
  11154. },
  11155. "required": true
  11156. }
  11157. ],
  11158. "security": [],
  11159. "responses": {
  11160. "200": {
  11161. "description": "Success",
  11162. "content": {
  11163. "application/json": {
  11164. "schema": {
  11165. "type": "object",
  11166. "properties": {
  11167. "data": {
  11168. "type": "array",
  11169. "items": {
  11170. "$ref": "#/components/schemas/PermissionV2Request"
  11171. }
  11172. }
  11173. },
  11174. "required": ["data"],
  11175. "additionalProperties": false
  11176. }
  11177. }
  11178. }
  11179. },
  11180. "400": {
  11181. "description": "InvalidRequestError",
  11182. "content": {
  11183. "application/json": {
  11184. "schema": {
  11185. "$ref": "#/components/schemas/InvalidRequestError"
  11186. }
  11187. }
  11188. }
  11189. },
  11190. "401": {
  11191. "description": "UnauthorizedError",
  11192. "content": {
  11193. "application/json": {
  11194. "schema": {
  11195. "$ref": "#/components/schemas/UnauthorizedError"
  11196. }
  11197. }
  11198. }
  11199. },
  11200. "404": {
  11201. "description": "SessionNotFoundError",
  11202. "content": {
  11203. "application/json": {
  11204. "schema": {
  11205. "anyOf": [
  11206. {
  11207. "$ref": "#/components/schemas/SessionNotFoundError"
  11208. },
  11209. {
  11210. "$ref": "#/components/schemas/SessionNotFoundError"
  11211. }
  11212. ]
  11213. }
  11214. }
  11215. }
  11216. }
  11217. },
  11218. "description": "Retrieve pending permission requests owned by a session.",
  11219. "summary": "List session permission requests",
  11220. "x-codeSamples": [
  11221. {
  11222. "lang": "js",
  11223. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  11224. }
  11225. ]
  11226. }
  11227. },
  11228. "/api/session/{sessionID}/permission/{requestID}/reply": {
  11229. "post": {
  11230. "tags": ["permissions"],
  11231. "operationId": "v2.session.permission.reply",
  11232. "parameters": [
  11233. {
  11234. "name": "sessionID",
  11235. "in": "path",
  11236. "schema": {
  11237. "type": "string",
  11238. "pattern": "^ses"
  11239. },
  11240. "required": true
  11241. },
  11242. {
  11243. "name": "requestID",
  11244. "in": "path",
  11245. "schema": {
  11246. "type": "string",
  11247. "pattern": "^per"
  11248. },
  11249. "required": true
  11250. }
  11251. ],
  11252. "security": [],
  11253. "responses": {
  11254. "204": {
  11255. "description": "<No Content>"
  11256. },
  11257. "400": {
  11258. "description": "InvalidRequestError",
  11259. "content": {
  11260. "application/json": {
  11261. "schema": {
  11262. "$ref": "#/components/schemas/InvalidRequestError"
  11263. }
  11264. }
  11265. }
  11266. },
  11267. "401": {
  11268. "description": "UnauthorizedError",
  11269. "content": {
  11270. "application/json": {
  11271. "schema": {
  11272. "$ref": "#/components/schemas/UnauthorizedError"
  11273. }
  11274. }
  11275. }
  11276. },
  11277. "404": {
  11278. "description": "SessionNotFoundError | PermissionNotFoundError",
  11279. "content": {
  11280. "application/json": {
  11281. "schema": {
  11282. "anyOf": [
  11283. {
  11284. "$ref": "#/components/schemas/PermissionNotFoundError"
  11285. },
  11286. {
  11287. "$ref": "#/components/schemas/SessionNotFoundError"
  11288. },
  11289. {
  11290. "$ref": "#/components/schemas/SessionNotFoundError"
  11291. }
  11292. ]
  11293. }
  11294. }
  11295. }
  11296. }
  11297. },
  11298. "description": "Respond to a pending permission request owned by a session.",
  11299. "summary": "Reply to pending permission request",
  11300. "requestBody": {
  11301. "content": {
  11302. "application/json": {
  11303. "schema": {
  11304. "type": "object",
  11305. "properties": {
  11306. "reply": {
  11307. "$ref": "#/components/schemas/PermissionV2Reply"
  11308. },
  11309. "message": {
  11310. "type": "string"
  11311. }
  11312. },
  11313. "required": ["reply"],
  11314. "additionalProperties": false
  11315. }
  11316. }
  11317. },
  11318. "required": true
  11319. },
  11320. "x-codeSamples": [
  11321. {
  11322. "lang": "js",
  11323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11324. }
  11325. ]
  11326. }
  11327. },
  11328. "/api/fs/read": {
  11329. "get": {
  11330. "tags": ["filesystem"],
  11331. "operationId": "v2.fs.read",
  11332. "parameters": [
  11333. {
  11334. "name": "location",
  11335. "in": "query",
  11336. "schema": {
  11337. "type": "object",
  11338. "properties": {
  11339. "directory": {
  11340. "type": "string"
  11341. },
  11342. "workspace": {
  11343. "type": "string"
  11344. }
  11345. },
  11346. "additionalProperties": false
  11347. },
  11348. "required": false,
  11349. "style": "deepObject",
  11350. "explode": true
  11351. },
  11352. {
  11353. "name": "path",
  11354. "in": "query",
  11355. "schema": {
  11356. "type": "string"
  11357. },
  11358. "required": true
  11359. }
  11360. ],
  11361. "security": [],
  11362. "responses": {
  11363. "200": {
  11364. "description": "Success",
  11365. "content": {
  11366. "application/json": {
  11367. "schema": {
  11368. "type": "object",
  11369. "properties": {
  11370. "location": {
  11371. "$ref": "#/components/schemas/LocationInfo"
  11372. },
  11373. "data": {
  11374. "anyOf": [
  11375. {
  11376. "$ref": "#/components/schemas/FileSystemTextContent"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/FileSystemBinaryContent"
  11380. }
  11381. ]
  11382. }
  11383. },
  11384. "required": ["location", "data"],
  11385. "additionalProperties": false
  11386. }
  11387. }
  11388. }
  11389. },
  11390. "400": {
  11391. "description": "InvalidRequestError",
  11392. "content": {
  11393. "application/json": {
  11394. "schema": {
  11395. "$ref": "#/components/schemas/InvalidRequestError"
  11396. }
  11397. }
  11398. }
  11399. },
  11400. "401": {
  11401. "description": "UnauthorizedError",
  11402. "content": {
  11403. "application/json": {
  11404. "schema": {
  11405. "$ref": "#/components/schemas/UnauthorizedError"
  11406. }
  11407. }
  11408. }
  11409. }
  11410. },
  11411. "description": "Read one file relative to the requested location.",
  11412. "summary": "Read file",
  11413. "x-codeSamples": [
  11414. {
  11415. "lang": "js",
  11416. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11417. }
  11418. ]
  11419. }
  11420. },
  11421. "/api/fs/list": {
  11422. "get": {
  11423. "tags": ["filesystem"],
  11424. "operationId": "v2.fs.list",
  11425. "parameters": [
  11426. {
  11427. "name": "location",
  11428. "in": "query",
  11429. "schema": {
  11430. "type": "object",
  11431. "properties": {
  11432. "directory": {
  11433. "type": "string"
  11434. },
  11435. "workspace": {
  11436. "type": "string"
  11437. }
  11438. },
  11439. "additionalProperties": false
  11440. },
  11441. "required": false,
  11442. "style": "deepObject",
  11443. "explode": true
  11444. },
  11445. {
  11446. "name": "path",
  11447. "in": "query",
  11448. "schema": {
  11449. "type": "string"
  11450. },
  11451. "required": false
  11452. }
  11453. ],
  11454. "security": [],
  11455. "responses": {
  11456. "200": {
  11457. "description": "Success",
  11458. "content": {
  11459. "application/json": {
  11460. "schema": {
  11461. "type": "object",
  11462. "properties": {
  11463. "location": {
  11464. "$ref": "#/components/schemas/LocationInfo"
  11465. },
  11466. "data": {
  11467. "type": "array",
  11468. "items": {
  11469. "$ref": "#/components/schemas/FileSystemEntry"
  11470. }
  11471. }
  11472. },
  11473. "required": ["location", "data"],
  11474. "additionalProperties": false
  11475. }
  11476. }
  11477. }
  11478. },
  11479. "400": {
  11480. "description": "InvalidRequestError",
  11481. "content": {
  11482. "application/json": {
  11483. "schema": {
  11484. "$ref": "#/components/schemas/InvalidRequestError"
  11485. }
  11486. }
  11487. }
  11488. },
  11489. "401": {
  11490. "description": "UnauthorizedError",
  11491. "content": {
  11492. "application/json": {
  11493. "schema": {
  11494. "$ref": "#/components/schemas/UnauthorizedError"
  11495. }
  11496. }
  11497. }
  11498. }
  11499. },
  11500. "description": "List direct children of one directory relative to the requested location.",
  11501. "summary": "List directory",
  11502. "x-codeSamples": [
  11503. {
  11504. "lang": "js",
  11505. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11506. }
  11507. ]
  11508. }
  11509. },
  11510. "/api/command": {
  11511. "get": {
  11512. "tags": ["commands"],
  11513. "operationId": "v2.command.list",
  11514. "parameters": [
  11515. {
  11516. "name": "location",
  11517. "in": "query",
  11518. "schema": {
  11519. "type": "object",
  11520. "properties": {
  11521. "directory": {
  11522. "type": "string"
  11523. },
  11524. "workspace": {
  11525. "type": "string"
  11526. }
  11527. },
  11528. "additionalProperties": false
  11529. },
  11530. "required": false,
  11531. "style": "deepObject",
  11532. "explode": true
  11533. }
  11534. ],
  11535. "security": [],
  11536. "responses": {
  11537. "200": {
  11538. "description": "Success",
  11539. "content": {
  11540. "application/json": {
  11541. "schema": {
  11542. "type": "object",
  11543. "properties": {
  11544. "location": {
  11545. "$ref": "#/components/schemas/LocationInfo"
  11546. },
  11547. "data": {
  11548. "type": "array",
  11549. "items": {
  11550. "$ref": "#/components/schemas/CommandV2Info"
  11551. }
  11552. }
  11553. },
  11554. "required": ["location", "data"],
  11555. "additionalProperties": false
  11556. }
  11557. }
  11558. }
  11559. },
  11560. "400": {
  11561. "description": "InvalidRequestError",
  11562. "content": {
  11563. "application/json": {
  11564. "schema": {
  11565. "$ref": "#/components/schemas/InvalidRequestError"
  11566. }
  11567. }
  11568. }
  11569. },
  11570. "401": {
  11571. "description": "UnauthorizedError",
  11572. "content": {
  11573. "application/json": {
  11574. "schema": {
  11575. "$ref": "#/components/schemas/UnauthorizedError"
  11576. }
  11577. }
  11578. }
  11579. }
  11580. },
  11581. "description": "Retrieve currently registered commands.",
  11582. "summary": "List commands",
  11583. "x-codeSamples": [
  11584. {
  11585. "lang": "js",
  11586. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11587. }
  11588. ]
  11589. }
  11590. },
  11591. "/api/skill": {
  11592. "get": {
  11593. "tags": ["skills"],
  11594. "operationId": "v2.skill.list",
  11595. "parameters": [
  11596. {
  11597. "name": "location",
  11598. "in": "query",
  11599. "schema": {
  11600. "type": "object",
  11601. "properties": {
  11602. "directory": {
  11603. "type": "string"
  11604. },
  11605. "workspace": {
  11606. "type": "string"
  11607. }
  11608. },
  11609. "additionalProperties": false
  11610. },
  11611. "required": false,
  11612. "style": "deepObject",
  11613. "explode": true
  11614. }
  11615. ],
  11616. "security": [],
  11617. "responses": {
  11618. "200": {
  11619. "description": "Success",
  11620. "content": {
  11621. "application/json": {
  11622. "schema": {
  11623. "type": "object",
  11624. "properties": {
  11625. "location": {
  11626. "$ref": "#/components/schemas/LocationInfo"
  11627. },
  11628. "data": {
  11629. "type": "array",
  11630. "items": {
  11631. "$ref": "#/components/schemas/SkillV2Info"
  11632. }
  11633. }
  11634. },
  11635. "required": ["location", "data"],
  11636. "additionalProperties": false
  11637. }
  11638. }
  11639. }
  11640. },
  11641. "400": {
  11642. "description": "InvalidRequestError",
  11643. "content": {
  11644. "application/json": {
  11645. "schema": {
  11646. "$ref": "#/components/schemas/InvalidRequestError"
  11647. }
  11648. }
  11649. }
  11650. },
  11651. "401": {
  11652. "description": "UnauthorizedError",
  11653. "content": {
  11654. "application/json": {
  11655. "schema": {
  11656. "$ref": "#/components/schemas/UnauthorizedError"
  11657. }
  11658. }
  11659. }
  11660. }
  11661. },
  11662. "description": "Retrieve currently registered skills.",
  11663. "summary": "List skills",
  11664. "x-codeSamples": [
  11665. {
  11666. "lang": "js",
  11667. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11668. }
  11669. ]
  11670. }
  11671. },
  11672. "/api/event": {
  11673. "get": {
  11674. "tags": ["events"],
  11675. "operationId": "v2.event.subscribe",
  11676. "parameters": [
  11677. {
  11678. "name": "location",
  11679. "in": "query",
  11680. "schema": {
  11681. "type": "object",
  11682. "properties": {
  11683. "directory": {
  11684. "type": "string"
  11685. },
  11686. "workspace": {
  11687. "type": "string"
  11688. }
  11689. },
  11690. "additionalProperties": false
  11691. },
  11692. "required": false,
  11693. "style": "deepObject",
  11694. "explode": true
  11695. }
  11696. ],
  11697. "security": [],
  11698. "responses": {
  11699. "200": {
  11700. "description": "Success",
  11701. "content": {
  11702. "text/event-stream": {
  11703. "schema": {
  11704. "type": "string"
  11705. }
  11706. }
  11707. }
  11708. },
  11709. "400": {
  11710. "description": "InvalidRequestError",
  11711. "content": {
  11712. "application/json": {
  11713. "schema": {
  11714. "$ref": "#/components/schemas/InvalidRequestError"
  11715. }
  11716. }
  11717. }
  11718. },
  11719. "401": {
  11720. "description": "UnauthorizedError",
  11721. "content": {
  11722. "application/json": {
  11723. "schema": {
  11724. "$ref": "#/components/schemas/UnauthorizedError"
  11725. }
  11726. }
  11727. }
  11728. }
  11729. },
  11730. "description": "Subscribe to native event payloads for a location.",
  11731. "summary": "Subscribe to events",
  11732. "x-codeSamples": [
  11733. {
  11734. "lang": "js",
  11735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11736. }
  11737. ]
  11738. }
  11739. },
  11740. "/api/question/request": {
  11741. "get": {
  11742. "tags": ["session questions"],
  11743. "operationId": "v2.question.request.list",
  11744. "parameters": [
  11745. {
  11746. "name": "location",
  11747. "in": "query",
  11748. "schema": {
  11749. "type": "object",
  11750. "properties": {
  11751. "directory": {
  11752. "type": "string"
  11753. },
  11754. "workspace": {
  11755. "type": "string"
  11756. }
  11757. },
  11758. "additionalProperties": false
  11759. },
  11760. "required": false,
  11761. "style": "deepObject",
  11762. "explode": true
  11763. }
  11764. ],
  11765. "security": [],
  11766. "responses": {
  11767. "200": {
  11768. "description": "Success",
  11769. "content": {
  11770. "application/json": {
  11771. "schema": {
  11772. "type": "object",
  11773. "properties": {
  11774. "location": {
  11775. "$ref": "#/components/schemas/LocationInfo"
  11776. },
  11777. "data": {
  11778. "type": "array",
  11779. "items": {
  11780. "$ref": "#/components/schemas/QuestionV2Request"
  11781. }
  11782. }
  11783. },
  11784. "required": ["location", "data"],
  11785. "additionalProperties": false
  11786. }
  11787. }
  11788. }
  11789. },
  11790. "400": {
  11791. "description": "InvalidRequestError",
  11792. "content": {
  11793. "application/json": {
  11794. "schema": {
  11795. "$ref": "#/components/schemas/InvalidRequestError"
  11796. }
  11797. }
  11798. }
  11799. },
  11800. "401": {
  11801. "description": "UnauthorizedError",
  11802. "content": {
  11803. "application/json": {
  11804. "schema": {
  11805. "$ref": "#/components/schemas/UnauthorizedError"
  11806. }
  11807. }
  11808. }
  11809. }
  11810. },
  11811. "description": "Retrieve pending question requests for a location.",
  11812. "summary": "List pending question requests",
  11813. "x-codeSamples": [
  11814. {
  11815. "lang": "js",
  11816. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11817. }
  11818. ]
  11819. }
  11820. },
  11821. "/api/session/{sessionID}/question/{requestID}/reply": {
  11822. "post": {
  11823. "tags": ["session questions"],
  11824. "operationId": "v2.session.question.reply",
  11825. "parameters": [
  11826. {
  11827. "name": "sessionID",
  11828. "in": "path",
  11829. "schema": {
  11830. "type": "string",
  11831. "pattern": "^ses"
  11832. },
  11833. "required": true
  11834. },
  11835. {
  11836. "name": "requestID",
  11837. "in": "path",
  11838. "schema": {
  11839. "type": "string",
  11840. "pattern": "^que"
  11841. },
  11842. "required": true
  11843. }
  11844. ],
  11845. "security": [],
  11846. "responses": {
  11847. "204": {
  11848. "description": "<No Content>"
  11849. },
  11850. "400": {
  11851. "description": "InvalidRequestError",
  11852. "content": {
  11853. "application/json": {
  11854. "schema": {
  11855. "$ref": "#/components/schemas/InvalidRequestError"
  11856. }
  11857. }
  11858. }
  11859. },
  11860. "401": {
  11861. "description": "UnauthorizedError",
  11862. "content": {
  11863. "application/json": {
  11864. "schema": {
  11865. "$ref": "#/components/schemas/UnauthorizedError"
  11866. }
  11867. }
  11868. }
  11869. },
  11870. "404": {
  11871. "description": "SessionNotFoundError | QuestionNotFoundError",
  11872. "content": {
  11873. "application/json": {
  11874. "schema": {
  11875. "anyOf": [
  11876. {
  11877. "$ref": "#/components/schemas/QuestionNotFoundError"
  11878. },
  11879. {
  11880. "$ref": "#/components/schemas/SessionNotFoundError"
  11881. },
  11882. {
  11883. "$ref": "#/components/schemas/SessionNotFoundError"
  11884. }
  11885. ]
  11886. }
  11887. }
  11888. }
  11889. }
  11890. },
  11891. "description": "Answer a pending question request owned by a session.",
  11892. "summary": "Reply to pending question request",
  11893. "requestBody": {
  11894. "content": {
  11895. "application/json": {
  11896. "schema": {
  11897. "$ref": "#/components/schemas/QuestionV2Reply"
  11898. }
  11899. }
  11900. },
  11901. "required": true
  11902. },
  11903. "x-codeSamples": [
  11904. {
  11905. "lang": "js",
  11906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  11907. }
  11908. ]
  11909. }
  11910. },
  11911. "/api/session/{sessionID}/question/{requestID}/reject": {
  11912. "post": {
  11913. "tags": ["session questions"],
  11914. "operationId": "v2.session.question.reject",
  11915. "parameters": [
  11916. {
  11917. "name": "sessionID",
  11918. "in": "path",
  11919. "schema": {
  11920. "type": "string",
  11921. "pattern": "^ses"
  11922. },
  11923. "required": true
  11924. },
  11925. {
  11926. "name": "requestID",
  11927. "in": "path",
  11928. "schema": {
  11929. "type": "string",
  11930. "pattern": "^que"
  11931. },
  11932. "required": true
  11933. }
  11934. ],
  11935. "security": [],
  11936. "responses": {
  11937. "204": {
  11938. "description": "<No Content>"
  11939. },
  11940. "400": {
  11941. "description": "InvalidRequestError",
  11942. "content": {
  11943. "application/json": {
  11944. "schema": {
  11945. "$ref": "#/components/schemas/InvalidRequestError"
  11946. }
  11947. }
  11948. }
  11949. },
  11950. "401": {
  11951. "description": "UnauthorizedError",
  11952. "content": {
  11953. "application/json": {
  11954. "schema": {
  11955. "$ref": "#/components/schemas/UnauthorizedError"
  11956. }
  11957. }
  11958. }
  11959. },
  11960. "404": {
  11961. "description": "SessionNotFoundError | QuestionNotFoundError",
  11962. "content": {
  11963. "application/json": {
  11964. "schema": {
  11965. "anyOf": [
  11966. {
  11967. "$ref": "#/components/schemas/QuestionNotFoundError"
  11968. },
  11969. {
  11970. "$ref": "#/components/schemas/SessionNotFoundError"
  11971. },
  11972. {
  11973. "$ref": "#/components/schemas/SessionNotFoundError"
  11974. }
  11975. ]
  11976. }
  11977. }
  11978. }
  11979. }
  11980. },
  11981. "description": "Reject a pending question request owned by a session.",
  11982. "summary": "Reject pending question request",
  11983. "x-codeSamples": [
  11984. {
  11985. "lang": "js",
  11986. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  11987. }
  11988. ]
  11989. }
  11990. },
  11991. "/api/reference": {
  11992. "get": {
  11993. "tags": ["reference"],
  11994. "operationId": "v2.reference.list",
  11995. "parameters": [
  11996. {
  11997. "name": "location",
  11998. "in": "query",
  11999. "schema": {
  12000. "type": "object",
  12001. "properties": {
  12002. "directory": {
  12003. "type": "string"
  12004. },
  12005. "workspace": {
  12006. "type": "string"
  12007. }
  12008. },
  12009. "additionalProperties": false
  12010. },
  12011. "required": false,
  12012. "style": "deepObject",
  12013. "explode": true
  12014. }
  12015. ],
  12016. "security": [],
  12017. "responses": {
  12018. "200": {
  12019. "description": "Success",
  12020. "content": {
  12021. "application/json": {
  12022. "schema": {
  12023. "type": "object",
  12024. "properties": {
  12025. "location": {
  12026. "$ref": "#/components/schemas/LocationInfo"
  12027. },
  12028. "data": {
  12029. "type": "array",
  12030. "items": {
  12031. "$ref": "#/components/schemas/ReferenceInfo"
  12032. }
  12033. }
  12034. },
  12035. "required": ["location", "data"],
  12036. "additionalProperties": false
  12037. }
  12038. }
  12039. }
  12040. },
  12041. "400": {
  12042. "description": "InvalidRequestError",
  12043. "content": {
  12044. "application/json": {
  12045. "schema": {
  12046. "$ref": "#/components/schemas/InvalidRequestError"
  12047. }
  12048. }
  12049. }
  12050. },
  12051. "401": {
  12052. "description": "UnauthorizedError",
  12053. "content": {
  12054. "application/json": {
  12055. "schema": {
  12056. "$ref": "#/components/schemas/UnauthorizedError"
  12057. }
  12058. }
  12059. }
  12060. }
  12061. },
  12062. "description": "List references available in the requested location.",
  12063. "summary": "List references",
  12064. "x-codeSamples": [
  12065. {
  12066. "lang": "js",
  12067. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  12068. }
  12069. ]
  12070. }
  12071. },
  12072. "/pty/{ptyID}/connect": {
  12073. "get": {
  12074. "tags": ["pty"],
  12075. "operationId": "pty.connect",
  12076. "parameters": [
  12077. {
  12078. "name": "ptyID",
  12079. "in": "path",
  12080. "schema": {
  12081. "type": "string",
  12082. "pattern": "^pty"
  12083. },
  12084. "required": true
  12085. },
  12086. {
  12087. "in": "query",
  12088. "name": "directory",
  12089. "schema": {
  12090. "type": "string"
  12091. }
  12092. },
  12093. {
  12094. "in": "query",
  12095. "name": "workspace",
  12096. "schema": {
  12097. "type": "string"
  12098. }
  12099. },
  12100. {
  12101. "in": "query",
  12102. "name": "cursor",
  12103. "schema": {
  12104. "type": "string"
  12105. }
  12106. },
  12107. {
  12108. "in": "query",
  12109. "name": "ticket",
  12110. "schema": {
  12111. "type": "string"
  12112. }
  12113. }
  12114. ],
  12115. "responses": {
  12116. "200": {
  12117. "description": "Connected session",
  12118. "content": {
  12119. "application/json": {
  12120. "schema": {
  12121. "type": "boolean",
  12122. "description": "Connected session"
  12123. }
  12124. }
  12125. }
  12126. },
  12127. "403": {
  12128. "description": "Forbidden",
  12129. "content": {
  12130. "application/json": {
  12131. "schema": {
  12132. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  12133. }
  12134. }
  12135. }
  12136. },
  12137. "404": {
  12138. "description": "Not found",
  12139. "content": {
  12140. "application/json": {
  12141. "schema": {
  12142. "$ref": "#/components/schemas/NotFoundError"
  12143. }
  12144. }
  12145. }
  12146. }
  12147. },
  12148. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  12149. "summary": "Connect to PTY session",
  12150. "x-codeSamples": [
  12151. {
  12152. "lang": "js",
  12153. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  12154. }
  12155. ]
  12156. }
  12157. }
  12158. },
  12159. "components": {
  12160. "schemas": {
  12161. "Event": {
  12162. "anyOf": [
  12163. {
  12164. "$ref": "#/components/schemas/EventModels-devRefreshed"
  12165. },
  12166. {
  12167. "$ref": "#/components/schemas/EventPluginAdded"
  12168. },
  12169. {
  12170. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12171. },
  12172. {
  12173. "$ref": "#/components/schemas/EventSessionCreated"
  12174. },
  12175. {
  12176. "$ref": "#/components/schemas/EventSessionUpdated"
  12177. },
  12178. {
  12179. "$ref": "#/components/schemas/EventSessionDeleted"
  12180. },
  12181. {
  12182. "$ref": "#/components/schemas/EventMessageUpdated"
  12183. },
  12184. {
  12185. "$ref": "#/components/schemas/EventMessageRemoved"
  12186. },
  12187. {
  12188. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12189. },
  12190. {
  12191. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12192. },
  12193. {
  12194. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12195. },
  12196. {
  12197. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12198. },
  12199. {
  12200. "$ref": "#/components/schemas/EventSessionNextMoved"
  12201. },
  12202. {
  12203. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12204. },
  12205. {
  12206. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  12207. },
  12208. {
  12209. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  12210. },
  12211. {
  12212. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  12213. },
  12214. {
  12215. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  12216. },
  12217. {
  12218. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12219. },
  12220. {
  12221. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12222. },
  12223. {
  12224. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12225. },
  12226. {
  12227. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12228. },
  12229. {
  12230. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12231. },
  12232. {
  12233. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12234. },
  12235. {
  12236. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12237. },
  12238. {
  12239. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12240. },
  12241. {
  12242. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12243. },
  12244. {
  12245. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12246. },
  12247. {
  12248. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12249. },
  12250. {
  12251. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12252. },
  12253. {
  12254. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12255. },
  12256. {
  12257. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12258. },
  12259. {
  12260. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12261. },
  12262. {
  12263. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12264. },
  12265. {
  12266. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12267. },
  12268. {
  12269. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12270. },
  12271. {
  12272. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12273. },
  12274. {
  12275. "$ref": "#/components/schemas/EventSessionNextRetried"
  12276. },
  12277. {
  12278. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12279. },
  12280. {
  12281. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12282. },
  12283. {
  12284. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12285. },
  12286. {
  12287. "$ref": "#/components/schemas/EventMessagePartDelta"
  12288. },
  12289. {
  12290. "$ref": "#/components/schemas/EventSessionDiff"
  12291. },
  12292. {
  12293. "$ref": "#/components/schemas/EventSessionError"
  12294. },
  12295. {
  12296. "$ref": "#/components/schemas/EventInstallationUpdated"
  12297. },
  12298. {
  12299. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12300. },
  12301. {
  12302. "$ref": "#/components/schemas/EventFileEdited"
  12303. },
  12304. {
  12305. "$ref": "#/components/schemas/EventAccountAdded"
  12306. },
  12307. {
  12308. "$ref": "#/components/schemas/EventAccountRemoved"
  12309. },
  12310. {
  12311. "$ref": "#/components/schemas/EventAccountSwitched"
  12312. },
  12313. {
  12314. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12315. },
  12316. {
  12317. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12318. },
  12319. {
  12320. "$ref": "#/components/schemas/EventReferenceUpdated"
  12321. },
  12322. {
  12323. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12324. },
  12325. {
  12326. "$ref": "#/components/schemas/EventPtyCreated"
  12327. },
  12328. {
  12329. "$ref": "#/components/schemas/EventPtyUpdated"
  12330. },
  12331. {
  12332. "$ref": "#/components/schemas/EventPtyExited"
  12333. },
  12334. {
  12335. "$ref": "#/components/schemas/EventPtyDeleted"
  12336. },
  12337. {
  12338. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12339. },
  12340. {
  12341. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12342. },
  12343. {
  12344. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12345. },
  12346. {
  12347. "$ref": "#/components/schemas/EventTodoUpdated"
  12348. },
  12349. {
  12350. "$ref": "#/components/schemas/EventLspUpdated"
  12351. },
  12352. {
  12353. "$ref": "#/components/schemas/EventPermissionAsked"
  12354. },
  12355. {
  12356. "$ref": "#/components/schemas/EventPermissionReplied"
  12357. },
  12358. {
  12359. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12360. },
  12361. {
  12362. "$ref": "#/components/schemas/Event.tui.command.execute"
  12363. },
  12364. {
  12365. "$ref": "#/components/schemas/Event.tui.toast.show"
  12366. },
  12367. {
  12368. "$ref": "#/components/schemas/Event.tui.session.select"
  12369. },
  12370. {
  12371. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12372. },
  12373. {
  12374. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12375. },
  12376. {
  12377. "$ref": "#/components/schemas/EventCommandExecuted"
  12378. },
  12379. {
  12380. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12381. },
  12382. {
  12383. "$ref": "#/components/schemas/EventProjectUpdated"
  12384. },
  12385. {
  12386. "$ref": "#/components/schemas/EventQuestionAsked"
  12387. },
  12388. {
  12389. "$ref": "#/components/schemas/EventQuestionReplied"
  12390. },
  12391. {
  12392. "$ref": "#/components/schemas/EventQuestionRejected"
  12393. },
  12394. {
  12395. "$ref": "#/components/schemas/EventSessionStatus"
  12396. },
  12397. {
  12398. "$ref": "#/components/schemas/EventSessionIdle"
  12399. },
  12400. {
  12401. "$ref": "#/components/schemas/EventSessionCompacted"
  12402. },
  12403. {
  12404. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12405. },
  12406. {
  12407. "$ref": "#/components/schemas/EventWorktreeReady"
  12408. },
  12409. {
  12410. "$ref": "#/components/schemas/EventWorktreeFailed"
  12411. },
  12412. {
  12413. "$ref": "#/components/schemas/EventWorkspaceReady"
  12414. },
  12415. {
  12416. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12417. },
  12418. {
  12419. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12420. },
  12421. {
  12422. "$ref": "#/components/schemas/EventServerConnected"
  12423. },
  12424. {
  12425. "$ref": "#/components/schemas/EventGlobalDisposed"
  12426. },
  12427. {
  12428. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12429. }
  12430. ]
  12431. },
  12432. "QuestionReplied": {
  12433. "type": "object",
  12434. "properties": {
  12435. "sessionID": {
  12436. "type": "string",
  12437. "pattern": "^ses"
  12438. },
  12439. "requestID": {
  12440. "type": "string",
  12441. "pattern": "^que"
  12442. },
  12443. "answers": {
  12444. "type": "array",
  12445. "items": {
  12446. "$ref": "#/components/schemas/QuestionAnswer"
  12447. }
  12448. }
  12449. },
  12450. "required": ["sessionID", "requestID", "answers"],
  12451. "additionalProperties": false
  12452. },
  12453. "QuestionRejected": {
  12454. "type": "object",
  12455. "properties": {
  12456. "sessionID": {
  12457. "type": "string",
  12458. "pattern": "^ses"
  12459. },
  12460. "requestID": {
  12461. "type": "string",
  12462. "pattern": "^que"
  12463. }
  12464. },
  12465. "required": ["sessionID", "requestID"],
  12466. "additionalProperties": false
  12467. },
  12468. "OAuth": {
  12469. "type": "object",
  12470. "properties": {
  12471. "type": {
  12472. "type": "string",
  12473. "enum": ["oauth"]
  12474. },
  12475. "refresh": {
  12476. "type": "string"
  12477. },
  12478. "access": {
  12479. "type": "string"
  12480. },
  12481. "expires": {
  12482. "type": "integer",
  12483. "minimum": 0
  12484. },
  12485. "accountId": {
  12486. "type": "string"
  12487. },
  12488. "enterpriseUrl": {
  12489. "type": "string"
  12490. }
  12491. },
  12492. "required": ["type", "refresh", "access", "expires"],
  12493. "additionalProperties": false
  12494. },
  12495. "ApiAuth": {
  12496. "type": "object",
  12497. "properties": {
  12498. "type": {
  12499. "type": "string",
  12500. "enum": ["api"]
  12501. },
  12502. "key": {
  12503. "type": "string"
  12504. },
  12505. "metadata": {
  12506. "type": "object",
  12507. "additionalProperties": {
  12508. "type": "string"
  12509. }
  12510. }
  12511. },
  12512. "required": ["type", "key"],
  12513. "additionalProperties": false
  12514. },
  12515. "WellKnownAuth": {
  12516. "type": "object",
  12517. "properties": {
  12518. "type": {
  12519. "type": "string",
  12520. "enum": ["wellknown"]
  12521. },
  12522. "key": {
  12523. "type": "string"
  12524. },
  12525. "token": {
  12526. "type": "string"
  12527. }
  12528. },
  12529. "required": ["type", "key", "token"],
  12530. "additionalProperties": false
  12531. },
  12532. "Auth": {
  12533. "anyOf": [
  12534. {
  12535. "$ref": "#/components/schemas/OAuth"
  12536. },
  12537. {
  12538. "$ref": "#/components/schemas/ApiAuth"
  12539. },
  12540. {
  12541. "$ref": "#/components/schemas/WellKnownAuth"
  12542. }
  12543. ]
  12544. },
  12545. "effect_HttpApiError_BadRequest": {
  12546. "type": "object",
  12547. "properties": {
  12548. "_tag": {
  12549. "type": "string",
  12550. "enum": ["BadRequest"]
  12551. }
  12552. },
  12553. "required": ["_tag"],
  12554. "additionalProperties": false
  12555. },
  12556. "InvalidRequestError": {
  12557. "type": "object",
  12558. "properties": {
  12559. "_tag": {
  12560. "type": "string",
  12561. "enum": ["InvalidRequestError"]
  12562. },
  12563. "message": {
  12564. "type": "string"
  12565. },
  12566. "kind": {
  12567. "type": "string"
  12568. },
  12569. "field": {
  12570. "type": "string"
  12571. }
  12572. },
  12573. "required": ["_tag", "message"],
  12574. "additionalProperties": false
  12575. },
  12576. "MoveSessionError": {
  12577. "type": "object",
  12578. "properties": {
  12579. "name": {
  12580. "type": "string",
  12581. "enum": ["MoveSessionError"]
  12582. },
  12583. "data": {
  12584. "type": "object",
  12585. "properties": {
  12586. "message": {
  12587. "type": "string"
  12588. }
  12589. },
  12590. "required": ["message"],
  12591. "additionalProperties": false
  12592. }
  12593. },
  12594. "required": ["name", "data"],
  12595. "additionalProperties": false
  12596. },
  12597. "SnapshotFileDiff": {
  12598. "type": "object",
  12599. "properties": {
  12600. "file": {
  12601. "type": "string"
  12602. },
  12603. "patch": {
  12604. "type": "string"
  12605. },
  12606. "additions": {
  12607. "type": "number"
  12608. },
  12609. "deletions": {
  12610. "type": "number"
  12611. },
  12612. "status": {
  12613. "type": "string",
  12614. "enum": ["added", "deleted", "modified"]
  12615. }
  12616. },
  12617. "required": ["additions", "deletions"],
  12618. "additionalProperties": false
  12619. },
  12620. "PermissionAction": {
  12621. "type": "string",
  12622. "enum": ["allow", "deny", "ask"]
  12623. },
  12624. "PermissionRule": {
  12625. "type": "object",
  12626. "properties": {
  12627. "permission": {
  12628. "type": "string"
  12629. },
  12630. "pattern": {
  12631. "type": "string"
  12632. },
  12633. "action": {
  12634. "$ref": "#/components/schemas/PermissionAction"
  12635. }
  12636. },
  12637. "required": ["permission", "pattern", "action"],
  12638. "additionalProperties": false
  12639. },
  12640. "PermissionRuleset": {
  12641. "type": "array",
  12642. "items": {
  12643. "$ref": "#/components/schemas/PermissionRule"
  12644. }
  12645. },
  12646. "Session": {
  12647. "type": "object",
  12648. "properties": {
  12649. "id": {
  12650. "type": "string",
  12651. "pattern": "^ses"
  12652. },
  12653. "slug": {
  12654. "type": "string"
  12655. },
  12656. "projectID": {
  12657. "type": "string"
  12658. },
  12659. "workspaceID": {
  12660. "type": "string",
  12661. "pattern": "^wrk"
  12662. },
  12663. "directory": {
  12664. "type": "string"
  12665. },
  12666. "path": {
  12667. "type": "string"
  12668. },
  12669. "parentID": {
  12670. "type": "string",
  12671. "pattern": "^ses"
  12672. },
  12673. "summary": {
  12674. "type": "object",
  12675. "properties": {
  12676. "additions": {
  12677. "type": "number"
  12678. },
  12679. "deletions": {
  12680. "type": "number"
  12681. },
  12682. "files": {
  12683. "type": "number"
  12684. },
  12685. "diffs": {
  12686. "type": "array",
  12687. "items": {
  12688. "$ref": "#/components/schemas/SnapshotFileDiff"
  12689. }
  12690. }
  12691. },
  12692. "required": ["additions", "deletions", "files"],
  12693. "additionalProperties": false
  12694. },
  12695. "cost": {
  12696. "type": "number"
  12697. },
  12698. "tokens": {
  12699. "type": "object",
  12700. "properties": {
  12701. "input": {
  12702. "type": "number"
  12703. },
  12704. "output": {
  12705. "type": "number"
  12706. },
  12707. "reasoning": {
  12708. "type": "number"
  12709. },
  12710. "cache": {
  12711. "type": "object",
  12712. "properties": {
  12713. "read": {
  12714. "type": "number"
  12715. },
  12716. "write": {
  12717. "type": "number"
  12718. }
  12719. },
  12720. "required": ["read", "write"],
  12721. "additionalProperties": false
  12722. }
  12723. },
  12724. "required": ["input", "output", "reasoning", "cache"],
  12725. "additionalProperties": false
  12726. },
  12727. "share": {
  12728. "type": "object",
  12729. "properties": {
  12730. "url": {
  12731. "type": "string"
  12732. }
  12733. },
  12734. "required": ["url"],
  12735. "additionalProperties": false
  12736. },
  12737. "title": {
  12738. "type": "string"
  12739. },
  12740. "agent": {
  12741. "type": "string"
  12742. },
  12743. "model": {
  12744. "type": "object",
  12745. "properties": {
  12746. "id": {
  12747. "type": "string"
  12748. },
  12749. "providerID": {
  12750. "type": "string"
  12751. },
  12752. "variant": {
  12753. "type": "string"
  12754. }
  12755. },
  12756. "required": ["id", "providerID"],
  12757. "additionalProperties": false
  12758. },
  12759. "version": {
  12760. "type": "string"
  12761. },
  12762. "metadata": {
  12763. "type": "object"
  12764. },
  12765. "time": {
  12766. "type": "object",
  12767. "properties": {
  12768. "created": {
  12769. "type": "integer",
  12770. "minimum": 0
  12771. },
  12772. "updated": {
  12773. "type": "integer",
  12774. "minimum": 0
  12775. },
  12776. "compacting": {
  12777. "type": "integer",
  12778. "minimum": 0
  12779. },
  12780. "archived": {
  12781. "type": "number"
  12782. }
  12783. },
  12784. "required": ["created", "updated"],
  12785. "additionalProperties": false
  12786. },
  12787. "permission": {
  12788. "$ref": "#/components/schemas/PermissionRuleset"
  12789. },
  12790. "revert": {
  12791. "type": "object",
  12792. "properties": {
  12793. "messageID": {
  12794. "type": "string",
  12795. "pattern": "^msg"
  12796. },
  12797. "partID": {
  12798. "type": "string",
  12799. "pattern": "^prt"
  12800. },
  12801. "snapshot": {
  12802. "type": "string"
  12803. },
  12804. "diff": {
  12805. "type": "string"
  12806. }
  12807. },
  12808. "required": ["messageID"],
  12809. "additionalProperties": false
  12810. }
  12811. },
  12812. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12813. "additionalProperties": false
  12814. },
  12815. "OutputFormatText": {
  12816. "type": "object",
  12817. "properties": {
  12818. "type": {
  12819. "type": "string",
  12820. "enum": ["text"]
  12821. }
  12822. },
  12823. "required": ["type"],
  12824. "additionalProperties": false
  12825. },
  12826. "JSONSchema": {
  12827. "type": "object"
  12828. },
  12829. "OutputFormatJsonSchema": {
  12830. "type": "object",
  12831. "properties": {
  12832. "type": {
  12833. "type": "string",
  12834. "enum": ["json_schema"]
  12835. },
  12836. "schema": {
  12837. "$ref": "#/components/schemas/JSONSchema"
  12838. },
  12839. "retryCount": {
  12840. "type": "integer",
  12841. "minimum": 0
  12842. }
  12843. },
  12844. "required": ["type", "schema"],
  12845. "additionalProperties": false
  12846. },
  12847. "OutputFormat": {
  12848. "anyOf": [
  12849. {
  12850. "$ref": "#/components/schemas/OutputFormatText"
  12851. },
  12852. {
  12853. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12854. }
  12855. ]
  12856. },
  12857. "UserMessage": {
  12858. "type": "object",
  12859. "properties": {
  12860. "id": {
  12861. "type": "string",
  12862. "pattern": "^msg"
  12863. },
  12864. "sessionID": {
  12865. "type": "string",
  12866. "pattern": "^ses"
  12867. },
  12868. "role": {
  12869. "type": "string",
  12870. "enum": ["user"]
  12871. },
  12872. "time": {
  12873. "type": "object",
  12874. "properties": {
  12875. "created": {
  12876. "type": "number",
  12877. "minimum": 0
  12878. }
  12879. },
  12880. "required": ["created"],
  12881. "additionalProperties": false
  12882. },
  12883. "format": {
  12884. "$ref": "#/components/schemas/OutputFormat"
  12885. },
  12886. "summary": {
  12887. "type": "object",
  12888. "properties": {
  12889. "title": {
  12890. "type": "string"
  12891. },
  12892. "body": {
  12893. "type": "string"
  12894. },
  12895. "diffs": {
  12896. "type": "array",
  12897. "items": {
  12898. "$ref": "#/components/schemas/SnapshotFileDiff"
  12899. }
  12900. }
  12901. },
  12902. "required": ["diffs"],
  12903. "additionalProperties": false
  12904. },
  12905. "agent": {
  12906. "type": "string"
  12907. },
  12908. "model": {
  12909. "type": "object",
  12910. "properties": {
  12911. "providerID": {
  12912. "type": "string"
  12913. },
  12914. "modelID": {
  12915. "type": "string"
  12916. },
  12917. "variant": {
  12918. "type": "string"
  12919. }
  12920. },
  12921. "required": ["providerID", "modelID"],
  12922. "additionalProperties": false
  12923. },
  12924. "system": {
  12925. "type": "string"
  12926. },
  12927. "tools": {
  12928. "type": "object",
  12929. "additionalProperties": {
  12930. "type": "boolean"
  12931. }
  12932. }
  12933. },
  12934. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12935. "additionalProperties": false
  12936. },
  12937. "ProviderAuthError": {
  12938. "type": "object",
  12939. "properties": {
  12940. "name": {
  12941. "type": "string",
  12942. "enum": ["ProviderAuthError"]
  12943. },
  12944. "data": {
  12945. "type": "object",
  12946. "properties": {
  12947. "providerID": {
  12948. "type": "string"
  12949. },
  12950. "message": {
  12951. "type": "string"
  12952. }
  12953. },
  12954. "required": ["providerID", "message"],
  12955. "additionalProperties": false
  12956. }
  12957. },
  12958. "required": ["name", "data"],
  12959. "additionalProperties": false
  12960. },
  12961. "UnknownError": {
  12962. "type": "object",
  12963. "properties": {
  12964. "name": {
  12965. "type": "string",
  12966. "enum": ["UnknownError"]
  12967. },
  12968. "data": {
  12969. "type": "object",
  12970. "properties": {
  12971. "message": {
  12972. "type": "string"
  12973. },
  12974. "ref": {
  12975. "type": "string"
  12976. }
  12977. },
  12978. "required": ["message"],
  12979. "additionalProperties": false
  12980. }
  12981. },
  12982. "required": ["name", "data"],
  12983. "additionalProperties": false
  12984. },
  12985. "MessageOutputLengthError": {
  12986. "type": "object",
  12987. "properties": {
  12988. "name": {
  12989. "type": "string",
  12990. "enum": ["MessageOutputLengthError"]
  12991. },
  12992. "data": {
  12993. "type": "object",
  12994. "properties": {}
  12995. }
  12996. },
  12997. "required": ["name", "data"],
  12998. "additionalProperties": false
  12999. },
  13000. "MessageAbortedError": {
  13001. "type": "object",
  13002. "properties": {
  13003. "name": {
  13004. "type": "string",
  13005. "enum": ["MessageAbortedError"]
  13006. },
  13007. "data": {
  13008. "type": "object",
  13009. "properties": {
  13010. "message": {
  13011. "type": "string"
  13012. }
  13013. },
  13014. "required": ["message"],
  13015. "additionalProperties": false
  13016. }
  13017. },
  13018. "required": ["name", "data"],
  13019. "additionalProperties": false
  13020. },
  13021. "StructuredOutputError": {
  13022. "type": "object",
  13023. "properties": {
  13024. "name": {
  13025. "type": "string",
  13026. "enum": ["StructuredOutputError"]
  13027. },
  13028. "data": {
  13029. "type": "object",
  13030. "properties": {
  13031. "message": {
  13032. "type": "string"
  13033. },
  13034. "retries": {
  13035. "type": "integer",
  13036. "minimum": 0
  13037. }
  13038. },
  13039. "required": ["message", "retries"],
  13040. "additionalProperties": false
  13041. }
  13042. },
  13043. "required": ["name", "data"],
  13044. "additionalProperties": false
  13045. },
  13046. "ContextOverflowError": {
  13047. "type": "object",
  13048. "properties": {
  13049. "name": {
  13050. "type": "string",
  13051. "enum": ["ContextOverflowError"]
  13052. },
  13053. "data": {
  13054. "type": "object",
  13055. "properties": {
  13056. "message": {
  13057. "type": "string"
  13058. },
  13059. "responseBody": {
  13060. "type": "string"
  13061. }
  13062. },
  13063. "required": ["message"],
  13064. "additionalProperties": false
  13065. }
  13066. },
  13067. "required": ["name", "data"],
  13068. "additionalProperties": false
  13069. },
  13070. "APIError": {
  13071. "type": "object",
  13072. "properties": {
  13073. "name": {
  13074. "type": "string",
  13075. "enum": ["APIError"]
  13076. },
  13077. "data": {
  13078. "type": "object",
  13079. "properties": {
  13080. "message": {
  13081. "type": "string"
  13082. },
  13083. "statusCode": {
  13084. "type": "integer",
  13085. "minimum": 0
  13086. },
  13087. "isRetryable": {
  13088. "type": "boolean"
  13089. },
  13090. "responseHeaders": {
  13091. "type": "object",
  13092. "additionalProperties": {
  13093. "type": "string"
  13094. }
  13095. },
  13096. "responseBody": {
  13097. "type": "string"
  13098. },
  13099. "metadata": {
  13100. "type": "object",
  13101. "additionalProperties": {
  13102. "type": "string"
  13103. }
  13104. }
  13105. },
  13106. "required": ["message", "isRetryable"],
  13107. "additionalProperties": false
  13108. }
  13109. },
  13110. "required": ["name", "data"],
  13111. "additionalProperties": false
  13112. },
  13113. "AssistantMessage": {
  13114. "type": "object",
  13115. "properties": {
  13116. "id": {
  13117. "type": "string",
  13118. "pattern": "^msg"
  13119. },
  13120. "sessionID": {
  13121. "type": "string",
  13122. "pattern": "^ses"
  13123. },
  13124. "role": {
  13125. "type": "string",
  13126. "enum": ["assistant"]
  13127. },
  13128. "time": {
  13129. "type": "object",
  13130. "properties": {
  13131. "created": {
  13132. "type": "integer",
  13133. "minimum": 0
  13134. },
  13135. "completed": {
  13136. "type": "integer",
  13137. "minimum": 0
  13138. }
  13139. },
  13140. "required": ["created"],
  13141. "additionalProperties": false
  13142. },
  13143. "error": {
  13144. "anyOf": [
  13145. {
  13146. "$ref": "#/components/schemas/ProviderAuthError"
  13147. },
  13148. {
  13149. "$ref": "#/components/schemas/UnknownError"
  13150. },
  13151. {
  13152. "$ref": "#/components/schemas/MessageOutputLengthError"
  13153. },
  13154. {
  13155. "$ref": "#/components/schemas/MessageAbortedError"
  13156. },
  13157. {
  13158. "$ref": "#/components/schemas/StructuredOutputError"
  13159. },
  13160. {
  13161. "$ref": "#/components/schemas/ContextOverflowError"
  13162. },
  13163. {
  13164. "$ref": "#/components/schemas/APIError"
  13165. }
  13166. ]
  13167. },
  13168. "parentID": {
  13169. "type": "string",
  13170. "pattern": "^msg"
  13171. },
  13172. "modelID": {
  13173. "type": "string"
  13174. },
  13175. "providerID": {
  13176. "type": "string"
  13177. },
  13178. "mode": {
  13179. "type": "string"
  13180. },
  13181. "agent": {
  13182. "type": "string"
  13183. },
  13184. "path": {
  13185. "type": "object",
  13186. "properties": {
  13187. "cwd": {
  13188. "type": "string"
  13189. },
  13190. "root": {
  13191. "type": "string"
  13192. }
  13193. },
  13194. "required": ["cwd", "root"],
  13195. "additionalProperties": false
  13196. },
  13197. "summary": {
  13198. "type": "boolean"
  13199. },
  13200. "cost": {
  13201. "type": "number"
  13202. },
  13203. "tokens": {
  13204. "type": "object",
  13205. "properties": {
  13206. "total": {
  13207. "type": "number"
  13208. },
  13209. "input": {
  13210. "type": "number"
  13211. },
  13212. "output": {
  13213. "type": "number"
  13214. },
  13215. "reasoning": {
  13216. "type": "number"
  13217. },
  13218. "cache": {
  13219. "type": "object",
  13220. "properties": {
  13221. "read": {
  13222. "type": "number"
  13223. },
  13224. "write": {
  13225. "type": "number"
  13226. }
  13227. },
  13228. "required": ["read", "write"],
  13229. "additionalProperties": false
  13230. }
  13231. },
  13232. "required": ["input", "output", "reasoning", "cache"],
  13233. "additionalProperties": false
  13234. },
  13235. "structured": {},
  13236. "variant": {
  13237. "type": "string"
  13238. },
  13239. "finish": {
  13240. "type": "string"
  13241. }
  13242. },
  13243. "required": [
  13244. "id",
  13245. "sessionID",
  13246. "role",
  13247. "time",
  13248. "parentID",
  13249. "modelID",
  13250. "providerID",
  13251. "mode",
  13252. "agent",
  13253. "path",
  13254. "cost",
  13255. "tokens"
  13256. ],
  13257. "additionalProperties": false
  13258. },
  13259. "Message": {
  13260. "anyOf": [
  13261. {
  13262. "$ref": "#/components/schemas/UserMessage"
  13263. },
  13264. {
  13265. "$ref": "#/components/schemas/AssistantMessage"
  13266. }
  13267. ]
  13268. },
  13269. "TextPart": {
  13270. "type": "object",
  13271. "properties": {
  13272. "id": {
  13273. "type": "string",
  13274. "pattern": "^prt"
  13275. },
  13276. "sessionID": {
  13277. "type": "string",
  13278. "pattern": "^ses"
  13279. },
  13280. "messageID": {
  13281. "type": "string",
  13282. "pattern": "^msg"
  13283. },
  13284. "type": {
  13285. "type": "string",
  13286. "enum": ["text"]
  13287. },
  13288. "text": {
  13289. "type": "string"
  13290. },
  13291. "synthetic": {
  13292. "type": "boolean"
  13293. },
  13294. "ignored": {
  13295. "type": "boolean"
  13296. },
  13297. "time": {
  13298. "type": "object",
  13299. "properties": {
  13300. "start": {
  13301. "type": "integer",
  13302. "minimum": 0
  13303. },
  13304. "end": {
  13305. "type": "integer",
  13306. "minimum": 0
  13307. }
  13308. },
  13309. "required": ["start"],
  13310. "additionalProperties": false
  13311. },
  13312. "metadata": {
  13313. "type": "object"
  13314. }
  13315. },
  13316. "required": ["id", "sessionID", "messageID", "type", "text"],
  13317. "additionalProperties": false
  13318. },
  13319. "SubtaskPart": {
  13320. "type": "object",
  13321. "properties": {
  13322. "id": {
  13323. "type": "string",
  13324. "pattern": "^prt"
  13325. },
  13326. "sessionID": {
  13327. "type": "string",
  13328. "pattern": "^ses"
  13329. },
  13330. "messageID": {
  13331. "type": "string",
  13332. "pattern": "^msg"
  13333. },
  13334. "type": {
  13335. "type": "string",
  13336. "enum": ["subtask"]
  13337. },
  13338. "prompt": {
  13339. "type": "string"
  13340. },
  13341. "description": {
  13342. "type": "string"
  13343. },
  13344. "agent": {
  13345. "type": "string"
  13346. },
  13347. "model": {
  13348. "type": "object",
  13349. "properties": {
  13350. "providerID": {
  13351. "type": "string"
  13352. },
  13353. "modelID": {
  13354. "type": "string"
  13355. }
  13356. },
  13357. "required": ["providerID", "modelID"],
  13358. "additionalProperties": false
  13359. },
  13360. "command": {
  13361. "type": "string"
  13362. }
  13363. },
  13364. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13365. "additionalProperties": false
  13366. },
  13367. "ReasoningPart": {
  13368. "type": "object",
  13369. "properties": {
  13370. "id": {
  13371. "type": "string",
  13372. "pattern": "^prt"
  13373. },
  13374. "sessionID": {
  13375. "type": "string",
  13376. "pattern": "^ses"
  13377. },
  13378. "messageID": {
  13379. "type": "string",
  13380. "pattern": "^msg"
  13381. },
  13382. "type": {
  13383. "type": "string",
  13384. "enum": ["reasoning"]
  13385. },
  13386. "text": {
  13387. "type": "string"
  13388. },
  13389. "metadata": {
  13390. "type": "object"
  13391. },
  13392. "time": {
  13393. "type": "object",
  13394. "properties": {
  13395. "start": {
  13396. "type": "integer",
  13397. "minimum": 0
  13398. },
  13399. "end": {
  13400. "type": "integer",
  13401. "minimum": 0
  13402. }
  13403. },
  13404. "required": ["start"],
  13405. "additionalProperties": false
  13406. }
  13407. },
  13408. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13409. "additionalProperties": false
  13410. },
  13411. "FilePartSourceText": {
  13412. "type": "object",
  13413. "properties": {
  13414. "value": {
  13415. "type": "string"
  13416. },
  13417. "start": {
  13418. "type": "number"
  13419. },
  13420. "end": {
  13421. "type": "number"
  13422. }
  13423. },
  13424. "required": ["value", "start", "end"],
  13425. "additionalProperties": false
  13426. },
  13427. "FileSource": {
  13428. "type": "object",
  13429. "properties": {
  13430. "text": {
  13431. "$ref": "#/components/schemas/FilePartSourceText"
  13432. },
  13433. "type": {
  13434. "type": "string",
  13435. "enum": ["file"]
  13436. },
  13437. "path": {
  13438. "type": "string"
  13439. }
  13440. },
  13441. "required": ["text", "type", "path"],
  13442. "additionalProperties": false
  13443. },
  13444. "Range": {
  13445. "type": "object",
  13446. "properties": {
  13447. "start": {
  13448. "type": "object",
  13449. "properties": {
  13450. "line": {
  13451. "type": "integer",
  13452. "minimum": 0
  13453. },
  13454. "character": {
  13455. "type": "integer",
  13456. "minimum": 0
  13457. }
  13458. },
  13459. "required": ["line", "character"],
  13460. "additionalProperties": false
  13461. },
  13462. "end": {
  13463. "type": "object",
  13464. "properties": {
  13465. "line": {
  13466. "type": "integer",
  13467. "minimum": 0
  13468. },
  13469. "character": {
  13470. "type": "integer",
  13471. "minimum": 0
  13472. }
  13473. },
  13474. "required": ["line", "character"],
  13475. "additionalProperties": false
  13476. }
  13477. },
  13478. "required": ["start", "end"],
  13479. "additionalProperties": false
  13480. },
  13481. "SymbolSource": {
  13482. "type": "object",
  13483. "properties": {
  13484. "text": {
  13485. "$ref": "#/components/schemas/FilePartSourceText"
  13486. },
  13487. "type": {
  13488. "type": "string",
  13489. "enum": ["symbol"]
  13490. },
  13491. "path": {
  13492. "type": "string"
  13493. },
  13494. "range": {
  13495. "$ref": "#/components/schemas/Range"
  13496. },
  13497. "name": {
  13498. "type": "string"
  13499. },
  13500. "kind": {
  13501. "type": "integer",
  13502. "minimum": 0
  13503. }
  13504. },
  13505. "required": ["text", "type", "path", "range", "name", "kind"],
  13506. "additionalProperties": false
  13507. },
  13508. "ResourceSource": {
  13509. "type": "object",
  13510. "properties": {
  13511. "text": {
  13512. "$ref": "#/components/schemas/FilePartSourceText"
  13513. },
  13514. "type": {
  13515. "type": "string",
  13516. "enum": ["resource"]
  13517. },
  13518. "clientName": {
  13519. "type": "string"
  13520. },
  13521. "uri": {
  13522. "type": "string"
  13523. }
  13524. },
  13525. "required": ["text", "type", "clientName", "uri"],
  13526. "additionalProperties": false
  13527. },
  13528. "FilePartSource": {
  13529. "anyOf": [
  13530. {
  13531. "$ref": "#/components/schemas/FileSource"
  13532. },
  13533. {
  13534. "$ref": "#/components/schemas/SymbolSource"
  13535. },
  13536. {
  13537. "$ref": "#/components/schemas/ResourceSource"
  13538. }
  13539. ]
  13540. },
  13541. "FilePart": {
  13542. "type": "object",
  13543. "properties": {
  13544. "id": {
  13545. "type": "string",
  13546. "pattern": "^prt"
  13547. },
  13548. "sessionID": {
  13549. "type": "string",
  13550. "pattern": "^ses"
  13551. },
  13552. "messageID": {
  13553. "type": "string",
  13554. "pattern": "^msg"
  13555. },
  13556. "type": {
  13557. "type": "string",
  13558. "enum": ["file"]
  13559. },
  13560. "mime": {
  13561. "type": "string"
  13562. },
  13563. "filename": {
  13564. "type": "string"
  13565. },
  13566. "url": {
  13567. "type": "string"
  13568. },
  13569. "source": {
  13570. "$ref": "#/components/schemas/FilePartSource"
  13571. }
  13572. },
  13573. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13574. "additionalProperties": false
  13575. },
  13576. "ToolStatePending": {
  13577. "type": "object",
  13578. "properties": {
  13579. "status": {
  13580. "type": "string",
  13581. "enum": ["pending"]
  13582. },
  13583. "input": {
  13584. "type": "object"
  13585. },
  13586. "raw": {
  13587. "type": "string"
  13588. }
  13589. },
  13590. "required": ["status", "input", "raw"],
  13591. "additionalProperties": false
  13592. },
  13593. "ToolStateRunning": {
  13594. "type": "object",
  13595. "properties": {
  13596. "status": {
  13597. "type": "string",
  13598. "enum": ["running"]
  13599. },
  13600. "input": {
  13601. "type": "object"
  13602. },
  13603. "title": {
  13604. "type": "string"
  13605. },
  13606. "metadata": {
  13607. "type": "object"
  13608. },
  13609. "time": {
  13610. "type": "object",
  13611. "properties": {
  13612. "start": {
  13613. "type": "integer",
  13614. "minimum": 0
  13615. }
  13616. },
  13617. "required": ["start"],
  13618. "additionalProperties": false
  13619. }
  13620. },
  13621. "required": ["status", "input", "time"],
  13622. "additionalProperties": false
  13623. },
  13624. "ToolStateCompleted": {
  13625. "type": "object",
  13626. "properties": {
  13627. "status": {
  13628. "type": "string",
  13629. "enum": ["completed"]
  13630. },
  13631. "input": {
  13632. "type": "object"
  13633. },
  13634. "output": {
  13635. "type": "string"
  13636. },
  13637. "title": {
  13638. "type": "string"
  13639. },
  13640. "metadata": {
  13641. "type": "object"
  13642. },
  13643. "time": {
  13644. "type": "object",
  13645. "properties": {
  13646. "start": {
  13647. "type": "integer",
  13648. "minimum": 0
  13649. },
  13650. "end": {
  13651. "type": "integer",
  13652. "minimum": 0
  13653. },
  13654. "compacted": {
  13655. "type": "integer",
  13656. "minimum": 0
  13657. }
  13658. },
  13659. "required": ["start", "end"],
  13660. "additionalProperties": false
  13661. },
  13662. "attachments": {
  13663. "type": "array",
  13664. "items": {
  13665. "$ref": "#/components/schemas/FilePart"
  13666. }
  13667. }
  13668. },
  13669. "required": ["status", "input", "output", "title", "metadata", "time"],
  13670. "additionalProperties": false
  13671. },
  13672. "ToolStateError": {
  13673. "type": "object",
  13674. "properties": {
  13675. "status": {
  13676. "type": "string",
  13677. "enum": ["error"]
  13678. },
  13679. "input": {
  13680. "type": "object"
  13681. },
  13682. "error": {
  13683. "type": "string"
  13684. },
  13685. "metadata": {
  13686. "type": "object"
  13687. },
  13688. "time": {
  13689. "type": "object",
  13690. "properties": {
  13691. "start": {
  13692. "type": "integer",
  13693. "minimum": 0
  13694. },
  13695. "end": {
  13696. "type": "integer",
  13697. "minimum": 0
  13698. }
  13699. },
  13700. "required": ["start", "end"],
  13701. "additionalProperties": false
  13702. }
  13703. },
  13704. "required": ["status", "input", "error", "time"],
  13705. "additionalProperties": false
  13706. },
  13707. "ToolState": {
  13708. "anyOf": [
  13709. {
  13710. "$ref": "#/components/schemas/ToolStatePending"
  13711. },
  13712. {
  13713. "$ref": "#/components/schemas/ToolStateRunning"
  13714. },
  13715. {
  13716. "$ref": "#/components/schemas/ToolStateCompleted"
  13717. },
  13718. {
  13719. "$ref": "#/components/schemas/ToolStateError"
  13720. }
  13721. ]
  13722. },
  13723. "ToolPart": {
  13724. "type": "object",
  13725. "properties": {
  13726. "id": {
  13727. "type": "string",
  13728. "pattern": "^prt"
  13729. },
  13730. "sessionID": {
  13731. "type": "string",
  13732. "pattern": "^ses"
  13733. },
  13734. "messageID": {
  13735. "type": "string",
  13736. "pattern": "^msg"
  13737. },
  13738. "type": {
  13739. "type": "string",
  13740. "enum": ["tool"]
  13741. },
  13742. "callID": {
  13743. "type": "string"
  13744. },
  13745. "tool": {
  13746. "type": "string"
  13747. },
  13748. "state": {
  13749. "$ref": "#/components/schemas/ToolState"
  13750. },
  13751. "metadata": {
  13752. "type": "object"
  13753. }
  13754. },
  13755. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13756. "additionalProperties": false
  13757. },
  13758. "StepStartPart": {
  13759. "type": "object",
  13760. "properties": {
  13761. "id": {
  13762. "type": "string",
  13763. "pattern": "^prt"
  13764. },
  13765. "sessionID": {
  13766. "type": "string",
  13767. "pattern": "^ses"
  13768. },
  13769. "messageID": {
  13770. "type": "string",
  13771. "pattern": "^msg"
  13772. },
  13773. "type": {
  13774. "type": "string",
  13775. "enum": ["step-start"]
  13776. },
  13777. "snapshot": {
  13778. "type": "string"
  13779. }
  13780. },
  13781. "required": ["id", "sessionID", "messageID", "type"],
  13782. "additionalProperties": false
  13783. },
  13784. "StepFinishPart": {
  13785. "type": "object",
  13786. "properties": {
  13787. "id": {
  13788. "type": "string",
  13789. "pattern": "^prt"
  13790. },
  13791. "sessionID": {
  13792. "type": "string",
  13793. "pattern": "^ses"
  13794. },
  13795. "messageID": {
  13796. "type": "string",
  13797. "pattern": "^msg"
  13798. },
  13799. "type": {
  13800. "type": "string",
  13801. "enum": ["step-finish"]
  13802. },
  13803. "reason": {
  13804. "type": "string"
  13805. },
  13806. "snapshot": {
  13807. "type": "string"
  13808. },
  13809. "cost": {
  13810. "type": "number"
  13811. },
  13812. "tokens": {
  13813. "type": "object",
  13814. "properties": {
  13815. "total": {
  13816. "type": "number"
  13817. },
  13818. "input": {
  13819. "type": "number"
  13820. },
  13821. "output": {
  13822. "type": "number"
  13823. },
  13824. "reasoning": {
  13825. "type": "number"
  13826. },
  13827. "cache": {
  13828. "type": "object",
  13829. "properties": {
  13830. "read": {
  13831. "type": "number"
  13832. },
  13833. "write": {
  13834. "type": "number"
  13835. }
  13836. },
  13837. "required": ["read", "write"],
  13838. "additionalProperties": false
  13839. }
  13840. },
  13841. "required": ["input", "output", "reasoning", "cache"],
  13842. "additionalProperties": false
  13843. }
  13844. },
  13845. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13846. "additionalProperties": false
  13847. },
  13848. "SnapshotPart": {
  13849. "type": "object",
  13850. "properties": {
  13851. "id": {
  13852. "type": "string",
  13853. "pattern": "^prt"
  13854. },
  13855. "sessionID": {
  13856. "type": "string",
  13857. "pattern": "^ses"
  13858. },
  13859. "messageID": {
  13860. "type": "string",
  13861. "pattern": "^msg"
  13862. },
  13863. "type": {
  13864. "type": "string",
  13865. "enum": ["snapshot"]
  13866. },
  13867. "snapshot": {
  13868. "type": "string"
  13869. }
  13870. },
  13871. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13872. "additionalProperties": false
  13873. },
  13874. "PatchPart": {
  13875. "type": "object",
  13876. "properties": {
  13877. "id": {
  13878. "type": "string",
  13879. "pattern": "^prt"
  13880. },
  13881. "sessionID": {
  13882. "type": "string",
  13883. "pattern": "^ses"
  13884. },
  13885. "messageID": {
  13886. "type": "string",
  13887. "pattern": "^msg"
  13888. },
  13889. "type": {
  13890. "type": "string",
  13891. "enum": ["patch"]
  13892. },
  13893. "hash": {
  13894. "type": "string"
  13895. },
  13896. "files": {
  13897. "type": "array",
  13898. "items": {
  13899. "type": "string"
  13900. }
  13901. }
  13902. },
  13903. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13904. "additionalProperties": false
  13905. },
  13906. "AgentPart": {
  13907. "type": "object",
  13908. "properties": {
  13909. "id": {
  13910. "type": "string",
  13911. "pattern": "^prt"
  13912. },
  13913. "sessionID": {
  13914. "type": "string",
  13915. "pattern": "^ses"
  13916. },
  13917. "messageID": {
  13918. "type": "string",
  13919. "pattern": "^msg"
  13920. },
  13921. "type": {
  13922. "type": "string",
  13923. "enum": ["agent"]
  13924. },
  13925. "name": {
  13926. "type": "string"
  13927. },
  13928. "source": {
  13929. "type": "object",
  13930. "properties": {
  13931. "value": {
  13932. "type": "string"
  13933. },
  13934. "start": {
  13935. "type": "integer",
  13936. "minimum": 0
  13937. },
  13938. "end": {
  13939. "type": "integer",
  13940. "minimum": 0
  13941. }
  13942. },
  13943. "required": ["value", "start", "end"],
  13944. "additionalProperties": false
  13945. }
  13946. },
  13947. "required": ["id", "sessionID", "messageID", "type", "name"],
  13948. "additionalProperties": false
  13949. },
  13950. "RetryPart": {
  13951. "type": "object",
  13952. "properties": {
  13953. "id": {
  13954. "type": "string",
  13955. "pattern": "^prt"
  13956. },
  13957. "sessionID": {
  13958. "type": "string",
  13959. "pattern": "^ses"
  13960. },
  13961. "messageID": {
  13962. "type": "string",
  13963. "pattern": "^msg"
  13964. },
  13965. "type": {
  13966. "type": "string",
  13967. "enum": ["retry"]
  13968. },
  13969. "attempt": {
  13970. "type": "integer",
  13971. "minimum": 0
  13972. },
  13973. "error": {
  13974. "$ref": "#/components/schemas/APIError"
  13975. },
  13976. "time": {
  13977. "type": "object",
  13978. "properties": {
  13979. "created": {
  13980. "type": "integer",
  13981. "minimum": 0
  13982. }
  13983. },
  13984. "required": ["created"],
  13985. "additionalProperties": false
  13986. }
  13987. },
  13988. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13989. "additionalProperties": false
  13990. },
  13991. "CompactionPart": {
  13992. "type": "object",
  13993. "properties": {
  13994. "id": {
  13995. "type": "string",
  13996. "pattern": "^prt"
  13997. },
  13998. "sessionID": {
  13999. "type": "string",
  14000. "pattern": "^ses"
  14001. },
  14002. "messageID": {
  14003. "type": "string",
  14004. "pattern": "^msg"
  14005. },
  14006. "type": {
  14007. "type": "string",
  14008. "enum": ["compaction"]
  14009. },
  14010. "auto": {
  14011. "type": "boolean"
  14012. },
  14013. "overflow": {
  14014. "type": "boolean"
  14015. },
  14016. "tail_start_id": {
  14017. "type": "string",
  14018. "pattern": "^msg"
  14019. }
  14020. },
  14021. "required": ["id", "sessionID", "messageID", "type", "auto"],
  14022. "additionalProperties": false
  14023. },
  14024. "Part": {
  14025. "anyOf": [
  14026. {
  14027. "$ref": "#/components/schemas/TextPart"
  14028. },
  14029. {
  14030. "$ref": "#/components/schemas/SubtaskPart"
  14031. },
  14032. {
  14033. "$ref": "#/components/schemas/ReasoningPart"
  14034. },
  14035. {
  14036. "$ref": "#/components/schemas/FilePart"
  14037. },
  14038. {
  14039. "$ref": "#/components/schemas/ToolPart"
  14040. },
  14041. {
  14042. "$ref": "#/components/schemas/StepStartPart"
  14043. },
  14044. {
  14045. "$ref": "#/components/schemas/StepFinishPart"
  14046. },
  14047. {
  14048. "$ref": "#/components/schemas/SnapshotPart"
  14049. },
  14050. {
  14051. "$ref": "#/components/schemas/PatchPart"
  14052. },
  14053. {
  14054. "$ref": "#/components/schemas/AgentPart"
  14055. },
  14056. {
  14057. "$ref": "#/components/schemas/RetryPart"
  14058. },
  14059. {
  14060. "$ref": "#/components/schemas/CompactionPart"
  14061. }
  14062. ]
  14063. },
  14064. "Prompt": {
  14065. "type": "object",
  14066. "properties": {
  14067. "text": {
  14068. "type": "string"
  14069. },
  14070. "files": {
  14071. "type": "array",
  14072. "items": {
  14073. "$ref": "#/components/schemas/PromptFileAttachment"
  14074. }
  14075. },
  14076. "agents": {
  14077. "type": "array",
  14078. "items": {
  14079. "$ref": "#/components/schemas/PromptAgentAttachment"
  14080. }
  14081. }
  14082. },
  14083. "required": ["text"],
  14084. "additionalProperties": false
  14085. },
  14086. "Pty": {
  14087. "type": "object",
  14088. "properties": {
  14089. "id": {
  14090. "type": "string",
  14091. "pattern": "^pty"
  14092. },
  14093. "title": {
  14094. "type": "string"
  14095. },
  14096. "command": {
  14097. "type": "string"
  14098. },
  14099. "args": {
  14100. "type": "array",
  14101. "items": {
  14102. "type": "string"
  14103. }
  14104. },
  14105. "cwd": {
  14106. "type": "string"
  14107. },
  14108. "status": {
  14109. "type": "string",
  14110. "enum": ["running", "exited"]
  14111. },
  14112. "pid": {
  14113. "type": "integer",
  14114. "minimum": 0
  14115. }
  14116. },
  14117. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  14118. "additionalProperties": false
  14119. },
  14120. "Todo": {
  14121. "type": "object",
  14122. "properties": {
  14123. "content": {
  14124. "type": "string",
  14125. "description": "Brief description of the task"
  14126. },
  14127. "status": {
  14128. "type": "string",
  14129. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  14130. },
  14131. "priority": {
  14132. "type": "string",
  14133. "description": "Priority level of the task: high, medium, low"
  14134. }
  14135. },
  14136. "required": ["content", "status", "priority"],
  14137. "additionalProperties": false
  14138. },
  14139. "QuestionOption": {
  14140. "type": "object",
  14141. "properties": {
  14142. "label": {
  14143. "type": "string",
  14144. "description": "Display text (1-5 words, concise)"
  14145. },
  14146. "description": {
  14147. "type": "string",
  14148. "description": "Explanation of choice"
  14149. }
  14150. },
  14151. "required": ["label", "description"],
  14152. "additionalProperties": false
  14153. },
  14154. "QuestionInfo": {
  14155. "type": "object",
  14156. "properties": {
  14157. "question": {
  14158. "type": "string",
  14159. "description": "Complete question"
  14160. },
  14161. "header": {
  14162. "type": "string",
  14163. "description": "Very short label (max 30 chars)"
  14164. },
  14165. "options": {
  14166. "type": "array",
  14167. "items": {
  14168. "$ref": "#/components/schemas/QuestionOption"
  14169. },
  14170. "description": "Available choices"
  14171. },
  14172. "multiple": {
  14173. "type": "boolean"
  14174. },
  14175. "custom": {
  14176. "type": "boolean"
  14177. }
  14178. },
  14179. "required": ["question", "header", "options"],
  14180. "additionalProperties": false
  14181. },
  14182. "QuestionTool": {
  14183. "type": "object",
  14184. "properties": {
  14185. "messageID": {
  14186. "type": "string",
  14187. "pattern": "^msg"
  14188. },
  14189. "callID": {
  14190. "type": "string"
  14191. }
  14192. },
  14193. "required": ["messageID", "callID"],
  14194. "additionalProperties": false
  14195. },
  14196. "QuestionAnswer": {
  14197. "type": "array",
  14198. "items": {
  14199. "type": "string"
  14200. }
  14201. },
  14202. "SessionStatus": {
  14203. "anyOf": [
  14204. {
  14205. "type": "object",
  14206. "properties": {
  14207. "type": {
  14208. "type": "string",
  14209. "enum": ["idle"]
  14210. }
  14211. },
  14212. "required": ["type"],
  14213. "additionalProperties": false
  14214. },
  14215. {
  14216. "type": "object",
  14217. "properties": {
  14218. "type": {
  14219. "type": "string",
  14220. "enum": ["retry"]
  14221. },
  14222. "attempt": {
  14223. "type": "integer",
  14224. "minimum": 0
  14225. },
  14226. "message": {
  14227. "type": "string"
  14228. },
  14229. "action": {
  14230. "type": "object",
  14231. "properties": {
  14232. "reason": {
  14233. "type": "string"
  14234. },
  14235. "provider": {
  14236. "type": "string"
  14237. },
  14238. "title": {
  14239. "type": "string"
  14240. },
  14241. "message": {
  14242. "type": "string"
  14243. },
  14244. "label": {
  14245. "type": "string"
  14246. },
  14247. "link": {
  14248. "type": "string"
  14249. }
  14250. },
  14251. "required": ["reason", "provider", "title", "message", "label"],
  14252. "additionalProperties": false
  14253. },
  14254. "next": {
  14255. "type": "integer",
  14256. "minimum": 0
  14257. }
  14258. },
  14259. "required": ["type", "attempt", "message", "next"],
  14260. "additionalProperties": false
  14261. },
  14262. {
  14263. "type": "object",
  14264. "properties": {
  14265. "type": {
  14266. "type": "string",
  14267. "enum": ["busy"]
  14268. }
  14269. },
  14270. "required": ["type"],
  14271. "additionalProperties": false
  14272. }
  14273. ]
  14274. },
  14275. "GlobalEvent": {
  14276. "type": "object",
  14277. "properties": {
  14278. "directory": {
  14279. "type": "string"
  14280. },
  14281. "project": {
  14282. "type": "string"
  14283. },
  14284. "workspace": {
  14285. "type": "string"
  14286. },
  14287. "payload": {
  14288. "anyOf": [
  14289. {
  14290. "type": "object",
  14291. "properties": {
  14292. "id": {
  14293. "type": "string",
  14294. "pattern": "^evt_"
  14295. },
  14296. "type": {
  14297. "type": "string",
  14298. "enum": ["models-dev.refreshed"]
  14299. },
  14300. "properties": {
  14301. "type": "object",
  14302. "properties": {}
  14303. }
  14304. },
  14305. "required": ["id", "type", "properties"],
  14306. "additionalProperties": false
  14307. },
  14308. {
  14309. "type": "object",
  14310. "properties": {
  14311. "id": {
  14312. "type": "string",
  14313. "pattern": "^evt_"
  14314. },
  14315. "type": {
  14316. "type": "string",
  14317. "enum": ["plugin.added"]
  14318. },
  14319. "properties": {
  14320. "type": "object",
  14321. "properties": {
  14322. "id": {
  14323. "type": "string"
  14324. }
  14325. },
  14326. "required": ["id"],
  14327. "additionalProperties": false
  14328. }
  14329. },
  14330. "required": ["id", "type", "properties"],
  14331. "additionalProperties": false
  14332. },
  14333. {
  14334. "type": "object",
  14335. "properties": {
  14336. "id": {
  14337. "type": "string",
  14338. "pattern": "^evt_"
  14339. },
  14340. "type": {
  14341. "type": "string",
  14342. "enum": ["catalog.model.updated"]
  14343. },
  14344. "properties": {
  14345. "type": "object",
  14346. "properties": {
  14347. "model": {
  14348. "$ref": "#/components/schemas/ModelV2Info"
  14349. }
  14350. },
  14351. "required": ["model"],
  14352. "additionalProperties": false
  14353. }
  14354. },
  14355. "required": ["id", "type", "properties"],
  14356. "additionalProperties": false
  14357. },
  14358. {
  14359. "type": "object",
  14360. "properties": {
  14361. "id": {
  14362. "type": "string",
  14363. "pattern": "^evt_"
  14364. },
  14365. "type": {
  14366. "type": "string",
  14367. "enum": ["session.created"]
  14368. },
  14369. "properties": {
  14370. "type": "object",
  14371. "properties": {
  14372. "sessionID": {
  14373. "type": "string",
  14374. "pattern": "^ses"
  14375. },
  14376. "info": {
  14377. "$ref": "#/components/schemas/Session"
  14378. }
  14379. },
  14380. "required": ["sessionID", "info"],
  14381. "additionalProperties": false
  14382. }
  14383. },
  14384. "required": ["id", "type", "properties"],
  14385. "additionalProperties": false
  14386. },
  14387. {
  14388. "type": "object",
  14389. "properties": {
  14390. "id": {
  14391. "type": "string",
  14392. "pattern": "^evt_"
  14393. },
  14394. "type": {
  14395. "type": "string",
  14396. "enum": ["session.updated"]
  14397. },
  14398. "properties": {
  14399. "type": "object",
  14400. "properties": {
  14401. "sessionID": {
  14402. "type": "string",
  14403. "pattern": "^ses"
  14404. },
  14405. "info": {
  14406. "$ref": "#/components/schemas/Session"
  14407. }
  14408. },
  14409. "required": ["sessionID", "info"],
  14410. "additionalProperties": false
  14411. }
  14412. },
  14413. "required": ["id", "type", "properties"],
  14414. "additionalProperties": false
  14415. },
  14416. {
  14417. "type": "object",
  14418. "properties": {
  14419. "id": {
  14420. "type": "string",
  14421. "pattern": "^evt_"
  14422. },
  14423. "type": {
  14424. "type": "string",
  14425. "enum": ["session.deleted"]
  14426. },
  14427. "properties": {
  14428. "type": "object",
  14429. "properties": {
  14430. "sessionID": {
  14431. "type": "string",
  14432. "pattern": "^ses"
  14433. },
  14434. "info": {
  14435. "$ref": "#/components/schemas/Session"
  14436. }
  14437. },
  14438. "required": ["sessionID", "info"],
  14439. "additionalProperties": false
  14440. }
  14441. },
  14442. "required": ["id", "type", "properties"],
  14443. "additionalProperties": false
  14444. },
  14445. {
  14446. "type": "object",
  14447. "properties": {
  14448. "id": {
  14449. "type": "string",
  14450. "pattern": "^evt_"
  14451. },
  14452. "type": {
  14453. "type": "string",
  14454. "enum": ["message.updated"]
  14455. },
  14456. "properties": {
  14457. "type": "object",
  14458. "properties": {
  14459. "sessionID": {
  14460. "type": "string",
  14461. "pattern": "^ses"
  14462. },
  14463. "info": {
  14464. "$ref": "#/components/schemas/Message"
  14465. }
  14466. },
  14467. "required": ["sessionID", "info"],
  14468. "additionalProperties": false
  14469. }
  14470. },
  14471. "required": ["id", "type", "properties"],
  14472. "additionalProperties": false
  14473. },
  14474. {
  14475. "type": "object",
  14476. "properties": {
  14477. "id": {
  14478. "type": "string",
  14479. "pattern": "^evt_"
  14480. },
  14481. "type": {
  14482. "type": "string",
  14483. "enum": ["message.removed"]
  14484. },
  14485. "properties": {
  14486. "type": "object",
  14487. "properties": {
  14488. "sessionID": {
  14489. "type": "string",
  14490. "pattern": "^ses"
  14491. },
  14492. "messageID": {
  14493. "type": "string",
  14494. "pattern": "^msg"
  14495. }
  14496. },
  14497. "required": ["sessionID", "messageID"],
  14498. "additionalProperties": false
  14499. }
  14500. },
  14501. "required": ["id", "type", "properties"],
  14502. "additionalProperties": false
  14503. },
  14504. {
  14505. "type": "object",
  14506. "properties": {
  14507. "id": {
  14508. "type": "string",
  14509. "pattern": "^evt_"
  14510. },
  14511. "type": {
  14512. "type": "string",
  14513. "enum": ["message.part.updated"]
  14514. },
  14515. "properties": {
  14516. "type": "object",
  14517. "properties": {
  14518. "sessionID": {
  14519. "type": "string",
  14520. "pattern": "^ses"
  14521. },
  14522. "part": {
  14523. "$ref": "#/components/schemas/Part"
  14524. },
  14525. "time": {
  14526. "type": "number"
  14527. }
  14528. },
  14529. "required": ["sessionID", "part", "time"],
  14530. "additionalProperties": false
  14531. }
  14532. },
  14533. "required": ["id", "type", "properties"],
  14534. "additionalProperties": false
  14535. },
  14536. {
  14537. "type": "object",
  14538. "properties": {
  14539. "id": {
  14540. "type": "string",
  14541. "pattern": "^evt_"
  14542. },
  14543. "type": {
  14544. "type": "string",
  14545. "enum": ["message.part.removed"]
  14546. },
  14547. "properties": {
  14548. "type": "object",
  14549. "properties": {
  14550. "sessionID": {
  14551. "type": "string",
  14552. "pattern": "^ses"
  14553. },
  14554. "messageID": {
  14555. "type": "string",
  14556. "pattern": "^msg"
  14557. },
  14558. "partID": {
  14559. "type": "string",
  14560. "pattern": "^prt"
  14561. }
  14562. },
  14563. "required": ["sessionID", "messageID", "partID"],
  14564. "additionalProperties": false
  14565. }
  14566. },
  14567. "required": ["id", "type", "properties"],
  14568. "additionalProperties": false
  14569. },
  14570. {
  14571. "type": "object",
  14572. "properties": {
  14573. "id": {
  14574. "type": "string",
  14575. "pattern": "^evt_"
  14576. },
  14577. "type": {
  14578. "type": "string",
  14579. "enum": ["session.next.agent.switched"]
  14580. },
  14581. "properties": {
  14582. "type": "object",
  14583. "properties": {
  14584. "timestamp": {
  14585. "type": "number"
  14586. },
  14587. "sessionID": {
  14588. "type": "string",
  14589. "pattern": "^ses"
  14590. },
  14591. "messageID": {
  14592. "type": "string",
  14593. "pattern": "^msg_"
  14594. },
  14595. "agent": {
  14596. "type": "string"
  14597. }
  14598. },
  14599. "required": ["timestamp", "sessionID", "messageID", "agent"],
  14600. "additionalProperties": false
  14601. }
  14602. },
  14603. "required": ["id", "type", "properties"],
  14604. "additionalProperties": false
  14605. },
  14606. {
  14607. "type": "object",
  14608. "properties": {
  14609. "id": {
  14610. "type": "string",
  14611. "pattern": "^evt_"
  14612. },
  14613. "type": {
  14614. "type": "string",
  14615. "enum": ["session.next.model.switched"]
  14616. },
  14617. "properties": {
  14618. "type": "object",
  14619. "properties": {
  14620. "timestamp": {
  14621. "type": "number"
  14622. },
  14623. "sessionID": {
  14624. "type": "string",
  14625. "pattern": "^ses"
  14626. },
  14627. "messageID": {
  14628. "type": "string",
  14629. "pattern": "^msg_"
  14630. },
  14631. "model": {
  14632. "type": "object",
  14633. "properties": {
  14634. "id": {
  14635. "type": "string"
  14636. },
  14637. "providerID": {
  14638. "type": "string"
  14639. },
  14640. "variant": {
  14641. "type": "string"
  14642. }
  14643. },
  14644. "required": ["id", "providerID"],
  14645. "additionalProperties": false
  14646. }
  14647. },
  14648. "required": ["timestamp", "sessionID", "messageID", "model"],
  14649. "additionalProperties": false
  14650. }
  14651. },
  14652. "required": ["id", "type", "properties"],
  14653. "additionalProperties": false
  14654. },
  14655. {
  14656. "type": "object",
  14657. "properties": {
  14658. "id": {
  14659. "type": "string",
  14660. "pattern": "^evt_"
  14661. },
  14662. "type": {
  14663. "type": "string",
  14664. "enum": ["session.next.moved"]
  14665. },
  14666. "properties": {
  14667. "type": "object",
  14668. "properties": {
  14669. "timestamp": {
  14670. "type": "number"
  14671. },
  14672. "sessionID": {
  14673. "type": "string",
  14674. "pattern": "^ses"
  14675. },
  14676. "location": {
  14677. "$ref": "#/components/schemas/LocationRef"
  14678. },
  14679. "subdirectory": {
  14680. "type": "string"
  14681. }
  14682. },
  14683. "required": ["timestamp", "sessionID", "location"],
  14684. "additionalProperties": false
  14685. }
  14686. },
  14687. "required": ["id", "type", "properties"],
  14688. "additionalProperties": false
  14689. },
  14690. {
  14691. "type": "object",
  14692. "properties": {
  14693. "id": {
  14694. "type": "string",
  14695. "pattern": "^evt_"
  14696. },
  14697. "type": {
  14698. "type": "string",
  14699. "enum": ["session.next.prompted"]
  14700. },
  14701. "properties": {
  14702. "type": "object",
  14703. "properties": {
  14704. "timestamp": {
  14705. "type": "number"
  14706. },
  14707. "sessionID": {
  14708. "type": "string",
  14709. "pattern": "^ses"
  14710. },
  14711. "messageID": {
  14712. "type": "string",
  14713. "pattern": "^msg_"
  14714. },
  14715. "prompt": {
  14716. "$ref": "#/components/schemas/Prompt"
  14717. },
  14718. "delivery": {
  14719. "type": "string",
  14720. "enum": ["steer", "queue"]
  14721. }
  14722. },
  14723. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14724. "additionalProperties": false
  14725. }
  14726. },
  14727. "required": ["id", "type", "properties"],
  14728. "additionalProperties": false
  14729. },
  14730. {
  14731. "type": "object",
  14732. "properties": {
  14733. "id": {
  14734. "type": "string",
  14735. "pattern": "^evt_"
  14736. },
  14737. "type": {
  14738. "type": "string",
  14739. "enum": ["session.next.prompt.admitted"]
  14740. },
  14741. "properties": {
  14742. "type": "object",
  14743. "properties": {
  14744. "timestamp": {
  14745. "type": "number"
  14746. },
  14747. "sessionID": {
  14748. "type": "string",
  14749. "pattern": "^ses"
  14750. },
  14751. "messageID": {
  14752. "type": "string",
  14753. "pattern": "^msg_"
  14754. },
  14755. "prompt": {
  14756. "$ref": "#/components/schemas/Prompt"
  14757. },
  14758. "delivery": {
  14759. "type": "string",
  14760. "enum": ["steer", "queue"]
  14761. }
  14762. },
  14763. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14764. "additionalProperties": false
  14765. }
  14766. },
  14767. "required": ["id", "type", "properties"],
  14768. "additionalProperties": false
  14769. },
  14770. {
  14771. "type": "object",
  14772. "properties": {
  14773. "id": {
  14774. "type": "string",
  14775. "pattern": "^evt_"
  14776. },
  14777. "type": {
  14778. "type": "string",
  14779. "enum": ["session.next.prompt.promoted"]
  14780. },
  14781. "properties": {
  14782. "type": "object",
  14783. "properties": {
  14784. "timestamp": {
  14785. "type": "number"
  14786. },
  14787. "sessionID": {
  14788. "type": "string",
  14789. "pattern": "^ses"
  14790. },
  14791. "messageID": {
  14792. "type": "string",
  14793. "pattern": "^msg_"
  14794. },
  14795. "prompt": {
  14796. "$ref": "#/components/schemas/Prompt"
  14797. },
  14798. "timeCreated": {
  14799. "type": "number"
  14800. }
  14801. },
  14802. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  14803. "additionalProperties": false
  14804. }
  14805. },
  14806. "required": ["id", "type", "properties"],
  14807. "additionalProperties": false
  14808. },
  14809. {
  14810. "type": "object",
  14811. "properties": {
  14812. "id": {
  14813. "type": "string",
  14814. "pattern": "^evt_"
  14815. },
  14816. "type": {
  14817. "type": "string",
  14818. "enum": ["session.next.interrupt.requested"]
  14819. },
  14820. "properties": {
  14821. "type": "object",
  14822. "properties": {
  14823. "timestamp": {
  14824. "type": "number"
  14825. },
  14826. "sessionID": {
  14827. "type": "string",
  14828. "pattern": "^ses"
  14829. }
  14830. },
  14831. "required": ["timestamp", "sessionID"],
  14832. "additionalProperties": false
  14833. }
  14834. },
  14835. "required": ["id", "type", "properties"],
  14836. "additionalProperties": false
  14837. },
  14838. {
  14839. "type": "object",
  14840. "properties": {
  14841. "id": {
  14842. "type": "string",
  14843. "pattern": "^evt_"
  14844. },
  14845. "type": {
  14846. "type": "string",
  14847. "enum": ["session.next.context.updated"]
  14848. },
  14849. "properties": {
  14850. "type": "object",
  14851. "properties": {
  14852. "timestamp": {
  14853. "type": "number"
  14854. },
  14855. "sessionID": {
  14856. "type": "string",
  14857. "pattern": "^ses"
  14858. },
  14859. "messageID": {
  14860. "type": "string",
  14861. "pattern": "^msg_"
  14862. },
  14863. "text": {
  14864. "type": "string"
  14865. }
  14866. },
  14867. "required": ["timestamp", "sessionID", "messageID", "text"],
  14868. "additionalProperties": false
  14869. }
  14870. },
  14871. "required": ["id", "type", "properties"],
  14872. "additionalProperties": false
  14873. },
  14874. {
  14875. "type": "object",
  14876. "properties": {
  14877. "id": {
  14878. "type": "string",
  14879. "pattern": "^evt_"
  14880. },
  14881. "type": {
  14882. "type": "string",
  14883. "enum": ["session.next.synthetic"]
  14884. },
  14885. "properties": {
  14886. "type": "object",
  14887. "properties": {
  14888. "timestamp": {
  14889. "type": "number"
  14890. },
  14891. "sessionID": {
  14892. "type": "string",
  14893. "pattern": "^ses"
  14894. },
  14895. "messageID": {
  14896. "type": "string",
  14897. "pattern": "^msg_"
  14898. },
  14899. "text": {
  14900. "type": "string"
  14901. }
  14902. },
  14903. "required": ["timestamp", "sessionID", "messageID", "text"],
  14904. "additionalProperties": false
  14905. }
  14906. },
  14907. "required": ["id", "type", "properties"],
  14908. "additionalProperties": false
  14909. },
  14910. {
  14911. "type": "object",
  14912. "properties": {
  14913. "id": {
  14914. "type": "string",
  14915. "pattern": "^evt_"
  14916. },
  14917. "type": {
  14918. "type": "string",
  14919. "enum": ["session.next.shell.started"]
  14920. },
  14921. "properties": {
  14922. "type": "object",
  14923. "properties": {
  14924. "timestamp": {
  14925. "type": "number"
  14926. },
  14927. "sessionID": {
  14928. "type": "string",
  14929. "pattern": "^ses"
  14930. },
  14931. "messageID": {
  14932. "type": "string",
  14933. "pattern": "^msg_"
  14934. },
  14935. "callID": {
  14936. "type": "string"
  14937. },
  14938. "command": {
  14939. "type": "string"
  14940. }
  14941. },
  14942. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  14943. "additionalProperties": false
  14944. }
  14945. },
  14946. "required": ["id", "type", "properties"],
  14947. "additionalProperties": false
  14948. },
  14949. {
  14950. "type": "object",
  14951. "properties": {
  14952. "id": {
  14953. "type": "string",
  14954. "pattern": "^evt_"
  14955. },
  14956. "type": {
  14957. "type": "string",
  14958. "enum": ["session.next.shell.ended"]
  14959. },
  14960. "properties": {
  14961. "type": "object",
  14962. "properties": {
  14963. "timestamp": {
  14964. "type": "number"
  14965. },
  14966. "sessionID": {
  14967. "type": "string",
  14968. "pattern": "^ses"
  14969. },
  14970. "callID": {
  14971. "type": "string"
  14972. },
  14973. "output": {
  14974. "type": "string"
  14975. }
  14976. },
  14977. "required": ["timestamp", "sessionID", "callID", "output"],
  14978. "additionalProperties": false
  14979. }
  14980. },
  14981. "required": ["id", "type", "properties"],
  14982. "additionalProperties": false
  14983. },
  14984. {
  14985. "type": "object",
  14986. "properties": {
  14987. "id": {
  14988. "type": "string",
  14989. "pattern": "^evt_"
  14990. },
  14991. "type": {
  14992. "type": "string",
  14993. "enum": ["session.next.step.started"]
  14994. },
  14995. "properties": {
  14996. "type": "object",
  14997. "properties": {
  14998. "timestamp": {
  14999. "type": "number"
  15000. },
  15001. "sessionID": {
  15002. "type": "string",
  15003. "pattern": "^ses"
  15004. },
  15005. "assistantMessageID": {
  15006. "type": "string",
  15007. "pattern": "^msg_"
  15008. },
  15009. "agent": {
  15010. "type": "string"
  15011. },
  15012. "model": {
  15013. "type": "object",
  15014. "properties": {
  15015. "id": {
  15016. "type": "string"
  15017. },
  15018. "providerID": {
  15019. "type": "string"
  15020. },
  15021. "variant": {
  15022. "type": "string"
  15023. }
  15024. },
  15025. "required": ["id", "providerID"],
  15026. "additionalProperties": false
  15027. },
  15028. "snapshot": {
  15029. "type": "string"
  15030. }
  15031. },
  15032. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  15033. "additionalProperties": false
  15034. }
  15035. },
  15036. "required": ["id", "type", "properties"],
  15037. "additionalProperties": false
  15038. },
  15039. {
  15040. "type": "object",
  15041. "properties": {
  15042. "id": {
  15043. "type": "string",
  15044. "pattern": "^evt_"
  15045. },
  15046. "type": {
  15047. "type": "string",
  15048. "enum": ["session.next.step.ended"]
  15049. },
  15050. "properties": {
  15051. "type": "object",
  15052. "properties": {
  15053. "timestamp": {
  15054. "type": "number"
  15055. },
  15056. "sessionID": {
  15057. "type": "string",
  15058. "pattern": "^ses"
  15059. },
  15060. "assistantMessageID": {
  15061. "type": "string",
  15062. "pattern": "^msg_"
  15063. },
  15064. "finish": {
  15065. "type": "string"
  15066. },
  15067. "cost": {
  15068. "type": "number"
  15069. },
  15070. "tokens": {
  15071. "type": "object",
  15072. "properties": {
  15073. "input": {
  15074. "type": "number"
  15075. },
  15076. "output": {
  15077. "type": "number"
  15078. },
  15079. "reasoning": {
  15080. "type": "number"
  15081. },
  15082. "cache": {
  15083. "type": "object",
  15084. "properties": {
  15085. "read": {
  15086. "type": "number"
  15087. },
  15088. "write": {
  15089. "type": "number"
  15090. }
  15091. },
  15092. "required": ["read", "write"],
  15093. "additionalProperties": false
  15094. }
  15095. },
  15096. "required": ["input", "output", "reasoning", "cache"],
  15097. "additionalProperties": false
  15098. },
  15099. "snapshot": {
  15100. "type": "string"
  15101. }
  15102. },
  15103. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  15104. "additionalProperties": false
  15105. }
  15106. },
  15107. "required": ["id", "type", "properties"],
  15108. "additionalProperties": false
  15109. },
  15110. {
  15111. "type": "object",
  15112. "properties": {
  15113. "id": {
  15114. "type": "string",
  15115. "pattern": "^evt_"
  15116. },
  15117. "type": {
  15118. "type": "string",
  15119. "enum": ["session.next.step.failed"]
  15120. },
  15121. "properties": {
  15122. "type": "object",
  15123. "properties": {
  15124. "timestamp": {
  15125. "type": "number"
  15126. },
  15127. "sessionID": {
  15128. "type": "string",
  15129. "pattern": "^ses"
  15130. },
  15131. "assistantMessageID": {
  15132. "type": "string",
  15133. "pattern": "^msg_"
  15134. },
  15135. "error": {
  15136. "$ref": "#/components/schemas/SessionErrorUnknown"
  15137. }
  15138. },
  15139. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  15140. "additionalProperties": false
  15141. }
  15142. },
  15143. "required": ["id", "type", "properties"],
  15144. "additionalProperties": false
  15145. },
  15146. {
  15147. "type": "object",
  15148. "properties": {
  15149. "id": {
  15150. "type": "string",
  15151. "pattern": "^evt_"
  15152. },
  15153. "type": {
  15154. "type": "string",
  15155. "enum": ["session.next.text.started"]
  15156. },
  15157. "properties": {
  15158. "type": "object",
  15159. "properties": {
  15160. "timestamp": {
  15161. "type": "number"
  15162. },
  15163. "sessionID": {
  15164. "type": "string",
  15165. "pattern": "^ses"
  15166. },
  15167. "assistantMessageID": {
  15168. "type": "string",
  15169. "pattern": "^msg_"
  15170. },
  15171. "textID": {
  15172. "type": "string"
  15173. }
  15174. },
  15175. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  15176. "additionalProperties": false
  15177. }
  15178. },
  15179. "required": ["id", "type", "properties"],
  15180. "additionalProperties": false
  15181. },
  15182. {
  15183. "type": "object",
  15184. "properties": {
  15185. "id": {
  15186. "type": "string",
  15187. "pattern": "^evt_"
  15188. },
  15189. "type": {
  15190. "type": "string",
  15191. "enum": ["session.next.text.delta"]
  15192. },
  15193. "properties": {
  15194. "type": "object",
  15195. "properties": {
  15196. "timestamp": {
  15197. "type": "number"
  15198. },
  15199. "sessionID": {
  15200. "type": "string",
  15201. "pattern": "^ses"
  15202. },
  15203. "assistantMessageID": {
  15204. "type": "string",
  15205. "pattern": "^msg_"
  15206. },
  15207. "textID": {
  15208. "type": "string"
  15209. },
  15210. "delta": {
  15211. "type": "string"
  15212. }
  15213. },
  15214. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  15215. "additionalProperties": false
  15216. }
  15217. },
  15218. "required": ["id", "type", "properties"],
  15219. "additionalProperties": false
  15220. },
  15221. {
  15222. "type": "object",
  15223. "properties": {
  15224. "id": {
  15225. "type": "string",
  15226. "pattern": "^evt_"
  15227. },
  15228. "type": {
  15229. "type": "string",
  15230. "enum": ["session.next.text.ended"]
  15231. },
  15232. "properties": {
  15233. "type": "object",
  15234. "properties": {
  15235. "timestamp": {
  15236. "type": "number"
  15237. },
  15238. "sessionID": {
  15239. "type": "string",
  15240. "pattern": "^ses"
  15241. },
  15242. "assistantMessageID": {
  15243. "type": "string",
  15244. "pattern": "^msg_"
  15245. },
  15246. "textID": {
  15247. "type": "string"
  15248. },
  15249. "text": {
  15250. "type": "string"
  15251. }
  15252. },
  15253. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  15254. "additionalProperties": false
  15255. }
  15256. },
  15257. "required": ["id", "type", "properties"],
  15258. "additionalProperties": false
  15259. },
  15260. {
  15261. "type": "object",
  15262. "properties": {
  15263. "id": {
  15264. "type": "string",
  15265. "pattern": "^evt_"
  15266. },
  15267. "type": {
  15268. "type": "string",
  15269. "enum": ["session.next.reasoning.started"]
  15270. },
  15271. "properties": {
  15272. "type": "object",
  15273. "properties": {
  15274. "timestamp": {
  15275. "type": "number"
  15276. },
  15277. "sessionID": {
  15278. "type": "string",
  15279. "pattern": "^ses"
  15280. },
  15281. "assistantMessageID": {
  15282. "type": "string",
  15283. "pattern": "^msg_"
  15284. },
  15285. "reasoningID": {
  15286. "type": "string"
  15287. },
  15288. "providerMetadata": {
  15289. "type": "object",
  15290. "additionalProperties": {
  15291. "type": "object"
  15292. }
  15293. }
  15294. },
  15295. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15296. "additionalProperties": false
  15297. }
  15298. },
  15299. "required": ["id", "type", "properties"],
  15300. "additionalProperties": false
  15301. },
  15302. {
  15303. "type": "object",
  15304. "properties": {
  15305. "id": {
  15306. "type": "string",
  15307. "pattern": "^evt_"
  15308. },
  15309. "type": {
  15310. "type": "string",
  15311. "enum": ["session.next.reasoning.delta"]
  15312. },
  15313. "properties": {
  15314. "type": "object",
  15315. "properties": {
  15316. "timestamp": {
  15317. "type": "number"
  15318. },
  15319. "sessionID": {
  15320. "type": "string",
  15321. "pattern": "^ses"
  15322. },
  15323. "assistantMessageID": {
  15324. "type": "string",
  15325. "pattern": "^msg_"
  15326. },
  15327. "reasoningID": {
  15328. "type": "string"
  15329. },
  15330. "delta": {
  15331. "type": "string"
  15332. }
  15333. },
  15334. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  15335. "additionalProperties": false
  15336. }
  15337. },
  15338. "required": ["id", "type", "properties"],
  15339. "additionalProperties": false
  15340. },
  15341. {
  15342. "type": "object",
  15343. "properties": {
  15344. "id": {
  15345. "type": "string",
  15346. "pattern": "^evt_"
  15347. },
  15348. "type": {
  15349. "type": "string",
  15350. "enum": ["session.next.reasoning.ended"]
  15351. },
  15352. "properties": {
  15353. "type": "object",
  15354. "properties": {
  15355. "timestamp": {
  15356. "type": "number"
  15357. },
  15358. "sessionID": {
  15359. "type": "string",
  15360. "pattern": "^ses"
  15361. },
  15362. "assistantMessageID": {
  15363. "type": "string",
  15364. "pattern": "^msg_"
  15365. },
  15366. "reasoningID": {
  15367. "type": "string"
  15368. },
  15369. "text": {
  15370. "type": "string"
  15371. },
  15372. "providerMetadata": {
  15373. "type": "object",
  15374. "additionalProperties": {
  15375. "type": "object"
  15376. }
  15377. }
  15378. },
  15379. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15380. "additionalProperties": false
  15381. }
  15382. },
  15383. "required": ["id", "type", "properties"],
  15384. "additionalProperties": false
  15385. },
  15386. {
  15387. "type": "object",
  15388. "properties": {
  15389. "id": {
  15390. "type": "string",
  15391. "pattern": "^evt_"
  15392. },
  15393. "type": {
  15394. "type": "string",
  15395. "enum": ["session.next.tool.input.started"]
  15396. },
  15397. "properties": {
  15398. "type": "object",
  15399. "properties": {
  15400. "timestamp": {
  15401. "type": "number"
  15402. },
  15403. "sessionID": {
  15404. "type": "string",
  15405. "pattern": "^ses"
  15406. },
  15407. "assistantMessageID": {
  15408. "type": "string",
  15409. "pattern": "^msg_"
  15410. },
  15411. "callID": {
  15412. "type": "string"
  15413. },
  15414. "name": {
  15415. "type": "string"
  15416. }
  15417. },
  15418. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15419. "additionalProperties": false
  15420. }
  15421. },
  15422. "required": ["id", "type", "properties"],
  15423. "additionalProperties": false
  15424. },
  15425. {
  15426. "type": "object",
  15427. "properties": {
  15428. "id": {
  15429. "type": "string",
  15430. "pattern": "^evt_"
  15431. },
  15432. "type": {
  15433. "type": "string",
  15434. "enum": ["session.next.tool.input.delta"]
  15435. },
  15436. "properties": {
  15437. "type": "object",
  15438. "properties": {
  15439. "timestamp": {
  15440. "type": "number"
  15441. },
  15442. "sessionID": {
  15443. "type": "string",
  15444. "pattern": "^ses"
  15445. },
  15446. "assistantMessageID": {
  15447. "type": "string",
  15448. "pattern": "^msg_"
  15449. },
  15450. "callID": {
  15451. "type": "string"
  15452. },
  15453. "delta": {
  15454. "type": "string"
  15455. }
  15456. },
  15457. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15458. "additionalProperties": false
  15459. }
  15460. },
  15461. "required": ["id", "type", "properties"],
  15462. "additionalProperties": false
  15463. },
  15464. {
  15465. "type": "object",
  15466. "properties": {
  15467. "id": {
  15468. "type": "string",
  15469. "pattern": "^evt_"
  15470. },
  15471. "type": {
  15472. "type": "string",
  15473. "enum": ["session.next.tool.input.ended"]
  15474. },
  15475. "properties": {
  15476. "type": "object",
  15477. "properties": {
  15478. "timestamp": {
  15479. "type": "number"
  15480. },
  15481. "sessionID": {
  15482. "type": "string",
  15483. "pattern": "^ses"
  15484. },
  15485. "assistantMessageID": {
  15486. "type": "string",
  15487. "pattern": "^msg_"
  15488. },
  15489. "callID": {
  15490. "type": "string"
  15491. },
  15492. "text": {
  15493. "type": "string"
  15494. }
  15495. },
  15496. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15497. "additionalProperties": false
  15498. }
  15499. },
  15500. "required": ["id", "type", "properties"],
  15501. "additionalProperties": false
  15502. },
  15503. {
  15504. "type": "object",
  15505. "properties": {
  15506. "id": {
  15507. "type": "string",
  15508. "pattern": "^evt_"
  15509. },
  15510. "type": {
  15511. "type": "string",
  15512. "enum": ["session.next.tool.called"]
  15513. },
  15514. "properties": {
  15515. "type": "object",
  15516. "properties": {
  15517. "timestamp": {
  15518. "type": "number"
  15519. },
  15520. "sessionID": {
  15521. "type": "string",
  15522. "pattern": "^ses"
  15523. },
  15524. "assistantMessageID": {
  15525. "type": "string",
  15526. "pattern": "^msg_"
  15527. },
  15528. "callID": {
  15529. "type": "string"
  15530. },
  15531. "tool": {
  15532. "type": "string"
  15533. },
  15534. "input": {
  15535. "type": "object"
  15536. },
  15537. "provider": {
  15538. "type": "object",
  15539. "properties": {
  15540. "executed": {
  15541. "type": "boolean"
  15542. },
  15543. "metadata": {
  15544. "type": "object",
  15545. "additionalProperties": {
  15546. "type": "object"
  15547. }
  15548. }
  15549. },
  15550. "required": ["executed"],
  15551. "additionalProperties": false
  15552. }
  15553. },
  15554. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15555. "additionalProperties": false
  15556. }
  15557. },
  15558. "required": ["id", "type", "properties"],
  15559. "additionalProperties": false
  15560. },
  15561. {
  15562. "type": "object",
  15563. "properties": {
  15564. "id": {
  15565. "type": "string",
  15566. "pattern": "^evt_"
  15567. },
  15568. "type": {
  15569. "type": "string",
  15570. "enum": ["session.next.tool.progress"]
  15571. },
  15572. "properties": {
  15573. "type": "object",
  15574. "properties": {
  15575. "timestamp": {
  15576. "type": "number"
  15577. },
  15578. "sessionID": {
  15579. "type": "string",
  15580. "pattern": "^ses"
  15581. },
  15582. "assistantMessageID": {
  15583. "type": "string",
  15584. "pattern": "^msg_"
  15585. },
  15586. "callID": {
  15587. "type": "string"
  15588. },
  15589. "structured": {
  15590. "type": "object"
  15591. },
  15592. "content": {
  15593. "type": "array",
  15594. "items": {
  15595. "anyOf": [
  15596. {
  15597. "$ref": "#/components/schemas/ToolTextContent"
  15598. },
  15599. {
  15600. "$ref": "#/components/schemas/ToolFileContent"
  15601. }
  15602. ]
  15603. }
  15604. }
  15605. },
  15606. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15607. "additionalProperties": false
  15608. }
  15609. },
  15610. "required": ["id", "type", "properties"],
  15611. "additionalProperties": false
  15612. },
  15613. {
  15614. "type": "object",
  15615. "properties": {
  15616. "id": {
  15617. "type": "string",
  15618. "pattern": "^evt_"
  15619. },
  15620. "type": {
  15621. "type": "string",
  15622. "enum": ["session.next.tool.success"]
  15623. },
  15624. "properties": {
  15625. "type": "object",
  15626. "properties": {
  15627. "timestamp": {
  15628. "type": "number"
  15629. },
  15630. "sessionID": {
  15631. "type": "string",
  15632. "pattern": "^ses"
  15633. },
  15634. "assistantMessageID": {
  15635. "type": "string",
  15636. "pattern": "^msg_"
  15637. },
  15638. "callID": {
  15639. "type": "string"
  15640. },
  15641. "structured": {
  15642. "type": "object"
  15643. },
  15644. "content": {
  15645. "type": "array",
  15646. "items": {
  15647. "anyOf": [
  15648. {
  15649. "$ref": "#/components/schemas/ToolTextContent"
  15650. },
  15651. {
  15652. "$ref": "#/components/schemas/ToolFileContent"
  15653. }
  15654. ]
  15655. }
  15656. },
  15657. "outputPaths": {
  15658. "type": "array",
  15659. "items": {
  15660. "type": "string"
  15661. }
  15662. },
  15663. "result": {},
  15664. "provider": {
  15665. "type": "object",
  15666. "properties": {
  15667. "executed": {
  15668. "type": "boolean"
  15669. },
  15670. "metadata": {
  15671. "type": "object",
  15672. "additionalProperties": {
  15673. "type": "object"
  15674. }
  15675. }
  15676. },
  15677. "required": ["executed"],
  15678. "additionalProperties": false
  15679. }
  15680. },
  15681. "required": [
  15682. "timestamp",
  15683. "sessionID",
  15684. "assistantMessageID",
  15685. "callID",
  15686. "structured",
  15687. "content",
  15688. "provider"
  15689. ],
  15690. "additionalProperties": false
  15691. }
  15692. },
  15693. "required": ["id", "type", "properties"],
  15694. "additionalProperties": false
  15695. },
  15696. {
  15697. "type": "object",
  15698. "properties": {
  15699. "id": {
  15700. "type": "string",
  15701. "pattern": "^evt_"
  15702. },
  15703. "type": {
  15704. "type": "string",
  15705. "enum": ["session.next.tool.failed"]
  15706. },
  15707. "properties": {
  15708. "type": "object",
  15709. "properties": {
  15710. "timestamp": {
  15711. "type": "number"
  15712. },
  15713. "sessionID": {
  15714. "type": "string",
  15715. "pattern": "^ses"
  15716. },
  15717. "assistantMessageID": {
  15718. "type": "string",
  15719. "pattern": "^msg_"
  15720. },
  15721. "callID": {
  15722. "type": "string"
  15723. },
  15724. "error": {
  15725. "$ref": "#/components/schemas/SessionErrorUnknown"
  15726. },
  15727. "result": {},
  15728. "provider": {
  15729. "type": "object",
  15730. "properties": {
  15731. "executed": {
  15732. "type": "boolean"
  15733. },
  15734. "metadata": {
  15735. "type": "object",
  15736. "additionalProperties": {
  15737. "type": "object"
  15738. }
  15739. }
  15740. },
  15741. "required": ["executed"],
  15742. "additionalProperties": false
  15743. }
  15744. },
  15745. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15746. "additionalProperties": false
  15747. }
  15748. },
  15749. "required": ["id", "type", "properties"],
  15750. "additionalProperties": false
  15751. },
  15752. {
  15753. "type": "object",
  15754. "properties": {
  15755. "id": {
  15756. "type": "string",
  15757. "pattern": "^evt_"
  15758. },
  15759. "type": {
  15760. "type": "string",
  15761. "enum": ["session.next.retried"]
  15762. },
  15763. "properties": {
  15764. "type": "object",
  15765. "properties": {
  15766. "timestamp": {
  15767. "type": "number"
  15768. },
  15769. "sessionID": {
  15770. "type": "string",
  15771. "pattern": "^ses"
  15772. },
  15773. "attempt": {
  15774. "type": "number"
  15775. },
  15776. "error": {
  15777. "$ref": "#/components/schemas/SessionNextRetry_error"
  15778. }
  15779. },
  15780. "required": ["timestamp", "sessionID", "attempt", "error"],
  15781. "additionalProperties": false
  15782. }
  15783. },
  15784. "required": ["id", "type", "properties"],
  15785. "additionalProperties": false
  15786. },
  15787. {
  15788. "type": "object",
  15789. "properties": {
  15790. "id": {
  15791. "type": "string",
  15792. "pattern": "^evt_"
  15793. },
  15794. "type": {
  15795. "type": "string",
  15796. "enum": ["session.next.compaction.started"]
  15797. },
  15798. "properties": {
  15799. "type": "object",
  15800. "properties": {
  15801. "timestamp": {
  15802. "type": "number"
  15803. },
  15804. "sessionID": {
  15805. "type": "string",
  15806. "pattern": "^ses"
  15807. },
  15808. "messageID": {
  15809. "type": "string",
  15810. "pattern": "^msg_"
  15811. },
  15812. "reason": {
  15813. "type": "string",
  15814. "enum": ["auto", "manual"]
  15815. }
  15816. },
  15817. "required": ["timestamp", "sessionID", "messageID", "reason"],
  15818. "additionalProperties": false
  15819. }
  15820. },
  15821. "required": ["id", "type", "properties"],
  15822. "additionalProperties": false
  15823. },
  15824. {
  15825. "type": "object",
  15826. "properties": {
  15827. "id": {
  15828. "type": "string",
  15829. "pattern": "^evt_"
  15830. },
  15831. "type": {
  15832. "type": "string",
  15833. "enum": ["session.next.compaction.delta"]
  15834. },
  15835. "properties": {
  15836. "type": "object",
  15837. "properties": {
  15838. "timestamp": {
  15839. "type": "number"
  15840. },
  15841. "sessionID": {
  15842. "type": "string",
  15843. "pattern": "^ses"
  15844. },
  15845. "messageID": {
  15846. "type": "string",
  15847. "pattern": "^msg_"
  15848. },
  15849. "text": {
  15850. "type": "string"
  15851. }
  15852. },
  15853. "required": ["timestamp", "sessionID", "messageID", "text"],
  15854. "additionalProperties": false
  15855. }
  15856. },
  15857. "required": ["id", "type", "properties"],
  15858. "additionalProperties": false
  15859. },
  15860. {
  15861. "type": "object",
  15862. "properties": {
  15863. "id": {
  15864. "type": "string",
  15865. "pattern": "^evt_"
  15866. },
  15867. "type": {
  15868. "type": "string",
  15869. "enum": ["session.next.compaction.ended"]
  15870. },
  15871. "properties": {
  15872. "type": "object",
  15873. "properties": {
  15874. "timestamp": {
  15875. "type": "number"
  15876. },
  15877. "sessionID": {
  15878. "type": "string",
  15879. "pattern": "^ses"
  15880. },
  15881. "messageID": {
  15882. "type": "string",
  15883. "pattern": "^msg_"
  15884. },
  15885. "reason": {
  15886. "type": "string",
  15887. "enum": ["auto", "manual"]
  15888. },
  15889. "text": {
  15890. "type": "string"
  15891. },
  15892. "recent": {
  15893. "type": "string"
  15894. }
  15895. },
  15896. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  15897. "additionalProperties": false
  15898. }
  15899. },
  15900. "required": ["id", "type", "properties"],
  15901. "additionalProperties": false
  15902. },
  15903. {
  15904. "type": "object",
  15905. "properties": {
  15906. "id": {
  15907. "type": "string",
  15908. "pattern": "^evt_"
  15909. },
  15910. "type": {
  15911. "type": "string",
  15912. "enum": ["message.part.delta"]
  15913. },
  15914. "properties": {
  15915. "type": "object",
  15916. "properties": {
  15917. "sessionID": {
  15918. "type": "string",
  15919. "pattern": "^ses"
  15920. },
  15921. "messageID": {
  15922. "type": "string",
  15923. "pattern": "^msg"
  15924. },
  15925. "partID": {
  15926. "type": "string",
  15927. "pattern": "^prt"
  15928. },
  15929. "field": {
  15930. "type": "string"
  15931. },
  15932. "delta": {
  15933. "type": "string"
  15934. }
  15935. },
  15936. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15937. "additionalProperties": false
  15938. }
  15939. },
  15940. "required": ["id", "type", "properties"],
  15941. "additionalProperties": false
  15942. },
  15943. {
  15944. "type": "object",
  15945. "properties": {
  15946. "id": {
  15947. "type": "string",
  15948. "pattern": "^evt_"
  15949. },
  15950. "type": {
  15951. "type": "string",
  15952. "enum": ["session.diff"]
  15953. },
  15954. "properties": {
  15955. "type": "object",
  15956. "properties": {
  15957. "sessionID": {
  15958. "type": "string",
  15959. "pattern": "^ses"
  15960. },
  15961. "diff": {
  15962. "type": "array",
  15963. "items": {
  15964. "$ref": "#/components/schemas/SnapshotFileDiff"
  15965. }
  15966. }
  15967. },
  15968. "required": ["sessionID", "diff"],
  15969. "additionalProperties": false
  15970. }
  15971. },
  15972. "required": ["id", "type", "properties"],
  15973. "additionalProperties": false
  15974. },
  15975. {
  15976. "type": "object",
  15977. "properties": {
  15978. "id": {
  15979. "type": "string",
  15980. "pattern": "^evt_"
  15981. },
  15982. "type": {
  15983. "type": "string",
  15984. "enum": ["session.error"]
  15985. },
  15986. "properties": {
  15987. "type": "object",
  15988. "properties": {
  15989. "sessionID": {
  15990. "type": "string",
  15991. "pattern": "^ses"
  15992. },
  15993. "error": {
  15994. "anyOf": [
  15995. {
  15996. "$ref": "#/components/schemas/ProviderAuthError"
  15997. },
  15998. {
  15999. "$ref": "#/components/schemas/UnknownError"
  16000. },
  16001. {
  16002. "$ref": "#/components/schemas/MessageOutputLengthError"
  16003. },
  16004. {
  16005. "$ref": "#/components/schemas/MessageAbortedError"
  16006. },
  16007. {
  16008. "$ref": "#/components/schemas/StructuredOutputError"
  16009. },
  16010. {
  16011. "$ref": "#/components/schemas/ContextOverflowError"
  16012. },
  16013. {
  16014. "$ref": "#/components/schemas/APIError"
  16015. }
  16016. ]
  16017. }
  16018. },
  16019. "additionalProperties": false
  16020. }
  16021. },
  16022. "required": ["id", "type", "properties"],
  16023. "additionalProperties": false
  16024. },
  16025. {
  16026. "type": "object",
  16027. "properties": {
  16028. "id": {
  16029. "type": "string",
  16030. "pattern": "^evt_"
  16031. },
  16032. "type": {
  16033. "type": "string",
  16034. "enum": ["installation.updated"]
  16035. },
  16036. "properties": {
  16037. "type": "object",
  16038. "properties": {
  16039. "version": {
  16040. "type": "string"
  16041. }
  16042. },
  16043. "required": ["version"],
  16044. "additionalProperties": false
  16045. }
  16046. },
  16047. "required": ["id", "type", "properties"],
  16048. "additionalProperties": false
  16049. },
  16050. {
  16051. "type": "object",
  16052. "properties": {
  16053. "id": {
  16054. "type": "string",
  16055. "pattern": "^evt_"
  16056. },
  16057. "type": {
  16058. "type": "string",
  16059. "enum": ["installation.update-available"]
  16060. },
  16061. "properties": {
  16062. "type": "object",
  16063. "properties": {
  16064. "version": {
  16065. "type": "string"
  16066. }
  16067. },
  16068. "required": ["version"],
  16069. "additionalProperties": false
  16070. }
  16071. },
  16072. "required": ["id", "type", "properties"],
  16073. "additionalProperties": false
  16074. },
  16075. {
  16076. "type": "object",
  16077. "properties": {
  16078. "id": {
  16079. "type": "string",
  16080. "pattern": "^evt_"
  16081. },
  16082. "type": {
  16083. "type": "string",
  16084. "enum": ["file.edited"]
  16085. },
  16086. "properties": {
  16087. "type": "object",
  16088. "properties": {
  16089. "file": {
  16090. "type": "string"
  16091. }
  16092. },
  16093. "required": ["file"],
  16094. "additionalProperties": false
  16095. }
  16096. },
  16097. "required": ["id", "type", "properties"],
  16098. "additionalProperties": false
  16099. },
  16100. {
  16101. "type": "object",
  16102. "properties": {
  16103. "id": {
  16104. "type": "string",
  16105. "pattern": "^evt_"
  16106. },
  16107. "type": {
  16108. "type": "string",
  16109. "enum": ["account.added"]
  16110. },
  16111. "properties": {
  16112. "type": "object",
  16113. "properties": {
  16114. "account": {
  16115. "$ref": "#/components/schemas/AuthInfo"
  16116. }
  16117. },
  16118. "required": ["account"],
  16119. "additionalProperties": false
  16120. }
  16121. },
  16122. "required": ["id", "type", "properties"],
  16123. "additionalProperties": false
  16124. },
  16125. {
  16126. "type": "object",
  16127. "properties": {
  16128. "id": {
  16129. "type": "string",
  16130. "pattern": "^evt_"
  16131. },
  16132. "type": {
  16133. "type": "string",
  16134. "enum": ["account.removed"]
  16135. },
  16136. "properties": {
  16137. "type": "object",
  16138. "properties": {
  16139. "account": {
  16140. "$ref": "#/components/schemas/AuthInfo"
  16141. }
  16142. },
  16143. "required": ["account"],
  16144. "additionalProperties": false
  16145. }
  16146. },
  16147. "required": ["id", "type", "properties"],
  16148. "additionalProperties": false
  16149. },
  16150. {
  16151. "type": "object",
  16152. "properties": {
  16153. "id": {
  16154. "type": "string",
  16155. "pattern": "^evt_"
  16156. },
  16157. "type": {
  16158. "type": "string",
  16159. "enum": ["account.switched"]
  16160. },
  16161. "properties": {
  16162. "type": "object",
  16163. "properties": {
  16164. "serviceID": {
  16165. "type": "string"
  16166. },
  16167. "from": {
  16168. "type": "string"
  16169. },
  16170. "to": {
  16171. "type": "string"
  16172. }
  16173. },
  16174. "required": ["serviceID"],
  16175. "additionalProperties": false
  16176. }
  16177. },
  16178. "required": ["id", "type", "properties"],
  16179. "additionalProperties": false
  16180. },
  16181. {
  16182. "type": "object",
  16183. "properties": {
  16184. "id": {
  16185. "type": "string",
  16186. "pattern": "^evt_"
  16187. },
  16188. "type": {
  16189. "type": "string",
  16190. "enum": ["permission.v2.asked"]
  16191. },
  16192. "properties": {
  16193. "type": "object",
  16194. "properties": {
  16195. "id": {
  16196. "type": "string",
  16197. "pattern": "^per"
  16198. },
  16199. "sessionID": {
  16200. "type": "string",
  16201. "pattern": "^ses"
  16202. },
  16203. "action": {
  16204. "type": "string"
  16205. },
  16206. "resources": {
  16207. "type": "array",
  16208. "items": {
  16209. "type": "string"
  16210. }
  16211. },
  16212. "save": {
  16213. "type": "array",
  16214. "items": {
  16215. "type": "string"
  16216. }
  16217. },
  16218. "metadata": {
  16219. "type": "object"
  16220. },
  16221. "source": {
  16222. "$ref": "#/components/schemas/PermissionV2Source"
  16223. }
  16224. },
  16225. "required": ["id", "sessionID", "action", "resources"],
  16226. "additionalProperties": false
  16227. }
  16228. },
  16229. "required": ["id", "type", "properties"],
  16230. "additionalProperties": false
  16231. },
  16232. {
  16233. "type": "object",
  16234. "properties": {
  16235. "id": {
  16236. "type": "string",
  16237. "pattern": "^evt_"
  16238. },
  16239. "type": {
  16240. "type": "string",
  16241. "enum": ["permission.v2.replied"]
  16242. },
  16243. "properties": {
  16244. "type": "object",
  16245. "properties": {
  16246. "sessionID": {
  16247. "type": "string",
  16248. "pattern": "^ses"
  16249. },
  16250. "requestID": {
  16251. "type": "string",
  16252. "pattern": "^per"
  16253. },
  16254. "reply": {
  16255. "$ref": "#/components/schemas/PermissionV2Reply"
  16256. }
  16257. },
  16258. "required": ["sessionID", "requestID", "reply"],
  16259. "additionalProperties": false
  16260. }
  16261. },
  16262. "required": ["id", "type", "properties"],
  16263. "additionalProperties": false
  16264. },
  16265. {
  16266. "type": "object",
  16267. "properties": {
  16268. "id": {
  16269. "type": "string",
  16270. "pattern": "^evt_"
  16271. },
  16272. "type": {
  16273. "type": "string",
  16274. "enum": ["reference.updated"]
  16275. },
  16276. "properties": {
  16277. "type": "object",
  16278. "properties": {}
  16279. }
  16280. },
  16281. "required": ["id", "type", "properties"],
  16282. "additionalProperties": false
  16283. },
  16284. {
  16285. "type": "object",
  16286. "properties": {
  16287. "id": {
  16288. "type": "string",
  16289. "pattern": "^evt_"
  16290. },
  16291. "type": {
  16292. "type": "string",
  16293. "enum": ["file.watcher.updated"]
  16294. },
  16295. "properties": {
  16296. "type": "object",
  16297. "properties": {
  16298. "file": {
  16299. "type": "string"
  16300. },
  16301. "event": {
  16302. "type": "string",
  16303. "enum": ["add", "change", "unlink"]
  16304. }
  16305. },
  16306. "required": ["file", "event"],
  16307. "additionalProperties": false
  16308. }
  16309. },
  16310. "required": ["id", "type", "properties"],
  16311. "additionalProperties": false
  16312. },
  16313. {
  16314. "type": "object",
  16315. "properties": {
  16316. "id": {
  16317. "type": "string",
  16318. "pattern": "^evt_"
  16319. },
  16320. "type": {
  16321. "type": "string",
  16322. "enum": ["pty.created"]
  16323. },
  16324. "properties": {
  16325. "type": "object",
  16326. "properties": {
  16327. "info": {
  16328. "$ref": "#/components/schemas/Pty"
  16329. }
  16330. },
  16331. "required": ["info"],
  16332. "additionalProperties": false
  16333. }
  16334. },
  16335. "required": ["id", "type", "properties"],
  16336. "additionalProperties": false
  16337. },
  16338. {
  16339. "type": "object",
  16340. "properties": {
  16341. "id": {
  16342. "type": "string",
  16343. "pattern": "^evt_"
  16344. },
  16345. "type": {
  16346. "type": "string",
  16347. "enum": ["pty.updated"]
  16348. },
  16349. "properties": {
  16350. "type": "object",
  16351. "properties": {
  16352. "info": {
  16353. "$ref": "#/components/schemas/Pty"
  16354. }
  16355. },
  16356. "required": ["info"],
  16357. "additionalProperties": false
  16358. }
  16359. },
  16360. "required": ["id", "type", "properties"],
  16361. "additionalProperties": false
  16362. },
  16363. {
  16364. "type": "object",
  16365. "properties": {
  16366. "id": {
  16367. "type": "string",
  16368. "pattern": "^evt_"
  16369. },
  16370. "type": {
  16371. "type": "string",
  16372. "enum": ["pty.exited"]
  16373. },
  16374. "properties": {
  16375. "type": "object",
  16376. "properties": {
  16377. "id": {
  16378. "type": "string",
  16379. "pattern": "^pty"
  16380. },
  16381. "exitCode": {
  16382. "type": "integer",
  16383. "minimum": 0
  16384. }
  16385. },
  16386. "required": ["id", "exitCode"],
  16387. "additionalProperties": false
  16388. }
  16389. },
  16390. "required": ["id", "type", "properties"],
  16391. "additionalProperties": false
  16392. },
  16393. {
  16394. "type": "object",
  16395. "properties": {
  16396. "id": {
  16397. "type": "string",
  16398. "pattern": "^evt_"
  16399. },
  16400. "type": {
  16401. "type": "string",
  16402. "enum": ["pty.deleted"]
  16403. },
  16404. "properties": {
  16405. "type": "object",
  16406. "properties": {
  16407. "id": {
  16408. "type": "string",
  16409. "pattern": "^pty"
  16410. }
  16411. },
  16412. "required": ["id"],
  16413. "additionalProperties": false
  16414. }
  16415. },
  16416. "required": ["id", "type", "properties"],
  16417. "additionalProperties": false
  16418. },
  16419. {
  16420. "type": "object",
  16421. "properties": {
  16422. "id": {
  16423. "type": "string",
  16424. "pattern": "^evt_"
  16425. },
  16426. "type": {
  16427. "type": "string",
  16428. "enum": ["question.v2.asked"]
  16429. },
  16430. "properties": {
  16431. "type": "object",
  16432. "properties": {
  16433. "id": {
  16434. "type": "string",
  16435. "pattern": "^que"
  16436. },
  16437. "sessionID": {
  16438. "type": "string",
  16439. "pattern": "^ses"
  16440. },
  16441. "questions": {
  16442. "type": "array",
  16443. "items": {
  16444. "$ref": "#/components/schemas/QuestionV2Info"
  16445. },
  16446. "description": "Questions to ask"
  16447. },
  16448. "tool": {
  16449. "$ref": "#/components/schemas/QuestionV2Tool"
  16450. }
  16451. },
  16452. "required": ["id", "sessionID", "questions"],
  16453. "additionalProperties": false
  16454. }
  16455. },
  16456. "required": ["id", "type", "properties"],
  16457. "additionalProperties": false
  16458. },
  16459. {
  16460. "type": "object",
  16461. "properties": {
  16462. "id": {
  16463. "type": "string",
  16464. "pattern": "^evt_"
  16465. },
  16466. "type": {
  16467. "type": "string",
  16468. "enum": ["question.v2.replied"]
  16469. },
  16470. "properties": {
  16471. "type": "object",
  16472. "properties": {
  16473. "sessionID": {
  16474. "type": "string",
  16475. "pattern": "^ses"
  16476. },
  16477. "requestID": {
  16478. "type": "string",
  16479. "pattern": "^que"
  16480. },
  16481. "answers": {
  16482. "type": "array",
  16483. "items": {
  16484. "$ref": "#/components/schemas/QuestionV2Answer"
  16485. }
  16486. }
  16487. },
  16488. "required": ["sessionID", "requestID", "answers"],
  16489. "additionalProperties": false
  16490. }
  16491. },
  16492. "required": ["id", "type", "properties"],
  16493. "additionalProperties": false
  16494. },
  16495. {
  16496. "type": "object",
  16497. "properties": {
  16498. "id": {
  16499. "type": "string",
  16500. "pattern": "^evt_"
  16501. },
  16502. "type": {
  16503. "type": "string",
  16504. "enum": ["question.v2.rejected"]
  16505. },
  16506. "properties": {
  16507. "type": "object",
  16508. "properties": {
  16509. "sessionID": {
  16510. "type": "string",
  16511. "pattern": "^ses"
  16512. },
  16513. "requestID": {
  16514. "type": "string",
  16515. "pattern": "^que"
  16516. }
  16517. },
  16518. "required": ["sessionID", "requestID"],
  16519. "additionalProperties": false
  16520. }
  16521. },
  16522. "required": ["id", "type", "properties"],
  16523. "additionalProperties": false
  16524. },
  16525. {
  16526. "type": "object",
  16527. "properties": {
  16528. "id": {
  16529. "type": "string",
  16530. "pattern": "^evt_"
  16531. },
  16532. "type": {
  16533. "type": "string",
  16534. "enum": ["todo.updated"]
  16535. },
  16536. "properties": {
  16537. "type": "object",
  16538. "properties": {
  16539. "sessionID": {
  16540. "type": "string",
  16541. "pattern": "^ses"
  16542. },
  16543. "todos": {
  16544. "type": "array",
  16545. "items": {
  16546. "$ref": "#/components/schemas/Todo"
  16547. }
  16548. }
  16549. },
  16550. "required": ["sessionID", "todos"],
  16551. "additionalProperties": false
  16552. }
  16553. },
  16554. "required": ["id", "type", "properties"],
  16555. "additionalProperties": false
  16556. },
  16557. {
  16558. "type": "object",
  16559. "properties": {
  16560. "id": {
  16561. "type": "string",
  16562. "pattern": "^evt_"
  16563. },
  16564. "type": {
  16565. "type": "string",
  16566. "enum": ["lsp.updated"]
  16567. },
  16568. "properties": {
  16569. "type": "object",
  16570. "properties": {}
  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": ["permission.asked"]
  16586. },
  16587. "properties": {
  16588. "type": "object",
  16589. "properties": {
  16590. "id": {
  16591. "type": "string",
  16592. "pattern": "^per"
  16593. },
  16594. "sessionID": {
  16595. "type": "string",
  16596. "pattern": "^ses"
  16597. },
  16598. "permission": {
  16599. "type": "string"
  16600. },
  16601. "patterns": {
  16602. "type": "array",
  16603. "items": {
  16604. "type": "string"
  16605. }
  16606. },
  16607. "metadata": {
  16608. "type": "object"
  16609. },
  16610. "always": {
  16611. "type": "array",
  16612. "items": {
  16613. "type": "string"
  16614. }
  16615. },
  16616. "tool": {
  16617. "type": "object",
  16618. "properties": {
  16619. "messageID": {
  16620. "type": "string"
  16621. },
  16622. "callID": {
  16623. "type": "string"
  16624. }
  16625. },
  16626. "required": ["messageID", "callID"],
  16627. "additionalProperties": false
  16628. }
  16629. },
  16630. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16631. "additionalProperties": false
  16632. }
  16633. },
  16634. "required": ["id", "type", "properties"],
  16635. "additionalProperties": false
  16636. },
  16637. {
  16638. "type": "object",
  16639. "properties": {
  16640. "id": {
  16641. "type": "string",
  16642. "pattern": "^evt_"
  16643. },
  16644. "type": {
  16645. "type": "string",
  16646. "enum": ["permission.replied"]
  16647. },
  16648. "properties": {
  16649. "type": "object",
  16650. "properties": {
  16651. "sessionID": {
  16652. "type": "string",
  16653. "pattern": "^ses"
  16654. },
  16655. "requestID": {
  16656. "type": "string",
  16657. "pattern": "^per"
  16658. },
  16659. "reply": {
  16660. "type": "string",
  16661. "enum": ["once", "always", "reject"]
  16662. }
  16663. },
  16664. "required": ["sessionID", "requestID", "reply"],
  16665. "additionalProperties": false
  16666. }
  16667. },
  16668. "required": ["id", "type", "properties"],
  16669. "additionalProperties": false
  16670. },
  16671. {
  16672. "type": "object",
  16673. "properties": {
  16674. "id": {
  16675. "type": "string",
  16676. "pattern": "^evt_"
  16677. },
  16678. "type": {
  16679. "type": "string",
  16680. "enum": ["tui.prompt.append"]
  16681. },
  16682. "properties": {
  16683. "type": "object",
  16684. "properties": {
  16685. "text": {
  16686. "type": "string"
  16687. }
  16688. },
  16689. "required": ["text"],
  16690. "additionalProperties": false
  16691. }
  16692. },
  16693. "required": ["id", "type", "properties"],
  16694. "additionalProperties": false
  16695. },
  16696. {
  16697. "type": "object",
  16698. "properties": {
  16699. "id": {
  16700. "type": "string",
  16701. "pattern": "^evt_"
  16702. },
  16703. "type": {
  16704. "type": "string",
  16705. "enum": ["tui.command.execute"]
  16706. },
  16707. "properties": {
  16708. "type": "object",
  16709. "properties": {
  16710. "command": {
  16711. "anyOf": [
  16712. {
  16713. "type": "string",
  16714. "enum": [
  16715. "session.list",
  16716. "session.new",
  16717. "session.share",
  16718. "session.interrupt",
  16719. "session.compact",
  16720. "session.page.up",
  16721. "session.page.down",
  16722. "session.line.up",
  16723. "session.line.down",
  16724. "session.half.page.up",
  16725. "session.half.page.down",
  16726. "session.first",
  16727. "session.last",
  16728. "prompt.clear",
  16729. "prompt.submit",
  16730. "agent.cycle"
  16731. ]
  16732. },
  16733. {
  16734. "type": "string"
  16735. }
  16736. ]
  16737. }
  16738. },
  16739. "required": ["command"],
  16740. "additionalProperties": false
  16741. }
  16742. },
  16743. "required": ["id", "type", "properties"],
  16744. "additionalProperties": false
  16745. },
  16746. {
  16747. "type": "object",
  16748. "properties": {
  16749. "id": {
  16750. "type": "string",
  16751. "pattern": "^evt_"
  16752. },
  16753. "type": {
  16754. "type": "string",
  16755. "enum": ["tui.toast.show"]
  16756. },
  16757. "properties": {
  16758. "type": "object",
  16759. "properties": {
  16760. "title": {
  16761. "type": "string"
  16762. },
  16763. "message": {
  16764. "type": "string"
  16765. },
  16766. "variant": {
  16767. "type": "string",
  16768. "enum": ["info", "success", "warning", "error"]
  16769. },
  16770. "duration": {
  16771. "type": "integer",
  16772. "exclusiveMinimum": 0
  16773. }
  16774. },
  16775. "required": ["message", "variant"],
  16776. "additionalProperties": false
  16777. }
  16778. },
  16779. "required": ["id", "type", "properties"],
  16780. "additionalProperties": false
  16781. },
  16782. {
  16783. "type": "object",
  16784. "properties": {
  16785. "id": {
  16786. "type": "string",
  16787. "pattern": "^evt_"
  16788. },
  16789. "type": {
  16790. "type": "string",
  16791. "enum": ["tui.session.select"]
  16792. },
  16793. "properties": {
  16794. "type": "object",
  16795. "properties": {
  16796. "sessionID": {
  16797. "type": "string",
  16798. "pattern": "^ses",
  16799. "description": "Session ID to navigate to"
  16800. }
  16801. },
  16802. "required": ["sessionID"],
  16803. "additionalProperties": false
  16804. }
  16805. },
  16806. "required": ["id", "type", "properties"],
  16807. "additionalProperties": false
  16808. },
  16809. {
  16810. "type": "object",
  16811. "properties": {
  16812. "id": {
  16813. "type": "string",
  16814. "pattern": "^evt_"
  16815. },
  16816. "type": {
  16817. "type": "string",
  16818. "enum": ["mcp.tools.changed"]
  16819. },
  16820. "properties": {
  16821. "type": "object",
  16822. "properties": {
  16823. "server": {
  16824. "type": "string"
  16825. }
  16826. },
  16827. "required": ["server"],
  16828. "additionalProperties": false
  16829. }
  16830. },
  16831. "required": ["id", "type", "properties"],
  16832. "additionalProperties": false
  16833. },
  16834. {
  16835. "type": "object",
  16836. "properties": {
  16837. "id": {
  16838. "type": "string",
  16839. "pattern": "^evt_"
  16840. },
  16841. "type": {
  16842. "type": "string",
  16843. "enum": ["mcp.browser.open.failed"]
  16844. },
  16845. "properties": {
  16846. "type": "object",
  16847. "properties": {
  16848. "mcpName": {
  16849. "type": "string"
  16850. },
  16851. "url": {
  16852. "type": "string"
  16853. }
  16854. },
  16855. "required": ["mcpName", "url"],
  16856. "additionalProperties": false
  16857. }
  16858. },
  16859. "required": ["id", "type", "properties"],
  16860. "additionalProperties": false
  16861. },
  16862. {
  16863. "type": "object",
  16864. "properties": {
  16865. "id": {
  16866. "type": "string",
  16867. "pattern": "^evt_"
  16868. },
  16869. "type": {
  16870. "type": "string",
  16871. "enum": ["command.executed"]
  16872. },
  16873. "properties": {
  16874. "type": "object",
  16875. "properties": {
  16876. "name": {
  16877. "type": "string"
  16878. },
  16879. "sessionID": {
  16880. "type": "string",
  16881. "pattern": "^ses"
  16882. },
  16883. "arguments": {
  16884. "type": "string"
  16885. },
  16886. "messageID": {
  16887. "type": "string",
  16888. "pattern": "^msg"
  16889. }
  16890. },
  16891. "required": ["name", "sessionID", "arguments", "messageID"],
  16892. "additionalProperties": false
  16893. }
  16894. },
  16895. "required": ["id", "type", "properties"],
  16896. "additionalProperties": false
  16897. },
  16898. {
  16899. "type": "object",
  16900. "properties": {
  16901. "id": {
  16902. "type": "string",
  16903. "pattern": "^evt_"
  16904. },
  16905. "type": {
  16906. "type": "string",
  16907. "enum": ["project.directories.updated"]
  16908. },
  16909. "properties": {
  16910. "type": "object",
  16911. "properties": {
  16912. "projectID": {
  16913. "type": "string"
  16914. }
  16915. },
  16916. "required": ["projectID"],
  16917. "additionalProperties": false
  16918. }
  16919. },
  16920. "required": ["id", "type", "properties"],
  16921. "additionalProperties": false
  16922. },
  16923. {
  16924. "type": "object",
  16925. "properties": {
  16926. "id": {
  16927. "type": "string",
  16928. "pattern": "^evt_"
  16929. },
  16930. "type": {
  16931. "type": "string",
  16932. "enum": ["project.updated"]
  16933. },
  16934. "properties": {
  16935. "type": "object",
  16936. "properties": {
  16937. "id": {
  16938. "type": "string"
  16939. },
  16940. "worktree": {
  16941. "type": "string"
  16942. },
  16943. "vcs": {
  16944. "type": "string",
  16945. "enum": ["git"]
  16946. },
  16947. "name": {
  16948. "type": "string"
  16949. },
  16950. "icon": {
  16951. "type": "object",
  16952. "properties": {
  16953. "url": {
  16954. "type": "string"
  16955. },
  16956. "override": {
  16957. "type": "string"
  16958. },
  16959. "color": {
  16960. "type": "string"
  16961. }
  16962. },
  16963. "additionalProperties": false
  16964. },
  16965. "commands": {
  16966. "type": "object",
  16967. "properties": {
  16968. "start": {
  16969. "type": "string",
  16970. "description": "Startup script to run when creating a new workspace (worktree)"
  16971. }
  16972. },
  16973. "additionalProperties": false
  16974. },
  16975. "time": {
  16976. "type": "object",
  16977. "properties": {
  16978. "created": {
  16979. "type": "integer",
  16980. "minimum": 0
  16981. },
  16982. "updated": {
  16983. "type": "integer",
  16984. "minimum": 0
  16985. },
  16986. "initialized": {
  16987. "type": "integer",
  16988. "minimum": 0
  16989. }
  16990. },
  16991. "required": ["created", "updated"],
  16992. "additionalProperties": false
  16993. },
  16994. "sandboxes": {
  16995. "type": "array",
  16996. "items": {
  16997. "type": "string"
  16998. }
  16999. }
  17000. },
  17001. "required": ["id", "worktree", "time", "sandboxes"],
  17002. "additionalProperties": false
  17003. }
  17004. },
  17005. "required": ["id", "type", "properties"],
  17006. "additionalProperties": false
  17007. },
  17008. {
  17009. "type": "object",
  17010. "properties": {
  17011. "id": {
  17012. "type": "string",
  17013. "pattern": "^evt_"
  17014. },
  17015. "type": {
  17016. "type": "string",
  17017. "enum": ["question.asked"]
  17018. },
  17019. "properties": {
  17020. "type": "object",
  17021. "properties": {
  17022. "id": {
  17023. "type": "string",
  17024. "pattern": "^que"
  17025. },
  17026. "sessionID": {
  17027. "type": "string",
  17028. "pattern": "^ses"
  17029. },
  17030. "questions": {
  17031. "type": "array",
  17032. "items": {
  17033. "$ref": "#/components/schemas/QuestionInfo"
  17034. },
  17035. "description": "Questions to ask"
  17036. },
  17037. "tool": {
  17038. "$ref": "#/components/schemas/QuestionTool"
  17039. }
  17040. },
  17041. "required": ["id", "sessionID", "questions"],
  17042. "additionalProperties": false
  17043. }
  17044. },
  17045. "required": ["id", "type", "properties"],
  17046. "additionalProperties": false
  17047. },
  17048. {
  17049. "type": "object",
  17050. "properties": {
  17051. "id": {
  17052. "type": "string",
  17053. "pattern": "^evt_"
  17054. },
  17055. "type": {
  17056. "type": "string",
  17057. "enum": ["question.replied"]
  17058. },
  17059. "properties": {
  17060. "type": "object",
  17061. "properties": {
  17062. "sessionID": {
  17063. "type": "string",
  17064. "pattern": "^ses"
  17065. },
  17066. "requestID": {
  17067. "type": "string",
  17068. "pattern": "^que"
  17069. },
  17070. "answers": {
  17071. "type": "array",
  17072. "items": {
  17073. "$ref": "#/components/schemas/QuestionAnswer"
  17074. }
  17075. }
  17076. },
  17077. "required": ["sessionID", "requestID", "answers"],
  17078. "additionalProperties": false
  17079. }
  17080. },
  17081. "required": ["id", "type", "properties"],
  17082. "additionalProperties": false
  17083. },
  17084. {
  17085. "type": "object",
  17086. "properties": {
  17087. "id": {
  17088. "type": "string",
  17089. "pattern": "^evt_"
  17090. },
  17091. "type": {
  17092. "type": "string",
  17093. "enum": ["question.rejected"]
  17094. },
  17095. "properties": {
  17096. "type": "object",
  17097. "properties": {
  17098. "sessionID": {
  17099. "type": "string",
  17100. "pattern": "^ses"
  17101. },
  17102. "requestID": {
  17103. "type": "string",
  17104. "pattern": "^que"
  17105. }
  17106. },
  17107. "required": ["sessionID", "requestID"],
  17108. "additionalProperties": false
  17109. }
  17110. },
  17111. "required": ["id", "type", "properties"],
  17112. "additionalProperties": false
  17113. },
  17114. {
  17115. "type": "object",
  17116. "properties": {
  17117. "id": {
  17118. "type": "string",
  17119. "pattern": "^evt_"
  17120. },
  17121. "type": {
  17122. "type": "string",
  17123. "enum": ["session.status"]
  17124. },
  17125. "properties": {
  17126. "type": "object",
  17127. "properties": {
  17128. "sessionID": {
  17129. "type": "string",
  17130. "pattern": "^ses"
  17131. },
  17132. "status": {
  17133. "$ref": "#/components/schemas/SessionStatus"
  17134. }
  17135. },
  17136. "required": ["sessionID", "status"],
  17137. "additionalProperties": false
  17138. }
  17139. },
  17140. "required": ["id", "type", "properties"],
  17141. "additionalProperties": false
  17142. },
  17143. {
  17144. "type": "object",
  17145. "properties": {
  17146. "id": {
  17147. "type": "string",
  17148. "pattern": "^evt_"
  17149. },
  17150. "type": {
  17151. "type": "string",
  17152. "enum": ["session.idle"]
  17153. },
  17154. "properties": {
  17155. "type": "object",
  17156. "properties": {
  17157. "sessionID": {
  17158. "type": "string",
  17159. "pattern": "^ses"
  17160. }
  17161. },
  17162. "required": ["sessionID"],
  17163. "additionalProperties": false
  17164. }
  17165. },
  17166. "required": ["id", "type", "properties"],
  17167. "additionalProperties": false
  17168. },
  17169. {
  17170. "type": "object",
  17171. "properties": {
  17172. "id": {
  17173. "type": "string",
  17174. "pattern": "^evt_"
  17175. },
  17176. "type": {
  17177. "type": "string",
  17178. "enum": ["session.compacted"]
  17179. },
  17180. "properties": {
  17181. "type": "object",
  17182. "properties": {
  17183. "sessionID": {
  17184. "type": "string",
  17185. "pattern": "^ses"
  17186. }
  17187. },
  17188. "required": ["sessionID"],
  17189. "additionalProperties": false
  17190. }
  17191. },
  17192. "required": ["id", "type", "properties"],
  17193. "additionalProperties": false
  17194. },
  17195. {
  17196. "type": "object",
  17197. "properties": {
  17198. "id": {
  17199. "type": "string",
  17200. "pattern": "^evt_"
  17201. },
  17202. "type": {
  17203. "type": "string",
  17204. "enum": ["vcs.branch.updated"]
  17205. },
  17206. "properties": {
  17207. "type": "object",
  17208. "properties": {
  17209. "branch": {
  17210. "type": "string"
  17211. }
  17212. },
  17213. "additionalProperties": false
  17214. }
  17215. },
  17216. "required": ["id", "type", "properties"],
  17217. "additionalProperties": false
  17218. },
  17219. {
  17220. "type": "object",
  17221. "properties": {
  17222. "id": {
  17223. "type": "string",
  17224. "pattern": "^evt_"
  17225. },
  17226. "type": {
  17227. "type": "string",
  17228. "enum": ["worktree.ready"]
  17229. },
  17230. "properties": {
  17231. "type": "object",
  17232. "properties": {
  17233. "name": {
  17234. "type": "string"
  17235. },
  17236. "branch": {
  17237. "type": "string"
  17238. }
  17239. },
  17240. "required": ["name"],
  17241. "additionalProperties": false
  17242. }
  17243. },
  17244. "required": ["id", "type", "properties"],
  17245. "additionalProperties": false
  17246. },
  17247. {
  17248. "type": "object",
  17249. "properties": {
  17250. "id": {
  17251. "type": "string",
  17252. "pattern": "^evt_"
  17253. },
  17254. "type": {
  17255. "type": "string",
  17256. "enum": ["worktree.failed"]
  17257. },
  17258. "properties": {
  17259. "type": "object",
  17260. "properties": {
  17261. "message": {
  17262. "type": "string"
  17263. }
  17264. },
  17265. "required": ["message"],
  17266. "additionalProperties": false
  17267. }
  17268. },
  17269. "required": ["id", "type", "properties"],
  17270. "additionalProperties": false
  17271. },
  17272. {
  17273. "type": "object",
  17274. "properties": {
  17275. "id": {
  17276. "type": "string",
  17277. "pattern": "^evt_"
  17278. },
  17279. "type": {
  17280. "type": "string",
  17281. "enum": ["workspace.ready"]
  17282. },
  17283. "properties": {
  17284. "type": "object",
  17285. "properties": {
  17286. "name": {
  17287. "type": "string"
  17288. }
  17289. },
  17290. "required": ["name"],
  17291. "additionalProperties": false
  17292. }
  17293. },
  17294. "required": ["id", "type", "properties"],
  17295. "additionalProperties": false
  17296. },
  17297. {
  17298. "type": "object",
  17299. "properties": {
  17300. "id": {
  17301. "type": "string",
  17302. "pattern": "^evt_"
  17303. },
  17304. "type": {
  17305. "type": "string",
  17306. "enum": ["workspace.failed"]
  17307. },
  17308. "properties": {
  17309. "type": "object",
  17310. "properties": {
  17311. "message": {
  17312. "type": "string"
  17313. }
  17314. },
  17315. "required": ["message"],
  17316. "additionalProperties": false
  17317. }
  17318. },
  17319. "required": ["id", "type", "properties"],
  17320. "additionalProperties": false
  17321. },
  17322. {
  17323. "type": "object",
  17324. "properties": {
  17325. "id": {
  17326. "type": "string",
  17327. "pattern": "^evt_"
  17328. },
  17329. "type": {
  17330. "type": "string",
  17331. "enum": ["workspace.status"]
  17332. },
  17333. "properties": {
  17334. "type": "object",
  17335. "properties": {
  17336. "workspaceID": {
  17337. "type": "string",
  17338. "pattern": "^wrk"
  17339. },
  17340. "status": {
  17341. "type": "string",
  17342. "enum": ["connected", "connecting", "disconnected", "error"]
  17343. }
  17344. },
  17345. "required": ["workspaceID", "status"],
  17346. "additionalProperties": false
  17347. }
  17348. },
  17349. "required": ["id", "type", "properties"],
  17350. "additionalProperties": false
  17351. },
  17352. {
  17353. "type": "object",
  17354. "properties": {
  17355. "id": {
  17356. "type": "string",
  17357. "pattern": "^evt_"
  17358. },
  17359. "type": {
  17360. "type": "string",
  17361. "enum": ["server.connected"]
  17362. },
  17363. "properties": {
  17364. "type": "object",
  17365. "properties": {}
  17366. }
  17367. },
  17368. "required": ["id", "type", "properties"],
  17369. "additionalProperties": false
  17370. },
  17371. {
  17372. "type": "object",
  17373. "properties": {
  17374. "id": {
  17375. "type": "string",
  17376. "pattern": "^evt_"
  17377. },
  17378. "type": {
  17379. "type": "string",
  17380. "enum": ["global.disposed"]
  17381. },
  17382. "properties": {
  17383. "type": "object",
  17384. "properties": {}
  17385. }
  17386. },
  17387. "required": ["id", "type", "properties"],
  17388. "additionalProperties": false
  17389. },
  17390. {
  17391. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17392. },
  17393. {
  17394. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17395. },
  17396. {
  17397. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17398. },
  17399. {
  17400. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17401. },
  17402. {
  17403. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17404. },
  17405. {
  17406. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17407. },
  17408. {
  17409. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17410. },
  17411. {
  17412. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17413. },
  17414. {
  17415. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17416. },
  17417. {
  17418. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17419. },
  17420. {
  17421. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17422. },
  17423. {
  17424. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17425. },
  17426. {
  17427. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17428. },
  17429. {
  17430. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17431. },
  17432. {
  17433. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  17434. },
  17435. {
  17436. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  17437. },
  17438. {
  17439. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17440. },
  17441. {
  17442. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17443. },
  17444. {
  17445. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17446. },
  17447. {
  17448. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17449. },
  17450. {
  17451. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17452. },
  17453. {
  17454. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17455. },
  17456. {
  17457. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17458. },
  17459. {
  17460. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17461. },
  17462. {
  17463. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17464. },
  17465. {
  17466. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17467. },
  17468. {
  17469. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17470. },
  17471. {
  17472. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17473. },
  17474. {
  17475. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17476. },
  17477. {
  17478. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17479. },
  17480. {
  17481. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17482. },
  17483. {
  17484. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17485. },
  17486. {
  17487. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17488. },
  17489. {
  17490. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17491. },
  17492. {
  17493. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17494. }
  17495. ]
  17496. }
  17497. },
  17498. "required": ["directory", "payload"],
  17499. "additionalProperties": false
  17500. },
  17501. "LogLevel": {
  17502. "type": "string",
  17503. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17504. "description": "Log level"
  17505. },
  17506. "ServerConfig": {
  17507. "type": "object",
  17508. "properties": {
  17509. "port": {
  17510. "type": "integer",
  17511. "exclusiveMinimum": 0
  17512. },
  17513. "hostname": {
  17514. "type": "string"
  17515. },
  17516. "mdns": {
  17517. "type": "boolean"
  17518. },
  17519. "mdnsDomain": {
  17520. "type": "string"
  17521. },
  17522. "cors": {
  17523. "type": "array",
  17524. "items": {
  17525. "type": "string"
  17526. }
  17527. }
  17528. },
  17529. "additionalProperties": false,
  17530. "description": "Server configuration for opencode serve and web commands"
  17531. },
  17532. "ReferenceConfigEntry": {
  17533. "anyOf": [
  17534. {
  17535. "type": "string"
  17536. },
  17537. {
  17538. "type": "object",
  17539. "properties": {
  17540. "repository": {
  17541. "type": "string",
  17542. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  17543. },
  17544. "branch": {
  17545. "type": "string"
  17546. }
  17547. },
  17548. "required": ["repository"],
  17549. "additionalProperties": false
  17550. },
  17551. {
  17552. "type": "object",
  17553. "properties": {
  17554. "path": {
  17555. "type": "string",
  17556. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  17557. }
  17558. },
  17559. "required": ["path"],
  17560. "additionalProperties": false
  17561. }
  17562. ]
  17563. },
  17564. "ReferenceConfig": {
  17565. "type": "object",
  17566. "additionalProperties": {
  17567. "$ref": "#/components/schemas/ReferenceConfigEntry"
  17568. }
  17569. },
  17570. "PermissionActionConfig": {
  17571. "type": "string",
  17572. "enum": ["ask", "allow", "deny"]
  17573. },
  17574. "PermissionObjectConfig": {
  17575. "type": "object",
  17576. "additionalProperties": {
  17577. "$ref": "#/components/schemas/PermissionActionConfig"
  17578. }
  17579. },
  17580. "PermissionRuleConfig": {
  17581. "anyOf": [
  17582. {
  17583. "$ref": "#/components/schemas/PermissionActionConfig"
  17584. },
  17585. {
  17586. "$ref": "#/components/schemas/PermissionObjectConfig"
  17587. }
  17588. ]
  17589. },
  17590. "PermissionConfig": {
  17591. "anyOf": [
  17592. {
  17593. "$ref": "#/components/schemas/PermissionActionConfig"
  17594. },
  17595. {
  17596. "type": "object",
  17597. "properties": {
  17598. "read": {
  17599. "$ref": "#/components/schemas/PermissionRuleConfig"
  17600. },
  17601. "edit": {
  17602. "$ref": "#/components/schemas/PermissionRuleConfig"
  17603. },
  17604. "glob": {
  17605. "$ref": "#/components/schemas/PermissionRuleConfig"
  17606. },
  17607. "grep": {
  17608. "$ref": "#/components/schemas/PermissionRuleConfig"
  17609. },
  17610. "list": {
  17611. "$ref": "#/components/schemas/PermissionRuleConfig"
  17612. },
  17613. "bash": {
  17614. "$ref": "#/components/schemas/PermissionRuleConfig"
  17615. },
  17616. "task": {
  17617. "$ref": "#/components/schemas/PermissionRuleConfig"
  17618. },
  17619. "external_directory": {
  17620. "$ref": "#/components/schemas/PermissionRuleConfig"
  17621. },
  17622. "todowrite": {
  17623. "$ref": "#/components/schemas/PermissionActionConfig"
  17624. },
  17625. "question": {
  17626. "$ref": "#/components/schemas/PermissionActionConfig"
  17627. },
  17628. "webfetch": {
  17629. "$ref": "#/components/schemas/PermissionActionConfig"
  17630. },
  17631. "websearch": {
  17632. "$ref": "#/components/schemas/PermissionActionConfig"
  17633. },
  17634. "lsp": {
  17635. "$ref": "#/components/schemas/PermissionRuleConfig"
  17636. },
  17637. "doom_loop": {
  17638. "$ref": "#/components/schemas/PermissionActionConfig"
  17639. },
  17640. "skill": {
  17641. "$ref": "#/components/schemas/PermissionRuleConfig"
  17642. }
  17643. },
  17644. "additionalProperties": {
  17645. "$ref": "#/components/schemas/PermissionRuleConfig"
  17646. }
  17647. }
  17648. ]
  17649. },
  17650. "AgentConfig": {
  17651. "type": "object",
  17652. "properties": {
  17653. "model": {
  17654. "type": "string"
  17655. },
  17656. "variant": {
  17657. "type": "string"
  17658. },
  17659. "temperature": {
  17660. "type": "number"
  17661. },
  17662. "top_p": {
  17663. "type": "number"
  17664. },
  17665. "prompt": {
  17666. "type": "string"
  17667. },
  17668. "tools": {
  17669. "type": "object",
  17670. "additionalProperties": {
  17671. "type": "boolean"
  17672. }
  17673. },
  17674. "disable": {
  17675. "type": "boolean"
  17676. },
  17677. "description": {
  17678. "type": "string"
  17679. },
  17680. "mode": {
  17681. "type": "string",
  17682. "enum": ["subagent", "primary", "all"]
  17683. },
  17684. "hidden": {
  17685. "type": "boolean"
  17686. },
  17687. "options": {
  17688. "type": "object"
  17689. },
  17690. "color": {
  17691. "anyOf": [
  17692. {
  17693. "type": "string",
  17694. "pattern": "^#[0-9a-fA-F]{6}$"
  17695. },
  17696. {
  17697. "type": "string",
  17698. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17699. }
  17700. ],
  17701. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17702. },
  17703. "steps": {
  17704. "type": "integer",
  17705. "exclusiveMinimum": 0
  17706. },
  17707. "maxSteps": {
  17708. "type": "integer",
  17709. "exclusiveMinimum": 0
  17710. },
  17711. "permission": {
  17712. "$ref": "#/components/schemas/PermissionConfig"
  17713. }
  17714. },
  17715. "additionalProperties": {}
  17716. },
  17717. "ProviderConfig": {
  17718. "type": "object",
  17719. "properties": {
  17720. "api": {
  17721. "type": "string"
  17722. },
  17723. "name": {
  17724. "type": "string"
  17725. },
  17726. "env": {
  17727. "type": "array",
  17728. "items": {
  17729. "type": "string"
  17730. }
  17731. },
  17732. "id": {
  17733. "type": "string"
  17734. },
  17735. "npm": {
  17736. "type": "string"
  17737. },
  17738. "whitelist": {
  17739. "type": "array",
  17740. "items": {
  17741. "type": "string"
  17742. }
  17743. },
  17744. "blacklist": {
  17745. "type": "array",
  17746. "items": {
  17747. "type": "string"
  17748. }
  17749. },
  17750. "options": {
  17751. "type": "object",
  17752. "properties": {
  17753. "apiKey": {
  17754. "type": "string"
  17755. },
  17756. "baseURL": {
  17757. "type": "string"
  17758. },
  17759. "enterpriseUrl": {
  17760. "type": "string"
  17761. },
  17762. "setCacheKey": {
  17763. "type": "boolean"
  17764. },
  17765. "timeout": {
  17766. "anyOf": [
  17767. {
  17768. "type": "integer",
  17769. "exclusiveMinimum": 0
  17770. },
  17771. {
  17772. "type": "boolean",
  17773. "enum": [false]
  17774. }
  17775. ],
  17776. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17777. },
  17778. "headerTimeout": {
  17779. "anyOf": [
  17780. {
  17781. "type": "integer",
  17782. "exclusiveMinimum": 0
  17783. },
  17784. {
  17785. "type": "boolean",
  17786. "enum": [false]
  17787. }
  17788. ],
  17789. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17790. },
  17791. "chunkTimeout": {
  17792. "type": "integer",
  17793. "exclusiveMinimum": 0
  17794. }
  17795. },
  17796. "additionalProperties": {}
  17797. },
  17798. "models": {
  17799. "type": "object",
  17800. "additionalProperties": {
  17801. "type": "object",
  17802. "properties": {
  17803. "id": {
  17804. "type": "string"
  17805. },
  17806. "name": {
  17807. "type": "string"
  17808. },
  17809. "family": {
  17810. "type": "string"
  17811. },
  17812. "release_date": {
  17813. "type": "string"
  17814. },
  17815. "attachment": {
  17816. "type": "boolean"
  17817. },
  17818. "reasoning": {
  17819. "type": "boolean"
  17820. },
  17821. "temperature": {
  17822. "type": "boolean"
  17823. },
  17824. "tool_call": {
  17825. "type": "boolean"
  17826. },
  17827. "interleaved": {
  17828. "anyOf": [
  17829. {
  17830. "type": "boolean",
  17831. "enum": [true]
  17832. },
  17833. {
  17834. "type": "object",
  17835. "properties": {
  17836. "field": {
  17837. "type": "string",
  17838. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  17839. }
  17840. },
  17841. "required": ["field"],
  17842. "additionalProperties": false
  17843. }
  17844. ]
  17845. },
  17846. "cost": {
  17847. "type": "object",
  17848. "properties": {
  17849. "input": {
  17850. "type": "number"
  17851. },
  17852. "output": {
  17853. "type": "number"
  17854. },
  17855. "cache_read": {
  17856. "type": "number"
  17857. },
  17858. "cache_write": {
  17859. "type": "number"
  17860. },
  17861. "context_over_200k": {
  17862. "type": "object",
  17863. "properties": {
  17864. "input": {
  17865. "type": "number"
  17866. },
  17867. "output": {
  17868. "type": "number"
  17869. },
  17870. "cache_read": {
  17871. "type": "number"
  17872. },
  17873. "cache_write": {
  17874. "type": "number"
  17875. }
  17876. },
  17877. "required": ["input", "output"],
  17878. "additionalProperties": false
  17879. }
  17880. },
  17881. "required": ["input", "output"],
  17882. "additionalProperties": false
  17883. },
  17884. "limit": {
  17885. "type": "object",
  17886. "properties": {
  17887. "context": {
  17888. "type": "number"
  17889. },
  17890. "input": {
  17891. "type": "number"
  17892. },
  17893. "output": {
  17894. "type": "number"
  17895. }
  17896. },
  17897. "required": ["context", "output"],
  17898. "additionalProperties": false
  17899. },
  17900. "modalities": {
  17901. "type": "object",
  17902. "properties": {
  17903. "input": {
  17904. "type": "array",
  17905. "items": {
  17906. "type": "string",
  17907. "enum": ["text", "audio", "image", "video", "pdf"]
  17908. }
  17909. },
  17910. "output": {
  17911. "type": "array",
  17912. "items": {
  17913. "type": "string",
  17914. "enum": ["text", "audio", "image", "video", "pdf"]
  17915. }
  17916. }
  17917. },
  17918. "additionalProperties": false
  17919. },
  17920. "experimental": {
  17921. "type": "boolean"
  17922. },
  17923. "status": {
  17924. "type": "string",
  17925. "enum": ["alpha", "beta", "deprecated", "active"]
  17926. },
  17927. "provider": {
  17928. "type": "object",
  17929. "properties": {
  17930. "npm": {
  17931. "type": "string"
  17932. },
  17933. "api": {
  17934. "type": "string"
  17935. }
  17936. },
  17937. "additionalProperties": false
  17938. },
  17939. "options": {
  17940. "type": "object"
  17941. },
  17942. "headers": {
  17943. "type": "object",
  17944. "additionalProperties": {
  17945. "type": "string"
  17946. }
  17947. },
  17948. "variants": {
  17949. "type": "object",
  17950. "additionalProperties": {
  17951. "type": "object",
  17952. "properties": {
  17953. "disabled": {
  17954. "type": "boolean"
  17955. }
  17956. },
  17957. "additionalProperties": {}
  17958. },
  17959. "description": "Variant-specific configuration"
  17960. }
  17961. },
  17962. "additionalProperties": false
  17963. }
  17964. }
  17965. },
  17966. "additionalProperties": false
  17967. },
  17968. "McpLocalConfig": {
  17969. "type": "object",
  17970. "properties": {
  17971. "type": {
  17972. "type": "string",
  17973. "enum": ["local"],
  17974. "description": "Type of MCP server connection"
  17975. },
  17976. "command": {
  17977. "type": "array",
  17978. "items": {
  17979. "type": "string"
  17980. },
  17981. "description": "Command and arguments to run the MCP server"
  17982. },
  17983. "environment": {
  17984. "type": "object",
  17985. "additionalProperties": {
  17986. "type": "string"
  17987. }
  17988. },
  17989. "enabled": {
  17990. "type": "boolean"
  17991. },
  17992. "timeout": {
  17993. "type": "integer",
  17994. "exclusiveMinimum": 0
  17995. }
  17996. },
  17997. "required": ["type", "command"],
  17998. "additionalProperties": false
  17999. },
  18000. "McpOAuthConfig": {
  18001. "type": "object",
  18002. "properties": {
  18003. "clientId": {
  18004. "type": "string"
  18005. },
  18006. "clientSecret": {
  18007. "type": "string"
  18008. },
  18009. "scope": {
  18010. "type": "string"
  18011. },
  18012. "callbackPort": {
  18013. "type": "integer",
  18014. "minimum": 1,
  18015. "maximum": 65535
  18016. },
  18017. "redirectUri": {
  18018. "type": "string"
  18019. }
  18020. },
  18021. "additionalProperties": false
  18022. },
  18023. "McpRemoteConfig": {
  18024. "type": "object",
  18025. "properties": {
  18026. "type": {
  18027. "type": "string",
  18028. "enum": ["remote"],
  18029. "description": "Type of MCP server connection"
  18030. },
  18031. "url": {
  18032. "type": "string",
  18033. "description": "URL of the remote MCP server"
  18034. },
  18035. "enabled": {
  18036. "type": "boolean"
  18037. },
  18038. "headers": {
  18039. "type": "object",
  18040. "additionalProperties": {
  18041. "type": "string"
  18042. }
  18043. },
  18044. "oauth": {
  18045. "anyOf": [
  18046. {
  18047. "$ref": "#/components/schemas/McpOAuthConfig"
  18048. },
  18049. {
  18050. "type": "boolean",
  18051. "enum": [false]
  18052. }
  18053. ],
  18054. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  18055. },
  18056. "timeout": {
  18057. "type": "integer",
  18058. "exclusiveMinimum": 0
  18059. }
  18060. },
  18061. "required": ["type", "url"],
  18062. "additionalProperties": false
  18063. },
  18064. "LayoutConfig": {
  18065. "type": "string",
  18066. "enum": ["auto", "stretch"],
  18067. "description": "@deprecated Always uses stretch layout."
  18068. },
  18069. "ImageAttachmentConfig": {
  18070. "type": "object",
  18071. "properties": {
  18072. "auto_resize": {
  18073. "type": "boolean"
  18074. },
  18075. "max_width": {
  18076. "type": "integer",
  18077. "exclusiveMinimum": 0
  18078. },
  18079. "max_height": {
  18080. "type": "integer",
  18081. "exclusiveMinimum": 0
  18082. },
  18083. "max_base64_bytes": {
  18084. "type": "integer",
  18085. "exclusiveMinimum": 0
  18086. }
  18087. },
  18088. "additionalProperties": false
  18089. },
  18090. "AttachmentConfig": {
  18091. "type": "object",
  18092. "properties": {
  18093. "image": {
  18094. "$ref": "#/components/schemas/ImageAttachmentConfig"
  18095. }
  18096. },
  18097. "additionalProperties": false
  18098. },
  18099. "Config": {
  18100. "type": "object",
  18101. "properties": {
  18102. "$schema": {
  18103. "type": "string"
  18104. },
  18105. "shell": {
  18106. "type": "string"
  18107. },
  18108. "logLevel": {
  18109. "$ref": "#/components/schemas/LogLevel"
  18110. },
  18111. "server": {
  18112. "$ref": "#/components/schemas/ServerConfig"
  18113. },
  18114. "command": {
  18115. "type": "object",
  18116. "additionalProperties": {
  18117. "type": "object",
  18118. "properties": {
  18119. "template": {
  18120. "type": "string"
  18121. },
  18122. "description": {
  18123. "type": "string"
  18124. },
  18125. "agent": {
  18126. "type": "string"
  18127. },
  18128. "model": {
  18129. "type": "string"
  18130. },
  18131. "variant": {
  18132. "type": "string"
  18133. },
  18134. "subtask": {
  18135. "type": "boolean"
  18136. }
  18137. },
  18138. "required": ["template"],
  18139. "additionalProperties": false
  18140. }
  18141. },
  18142. "skills": {
  18143. "type": "object",
  18144. "properties": {
  18145. "paths": {
  18146. "type": "array",
  18147. "items": {
  18148. "type": "string"
  18149. }
  18150. },
  18151. "urls": {
  18152. "type": "array",
  18153. "items": {
  18154. "type": "string"
  18155. }
  18156. }
  18157. },
  18158. "additionalProperties": false
  18159. },
  18160. "reference": {
  18161. "$ref": "#/components/schemas/ReferenceConfig"
  18162. },
  18163. "watcher": {
  18164. "type": "object",
  18165. "properties": {
  18166. "ignore": {
  18167. "type": "array",
  18168. "items": {
  18169. "type": "string"
  18170. }
  18171. }
  18172. },
  18173. "additionalProperties": false
  18174. },
  18175. "snapshot": {
  18176. "type": "boolean"
  18177. },
  18178. "plugin": {
  18179. "type": "array",
  18180. "items": {
  18181. "anyOf": [
  18182. {
  18183. "type": "string"
  18184. },
  18185. {
  18186. "type": "array",
  18187. "prefixItems": [
  18188. {
  18189. "type": "string"
  18190. },
  18191. {
  18192. "type": "object"
  18193. }
  18194. ],
  18195. "maxItems": 2,
  18196. "minItems": 2
  18197. }
  18198. ]
  18199. }
  18200. },
  18201. "share": {
  18202. "type": "string",
  18203. "enum": ["manual", "auto", "disabled"]
  18204. },
  18205. "autoshare": {
  18206. "type": "boolean"
  18207. },
  18208. "autoupdate": {
  18209. "anyOf": [
  18210. {
  18211. "type": "boolean"
  18212. },
  18213. {
  18214. "type": "string",
  18215. "enum": ["notify"]
  18216. }
  18217. ],
  18218. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  18219. },
  18220. "disabled_providers": {
  18221. "type": "array",
  18222. "items": {
  18223. "type": "string"
  18224. }
  18225. },
  18226. "enabled_providers": {
  18227. "type": "array",
  18228. "items": {
  18229. "type": "string"
  18230. }
  18231. },
  18232. "model": {
  18233. "type": "string"
  18234. },
  18235. "small_model": {
  18236. "type": "string"
  18237. },
  18238. "default_agent": {
  18239. "type": "string"
  18240. },
  18241. "username": {
  18242. "type": "string"
  18243. },
  18244. "mode": {
  18245. "type": "object",
  18246. "properties": {
  18247. "build": {
  18248. "$ref": "#/components/schemas/AgentConfig"
  18249. },
  18250. "plan": {
  18251. "$ref": "#/components/schemas/AgentConfig"
  18252. }
  18253. },
  18254. "additionalProperties": {
  18255. "$ref": "#/components/schemas/AgentConfig"
  18256. }
  18257. },
  18258. "agent": {
  18259. "type": "object",
  18260. "properties": {
  18261. "plan": {
  18262. "$ref": "#/components/schemas/AgentConfig"
  18263. },
  18264. "build": {
  18265. "$ref": "#/components/schemas/AgentConfig"
  18266. },
  18267. "general": {
  18268. "$ref": "#/components/schemas/AgentConfig"
  18269. },
  18270. "explore": {
  18271. "$ref": "#/components/schemas/AgentConfig"
  18272. },
  18273. "title": {
  18274. "$ref": "#/components/schemas/AgentConfig"
  18275. },
  18276. "summary": {
  18277. "$ref": "#/components/schemas/AgentConfig"
  18278. },
  18279. "compaction": {
  18280. "$ref": "#/components/schemas/AgentConfig"
  18281. }
  18282. },
  18283. "additionalProperties": {
  18284. "$ref": "#/components/schemas/AgentConfig"
  18285. }
  18286. },
  18287. "provider": {
  18288. "type": "object",
  18289. "additionalProperties": {
  18290. "$ref": "#/components/schemas/ProviderConfig"
  18291. }
  18292. },
  18293. "mcp": {
  18294. "type": "object",
  18295. "additionalProperties": {
  18296. "anyOf": [
  18297. {
  18298. "$ref": "#/components/schemas/McpLocalConfig"
  18299. },
  18300. {
  18301. "$ref": "#/components/schemas/McpRemoteConfig"
  18302. },
  18303. {
  18304. "type": "object",
  18305. "properties": {
  18306. "enabled": {
  18307. "type": "boolean"
  18308. }
  18309. },
  18310. "required": ["enabled"],
  18311. "additionalProperties": false
  18312. }
  18313. ]
  18314. }
  18315. },
  18316. "formatter": {
  18317. "anyOf": [
  18318. {
  18319. "type": "boolean"
  18320. },
  18321. {
  18322. "type": "object",
  18323. "additionalProperties": {
  18324. "type": "object",
  18325. "properties": {
  18326. "disabled": {
  18327. "type": "boolean"
  18328. },
  18329. "command": {
  18330. "type": "array",
  18331. "items": {
  18332. "type": "string"
  18333. }
  18334. },
  18335. "environment": {
  18336. "type": "object",
  18337. "additionalProperties": {
  18338. "type": "string"
  18339. }
  18340. },
  18341. "extensions": {
  18342. "type": "array",
  18343. "items": {
  18344. "type": "string"
  18345. }
  18346. }
  18347. },
  18348. "additionalProperties": false
  18349. }
  18350. }
  18351. ],
  18352. "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."
  18353. },
  18354. "lsp": {
  18355. "anyOf": [
  18356. {
  18357. "type": "boolean"
  18358. },
  18359. {
  18360. "type": "object",
  18361. "additionalProperties": {
  18362. "anyOf": [
  18363. {
  18364. "type": "object",
  18365. "properties": {
  18366. "disabled": {
  18367. "type": "boolean",
  18368. "enum": [true]
  18369. }
  18370. },
  18371. "required": ["disabled"],
  18372. "additionalProperties": false
  18373. },
  18374. {
  18375. "type": "object",
  18376. "properties": {
  18377. "command": {
  18378. "type": "array",
  18379. "items": {
  18380. "type": "string"
  18381. }
  18382. },
  18383. "extensions": {
  18384. "type": "array",
  18385. "items": {
  18386. "type": "string"
  18387. }
  18388. },
  18389. "disabled": {
  18390. "type": "boolean"
  18391. },
  18392. "env": {
  18393. "type": "object",
  18394. "additionalProperties": {
  18395. "type": "string"
  18396. }
  18397. },
  18398. "initialization": {
  18399. "type": "object"
  18400. }
  18401. },
  18402. "required": ["command"],
  18403. "additionalProperties": false
  18404. }
  18405. ]
  18406. }
  18407. }
  18408. ],
  18409. "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."
  18410. },
  18411. "instructions": {
  18412. "type": "array",
  18413. "items": {
  18414. "type": "string"
  18415. }
  18416. },
  18417. "layout": {
  18418. "$ref": "#/components/schemas/LayoutConfig"
  18419. },
  18420. "permission": {
  18421. "$ref": "#/components/schemas/PermissionConfig"
  18422. },
  18423. "tools": {
  18424. "type": "object",
  18425. "additionalProperties": {
  18426. "type": "boolean"
  18427. }
  18428. },
  18429. "attachment": {
  18430. "$ref": "#/components/schemas/AttachmentConfig"
  18431. },
  18432. "enterprise": {
  18433. "type": "object",
  18434. "properties": {
  18435. "url": {
  18436. "type": "string"
  18437. }
  18438. },
  18439. "additionalProperties": false
  18440. },
  18441. "tool_output": {
  18442. "type": "object",
  18443. "properties": {
  18444. "max_lines": {
  18445. "type": "integer",
  18446. "exclusiveMinimum": 0
  18447. },
  18448. "max_bytes": {
  18449. "type": "integer",
  18450. "exclusiveMinimum": 0
  18451. }
  18452. },
  18453. "additionalProperties": false
  18454. },
  18455. "compaction": {
  18456. "type": "object",
  18457. "properties": {
  18458. "auto": {
  18459. "type": "boolean"
  18460. },
  18461. "prune": {
  18462. "type": "boolean"
  18463. },
  18464. "tail_turns": {
  18465. "type": "integer",
  18466. "minimum": 0
  18467. },
  18468. "preserve_recent_tokens": {
  18469. "type": "integer",
  18470. "minimum": 0
  18471. },
  18472. "reserved": {
  18473. "type": "integer",
  18474. "minimum": 0
  18475. }
  18476. },
  18477. "additionalProperties": false
  18478. },
  18479. "experimental": {
  18480. "type": "object",
  18481. "properties": {
  18482. "disable_paste_summary": {
  18483. "type": "boolean"
  18484. },
  18485. "batch_tool": {
  18486. "type": "boolean"
  18487. },
  18488. "openTelemetry": {
  18489. "type": "boolean"
  18490. },
  18491. "primary_tools": {
  18492. "type": "array",
  18493. "items": {
  18494. "type": "string"
  18495. }
  18496. },
  18497. "continue_loop_on_deny": {
  18498. "type": "boolean"
  18499. },
  18500. "mcp_timeout": {
  18501. "type": "integer",
  18502. "exclusiveMinimum": 0
  18503. },
  18504. "policies": {
  18505. "type": "array",
  18506. "items": {
  18507. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18508. }
  18509. }
  18510. },
  18511. "additionalProperties": false
  18512. }
  18513. },
  18514. "additionalProperties": false
  18515. },
  18516. "Model": {
  18517. "type": "object",
  18518. "properties": {
  18519. "id": {
  18520. "type": "string"
  18521. },
  18522. "providerID": {
  18523. "type": "string"
  18524. },
  18525. "api": {
  18526. "type": "object",
  18527. "properties": {
  18528. "id": {
  18529. "type": "string"
  18530. },
  18531. "url": {
  18532. "type": "string"
  18533. },
  18534. "npm": {
  18535. "type": "string"
  18536. }
  18537. },
  18538. "required": ["id", "url", "npm"],
  18539. "additionalProperties": false
  18540. },
  18541. "name": {
  18542. "type": "string"
  18543. },
  18544. "family": {
  18545. "type": "string"
  18546. },
  18547. "capabilities": {
  18548. "type": "object",
  18549. "properties": {
  18550. "temperature": {
  18551. "type": "boolean"
  18552. },
  18553. "reasoning": {
  18554. "type": "boolean"
  18555. },
  18556. "attachment": {
  18557. "type": "boolean"
  18558. },
  18559. "toolcall": {
  18560. "type": "boolean"
  18561. },
  18562. "input": {
  18563. "type": "object",
  18564. "properties": {
  18565. "text": {
  18566. "type": "boolean"
  18567. },
  18568. "audio": {
  18569. "type": "boolean"
  18570. },
  18571. "image": {
  18572. "type": "boolean"
  18573. },
  18574. "video": {
  18575. "type": "boolean"
  18576. },
  18577. "pdf": {
  18578. "type": "boolean"
  18579. }
  18580. },
  18581. "required": ["text", "audio", "image", "video", "pdf"],
  18582. "additionalProperties": false
  18583. },
  18584. "output": {
  18585. "type": "object",
  18586. "properties": {
  18587. "text": {
  18588. "type": "boolean"
  18589. },
  18590. "audio": {
  18591. "type": "boolean"
  18592. },
  18593. "image": {
  18594. "type": "boolean"
  18595. },
  18596. "video": {
  18597. "type": "boolean"
  18598. },
  18599. "pdf": {
  18600. "type": "boolean"
  18601. }
  18602. },
  18603. "required": ["text", "audio", "image", "video", "pdf"],
  18604. "additionalProperties": false
  18605. },
  18606. "interleaved": {
  18607. "anyOf": [
  18608. {
  18609. "type": "boolean"
  18610. },
  18611. {
  18612. "type": "object",
  18613. "properties": {
  18614. "field": {
  18615. "type": "string",
  18616. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  18617. }
  18618. },
  18619. "required": ["field"],
  18620. "additionalProperties": false
  18621. }
  18622. ]
  18623. }
  18624. },
  18625. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18626. "additionalProperties": false
  18627. },
  18628. "cost": {
  18629. "type": "object",
  18630. "properties": {
  18631. "input": {
  18632. "type": "number"
  18633. },
  18634. "output": {
  18635. "type": "number"
  18636. },
  18637. "cache": {
  18638. "type": "object",
  18639. "properties": {
  18640. "read": {
  18641. "type": "number"
  18642. },
  18643. "write": {
  18644. "type": "number"
  18645. }
  18646. },
  18647. "required": ["read", "write"],
  18648. "additionalProperties": false
  18649. },
  18650. "tiers": {
  18651. "type": "array",
  18652. "items": {
  18653. "type": "object",
  18654. "properties": {
  18655. "input": {
  18656. "type": "number"
  18657. },
  18658. "output": {
  18659. "type": "number"
  18660. },
  18661. "cache": {
  18662. "type": "object",
  18663. "properties": {
  18664. "read": {
  18665. "type": "number"
  18666. },
  18667. "write": {
  18668. "type": "number"
  18669. }
  18670. },
  18671. "required": ["read", "write"],
  18672. "additionalProperties": false
  18673. },
  18674. "tier": {
  18675. "type": "object",
  18676. "properties": {
  18677. "type": {
  18678. "type": "string",
  18679. "enum": ["context"]
  18680. },
  18681. "size": {
  18682. "type": "number"
  18683. }
  18684. },
  18685. "required": ["type", "size"],
  18686. "additionalProperties": false
  18687. }
  18688. },
  18689. "required": ["input", "output", "cache", "tier"],
  18690. "additionalProperties": false
  18691. }
  18692. },
  18693. "experimentalOver200K": {
  18694. "type": "object",
  18695. "properties": {
  18696. "input": {
  18697. "type": "number"
  18698. },
  18699. "output": {
  18700. "type": "number"
  18701. },
  18702. "cache": {
  18703. "type": "object",
  18704. "properties": {
  18705. "read": {
  18706. "type": "number"
  18707. },
  18708. "write": {
  18709. "type": "number"
  18710. }
  18711. },
  18712. "required": ["read", "write"],
  18713. "additionalProperties": false
  18714. }
  18715. },
  18716. "required": ["input", "output", "cache"],
  18717. "additionalProperties": false
  18718. }
  18719. },
  18720. "required": ["input", "output", "cache"],
  18721. "additionalProperties": false
  18722. },
  18723. "limit": {
  18724. "type": "object",
  18725. "properties": {
  18726. "context": {
  18727. "type": "number"
  18728. },
  18729. "input": {
  18730. "type": "number"
  18731. },
  18732. "output": {
  18733. "type": "number"
  18734. }
  18735. },
  18736. "required": ["context", "output"],
  18737. "additionalProperties": false
  18738. },
  18739. "status": {
  18740. "type": "string",
  18741. "enum": ["alpha", "beta", "deprecated", "active"]
  18742. },
  18743. "options": {
  18744. "type": "object"
  18745. },
  18746. "headers": {
  18747. "type": "object",
  18748. "additionalProperties": {
  18749. "type": "string"
  18750. }
  18751. },
  18752. "release_date": {
  18753. "type": "string"
  18754. },
  18755. "variants": {
  18756. "type": "object",
  18757. "additionalProperties": {
  18758. "type": "object"
  18759. }
  18760. }
  18761. },
  18762. "required": [
  18763. "id",
  18764. "providerID",
  18765. "api",
  18766. "name",
  18767. "capabilities",
  18768. "cost",
  18769. "limit",
  18770. "status",
  18771. "options",
  18772. "headers",
  18773. "release_date"
  18774. ],
  18775. "additionalProperties": false
  18776. },
  18777. "Provider": {
  18778. "type": "object",
  18779. "properties": {
  18780. "id": {
  18781. "type": "string"
  18782. },
  18783. "name": {
  18784. "type": "string"
  18785. },
  18786. "source": {
  18787. "type": "string",
  18788. "enum": ["env", "config", "custom", "api"]
  18789. },
  18790. "env": {
  18791. "type": "array",
  18792. "items": {
  18793. "type": "string"
  18794. }
  18795. },
  18796. "key": {
  18797. "type": "string"
  18798. },
  18799. "options": {
  18800. "type": "object"
  18801. },
  18802. "models": {
  18803. "type": "object",
  18804. "additionalProperties": {
  18805. "$ref": "#/components/schemas/Model"
  18806. }
  18807. }
  18808. },
  18809. "required": ["id", "name", "source", "env", "options", "models"],
  18810. "additionalProperties": false
  18811. },
  18812. "ConsoleState": {
  18813. "type": "object",
  18814. "properties": {
  18815. "consoleManagedProviders": {
  18816. "type": "array",
  18817. "items": {
  18818. "type": "string"
  18819. }
  18820. },
  18821. "activeOrgName": {
  18822. "type": "string"
  18823. },
  18824. "switchableOrgCount": {
  18825. "type": "integer",
  18826. "minimum": 0
  18827. }
  18828. },
  18829. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18830. "additionalProperties": false
  18831. },
  18832. "effect_HttpApiError_InternalServerError": {
  18833. "type": "object",
  18834. "properties": {
  18835. "_tag": {
  18836. "type": "string",
  18837. "enum": ["InternalServerError"]
  18838. }
  18839. },
  18840. "required": ["_tag"],
  18841. "additionalProperties": false
  18842. },
  18843. "ToolListItem": {
  18844. "type": "object",
  18845. "properties": {
  18846. "id": {
  18847. "type": "string"
  18848. },
  18849. "description": {
  18850. "type": "string"
  18851. },
  18852. "parameters": {}
  18853. },
  18854. "required": ["id", "description", "parameters"],
  18855. "additionalProperties": false
  18856. },
  18857. "ToolList": {
  18858. "type": "array",
  18859. "items": {
  18860. "$ref": "#/components/schemas/ToolListItem"
  18861. }
  18862. },
  18863. "ToolIDs": {
  18864. "type": "array",
  18865. "items": {
  18866. "type": "string"
  18867. }
  18868. },
  18869. "WorktreeError": {
  18870. "type": "object",
  18871. "properties": {
  18872. "name": {
  18873. "type": "string",
  18874. "enum": [
  18875. "WorktreeNotGitError",
  18876. "WorktreeNameGenerationFailedError",
  18877. "WorktreeCreateFailedError",
  18878. "WorktreeStartCommandFailedError",
  18879. "WorktreeRemoveFailedError",
  18880. "WorktreeResetFailedError",
  18881. "WorktreeListFailedError"
  18882. ]
  18883. },
  18884. "data": {
  18885. "type": "object",
  18886. "properties": {
  18887. "message": {
  18888. "type": "string"
  18889. }
  18890. },
  18891. "required": ["message"],
  18892. "additionalProperties": false
  18893. }
  18894. },
  18895. "required": ["name", "data"],
  18896. "additionalProperties": false
  18897. },
  18898. "WorktreeCreateInput": {
  18899. "type": "object",
  18900. "properties": {
  18901. "name": {
  18902. "type": "string"
  18903. },
  18904. "startCommand": {
  18905. "type": "string",
  18906. "description": "Additional startup script to run after the project's start command"
  18907. }
  18908. },
  18909. "additionalProperties": false
  18910. },
  18911. "Worktree": {
  18912. "type": "object",
  18913. "properties": {
  18914. "name": {
  18915. "type": "string"
  18916. },
  18917. "branch": {
  18918. "type": "string"
  18919. },
  18920. "directory": {
  18921. "type": "string"
  18922. }
  18923. },
  18924. "required": ["name", "directory"],
  18925. "additionalProperties": false
  18926. },
  18927. "WorktreeRemoveInput": {
  18928. "type": "object",
  18929. "properties": {
  18930. "directory": {
  18931. "type": "string"
  18932. }
  18933. },
  18934. "required": ["directory"],
  18935. "additionalProperties": false
  18936. },
  18937. "WorktreeResetInput": {
  18938. "type": "object",
  18939. "properties": {
  18940. "directory": {
  18941. "type": "string"
  18942. }
  18943. },
  18944. "required": ["directory"],
  18945. "additionalProperties": false
  18946. },
  18947. "ProjectSummary": {
  18948. "type": "object",
  18949. "properties": {
  18950. "id": {
  18951. "type": "string"
  18952. },
  18953. "name": {
  18954. "type": "string"
  18955. },
  18956. "worktree": {
  18957. "type": "string"
  18958. }
  18959. },
  18960. "required": ["id", "worktree"],
  18961. "additionalProperties": false
  18962. },
  18963. "GlobalSession": {
  18964. "type": "object",
  18965. "properties": {
  18966. "id": {
  18967. "type": "string",
  18968. "pattern": "^ses"
  18969. },
  18970. "slug": {
  18971. "type": "string"
  18972. },
  18973. "projectID": {
  18974. "type": "string"
  18975. },
  18976. "workspaceID": {
  18977. "type": "string",
  18978. "pattern": "^wrk"
  18979. },
  18980. "directory": {
  18981. "type": "string"
  18982. },
  18983. "path": {
  18984. "type": "string"
  18985. },
  18986. "parentID": {
  18987. "type": "string",
  18988. "pattern": "^ses"
  18989. },
  18990. "summary": {
  18991. "type": "object",
  18992. "properties": {
  18993. "additions": {
  18994. "type": "number"
  18995. },
  18996. "deletions": {
  18997. "type": "number"
  18998. },
  18999. "files": {
  19000. "type": "number"
  19001. },
  19002. "diffs": {
  19003. "type": "array",
  19004. "items": {
  19005. "$ref": "#/components/schemas/SnapshotFileDiff"
  19006. }
  19007. }
  19008. },
  19009. "required": ["additions", "deletions", "files"],
  19010. "additionalProperties": false
  19011. },
  19012. "cost": {
  19013. "type": "number"
  19014. },
  19015. "tokens": {
  19016. "type": "object",
  19017. "properties": {
  19018. "input": {
  19019. "type": "number"
  19020. },
  19021. "output": {
  19022. "type": "number"
  19023. },
  19024. "reasoning": {
  19025. "type": "number"
  19026. },
  19027. "cache": {
  19028. "type": "object",
  19029. "properties": {
  19030. "read": {
  19031. "type": "number"
  19032. },
  19033. "write": {
  19034. "type": "number"
  19035. }
  19036. },
  19037. "required": ["read", "write"],
  19038. "additionalProperties": false
  19039. }
  19040. },
  19041. "required": ["input", "output", "reasoning", "cache"],
  19042. "additionalProperties": false
  19043. },
  19044. "share": {
  19045. "type": "object",
  19046. "properties": {
  19047. "url": {
  19048. "type": "string"
  19049. }
  19050. },
  19051. "required": ["url"],
  19052. "additionalProperties": false
  19053. },
  19054. "title": {
  19055. "type": "string"
  19056. },
  19057. "agent": {
  19058. "type": "string"
  19059. },
  19060. "model": {
  19061. "type": "object",
  19062. "properties": {
  19063. "id": {
  19064. "type": "string"
  19065. },
  19066. "providerID": {
  19067. "type": "string"
  19068. },
  19069. "variant": {
  19070. "type": "string"
  19071. }
  19072. },
  19073. "required": ["id", "providerID"],
  19074. "additionalProperties": false
  19075. },
  19076. "version": {
  19077. "type": "string"
  19078. },
  19079. "metadata": {
  19080. "type": "object"
  19081. },
  19082. "time": {
  19083. "type": "object",
  19084. "properties": {
  19085. "created": {
  19086. "type": "integer",
  19087. "minimum": 0
  19088. },
  19089. "updated": {
  19090. "type": "integer",
  19091. "minimum": 0
  19092. },
  19093. "compacting": {
  19094. "type": "integer",
  19095. "minimum": 0
  19096. },
  19097. "archived": {
  19098. "type": "number"
  19099. }
  19100. },
  19101. "required": ["created", "updated"],
  19102. "additionalProperties": false
  19103. },
  19104. "permission": {
  19105. "$ref": "#/components/schemas/PermissionRuleset"
  19106. },
  19107. "revert": {
  19108. "type": "object",
  19109. "properties": {
  19110. "messageID": {
  19111. "type": "string",
  19112. "pattern": "^msg"
  19113. },
  19114. "partID": {
  19115. "type": "string",
  19116. "pattern": "^prt"
  19117. },
  19118. "snapshot": {
  19119. "type": "string"
  19120. },
  19121. "diff": {
  19122. "type": "string"
  19123. }
  19124. },
  19125. "required": ["messageID"],
  19126. "additionalProperties": false
  19127. },
  19128. "project": {
  19129. "anyOf": [
  19130. {
  19131. "$ref": "#/components/schemas/ProjectSummary"
  19132. },
  19133. {
  19134. "type": "null"
  19135. }
  19136. ]
  19137. }
  19138. },
  19139. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  19140. "additionalProperties": false
  19141. },
  19142. "McpResource": {
  19143. "type": "object",
  19144. "properties": {
  19145. "name": {
  19146. "type": "string"
  19147. },
  19148. "uri": {
  19149. "type": "string"
  19150. },
  19151. "description": {
  19152. "type": "string"
  19153. },
  19154. "mimeType": {
  19155. "type": "string"
  19156. },
  19157. "client": {
  19158. "type": "string"
  19159. }
  19160. },
  19161. "required": ["name", "uri", "client"],
  19162. "additionalProperties": false
  19163. },
  19164. "Symbol": {
  19165. "type": "object",
  19166. "properties": {
  19167. "name": {
  19168. "type": "string"
  19169. },
  19170. "kind": {
  19171. "type": "integer",
  19172. "minimum": 0
  19173. },
  19174. "location": {
  19175. "type": "object",
  19176. "properties": {
  19177. "uri": {
  19178. "type": "string"
  19179. },
  19180. "range": {
  19181. "$ref": "#/components/schemas/Range"
  19182. }
  19183. },
  19184. "required": ["uri", "range"],
  19185. "additionalProperties": false
  19186. }
  19187. },
  19188. "required": ["name", "kind", "location"],
  19189. "additionalProperties": false
  19190. },
  19191. "FileNode": {
  19192. "type": "object",
  19193. "properties": {
  19194. "name": {
  19195. "type": "string"
  19196. },
  19197. "path": {
  19198. "type": "string"
  19199. },
  19200. "absolute": {
  19201. "type": "string"
  19202. },
  19203. "type": {
  19204. "type": "string",
  19205. "enum": ["file", "directory"]
  19206. },
  19207. "ignored": {
  19208. "type": "boolean"
  19209. }
  19210. },
  19211. "required": ["name", "path", "absolute", "type", "ignored"],
  19212. "additionalProperties": false
  19213. },
  19214. "FileContent": {
  19215. "type": "object",
  19216. "properties": {
  19217. "type": {
  19218. "type": "string",
  19219. "enum": ["text", "binary"]
  19220. },
  19221. "content": {
  19222. "type": "string"
  19223. },
  19224. "diff": {
  19225. "type": "string"
  19226. },
  19227. "patch": {
  19228. "type": "object",
  19229. "properties": {
  19230. "oldFileName": {
  19231. "type": "string"
  19232. },
  19233. "newFileName": {
  19234. "type": "string"
  19235. },
  19236. "oldHeader": {
  19237. "type": "string"
  19238. },
  19239. "newHeader": {
  19240. "type": "string"
  19241. },
  19242. "hunks": {
  19243. "type": "array",
  19244. "items": {
  19245. "type": "object",
  19246. "properties": {
  19247. "oldStart": {
  19248. "type": "integer",
  19249. "minimum": 0
  19250. },
  19251. "oldLines": {
  19252. "type": "integer",
  19253. "minimum": 0
  19254. },
  19255. "newStart": {
  19256. "type": "integer",
  19257. "minimum": 0
  19258. },
  19259. "newLines": {
  19260. "type": "integer",
  19261. "minimum": 0
  19262. },
  19263. "lines": {
  19264. "type": "array",
  19265. "items": {
  19266. "type": "string"
  19267. }
  19268. }
  19269. },
  19270. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19271. "additionalProperties": false
  19272. }
  19273. },
  19274. "index": {
  19275. "type": "string"
  19276. }
  19277. },
  19278. "required": ["oldFileName", "newFileName", "hunks"],
  19279. "additionalProperties": false
  19280. },
  19281. "encoding": {
  19282. "type": "string",
  19283. "enum": ["base64"]
  19284. },
  19285. "mimeType": {
  19286. "type": "string"
  19287. }
  19288. },
  19289. "required": ["type", "content"],
  19290. "additionalProperties": false
  19291. },
  19292. "File": {
  19293. "type": "object",
  19294. "properties": {
  19295. "path": {
  19296. "type": "string"
  19297. },
  19298. "added": {
  19299. "type": "integer",
  19300. "minimum": 0
  19301. },
  19302. "removed": {
  19303. "type": "integer",
  19304. "minimum": 0
  19305. },
  19306. "status": {
  19307. "type": "string",
  19308. "enum": ["added", "deleted", "modified"]
  19309. }
  19310. },
  19311. "required": ["path", "added", "removed", "status"],
  19312. "additionalProperties": false
  19313. },
  19314. "Path": {
  19315. "type": "object",
  19316. "properties": {
  19317. "home": {
  19318. "type": "string"
  19319. },
  19320. "state": {
  19321. "type": "string"
  19322. },
  19323. "config": {
  19324. "type": "string"
  19325. },
  19326. "worktree": {
  19327. "type": "string"
  19328. },
  19329. "directory": {
  19330. "type": "string"
  19331. }
  19332. },
  19333. "required": ["home", "state", "config", "worktree", "directory"],
  19334. "additionalProperties": false
  19335. },
  19336. "VcsInfo": {
  19337. "type": "object",
  19338. "properties": {
  19339. "branch": {
  19340. "type": "string"
  19341. },
  19342. "default_branch": {
  19343. "type": "string"
  19344. }
  19345. },
  19346. "additionalProperties": false
  19347. },
  19348. "VcsFileStatus": {
  19349. "type": "object",
  19350. "properties": {
  19351. "file": {
  19352. "type": "string"
  19353. },
  19354. "additions": {
  19355. "type": "number"
  19356. },
  19357. "deletions": {
  19358. "type": "number"
  19359. },
  19360. "status": {
  19361. "type": "string",
  19362. "enum": ["added", "deleted", "modified"]
  19363. }
  19364. },
  19365. "required": ["file", "additions", "deletions", "status"],
  19366. "additionalProperties": false
  19367. },
  19368. "VcsFileDiff": {
  19369. "type": "object",
  19370. "properties": {
  19371. "file": {
  19372. "type": "string"
  19373. },
  19374. "patch": {
  19375. "type": "string"
  19376. },
  19377. "additions": {
  19378. "type": "number"
  19379. },
  19380. "deletions": {
  19381. "type": "number"
  19382. },
  19383. "status": {
  19384. "type": "string",
  19385. "enum": ["added", "deleted", "modified"]
  19386. }
  19387. },
  19388. "required": ["file", "additions", "deletions"],
  19389. "additionalProperties": false
  19390. },
  19391. "VcsApplyError": {
  19392. "type": "object",
  19393. "properties": {
  19394. "name": {
  19395. "type": "string",
  19396. "enum": ["VcsApplyError"]
  19397. },
  19398. "data": {
  19399. "type": "object",
  19400. "properties": {
  19401. "message": {
  19402. "type": "string"
  19403. },
  19404. "reason": {
  19405. "type": "string",
  19406. "enum": ["non-git", "not-clean"]
  19407. }
  19408. },
  19409. "required": ["message", "reason"],
  19410. "additionalProperties": false
  19411. }
  19412. },
  19413. "required": ["name", "data"],
  19414. "additionalProperties": false
  19415. },
  19416. "Command": {
  19417. "type": "object",
  19418. "properties": {
  19419. "name": {
  19420. "type": "string"
  19421. },
  19422. "description": {
  19423. "type": "string"
  19424. },
  19425. "agent": {
  19426. "type": "string"
  19427. },
  19428. "model": {
  19429. "type": "string"
  19430. },
  19431. "source": {
  19432. "type": "string",
  19433. "enum": ["command", "mcp", "skill"]
  19434. },
  19435. "template": {
  19436. "type": "string"
  19437. },
  19438. "subtask": {
  19439. "type": "boolean"
  19440. },
  19441. "hints": {
  19442. "type": "array",
  19443. "items": {
  19444. "type": "string"
  19445. }
  19446. }
  19447. },
  19448. "required": ["name", "template", "hints"],
  19449. "additionalProperties": false
  19450. },
  19451. "Agent": {
  19452. "type": "object",
  19453. "properties": {
  19454. "name": {
  19455. "type": "string"
  19456. },
  19457. "description": {
  19458. "type": "string"
  19459. },
  19460. "mode": {
  19461. "type": "string",
  19462. "enum": ["subagent", "primary", "all"]
  19463. },
  19464. "native": {
  19465. "type": "boolean"
  19466. },
  19467. "hidden": {
  19468. "type": "boolean"
  19469. },
  19470. "topP": {
  19471. "type": "number"
  19472. },
  19473. "temperature": {
  19474. "type": "number"
  19475. },
  19476. "color": {
  19477. "type": "string"
  19478. },
  19479. "permission": {
  19480. "$ref": "#/components/schemas/PermissionRuleset"
  19481. },
  19482. "model": {
  19483. "type": "object",
  19484. "properties": {
  19485. "modelID": {
  19486. "type": "string"
  19487. },
  19488. "providerID": {
  19489. "type": "string"
  19490. }
  19491. },
  19492. "required": ["modelID", "providerID"],
  19493. "additionalProperties": false
  19494. },
  19495. "variant": {
  19496. "type": "string"
  19497. },
  19498. "prompt": {
  19499. "type": "string"
  19500. },
  19501. "options": {
  19502. "type": "object"
  19503. },
  19504. "steps": {
  19505. "type": "number"
  19506. }
  19507. },
  19508. "required": ["name", "mode", "permission", "options"],
  19509. "additionalProperties": false
  19510. },
  19511. "LSPStatus": {
  19512. "type": "object",
  19513. "properties": {
  19514. "id": {
  19515. "type": "string"
  19516. },
  19517. "name": {
  19518. "type": "string"
  19519. },
  19520. "root": {
  19521. "type": "string"
  19522. },
  19523. "status": {
  19524. "type": "string",
  19525. "enum": ["connected", "error"]
  19526. }
  19527. },
  19528. "required": ["id", "name", "root", "status"],
  19529. "additionalProperties": false
  19530. },
  19531. "FormatterStatus": {
  19532. "type": "object",
  19533. "properties": {
  19534. "name": {
  19535. "type": "string"
  19536. },
  19537. "extensions": {
  19538. "type": "array",
  19539. "items": {
  19540. "type": "string"
  19541. }
  19542. },
  19543. "enabled": {
  19544. "type": "boolean"
  19545. }
  19546. },
  19547. "required": ["name", "extensions", "enabled"],
  19548. "additionalProperties": false
  19549. },
  19550. "MCPStatusConnected": {
  19551. "type": "object",
  19552. "properties": {
  19553. "status": {
  19554. "type": "string",
  19555. "enum": ["connected"]
  19556. }
  19557. },
  19558. "required": ["status"],
  19559. "additionalProperties": false
  19560. },
  19561. "MCPStatusDisabled": {
  19562. "type": "object",
  19563. "properties": {
  19564. "status": {
  19565. "type": "string",
  19566. "enum": ["disabled"]
  19567. }
  19568. },
  19569. "required": ["status"],
  19570. "additionalProperties": false
  19571. },
  19572. "MCPStatusFailed": {
  19573. "type": "object",
  19574. "properties": {
  19575. "status": {
  19576. "type": "string",
  19577. "enum": ["failed"]
  19578. },
  19579. "error": {
  19580. "type": "string"
  19581. }
  19582. },
  19583. "required": ["status", "error"],
  19584. "additionalProperties": false
  19585. },
  19586. "MCPStatusNeedsAuth": {
  19587. "type": "object",
  19588. "properties": {
  19589. "status": {
  19590. "type": "string",
  19591. "enum": ["needs_auth"]
  19592. }
  19593. },
  19594. "required": ["status"],
  19595. "additionalProperties": false
  19596. },
  19597. "MCPStatusNeedsClientRegistration": {
  19598. "type": "object",
  19599. "properties": {
  19600. "status": {
  19601. "type": "string",
  19602. "enum": ["needs_client_registration"]
  19603. },
  19604. "error": {
  19605. "type": "string"
  19606. }
  19607. },
  19608. "required": ["status", "error"],
  19609. "additionalProperties": false
  19610. },
  19611. "MCPStatus": {
  19612. "anyOf": [
  19613. {
  19614. "$ref": "#/components/schemas/MCPStatusConnected"
  19615. },
  19616. {
  19617. "$ref": "#/components/schemas/MCPStatusDisabled"
  19618. },
  19619. {
  19620. "$ref": "#/components/schemas/MCPStatusFailed"
  19621. },
  19622. {
  19623. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19624. },
  19625. {
  19626. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19627. }
  19628. ]
  19629. },
  19630. "McpUnsupportedOAuthError": {
  19631. "type": "object",
  19632. "properties": {
  19633. "error": {
  19634. "type": "string"
  19635. }
  19636. },
  19637. "required": ["error"],
  19638. "additionalProperties": false
  19639. },
  19640. "McpServerNotFoundError": {
  19641. "type": "object",
  19642. "properties": {
  19643. "_tag": {
  19644. "type": "string",
  19645. "enum": ["McpServerNotFoundError"]
  19646. },
  19647. "name": {
  19648. "type": "string"
  19649. },
  19650. "message": {
  19651. "type": "string"
  19652. }
  19653. },
  19654. "required": ["_tag", "name", "message"],
  19655. "additionalProperties": false
  19656. },
  19657. "Project": {
  19658. "type": "object",
  19659. "properties": {
  19660. "id": {
  19661. "type": "string"
  19662. },
  19663. "worktree": {
  19664. "type": "string"
  19665. },
  19666. "vcs": {
  19667. "type": "string",
  19668. "enum": ["git"]
  19669. },
  19670. "name": {
  19671. "type": "string"
  19672. },
  19673. "icon": {
  19674. "type": "object",
  19675. "properties": {
  19676. "url": {
  19677. "type": "string"
  19678. },
  19679. "override": {
  19680. "type": "string"
  19681. },
  19682. "color": {
  19683. "type": "string"
  19684. }
  19685. },
  19686. "additionalProperties": false
  19687. },
  19688. "commands": {
  19689. "type": "object",
  19690. "properties": {
  19691. "start": {
  19692. "type": "string",
  19693. "description": "Startup script to run when creating a new workspace (worktree)"
  19694. }
  19695. },
  19696. "additionalProperties": false
  19697. },
  19698. "time": {
  19699. "type": "object",
  19700. "properties": {
  19701. "created": {
  19702. "type": "integer",
  19703. "minimum": 0
  19704. },
  19705. "updated": {
  19706. "type": "integer",
  19707. "minimum": 0
  19708. },
  19709. "initialized": {
  19710. "type": "integer",
  19711. "minimum": 0
  19712. }
  19713. },
  19714. "required": ["created", "updated"],
  19715. "additionalProperties": false
  19716. },
  19717. "sandboxes": {
  19718. "type": "array",
  19719. "items": {
  19720. "type": "string"
  19721. }
  19722. }
  19723. },
  19724. "required": ["id", "worktree", "time", "sandboxes"],
  19725. "additionalProperties": false
  19726. },
  19727. "ProjectNotFoundError": {
  19728. "type": "object",
  19729. "properties": {
  19730. "_tag": {
  19731. "type": "string",
  19732. "enum": ["ProjectNotFoundError"]
  19733. },
  19734. "projectID": {
  19735. "type": "string"
  19736. },
  19737. "message": {
  19738. "type": "string"
  19739. }
  19740. },
  19741. "required": ["_tag", "projectID", "message"],
  19742. "additionalProperties": false
  19743. },
  19744. "ProjectCopyError": {
  19745. "type": "object",
  19746. "properties": {
  19747. "name": {
  19748. "type": "string",
  19749. "enum": ["ProjectCopyError"]
  19750. },
  19751. "data": {
  19752. "type": "object",
  19753. "properties": {
  19754. "message": {
  19755. "type": "string"
  19756. },
  19757. "forceRequired": {
  19758. "type": "boolean"
  19759. }
  19760. },
  19761. "required": ["message"],
  19762. "additionalProperties": false
  19763. }
  19764. },
  19765. "required": ["name", "data"],
  19766. "additionalProperties": false
  19767. },
  19768. "PtyNotFoundError": {
  19769. "type": "object",
  19770. "properties": {
  19771. "_tag": {
  19772. "type": "string",
  19773. "enum": ["PtyNotFoundError"]
  19774. },
  19775. "ptyID": {
  19776. "type": "string"
  19777. },
  19778. "message": {
  19779. "type": "string"
  19780. }
  19781. },
  19782. "required": ["_tag", "ptyID", "message"],
  19783. "additionalProperties": false
  19784. },
  19785. "PtyForbiddenError": {
  19786. "type": "object",
  19787. "properties": {
  19788. "_tag": {
  19789. "type": "string",
  19790. "enum": ["PtyForbiddenError"]
  19791. },
  19792. "message": {
  19793. "type": "string"
  19794. }
  19795. },
  19796. "required": ["_tag", "message"],
  19797. "additionalProperties": false
  19798. },
  19799. "QuestionRequest": {
  19800. "type": "object",
  19801. "properties": {
  19802. "id": {
  19803. "type": "string",
  19804. "pattern": "^que"
  19805. },
  19806. "sessionID": {
  19807. "type": "string",
  19808. "pattern": "^ses"
  19809. },
  19810. "questions": {
  19811. "type": "array",
  19812. "items": {
  19813. "$ref": "#/components/schemas/QuestionInfo"
  19814. },
  19815. "description": "Questions to ask"
  19816. },
  19817. "tool": {
  19818. "$ref": "#/components/schemas/QuestionTool"
  19819. }
  19820. },
  19821. "required": ["id", "sessionID", "questions"],
  19822. "additionalProperties": false
  19823. },
  19824. "QuestionNotFoundError": {
  19825. "type": "object",
  19826. "properties": {
  19827. "_tag": {
  19828. "type": "string",
  19829. "enum": ["QuestionNotFoundError"]
  19830. },
  19831. "requestID": {
  19832. "type": "string"
  19833. },
  19834. "message": {
  19835. "type": "string"
  19836. }
  19837. },
  19838. "required": ["_tag", "requestID", "message"],
  19839. "additionalProperties": false
  19840. },
  19841. "PermissionRequest": {
  19842. "type": "object",
  19843. "properties": {
  19844. "id": {
  19845. "type": "string",
  19846. "pattern": "^per"
  19847. },
  19848. "sessionID": {
  19849. "type": "string",
  19850. "pattern": "^ses"
  19851. },
  19852. "permission": {
  19853. "type": "string"
  19854. },
  19855. "patterns": {
  19856. "type": "array",
  19857. "items": {
  19858. "type": "string"
  19859. }
  19860. },
  19861. "metadata": {
  19862. "type": "object"
  19863. },
  19864. "always": {
  19865. "type": "array",
  19866. "items": {
  19867. "type": "string"
  19868. }
  19869. },
  19870. "tool": {
  19871. "type": "object",
  19872. "properties": {
  19873. "messageID": {
  19874. "type": "string"
  19875. },
  19876. "callID": {
  19877. "type": "string"
  19878. }
  19879. },
  19880. "required": ["messageID", "callID"],
  19881. "additionalProperties": false
  19882. }
  19883. },
  19884. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19885. "additionalProperties": false
  19886. },
  19887. "PermissionNotFoundError": {
  19888. "type": "object",
  19889. "properties": {
  19890. "_tag": {
  19891. "type": "string",
  19892. "enum": ["PermissionNotFoundError"]
  19893. },
  19894. "requestID": {
  19895. "type": "string"
  19896. },
  19897. "message": {
  19898. "type": "string"
  19899. }
  19900. },
  19901. "required": ["_tag", "requestID", "message"],
  19902. "additionalProperties": false
  19903. },
  19904. "ProviderAuthMethod": {
  19905. "type": "object",
  19906. "properties": {
  19907. "type": {
  19908. "type": "string",
  19909. "enum": ["oauth", "api"]
  19910. },
  19911. "label": {
  19912. "type": "string"
  19913. },
  19914. "prompts": {
  19915. "type": "array",
  19916. "items": {
  19917. "anyOf": [
  19918. {
  19919. "type": "object",
  19920. "properties": {
  19921. "type": {
  19922. "type": "string",
  19923. "enum": ["text"]
  19924. },
  19925. "key": {
  19926. "type": "string"
  19927. },
  19928. "message": {
  19929. "type": "string"
  19930. },
  19931. "placeholder": {
  19932. "type": "string"
  19933. },
  19934. "when": {
  19935. "type": "object",
  19936. "properties": {
  19937. "key": {
  19938. "type": "string"
  19939. },
  19940. "op": {
  19941. "type": "string",
  19942. "enum": ["eq", "neq"]
  19943. },
  19944. "value": {
  19945. "type": "string"
  19946. }
  19947. },
  19948. "required": ["key", "op", "value"],
  19949. "additionalProperties": false
  19950. }
  19951. },
  19952. "required": ["type", "key", "message"],
  19953. "additionalProperties": false
  19954. },
  19955. {
  19956. "type": "object",
  19957. "properties": {
  19958. "type": {
  19959. "type": "string",
  19960. "enum": ["select"]
  19961. },
  19962. "key": {
  19963. "type": "string"
  19964. },
  19965. "message": {
  19966. "type": "string"
  19967. },
  19968. "options": {
  19969. "type": "array",
  19970. "items": {
  19971. "type": "object",
  19972. "properties": {
  19973. "label": {
  19974. "type": "string"
  19975. },
  19976. "value": {
  19977. "type": "string"
  19978. },
  19979. "hint": {
  19980. "type": "string"
  19981. }
  19982. },
  19983. "required": ["label", "value"],
  19984. "additionalProperties": false
  19985. }
  19986. },
  19987. "when": {
  19988. "type": "object",
  19989. "properties": {
  19990. "key": {
  19991. "type": "string"
  19992. },
  19993. "op": {
  19994. "type": "string",
  19995. "enum": ["eq", "neq"]
  19996. },
  19997. "value": {
  19998. "type": "string"
  19999. }
  20000. },
  20001. "required": ["key", "op", "value"],
  20002. "additionalProperties": false
  20003. }
  20004. },
  20005. "required": ["type", "key", "message", "options"],
  20006. "additionalProperties": false
  20007. }
  20008. ]
  20009. }
  20010. }
  20011. },
  20012. "required": ["type", "label"],
  20013. "additionalProperties": false
  20014. },
  20015. "ProviderAuthAuthorization": {
  20016. "type": "object",
  20017. "properties": {
  20018. "url": {
  20019. "type": "string"
  20020. },
  20021. "method": {
  20022. "type": "string",
  20023. "enum": ["auto", "code"]
  20024. },
  20025. "instructions": {
  20026. "type": "string"
  20027. }
  20028. },
  20029. "required": ["url", "method", "instructions"],
  20030. "additionalProperties": false
  20031. },
  20032. "ProviderAuthError1": {
  20033. "type": "object",
  20034. "properties": {
  20035. "name": {
  20036. "type": "string",
  20037. "enum": [
  20038. "BadRequest",
  20039. "ProviderAuthOauthMissing",
  20040. "ProviderAuthOauthCodeMissing",
  20041. "ProviderAuthOauthCallbackFailed",
  20042. "ProviderAuthValidationFailed"
  20043. ]
  20044. },
  20045. "data": {
  20046. "type": "object",
  20047. "properties": {
  20048. "providerID": {
  20049. "type": "string"
  20050. },
  20051. "field": {
  20052. "type": "string"
  20053. },
  20054. "message": {
  20055. "type": "string"
  20056. },
  20057. "kind": {
  20058. "type": "string"
  20059. }
  20060. },
  20061. "additionalProperties": false
  20062. }
  20063. },
  20064. "required": ["name", "data"],
  20065. "additionalProperties": false
  20066. },
  20067. "NotFoundError": {
  20068. "type": "object",
  20069. "required": ["name", "data"],
  20070. "properties": {
  20071. "name": {
  20072. "type": "string",
  20073. "enum": ["NotFoundError"]
  20074. },
  20075. "data": {
  20076. "type": "object",
  20077. "required": ["message"],
  20078. "properties": {
  20079. "message": {
  20080. "type": "string"
  20081. }
  20082. }
  20083. }
  20084. }
  20085. },
  20086. "TextPartInput": {
  20087. "type": "object",
  20088. "properties": {
  20089. "id": {
  20090. "type": "string",
  20091. "pattern": "^prt"
  20092. },
  20093. "type": {
  20094. "type": "string",
  20095. "enum": ["text"]
  20096. },
  20097. "text": {
  20098. "type": "string"
  20099. },
  20100. "synthetic": {
  20101. "type": "boolean"
  20102. },
  20103. "ignored": {
  20104. "type": "boolean"
  20105. },
  20106. "time": {
  20107. "type": "object",
  20108. "properties": {
  20109. "start": {
  20110. "type": "integer",
  20111. "minimum": 0
  20112. },
  20113. "end": {
  20114. "type": "integer",
  20115. "minimum": 0
  20116. }
  20117. },
  20118. "required": ["start"],
  20119. "additionalProperties": false
  20120. },
  20121. "metadata": {
  20122. "type": "object"
  20123. }
  20124. },
  20125. "required": ["type", "text"],
  20126. "additionalProperties": false
  20127. },
  20128. "FilePartInput": {
  20129. "type": "object",
  20130. "properties": {
  20131. "id": {
  20132. "type": "string",
  20133. "pattern": "^prt"
  20134. },
  20135. "type": {
  20136. "type": "string",
  20137. "enum": ["file"]
  20138. },
  20139. "mime": {
  20140. "type": "string"
  20141. },
  20142. "filename": {
  20143. "type": "string"
  20144. },
  20145. "url": {
  20146. "type": "string"
  20147. },
  20148. "source": {
  20149. "$ref": "#/components/schemas/FilePartSource"
  20150. }
  20151. },
  20152. "required": ["type", "mime", "url"],
  20153. "additionalProperties": false
  20154. },
  20155. "AgentPartInput": {
  20156. "type": "object",
  20157. "properties": {
  20158. "id": {
  20159. "type": "string",
  20160. "pattern": "^prt"
  20161. },
  20162. "type": {
  20163. "type": "string",
  20164. "enum": ["agent"]
  20165. },
  20166. "name": {
  20167. "type": "string"
  20168. },
  20169. "source": {
  20170. "type": "object",
  20171. "properties": {
  20172. "value": {
  20173. "type": "string"
  20174. },
  20175. "start": {
  20176. "type": "integer",
  20177. "minimum": 0
  20178. },
  20179. "end": {
  20180. "type": "integer",
  20181. "minimum": 0
  20182. }
  20183. },
  20184. "required": ["value", "start", "end"],
  20185. "additionalProperties": false
  20186. }
  20187. },
  20188. "required": ["type", "name"],
  20189. "additionalProperties": false
  20190. },
  20191. "SubtaskPartInput": {
  20192. "type": "object",
  20193. "properties": {
  20194. "id": {
  20195. "type": "string",
  20196. "pattern": "^prt"
  20197. },
  20198. "type": {
  20199. "type": "string",
  20200. "enum": ["subtask"]
  20201. },
  20202. "prompt": {
  20203. "type": "string"
  20204. },
  20205. "description": {
  20206. "type": "string"
  20207. },
  20208. "agent": {
  20209. "type": "string"
  20210. },
  20211. "model": {
  20212. "type": "object",
  20213. "properties": {
  20214. "providerID": {
  20215. "type": "string"
  20216. },
  20217. "modelID": {
  20218. "type": "string"
  20219. }
  20220. },
  20221. "required": ["providerID", "modelID"],
  20222. "additionalProperties": false
  20223. },
  20224. "command": {
  20225. "type": "string"
  20226. }
  20227. },
  20228. "required": ["type", "prompt", "description", "agent"],
  20229. "additionalProperties": false
  20230. },
  20231. "SessionBusyError": {
  20232. "type": "object",
  20233. "properties": {
  20234. "_tag": {
  20235. "type": "string",
  20236. "enum": ["SessionBusyError"]
  20237. },
  20238. "sessionID": {
  20239. "type": "string"
  20240. },
  20241. "message": {
  20242. "type": "string"
  20243. }
  20244. },
  20245. "required": ["_tag", "sessionID", "message"],
  20246. "additionalProperties": false
  20247. },
  20248. "EventTuiPromptAppend": {
  20249. "type": "object",
  20250. "properties": {
  20251. "type": {
  20252. "type": "string",
  20253. "enum": ["tui.prompt.append"]
  20254. },
  20255. "properties": {
  20256. "type": "object",
  20257. "properties": {
  20258. "text": {
  20259. "type": "string"
  20260. }
  20261. },
  20262. "required": ["text"],
  20263. "additionalProperties": false
  20264. }
  20265. },
  20266. "required": ["type", "properties"],
  20267. "additionalProperties": false
  20268. },
  20269. "EventTuiCommandExecute": {
  20270. "type": "object",
  20271. "properties": {
  20272. "type": {
  20273. "type": "string",
  20274. "enum": ["tui.command.execute"]
  20275. },
  20276. "properties": {
  20277. "type": "object",
  20278. "properties": {
  20279. "command": {
  20280. "anyOf": [
  20281. {
  20282. "type": "string",
  20283. "enum": [
  20284. "session.list",
  20285. "session.new",
  20286. "session.share",
  20287. "session.interrupt",
  20288. "session.compact",
  20289. "session.page.up",
  20290. "session.page.down",
  20291. "session.line.up",
  20292. "session.line.down",
  20293. "session.half.page.up",
  20294. "session.half.page.down",
  20295. "session.first",
  20296. "session.last",
  20297. "prompt.clear",
  20298. "prompt.submit",
  20299. "agent.cycle"
  20300. ]
  20301. },
  20302. {
  20303. "type": "string"
  20304. }
  20305. ]
  20306. }
  20307. },
  20308. "required": ["command"],
  20309. "additionalProperties": false
  20310. }
  20311. },
  20312. "required": ["type", "properties"],
  20313. "additionalProperties": false
  20314. },
  20315. "EventTuiToastShow": {
  20316. "type": "object",
  20317. "properties": {
  20318. "type": {
  20319. "type": "string",
  20320. "enum": ["tui.toast.show"]
  20321. },
  20322. "properties": {
  20323. "type": "object",
  20324. "properties": {
  20325. "title": {
  20326. "type": "string"
  20327. },
  20328. "message": {
  20329. "type": "string"
  20330. },
  20331. "variant": {
  20332. "type": "string",
  20333. "enum": ["info", "success", "warning", "error"]
  20334. },
  20335. "duration": {
  20336. "type": "integer",
  20337. "exclusiveMinimum": 0
  20338. }
  20339. },
  20340. "required": ["message", "variant"],
  20341. "additionalProperties": false
  20342. }
  20343. },
  20344. "required": ["type", "properties"],
  20345. "additionalProperties": false
  20346. },
  20347. "EventTuiSessionSelect": {
  20348. "type": "object",
  20349. "properties": {
  20350. "type": {
  20351. "type": "string",
  20352. "enum": ["tui.session.select"]
  20353. },
  20354. "properties": {
  20355. "type": "object",
  20356. "properties": {
  20357. "sessionID": {
  20358. "type": "string",
  20359. "pattern": "^ses",
  20360. "description": "Session ID to navigate to"
  20361. }
  20362. },
  20363. "required": ["sessionID"],
  20364. "additionalProperties": false
  20365. }
  20366. },
  20367. "required": ["type", "properties"],
  20368. "additionalProperties": false
  20369. },
  20370. "Workspace": {
  20371. "type": "object",
  20372. "properties": {
  20373. "id": {
  20374. "type": "string",
  20375. "pattern": "^wrk"
  20376. },
  20377. "type": {
  20378. "type": "string"
  20379. },
  20380. "name": {
  20381. "type": "string"
  20382. },
  20383. "branch": {
  20384. "anyOf": [
  20385. {
  20386. "type": "string"
  20387. },
  20388. {
  20389. "type": "null"
  20390. }
  20391. ]
  20392. },
  20393. "directory": {
  20394. "anyOf": [
  20395. {
  20396. "type": "string"
  20397. },
  20398. {
  20399. "type": "null"
  20400. }
  20401. ]
  20402. },
  20403. "extra": {
  20404. "anyOf": [
  20405. {},
  20406. {
  20407. "type": "null"
  20408. }
  20409. ]
  20410. },
  20411. "projectID": {
  20412. "type": "string"
  20413. },
  20414. "timeUsed": {
  20415. "anyOf": [
  20416. {
  20417. "type": "number"
  20418. },
  20419. {
  20420. "type": "string",
  20421. "enum": ["NaN"]
  20422. },
  20423. {
  20424. "type": "string",
  20425. "enum": ["Infinity"]
  20426. },
  20427. {
  20428. "type": "string",
  20429. "enum": ["-Infinity"]
  20430. },
  20431. {
  20432. "type": "string",
  20433. "enum": ["Infinity", "-Infinity", "NaN"]
  20434. }
  20435. ]
  20436. }
  20437. },
  20438. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20439. "additionalProperties": false
  20440. },
  20441. "WorkspaceCreateError": {
  20442. "type": "object",
  20443. "properties": {
  20444. "name": {
  20445. "type": "string",
  20446. "enum": ["WorkspaceCreateError"]
  20447. },
  20448. "data": {
  20449. "type": "object",
  20450. "properties": {
  20451. "message": {
  20452. "type": "string"
  20453. }
  20454. },
  20455. "required": ["message"],
  20456. "additionalProperties": false
  20457. }
  20458. },
  20459. "required": ["name", "data"],
  20460. "additionalProperties": false
  20461. },
  20462. "WorkspaceWarpError": {
  20463. "type": "object",
  20464. "properties": {
  20465. "name": {
  20466. "type": "string",
  20467. "enum": ["WorkspaceWarpError"]
  20468. },
  20469. "data": {
  20470. "type": "object",
  20471. "properties": {
  20472. "message": {
  20473. "type": "string"
  20474. }
  20475. },
  20476. "required": ["message"],
  20477. "additionalProperties": false
  20478. }
  20479. },
  20480. "required": ["name", "data"],
  20481. "additionalProperties": false
  20482. },
  20483. "UnauthorizedError": {
  20484. "type": "object",
  20485. "properties": {
  20486. "_tag": {
  20487. "type": "string",
  20488. "enum": ["UnauthorizedError"]
  20489. },
  20490. "message": {
  20491. "type": "string"
  20492. }
  20493. },
  20494. "required": ["_tag", "message"],
  20495. "additionalProperties": false
  20496. },
  20497. "SessionsResponse": {
  20498. "type": "object",
  20499. "properties": {
  20500. "data": {
  20501. "type": "array",
  20502. "items": {
  20503. "$ref": "#/components/schemas/SessionV2Info"
  20504. }
  20505. },
  20506. "cursor": {
  20507. "type": "object",
  20508. "properties": {
  20509. "previous": {
  20510. "type": "string"
  20511. },
  20512. "next": {
  20513. "type": "string"
  20514. }
  20515. },
  20516. "additionalProperties": false
  20517. }
  20518. },
  20519. "required": ["data", "cursor"],
  20520. "additionalProperties": false
  20521. },
  20522. "InvalidCursorError": {
  20523. "type": "object",
  20524. "properties": {
  20525. "_tag": {
  20526. "type": "string",
  20527. "enum": ["InvalidCursorError"]
  20528. },
  20529. "message": {
  20530. "type": "string"
  20531. }
  20532. },
  20533. "required": ["_tag", "message"],
  20534. "additionalProperties": false
  20535. },
  20536. "ConflictError": {
  20537. "type": "object",
  20538. "properties": {
  20539. "_tag": {
  20540. "type": "string",
  20541. "enum": ["ConflictError"]
  20542. },
  20543. "message": {
  20544. "type": "string"
  20545. },
  20546. "resource": {
  20547. "type": "string"
  20548. }
  20549. },
  20550. "required": ["_tag", "message"],
  20551. "additionalProperties": false
  20552. },
  20553. "SessionNotFoundError": {
  20554. "type": "object",
  20555. "properties": {
  20556. "_tag": {
  20557. "type": "string",
  20558. "enum": ["SessionNotFoundError"]
  20559. },
  20560. "sessionID": {
  20561. "type": "string"
  20562. },
  20563. "message": {
  20564. "type": "string"
  20565. }
  20566. },
  20567. "required": ["_tag", "sessionID", "message"],
  20568. "additionalProperties": false
  20569. },
  20570. "ServiceUnavailableError": {
  20571. "type": "object",
  20572. "properties": {
  20573. "_tag": {
  20574. "type": "string",
  20575. "enum": ["ServiceUnavailableError"]
  20576. },
  20577. "message": {
  20578. "type": "string"
  20579. },
  20580. "service": {
  20581. "type": "string"
  20582. }
  20583. },
  20584. "required": ["_tag", "message"],
  20585. "additionalProperties": false
  20586. },
  20587. "UnknownError1": {
  20588. "type": "object",
  20589. "properties": {
  20590. "_tag": {
  20591. "type": "string",
  20592. "enum": ["UnknownError"]
  20593. },
  20594. "message": {
  20595. "type": "string"
  20596. },
  20597. "ref": {
  20598. "type": "string"
  20599. }
  20600. },
  20601. "required": ["_tag", "message"],
  20602. "additionalProperties": false
  20603. },
  20604. "SessionMessagesResponse": {
  20605. "type": "object",
  20606. "properties": {
  20607. "data": {
  20608. "type": "array",
  20609. "items": {
  20610. "$ref": "#/components/schemas/SessionMessage"
  20611. }
  20612. },
  20613. "cursor": {
  20614. "type": "object",
  20615. "properties": {
  20616. "previous": {
  20617. "type": "string"
  20618. },
  20619. "next": {
  20620. "type": "string"
  20621. }
  20622. },
  20623. "additionalProperties": false
  20624. }
  20625. },
  20626. "required": ["data", "cursor"],
  20627. "additionalProperties": false
  20628. },
  20629. "ProviderNotFoundError": {
  20630. "type": "object",
  20631. "properties": {
  20632. "_tag": {
  20633. "type": "string",
  20634. "enum": ["ProviderNotFoundError"]
  20635. },
  20636. "providerID": {
  20637. "type": "string"
  20638. },
  20639. "message": {
  20640. "type": "string"
  20641. }
  20642. },
  20643. "required": ["_tag", "providerID", "message"],
  20644. "additionalProperties": false
  20645. },
  20646. "effect_HttpApiError_Forbidden": {
  20647. "type": "object",
  20648. "properties": {
  20649. "_tag": {
  20650. "type": "string",
  20651. "enum": ["Forbidden"]
  20652. }
  20653. },
  20654. "required": ["_tag"],
  20655. "additionalProperties": false
  20656. },
  20657. "Event.tui.prompt.append": {
  20658. "type": "object",
  20659. "properties": {
  20660. "id": {
  20661. "type": "string",
  20662. "pattern": "^evt_"
  20663. },
  20664. "type": {
  20665. "type": "string",
  20666. "enum": ["tui.prompt.append"]
  20667. },
  20668. "properties": {
  20669. "type": "object",
  20670. "properties": {
  20671. "text": {
  20672. "type": "string"
  20673. }
  20674. },
  20675. "required": ["text"],
  20676. "additionalProperties": false
  20677. }
  20678. },
  20679. "required": ["id", "type", "properties"],
  20680. "additionalProperties": false
  20681. },
  20682. "Event.tui.command.execute": {
  20683. "type": "object",
  20684. "properties": {
  20685. "id": {
  20686. "type": "string",
  20687. "pattern": "^evt_"
  20688. },
  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": ["id", "type", "properties"],
  20730. "additionalProperties": false
  20731. },
  20732. "Event.tui.toast.show": {
  20733. "type": "object",
  20734. "properties": {
  20735. "id": {
  20736. "type": "string",
  20737. "pattern": "^evt_"
  20738. },
  20739. "type": {
  20740. "type": "string",
  20741. "enum": ["tui.toast.show"]
  20742. },
  20743. "properties": {
  20744. "type": "object",
  20745. "properties": {
  20746. "title": {
  20747. "type": "string"
  20748. },
  20749. "message": {
  20750. "type": "string"
  20751. },
  20752. "variant": {
  20753. "type": "string",
  20754. "enum": ["info", "success", "warning", "error"]
  20755. },
  20756. "duration": {
  20757. "type": "integer",
  20758. "exclusiveMinimum": 0
  20759. }
  20760. },
  20761. "required": ["message", "variant"],
  20762. "additionalProperties": false
  20763. }
  20764. },
  20765. "required": ["id", "type", "properties"],
  20766. "additionalProperties": false
  20767. },
  20768. "Event.tui.session.select": {
  20769. "type": "object",
  20770. "properties": {
  20771. "id": {
  20772. "type": "string",
  20773. "pattern": "^evt_"
  20774. },
  20775. "type": {
  20776. "type": "string",
  20777. "enum": ["tui.session.select"]
  20778. },
  20779. "properties": {
  20780. "type": "object",
  20781. "properties": {
  20782. "sessionID": {
  20783. "type": "string",
  20784. "pattern": "^ses",
  20785. "description": "Session ID to navigate to"
  20786. }
  20787. },
  20788. "required": ["sessionID"],
  20789. "additionalProperties": false
  20790. }
  20791. },
  20792. "required": ["id", "type", "properties"],
  20793. "additionalProperties": false
  20794. },
  20795. "MoveSessionDestination": {
  20796. "type": "object",
  20797. "properties": {
  20798. "directory": {
  20799. "type": "string"
  20800. }
  20801. },
  20802. "required": ["directory"],
  20803. "additionalProperties": false
  20804. },
  20805. "ModelV2Info": {
  20806. "type": "object",
  20807. "properties": {
  20808. "id": {
  20809. "type": "string"
  20810. },
  20811. "providerID": {
  20812. "type": "string"
  20813. },
  20814. "family": {
  20815. "type": "string"
  20816. },
  20817. "name": {
  20818. "type": "string"
  20819. },
  20820. "api": {
  20821. "anyOf": [
  20822. {
  20823. "type": "object",
  20824. "properties": {
  20825. "id": {
  20826. "type": "string"
  20827. },
  20828. "type": {
  20829. "type": "string",
  20830. "enum": ["aisdk"]
  20831. },
  20832. "package": {
  20833. "type": "string"
  20834. },
  20835. "url": {
  20836. "type": "string"
  20837. },
  20838. "settings": {
  20839. "type": "object"
  20840. }
  20841. },
  20842. "required": ["id", "type", "package"],
  20843. "additionalProperties": false
  20844. },
  20845. {
  20846. "type": "object",
  20847. "properties": {
  20848. "id": {
  20849. "type": "string"
  20850. },
  20851. "type": {
  20852. "type": "string",
  20853. "enum": ["native"]
  20854. },
  20855. "url": {
  20856. "type": "string"
  20857. },
  20858. "settings": {
  20859. "type": "object"
  20860. }
  20861. },
  20862. "required": ["id", "type", "settings"],
  20863. "additionalProperties": false
  20864. }
  20865. ]
  20866. },
  20867. "capabilities": {
  20868. "type": "object",
  20869. "properties": {
  20870. "tools": {
  20871. "type": "boolean"
  20872. },
  20873. "input": {
  20874. "type": "array",
  20875. "items": {
  20876. "type": "string"
  20877. }
  20878. },
  20879. "output": {
  20880. "type": "array",
  20881. "items": {
  20882. "type": "string"
  20883. }
  20884. }
  20885. },
  20886. "required": ["tools", "input", "output"],
  20887. "additionalProperties": false
  20888. },
  20889. "request": {
  20890. "type": "object",
  20891. "properties": {
  20892. "headers": {
  20893. "type": "object",
  20894. "additionalProperties": {
  20895. "type": "string"
  20896. }
  20897. },
  20898. "body": {
  20899. "type": "object"
  20900. },
  20901. "generation": {
  20902. "type": "object",
  20903. "properties": {
  20904. "maxTokens": {
  20905. "anyOf": [
  20906. {
  20907. "type": "number"
  20908. },
  20909. {
  20910. "type": "string",
  20911. "enum": ["NaN"]
  20912. },
  20913. {
  20914. "type": "string",
  20915. "enum": ["Infinity"]
  20916. },
  20917. {
  20918. "type": "string",
  20919. "enum": ["-Infinity"]
  20920. },
  20921. {
  20922. "type": "string",
  20923. "enum": ["Infinity", "-Infinity", "NaN"]
  20924. }
  20925. ]
  20926. },
  20927. "temperature": {
  20928. "anyOf": [
  20929. {
  20930. "type": "number"
  20931. },
  20932. {
  20933. "type": "string",
  20934. "enum": ["NaN"]
  20935. },
  20936. {
  20937. "type": "string",
  20938. "enum": ["Infinity"]
  20939. },
  20940. {
  20941. "type": "string",
  20942. "enum": ["-Infinity"]
  20943. },
  20944. {
  20945. "type": "string",
  20946. "enum": ["Infinity", "-Infinity", "NaN"]
  20947. }
  20948. ]
  20949. },
  20950. "topP": {
  20951. "anyOf": [
  20952. {
  20953. "type": "number"
  20954. },
  20955. {
  20956. "type": "string",
  20957. "enum": ["NaN"]
  20958. },
  20959. {
  20960. "type": "string",
  20961. "enum": ["Infinity"]
  20962. },
  20963. {
  20964. "type": "string",
  20965. "enum": ["-Infinity"]
  20966. },
  20967. {
  20968. "type": "string",
  20969. "enum": ["Infinity", "-Infinity", "NaN"]
  20970. }
  20971. ]
  20972. },
  20973. "topK": {
  20974. "anyOf": [
  20975. {
  20976. "type": "number"
  20977. },
  20978. {
  20979. "type": "string",
  20980. "enum": ["NaN"]
  20981. },
  20982. {
  20983. "type": "string",
  20984. "enum": ["Infinity"]
  20985. },
  20986. {
  20987. "type": "string",
  20988. "enum": ["-Infinity"]
  20989. },
  20990. {
  20991. "type": "string",
  20992. "enum": ["Infinity", "-Infinity", "NaN"]
  20993. }
  20994. ]
  20995. },
  20996. "frequencyPenalty": {
  20997. "anyOf": [
  20998. {
  20999. "type": "number"
  21000. },
  21001. {
  21002. "type": "string",
  21003. "enum": ["NaN"]
  21004. },
  21005. {
  21006. "type": "string",
  21007. "enum": ["Infinity"]
  21008. },
  21009. {
  21010. "type": "string",
  21011. "enum": ["-Infinity"]
  21012. },
  21013. {
  21014. "type": "string",
  21015. "enum": ["Infinity", "-Infinity", "NaN"]
  21016. }
  21017. ]
  21018. },
  21019. "presencePenalty": {
  21020. "anyOf": [
  21021. {
  21022. "type": "number"
  21023. },
  21024. {
  21025. "type": "string",
  21026. "enum": ["NaN"]
  21027. },
  21028. {
  21029. "type": "string",
  21030. "enum": ["Infinity"]
  21031. },
  21032. {
  21033. "type": "string",
  21034. "enum": ["-Infinity"]
  21035. },
  21036. {
  21037. "type": "string",
  21038. "enum": ["Infinity", "-Infinity", "NaN"]
  21039. }
  21040. ]
  21041. },
  21042. "seed": {
  21043. "anyOf": [
  21044. {
  21045. "type": "number"
  21046. },
  21047. {
  21048. "type": "string",
  21049. "enum": ["NaN"]
  21050. },
  21051. {
  21052. "type": "string",
  21053. "enum": ["Infinity"]
  21054. },
  21055. {
  21056. "type": "string",
  21057. "enum": ["-Infinity"]
  21058. },
  21059. {
  21060. "type": "string",
  21061. "enum": ["Infinity", "-Infinity", "NaN"]
  21062. }
  21063. ]
  21064. },
  21065. "stop": {
  21066. "type": "array",
  21067. "items": {
  21068. "type": "string"
  21069. }
  21070. }
  21071. },
  21072. "additionalProperties": false
  21073. },
  21074. "options": {
  21075. "type": "object"
  21076. },
  21077. "variant": {
  21078. "type": "string"
  21079. }
  21080. },
  21081. "required": ["headers", "body"],
  21082. "additionalProperties": false
  21083. },
  21084. "variants": {
  21085. "type": "array",
  21086. "items": {
  21087. "type": "object",
  21088. "properties": {
  21089. "id": {
  21090. "type": "string"
  21091. },
  21092. "headers": {
  21093. "type": "object",
  21094. "additionalProperties": {
  21095. "type": "string"
  21096. }
  21097. },
  21098. "body": {
  21099. "type": "object"
  21100. },
  21101. "generation": {
  21102. "type": "object",
  21103. "properties": {
  21104. "maxTokens": {
  21105. "anyOf": [
  21106. {
  21107. "type": "number"
  21108. },
  21109. {
  21110. "type": "string",
  21111. "enum": ["NaN"]
  21112. },
  21113. {
  21114. "type": "string",
  21115. "enum": ["Infinity"]
  21116. },
  21117. {
  21118. "type": "string",
  21119. "enum": ["-Infinity"]
  21120. },
  21121. {
  21122. "type": "string",
  21123. "enum": ["Infinity", "-Infinity", "NaN"]
  21124. }
  21125. ]
  21126. },
  21127. "temperature": {
  21128. "anyOf": [
  21129. {
  21130. "type": "number"
  21131. },
  21132. {
  21133. "type": "string",
  21134. "enum": ["NaN"]
  21135. },
  21136. {
  21137. "type": "string",
  21138. "enum": ["Infinity"]
  21139. },
  21140. {
  21141. "type": "string",
  21142. "enum": ["-Infinity"]
  21143. },
  21144. {
  21145. "type": "string",
  21146. "enum": ["Infinity", "-Infinity", "NaN"]
  21147. }
  21148. ]
  21149. },
  21150. "topP": {
  21151. "anyOf": [
  21152. {
  21153. "type": "number"
  21154. },
  21155. {
  21156. "type": "string",
  21157. "enum": ["NaN"]
  21158. },
  21159. {
  21160. "type": "string",
  21161. "enum": ["Infinity"]
  21162. },
  21163. {
  21164. "type": "string",
  21165. "enum": ["-Infinity"]
  21166. },
  21167. {
  21168. "type": "string",
  21169. "enum": ["Infinity", "-Infinity", "NaN"]
  21170. }
  21171. ]
  21172. },
  21173. "topK": {
  21174. "anyOf": [
  21175. {
  21176. "type": "number"
  21177. },
  21178. {
  21179. "type": "string",
  21180. "enum": ["NaN"]
  21181. },
  21182. {
  21183. "type": "string",
  21184. "enum": ["Infinity"]
  21185. },
  21186. {
  21187. "type": "string",
  21188. "enum": ["-Infinity"]
  21189. },
  21190. {
  21191. "type": "string",
  21192. "enum": ["Infinity", "-Infinity", "NaN"]
  21193. }
  21194. ]
  21195. },
  21196. "frequencyPenalty": {
  21197. "anyOf": [
  21198. {
  21199. "type": "number"
  21200. },
  21201. {
  21202. "type": "string",
  21203. "enum": ["NaN"]
  21204. },
  21205. {
  21206. "type": "string",
  21207. "enum": ["Infinity"]
  21208. },
  21209. {
  21210. "type": "string",
  21211. "enum": ["-Infinity"]
  21212. },
  21213. {
  21214. "type": "string",
  21215. "enum": ["Infinity", "-Infinity", "NaN"]
  21216. }
  21217. ]
  21218. },
  21219. "presencePenalty": {
  21220. "anyOf": [
  21221. {
  21222. "type": "number"
  21223. },
  21224. {
  21225. "type": "string",
  21226. "enum": ["NaN"]
  21227. },
  21228. {
  21229. "type": "string",
  21230. "enum": ["Infinity"]
  21231. },
  21232. {
  21233. "type": "string",
  21234. "enum": ["-Infinity"]
  21235. },
  21236. {
  21237. "type": "string",
  21238. "enum": ["Infinity", "-Infinity", "NaN"]
  21239. }
  21240. ]
  21241. },
  21242. "seed": {
  21243. "anyOf": [
  21244. {
  21245. "type": "number"
  21246. },
  21247. {
  21248. "type": "string",
  21249. "enum": ["NaN"]
  21250. },
  21251. {
  21252. "type": "string",
  21253. "enum": ["Infinity"]
  21254. },
  21255. {
  21256. "type": "string",
  21257. "enum": ["-Infinity"]
  21258. },
  21259. {
  21260. "type": "string",
  21261. "enum": ["Infinity", "-Infinity", "NaN"]
  21262. }
  21263. ]
  21264. },
  21265. "stop": {
  21266. "type": "array",
  21267. "items": {
  21268. "type": "string"
  21269. }
  21270. }
  21271. },
  21272. "additionalProperties": false
  21273. },
  21274. "options": {
  21275. "type": "object"
  21276. }
  21277. },
  21278. "required": ["id", "headers", "body"],
  21279. "additionalProperties": false
  21280. }
  21281. },
  21282. "time": {
  21283. "type": "object",
  21284. "properties": {
  21285. "released": {
  21286. "anyOf": [
  21287. {
  21288. "type": "number"
  21289. },
  21290. {
  21291. "type": "string",
  21292. "enum": ["NaN"]
  21293. },
  21294. {
  21295. "type": "string",
  21296. "enum": ["Infinity"]
  21297. },
  21298. {
  21299. "type": "string",
  21300. "enum": ["-Infinity"]
  21301. },
  21302. {
  21303. "type": "string",
  21304. "enum": ["Infinity", "-Infinity", "NaN"]
  21305. }
  21306. ]
  21307. }
  21308. },
  21309. "required": ["released"],
  21310. "additionalProperties": false
  21311. },
  21312. "cost": {
  21313. "type": "array",
  21314. "items": {
  21315. "type": "object",
  21316. "properties": {
  21317. "tier": {
  21318. "type": "object",
  21319. "properties": {
  21320. "type": {
  21321. "type": "string",
  21322. "enum": ["context"]
  21323. },
  21324. "size": {
  21325. "type": "integer"
  21326. }
  21327. },
  21328. "required": ["type", "size"],
  21329. "additionalProperties": false
  21330. },
  21331. "input": {
  21332. "type": "number"
  21333. },
  21334. "output": {
  21335. "type": "number"
  21336. },
  21337. "cache": {
  21338. "type": "object",
  21339. "properties": {
  21340. "read": {
  21341. "type": "number"
  21342. },
  21343. "write": {
  21344. "type": "number"
  21345. }
  21346. },
  21347. "required": ["read", "write"],
  21348. "additionalProperties": false
  21349. }
  21350. },
  21351. "required": ["input", "output", "cache"],
  21352. "additionalProperties": false
  21353. }
  21354. },
  21355. "status": {
  21356. "type": "string",
  21357. "enum": ["alpha", "beta", "deprecated", "active"]
  21358. },
  21359. "enabled": {
  21360. "type": "boolean"
  21361. },
  21362. "limit": {
  21363. "type": "object",
  21364. "properties": {
  21365. "context": {
  21366. "type": "integer"
  21367. },
  21368. "input": {
  21369. "type": "integer"
  21370. },
  21371. "output": {
  21372. "type": "integer"
  21373. }
  21374. },
  21375. "required": ["context", "output"],
  21376. "additionalProperties": false
  21377. }
  21378. },
  21379. "required": [
  21380. "id",
  21381. "providerID",
  21382. "name",
  21383. "api",
  21384. "capabilities",
  21385. "request",
  21386. "variants",
  21387. "time",
  21388. "cost",
  21389. "status",
  21390. "enabled",
  21391. "limit"
  21392. ],
  21393. "additionalProperties": false
  21394. },
  21395. "LocationRef": {
  21396. "type": "object",
  21397. "properties": {
  21398. "directory": {
  21399. "type": "string"
  21400. },
  21401. "workspaceID": {
  21402. "type": "string",
  21403. "pattern": "^wrk"
  21404. }
  21405. },
  21406. "required": ["directory"],
  21407. "additionalProperties": false
  21408. },
  21409. "PromptSource": {
  21410. "type": "object",
  21411. "properties": {
  21412. "start": {
  21413. "type": "number"
  21414. },
  21415. "end": {
  21416. "type": "number"
  21417. },
  21418. "text": {
  21419. "type": "string"
  21420. }
  21421. },
  21422. "required": ["start", "end", "text"],
  21423. "additionalProperties": false
  21424. },
  21425. "PromptFileAttachment": {
  21426. "type": "object",
  21427. "properties": {
  21428. "uri": {
  21429. "type": "string"
  21430. },
  21431. "mime": {
  21432. "type": "string"
  21433. },
  21434. "name": {
  21435. "type": "string"
  21436. },
  21437. "description": {
  21438. "type": "string"
  21439. },
  21440. "source": {
  21441. "$ref": "#/components/schemas/PromptSource"
  21442. }
  21443. },
  21444. "required": ["uri", "mime"],
  21445. "additionalProperties": false
  21446. },
  21447. "PromptAgentAttachment": {
  21448. "type": "object",
  21449. "properties": {
  21450. "name": {
  21451. "type": "string"
  21452. },
  21453. "source": {
  21454. "$ref": "#/components/schemas/PromptSource"
  21455. }
  21456. },
  21457. "required": ["name"],
  21458. "additionalProperties": false
  21459. },
  21460. "SessionErrorUnknown": {
  21461. "type": "object",
  21462. "properties": {
  21463. "type": {
  21464. "type": "string",
  21465. "enum": ["unknown"]
  21466. },
  21467. "message": {
  21468. "type": "string"
  21469. }
  21470. },
  21471. "required": ["type", "message"],
  21472. "additionalProperties": false
  21473. },
  21474. "ToolTextContent": {
  21475. "type": "object",
  21476. "properties": {
  21477. "type": {
  21478. "type": "string",
  21479. "enum": ["text"]
  21480. },
  21481. "text": {
  21482. "type": "string"
  21483. }
  21484. },
  21485. "required": ["type", "text"],
  21486. "additionalProperties": false
  21487. },
  21488. "ToolFileContent": {
  21489. "type": "object",
  21490. "properties": {
  21491. "type": {
  21492. "type": "string",
  21493. "enum": ["file"]
  21494. },
  21495. "source": {
  21496. "anyOf": [
  21497. {
  21498. "type": "object",
  21499. "properties": {
  21500. "type": {
  21501. "type": "string",
  21502. "enum": ["data"]
  21503. },
  21504. "data": {
  21505. "type": "string"
  21506. }
  21507. },
  21508. "required": ["type", "data"],
  21509. "additionalProperties": false
  21510. },
  21511. {
  21512. "type": "object",
  21513. "properties": {
  21514. "type": {
  21515. "type": "string",
  21516. "enum": ["url"]
  21517. },
  21518. "url": {
  21519. "type": "string"
  21520. }
  21521. },
  21522. "required": ["type", "url"],
  21523. "additionalProperties": false
  21524. },
  21525. {
  21526. "type": "object",
  21527. "properties": {
  21528. "type": {
  21529. "type": "string",
  21530. "enum": ["file"]
  21531. },
  21532. "uri": {
  21533. "type": "string"
  21534. }
  21535. },
  21536. "required": ["type", "uri"],
  21537. "additionalProperties": false
  21538. }
  21539. ]
  21540. },
  21541. "mime": {
  21542. "type": "string"
  21543. },
  21544. "name": {
  21545. "type": "string"
  21546. }
  21547. },
  21548. "required": ["type", "source", "mime"],
  21549. "additionalProperties": false
  21550. },
  21551. "SessionNextRetry_error": {
  21552. "type": "object",
  21553. "properties": {
  21554. "message": {
  21555. "type": "string"
  21556. },
  21557. "statusCode": {
  21558. "type": "number"
  21559. },
  21560. "isRetryable": {
  21561. "type": "boolean"
  21562. },
  21563. "responseHeaders": {
  21564. "type": "object",
  21565. "additionalProperties": {
  21566. "type": "string"
  21567. }
  21568. },
  21569. "responseBody": {
  21570. "type": "string"
  21571. },
  21572. "metadata": {
  21573. "type": "object",
  21574. "additionalProperties": {
  21575. "type": "string"
  21576. }
  21577. }
  21578. },
  21579. "required": ["message", "isRetryable"],
  21580. "additionalProperties": false
  21581. },
  21582. "AuthOAuthCredential": {
  21583. "type": "object",
  21584. "properties": {
  21585. "type": {
  21586. "type": "string",
  21587. "enum": ["oauth"]
  21588. },
  21589. "refresh": {
  21590. "type": "string"
  21591. },
  21592. "access": {
  21593. "type": "string"
  21594. },
  21595. "expires": {
  21596. "type": "integer",
  21597. "minimum": 0
  21598. }
  21599. },
  21600. "required": ["type", "refresh", "access", "expires"],
  21601. "additionalProperties": false
  21602. },
  21603. "AuthApiKeyCredential": {
  21604. "type": "object",
  21605. "properties": {
  21606. "type": {
  21607. "type": "string",
  21608. "enum": ["api"]
  21609. },
  21610. "key": {
  21611. "type": "string"
  21612. },
  21613. "metadata": {
  21614. "type": "object",
  21615. "additionalProperties": {
  21616. "type": "string"
  21617. }
  21618. }
  21619. },
  21620. "required": ["type", "key"],
  21621. "additionalProperties": false
  21622. },
  21623. "AuthCredential": {
  21624. "anyOf": [
  21625. {
  21626. "$ref": "#/components/schemas/AuthOAuthCredential"
  21627. },
  21628. {
  21629. "$ref": "#/components/schemas/AuthApiKeyCredential"
  21630. }
  21631. ]
  21632. },
  21633. "AuthInfo": {
  21634. "type": "object",
  21635. "properties": {
  21636. "id": {
  21637. "type": "string"
  21638. },
  21639. "serviceID": {
  21640. "type": "string"
  21641. },
  21642. "description": {
  21643. "type": "string"
  21644. },
  21645. "credential": {
  21646. "$ref": "#/components/schemas/AuthCredential"
  21647. }
  21648. },
  21649. "required": ["id", "serviceID", "description", "credential"],
  21650. "additionalProperties": false
  21651. },
  21652. "PermissionV2Source": {
  21653. "type": "object",
  21654. "properties": {
  21655. "type": {
  21656. "type": "string",
  21657. "enum": ["tool"]
  21658. },
  21659. "messageID": {
  21660. "type": "string"
  21661. },
  21662. "callID": {
  21663. "type": "string"
  21664. }
  21665. },
  21666. "required": ["type", "messageID", "callID"],
  21667. "additionalProperties": false
  21668. },
  21669. "PermissionV2Reply": {
  21670. "type": "string",
  21671. "enum": ["once", "always", "reject"]
  21672. },
  21673. "QuestionV2Option": {
  21674. "type": "object",
  21675. "properties": {
  21676. "label": {
  21677. "type": "string",
  21678. "description": "Display text (1-5 words, concise)"
  21679. },
  21680. "description": {
  21681. "type": "string",
  21682. "description": "Explanation of choice"
  21683. }
  21684. },
  21685. "required": ["label", "description"],
  21686. "additionalProperties": false
  21687. },
  21688. "QuestionV2Info": {
  21689. "type": "object",
  21690. "properties": {
  21691. "question": {
  21692. "type": "string",
  21693. "description": "Complete question"
  21694. },
  21695. "header": {
  21696. "type": "string",
  21697. "description": "Very short label (max 30 chars)"
  21698. },
  21699. "options": {
  21700. "type": "array",
  21701. "items": {
  21702. "$ref": "#/components/schemas/QuestionV2Option"
  21703. },
  21704. "description": "Available choices"
  21705. },
  21706. "multiple": {
  21707. "type": "boolean"
  21708. },
  21709. "custom": {
  21710. "type": "boolean"
  21711. }
  21712. },
  21713. "required": ["question", "header", "options"],
  21714. "additionalProperties": false
  21715. },
  21716. "QuestionV2Tool": {
  21717. "type": "object",
  21718. "properties": {
  21719. "messageID": {
  21720. "type": "string"
  21721. },
  21722. "callID": {
  21723. "type": "string"
  21724. }
  21725. },
  21726. "required": ["messageID", "callID"],
  21727. "additionalProperties": false
  21728. },
  21729. "QuestionV2Answer": {
  21730. "type": "array",
  21731. "items": {
  21732. "type": "string"
  21733. }
  21734. },
  21735. "EventServerInstanceDisposed": {
  21736. "type": "object",
  21737. "properties": {
  21738. "id": {
  21739. "type": "string"
  21740. },
  21741. "type": {
  21742. "type": "string",
  21743. "enum": ["server.instance.disposed"]
  21744. },
  21745. "properties": {
  21746. "type": "object",
  21747. "properties": {
  21748. "directory": {
  21749. "type": "string"
  21750. }
  21751. },
  21752. "required": ["directory"],
  21753. "additionalProperties": false
  21754. }
  21755. },
  21756. "required": ["id", "type", "properties"],
  21757. "additionalProperties": false
  21758. },
  21759. "SyncEventSessionCreated": {
  21760. "type": "object",
  21761. "properties": {
  21762. "type": {
  21763. "type": "string",
  21764. "enum": ["sync"]
  21765. },
  21766. "id": {
  21767. "type": "string",
  21768. "pattern": "^evt_"
  21769. },
  21770. "syncEvent": {
  21771. "type": "object",
  21772. "properties": {
  21773. "type": {
  21774. "type": "string",
  21775. "enum": ["session.created.1"]
  21776. },
  21777. "id": {
  21778. "type": "string",
  21779. "pattern": "^evt_"
  21780. },
  21781. "seq": {
  21782. "type": "number"
  21783. },
  21784. "aggregateID": {
  21785. "type": "string"
  21786. },
  21787. "data": {
  21788. "type": "object",
  21789. "properties": {
  21790. "sessionID": {
  21791. "type": "string",
  21792. "pattern": "^ses"
  21793. },
  21794. "info": {
  21795. "$ref": "#/components/schemas/Session"
  21796. }
  21797. },
  21798. "required": ["sessionID", "info"],
  21799. "additionalProperties": false
  21800. }
  21801. },
  21802. "required": ["type", "id", "seq", "aggregateID", "data"],
  21803. "additionalProperties": false
  21804. }
  21805. },
  21806. "required": ["type", "id", "syncEvent"],
  21807. "additionalProperties": false
  21808. },
  21809. "SyncEventSessionUpdated": {
  21810. "type": "object",
  21811. "properties": {
  21812. "type": {
  21813. "type": "string",
  21814. "enum": ["sync"]
  21815. },
  21816. "id": {
  21817. "type": "string",
  21818. "pattern": "^evt_"
  21819. },
  21820. "syncEvent": {
  21821. "type": "object",
  21822. "properties": {
  21823. "type": {
  21824. "type": "string",
  21825. "enum": ["session.updated.1"]
  21826. },
  21827. "id": {
  21828. "type": "string",
  21829. "pattern": "^evt_"
  21830. },
  21831. "seq": {
  21832. "type": "number"
  21833. },
  21834. "aggregateID": {
  21835. "type": "string"
  21836. },
  21837. "data": {
  21838. "type": "object",
  21839. "properties": {
  21840. "sessionID": {
  21841. "type": "string",
  21842. "pattern": "^ses"
  21843. },
  21844. "info": {
  21845. "$ref": "#/components/schemas/Session"
  21846. }
  21847. },
  21848. "required": ["sessionID", "info"],
  21849. "additionalProperties": false
  21850. }
  21851. },
  21852. "required": ["type", "id", "seq", "aggregateID", "data"],
  21853. "additionalProperties": false
  21854. }
  21855. },
  21856. "required": ["type", "id", "syncEvent"],
  21857. "additionalProperties": false
  21858. },
  21859. "SyncEventSessionDeleted": {
  21860. "type": "object",
  21861. "properties": {
  21862. "type": {
  21863. "type": "string",
  21864. "enum": ["sync"]
  21865. },
  21866. "id": {
  21867. "type": "string",
  21868. "pattern": "^evt_"
  21869. },
  21870. "syncEvent": {
  21871. "type": "object",
  21872. "properties": {
  21873. "type": {
  21874. "type": "string",
  21875. "enum": ["session.deleted.1"]
  21876. },
  21877. "id": {
  21878. "type": "string",
  21879. "pattern": "^evt_"
  21880. },
  21881. "seq": {
  21882. "type": "number"
  21883. },
  21884. "aggregateID": {
  21885. "type": "string"
  21886. },
  21887. "data": {
  21888. "type": "object",
  21889. "properties": {
  21890. "sessionID": {
  21891. "type": "string",
  21892. "pattern": "^ses"
  21893. },
  21894. "info": {
  21895. "$ref": "#/components/schemas/Session"
  21896. }
  21897. },
  21898. "required": ["sessionID", "info"],
  21899. "additionalProperties": false
  21900. }
  21901. },
  21902. "required": ["type", "id", "seq", "aggregateID", "data"],
  21903. "additionalProperties": false
  21904. }
  21905. },
  21906. "required": ["type", "id", "syncEvent"],
  21907. "additionalProperties": false
  21908. },
  21909. "SyncEventMessageUpdated": {
  21910. "type": "object",
  21911. "properties": {
  21912. "type": {
  21913. "type": "string",
  21914. "enum": ["sync"]
  21915. },
  21916. "id": {
  21917. "type": "string",
  21918. "pattern": "^evt_"
  21919. },
  21920. "syncEvent": {
  21921. "type": "object",
  21922. "properties": {
  21923. "type": {
  21924. "type": "string",
  21925. "enum": ["message.updated.1"]
  21926. },
  21927. "id": {
  21928. "type": "string",
  21929. "pattern": "^evt_"
  21930. },
  21931. "seq": {
  21932. "type": "number"
  21933. },
  21934. "aggregateID": {
  21935. "type": "string"
  21936. },
  21937. "data": {
  21938. "type": "object",
  21939. "properties": {
  21940. "sessionID": {
  21941. "type": "string",
  21942. "pattern": "^ses"
  21943. },
  21944. "info": {
  21945. "$ref": "#/components/schemas/Message"
  21946. }
  21947. },
  21948. "required": ["sessionID", "info"],
  21949. "additionalProperties": false
  21950. }
  21951. },
  21952. "required": ["type", "id", "seq", "aggregateID", "data"],
  21953. "additionalProperties": false
  21954. }
  21955. },
  21956. "required": ["type", "id", "syncEvent"],
  21957. "additionalProperties": false
  21958. },
  21959. "SyncEventMessageRemoved": {
  21960. "type": "object",
  21961. "properties": {
  21962. "type": {
  21963. "type": "string",
  21964. "enum": ["sync"]
  21965. },
  21966. "id": {
  21967. "type": "string",
  21968. "pattern": "^evt_"
  21969. },
  21970. "syncEvent": {
  21971. "type": "object",
  21972. "properties": {
  21973. "type": {
  21974. "type": "string",
  21975. "enum": ["message.removed.1"]
  21976. },
  21977. "id": {
  21978. "type": "string",
  21979. "pattern": "^evt_"
  21980. },
  21981. "seq": {
  21982. "type": "number"
  21983. },
  21984. "aggregateID": {
  21985. "type": "string"
  21986. },
  21987. "data": {
  21988. "type": "object",
  21989. "properties": {
  21990. "sessionID": {
  21991. "type": "string",
  21992. "pattern": "^ses"
  21993. },
  21994. "messageID": {
  21995. "type": "string",
  21996. "pattern": "^msg"
  21997. }
  21998. },
  21999. "required": ["sessionID", "messageID"],
  22000. "additionalProperties": false
  22001. }
  22002. },
  22003. "required": ["type", "id", "seq", "aggregateID", "data"],
  22004. "additionalProperties": false
  22005. }
  22006. },
  22007. "required": ["type", "id", "syncEvent"],
  22008. "additionalProperties": false
  22009. },
  22010. "SyncEventMessagePartUpdated": {
  22011. "type": "object",
  22012. "properties": {
  22013. "type": {
  22014. "type": "string",
  22015. "enum": ["sync"]
  22016. },
  22017. "id": {
  22018. "type": "string",
  22019. "pattern": "^evt_"
  22020. },
  22021. "syncEvent": {
  22022. "type": "object",
  22023. "properties": {
  22024. "type": {
  22025. "type": "string",
  22026. "enum": ["message.part.updated.1"]
  22027. },
  22028. "id": {
  22029. "type": "string",
  22030. "pattern": "^evt_"
  22031. },
  22032. "seq": {
  22033. "type": "number"
  22034. },
  22035. "aggregateID": {
  22036. "type": "string"
  22037. },
  22038. "data": {
  22039. "type": "object",
  22040. "properties": {
  22041. "sessionID": {
  22042. "type": "string",
  22043. "pattern": "^ses"
  22044. },
  22045. "part": {
  22046. "$ref": "#/components/schemas/Part"
  22047. },
  22048. "time": {
  22049. "type": "number"
  22050. }
  22051. },
  22052. "required": ["sessionID", "part", "time"],
  22053. "additionalProperties": false
  22054. }
  22055. },
  22056. "required": ["type", "id", "seq", "aggregateID", "data"],
  22057. "additionalProperties": false
  22058. }
  22059. },
  22060. "required": ["type", "id", "syncEvent"],
  22061. "additionalProperties": false
  22062. },
  22063. "SyncEventMessagePartRemoved": {
  22064. "type": "object",
  22065. "properties": {
  22066. "type": {
  22067. "type": "string",
  22068. "enum": ["sync"]
  22069. },
  22070. "id": {
  22071. "type": "string",
  22072. "pattern": "^evt_"
  22073. },
  22074. "syncEvent": {
  22075. "type": "object",
  22076. "properties": {
  22077. "type": {
  22078. "type": "string",
  22079. "enum": ["message.part.removed.1"]
  22080. },
  22081. "id": {
  22082. "type": "string",
  22083. "pattern": "^evt_"
  22084. },
  22085. "seq": {
  22086. "type": "number"
  22087. },
  22088. "aggregateID": {
  22089. "type": "string"
  22090. },
  22091. "data": {
  22092. "type": "object",
  22093. "properties": {
  22094. "sessionID": {
  22095. "type": "string",
  22096. "pattern": "^ses"
  22097. },
  22098. "messageID": {
  22099. "type": "string",
  22100. "pattern": "^msg"
  22101. },
  22102. "partID": {
  22103. "type": "string",
  22104. "pattern": "^prt"
  22105. }
  22106. },
  22107. "required": ["sessionID", "messageID", "partID"],
  22108. "additionalProperties": false
  22109. }
  22110. },
  22111. "required": ["type", "id", "seq", "aggregateID", "data"],
  22112. "additionalProperties": false
  22113. }
  22114. },
  22115. "required": ["type", "id", "syncEvent"],
  22116. "additionalProperties": false
  22117. },
  22118. "SyncEventSessionNextAgentSwitched": {
  22119. "type": "object",
  22120. "properties": {
  22121. "type": {
  22122. "type": "string",
  22123. "enum": ["sync"]
  22124. },
  22125. "id": {
  22126. "type": "string",
  22127. "pattern": "^evt_"
  22128. },
  22129. "syncEvent": {
  22130. "type": "object",
  22131. "properties": {
  22132. "type": {
  22133. "type": "string",
  22134. "enum": ["session.next.agent.switched.1"]
  22135. },
  22136. "id": {
  22137. "type": "string",
  22138. "pattern": "^evt_"
  22139. },
  22140. "seq": {
  22141. "type": "number"
  22142. },
  22143. "aggregateID": {
  22144. "type": "string"
  22145. },
  22146. "data": {
  22147. "type": "object",
  22148. "properties": {
  22149. "timestamp": {
  22150. "type": "number"
  22151. },
  22152. "sessionID": {
  22153. "type": "string",
  22154. "pattern": "^ses"
  22155. },
  22156. "messageID": {
  22157. "type": "string",
  22158. "pattern": "^msg_"
  22159. },
  22160. "agent": {
  22161. "type": "string"
  22162. }
  22163. },
  22164. "required": ["timestamp", "sessionID", "messageID", "agent"],
  22165. "additionalProperties": false
  22166. }
  22167. },
  22168. "required": ["type", "id", "seq", "aggregateID", "data"],
  22169. "additionalProperties": false
  22170. }
  22171. },
  22172. "required": ["type", "id", "syncEvent"],
  22173. "additionalProperties": false
  22174. },
  22175. "SyncEventSessionNextModelSwitched": {
  22176. "type": "object",
  22177. "properties": {
  22178. "type": {
  22179. "type": "string",
  22180. "enum": ["sync"]
  22181. },
  22182. "id": {
  22183. "type": "string",
  22184. "pattern": "^evt_"
  22185. },
  22186. "syncEvent": {
  22187. "type": "object",
  22188. "properties": {
  22189. "type": {
  22190. "type": "string",
  22191. "enum": ["session.next.model.switched.1"]
  22192. },
  22193. "id": {
  22194. "type": "string",
  22195. "pattern": "^evt_"
  22196. },
  22197. "seq": {
  22198. "type": "number"
  22199. },
  22200. "aggregateID": {
  22201. "type": "string"
  22202. },
  22203. "data": {
  22204. "type": "object",
  22205. "properties": {
  22206. "timestamp": {
  22207. "type": "number"
  22208. },
  22209. "sessionID": {
  22210. "type": "string",
  22211. "pattern": "^ses"
  22212. },
  22213. "messageID": {
  22214. "type": "string",
  22215. "pattern": "^msg_"
  22216. },
  22217. "model": {
  22218. "type": "object",
  22219. "properties": {
  22220. "id": {
  22221. "type": "string"
  22222. },
  22223. "providerID": {
  22224. "type": "string"
  22225. },
  22226. "variant": {
  22227. "type": "string"
  22228. }
  22229. },
  22230. "required": ["id", "providerID"],
  22231. "additionalProperties": false
  22232. }
  22233. },
  22234. "required": ["timestamp", "sessionID", "messageID", "model"],
  22235. "additionalProperties": false
  22236. }
  22237. },
  22238. "required": ["type", "id", "seq", "aggregateID", "data"],
  22239. "additionalProperties": false
  22240. }
  22241. },
  22242. "required": ["type", "id", "syncEvent"],
  22243. "additionalProperties": false
  22244. },
  22245. "SyncEventSessionNextMoved": {
  22246. "type": "object",
  22247. "properties": {
  22248. "type": {
  22249. "type": "string",
  22250. "enum": ["sync"]
  22251. },
  22252. "id": {
  22253. "type": "string",
  22254. "pattern": "^evt_"
  22255. },
  22256. "syncEvent": {
  22257. "type": "object",
  22258. "properties": {
  22259. "type": {
  22260. "type": "string",
  22261. "enum": ["session.next.moved.1"]
  22262. },
  22263. "id": {
  22264. "type": "string",
  22265. "pattern": "^evt_"
  22266. },
  22267. "seq": {
  22268. "type": "number"
  22269. },
  22270. "aggregateID": {
  22271. "type": "string"
  22272. },
  22273. "data": {
  22274. "type": "object",
  22275. "properties": {
  22276. "timestamp": {
  22277. "type": "number"
  22278. },
  22279. "sessionID": {
  22280. "type": "string",
  22281. "pattern": "^ses"
  22282. },
  22283. "location": {
  22284. "$ref": "#/components/schemas/LocationRef"
  22285. },
  22286. "subdirectory": {
  22287. "type": "string"
  22288. }
  22289. },
  22290. "required": ["timestamp", "sessionID", "location"],
  22291. "additionalProperties": false
  22292. }
  22293. },
  22294. "required": ["type", "id", "seq", "aggregateID", "data"],
  22295. "additionalProperties": false
  22296. }
  22297. },
  22298. "required": ["type", "id", "syncEvent"],
  22299. "additionalProperties": false
  22300. },
  22301. "SyncEventSessionNextPrompted": {
  22302. "type": "object",
  22303. "properties": {
  22304. "type": {
  22305. "type": "string",
  22306. "enum": ["sync"]
  22307. },
  22308. "id": {
  22309. "type": "string",
  22310. "pattern": "^evt_"
  22311. },
  22312. "syncEvent": {
  22313. "type": "object",
  22314. "properties": {
  22315. "type": {
  22316. "type": "string",
  22317. "enum": ["session.next.prompted.1"]
  22318. },
  22319. "id": {
  22320. "type": "string",
  22321. "pattern": "^evt_"
  22322. },
  22323. "seq": {
  22324. "type": "number"
  22325. },
  22326. "aggregateID": {
  22327. "type": "string"
  22328. },
  22329. "data": {
  22330. "type": "object",
  22331. "properties": {
  22332. "timestamp": {
  22333. "type": "number"
  22334. },
  22335. "sessionID": {
  22336. "type": "string",
  22337. "pattern": "^ses"
  22338. },
  22339. "messageID": {
  22340. "type": "string",
  22341. "pattern": "^msg_"
  22342. },
  22343. "prompt": {
  22344. "$ref": "#/components/schemas/Prompt"
  22345. },
  22346. "delivery": {
  22347. "type": "string",
  22348. "enum": ["steer", "queue"]
  22349. }
  22350. },
  22351. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22352. "additionalProperties": false
  22353. }
  22354. },
  22355. "required": ["type", "id", "seq", "aggregateID", "data"],
  22356. "additionalProperties": false
  22357. }
  22358. },
  22359. "required": ["type", "id", "syncEvent"],
  22360. "additionalProperties": false
  22361. },
  22362. "SyncEventSessionNextPromptAdmitted": {
  22363. "type": "object",
  22364. "properties": {
  22365. "type": {
  22366. "type": "string",
  22367. "enum": ["sync"]
  22368. },
  22369. "id": {
  22370. "type": "string",
  22371. "pattern": "^evt_"
  22372. },
  22373. "syncEvent": {
  22374. "type": "object",
  22375. "properties": {
  22376. "type": {
  22377. "type": "string",
  22378. "enum": ["session.next.prompt.admitted.1"]
  22379. },
  22380. "id": {
  22381. "type": "string",
  22382. "pattern": "^evt_"
  22383. },
  22384. "seq": {
  22385. "type": "number"
  22386. },
  22387. "aggregateID": {
  22388. "type": "string"
  22389. },
  22390. "data": {
  22391. "type": "object",
  22392. "properties": {
  22393. "timestamp": {
  22394. "type": "number"
  22395. },
  22396. "sessionID": {
  22397. "type": "string",
  22398. "pattern": "^ses"
  22399. },
  22400. "messageID": {
  22401. "type": "string",
  22402. "pattern": "^msg_"
  22403. },
  22404. "prompt": {
  22405. "$ref": "#/components/schemas/Prompt"
  22406. },
  22407. "delivery": {
  22408. "type": "string",
  22409. "enum": ["steer", "queue"]
  22410. }
  22411. },
  22412. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22413. "additionalProperties": false
  22414. }
  22415. },
  22416. "required": ["type", "id", "seq", "aggregateID", "data"],
  22417. "additionalProperties": false
  22418. }
  22419. },
  22420. "required": ["type", "id", "syncEvent"],
  22421. "additionalProperties": false
  22422. },
  22423. "SyncEventSessionNextPromptPromoted": {
  22424. "type": "object",
  22425. "properties": {
  22426. "type": {
  22427. "type": "string",
  22428. "enum": ["sync"]
  22429. },
  22430. "id": {
  22431. "type": "string",
  22432. "pattern": "^evt_"
  22433. },
  22434. "syncEvent": {
  22435. "type": "object",
  22436. "properties": {
  22437. "type": {
  22438. "type": "string",
  22439. "enum": ["session.next.prompt.promoted.1"]
  22440. },
  22441. "id": {
  22442. "type": "string",
  22443. "pattern": "^evt_"
  22444. },
  22445. "seq": {
  22446. "type": "number"
  22447. },
  22448. "aggregateID": {
  22449. "type": "string"
  22450. },
  22451. "data": {
  22452. "type": "object",
  22453. "properties": {
  22454. "timestamp": {
  22455. "type": "number"
  22456. },
  22457. "sessionID": {
  22458. "type": "string",
  22459. "pattern": "^ses"
  22460. },
  22461. "messageID": {
  22462. "type": "string",
  22463. "pattern": "^msg_"
  22464. },
  22465. "prompt": {
  22466. "$ref": "#/components/schemas/Prompt"
  22467. },
  22468. "timeCreated": {
  22469. "type": "number"
  22470. }
  22471. },
  22472. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  22473. "additionalProperties": false
  22474. }
  22475. },
  22476. "required": ["type", "id", "seq", "aggregateID", "data"],
  22477. "additionalProperties": false
  22478. }
  22479. },
  22480. "required": ["type", "id", "syncEvent"],
  22481. "additionalProperties": false
  22482. },
  22483. "SyncEventSessionNextInterruptRequested": {
  22484. "type": "object",
  22485. "properties": {
  22486. "type": {
  22487. "type": "string",
  22488. "enum": ["sync"]
  22489. },
  22490. "id": {
  22491. "type": "string",
  22492. "pattern": "^evt_"
  22493. },
  22494. "syncEvent": {
  22495. "type": "object",
  22496. "properties": {
  22497. "type": {
  22498. "type": "string",
  22499. "enum": ["session.next.interrupt.requested.1"]
  22500. },
  22501. "id": {
  22502. "type": "string",
  22503. "pattern": "^evt_"
  22504. },
  22505. "seq": {
  22506. "type": "number"
  22507. },
  22508. "aggregateID": {
  22509. "type": "string"
  22510. },
  22511. "data": {
  22512. "type": "object",
  22513. "properties": {
  22514. "timestamp": {
  22515. "type": "number"
  22516. },
  22517. "sessionID": {
  22518. "type": "string",
  22519. "pattern": "^ses"
  22520. }
  22521. },
  22522. "required": ["timestamp", "sessionID"],
  22523. "additionalProperties": false
  22524. }
  22525. },
  22526. "required": ["type", "id", "seq", "aggregateID", "data"],
  22527. "additionalProperties": false
  22528. }
  22529. },
  22530. "required": ["type", "id", "syncEvent"],
  22531. "additionalProperties": false
  22532. },
  22533. "SyncEventSessionNextContextUpdated": {
  22534. "type": "object",
  22535. "properties": {
  22536. "type": {
  22537. "type": "string",
  22538. "enum": ["sync"]
  22539. },
  22540. "id": {
  22541. "type": "string",
  22542. "pattern": "^evt_"
  22543. },
  22544. "syncEvent": {
  22545. "type": "object",
  22546. "properties": {
  22547. "type": {
  22548. "type": "string",
  22549. "enum": ["session.next.context.updated.1"]
  22550. },
  22551. "id": {
  22552. "type": "string",
  22553. "pattern": "^evt_"
  22554. },
  22555. "seq": {
  22556. "type": "number"
  22557. },
  22558. "aggregateID": {
  22559. "type": "string"
  22560. },
  22561. "data": {
  22562. "type": "object",
  22563. "properties": {
  22564. "timestamp": {
  22565. "type": "number"
  22566. },
  22567. "sessionID": {
  22568. "type": "string",
  22569. "pattern": "^ses"
  22570. },
  22571. "messageID": {
  22572. "type": "string",
  22573. "pattern": "^msg_"
  22574. },
  22575. "text": {
  22576. "type": "string"
  22577. }
  22578. },
  22579. "required": ["timestamp", "sessionID", "messageID", "text"],
  22580. "additionalProperties": false
  22581. }
  22582. },
  22583. "required": ["type", "id", "seq", "aggregateID", "data"],
  22584. "additionalProperties": false
  22585. }
  22586. },
  22587. "required": ["type", "id", "syncEvent"],
  22588. "additionalProperties": false
  22589. },
  22590. "SyncEventSessionNextSynthetic": {
  22591. "type": "object",
  22592. "properties": {
  22593. "type": {
  22594. "type": "string",
  22595. "enum": ["sync"]
  22596. },
  22597. "id": {
  22598. "type": "string",
  22599. "pattern": "^evt_"
  22600. },
  22601. "syncEvent": {
  22602. "type": "object",
  22603. "properties": {
  22604. "type": {
  22605. "type": "string",
  22606. "enum": ["session.next.synthetic.1"]
  22607. },
  22608. "id": {
  22609. "type": "string",
  22610. "pattern": "^evt_"
  22611. },
  22612. "seq": {
  22613. "type": "number"
  22614. },
  22615. "aggregateID": {
  22616. "type": "string"
  22617. },
  22618. "data": {
  22619. "type": "object",
  22620. "properties": {
  22621. "timestamp": {
  22622. "type": "number"
  22623. },
  22624. "sessionID": {
  22625. "type": "string",
  22626. "pattern": "^ses"
  22627. },
  22628. "messageID": {
  22629. "type": "string",
  22630. "pattern": "^msg_"
  22631. },
  22632. "text": {
  22633. "type": "string"
  22634. }
  22635. },
  22636. "required": ["timestamp", "sessionID", "messageID", "text"],
  22637. "additionalProperties": false
  22638. }
  22639. },
  22640. "required": ["type", "id", "seq", "aggregateID", "data"],
  22641. "additionalProperties": false
  22642. }
  22643. },
  22644. "required": ["type", "id", "syncEvent"],
  22645. "additionalProperties": false
  22646. },
  22647. "SyncEventSessionNextShellStarted": {
  22648. "type": "object",
  22649. "properties": {
  22650. "type": {
  22651. "type": "string",
  22652. "enum": ["sync"]
  22653. },
  22654. "id": {
  22655. "type": "string",
  22656. "pattern": "^evt_"
  22657. },
  22658. "syncEvent": {
  22659. "type": "object",
  22660. "properties": {
  22661. "type": {
  22662. "type": "string",
  22663. "enum": ["session.next.shell.started.1"]
  22664. },
  22665. "id": {
  22666. "type": "string",
  22667. "pattern": "^evt_"
  22668. },
  22669. "seq": {
  22670. "type": "number"
  22671. },
  22672. "aggregateID": {
  22673. "type": "string"
  22674. },
  22675. "data": {
  22676. "type": "object",
  22677. "properties": {
  22678. "timestamp": {
  22679. "type": "number"
  22680. },
  22681. "sessionID": {
  22682. "type": "string",
  22683. "pattern": "^ses"
  22684. },
  22685. "messageID": {
  22686. "type": "string",
  22687. "pattern": "^msg_"
  22688. },
  22689. "callID": {
  22690. "type": "string"
  22691. },
  22692. "command": {
  22693. "type": "string"
  22694. }
  22695. },
  22696. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  22697. "additionalProperties": false
  22698. }
  22699. },
  22700. "required": ["type", "id", "seq", "aggregateID", "data"],
  22701. "additionalProperties": false
  22702. }
  22703. },
  22704. "required": ["type", "id", "syncEvent"],
  22705. "additionalProperties": false
  22706. },
  22707. "SyncEventSessionNextShellEnded": {
  22708. "type": "object",
  22709. "properties": {
  22710. "type": {
  22711. "type": "string",
  22712. "enum": ["sync"]
  22713. },
  22714. "id": {
  22715. "type": "string",
  22716. "pattern": "^evt_"
  22717. },
  22718. "syncEvent": {
  22719. "type": "object",
  22720. "properties": {
  22721. "type": {
  22722. "type": "string",
  22723. "enum": ["session.next.shell.ended.1"]
  22724. },
  22725. "id": {
  22726. "type": "string",
  22727. "pattern": "^evt_"
  22728. },
  22729. "seq": {
  22730. "type": "number"
  22731. },
  22732. "aggregateID": {
  22733. "type": "string"
  22734. },
  22735. "data": {
  22736. "type": "object",
  22737. "properties": {
  22738. "timestamp": {
  22739. "type": "number"
  22740. },
  22741. "sessionID": {
  22742. "type": "string",
  22743. "pattern": "^ses"
  22744. },
  22745. "callID": {
  22746. "type": "string"
  22747. },
  22748. "output": {
  22749. "type": "string"
  22750. }
  22751. },
  22752. "required": ["timestamp", "sessionID", "callID", "output"],
  22753. "additionalProperties": false
  22754. }
  22755. },
  22756. "required": ["type", "id", "seq", "aggregateID", "data"],
  22757. "additionalProperties": false
  22758. }
  22759. },
  22760. "required": ["type", "id", "syncEvent"],
  22761. "additionalProperties": false
  22762. },
  22763. "SyncEventSessionNextStepStarted": {
  22764. "type": "object",
  22765. "properties": {
  22766. "type": {
  22767. "type": "string",
  22768. "enum": ["sync"]
  22769. },
  22770. "id": {
  22771. "type": "string",
  22772. "pattern": "^evt_"
  22773. },
  22774. "syncEvent": {
  22775. "type": "object",
  22776. "properties": {
  22777. "type": {
  22778. "type": "string",
  22779. "enum": ["session.next.step.started.1"]
  22780. },
  22781. "id": {
  22782. "type": "string",
  22783. "pattern": "^evt_"
  22784. },
  22785. "seq": {
  22786. "type": "number"
  22787. },
  22788. "aggregateID": {
  22789. "type": "string"
  22790. },
  22791. "data": {
  22792. "type": "object",
  22793. "properties": {
  22794. "timestamp": {
  22795. "type": "number"
  22796. },
  22797. "sessionID": {
  22798. "type": "string",
  22799. "pattern": "^ses"
  22800. },
  22801. "assistantMessageID": {
  22802. "type": "string",
  22803. "pattern": "^msg_"
  22804. },
  22805. "agent": {
  22806. "type": "string"
  22807. },
  22808. "model": {
  22809. "type": "object",
  22810. "properties": {
  22811. "id": {
  22812. "type": "string"
  22813. },
  22814. "providerID": {
  22815. "type": "string"
  22816. },
  22817. "variant": {
  22818. "type": "string"
  22819. }
  22820. },
  22821. "required": ["id", "providerID"],
  22822. "additionalProperties": false
  22823. },
  22824. "snapshot": {
  22825. "type": "string"
  22826. }
  22827. },
  22828. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  22829. "additionalProperties": false
  22830. }
  22831. },
  22832. "required": ["type", "id", "seq", "aggregateID", "data"],
  22833. "additionalProperties": false
  22834. }
  22835. },
  22836. "required": ["type", "id", "syncEvent"],
  22837. "additionalProperties": false
  22838. },
  22839. "SyncEventSessionNextStepEnded": {
  22840. "type": "object",
  22841. "properties": {
  22842. "type": {
  22843. "type": "string",
  22844. "enum": ["sync"]
  22845. },
  22846. "id": {
  22847. "type": "string",
  22848. "pattern": "^evt_"
  22849. },
  22850. "syncEvent": {
  22851. "type": "object",
  22852. "properties": {
  22853. "type": {
  22854. "type": "string",
  22855. "enum": ["session.next.step.ended.2"]
  22856. },
  22857. "id": {
  22858. "type": "string",
  22859. "pattern": "^evt_"
  22860. },
  22861. "seq": {
  22862. "type": "number"
  22863. },
  22864. "aggregateID": {
  22865. "type": "string"
  22866. },
  22867. "data": {
  22868. "type": "object",
  22869. "properties": {
  22870. "timestamp": {
  22871. "type": "number"
  22872. },
  22873. "sessionID": {
  22874. "type": "string",
  22875. "pattern": "^ses"
  22876. },
  22877. "assistantMessageID": {
  22878. "type": "string",
  22879. "pattern": "^msg_"
  22880. },
  22881. "finish": {
  22882. "type": "string"
  22883. },
  22884. "cost": {
  22885. "type": "number"
  22886. },
  22887. "tokens": {
  22888. "type": "object",
  22889. "properties": {
  22890. "input": {
  22891. "type": "number"
  22892. },
  22893. "output": {
  22894. "type": "number"
  22895. },
  22896. "reasoning": {
  22897. "type": "number"
  22898. },
  22899. "cache": {
  22900. "type": "object",
  22901. "properties": {
  22902. "read": {
  22903. "type": "number"
  22904. },
  22905. "write": {
  22906. "type": "number"
  22907. }
  22908. },
  22909. "required": ["read", "write"],
  22910. "additionalProperties": false
  22911. }
  22912. },
  22913. "required": ["input", "output", "reasoning", "cache"],
  22914. "additionalProperties": false
  22915. },
  22916. "snapshot": {
  22917. "type": "string"
  22918. }
  22919. },
  22920. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22921. "additionalProperties": false
  22922. }
  22923. },
  22924. "required": ["type", "id", "seq", "aggregateID", "data"],
  22925. "additionalProperties": false
  22926. }
  22927. },
  22928. "required": ["type", "id", "syncEvent"],
  22929. "additionalProperties": false
  22930. },
  22931. "SyncEventSessionNextStepFailed": {
  22932. "type": "object",
  22933. "properties": {
  22934. "type": {
  22935. "type": "string",
  22936. "enum": ["sync"]
  22937. },
  22938. "id": {
  22939. "type": "string",
  22940. "pattern": "^evt_"
  22941. },
  22942. "syncEvent": {
  22943. "type": "object",
  22944. "properties": {
  22945. "type": {
  22946. "type": "string",
  22947. "enum": ["session.next.step.failed.2"]
  22948. },
  22949. "id": {
  22950. "type": "string",
  22951. "pattern": "^evt_"
  22952. },
  22953. "seq": {
  22954. "type": "number"
  22955. },
  22956. "aggregateID": {
  22957. "type": "string"
  22958. },
  22959. "data": {
  22960. "type": "object",
  22961. "properties": {
  22962. "timestamp": {
  22963. "type": "number"
  22964. },
  22965. "sessionID": {
  22966. "type": "string",
  22967. "pattern": "^ses"
  22968. },
  22969. "assistantMessageID": {
  22970. "type": "string",
  22971. "pattern": "^msg_"
  22972. },
  22973. "error": {
  22974. "$ref": "#/components/schemas/SessionErrorUnknown"
  22975. }
  22976. },
  22977. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  22978. "additionalProperties": false
  22979. }
  22980. },
  22981. "required": ["type", "id", "seq", "aggregateID", "data"],
  22982. "additionalProperties": false
  22983. }
  22984. },
  22985. "required": ["type", "id", "syncEvent"],
  22986. "additionalProperties": false
  22987. },
  22988. "SyncEventSessionNextTextStarted": {
  22989. "type": "object",
  22990. "properties": {
  22991. "type": {
  22992. "type": "string",
  22993. "enum": ["sync"]
  22994. },
  22995. "id": {
  22996. "type": "string",
  22997. "pattern": "^evt_"
  22998. },
  22999. "syncEvent": {
  23000. "type": "object",
  23001. "properties": {
  23002. "type": {
  23003. "type": "string",
  23004. "enum": ["session.next.text.started.1"]
  23005. },
  23006. "id": {
  23007. "type": "string",
  23008. "pattern": "^evt_"
  23009. },
  23010. "seq": {
  23011. "type": "number"
  23012. },
  23013. "aggregateID": {
  23014. "type": "string"
  23015. },
  23016. "data": {
  23017. "type": "object",
  23018. "properties": {
  23019. "timestamp": {
  23020. "type": "number"
  23021. },
  23022. "sessionID": {
  23023. "type": "string",
  23024. "pattern": "^ses"
  23025. },
  23026. "assistantMessageID": {
  23027. "type": "string",
  23028. "pattern": "^msg_"
  23029. },
  23030. "textID": {
  23031. "type": "string"
  23032. }
  23033. },
  23034. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  23035. "additionalProperties": false
  23036. }
  23037. },
  23038. "required": ["type", "id", "seq", "aggregateID", "data"],
  23039. "additionalProperties": false
  23040. }
  23041. },
  23042. "required": ["type", "id", "syncEvent"],
  23043. "additionalProperties": false
  23044. },
  23045. "SyncEventSessionNextTextEnded": {
  23046. "type": "object",
  23047. "properties": {
  23048. "type": {
  23049. "type": "string",
  23050. "enum": ["sync"]
  23051. },
  23052. "id": {
  23053. "type": "string",
  23054. "pattern": "^evt_"
  23055. },
  23056. "syncEvent": {
  23057. "type": "object",
  23058. "properties": {
  23059. "type": {
  23060. "type": "string",
  23061. "enum": ["session.next.text.ended.1"]
  23062. },
  23063. "id": {
  23064. "type": "string",
  23065. "pattern": "^evt_"
  23066. },
  23067. "seq": {
  23068. "type": "number"
  23069. },
  23070. "aggregateID": {
  23071. "type": "string"
  23072. },
  23073. "data": {
  23074. "type": "object",
  23075. "properties": {
  23076. "timestamp": {
  23077. "type": "number"
  23078. },
  23079. "sessionID": {
  23080. "type": "string",
  23081. "pattern": "^ses"
  23082. },
  23083. "assistantMessageID": {
  23084. "type": "string",
  23085. "pattern": "^msg_"
  23086. },
  23087. "textID": {
  23088. "type": "string"
  23089. },
  23090. "text": {
  23091. "type": "string"
  23092. }
  23093. },
  23094. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  23095. "additionalProperties": false
  23096. }
  23097. },
  23098. "required": ["type", "id", "seq", "aggregateID", "data"],
  23099. "additionalProperties": false
  23100. }
  23101. },
  23102. "required": ["type", "id", "syncEvent"],
  23103. "additionalProperties": false
  23104. },
  23105. "SyncEventSessionNextReasoningStarted": {
  23106. "type": "object",
  23107. "properties": {
  23108. "type": {
  23109. "type": "string",
  23110. "enum": ["sync"]
  23111. },
  23112. "id": {
  23113. "type": "string",
  23114. "pattern": "^evt_"
  23115. },
  23116. "syncEvent": {
  23117. "type": "object",
  23118. "properties": {
  23119. "type": {
  23120. "type": "string",
  23121. "enum": ["session.next.reasoning.started.1"]
  23122. },
  23123. "id": {
  23124. "type": "string",
  23125. "pattern": "^evt_"
  23126. },
  23127. "seq": {
  23128. "type": "number"
  23129. },
  23130. "aggregateID": {
  23131. "type": "string"
  23132. },
  23133. "data": {
  23134. "type": "object",
  23135. "properties": {
  23136. "timestamp": {
  23137. "type": "number"
  23138. },
  23139. "sessionID": {
  23140. "type": "string",
  23141. "pattern": "^ses"
  23142. },
  23143. "assistantMessageID": {
  23144. "type": "string",
  23145. "pattern": "^msg_"
  23146. },
  23147. "reasoningID": {
  23148. "type": "string"
  23149. },
  23150. "providerMetadata": {
  23151. "type": "object",
  23152. "additionalProperties": {
  23153. "type": "object"
  23154. }
  23155. }
  23156. },
  23157. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  23158. "additionalProperties": false
  23159. }
  23160. },
  23161. "required": ["type", "id", "seq", "aggregateID", "data"],
  23162. "additionalProperties": false
  23163. }
  23164. },
  23165. "required": ["type", "id", "syncEvent"],
  23166. "additionalProperties": false
  23167. },
  23168. "SyncEventSessionNextReasoningEnded": {
  23169. "type": "object",
  23170. "properties": {
  23171. "type": {
  23172. "type": "string",
  23173. "enum": ["sync"]
  23174. },
  23175. "id": {
  23176. "type": "string",
  23177. "pattern": "^evt_"
  23178. },
  23179. "syncEvent": {
  23180. "type": "object",
  23181. "properties": {
  23182. "type": {
  23183. "type": "string",
  23184. "enum": ["session.next.reasoning.ended.1"]
  23185. },
  23186. "id": {
  23187. "type": "string",
  23188. "pattern": "^evt_"
  23189. },
  23190. "seq": {
  23191. "type": "number"
  23192. },
  23193. "aggregateID": {
  23194. "type": "string"
  23195. },
  23196. "data": {
  23197. "type": "object",
  23198. "properties": {
  23199. "timestamp": {
  23200. "type": "number"
  23201. },
  23202. "sessionID": {
  23203. "type": "string",
  23204. "pattern": "^ses"
  23205. },
  23206. "assistantMessageID": {
  23207. "type": "string",
  23208. "pattern": "^msg_"
  23209. },
  23210. "reasoningID": {
  23211. "type": "string"
  23212. },
  23213. "text": {
  23214. "type": "string"
  23215. },
  23216. "providerMetadata": {
  23217. "type": "object",
  23218. "additionalProperties": {
  23219. "type": "object"
  23220. }
  23221. }
  23222. },
  23223. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  23224. "additionalProperties": false
  23225. }
  23226. },
  23227. "required": ["type", "id", "seq", "aggregateID", "data"],
  23228. "additionalProperties": false
  23229. }
  23230. },
  23231. "required": ["type", "id", "syncEvent"],
  23232. "additionalProperties": false
  23233. },
  23234. "SyncEventSessionNextToolInputStarted": {
  23235. "type": "object",
  23236. "properties": {
  23237. "type": {
  23238. "type": "string",
  23239. "enum": ["sync"]
  23240. },
  23241. "id": {
  23242. "type": "string",
  23243. "pattern": "^evt_"
  23244. },
  23245. "syncEvent": {
  23246. "type": "object",
  23247. "properties": {
  23248. "type": {
  23249. "type": "string",
  23250. "enum": ["session.next.tool.input.started.1"]
  23251. },
  23252. "id": {
  23253. "type": "string",
  23254. "pattern": "^evt_"
  23255. },
  23256. "seq": {
  23257. "type": "number"
  23258. },
  23259. "aggregateID": {
  23260. "type": "string"
  23261. },
  23262. "data": {
  23263. "type": "object",
  23264. "properties": {
  23265. "timestamp": {
  23266. "type": "number"
  23267. },
  23268. "sessionID": {
  23269. "type": "string",
  23270. "pattern": "^ses"
  23271. },
  23272. "assistantMessageID": {
  23273. "type": "string",
  23274. "pattern": "^msg_"
  23275. },
  23276. "callID": {
  23277. "type": "string"
  23278. },
  23279. "name": {
  23280. "type": "string"
  23281. }
  23282. },
  23283. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  23284. "additionalProperties": false
  23285. }
  23286. },
  23287. "required": ["type", "id", "seq", "aggregateID", "data"],
  23288. "additionalProperties": false
  23289. }
  23290. },
  23291. "required": ["type", "id", "syncEvent"],
  23292. "additionalProperties": false
  23293. },
  23294. "SyncEventSessionNextToolInputEnded": {
  23295. "type": "object",
  23296. "properties": {
  23297. "type": {
  23298. "type": "string",
  23299. "enum": ["sync"]
  23300. },
  23301. "id": {
  23302. "type": "string",
  23303. "pattern": "^evt_"
  23304. },
  23305. "syncEvent": {
  23306. "type": "object",
  23307. "properties": {
  23308. "type": {
  23309. "type": "string",
  23310. "enum": ["session.next.tool.input.ended.1"]
  23311. },
  23312. "id": {
  23313. "type": "string",
  23314. "pattern": "^evt_"
  23315. },
  23316. "seq": {
  23317. "type": "number"
  23318. },
  23319. "aggregateID": {
  23320. "type": "string"
  23321. },
  23322. "data": {
  23323. "type": "object",
  23324. "properties": {
  23325. "timestamp": {
  23326. "type": "number"
  23327. },
  23328. "sessionID": {
  23329. "type": "string",
  23330. "pattern": "^ses"
  23331. },
  23332. "assistantMessageID": {
  23333. "type": "string",
  23334. "pattern": "^msg_"
  23335. },
  23336. "callID": {
  23337. "type": "string"
  23338. },
  23339. "text": {
  23340. "type": "string"
  23341. }
  23342. },
  23343. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  23344. "additionalProperties": false
  23345. }
  23346. },
  23347. "required": ["type", "id", "seq", "aggregateID", "data"],
  23348. "additionalProperties": false
  23349. }
  23350. },
  23351. "required": ["type", "id", "syncEvent"],
  23352. "additionalProperties": false
  23353. },
  23354. "SyncEventSessionNextToolCalled": {
  23355. "type": "object",
  23356. "properties": {
  23357. "type": {
  23358. "type": "string",
  23359. "enum": ["sync"]
  23360. },
  23361. "id": {
  23362. "type": "string",
  23363. "pattern": "^evt_"
  23364. },
  23365. "syncEvent": {
  23366. "type": "object",
  23367. "properties": {
  23368. "type": {
  23369. "type": "string",
  23370. "enum": ["session.next.tool.called.1"]
  23371. },
  23372. "id": {
  23373. "type": "string",
  23374. "pattern": "^evt_"
  23375. },
  23376. "seq": {
  23377. "type": "number"
  23378. },
  23379. "aggregateID": {
  23380. "type": "string"
  23381. },
  23382. "data": {
  23383. "type": "object",
  23384. "properties": {
  23385. "timestamp": {
  23386. "type": "number"
  23387. },
  23388. "sessionID": {
  23389. "type": "string",
  23390. "pattern": "^ses"
  23391. },
  23392. "assistantMessageID": {
  23393. "type": "string",
  23394. "pattern": "^msg_"
  23395. },
  23396. "callID": {
  23397. "type": "string"
  23398. },
  23399. "tool": {
  23400. "type": "string"
  23401. },
  23402. "input": {
  23403. "type": "object"
  23404. },
  23405. "provider": {
  23406. "type": "object",
  23407. "properties": {
  23408. "executed": {
  23409. "type": "boolean"
  23410. },
  23411. "metadata": {
  23412. "type": "object",
  23413. "additionalProperties": {
  23414. "type": "object"
  23415. }
  23416. }
  23417. },
  23418. "required": ["executed"],
  23419. "additionalProperties": false
  23420. }
  23421. },
  23422. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  23423. "additionalProperties": false
  23424. }
  23425. },
  23426. "required": ["type", "id", "seq", "aggregateID", "data"],
  23427. "additionalProperties": false
  23428. }
  23429. },
  23430. "required": ["type", "id", "syncEvent"],
  23431. "additionalProperties": false
  23432. },
  23433. "SyncEventSessionNextToolProgress": {
  23434. "type": "object",
  23435. "properties": {
  23436. "type": {
  23437. "type": "string",
  23438. "enum": ["sync"]
  23439. },
  23440. "id": {
  23441. "type": "string",
  23442. "pattern": "^evt_"
  23443. },
  23444. "syncEvent": {
  23445. "type": "object",
  23446. "properties": {
  23447. "type": {
  23448. "type": "string",
  23449. "enum": ["session.next.tool.progress.1"]
  23450. },
  23451. "id": {
  23452. "type": "string",
  23453. "pattern": "^evt_"
  23454. },
  23455. "seq": {
  23456. "type": "number"
  23457. },
  23458. "aggregateID": {
  23459. "type": "string"
  23460. },
  23461. "data": {
  23462. "type": "object",
  23463. "properties": {
  23464. "timestamp": {
  23465. "type": "number"
  23466. },
  23467. "sessionID": {
  23468. "type": "string",
  23469. "pattern": "^ses"
  23470. },
  23471. "assistantMessageID": {
  23472. "type": "string",
  23473. "pattern": "^msg_"
  23474. },
  23475. "callID": {
  23476. "type": "string"
  23477. },
  23478. "structured": {
  23479. "type": "object"
  23480. },
  23481. "content": {
  23482. "type": "array",
  23483. "items": {
  23484. "anyOf": [
  23485. {
  23486. "$ref": "#/components/schemas/ToolTextContent"
  23487. },
  23488. {
  23489. "$ref": "#/components/schemas/ToolFileContent"
  23490. }
  23491. ]
  23492. }
  23493. }
  23494. },
  23495. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  23496. "additionalProperties": false
  23497. }
  23498. },
  23499. "required": ["type", "id", "seq", "aggregateID", "data"],
  23500. "additionalProperties": false
  23501. }
  23502. },
  23503. "required": ["type", "id", "syncEvent"],
  23504. "additionalProperties": false
  23505. },
  23506. "SyncEventSessionNextToolSuccess": {
  23507. "type": "object",
  23508. "properties": {
  23509. "type": {
  23510. "type": "string",
  23511. "enum": ["sync"]
  23512. },
  23513. "id": {
  23514. "type": "string",
  23515. "pattern": "^evt_"
  23516. },
  23517. "syncEvent": {
  23518. "type": "object",
  23519. "properties": {
  23520. "type": {
  23521. "type": "string",
  23522. "enum": ["session.next.tool.success.1"]
  23523. },
  23524. "id": {
  23525. "type": "string",
  23526. "pattern": "^evt_"
  23527. },
  23528. "seq": {
  23529. "type": "number"
  23530. },
  23531. "aggregateID": {
  23532. "type": "string"
  23533. },
  23534. "data": {
  23535. "type": "object",
  23536. "properties": {
  23537. "timestamp": {
  23538. "type": "number"
  23539. },
  23540. "sessionID": {
  23541. "type": "string",
  23542. "pattern": "^ses"
  23543. },
  23544. "assistantMessageID": {
  23545. "type": "string",
  23546. "pattern": "^msg_"
  23547. },
  23548. "callID": {
  23549. "type": "string"
  23550. },
  23551. "structured": {
  23552. "type": "object"
  23553. },
  23554. "content": {
  23555. "type": "array",
  23556. "items": {
  23557. "anyOf": [
  23558. {
  23559. "$ref": "#/components/schemas/ToolTextContent"
  23560. },
  23561. {
  23562. "$ref": "#/components/schemas/ToolFileContent"
  23563. }
  23564. ]
  23565. }
  23566. },
  23567. "outputPaths": {
  23568. "type": "array",
  23569. "items": {
  23570. "type": "string"
  23571. }
  23572. },
  23573. "result": {},
  23574. "provider": {
  23575. "type": "object",
  23576. "properties": {
  23577. "executed": {
  23578. "type": "boolean"
  23579. },
  23580. "metadata": {
  23581. "type": "object",
  23582. "additionalProperties": {
  23583. "type": "object"
  23584. }
  23585. }
  23586. },
  23587. "required": ["executed"],
  23588. "additionalProperties": false
  23589. }
  23590. },
  23591. "required": [
  23592. "timestamp",
  23593. "sessionID",
  23594. "assistantMessageID",
  23595. "callID",
  23596. "structured",
  23597. "content",
  23598. "provider"
  23599. ],
  23600. "additionalProperties": false
  23601. }
  23602. },
  23603. "required": ["type", "id", "seq", "aggregateID", "data"],
  23604. "additionalProperties": false
  23605. }
  23606. },
  23607. "required": ["type", "id", "syncEvent"],
  23608. "additionalProperties": false
  23609. },
  23610. "SyncEventSessionNextToolFailed": {
  23611. "type": "object",
  23612. "properties": {
  23613. "type": {
  23614. "type": "string",
  23615. "enum": ["sync"]
  23616. },
  23617. "id": {
  23618. "type": "string",
  23619. "pattern": "^evt_"
  23620. },
  23621. "syncEvent": {
  23622. "type": "object",
  23623. "properties": {
  23624. "type": {
  23625. "type": "string",
  23626. "enum": ["session.next.tool.failed.1"]
  23627. },
  23628. "id": {
  23629. "type": "string",
  23630. "pattern": "^evt_"
  23631. },
  23632. "seq": {
  23633. "type": "number"
  23634. },
  23635. "aggregateID": {
  23636. "type": "string"
  23637. },
  23638. "data": {
  23639. "type": "object",
  23640. "properties": {
  23641. "timestamp": {
  23642. "type": "number"
  23643. },
  23644. "sessionID": {
  23645. "type": "string",
  23646. "pattern": "^ses"
  23647. },
  23648. "assistantMessageID": {
  23649. "type": "string",
  23650. "pattern": "^msg_"
  23651. },
  23652. "callID": {
  23653. "type": "string"
  23654. },
  23655. "error": {
  23656. "$ref": "#/components/schemas/SessionErrorUnknown"
  23657. },
  23658. "result": {},
  23659. "provider": {
  23660. "type": "object",
  23661. "properties": {
  23662. "executed": {
  23663. "type": "boolean"
  23664. },
  23665. "metadata": {
  23666. "type": "object",
  23667. "additionalProperties": {
  23668. "type": "object"
  23669. }
  23670. }
  23671. },
  23672. "required": ["executed"],
  23673. "additionalProperties": false
  23674. }
  23675. },
  23676. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  23677. "additionalProperties": false
  23678. }
  23679. },
  23680. "required": ["type", "id", "seq", "aggregateID", "data"],
  23681. "additionalProperties": false
  23682. }
  23683. },
  23684. "required": ["type", "id", "syncEvent"],
  23685. "additionalProperties": false
  23686. },
  23687. "SyncEventSessionNextRetried": {
  23688. "type": "object",
  23689. "properties": {
  23690. "type": {
  23691. "type": "string",
  23692. "enum": ["sync"]
  23693. },
  23694. "id": {
  23695. "type": "string",
  23696. "pattern": "^evt_"
  23697. },
  23698. "syncEvent": {
  23699. "type": "object",
  23700. "properties": {
  23701. "type": {
  23702. "type": "string",
  23703. "enum": ["session.next.retried.1"]
  23704. },
  23705. "id": {
  23706. "type": "string",
  23707. "pattern": "^evt_"
  23708. },
  23709. "seq": {
  23710. "type": "number"
  23711. },
  23712. "aggregateID": {
  23713. "type": "string"
  23714. },
  23715. "data": {
  23716. "type": "object",
  23717. "properties": {
  23718. "timestamp": {
  23719. "type": "number"
  23720. },
  23721. "sessionID": {
  23722. "type": "string",
  23723. "pattern": "^ses"
  23724. },
  23725. "attempt": {
  23726. "type": "number"
  23727. },
  23728. "error": {
  23729. "$ref": "#/components/schemas/SessionNextRetry_error"
  23730. }
  23731. },
  23732. "required": ["timestamp", "sessionID", "attempt", "error"],
  23733. "additionalProperties": false
  23734. }
  23735. },
  23736. "required": ["type", "id", "seq", "aggregateID", "data"],
  23737. "additionalProperties": false
  23738. }
  23739. },
  23740. "required": ["type", "id", "syncEvent"],
  23741. "additionalProperties": false
  23742. },
  23743. "SyncEventSessionNextCompactionStarted": {
  23744. "type": "object",
  23745. "properties": {
  23746. "type": {
  23747. "type": "string",
  23748. "enum": ["sync"]
  23749. },
  23750. "id": {
  23751. "type": "string",
  23752. "pattern": "^evt_"
  23753. },
  23754. "syncEvent": {
  23755. "type": "object",
  23756. "properties": {
  23757. "type": {
  23758. "type": "string",
  23759. "enum": ["session.next.compaction.started.1"]
  23760. },
  23761. "id": {
  23762. "type": "string",
  23763. "pattern": "^evt_"
  23764. },
  23765. "seq": {
  23766. "type": "number"
  23767. },
  23768. "aggregateID": {
  23769. "type": "string"
  23770. },
  23771. "data": {
  23772. "type": "object",
  23773. "properties": {
  23774. "timestamp": {
  23775. "type": "number"
  23776. },
  23777. "sessionID": {
  23778. "type": "string",
  23779. "pattern": "^ses"
  23780. },
  23781. "messageID": {
  23782. "type": "string",
  23783. "pattern": "^msg_"
  23784. },
  23785. "reason": {
  23786. "type": "string",
  23787. "enum": ["auto", "manual"]
  23788. }
  23789. },
  23790. "required": ["timestamp", "sessionID", "messageID", "reason"],
  23791. "additionalProperties": false
  23792. }
  23793. },
  23794. "required": ["type", "id", "seq", "aggregateID", "data"],
  23795. "additionalProperties": false
  23796. }
  23797. },
  23798. "required": ["type", "id", "syncEvent"],
  23799. "additionalProperties": false
  23800. },
  23801. "SyncEventSessionNextCompactionEnded": {
  23802. "type": "object",
  23803. "properties": {
  23804. "type": {
  23805. "type": "string",
  23806. "enum": ["sync"]
  23807. },
  23808. "id": {
  23809. "type": "string",
  23810. "pattern": "^evt_"
  23811. },
  23812. "syncEvent": {
  23813. "type": "object",
  23814. "properties": {
  23815. "type": {
  23816. "type": "string",
  23817. "enum": ["session.next.compaction.ended.2"]
  23818. },
  23819. "id": {
  23820. "type": "string",
  23821. "pattern": "^evt_"
  23822. },
  23823. "seq": {
  23824. "type": "number"
  23825. },
  23826. "aggregateID": {
  23827. "type": "string"
  23828. },
  23829. "data": {
  23830. "type": "object",
  23831. "properties": {
  23832. "timestamp": {
  23833. "type": "number"
  23834. },
  23835. "sessionID": {
  23836. "type": "string",
  23837. "pattern": "^ses"
  23838. },
  23839. "messageID": {
  23840. "type": "string",
  23841. "pattern": "^msg_"
  23842. },
  23843. "reason": {
  23844. "type": "string",
  23845. "enum": ["auto", "manual"]
  23846. },
  23847. "text": {
  23848. "type": "string"
  23849. },
  23850. "recent": {
  23851. "type": "string"
  23852. }
  23853. },
  23854. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  23855. "additionalProperties": false
  23856. }
  23857. },
  23858. "required": ["type", "id", "seq", "aggregateID", "data"],
  23859. "additionalProperties": false
  23860. }
  23861. },
  23862. "required": ["type", "id", "syncEvent"],
  23863. "additionalProperties": false
  23864. },
  23865. "PolicyEffect": {
  23866. "type": "string",
  23867. "enum": ["allow", "deny"]
  23868. },
  23869. "ConfigV2ExperimentalPolicy": {
  23870. "type": "object",
  23871. "properties": {
  23872. "action": {
  23873. "type": "string",
  23874. "enum": ["provider.use"]
  23875. },
  23876. "effect": {
  23877. "$ref": "#/components/schemas/PolicyEffect"
  23878. },
  23879. "resource": {
  23880. "type": "string"
  23881. }
  23882. },
  23883. "required": ["action", "effect", "resource"],
  23884. "additionalProperties": false
  23885. },
  23886. "ProjectDirectories": {
  23887. "type": "array",
  23888. "items": {
  23889. "type": "object",
  23890. "properties": {
  23891. "directory": {
  23892. "type": "string"
  23893. },
  23894. "type": {
  23895. "type": "string",
  23896. "enum": ["main", "root", "git_worktree"]
  23897. }
  23898. },
  23899. "required": ["directory", "type"],
  23900. "additionalProperties": false
  23901. }
  23902. },
  23903. "ProjectCopyCopy": {
  23904. "type": "object",
  23905. "properties": {
  23906. "directory": {
  23907. "type": "string"
  23908. }
  23909. },
  23910. "required": ["directory"],
  23911. "additionalProperties": false
  23912. },
  23913. "LocationInfo": {
  23914. "type": "object",
  23915. "properties": {
  23916. "directory": {
  23917. "type": "string"
  23918. },
  23919. "workspaceID": {
  23920. "type": "string",
  23921. "pattern": "^wrk"
  23922. },
  23923. "project": {
  23924. "type": "object",
  23925. "properties": {
  23926. "id": {
  23927. "type": "string"
  23928. },
  23929. "directory": {
  23930. "type": "string"
  23931. }
  23932. },
  23933. "required": ["id", "directory"],
  23934. "additionalProperties": false
  23935. }
  23936. },
  23937. "required": ["directory", "project"],
  23938. "additionalProperties": false
  23939. },
  23940. "PermissionV2Effect": {
  23941. "type": "string",
  23942. "enum": ["allow", "deny", "ask"]
  23943. },
  23944. "PermissionV2Rule": {
  23945. "type": "object",
  23946. "properties": {
  23947. "action": {
  23948. "type": "string"
  23949. },
  23950. "resource": {
  23951. "type": "string"
  23952. },
  23953. "effect": {
  23954. "$ref": "#/components/schemas/PermissionV2Effect"
  23955. }
  23956. },
  23957. "required": ["action", "resource", "effect"],
  23958. "additionalProperties": false
  23959. },
  23960. "PermissionV2Ruleset": {
  23961. "type": "array",
  23962. "items": {
  23963. "$ref": "#/components/schemas/PermissionV2Rule"
  23964. }
  23965. },
  23966. "AgentV2Info": {
  23967. "type": "object",
  23968. "properties": {
  23969. "id": {
  23970. "type": "string"
  23971. },
  23972. "model": {
  23973. "type": "object",
  23974. "properties": {
  23975. "id": {
  23976. "type": "string"
  23977. },
  23978. "providerID": {
  23979. "type": "string"
  23980. },
  23981. "variant": {
  23982. "type": "string"
  23983. }
  23984. },
  23985. "required": ["id", "providerID"],
  23986. "additionalProperties": false
  23987. },
  23988. "request": {
  23989. "type": "object",
  23990. "properties": {
  23991. "headers": {
  23992. "type": "object",
  23993. "additionalProperties": {
  23994. "type": "string"
  23995. }
  23996. },
  23997. "body": {
  23998. "type": "object"
  23999. }
  24000. },
  24001. "required": ["headers", "body"],
  24002. "additionalProperties": false
  24003. },
  24004. "system": {
  24005. "type": "string"
  24006. },
  24007. "description": {
  24008. "type": "string"
  24009. },
  24010. "mode": {
  24011. "type": "string",
  24012. "enum": ["subagent", "primary", "all"]
  24013. },
  24014. "hidden": {
  24015. "type": "boolean"
  24016. },
  24017. "color": {
  24018. "anyOf": [
  24019. {
  24020. "type": "string",
  24021. "pattern": "^#[0-9a-fA-F]{6}$"
  24022. },
  24023. {
  24024. "type": "string",
  24025. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  24026. }
  24027. ]
  24028. },
  24029. "steps": {
  24030. "type": "integer",
  24031. "exclusiveMinimum": 0
  24032. },
  24033. "permissions": {
  24034. "$ref": "#/components/schemas/PermissionV2Ruleset"
  24035. }
  24036. },
  24037. "required": ["id", "request", "mode", "hidden", "permissions"],
  24038. "additionalProperties": false
  24039. },
  24040. "SessionV2Info": {
  24041. "type": "object",
  24042. "properties": {
  24043. "id": {
  24044. "type": "string",
  24045. "pattern": "^ses"
  24046. },
  24047. "parentID": {
  24048. "type": "string",
  24049. "pattern": "^ses"
  24050. },
  24051. "projectID": {
  24052. "type": "string"
  24053. },
  24054. "agent": {
  24055. "type": "string"
  24056. },
  24057. "model": {
  24058. "type": "object",
  24059. "properties": {
  24060. "id": {
  24061. "type": "string"
  24062. },
  24063. "providerID": {
  24064. "type": "string"
  24065. },
  24066. "variant": {
  24067. "type": "string"
  24068. }
  24069. },
  24070. "required": ["id", "providerID"],
  24071. "additionalProperties": false
  24072. },
  24073. "cost": {
  24074. "type": "number"
  24075. },
  24076. "tokens": {
  24077. "type": "object",
  24078. "properties": {
  24079. "input": {
  24080. "type": "number"
  24081. },
  24082. "output": {
  24083. "type": "number"
  24084. },
  24085. "reasoning": {
  24086. "type": "number"
  24087. },
  24088. "cache": {
  24089. "type": "object",
  24090. "properties": {
  24091. "read": {
  24092. "type": "number"
  24093. },
  24094. "write": {
  24095. "type": "number"
  24096. }
  24097. },
  24098. "required": ["read", "write"],
  24099. "additionalProperties": false
  24100. }
  24101. },
  24102. "required": ["input", "output", "reasoning", "cache"],
  24103. "additionalProperties": false
  24104. },
  24105. "time": {
  24106. "type": "object",
  24107. "properties": {
  24108. "created": {
  24109. "type": "number"
  24110. },
  24111. "updated": {
  24112. "type": "number"
  24113. },
  24114. "archived": {
  24115. "type": "number"
  24116. }
  24117. },
  24118. "required": ["created", "updated"],
  24119. "additionalProperties": false
  24120. },
  24121. "title": {
  24122. "type": "string"
  24123. },
  24124. "location": {
  24125. "$ref": "#/components/schemas/LocationRef"
  24126. },
  24127. "subpath": {
  24128. "type": "string"
  24129. }
  24130. },
  24131. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  24132. "additionalProperties": false
  24133. },
  24134. "SessionInputAdmitted": {
  24135. "type": "object",
  24136. "properties": {
  24137. "admittedSeq": {
  24138. "type": "integer",
  24139. "minimum": 0
  24140. },
  24141. "id": {
  24142. "type": "string",
  24143. "pattern": "^msg_"
  24144. },
  24145. "sessionID": {
  24146. "type": "string",
  24147. "pattern": "^ses"
  24148. },
  24149. "prompt": {
  24150. "$ref": "#/components/schemas/Prompt"
  24151. },
  24152. "delivery": {
  24153. "type": "string",
  24154. "enum": ["steer", "queue"]
  24155. },
  24156. "timeCreated": {
  24157. "type": "number"
  24158. },
  24159. "promotedSeq": {
  24160. "type": "integer",
  24161. "minimum": 0
  24162. }
  24163. },
  24164. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  24165. "additionalProperties": false
  24166. },
  24167. "SessionMessageAgentSwitched": {
  24168. "type": "object",
  24169. "properties": {
  24170. "id": {
  24171. "type": "string",
  24172. "pattern": "^msg_"
  24173. },
  24174. "metadata": {
  24175. "type": "object"
  24176. },
  24177. "time": {
  24178. "type": "object",
  24179. "properties": {
  24180. "created": {
  24181. "type": "number"
  24182. }
  24183. },
  24184. "required": ["created"],
  24185. "additionalProperties": false
  24186. },
  24187. "type": {
  24188. "type": "string",
  24189. "enum": ["agent-switched"]
  24190. },
  24191. "agent": {
  24192. "type": "string"
  24193. }
  24194. },
  24195. "required": ["id", "time", "type", "agent"],
  24196. "additionalProperties": false
  24197. },
  24198. "SessionMessageModelSwitched": {
  24199. "type": "object",
  24200. "properties": {
  24201. "id": {
  24202. "type": "string",
  24203. "pattern": "^msg_"
  24204. },
  24205. "metadata": {
  24206. "type": "object"
  24207. },
  24208. "time": {
  24209. "type": "object",
  24210. "properties": {
  24211. "created": {
  24212. "type": "number"
  24213. }
  24214. },
  24215. "required": ["created"],
  24216. "additionalProperties": false
  24217. },
  24218. "type": {
  24219. "type": "string",
  24220. "enum": ["model-switched"]
  24221. },
  24222. "model": {
  24223. "type": "object",
  24224. "properties": {
  24225. "id": {
  24226. "type": "string"
  24227. },
  24228. "providerID": {
  24229. "type": "string"
  24230. },
  24231. "variant": {
  24232. "type": "string"
  24233. }
  24234. },
  24235. "required": ["id", "providerID"],
  24236. "additionalProperties": false
  24237. }
  24238. },
  24239. "required": ["id", "time", "type", "model"],
  24240. "additionalProperties": false
  24241. },
  24242. "SessionMessageUser": {
  24243. "type": "object",
  24244. "properties": {
  24245. "id": {
  24246. "type": "string",
  24247. "pattern": "^msg_"
  24248. },
  24249. "metadata": {
  24250. "type": "object"
  24251. },
  24252. "time": {
  24253. "type": "object",
  24254. "properties": {
  24255. "created": {
  24256. "type": "number"
  24257. }
  24258. },
  24259. "required": ["created"],
  24260. "additionalProperties": false
  24261. },
  24262. "text": {
  24263. "type": "string"
  24264. },
  24265. "files": {
  24266. "type": "array",
  24267. "items": {
  24268. "$ref": "#/components/schemas/PromptFileAttachment"
  24269. }
  24270. },
  24271. "agents": {
  24272. "type": "array",
  24273. "items": {
  24274. "$ref": "#/components/schemas/PromptAgentAttachment"
  24275. }
  24276. },
  24277. "type": {
  24278. "type": "string",
  24279. "enum": ["user"]
  24280. }
  24281. },
  24282. "required": ["id", "time", "text", "type"],
  24283. "additionalProperties": false
  24284. },
  24285. "SessionMessageSynthetic": {
  24286. "type": "object",
  24287. "properties": {
  24288. "id": {
  24289. "type": "string",
  24290. "pattern": "^msg_"
  24291. },
  24292. "metadata": {
  24293. "type": "object"
  24294. },
  24295. "time": {
  24296. "type": "object",
  24297. "properties": {
  24298. "created": {
  24299. "type": "number"
  24300. }
  24301. },
  24302. "required": ["created"],
  24303. "additionalProperties": false
  24304. },
  24305. "sessionID": {
  24306. "type": "string",
  24307. "pattern": "^ses"
  24308. },
  24309. "text": {
  24310. "type": "string"
  24311. },
  24312. "type": {
  24313. "type": "string",
  24314. "enum": ["synthetic"]
  24315. }
  24316. },
  24317. "required": ["id", "time", "sessionID", "text", "type"],
  24318. "additionalProperties": false
  24319. },
  24320. "SessionMessageSystem": {
  24321. "type": "object",
  24322. "properties": {
  24323. "id": {
  24324. "type": "string",
  24325. "pattern": "^msg_"
  24326. },
  24327. "metadata": {
  24328. "type": "object"
  24329. },
  24330. "time": {
  24331. "type": "object",
  24332. "properties": {
  24333. "created": {
  24334. "type": "number"
  24335. }
  24336. },
  24337. "required": ["created"],
  24338. "additionalProperties": false
  24339. },
  24340. "type": {
  24341. "type": "string",
  24342. "enum": ["system"]
  24343. },
  24344. "text": {
  24345. "type": "string"
  24346. }
  24347. },
  24348. "required": ["id", "time", "type", "text"],
  24349. "additionalProperties": false
  24350. },
  24351. "SessionMessageShell": {
  24352. "type": "object",
  24353. "properties": {
  24354. "id": {
  24355. "type": "string",
  24356. "pattern": "^msg_"
  24357. },
  24358. "metadata": {
  24359. "type": "object"
  24360. },
  24361. "time": {
  24362. "type": "object",
  24363. "properties": {
  24364. "created": {
  24365. "type": "number"
  24366. },
  24367. "completed": {
  24368. "type": "number"
  24369. }
  24370. },
  24371. "required": ["created"],
  24372. "additionalProperties": false
  24373. },
  24374. "type": {
  24375. "type": "string",
  24376. "enum": ["shell"]
  24377. },
  24378. "callID": {
  24379. "type": "string"
  24380. },
  24381. "command": {
  24382. "type": "string"
  24383. },
  24384. "output": {
  24385. "type": "string"
  24386. }
  24387. },
  24388. "required": ["id", "time", "type", "callID", "command", "output"],
  24389. "additionalProperties": false
  24390. },
  24391. "SessionMessageAssistantText": {
  24392. "type": "object",
  24393. "properties": {
  24394. "type": {
  24395. "type": "string",
  24396. "enum": ["text"]
  24397. },
  24398. "id": {
  24399. "type": "string"
  24400. },
  24401. "text": {
  24402. "type": "string"
  24403. }
  24404. },
  24405. "required": ["type", "id", "text"],
  24406. "additionalProperties": false
  24407. },
  24408. "SessionMessageAssistantReasoning": {
  24409. "type": "object",
  24410. "properties": {
  24411. "type": {
  24412. "type": "string",
  24413. "enum": ["reasoning"]
  24414. },
  24415. "id": {
  24416. "type": "string"
  24417. },
  24418. "text": {
  24419. "type": "string"
  24420. },
  24421. "providerMetadata": {
  24422. "type": "object",
  24423. "additionalProperties": {
  24424. "type": "object"
  24425. }
  24426. }
  24427. },
  24428. "required": ["type", "id", "text"],
  24429. "additionalProperties": false
  24430. },
  24431. "SessionMessageToolStatePending": {
  24432. "type": "object",
  24433. "properties": {
  24434. "status": {
  24435. "type": "string",
  24436. "enum": ["pending"]
  24437. },
  24438. "input": {
  24439. "type": "string"
  24440. }
  24441. },
  24442. "required": ["status", "input"],
  24443. "additionalProperties": false
  24444. },
  24445. "SessionMessageToolStateRunning": {
  24446. "type": "object",
  24447. "properties": {
  24448. "status": {
  24449. "type": "string",
  24450. "enum": ["running"]
  24451. },
  24452. "input": {
  24453. "type": "object"
  24454. },
  24455. "structured": {
  24456. "type": "object"
  24457. },
  24458. "content": {
  24459. "type": "array",
  24460. "items": {
  24461. "anyOf": [
  24462. {
  24463. "$ref": "#/components/schemas/ToolTextContent"
  24464. },
  24465. {
  24466. "$ref": "#/components/schemas/ToolFileContent"
  24467. }
  24468. ]
  24469. }
  24470. }
  24471. },
  24472. "required": ["status", "input", "structured", "content"],
  24473. "additionalProperties": false
  24474. },
  24475. "SessionMessageToolStateCompleted": {
  24476. "type": "object",
  24477. "properties": {
  24478. "status": {
  24479. "type": "string",
  24480. "enum": ["completed"]
  24481. },
  24482. "input": {
  24483. "type": "object"
  24484. },
  24485. "attachments": {
  24486. "type": "array",
  24487. "items": {
  24488. "$ref": "#/components/schemas/PromptFileAttachment"
  24489. }
  24490. },
  24491. "content": {
  24492. "type": "array",
  24493. "items": {
  24494. "anyOf": [
  24495. {
  24496. "$ref": "#/components/schemas/ToolTextContent"
  24497. },
  24498. {
  24499. "$ref": "#/components/schemas/ToolFileContent"
  24500. }
  24501. ]
  24502. }
  24503. },
  24504. "outputPaths": {
  24505. "type": "array",
  24506. "items": {
  24507. "type": "string"
  24508. }
  24509. },
  24510. "structured": {
  24511. "type": "object"
  24512. },
  24513. "result": {}
  24514. },
  24515. "required": ["status", "input", "content", "structured"],
  24516. "additionalProperties": false
  24517. },
  24518. "SessionMessageToolStateError": {
  24519. "type": "object",
  24520. "properties": {
  24521. "status": {
  24522. "type": "string",
  24523. "enum": ["error"]
  24524. },
  24525. "input": {
  24526. "type": "object"
  24527. },
  24528. "content": {
  24529. "type": "array",
  24530. "items": {
  24531. "anyOf": [
  24532. {
  24533. "$ref": "#/components/schemas/ToolTextContent"
  24534. },
  24535. {
  24536. "$ref": "#/components/schemas/ToolFileContent"
  24537. }
  24538. ]
  24539. }
  24540. },
  24541. "structured": {
  24542. "type": "object"
  24543. },
  24544. "error": {
  24545. "$ref": "#/components/schemas/SessionErrorUnknown"
  24546. },
  24547. "result": {}
  24548. },
  24549. "required": ["status", "input", "content", "structured", "error"],
  24550. "additionalProperties": false
  24551. },
  24552. "SessionMessageAssistantTool": {
  24553. "type": "object",
  24554. "properties": {
  24555. "type": {
  24556. "type": "string",
  24557. "enum": ["tool"]
  24558. },
  24559. "id": {
  24560. "type": "string"
  24561. },
  24562. "name": {
  24563. "type": "string"
  24564. },
  24565. "provider": {
  24566. "type": "object",
  24567. "properties": {
  24568. "executed": {
  24569. "type": "boolean"
  24570. },
  24571. "metadata": {
  24572. "type": "object",
  24573. "additionalProperties": {
  24574. "type": "object"
  24575. }
  24576. },
  24577. "resultMetadata": {
  24578. "type": "object",
  24579. "additionalProperties": {
  24580. "type": "object"
  24581. }
  24582. }
  24583. },
  24584. "required": ["executed"],
  24585. "additionalProperties": false
  24586. },
  24587. "state": {
  24588. "anyOf": [
  24589. {
  24590. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  24591. },
  24592. {
  24593. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  24594. },
  24595. {
  24596. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  24597. },
  24598. {
  24599. "$ref": "#/components/schemas/SessionMessageToolStateError"
  24600. }
  24601. ]
  24602. },
  24603. "time": {
  24604. "type": "object",
  24605. "properties": {
  24606. "created": {
  24607. "type": "number"
  24608. },
  24609. "ran": {
  24610. "type": "number"
  24611. },
  24612. "completed": {
  24613. "type": "number"
  24614. },
  24615. "pruned": {
  24616. "type": "number"
  24617. }
  24618. },
  24619. "required": ["created"],
  24620. "additionalProperties": false
  24621. }
  24622. },
  24623. "required": ["type", "id", "name", "state", "time"],
  24624. "additionalProperties": false
  24625. },
  24626. "SessionMessageAssistant": {
  24627. "type": "object",
  24628. "properties": {
  24629. "id": {
  24630. "type": "string",
  24631. "pattern": "^msg_"
  24632. },
  24633. "metadata": {
  24634. "type": "object"
  24635. },
  24636. "time": {
  24637. "type": "object",
  24638. "properties": {
  24639. "created": {
  24640. "type": "number"
  24641. },
  24642. "completed": {
  24643. "type": "number"
  24644. }
  24645. },
  24646. "required": ["created"],
  24647. "additionalProperties": false
  24648. },
  24649. "type": {
  24650. "type": "string",
  24651. "enum": ["assistant"]
  24652. },
  24653. "agent": {
  24654. "type": "string"
  24655. },
  24656. "model": {
  24657. "type": "object",
  24658. "properties": {
  24659. "id": {
  24660. "type": "string"
  24661. },
  24662. "providerID": {
  24663. "type": "string"
  24664. },
  24665. "variant": {
  24666. "type": "string"
  24667. }
  24668. },
  24669. "required": ["id", "providerID"],
  24670. "additionalProperties": false
  24671. },
  24672. "content": {
  24673. "type": "array",
  24674. "items": {
  24675. "anyOf": [
  24676. {
  24677. "$ref": "#/components/schemas/SessionMessageAssistantText"
  24678. },
  24679. {
  24680. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  24681. },
  24682. {
  24683. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  24684. }
  24685. ]
  24686. }
  24687. },
  24688. "snapshot": {
  24689. "type": "object",
  24690. "properties": {
  24691. "start": {
  24692. "type": "string"
  24693. },
  24694. "end": {
  24695. "type": "string"
  24696. }
  24697. },
  24698. "additionalProperties": false
  24699. },
  24700. "finish": {
  24701. "type": "string"
  24702. },
  24703. "cost": {
  24704. "type": "number"
  24705. },
  24706. "tokens": {
  24707. "type": "object",
  24708. "properties": {
  24709. "input": {
  24710. "type": "number"
  24711. },
  24712. "output": {
  24713. "type": "number"
  24714. },
  24715. "reasoning": {
  24716. "type": "number"
  24717. },
  24718. "cache": {
  24719. "type": "object",
  24720. "properties": {
  24721. "read": {
  24722. "type": "number"
  24723. },
  24724. "write": {
  24725. "type": "number"
  24726. }
  24727. },
  24728. "required": ["read", "write"],
  24729. "additionalProperties": false
  24730. }
  24731. },
  24732. "required": ["input", "output", "reasoning", "cache"],
  24733. "additionalProperties": false
  24734. },
  24735. "error": {
  24736. "$ref": "#/components/schemas/SessionErrorUnknown"
  24737. }
  24738. },
  24739. "required": ["id", "time", "type", "agent", "model", "content"],
  24740. "additionalProperties": false
  24741. },
  24742. "SessionMessageCompaction": {
  24743. "type": "object",
  24744. "properties": {
  24745. "type": {
  24746. "type": "string",
  24747. "enum": ["compaction"]
  24748. },
  24749. "reason": {
  24750. "type": "string",
  24751. "enum": ["auto", "manual"]
  24752. },
  24753. "summary": {
  24754. "type": "string"
  24755. },
  24756. "recent": {
  24757. "type": "string"
  24758. },
  24759. "id": {
  24760. "type": "string",
  24761. "pattern": "^msg_"
  24762. },
  24763. "metadata": {
  24764. "type": "object"
  24765. },
  24766. "time": {
  24767. "type": "object",
  24768. "properties": {
  24769. "created": {
  24770. "type": "number"
  24771. }
  24772. },
  24773. "required": ["created"],
  24774. "additionalProperties": false
  24775. }
  24776. },
  24777. "required": ["type", "reason", "summary", "recent", "id", "time"],
  24778. "additionalProperties": false
  24779. },
  24780. "SessionMessage": {
  24781. "anyOf": [
  24782. {
  24783. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  24784. },
  24785. {
  24786. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  24787. },
  24788. {
  24789. "$ref": "#/components/schemas/SessionMessageUser"
  24790. },
  24791. {
  24792. "$ref": "#/components/schemas/SessionMessageSynthetic"
  24793. },
  24794. {
  24795. "$ref": "#/components/schemas/SessionMessageSystem"
  24796. },
  24797. {
  24798. "$ref": "#/components/schemas/SessionMessageShell"
  24799. },
  24800. {
  24801. "$ref": "#/components/schemas/SessionMessageAssistant"
  24802. },
  24803. {
  24804. "$ref": "#/components/schemas/SessionMessageCompaction"
  24805. }
  24806. ]
  24807. },
  24808. "ProviderV2Info": {
  24809. "type": "object",
  24810. "properties": {
  24811. "id": {
  24812. "type": "string"
  24813. },
  24814. "name": {
  24815. "type": "string"
  24816. },
  24817. "enabled": {
  24818. "anyOf": [
  24819. {
  24820. "type": "boolean",
  24821. "enum": [false]
  24822. },
  24823. {
  24824. "type": "object",
  24825. "properties": {
  24826. "via": {
  24827. "type": "string",
  24828. "enum": ["env"]
  24829. },
  24830. "name": {
  24831. "type": "string"
  24832. }
  24833. },
  24834. "required": ["via", "name"],
  24835. "additionalProperties": false
  24836. },
  24837. {
  24838. "type": "object",
  24839. "properties": {
  24840. "via": {
  24841. "type": "string",
  24842. "enum": ["account"]
  24843. },
  24844. "service": {
  24845. "type": "string"
  24846. }
  24847. },
  24848. "required": ["via", "service"],
  24849. "additionalProperties": false
  24850. },
  24851. {
  24852. "type": "object",
  24853. "properties": {
  24854. "via": {
  24855. "type": "string",
  24856. "enum": ["custom"]
  24857. },
  24858. "data": {
  24859. "type": "object"
  24860. }
  24861. },
  24862. "required": ["via", "data"],
  24863. "additionalProperties": false
  24864. }
  24865. ]
  24866. },
  24867. "env": {
  24868. "type": "array",
  24869. "items": {
  24870. "type": "string"
  24871. }
  24872. },
  24873. "api": {
  24874. "anyOf": [
  24875. {
  24876. "type": "object",
  24877. "properties": {
  24878. "type": {
  24879. "type": "string",
  24880. "enum": ["aisdk"]
  24881. },
  24882. "package": {
  24883. "type": "string"
  24884. },
  24885. "url": {
  24886. "type": "string"
  24887. },
  24888. "settings": {
  24889. "type": "object"
  24890. }
  24891. },
  24892. "required": ["type", "package"],
  24893. "additionalProperties": false
  24894. },
  24895. {
  24896. "type": "object",
  24897. "properties": {
  24898. "type": {
  24899. "type": "string",
  24900. "enum": ["native"]
  24901. },
  24902. "url": {
  24903. "type": "string"
  24904. },
  24905. "settings": {
  24906. "type": "object"
  24907. }
  24908. },
  24909. "required": ["type", "settings"],
  24910. "additionalProperties": false
  24911. }
  24912. ]
  24913. },
  24914. "request": {
  24915. "type": "object",
  24916. "properties": {
  24917. "headers": {
  24918. "type": "object",
  24919. "additionalProperties": {
  24920. "type": "string"
  24921. }
  24922. },
  24923. "body": {
  24924. "type": "object"
  24925. }
  24926. },
  24927. "required": ["headers", "body"],
  24928. "additionalProperties": false
  24929. }
  24930. },
  24931. "required": ["id", "name", "enabled", "env", "api", "request"],
  24932. "additionalProperties": false
  24933. },
  24934. "PermissionV2Request": {
  24935. "type": "object",
  24936. "properties": {
  24937. "id": {
  24938. "type": "string",
  24939. "pattern": "^per"
  24940. },
  24941. "sessionID": {
  24942. "type": "string",
  24943. "pattern": "^ses"
  24944. },
  24945. "action": {
  24946. "type": "string"
  24947. },
  24948. "resources": {
  24949. "type": "array",
  24950. "items": {
  24951. "type": "string"
  24952. }
  24953. },
  24954. "save": {
  24955. "type": "array",
  24956. "items": {
  24957. "type": "string"
  24958. }
  24959. },
  24960. "metadata": {
  24961. "type": "object"
  24962. },
  24963. "source": {
  24964. "$ref": "#/components/schemas/PermissionV2Source"
  24965. }
  24966. },
  24967. "required": ["id", "sessionID", "action", "resources"],
  24968. "additionalProperties": false
  24969. },
  24970. "PermissionSavedInfo": {
  24971. "type": "object",
  24972. "properties": {
  24973. "id": {
  24974. "type": "string"
  24975. },
  24976. "projectID": {
  24977. "type": "string"
  24978. },
  24979. "action": {
  24980. "type": "string"
  24981. },
  24982. "resource": {
  24983. "type": "string"
  24984. }
  24985. },
  24986. "required": ["id", "projectID", "action", "resource"],
  24987. "additionalProperties": false
  24988. },
  24989. "FileSystemTextContent": {
  24990. "type": "object",
  24991. "properties": {
  24992. "type": {
  24993. "type": "string",
  24994. "enum": ["text"]
  24995. },
  24996. "content": {
  24997. "type": "string"
  24998. },
  24999. "mime": {
  25000. "type": "string"
  25001. }
  25002. },
  25003. "required": ["type", "content", "mime"],
  25004. "additionalProperties": false
  25005. },
  25006. "FileSystemBinaryContent": {
  25007. "type": "object",
  25008. "properties": {
  25009. "type": {
  25010. "type": "string",
  25011. "enum": ["binary"]
  25012. },
  25013. "content": {
  25014. "type": "string"
  25015. },
  25016. "encoding": {
  25017. "type": "string",
  25018. "enum": ["base64"]
  25019. },
  25020. "mime": {
  25021. "type": "string"
  25022. }
  25023. },
  25024. "required": ["type", "content", "encoding", "mime"],
  25025. "additionalProperties": false
  25026. },
  25027. "FileSystemEntry": {
  25028. "type": "object",
  25029. "properties": {
  25030. "path": {
  25031. "type": "string"
  25032. },
  25033. "uri": {
  25034. "type": "string"
  25035. },
  25036. "type": {
  25037. "type": "string",
  25038. "enum": ["file", "directory"]
  25039. },
  25040. "mime": {
  25041. "type": "string"
  25042. }
  25043. },
  25044. "required": ["path", "uri", "type", "mime"],
  25045. "additionalProperties": false
  25046. },
  25047. "CommandV2Info": {
  25048. "type": "object",
  25049. "properties": {
  25050. "name": {
  25051. "type": "string"
  25052. },
  25053. "template": {
  25054. "type": "string"
  25055. },
  25056. "description": {
  25057. "type": "string"
  25058. },
  25059. "agent": {
  25060. "type": "string"
  25061. },
  25062. "model": {
  25063. "type": "object",
  25064. "properties": {
  25065. "id": {
  25066. "type": "string"
  25067. },
  25068. "providerID": {
  25069. "type": "string"
  25070. },
  25071. "variant": {
  25072. "type": "string"
  25073. }
  25074. },
  25075. "required": ["id", "providerID"],
  25076. "additionalProperties": false
  25077. },
  25078. "subtask": {
  25079. "type": "boolean"
  25080. }
  25081. },
  25082. "required": ["name", "template"],
  25083. "additionalProperties": false
  25084. },
  25085. "SkillV2Info": {
  25086. "type": "object",
  25087. "properties": {
  25088. "name": {
  25089. "type": "string"
  25090. },
  25091. "description": {
  25092. "type": "string"
  25093. },
  25094. "slash": {
  25095. "type": "boolean"
  25096. },
  25097. "location": {
  25098. "type": "string"
  25099. },
  25100. "content": {
  25101. "type": "string"
  25102. }
  25103. },
  25104. "required": ["name", "location", "content"],
  25105. "additionalProperties": false
  25106. },
  25107. "QuestionV2Request": {
  25108. "type": "object",
  25109. "properties": {
  25110. "id": {
  25111. "type": "string",
  25112. "pattern": "^que"
  25113. },
  25114. "sessionID": {
  25115. "type": "string",
  25116. "pattern": "^ses"
  25117. },
  25118. "questions": {
  25119. "type": "array",
  25120. "items": {
  25121. "$ref": "#/components/schemas/QuestionV2Info"
  25122. },
  25123. "description": "Questions to ask"
  25124. },
  25125. "tool": {
  25126. "$ref": "#/components/schemas/QuestionV2Tool"
  25127. }
  25128. },
  25129. "required": ["id", "sessionID", "questions"],
  25130. "additionalProperties": false
  25131. },
  25132. "QuestionV2Reply": {
  25133. "type": "object",
  25134. "properties": {
  25135. "answers": {
  25136. "type": "array",
  25137. "items": {
  25138. "$ref": "#/components/schemas/QuestionV2Answer"
  25139. },
  25140. "description": "User answers in order of questions (each answer is an array of selected labels)"
  25141. }
  25142. },
  25143. "required": ["answers"],
  25144. "additionalProperties": false
  25145. },
  25146. "ReferenceLocalSource": {
  25147. "type": "object",
  25148. "properties": {
  25149. "type": {
  25150. "type": "string",
  25151. "enum": ["local"]
  25152. },
  25153. "path": {
  25154. "type": "string"
  25155. }
  25156. },
  25157. "required": ["type", "path"],
  25158. "additionalProperties": false
  25159. },
  25160. "ReferenceGitSource": {
  25161. "type": "object",
  25162. "properties": {
  25163. "type": {
  25164. "type": "string",
  25165. "enum": ["git"]
  25166. },
  25167. "repository": {
  25168. "type": "string"
  25169. },
  25170. "branch": {
  25171. "type": "string"
  25172. }
  25173. },
  25174. "required": ["type", "repository"],
  25175. "additionalProperties": false
  25176. },
  25177. "ReferenceInfo": {
  25178. "type": "object",
  25179. "properties": {
  25180. "name": {
  25181. "type": "string"
  25182. },
  25183. "path": {
  25184. "type": "string"
  25185. },
  25186. "source": {
  25187. "anyOf": [
  25188. {
  25189. "$ref": "#/components/schemas/ReferenceLocalSource"
  25190. },
  25191. {
  25192. "$ref": "#/components/schemas/ReferenceGitSource"
  25193. }
  25194. ]
  25195. }
  25196. },
  25197. "required": ["name", "path", "source"],
  25198. "additionalProperties": false
  25199. },
  25200. "EventModels-devRefreshed": {
  25201. "type": "object",
  25202. "properties": {
  25203. "id": {
  25204. "type": "string",
  25205. "pattern": "^evt_"
  25206. },
  25207. "type": {
  25208. "type": "string",
  25209. "enum": ["models-dev.refreshed"]
  25210. },
  25211. "properties": {
  25212. "type": "object",
  25213. "properties": {}
  25214. }
  25215. },
  25216. "required": ["id", "type", "properties"],
  25217. "additionalProperties": false
  25218. },
  25219. "EventPluginAdded": {
  25220. "type": "object",
  25221. "properties": {
  25222. "id": {
  25223. "type": "string",
  25224. "pattern": "^evt_"
  25225. },
  25226. "type": {
  25227. "type": "string",
  25228. "enum": ["plugin.added"]
  25229. },
  25230. "properties": {
  25231. "type": "object",
  25232. "properties": {
  25233. "id": {
  25234. "type": "string"
  25235. }
  25236. },
  25237. "required": ["id"],
  25238. "additionalProperties": false
  25239. }
  25240. },
  25241. "required": ["id", "type", "properties"],
  25242. "additionalProperties": false
  25243. },
  25244. "ModelV2Info1": {
  25245. "type": "object",
  25246. "properties": {
  25247. "id": {
  25248. "type": "string"
  25249. },
  25250. "providerID": {
  25251. "type": "string"
  25252. },
  25253. "family": {
  25254. "type": "string"
  25255. },
  25256. "name": {
  25257. "type": "string"
  25258. },
  25259. "api": {
  25260. "anyOf": [
  25261. {
  25262. "type": "object",
  25263. "properties": {
  25264. "id": {
  25265. "type": "string"
  25266. },
  25267. "type": {
  25268. "type": "string",
  25269. "enum": ["aisdk"]
  25270. },
  25271. "package": {
  25272. "type": "string"
  25273. },
  25274. "url": {
  25275. "type": "string"
  25276. },
  25277. "settings": {
  25278. "type": "object"
  25279. }
  25280. },
  25281. "required": ["id", "type", "package"],
  25282. "additionalProperties": false
  25283. },
  25284. {
  25285. "type": "object",
  25286. "properties": {
  25287. "id": {
  25288. "type": "string"
  25289. },
  25290. "type": {
  25291. "type": "string",
  25292. "enum": ["native"]
  25293. },
  25294. "url": {
  25295. "type": "string"
  25296. },
  25297. "settings": {
  25298. "type": "object"
  25299. }
  25300. },
  25301. "required": ["id", "type", "settings"],
  25302. "additionalProperties": false
  25303. }
  25304. ]
  25305. },
  25306. "capabilities": {
  25307. "type": "object",
  25308. "properties": {
  25309. "tools": {
  25310. "type": "boolean"
  25311. },
  25312. "input": {
  25313. "type": "array",
  25314. "items": {
  25315. "type": "string"
  25316. }
  25317. },
  25318. "output": {
  25319. "type": "array",
  25320. "items": {
  25321. "type": "string"
  25322. }
  25323. }
  25324. },
  25325. "required": ["tools", "input", "output"],
  25326. "additionalProperties": false
  25327. },
  25328. "request": {
  25329. "type": "object",
  25330. "properties": {
  25331. "headers": {
  25332. "type": "object",
  25333. "additionalProperties": {
  25334. "type": "string"
  25335. }
  25336. },
  25337. "body": {
  25338. "type": "object"
  25339. },
  25340. "generation": {
  25341. "type": "object",
  25342. "properties": {
  25343. "maxTokens": {
  25344. "anyOf": [
  25345. {
  25346. "type": "number"
  25347. },
  25348. {
  25349. "type": "string",
  25350. "enum": ["NaN"]
  25351. },
  25352. {
  25353. "type": "string",
  25354. "enum": ["Infinity"]
  25355. },
  25356. {
  25357. "type": "string",
  25358. "enum": ["-Infinity"]
  25359. }
  25360. ]
  25361. },
  25362. "temperature": {
  25363. "anyOf": [
  25364. {
  25365. "type": "number"
  25366. },
  25367. {
  25368. "type": "string",
  25369. "enum": ["NaN"]
  25370. },
  25371. {
  25372. "type": "string",
  25373. "enum": ["Infinity"]
  25374. },
  25375. {
  25376. "type": "string",
  25377. "enum": ["-Infinity"]
  25378. }
  25379. ]
  25380. },
  25381. "topP": {
  25382. "anyOf": [
  25383. {
  25384. "type": "number"
  25385. },
  25386. {
  25387. "type": "string",
  25388. "enum": ["NaN"]
  25389. },
  25390. {
  25391. "type": "string",
  25392. "enum": ["Infinity"]
  25393. },
  25394. {
  25395. "type": "string",
  25396. "enum": ["-Infinity"]
  25397. }
  25398. ]
  25399. },
  25400. "topK": {
  25401. "anyOf": [
  25402. {
  25403. "type": "number"
  25404. },
  25405. {
  25406. "type": "string",
  25407. "enum": ["NaN"]
  25408. },
  25409. {
  25410. "type": "string",
  25411. "enum": ["Infinity"]
  25412. },
  25413. {
  25414. "type": "string",
  25415. "enum": ["-Infinity"]
  25416. }
  25417. ]
  25418. },
  25419. "frequencyPenalty": {
  25420. "anyOf": [
  25421. {
  25422. "type": "number"
  25423. },
  25424. {
  25425. "type": "string",
  25426. "enum": ["NaN"]
  25427. },
  25428. {
  25429. "type": "string",
  25430. "enum": ["Infinity"]
  25431. },
  25432. {
  25433. "type": "string",
  25434. "enum": ["-Infinity"]
  25435. }
  25436. ]
  25437. },
  25438. "presencePenalty": {
  25439. "anyOf": [
  25440. {
  25441. "type": "number"
  25442. },
  25443. {
  25444. "type": "string",
  25445. "enum": ["NaN"]
  25446. },
  25447. {
  25448. "type": "string",
  25449. "enum": ["Infinity"]
  25450. },
  25451. {
  25452. "type": "string",
  25453. "enum": ["-Infinity"]
  25454. }
  25455. ]
  25456. },
  25457. "seed": {
  25458. "anyOf": [
  25459. {
  25460. "type": "number"
  25461. },
  25462. {
  25463. "type": "string",
  25464. "enum": ["NaN"]
  25465. },
  25466. {
  25467. "type": "string",
  25468. "enum": ["Infinity"]
  25469. },
  25470. {
  25471. "type": "string",
  25472. "enum": ["-Infinity"]
  25473. }
  25474. ]
  25475. },
  25476. "stop": {
  25477. "type": "array",
  25478. "items": {
  25479. "type": "string"
  25480. }
  25481. }
  25482. },
  25483. "additionalProperties": false
  25484. },
  25485. "options": {
  25486. "type": "object"
  25487. },
  25488. "variant": {
  25489. "type": "string"
  25490. }
  25491. },
  25492. "required": ["headers", "body"],
  25493. "additionalProperties": false
  25494. },
  25495. "variants": {
  25496. "type": "array",
  25497. "items": {
  25498. "type": "object",
  25499. "properties": {
  25500. "id": {
  25501. "type": "string"
  25502. },
  25503. "headers": {
  25504. "type": "object",
  25505. "additionalProperties": {
  25506. "type": "string"
  25507. }
  25508. },
  25509. "body": {
  25510. "type": "object"
  25511. },
  25512. "generation": {
  25513. "type": "object",
  25514. "properties": {
  25515. "maxTokens": {
  25516. "anyOf": [
  25517. {
  25518. "type": "number"
  25519. },
  25520. {
  25521. "type": "string",
  25522. "enum": ["NaN"]
  25523. },
  25524. {
  25525. "type": "string",
  25526. "enum": ["Infinity"]
  25527. },
  25528. {
  25529. "type": "string",
  25530. "enum": ["-Infinity"]
  25531. }
  25532. ]
  25533. },
  25534. "temperature": {
  25535. "anyOf": [
  25536. {
  25537. "type": "number"
  25538. },
  25539. {
  25540. "type": "string",
  25541. "enum": ["NaN"]
  25542. },
  25543. {
  25544. "type": "string",
  25545. "enum": ["Infinity"]
  25546. },
  25547. {
  25548. "type": "string",
  25549. "enum": ["-Infinity"]
  25550. }
  25551. ]
  25552. },
  25553. "topP": {
  25554. "anyOf": [
  25555. {
  25556. "type": "number"
  25557. },
  25558. {
  25559. "type": "string",
  25560. "enum": ["NaN"]
  25561. },
  25562. {
  25563. "type": "string",
  25564. "enum": ["Infinity"]
  25565. },
  25566. {
  25567. "type": "string",
  25568. "enum": ["-Infinity"]
  25569. }
  25570. ]
  25571. },
  25572. "topK": {
  25573. "anyOf": [
  25574. {
  25575. "type": "number"
  25576. },
  25577. {
  25578. "type": "string",
  25579. "enum": ["NaN"]
  25580. },
  25581. {
  25582. "type": "string",
  25583. "enum": ["Infinity"]
  25584. },
  25585. {
  25586. "type": "string",
  25587. "enum": ["-Infinity"]
  25588. }
  25589. ]
  25590. },
  25591. "frequencyPenalty": {
  25592. "anyOf": [
  25593. {
  25594. "type": "number"
  25595. },
  25596. {
  25597. "type": "string",
  25598. "enum": ["NaN"]
  25599. },
  25600. {
  25601. "type": "string",
  25602. "enum": ["Infinity"]
  25603. },
  25604. {
  25605. "type": "string",
  25606. "enum": ["-Infinity"]
  25607. }
  25608. ]
  25609. },
  25610. "presencePenalty": {
  25611. "anyOf": [
  25612. {
  25613. "type": "number"
  25614. },
  25615. {
  25616. "type": "string",
  25617. "enum": ["NaN"]
  25618. },
  25619. {
  25620. "type": "string",
  25621. "enum": ["Infinity"]
  25622. },
  25623. {
  25624. "type": "string",
  25625. "enum": ["-Infinity"]
  25626. }
  25627. ]
  25628. },
  25629. "seed": {
  25630. "anyOf": [
  25631. {
  25632. "type": "number"
  25633. },
  25634. {
  25635. "type": "string",
  25636. "enum": ["NaN"]
  25637. },
  25638. {
  25639. "type": "string",
  25640. "enum": ["Infinity"]
  25641. },
  25642. {
  25643. "type": "string",
  25644. "enum": ["-Infinity"]
  25645. }
  25646. ]
  25647. },
  25648. "stop": {
  25649. "type": "array",
  25650. "items": {
  25651. "type": "string"
  25652. }
  25653. }
  25654. },
  25655. "additionalProperties": false
  25656. },
  25657. "options": {
  25658. "type": "object"
  25659. }
  25660. },
  25661. "required": ["id", "headers", "body"],
  25662. "additionalProperties": false
  25663. }
  25664. },
  25665. "time": {
  25666. "type": "object",
  25667. "properties": {
  25668. "released": {
  25669. "anyOf": [
  25670. {
  25671. "type": "number"
  25672. },
  25673. {
  25674. "type": "string",
  25675. "enum": ["NaN"]
  25676. },
  25677. {
  25678. "type": "string",
  25679. "enum": ["Infinity"]
  25680. },
  25681. {
  25682. "type": "string",
  25683. "enum": ["-Infinity"]
  25684. }
  25685. ]
  25686. }
  25687. },
  25688. "required": ["released"],
  25689. "additionalProperties": false
  25690. },
  25691. "cost": {
  25692. "type": "array",
  25693. "items": {
  25694. "type": "object",
  25695. "properties": {
  25696. "tier": {
  25697. "type": "object",
  25698. "properties": {
  25699. "type": {
  25700. "type": "string",
  25701. "enum": ["context"]
  25702. },
  25703. "size": {
  25704. "type": "integer"
  25705. }
  25706. },
  25707. "required": ["type", "size"],
  25708. "additionalProperties": false
  25709. },
  25710. "input": {
  25711. "type": "number"
  25712. },
  25713. "output": {
  25714. "type": "number"
  25715. },
  25716. "cache": {
  25717. "type": "object",
  25718. "properties": {
  25719. "read": {
  25720. "type": "number"
  25721. },
  25722. "write": {
  25723. "type": "number"
  25724. }
  25725. },
  25726. "required": ["read", "write"],
  25727. "additionalProperties": false
  25728. }
  25729. },
  25730. "required": ["input", "output", "cache"],
  25731. "additionalProperties": false
  25732. }
  25733. },
  25734. "status": {
  25735. "type": "string",
  25736. "enum": ["alpha", "beta", "deprecated", "active"]
  25737. },
  25738. "enabled": {
  25739. "type": "boolean"
  25740. },
  25741. "limit": {
  25742. "type": "object",
  25743. "properties": {
  25744. "context": {
  25745. "type": "integer"
  25746. },
  25747. "input": {
  25748. "type": "integer"
  25749. },
  25750. "output": {
  25751. "type": "integer"
  25752. }
  25753. },
  25754. "required": ["context", "output"],
  25755. "additionalProperties": false
  25756. }
  25757. },
  25758. "required": [
  25759. "id",
  25760. "providerID",
  25761. "name",
  25762. "api",
  25763. "capabilities",
  25764. "request",
  25765. "variants",
  25766. "time",
  25767. "cost",
  25768. "status",
  25769. "enabled",
  25770. "limit"
  25771. ],
  25772. "additionalProperties": false
  25773. },
  25774. "EventCatalogModelUpdated": {
  25775. "type": "object",
  25776. "properties": {
  25777. "id": {
  25778. "type": "string",
  25779. "pattern": "^evt_"
  25780. },
  25781. "type": {
  25782. "type": "string",
  25783. "enum": ["catalog.model.updated"]
  25784. },
  25785. "properties": {
  25786. "type": "object",
  25787. "properties": {
  25788. "model": {
  25789. "$ref": "#/components/schemas/ModelV2Info1"
  25790. }
  25791. },
  25792. "required": ["model"],
  25793. "additionalProperties": false
  25794. }
  25795. },
  25796. "required": ["id", "type", "properties"],
  25797. "additionalProperties": false
  25798. },
  25799. "EventSessionCreated": {
  25800. "type": "object",
  25801. "properties": {
  25802. "id": {
  25803. "type": "string",
  25804. "pattern": "^evt_"
  25805. },
  25806. "type": {
  25807. "type": "string",
  25808. "enum": ["session.created"]
  25809. },
  25810. "properties": {
  25811. "type": "object",
  25812. "properties": {
  25813. "sessionID": {
  25814. "type": "string",
  25815. "pattern": "^ses"
  25816. },
  25817. "info": {
  25818. "$ref": "#/components/schemas/Session"
  25819. }
  25820. },
  25821. "required": ["sessionID", "info"],
  25822. "additionalProperties": false
  25823. }
  25824. },
  25825. "required": ["id", "type", "properties"],
  25826. "additionalProperties": false
  25827. },
  25828. "EventSessionUpdated": {
  25829. "type": "object",
  25830. "properties": {
  25831. "id": {
  25832. "type": "string",
  25833. "pattern": "^evt_"
  25834. },
  25835. "type": {
  25836. "type": "string",
  25837. "enum": ["session.updated"]
  25838. },
  25839. "properties": {
  25840. "type": "object",
  25841. "properties": {
  25842. "sessionID": {
  25843. "type": "string",
  25844. "pattern": "^ses"
  25845. },
  25846. "info": {
  25847. "$ref": "#/components/schemas/Session"
  25848. }
  25849. },
  25850. "required": ["sessionID", "info"],
  25851. "additionalProperties": false
  25852. }
  25853. },
  25854. "required": ["id", "type", "properties"],
  25855. "additionalProperties": false
  25856. },
  25857. "EventSessionDeleted": {
  25858. "type": "object",
  25859. "properties": {
  25860. "id": {
  25861. "type": "string",
  25862. "pattern": "^evt_"
  25863. },
  25864. "type": {
  25865. "type": "string",
  25866. "enum": ["session.deleted"]
  25867. },
  25868. "properties": {
  25869. "type": "object",
  25870. "properties": {
  25871. "sessionID": {
  25872. "type": "string",
  25873. "pattern": "^ses"
  25874. },
  25875. "info": {
  25876. "$ref": "#/components/schemas/Session"
  25877. }
  25878. },
  25879. "required": ["sessionID", "info"],
  25880. "additionalProperties": false
  25881. }
  25882. },
  25883. "required": ["id", "type", "properties"],
  25884. "additionalProperties": false
  25885. },
  25886. "EventMessageUpdated": {
  25887. "type": "object",
  25888. "properties": {
  25889. "id": {
  25890. "type": "string",
  25891. "pattern": "^evt_"
  25892. },
  25893. "type": {
  25894. "type": "string",
  25895. "enum": ["message.updated"]
  25896. },
  25897. "properties": {
  25898. "type": "object",
  25899. "properties": {
  25900. "sessionID": {
  25901. "type": "string",
  25902. "pattern": "^ses"
  25903. },
  25904. "info": {
  25905. "$ref": "#/components/schemas/Message"
  25906. }
  25907. },
  25908. "required": ["sessionID", "info"],
  25909. "additionalProperties": false
  25910. }
  25911. },
  25912. "required": ["id", "type", "properties"],
  25913. "additionalProperties": false
  25914. },
  25915. "EventMessageRemoved": {
  25916. "type": "object",
  25917. "properties": {
  25918. "id": {
  25919. "type": "string",
  25920. "pattern": "^evt_"
  25921. },
  25922. "type": {
  25923. "type": "string",
  25924. "enum": ["message.removed"]
  25925. },
  25926. "properties": {
  25927. "type": "object",
  25928. "properties": {
  25929. "sessionID": {
  25930. "type": "string",
  25931. "pattern": "^ses"
  25932. },
  25933. "messageID": {
  25934. "type": "string",
  25935. "pattern": "^msg"
  25936. }
  25937. },
  25938. "required": ["sessionID", "messageID"],
  25939. "additionalProperties": false
  25940. }
  25941. },
  25942. "required": ["id", "type", "properties"],
  25943. "additionalProperties": false
  25944. },
  25945. "EventMessagePartUpdated": {
  25946. "type": "object",
  25947. "properties": {
  25948. "id": {
  25949. "type": "string",
  25950. "pattern": "^evt_"
  25951. },
  25952. "type": {
  25953. "type": "string",
  25954. "enum": ["message.part.updated"]
  25955. },
  25956. "properties": {
  25957. "type": "object",
  25958. "properties": {
  25959. "sessionID": {
  25960. "type": "string",
  25961. "pattern": "^ses"
  25962. },
  25963. "part": {
  25964. "$ref": "#/components/schemas/Part"
  25965. },
  25966. "time": {
  25967. "type": "number"
  25968. }
  25969. },
  25970. "required": ["sessionID", "part", "time"],
  25971. "additionalProperties": false
  25972. }
  25973. },
  25974. "required": ["id", "type", "properties"],
  25975. "additionalProperties": false
  25976. },
  25977. "EventMessagePartRemoved": {
  25978. "type": "object",
  25979. "properties": {
  25980. "id": {
  25981. "type": "string",
  25982. "pattern": "^evt_"
  25983. },
  25984. "type": {
  25985. "type": "string",
  25986. "enum": ["message.part.removed"]
  25987. },
  25988. "properties": {
  25989. "type": "object",
  25990. "properties": {
  25991. "sessionID": {
  25992. "type": "string",
  25993. "pattern": "^ses"
  25994. },
  25995. "messageID": {
  25996. "type": "string",
  25997. "pattern": "^msg"
  25998. },
  25999. "partID": {
  26000. "type": "string",
  26001. "pattern": "^prt"
  26002. }
  26003. },
  26004. "required": ["sessionID", "messageID", "partID"],
  26005. "additionalProperties": false
  26006. }
  26007. },
  26008. "required": ["id", "type", "properties"],
  26009. "additionalProperties": false
  26010. },
  26011. "EventSessionNextAgentSwitched": {
  26012. "type": "object",
  26013. "properties": {
  26014. "id": {
  26015. "type": "string",
  26016. "pattern": "^evt_"
  26017. },
  26018. "type": {
  26019. "type": "string",
  26020. "enum": ["session.next.agent.switched"]
  26021. },
  26022. "properties": {
  26023. "type": "object",
  26024. "properties": {
  26025. "timestamp": {
  26026. "type": "number"
  26027. },
  26028. "sessionID": {
  26029. "type": "string",
  26030. "pattern": "^ses"
  26031. },
  26032. "messageID": {
  26033. "type": "string",
  26034. "pattern": "^msg_"
  26035. },
  26036. "agent": {
  26037. "type": "string"
  26038. }
  26039. },
  26040. "required": ["timestamp", "sessionID", "messageID", "agent"],
  26041. "additionalProperties": false
  26042. }
  26043. },
  26044. "required": ["id", "type", "properties"],
  26045. "additionalProperties": false
  26046. },
  26047. "EventSessionNextModelSwitched": {
  26048. "type": "object",
  26049. "properties": {
  26050. "id": {
  26051. "type": "string",
  26052. "pattern": "^evt_"
  26053. },
  26054. "type": {
  26055. "type": "string",
  26056. "enum": ["session.next.model.switched"]
  26057. },
  26058. "properties": {
  26059. "type": "object",
  26060. "properties": {
  26061. "timestamp": {
  26062. "type": "number"
  26063. },
  26064. "sessionID": {
  26065. "type": "string",
  26066. "pattern": "^ses"
  26067. },
  26068. "messageID": {
  26069. "type": "string",
  26070. "pattern": "^msg_"
  26071. },
  26072. "model": {
  26073. "type": "object",
  26074. "properties": {
  26075. "id": {
  26076. "type": "string"
  26077. },
  26078. "providerID": {
  26079. "type": "string"
  26080. },
  26081. "variant": {
  26082. "type": "string"
  26083. }
  26084. },
  26085. "required": ["id", "providerID"],
  26086. "additionalProperties": false
  26087. }
  26088. },
  26089. "required": ["timestamp", "sessionID", "messageID", "model"],
  26090. "additionalProperties": false
  26091. }
  26092. },
  26093. "required": ["id", "type", "properties"],
  26094. "additionalProperties": false
  26095. },
  26096. "EventSessionNextMoved": {
  26097. "type": "object",
  26098. "properties": {
  26099. "id": {
  26100. "type": "string",
  26101. "pattern": "^evt_"
  26102. },
  26103. "type": {
  26104. "type": "string",
  26105. "enum": ["session.next.moved"]
  26106. },
  26107. "properties": {
  26108. "type": "object",
  26109. "properties": {
  26110. "timestamp": {
  26111. "type": "number"
  26112. },
  26113. "sessionID": {
  26114. "type": "string",
  26115. "pattern": "^ses"
  26116. },
  26117. "location": {
  26118. "$ref": "#/components/schemas/LocationRef"
  26119. },
  26120. "subdirectory": {
  26121. "type": "string"
  26122. }
  26123. },
  26124. "required": ["timestamp", "sessionID", "location"],
  26125. "additionalProperties": false
  26126. }
  26127. },
  26128. "required": ["id", "type", "properties"],
  26129. "additionalProperties": false
  26130. },
  26131. "EventSessionNextPrompted": {
  26132. "type": "object",
  26133. "properties": {
  26134. "id": {
  26135. "type": "string",
  26136. "pattern": "^evt_"
  26137. },
  26138. "type": {
  26139. "type": "string",
  26140. "enum": ["session.next.prompted"]
  26141. },
  26142. "properties": {
  26143. "type": "object",
  26144. "properties": {
  26145. "timestamp": {
  26146. "type": "number"
  26147. },
  26148. "sessionID": {
  26149. "type": "string",
  26150. "pattern": "^ses"
  26151. },
  26152. "messageID": {
  26153. "type": "string",
  26154. "pattern": "^msg_"
  26155. },
  26156. "prompt": {
  26157. "$ref": "#/components/schemas/Prompt"
  26158. },
  26159. "delivery": {
  26160. "type": "string",
  26161. "enum": ["steer", "queue"]
  26162. }
  26163. },
  26164. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26165. "additionalProperties": false
  26166. }
  26167. },
  26168. "required": ["id", "type", "properties"],
  26169. "additionalProperties": false
  26170. },
  26171. "EventSessionNextPromptAdmitted": {
  26172. "type": "object",
  26173. "properties": {
  26174. "id": {
  26175. "type": "string",
  26176. "pattern": "^evt_"
  26177. },
  26178. "type": {
  26179. "type": "string",
  26180. "enum": ["session.next.prompt.admitted"]
  26181. },
  26182. "properties": {
  26183. "type": "object",
  26184. "properties": {
  26185. "timestamp": {
  26186. "type": "number"
  26187. },
  26188. "sessionID": {
  26189. "type": "string",
  26190. "pattern": "^ses"
  26191. },
  26192. "messageID": {
  26193. "type": "string",
  26194. "pattern": "^msg_"
  26195. },
  26196. "prompt": {
  26197. "$ref": "#/components/schemas/Prompt"
  26198. },
  26199. "delivery": {
  26200. "type": "string",
  26201. "enum": ["steer", "queue"]
  26202. }
  26203. },
  26204. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26205. "additionalProperties": false
  26206. }
  26207. },
  26208. "required": ["id", "type", "properties"],
  26209. "additionalProperties": false
  26210. },
  26211. "EventSessionNextPromptPromoted": {
  26212. "type": "object",
  26213. "properties": {
  26214. "id": {
  26215. "type": "string",
  26216. "pattern": "^evt_"
  26217. },
  26218. "type": {
  26219. "type": "string",
  26220. "enum": ["session.next.prompt.promoted"]
  26221. },
  26222. "properties": {
  26223. "type": "object",
  26224. "properties": {
  26225. "timestamp": {
  26226. "type": "number"
  26227. },
  26228. "sessionID": {
  26229. "type": "string",
  26230. "pattern": "^ses"
  26231. },
  26232. "messageID": {
  26233. "type": "string",
  26234. "pattern": "^msg_"
  26235. },
  26236. "prompt": {
  26237. "$ref": "#/components/schemas/Prompt"
  26238. },
  26239. "timeCreated": {
  26240. "type": "number"
  26241. }
  26242. },
  26243. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  26244. "additionalProperties": false
  26245. }
  26246. },
  26247. "required": ["id", "type", "properties"],
  26248. "additionalProperties": false
  26249. },
  26250. "EventSessionNextInterruptRequested": {
  26251. "type": "object",
  26252. "properties": {
  26253. "id": {
  26254. "type": "string",
  26255. "pattern": "^evt_"
  26256. },
  26257. "type": {
  26258. "type": "string",
  26259. "enum": ["session.next.interrupt.requested"]
  26260. },
  26261. "properties": {
  26262. "type": "object",
  26263. "properties": {
  26264. "timestamp": {
  26265. "type": "number"
  26266. },
  26267. "sessionID": {
  26268. "type": "string",
  26269. "pattern": "^ses"
  26270. }
  26271. },
  26272. "required": ["timestamp", "sessionID"],
  26273. "additionalProperties": false
  26274. }
  26275. },
  26276. "required": ["id", "type", "properties"],
  26277. "additionalProperties": false
  26278. },
  26279. "EventSessionNextContextUpdated": {
  26280. "type": "object",
  26281. "properties": {
  26282. "id": {
  26283. "type": "string",
  26284. "pattern": "^evt_"
  26285. },
  26286. "type": {
  26287. "type": "string",
  26288. "enum": ["session.next.context.updated"]
  26289. },
  26290. "properties": {
  26291. "type": "object",
  26292. "properties": {
  26293. "timestamp": {
  26294. "type": "number"
  26295. },
  26296. "sessionID": {
  26297. "type": "string",
  26298. "pattern": "^ses"
  26299. },
  26300. "messageID": {
  26301. "type": "string",
  26302. "pattern": "^msg_"
  26303. },
  26304. "text": {
  26305. "type": "string"
  26306. }
  26307. },
  26308. "required": ["timestamp", "sessionID", "messageID", "text"],
  26309. "additionalProperties": false
  26310. }
  26311. },
  26312. "required": ["id", "type", "properties"],
  26313. "additionalProperties": false
  26314. },
  26315. "EventSessionNextSynthetic": {
  26316. "type": "object",
  26317. "properties": {
  26318. "id": {
  26319. "type": "string",
  26320. "pattern": "^evt_"
  26321. },
  26322. "type": {
  26323. "type": "string",
  26324. "enum": ["session.next.synthetic"]
  26325. },
  26326. "properties": {
  26327. "type": "object",
  26328. "properties": {
  26329. "timestamp": {
  26330. "type": "number"
  26331. },
  26332. "sessionID": {
  26333. "type": "string",
  26334. "pattern": "^ses"
  26335. },
  26336. "messageID": {
  26337. "type": "string",
  26338. "pattern": "^msg_"
  26339. },
  26340. "text": {
  26341. "type": "string"
  26342. }
  26343. },
  26344. "required": ["timestamp", "sessionID", "messageID", "text"],
  26345. "additionalProperties": false
  26346. }
  26347. },
  26348. "required": ["id", "type", "properties"],
  26349. "additionalProperties": false
  26350. },
  26351. "EventSessionNextShellStarted": {
  26352. "type": "object",
  26353. "properties": {
  26354. "id": {
  26355. "type": "string",
  26356. "pattern": "^evt_"
  26357. },
  26358. "type": {
  26359. "type": "string",
  26360. "enum": ["session.next.shell.started"]
  26361. },
  26362. "properties": {
  26363. "type": "object",
  26364. "properties": {
  26365. "timestamp": {
  26366. "type": "number"
  26367. },
  26368. "sessionID": {
  26369. "type": "string",
  26370. "pattern": "^ses"
  26371. },
  26372. "messageID": {
  26373. "type": "string",
  26374. "pattern": "^msg_"
  26375. },
  26376. "callID": {
  26377. "type": "string"
  26378. },
  26379. "command": {
  26380. "type": "string"
  26381. }
  26382. },
  26383. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  26384. "additionalProperties": false
  26385. }
  26386. },
  26387. "required": ["id", "type", "properties"],
  26388. "additionalProperties": false
  26389. },
  26390. "EventSessionNextShellEnded": {
  26391. "type": "object",
  26392. "properties": {
  26393. "id": {
  26394. "type": "string",
  26395. "pattern": "^evt_"
  26396. },
  26397. "type": {
  26398. "type": "string",
  26399. "enum": ["session.next.shell.ended"]
  26400. },
  26401. "properties": {
  26402. "type": "object",
  26403. "properties": {
  26404. "timestamp": {
  26405. "type": "number"
  26406. },
  26407. "sessionID": {
  26408. "type": "string",
  26409. "pattern": "^ses"
  26410. },
  26411. "callID": {
  26412. "type": "string"
  26413. },
  26414. "output": {
  26415. "type": "string"
  26416. }
  26417. },
  26418. "required": ["timestamp", "sessionID", "callID", "output"],
  26419. "additionalProperties": false
  26420. }
  26421. },
  26422. "required": ["id", "type", "properties"],
  26423. "additionalProperties": false
  26424. },
  26425. "EventSessionNextStepStarted": {
  26426. "type": "object",
  26427. "properties": {
  26428. "id": {
  26429. "type": "string",
  26430. "pattern": "^evt_"
  26431. },
  26432. "type": {
  26433. "type": "string",
  26434. "enum": ["session.next.step.started"]
  26435. },
  26436. "properties": {
  26437. "type": "object",
  26438. "properties": {
  26439. "timestamp": {
  26440. "type": "number"
  26441. },
  26442. "sessionID": {
  26443. "type": "string",
  26444. "pattern": "^ses"
  26445. },
  26446. "assistantMessageID": {
  26447. "type": "string",
  26448. "pattern": "^msg_"
  26449. },
  26450. "agent": {
  26451. "type": "string"
  26452. },
  26453. "model": {
  26454. "type": "object",
  26455. "properties": {
  26456. "id": {
  26457. "type": "string"
  26458. },
  26459. "providerID": {
  26460. "type": "string"
  26461. },
  26462. "variant": {
  26463. "type": "string"
  26464. }
  26465. },
  26466. "required": ["id", "providerID"],
  26467. "additionalProperties": false
  26468. },
  26469. "snapshot": {
  26470. "type": "string"
  26471. }
  26472. },
  26473. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  26474. "additionalProperties": false
  26475. }
  26476. },
  26477. "required": ["id", "type", "properties"],
  26478. "additionalProperties": false
  26479. },
  26480. "EventSessionNextStepEnded": {
  26481. "type": "object",
  26482. "properties": {
  26483. "id": {
  26484. "type": "string",
  26485. "pattern": "^evt_"
  26486. },
  26487. "type": {
  26488. "type": "string",
  26489. "enum": ["session.next.step.ended"]
  26490. },
  26491. "properties": {
  26492. "type": "object",
  26493. "properties": {
  26494. "timestamp": {
  26495. "type": "number"
  26496. },
  26497. "sessionID": {
  26498. "type": "string",
  26499. "pattern": "^ses"
  26500. },
  26501. "assistantMessageID": {
  26502. "type": "string",
  26503. "pattern": "^msg_"
  26504. },
  26505. "finish": {
  26506. "type": "string"
  26507. },
  26508. "cost": {
  26509. "type": "number"
  26510. },
  26511. "tokens": {
  26512. "type": "object",
  26513. "properties": {
  26514. "input": {
  26515. "type": "number"
  26516. },
  26517. "output": {
  26518. "type": "number"
  26519. },
  26520. "reasoning": {
  26521. "type": "number"
  26522. },
  26523. "cache": {
  26524. "type": "object",
  26525. "properties": {
  26526. "read": {
  26527. "type": "number"
  26528. },
  26529. "write": {
  26530. "type": "number"
  26531. }
  26532. },
  26533. "required": ["read", "write"],
  26534. "additionalProperties": false
  26535. }
  26536. },
  26537. "required": ["input", "output", "reasoning", "cache"],
  26538. "additionalProperties": false
  26539. },
  26540. "snapshot": {
  26541. "type": "string"
  26542. }
  26543. },
  26544. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  26545. "additionalProperties": false
  26546. }
  26547. },
  26548. "required": ["id", "type", "properties"],
  26549. "additionalProperties": false
  26550. },
  26551. "EventSessionNextStepFailed": {
  26552. "type": "object",
  26553. "properties": {
  26554. "id": {
  26555. "type": "string",
  26556. "pattern": "^evt_"
  26557. },
  26558. "type": {
  26559. "type": "string",
  26560. "enum": ["session.next.step.failed"]
  26561. },
  26562. "properties": {
  26563. "type": "object",
  26564. "properties": {
  26565. "timestamp": {
  26566. "type": "number"
  26567. },
  26568. "sessionID": {
  26569. "type": "string",
  26570. "pattern": "^ses"
  26571. },
  26572. "assistantMessageID": {
  26573. "type": "string",
  26574. "pattern": "^msg_"
  26575. },
  26576. "error": {
  26577. "$ref": "#/components/schemas/SessionErrorUnknown"
  26578. }
  26579. },
  26580. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  26581. "additionalProperties": false
  26582. }
  26583. },
  26584. "required": ["id", "type", "properties"],
  26585. "additionalProperties": false
  26586. },
  26587. "EventSessionNextTextStarted": {
  26588. "type": "object",
  26589. "properties": {
  26590. "id": {
  26591. "type": "string",
  26592. "pattern": "^evt_"
  26593. },
  26594. "type": {
  26595. "type": "string",
  26596. "enum": ["session.next.text.started"]
  26597. },
  26598. "properties": {
  26599. "type": "object",
  26600. "properties": {
  26601. "timestamp": {
  26602. "type": "number"
  26603. },
  26604. "sessionID": {
  26605. "type": "string",
  26606. "pattern": "^ses"
  26607. },
  26608. "assistantMessageID": {
  26609. "type": "string",
  26610. "pattern": "^msg_"
  26611. },
  26612. "textID": {
  26613. "type": "string"
  26614. }
  26615. },
  26616. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26617. "additionalProperties": false
  26618. }
  26619. },
  26620. "required": ["id", "type", "properties"],
  26621. "additionalProperties": false
  26622. },
  26623. "EventSessionNextTextDelta": {
  26624. "type": "object",
  26625. "properties": {
  26626. "id": {
  26627. "type": "string",
  26628. "pattern": "^evt_"
  26629. },
  26630. "type": {
  26631. "type": "string",
  26632. "enum": ["session.next.text.delta"]
  26633. },
  26634. "properties": {
  26635. "type": "object",
  26636. "properties": {
  26637. "timestamp": {
  26638. "type": "number"
  26639. },
  26640. "sessionID": {
  26641. "type": "string",
  26642. "pattern": "^ses"
  26643. },
  26644. "assistantMessageID": {
  26645. "type": "string",
  26646. "pattern": "^msg_"
  26647. },
  26648. "textID": {
  26649. "type": "string"
  26650. },
  26651. "delta": {
  26652. "type": "string"
  26653. }
  26654. },
  26655. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  26656. "additionalProperties": false
  26657. }
  26658. },
  26659. "required": ["id", "type", "properties"],
  26660. "additionalProperties": false
  26661. },
  26662. "EventSessionNextTextEnded": {
  26663. "type": "object",
  26664. "properties": {
  26665. "id": {
  26666. "type": "string",
  26667. "pattern": "^evt_"
  26668. },
  26669. "type": {
  26670. "type": "string",
  26671. "enum": ["session.next.text.ended"]
  26672. },
  26673. "properties": {
  26674. "type": "object",
  26675. "properties": {
  26676. "timestamp": {
  26677. "type": "number"
  26678. },
  26679. "sessionID": {
  26680. "type": "string",
  26681. "pattern": "^ses"
  26682. },
  26683. "assistantMessageID": {
  26684. "type": "string",
  26685. "pattern": "^msg_"
  26686. },
  26687. "textID": {
  26688. "type": "string"
  26689. },
  26690. "text": {
  26691. "type": "string"
  26692. }
  26693. },
  26694. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26695. "additionalProperties": false
  26696. }
  26697. },
  26698. "required": ["id", "type", "properties"],
  26699. "additionalProperties": false
  26700. },
  26701. "EventSessionNextReasoningStarted": {
  26702. "type": "object",
  26703. "properties": {
  26704. "id": {
  26705. "type": "string",
  26706. "pattern": "^evt_"
  26707. },
  26708. "type": {
  26709. "type": "string",
  26710. "enum": ["session.next.reasoning.started"]
  26711. },
  26712. "properties": {
  26713. "type": "object",
  26714. "properties": {
  26715. "timestamp": {
  26716. "type": "number"
  26717. },
  26718. "sessionID": {
  26719. "type": "string",
  26720. "pattern": "^ses"
  26721. },
  26722. "assistantMessageID": {
  26723. "type": "string",
  26724. "pattern": "^msg_"
  26725. },
  26726. "reasoningID": {
  26727. "type": "string"
  26728. },
  26729. "providerMetadata": {
  26730. "type": "object",
  26731. "additionalProperties": {
  26732. "type": "object"
  26733. }
  26734. }
  26735. },
  26736. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26737. "additionalProperties": false
  26738. }
  26739. },
  26740. "required": ["id", "type", "properties"],
  26741. "additionalProperties": false
  26742. },
  26743. "EventSessionNextReasoningDelta": {
  26744. "type": "object",
  26745. "properties": {
  26746. "id": {
  26747. "type": "string",
  26748. "pattern": "^evt_"
  26749. },
  26750. "type": {
  26751. "type": "string",
  26752. "enum": ["session.next.reasoning.delta"]
  26753. },
  26754. "properties": {
  26755. "type": "object",
  26756. "properties": {
  26757. "timestamp": {
  26758. "type": "number"
  26759. },
  26760. "sessionID": {
  26761. "type": "string",
  26762. "pattern": "^ses"
  26763. },
  26764. "assistantMessageID": {
  26765. "type": "string",
  26766. "pattern": "^msg_"
  26767. },
  26768. "reasoningID": {
  26769. "type": "string"
  26770. },
  26771. "delta": {
  26772. "type": "string"
  26773. }
  26774. },
  26775. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  26776. "additionalProperties": false
  26777. }
  26778. },
  26779. "required": ["id", "type", "properties"],
  26780. "additionalProperties": false
  26781. },
  26782. "EventSessionNextReasoningEnded": {
  26783. "type": "object",
  26784. "properties": {
  26785. "id": {
  26786. "type": "string",
  26787. "pattern": "^evt_"
  26788. },
  26789. "type": {
  26790. "type": "string",
  26791. "enum": ["session.next.reasoning.ended"]
  26792. },
  26793. "properties": {
  26794. "type": "object",
  26795. "properties": {
  26796. "timestamp": {
  26797. "type": "number"
  26798. },
  26799. "sessionID": {
  26800. "type": "string",
  26801. "pattern": "^ses"
  26802. },
  26803. "assistantMessageID": {
  26804. "type": "string",
  26805. "pattern": "^msg_"
  26806. },
  26807. "reasoningID": {
  26808. "type": "string"
  26809. },
  26810. "text": {
  26811. "type": "string"
  26812. },
  26813. "providerMetadata": {
  26814. "type": "object",
  26815. "additionalProperties": {
  26816. "type": "object"
  26817. }
  26818. }
  26819. },
  26820. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26821. "additionalProperties": false
  26822. }
  26823. },
  26824. "required": ["id", "type", "properties"],
  26825. "additionalProperties": false
  26826. },
  26827. "EventSessionNextToolInputStarted": {
  26828. "type": "object",
  26829. "properties": {
  26830. "id": {
  26831. "type": "string",
  26832. "pattern": "^evt_"
  26833. },
  26834. "type": {
  26835. "type": "string",
  26836. "enum": ["session.next.tool.input.started"]
  26837. },
  26838. "properties": {
  26839. "type": "object",
  26840. "properties": {
  26841. "timestamp": {
  26842. "type": "number"
  26843. },
  26844. "sessionID": {
  26845. "type": "string",
  26846. "pattern": "^ses"
  26847. },
  26848. "assistantMessageID": {
  26849. "type": "string",
  26850. "pattern": "^msg_"
  26851. },
  26852. "callID": {
  26853. "type": "string"
  26854. },
  26855. "name": {
  26856. "type": "string"
  26857. }
  26858. },
  26859. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26860. "additionalProperties": false
  26861. }
  26862. },
  26863. "required": ["id", "type", "properties"],
  26864. "additionalProperties": false
  26865. },
  26866. "EventSessionNextToolInputDelta": {
  26867. "type": "object",
  26868. "properties": {
  26869. "id": {
  26870. "type": "string",
  26871. "pattern": "^evt_"
  26872. },
  26873. "type": {
  26874. "type": "string",
  26875. "enum": ["session.next.tool.input.delta"]
  26876. },
  26877. "properties": {
  26878. "type": "object",
  26879. "properties": {
  26880. "timestamp": {
  26881. "type": "number"
  26882. },
  26883. "sessionID": {
  26884. "type": "string",
  26885. "pattern": "^ses"
  26886. },
  26887. "assistantMessageID": {
  26888. "type": "string",
  26889. "pattern": "^msg_"
  26890. },
  26891. "callID": {
  26892. "type": "string"
  26893. },
  26894. "delta": {
  26895. "type": "string"
  26896. }
  26897. },
  26898. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  26899. "additionalProperties": false
  26900. }
  26901. },
  26902. "required": ["id", "type", "properties"],
  26903. "additionalProperties": false
  26904. },
  26905. "EventSessionNextToolInputEnded": {
  26906. "type": "object",
  26907. "properties": {
  26908. "id": {
  26909. "type": "string",
  26910. "pattern": "^evt_"
  26911. },
  26912. "type": {
  26913. "type": "string",
  26914. "enum": ["session.next.tool.input.ended"]
  26915. },
  26916. "properties": {
  26917. "type": "object",
  26918. "properties": {
  26919. "timestamp": {
  26920. "type": "number"
  26921. },
  26922. "sessionID": {
  26923. "type": "string",
  26924. "pattern": "^ses"
  26925. },
  26926. "assistantMessageID": {
  26927. "type": "string",
  26928. "pattern": "^msg_"
  26929. },
  26930. "callID": {
  26931. "type": "string"
  26932. },
  26933. "text": {
  26934. "type": "string"
  26935. }
  26936. },
  26937. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26938. "additionalProperties": false
  26939. }
  26940. },
  26941. "required": ["id", "type", "properties"],
  26942. "additionalProperties": false
  26943. },
  26944. "EventSessionNextToolCalled": {
  26945. "type": "object",
  26946. "properties": {
  26947. "id": {
  26948. "type": "string",
  26949. "pattern": "^evt_"
  26950. },
  26951. "type": {
  26952. "type": "string",
  26953. "enum": ["session.next.tool.called"]
  26954. },
  26955. "properties": {
  26956. "type": "object",
  26957. "properties": {
  26958. "timestamp": {
  26959. "type": "number"
  26960. },
  26961. "sessionID": {
  26962. "type": "string",
  26963. "pattern": "^ses"
  26964. },
  26965. "assistantMessageID": {
  26966. "type": "string",
  26967. "pattern": "^msg_"
  26968. },
  26969. "callID": {
  26970. "type": "string"
  26971. },
  26972. "tool": {
  26973. "type": "string"
  26974. },
  26975. "input": {
  26976. "type": "object"
  26977. },
  26978. "provider": {
  26979. "type": "object",
  26980. "properties": {
  26981. "executed": {
  26982. "type": "boolean"
  26983. },
  26984. "metadata": {
  26985. "type": "object",
  26986. "additionalProperties": {
  26987. "type": "object"
  26988. }
  26989. }
  26990. },
  26991. "required": ["executed"],
  26992. "additionalProperties": false
  26993. }
  26994. },
  26995. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26996. "additionalProperties": false
  26997. }
  26998. },
  26999. "required": ["id", "type", "properties"],
  27000. "additionalProperties": false
  27001. },
  27002. "EventSessionNextToolProgress": {
  27003. "type": "object",
  27004. "properties": {
  27005. "id": {
  27006. "type": "string",
  27007. "pattern": "^evt_"
  27008. },
  27009. "type": {
  27010. "type": "string",
  27011. "enum": ["session.next.tool.progress"]
  27012. },
  27013. "properties": {
  27014. "type": "object",
  27015. "properties": {
  27016. "timestamp": {
  27017. "type": "number"
  27018. },
  27019. "sessionID": {
  27020. "type": "string",
  27021. "pattern": "^ses"
  27022. },
  27023. "assistantMessageID": {
  27024. "type": "string",
  27025. "pattern": "^msg_"
  27026. },
  27027. "callID": {
  27028. "type": "string"
  27029. },
  27030. "structured": {
  27031. "type": "object"
  27032. },
  27033. "content": {
  27034. "type": "array",
  27035. "items": {
  27036. "anyOf": [
  27037. {
  27038. "$ref": "#/components/schemas/ToolTextContent"
  27039. },
  27040. {
  27041. "$ref": "#/components/schemas/ToolFileContent"
  27042. }
  27043. ]
  27044. }
  27045. }
  27046. },
  27047. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  27048. "additionalProperties": false
  27049. }
  27050. },
  27051. "required": ["id", "type", "properties"],
  27052. "additionalProperties": false
  27053. },
  27054. "EventSessionNextToolSuccess": {
  27055. "type": "object",
  27056. "properties": {
  27057. "id": {
  27058. "type": "string",
  27059. "pattern": "^evt_"
  27060. },
  27061. "type": {
  27062. "type": "string",
  27063. "enum": ["session.next.tool.success"]
  27064. },
  27065. "properties": {
  27066. "type": "object",
  27067. "properties": {
  27068. "timestamp": {
  27069. "type": "number"
  27070. },
  27071. "sessionID": {
  27072. "type": "string",
  27073. "pattern": "^ses"
  27074. },
  27075. "assistantMessageID": {
  27076. "type": "string",
  27077. "pattern": "^msg_"
  27078. },
  27079. "callID": {
  27080. "type": "string"
  27081. },
  27082. "structured": {
  27083. "type": "object"
  27084. },
  27085. "content": {
  27086. "type": "array",
  27087. "items": {
  27088. "anyOf": [
  27089. {
  27090. "$ref": "#/components/schemas/ToolTextContent"
  27091. },
  27092. {
  27093. "$ref": "#/components/schemas/ToolFileContent"
  27094. }
  27095. ]
  27096. }
  27097. },
  27098. "outputPaths": {
  27099. "type": "array",
  27100. "items": {
  27101. "type": "string"
  27102. }
  27103. },
  27104. "result": {},
  27105. "provider": {
  27106. "type": "object",
  27107. "properties": {
  27108. "executed": {
  27109. "type": "boolean"
  27110. },
  27111. "metadata": {
  27112. "type": "object",
  27113. "additionalProperties": {
  27114. "type": "object"
  27115. }
  27116. }
  27117. },
  27118. "required": ["executed"],
  27119. "additionalProperties": false
  27120. }
  27121. },
  27122. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  27123. "additionalProperties": false
  27124. }
  27125. },
  27126. "required": ["id", "type", "properties"],
  27127. "additionalProperties": false
  27128. },
  27129. "EventSessionNextToolFailed": {
  27130. "type": "object",
  27131. "properties": {
  27132. "id": {
  27133. "type": "string",
  27134. "pattern": "^evt_"
  27135. },
  27136. "type": {
  27137. "type": "string",
  27138. "enum": ["session.next.tool.failed"]
  27139. },
  27140. "properties": {
  27141. "type": "object",
  27142. "properties": {
  27143. "timestamp": {
  27144. "type": "number"
  27145. },
  27146. "sessionID": {
  27147. "type": "string",
  27148. "pattern": "^ses"
  27149. },
  27150. "assistantMessageID": {
  27151. "type": "string",
  27152. "pattern": "^msg_"
  27153. },
  27154. "callID": {
  27155. "type": "string"
  27156. },
  27157. "error": {
  27158. "$ref": "#/components/schemas/SessionErrorUnknown"
  27159. },
  27160. "result": {},
  27161. "provider": {
  27162. "type": "object",
  27163. "properties": {
  27164. "executed": {
  27165. "type": "boolean"
  27166. },
  27167. "metadata": {
  27168. "type": "object",
  27169. "additionalProperties": {
  27170. "type": "object"
  27171. }
  27172. }
  27173. },
  27174. "required": ["executed"],
  27175. "additionalProperties": false
  27176. }
  27177. },
  27178. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  27179. "additionalProperties": false
  27180. }
  27181. },
  27182. "required": ["id", "type", "properties"],
  27183. "additionalProperties": false
  27184. },
  27185. "EventSessionNextRetried": {
  27186. "type": "object",
  27187. "properties": {
  27188. "id": {
  27189. "type": "string",
  27190. "pattern": "^evt_"
  27191. },
  27192. "type": {
  27193. "type": "string",
  27194. "enum": ["session.next.retried"]
  27195. },
  27196. "properties": {
  27197. "type": "object",
  27198. "properties": {
  27199. "timestamp": {
  27200. "type": "number"
  27201. },
  27202. "sessionID": {
  27203. "type": "string",
  27204. "pattern": "^ses"
  27205. },
  27206. "attempt": {
  27207. "type": "number"
  27208. },
  27209. "error": {
  27210. "$ref": "#/components/schemas/SessionNextRetry_error"
  27211. }
  27212. },
  27213. "required": ["timestamp", "sessionID", "attempt", "error"],
  27214. "additionalProperties": false
  27215. }
  27216. },
  27217. "required": ["id", "type", "properties"],
  27218. "additionalProperties": false
  27219. },
  27220. "EventSessionNextCompactionStarted": {
  27221. "type": "object",
  27222. "properties": {
  27223. "id": {
  27224. "type": "string",
  27225. "pattern": "^evt_"
  27226. },
  27227. "type": {
  27228. "type": "string",
  27229. "enum": ["session.next.compaction.started"]
  27230. },
  27231. "properties": {
  27232. "type": "object",
  27233. "properties": {
  27234. "timestamp": {
  27235. "type": "number"
  27236. },
  27237. "sessionID": {
  27238. "type": "string",
  27239. "pattern": "^ses"
  27240. },
  27241. "messageID": {
  27242. "type": "string",
  27243. "pattern": "^msg_"
  27244. },
  27245. "reason": {
  27246. "type": "string",
  27247. "enum": ["auto", "manual"]
  27248. }
  27249. },
  27250. "required": ["timestamp", "sessionID", "messageID", "reason"],
  27251. "additionalProperties": false
  27252. }
  27253. },
  27254. "required": ["id", "type", "properties"],
  27255. "additionalProperties": false
  27256. },
  27257. "EventSessionNextCompactionDelta": {
  27258. "type": "object",
  27259. "properties": {
  27260. "id": {
  27261. "type": "string",
  27262. "pattern": "^evt_"
  27263. },
  27264. "type": {
  27265. "type": "string",
  27266. "enum": ["session.next.compaction.delta"]
  27267. },
  27268. "properties": {
  27269. "type": "object",
  27270. "properties": {
  27271. "timestamp": {
  27272. "type": "number"
  27273. },
  27274. "sessionID": {
  27275. "type": "string",
  27276. "pattern": "^ses"
  27277. },
  27278. "messageID": {
  27279. "type": "string",
  27280. "pattern": "^msg_"
  27281. },
  27282. "text": {
  27283. "type": "string"
  27284. }
  27285. },
  27286. "required": ["timestamp", "sessionID", "messageID", "text"],
  27287. "additionalProperties": false
  27288. }
  27289. },
  27290. "required": ["id", "type", "properties"],
  27291. "additionalProperties": false
  27292. },
  27293. "EventSessionNextCompactionEnded": {
  27294. "type": "object",
  27295. "properties": {
  27296. "id": {
  27297. "type": "string",
  27298. "pattern": "^evt_"
  27299. },
  27300. "type": {
  27301. "type": "string",
  27302. "enum": ["session.next.compaction.ended"]
  27303. },
  27304. "properties": {
  27305. "type": "object",
  27306. "properties": {
  27307. "timestamp": {
  27308. "type": "number"
  27309. },
  27310. "sessionID": {
  27311. "type": "string",
  27312. "pattern": "^ses"
  27313. },
  27314. "messageID": {
  27315. "type": "string",
  27316. "pattern": "^msg_"
  27317. },
  27318. "reason": {
  27319. "type": "string",
  27320. "enum": ["auto", "manual"]
  27321. },
  27322. "text": {
  27323. "type": "string"
  27324. },
  27325. "recent": {
  27326. "type": "string"
  27327. }
  27328. },
  27329. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  27330. "additionalProperties": false
  27331. }
  27332. },
  27333. "required": ["id", "type", "properties"],
  27334. "additionalProperties": false
  27335. },
  27336. "EventMessagePartDelta": {
  27337. "type": "object",
  27338. "properties": {
  27339. "id": {
  27340. "type": "string",
  27341. "pattern": "^evt_"
  27342. },
  27343. "type": {
  27344. "type": "string",
  27345. "enum": ["message.part.delta"]
  27346. },
  27347. "properties": {
  27348. "type": "object",
  27349. "properties": {
  27350. "sessionID": {
  27351. "type": "string",
  27352. "pattern": "^ses"
  27353. },
  27354. "messageID": {
  27355. "type": "string",
  27356. "pattern": "^msg"
  27357. },
  27358. "partID": {
  27359. "type": "string",
  27360. "pattern": "^prt"
  27361. },
  27362. "field": {
  27363. "type": "string"
  27364. },
  27365. "delta": {
  27366. "type": "string"
  27367. }
  27368. },
  27369. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  27370. "additionalProperties": false
  27371. }
  27372. },
  27373. "required": ["id", "type", "properties"],
  27374. "additionalProperties": false
  27375. },
  27376. "EventSessionDiff": {
  27377. "type": "object",
  27378. "properties": {
  27379. "id": {
  27380. "type": "string",
  27381. "pattern": "^evt_"
  27382. },
  27383. "type": {
  27384. "type": "string",
  27385. "enum": ["session.diff"]
  27386. },
  27387. "properties": {
  27388. "type": "object",
  27389. "properties": {
  27390. "sessionID": {
  27391. "type": "string",
  27392. "pattern": "^ses"
  27393. },
  27394. "diff": {
  27395. "type": "array",
  27396. "items": {
  27397. "$ref": "#/components/schemas/SnapshotFileDiff"
  27398. }
  27399. }
  27400. },
  27401. "required": ["sessionID", "diff"],
  27402. "additionalProperties": false
  27403. }
  27404. },
  27405. "required": ["id", "type", "properties"],
  27406. "additionalProperties": false
  27407. },
  27408. "EventSessionError": {
  27409. "type": "object",
  27410. "properties": {
  27411. "id": {
  27412. "type": "string",
  27413. "pattern": "^evt_"
  27414. },
  27415. "type": {
  27416. "type": "string",
  27417. "enum": ["session.error"]
  27418. },
  27419. "properties": {
  27420. "type": "object",
  27421. "properties": {
  27422. "sessionID": {
  27423. "type": "string",
  27424. "pattern": "^ses"
  27425. },
  27426. "error": {
  27427. "anyOf": [
  27428. {
  27429. "$ref": "#/components/schemas/ProviderAuthError"
  27430. },
  27431. {
  27432. "$ref": "#/components/schemas/UnknownError"
  27433. },
  27434. {
  27435. "$ref": "#/components/schemas/MessageOutputLengthError"
  27436. },
  27437. {
  27438. "$ref": "#/components/schemas/MessageAbortedError"
  27439. },
  27440. {
  27441. "$ref": "#/components/schemas/StructuredOutputError"
  27442. },
  27443. {
  27444. "$ref": "#/components/schemas/ContextOverflowError"
  27445. },
  27446. {
  27447. "$ref": "#/components/schemas/APIError"
  27448. }
  27449. ]
  27450. }
  27451. },
  27452. "additionalProperties": false
  27453. }
  27454. },
  27455. "required": ["id", "type", "properties"],
  27456. "additionalProperties": false
  27457. },
  27458. "EventInstallationUpdated": {
  27459. "type": "object",
  27460. "properties": {
  27461. "id": {
  27462. "type": "string",
  27463. "pattern": "^evt_"
  27464. },
  27465. "type": {
  27466. "type": "string",
  27467. "enum": ["installation.updated"]
  27468. },
  27469. "properties": {
  27470. "type": "object",
  27471. "properties": {
  27472. "version": {
  27473. "type": "string"
  27474. }
  27475. },
  27476. "required": ["version"],
  27477. "additionalProperties": false
  27478. }
  27479. },
  27480. "required": ["id", "type", "properties"],
  27481. "additionalProperties": false
  27482. },
  27483. "EventInstallationUpdate-available": {
  27484. "type": "object",
  27485. "properties": {
  27486. "id": {
  27487. "type": "string",
  27488. "pattern": "^evt_"
  27489. },
  27490. "type": {
  27491. "type": "string",
  27492. "enum": ["installation.update-available"]
  27493. },
  27494. "properties": {
  27495. "type": "object",
  27496. "properties": {
  27497. "version": {
  27498. "type": "string"
  27499. }
  27500. },
  27501. "required": ["version"],
  27502. "additionalProperties": false
  27503. }
  27504. },
  27505. "required": ["id", "type", "properties"],
  27506. "additionalProperties": false
  27507. },
  27508. "EventFileEdited": {
  27509. "type": "object",
  27510. "properties": {
  27511. "id": {
  27512. "type": "string",
  27513. "pattern": "^evt_"
  27514. },
  27515. "type": {
  27516. "type": "string",
  27517. "enum": ["file.edited"]
  27518. },
  27519. "properties": {
  27520. "type": "object",
  27521. "properties": {
  27522. "file": {
  27523. "type": "string"
  27524. }
  27525. },
  27526. "required": ["file"],
  27527. "additionalProperties": false
  27528. }
  27529. },
  27530. "required": ["id", "type", "properties"],
  27531. "additionalProperties": false
  27532. },
  27533. "EventAccountAdded": {
  27534. "type": "object",
  27535. "properties": {
  27536. "id": {
  27537. "type": "string",
  27538. "pattern": "^evt_"
  27539. },
  27540. "type": {
  27541. "type": "string",
  27542. "enum": ["account.added"]
  27543. },
  27544. "properties": {
  27545. "type": "object",
  27546. "properties": {
  27547. "account": {
  27548. "$ref": "#/components/schemas/AuthInfo"
  27549. }
  27550. },
  27551. "required": ["account"],
  27552. "additionalProperties": false
  27553. }
  27554. },
  27555. "required": ["id", "type", "properties"],
  27556. "additionalProperties": false
  27557. },
  27558. "EventAccountRemoved": {
  27559. "type": "object",
  27560. "properties": {
  27561. "id": {
  27562. "type": "string",
  27563. "pattern": "^evt_"
  27564. },
  27565. "type": {
  27566. "type": "string",
  27567. "enum": ["account.removed"]
  27568. },
  27569. "properties": {
  27570. "type": "object",
  27571. "properties": {
  27572. "account": {
  27573. "$ref": "#/components/schemas/AuthInfo"
  27574. }
  27575. },
  27576. "required": ["account"],
  27577. "additionalProperties": false
  27578. }
  27579. },
  27580. "required": ["id", "type", "properties"],
  27581. "additionalProperties": false
  27582. },
  27583. "EventAccountSwitched": {
  27584. "type": "object",
  27585. "properties": {
  27586. "id": {
  27587. "type": "string",
  27588. "pattern": "^evt_"
  27589. },
  27590. "type": {
  27591. "type": "string",
  27592. "enum": ["account.switched"]
  27593. },
  27594. "properties": {
  27595. "type": "object",
  27596. "properties": {
  27597. "serviceID": {
  27598. "type": "string"
  27599. },
  27600. "from": {
  27601. "type": "string"
  27602. },
  27603. "to": {
  27604. "type": "string"
  27605. }
  27606. },
  27607. "required": ["serviceID"],
  27608. "additionalProperties": false
  27609. }
  27610. },
  27611. "required": ["id", "type", "properties"],
  27612. "additionalProperties": false
  27613. },
  27614. "EventPermissionV2Asked": {
  27615. "type": "object",
  27616. "properties": {
  27617. "id": {
  27618. "type": "string",
  27619. "pattern": "^evt_"
  27620. },
  27621. "type": {
  27622. "type": "string",
  27623. "enum": ["permission.v2.asked"]
  27624. },
  27625. "properties": {
  27626. "type": "object",
  27627. "properties": {
  27628. "id": {
  27629. "type": "string",
  27630. "pattern": "^per"
  27631. },
  27632. "sessionID": {
  27633. "type": "string",
  27634. "pattern": "^ses"
  27635. },
  27636. "action": {
  27637. "type": "string"
  27638. },
  27639. "resources": {
  27640. "type": "array",
  27641. "items": {
  27642. "type": "string"
  27643. }
  27644. },
  27645. "save": {
  27646. "type": "array",
  27647. "items": {
  27648. "type": "string"
  27649. }
  27650. },
  27651. "metadata": {
  27652. "type": "object"
  27653. },
  27654. "source": {
  27655. "$ref": "#/components/schemas/PermissionV2Source"
  27656. }
  27657. },
  27658. "required": ["id", "sessionID", "action", "resources"],
  27659. "additionalProperties": false
  27660. }
  27661. },
  27662. "required": ["id", "type", "properties"],
  27663. "additionalProperties": false
  27664. },
  27665. "EventPermissionV2Replied": {
  27666. "type": "object",
  27667. "properties": {
  27668. "id": {
  27669. "type": "string",
  27670. "pattern": "^evt_"
  27671. },
  27672. "type": {
  27673. "type": "string",
  27674. "enum": ["permission.v2.replied"]
  27675. },
  27676. "properties": {
  27677. "type": "object",
  27678. "properties": {
  27679. "sessionID": {
  27680. "type": "string",
  27681. "pattern": "^ses"
  27682. },
  27683. "requestID": {
  27684. "type": "string",
  27685. "pattern": "^per"
  27686. },
  27687. "reply": {
  27688. "$ref": "#/components/schemas/PermissionV2Reply"
  27689. }
  27690. },
  27691. "required": ["sessionID", "requestID", "reply"],
  27692. "additionalProperties": false
  27693. }
  27694. },
  27695. "required": ["id", "type", "properties"],
  27696. "additionalProperties": false
  27697. },
  27698. "EventReferenceUpdated": {
  27699. "type": "object",
  27700. "properties": {
  27701. "id": {
  27702. "type": "string",
  27703. "pattern": "^evt_"
  27704. },
  27705. "type": {
  27706. "type": "string",
  27707. "enum": ["reference.updated"]
  27708. },
  27709. "properties": {
  27710. "type": "object",
  27711. "properties": {}
  27712. }
  27713. },
  27714. "required": ["id", "type", "properties"],
  27715. "additionalProperties": false
  27716. },
  27717. "EventFileWatcherUpdated": {
  27718. "type": "object",
  27719. "properties": {
  27720. "id": {
  27721. "type": "string",
  27722. "pattern": "^evt_"
  27723. },
  27724. "type": {
  27725. "type": "string",
  27726. "enum": ["file.watcher.updated"]
  27727. },
  27728. "properties": {
  27729. "type": "object",
  27730. "properties": {
  27731. "file": {
  27732. "type": "string"
  27733. },
  27734. "event": {
  27735. "type": "string",
  27736. "enum": ["add", "change", "unlink"]
  27737. }
  27738. },
  27739. "required": ["file", "event"],
  27740. "additionalProperties": false
  27741. }
  27742. },
  27743. "required": ["id", "type", "properties"],
  27744. "additionalProperties": false
  27745. },
  27746. "EventPtyCreated": {
  27747. "type": "object",
  27748. "properties": {
  27749. "id": {
  27750. "type": "string",
  27751. "pattern": "^evt_"
  27752. },
  27753. "type": {
  27754. "type": "string",
  27755. "enum": ["pty.created"]
  27756. },
  27757. "properties": {
  27758. "type": "object",
  27759. "properties": {
  27760. "info": {
  27761. "$ref": "#/components/schemas/Pty"
  27762. }
  27763. },
  27764. "required": ["info"],
  27765. "additionalProperties": false
  27766. }
  27767. },
  27768. "required": ["id", "type", "properties"],
  27769. "additionalProperties": false
  27770. },
  27771. "EventPtyUpdated": {
  27772. "type": "object",
  27773. "properties": {
  27774. "id": {
  27775. "type": "string",
  27776. "pattern": "^evt_"
  27777. },
  27778. "type": {
  27779. "type": "string",
  27780. "enum": ["pty.updated"]
  27781. },
  27782. "properties": {
  27783. "type": "object",
  27784. "properties": {
  27785. "info": {
  27786. "$ref": "#/components/schemas/Pty"
  27787. }
  27788. },
  27789. "required": ["info"],
  27790. "additionalProperties": false
  27791. }
  27792. },
  27793. "required": ["id", "type", "properties"],
  27794. "additionalProperties": false
  27795. },
  27796. "EventPtyExited": {
  27797. "type": "object",
  27798. "properties": {
  27799. "id": {
  27800. "type": "string",
  27801. "pattern": "^evt_"
  27802. },
  27803. "type": {
  27804. "type": "string",
  27805. "enum": ["pty.exited"]
  27806. },
  27807. "properties": {
  27808. "type": "object",
  27809. "properties": {
  27810. "id": {
  27811. "type": "string",
  27812. "pattern": "^pty"
  27813. },
  27814. "exitCode": {
  27815. "type": "integer",
  27816. "minimum": 0
  27817. }
  27818. },
  27819. "required": ["id", "exitCode"],
  27820. "additionalProperties": false
  27821. }
  27822. },
  27823. "required": ["id", "type", "properties"],
  27824. "additionalProperties": false
  27825. },
  27826. "EventPtyDeleted": {
  27827. "type": "object",
  27828. "properties": {
  27829. "id": {
  27830. "type": "string",
  27831. "pattern": "^evt_"
  27832. },
  27833. "type": {
  27834. "type": "string",
  27835. "enum": ["pty.deleted"]
  27836. },
  27837. "properties": {
  27838. "type": "object",
  27839. "properties": {
  27840. "id": {
  27841. "type": "string",
  27842. "pattern": "^pty"
  27843. }
  27844. },
  27845. "required": ["id"],
  27846. "additionalProperties": false
  27847. }
  27848. },
  27849. "required": ["id", "type", "properties"],
  27850. "additionalProperties": false
  27851. },
  27852. "EventQuestionV2Asked": {
  27853. "type": "object",
  27854. "properties": {
  27855. "id": {
  27856. "type": "string",
  27857. "pattern": "^evt_"
  27858. },
  27859. "type": {
  27860. "type": "string",
  27861. "enum": ["question.v2.asked"]
  27862. },
  27863. "properties": {
  27864. "type": "object",
  27865. "properties": {
  27866. "id": {
  27867. "type": "string",
  27868. "pattern": "^que"
  27869. },
  27870. "sessionID": {
  27871. "type": "string",
  27872. "pattern": "^ses"
  27873. },
  27874. "questions": {
  27875. "type": "array",
  27876. "items": {
  27877. "$ref": "#/components/schemas/QuestionV2Info"
  27878. },
  27879. "description": "Questions to ask"
  27880. },
  27881. "tool": {
  27882. "$ref": "#/components/schemas/QuestionV2Tool"
  27883. }
  27884. },
  27885. "required": ["id", "sessionID", "questions"],
  27886. "additionalProperties": false
  27887. }
  27888. },
  27889. "required": ["id", "type", "properties"],
  27890. "additionalProperties": false
  27891. },
  27892. "EventQuestionV2Replied": {
  27893. "type": "object",
  27894. "properties": {
  27895. "id": {
  27896. "type": "string",
  27897. "pattern": "^evt_"
  27898. },
  27899. "type": {
  27900. "type": "string",
  27901. "enum": ["question.v2.replied"]
  27902. },
  27903. "properties": {
  27904. "type": "object",
  27905. "properties": {
  27906. "sessionID": {
  27907. "type": "string",
  27908. "pattern": "^ses"
  27909. },
  27910. "requestID": {
  27911. "type": "string",
  27912. "pattern": "^que"
  27913. },
  27914. "answers": {
  27915. "type": "array",
  27916. "items": {
  27917. "$ref": "#/components/schemas/QuestionV2Answer"
  27918. }
  27919. }
  27920. },
  27921. "required": ["sessionID", "requestID", "answers"],
  27922. "additionalProperties": false
  27923. }
  27924. },
  27925. "required": ["id", "type", "properties"],
  27926. "additionalProperties": false
  27927. },
  27928. "EventQuestionV2Rejected": {
  27929. "type": "object",
  27930. "properties": {
  27931. "id": {
  27932. "type": "string",
  27933. "pattern": "^evt_"
  27934. },
  27935. "type": {
  27936. "type": "string",
  27937. "enum": ["question.v2.rejected"]
  27938. },
  27939. "properties": {
  27940. "type": "object",
  27941. "properties": {
  27942. "sessionID": {
  27943. "type": "string",
  27944. "pattern": "^ses"
  27945. },
  27946. "requestID": {
  27947. "type": "string",
  27948. "pattern": "^que"
  27949. }
  27950. },
  27951. "required": ["sessionID", "requestID"],
  27952. "additionalProperties": false
  27953. }
  27954. },
  27955. "required": ["id", "type", "properties"],
  27956. "additionalProperties": false
  27957. },
  27958. "EventTodoUpdated": {
  27959. "type": "object",
  27960. "properties": {
  27961. "id": {
  27962. "type": "string",
  27963. "pattern": "^evt_"
  27964. },
  27965. "type": {
  27966. "type": "string",
  27967. "enum": ["todo.updated"]
  27968. },
  27969. "properties": {
  27970. "type": "object",
  27971. "properties": {
  27972. "sessionID": {
  27973. "type": "string",
  27974. "pattern": "^ses"
  27975. },
  27976. "todos": {
  27977. "type": "array",
  27978. "items": {
  27979. "$ref": "#/components/schemas/Todo"
  27980. }
  27981. }
  27982. },
  27983. "required": ["sessionID", "todos"],
  27984. "additionalProperties": false
  27985. }
  27986. },
  27987. "required": ["id", "type", "properties"],
  27988. "additionalProperties": false
  27989. },
  27990. "EventLspUpdated": {
  27991. "type": "object",
  27992. "properties": {
  27993. "id": {
  27994. "type": "string",
  27995. "pattern": "^evt_"
  27996. },
  27997. "type": {
  27998. "type": "string",
  27999. "enum": ["lsp.updated"]
  28000. },
  28001. "properties": {
  28002. "type": "object",
  28003. "properties": {}
  28004. }
  28005. },
  28006. "required": ["id", "type", "properties"],
  28007. "additionalProperties": false
  28008. },
  28009. "EventPermissionAsked": {
  28010. "type": "object",
  28011. "properties": {
  28012. "id": {
  28013. "type": "string",
  28014. "pattern": "^evt_"
  28015. },
  28016. "type": {
  28017. "type": "string",
  28018. "enum": ["permission.asked"]
  28019. },
  28020. "properties": {
  28021. "type": "object",
  28022. "properties": {
  28023. "id": {
  28024. "type": "string",
  28025. "pattern": "^per"
  28026. },
  28027. "sessionID": {
  28028. "type": "string",
  28029. "pattern": "^ses"
  28030. },
  28031. "permission": {
  28032. "type": "string"
  28033. },
  28034. "patterns": {
  28035. "type": "array",
  28036. "items": {
  28037. "type": "string"
  28038. }
  28039. },
  28040. "metadata": {
  28041. "type": "object"
  28042. },
  28043. "always": {
  28044. "type": "array",
  28045. "items": {
  28046. "type": "string"
  28047. }
  28048. },
  28049. "tool": {
  28050. "type": "object",
  28051. "properties": {
  28052. "messageID": {
  28053. "type": "string"
  28054. },
  28055. "callID": {
  28056. "type": "string"
  28057. }
  28058. },
  28059. "required": ["messageID", "callID"],
  28060. "additionalProperties": false
  28061. }
  28062. },
  28063. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  28064. "additionalProperties": false
  28065. }
  28066. },
  28067. "required": ["id", "type", "properties"],
  28068. "additionalProperties": false
  28069. },
  28070. "EventPermissionReplied": {
  28071. "type": "object",
  28072. "properties": {
  28073. "id": {
  28074. "type": "string",
  28075. "pattern": "^evt_"
  28076. },
  28077. "type": {
  28078. "type": "string",
  28079. "enum": ["permission.replied"]
  28080. },
  28081. "properties": {
  28082. "type": "object",
  28083. "properties": {
  28084. "sessionID": {
  28085. "type": "string",
  28086. "pattern": "^ses"
  28087. },
  28088. "requestID": {
  28089. "type": "string",
  28090. "pattern": "^per"
  28091. },
  28092. "reply": {
  28093. "type": "string",
  28094. "enum": ["once", "always", "reject"]
  28095. }
  28096. },
  28097. "required": ["sessionID", "requestID", "reply"],
  28098. "additionalProperties": false
  28099. }
  28100. },
  28101. "required": ["id", "type", "properties"],
  28102. "additionalProperties": false
  28103. },
  28104. "EventMcpToolsChanged": {
  28105. "type": "object",
  28106. "properties": {
  28107. "id": {
  28108. "type": "string",
  28109. "pattern": "^evt_"
  28110. },
  28111. "type": {
  28112. "type": "string",
  28113. "enum": ["mcp.tools.changed"]
  28114. },
  28115. "properties": {
  28116. "type": "object",
  28117. "properties": {
  28118. "server": {
  28119. "type": "string"
  28120. }
  28121. },
  28122. "required": ["server"],
  28123. "additionalProperties": false
  28124. }
  28125. },
  28126. "required": ["id", "type", "properties"],
  28127. "additionalProperties": false
  28128. },
  28129. "EventMcpBrowserOpenFailed": {
  28130. "type": "object",
  28131. "properties": {
  28132. "id": {
  28133. "type": "string",
  28134. "pattern": "^evt_"
  28135. },
  28136. "type": {
  28137. "type": "string",
  28138. "enum": ["mcp.browser.open.failed"]
  28139. },
  28140. "properties": {
  28141. "type": "object",
  28142. "properties": {
  28143. "mcpName": {
  28144. "type": "string"
  28145. },
  28146. "url": {
  28147. "type": "string"
  28148. }
  28149. },
  28150. "required": ["mcpName", "url"],
  28151. "additionalProperties": false
  28152. }
  28153. },
  28154. "required": ["id", "type", "properties"],
  28155. "additionalProperties": false
  28156. },
  28157. "EventCommandExecuted": {
  28158. "type": "object",
  28159. "properties": {
  28160. "id": {
  28161. "type": "string",
  28162. "pattern": "^evt_"
  28163. },
  28164. "type": {
  28165. "type": "string",
  28166. "enum": ["command.executed"]
  28167. },
  28168. "properties": {
  28169. "type": "object",
  28170. "properties": {
  28171. "name": {
  28172. "type": "string"
  28173. },
  28174. "sessionID": {
  28175. "type": "string",
  28176. "pattern": "^ses"
  28177. },
  28178. "arguments": {
  28179. "type": "string"
  28180. },
  28181. "messageID": {
  28182. "type": "string",
  28183. "pattern": "^msg"
  28184. }
  28185. },
  28186. "required": ["name", "sessionID", "arguments", "messageID"],
  28187. "additionalProperties": false
  28188. }
  28189. },
  28190. "required": ["id", "type", "properties"],
  28191. "additionalProperties": false
  28192. },
  28193. "EventProjectDirectoriesUpdated": {
  28194. "type": "object",
  28195. "properties": {
  28196. "id": {
  28197. "type": "string",
  28198. "pattern": "^evt_"
  28199. },
  28200. "type": {
  28201. "type": "string",
  28202. "enum": ["project.directories.updated"]
  28203. },
  28204. "properties": {
  28205. "type": "object",
  28206. "properties": {
  28207. "projectID": {
  28208. "type": "string"
  28209. }
  28210. },
  28211. "required": ["projectID"],
  28212. "additionalProperties": false
  28213. }
  28214. },
  28215. "required": ["id", "type", "properties"],
  28216. "additionalProperties": false
  28217. },
  28218. "EventProjectUpdated": {
  28219. "type": "object",
  28220. "properties": {
  28221. "id": {
  28222. "type": "string",
  28223. "pattern": "^evt_"
  28224. },
  28225. "type": {
  28226. "type": "string",
  28227. "enum": ["project.updated"]
  28228. },
  28229. "properties": {
  28230. "type": "object",
  28231. "properties": {
  28232. "id": {
  28233. "type": "string"
  28234. },
  28235. "worktree": {
  28236. "type": "string"
  28237. },
  28238. "vcs": {
  28239. "type": "string",
  28240. "enum": ["git"]
  28241. },
  28242. "name": {
  28243. "type": "string"
  28244. },
  28245. "icon": {
  28246. "type": "object",
  28247. "properties": {
  28248. "url": {
  28249. "type": "string"
  28250. },
  28251. "override": {
  28252. "type": "string"
  28253. },
  28254. "color": {
  28255. "type": "string"
  28256. }
  28257. },
  28258. "additionalProperties": false
  28259. },
  28260. "commands": {
  28261. "type": "object",
  28262. "properties": {
  28263. "start": {
  28264. "type": "string",
  28265. "description": "Startup script to run when creating a new workspace (worktree)"
  28266. }
  28267. },
  28268. "additionalProperties": false
  28269. },
  28270. "time": {
  28271. "type": "object",
  28272. "properties": {
  28273. "created": {
  28274. "type": "integer",
  28275. "minimum": 0
  28276. },
  28277. "updated": {
  28278. "type": "integer",
  28279. "minimum": 0
  28280. },
  28281. "initialized": {
  28282. "type": "integer",
  28283. "minimum": 0
  28284. }
  28285. },
  28286. "required": ["created", "updated"],
  28287. "additionalProperties": false
  28288. },
  28289. "sandboxes": {
  28290. "type": "array",
  28291. "items": {
  28292. "type": "string"
  28293. }
  28294. }
  28295. },
  28296. "required": ["id", "worktree", "time", "sandboxes"],
  28297. "additionalProperties": false
  28298. }
  28299. },
  28300. "required": ["id", "type", "properties"],
  28301. "additionalProperties": false
  28302. },
  28303. "EventQuestionAsked": {
  28304. "type": "object",
  28305. "properties": {
  28306. "id": {
  28307. "type": "string",
  28308. "pattern": "^evt_"
  28309. },
  28310. "type": {
  28311. "type": "string",
  28312. "enum": ["question.asked"]
  28313. },
  28314. "properties": {
  28315. "type": "object",
  28316. "properties": {
  28317. "id": {
  28318. "type": "string",
  28319. "pattern": "^que"
  28320. },
  28321. "sessionID": {
  28322. "type": "string",
  28323. "pattern": "^ses"
  28324. },
  28325. "questions": {
  28326. "type": "array",
  28327. "items": {
  28328. "$ref": "#/components/schemas/QuestionInfo"
  28329. },
  28330. "description": "Questions to ask"
  28331. },
  28332. "tool": {
  28333. "$ref": "#/components/schemas/QuestionTool"
  28334. }
  28335. },
  28336. "required": ["id", "sessionID", "questions"],
  28337. "additionalProperties": false
  28338. }
  28339. },
  28340. "required": ["id", "type", "properties"],
  28341. "additionalProperties": false
  28342. },
  28343. "EventQuestionReplied": {
  28344. "type": "object",
  28345. "properties": {
  28346. "id": {
  28347. "type": "string",
  28348. "pattern": "^evt_"
  28349. },
  28350. "type": {
  28351. "type": "string",
  28352. "enum": ["question.replied"]
  28353. },
  28354. "properties": {
  28355. "type": "object",
  28356. "properties": {
  28357. "sessionID": {
  28358. "type": "string",
  28359. "pattern": "^ses"
  28360. },
  28361. "requestID": {
  28362. "type": "string",
  28363. "pattern": "^que"
  28364. },
  28365. "answers": {
  28366. "type": "array",
  28367. "items": {
  28368. "$ref": "#/components/schemas/QuestionAnswer"
  28369. }
  28370. }
  28371. },
  28372. "required": ["sessionID", "requestID", "answers"],
  28373. "additionalProperties": false
  28374. }
  28375. },
  28376. "required": ["id", "type", "properties"],
  28377. "additionalProperties": false
  28378. },
  28379. "EventQuestionRejected": {
  28380. "type": "object",
  28381. "properties": {
  28382. "id": {
  28383. "type": "string",
  28384. "pattern": "^evt_"
  28385. },
  28386. "type": {
  28387. "type": "string",
  28388. "enum": ["question.rejected"]
  28389. },
  28390. "properties": {
  28391. "type": "object",
  28392. "properties": {
  28393. "sessionID": {
  28394. "type": "string",
  28395. "pattern": "^ses"
  28396. },
  28397. "requestID": {
  28398. "type": "string",
  28399. "pattern": "^que"
  28400. }
  28401. },
  28402. "required": ["sessionID", "requestID"],
  28403. "additionalProperties": false
  28404. }
  28405. },
  28406. "required": ["id", "type", "properties"],
  28407. "additionalProperties": false
  28408. },
  28409. "EventSessionStatus": {
  28410. "type": "object",
  28411. "properties": {
  28412. "id": {
  28413. "type": "string",
  28414. "pattern": "^evt_"
  28415. },
  28416. "type": {
  28417. "type": "string",
  28418. "enum": ["session.status"]
  28419. },
  28420. "properties": {
  28421. "type": "object",
  28422. "properties": {
  28423. "sessionID": {
  28424. "type": "string",
  28425. "pattern": "^ses"
  28426. },
  28427. "status": {
  28428. "$ref": "#/components/schemas/SessionStatus"
  28429. }
  28430. },
  28431. "required": ["sessionID", "status"],
  28432. "additionalProperties": false
  28433. }
  28434. },
  28435. "required": ["id", "type", "properties"],
  28436. "additionalProperties": false
  28437. },
  28438. "EventSessionIdle": {
  28439. "type": "object",
  28440. "properties": {
  28441. "id": {
  28442. "type": "string",
  28443. "pattern": "^evt_"
  28444. },
  28445. "type": {
  28446. "type": "string",
  28447. "enum": ["session.idle"]
  28448. },
  28449. "properties": {
  28450. "type": "object",
  28451. "properties": {
  28452. "sessionID": {
  28453. "type": "string",
  28454. "pattern": "^ses"
  28455. }
  28456. },
  28457. "required": ["sessionID"],
  28458. "additionalProperties": false
  28459. }
  28460. },
  28461. "required": ["id", "type", "properties"],
  28462. "additionalProperties": false
  28463. },
  28464. "EventSessionCompacted": {
  28465. "type": "object",
  28466. "properties": {
  28467. "id": {
  28468. "type": "string",
  28469. "pattern": "^evt_"
  28470. },
  28471. "type": {
  28472. "type": "string",
  28473. "enum": ["session.compacted"]
  28474. },
  28475. "properties": {
  28476. "type": "object",
  28477. "properties": {
  28478. "sessionID": {
  28479. "type": "string",
  28480. "pattern": "^ses"
  28481. }
  28482. },
  28483. "required": ["sessionID"],
  28484. "additionalProperties": false
  28485. }
  28486. },
  28487. "required": ["id", "type", "properties"],
  28488. "additionalProperties": false
  28489. },
  28490. "EventVcsBranchUpdated": {
  28491. "type": "object",
  28492. "properties": {
  28493. "id": {
  28494. "type": "string",
  28495. "pattern": "^evt_"
  28496. },
  28497. "type": {
  28498. "type": "string",
  28499. "enum": ["vcs.branch.updated"]
  28500. },
  28501. "properties": {
  28502. "type": "object",
  28503. "properties": {
  28504. "branch": {
  28505. "type": "string"
  28506. }
  28507. },
  28508. "additionalProperties": false
  28509. }
  28510. },
  28511. "required": ["id", "type", "properties"],
  28512. "additionalProperties": false
  28513. },
  28514. "EventWorktreeReady": {
  28515. "type": "object",
  28516. "properties": {
  28517. "id": {
  28518. "type": "string",
  28519. "pattern": "^evt_"
  28520. },
  28521. "type": {
  28522. "type": "string",
  28523. "enum": ["worktree.ready"]
  28524. },
  28525. "properties": {
  28526. "type": "object",
  28527. "properties": {
  28528. "name": {
  28529. "type": "string"
  28530. },
  28531. "branch": {
  28532. "type": "string"
  28533. }
  28534. },
  28535. "required": ["name"],
  28536. "additionalProperties": false
  28537. }
  28538. },
  28539. "required": ["id", "type", "properties"],
  28540. "additionalProperties": false
  28541. },
  28542. "EventWorktreeFailed": {
  28543. "type": "object",
  28544. "properties": {
  28545. "id": {
  28546. "type": "string",
  28547. "pattern": "^evt_"
  28548. },
  28549. "type": {
  28550. "type": "string",
  28551. "enum": ["worktree.failed"]
  28552. },
  28553. "properties": {
  28554. "type": "object",
  28555. "properties": {
  28556. "message": {
  28557. "type": "string"
  28558. }
  28559. },
  28560. "required": ["message"],
  28561. "additionalProperties": false
  28562. }
  28563. },
  28564. "required": ["id", "type", "properties"],
  28565. "additionalProperties": false
  28566. },
  28567. "EventWorkspaceReady": {
  28568. "type": "object",
  28569. "properties": {
  28570. "id": {
  28571. "type": "string",
  28572. "pattern": "^evt_"
  28573. },
  28574. "type": {
  28575. "type": "string",
  28576. "enum": ["workspace.ready"]
  28577. },
  28578. "properties": {
  28579. "type": "object",
  28580. "properties": {
  28581. "name": {
  28582. "type": "string"
  28583. }
  28584. },
  28585. "required": ["name"],
  28586. "additionalProperties": false
  28587. }
  28588. },
  28589. "required": ["id", "type", "properties"],
  28590. "additionalProperties": false
  28591. },
  28592. "EventWorkspaceFailed": {
  28593. "type": "object",
  28594. "properties": {
  28595. "id": {
  28596. "type": "string",
  28597. "pattern": "^evt_"
  28598. },
  28599. "type": {
  28600. "type": "string",
  28601. "enum": ["workspace.failed"]
  28602. },
  28603. "properties": {
  28604. "type": "object",
  28605. "properties": {
  28606. "message": {
  28607. "type": "string"
  28608. }
  28609. },
  28610. "required": ["message"],
  28611. "additionalProperties": false
  28612. }
  28613. },
  28614. "required": ["id", "type", "properties"],
  28615. "additionalProperties": false
  28616. },
  28617. "EventWorkspaceStatus": {
  28618. "type": "object",
  28619. "properties": {
  28620. "id": {
  28621. "type": "string",
  28622. "pattern": "^evt_"
  28623. },
  28624. "type": {
  28625. "type": "string",
  28626. "enum": ["workspace.status"]
  28627. },
  28628. "properties": {
  28629. "type": "object",
  28630. "properties": {
  28631. "workspaceID": {
  28632. "type": "string",
  28633. "pattern": "^wrk"
  28634. },
  28635. "status": {
  28636. "type": "string",
  28637. "enum": ["connected", "connecting", "disconnected", "error"]
  28638. }
  28639. },
  28640. "required": ["workspaceID", "status"],
  28641. "additionalProperties": false
  28642. }
  28643. },
  28644. "required": ["id", "type", "properties"],
  28645. "additionalProperties": false
  28646. },
  28647. "EventServerConnected": {
  28648. "type": "object",
  28649. "properties": {
  28650. "id": {
  28651. "type": "string",
  28652. "pattern": "^evt_"
  28653. },
  28654. "type": {
  28655. "type": "string",
  28656. "enum": ["server.connected"]
  28657. },
  28658. "properties": {
  28659. "type": "object",
  28660. "properties": {}
  28661. }
  28662. },
  28663. "required": ["id", "type", "properties"],
  28664. "additionalProperties": false
  28665. },
  28666. "EventGlobalDisposed": {
  28667. "type": "object",
  28668. "properties": {
  28669. "id": {
  28670. "type": "string",
  28671. "pattern": "^evt_"
  28672. },
  28673. "type": {
  28674. "type": "string",
  28675. "enum": ["global.disposed"]
  28676. },
  28677. "properties": {
  28678. "type": "object",
  28679. "properties": {}
  28680. }
  28681. },
  28682. "required": ["id", "type", "properties"],
  28683. "additionalProperties": false
  28684. },
  28685. "BadRequestError": {
  28686. "type": "object",
  28687. "required": ["name", "data"],
  28688. "properties": {
  28689. "name": {
  28690. "type": "string",
  28691. "enum": ["BadRequest"]
  28692. },
  28693. "data": {
  28694. "type": "object",
  28695. "required": ["message"],
  28696. "properties": {
  28697. "message": {
  28698. "type": "string"
  28699. },
  28700. "kind": {
  28701. "type": "string",
  28702. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  28703. }
  28704. }
  28705. }
  28706. }
  28707. }
  28708. }
  28709. },
  28710. "security": [],
  28711. "tags": [
  28712. {
  28713. "name": "control",
  28714. "description": "Control plane routes."
  28715. },
  28716. {
  28717. "name": "controlPlane",
  28718. "description": "Control-plane orchestration routes."
  28719. },
  28720. {
  28721. "name": "global",
  28722. "description": "Global server routes."
  28723. },
  28724. {
  28725. "name": "event",
  28726. "description": "Instance event stream route."
  28727. },
  28728. {
  28729. "name": "config",
  28730. "description": "Experimental HttpApi config routes."
  28731. },
  28732. {
  28733. "name": "experimental",
  28734. "description": "Experimental HttpApi read-only routes."
  28735. },
  28736. {
  28737. "name": "file",
  28738. "description": "Experimental HttpApi file routes."
  28739. },
  28740. {
  28741. "name": "instance",
  28742. "description": "Experimental HttpApi instance read routes."
  28743. },
  28744. {
  28745. "name": "mcp",
  28746. "description": "Experimental HttpApi MCP routes."
  28747. },
  28748. {
  28749. "name": "project",
  28750. "description": "Experimental HttpApi project routes."
  28751. },
  28752. {
  28753. "name": "projectCopy",
  28754. "description": "Project copy management routes."
  28755. },
  28756. {
  28757. "name": "pty",
  28758. "description": "Experimental HttpApi PTY routes."
  28759. },
  28760. {
  28761. "name": "question",
  28762. "description": "Question routes."
  28763. },
  28764. {
  28765. "name": "permission",
  28766. "description": "Experimental HttpApi permission routes."
  28767. },
  28768. {
  28769. "name": "provider",
  28770. "description": "Experimental HttpApi provider routes."
  28771. },
  28772. {
  28773. "name": "session",
  28774. "description": "Experimental HttpApi session routes."
  28775. },
  28776. {
  28777. "name": "sync",
  28778. "description": "Experimental HttpApi sync routes."
  28779. },
  28780. {
  28781. "name": "tui",
  28782. "description": "Experimental HttpApi TUI routes."
  28783. },
  28784. {
  28785. "name": "workspace",
  28786. "description": "Experimental HttpApi workspace routes."
  28787. },
  28788. {
  28789. "name": "opencode HttpApi",
  28790. "description": "Experimental HttpApi surface for selected instance routes."
  28791. },
  28792. {
  28793. "name": "opencode HttpApi",
  28794. "description": "Experimental HttpApi surface for selected instance routes."
  28795. },
  28796. {
  28797. "name": "sessions",
  28798. "description": "Experimental session routes."
  28799. },
  28800. {
  28801. "name": "messages",
  28802. "description": "Experimental message routes."
  28803. },
  28804. {
  28805. "name": "models",
  28806. "description": "Experimental model routes."
  28807. },
  28808. {
  28809. "name": "providers",
  28810. "description": "Experimental provider routes."
  28811. },
  28812. {
  28813. "name": "permissions",
  28814. "description": "Experimental permission routes."
  28815. },
  28816. {
  28817. "name": "filesystem",
  28818. "description": "Experimental location-scoped filesystem routes."
  28819. },
  28820. {
  28821. "name": "commands",
  28822. "description": "Experimental command routes."
  28823. },
  28824. {
  28825. "name": "skills",
  28826. "description": "Experimental skill routes."
  28827. },
  28828. {
  28829. "name": "events",
  28830. "description": "Experimental event stream route."
  28831. },
  28832. {
  28833. "name": "session questions",
  28834. "description": "Experimental session question routes."
  28835. },
  28836. {
  28837. "name": "reference",
  28838. "description": "Location-scoped project references."
  28839. },
  28840. {
  28841. "name": "pty",
  28842. "description": "PTY websocket route."
  28843. }
  28844. ]
  28845. }