openapi.json 819 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843
  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. "/reference": {
  5404. "get": {
  5405. "tags": ["reference"],
  5406. "operationId": "reference.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. "responses": {
  5426. "200": {
  5427. "description": "Resolved configured references",
  5428. "content": {
  5429. "application/json": {
  5430. "schema": {
  5431. "type": "array",
  5432. "items": {
  5433. "$ref": "#/components/schemas/ReferenceDescriptor"
  5434. },
  5435. "description": "Resolved configured references"
  5436. }
  5437. }
  5438. }
  5439. },
  5440. "400": {
  5441. "description": "Bad request",
  5442. "content": {
  5443. "application/json": {
  5444. "schema": {
  5445. "$ref": "#/components/schemas/BadRequestError"
  5446. }
  5447. }
  5448. }
  5449. }
  5450. },
  5451. "description": "List configured references resolved in the current workspace.",
  5452. "summary": "List configured references",
  5453. "x-codeSamples": [
  5454. {
  5455. "lang": "js",
  5456. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.reference.list({\n ...\n})"
  5457. }
  5458. ]
  5459. }
  5460. },
  5461. "/session": {
  5462. "get": {
  5463. "tags": ["session"],
  5464. "operationId": "session.list",
  5465. "parameters": [
  5466. {
  5467. "name": "directory",
  5468. "in": "query",
  5469. "schema": {
  5470. "type": "string"
  5471. },
  5472. "required": false
  5473. },
  5474. {
  5475. "name": "workspace",
  5476. "in": "query",
  5477. "schema": {
  5478. "type": "string"
  5479. },
  5480. "required": false
  5481. },
  5482. {
  5483. "name": "scope",
  5484. "in": "query",
  5485. "schema": {
  5486. "type": "string",
  5487. "enum": ["project"]
  5488. },
  5489. "required": false
  5490. },
  5491. {
  5492. "name": "path",
  5493. "in": "query",
  5494. "schema": {
  5495. "type": "string"
  5496. },
  5497. "required": false
  5498. },
  5499. {
  5500. "name": "roots",
  5501. "in": "query",
  5502. "schema": {
  5503. "anyOf": [
  5504. {
  5505. "type": "boolean"
  5506. },
  5507. {
  5508. "type": "string",
  5509. "enum": ["true", "false"]
  5510. }
  5511. ]
  5512. },
  5513. "required": false
  5514. },
  5515. {
  5516. "name": "start",
  5517. "in": "query",
  5518. "schema": {
  5519. "type": "number"
  5520. },
  5521. "required": false
  5522. },
  5523. {
  5524. "name": "search",
  5525. "in": "query",
  5526. "schema": {
  5527. "type": "string"
  5528. },
  5529. "required": false
  5530. },
  5531. {
  5532. "name": "limit",
  5533. "in": "query",
  5534. "schema": {
  5535. "type": "number"
  5536. },
  5537. "required": false
  5538. }
  5539. ],
  5540. "responses": {
  5541. "200": {
  5542. "description": "List of sessions",
  5543. "content": {
  5544. "application/json": {
  5545. "schema": {
  5546. "type": "array",
  5547. "items": {
  5548. "$ref": "#/components/schemas/Session"
  5549. },
  5550. "description": "List of sessions"
  5551. }
  5552. }
  5553. }
  5554. },
  5555. "400": {
  5556. "description": "Bad request",
  5557. "content": {
  5558. "application/json": {
  5559. "schema": {
  5560. "$ref": "#/components/schemas/BadRequestError"
  5561. }
  5562. }
  5563. }
  5564. }
  5565. },
  5566. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5567. "summary": "List sessions",
  5568. "x-codeSamples": [
  5569. {
  5570. "lang": "js",
  5571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5572. }
  5573. ]
  5574. },
  5575. "post": {
  5576. "tags": ["session"],
  5577. "operationId": "session.create",
  5578. "parameters": [
  5579. {
  5580. "name": "directory",
  5581. "in": "query",
  5582. "schema": {
  5583. "type": "string"
  5584. },
  5585. "required": false
  5586. },
  5587. {
  5588. "name": "workspace",
  5589. "in": "query",
  5590. "schema": {
  5591. "type": "string"
  5592. },
  5593. "required": false
  5594. }
  5595. ],
  5596. "responses": {
  5597. "200": {
  5598. "description": "Successfully created session",
  5599. "content": {
  5600. "application/json": {
  5601. "schema": {
  5602. "$ref": "#/components/schemas/Session"
  5603. }
  5604. }
  5605. }
  5606. },
  5607. "400": {
  5608. "description": "BadRequest | InvalidRequestError",
  5609. "content": {
  5610. "application/json": {
  5611. "schema": {
  5612. "anyOf": [
  5613. {
  5614. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5615. },
  5616. {
  5617. "$ref": "#/components/schemas/InvalidRequestError"
  5618. }
  5619. ]
  5620. }
  5621. }
  5622. }
  5623. }
  5624. },
  5625. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5626. "summary": "Create session",
  5627. "requestBody": {
  5628. "content": {
  5629. "application/json": {
  5630. "schema": {
  5631. "type": "object",
  5632. "properties": {
  5633. "parentID": {
  5634. "type": "string",
  5635. "pattern": "^ses"
  5636. },
  5637. "title": {
  5638. "type": "string"
  5639. },
  5640. "agent": {
  5641. "type": "string"
  5642. },
  5643. "model": {
  5644. "type": "object",
  5645. "properties": {
  5646. "id": {
  5647. "type": "string"
  5648. },
  5649. "providerID": {
  5650. "type": "string"
  5651. },
  5652. "variant": {
  5653. "type": "string"
  5654. }
  5655. },
  5656. "required": ["id", "providerID"],
  5657. "additionalProperties": false
  5658. },
  5659. "metadata": {
  5660. "type": "object"
  5661. },
  5662. "permission": {
  5663. "$ref": "#/components/schemas/PermissionRuleset"
  5664. },
  5665. "workspaceID": {
  5666. "type": "string",
  5667. "pattern": "^wrk"
  5668. }
  5669. },
  5670. "additionalProperties": false
  5671. }
  5672. }
  5673. }
  5674. },
  5675. "x-codeSamples": [
  5676. {
  5677. "lang": "js",
  5678. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5679. }
  5680. ]
  5681. }
  5682. },
  5683. "/session/status": {
  5684. "get": {
  5685. "tags": ["session"],
  5686. "operationId": "session.status",
  5687. "parameters": [
  5688. {
  5689. "name": "directory",
  5690. "in": "query",
  5691. "schema": {
  5692. "type": "string"
  5693. },
  5694. "required": false
  5695. },
  5696. {
  5697. "name": "workspace",
  5698. "in": "query",
  5699. "schema": {
  5700. "type": "string"
  5701. },
  5702. "required": false
  5703. }
  5704. ],
  5705. "responses": {
  5706. "200": {
  5707. "description": "Get session status",
  5708. "content": {
  5709. "application/json": {
  5710. "schema": {
  5711. "type": "object",
  5712. "additionalProperties": {
  5713. "$ref": "#/components/schemas/SessionStatus"
  5714. },
  5715. "description": "Get session status"
  5716. }
  5717. }
  5718. }
  5719. },
  5720. "400": {
  5721. "description": "BadRequest | InvalidRequestError",
  5722. "content": {
  5723. "application/json": {
  5724. "schema": {
  5725. "anyOf": [
  5726. {
  5727. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5728. },
  5729. {
  5730. "$ref": "#/components/schemas/InvalidRequestError"
  5731. }
  5732. ]
  5733. }
  5734. }
  5735. }
  5736. }
  5737. },
  5738. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5739. "summary": "Get session status",
  5740. "x-codeSamples": [
  5741. {
  5742. "lang": "js",
  5743. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5744. }
  5745. ]
  5746. }
  5747. },
  5748. "/session/{sessionID}": {
  5749. "get": {
  5750. "tags": ["session"],
  5751. "operationId": "session.get",
  5752. "parameters": [
  5753. {
  5754. "name": "sessionID",
  5755. "in": "path",
  5756. "schema": {
  5757. "type": "string",
  5758. "pattern": "^ses"
  5759. },
  5760. "required": true
  5761. },
  5762. {
  5763. "name": "directory",
  5764. "in": "query",
  5765. "schema": {
  5766. "type": "string"
  5767. },
  5768. "required": false
  5769. },
  5770. {
  5771. "name": "workspace",
  5772. "in": "query",
  5773. "schema": {
  5774. "type": "string"
  5775. },
  5776. "required": false
  5777. }
  5778. ],
  5779. "responses": {
  5780. "200": {
  5781. "description": "Get session",
  5782. "content": {
  5783. "application/json": {
  5784. "schema": {
  5785. "$ref": "#/components/schemas/Session"
  5786. }
  5787. }
  5788. }
  5789. },
  5790. "400": {
  5791. "description": "BadRequest | InvalidRequestError",
  5792. "content": {
  5793. "application/json": {
  5794. "schema": {
  5795. "anyOf": [
  5796. {
  5797. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5798. },
  5799. {
  5800. "$ref": "#/components/schemas/InvalidRequestError"
  5801. }
  5802. ]
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "404": {
  5808. "description": "NotFoundError",
  5809. "content": {
  5810. "application/json": {
  5811. "schema": {
  5812. "$ref": "#/components/schemas/NotFoundError"
  5813. }
  5814. }
  5815. }
  5816. }
  5817. },
  5818. "description": "Retrieve detailed information about a specific OpenCode session.",
  5819. "summary": "Get session",
  5820. "x-codeSamples": [
  5821. {
  5822. "lang": "js",
  5823. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5824. }
  5825. ]
  5826. },
  5827. "delete": {
  5828. "tags": ["session"],
  5829. "operationId": "session.delete",
  5830. "parameters": [
  5831. {
  5832. "name": "sessionID",
  5833. "in": "path",
  5834. "schema": {
  5835. "type": "string",
  5836. "pattern": "^ses"
  5837. },
  5838. "required": true
  5839. },
  5840. {
  5841. "name": "directory",
  5842. "in": "query",
  5843. "schema": {
  5844. "type": "string"
  5845. },
  5846. "required": false
  5847. },
  5848. {
  5849. "name": "workspace",
  5850. "in": "query",
  5851. "schema": {
  5852. "type": "string"
  5853. },
  5854. "required": false
  5855. }
  5856. ],
  5857. "responses": {
  5858. "200": {
  5859. "description": "Successfully deleted session",
  5860. "content": {
  5861. "application/json": {
  5862. "schema": {
  5863. "type": "boolean",
  5864. "description": "Successfully deleted session"
  5865. }
  5866. }
  5867. }
  5868. },
  5869. "400": {
  5870. "description": "BadRequest | InvalidRequestError",
  5871. "content": {
  5872. "application/json": {
  5873. "schema": {
  5874. "anyOf": [
  5875. {
  5876. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5877. },
  5878. {
  5879. "$ref": "#/components/schemas/InvalidRequestError"
  5880. }
  5881. ]
  5882. }
  5883. }
  5884. }
  5885. },
  5886. "404": {
  5887. "description": "NotFoundError",
  5888. "content": {
  5889. "application/json": {
  5890. "schema": {
  5891. "$ref": "#/components/schemas/NotFoundError"
  5892. }
  5893. }
  5894. }
  5895. }
  5896. },
  5897. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5898. "summary": "Delete session",
  5899. "x-codeSamples": [
  5900. {
  5901. "lang": "js",
  5902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5903. }
  5904. ]
  5905. },
  5906. "patch": {
  5907. "tags": ["session"],
  5908. "operationId": "session.update",
  5909. "parameters": [
  5910. {
  5911. "name": "sessionID",
  5912. "in": "path",
  5913. "schema": {
  5914. "type": "string",
  5915. "pattern": "^ses"
  5916. },
  5917. "required": true
  5918. },
  5919. {
  5920. "name": "directory",
  5921. "in": "query",
  5922. "schema": {
  5923. "type": "string"
  5924. },
  5925. "required": false
  5926. },
  5927. {
  5928. "name": "workspace",
  5929. "in": "query",
  5930. "schema": {
  5931. "type": "string"
  5932. },
  5933. "required": false
  5934. }
  5935. ],
  5936. "responses": {
  5937. "200": {
  5938. "description": "Successfully updated session",
  5939. "content": {
  5940. "application/json": {
  5941. "schema": {
  5942. "$ref": "#/components/schemas/Session"
  5943. }
  5944. }
  5945. }
  5946. },
  5947. "400": {
  5948. "description": "BadRequest | InvalidRequestError",
  5949. "content": {
  5950. "application/json": {
  5951. "schema": {
  5952. "anyOf": [
  5953. {
  5954. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5955. },
  5956. {
  5957. "$ref": "#/components/schemas/InvalidRequestError"
  5958. }
  5959. ]
  5960. }
  5961. }
  5962. }
  5963. },
  5964. "404": {
  5965. "description": "NotFoundError",
  5966. "content": {
  5967. "application/json": {
  5968. "schema": {
  5969. "$ref": "#/components/schemas/NotFoundError"
  5970. }
  5971. }
  5972. }
  5973. }
  5974. },
  5975. "description": "Update properties of an existing session, such as title or other metadata.",
  5976. "summary": "Update session",
  5977. "requestBody": {
  5978. "content": {
  5979. "application/json": {
  5980. "schema": {
  5981. "type": "object",
  5982. "properties": {
  5983. "title": {
  5984. "type": "string"
  5985. },
  5986. "metadata": {
  5987. "type": "object"
  5988. },
  5989. "permission": {
  5990. "$ref": "#/components/schemas/PermissionRuleset"
  5991. },
  5992. "time": {
  5993. "type": "object",
  5994. "properties": {
  5995. "archived": {
  5996. "type": "number"
  5997. }
  5998. },
  5999. "additionalProperties": false
  6000. }
  6001. },
  6002. "additionalProperties": false
  6003. }
  6004. }
  6005. }
  6006. },
  6007. "x-codeSamples": [
  6008. {
  6009. "lang": "js",
  6010. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  6011. }
  6012. ]
  6013. }
  6014. },
  6015. "/session/{sessionID}/children": {
  6016. "get": {
  6017. "tags": ["session"],
  6018. "operationId": "session.children",
  6019. "parameters": [
  6020. {
  6021. "name": "sessionID",
  6022. "in": "path",
  6023. "schema": {
  6024. "type": "string",
  6025. "pattern": "^ses"
  6026. },
  6027. "required": true
  6028. },
  6029. {
  6030. "name": "directory",
  6031. "in": "query",
  6032. "schema": {
  6033. "type": "string"
  6034. },
  6035. "required": false
  6036. },
  6037. {
  6038. "name": "workspace",
  6039. "in": "query",
  6040. "schema": {
  6041. "type": "string"
  6042. },
  6043. "required": false
  6044. }
  6045. ],
  6046. "responses": {
  6047. "200": {
  6048. "description": "List of children",
  6049. "content": {
  6050. "application/json": {
  6051. "schema": {
  6052. "type": "array",
  6053. "items": {
  6054. "$ref": "#/components/schemas/Session"
  6055. },
  6056. "description": "List of children"
  6057. }
  6058. }
  6059. }
  6060. },
  6061. "400": {
  6062. "description": "BadRequest | InvalidRequestError",
  6063. "content": {
  6064. "application/json": {
  6065. "schema": {
  6066. "anyOf": [
  6067. {
  6068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6069. },
  6070. {
  6071. "$ref": "#/components/schemas/InvalidRequestError"
  6072. }
  6073. ]
  6074. }
  6075. }
  6076. }
  6077. },
  6078. "404": {
  6079. "description": "NotFoundError",
  6080. "content": {
  6081. "application/json": {
  6082. "schema": {
  6083. "$ref": "#/components/schemas/NotFoundError"
  6084. }
  6085. }
  6086. }
  6087. }
  6088. },
  6089. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  6090. "summary": "Get session children",
  6091. "x-codeSamples": [
  6092. {
  6093. "lang": "js",
  6094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  6095. }
  6096. ]
  6097. }
  6098. },
  6099. "/session/{sessionID}/todo": {
  6100. "get": {
  6101. "tags": ["session"],
  6102. "operationId": "session.todo",
  6103. "parameters": [
  6104. {
  6105. "name": "sessionID",
  6106. "in": "path",
  6107. "schema": {
  6108. "type": "string",
  6109. "pattern": "^ses"
  6110. },
  6111. "required": true
  6112. },
  6113. {
  6114. "name": "directory",
  6115. "in": "query",
  6116. "schema": {
  6117. "type": "string"
  6118. },
  6119. "required": false
  6120. },
  6121. {
  6122. "name": "workspace",
  6123. "in": "query",
  6124. "schema": {
  6125. "type": "string"
  6126. },
  6127. "required": false
  6128. }
  6129. ],
  6130. "responses": {
  6131. "200": {
  6132. "description": "Todo list",
  6133. "content": {
  6134. "application/json": {
  6135. "schema": {
  6136. "type": "array",
  6137. "items": {
  6138. "$ref": "#/components/schemas/Todo"
  6139. },
  6140. "description": "Todo list"
  6141. }
  6142. }
  6143. }
  6144. },
  6145. "400": {
  6146. "description": "BadRequest | InvalidRequestError",
  6147. "content": {
  6148. "application/json": {
  6149. "schema": {
  6150. "anyOf": [
  6151. {
  6152. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6153. },
  6154. {
  6155. "$ref": "#/components/schemas/InvalidRequestError"
  6156. }
  6157. ]
  6158. }
  6159. }
  6160. }
  6161. },
  6162. "404": {
  6163. "description": "NotFoundError",
  6164. "content": {
  6165. "application/json": {
  6166. "schema": {
  6167. "$ref": "#/components/schemas/NotFoundError"
  6168. }
  6169. }
  6170. }
  6171. }
  6172. },
  6173. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6174. "summary": "Get session todos",
  6175. "x-codeSamples": [
  6176. {
  6177. "lang": "js",
  6178. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6179. }
  6180. ]
  6181. }
  6182. },
  6183. "/session/{sessionID}/diff": {
  6184. "get": {
  6185. "tags": ["session"],
  6186. "operationId": "session.diff",
  6187. "parameters": [
  6188. {
  6189. "name": "sessionID",
  6190. "in": "path",
  6191. "schema": {
  6192. "type": "string",
  6193. "pattern": "^ses"
  6194. },
  6195. "required": true
  6196. },
  6197. {
  6198. "name": "directory",
  6199. "in": "query",
  6200. "schema": {
  6201. "type": "string"
  6202. },
  6203. "required": false
  6204. },
  6205. {
  6206. "name": "workspace",
  6207. "in": "query",
  6208. "schema": {
  6209. "type": "string"
  6210. },
  6211. "required": false
  6212. },
  6213. {
  6214. "name": "messageID",
  6215. "in": "query",
  6216. "schema": {
  6217. "type": "string",
  6218. "pattern": "^msg"
  6219. },
  6220. "required": false
  6221. }
  6222. ],
  6223. "responses": {
  6224. "200": {
  6225. "description": "Successfully retrieved diff",
  6226. "content": {
  6227. "application/json": {
  6228. "schema": {
  6229. "type": "array",
  6230. "items": {
  6231. "$ref": "#/components/schemas/SnapshotFileDiff"
  6232. },
  6233. "description": "Successfully retrieved diff"
  6234. }
  6235. }
  6236. }
  6237. },
  6238. "400": {
  6239. "description": "Bad request",
  6240. "content": {
  6241. "application/json": {
  6242. "schema": {
  6243. "$ref": "#/components/schemas/BadRequestError"
  6244. }
  6245. }
  6246. }
  6247. }
  6248. },
  6249. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6250. "summary": "Get message diff",
  6251. "x-codeSamples": [
  6252. {
  6253. "lang": "js",
  6254. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6255. }
  6256. ]
  6257. }
  6258. },
  6259. "/session/{sessionID}/message": {
  6260. "get": {
  6261. "tags": ["session"],
  6262. "operationId": "session.messages",
  6263. "parameters": [
  6264. {
  6265. "name": "sessionID",
  6266. "in": "path",
  6267. "schema": {
  6268. "type": "string",
  6269. "pattern": "^ses"
  6270. },
  6271. "required": true
  6272. },
  6273. {
  6274. "name": "directory",
  6275. "in": "query",
  6276. "schema": {
  6277. "type": "string"
  6278. },
  6279. "required": false
  6280. },
  6281. {
  6282. "name": "workspace",
  6283. "in": "query",
  6284. "schema": {
  6285. "type": "string"
  6286. },
  6287. "required": false
  6288. },
  6289. {
  6290. "name": "limit",
  6291. "in": "query",
  6292. "schema": {
  6293. "type": "integer",
  6294. "minimum": 0,
  6295. "maximum": 9007199254740991
  6296. },
  6297. "required": false
  6298. },
  6299. {
  6300. "name": "before",
  6301. "in": "query",
  6302. "schema": {
  6303. "type": "string"
  6304. },
  6305. "required": false
  6306. }
  6307. ],
  6308. "responses": {
  6309. "200": {
  6310. "description": "List of messages",
  6311. "content": {
  6312. "application/json": {
  6313. "schema": {
  6314. "type": "array",
  6315. "items": {
  6316. "type": "object",
  6317. "properties": {
  6318. "info": {
  6319. "$ref": "#/components/schemas/Message"
  6320. },
  6321. "parts": {
  6322. "type": "array",
  6323. "items": {
  6324. "$ref": "#/components/schemas/Part"
  6325. }
  6326. }
  6327. },
  6328. "required": ["info", "parts"],
  6329. "additionalProperties": false
  6330. },
  6331. "description": "List of messages"
  6332. }
  6333. }
  6334. }
  6335. },
  6336. "400": {
  6337. "description": "BadRequest | InvalidRequestError",
  6338. "content": {
  6339. "application/json": {
  6340. "schema": {
  6341. "anyOf": [
  6342. {
  6343. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6344. },
  6345. {
  6346. "$ref": "#/components/schemas/InvalidRequestError"
  6347. }
  6348. ]
  6349. }
  6350. }
  6351. }
  6352. },
  6353. "404": {
  6354. "description": "NotFoundError",
  6355. "content": {
  6356. "application/json": {
  6357. "schema": {
  6358. "$ref": "#/components/schemas/NotFoundError"
  6359. }
  6360. }
  6361. }
  6362. }
  6363. },
  6364. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6365. "summary": "Get session messages",
  6366. "x-codeSamples": [
  6367. {
  6368. "lang": "js",
  6369. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6370. }
  6371. ]
  6372. },
  6373. "post": {
  6374. "tags": ["session"],
  6375. "operationId": "session.prompt",
  6376. "parameters": [
  6377. {
  6378. "name": "sessionID",
  6379. "in": "path",
  6380. "schema": {
  6381. "type": "string",
  6382. "pattern": "^ses"
  6383. },
  6384. "required": true
  6385. },
  6386. {
  6387. "name": "directory",
  6388. "in": "query",
  6389. "schema": {
  6390. "type": "string"
  6391. },
  6392. "required": false
  6393. },
  6394. {
  6395. "name": "workspace",
  6396. "in": "query",
  6397. "schema": {
  6398. "type": "string"
  6399. },
  6400. "required": false
  6401. }
  6402. ],
  6403. "responses": {
  6404. "200": {
  6405. "description": "Created message",
  6406. "content": {
  6407. "application/json": {
  6408. "schema": {
  6409. "type": "object",
  6410. "required": ["info", "parts"],
  6411. "properties": {
  6412. "info": {
  6413. "$ref": "#/components/schemas/AssistantMessage"
  6414. },
  6415. "parts": {
  6416. "type": "array",
  6417. "items": {
  6418. "$ref": "#/components/schemas/Part"
  6419. }
  6420. }
  6421. }
  6422. }
  6423. }
  6424. }
  6425. },
  6426. "400": {
  6427. "description": "BadRequest | InvalidRequestError",
  6428. "content": {
  6429. "application/json": {
  6430. "schema": {
  6431. "anyOf": [
  6432. {
  6433. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6434. },
  6435. {
  6436. "$ref": "#/components/schemas/InvalidRequestError"
  6437. }
  6438. ]
  6439. }
  6440. }
  6441. }
  6442. },
  6443. "404": {
  6444. "description": "NotFoundError",
  6445. "content": {
  6446. "application/json": {
  6447. "schema": {
  6448. "$ref": "#/components/schemas/NotFoundError"
  6449. }
  6450. }
  6451. }
  6452. }
  6453. },
  6454. "description": "Create and send a new message to a session, streaming the AI response.",
  6455. "summary": "Send message",
  6456. "requestBody": {
  6457. "content": {
  6458. "application/json": {
  6459. "schema": {
  6460. "type": "object",
  6461. "properties": {
  6462. "messageID": {
  6463. "type": "string",
  6464. "pattern": "^msg"
  6465. },
  6466. "model": {
  6467. "type": "object",
  6468. "properties": {
  6469. "providerID": {
  6470. "type": "string"
  6471. },
  6472. "modelID": {
  6473. "type": "string"
  6474. }
  6475. },
  6476. "required": ["providerID", "modelID"],
  6477. "additionalProperties": false
  6478. },
  6479. "agent": {
  6480. "type": "string"
  6481. },
  6482. "noReply": {
  6483. "type": "boolean"
  6484. },
  6485. "tools": {
  6486. "type": "object",
  6487. "additionalProperties": {
  6488. "type": "boolean"
  6489. }
  6490. },
  6491. "format": {
  6492. "$ref": "#/components/schemas/OutputFormat"
  6493. },
  6494. "system": {
  6495. "type": "string"
  6496. },
  6497. "variant": {
  6498. "type": "string"
  6499. },
  6500. "parts": {
  6501. "type": "array",
  6502. "items": {
  6503. "anyOf": [
  6504. {
  6505. "$ref": "#/components/schemas/TextPartInput"
  6506. },
  6507. {
  6508. "$ref": "#/components/schemas/FilePartInput"
  6509. },
  6510. {
  6511. "$ref": "#/components/schemas/AgentPartInput"
  6512. },
  6513. {
  6514. "$ref": "#/components/schemas/SubtaskPartInput"
  6515. }
  6516. ]
  6517. }
  6518. }
  6519. },
  6520. "required": ["parts"],
  6521. "additionalProperties": false
  6522. }
  6523. }
  6524. }
  6525. },
  6526. "x-codeSamples": [
  6527. {
  6528. "lang": "js",
  6529. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6530. }
  6531. ]
  6532. }
  6533. },
  6534. "/session/{sessionID}/message/{messageID}": {
  6535. "get": {
  6536. "tags": ["session"],
  6537. "operationId": "session.message",
  6538. "parameters": [
  6539. {
  6540. "name": "sessionID",
  6541. "in": "path",
  6542. "schema": {
  6543. "type": "string",
  6544. "pattern": "^ses"
  6545. },
  6546. "required": true
  6547. },
  6548. {
  6549. "name": "messageID",
  6550. "in": "path",
  6551. "schema": {
  6552. "type": "string",
  6553. "pattern": "^msg"
  6554. },
  6555. "required": true
  6556. },
  6557. {
  6558. "name": "directory",
  6559. "in": "query",
  6560. "schema": {
  6561. "type": "string"
  6562. },
  6563. "required": false
  6564. },
  6565. {
  6566. "name": "workspace",
  6567. "in": "query",
  6568. "schema": {
  6569. "type": "string"
  6570. },
  6571. "required": false
  6572. }
  6573. ],
  6574. "responses": {
  6575. "200": {
  6576. "description": "Message",
  6577. "content": {
  6578. "application/json": {
  6579. "schema": {
  6580. "type": "object",
  6581. "properties": {
  6582. "info": {
  6583. "$ref": "#/components/schemas/Message"
  6584. },
  6585. "parts": {
  6586. "type": "array",
  6587. "items": {
  6588. "$ref": "#/components/schemas/Part"
  6589. }
  6590. }
  6591. },
  6592. "required": ["info", "parts"],
  6593. "additionalProperties": false,
  6594. "description": "Message"
  6595. }
  6596. }
  6597. }
  6598. },
  6599. "400": {
  6600. "description": "BadRequest | InvalidRequestError",
  6601. "content": {
  6602. "application/json": {
  6603. "schema": {
  6604. "anyOf": [
  6605. {
  6606. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6607. },
  6608. {
  6609. "$ref": "#/components/schemas/InvalidRequestError"
  6610. }
  6611. ]
  6612. }
  6613. }
  6614. }
  6615. },
  6616. "404": {
  6617. "description": "NotFoundError",
  6618. "content": {
  6619. "application/json": {
  6620. "schema": {
  6621. "$ref": "#/components/schemas/NotFoundError"
  6622. }
  6623. }
  6624. }
  6625. }
  6626. },
  6627. "description": "Retrieve a specific message from a session by its message ID.",
  6628. "summary": "Get message",
  6629. "x-codeSamples": [
  6630. {
  6631. "lang": "js",
  6632. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6633. }
  6634. ]
  6635. },
  6636. "delete": {
  6637. "tags": ["session"],
  6638. "operationId": "session.deleteMessage",
  6639. "parameters": [
  6640. {
  6641. "name": "sessionID",
  6642. "in": "path",
  6643. "schema": {
  6644. "type": "string",
  6645. "pattern": "^ses"
  6646. },
  6647. "required": true
  6648. },
  6649. {
  6650. "name": "messageID",
  6651. "in": "path",
  6652. "schema": {
  6653. "type": "string",
  6654. "pattern": "^msg"
  6655. },
  6656. "required": true
  6657. },
  6658. {
  6659. "name": "directory",
  6660. "in": "query",
  6661. "schema": {
  6662. "type": "string"
  6663. },
  6664. "required": false
  6665. },
  6666. {
  6667. "name": "workspace",
  6668. "in": "query",
  6669. "schema": {
  6670. "type": "string"
  6671. },
  6672. "required": false
  6673. }
  6674. ],
  6675. "responses": {
  6676. "200": {
  6677. "description": "Successfully deleted message",
  6678. "content": {
  6679. "application/json": {
  6680. "schema": {
  6681. "type": "boolean",
  6682. "description": "Successfully deleted message"
  6683. }
  6684. }
  6685. }
  6686. },
  6687. "400": {
  6688. "description": "BadRequest | InvalidRequestError",
  6689. "content": {
  6690. "application/json": {
  6691. "schema": {
  6692. "anyOf": [
  6693. {
  6694. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6695. },
  6696. {
  6697. "$ref": "#/components/schemas/InvalidRequestError"
  6698. }
  6699. ]
  6700. }
  6701. }
  6702. }
  6703. },
  6704. "404": {
  6705. "description": "NotFoundError",
  6706. "content": {
  6707. "application/json": {
  6708. "schema": {
  6709. "$ref": "#/components/schemas/NotFoundError"
  6710. }
  6711. }
  6712. }
  6713. },
  6714. "409": {
  6715. "description": "SessionBusyError",
  6716. "content": {
  6717. "application/json": {
  6718. "schema": {
  6719. "$ref": "#/components/schemas/SessionBusyError"
  6720. }
  6721. }
  6722. }
  6723. }
  6724. },
  6725. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6726. "summary": "Delete message",
  6727. "x-codeSamples": [
  6728. {
  6729. "lang": "js",
  6730. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6731. }
  6732. ]
  6733. }
  6734. },
  6735. "/session/{sessionID}/fork": {
  6736. "post": {
  6737. "tags": ["session"],
  6738. "operationId": "session.fork",
  6739. "parameters": [
  6740. {
  6741. "name": "sessionID",
  6742. "in": "path",
  6743. "schema": {
  6744. "type": "string",
  6745. "pattern": "^ses"
  6746. },
  6747. "required": true
  6748. },
  6749. {
  6750. "name": "directory",
  6751. "in": "query",
  6752. "schema": {
  6753. "type": "string"
  6754. },
  6755. "required": false
  6756. },
  6757. {
  6758. "name": "workspace",
  6759. "in": "query",
  6760. "schema": {
  6761. "type": "string"
  6762. },
  6763. "required": false
  6764. }
  6765. ],
  6766. "responses": {
  6767. "200": {
  6768. "description": "200",
  6769. "content": {
  6770. "application/json": {
  6771. "schema": {
  6772. "$ref": "#/components/schemas/Session"
  6773. }
  6774. }
  6775. }
  6776. },
  6777. "400": {
  6778. "description": "BadRequest | InvalidRequestError",
  6779. "content": {
  6780. "application/json": {
  6781. "schema": {
  6782. "anyOf": [
  6783. {
  6784. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6785. },
  6786. {
  6787. "$ref": "#/components/schemas/InvalidRequestError"
  6788. }
  6789. ]
  6790. }
  6791. }
  6792. }
  6793. },
  6794. "404": {
  6795. "description": "NotFoundError",
  6796. "content": {
  6797. "application/json": {
  6798. "schema": {
  6799. "$ref": "#/components/schemas/NotFoundError"
  6800. }
  6801. }
  6802. }
  6803. }
  6804. },
  6805. "description": "Create a new session by forking an existing session at a specific message point.",
  6806. "summary": "Fork session",
  6807. "requestBody": {
  6808. "content": {
  6809. "application/json": {
  6810. "schema": {
  6811. "type": "object",
  6812. "properties": {
  6813. "messageID": {
  6814. "type": "string",
  6815. "pattern": "^msg"
  6816. }
  6817. },
  6818. "additionalProperties": false
  6819. }
  6820. }
  6821. }
  6822. },
  6823. "x-codeSamples": [
  6824. {
  6825. "lang": "js",
  6826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6827. }
  6828. ]
  6829. }
  6830. },
  6831. "/session/{sessionID}/abort": {
  6832. "post": {
  6833. "tags": ["session"],
  6834. "operationId": "session.abort",
  6835. "parameters": [
  6836. {
  6837. "name": "sessionID",
  6838. "in": "path",
  6839. "schema": {
  6840. "type": "string",
  6841. "pattern": "^ses"
  6842. },
  6843. "required": true
  6844. },
  6845. {
  6846. "name": "directory",
  6847. "in": "query",
  6848. "schema": {
  6849. "type": "string"
  6850. },
  6851. "required": false
  6852. },
  6853. {
  6854. "name": "workspace",
  6855. "in": "query",
  6856. "schema": {
  6857. "type": "string"
  6858. },
  6859. "required": false
  6860. }
  6861. ],
  6862. "responses": {
  6863. "200": {
  6864. "description": "Aborted session",
  6865. "content": {
  6866. "application/json": {
  6867. "schema": {
  6868. "type": "boolean",
  6869. "description": "Aborted session"
  6870. }
  6871. }
  6872. }
  6873. },
  6874. "400": {
  6875. "description": "BadRequest | InvalidRequestError",
  6876. "content": {
  6877. "application/json": {
  6878. "schema": {
  6879. "anyOf": [
  6880. {
  6881. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6882. },
  6883. {
  6884. "$ref": "#/components/schemas/InvalidRequestError"
  6885. }
  6886. ]
  6887. }
  6888. }
  6889. }
  6890. }
  6891. },
  6892. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6893. "summary": "Abort session",
  6894. "x-codeSamples": [
  6895. {
  6896. "lang": "js",
  6897. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6898. }
  6899. ]
  6900. }
  6901. },
  6902. "/session/{sessionID}/init": {
  6903. "post": {
  6904. "tags": ["session"],
  6905. "operationId": "session.init",
  6906. "parameters": [
  6907. {
  6908. "name": "sessionID",
  6909. "in": "path",
  6910. "schema": {
  6911. "type": "string",
  6912. "pattern": "^ses"
  6913. },
  6914. "required": true
  6915. },
  6916. {
  6917. "name": "directory",
  6918. "in": "query",
  6919. "schema": {
  6920. "type": "string"
  6921. },
  6922. "required": false
  6923. },
  6924. {
  6925. "name": "workspace",
  6926. "in": "query",
  6927. "schema": {
  6928. "type": "string"
  6929. },
  6930. "required": false
  6931. }
  6932. ],
  6933. "responses": {
  6934. "200": {
  6935. "description": "200",
  6936. "content": {
  6937. "application/json": {
  6938. "schema": {
  6939. "type": "boolean",
  6940. "description": "200"
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "400": {
  6946. "description": "BadRequest | InvalidRequestError",
  6947. "content": {
  6948. "application/json": {
  6949. "schema": {
  6950. "anyOf": [
  6951. {
  6952. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6953. },
  6954. {
  6955. "$ref": "#/components/schemas/InvalidRequestError"
  6956. }
  6957. ]
  6958. }
  6959. }
  6960. }
  6961. },
  6962. "404": {
  6963. "description": "NotFoundError",
  6964. "content": {
  6965. "application/json": {
  6966. "schema": {
  6967. "$ref": "#/components/schemas/NotFoundError"
  6968. }
  6969. }
  6970. }
  6971. }
  6972. },
  6973. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6974. "summary": "Initialize session",
  6975. "requestBody": {
  6976. "content": {
  6977. "application/json": {
  6978. "schema": {
  6979. "type": "object",
  6980. "properties": {
  6981. "modelID": {
  6982. "type": "string"
  6983. },
  6984. "providerID": {
  6985. "type": "string"
  6986. },
  6987. "messageID": {
  6988. "type": "string",
  6989. "pattern": "^msg"
  6990. }
  6991. },
  6992. "required": ["modelID", "providerID", "messageID"],
  6993. "additionalProperties": false
  6994. }
  6995. }
  6996. }
  6997. },
  6998. "x-codeSamples": [
  6999. {
  7000. "lang": "js",
  7001. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  7002. }
  7003. ]
  7004. }
  7005. },
  7006. "/session/{sessionID}/share": {
  7007. "post": {
  7008. "tags": ["session"],
  7009. "operationId": "session.share",
  7010. "parameters": [
  7011. {
  7012. "name": "sessionID",
  7013. "in": "path",
  7014. "schema": {
  7015. "type": "string",
  7016. "pattern": "^ses"
  7017. },
  7018. "required": true
  7019. },
  7020. {
  7021. "name": "directory",
  7022. "in": "query",
  7023. "schema": {
  7024. "type": "string"
  7025. },
  7026. "required": false
  7027. },
  7028. {
  7029. "name": "workspace",
  7030. "in": "query",
  7031. "schema": {
  7032. "type": "string"
  7033. },
  7034. "required": false
  7035. }
  7036. ],
  7037. "responses": {
  7038. "200": {
  7039. "description": "Successfully shared session",
  7040. "content": {
  7041. "application/json": {
  7042. "schema": {
  7043. "$ref": "#/components/schemas/Session"
  7044. }
  7045. }
  7046. }
  7047. },
  7048. "400": {
  7049. "description": "Bad request",
  7050. "content": {
  7051. "application/json": {
  7052. "schema": {
  7053. "$ref": "#/components/schemas/BadRequestError"
  7054. }
  7055. }
  7056. }
  7057. },
  7058. "404": {
  7059. "description": "NotFoundError",
  7060. "content": {
  7061. "application/json": {
  7062. "schema": {
  7063. "$ref": "#/components/schemas/NotFoundError"
  7064. }
  7065. }
  7066. }
  7067. },
  7068. "500": {
  7069. "description": "InternalServerError",
  7070. "content": {
  7071. "application/json": {
  7072. "schema": {
  7073. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7074. }
  7075. }
  7076. }
  7077. }
  7078. },
  7079. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  7080. "summary": "Share session",
  7081. "x-codeSamples": [
  7082. {
  7083. "lang": "js",
  7084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  7085. }
  7086. ]
  7087. },
  7088. "delete": {
  7089. "tags": ["session"],
  7090. "operationId": "session.unshare",
  7091. "parameters": [
  7092. {
  7093. "name": "sessionID",
  7094. "in": "path",
  7095. "schema": {
  7096. "type": "string",
  7097. "pattern": "^ses"
  7098. },
  7099. "required": true
  7100. },
  7101. {
  7102. "name": "directory",
  7103. "in": "query",
  7104. "schema": {
  7105. "type": "string"
  7106. },
  7107. "required": false
  7108. },
  7109. {
  7110. "name": "workspace",
  7111. "in": "query",
  7112. "schema": {
  7113. "type": "string"
  7114. },
  7115. "required": false
  7116. }
  7117. ],
  7118. "responses": {
  7119. "200": {
  7120. "description": "Successfully unshared session",
  7121. "content": {
  7122. "application/json": {
  7123. "schema": {
  7124. "$ref": "#/components/schemas/Session"
  7125. }
  7126. }
  7127. }
  7128. },
  7129. "400": {
  7130. "description": "Bad request",
  7131. "content": {
  7132. "application/json": {
  7133. "schema": {
  7134. "$ref": "#/components/schemas/BadRequestError"
  7135. }
  7136. }
  7137. }
  7138. },
  7139. "404": {
  7140. "description": "NotFoundError",
  7141. "content": {
  7142. "application/json": {
  7143. "schema": {
  7144. "$ref": "#/components/schemas/NotFoundError"
  7145. }
  7146. }
  7147. }
  7148. },
  7149. "500": {
  7150. "description": "InternalServerError",
  7151. "content": {
  7152. "application/json": {
  7153. "schema": {
  7154. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7155. }
  7156. }
  7157. }
  7158. }
  7159. },
  7160. "description": "Remove the shareable link for a session, making it private again.",
  7161. "summary": "Unshare session",
  7162. "x-codeSamples": [
  7163. {
  7164. "lang": "js",
  7165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7166. }
  7167. ]
  7168. }
  7169. },
  7170. "/session/{sessionID}/summarize": {
  7171. "post": {
  7172. "tags": ["session"],
  7173. "operationId": "session.summarize",
  7174. "parameters": [
  7175. {
  7176. "name": "sessionID",
  7177. "in": "path",
  7178. "schema": {
  7179. "type": "string",
  7180. "pattern": "^ses"
  7181. },
  7182. "required": true
  7183. },
  7184. {
  7185. "name": "directory",
  7186. "in": "query",
  7187. "schema": {
  7188. "type": "string"
  7189. },
  7190. "required": false
  7191. },
  7192. {
  7193. "name": "workspace",
  7194. "in": "query",
  7195. "schema": {
  7196. "type": "string"
  7197. },
  7198. "required": false
  7199. }
  7200. ],
  7201. "responses": {
  7202. "200": {
  7203. "description": "Summarized session",
  7204. "content": {
  7205. "application/json": {
  7206. "schema": {
  7207. "type": "boolean",
  7208. "description": "Summarized session"
  7209. }
  7210. }
  7211. }
  7212. },
  7213. "400": {
  7214. "description": "BadRequest | InvalidRequestError",
  7215. "content": {
  7216. "application/json": {
  7217. "schema": {
  7218. "anyOf": [
  7219. {
  7220. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7221. },
  7222. {
  7223. "$ref": "#/components/schemas/InvalidRequestError"
  7224. }
  7225. ]
  7226. }
  7227. }
  7228. }
  7229. },
  7230. "404": {
  7231. "description": "NotFoundError",
  7232. "content": {
  7233. "application/json": {
  7234. "schema": {
  7235. "$ref": "#/components/schemas/NotFoundError"
  7236. }
  7237. }
  7238. }
  7239. }
  7240. },
  7241. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7242. "summary": "Summarize session",
  7243. "requestBody": {
  7244. "content": {
  7245. "application/json": {
  7246. "schema": {
  7247. "type": "object",
  7248. "properties": {
  7249. "providerID": {
  7250. "type": "string"
  7251. },
  7252. "modelID": {
  7253. "type": "string"
  7254. },
  7255. "auto": {
  7256. "type": "boolean"
  7257. }
  7258. },
  7259. "required": ["providerID", "modelID"],
  7260. "additionalProperties": false
  7261. }
  7262. }
  7263. }
  7264. },
  7265. "x-codeSamples": [
  7266. {
  7267. "lang": "js",
  7268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7269. }
  7270. ]
  7271. }
  7272. },
  7273. "/session/{sessionID}/prompt_async": {
  7274. "post": {
  7275. "tags": ["session"],
  7276. "operationId": "session.prompt_async",
  7277. "parameters": [
  7278. {
  7279. "name": "sessionID",
  7280. "in": "path",
  7281. "schema": {
  7282. "type": "string",
  7283. "pattern": "^ses"
  7284. },
  7285. "required": true
  7286. },
  7287. {
  7288. "name": "directory",
  7289. "in": "query",
  7290. "schema": {
  7291. "type": "string"
  7292. },
  7293. "required": false
  7294. },
  7295. {
  7296. "name": "workspace",
  7297. "in": "query",
  7298. "schema": {
  7299. "type": "string"
  7300. },
  7301. "required": false
  7302. }
  7303. ],
  7304. "responses": {
  7305. "204": {
  7306. "description": "Prompt accepted"
  7307. },
  7308. "400": {
  7309. "description": "BadRequest | InvalidRequestError",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "anyOf": [
  7314. {
  7315. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7316. },
  7317. {
  7318. "$ref": "#/components/schemas/InvalidRequestError"
  7319. }
  7320. ]
  7321. }
  7322. }
  7323. }
  7324. },
  7325. "404": {
  7326. "description": "NotFoundError",
  7327. "content": {
  7328. "application/json": {
  7329. "schema": {
  7330. "$ref": "#/components/schemas/NotFoundError"
  7331. }
  7332. }
  7333. }
  7334. }
  7335. },
  7336. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7337. "summary": "Send async message",
  7338. "requestBody": {
  7339. "content": {
  7340. "application/json": {
  7341. "schema": {
  7342. "type": "object",
  7343. "properties": {
  7344. "messageID": {
  7345. "type": "string",
  7346. "pattern": "^msg"
  7347. },
  7348. "model": {
  7349. "type": "object",
  7350. "properties": {
  7351. "providerID": {
  7352. "type": "string"
  7353. },
  7354. "modelID": {
  7355. "type": "string"
  7356. }
  7357. },
  7358. "required": ["providerID", "modelID"],
  7359. "additionalProperties": false
  7360. },
  7361. "agent": {
  7362. "type": "string"
  7363. },
  7364. "noReply": {
  7365. "type": "boolean"
  7366. },
  7367. "tools": {
  7368. "type": "object",
  7369. "additionalProperties": {
  7370. "type": "boolean"
  7371. }
  7372. },
  7373. "format": {
  7374. "$ref": "#/components/schemas/OutputFormat"
  7375. },
  7376. "system": {
  7377. "type": "string"
  7378. },
  7379. "variant": {
  7380. "type": "string"
  7381. },
  7382. "parts": {
  7383. "type": "array",
  7384. "items": {
  7385. "anyOf": [
  7386. {
  7387. "$ref": "#/components/schemas/TextPartInput"
  7388. },
  7389. {
  7390. "$ref": "#/components/schemas/FilePartInput"
  7391. },
  7392. {
  7393. "$ref": "#/components/schemas/AgentPartInput"
  7394. },
  7395. {
  7396. "$ref": "#/components/schemas/SubtaskPartInput"
  7397. }
  7398. ]
  7399. }
  7400. }
  7401. },
  7402. "required": ["parts"],
  7403. "additionalProperties": false
  7404. }
  7405. }
  7406. }
  7407. },
  7408. "x-codeSamples": [
  7409. {
  7410. "lang": "js",
  7411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7412. }
  7413. ]
  7414. }
  7415. },
  7416. "/session/{sessionID}/command": {
  7417. "post": {
  7418. "tags": ["session"],
  7419. "operationId": "session.command",
  7420. "parameters": [
  7421. {
  7422. "name": "sessionID",
  7423. "in": "path",
  7424. "schema": {
  7425. "type": "string",
  7426. "pattern": "^ses"
  7427. },
  7428. "required": true
  7429. },
  7430. {
  7431. "name": "directory",
  7432. "in": "query",
  7433. "schema": {
  7434. "type": "string"
  7435. },
  7436. "required": false
  7437. },
  7438. {
  7439. "name": "workspace",
  7440. "in": "query",
  7441. "schema": {
  7442. "type": "string"
  7443. },
  7444. "required": false
  7445. }
  7446. ],
  7447. "responses": {
  7448. "200": {
  7449. "description": "Created message",
  7450. "content": {
  7451. "application/json": {
  7452. "schema": {
  7453. "type": "object",
  7454. "required": ["info", "parts"],
  7455. "properties": {
  7456. "info": {
  7457. "$ref": "#/components/schemas/AssistantMessage"
  7458. },
  7459. "parts": {
  7460. "type": "array",
  7461. "items": {
  7462. "$ref": "#/components/schemas/Part"
  7463. }
  7464. }
  7465. }
  7466. }
  7467. }
  7468. }
  7469. },
  7470. "400": {
  7471. "description": "BadRequest | InvalidRequestError",
  7472. "content": {
  7473. "application/json": {
  7474. "schema": {
  7475. "anyOf": [
  7476. {
  7477. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7478. },
  7479. {
  7480. "$ref": "#/components/schemas/InvalidRequestError"
  7481. }
  7482. ]
  7483. }
  7484. }
  7485. }
  7486. },
  7487. "404": {
  7488. "description": "NotFoundError",
  7489. "content": {
  7490. "application/json": {
  7491. "schema": {
  7492. "$ref": "#/components/schemas/NotFoundError"
  7493. }
  7494. }
  7495. }
  7496. }
  7497. },
  7498. "description": "Send a new command to a session for execution by the AI assistant.",
  7499. "summary": "Send command",
  7500. "requestBody": {
  7501. "content": {
  7502. "application/json": {
  7503. "schema": {
  7504. "type": "object",
  7505. "properties": {
  7506. "messageID": {
  7507. "type": "string",
  7508. "pattern": "^msg"
  7509. },
  7510. "agent": {
  7511. "type": "string"
  7512. },
  7513. "model": {
  7514. "type": "string"
  7515. },
  7516. "arguments": {
  7517. "type": "string"
  7518. },
  7519. "command": {
  7520. "type": "string"
  7521. },
  7522. "variant": {
  7523. "type": "string"
  7524. },
  7525. "parts": {
  7526. "type": "array",
  7527. "items": {
  7528. "type": "object",
  7529. "properties": {
  7530. "id": {
  7531. "type": "string",
  7532. "pattern": "^prt"
  7533. },
  7534. "type": {
  7535. "type": "string",
  7536. "enum": ["file"]
  7537. },
  7538. "mime": {
  7539. "type": "string"
  7540. },
  7541. "filename": {
  7542. "type": "string"
  7543. },
  7544. "url": {
  7545. "type": "string"
  7546. },
  7547. "source": {
  7548. "$ref": "#/components/schemas/FilePartSource"
  7549. }
  7550. },
  7551. "required": ["type", "mime", "url"],
  7552. "additionalProperties": false
  7553. }
  7554. }
  7555. },
  7556. "required": ["arguments", "command"],
  7557. "additionalProperties": false
  7558. }
  7559. }
  7560. }
  7561. },
  7562. "x-codeSamples": [
  7563. {
  7564. "lang": "js",
  7565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7566. }
  7567. ]
  7568. }
  7569. },
  7570. "/session/{sessionID}/shell": {
  7571. "post": {
  7572. "tags": ["session"],
  7573. "operationId": "session.shell",
  7574. "parameters": [
  7575. {
  7576. "name": "sessionID",
  7577. "in": "path",
  7578. "schema": {
  7579. "type": "string",
  7580. "pattern": "^ses"
  7581. },
  7582. "required": true
  7583. },
  7584. {
  7585. "name": "directory",
  7586. "in": "query",
  7587. "schema": {
  7588. "type": "string"
  7589. },
  7590. "required": false
  7591. },
  7592. {
  7593. "name": "workspace",
  7594. "in": "query",
  7595. "schema": {
  7596. "type": "string"
  7597. },
  7598. "required": false
  7599. }
  7600. ],
  7601. "responses": {
  7602. "200": {
  7603. "description": "Created message",
  7604. "content": {
  7605. "application/json": {
  7606. "schema": {
  7607. "type": "object",
  7608. "properties": {
  7609. "info": {
  7610. "$ref": "#/components/schemas/Message"
  7611. },
  7612. "parts": {
  7613. "type": "array",
  7614. "items": {
  7615. "$ref": "#/components/schemas/Part"
  7616. }
  7617. }
  7618. },
  7619. "required": ["info", "parts"],
  7620. "additionalProperties": false,
  7621. "description": "Created message"
  7622. }
  7623. }
  7624. }
  7625. },
  7626. "400": {
  7627. "description": "BadRequest | InvalidRequestError",
  7628. "content": {
  7629. "application/json": {
  7630. "schema": {
  7631. "anyOf": [
  7632. {
  7633. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7634. },
  7635. {
  7636. "$ref": "#/components/schemas/InvalidRequestError"
  7637. }
  7638. ]
  7639. }
  7640. }
  7641. }
  7642. },
  7643. "404": {
  7644. "description": "NotFoundError",
  7645. "content": {
  7646. "application/json": {
  7647. "schema": {
  7648. "$ref": "#/components/schemas/NotFoundError"
  7649. }
  7650. }
  7651. }
  7652. },
  7653. "409": {
  7654. "description": "SessionBusyError",
  7655. "content": {
  7656. "application/json": {
  7657. "schema": {
  7658. "$ref": "#/components/schemas/SessionBusyError"
  7659. }
  7660. }
  7661. }
  7662. }
  7663. },
  7664. "description": "Execute a shell command within the session context and return the AI's response.",
  7665. "summary": "Run shell command",
  7666. "requestBody": {
  7667. "content": {
  7668. "application/json": {
  7669. "schema": {
  7670. "type": "object",
  7671. "properties": {
  7672. "messageID": {
  7673. "type": "string",
  7674. "pattern": "^msg"
  7675. },
  7676. "agent": {
  7677. "type": "string"
  7678. },
  7679. "model": {
  7680. "type": "object",
  7681. "properties": {
  7682. "providerID": {
  7683. "type": "string"
  7684. },
  7685. "modelID": {
  7686. "type": "string"
  7687. }
  7688. },
  7689. "required": ["providerID", "modelID"],
  7690. "additionalProperties": false
  7691. },
  7692. "command": {
  7693. "type": "string"
  7694. }
  7695. },
  7696. "required": ["agent", "command"],
  7697. "additionalProperties": false
  7698. }
  7699. }
  7700. }
  7701. },
  7702. "x-codeSamples": [
  7703. {
  7704. "lang": "js",
  7705. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7706. }
  7707. ]
  7708. }
  7709. },
  7710. "/session/{sessionID}/revert": {
  7711. "post": {
  7712. "tags": ["session"],
  7713. "operationId": "session.revert",
  7714. "parameters": [
  7715. {
  7716. "name": "sessionID",
  7717. "in": "path",
  7718. "schema": {
  7719. "type": "string",
  7720. "pattern": "^ses"
  7721. },
  7722. "required": true
  7723. },
  7724. {
  7725. "name": "directory",
  7726. "in": "query",
  7727. "schema": {
  7728. "type": "string"
  7729. },
  7730. "required": false
  7731. },
  7732. {
  7733. "name": "workspace",
  7734. "in": "query",
  7735. "schema": {
  7736. "type": "string"
  7737. },
  7738. "required": false
  7739. }
  7740. ],
  7741. "responses": {
  7742. "200": {
  7743. "description": "Updated session",
  7744. "content": {
  7745. "application/json": {
  7746. "schema": {
  7747. "$ref": "#/components/schemas/Session"
  7748. }
  7749. }
  7750. }
  7751. },
  7752. "400": {
  7753. "description": "BadRequest | InvalidRequestError",
  7754. "content": {
  7755. "application/json": {
  7756. "schema": {
  7757. "anyOf": [
  7758. {
  7759. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7760. },
  7761. {
  7762. "$ref": "#/components/schemas/InvalidRequestError"
  7763. }
  7764. ]
  7765. }
  7766. }
  7767. }
  7768. },
  7769. "404": {
  7770. "description": "NotFoundError",
  7771. "content": {
  7772. "application/json": {
  7773. "schema": {
  7774. "$ref": "#/components/schemas/NotFoundError"
  7775. }
  7776. }
  7777. }
  7778. },
  7779. "409": {
  7780. "description": "SessionBusyError",
  7781. "content": {
  7782. "application/json": {
  7783. "schema": {
  7784. "$ref": "#/components/schemas/SessionBusyError"
  7785. }
  7786. }
  7787. }
  7788. }
  7789. },
  7790. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7791. "summary": "Revert message",
  7792. "requestBody": {
  7793. "content": {
  7794. "application/json": {
  7795. "schema": {
  7796. "type": "object",
  7797. "properties": {
  7798. "messageID": {
  7799. "type": "string",
  7800. "pattern": "^msg"
  7801. },
  7802. "partID": {
  7803. "type": "string",
  7804. "pattern": "^prt"
  7805. }
  7806. },
  7807. "required": ["messageID"],
  7808. "additionalProperties": false
  7809. }
  7810. }
  7811. }
  7812. },
  7813. "x-codeSamples": [
  7814. {
  7815. "lang": "js",
  7816. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7817. }
  7818. ]
  7819. }
  7820. },
  7821. "/session/{sessionID}/unrevert": {
  7822. "post": {
  7823. "tags": ["session"],
  7824. "operationId": "session.unrevert",
  7825. "parameters": [
  7826. {
  7827. "name": "sessionID",
  7828. "in": "path",
  7829. "schema": {
  7830. "type": "string",
  7831. "pattern": "^ses"
  7832. },
  7833. "required": true
  7834. },
  7835. {
  7836. "name": "directory",
  7837. "in": "query",
  7838. "schema": {
  7839. "type": "string"
  7840. },
  7841. "required": false
  7842. },
  7843. {
  7844. "name": "workspace",
  7845. "in": "query",
  7846. "schema": {
  7847. "type": "string"
  7848. },
  7849. "required": false
  7850. }
  7851. ],
  7852. "responses": {
  7853. "200": {
  7854. "description": "Updated session",
  7855. "content": {
  7856. "application/json": {
  7857. "schema": {
  7858. "$ref": "#/components/schemas/Session"
  7859. }
  7860. }
  7861. }
  7862. },
  7863. "400": {
  7864. "description": "BadRequest | InvalidRequestError",
  7865. "content": {
  7866. "application/json": {
  7867. "schema": {
  7868. "anyOf": [
  7869. {
  7870. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7871. },
  7872. {
  7873. "$ref": "#/components/schemas/InvalidRequestError"
  7874. }
  7875. ]
  7876. }
  7877. }
  7878. }
  7879. },
  7880. "404": {
  7881. "description": "NotFoundError",
  7882. "content": {
  7883. "application/json": {
  7884. "schema": {
  7885. "$ref": "#/components/schemas/NotFoundError"
  7886. }
  7887. }
  7888. }
  7889. },
  7890. "409": {
  7891. "description": "SessionBusyError",
  7892. "content": {
  7893. "application/json": {
  7894. "schema": {
  7895. "$ref": "#/components/schemas/SessionBusyError"
  7896. }
  7897. }
  7898. }
  7899. }
  7900. },
  7901. "description": "Restore all previously reverted messages in a session.",
  7902. "summary": "Restore reverted messages",
  7903. "x-codeSamples": [
  7904. {
  7905. "lang": "js",
  7906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7907. }
  7908. ]
  7909. }
  7910. },
  7911. "/session/{sessionID}/permissions/{permissionID}": {
  7912. "post": {
  7913. "tags": ["session"],
  7914. "operationId": "permission.respond",
  7915. "parameters": [
  7916. {
  7917. "name": "sessionID",
  7918. "in": "path",
  7919. "schema": {
  7920. "type": "string",
  7921. "pattern": "^ses"
  7922. },
  7923. "required": true
  7924. },
  7925. {
  7926. "name": "permissionID",
  7927. "in": "path",
  7928. "schema": {
  7929. "type": "string",
  7930. "pattern": "^per"
  7931. },
  7932. "required": true
  7933. },
  7934. {
  7935. "name": "directory",
  7936. "in": "query",
  7937. "schema": {
  7938. "type": "string"
  7939. },
  7940. "required": false
  7941. },
  7942. {
  7943. "name": "workspace",
  7944. "in": "query",
  7945. "schema": {
  7946. "type": "string"
  7947. },
  7948. "required": false
  7949. }
  7950. ],
  7951. "responses": {
  7952. "200": {
  7953. "description": "Permission processed successfully",
  7954. "content": {
  7955. "application/json": {
  7956. "schema": {
  7957. "type": "boolean",
  7958. "description": "Permission processed successfully"
  7959. }
  7960. }
  7961. }
  7962. },
  7963. "400": {
  7964. "description": "BadRequest | InvalidRequestError",
  7965. "content": {
  7966. "application/json": {
  7967. "schema": {
  7968. "anyOf": [
  7969. {
  7970. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7971. },
  7972. {
  7973. "$ref": "#/components/schemas/InvalidRequestError"
  7974. }
  7975. ]
  7976. }
  7977. }
  7978. }
  7979. },
  7980. "404": {
  7981. "description": "NotFoundError | PermissionNotFoundError",
  7982. "content": {
  7983. "application/json": {
  7984. "schema": {
  7985. "anyOf": [
  7986. {
  7987. "$ref": "#/components/schemas/NotFoundError"
  7988. },
  7989. {
  7990. "$ref": "#/components/schemas/PermissionNotFoundError"
  7991. }
  7992. ]
  7993. }
  7994. }
  7995. }
  7996. }
  7997. },
  7998. "description": "Approve or deny a permission request from the AI assistant.",
  7999. "summary": "Respond to permission",
  8000. "deprecated": true,
  8001. "requestBody": {
  8002. "content": {
  8003. "application/json": {
  8004. "schema": {
  8005. "type": "object",
  8006. "properties": {
  8007. "response": {
  8008. "type": "string",
  8009. "enum": ["once", "always", "reject"]
  8010. }
  8011. },
  8012. "required": ["response"],
  8013. "additionalProperties": false
  8014. }
  8015. }
  8016. }
  8017. },
  8018. "x-codeSamples": [
  8019. {
  8020. "lang": "js",
  8021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  8022. }
  8023. ]
  8024. }
  8025. },
  8026. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  8027. "delete": {
  8028. "tags": ["session"],
  8029. "operationId": "part.delete",
  8030. "parameters": [
  8031. {
  8032. "name": "sessionID",
  8033. "in": "path",
  8034. "schema": {
  8035. "type": "string",
  8036. "pattern": "^ses"
  8037. },
  8038. "required": true
  8039. },
  8040. {
  8041. "name": "messageID",
  8042. "in": "path",
  8043. "schema": {
  8044. "type": "string",
  8045. "pattern": "^msg"
  8046. },
  8047. "required": true
  8048. },
  8049. {
  8050. "name": "partID",
  8051. "in": "path",
  8052. "schema": {
  8053. "type": "string",
  8054. "pattern": "^prt"
  8055. },
  8056. "required": true
  8057. },
  8058. {
  8059. "name": "directory",
  8060. "in": "query",
  8061. "schema": {
  8062. "type": "string"
  8063. },
  8064. "required": false
  8065. },
  8066. {
  8067. "name": "workspace",
  8068. "in": "query",
  8069. "schema": {
  8070. "type": "string"
  8071. },
  8072. "required": false
  8073. }
  8074. ],
  8075. "responses": {
  8076. "200": {
  8077. "description": "Successfully deleted part",
  8078. "content": {
  8079. "application/json": {
  8080. "schema": {
  8081. "type": "boolean",
  8082. "description": "Successfully deleted part"
  8083. }
  8084. }
  8085. }
  8086. },
  8087. "400": {
  8088. "description": "BadRequest | InvalidRequestError",
  8089. "content": {
  8090. "application/json": {
  8091. "schema": {
  8092. "anyOf": [
  8093. {
  8094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8095. },
  8096. {
  8097. "$ref": "#/components/schemas/InvalidRequestError"
  8098. }
  8099. ]
  8100. }
  8101. }
  8102. }
  8103. },
  8104. "404": {
  8105. "description": "NotFoundError",
  8106. "content": {
  8107. "application/json": {
  8108. "schema": {
  8109. "$ref": "#/components/schemas/NotFoundError"
  8110. }
  8111. }
  8112. }
  8113. }
  8114. },
  8115. "description": "Delete a part from a message.",
  8116. "x-codeSamples": [
  8117. {
  8118. "lang": "js",
  8119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  8120. }
  8121. ]
  8122. },
  8123. "patch": {
  8124. "tags": ["session"],
  8125. "operationId": "part.update",
  8126. "parameters": [
  8127. {
  8128. "name": "sessionID",
  8129. "in": "path",
  8130. "schema": {
  8131. "type": "string",
  8132. "pattern": "^ses"
  8133. },
  8134. "required": true
  8135. },
  8136. {
  8137. "name": "messageID",
  8138. "in": "path",
  8139. "schema": {
  8140. "type": "string",
  8141. "pattern": "^msg"
  8142. },
  8143. "required": true
  8144. },
  8145. {
  8146. "name": "partID",
  8147. "in": "path",
  8148. "schema": {
  8149. "type": "string",
  8150. "pattern": "^prt"
  8151. },
  8152. "required": true
  8153. },
  8154. {
  8155. "name": "directory",
  8156. "in": "query",
  8157. "schema": {
  8158. "type": "string"
  8159. },
  8160. "required": false
  8161. },
  8162. {
  8163. "name": "workspace",
  8164. "in": "query",
  8165. "schema": {
  8166. "type": "string"
  8167. },
  8168. "required": false
  8169. }
  8170. ],
  8171. "responses": {
  8172. "200": {
  8173. "description": "Successfully updated part",
  8174. "content": {
  8175. "application/json": {
  8176. "schema": {
  8177. "$ref": "#/components/schemas/Part"
  8178. }
  8179. }
  8180. }
  8181. },
  8182. "400": {
  8183. "description": "BadRequest | InvalidRequestError",
  8184. "content": {
  8185. "application/json": {
  8186. "schema": {
  8187. "anyOf": [
  8188. {
  8189. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8190. },
  8191. {
  8192. "$ref": "#/components/schemas/InvalidRequestError"
  8193. }
  8194. ]
  8195. }
  8196. }
  8197. }
  8198. },
  8199. "404": {
  8200. "description": "NotFoundError",
  8201. "content": {
  8202. "application/json": {
  8203. "schema": {
  8204. "$ref": "#/components/schemas/NotFoundError"
  8205. }
  8206. }
  8207. }
  8208. }
  8209. },
  8210. "description": "Update a part in a message.",
  8211. "requestBody": {
  8212. "content": {
  8213. "application/json": {
  8214. "schema": {
  8215. "$ref": "#/components/schemas/Part"
  8216. }
  8217. }
  8218. }
  8219. },
  8220. "x-codeSamples": [
  8221. {
  8222. "lang": "js",
  8223. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8224. }
  8225. ]
  8226. }
  8227. },
  8228. "/sync/start": {
  8229. "post": {
  8230. "tags": ["sync"],
  8231. "operationId": "sync.start",
  8232. "parameters": [
  8233. {
  8234. "name": "directory",
  8235. "in": "query",
  8236. "schema": {
  8237. "type": "string"
  8238. },
  8239. "required": false
  8240. },
  8241. {
  8242. "name": "workspace",
  8243. "in": "query",
  8244. "schema": {
  8245. "type": "string"
  8246. },
  8247. "required": false
  8248. }
  8249. ],
  8250. "responses": {
  8251. "200": {
  8252. "description": "Workspace sync started",
  8253. "content": {
  8254. "application/json": {
  8255. "schema": {
  8256. "type": "boolean",
  8257. "description": "Workspace sync started"
  8258. }
  8259. }
  8260. }
  8261. },
  8262. "400": {
  8263. "description": "Bad request",
  8264. "content": {
  8265. "application/json": {
  8266. "schema": {
  8267. "$ref": "#/components/schemas/BadRequestError"
  8268. }
  8269. }
  8270. }
  8271. }
  8272. },
  8273. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8274. "summary": "Start workspace sync",
  8275. "x-codeSamples": [
  8276. {
  8277. "lang": "js",
  8278. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8279. }
  8280. ]
  8281. }
  8282. },
  8283. "/sync/replay": {
  8284. "post": {
  8285. "tags": ["sync"],
  8286. "operationId": "sync.replay",
  8287. "parameters": [
  8288. {
  8289. "name": "directory",
  8290. "in": "query",
  8291. "schema": {
  8292. "type": "string"
  8293. },
  8294. "required": false
  8295. },
  8296. {
  8297. "name": "workspace",
  8298. "in": "query",
  8299. "schema": {
  8300. "type": "string"
  8301. },
  8302. "required": false
  8303. }
  8304. ],
  8305. "responses": {
  8306. "200": {
  8307. "description": "Replayed sync events",
  8308. "content": {
  8309. "application/json": {
  8310. "schema": {
  8311. "type": "object",
  8312. "properties": {
  8313. "sessionID": {
  8314. "type": "string"
  8315. }
  8316. },
  8317. "required": ["sessionID"],
  8318. "additionalProperties": false,
  8319. "description": "Replayed sync events"
  8320. }
  8321. }
  8322. }
  8323. },
  8324. "400": {
  8325. "description": "BadRequest | InvalidRequestError",
  8326. "content": {
  8327. "application/json": {
  8328. "schema": {
  8329. "anyOf": [
  8330. {
  8331. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8332. },
  8333. {
  8334. "$ref": "#/components/schemas/InvalidRequestError"
  8335. }
  8336. ]
  8337. }
  8338. }
  8339. }
  8340. }
  8341. },
  8342. "description": "Validate and replay a complete sync event history.",
  8343. "summary": "Replay sync events",
  8344. "requestBody": {
  8345. "content": {
  8346. "application/json": {
  8347. "schema": {
  8348. "type": "object",
  8349. "properties": {
  8350. "directory": {
  8351. "type": "string"
  8352. },
  8353. "events": {
  8354. "type": "array",
  8355. "minItems": 1,
  8356. "items": {
  8357. "type": "object",
  8358. "properties": {
  8359. "id": {
  8360. "type": "string",
  8361. "pattern": "^evt_"
  8362. },
  8363. "aggregateID": {
  8364. "type": "string"
  8365. },
  8366. "seq": {
  8367. "type": "integer",
  8368. "minimum": 0
  8369. },
  8370. "type": {
  8371. "type": "string"
  8372. },
  8373. "data": {
  8374. "type": "object"
  8375. }
  8376. },
  8377. "required": ["id", "aggregateID", "seq", "type", "data"],
  8378. "additionalProperties": false
  8379. }
  8380. }
  8381. },
  8382. "required": ["directory", "events"],
  8383. "additionalProperties": false
  8384. }
  8385. }
  8386. }
  8387. },
  8388. "x-codeSamples": [
  8389. {
  8390. "lang": "js",
  8391. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8392. }
  8393. ]
  8394. }
  8395. },
  8396. "/sync/steal": {
  8397. "post": {
  8398. "tags": ["sync"],
  8399. "operationId": "sync.steal",
  8400. "parameters": [
  8401. {
  8402. "name": "directory",
  8403. "in": "query",
  8404. "schema": {
  8405. "type": "string"
  8406. },
  8407. "required": false
  8408. },
  8409. {
  8410. "name": "workspace",
  8411. "in": "query",
  8412. "schema": {
  8413. "type": "string"
  8414. },
  8415. "required": false
  8416. }
  8417. ],
  8418. "responses": {
  8419. "200": {
  8420. "description": "Session stolen into workspace",
  8421. "content": {
  8422. "application/json": {
  8423. "schema": {
  8424. "type": "object",
  8425. "properties": {
  8426. "sessionID": {
  8427. "type": "string",
  8428. "pattern": "^ses"
  8429. }
  8430. },
  8431. "required": ["sessionID"],
  8432. "additionalProperties": false,
  8433. "description": "Session stolen into workspace"
  8434. }
  8435. }
  8436. }
  8437. },
  8438. "400": {
  8439. "description": "BadRequest | InvalidRequestError",
  8440. "content": {
  8441. "application/json": {
  8442. "schema": {
  8443. "anyOf": [
  8444. {
  8445. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8446. },
  8447. {
  8448. "$ref": "#/components/schemas/InvalidRequestError"
  8449. }
  8450. ]
  8451. }
  8452. }
  8453. }
  8454. }
  8455. },
  8456. "description": "Update a session to belong to the current workspace through the sync event system.",
  8457. "summary": "Steal session into workspace",
  8458. "requestBody": {
  8459. "content": {
  8460. "application/json": {
  8461. "schema": {
  8462. "type": "object",
  8463. "properties": {
  8464. "sessionID": {
  8465. "type": "string",
  8466. "pattern": "^ses"
  8467. }
  8468. },
  8469. "required": ["sessionID"],
  8470. "additionalProperties": false
  8471. }
  8472. }
  8473. }
  8474. },
  8475. "x-codeSamples": [
  8476. {
  8477. "lang": "js",
  8478. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8479. }
  8480. ]
  8481. }
  8482. },
  8483. "/sync/history": {
  8484. "post": {
  8485. "tags": ["sync"],
  8486. "operationId": "sync.history.list",
  8487. "parameters": [
  8488. {
  8489. "name": "directory",
  8490. "in": "query",
  8491. "schema": {
  8492. "type": "string"
  8493. },
  8494. "required": false
  8495. },
  8496. {
  8497. "name": "workspace",
  8498. "in": "query",
  8499. "schema": {
  8500. "type": "string"
  8501. },
  8502. "required": false
  8503. }
  8504. ],
  8505. "responses": {
  8506. "200": {
  8507. "description": "Sync events",
  8508. "content": {
  8509. "application/json": {
  8510. "schema": {
  8511. "type": "array",
  8512. "items": {
  8513. "type": "object",
  8514. "properties": {
  8515. "id": {
  8516. "type": "string",
  8517. "pattern": "^evt_"
  8518. },
  8519. "aggregate_id": {
  8520. "type": "string"
  8521. },
  8522. "seq": {
  8523. "type": "integer",
  8524. "minimum": 0
  8525. },
  8526. "type": {
  8527. "type": "string"
  8528. },
  8529. "data": {
  8530. "type": "object"
  8531. }
  8532. },
  8533. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8534. "additionalProperties": false
  8535. },
  8536. "description": "Sync events"
  8537. }
  8538. }
  8539. }
  8540. },
  8541. "400": {
  8542. "description": "BadRequest | InvalidRequestError",
  8543. "content": {
  8544. "application/json": {
  8545. "schema": {
  8546. "anyOf": [
  8547. {
  8548. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8549. },
  8550. {
  8551. "$ref": "#/components/schemas/InvalidRequestError"
  8552. }
  8553. ]
  8554. }
  8555. }
  8556. }
  8557. }
  8558. },
  8559. "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.",
  8560. "summary": "List sync events",
  8561. "requestBody": {
  8562. "content": {
  8563. "application/json": {
  8564. "schema": {
  8565. "type": "object",
  8566. "additionalProperties": {
  8567. "type": "integer",
  8568. "minimum": 0
  8569. }
  8570. }
  8571. }
  8572. }
  8573. },
  8574. "x-codeSamples": [
  8575. {
  8576. "lang": "js",
  8577. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8578. }
  8579. ]
  8580. }
  8581. },
  8582. "/tui/append-prompt": {
  8583. "post": {
  8584. "tags": ["tui"],
  8585. "operationId": "tui.appendPrompt",
  8586. "parameters": [
  8587. {
  8588. "name": "directory",
  8589. "in": "query",
  8590. "schema": {
  8591. "type": "string"
  8592. },
  8593. "required": false
  8594. },
  8595. {
  8596. "name": "workspace",
  8597. "in": "query",
  8598. "schema": {
  8599. "type": "string"
  8600. },
  8601. "required": false
  8602. }
  8603. ],
  8604. "responses": {
  8605. "200": {
  8606. "description": "Prompt processed successfully",
  8607. "content": {
  8608. "application/json": {
  8609. "schema": {
  8610. "type": "boolean",
  8611. "description": "Prompt processed successfully"
  8612. }
  8613. }
  8614. }
  8615. },
  8616. "400": {
  8617. "description": "BadRequest | InvalidRequestError",
  8618. "content": {
  8619. "application/json": {
  8620. "schema": {
  8621. "anyOf": [
  8622. {
  8623. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8624. },
  8625. {
  8626. "$ref": "#/components/schemas/InvalidRequestError"
  8627. }
  8628. ]
  8629. }
  8630. }
  8631. }
  8632. }
  8633. },
  8634. "description": "Append prompt to the TUI.",
  8635. "summary": "Append TUI prompt",
  8636. "requestBody": {
  8637. "content": {
  8638. "application/json": {
  8639. "schema": {
  8640. "type": "object",
  8641. "properties": {
  8642. "text": {
  8643. "type": "string"
  8644. }
  8645. },
  8646. "required": ["text"],
  8647. "additionalProperties": false
  8648. }
  8649. }
  8650. }
  8651. },
  8652. "x-codeSamples": [
  8653. {
  8654. "lang": "js",
  8655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8656. }
  8657. ]
  8658. }
  8659. },
  8660. "/tui/open-help": {
  8661. "post": {
  8662. "tags": ["tui"],
  8663. "operationId": "tui.openHelp",
  8664. "parameters": [
  8665. {
  8666. "name": "directory",
  8667. "in": "query",
  8668. "schema": {
  8669. "type": "string"
  8670. },
  8671. "required": false
  8672. },
  8673. {
  8674. "name": "workspace",
  8675. "in": "query",
  8676. "schema": {
  8677. "type": "string"
  8678. },
  8679. "required": false
  8680. }
  8681. ],
  8682. "responses": {
  8683. "200": {
  8684. "description": "Help dialog opened successfully",
  8685. "content": {
  8686. "application/json": {
  8687. "schema": {
  8688. "type": "boolean",
  8689. "description": "Help dialog opened successfully"
  8690. }
  8691. }
  8692. }
  8693. },
  8694. "400": {
  8695. "description": "Bad request",
  8696. "content": {
  8697. "application/json": {
  8698. "schema": {
  8699. "$ref": "#/components/schemas/BadRequestError"
  8700. }
  8701. }
  8702. }
  8703. }
  8704. },
  8705. "description": "Open the help dialog in the TUI to display user assistance information.",
  8706. "summary": "Open help dialog",
  8707. "x-codeSamples": [
  8708. {
  8709. "lang": "js",
  8710. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8711. }
  8712. ]
  8713. }
  8714. },
  8715. "/tui/open-sessions": {
  8716. "post": {
  8717. "tags": ["tui"],
  8718. "operationId": "tui.openSessions",
  8719. "parameters": [
  8720. {
  8721. "name": "directory",
  8722. "in": "query",
  8723. "schema": {
  8724. "type": "string"
  8725. },
  8726. "required": false
  8727. },
  8728. {
  8729. "name": "workspace",
  8730. "in": "query",
  8731. "schema": {
  8732. "type": "string"
  8733. },
  8734. "required": false
  8735. }
  8736. ],
  8737. "responses": {
  8738. "200": {
  8739. "description": "Session dialog opened successfully",
  8740. "content": {
  8741. "application/json": {
  8742. "schema": {
  8743. "type": "boolean",
  8744. "description": "Session dialog opened successfully"
  8745. }
  8746. }
  8747. }
  8748. },
  8749. "400": {
  8750. "description": "Bad request",
  8751. "content": {
  8752. "application/json": {
  8753. "schema": {
  8754. "$ref": "#/components/schemas/BadRequestError"
  8755. }
  8756. }
  8757. }
  8758. }
  8759. },
  8760. "description": "Open the session dialog.",
  8761. "summary": "Open sessions dialog",
  8762. "x-codeSamples": [
  8763. {
  8764. "lang": "js",
  8765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8766. }
  8767. ]
  8768. }
  8769. },
  8770. "/tui/open-themes": {
  8771. "post": {
  8772. "tags": ["tui"],
  8773. "operationId": "tui.openThemes",
  8774. "parameters": [
  8775. {
  8776. "name": "directory",
  8777. "in": "query",
  8778. "schema": {
  8779. "type": "string"
  8780. },
  8781. "required": false
  8782. },
  8783. {
  8784. "name": "workspace",
  8785. "in": "query",
  8786. "schema": {
  8787. "type": "string"
  8788. },
  8789. "required": false
  8790. }
  8791. ],
  8792. "responses": {
  8793. "200": {
  8794. "description": "Theme dialog opened successfully",
  8795. "content": {
  8796. "application/json": {
  8797. "schema": {
  8798. "type": "boolean",
  8799. "description": "Theme dialog opened successfully"
  8800. }
  8801. }
  8802. }
  8803. },
  8804. "400": {
  8805. "description": "Bad request",
  8806. "content": {
  8807. "application/json": {
  8808. "schema": {
  8809. "$ref": "#/components/schemas/BadRequestError"
  8810. }
  8811. }
  8812. }
  8813. }
  8814. },
  8815. "description": "Open the theme dialog.",
  8816. "summary": "Open themes dialog",
  8817. "x-codeSamples": [
  8818. {
  8819. "lang": "js",
  8820. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8821. }
  8822. ]
  8823. }
  8824. },
  8825. "/tui/open-models": {
  8826. "post": {
  8827. "tags": ["tui"],
  8828. "operationId": "tui.openModels",
  8829. "parameters": [
  8830. {
  8831. "name": "directory",
  8832. "in": "query",
  8833. "schema": {
  8834. "type": "string"
  8835. },
  8836. "required": false
  8837. },
  8838. {
  8839. "name": "workspace",
  8840. "in": "query",
  8841. "schema": {
  8842. "type": "string"
  8843. },
  8844. "required": false
  8845. }
  8846. ],
  8847. "responses": {
  8848. "200": {
  8849. "description": "Model dialog opened successfully",
  8850. "content": {
  8851. "application/json": {
  8852. "schema": {
  8853. "type": "boolean",
  8854. "description": "Model dialog opened successfully"
  8855. }
  8856. }
  8857. }
  8858. },
  8859. "400": {
  8860. "description": "Bad request",
  8861. "content": {
  8862. "application/json": {
  8863. "schema": {
  8864. "$ref": "#/components/schemas/BadRequestError"
  8865. }
  8866. }
  8867. }
  8868. }
  8869. },
  8870. "description": "Open the model dialog.",
  8871. "summary": "Open models dialog",
  8872. "x-codeSamples": [
  8873. {
  8874. "lang": "js",
  8875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8876. }
  8877. ]
  8878. }
  8879. },
  8880. "/tui/submit-prompt": {
  8881. "post": {
  8882. "tags": ["tui"],
  8883. "operationId": "tui.submitPrompt",
  8884. "parameters": [
  8885. {
  8886. "name": "directory",
  8887. "in": "query",
  8888. "schema": {
  8889. "type": "string"
  8890. },
  8891. "required": false
  8892. },
  8893. {
  8894. "name": "workspace",
  8895. "in": "query",
  8896. "schema": {
  8897. "type": "string"
  8898. },
  8899. "required": false
  8900. }
  8901. ],
  8902. "responses": {
  8903. "200": {
  8904. "description": "Prompt submitted successfully",
  8905. "content": {
  8906. "application/json": {
  8907. "schema": {
  8908. "type": "boolean",
  8909. "description": "Prompt submitted successfully"
  8910. }
  8911. }
  8912. }
  8913. },
  8914. "400": {
  8915. "description": "Bad request",
  8916. "content": {
  8917. "application/json": {
  8918. "schema": {
  8919. "$ref": "#/components/schemas/BadRequestError"
  8920. }
  8921. }
  8922. }
  8923. }
  8924. },
  8925. "description": "Submit the prompt.",
  8926. "summary": "Submit TUI prompt",
  8927. "x-codeSamples": [
  8928. {
  8929. "lang": "js",
  8930. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8931. }
  8932. ]
  8933. }
  8934. },
  8935. "/tui/clear-prompt": {
  8936. "post": {
  8937. "tags": ["tui"],
  8938. "operationId": "tui.clearPrompt",
  8939. "parameters": [
  8940. {
  8941. "name": "directory",
  8942. "in": "query",
  8943. "schema": {
  8944. "type": "string"
  8945. },
  8946. "required": false
  8947. },
  8948. {
  8949. "name": "workspace",
  8950. "in": "query",
  8951. "schema": {
  8952. "type": "string"
  8953. },
  8954. "required": false
  8955. }
  8956. ],
  8957. "responses": {
  8958. "200": {
  8959. "description": "Prompt cleared successfully",
  8960. "content": {
  8961. "application/json": {
  8962. "schema": {
  8963. "type": "boolean",
  8964. "description": "Prompt cleared successfully"
  8965. }
  8966. }
  8967. }
  8968. },
  8969. "400": {
  8970. "description": "Bad request",
  8971. "content": {
  8972. "application/json": {
  8973. "schema": {
  8974. "$ref": "#/components/schemas/BadRequestError"
  8975. }
  8976. }
  8977. }
  8978. }
  8979. },
  8980. "description": "Clear the prompt.",
  8981. "summary": "Clear TUI prompt",
  8982. "x-codeSamples": [
  8983. {
  8984. "lang": "js",
  8985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8986. }
  8987. ]
  8988. }
  8989. },
  8990. "/tui/execute-command": {
  8991. "post": {
  8992. "tags": ["tui"],
  8993. "operationId": "tui.executeCommand",
  8994. "parameters": [
  8995. {
  8996. "name": "directory",
  8997. "in": "query",
  8998. "schema": {
  8999. "type": "string"
  9000. },
  9001. "required": false
  9002. },
  9003. {
  9004. "name": "workspace",
  9005. "in": "query",
  9006. "schema": {
  9007. "type": "string"
  9008. },
  9009. "required": false
  9010. }
  9011. ],
  9012. "responses": {
  9013. "200": {
  9014. "description": "Command executed successfully",
  9015. "content": {
  9016. "application/json": {
  9017. "schema": {
  9018. "type": "boolean",
  9019. "description": "Command executed successfully"
  9020. }
  9021. }
  9022. }
  9023. },
  9024. "400": {
  9025. "description": "BadRequest | InvalidRequestError",
  9026. "content": {
  9027. "application/json": {
  9028. "schema": {
  9029. "anyOf": [
  9030. {
  9031. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9032. },
  9033. {
  9034. "$ref": "#/components/schemas/InvalidRequestError"
  9035. }
  9036. ]
  9037. }
  9038. }
  9039. }
  9040. }
  9041. },
  9042. "description": "Execute a TUI command.",
  9043. "summary": "Execute TUI command",
  9044. "requestBody": {
  9045. "content": {
  9046. "application/json": {
  9047. "schema": {
  9048. "type": "object",
  9049. "properties": {
  9050. "command": {
  9051. "type": "string"
  9052. }
  9053. },
  9054. "required": ["command"],
  9055. "additionalProperties": false
  9056. }
  9057. }
  9058. }
  9059. },
  9060. "x-codeSamples": [
  9061. {
  9062. "lang": "js",
  9063. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9064. }
  9065. ]
  9066. }
  9067. },
  9068. "/tui/show-toast": {
  9069. "post": {
  9070. "tags": ["tui"],
  9071. "operationId": "tui.showToast",
  9072. "parameters": [
  9073. {
  9074. "name": "directory",
  9075. "in": "query",
  9076. "schema": {
  9077. "type": "string"
  9078. },
  9079. "required": false
  9080. },
  9081. {
  9082. "name": "workspace",
  9083. "in": "query",
  9084. "schema": {
  9085. "type": "string"
  9086. },
  9087. "required": false
  9088. }
  9089. ],
  9090. "responses": {
  9091. "200": {
  9092. "description": "Toast notification shown successfully",
  9093. "content": {
  9094. "application/json": {
  9095. "schema": {
  9096. "type": "boolean",
  9097. "description": "Toast notification shown successfully"
  9098. }
  9099. }
  9100. }
  9101. },
  9102. "400": {
  9103. "description": "Bad request",
  9104. "content": {
  9105. "application/json": {
  9106. "schema": {
  9107. "$ref": "#/components/schemas/BadRequestError"
  9108. }
  9109. }
  9110. }
  9111. }
  9112. },
  9113. "description": "Show a toast notification in the TUI.",
  9114. "summary": "Show TUI toast",
  9115. "requestBody": {
  9116. "content": {
  9117. "application/json": {
  9118. "schema": {
  9119. "type": "object",
  9120. "properties": {
  9121. "title": {
  9122. "type": "string"
  9123. },
  9124. "message": {
  9125. "type": "string"
  9126. },
  9127. "variant": {
  9128. "type": "string",
  9129. "enum": ["info", "success", "warning", "error"]
  9130. },
  9131. "duration": {
  9132. "type": "integer",
  9133. "exclusiveMinimum": 0
  9134. }
  9135. },
  9136. "required": ["message", "variant"],
  9137. "additionalProperties": false
  9138. }
  9139. }
  9140. }
  9141. },
  9142. "x-codeSamples": [
  9143. {
  9144. "lang": "js",
  9145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9146. }
  9147. ]
  9148. }
  9149. },
  9150. "/tui/publish": {
  9151. "post": {
  9152. "tags": ["tui"],
  9153. "operationId": "tui.publish",
  9154. "parameters": [
  9155. {
  9156. "name": "directory",
  9157. "in": "query",
  9158. "schema": {
  9159. "type": "string"
  9160. },
  9161. "required": false
  9162. },
  9163. {
  9164. "name": "workspace",
  9165. "in": "query",
  9166. "schema": {
  9167. "type": "string"
  9168. },
  9169. "required": false
  9170. }
  9171. ],
  9172. "responses": {
  9173. "200": {
  9174. "description": "Event published successfully",
  9175. "content": {
  9176. "application/json": {
  9177. "schema": {
  9178. "type": "boolean",
  9179. "description": "Event published successfully"
  9180. }
  9181. }
  9182. }
  9183. },
  9184. "400": {
  9185. "description": "BadRequest | InvalidRequestError",
  9186. "content": {
  9187. "application/json": {
  9188. "schema": {
  9189. "anyOf": [
  9190. {
  9191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9192. },
  9193. {
  9194. "$ref": "#/components/schemas/InvalidRequestError"
  9195. }
  9196. ]
  9197. }
  9198. }
  9199. }
  9200. }
  9201. },
  9202. "description": "Publish a TUI event.",
  9203. "summary": "Publish TUI event",
  9204. "requestBody": {
  9205. "content": {
  9206. "application/json": {
  9207. "schema": {
  9208. "anyOf": [
  9209. {
  9210. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9211. },
  9212. {
  9213. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9214. },
  9215. {
  9216. "$ref": "#/components/schemas/EventTuiToastShow"
  9217. },
  9218. {
  9219. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9220. }
  9221. ]
  9222. }
  9223. }
  9224. }
  9225. },
  9226. "x-codeSamples": [
  9227. {
  9228. "lang": "js",
  9229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9230. }
  9231. ]
  9232. }
  9233. },
  9234. "/tui/select-session": {
  9235. "post": {
  9236. "tags": ["tui"],
  9237. "operationId": "tui.selectSession",
  9238. "parameters": [
  9239. {
  9240. "name": "directory",
  9241. "in": "query",
  9242. "schema": {
  9243. "type": "string"
  9244. },
  9245. "required": false
  9246. },
  9247. {
  9248. "name": "workspace",
  9249. "in": "query",
  9250. "schema": {
  9251. "type": "string"
  9252. },
  9253. "required": false
  9254. }
  9255. ],
  9256. "responses": {
  9257. "200": {
  9258. "description": "Session selected successfully",
  9259. "content": {
  9260. "application/json": {
  9261. "schema": {
  9262. "type": "boolean",
  9263. "description": "Session selected successfully"
  9264. }
  9265. }
  9266. }
  9267. },
  9268. "400": {
  9269. "description": "BadRequest | InvalidRequestError",
  9270. "content": {
  9271. "application/json": {
  9272. "schema": {
  9273. "anyOf": [
  9274. {
  9275. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9276. },
  9277. {
  9278. "$ref": "#/components/schemas/InvalidRequestError"
  9279. }
  9280. ]
  9281. }
  9282. }
  9283. }
  9284. },
  9285. "404": {
  9286. "description": "NotFoundError",
  9287. "content": {
  9288. "application/json": {
  9289. "schema": {
  9290. "$ref": "#/components/schemas/NotFoundError"
  9291. }
  9292. }
  9293. }
  9294. }
  9295. },
  9296. "description": "Navigate the TUI to display the specified session.",
  9297. "summary": "Select session",
  9298. "requestBody": {
  9299. "content": {
  9300. "application/json": {
  9301. "schema": {
  9302. "type": "object",
  9303. "properties": {
  9304. "sessionID": {
  9305. "type": "string",
  9306. "pattern": "^ses",
  9307. "description": "Session ID to navigate to"
  9308. }
  9309. },
  9310. "required": ["sessionID"],
  9311. "additionalProperties": false
  9312. }
  9313. }
  9314. }
  9315. },
  9316. "x-codeSamples": [
  9317. {
  9318. "lang": "js",
  9319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9320. }
  9321. ]
  9322. }
  9323. },
  9324. "/tui/control/next": {
  9325. "get": {
  9326. "tags": ["tui"],
  9327. "operationId": "tui.control.next",
  9328. "parameters": [
  9329. {
  9330. "name": "directory",
  9331. "in": "query",
  9332. "schema": {
  9333. "type": "string"
  9334. },
  9335. "required": false
  9336. },
  9337. {
  9338. "name": "workspace",
  9339. "in": "query",
  9340. "schema": {
  9341. "type": "string"
  9342. },
  9343. "required": false
  9344. }
  9345. ],
  9346. "responses": {
  9347. "200": {
  9348. "description": "Next TUI request",
  9349. "content": {
  9350. "application/json": {
  9351. "schema": {
  9352. "type": "object",
  9353. "properties": {
  9354. "path": {
  9355. "type": "string"
  9356. },
  9357. "body": {}
  9358. },
  9359. "required": ["path", "body"],
  9360. "additionalProperties": false,
  9361. "description": "Next TUI request"
  9362. }
  9363. }
  9364. }
  9365. },
  9366. "400": {
  9367. "description": "Bad request",
  9368. "content": {
  9369. "application/json": {
  9370. "schema": {
  9371. "$ref": "#/components/schemas/BadRequestError"
  9372. }
  9373. }
  9374. }
  9375. }
  9376. },
  9377. "description": "Retrieve the next TUI request from the queue for processing.",
  9378. "summary": "Get next TUI request",
  9379. "x-codeSamples": [
  9380. {
  9381. "lang": "js",
  9382. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9383. }
  9384. ]
  9385. }
  9386. },
  9387. "/tui/control/response": {
  9388. "post": {
  9389. "tags": ["tui"],
  9390. "operationId": "tui.control.response",
  9391. "parameters": [
  9392. {
  9393. "name": "directory",
  9394. "in": "query",
  9395. "schema": {
  9396. "type": "string"
  9397. },
  9398. "required": false
  9399. },
  9400. {
  9401. "name": "workspace",
  9402. "in": "query",
  9403. "schema": {
  9404. "type": "string"
  9405. },
  9406. "required": false
  9407. }
  9408. ],
  9409. "responses": {
  9410. "200": {
  9411. "description": "Response submitted successfully",
  9412. "content": {
  9413. "application/json": {
  9414. "schema": {
  9415. "type": "boolean",
  9416. "description": "Response submitted successfully"
  9417. }
  9418. }
  9419. }
  9420. },
  9421. "400": {
  9422. "description": "Bad request",
  9423. "content": {
  9424. "application/json": {
  9425. "schema": {
  9426. "$ref": "#/components/schemas/BadRequestError"
  9427. }
  9428. }
  9429. }
  9430. }
  9431. },
  9432. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9433. "summary": "Submit TUI response",
  9434. "requestBody": {
  9435. "content": {
  9436. "application/json": {
  9437. "schema": {}
  9438. }
  9439. }
  9440. },
  9441. "x-codeSamples": [
  9442. {
  9443. "lang": "js",
  9444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9445. }
  9446. ]
  9447. }
  9448. },
  9449. "/experimental/workspace/adapter": {
  9450. "get": {
  9451. "tags": ["workspace"],
  9452. "operationId": "experimental.workspace.adapter.list",
  9453. "parameters": [
  9454. {
  9455. "name": "directory",
  9456. "in": "query",
  9457. "schema": {
  9458. "type": "string"
  9459. },
  9460. "required": false
  9461. },
  9462. {
  9463. "name": "workspace",
  9464. "in": "query",
  9465. "schema": {
  9466. "type": "string"
  9467. },
  9468. "required": false
  9469. }
  9470. ],
  9471. "responses": {
  9472. "200": {
  9473. "description": "Workspace adapters",
  9474. "content": {
  9475. "application/json": {
  9476. "schema": {
  9477. "type": "array",
  9478. "items": {
  9479. "type": "object",
  9480. "properties": {
  9481. "type": {
  9482. "type": "string"
  9483. },
  9484. "name": {
  9485. "type": "string"
  9486. },
  9487. "description": {
  9488. "type": "string"
  9489. }
  9490. },
  9491. "required": ["type", "name", "description"],
  9492. "additionalProperties": false
  9493. },
  9494. "description": "Workspace adapters"
  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 available workspace adapters for the current project.",
  9511. "summary": "List workspace adapters",
  9512. "x-codeSamples": [
  9513. {
  9514. "lang": "js",
  9515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9516. }
  9517. ]
  9518. }
  9519. },
  9520. "/experimental/workspace": {
  9521. "get": {
  9522. "tags": ["workspace"],
  9523. "operationId": "experimental.workspace.list",
  9524. "parameters": [
  9525. {
  9526. "name": "directory",
  9527. "in": "query",
  9528. "schema": {
  9529. "type": "string"
  9530. },
  9531. "required": false
  9532. },
  9533. {
  9534. "name": "workspace",
  9535. "in": "query",
  9536. "schema": {
  9537. "type": "string"
  9538. },
  9539. "required": false
  9540. }
  9541. ],
  9542. "responses": {
  9543. "200": {
  9544. "description": "Workspaces",
  9545. "content": {
  9546. "application/json": {
  9547. "schema": {
  9548. "type": "array",
  9549. "items": {
  9550. "$ref": "#/components/schemas/Workspace"
  9551. },
  9552. "description": "Workspaces"
  9553. }
  9554. }
  9555. }
  9556. },
  9557. "400": {
  9558. "description": "Bad request",
  9559. "content": {
  9560. "application/json": {
  9561. "schema": {
  9562. "$ref": "#/components/schemas/BadRequestError"
  9563. }
  9564. }
  9565. }
  9566. }
  9567. },
  9568. "description": "List all workspaces.",
  9569. "summary": "List workspaces",
  9570. "x-codeSamples": [
  9571. {
  9572. "lang": "js",
  9573. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9574. }
  9575. ]
  9576. },
  9577. "post": {
  9578. "tags": ["workspace"],
  9579. "operationId": "experimental.workspace.create",
  9580. "parameters": [
  9581. {
  9582. "name": "directory",
  9583. "in": "query",
  9584. "schema": {
  9585. "type": "string"
  9586. },
  9587. "required": false
  9588. },
  9589. {
  9590. "name": "workspace",
  9591. "in": "query",
  9592. "schema": {
  9593. "type": "string"
  9594. },
  9595. "required": false
  9596. }
  9597. ],
  9598. "responses": {
  9599. "200": {
  9600. "description": "Workspace created",
  9601. "content": {
  9602. "application/json": {
  9603. "schema": {
  9604. "$ref": "#/components/schemas/Workspace"
  9605. }
  9606. }
  9607. }
  9608. },
  9609. "400": {
  9610. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9611. "content": {
  9612. "application/json": {
  9613. "schema": {
  9614. "anyOf": [
  9615. {
  9616. "$ref": "#/components/schemas/WorkspaceCreateError"
  9617. },
  9618. {
  9619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9620. },
  9621. {
  9622. "$ref": "#/components/schemas/InvalidRequestError"
  9623. }
  9624. ]
  9625. }
  9626. }
  9627. }
  9628. }
  9629. },
  9630. "description": "Create a workspace for the current project.",
  9631. "summary": "Create workspace",
  9632. "requestBody": {
  9633. "content": {
  9634. "application/json": {
  9635. "schema": {
  9636. "type": "object",
  9637. "properties": {
  9638. "id": {
  9639. "type": "string",
  9640. "pattern": "^wrk"
  9641. },
  9642. "type": {
  9643. "type": "string"
  9644. },
  9645. "branch": {
  9646. "anyOf": [
  9647. {
  9648. "type": "string"
  9649. },
  9650. {
  9651. "type": "null"
  9652. }
  9653. ]
  9654. },
  9655. "extra": {
  9656. "anyOf": [
  9657. {},
  9658. {
  9659. "type": "null"
  9660. }
  9661. ]
  9662. }
  9663. },
  9664. "required": ["type"],
  9665. "additionalProperties": false
  9666. }
  9667. }
  9668. }
  9669. },
  9670. "x-codeSamples": [
  9671. {
  9672. "lang": "js",
  9673. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9674. }
  9675. ]
  9676. }
  9677. },
  9678. "/experimental/workspace/sync-list": {
  9679. "post": {
  9680. "tags": ["workspace"],
  9681. "operationId": "experimental.workspace.syncList",
  9682. "parameters": [
  9683. {
  9684. "name": "directory",
  9685. "in": "query",
  9686. "schema": {
  9687. "type": "string"
  9688. },
  9689. "required": false
  9690. },
  9691. {
  9692. "name": "workspace",
  9693. "in": "query",
  9694. "schema": {
  9695. "type": "string"
  9696. },
  9697. "required": false
  9698. }
  9699. ],
  9700. "responses": {
  9701. "204": {
  9702. "description": "Workspace list synced"
  9703. },
  9704. "400": {
  9705. "description": "Bad request",
  9706. "content": {
  9707. "application/json": {
  9708. "schema": {
  9709. "$ref": "#/components/schemas/BadRequestError"
  9710. }
  9711. }
  9712. }
  9713. }
  9714. },
  9715. "description": "Register missing workspaces returned by workspace adapters.",
  9716. "summary": "Sync workspace list",
  9717. "x-codeSamples": [
  9718. {
  9719. "lang": "js",
  9720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9721. }
  9722. ]
  9723. }
  9724. },
  9725. "/experimental/workspace/status": {
  9726. "get": {
  9727. "tags": ["workspace"],
  9728. "operationId": "experimental.workspace.status",
  9729. "parameters": [
  9730. {
  9731. "name": "directory",
  9732. "in": "query",
  9733. "schema": {
  9734. "type": "string"
  9735. },
  9736. "required": false
  9737. },
  9738. {
  9739. "name": "workspace",
  9740. "in": "query",
  9741. "schema": {
  9742. "type": "string"
  9743. },
  9744. "required": false
  9745. }
  9746. ],
  9747. "responses": {
  9748. "200": {
  9749. "description": "Workspace status",
  9750. "content": {
  9751. "application/json": {
  9752. "schema": {
  9753. "type": "array",
  9754. "items": {
  9755. "type": "object",
  9756. "properties": {
  9757. "workspaceID": {
  9758. "type": "string",
  9759. "pattern": "^wrk"
  9760. },
  9761. "status": {
  9762. "type": "string",
  9763. "enum": ["connected", "connecting", "disconnected", "error"]
  9764. }
  9765. },
  9766. "required": ["workspaceID", "status"],
  9767. "additionalProperties": false
  9768. },
  9769. "description": "Workspace status"
  9770. }
  9771. }
  9772. }
  9773. },
  9774. "400": {
  9775. "description": "Bad request",
  9776. "content": {
  9777. "application/json": {
  9778. "schema": {
  9779. "$ref": "#/components/schemas/BadRequestError"
  9780. }
  9781. }
  9782. }
  9783. }
  9784. },
  9785. "description": "Get connection status for workspaces in the current project.",
  9786. "summary": "Workspace status",
  9787. "x-codeSamples": [
  9788. {
  9789. "lang": "js",
  9790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9791. }
  9792. ]
  9793. }
  9794. },
  9795. "/experimental/workspace/{id}": {
  9796. "delete": {
  9797. "tags": ["workspace"],
  9798. "operationId": "experimental.workspace.remove",
  9799. "parameters": [
  9800. {
  9801. "name": "id",
  9802. "in": "path",
  9803. "schema": {
  9804. "type": "string",
  9805. "pattern": "^wrk"
  9806. },
  9807. "required": true
  9808. },
  9809. {
  9810. "name": "directory",
  9811. "in": "query",
  9812. "schema": {
  9813. "type": "string"
  9814. },
  9815. "required": false
  9816. },
  9817. {
  9818. "name": "workspace",
  9819. "in": "query",
  9820. "schema": {
  9821. "type": "string"
  9822. },
  9823. "required": false
  9824. }
  9825. ],
  9826. "responses": {
  9827. "200": {
  9828. "description": "Workspace removed",
  9829. "content": {
  9830. "application/json": {
  9831. "schema": {
  9832. "$ref": "#/components/schemas/Workspace"
  9833. }
  9834. }
  9835. }
  9836. },
  9837. "400": {
  9838. "description": "BadRequest | InvalidRequestError",
  9839. "content": {
  9840. "application/json": {
  9841. "schema": {
  9842. "anyOf": [
  9843. {
  9844. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9845. },
  9846. {
  9847. "$ref": "#/components/schemas/InvalidRequestError"
  9848. }
  9849. ]
  9850. }
  9851. }
  9852. }
  9853. }
  9854. },
  9855. "description": "Remove an existing workspace.",
  9856. "summary": "Remove workspace",
  9857. "x-codeSamples": [
  9858. {
  9859. "lang": "js",
  9860. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9861. }
  9862. ]
  9863. }
  9864. },
  9865. "/experimental/workspace/warp": {
  9866. "post": {
  9867. "tags": ["workspace"],
  9868. "operationId": "experimental.workspace.warp",
  9869. "parameters": [
  9870. {
  9871. "name": "directory",
  9872. "in": "query",
  9873. "schema": {
  9874. "type": "string"
  9875. },
  9876. "required": false
  9877. },
  9878. {
  9879. "name": "workspace",
  9880. "in": "query",
  9881. "schema": {
  9882. "type": "string"
  9883. },
  9884. "required": false
  9885. }
  9886. ],
  9887. "responses": {
  9888. "204": {
  9889. "description": "Session warped"
  9890. },
  9891. "400": {
  9892. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9893. "content": {
  9894. "application/json": {
  9895. "schema": {
  9896. "anyOf": [
  9897. {
  9898. "$ref": "#/components/schemas/WorkspaceWarpError"
  9899. },
  9900. {
  9901. "$ref": "#/components/schemas/VcsApplyError"
  9902. },
  9903. {
  9904. "$ref": "#/components/schemas/InvalidRequestError"
  9905. }
  9906. ]
  9907. }
  9908. }
  9909. }
  9910. },
  9911. "404": {
  9912. "description": "NotFoundError",
  9913. "content": {
  9914. "application/json": {
  9915. "schema": {
  9916. "$ref": "#/components/schemas/NotFoundError"
  9917. }
  9918. }
  9919. }
  9920. }
  9921. },
  9922. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9923. "summary": "Warp session into workspace",
  9924. "requestBody": {
  9925. "content": {
  9926. "application/json": {
  9927. "schema": {
  9928. "type": "object",
  9929. "properties": {
  9930. "id": {
  9931. "anyOf": [
  9932. {
  9933. "type": "string",
  9934. "pattern": "^wrk"
  9935. },
  9936. {
  9937. "type": "null"
  9938. }
  9939. ]
  9940. },
  9941. "sessionID": {
  9942. "type": "string",
  9943. "pattern": "^ses"
  9944. },
  9945. "copyChanges": {
  9946. "type": "boolean"
  9947. }
  9948. },
  9949. "required": ["id", "sessionID"],
  9950. "additionalProperties": false
  9951. }
  9952. }
  9953. }
  9954. },
  9955. "x-codeSamples": [
  9956. {
  9957. "lang": "js",
  9958. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9959. }
  9960. ]
  9961. }
  9962. },
  9963. "/api/health": {
  9964. "get": {
  9965. "tags": ["opencode HttpApi"],
  9966. "operationId": "v2.health.get",
  9967. "parameters": [],
  9968. "security": [],
  9969. "responses": {
  9970. "200": {
  9971. "description": "Success",
  9972. "content": {
  9973. "application/json": {
  9974. "schema": {
  9975. "type": "object",
  9976. "properties": {
  9977. "healthy": {
  9978. "type": "boolean",
  9979. "enum": [true]
  9980. }
  9981. },
  9982. "required": ["healthy"],
  9983. "additionalProperties": false
  9984. }
  9985. }
  9986. }
  9987. },
  9988. "400": {
  9989. "description": "InvalidRequestError",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "$ref": "#/components/schemas/InvalidRequestError"
  9994. }
  9995. }
  9996. }
  9997. },
  9998. "401": {
  9999. "description": "UnauthorizedError",
  10000. "content": {
  10001. "application/json": {
  10002. "schema": {
  10003. "$ref": "#/components/schemas/UnauthorizedError"
  10004. }
  10005. }
  10006. }
  10007. }
  10008. },
  10009. "description": "Check whether the API server is ready to accept requests.",
  10010. "summary": "Check server health",
  10011. "x-codeSamples": [
  10012. {
  10013. "lang": "js",
  10014. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  10015. }
  10016. ]
  10017. }
  10018. },
  10019. "/api/agent": {
  10020. "get": {
  10021. "tags": ["opencode HttpApi"],
  10022. "operationId": "v2.agent.list",
  10023. "parameters": [
  10024. {
  10025. "name": "location",
  10026. "in": "query",
  10027. "schema": {
  10028. "type": "object",
  10029. "properties": {
  10030. "directory": {
  10031. "type": "string"
  10032. },
  10033. "workspace": {
  10034. "type": "string"
  10035. }
  10036. },
  10037. "additionalProperties": false
  10038. },
  10039. "required": false,
  10040. "style": "deepObject",
  10041. "explode": true
  10042. }
  10043. ],
  10044. "security": [],
  10045. "responses": {
  10046. "200": {
  10047. "description": "Success",
  10048. "content": {
  10049. "application/json": {
  10050. "schema": {
  10051. "type": "object",
  10052. "properties": {
  10053. "location": {
  10054. "$ref": "#/components/schemas/LocationInfo"
  10055. },
  10056. "data": {
  10057. "type": "array",
  10058. "items": {
  10059. "$ref": "#/components/schemas/AgentV2Info"
  10060. }
  10061. }
  10062. },
  10063. "required": ["location", "data"],
  10064. "additionalProperties": false
  10065. }
  10066. }
  10067. }
  10068. },
  10069. "400": {
  10070. "description": "InvalidRequestError",
  10071. "content": {
  10072. "application/json": {
  10073. "schema": {
  10074. "$ref": "#/components/schemas/InvalidRequestError"
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "401": {
  10080. "description": "UnauthorizedError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "$ref": "#/components/schemas/UnauthorizedError"
  10085. }
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "description": "Retrieve currently registered agents.",
  10091. "summary": "List agents",
  10092. "x-codeSamples": [
  10093. {
  10094. "lang": "js",
  10095. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10096. }
  10097. ]
  10098. }
  10099. },
  10100. "/api/session": {
  10101. "get": {
  10102. "tags": ["sessions"],
  10103. "operationId": "v2.session.list",
  10104. "parameters": [
  10105. {
  10106. "name": "workspace",
  10107. "in": "query",
  10108. "schema": {
  10109. "type": "string",
  10110. "pattern": "^wrk"
  10111. },
  10112. "required": false
  10113. },
  10114. {
  10115. "name": "limit",
  10116. "in": "query",
  10117. "schema": {
  10118. "type": "number"
  10119. },
  10120. "required": false
  10121. },
  10122. {
  10123. "name": "order",
  10124. "in": "query",
  10125. "schema": {
  10126. "type": "string",
  10127. "enum": ["asc", "desc"]
  10128. },
  10129. "required": false
  10130. },
  10131. {
  10132. "name": "search",
  10133. "in": "query",
  10134. "schema": {
  10135. "type": "string"
  10136. },
  10137. "required": false
  10138. },
  10139. {
  10140. "name": "directory",
  10141. "in": "query",
  10142. "schema": {
  10143. "type": "string"
  10144. },
  10145. "required": false
  10146. },
  10147. {
  10148. "name": "project",
  10149. "in": "query",
  10150. "schema": {
  10151. "type": "string"
  10152. },
  10153. "required": false
  10154. },
  10155. {
  10156. "name": "subpath",
  10157. "in": "query",
  10158. "schema": {
  10159. "type": "string"
  10160. },
  10161. "required": false
  10162. },
  10163. {
  10164. "name": "cursor",
  10165. "in": "query",
  10166. "schema": {
  10167. "type": "string",
  10168. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10169. },
  10170. "required": false
  10171. }
  10172. ],
  10173. "security": [],
  10174. "responses": {
  10175. "200": {
  10176. "description": "SessionsResponse",
  10177. "content": {
  10178. "application/json": {
  10179. "schema": {
  10180. "$ref": "#/components/schemas/SessionsResponse"
  10181. }
  10182. }
  10183. }
  10184. },
  10185. "400": {
  10186. "description": "InvalidCursorError | InvalidRequestError",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "anyOf": [
  10191. {
  10192. "$ref": "#/components/schemas/InvalidCursorError"
  10193. },
  10194. {
  10195. "$ref": "#/components/schemas/InvalidRequestError"
  10196. },
  10197. {
  10198. "$ref": "#/components/schemas/InvalidRequestError"
  10199. }
  10200. ]
  10201. }
  10202. }
  10203. }
  10204. },
  10205. "401": {
  10206. "description": "UnauthorizedError",
  10207. "content": {
  10208. "application/json": {
  10209. "schema": {
  10210. "$ref": "#/components/schemas/UnauthorizedError"
  10211. }
  10212. }
  10213. }
  10214. }
  10215. },
  10216. "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.",
  10217. "summary": "List sessions",
  10218. "x-codeSamples": [
  10219. {
  10220. "lang": "js",
  10221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10222. }
  10223. ]
  10224. }
  10225. },
  10226. "/api/session/{sessionID}/prompt": {
  10227. "post": {
  10228. "tags": ["sessions"],
  10229. "operationId": "v2.session.prompt",
  10230. "parameters": [
  10231. {
  10232. "name": "sessionID",
  10233. "in": "path",
  10234. "schema": {
  10235. "type": "string",
  10236. "pattern": "^ses"
  10237. },
  10238. "required": true
  10239. }
  10240. ],
  10241. "security": [],
  10242. "responses": {
  10243. "200": {
  10244. "description": "Success",
  10245. "content": {
  10246. "application/json": {
  10247. "schema": {
  10248. "type": "object",
  10249. "properties": {
  10250. "data": {
  10251. "$ref": "#/components/schemas/SessionInputAdmitted"
  10252. }
  10253. },
  10254. "required": ["data"],
  10255. "additionalProperties": false
  10256. }
  10257. }
  10258. }
  10259. },
  10260. "400": {
  10261. "description": "InvalidRequestError",
  10262. "content": {
  10263. "application/json": {
  10264. "schema": {
  10265. "$ref": "#/components/schemas/InvalidRequestError"
  10266. }
  10267. }
  10268. }
  10269. },
  10270. "401": {
  10271. "description": "UnauthorizedError",
  10272. "content": {
  10273. "application/json": {
  10274. "schema": {
  10275. "$ref": "#/components/schemas/UnauthorizedError"
  10276. }
  10277. }
  10278. }
  10279. },
  10280. "404": {
  10281. "description": "SessionNotFoundError",
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "anyOf": [
  10286. {
  10287. "$ref": "#/components/schemas/SessionNotFoundError"
  10288. },
  10289. {
  10290. "$ref": "#/components/schemas/SessionNotFoundError"
  10291. }
  10292. ]
  10293. }
  10294. }
  10295. }
  10296. },
  10297. "409": {
  10298. "description": "ConflictError",
  10299. "content": {
  10300. "application/json": {
  10301. "schema": {
  10302. "$ref": "#/components/schemas/ConflictError"
  10303. }
  10304. }
  10305. }
  10306. }
  10307. },
  10308. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10309. "summary": "Send message",
  10310. "requestBody": {
  10311. "content": {
  10312. "application/json": {
  10313. "schema": {
  10314. "type": "object",
  10315. "properties": {
  10316. "id": {
  10317. "type": "string",
  10318. "pattern": "^msg_"
  10319. },
  10320. "prompt": {
  10321. "$ref": "#/components/schemas/Prompt"
  10322. },
  10323. "delivery": {
  10324. "type": "string",
  10325. "enum": ["steer", "queue"]
  10326. },
  10327. "resume": {
  10328. "type": "boolean"
  10329. }
  10330. },
  10331. "required": ["prompt"],
  10332. "additionalProperties": false
  10333. }
  10334. }
  10335. },
  10336. "required": true
  10337. },
  10338. "x-codeSamples": [
  10339. {
  10340. "lang": "js",
  10341. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10342. }
  10343. ]
  10344. }
  10345. },
  10346. "/api/session/{sessionID}/compact": {
  10347. "post": {
  10348. "tags": ["sessions"],
  10349. "operationId": "v2.session.compact",
  10350. "parameters": [
  10351. {
  10352. "name": "sessionID",
  10353. "in": "path",
  10354. "schema": {
  10355. "type": "string",
  10356. "pattern": "^ses"
  10357. },
  10358. "required": true
  10359. }
  10360. ],
  10361. "security": [],
  10362. "responses": {
  10363. "204": {
  10364. "description": "<No Content>"
  10365. },
  10366. "400": {
  10367. "description": "InvalidRequestError",
  10368. "content": {
  10369. "application/json": {
  10370. "schema": {
  10371. "$ref": "#/components/schemas/InvalidRequestError"
  10372. }
  10373. }
  10374. }
  10375. },
  10376. "401": {
  10377. "description": "UnauthorizedError",
  10378. "content": {
  10379. "application/json": {
  10380. "schema": {
  10381. "$ref": "#/components/schemas/UnauthorizedError"
  10382. }
  10383. }
  10384. }
  10385. },
  10386. "404": {
  10387. "description": "SessionNotFoundError",
  10388. "content": {
  10389. "application/json": {
  10390. "schema": {
  10391. "anyOf": [
  10392. {
  10393. "$ref": "#/components/schemas/SessionNotFoundError"
  10394. },
  10395. {
  10396. "$ref": "#/components/schemas/SessionNotFoundError"
  10397. }
  10398. ]
  10399. }
  10400. }
  10401. }
  10402. },
  10403. "503": {
  10404. "description": "ServiceUnavailableError",
  10405. "content": {
  10406. "application/json": {
  10407. "schema": {
  10408. "$ref": "#/components/schemas/ServiceUnavailableError"
  10409. }
  10410. }
  10411. }
  10412. }
  10413. },
  10414. "description": "Compact a session conversation.",
  10415. "summary": "Compact session",
  10416. "x-codeSamples": [
  10417. {
  10418. "lang": "js",
  10419. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10420. }
  10421. ]
  10422. }
  10423. },
  10424. "/api/session/{sessionID}/wait": {
  10425. "post": {
  10426. "tags": ["sessions"],
  10427. "operationId": "v2.session.wait",
  10428. "parameters": [
  10429. {
  10430. "name": "sessionID",
  10431. "in": "path",
  10432. "schema": {
  10433. "type": "string",
  10434. "pattern": "^ses"
  10435. },
  10436. "required": true
  10437. }
  10438. ],
  10439. "security": [],
  10440. "responses": {
  10441. "204": {
  10442. "description": "<No Content>"
  10443. },
  10444. "400": {
  10445. "description": "InvalidRequestError",
  10446. "content": {
  10447. "application/json": {
  10448. "schema": {
  10449. "$ref": "#/components/schemas/InvalidRequestError"
  10450. }
  10451. }
  10452. }
  10453. },
  10454. "401": {
  10455. "description": "UnauthorizedError",
  10456. "content": {
  10457. "application/json": {
  10458. "schema": {
  10459. "$ref": "#/components/schemas/UnauthorizedError"
  10460. }
  10461. }
  10462. }
  10463. },
  10464. "404": {
  10465. "description": "SessionNotFoundError",
  10466. "content": {
  10467. "application/json": {
  10468. "schema": {
  10469. "anyOf": [
  10470. {
  10471. "$ref": "#/components/schemas/SessionNotFoundError"
  10472. },
  10473. {
  10474. "$ref": "#/components/schemas/SessionNotFoundError"
  10475. }
  10476. ]
  10477. }
  10478. }
  10479. }
  10480. },
  10481. "503": {
  10482. "description": "ServiceUnavailableError",
  10483. "content": {
  10484. "application/json": {
  10485. "schema": {
  10486. "$ref": "#/components/schemas/ServiceUnavailableError"
  10487. }
  10488. }
  10489. }
  10490. }
  10491. },
  10492. "description": "Wait for a session agent loop to become idle.",
  10493. "summary": "Wait for session",
  10494. "x-codeSamples": [
  10495. {
  10496. "lang": "js",
  10497. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10498. }
  10499. ]
  10500. }
  10501. },
  10502. "/api/session/{sessionID}/context": {
  10503. "get": {
  10504. "tags": ["sessions"],
  10505. "operationId": "v2.session.context",
  10506. "parameters": [
  10507. {
  10508. "name": "sessionID",
  10509. "in": "path",
  10510. "schema": {
  10511. "type": "string",
  10512. "pattern": "^ses"
  10513. },
  10514. "required": true
  10515. }
  10516. ],
  10517. "security": [],
  10518. "responses": {
  10519. "200": {
  10520. "description": "Success",
  10521. "content": {
  10522. "application/json": {
  10523. "schema": {
  10524. "type": "object",
  10525. "properties": {
  10526. "data": {
  10527. "type": "array",
  10528. "items": {
  10529. "$ref": "#/components/schemas/SessionMessage"
  10530. }
  10531. }
  10532. },
  10533. "required": ["data"],
  10534. "additionalProperties": false
  10535. }
  10536. }
  10537. }
  10538. },
  10539. "400": {
  10540. "description": "InvalidRequestError",
  10541. "content": {
  10542. "application/json": {
  10543. "schema": {
  10544. "$ref": "#/components/schemas/InvalidRequestError"
  10545. }
  10546. }
  10547. }
  10548. },
  10549. "401": {
  10550. "description": "UnauthorizedError",
  10551. "content": {
  10552. "application/json": {
  10553. "schema": {
  10554. "$ref": "#/components/schemas/UnauthorizedError"
  10555. }
  10556. }
  10557. }
  10558. },
  10559. "404": {
  10560. "description": "SessionNotFoundError",
  10561. "content": {
  10562. "application/json": {
  10563. "schema": {
  10564. "anyOf": [
  10565. {
  10566. "$ref": "#/components/schemas/SessionNotFoundError"
  10567. },
  10568. {
  10569. "$ref": "#/components/schemas/SessionNotFoundError"
  10570. }
  10571. ]
  10572. }
  10573. }
  10574. }
  10575. },
  10576. "500": {
  10577. "description": "UnknownError",
  10578. "content": {
  10579. "application/json": {
  10580. "schema": {
  10581. "$ref": "#/components/schemas/UnknownError1"
  10582. }
  10583. }
  10584. }
  10585. }
  10586. },
  10587. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10588. "summary": "Get session context",
  10589. "x-codeSamples": [
  10590. {
  10591. "lang": "js",
  10592. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10593. }
  10594. ]
  10595. }
  10596. },
  10597. "/api/session/{sessionID}/message": {
  10598. "get": {
  10599. "tags": ["messages"],
  10600. "operationId": "v2.session.messages",
  10601. "parameters": [
  10602. {
  10603. "name": "sessionID",
  10604. "in": "path",
  10605. "schema": {
  10606. "type": "string",
  10607. "pattern": "^ses"
  10608. },
  10609. "required": true
  10610. },
  10611. {
  10612. "name": "limit",
  10613. "in": "query",
  10614. "schema": {
  10615. "type": "number"
  10616. },
  10617. "required": false
  10618. },
  10619. {
  10620. "name": "order",
  10621. "in": "query",
  10622. "schema": {
  10623. "type": "string",
  10624. "enum": ["asc", "desc"]
  10625. },
  10626. "required": false
  10627. },
  10628. {
  10629. "name": "cursor",
  10630. "in": "query",
  10631. "schema": {
  10632. "type": "string",
  10633. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10634. },
  10635. "required": false
  10636. }
  10637. ],
  10638. "security": [],
  10639. "responses": {
  10640. "200": {
  10641. "description": "SessionMessagesResponse",
  10642. "content": {
  10643. "application/json": {
  10644. "schema": {
  10645. "$ref": "#/components/schemas/SessionMessagesResponse"
  10646. }
  10647. }
  10648. }
  10649. },
  10650. "400": {
  10651. "description": "InvalidCursorError | InvalidRequestError",
  10652. "content": {
  10653. "application/json": {
  10654. "schema": {
  10655. "anyOf": [
  10656. {
  10657. "$ref": "#/components/schemas/InvalidCursorError"
  10658. },
  10659. {
  10660. "$ref": "#/components/schemas/InvalidRequestError"
  10661. }
  10662. ]
  10663. }
  10664. }
  10665. }
  10666. },
  10667. "401": {
  10668. "description": "UnauthorizedError",
  10669. "content": {
  10670. "application/json": {
  10671. "schema": {
  10672. "$ref": "#/components/schemas/UnauthorizedError"
  10673. }
  10674. }
  10675. }
  10676. },
  10677. "404": {
  10678. "description": "SessionNotFoundError",
  10679. "content": {
  10680. "application/json": {
  10681. "schema": {
  10682. "anyOf": [
  10683. {
  10684. "$ref": "#/components/schemas/SessionNotFoundError"
  10685. },
  10686. {
  10687. "$ref": "#/components/schemas/SessionNotFoundError"
  10688. }
  10689. ]
  10690. }
  10691. }
  10692. }
  10693. },
  10694. "500": {
  10695. "description": "UnknownError",
  10696. "content": {
  10697. "application/json": {
  10698. "schema": {
  10699. "$ref": "#/components/schemas/UnknownError1"
  10700. }
  10701. }
  10702. }
  10703. }
  10704. },
  10705. "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.",
  10706. "summary": "Get session messages",
  10707. "x-codeSamples": [
  10708. {
  10709. "lang": "js",
  10710. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10711. }
  10712. ]
  10713. }
  10714. },
  10715. "/api/model": {
  10716. "get": {
  10717. "tags": ["models"],
  10718. "operationId": "v2.model.list",
  10719. "parameters": [
  10720. {
  10721. "name": "location",
  10722. "in": "query",
  10723. "schema": {
  10724. "type": "object",
  10725. "properties": {
  10726. "directory": {
  10727. "type": "string"
  10728. },
  10729. "workspace": {
  10730. "type": "string"
  10731. }
  10732. },
  10733. "additionalProperties": false
  10734. },
  10735. "required": false,
  10736. "style": "deepObject",
  10737. "explode": true
  10738. }
  10739. ],
  10740. "security": [],
  10741. "responses": {
  10742. "200": {
  10743. "description": "Success",
  10744. "content": {
  10745. "application/json": {
  10746. "schema": {
  10747. "type": "object",
  10748. "properties": {
  10749. "location": {
  10750. "$ref": "#/components/schemas/LocationInfo"
  10751. },
  10752. "data": {
  10753. "type": "array",
  10754. "items": {
  10755. "$ref": "#/components/schemas/ModelV2Info"
  10756. }
  10757. }
  10758. },
  10759. "required": ["location", "data"],
  10760. "additionalProperties": false
  10761. }
  10762. }
  10763. }
  10764. },
  10765. "400": {
  10766. "description": "InvalidRequestError",
  10767. "content": {
  10768. "application/json": {
  10769. "schema": {
  10770. "$ref": "#/components/schemas/InvalidRequestError"
  10771. }
  10772. }
  10773. }
  10774. },
  10775. "401": {
  10776. "description": "UnauthorizedError",
  10777. "content": {
  10778. "application/json": {
  10779. "schema": {
  10780. "$ref": "#/components/schemas/UnauthorizedError"
  10781. }
  10782. }
  10783. }
  10784. },
  10785. "503": {
  10786. "description": "ServiceUnavailableError",
  10787. "content": {
  10788. "application/json": {
  10789. "schema": {
  10790. "$ref": "#/components/schemas/ServiceUnavailableError"
  10791. }
  10792. }
  10793. }
  10794. }
  10795. },
  10796. "description": "Retrieve available models ordered by release date.",
  10797. "summary": "List models",
  10798. "x-codeSamples": [
  10799. {
  10800. "lang": "js",
  10801. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10802. }
  10803. ]
  10804. }
  10805. },
  10806. "/api/provider": {
  10807. "get": {
  10808. "tags": ["providers"],
  10809. "operationId": "v2.provider.list",
  10810. "parameters": [
  10811. {
  10812. "name": "location",
  10813. "in": "query",
  10814. "schema": {
  10815. "type": "object",
  10816. "properties": {
  10817. "directory": {
  10818. "type": "string"
  10819. },
  10820. "workspace": {
  10821. "type": "string"
  10822. }
  10823. },
  10824. "additionalProperties": false
  10825. },
  10826. "required": false,
  10827. "style": "deepObject",
  10828. "explode": true
  10829. }
  10830. ],
  10831. "security": [],
  10832. "responses": {
  10833. "200": {
  10834. "description": "Success",
  10835. "content": {
  10836. "application/json": {
  10837. "schema": {
  10838. "type": "object",
  10839. "properties": {
  10840. "location": {
  10841. "$ref": "#/components/schemas/LocationInfo"
  10842. },
  10843. "data": {
  10844. "type": "array",
  10845. "items": {
  10846. "$ref": "#/components/schemas/ProviderV2Info"
  10847. }
  10848. }
  10849. },
  10850. "required": ["location", "data"],
  10851. "additionalProperties": false
  10852. }
  10853. }
  10854. }
  10855. },
  10856. "400": {
  10857. "description": "InvalidRequestError",
  10858. "content": {
  10859. "application/json": {
  10860. "schema": {
  10861. "$ref": "#/components/schemas/InvalidRequestError"
  10862. }
  10863. }
  10864. }
  10865. },
  10866. "401": {
  10867. "description": "UnauthorizedError",
  10868. "content": {
  10869. "application/json": {
  10870. "schema": {
  10871. "$ref": "#/components/schemas/UnauthorizedError"
  10872. }
  10873. }
  10874. }
  10875. },
  10876. "503": {
  10877. "description": "ServiceUnavailableError",
  10878. "content": {
  10879. "application/json": {
  10880. "schema": {
  10881. "$ref": "#/components/schemas/ServiceUnavailableError"
  10882. }
  10883. }
  10884. }
  10885. }
  10886. },
  10887. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  10888. "summary": "List providers",
  10889. "x-codeSamples": [
  10890. {
  10891. "lang": "js",
  10892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10893. }
  10894. ]
  10895. }
  10896. },
  10897. "/api/provider/{providerID}": {
  10898. "get": {
  10899. "tags": ["providers"],
  10900. "operationId": "v2.provider.get",
  10901. "parameters": [
  10902. {
  10903. "name": "providerID",
  10904. "in": "path",
  10905. "schema": {
  10906. "type": "string"
  10907. },
  10908. "required": true
  10909. },
  10910. {
  10911. "name": "location",
  10912. "in": "query",
  10913. "schema": {
  10914. "type": "object",
  10915. "properties": {
  10916. "directory": {
  10917. "type": "string"
  10918. },
  10919. "workspace": {
  10920. "type": "string"
  10921. }
  10922. },
  10923. "additionalProperties": false
  10924. },
  10925. "required": false,
  10926. "style": "deepObject",
  10927. "explode": true
  10928. }
  10929. ],
  10930. "security": [],
  10931. "responses": {
  10932. "200": {
  10933. "description": "Success",
  10934. "content": {
  10935. "application/json": {
  10936. "schema": {
  10937. "type": "object",
  10938. "properties": {
  10939. "location": {
  10940. "$ref": "#/components/schemas/LocationInfo"
  10941. },
  10942. "data": {
  10943. "$ref": "#/components/schemas/ProviderV2Info"
  10944. }
  10945. },
  10946. "required": ["location", "data"],
  10947. "additionalProperties": false
  10948. }
  10949. }
  10950. }
  10951. },
  10952. "400": {
  10953. "description": "InvalidRequestError",
  10954. "content": {
  10955. "application/json": {
  10956. "schema": {
  10957. "$ref": "#/components/schemas/InvalidRequestError"
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "401": {
  10963. "description": "UnauthorizedError",
  10964. "content": {
  10965. "application/json": {
  10966. "schema": {
  10967. "$ref": "#/components/schemas/UnauthorizedError"
  10968. }
  10969. }
  10970. }
  10971. },
  10972. "404": {
  10973. "description": "ProviderNotFoundError",
  10974. "content": {
  10975. "application/json": {
  10976. "schema": {
  10977. "$ref": "#/components/schemas/ProviderNotFoundError"
  10978. }
  10979. }
  10980. }
  10981. },
  10982. "503": {
  10983. "description": "ServiceUnavailableError",
  10984. "content": {
  10985. "application/json": {
  10986. "schema": {
  10987. "$ref": "#/components/schemas/ServiceUnavailableError"
  10988. }
  10989. }
  10990. }
  10991. }
  10992. },
  10993. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  10994. "summary": "Get provider",
  10995. "x-codeSamples": [
  10996. {
  10997. "lang": "js",
  10998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10999. }
  11000. ]
  11001. }
  11002. },
  11003. "/api/permission/request": {
  11004. "get": {
  11005. "tags": ["permissions"],
  11006. "operationId": "v2.permission.request.list",
  11007. "parameters": [
  11008. {
  11009. "name": "location",
  11010. "in": "query",
  11011. "schema": {
  11012. "type": "object",
  11013. "properties": {
  11014. "directory": {
  11015. "type": "string"
  11016. },
  11017. "workspace": {
  11018. "type": "string"
  11019. }
  11020. },
  11021. "additionalProperties": false
  11022. },
  11023. "required": false,
  11024. "style": "deepObject",
  11025. "explode": true
  11026. }
  11027. ],
  11028. "security": [],
  11029. "responses": {
  11030. "200": {
  11031. "description": "Success",
  11032. "content": {
  11033. "application/json": {
  11034. "schema": {
  11035. "type": "object",
  11036. "properties": {
  11037. "location": {
  11038. "$ref": "#/components/schemas/LocationInfo"
  11039. },
  11040. "data": {
  11041. "type": "array",
  11042. "items": {
  11043. "$ref": "#/components/schemas/PermissionV2Request"
  11044. }
  11045. }
  11046. },
  11047. "required": ["location", "data"],
  11048. "additionalProperties": false
  11049. }
  11050. }
  11051. }
  11052. },
  11053. "400": {
  11054. "description": "InvalidRequestError",
  11055. "content": {
  11056. "application/json": {
  11057. "schema": {
  11058. "$ref": "#/components/schemas/InvalidRequestError"
  11059. }
  11060. }
  11061. }
  11062. },
  11063. "401": {
  11064. "description": "UnauthorizedError",
  11065. "content": {
  11066. "application/json": {
  11067. "schema": {
  11068. "$ref": "#/components/schemas/UnauthorizedError"
  11069. }
  11070. }
  11071. }
  11072. }
  11073. },
  11074. "description": "Retrieve pending permission requests for a location.",
  11075. "summary": "List pending permission requests",
  11076. "x-codeSamples": [
  11077. {
  11078. "lang": "js",
  11079. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  11080. }
  11081. ]
  11082. }
  11083. },
  11084. "/api/permission/saved": {
  11085. "get": {
  11086. "tags": ["permissions"],
  11087. "operationId": "v2.permission.saved.list",
  11088. "parameters": [
  11089. {
  11090. "name": "projectID",
  11091. "in": "query",
  11092. "schema": {
  11093. "type": "string"
  11094. },
  11095. "required": false
  11096. }
  11097. ],
  11098. "security": [],
  11099. "responses": {
  11100. "200": {
  11101. "description": "Success",
  11102. "content": {
  11103. "application/json": {
  11104. "schema": {
  11105. "type": "object",
  11106. "properties": {
  11107. "data": {
  11108. "type": "array",
  11109. "items": {
  11110. "$ref": "#/components/schemas/PermissionSavedInfo"
  11111. }
  11112. }
  11113. },
  11114. "required": ["data"],
  11115. "additionalProperties": false
  11116. }
  11117. }
  11118. }
  11119. },
  11120. "400": {
  11121. "description": "InvalidRequestError",
  11122. "content": {
  11123. "application/json": {
  11124. "schema": {
  11125. "$ref": "#/components/schemas/InvalidRequestError"
  11126. }
  11127. }
  11128. }
  11129. },
  11130. "401": {
  11131. "description": "UnauthorizedError",
  11132. "content": {
  11133. "application/json": {
  11134. "schema": {
  11135. "$ref": "#/components/schemas/UnauthorizedError"
  11136. }
  11137. }
  11138. }
  11139. }
  11140. },
  11141. "description": "Retrieve saved permissions, optionally filtered by project.",
  11142. "summary": "List saved permissions",
  11143. "x-codeSamples": [
  11144. {
  11145. "lang": "js",
  11146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11147. }
  11148. ]
  11149. }
  11150. },
  11151. "/api/permission/saved/{id}": {
  11152. "delete": {
  11153. "tags": ["permissions"],
  11154. "operationId": "v2.permission.saved.remove",
  11155. "parameters": [
  11156. {
  11157. "name": "id",
  11158. "in": "path",
  11159. "schema": {
  11160. "type": "string"
  11161. },
  11162. "required": true
  11163. }
  11164. ],
  11165. "security": [],
  11166. "responses": {
  11167. "204": {
  11168. "description": "<No Content>"
  11169. },
  11170. "400": {
  11171. "description": "InvalidRequestError",
  11172. "content": {
  11173. "application/json": {
  11174. "schema": {
  11175. "$ref": "#/components/schemas/InvalidRequestError"
  11176. }
  11177. }
  11178. }
  11179. },
  11180. "401": {
  11181. "description": "UnauthorizedError",
  11182. "content": {
  11183. "application/json": {
  11184. "schema": {
  11185. "$ref": "#/components/schemas/UnauthorizedError"
  11186. }
  11187. }
  11188. }
  11189. }
  11190. },
  11191. "description": "Remove a saved permission by ID.",
  11192. "summary": "Remove saved permission",
  11193. "x-codeSamples": [
  11194. {
  11195. "lang": "js",
  11196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11197. }
  11198. ]
  11199. }
  11200. },
  11201. "/api/session/{sessionID}/permission": {
  11202. "get": {
  11203. "tags": ["permissions"],
  11204. "operationId": "v2.session.permission.list",
  11205. "parameters": [
  11206. {
  11207. "name": "sessionID",
  11208. "in": "path",
  11209. "schema": {
  11210. "type": "string",
  11211. "pattern": "^ses"
  11212. },
  11213. "required": true
  11214. }
  11215. ],
  11216. "security": [],
  11217. "responses": {
  11218. "200": {
  11219. "description": "Success",
  11220. "content": {
  11221. "application/json": {
  11222. "schema": {
  11223. "type": "object",
  11224. "properties": {
  11225. "data": {
  11226. "type": "array",
  11227. "items": {
  11228. "$ref": "#/components/schemas/PermissionV2Request"
  11229. }
  11230. }
  11231. },
  11232. "required": ["data"],
  11233. "additionalProperties": false
  11234. }
  11235. }
  11236. }
  11237. },
  11238. "400": {
  11239. "description": "InvalidRequestError",
  11240. "content": {
  11241. "application/json": {
  11242. "schema": {
  11243. "$ref": "#/components/schemas/InvalidRequestError"
  11244. }
  11245. }
  11246. }
  11247. },
  11248. "401": {
  11249. "description": "UnauthorizedError",
  11250. "content": {
  11251. "application/json": {
  11252. "schema": {
  11253. "$ref": "#/components/schemas/UnauthorizedError"
  11254. }
  11255. }
  11256. }
  11257. },
  11258. "404": {
  11259. "description": "SessionNotFoundError",
  11260. "content": {
  11261. "application/json": {
  11262. "schema": {
  11263. "anyOf": [
  11264. {
  11265. "$ref": "#/components/schemas/SessionNotFoundError"
  11266. },
  11267. {
  11268. "$ref": "#/components/schemas/SessionNotFoundError"
  11269. }
  11270. ]
  11271. }
  11272. }
  11273. }
  11274. }
  11275. },
  11276. "description": "Retrieve pending permission requests owned by a session.",
  11277. "summary": "List session permission requests",
  11278. "x-codeSamples": [
  11279. {
  11280. "lang": "js",
  11281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  11282. }
  11283. ]
  11284. }
  11285. },
  11286. "/api/session/{sessionID}/permission/{requestID}/reply": {
  11287. "post": {
  11288. "tags": ["permissions"],
  11289. "operationId": "v2.session.permission.reply",
  11290. "parameters": [
  11291. {
  11292. "name": "sessionID",
  11293. "in": "path",
  11294. "schema": {
  11295. "type": "string",
  11296. "pattern": "^ses"
  11297. },
  11298. "required": true
  11299. },
  11300. {
  11301. "name": "requestID",
  11302. "in": "path",
  11303. "schema": {
  11304. "type": "string",
  11305. "pattern": "^per"
  11306. },
  11307. "required": true
  11308. }
  11309. ],
  11310. "security": [],
  11311. "responses": {
  11312. "204": {
  11313. "description": "<No Content>"
  11314. },
  11315. "400": {
  11316. "description": "InvalidRequestError",
  11317. "content": {
  11318. "application/json": {
  11319. "schema": {
  11320. "$ref": "#/components/schemas/InvalidRequestError"
  11321. }
  11322. }
  11323. }
  11324. },
  11325. "401": {
  11326. "description": "UnauthorizedError",
  11327. "content": {
  11328. "application/json": {
  11329. "schema": {
  11330. "$ref": "#/components/schemas/UnauthorizedError"
  11331. }
  11332. }
  11333. }
  11334. },
  11335. "404": {
  11336. "description": "SessionNotFoundError | PermissionNotFoundError",
  11337. "content": {
  11338. "application/json": {
  11339. "schema": {
  11340. "anyOf": [
  11341. {
  11342. "$ref": "#/components/schemas/PermissionNotFoundError"
  11343. },
  11344. {
  11345. "$ref": "#/components/schemas/SessionNotFoundError"
  11346. },
  11347. {
  11348. "$ref": "#/components/schemas/SessionNotFoundError"
  11349. }
  11350. ]
  11351. }
  11352. }
  11353. }
  11354. }
  11355. },
  11356. "description": "Respond to a pending permission request owned by a session.",
  11357. "summary": "Reply to pending permission request",
  11358. "requestBody": {
  11359. "content": {
  11360. "application/json": {
  11361. "schema": {
  11362. "type": "object",
  11363. "properties": {
  11364. "reply": {
  11365. "$ref": "#/components/schemas/PermissionV2Reply"
  11366. },
  11367. "message": {
  11368. "type": "string"
  11369. }
  11370. },
  11371. "required": ["reply"],
  11372. "additionalProperties": false
  11373. }
  11374. }
  11375. },
  11376. "required": true
  11377. },
  11378. "x-codeSamples": [
  11379. {
  11380. "lang": "js",
  11381. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11382. }
  11383. ]
  11384. }
  11385. },
  11386. "/api/fs/read": {
  11387. "get": {
  11388. "tags": ["filesystem"],
  11389. "operationId": "v2.fs.read",
  11390. "parameters": [
  11391. {
  11392. "name": "location",
  11393. "in": "query",
  11394. "schema": {
  11395. "type": "object",
  11396. "properties": {
  11397. "directory": {
  11398. "type": "string"
  11399. },
  11400. "workspace": {
  11401. "type": "string"
  11402. }
  11403. },
  11404. "additionalProperties": false
  11405. },
  11406. "required": false,
  11407. "style": "deepObject",
  11408. "explode": true
  11409. },
  11410. {
  11411. "name": "path",
  11412. "in": "query",
  11413. "schema": {
  11414. "type": "string"
  11415. },
  11416. "required": true
  11417. },
  11418. {
  11419. "name": "reference",
  11420. "in": "query",
  11421. "schema": {
  11422. "type": "string"
  11423. },
  11424. "required": false
  11425. }
  11426. ],
  11427. "security": [],
  11428. "responses": {
  11429. "200": {
  11430. "description": "Success",
  11431. "content": {
  11432. "application/json": {
  11433. "schema": {
  11434. "type": "object",
  11435. "properties": {
  11436. "location": {
  11437. "$ref": "#/components/schemas/LocationInfo"
  11438. },
  11439. "data": {
  11440. "anyOf": [
  11441. {
  11442. "$ref": "#/components/schemas/FileSystemTextContent"
  11443. },
  11444. {
  11445. "$ref": "#/components/schemas/FileSystemBinaryContent"
  11446. }
  11447. ]
  11448. }
  11449. },
  11450. "required": ["location", "data"],
  11451. "additionalProperties": false
  11452. }
  11453. }
  11454. }
  11455. },
  11456. "400": {
  11457. "description": "InvalidRequestError",
  11458. "content": {
  11459. "application/json": {
  11460. "schema": {
  11461. "$ref": "#/components/schemas/InvalidRequestError"
  11462. }
  11463. }
  11464. }
  11465. },
  11466. "401": {
  11467. "description": "UnauthorizedError",
  11468. "content": {
  11469. "application/json": {
  11470. "schema": {
  11471. "$ref": "#/components/schemas/UnauthorizedError"
  11472. }
  11473. }
  11474. }
  11475. }
  11476. },
  11477. "description": "Read one file relative to the requested location.",
  11478. "summary": "Read file",
  11479. "x-codeSamples": [
  11480. {
  11481. "lang": "js",
  11482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11483. }
  11484. ]
  11485. }
  11486. },
  11487. "/api/fs/list": {
  11488. "get": {
  11489. "tags": ["filesystem"],
  11490. "operationId": "v2.fs.list",
  11491. "parameters": [
  11492. {
  11493. "name": "location",
  11494. "in": "query",
  11495. "schema": {
  11496. "type": "object",
  11497. "properties": {
  11498. "directory": {
  11499. "type": "string"
  11500. },
  11501. "workspace": {
  11502. "type": "string"
  11503. }
  11504. },
  11505. "additionalProperties": false
  11506. },
  11507. "required": false,
  11508. "style": "deepObject",
  11509. "explode": true
  11510. },
  11511. {
  11512. "name": "path",
  11513. "in": "query",
  11514. "schema": {
  11515. "type": "string"
  11516. },
  11517. "required": false
  11518. },
  11519. {
  11520. "name": "reference",
  11521. "in": "query",
  11522. "schema": {
  11523. "type": "string"
  11524. },
  11525. "required": false
  11526. }
  11527. ],
  11528. "security": [],
  11529. "responses": {
  11530. "200": {
  11531. "description": "Success",
  11532. "content": {
  11533. "application/json": {
  11534. "schema": {
  11535. "type": "object",
  11536. "properties": {
  11537. "location": {
  11538. "$ref": "#/components/schemas/LocationInfo"
  11539. },
  11540. "data": {
  11541. "type": "array",
  11542. "items": {
  11543. "$ref": "#/components/schemas/FileSystemEntry"
  11544. }
  11545. }
  11546. },
  11547. "required": ["location", "data"],
  11548. "additionalProperties": false
  11549. }
  11550. }
  11551. }
  11552. },
  11553. "400": {
  11554. "description": "InvalidRequestError",
  11555. "content": {
  11556. "application/json": {
  11557. "schema": {
  11558. "$ref": "#/components/schemas/InvalidRequestError"
  11559. }
  11560. }
  11561. }
  11562. },
  11563. "401": {
  11564. "description": "UnauthorizedError",
  11565. "content": {
  11566. "application/json": {
  11567. "schema": {
  11568. "$ref": "#/components/schemas/UnauthorizedError"
  11569. }
  11570. }
  11571. }
  11572. }
  11573. },
  11574. "description": "List direct children of one directory relative to the requested location.",
  11575. "summary": "List directory",
  11576. "x-codeSamples": [
  11577. {
  11578. "lang": "js",
  11579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11580. }
  11581. ]
  11582. }
  11583. },
  11584. "/api/command": {
  11585. "get": {
  11586. "tags": ["commands"],
  11587. "operationId": "v2.command.list",
  11588. "parameters": [
  11589. {
  11590. "name": "location",
  11591. "in": "query",
  11592. "schema": {
  11593. "type": "object",
  11594. "properties": {
  11595. "directory": {
  11596. "type": "string"
  11597. },
  11598. "workspace": {
  11599. "type": "string"
  11600. }
  11601. },
  11602. "additionalProperties": false
  11603. },
  11604. "required": false,
  11605. "style": "deepObject",
  11606. "explode": true
  11607. }
  11608. ],
  11609. "security": [],
  11610. "responses": {
  11611. "200": {
  11612. "description": "Success",
  11613. "content": {
  11614. "application/json": {
  11615. "schema": {
  11616. "type": "object",
  11617. "properties": {
  11618. "location": {
  11619. "$ref": "#/components/schemas/LocationInfo"
  11620. },
  11621. "data": {
  11622. "type": "array",
  11623. "items": {
  11624. "$ref": "#/components/schemas/CommandV2Info"
  11625. }
  11626. }
  11627. },
  11628. "required": ["location", "data"],
  11629. "additionalProperties": false
  11630. }
  11631. }
  11632. }
  11633. },
  11634. "400": {
  11635. "description": "InvalidRequestError",
  11636. "content": {
  11637. "application/json": {
  11638. "schema": {
  11639. "$ref": "#/components/schemas/InvalidRequestError"
  11640. }
  11641. }
  11642. }
  11643. },
  11644. "401": {
  11645. "description": "UnauthorizedError",
  11646. "content": {
  11647. "application/json": {
  11648. "schema": {
  11649. "$ref": "#/components/schemas/UnauthorizedError"
  11650. }
  11651. }
  11652. }
  11653. }
  11654. },
  11655. "description": "Retrieve currently registered commands.",
  11656. "summary": "List commands",
  11657. "x-codeSamples": [
  11658. {
  11659. "lang": "js",
  11660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11661. }
  11662. ]
  11663. }
  11664. },
  11665. "/api/skill": {
  11666. "get": {
  11667. "tags": ["skills"],
  11668. "operationId": "v2.skill.list",
  11669. "parameters": [
  11670. {
  11671. "name": "location",
  11672. "in": "query",
  11673. "schema": {
  11674. "type": "object",
  11675. "properties": {
  11676. "directory": {
  11677. "type": "string"
  11678. },
  11679. "workspace": {
  11680. "type": "string"
  11681. }
  11682. },
  11683. "additionalProperties": false
  11684. },
  11685. "required": false,
  11686. "style": "deepObject",
  11687. "explode": true
  11688. }
  11689. ],
  11690. "security": [],
  11691. "responses": {
  11692. "200": {
  11693. "description": "Success",
  11694. "content": {
  11695. "application/json": {
  11696. "schema": {
  11697. "type": "object",
  11698. "properties": {
  11699. "location": {
  11700. "$ref": "#/components/schemas/LocationInfo"
  11701. },
  11702. "data": {
  11703. "type": "array",
  11704. "items": {
  11705. "$ref": "#/components/schemas/SkillV2Info"
  11706. }
  11707. }
  11708. },
  11709. "required": ["location", "data"],
  11710. "additionalProperties": false
  11711. }
  11712. }
  11713. }
  11714. },
  11715. "400": {
  11716. "description": "InvalidRequestError",
  11717. "content": {
  11718. "application/json": {
  11719. "schema": {
  11720. "$ref": "#/components/schemas/InvalidRequestError"
  11721. }
  11722. }
  11723. }
  11724. },
  11725. "401": {
  11726. "description": "UnauthorizedError",
  11727. "content": {
  11728. "application/json": {
  11729. "schema": {
  11730. "$ref": "#/components/schemas/UnauthorizedError"
  11731. }
  11732. }
  11733. }
  11734. }
  11735. },
  11736. "description": "Retrieve currently registered skills.",
  11737. "summary": "List skills",
  11738. "x-codeSamples": [
  11739. {
  11740. "lang": "js",
  11741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11742. }
  11743. ]
  11744. }
  11745. },
  11746. "/api/event": {
  11747. "get": {
  11748. "tags": ["events"],
  11749. "operationId": "v2.event.subscribe",
  11750. "parameters": [
  11751. {
  11752. "name": "location",
  11753. "in": "query",
  11754. "schema": {
  11755. "type": "object",
  11756. "properties": {
  11757. "directory": {
  11758. "type": "string"
  11759. },
  11760. "workspace": {
  11761. "type": "string"
  11762. }
  11763. },
  11764. "additionalProperties": false
  11765. },
  11766. "required": false,
  11767. "style": "deepObject",
  11768. "explode": true
  11769. }
  11770. ],
  11771. "security": [],
  11772. "responses": {
  11773. "200": {
  11774. "description": "Success",
  11775. "content": {
  11776. "text/event-stream": {
  11777. "schema": {
  11778. "type": "string"
  11779. }
  11780. }
  11781. }
  11782. },
  11783. "400": {
  11784. "description": "InvalidRequestError",
  11785. "content": {
  11786. "application/json": {
  11787. "schema": {
  11788. "$ref": "#/components/schemas/InvalidRequestError"
  11789. }
  11790. }
  11791. }
  11792. },
  11793. "401": {
  11794. "description": "UnauthorizedError",
  11795. "content": {
  11796. "application/json": {
  11797. "schema": {
  11798. "$ref": "#/components/schemas/UnauthorizedError"
  11799. }
  11800. }
  11801. }
  11802. }
  11803. },
  11804. "description": "Subscribe to native event payloads for a location.",
  11805. "summary": "Subscribe to events",
  11806. "x-codeSamples": [
  11807. {
  11808. "lang": "js",
  11809. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11810. }
  11811. ]
  11812. }
  11813. },
  11814. "/api/question/request": {
  11815. "get": {
  11816. "tags": ["session questions"],
  11817. "operationId": "v2.question.request.list",
  11818. "parameters": [
  11819. {
  11820. "name": "location",
  11821. "in": "query",
  11822. "schema": {
  11823. "type": "object",
  11824. "properties": {
  11825. "directory": {
  11826. "type": "string"
  11827. },
  11828. "workspace": {
  11829. "type": "string"
  11830. }
  11831. },
  11832. "additionalProperties": false
  11833. },
  11834. "required": false,
  11835. "style": "deepObject",
  11836. "explode": true
  11837. }
  11838. ],
  11839. "security": [],
  11840. "responses": {
  11841. "200": {
  11842. "description": "Success",
  11843. "content": {
  11844. "application/json": {
  11845. "schema": {
  11846. "type": "object",
  11847. "properties": {
  11848. "location": {
  11849. "$ref": "#/components/schemas/LocationInfo"
  11850. },
  11851. "data": {
  11852. "type": "array",
  11853. "items": {
  11854. "$ref": "#/components/schemas/QuestionV2Request"
  11855. }
  11856. }
  11857. },
  11858. "required": ["location", "data"],
  11859. "additionalProperties": false
  11860. }
  11861. }
  11862. }
  11863. },
  11864. "400": {
  11865. "description": "InvalidRequestError",
  11866. "content": {
  11867. "application/json": {
  11868. "schema": {
  11869. "$ref": "#/components/schemas/InvalidRequestError"
  11870. }
  11871. }
  11872. }
  11873. },
  11874. "401": {
  11875. "description": "UnauthorizedError",
  11876. "content": {
  11877. "application/json": {
  11878. "schema": {
  11879. "$ref": "#/components/schemas/UnauthorizedError"
  11880. }
  11881. }
  11882. }
  11883. }
  11884. },
  11885. "description": "Retrieve pending question requests for a location.",
  11886. "summary": "List pending question requests",
  11887. "x-codeSamples": [
  11888. {
  11889. "lang": "js",
  11890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11891. }
  11892. ]
  11893. }
  11894. },
  11895. "/api/session/{sessionID}/question/{requestID}/reply": {
  11896. "post": {
  11897. "tags": ["session questions"],
  11898. "operationId": "v2.session.question.reply",
  11899. "parameters": [
  11900. {
  11901. "name": "sessionID",
  11902. "in": "path",
  11903. "schema": {
  11904. "type": "string",
  11905. "pattern": "^ses"
  11906. },
  11907. "required": true
  11908. },
  11909. {
  11910. "name": "requestID",
  11911. "in": "path",
  11912. "schema": {
  11913. "type": "string",
  11914. "pattern": "^que"
  11915. },
  11916. "required": true
  11917. }
  11918. ],
  11919. "security": [],
  11920. "responses": {
  11921. "204": {
  11922. "description": "<No Content>"
  11923. },
  11924. "400": {
  11925. "description": "InvalidRequestError",
  11926. "content": {
  11927. "application/json": {
  11928. "schema": {
  11929. "$ref": "#/components/schemas/InvalidRequestError"
  11930. }
  11931. }
  11932. }
  11933. },
  11934. "401": {
  11935. "description": "UnauthorizedError",
  11936. "content": {
  11937. "application/json": {
  11938. "schema": {
  11939. "$ref": "#/components/schemas/UnauthorizedError"
  11940. }
  11941. }
  11942. }
  11943. },
  11944. "404": {
  11945. "description": "SessionNotFoundError | QuestionNotFoundError",
  11946. "content": {
  11947. "application/json": {
  11948. "schema": {
  11949. "anyOf": [
  11950. {
  11951. "$ref": "#/components/schemas/QuestionNotFoundError"
  11952. },
  11953. {
  11954. "$ref": "#/components/schemas/SessionNotFoundError"
  11955. },
  11956. {
  11957. "$ref": "#/components/schemas/SessionNotFoundError"
  11958. }
  11959. ]
  11960. }
  11961. }
  11962. }
  11963. }
  11964. },
  11965. "description": "Answer a pending question request owned by a session.",
  11966. "summary": "Reply to pending question request",
  11967. "requestBody": {
  11968. "content": {
  11969. "application/json": {
  11970. "schema": {
  11971. "$ref": "#/components/schemas/QuestionV2Reply"
  11972. }
  11973. }
  11974. },
  11975. "required": true
  11976. },
  11977. "x-codeSamples": [
  11978. {
  11979. "lang": "js",
  11980. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  11981. }
  11982. ]
  11983. }
  11984. },
  11985. "/api/session/{sessionID}/question/{requestID}/reject": {
  11986. "post": {
  11987. "tags": ["session questions"],
  11988. "operationId": "v2.session.question.reject",
  11989. "parameters": [
  11990. {
  11991. "name": "sessionID",
  11992. "in": "path",
  11993. "schema": {
  11994. "type": "string",
  11995. "pattern": "^ses"
  11996. },
  11997. "required": true
  11998. },
  11999. {
  12000. "name": "requestID",
  12001. "in": "path",
  12002. "schema": {
  12003. "type": "string",
  12004. "pattern": "^que"
  12005. },
  12006. "required": true
  12007. }
  12008. ],
  12009. "security": [],
  12010. "responses": {
  12011. "204": {
  12012. "description": "<No Content>"
  12013. },
  12014. "400": {
  12015. "description": "InvalidRequestError",
  12016. "content": {
  12017. "application/json": {
  12018. "schema": {
  12019. "$ref": "#/components/schemas/InvalidRequestError"
  12020. }
  12021. }
  12022. }
  12023. },
  12024. "401": {
  12025. "description": "UnauthorizedError",
  12026. "content": {
  12027. "application/json": {
  12028. "schema": {
  12029. "$ref": "#/components/schemas/UnauthorizedError"
  12030. }
  12031. }
  12032. }
  12033. },
  12034. "404": {
  12035. "description": "SessionNotFoundError | QuestionNotFoundError",
  12036. "content": {
  12037. "application/json": {
  12038. "schema": {
  12039. "anyOf": [
  12040. {
  12041. "$ref": "#/components/schemas/QuestionNotFoundError"
  12042. },
  12043. {
  12044. "$ref": "#/components/schemas/SessionNotFoundError"
  12045. },
  12046. {
  12047. "$ref": "#/components/schemas/SessionNotFoundError"
  12048. }
  12049. ]
  12050. }
  12051. }
  12052. }
  12053. }
  12054. },
  12055. "description": "Reject a pending question request owned by a session.",
  12056. "summary": "Reject pending question request",
  12057. "x-codeSamples": [
  12058. {
  12059. "lang": "js",
  12060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  12061. }
  12062. ]
  12063. }
  12064. },
  12065. "/pty/{ptyID}/connect": {
  12066. "get": {
  12067. "tags": ["pty"],
  12068. "operationId": "pty.connect",
  12069. "parameters": [
  12070. {
  12071. "name": "ptyID",
  12072. "in": "path",
  12073. "schema": {
  12074. "type": "string",
  12075. "pattern": "^pty"
  12076. },
  12077. "required": true
  12078. },
  12079. {
  12080. "in": "query",
  12081. "name": "directory",
  12082. "schema": {
  12083. "type": "string"
  12084. }
  12085. },
  12086. {
  12087. "in": "query",
  12088. "name": "workspace",
  12089. "schema": {
  12090. "type": "string"
  12091. }
  12092. },
  12093. {
  12094. "in": "query",
  12095. "name": "cursor",
  12096. "schema": {
  12097. "type": "string"
  12098. }
  12099. },
  12100. {
  12101. "in": "query",
  12102. "name": "ticket",
  12103. "schema": {
  12104. "type": "string"
  12105. }
  12106. }
  12107. ],
  12108. "responses": {
  12109. "200": {
  12110. "description": "Connected session",
  12111. "content": {
  12112. "application/json": {
  12113. "schema": {
  12114. "type": "boolean",
  12115. "description": "Connected session"
  12116. }
  12117. }
  12118. }
  12119. },
  12120. "403": {
  12121. "description": "Forbidden",
  12122. "content": {
  12123. "application/json": {
  12124. "schema": {
  12125. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  12126. }
  12127. }
  12128. }
  12129. },
  12130. "404": {
  12131. "description": "Not found",
  12132. "content": {
  12133. "application/json": {
  12134. "schema": {
  12135. "$ref": "#/components/schemas/NotFoundError"
  12136. }
  12137. }
  12138. }
  12139. }
  12140. },
  12141. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  12142. "summary": "Connect to PTY session",
  12143. "x-codeSamples": [
  12144. {
  12145. "lang": "js",
  12146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  12147. }
  12148. ]
  12149. }
  12150. }
  12151. },
  12152. "components": {
  12153. "schemas": {
  12154. "Event": {
  12155. "anyOf": [
  12156. {
  12157. "$ref": "#/components/schemas/EventModels-devRefreshed"
  12158. },
  12159. {
  12160. "$ref": "#/components/schemas/EventPluginAdded"
  12161. },
  12162. {
  12163. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12164. },
  12165. {
  12166. "$ref": "#/components/schemas/EventSessionCreated"
  12167. },
  12168. {
  12169. "$ref": "#/components/schemas/EventSessionUpdated"
  12170. },
  12171. {
  12172. "$ref": "#/components/schemas/EventSessionDeleted"
  12173. },
  12174. {
  12175. "$ref": "#/components/schemas/EventMessageUpdated"
  12176. },
  12177. {
  12178. "$ref": "#/components/schemas/EventMessageRemoved"
  12179. },
  12180. {
  12181. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12182. },
  12183. {
  12184. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12185. },
  12186. {
  12187. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12188. },
  12189. {
  12190. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12191. },
  12192. {
  12193. "$ref": "#/components/schemas/EventSessionNextMoved"
  12194. },
  12195. {
  12196. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12197. },
  12198. {
  12199. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  12200. },
  12201. {
  12202. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  12203. },
  12204. {
  12205. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  12206. },
  12207. {
  12208. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  12209. },
  12210. {
  12211. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12212. },
  12213. {
  12214. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12215. },
  12216. {
  12217. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12218. },
  12219. {
  12220. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12221. },
  12222. {
  12223. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12224. },
  12225. {
  12226. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12227. },
  12228. {
  12229. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12230. },
  12231. {
  12232. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12233. },
  12234. {
  12235. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12236. },
  12237. {
  12238. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12239. },
  12240. {
  12241. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12242. },
  12243. {
  12244. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12245. },
  12246. {
  12247. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12248. },
  12249. {
  12250. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12251. },
  12252. {
  12253. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12254. },
  12255. {
  12256. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12257. },
  12258. {
  12259. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12260. },
  12261. {
  12262. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12263. },
  12264. {
  12265. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12266. },
  12267. {
  12268. "$ref": "#/components/schemas/EventSessionNextRetried"
  12269. },
  12270. {
  12271. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12272. },
  12273. {
  12274. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12275. },
  12276. {
  12277. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12278. },
  12279. {
  12280. "$ref": "#/components/schemas/EventMessagePartDelta"
  12281. },
  12282. {
  12283. "$ref": "#/components/schemas/EventSessionDiff"
  12284. },
  12285. {
  12286. "$ref": "#/components/schemas/EventSessionError"
  12287. },
  12288. {
  12289. "$ref": "#/components/schemas/EventInstallationUpdated"
  12290. },
  12291. {
  12292. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12293. },
  12294. {
  12295. "$ref": "#/components/schemas/EventFileEdited"
  12296. },
  12297. {
  12298. "$ref": "#/components/schemas/EventAccountAdded"
  12299. },
  12300. {
  12301. "$ref": "#/components/schemas/EventAccountRemoved"
  12302. },
  12303. {
  12304. "$ref": "#/components/schemas/EventAccountSwitched"
  12305. },
  12306. {
  12307. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12308. },
  12309. {
  12310. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12311. },
  12312. {
  12313. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12314. },
  12315. {
  12316. "$ref": "#/components/schemas/EventPtyCreated"
  12317. },
  12318. {
  12319. "$ref": "#/components/schemas/EventPtyUpdated"
  12320. },
  12321. {
  12322. "$ref": "#/components/schemas/EventPtyExited"
  12323. },
  12324. {
  12325. "$ref": "#/components/schemas/EventPtyDeleted"
  12326. },
  12327. {
  12328. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12329. },
  12330. {
  12331. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12332. },
  12333. {
  12334. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12335. },
  12336. {
  12337. "$ref": "#/components/schemas/EventTodoUpdated"
  12338. },
  12339. {
  12340. "$ref": "#/components/schemas/EventLspUpdated"
  12341. },
  12342. {
  12343. "$ref": "#/components/schemas/EventPermissionAsked"
  12344. },
  12345. {
  12346. "$ref": "#/components/schemas/EventPermissionReplied"
  12347. },
  12348. {
  12349. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12350. },
  12351. {
  12352. "$ref": "#/components/schemas/Event.tui.command.execute"
  12353. },
  12354. {
  12355. "$ref": "#/components/schemas/Event.tui.toast.show"
  12356. },
  12357. {
  12358. "$ref": "#/components/schemas/Event.tui.session.select"
  12359. },
  12360. {
  12361. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12362. },
  12363. {
  12364. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12365. },
  12366. {
  12367. "$ref": "#/components/schemas/EventCommandExecuted"
  12368. },
  12369. {
  12370. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12371. },
  12372. {
  12373. "$ref": "#/components/schemas/EventProjectUpdated"
  12374. },
  12375. {
  12376. "$ref": "#/components/schemas/EventQuestionAsked"
  12377. },
  12378. {
  12379. "$ref": "#/components/schemas/EventQuestionReplied"
  12380. },
  12381. {
  12382. "$ref": "#/components/schemas/EventQuestionRejected"
  12383. },
  12384. {
  12385. "$ref": "#/components/schemas/EventSessionStatus"
  12386. },
  12387. {
  12388. "$ref": "#/components/schemas/EventSessionIdle"
  12389. },
  12390. {
  12391. "$ref": "#/components/schemas/EventSessionCompacted"
  12392. },
  12393. {
  12394. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12395. },
  12396. {
  12397. "$ref": "#/components/schemas/EventWorktreeReady"
  12398. },
  12399. {
  12400. "$ref": "#/components/schemas/EventWorktreeFailed"
  12401. },
  12402. {
  12403. "$ref": "#/components/schemas/EventWorkspaceReady"
  12404. },
  12405. {
  12406. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12407. },
  12408. {
  12409. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12410. },
  12411. {
  12412. "$ref": "#/components/schemas/EventServerConnected"
  12413. },
  12414. {
  12415. "$ref": "#/components/schemas/EventGlobalDisposed"
  12416. },
  12417. {
  12418. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12419. }
  12420. ]
  12421. },
  12422. "QuestionReplied": {
  12423. "type": "object",
  12424. "properties": {
  12425. "sessionID": {
  12426. "type": "string",
  12427. "pattern": "^ses"
  12428. },
  12429. "requestID": {
  12430. "type": "string",
  12431. "pattern": "^que"
  12432. },
  12433. "answers": {
  12434. "type": "array",
  12435. "items": {
  12436. "$ref": "#/components/schemas/QuestionAnswer"
  12437. }
  12438. }
  12439. },
  12440. "required": ["sessionID", "requestID", "answers"],
  12441. "additionalProperties": false
  12442. },
  12443. "QuestionRejected": {
  12444. "type": "object",
  12445. "properties": {
  12446. "sessionID": {
  12447. "type": "string",
  12448. "pattern": "^ses"
  12449. },
  12450. "requestID": {
  12451. "type": "string",
  12452. "pattern": "^que"
  12453. }
  12454. },
  12455. "required": ["sessionID", "requestID"],
  12456. "additionalProperties": false
  12457. },
  12458. "OAuth": {
  12459. "type": "object",
  12460. "properties": {
  12461. "type": {
  12462. "type": "string",
  12463. "enum": ["oauth"]
  12464. },
  12465. "refresh": {
  12466. "type": "string"
  12467. },
  12468. "access": {
  12469. "type": "string"
  12470. },
  12471. "expires": {
  12472. "type": "integer",
  12473. "minimum": 0
  12474. },
  12475. "accountId": {
  12476. "type": "string"
  12477. },
  12478. "enterpriseUrl": {
  12479. "type": "string"
  12480. }
  12481. },
  12482. "required": ["type", "refresh", "access", "expires"],
  12483. "additionalProperties": false
  12484. },
  12485. "ApiAuth": {
  12486. "type": "object",
  12487. "properties": {
  12488. "type": {
  12489. "type": "string",
  12490. "enum": ["api"]
  12491. },
  12492. "key": {
  12493. "type": "string"
  12494. },
  12495. "metadata": {
  12496. "type": "object",
  12497. "additionalProperties": {
  12498. "type": "string"
  12499. }
  12500. }
  12501. },
  12502. "required": ["type", "key"],
  12503. "additionalProperties": false
  12504. },
  12505. "WellKnownAuth": {
  12506. "type": "object",
  12507. "properties": {
  12508. "type": {
  12509. "type": "string",
  12510. "enum": ["wellknown"]
  12511. },
  12512. "key": {
  12513. "type": "string"
  12514. },
  12515. "token": {
  12516. "type": "string"
  12517. }
  12518. },
  12519. "required": ["type", "key", "token"],
  12520. "additionalProperties": false
  12521. },
  12522. "Auth": {
  12523. "anyOf": [
  12524. {
  12525. "$ref": "#/components/schemas/OAuth"
  12526. },
  12527. {
  12528. "$ref": "#/components/schemas/ApiAuth"
  12529. },
  12530. {
  12531. "$ref": "#/components/schemas/WellKnownAuth"
  12532. }
  12533. ]
  12534. },
  12535. "effect_HttpApiError_BadRequest": {
  12536. "type": "object",
  12537. "properties": {
  12538. "_tag": {
  12539. "type": "string",
  12540. "enum": ["BadRequest"]
  12541. }
  12542. },
  12543. "required": ["_tag"],
  12544. "additionalProperties": false
  12545. },
  12546. "InvalidRequestError": {
  12547. "type": "object",
  12548. "properties": {
  12549. "_tag": {
  12550. "type": "string",
  12551. "enum": ["InvalidRequestError"]
  12552. },
  12553. "message": {
  12554. "type": "string"
  12555. },
  12556. "kind": {
  12557. "type": "string"
  12558. },
  12559. "field": {
  12560. "type": "string"
  12561. }
  12562. },
  12563. "required": ["_tag", "message"],
  12564. "additionalProperties": false
  12565. },
  12566. "MoveSessionError": {
  12567. "type": "object",
  12568. "properties": {
  12569. "name": {
  12570. "type": "string",
  12571. "enum": ["MoveSessionError"]
  12572. },
  12573. "data": {
  12574. "type": "object",
  12575. "properties": {
  12576. "message": {
  12577. "type": "string"
  12578. }
  12579. },
  12580. "required": ["message"],
  12581. "additionalProperties": false
  12582. }
  12583. },
  12584. "required": ["name", "data"],
  12585. "additionalProperties": false
  12586. },
  12587. "SnapshotFileDiff": {
  12588. "type": "object",
  12589. "properties": {
  12590. "file": {
  12591. "type": "string"
  12592. },
  12593. "patch": {
  12594. "type": "string"
  12595. },
  12596. "additions": {
  12597. "type": "number"
  12598. },
  12599. "deletions": {
  12600. "type": "number"
  12601. },
  12602. "status": {
  12603. "type": "string",
  12604. "enum": ["added", "deleted", "modified"]
  12605. }
  12606. },
  12607. "required": ["additions", "deletions"],
  12608. "additionalProperties": false
  12609. },
  12610. "PermissionAction": {
  12611. "type": "string",
  12612. "enum": ["allow", "deny", "ask"]
  12613. },
  12614. "PermissionRule": {
  12615. "type": "object",
  12616. "properties": {
  12617. "permission": {
  12618. "type": "string"
  12619. },
  12620. "pattern": {
  12621. "type": "string"
  12622. },
  12623. "action": {
  12624. "$ref": "#/components/schemas/PermissionAction"
  12625. }
  12626. },
  12627. "required": ["permission", "pattern", "action"],
  12628. "additionalProperties": false
  12629. },
  12630. "PermissionRuleset": {
  12631. "type": "array",
  12632. "items": {
  12633. "$ref": "#/components/schemas/PermissionRule"
  12634. }
  12635. },
  12636. "Session": {
  12637. "type": "object",
  12638. "properties": {
  12639. "id": {
  12640. "type": "string",
  12641. "pattern": "^ses"
  12642. },
  12643. "slug": {
  12644. "type": "string"
  12645. },
  12646. "projectID": {
  12647. "type": "string"
  12648. },
  12649. "workspaceID": {
  12650. "type": "string",
  12651. "pattern": "^wrk"
  12652. },
  12653. "directory": {
  12654. "type": "string"
  12655. },
  12656. "path": {
  12657. "type": "string"
  12658. },
  12659. "parentID": {
  12660. "type": "string",
  12661. "pattern": "^ses"
  12662. },
  12663. "summary": {
  12664. "type": "object",
  12665. "properties": {
  12666. "additions": {
  12667. "type": "number"
  12668. },
  12669. "deletions": {
  12670. "type": "number"
  12671. },
  12672. "files": {
  12673. "type": "number"
  12674. },
  12675. "diffs": {
  12676. "type": "array",
  12677. "items": {
  12678. "$ref": "#/components/schemas/SnapshotFileDiff"
  12679. }
  12680. }
  12681. },
  12682. "required": ["additions", "deletions", "files"],
  12683. "additionalProperties": false
  12684. },
  12685. "cost": {
  12686. "type": "number"
  12687. },
  12688. "tokens": {
  12689. "type": "object",
  12690. "properties": {
  12691. "input": {
  12692. "type": "number"
  12693. },
  12694. "output": {
  12695. "type": "number"
  12696. },
  12697. "reasoning": {
  12698. "type": "number"
  12699. },
  12700. "cache": {
  12701. "type": "object",
  12702. "properties": {
  12703. "read": {
  12704. "type": "number"
  12705. },
  12706. "write": {
  12707. "type": "number"
  12708. }
  12709. },
  12710. "required": ["read", "write"],
  12711. "additionalProperties": false
  12712. }
  12713. },
  12714. "required": ["input", "output", "reasoning", "cache"],
  12715. "additionalProperties": false
  12716. },
  12717. "share": {
  12718. "type": "object",
  12719. "properties": {
  12720. "url": {
  12721. "type": "string"
  12722. }
  12723. },
  12724. "required": ["url"],
  12725. "additionalProperties": false
  12726. },
  12727. "title": {
  12728. "type": "string"
  12729. },
  12730. "agent": {
  12731. "type": "string"
  12732. },
  12733. "model": {
  12734. "type": "object",
  12735. "properties": {
  12736. "id": {
  12737. "type": "string"
  12738. },
  12739. "providerID": {
  12740. "type": "string"
  12741. },
  12742. "variant": {
  12743. "type": "string"
  12744. }
  12745. },
  12746. "required": ["id", "providerID"],
  12747. "additionalProperties": false
  12748. },
  12749. "version": {
  12750. "type": "string"
  12751. },
  12752. "metadata": {
  12753. "type": "object"
  12754. },
  12755. "time": {
  12756. "type": "object",
  12757. "properties": {
  12758. "created": {
  12759. "type": "integer",
  12760. "minimum": 0
  12761. },
  12762. "updated": {
  12763. "type": "integer",
  12764. "minimum": 0
  12765. },
  12766. "compacting": {
  12767. "type": "integer",
  12768. "minimum": 0
  12769. },
  12770. "archived": {
  12771. "type": "number"
  12772. }
  12773. },
  12774. "required": ["created", "updated"],
  12775. "additionalProperties": false
  12776. },
  12777. "permission": {
  12778. "$ref": "#/components/schemas/PermissionRuleset"
  12779. },
  12780. "revert": {
  12781. "type": "object",
  12782. "properties": {
  12783. "messageID": {
  12784. "type": "string",
  12785. "pattern": "^msg"
  12786. },
  12787. "partID": {
  12788. "type": "string",
  12789. "pattern": "^prt"
  12790. },
  12791. "snapshot": {
  12792. "type": "string"
  12793. },
  12794. "diff": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "required": ["messageID"],
  12799. "additionalProperties": false
  12800. }
  12801. },
  12802. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12803. "additionalProperties": false
  12804. },
  12805. "OutputFormatText": {
  12806. "type": "object",
  12807. "properties": {
  12808. "type": {
  12809. "type": "string",
  12810. "enum": ["text"]
  12811. }
  12812. },
  12813. "required": ["type"],
  12814. "additionalProperties": false
  12815. },
  12816. "JSONSchema": {
  12817. "type": "object"
  12818. },
  12819. "OutputFormatJsonSchema": {
  12820. "type": "object",
  12821. "properties": {
  12822. "type": {
  12823. "type": "string",
  12824. "enum": ["json_schema"]
  12825. },
  12826. "schema": {
  12827. "$ref": "#/components/schemas/JSONSchema"
  12828. },
  12829. "retryCount": {
  12830. "type": "integer",
  12831. "minimum": 0
  12832. }
  12833. },
  12834. "required": ["type", "schema"],
  12835. "additionalProperties": false
  12836. },
  12837. "OutputFormat": {
  12838. "anyOf": [
  12839. {
  12840. "$ref": "#/components/schemas/OutputFormatText"
  12841. },
  12842. {
  12843. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12844. }
  12845. ]
  12846. },
  12847. "UserMessage": {
  12848. "type": "object",
  12849. "properties": {
  12850. "id": {
  12851. "type": "string",
  12852. "pattern": "^msg"
  12853. },
  12854. "sessionID": {
  12855. "type": "string",
  12856. "pattern": "^ses"
  12857. },
  12858. "role": {
  12859. "type": "string",
  12860. "enum": ["user"]
  12861. },
  12862. "time": {
  12863. "type": "object",
  12864. "properties": {
  12865. "created": {
  12866. "type": "number",
  12867. "minimum": 0
  12868. }
  12869. },
  12870. "required": ["created"],
  12871. "additionalProperties": false
  12872. },
  12873. "format": {
  12874. "$ref": "#/components/schemas/OutputFormat"
  12875. },
  12876. "summary": {
  12877. "type": "object",
  12878. "properties": {
  12879. "title": {
  12880. "type": "string"
  12881. },
  12882. "body": {
  12883. "type": "string"
  12884. },
  12885. "diffs": {
  12886. "type": "array",
  12887. "items": {
  12888. "$ref": "#/components/schemas/SnapshotFileDiff"
  12889. }
  12890. }
  12891. },
  12892. "required": ["diffs"],
  12893. "additionalProperties": false
  12894. },
  12895. "agent": {
  12896. "type": "string"
  12897. },
  12898. "model": {
  12899. "type": "object",
  12900. "properties": {
  12901. "providerID": {
  12902. "type": "string"
  12903. },
  12904. "modelID": {
  12905. "type": "string"
  12906. },
  12907. "variant": {
  12908. "type": "string"
  12909. }
  12910. },
  12911. "required": ["providerID", "modelID"],
  12912. "additionalProperties": false
  12913. },
  12914. "system": {
  12915. "type": "string"
  12916. },
  12917. "tools": {
  12918. "type": "object",
  12919. "additionalProperties": {
  12920. "type": "boolean"
  12921. }
  12922. }
  12923. },
  12924. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12925. "additionalProperties": false
  12926. },
  12927. "ProviderAuthError": {
  12928. "type": "object",
  12929. "properties": {
  12930. "name": {
  12931. "type": "string",
  12932. "enum": ["ProviderAuthError"]
  12933. },
  12934. "data": {
  12935. "type": "object",
  12936. "properties": {
  12937. "providerID": {
  12938. "type": "string"
  12939. },
  12940. "message": {
  12941. "type": "string"
  12942. }
  12943. },
  12944. "required": ["providerID", "message"],
  12945. "additionalProperties": false
  12946. }
  12947. },
  12948. "required": ["name", "data"],
  12949. "additionalProperties": false
  12950. },
  12951. "UnknownError": {
  12952. "type": "object",
  12953. "properties": {
  12954. "name": {
  12955. "type": "string",
  12956. "enum": ["UnknownError"]
  12957. },
  12958. "data": {
  12959. "type": "object",
  12960. "properties": {
  12961. "message": {
  12962. "type": "string"
  12963. },
  12964. "ref": {
  12965. "type": "string"
  12966. }
  12967. },
  12968. "required": ["message"],
  12969. "additionalProperties": false
  12970. }
  12971. },
  12972. "required": ["name", "data"],
  12973. "additionalProperties": false
  12974. },
  12975. "MessageOutputLengthError": {
  12976. "type": "object",
  12977. "properties": {
  12978. "name": {
  12979. "type": "string",
  12980. "enum": ["MessageOutputLengthError"]
  12981. },
  12982. "data": {
  12983. "type": "object",
  12984. "properties": {}
  12985. }
  12986. },
  12987. "required": ["name", "data"],
  12988. "additionalProperties": false
  12989. },
  12990. "MessageAbortedError": {
  12991. "type": "object",
  12992. "properties": {
  12993. "name": {
  12994. "type": "string",
  12995. "enum": ["MessageAbortedError"]
  12996. },
  12997. "data": {
  12998. "type": "object",
  12999. "properties": {
  13000. "message": {
  13001. "type": "string"
  13002. }
  13003. },
  13004. "required": ["message"],
  13005. "additionalProperties": false
  13006. }
  13007. },
  13008. "required": ["name", "data"],
  13009. "additionalProperties": false
  13010. },
  13011. "StructuredOutputError": {
  13012. "type": "object",
  13013. "properties": {
  13014. "name": {
  13015. "type": "string",
  13016. "enum": ["StructuredOutputError"]
  13017. },
  13018. "data": {
  13019. "type": "object",
  13020. "properties": {
  13021. "message": {
  13022. "type": "string"
  13023. },
  13024. "retries": {
  13025. "type": "integer",
  13026. "minimum": 0
  13027. }
  13028. },
  13029. "required": ["message", "retries"],
  13030. "additionalProperties": false
  13031. }
  13032. },
  13033. "required": ["name", "data"],
  13034. "additionalProperties": false
  13035. },
  13036. "ContextOverflowError": {
  13037. "type": "object",
  13038. "properties": {
  13039. "name": {
  13040. "type": "string",
  13041. "enum": ["ContextOverflowError"]
  13042. },
  13043. "data": {
  13044. "type": "object",
  13045. "properties": {
  13046. "message": {
  13047. "type": "string"
  13048. },
  13049. "responseBody": {
  13050. "type": "string"
  13051. }
  13052. },
  13053. "required": ["message"],
  13054. "additionalProperties": false
  13055. }
  13056. },
  13057. "required": ["name", "data"],
  13058. "additionalProperties": false
  13059. },
  13060. "APIError": {
  13061. "type": "object",
  13062. "properties": {
  13063. "name": {
  13064. "type": "string",
  13065. "enum": ["APIError"]
  13066. },
  13067. "data": {
  13068. "type": "object",
  13069. "properties": {
  13070. "message": {
  13071. "type": "string"
  13072. },
  13073. "statusCode": {
  13074. "type": "integer",
  13075. "minimum": 0
  13076. },
  13077. "isRetryable": {
  13078. "type": "boolean"
  13079. },
  13080. "responseHeaders": {
  13081. "type": "object",
  13082. "additionalProperties": {
  13083. "type": "string"
  13084. }
  13085. },
  13086. "responseBody": {
  13087. "type": "string"
  13088. },
  13089. "metadata": {
  13090. "type": "object",
  13091. "additionalProperties": {
  13092. "type": "string"
  13093. }
  13094. }
  13095. },
  13096. "required": ["message", "isRetryable"],
  13097. "additionalProperties": false
  13098. }
  13099. },
  13100. "required": ["name", "data"],
  13101. "additionalProperties": false
  13102. },
  13103. "AssistantMessage": {
  13104. "type": "object",
  13105. "properties": {
  13106. "id": {
  13107. "type": "string",
  13108. "pattern": "^msg"
  13109. },
  13110. "sessionID": {
  13111. "type": "string",
  13112. "pattern": "^ses"
  13113. },
  13114. "role": {
  13115. "type": "string",
  13116. "enum": ["assistant"]
  13117. },
  13118. "time": {
  13119. "type": "object",
  13120. "properties": {
  13121. "created": {
  13122. "type": "integer",
  13123. "minimum": 0
  13124. },
  13125. "completed": {
  13126. "type": "integer",
  13127. "minimum": 0
  13128. }
  13129. },
  13130. "required": ["created"],
  13131. "additionalProperties": false
  13132. },
  13133. "error": {
  13134. "anyOf": [
  13135. {
  13136. "$ref": "#/components/schemas/ProviderAuthError"
  13137. },
  13138. {
  13139. "$ref": "#/components/schemas/UnknownError"
  13140. },
  13141. {
  13142. "$ref": "#/components/schemas/MessageOutputLengthError"
  13143. },
  13144. {
  13145. "$ref": "#/components/schemas/MessageAbortedError"
  13146. },
  13147. {
  13148. "$ref": "#/components/schemas/StructuredOutputError"
  13149. },
  13150. {
  13151. "$ref": "#/components/schemas/ContextOverflowError"
  13152. },
  13153. {
  13154. "$ref": "#/components/schemas/APIError"
  13155. }
  13156. ]
  13157. },
  13158. "parentID": {
  13159. "type": "string",
  13160. "pattern": "^msg"
  13161. },
  13162. "modelID": {
  13163. "type": "string"
  13164. },
  13165. "providerID": {
  13166. "type": "string"
  13167. },
  13168. "mode": {
  13169. "type": "string"
  13170. },
  13171. "agent": {
  13172. "type": "string"
  13173. },
  13174. "path": {
  13175. "type": "object",
  13176. "properties": {
  13177. "cwd": {
  13178. "type": "string"
  13179. },
  13180. "root": {
  13181. "type": "string"
  13182. }
  13183. },
  13184. "required": ["cwd", "root"],
  13185. "additionalProperties": false
  13186. },
  13187. "summary": {
  13188. "type": "boolean"
  13189. },
  13190. "cost": {
  13191. "type": "number"
  13192. },
  13193. "tokens": {
  13194. "type": "object",
  13195. "properties": {
  13196. "total": {
  13197. "type": "number"
  13198. },
  13199. "input": {
  13200. "type": "number"
  13201. },
  13202. "output": {
  13203. "type": "number"
  13204. },
  13205. "reasoning": {
  13206. "type": "number"
  13207. },
  13208. "cache": {
  13209. "type": "object",
  13210. "properties": {
  13211. "read": {
  13212. "type": "number"
  13213. },
  13214. "write": {
  13215. "type": "number"
  13216. }
  13217. },
  13218. "required": ["read", "write"],
  13219. "additionalProperties": false
  13220. }
  13221. },
  13222. "required": ["input", "output", "reasoning", "cache"],
  13223. "additionalProperties": false
  13224. },
  13225. "structured": {},
  13226. "variant": {
  13227. "type": "string"
  13228. },
  13229. "finish": {
  13230. "type": "string"
  13231. }
  13232. },
  13233. "required": [
  13234. "id",
  13235. "sessionID",
  13236. "role",
  13237. "time",
  13238. "parentID",
  13239. "modelID",
  13240. "providerID",
  13241. "mode",
  13242. "agent",
  13243. "path",
  13244. "cost",
  13245. "tokens"
  13246. ],
  13247. "additionalProperties": false
  13248. },
  13249. "Message": {
  13250. "anyOf": [
  13251. {
  13252. "$ref": "#/components/schemas/UserMessage"
  13253. },
  13254. {
  13255. "$ref": "#/components/schemas/AssistantMessage"
  13256. }
  13257. ]
  13258. },
  13259. "TextPart": {
  13260. "type": "object",
  13261. "properties": {
  13262. "id": {
  13263. "type": "string",
  13264. "pattern": "^prt"
  13265. },
  13266. "sessionID": {
  13267. "type": "string",
  13268. "pattern": "^ses"
  13269. },
  13270. "messageID": {
  13271. "type": "string",
  13272. "pattern": "^msg"
  13273. },
  13274. "type": {
  13275. "type": "string",
  13276. "enum": ["text"]
  13277. },
  13278. "text": {
  13279. "type": "string"
  13280. },
  13281. "synthetic": {
  13282. "type": "boolean"
  13283. },
  13284. "ignored": {
  13285. "type": "boolean"
  13286. },
  13287. "time": {
  13288. "type": "object",
  13289. "properties": {
  13290. "start": {
  13291. "type": "integer",
  13292. "minimum": 0
  13293. },
  13294. "end": {
  13295. "type": "integer",
  13296. "minimum": 0
  13297. }
  13298. },
  13299. "required": ["start"],
  13300. "additionalProperties": false
  13301. },
  13302. "metadata": {
  13303. "type": "object"
  13304. }
  13305. },
  13306. "required": ["id", "sessionID", "messageID", "type", "text"],
  13307. "additionalProperties": false
  13308. },
  13309. "SubtaskPart": {
  13310. "type": "object",
  13311. "properties": {
  13312. "id": {
  13313. "type": "string",
  13314. "pattern": "^prt"
  13315. },
  13316. "sessionID": {
  13317. "type": "string",
  13318. "pattern": "^ses"
  13319. },
  13320. "messageID": {
  13321. "type": "string",
  13322. "pattern": "^msg"
  13323. },
  13324. "type": {
  13325. "type": "string",
  13326. "enum": ["subtask"]
  13327. },
  13328. "prompt": {
  13329. "type": "string"
  13330. },
  13331. "description": {
  13332. "type": "string"
  13333. },
  13334. "agent": {
  13335. "type": "string"
  13336. },
  13337. "model": {
  13338. "type": "object",
  13339. "properties": {
  13340. "providerID": {
  13341. "type": "string"
  13342. },
  13343. "modelID": {
  13344. "type": "string"
  13345. }
  13346. },
  13347. "required": ["providerID", "modelID"],
  13348. "additionalProperties": false
  13349. },
  13350. "command": {
  13351. "type": "string"
  13352. }
  13353. },
  13354. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13355. "additionalProperties": false
  13356. },
  13357. "ReasoningPart": {
  13358. "type": "object",
  13359. "properties": {
  13360. "id": {
  13361. "type": "string",
  13362. "pattern": "^prt"
  13363. },
  13364. "sessionID": {
  13365. "type": "string",
  13366. "pattern": "^ses"
  13367. },
  13368. "messageID": {
  13369. "type": "string",
  13370. "pattern": "^msg"
  13371. },
  13372. "type": {
  13373. "type": "string",
  13374. "enum": ["reasoning"]
  13375. },
  13376. "text": {
  13377. "type": "string"
  13378. },
  13379. "metadata": {
  13380. "type": "object"
  13381. },
  13382. "time": {
  13383. "type": "object",
  13384. "properties": {
  13385. "start": {
  13386. "type": "integer",
  13387. "minimum": 0
  13388. },
  13389. "end": {
  13390. "type": "integer",
  13391. "minimum": 0
  13392. }
  13393. },
  13394. "required": ["start"],
  13395. "additionalProperties": false
  13396. }
  13397. },
  13398. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13399. "additionalProperties": false
  13400. },
  13401. "FilePartSourceText": {
  13402. "type": "object",
  13403. "properties": {
  13404. "value": {
  13405. "type": "string"
  13406. },
  13407. "start": {
  13408. "type": "number"
  13409. },
  13410. "end": {
  13411. "type": "number"
  13412. }
  13413. },
  13414. "required": ["value", "start", "end"],
  13415. "additionalProperties": false
  13416. },
  13417. "FileSource": {
  13418. "type": "object",
  13419. "properties": {
  13420. "text": {
  13421. "$ref": "#/components/schemas/FilePartSourceText"
  13422. },
  13423. "type": {
  13424. "type": "string",
  13425. "enum": ["file"]
  13426. },
  13427. "path": {
  13428. "type": "string"
  13429. }
  13430. },
  13431. "required": ["text", "type", "path"],
  13432. "additionalProperties": false
  13433. },
  13434. "Range": {
  13435. "type": "object",
  13436. "properties": {
  13437. "start": {
  13438. "type": "object",
  13439. "properties": {
  13440. "line": {
  13441. "type": "integer",
  13442. "minimum": 0
  13443. },
  13444. "character": {
  13445. "type": "integer",
  13446. "minimum": 0
  13447. }
  13448. },
  13449. "required": ["line", "character"],
  13450. "additionalProperties": false
  13451. },
  13452. "end": {
  13453. "type": "object",
  13454. "properties": {
  13455. "line": {
  13456. "type": "integer",
  13457. "minimum": 0
  13458. },
  13459. "character": {
  13460. "type": "integer",
  13461. "minimum": 0
  13462. }
  13463. },
  13464. "required": ["line", "character"],
  13465. "additionalProperties": false
  13466. }
  13467. },
  13468. "required": ["start", "end"],
  13469. "additionalProperties": false
  13470. },
  13471. "SymbolSource": {
  13472. "type": "object",
  13473. "properties": {
  13474. "text": {
  13475. "$ref": "#/components/schemas/FilePartSourceText"
  13476. },
  13477. "type": {
  13478. "type": "string",
  13479. "enum": ["symbol"]
  13480. },
  13481. "path": {
  13482. "type": "string"
  13483. },
  13484. "range": {
  13485. "$ref": "#/components/schemas/Range"
  13486. },
  13487. "name": {
  13488. "type": "string"
  13489. },
  13490. "kind": {
  13491. "type": "integer",
  13492. "minimum": 0
  13493. }
  13494. },
  13495. "required": ["text", "type", "path", "range", "name", "kind"],
  13496. "additionalProperties": false
  13497. },
  13498. "ResourceSource": {
  13499. "type": "object",
  13500. "properties": {
  13501. "text": {
  13502. "$ref": "#/components/schemas/FilePartSourceText"
  13503. },
  13504. "type": {
  13505. "type": "string",
  13506. "enum": ["resource"]
  13507. },
  13508. "clientName": {
  13509. "type": "string"
  13510. },
  13511. "uri": {
  13512. "type": "string"
  13513. }
  13514. },
  13515. "required": ["text", "type", "clientName", "uri"],
  13516. "additionalProperties": false
  13517. },
  13518. "FilePartSource": {
  13519. "anyOf": [
  13520. {
  13521. "$ref": "#/components/schemas/FileSource"
  13522. },
  13523. {
  13524. "$ref": "#/components/schemas/SymbolSource"
  13525. },
  13526. {
  13527. "$ref": "#/components/schemas/ResourceSource"
  13528. }
  13529. ]
  13530. },
  13531. "FilePart": {
  13532. "type": "object",
  13533. "properties": {
  13534. "id": {
  13535. "type": "string",
  13536. "pattern": "^prt"
  13537. },
  13538. "sessionID": {
  13539. "type": "string",
  13540. "pattern": "^ses"
  13541. },
  13542. "messageID": {
  13543. "type": "string",
  13544. "pattern": "^msg"
  13545. },
  13546. "type": {
  13547. "type": "string",
  13548. "enum": ["file"]
  13549. },
  13550. "mime": {
  13551. "type": "string"
  13552. },
  13553. "filename": {
  13554. "type": "string"
  13555. },
  13556. "url": {
  13557. "type": "string"
  13558. },
  13559. "source": {
  13560. "$ref": "#/components/schemas/FilePartSource"
  13561. }
  13562. },
  13563. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13564. "additionalProperties": false
  13565. },
  13566. "ToolStatePending": {
  13567. "type": "object",
  13568. "properties": {
  13569. "status": {
  13570. "type": "string",
  13571. "enum": ["pending"]
  13572. },
  13573. "input": {
  13574. "type": "object"
  13575. },
  13576. "raw": {
  13577. "type": "string"
  13578. }
  13579. },
  13580. "required": ["status", "input", "raw"],
  13581. "additionalProperties": false
  13582. },
  13583. "ToolStateRunning": {
  13584. "type": "object",
  13585. "properties": {
  13586. "status": {
  13587. "type": "string",
  13588. "enum": ["running"]
  13589. },
  13590. "input": {
  13591. "type": "object"
  13592. },
  13593. "title": {
  13594. "type": "string"
  13595. },
  13596. "metadata": {
  13597. "type": "object"
  13598. },
  13599. "time": {
  13600. "type": "object",
  13601. "properties": {
  13602. "start": {
  13603. "type": "integer",
  13604. "minimum": 0
  13605. }
  13606. },
  13607. "required": ["start"],
  13608. "additionalProperties": false
  13609. }
  13610. },
  13611. "required": ["status", "input", "time"],
  13612. "additionalProperties": false
  13613. },
  13614. "ToolStateCompleted": {
  13615. "type": "object",
  13616. "properties": {
  13617. "status": {
  13618. "type": "string",
  13619. "enum": ["completed"]
  13620. },
  13621. "input": {
  13622. "type": "object"
  13623. },
  13624. "output": {
  13625. "type": "string"
  13626. },
  13627. "title": {
  13628. "type": "string"
  13629. },
  13630. "metadata": {
  13631. "type": "object"
  13632. },
  13633. "time": {
  13634. "type": "object",
  13635. "properties": {
  13636. "start": {
  13637. "type": "integer",
  13638. "minimum": 0
  13639. },
  13640. "end": {
  13641. "type": "integer",
  13642. "minimum": 0
  13643. },
  13644. "compacted": {
  13645. "type": "integer",
  13646. "minimum": 0
  13647. }
  13648. },
  13649. "required": ["start", "end"],
  13650. "additionalProperties": false
  13651. },
  13652. "attachments": {
  13653. "type": "array",
  13654. "items": {
  13655. "$ref": "#/components/schemas/FilePart"
  13656. }
  13657. }
  13658. },
  13659. "required": ["status", "input", "output", "title", "metadata", "time"],
  13660. "additionalProperties": false
  13661. },
  13662. "ToolStateError": {
  13663. "type": "object",
  13664. "properties": {
  13665. "status": {
  13666. "type": "string",
  13667. "enum": ["error"]
  13668. },
  13669. "input": {
  13670. "type": "object"
  13671. },
  13672. "error": {
  13673. "type": "string"
  13674. },
  13675. "metadata": {
  13676. "type": "object"
  13677. },
  13678. "time": {
  13679. "type": "object",
  13680. "properties": {
  13681. "start": {
  13682. "type": "integer",
  13683. "minimum": 0
  13684. },
  13685. "end": {
  13686. "type": "integer",
  13687. "minimum": 0
  13688. }
  13689. },
  13690. "required": ["start", "end"],
  13691. "additionalProperties": false
  13692. }
  13693. },
  13694. "required": ["status", "input", "error", "time"],
  13695. "additionalProperties": false
  13696. },
  13697. "ToolState": {
  13698. "anyOf": [
  13699. {
  13700. "$ref": "#/components/schemas/ToolStatePending"
  13701. },
  13702. {
  13703. "$ref": "#/components/schemas/ToolStateRunning"
  13704. },
  13705. {
  13706. "$ref": "#/components/schemas/ToolStateCompleted"
  13707. },
  13708. {
  13709. "$ref": "#/components/schemas/ToolStateError"
  13710. }
  13711. ]
  13712. },
  13713. "ToolPart": {
  13714. "type": "object",
  13715. "properties": {
  13716. "id": {
  13717. "type": "string",
  13718. "pattern": "^prt"
  13719. },
  13720. "sessionID": {
  13721. "type": "string",
  13722. "pattern": "^ses"
  13723. },
  13724. "messageID": {
  13725. "type": "string",
  13726. "pattern": "^msg"
  13727. },
  13728. "type": {
  13729. "type": "string",
  13730. "enum": ["tool"]
  13731. },
  13732. "callID": {
  13733. "type": "string"
  13734. },
  13735. "tool": {
  13736. "type": "string"
  13737. },
  13738. "state": {
  13739. "$ref": "#/components/schemas/ToolState"
  13740. },
  13741. "metadata": {
  13742. "type": "object"
  13743. }
  13744. },
  13745. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13746. "additionalProperties": false
  13747. },
  13748. "StepStartPart": {
  13749. "type": "object",
  13750. "properties": {
  13751. "id": {
  13752. "type": "string",
  13753. "pattern": "^prt"
  13754. },
  13755. "sessionID": {
  13756. "type": "string",
  13757. "pattern": "^ses"
  13758. },
  13759. "messageID": {
  13760. "type": "string",
  13761. "pattern": "^msg"
  13762. },
  13763. "type": {
  13764. "type": "string",
  13765. "enum": ["step-start"]
  13766. },
  13767. "snapshot": {
  13768. "type": "string"
  13769. }
  13770. },
  13771. "required": ["id", "sessionID", "messageID", "type"],
  13772. "additionalProperties": false
  13773. },
  13774. "StepFinishPart": {
  13775. "type": "object",
  13776. "properties": {
  13777. "id": {
  13778. "type": "string",
  13779. "pattern": "^prt"
  13780. },
  13781. "sessionID": {
  13782. "type": "string",
  13783. "pattern": "^ses"
  13784. },
  13785. "messageID": {
  13786. "type": "string",
  13787. "pattern": "^msg"
  13788. },
  13789. "type": {
  13790. "type": "string",
  13791. "enum": ["step-finish"]
  13792. },
  13793. "reason": {
  13794. "type": "string"
  13795. },
  13796. "snapshot": {
  13797. "type": "string"
  13798. },
  13799. "cost": {
  13800. "type": "number"
  13801. },
  13802. "tokens": {
  13803. "type": "object",
  13804. "properties": {
  13805. "total": {
  13806. "type": "number"
  13807. },
  13808. "input": {
  13809. "type": "number"
  13810. },
  13811. "output": {
  13812. "type": "number"
  13813. },
  13814. "reasoning": {
  13815. "type": "number"
  13816. },
  13817. "cache": {
  13818. "type": "object",
  13819. "properties": {
  13820. "read": {
  13821. "type": "number"
  13822. },
  13823. "write": {
  13824. "type": "number"
  13825. }
  13826. },
  13827. "required": ["read", "write"],
  13828. "additionalProperties": false
  13829. }
  13830. },
  13831. "required": ["input", "output", "reasoning", "cache"],
  13832. "additionalProperties": false
  13833. }
  13834. },
  13835. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13836. "additionalProperties": false
  13837. },
  13838. "SnapshotPart": {
  13839. "type": "object",
  13840. "properties": {
  13841. "id": {
  13842. "type": "string",
  13843. "pattern": "^prt"
  13844. },
  13845. "sessionID": {
  13846. "type": "string",
  13847. "pattern": "^ses"
  13848. },
  13849. "messageID": {
  13850. "type": "string",
  13851. "pattern": "^msg"
  13852. },
  13853. "type": {
  13854. "type": "string",
  13855. "enum": ["snapshot"]
  13856. },
  13857. "snapshot": {
  13858. "type": "string"
  13859. }
  13860. },
  13861. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13862. "additionalProperties": false
  13863. },
  13864. "PatchPart": {
  13865. "type": "object",
  13866. "properties": {
  13867. "id": {
  13868. "type": "string",
  13869. "pattern": "^prt"
  13870. },
  13871. "sessionID": {
  13872. "type": "string",
  13873. "pattern": "^ses"
  13874. },
  13875. "messageID": {
  13876. "type": "string",
  13877. "pattern": "^msg"
  13878. },
  13879. "type": {
  13880. "type": "string",
  13881. "enum": ["patch"]
  13882. },
  13883. "hash": {
  13884. "type": "string"
  13885. },
  13886. "files": {
  13887. "type": "array",
  13888. "items": {
  13889. "type": "string"
  13890. }
  13891. }
  13892. },
  13893. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13894. "additionalProperties": false
  13895. },
  13896. "AgentPart": {
  13897. "type": "object",
  13898. "properties": {
  13899. "id": {
  13900. "type": "string",
  13901. "pattern": "^prt"
  13902. },
  13903. "sessionID": {
  13904. "type": "string",
  13905. "pattern": "^ses"
  13906. },
  13907. "messageID": {
  13908. "type": "string",
  13909. "pattern": "^msg"
  13910. },
  13911. "type": {
  13912. "type": "string",
  13913. "enum": ["agent"]
  13914. },
  13915. "name": {
  13916. "type": "string"
  13917. },
  13918. "source": {
  13919. "type": "object",
  13920. "properties": {
  13921. "value": {
  13922. "type": "string"
  13923. },
  13924. "start": {
  13925. "type": "integer",
  13926. "minimum": 0
  13927. },
  13928. "end": {
  13929. "type": "integer",
  13930. "minimum": 0
  13931. }
  13932. },
  13933. "required": ["value", "start", "end"],
  13934. "additionalProperties": false
  13935. }
  13936. },
  13937. "required": ["id", "sessionID", "messageID", "type", "name"],
  13938. "additionalProperties": false
  13939. },
  13940. "RetryPart": {
  13941. "type": "object",
  13942. "properties": {
  13943. "id": {
  13944. "type": "string",
  13945. "pattern": "^prt"
  13946. },
  13947. "sessionID": {
  13948. "type": "string",
  13949. "pattern": "^ses"
  13950. },
  13951. "messageID": {
  13952. "type": "string",
  13953. "pattern": "^msg"
  13954. },
  13955. "type": {
  13956. "type": "string",
  13957. "enum": ["retry"]
  13958. },
  13959. "attempt": {
  13960. "type": "integer",
  13961. "minimum": 0
  13962. },
  13963. "error": {
  13964. "$ref": "#/components/schemas/APIError"
  13965. },
  13966. "time": {
  13967. "type": "object",
  13968. "properties": {
  13969. "created": {
  13970. "type": "integer",
  13971. "minimum": 0
  13972. }
  13973. },
  13974. "required": ["created"],
  13975. "additionalProperties": false
  13976. }
  13977. },
  13978. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13979. "additionalProperties": false
  13980. },
  13981. "CompactionPart": {
  13982. "type": "object",
  13983. "properties": {
  13984. "id": {
  13985. "type": "string",
  13986. "pattern": "^prt"
  13987. },
  13988. "sessionID": {
  13989. "type": "string",
  13990. "pattern": "^ses"
  13991. },
  13992. "messageID": {
  13993. "type": "string",
  13994. "pattern": "^msg"
  13995. },
  13996. "type": {
  13997. "type": "string",
  13998. "enum": ["compaction"]
  13999. },
  14000. "auto": {
  14001. "type": "boolean"
  14002. },
  14003. "overflow": {
  14004. "type": "boolean"
  14005. },
  14006. "tail_start_id": {
  14007. "type": "string",
  14008. "pattern": "^msg"
  14009. }
  14010. },
  14011. "required": ["id", "sessionID", "messageID", "type", "auto"],
  14012. "additionalProperties": false
  14013. },
  14014. "Part": {
  14015. "anyOf": [
  14016. {
  14017. "$ref": "#/components/schemas/TextPart"
  14018. },
  14019. {
  14020. "$ref": "#/components/schemas/SubtaskPart"
  14021. },
  14022. {
  14023. "$ref": "#/components/schemas/ReasoningPart"
  14024. },
  14025. {
  14026. "$ref": "#/components/schemas/FilePart"
  14027. },
  14028. {
  14029. "$ref": "#/components/schemas/ToolPart"
  14030. },
  14031. {
  14032. "$ref": "#/components/schemas/StepStartPart"
  14033. },
  14034. {
  14035. "$ref": "#/components/schemas/StepFinishPart"
  14036. },
  14037. {
  14038. "$ref": "#/components/schemas/SnapshotPart"
  14039. },
  14040. {
  14041. "$ref": "#/components/schemas/PatchPart"
  14042. },
  14043. {
  14044. "$ref": "#/components/schemas/AgentPart"
  14045. },
  14046. {
  14047. "$ref": "#/components/schemas/RetryPart"
  14048. },
  14049. {
  14050. "$ref": "#/components/schemas/CompactionPart"
  14051. }
  14052. ]
  14053. },
  14054. "Prompt": {
  14055. "type": "object",
  14056. "properties": {
  14057. "text": {
  14058. "type": "string"
  14059. },
  14060. "files": {
  14061. "type": "array",
  14062. "items": {
  14063. "$ref": "#/components/schemas/PromptFileAttachment"
  14064. }
  14065. },
  14066. "agents": {
  14067. "type": "array",
  14068. "items": {
  14069. "$ref": "#/components/schemas/PromptAgentAttachment"
  14070. }
  14071. },
  14072. "references": {
  14073. "type": "array",
  14074. "items": {
  14075. "$ref": "#/components/schemas/PromptReferenceAttachment"
  14076. }
  14077. }
  14078. },
  14079. "required": ["text"],
  14080. "additionalProperties": false
  14081. },
  14082. "Pty": {
  14083. "type": "object",
  14084. "properties": {
  14085. "id": {
  14086. "type": "string",
  14087. "pattern": "^pty"
  14088. },
  14089. "title": {
  14090. "type": "string"
  14091. },
  14092. "command": {
  14093. "type": "string"
  14094. },
  14095. "args": {
  14096. "type": "array",
  14097. "items": {
  14098. "type": "string"
  14099. }
  14100. },
  14101. "cwd": {
  14102. "type": "string"
  14103. },
  14104. "status": {
  14105. "type": "string",
  14106. "enum": ["running", "exited"]
  14107. },
  14108. "pid": {
  14109. "type": "integer",
  14110. "minimum": 0
  14111. }
  14112. },
  14113. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  14114. "additionalProperties": false
  14115. },
  14116. "Todo": {
  14117. "type": "object",
  14118. "properties": {
  14119. "content": {
  14120. "type": "string",
  14121. "description": "Brief description of the task"
  14122. },
  14123. "status": {
  14124. "type": "string",
  14125. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  14126. },
  14127. "priority": {
  14128. "type": "string",
  14129. "description": "Priority level of the task: high, medium, low"
  14130. }
  14131. },
  14132. "required": ["content", "status", "priority"],
  14133. "additionalProperties": false
  14134. },
  14135. "QuestionOption": {
  14136. "type": "object",
  14137. "properties": {
  14138. "label": {
  14139. "type": "string",
  14140. "description": "Display text (1-5 words, concise)"
  14141. },
  14142. "description": {
  14143. "type": "string",
  14144. "description": "Explanation of choice"
  14145. }
  14146. },
  14147. "required": ["label", "description"],
  14148. "additionalProperties": false
  14149. },
  14150. "QuestionInfo": {
  14151. "type": "object",
  14152. "properties": {
  14153. "question": {
  14154. "type": "string",
  14155. "description": "Complete question"
  14156. },
  14157. "header": {
  14158. "type": "string",
  14159. "description": "Very short label (max 30 chars)"
  14160. },
  14161. "options": {
  14162. "type": "array",
  14163. "items": {
  14164. "$ref": "#/components/schemas/QuestionOption"
  14165. },
  14166. "description": "Available choices"
  14167. },
  14168. "multiple": {
  14169. "type": "boolean"
  14170. },
  14171. "custom": {
  14172. "type": "boolean"
  14173. }
  14174. },
  14175. "required": ["question", "header", "options"],
  14176. "additionalProperties": false
  14177. },
  14178. "QuestionTool": {
  14179. "type": "object",
  14180. "properties": {
  14181. "messageID": {
  14182. "type": "string",
  14183. "pattern": "^msg"
  14184. },
  14185. "callID": {
  14186. "type": "string"
  14187. }
  14188. },
  14189. "required": ["messageID", "callID"],
  14190. "additionalProperties": false
  14191. },
  14192. "QuestionAnswer": {
  14193. "type": "array",
  14194. "items": {
  14195. "type": "string"
  14196. }
  14197. },
  14198. "SessionStatus": {
  14199. "anyOf": [
  14200. {
  14201. "type": "object",
  14202. "properties": {
  14203. "type": {
  14204. "type": "string",
  14205. "enum": ["idle"]
  14206. }
  14207. },
  14208. "required": ["type"],
  14209. "additionalProperties": false
  14210. },
  14211. {
  14212. "type": "object",
  14213. "properties": {
  14214. "type": {
  14215. "type": "string",
  14216. "enum": ["retry"]
  14217. },
  14218. "attempt": {
  14219. "type": "integer",
  14220. "minimum": 0
  14221. },
  14222. "message": {
  14223. "type": "string"
  14224. },
  14225. "action": {
  14226. "type": "object",
  14227. "properties": {
  14228. "reason": {
  14229. "type": "string"
  14230. },
  14231. "provider": {
  14232. "type": "string"
  14233. },
  14234. "title": {
  14235. "type": "string"
  14236. },
  14237. "message": {
  14238. "type": "string"
  14239. },
  14240. "label": {
  14241. "type": "string"
  14242. },
  14243. "link": {
  14244. "type": "string"
  14245. }
  14246. },
  14247. "required": ["reason", "provider", "title", "message", "label"],
  14248. "additionalProperties": false
  14249. },
  14250. "next": {
  14251. "type": "integer",
  14252. "minimum": 0
  14253. }
  14254. },
  14255. "required": ["type", "attempt", "message", "next"],
  14256. "additionalProperties": false
  14257. },
  14258. {
  14259. "type": "object",
  14260. "properties": {
  14261. "type": {
  14262. "type": "string",
  14263. "enum": ["busy"]
  14264. }
  14265. },
  14266. "required": ["type"],
  14267. "additionalProperties": false
  14268. }
  14269. ]
  14270. },
  14271. "GlobalEvent": {
  14272. "type": "object",
  14273. "properties": {
  14274. "directory": {
  14275. "type": "string"
  14276. },
  14277. "project": {
  14278. "type": "string"
  14279. },
  14280. "workspace": {
  14281. "type": "string"
  14282. },
  14283. "payload": {
  14284. "anyOf": [
  14285. {
  14286. "type": "object",
  14287. "properties": {
  14288. "id": {
  14289. "type": "string",
  14290. "pattern": "^evt_"
  14291. },
  14292. "type": {
  14293. "type": "string",
  14294. "enum": ["models-dev.refreshed"]
  14295. },
  14296. "properties": {
  14297. "type": "object",
  14298. "properties": {}
  14299. }
  14300. },
  14301. "required": ["id", "type", "properties"],
  14302. "additionalProperties": false
  14303. },
  14304. {
  14305. "type": "object",
  14306. "properties": {
  14307. "id": {
  14308. "type": "string",
  14309. "pattern": "^evt_"
  14310. },
  14311. "type": {
  14312. "type": "string",
  14313. "enum": ["plugin.added"]
  14314. },
  14315. "properties": {
  14316. "type": "object",
  14317. "properties": {
  14318. "id": {
  14319. "type": "string"
  14320. }
  14321. },
  14322. "required": ["id"],
  14323. "additionalProperties": false
  14324. }
  14325. },
  14326. "required": ["id", "type", "properties"],
  14327. "additionalProperties": false
  14328. },
  14329. {
  14330. "type": "object",
  14331. "properties": {
  14332. "id": {
  14333. "type": "string",
  14334. "pattern": "^evt_"
  14335. },
  14336. "type": {
  14337. "type": "string",
  14338. "enum": ["catalog.model.updated"]
  14339. },
  14340. "properties": {
  14341. "type": "object",
  14342. "properties": {
  14343. "model": {
  14344. "$ref": "#/components/schemas/ModelV2Info"
  14345. }
  14346. },
  14347. "required": ["model"],
  14348. "additionalProperties": false
  14349. }
  14350. },
  14351. "required": ["id", "type", "properties"],
  14352. "additionalProperties": false
  14353. },
  14354. {
  14355. "type": "object",
  14356. "properties": {
  14357. "id": {
  14358. "type": "string",
  14359. "pattern": "^evt_"
  14360. },
  14361. "type": {
  14362. "type": "string",
  14363. "enum": ["session.created"]
  14364. },
  14365. "properties": {
  14366. "type": "object",
  14367. "properties": {
  14368. "sessionID": {
  14369. "type": "string",
  14370. "pattern": "^ses"
  14371. },
  14372. "info": {
  14373. "$ref": "#/components/schemas/Session"
  14374. }
  14375. },
  14376. "required": ["sessionID", "info"],
  14377. "additionalProperties": false
  14378. }
  14379. },
  14380. "required": ["id", "type", "properties"],
  14381. "additionalProperties": false
  14382. },
  14383. {
  14384. "type": "object",
  14385. "properties": {
  14386. "id": {
  14387. "type": "string",
  14388. "pattern": "^evt_"
  14389. },
  14390. "type": {
  14391. "type": "string",
  14392. "enum": ["session.updated"]
  14393. },
  14394. "properties": {
  14395. "type": "object",
  14396. "properties": {
  14397. "sessionID": {
  14398. "type": "string",
  14399. "pattern": "^ses"
  14400. },
  14401. "info": {
  14402. "$ref": "#/components/schemas/Session"
  14403. }
  14404. },
  14405. "required": ["sessionID", "info"],
  14406. "additionalProperties": false
  14407. }
  14408. },
  14409. "required": ["id", "type", "properties"],
  14410. "additionalProperties": false
  14411. },
  14412. {
  14413. "type": "object",
  14414. "properties": {
  14415. "id": {
  14416. "type": "string",
  14417. "pattern": "^evt_"
  14418. },
  14419. "type": {
  14420. "type": "string",
  14421. "enum": ["session.deleted"]
  14422. },
  14423. "properties": {
  14424. "type": "object",
  14425. "properties": {
  14426. "sessionID": {
  14427. "type": "string",
  14428. "pattern": "^ses"
  14429. },
  14430. "info": {
  14431. "$ref": "#/components/schemas/Session"
  14432. }
  14433. },
  14434. "required": ["sessionID", "info"],
  14435. "additionalProperties": false
  14436. }
  14437. },
  14438. "required": ["id", "type", "properties"],
  14439. "additionalProperties": false
  14440. },
  14441. {
  14442. "type": "object",
  14443. "properties": {
  14444. "id": {
  14445. "type": "string",
  14446. "pattern": "^evt_"
  14447. },
  14448. "type": {
  14449. "type": "string",
  14450. "enum": ["message.updated"]
  14451. },
  14452. "properties": {
  14453. "type": "object",
  14454. "properties": {
  14455. "sessionID": {
  14456. "type": "string",
  14457. "pattern": "^ses"
  14458. },
  14459. "info": {
  14460. "$ref": "#/components/schemas/Message"
  14461. }
  14462. },
  14463. "required": ["sessionID", "info"],
  14464. "additionalProperties": false
  14465. }
  14466. },
  14467. "required": ["id", "type", "properties"],
  14468. "additionalProperties": false
  14469. },
  14470. {
  14471. "type": "object",
  14472. "properties": {
  14473. "id": {
  14474. "type": "string",
  14475. "pattern": "^evt_"
  14476. },
  14477. "type": {
  14478. "type": "string",
  14479. "enum": ["message.removed"]
  14480. },
  14481. "properties": {
  14482. "type": "object",
  14483. "properties": {
  14484. "sessionID": {
  14485. "type": "string",
  14486. "pattern": "^ses"
  14487. },
  14488. "messageID": {
  14489. "type": "string",
  14490. "pattern": "^msg"
  14491. }
  14492. },
  14493. "required": ["sessionID", "messageID"],
  14494. "additionalProperties": false
  14495. }
  14496. },
  14497. "required": ["id", "type", "properties"],
  14498. "additionalProperties": false
  14499. },
  14500. {
  14501. "type": "object",
  14502. "properties": {
  14503. "id": {
  14504. "type": "string",
  14505. "pattern": "^evt_"
  14506. },
  14507. "type": {
  14508. "type": "string",
  14509. "enum": ["message.part.updated"]
  14510. },
  14511. "properties": {
  14512. "type": "object",
  14513. "properties": {
  14514. "sessionID": {
  14515. "type": "string",
  14516. "pattern": "^ses"
  14517. },
  14518. "part": {
  14519. "$ref": "#/components/schemas/Part"
  14520. },
  14521. "time": {
  14522. "type": "number"
  14523. }
  14524. },
  14525. "required": ["sessionID", "part", "time"],
  14526. "additionalProperties": false
  14527. }
  14528. },
  14529. "required": ["id", "type", "properties"],
  14530. "additionalProperties": false
  14531. },
  14532. {
  14533. "type": "object",
  14534. "properties": {
  14535. "id": {
  14536. "type": "string",
  14537. "pattern": "^evt_"
  14538. },
  14539. "type": {
  14540. "type": "string",
  14541. "enum": ["message.part.removed"]
  14542. },
  14543. "properties": {
  14544. "type": "object",
  14545. "properties": {
  14546. "sessionID": {
  14547. "type": "string",
  14548. "pattern": "^ses"
  14549. },
  14550. "messageID": {
  14551. "type": "string",
  14552. "pattern": "^msg"
  14553. },
  14554. "partID": {
  14555. "type": "string",
  14556. "pattern": "^prt"
  14557. }
  14558. },
  14559. "required": ["sessionID", "messageID", "partID"],
  14560. "additionalProperties": false
  14561. }
  14562. },
  14563. "required": ["id", "type", "properties"],
  14564. "additionalProperties": false
  14565. },
  14566. {
  14567. "type": "object",
  14568. "properties": {
  14569. "id": {
  14570. "type": "string",
  14571. "pattern": "^evt_"
  14572. },
  14573. "type": {
  14574. "type": "string",
  14575. "enum": ["session.next.agent.switched"]
  14576. },
  14577. "properties": {
  14578. "type": "object",
  14579. "properties": {
  14580. "timestamp": {
  14581. "type": "number"
  14582. },
  14583. "sessionID": {
  14584. "type": "string",
  14585. "pattern": "^ses"
  14586. },
  14587. "messageID": {
  14588. "type": "string",
  14589. "pattern": "^msg_"
  14590. },
  14591. "agent": {
  14592. "type": "string"
  14593. }
  14594. },
  14595. "required": ["timestamp", "sessionID", "messageID", "agent"],
  14596. "additionalProperties": false
  14597. }
  14598. },
  14599. "required": ["id", "type", "properties"],
  14600. "additionalProperties": false
  14601. },
  14602. {
  14603. "type": "object",
  14604. "properties": {
  14605. "id": {
  14606. "type": "string",
  14607. "pattern": "^evt_"
  14608. },
  14609. "type": {
  14610. "type": "string",
  14611. "enum": ["session.next.model.switched"]
  14612. },
  14613. "properties": {
  14614. "type": "object",
  14615. "properties": {
  14616. "timestamp": {
  14617. "type": "number"
  14618. },
  14619. "sessionID": {
  14620. "type": "string",
  14621. "pattern": "^ses"
  14622. },
  14623. "messageID": {
  14624. "type": "string",
  14625. "pattern": "^msg_"
  14626. },
  14627. "model": {
  14628. "type": "object",
  14629. "properties": {
  14630. "id": {
  14631. "type": "string"
  14632. },
  14633. "providerID": {
  14634. "type": "string"
  14635. },
  14636. "variant": {
  14637. "type": "string"
  14638. }
  14639. },
  14640. "required": ["id", "providerID"],
  14641. "additionalProperties": false
  14642. }
  14643. },
  14644. "required": ["timestamp", "sessionID", "messageID", "model"],
  14645. "additionalProperties": false
  14646. }
  14647. },
  14648. "required": ["id", "type", "properties"],
  14649. "additionalProperties": false
  14650. },
  14651. {
  14652. "type": "object",
  14653. "properties": {
  14654. "id": {
  14655. "type": "string",
  14656. "pattern": "^evt_"
  14657. },
  14658. "type": {
  14659. "type": "string",
  14660. "enum": ["session.next.moved"]
  14661. },
  14662. "properties": {
  14663. "type": "object",
  14664. "properties": {
  14665. "timestamp": {
  14666. "type": "number"
  14667. },
  14668. "sessionID": {
  14669. "type": "string",
  14670. "pattern": "^ses"
  14671. },
  14672. "location": {
  14673. "$ref": "#/components/schemas/LocationRef"
  14674. },
  14675. "subdirectory": {
  14676. "type": "string"
  14677. }
  14678. },
  14679. "required": ["timestamp", "sessionID", "location"],
  14680. "additionalProperties": false
  14681. }
  14682. },
  14683. "required": ["id", "type", "properties"],
  14684. "additionalProperties": false
  14685. },
  14686. {
  14687. "type": "object",
  14688. "properties": {
  14689. "id": {
  14690. "type": "string",
  14691. "pattern": "^evt_"
  14692. },
  14693. "type": {
  14694. "type": "string",
  14695. "enum": ["session.next.prompted"]
  14696. },
  14697. "properties": {
  14698. "type": "object",
  14699. "properties": {
  14700. "timestamp": {
  14701. "type": "number"
  14702. },
  14703. "sessionID": {
  14704. "type": "string",
  14705. "pattern": "^ses"
  14706. },
  14707. "messageID": {
  14708. "type": "string",
  14709. "pattern": "^msg_"
  14710. },
  14711. "prompt": {
  14712. "$ref": "#/components/schemas/Prompt"
  14713. },
  14714. "delivery": {
  14715. "type": "string",
  14716. "enum": ["steer", "queue"]
  14717. }
  14718. },
  14719. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14720. "additionalProperties": false
  14721. }
  14722. },
  14723. "required": ["id", "type", "properties"],
  14724. "additionalProperties": false
  14725. },
  14726. {
  14727. "type": "object",
  14728. "properties": {
  14729. "id": {
  14730. "type": "string",
  14731. "pattern": "^evt_"
  14732. },
  14733. "type": {
  14734. "type": "string",
  14735. "enum": ["session.next.prompt.admitted"]
  14736. },
  14737. "properties": {
  14738. "type": "object",
  14739. "properties": {
  14740. "timestamp": {
  14741. "type": "number"
  14742. },
  14743. "sessionID": {
  14744. "type": "string",
  14745. "pattern": "^ses"
  14746. },
  14747. "messageID": {
  14748. "type": "string",
  14749. "pattern": "^msg_"
  14750. },
  14751. "prompt": {
  14752. "$ref": "#/components/schemas/Prompt"
  14753. },
  14754. "delivery": {
  14755. "type": "string",
  14756. "enum": ["steer", "queue"]
  14757. }
  14758. },
  14759. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14760. "additionalProperties": false
  14761. }
  14762. },
  14763. "required": ["id", "type", "properties"],
  14764. "additionalProperties": false
  14765. },
  14766. {
  14767. "type": "object",
  14768. "properties": {
  14769. "id": {
  14770. "type": "string",
  14771. "pattern": "^evt_"
  14772. },
  14773. "type": {
  14774. "type": "string",
  14775. "enum": ["session.next.prompt.promoted"]
  14776. },
  14777. "properties": {
  14778. "type": "object",
  14779. "properties": {
  14780. "timestamp": {
  14781. "type": "number"
  14782. },
  14783. "sessionID": {
  14784. "type": "string",
  14785. "pattern": "^ses"
  14786. },
  14787. "messageID": {
  14788. "type": "string",
  14789. "pattern": "^msg_"
  14790. },
  14791. "prompt": {
  14792. "$ref": "#/components/schemas/Prompt"
  14793. },
  14794. "timeCreated": {
  14795. "type": "number"
  14796. }
  14797. },
  14798. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  14799. "additionalProperties": false
  14800. }
  14801. },
  14802. "required": ["id", "type", "properties"],
  14803. "additionalProperties": false
  14804. },
  14805. {
  14806. "type": "object",
  14807. "properties": {
  14808. "id": {
  14809. "type": "string",
  14810. "pattern": "^evt_"
  14811. },
  14812. "type": {
  14813. "type": "string",
  14814. "enum": ["session.next.interrupt.requested"]
  14815. },
  14816. "properties": {
  14817. "type": "object",
  14818. "properties": {
  14819. "timestamp": {
  14820. "type": "number"
  14821. },
  14822. "sessionID": {
  14823. "type": "string",
  14824. "pattern": "^ses"
  14825. }
  14826. },
  14827. "required": ["timestamp", "sessionID"],
  14828. "additionalProperties": false
  14829. }
  14830. },
  14831. "required": ["id", "type", "properties"],
  14832. "additionalProperties": false
  14833. },
  14834. {
  14835. "type": "object",
  14836. "properties": {
  14837. "id": {
  14838. "type": "string",
  14839. "pattern": "^evt_"
  14840. },
  14841. "type": {
  14842. "type": "string",
  14843. "enum": ["session.next.context.updated"]
  14844. },
  14845. "properties": {
  14846. "type": "object",
  14847. "properties": {
  14848. "timestamp": {
  14849. "type": "number"
  14850. },
  14851. "sessionID": {
  14852. "type": "string",
  14853. "pattern": "^ses"
  14854. },
  14855. "messageID": {
  14856. "type": "string",
  14857. "pattern": "^msg_"
  14858. },
  14859. "text": {
  14860. "type": "string"
  14861. }
  14862. },
  14863. "required": ["timestamp", "sessionID", "messageID", "text"],
  14864. "additionalProperties": false
  14865. }
  14866. },
  14867. "required": ["id", "type", "properties"],
  14868. "additionalProperties": false
  14869. },
  14870. {
  14871. "type": "object",
  14872. "properties": {
  14873. "id": {
  14874. "type": "string",
  14875. "pattern": "^evt_"
  14876. },
  14877. "type": {
  14878. "type": "string",
  14879. "enum": ["session.next.synthetic"]
  14880. },
  14881. "properties": {
  14882. "type": "object",
  14883. "properties": {
  14884. "timestamp": {
  14885. "type": "number"
  14886. },
  14887. "sessionID": {
  14888. "type": "string",
  14889. "pattern": "^ses"
  14890. },
  14891. "messageID": {
  14892. "type": "string",
  14893. "pattern": "^msg_"
  14894. },
  14895. "text": {
  14896. "type": "string"
  14897. }
  14898. },
  14899. "required": ["timestamp", "sessionID", "messageID", "text"],
  14900. "additionalProperties": false
  14901. }
  14902. },
  14903. "required": ["id", "type", "properties"],
  14904. "additionalProperties": false
  14905. },
  14906. {
  14907. "type": "object",
  14908. "properties": {
  14909. "id": {
  14910. "type": "string",
  14911. "pattern": "^evt_"
  14912. },
  14913. "type": {
  14914. "type": "string",
  14915. "enum": ["session.next.shell.started"]
  14916. },
  14917. "properties": {
  14918. "type": "object",
  14919. "properties": {
  14920. "timestamp": {
  14921. "type": "number"
  14922. },
  14923. "sessionID": {
  14924. "type": "string",
  14925. "pattern": "^ses"
  14926. },
  14927. "messageID": {
  14928. "type": "string",
  14929. "pattern": "^msg_"
  14930. },
  14931. "callID": {
  14932. "type": "string"
  14933. },
  14934. "command": {
  14935. "type": "string"
  14936. }
  14937. },
  14938. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  14939. "additionalProperties": false
  14940. }
  14941. },
  14942. "required": ["id", "type", "properties"],
  14943. "additionalProperties": false
  14944. },
  14945. {
  14946. "type": "object",
  14947. "properties": {
  14948. "id": {
  14949. "type": "string",
  14950. "pattern": "^evt_"
  14951. },
  14952. "type": {
  14953. "type": "string",
  14954. "enum": ["session.next.shell.ended"]
  14955. },
  14956. "properties": {
  14957. "type": "object",
  14958. "properties": {
  14959. "timestamp": {
  14960. "type": "number"
  14961. },
  14962. "sessionID": {
  14963. "type": "string",
  14964. "pattern": "^ses"
  14965. },
  14966. "callID": {
  14967. "type": "string"
  14968. },
  14969. "output": {
  14970. "type": "string"
  14971. }
  14972. },
  14973. "required": ["timestamp", "sessionID", "callID", "output"],
  14974. "additionalProperties": false
  14975. }
  14976. },
  14977. "required": ["id", "type", "properties"],
  14978. "additionalProperties": false
  14979. },
  14980. {
  14981. "type": "object",
  14982. "properties": {
  14983. "id": {
  14984. "type": "string",
  14985. "pattern": "^evt_"
  14986. },
  14987. "type": {
  14988. "type": "string",
  14989. "enum": ["session.next.step.started"]
  14990. },
  14991. "properties": {
  14992. "type": "object",
  14993. "properties": {
  14994. "timestamp": {
  14995. "type": "number"
  14996. },
  14997. "sessionID": {
  14998. "type": "string",
  14999. "pattern": "^ses"
  15000. },
  15001. "assistantMessageID": {
  15002. "type": "string",
  15003. "pattern": "^msg_"
  15004. },
  15005. "agent": {
  15006. "type": "string"
  15007. },
  15008. "model": {
  15009. "type": "object",
  15010. "properties": {
  15011. "id": {
  15012. "type": "string"
  15013. },
  15014. "providerID": {
  15015. "type": "string"
  15016. },
  15017. "variant": {
  15018. "type": "string"
  15019. }
  15020. },
  15021. "required": ["id", "providerID"],
  15022. "additionalProperties": false
  15023. },
  15024. "snapshot": {
  15025. "type": "string"
  15026. }
  15027. },
  15028. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  15029. "additionalProperties": false
  15030. }
  15031. },
  15032. "required": ["id", "type", "properties"],
  15033. "additionalProperties": false
  15034. },
  15035. {
  15036. "type": "object",
  15037. "properties": {
  15038. "id": {
  15039. "type": "string",
  15040. "pattern": "^evt_"
  15041. },
  15042. "type": {
  15043. "type": "string",
  15044. "enum": ["session.next.step.ended"]
  15045. },
  15046. "properties": {
  15047. "type": "object",
  15048. "properties": {
  15049. "timestamp": {
  15050. "type": "number"
  15051. },
  15052. "sessionID": {
  15053. "type": "string",
  15054. "pattern": "^ses"
  15055. },
  15056. "assistantMessageID": {
  15057. "type": "string",
  15058. "pattern": "^msg_"
  15059. },
  15060. "finish": {
  15061. "type": "string"
  15062. },
  15063. "cost": {
  15064. "type": "number"
  15065. },
  15066. "tokens": {
  15067. "type": "object",
  15068. "properties": {
  15069. "input": {
  15070. "type": "number"
  15071. },
  15072. "output": {
  15073. "type": "number"
  15074. },
  15075. "reasoning": {
  15076. "type": "number"
  15077. },
  15078. "cache": {
  15079. "type": "object",
  15080. "properties": {
  15081. "read": {
  15082. "type": "number"
  15083. },
  15084. "write": {
  15085. "type": "number"
  15086. }
  15087. },
  15088. "required": ["read", "write"],
  15089. "additionalProperties": false
  15090. }
  15091. },
  15092. "required": ["input", "output", "reasoning", "cache"],
  15093. "additionalProperties": false
  15094. },
  15095. "snapshot": {
  15096. "type": "string"
  15097. }
  15098. },
  15099. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  15100. "additionalProperties": false
  15101. }
  15102. },
  15103. "required": ["id", "type", "properties"],
  15104. "additionalProperties": false
  15105. },
  15106. {
  15107. "type": "object",
  15108. "properties": {
  15109. "id": {
  15110. "type": "string",
  15111. "pattern": "^evt_"
  15112. },
  15113. "type": {
  15114. "type": "string",
  15115. "enum": ["session.next.step.failed"]
  15116. },
  15117. "properties": {
  15118. "type": "object",
  15119. "properties": {
  15120. "timestamp": {
  15121. "type": "number"
  15122. },
  15123. "sessionID": {
  15124. "type": "string",
  15125. "pattern": "^ses"
  15126. },
  15127. "assistantMessageID": {
  15128. "type": "string",
  15129. "pattern": "^msg_"
  15130. },
  15131. "error": {
  15132. "$ref": "#/components/schemas/SessionErrorUnknown"
  15133. }
  15134. },
  15135. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  15136. "additionalProperties": false
  15137. }
  15138. },
  15139. "required": ["id", "type", "properties"],
  15140. "additionalProperties": false
  15141. },
  15142. {
  15143. "type": "object",
  15144. "properties": {
  15145. "id": {
  15146. "type": "string",
  15147. "pattern": "^evt_"
  15148. },
  15149. "type": {
  15150. "type": "string",
  15151. "enum": ["session.next.text.started"]
  15152. },
  15153. "properties": {
  15154. "type": "object",
  15155. "properties": {
  15156. "timestamp": {
  15157. "type": "number"
  15158. },
  15159. "sessionID": {
  15160. "type": "string",
  15161. "pattern": "^ses"
  15162. },
  15163. "assistantMessageID": {
  15164. "type": "string",
  15165. "pattern": "^msg_"
  15166. },
  15167. "textID": {
  15168. "type": "string"
  15169. }
  15170. },
  15171. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  15172. "additionalProperties": false
  15173. }
  15174. },
  15175. "required": ["id", "type", "properties"],
  15176. "additionalProperties": false
  15177. },
  15178. {
  15179. "type": "object",
  15180. "properties": {
  15181. "id": {
  15182. "type": "string",
  15183. "pattern": "^evt_"
  15184. },
  15185. "type": {
  15186. "type": "string",
  15187. "enum": ["session.next.text.delta"]
  15188. },
  15189. "properties": {
  15190. "type": "object",
  15191. "properties": {
  15192. "timestamp": {
  15193. "type": "number"
  15194. },
  15195. "sessionID": {
  15196. "type": "string",
  15197. "pattern": "^ses"
  15198. },
  15199. "assistantMessageID": {
  15200. "type": "string",
  15201. "pattern": "^msg_"
  15202. },
  15203. "textID": {
  15204. "type": "string"
  15205. },
  15206. "delta": {
  15207. "type": "string"
  15208. }
  15209. },
  15210. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  15211. "additionalProperties": false
  15212. }
  15213. },
  15214. "required": ["id", "type", "properties"],
  15215. "additionalProperties": false
  15216. },
  15217. {
  15218. "type": "object",
  15219. "properties": {
  15220. "id": {
  15221. "type": "string",
  15222. "pattern": "^evt_"
  15223. },
  15224. "type": {
  15225. "type": "string",
  15226. "enum": ["session.next.text.ended"]
  15227. },
  15228. "properties": {
  15229. "type": "object",
  15230. "properties": {
  15231. "timestamp": {
  15232. "type": "number"
  15233. },
  15234. "sessionID": {
  15235. "type": "string",
  15236. "pattern": "^ses"
  15237. },
  15238. "assistantMessageID": {
  15239. "type": "string",
  15240. "pattern": "^msg_"
  15241. },
  15242. "textID": {
  15243. "type": "string"
  15244. },
  15245. "text": {
  15246. "type": "string"
  15247. }
  15248. },
  15249. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  15250. "additionalProperties": false
  15251. }
  15252. },
  15253. "required": ["id", "type", "properties"],
  15254. "additionalProperties": false
  15255. },
  15256. {
  15257. "type": "object",
  15258. "properties": {
  15259. "id": {
  15260. "type": "string",
  15261. "pattern": "^evt_"
  15262. },
  15263. "type": {
  15264. "type": "string",
  15265. "enum": ["session.next.reasoning.started"]
  15266. },
  15267. "properties": {
  15268. "type": "object",
  15269. "properties": {
  15270. "timestamp": {
  15271. "type": "number"
  15272. },
  15273. "sessionID": {
  15274. "type": "string",
  15275. "pattern": "^ses"
  15276. },
  15277. "assistantMessageID": {
  15278. "type": "string",
  15279. "pattern": "^msg_"
  15280. },
  15281. "reasoningID": {
  15282. "type": "string"
  15283. },
  15284. "providerMetadata": {
  15285. "type": "object",
  15286. "additionalProperties": {
  15287. "type": "object"
  15288. }
  15289. }
  15290. },
  15291. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15292. "additionalProperties": false
  15293. }
  15294. },
  15295. "required": ["id", "type", "properties"],
  15296. "additionalProperties": false
  15297. },
  15298. {
  15299. "type": "object",
  15300. "properties": {
  15301. "id": {
  15302. "type": "string",
  15303. "pattern": "^evt_"
  15304. },
  15305. "type": {
  15306. "type": "string",
  15307. "enum": ["session.next.reasoning.delta"]
  15308. },
  15309. "properties": {
  15310. "type": "object",
  15311. "properties": {
  15312. "timestamp": {
  15313. "type": "number"
  15314. },
  15315. "sessionID": {
  15316. "type": "string",
  15317. "pattern": "^ses"
  15318. },
  15319. "assistantMessageID": {
  15320. "type": "string",
  15321. "pattern": "^msg_"
  15322. },
  15323. "reasoningID": {
  15324. "type": "string"
  15325. },
  15326. "delta": {
  15327. "type": "string"
  15328. }
  15329. },
  15330. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  15331. "additionalProperties": false
  15332. }
  15333. },
  15334. "required": ["id", "type", "properties"],
  15335. "additionalProperties": false
  15336. },
  15337. {
  15338. "type": "object",
  15339. "properties": {
  15340. "id": {
  15341. "type": "string",
  15342. "pattern": "^evt_"
  15343. },
  15344. "type": {
  15345. "type": "string",
  15346. "enum": ["session.next.reasoning.ended"]
  15347. },
  15348. "properties": {
  15349. "type": "object",
  15350. "properties": {
  15351. "timestamp": {
  15352. "type": "number"
  15353. },
  15354. "sessionID": {
  15355. "type": "string",
  15356. "pattern": "^ses"
  15357. },
  15358. "assistantMessageID": {
  15359. "type": "string",
  15360. "pattern": "^msg_"
  15361. },
  15362. "reasoningID": {
  15363. "type": "string"
  15364. },
  15365. "text": {
  15366. "type": "string"
  15367. },
  15368. "providerMetadata": {
  15369. "type": "object",
  15370. "additionalProperties": {
  15371. "type": "object"
  15372. }
  15373. }
  15374. },
  15375. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15376. "additionalProperties": false
  15377. }
  15378. },
  15379. "required": ["id", "type", "properties"],
  15380. "additionalProperties": false
  15381. },
  15382. {
  15383. "type": "object",
  15384. "properties": {
  15385. "id": {
  15386. "type": "string",
  15387. "pattern": "^evt_"
  15388. },
  15389. "type": {
  15390. "type": "string",
  15391. "enum": ["session.next.tool.input.started"]
  15392. },
  15393. "properties": {
  15394. "type": "object",
  15395. "properties": {
  15396. "timestamp": {
  15397. "type": "number"
  15398. },
  15399. "sessionID": {
  15400. "type": "string",
  15401. "pattern": "^ses"
  15402. },
  15403. "assistantMessageID": {
  15404. "type": "string",
  15405. "pattern": "^msg_"
  15406. },
  15407. "callID": {
  15408. "type": "string"
  15409. },
  15410. "name": {
  15411. "type": "string"
  15412. }
  15413. },
  15414. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15415. "additionalProperties": false
  15416. }
  15417. },
  15418. "required": ["id", "type", "properties"],
  15419. "additionalProperties": false
  15420. },
  15421. {
  15422. "type": "object",
  15423. "properties": {
  15424. "id": {
  15425. "type": "string",
  15426. "pattern": "^evt_"
  15427. },
  15428. "type": {
  15429. "type": "string",
  15430. "enum": ["session.next.tool.input.delta"]
  15431. },
  15432. "properties": {
  15433. "type": "object",
  15434. "properties": {
  15435. "timestamp": {
  15436. "type": "number"
  15437. },
  15438. "sessionID": {
  15439. "type": "string",
  15440. "pattern": "^ses"
  15441. },
  15442. "assistantMessageID": {
  15443. "type": "string",
  15444. "pattern": "^msg_"
  15445. },
  15446. "callID": {
  15447. "type": "string"
  15448. },
  15449. "delta": {
  15450. "type": "string"
  15451. }
  15452. },
  15453. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15454. "additionalProperties": false
  15455. }
  15456. },
  15457. "required": ["id", "type", "properties"],
  15458. "additionalProperties": false
  15459. },
  15460. {
  15461. "type": "object",
  15462. "properties": {
  15463. "id": {
  15464. "type": "string",
  15465. "pattern": "^evt_"
  15466. },
  15467. "type": {
  15468. "type": "string",
  15469. "enum": ["session.next.tool.input.ended"]
  15470. },
  15471. "properties": {
  15472. "type": "object",
  15473. "properties": {
  15474. "timestamp": {
  15475. "type": "number"
  15476. },
  15477. "sessionID": {
  15478. "type": "string",
  15479. "pattern": "^ses"
  15480. },
  15481. "assistantMessageID": {
  15482. "type": "string",
  15483. "pattern": "^msg_"
  15484. },
  15485. "callID": {
  15486. "type": "string"
  15487. },
  15488. "text": {
  15489. "type": "string"
  15490. }
  15491. },
  15492. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15493. "additionalProperties": false
  15494. }
  15495. },
  15496. "required": ["id", "type", "properties"],
  15497. "additionalProperties": false
  15498. },
  15499. {
  15500. "type": "object",
  15501. "properties": {
  15502. "id": {
  15503. "type": "string",
  15504. "pattern": "^evt_"
  15505. },
  15506. "type": {
  15507. "type": "string",
  15508. "enum": ["session.next.tool.called"]
  15509. },
  15510. "properties": {
  15511. "type": "object",
  15512. "properties": {
  15513. "timestamp": {
  15514. "type": "number"
  15515. },
  15516. "sessionID": {
  15517. "type": "string",
  15518. "pattern": "^ses"
  15519. },
  15520. "assistantMessageID": {
  15521. "type": "string",
  15522. "pattern": "^msg_"
  15523. },
  15524. "callID": {
  15525. "type": "string"
  15526. },
  15527. "tool": {
  15528. "type": "string"
  15529. },
  15530. "input": {
  15531. "type": "object"
  15532. },
  15533. "provider": {
  15534. "type": "object",
  15535. "properties": {
  15536. "executed": {
  15537. "type": "boolean"
  15538. },
  15539. "metadata": {
  15540. "type": "object",
  15541. "additionalProperties": {
  15542. "type": "object"
  15543. }
  15544. }
  15545. },
  15546. "required": ["executed"],
  15547. "additionalProperties": false
  15548. }
  15549. },
  15550. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15551. "additionalProperties": false
  15552. }
  15553. },
  15554. "required": ["id", "type", "properties"],
  15555. "additionalProperties": false
  15556. },
  15557. {
  15558. "type": "object",
  15559. "properties": {
  15560. "id": {
  15561. "type": "string",
  15562. "pattern": "^evt_"
  15563. },
  15564. "type": {
  15565. "type": "string",
  15566. "enum": ["session.next.tool.progress"]
  15567. },
  15568. "properties": {
  15569. "type": "object",
  15570. "properties": {
  15571. "timestamp": {
  15572. "type": "number"
  15573. },
  15574. "sessionID": {
  15575. "type": "string",
  15576. "pattern": "^ses"
  15577. },
  15578. "assistantMessageID": {
  15579. "type": "string",
  15580. "pattern": "^msg_"
  15581. },
  15582. "callID": {
  15583. "type": "string"
  15584. },
  15585. "structured": {
  15586. "type": "object"
  15587. },
  15588. "content": {
  15589. "type": "array",
  15590. "items": {
  15591. "anyOf": [
  15592. {
  15593. "$ref": "#/components/schemas/ToolTextContent"
  15594. },
  15595. {
  15596. "$ref": "#/components/schemas/ToolFileContent"
  15597. }
  15598. ]
  15599. }
  15600. }
  15601. },
  15602. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15603. "additionalProperties": false
  15604. }
  15605. },
  15606. "required": ["id", "type", "properties"],
  15607. "additionalProperties": false
  15608. },
  15609. {
  15610. "type": "object",
  15611. "properties": {
  15612. "id": {
  15613. "type": "string",
  15614. "pattern": "^evt_"
  15615. },
  15616. "type": {
  15617. "type": "string",
  15618. "enum": ["session.next.tool.success"]
  15619. },
  15620. "properties": {
  15621. "type": "object",
  15622. "properties": {
  15623. "timestamp": {
  15624. "type": "number"
  15625. },
  15626. "sessionID": {
  15627. "type": "string",
  15628. "pattern": "^ses"
  15629. },
  15630. "assistantMessageID": {
  15631. "type": "string",
  15632. "pattern": "^msg_"
  15633. },
  15634. "callID": {
  15635. "type": "string"
  15636. },
  15637. "structured": {
  15638. "type": "object"
  15639. },
  15640. "content": {
  15641. "type": "array",
  15642. "items": {
  15643. "anyOf": [
  15644. {
  15645. "$ref": "#/components/schemas/ToolTextContent"
  15646. },
  15647. {
  15648. "$ref": "#/components/schemas/ToolFileContent"
  15649. }
  15650. ]
  15651. }
  15652. },
  15653. "outputPaths": {
  15654. "type": "array",
  15655. "items": {
  15656. "type": "string"
  15657. }
  15658. },
  15659. "result": {},
  15660. "provider": {
  15661. "type": "object",
  15662. "properties": {
  15663. "executed": {
  15664. "type": "boolean"
  15665. },
  15666. "metadata": {
  15667. "type": "object",
  15668. "additionalProperties": {
  15669. "type": "object"
  15670. }
  15671. }
  15672. },
  15673. "required": ["executed"],
  15674. "additionalProperties": false
  15675. }
  15676. },
  15677. "required": [
  15678. "timestamp",
  15679. "sessionID",
  15680. "assistantMessageID",
  15681. "callID",
  15682. "structured",
  15683. "content",
  15684. "provider"
  15685. ],
  15686. "additionalProperties": false
  15687. }
  15688. },
  15689. "required": ["id", "type", "properties"],
  15690. "additionalProperties": false
  15691. },
  15692. {
  15693. "type": "object",
  15694. "properties": {
  15695. "id": {
  15696. "type": "string",
  15697. "pattern": "^evt_"
  15698. },
  15699. "type": {
  15700. "type": "string",
  15701. "enum": ["session.next.tool.failed"]
  15702. },
  15703. "properties": {
  15704. "type": "object",
  15705. "properties": {
  15706. "timestamp": {
  15707. "type": "number"
  15708. },
  15709. "sessionID": {
  15710. "type": "string",
  15711. "pattern": "^ses"
  15712. },
  15713. "assistantMessageID": {
  15714. "type": "string",
  15715. "pattern": "^msg_"
  15716. },
  15717. "callID": {
  15718. "type": "string"
  15719. },
  15720. "error": {
  15721. "$ref": "#/components/schemas/SessionErrorUnknown"
  15722. },
  15723. "result": {},
  15724. "provider": {
  15725. "type": "object",
  15726. "properties": {
  15727. "executed": {
  15728. "type": "boolean"
  15729. },
  15730. "metadata": {
  15731. "type": "object",
  15732. "additionalProperties": {
  15733. "type": "object"
  15734. }
  15735. }
  15736. },
  15737. "required": ["executed"],
  15738. "additionalProperties": false
  15739. }
  15740. },
  15741. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15742. "additionalProperties": false
  15743. }
  15744. },
  15745. "required": ["id", "type", "properties"],
  15746. "additionalProperties": false
  15747. },
  15748. {
  15749. "type": "object",
  15750. "properties": {
  15751. "id": {
  15752. "type": "string",
  15753. "pattern": "^evt_"
  15754. },
  15755. "type": {
  15756. "type": "string",
  15757. "enum": ["session.next.retried"]
  15758. },
  15759. "properties": {
  15760. "type": "object",
  15761. "properties": {
  15762. "timestamp": {
  15763. "type": "number"
  15764. },
  15765. "sessionID": {
  15766. "type": "string",
  15767. "pattern": "^ses"
  15768. },
  15769. "attempt": {
  15770. "type": "number"
  15771. },
  15772. "error": {
  15773. "$ref": "#/components/schemas/SessionNextRetry_error"
  15774. }
  15775. },
  15776. "required": ["timestamp", "sessionID", "attempt", "error"],
  15777. "additionalProperties": false
  15778. }
  15779. },
  15780. "required": ["id", "type", "properties"],
  15781. "additionalProperties": false
  15782. },
  15783. {
  15784. "type": "object",
  15785. "properties": {
  15786. "id": {
  15787. "type": "string",
  15788. "pattern": "^evt_"
  15789. },
  15790. "type": {
  15791. "type": "string",
  15792. "enum": ["session.next.compaction.started"]
  15793. },
  15794. "properties": {
  15795. "type": "object",
  15796. "properties": {
  15797. "timestamp": {
  15798. "type": "number"
  15799. },
  15800. "sessionID": {
  15801. "type": "string",
  15802. "pattern": "^ses"
  15803. },
  15804. "messageID": {
  15805. "type": "string",
  15806. "pattern": "^msg_"
  15807. },
  15808. "reason": {
  15809. "type": "string",
  15810. "enum": ["auto", "manual"]
  15811. }
  15812. },
  15813. "required": ["timestamp", "sessionID", "messageID", "reason"],
  15814. "additionalProperties": false
  15815. }
  15816. },
  15817. "required": ["id", "type", "properties"],
  15818. "additionalProperties": false
  15819. },
  15820. {
  15821. "type": "object",
  15822. "properties": {
  15823. "id": {
  15824. "type": "string",
  15825. "pattern": "^evt_"
  15826. },
  15827. "type": {
  15828. "type": "string",
  15829. "enum": ["session.next.compaction.delta"]
  15830. },
  15831. "properties": {
  15832. "type": "object",
  15833. "properties": {
  15834. "timestamp": {
  15835. "type": "number"
  15836. },
  15837. "sessionID": {
  15838. "type": "string",
  15839. "pattern": "^ses"
  15840. },
  15841. "messageID": {
  15842. "type": "string",
  15843. "pattern": "^msg_"
  15844. },
  15845. "text": {
  15846. "type": "string"
  15847. }
  15848. },
  15849. "required": ["timestamp", "sessionID", "messageID", "text"],
  15850. "additionalProperties": false
  15851. }
  15852. },
  15853. "required": ["id", "type", "properties"],
  15854. "additionalProperties": false
  15855. },
  15856. {
  15857. "type": "object",
  15858. "properties": {
  15859. "id": {
  15860. "type": "string",
  15861. "pattern": "^evt_"
  15862. },
  15863. "type": {
  15864. "type": "string",
  15865. "enum": ["session.next.compaction.ended"]
  15866. },
  15867. "properties": {
  15868. "type": "object",
  15869. "properties": {
  15870. "timestamp": {
  15871. "type": "number"
  15872. },
  15873. "sessionID": {
  15874. "type": "string",
  15875. "pattern": "^ses"
  15876. },
  15877. "messageID": {
  15878. "type": "string",
  15879. "pattern": "^msg_"
  15880. },
  15881. "reason": {
  15882. "type": "string",
  15883. "enum": ["auto", "manual"]
  15884. },
  15885. "text": {
  15886. "type": "string"
  15887. },
  15888. "recent": {
  15889. "type": "string"
  15890. }
  15891. },
  15892. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  15893. "additionalProperties": false
  15894. }
  15895. },
  15896. "required": ["id", "type", "properties"],
  15897. "additionalProperties": false
  15898. },
  15899. {
  15900. "type": "object",
  15901. "properties": {
  15902. "id": {
  15903. "type": "string",
  15904. "pattern": "^evt_"
  15905. },
  15906. "type": {
  15907. "type": "string",
  15908. "enum": ["message.part.delta"]
  15909. },
  15910. "properties": {
  15911. "type": "object",
  15912. "properties": {
  15913. "sessionID": {
  15914. "type": "string",
  15915. "pattern": "^ses"
  15916. },
  15917. "messageID": {
  15918. "type": "string",
  15919. "pattern": "^msg"
  15920. },
  15921. "partID": {
  15922. "type": "string",
  15923. "pattern": "^prt"
  15924. },
  15925. "field": {
  15926. "type": "string"
  15927. },
  15928. "delta": {
  15929. "type": "string"
  15930. }
  15931. },
  15932. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15933. "additionalProperties": false
  15934. }
  15935. },
  15936. "required": ["id", "type", "properties"],
  15937. "additionalProperties": false
  15938. },
  15939. {
  15940. "type": "object",
  15941. "properties": {
  15942. "id": {
  15943. "type": "string",
  15944. "pattern": "^evt_"
  15945. },
  15946. "type": {
  15947. "type": "string",
  15948. "enum": ["session.diff"]
  15949. },
  15950. "properties": {
  15951. "type": "object",
  15952. "properties": {
  15953. "sessionID": {
  15954. "type": "string",
  15955. "pattern": "^ses"
  15956. },
  15957. "diff": {
  15958. "type": "array",
  15959. "items": {
  15960. "$ref": "#/components/schemas/SnapshotFileDiff"
  15961. }
  15962. }
  15963. },
  15964. "required": ["sessionID", "diff"],
  15965. "additionalProperties": false
  15966. }
  15967. },
  15968. "required": ["id", "type", "properties"],
  15969. "additionalProperties": false
  15970. },
  15971. {
  15972. "type": "object",
  15973. "properties": {
  15974. "id": {
  15975. "type": "string",
  15976. "pattern": "^evt_"
  15977. },
  15978. "type": {
  15979. "type": "string",
  15980. "enum": ["session.error"]
  15981. },
  15982. "properties": {
  15983. "type": "object",
  15984. "properties": {
  15985. "sessionID": {
  15986. "type": "string",
  15987. "pattern": "^ses"
  15988. },
  15989. "error": {
  15990. "anyOf": [
  15991. {
  15992. "$ref": "#/components/schemas/ProviderAuthError"
  15993. },
  15994. {
  15995. "$ref": "#/components/schemas/UnknownError"
  15996. },
  15997. {
  15998. "$ref": "#/components/schemas/MessageOutputLengthError"
  15999. },
  16000. {
  16001. "$ref": "#/components/schemas/MessageAbortedError"
  16002. },
  16003. {
  16004. "$ref": "#/components/schemas/StructuredOutputError"
  16005. },
  16006. {
  16007. "$ref": "#/components/schemas/ContextOverflowError"
  16008. },
  16009. {
  16010. "$ref": "#/components/schemas/APIError"
  16011. }
  16012. ]
  16013. }
  16014. },
  16015. "additionalProperties": false
  16016. }
  16017. },
  16018. "required": ["id", "type", "properties"],
  16019. "additionalProperties": false
  16020. },
  16021. {
  16022. "type": "object",
  16023. "properties": {
  16024. "id": {
  16025. "type": "string",
  16026. "pattern": "^evt_"
  16027. },
  16028. "type": {
  16029. "type": "string",
  16030. "enum": ["installation.updated"]
  16031. },
  16032. "properties": {
  16033. "type": "object",
  16034. "properties": {
  16035. "version": {
  16036. "type": "string"
  16037. }
  16038. },
  16039. "required": ["version"],
  16040. "additionalProperties": false
  16041. }
  16042. },
  16043. "required": ["id", "type", "properties"],
  16044. "additionalProperties": false
  16045. },
  16046. {
  16047. "type": "object",
  16048. "properties": {
  16049. "id": {
  16050. "type": "string",
  16051. "pattern": "^evt_"
  16052. },
  16053. "type": {
  16054. "type": "string",
  16055. "enum": ["installation.update-available"]
  16056. },
  16057. "properties": {
  16058. "type": "object",
  16059. "properties": {
  16060. "version": {
  16061. "type": "string"
  16062. }
  16063. },
  16064. "required": ["version"],
  16065. "additionalProperties": false
  16066. }
  16067. },
  16068. "required": ["id", "type", "properties"],
  16069. "additionalProperties": false
  16070. },
  16071. {
  16072. "type": "object",
  16073. "properties": {
  16074. "id": {
  16075. "type": "string",
  16076. "pattern": "^evt_"
  16077. },
  16078. "type": {
  16079. "type": "string",
  16080. "enum": ["file.edited"]
  16081. },
  16082. "properties": {
  16083. "type": "object",
  16084. "properties": {
  16085. "file": {
  16086. "type": "string"
  16087. }
  16088. },
  16089. "required": ["file"],
  16090. "additionalProperties": false
  16091. }
  16092. },
  16093. "required": ["id", "type", "properties"],
  16094. "additionalProperties": false
  16095. },
  16096. {
  16097. "type": "object",
  16098. "properties": {
  16099. "id": {
  16100. "type": "string",
  16101. "pattern": "^evt_"
  16102. },
  16103. "type": {
  16104. "type": "string",
  16105. "enum": ["account.added"]
  16106. },
  16107. "properties": {
  16108. "type": "object",
  16109. "properties": {
  16110. "account": {
  16111. "$ref": "#/components/schemas/AuthInfo"
  16112. }
  16113. },
  16114. "required": ["account"],
  16115. "additionalProperties": false
  16116. }
  16117. },
  16118. "required": ["id", "type", "properties"],
  16119. "additionalProperties": false
  16120. },
  16121. {
  16122. "type": "object",
  16123. "properties": {
  16124. "id": {
  16125. "type": "string",
  16126. "pattern": "^evt_"
  16127. },
  16128. "type": {
  16129. "type": "string",
  16130. "enum": ["account.removed"]
  16131. },
  16132. "properties": {
  16133. "type": "object",
  16134. "properties": {
  16135. "account": {
  16136. "$ref": "#/components/schemas/AuthInfo"
  16137. }
  16138. },
  16139. "required": ["account"],
  16140. "additionalProperties": false
  16141. }
  16142. },
  16143. "required": ["id", "type", "properties"],
  16144. "additionalProperties": false
  16145. },
  16146. {
  16147. "type": "object",
  16148. "properties": {
  16149. "id": {
  16150. "type": "string",
  16151. "pattern": "^evt_"
  16152. },
  16153. "type": {
  16154. "type": "string",
  16155. "enum": ["account.switched"]
  16156. },
  16157. "properties": {
  16158. "type": "object",
  16159. "properties": {
  16160. "serviceID": {
  16161. "type": "string"
  16162. },
  16163. "from": {
  16164. "type": "string"
  16165. },
  16166. "to": {
  16167. "type": "string"
  16168. }
  16169. },
  16170. "required": ["serviceID"],
  16171. "additionalProperties": false
  16172. }
  16173. },
  16174. "required": ["id", "type", "properties"],
  16175. "additionalProperties": false
  16176. },
  16177. {
  16178. "type": "object",
  16179. "properties": {
  16180. "id": {
  16181. "type": "string",
  16182. "pattern": "^evt_"
  16183. },
  16184. "type": {
  16185. "type": "string",
  16186. "enum": ["permission.v2.asked"]
  16187. },
  16188. "properties": {
  16189. "type": "object",
  16190. "properties": {
  16191. "id": {
  16192. "type": "string",
  16193. "pattern": "^per"
  16194. },
  16195. "sessionID": {
  16196. "type": "string",
  16197. "pattern": "^ses"
  16198. },
  16199. "action": {
  16200. "type": "string"
  16201. },
  16202. "resources": {
  16203. "type": "array",
  16204. "items": {
  16205. "type": "string"
  16206. }
  16207. },
  16208. "save": {
  16209. "type": "array",
  16210. "items": {
  16211. "type": "string"
  16212. }
  16213. },
  16214. "metadata": {
  16215. "type": "object"
  16216. },
  16217. "source": {
  16218. "$ref": "#/components/schemas/PermissionV2Source"
  16219. }
  16220. },
  16221. "required": ["id", "sessionID", "action", "resources"],
  16222. "additionalProperties": false
  16223. }
  16224. },
  16225. "required": ["id", "type", "properties"],
  16226. "additionalProperties": false
  16227. },
  16228. {
  16229. "type": "object",
  16230. "properties": {
  16231. "id": {
  16232. "type": "string",
  16233. "pattern": "^evt_"
  16234. },
  16235. "type": {
  16236. "type": "string",
  16237. "enum": ["permission.v2.replied"]
  16238. },
  16239. "properties": {
  16240. "type": "object",
  16241. "properties": {
  16242. "sessionID": {
  16243. "type": "string",
  16244. "pattern": "^ses"
  16245. },
  16246. "requestID": {
  16247. "type": "string",
  16248. "pattern": "^per"
  16249. },
  16250. "reply": {
  16251. "$ref": "#/components/schemas/PermissionV2Reply"
  16252. }
  16253. },
  16254. "required": ["sessionID", "requestID", "reply"],
  16255. "additionalProperties": false
  16256. }
  16257. },
  16258. "required": ["id", "type", "properties"],
  16259. "additionalProperties": false
  16260. },
  16261. {
  16262. "type": "object",
  16263. "properties": {
  16264. "id": {
  16265. "type": "string",
  16266. "pattern": "^evt_"
  16267. },
  16268. "type": {
  16269. "type": "string",
  16270. "enum": ["file.watcher.updated"]
  16271. },
  16272. "properties": {
  16273. "type": "object",
  16274. "properties": {
  16275. "file": {
  16276. "type": "string"
  16277. },
  16278. "event": {
  16279. "type": "string",
  16280. "enum": ["add", "change", "unlink"]
  16281. }
  16282. },
  16283. "required": ["file", "event"],
  16284. "additionalProperties": false
  16285. }
  16286. },
  16287. "required": ["id", "type", "properties"],
  16288. "additionalProperties": false
  16289. },
  16290. {
  16291. "type": "object",
  16292. "properties": {
  16293. "id": {
  16294. "type": "string",
  16295. "pattern": "^evt_"
  16296. },
  16297. "type": {
  16298. "type": "string",
  16299. "enum": ["pty.created"]
  16300. },
  16301. "properties": {
  16302. "type": "object",
  16303. "properties": {
  16304. "info": {
  16305. "$ref": "#/components/schemas/Pty"
  16306. }
  16307. },
  16308. "required": ["info"],
  16309. "additionalProperties": false
  16310. }
  16311. },
  16312. "required": ["id", "type", "properties"],
  16313. "additionalProperties": false
  16314. },
  16315. {
  16316. "type": "object",
  16317. "properties": {
  16318. "id": {
  16319. "type": "string",
  16320. "pattern": "^evt_"
  16321. },
  16322. "type": {
  16323. "type": "string",
  16324. "enum": ["pty.updated"]
  16325. },
  16326. "properties": {
  16327. "type": "object",
  16328. "properties": {
  16329. "info": {
  16330. "$ref": "#/components/schemas/Pty"
  16331. }
  16332. },
  16333. "required": ["info"],
  16334. "additionalProperties": false
  16335. }
  16336. },
  16337. "required": ["id", "type", "properties"],
  16338. "additionalProperties": false
  16339. },
  16340. {
  16341. "type": "object",
  16342. "properties": {
  16343. "id": {
  16344. "type": "string",
  16345. "pattern": "^evt_"
  16346. },
  16347. "type": {
  16348. "type": "string",
  16349. "enum": ["pty.exited"]
  16350. },
  16351. "properties": {
  16352. "type": "object",
  16353. "properties": {
  16354. "id": {
  16355. "type": "string",
  16356. "pattern": "^pty"
  16357. },
  16358. "exitCode": {
  16359. "type": "integer",
  16360. "minimum": 0
  16361. }
  16362. },
  16363. "required": ["id", "exitCode"],
  16364. "additionalProperties": false
  16365. }
  16366. },
  16367. "required": ["id", "type", "properties"],
  16368. "additionalProperties": false
  16369. },
  16370. {
  16371. "type": "object",
  16372. "properties": {
  16373. "id": {
  16374. "type": "string",
  16375. "pattern": "^evt_"
  16376. },
  16377. "type": {
  16378. "type": "string",
  16379. "enum": ["pty.deleted"]
  16380. },
  16381. "properties": {
  16382. "type": "object",
  16383. "properties": {
  16384. "id": {
  16385. "type": "string",
  16386. "pattern": "^pty"
  16387. }
  16388. },
  16389. "required": ["id"],
  16390. "additionalProperties": false
  16391. }
  16392. },
  16393. "required": ["id", "type", "properties"],
  16394. "additionalProperties": false
  16395. },
  16396. {
  16397. "type": "object",
  16398. "properties": {
  16399. "id": {
  16400. "type": "string",
  16401. "pattern": "^evt_"
  16402. },
  16403. "type": {
  16404. "type": "string",
  16405. "enum": ["question.v2.asked"]
  16406. },
  16407. "properties": {
  16408. "type": "object",
  16409. "properties": {
  16410. "id": {
  16411. "type": "string",
  16412. "pattern": "^que"
  16413. },
  16414. "sessionID": {
  16415. "type": "string",
  16416. "pattern": "^ses"
  16417. },
  16418. "questions": {
  16419. "type": "array",
  16420. "items": {
  16421. "$ref": "#/components/schemas/QuestionV2Info"
  16422. },
  16423. "description": "Questions to ask"
  16424. },
  16425. "tool": {
  16426. "$ref": "#/components/schemas/QuestionV2Tool"
  16427. }
  16428. },
  16429. "required": ["id", "sessionID", "questions"],
  16430. "additionalProperties": false
  16431. }
  16432. },
  16433. "required": ["id", "type", "properties"],
  16434. "additionalProperties": false
  16435. },
  16436. {
  16437. "type": "object",
  16438. "properties": {
  16439. "id": {
  16440. "type": "string",
  16441. "pattern": "^evt_"
  16442. },
  16443. "type": {
  16444. "type": "string",
  16445. "enum": ["question.v2.replied"]
  16446. },
  16447. "properties": {
  16448. "type": "object",
  16449. "properties": {
  16450. "sessionID": {
  16451. "type": "string",
  16452. "pattern": "^ses"
  16453. },
  16454. "requestID": {
  16455. "type": "string",
  16456. "pattern": "^que"
  16457. },
  16458. "answers": {
  16459. "type": "array",
  16460. "items": {
  16461. "$ref": "#/components/schemas/QuestionV2Answer"
  16462. }
  16463. }
  16464. },
  16465. "required": ["sessionID", "requestID", "answers"],
  16466. "additionalProperties": false
  16467. }
  16468. },
  16469. "required": ["id", "type", "properties"],
  16470. "additionalProperties": false
  16471. },
  16472. {
  16473. "type": "object",
  16474. "properties": {
  16475. "id": {
  16476. "type": "string",
  16477. "pattern": "^evt_"
  16478. },
  16479. "type": {
  16480. "type": "string",
  16481. "enum": ["question.v2.rejected"]
  16482. },
  16483. "properties": {
  16484. "type": "object",
  16485. "properties": {
  16486. "sessionID": {
  16487. "type": "string",
  16488. "pattern": "^ses"
  16489. },
  16490. "requestID": {
  16491. "type": "string",
  16492. "pattern": "^que"
  16493. }
  16494. },
  16495. "required": ["sessionID", "requestID"],
  16496. "additionalProperties": false
  16497. }
  16498. },
  16499. "required": ["id", "type", "properties"],
  16500. "additionalProperties": false
  16501. },
  16502. {
  16503. "type": "object",
  16504. "properties": {
  16505. "id": {
  16506. "type": "string",
  16507. "pattern": "^evt_"
  16508. },
  16509. "type": {
  16510. "type": "string",
  16511. "enum": ["todo.updated"]
  16512. },
  16513. "properties": {
  16514. "type": "object",
  16515. "properties": {
  16516. "sessionID": {
  16517. "type": "string",
  16518. "pattern": "^ses"
  16519. },
  16520. "todos": {
  16521. "type": "array",
  16522. "items": {
  16523. "$ref": "#/components/schemas/Todo"
  16524. }
  16525. }
  16526. },
  16527. "required": ["sessionID", "todos"],
  16528. "additionalProperties": false
  16529. }
  16530. },
  16531. "required": ["id", "type", "properties"],
  16532. "additionalProperties": false
  16533. },
  16534. {
  16535. "type": "object",
  16536. "properties": {
  16537. "id": {
  16538. "type": "string",
  16539. "pattern": "^evt_"
  16540. },
  16541. "type": {
  16542. "type": "string",
  16543. "enum": ["lsp.updated"]
  16544. },
  16545. "properties": {
  16546. "type": "object",
  16547. "properties": {}
  16548. }
  16549. },
  16550. "required": ["id", "type", "properties"],
  16551. "additionalProperties": false
  16552. },
  16553. {
  16554. "type": "object",
  16555. "properties": {
  16556. "id": {
  16557. "type": "string",
  16558. "pattern": "^evt_"
  16559. },
  16560. "type": {
  16561. "type": "string",
  16562. "enum": ["permission.asked"]
  16563. },
  16564. "properties": {
  16565. "type": "object",
  16566. "properties": {
  16567. "id": {
  16568. "type": "string",
  16569. "pattern": "^per"
  16570. },
  16571. "sessionID": {
  16572. "type": "string",
  16573. "pattern": "^ses"
  16574. },
  16575. "permission": {
  16576. "type": "string"
  16577. },
  16578. "patterns": {
  16579. "type": "array",
  16580. "items": {
  16581. "type": "string"
  16582. }
  16583. },
  16584. "metadata": {
  16585. "type": "object"
  16586. },
  16587. "always": {
  16588. "type": "array",
  16589. "items": {
  16590. "type": "string"
  16591. }
  16592. },
  16593. "tool": {
  16594. "type": "object",
  16595. "properties": {
  16596. "messageID": {
  16597. "type": "string"
  16598. },
  16599. "callID": {
  16600. "type": "string"
  16601. }
  16602. },
  16603. "required": ["messageID", "callID"],
  16604. "additionalProperties": false
  16605. }
  16606. },
  16607. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16608. "additionalProperties": false
  16609. }
  16610. },
  16611. "required": ["id", "type", "properties"],
  16612. "additionalProperties": false
  16613. },
  16614. {
  16615. "type": "object",
  16616. "properties": {
  16617. "id": {
  16618. "type": "string",
  16619. "pattern": "^evt_"
  16620. },
  16621. "type": {
  16622. "type": "string",
  16623. "enum": ["permission.replied"]
  16624. },
  16625. "properties": {
  16626. "type": "object",
  16627. "properties": {
  16628. "sessionID": {
  16629. "type": "string",
  16630. "pattern": "^ses"
  16631. },
  16632. "requestID": {
  16633. "type": "string",
  16634. "pattern": "^per"
  16635. },
  16636. "reply": {
  16637. "type": "string",
  16638. "enum": ["once", "always", "reject"]
  16639. }
  16640. },
  16641. "required": ["sessionID", "requestID", "reply"],
  16642. "additionalProperties": false
  16643. }
  16644. },
  16645. "required": ["id", "type", "properties"],
  16646. "additionalProperties": false
  16647. },
  16648. {
  16649. "type": "object",
  16650. "properties": {
  16651. "id": {
  16652. "type": "string",
  16653. "pattern": "^evt_"
  16654. },
  16655. "type": {
  16656. "type": "string",
  16657. "enum": ["tui.prompt.append"]
  16658. },
  16659. "properties": {
  16660. "type": "object",
  16661. "properties": {
  16662. "text": {
  16663. "type": "string"
  16664. }
  16665. },
  16666. "required": ["text"],
  16667. "additionalProperties": false
  16668. }
  16669. },
  16670. "required": ["id", "type", "properties"],
  16671. "additionalProperties": false
  16672. },
  16673. {
  16674. "type": "object",
  16675. "properties": {
  16676. "id": {
  16677. "type": "string",
  16678. "pattern": "^evt_"
  16679. },
  16680. "type": {
  16681. "type": "string",
  16682. "enum": ["tui.command.execute"]
  16683. },
  16684. "properties": {
  16685. "type": "object",
  16686. "properties": {
  16687. "command": {
  16688. "anyOf": [
  16689. {
  16690. "type": "string",
  16691. "enum": [
  16692. "session.list",
  16693. "session.new",
  16694. "session.share",
  16695. "session.interrupt",
  16696. "session.compact",
  16697. "session.page.up",
  16698. "session.page.down",
  16699. "session.line.up",
  16700. "session.line.down",
  16701. "session.half.page.up",
  16702. "session.half.page.down",
  16703. "session.first",
  16704. "session.last",
  16705. "prompt.clear",
  16706. "prompt.submit",
  16707. "agent.cycle"
  16708. ]
  16709. },
  16710. {
  16711. "type": "string"
  16712. }
  16713. ]
  16714. }
  16715. },
  16716. "required": ["command"],
  16717. "additionalProperties": false
  16718. }
  16719. },
  16720. "required": ["id", "type", "properties"],
  16721. "additionalProperties": false
  16722. },
  16723. {
  16724. "type": "object",
  16725. "properties": {
  16726. "id": {
  16727. "type": "string",
  16728. "pattern": "^evt_"
  16729. },
  16730. "type": {
  16731. "type": "string",
  16732. "enum": ["tui.toast.show"]
  16733. },
  16734. "properties": {
  16735. "type": "object",
  16736. "properties": {
  16737. "title": {
  16738. "type": "string"
  16739. },
  16740. "message": {
  16741. "type": "string"
  16742. },
  16743. "variant": {
  16744. "type": "string",
  16745. "enum": ["info", "success", "warning", "error"]
  16746. },
  16747. "duration": {
  16748. "type": "integer",
  16749. "exclusiveMinimum": 0
  16750. }
  16751. },
  16752. "required": ["message", "variant"],
  16753. "additionalProperties": false
  16754. }
  16755. },
  16756. "required": ["id", "type", "properties"],
  16757. "additionalProperties": false
  16758. },
  16759. {
  16760. "type": "object",
  16761. "properties": {
  16762. "id": {
  16763. "type": "string",
  16764. "pattern": "^evt_"
  16765. },
  16766. "type": {
  16767. "type": "string",
  16768. "enum": ["tui.session.select"]
  16769. },
  16770. "properties": {
  16771. "type": "object",
  16772. "properties": {
  16773. "sessionID": {
  16774. "type": "string",
  16775. "pattern": "^ses",
  16776. "description": "Session ID to navigate to"
  16777. }
  16778. },
  16779. "required": ["sessionID"],
  16780. "additionalProperties": false
  16781. }
  16782. },
  16783. "required": ["id", "type", "properties"],
  16784. "additionalProperties": false
  16785. },
  16786. {
  16787. "type": "object",
  16788. "properties": {
  16789. "id": {
  16790. "type": "string",
  16791. "pattern": "^evt_"
  16792. },
  16793. "type": {
  16794. "type": "string",
  16795. "enum": ["mcp.tools.changed"]
  16796. },
  16797. "properties": {
  16798. "type": "object",
  16799. "properties": {
  16800. "server": {
  16801. "type": "string"
  16802. }
  16803. },
  16804. "required": ["server"],
  16805. "additionalProperties": false
  16806. }
  16807. },
  16808. "required": ["id", "type", "properties"],
  16809. "additionalProperties": false
  16810. },
  16811. {
  16812. "type": "object",
  16813. "properties": {
  16814. "id": {
  16815. "type": "string",
  16816. "pattern": "^evt_"
  16817. },
  16818. "type": {
  16819. "type": "string",
  16820. "enum": ["mcp.browser.open.failed"]
  16821. },
  16822. "properties": {
  16823. "type": "object",
  16824. "properties": {
  16825. "mcpName": {
  16826. "type": "string"
  16827. },
  16828. "url": {
  16829. "type": "string"
  16830. }
  16831. },
  16832. "required": ["mcpName", "url"],
  16833. "additionalProperties": false
  16834. }
  16835. },
  16836. "required": ["id", "type", "properties"],
  16837. "additionalProperties": false
  16838. },
  16839. {
  16840. "type": "object",
  16841. "properties": {
  16842. "id": {
  16843. "type": "string",
  16844. "pattern": "^evt_"
  16845. },
  16846. "type": {
  16847. "type": "string",
  16848. "enum": ["command.executed"]
  16849. },
  16850. "properties": {
  16851. "type": "object",
  16852. "properties": {
  16853. "name": {
  16854. "type": "string"
  16855. },
  16856. "sessionID": {
  16857. "type": "string",
  16858. "pattern": "^ses"
  16859. },
  16860. "arguments": {
  16861. "type": "string"
  16862. },
  16863. "messageID": {
  16864. "type": "string",
  16865. "pattern": "^msg"
  16866. }
  16867. },
  16868. "required": ["name", "sessionID", "arguments", "messageID"],
  16869. "additionalProperties": false
  16870. }
  16871. },
  16872. "required": ["id", "type", "properties"],
  16873. "additionalProperties": false
  16874. },
  16875. {
  16876. "type": "object",
  16877. "properties": {
  16878. "id": {
  16879. "type": "string",
  16880. "pattern": "^evt_"
  16881. },
  16882. "type": {
  16883. "type": "string",
  16884. "enum": ["project.directories.updated"]
  16885. },
  16886. "properties": {
  16887. "type": "object",
  16888. "properties": {
  16889. "projectID": {
  16890. "type": "string"
  16891. }
  16892. },
  16893. "required": ["projectID"],
  16894. "additionalProperties": false
  16895. }
  16896. },
  16897. "required": ["id", "type", "properties"],
  16898. "additionalProperties": false
  16899. },
  16900. {
  16901. "type": "object",
  16902. "properties": {
  16903. "id": {
  16904. "type": "string",
  16905. "pattern": "^evt_"
  16906. },
  16907. "type": {
  16908. "type": "string",
  16909. "enum": ["project.updated"]
  16910. },
  16911. "properties": {
  16912. "type": "object",
  16913. "properties": {
  16914. "id": {
  16915. "type": "string"
  16916. },
  16917. "worktree": {
  16918. "type": "string"
  16919. },
  16920. "vcs": {
  16921. "type": "string",
  16922. "enum": ["git"]
  16923. },
  16924. "name": {
  16925. "type": "string"
  16926. },
  16927. "icon": {
  16928. "type": "object",
  16929. "properties": {
  16930. "url": {
  16931. "type": "string"
  16932. },
  16933. "override": {
  16934. "type": "string"
  16935. },
  16936. "color": {
  16937. "type": "string"
  16938. }
  16939. },
  16940. "additionalProperties": false
  16941. },
  16942. "commands": {
  16943. "type": "object",
  16944. "properties": {
  16945. "start": {
  16946. "type": "string",
  16947. "description": "Startup script to run when creating a new workspace (worktree)"
  16948. }
  16949. },
  16950. "additionalProperties": false
  16951. },
  16952. "time": {
  16953. "type": "object",
  16954. "properties": {
  16955. "created": {
  16956. "type": "integer",
  16957. "minimum": 0
  16958. },
  16959. "updated": {
  16960. "type": "integer",
  16961. "minimum": 0
  16962. },
  16963. "initialized": {
  16964. "type": "integer",
  16965. "minimum": 0
  16966. }
  16967. },
  16968. "required": ["created", "updated"],
  16969. "additionalProperties": false
  16970. },
  16971. "sandboxes": {
  16972. "type": "array",
  16973. "items": {
  16974. "type": "string"
  16975. }
  16976. }
  16977. },
  16978. "required": ["id", "worktree", "time", "sandboxes"],
  16979. "additionalProperties": false
  16980. }
  16981. },
  16982. "required": ["id", "type", "properties"],
  16983. "additionalProperties": false
  16984. },
  16985. {
  16986. "type": "object",
  16987. "properties": {
  16988. "id": {
  16989. "type": "string",
  16990. "pattern": "^evt_"
  16991. },
  16992. "type": {
  16993. "type": "string",
  16994. "enum": ["question.asked"]
  16995. },
  16996. "properties": {
  16997. "type": "object",
  16998. "properties": {
  16999. "id": {
  17000. "type": "string",
  17001. "pattern": "^que"
  17002. },
  17003. "sessionID": {
  17004. "type": "string",
  17005. "pattern": "^ses"
  17006. },
  17007. "questions": {
  17008. "type": "array",
  17009. "items": {
  17010. "$ref": "#/components/schemas/QuestionInfo"
  17011. },
  17012. "description": "Questions to ask"
  17013. },
  17014. "tool": {
  17015. "$ref": "#/components/schemas/QuestionTool"
  17016. }
  17017. },
  17018. "required": ["id", "sessionID", "questions"],
  17019. "additionalProperties": false
  17020. }
  17021. },
  17022. "required": ["id", "type", "properties"],
  17023. "additionalProperties": false
  17024. },
  17025. {
  17026. "type": "object",
  17027. "properties": {
  17028. "id": {
  17029. "type": "string",
  17030. "pattern": "^evt_"
  17031. },
  17032. "type": {
  17033. "type": "string",
  17034. "enum": ["question.replied"]
  17035. },
  17036. "properties": {
  17037. "type": "object",
  17038. "properties": {
  17039. "sessionID": {
  17040. "type": "string",
  17041. "pattern": "^ses"
  17042. },
  17043. "requestID": {
  17044. "type": "string",
  17045. "pattern": "^que"
  17046. },
  17047. "answers": {
  17048. "type": "array",
  17049. "items": {
  17050. "$ref": "#/components/schemas/QuestionAnswer"
  17051. }
  17052. }
  17053. },
  17054. "required": ["sessionID", "requestID", "answers"],
  17055. "additionalProperties": false
  17056. }
  17057. },
  17058. "required": ["id", "type", "properties"],
  17059. "additionalProperties": false
  17060. },
  17061. {
  17062. "type": "object",
  17063. "properties": {
  17064. "id": {
  17065. "type": "string",
  17066. "pattern": "^evt_"
  17067. },
  17068. "type": {
  17069. "type": "string",
  17070. "enum": ["question.rejected"]
  17071. },
  17072. "properties": {
  17073. "type": "object",
  17074. "properties": {
  17075. "sessionID": {
  17076. "type": "string",
  17077. "pattern": "^ses"
  17078. },
  17079. "requestID": {
  17080. "type": "string",
  17081. "pattern": "^que"
  17082. }
  17083. },
  17084. "required": ["sessionID", "requestID"],
  17085. "additionalProperties": false
  17086. }
  17087. },
  17088. "required": ["id", "type", "properties"],
  17089. "additionalProperties": false
  17090. },
  17091. {
  17092. "type": "object",
  17093. "properties": {
  17094. "id": {
  17095. "type": "string",
  17096. "pattern": "^evt_"
  17097. },
  17098. "type": {
  17099. "type": "string",
  17100. "enum": ["session.status"]
  17101. },
  17102. "properties": {
  17103. "type": "object",
  17104. "properties": {
  17105. "sessionID": {
  17106. "type": "string",
  17107. "pattern": "^ses"
  17108. },
  17109. "status": {
  17110. "$ref": "#/components/schemas/SessionStatus"
  17111. }
  17112. },
  17113. "required": ["sessionID", "status"],
  17114. "additionalProperties": false
  17115. }
  17116. },
  17117. "required": ["id", "type", "properties"],
  17118. "additionalProperties": false
  17119. },
  17120. {
  17121. "type": "object",
  17122. "properties": {
  17123. "id": {
  17124. "type": "string",
  17125. "pattern": "^evt_"
  17126. },
  17127. "type": {
  17128. "type": "string",
  17129. "enum": ["session.idle"]
  17130. },
  17131. "properties": {
  17132. "type": "object",
  17133. "properties": {
  17134. "sessionID": {
  17135. "type": "string",
  17136. "pattern": "^ses"
  17137. }
  17138. },
  17139. "required": ["sessionID"],
  17140. "additionalProperties": false
  17141. }
  17142. },
  17143. "required": ["id", "type", "properties"],
  17144. "additionalProperties": false
  17145. },
  17146. {
  17147. "type": "object",
  17148. "properties": {
  17149. "id": {
  17150. "type": "string",
  17151. "pattern": "^evt_"
  17152. },
  17153. "type": {
  17154. "type": "string",
  17155. "enum": ["session.compacted"]
  17156. },
  17157. "properties": {
  17158. "type": "object",
  17159. "properties": {
  17160. "sessionID": {
  17161. "type": "string",
  17162. "pattern": "^ses"
  17163. }
  17164. },
  17165. "required": ["sessionID"],
  17166. "additionalProperties": false
  17167. }
  17168. },
  17169. "required": ["id", "type", "properties"],
  17170. "additionalProperties": false
  17171. },
  17172. {
  17173. "type": "object",
  17174. "properties": {
  17175. "id": {
  17176. "type": "string",
  17177. "pattern": "^evt_"
  17178. },
  17179. "type": {
  17180. "type": "string",
  17181. "enum": ["vcs.branch.updated"]
  17182. },
  17183. "properties": {
  17184. "type": "object",
  17185. "properties": {
  17186. "branch": {
  17187. "type": "string"
  17188. }
  17189. },
  17190. "additionalProperties": false
  17191. }
  17192. },
  17193. "required": ["id", "type", "properties"],
  17194. "additionalProperties": false
  17195. },
  17196. {
  17197. "type": "object",
  17198. "properties": {
  17199. "id": {
  17200. "type": "string",
  17201. "pattern": "^evt_"
  17202. },
  17203. "type": {
  17204. "type": "string",
  17205. "enum": ["worktree.ready"]
  17206. },
  17207. "properties": {
  17208. "type": "object",
  17209. "properties": {
  17210. "name": {
  17211. "type": "string"
  17212. },
  17213. "branch": {
  17214. "type": "string"
  17215. }
  17216. },
  17217. "required": ["name"],
  17218. "additionalProperties": false
  17219. }
  17220. },
  17221. "required": ["id", "type", "properties"],
  17222. "additionalProperties": false
  17223. },
  17224. {
  17225. "type": "object",
  17226. "properties": {
  17227. "id": {
  17228. "type": "string",
  17229. "pattern": "^evt_"
  17230. },
  17231. "type": {
  17232. "type": "string",
  17233. "enum": ["worktree.failed"]
  17234. },
  17235. "properties": {
  17236. "type": "object",
  17237. "properties": {
  17238. "message": {
  17239. "type": "string"
  17240. }
  17241. },
  17242. "required": ["message"],
  17243. "additionalProperties": false
  17244. }
  17245. },
  17246. "required": ["id", "type", "properties"],
  17247. "additionalProperties": false
  17248. },
  17249. {
  17250. "type": "object",
  17251. "properties": {
  17252. "id": {
  17253. "type": "string",
  17254. "pattern": "^evt_"
  17255. },
  17256. "type": {
  17257. "type": "string",
  17258. "enum": ["workspace.ready"]
  17259. },
  17260. "properties": {
  17261. "type": "object",
  17262. "properties": {
  17263. "name": {
  17264. "type": "string"
  17265. }
  17266. },
  17267. "required": ["name"],
  17268. "additionalProperties": false
  17269. }
  17270. },
  17271. "required": ["id", "type", "properties"],
  17272. "additionalProperties": false
  17273. },
  17274. {
  17275. "type": "object",
  17276. "properties": {
  17277. "id": {
  17278. "type": "string",
  17279. "pattern": "^evt_"
  17280. },
  17281. "type": {
  17282. "type": "string",
  17283. "enum": ["workspace.failed"]
  17284. },
  17285. "properties": {
  17286. "type": "object",
  17287. "properties": {
  17288. "message": {
  17289. "type": "string"
  17290. }
  17291. },
  17292. "required": ["message"],
  17293. "additionalProperties": false
  17294. }
  17295. },
  17296. "required": ["id", "type", "properties"],
  17297. "additionalProperties": false
  17298. },
  17299. {
  17300. "type": "object",
  17301. "properties": {
  17302. "id": {
  17303. "type": "string",
  17304. "pattern": "^evt_"
  17305. },
  17306. "type": {
  17307. "type": "string",
  17308. "enum": ["workspace.status"]
  17309. },
  17310. "properties": {
  17311. "type": "object",
  17312. "properties": {
  17313. "workspaceID": {
  17314. "type": "string",
  17315. "pattern": "^wrk"
  17316. },
  17317. "status": {
  17318. "type": "string",
  17319. "enum": ["connected", "connecting", "disconnected", "error"]
  17320. }
  17321. },
  17322. "required": ["workspaceID", "status"],
  17323. "additionalProperties": false
  17324. }
  17325. },
  17326. "required": ["id", "type", "properties"],
  17327. "additionalProperties": false
  17328. },
  17329. {
  17330. "type": "object",
  17331. "properties": {
  17332. "id": {
  17333. "type": "string",
  17334. "pattern": "^evt_"
  17335. },
  17336. "type": {
  17337. "type": "string",
  17338. "enum": ["server.connected"]
  17339. },
  17340. "properties": {
  17341. "type": "object",
  17342. "properties": {}
  17343. }
  17344. },
  17345. "required": ["id", "type", "properties"],
  17346. "additionalProperties": false
  17347. },
  17348. {
  17349. "type": "object",
  17350. "properties": {
  17351. "id": {
  17352. "type": "string",
  17353. "pattern": "^evt_"
  17354. },
  17355. "type": {
  17356. "type": "string",
  17357. "enum": ["global.disposed"]
  17358. },
  17359. "properties": {
  17360. "type": "object",
  17361. "properties": {}
  17362. }
  17363. },
  17364. "required": ["id", "type", "properties"],
  17365. "additionalProperties": false
  17366. },
  17367. {
  17368. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17369. },
  17370. {
  17371. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17372. },
  17373. {
  17374. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17375. },
  17376. {
  17377. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17378. },
  17379. {
  17380. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17381. },
  17382. {
  17383. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17384. },
  17385. {
  17386. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17387. },
  17388. {
  17389. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17390. },
  17391. {
  17392. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17393. },
  17394. {
  17395. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17396. },
  17397. {
  17398. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17399. },
  17400. {
  17401. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17402. },
  17403. {
  17404. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17405. },
  17406. {
  17407. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17408. },
  17409. {
  17410. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  17411. },
  17412. {
  17413. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  17414. },
  17415. {
  17416. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17417. },
  17418. {
  17419. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17420. },
  17421. {
  17422. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17423. },
  17424. {
  17425. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17426. },
  17427. {
  17428. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17429. },
  17430. {
  17431. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17432. },
  17433. {
  17434. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17435. },
  17436. {
  17437. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17438. },
  17439. {
  17440. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17441. },
  17442. {
  17443. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17444. },
  17445. {
  17446. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17447. },
  17448. {
  17449. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17450. },
  17451. {
  17452. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17453. },
  17454. {
  17455. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17456. },
  17457. {
  17458. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17459. },
  17460. {
  17461. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17462. },
  17463. {
  17464. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17465. },
  17466. {
  17467. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17468. },
  17469. {
  17470. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17471. }
  17472. ]
  17473. }
  17474. },
  17475. "required": ["directory", "payload"],
  17476. "additionalProperties": false
  17477. },
  17478. "LogLevel": {
  17479. "type": "string",
  17480. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17481. "description": "Log level"
  17482. },
  17483. "ServerConfig": {
  17484. "type": "object",
  17485. "properties": {
  17486. "port": {
  17487. "type": "integer",
  17488. "exclusiveMinimum": 0
  17489. },
  17490. "hostname": {
  17491. "type": "string"
  17492. },
  17493. "mdns": {
  17494. "type": "boolean"
  17495. },
  17496. "mdnsDomain": {
  17497. "type": "string"
  17498. },
  17499. "cors": {
  17500. "type": "array",
  17501. "items": {
  17502. "type": "string"
  17503. }
  17504. }
  17505. },
  17506. "additionalProperties": false,
  17507. "description": "Server configuration for opencode serve and web commands"
  17508. },
  17509. "ReferenceConfigEntry": {
  17510. "anyOf": [
  17511. {
  17512. "type": "string"
  17513. },
  17514. {
  17515. "type": "object",
  17516. "properties": {
  17517. "repository": {
  17518. "type": "string",
  17519. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  17520. },
  17521. "branch": {
  17522. "type": "string"
  17523. }
  17524. },
  17525. "required": ["repository"],
  17526. "additionalProperties": false
  17527. },
  17528. {
  17529. "type": "object",
  17530. "properties": {
  17531. "path": {
  17532. "type": "string",
  17533. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  17534. }
  17535. },
  17536. "required": ["path"],
  17537. "additionalProperties": false
  17538. }
  17539. ]
  17540. },
  17541. "ReferenceConfig": {
  17542. "type": "object",
  17543. "additionalProperties": {
  17544. "$ref": "#/components/schemas/ReferenceConfigEntry"
  17545. }
  17546. },
  17547. "PermissionActionConfig": {
  17548. "type": "string",
  17549. "enum": ["ask", "allow", "deny"]
  17550. },
  17551. "PermissionObjectConfig": {
  17552. "type": "object",
  17553. "additionalProperties": {
  17554. "$ref": "#/components/schemas/PermissionActionConfig"
  17555. }
  17556. },
  17557. "PermissionRuleConfig": {
  17558. "anyOf": [
  17559. {
  17560. "$ref": "#/components/schemas/PermissionActionConfig"
  17561. },
  17562. {
  17563. "$ref": "#/components/schemas/PermissionObjectConfig"
  17564. }
  17565. ]
  17566. },
  17567. "PermissionConfig": {
  17568. "anyOf": [
  17569. {
  17570. "$ref": "#/components/schemas/PermissionActionConfig"
  17571. },
  17572. {
  17573. "type": "object",
  17574. "properties": {
  17575. "read": {
  17576. "$ref": "#/components/schemas/PermissionRuleConfig"
  17577. },
  17578. "edit": {
  17579. "$ref": "#/components/schemas/PermissionRuleConfig"
  17580. },
  17581. "glob": {
  17582. "$ref": "#/components/schemas/PermissionRuleConfig"
  17583. },
  17584. "grep": {
  17585. "$ref": "#/components/schemas/PermissionRuleConfig"
  17586. },
  17587. "list": {
  17588. "$ref": "#/components/schemas/PermissionRuleConfig"
  17589. },
  17590. "bash": {
  17591. "$ref": "#/components/schemas/PermissionRuleConfig"
  17592. },
  17593. "task": {
  17594. "$ref": "#/components/schemas/PermissionRuleConfig"
  17595. },
  17596. "external_directory": {
  17597. "$ref": "#/components/schemas/PermissionRuleConfig"
  17598. },
  17599. "todowrite": {
  17600. "$ref": "#/components/schemas/PermissionActionConfig"
  17601. },
  17602. "question": {
  17603. "$ref": "#/components/schemas/PermissionActionConfig"
  17604. },
  17605. "webfetch": {
  17606. "$ref": "#/components/schemas/PermissionActionConfig"
  17607. },
  17608. "websearch": {
  17609. "$ref": "#/components/schemas/PermissionActionConfig"
  17610. },
  17611. "lsp": {
  17612. "$ref": "#/components/schemas/PermissionRuleConfig"
  17613. },
  17614. "doom_loop": {
  17615. "$ref": "#/components/schemas/PermissionActionConfig"
  17616. },
  17617. "skill": {
  17618. "$ref": "#/components/schemas/PermissionRuleConfig"
  17619. }
  17620. },
  17621. "additionalProperties": {
  17622. "$ref": "#/components/schemas/PermissionRuleConfig"
  17623. }
  17624. }
  17625. ]
  17626. },
  17627. "AgentConfig": {
  17628. "type": "object",
  17629. "properties": {
  17630. "model": {
  17631. "type": "string"
  17632. },
  17633. "variant": {
  17634. "type": "string"
  17635. },
  17636. "temperature": {
  17637. "type": "number"
  17638. },
  17639. "top_p": {
  17640. "type": "number"
  17641. },
  17642. "prompt": {
  17643. "type": "string"
  17644. },
  17645. "tools": {
  17646. "type": "object",
  17647. "additionalProperties": {
  17648. "type": "boolean"
  17649. }
  17650. },
  17651. "disable": {
  17652. "type": "boolean"
  17653. },
  17654. "description": {
  17655. "type": "string"
  17656. },
  17657. "mode": {
  17658. "type": "string",
  17659. "enum": ["subagent", "primary", "all"]
  17660. },
  17661. "hidden": {
  17662. "type": "boolean"
  17663. },
  17664. "options": {
  17665. "type": "object"
  17666. },
  17667. "color": {
  17668. "anyOf": [
  17669. {
  17670. "type": "string",
  17671. "pattern": "^#[0-9a-fA-F]{6}$"
  17672. },
  17673. {
  17674. "type": "string",
  17675. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17676. }
  17677. ],
  17678. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17679. },
  17680. "steps": {
  17681. "type": "integer",
  17682. "exclusiveMinimum": 0
  17683. },
  17684. "maxSteps": {
  17685. "type": "integer",
  17686. "exclusiveMinimum": 0
  17687. },
  17688. "permission": {
  17689. "$ref": "#/components/schemas/PermissionConfig"
  17690. }
  17691. },
  17692. "additionalProperties": {}
  17693. },
  17694. "ProviderConfig": {
  17695. "type": "object",
  17696. "properties": {
  17697. "api": {
  17698. "type": "string"
  17699. },
  17700. "name": {
  17701. "type": "string"
  17702. },
  17703. "env": {
  17704. "type": "array",
  17705. "items": {
  17706. "type": "string"
  17707. }
  17708. },
  17709. "id": {
  17710. "type": "string"
  17711. },
  17712. "npm": {
  17713. "type": "string"
  17714. },
  17715. "whitelist": {
  17716. "type": "array",
  17717. "items": {
  17718. "type": "string"
  17719. }
  17720. },
  17721. "blacklist": {
  17722. "type": "array",
  17723. "items": {
  17724. "type": "string"
  17725. }
  17726. },
  17727. "options": {
  17728. "type": "object",
  17729. "properties": {
  17730. "apiKey": {
  17731. "type": "string"
  17732. },
  17733. "baseURL": {
  17734. "type": "string"
  17735. },
  17736. "enterpriseUrl": {
  17737. "type": "string"
  17738. },
  17739. "setCacheKey": {
  17740. "type": "boolean"
  17741. },
  17742. "timeout": {
  17743. "anyOf": [
  17744. {
  17745. "type": "integer",
  17746. "exclusiveMinimum": 0
  17747. },
  17748. {
  17749. "type": "boolean",
  17750. "enum": [false]
  17751. }
  17752. ],
  17753. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17754. },
  17755. "headerTimeout": {
  17756. "anyOf": [
  17757. {
  17758. "type": "integer",
  17759. "exclusiveMinimum": 0
  17760. },
  17761. {
  17762. "type": "boolean",
  17763. "enum": [false]
  17764. }
  17765. ],
  17766. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17767. },
  17768. "chunkTimeout": {
  17769. "type": "integer",
  17770. "exclusiveMinimum": 0
  17771. }
  17772. },
  17773. "additionalProperties": {}
  17774. },
  17775. "models": {
  17776. "type": "object",
  17777. "additionalProperties": {
  17778. "type": "object",
  17779. "properties": {
  17780. "id": {
  17781. "type": "string"
  17782. },
  17783. "name": {
  17784. "type": "string"
  17785. },
  17786. "family": {
  17787. "type": "string"
  17788. },
  17789. "release_date": {
  17790. "type": "string"
  17791. },
  17792. "attachment": {
  17793. "type": "boolean"
  17794. },
  17795. "reasoning": {
  17796. "type": "boolean"
  17797. },
  17798. "temperature": {
  17799. "type": "boolean"
  17800. },
  17801. "tool_call": {
  17802. "type": "boolean"
  17803. },
  17804. "interleaved": {
  17805. "anyOf": [
  17806. {
  17807. "type": "boolean",
  17808. "enum": [true]
  17809. },
  17810. {
  17811. "type": "object",
  17812. "properties": {
  17813. "field": {
  17814. "type": "string",
  17815. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  17816. }
  17817. },
  17818. "required": ["field"],
  17819. "additionalProperties": false
  17820. }
  17821. ]
  17822. },
  17823. "cost": {
  17824. "type": "object",
  17825. "properties": {
  17826. "input": {
  17827. "type": "number"
  17828. },
  17829. "output": {
  17830. "type": "number"
  17831. },
  17832. "cache_read": {
  17833. "type": "number"
  17834. },
  17835. "cache_write": {
  17836. "type": "number"
  17837. },
  17838. "context_over_200k": {
  17839. "type": "object",
  17840. "properties": {
  17841. "input": {
  17842. "type": "number"
  17843. },
  17844. "output": {
  17845. "type": "number"
  17846. },
  17847. "cache_read": {
  17848. "type": "number"
  17849. },
  17850. "cache_write": {
  17851. "type": "number"
  17852. }
  17853. },
  17854. "required": ["input", "output"],
  17855. "additionalProperties": false
  17856. }
  17857. },
  17858. "required": ["input", "output"],
  17859. "additionalProperties": false
  17860. },
  17861. "limit": {
  17862. "type": "object",
  17863. "properties": {
  17864. "context": {
  17865. "type": "number"
  17866. },
  17867. "input": {
  17868. "type": "number"
  17869. },
  17870. "output": {
  17871. "type": "number"
  17872. }
  17873. },
  17874. "required": ["context", "output"],
  17875. "additionalProperties": false
  17876. },
  17877. "modalities": {
  17878. "type": "object",
  17879. "properties": {
  17880. "input": {
  17881. "type": "array",
  17882. "items": {
  17883. "type": "string",
  17884. "enum": ["text", "audio", "image", "video", "pdf"]
  17885. }
  17886. },
  17887. "output": {
  17888. "type": "array",
  17889. "items": {
  17890. "type": "string",
  17891. "enum": ["text", "audio", "image", "video", "pdf"]
  17892. }
  17893. }
  17894. },
  17895. "additionalProperties": false
  17896. },
  17897. "experimental": {
  17898. "type": "boolean"
  17899. },
  17900. "status": {
  17901. "type": "string",
  17902. "enum": ["alpha", "beta", "deprecated", "active"]
  17903. },
  17904. "provider": {
  17905. "type": "object",
  17906. "properties": {
  17907. "npm": {
  17908. "type": "string"
  17909. },
  17910. "api": {
  17911. "type": "string"
  17912. }
  17913. },
  17914. "additionalProperties": false
  17915. },
  17916. "options": {
  17917. "type": "object"
  17918. },
  17919. "headers": {
  17920. "type": "object",
  17921. "additionalProperties": {
  17922. "type": "string"
  17923. }
  17924. },
  17925. "variants": {
  17926. "type": "object",
  17927. "additionalProperties": {
  17928. "type": "object",
  17929. "properties": {
  17930. "disabled": {
  17931. "type": "boolean"
  17932. }
  17933. },
  17934. "additionalProperties": {}
  17935. },
  17936. "description": "Variant-specific configuration"
  17937. }
  17938. },
  17939. "additionalProperties": false
  17940. }
  17941. }
  17942. },
  17943. "additionalProperties": false
  17944. },
  17945. "McpLocalConfig": {
  17946. "type": "object",
  17947. "properties": {
  17948. "type": {
  17949. "type": "string",
  17950. "enum": ["local"],
  17951. "description": "Type of MCP server connection"
  17952. },
  17953. "command": {
  17954. "type": "array",
  17955. "items": {
  17956. "type": "string"
  17957. },
  17958. "description": "Command and arguments to run the MCP server"
  17959. },
  17960. "environment": {
  17961. "type": "object",
  17962. "additionalProperties": {
  17963. "type": "string"
  17964. }
  17965. },
  17966. "enabled": {
  17967. "type": "boolean"
  17968. },
  17969. "timeout": {
  17970. "type": "integer",
  17971. "exclusiveMinimum": 0
  17972. }
  17973. },
  17974. "required": ["type", "command"],
  17975. "additionalProperties": false
  17976. },
  17977. "McpOAuthConfig": {
  17978. "type": "object",
  17979. "properties": {
  17980. "clientId": {
  17981. "type": "string"
  17982. },
  17983. "clientSecret": {
  17984. "type": "string"
  17985. },
  17986. "scope": {
  17987. "type": "string"
  17988. },
  17989. "callbackPort": {
  17990. "type": "integer",
  17991. "minimum": 1,
  17992. "maximum": 65535
  17993. },
  17994. "redirectUri": {
  17995. "type": "string"
  17996. }
  17997. },
  17998. "additionalProperties": false
  17999. },
  18000. "McpRemoteConfig": {
  18001. "type": "object",
  18002. "properties": {
  18003. "type": {
  18004. "type": "string",
  18005. "enum": ["remote"],
  18006. "description": "Type of MCP server connection"
  18007. },
  18008. "url": {
  18009. "type": "string",
  18010. "description": "URL of the remote MCP server"
  18011. },
  18012. "enabled": {
  18013. "type": "boolean"
  18014. },
  18015. "headers": {
  18016. "type": "object",
  18017. "additionalProperties": {
  18018. "type": "string"
  18019. }
  18020. },
  18021. "oauth": {
  18022. "anyOf": [
  18023. {
  18024. "$ref": "#/components/schemas/McpOAuthConfig"
  18025. },
  18026. {
  18027. "type": "boolean",
  18028. "enum": [false]
  18029. }
  18030. ],
  18031. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  18032. },
  18033. "timeout": {
  18034. "type": "integer",
  18035. "exclusiveMinimum": 0
  18036. }
  18037. },
  18038. "required": ["type", "url"],
  18039. "additionalProperties": false
  18040. },
  18041. "LayoutConfig": {
  18042. "type": "string",
  18043. "enum": ["auto", "stretch"],
  18044. "description": "@deprecated Always uses stretch layout."
  18045. },
  18046. "ImageAttachmentConfig": {
  18047. "type": "object",
  18048. "properties": {
  18049. "auto_resize": {
  18050. "type": "boolean"
  18051. },
  18052. "max_width": {
  18053. "type": "integer",
  18054. "exclusiveMinimum": 0
  18055. },
  18056. "max_height": {
  18057. "type": "integer",
  18058. "exclusiveMinimum": 0
  18059. },
  18060. "max_base64_bytes": {
  18061. "type": "integer",
  18062. "exclusiveMinimum": 0
  18063. }
  18064. },
  18065. "additionalProperties": false
  18066. },
  18067. "AttachmentConfig": {
  18068. "type": "object",
  18069. "properties": {
  18070. "image": {
  18071. "$ref": "#/components/schemas/ImageAttachmentConfig"
  18072. }
  18073. },
  18074. "additionalProperties": false
  18075. },
  18076. "Config": {
  18077. "type": "object",
  18078. "properties": {
  18079. "$schema": {
  18080. "type": "string"
  18081. },
  18082. "shell": {
  18083. "type": "string"
  18084. },
  18085. "logLevel": {
  18086. "$ref": "#/components/schemas/LogLevel"
  18087. },
  18088. "server": {
  18089. "$ref": "#/components/schemas/ServerConfig"
  18090. },
  18091. "command": {
  18092. "type": "object",
  18093. "additionalProperties": {
  18094. "type": "object",
  18095. "properties": {
  18096. "template": {
  18097. "type": "string"
  18098. },
  18099. "description": {
  18100. "type": "string"
  18101. },
  18102. "agent": {
  18103. "type": "string"
  18104. },
  18105. "model": {
  18106. "type": "string"
  18107. },
  18108. "variant": {
  18109. "type": "string"
  18110. },
  18111. "subtask": {
  18112. "type": "boolean"
  18113. }
  18114. },
  18115. "required": ["template"],
  18116. "additionalProperties": false
  18117. }
  18118. },
  18119. "skills": {
  18120. "type": "object",
  18121. "properties": {
  18122. "paths": {
  18123. "type": "array",
  18124. "items": {
  18125. "type": "string"
  18126. }
  18127. },
  18128. "urls": {
  18129. "type": "array",
  18130. "items": {
  18131. "type": "string"
  18132. }
  18133. }
  18134. },
  18135. "additionalProperties": false
  18136. },
  18137. "reference": {
  18138. "$ref": "#/components/schemas/ReferenceConfig"
  18139. },
  18140. "watcher": {
  18141. "type": "object",
  18142. "properties": {
  18143. "ignore": {
  18144. "type": "array",
  18145. "items": {
  18146. "type": "string"
  18147. }
  18148. }
  18149. },
  18150. "additionalProperties": false
  18151. },
  18152. "snapshot": {
  18153. "type": "boolean"
  18154. },
  18155. "plugin": {
  18156. "type": "array",
  18157. "items": {
  18158. "anyOf": [
  18159. {
  18160. "type": "string"
  18161. },
  18162. {
  18163. "type": "array",
  18164. "prefixItems": [
  18165. {
  18166. "type": "string"
  18167. },
  18168. {
  18169. "type": "object"
  18170. }
  18171. ],
  18172. "maxItems": 2,
  18173. "minItems": 2
  18174. }
  18175. ]
  18176. }
  18177. },
  18178. "share": {
  18179. "type": "string",
  18180. "enum": ["manual", "auto", "disabled"]
  18181. },
  18182. "autoshare": {
  18183. "type": "boolean"
  18184. },
  18185. "autoupdate": {
  18186. "anyOf": [
  18187. {
  18188. "type": "boolean"
  18189. },
  18190. {
  18191. "type": "string",
  18192. "enum": ["notify"]
  18193. }
  18194. ],
  18195. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  18196. },
  18197. "disabled_providers": {
  18198. "type": "array",
  18199. "items": {
  18200. "type": "string"
  18201. }
  18202. },
  18203. "enabled_providers": {
  18204. "type": "array",
  18205. "items": {
  18206. "type": "string"
  18207. }
  18208. },
  18209. "model": {
  18210. "type": "string"
  18211. },
  18212. "small_model": {
  18213. "type": "string"
  18214. },
  18215. "default_agent": {
  18216. "type": "string"
  18217. },
  18218. "username": {
  18219. "type": "string"
  18220. },
  18221. "mode": {
  18222. "type": "object",
  18223. "properties": {
  18224. "build": {
  18225. "$ref": "#/components/schemas/AgentConfig"
  18226. },
  18227. "plan": {
  18228. "$ref": "#/components/schemas/AgentConfig"
  18229. }
  18230. },
  18231. "additionalProperties": {
  18232. "$ref": "#/components/schemas/AgentConfig"
  18233. }
  18234. },
  18235. "agent": {
  18236. "type": "object",
  18237. "properties": {
  18238. "plan": {
  18239. "$ref": "#/components/schemas/AgentConfig"
  18240. },
  18241. "build": {
  18242. "$ref": "#/components/schemas/AgentConfig"
  18243. },
  18244. "general": {
  18245. "$ref": "#/components/schemas/AgentConfig"
  18246. },
  18247. "explore": {
  18248. "$ref": "#/components/schemas/AgentConfig"
  18249. },
  18250. "title": {
  18251. "$ref": "#/components/schemas/AgentConfig"
  18252. },
  18253. "summary": {
  18254. "$ref": "#/components/schemas/AgentConfig"
  18255. },
  18256. "compaction": {
  18257. "$ref": "#/components/schemas/AgentConfig"
  18258. }
  18259. },
  18260. "additionalProperties": {
  18261. "$ref": "#/components/schemas/AgentConfig"
  18262. }
  18263. },
  18264. "provider": {
  18265. "type": "object",
  18266. "additionalProperties": {
  18267. "$ref": "#/components/schemas/ProviderConfig"
  18268. }
  18269. },
  18270. "mcp": {
  18271. "type": "object",
  18272. "additionalProperties": {
  18273. "anyOf": [
  18274. {
  18275. "$ref": "#/components/schemas/McpLocalConfig"
  18276. },
  18277. {
  18278. "$ref": "#/components/schemas/McpRemoteConfig"
  18279. },
  18280. {
  18281. "type": "object",
  18282. "properties": {
  18283. "enabled": {
  18284. "type": "boolean"
  18285. }
  18286. },
  18287. "required": ["enabled"],
  18288. "additionalProperties": false
  18289. }
  18290. ]
  18291. }
  18292. },
  18293. "formatter": {
  18294. "anyOf": [
  18295. {
  18296. "type": "boolean"
  18297. },
  18298. {
  18299. "type": "object",
  18300. "additionalProperties": {
  18301. "type": "object",
  18302. "properties": {
  18303. "disabled": {
  18304. "type": "boolean"
  18305. },
  18306. "command": {
  18307. "type": "array",
  18308. "items": {
  18309. "type": "string"
  18310. }
  18311. },
  18312. "environment": {
  18313. "type": "object",
  18314. "additionalProperties": {
  18315. "type": "string"
  18316. }
  18317. },
  18318. "extensions": {
  18319. "type": "array",
  18320. "items": {
  18321. "type": "string"
  18322. }
  18323. }
  18324. },
  18325. "additionalProperties": false
  18326. }
  18327. }
  18328. ],
  18329. "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."
  18330. },
  18331. "lsp": {
  18332. "anyOf": [
  18333. {
  18334. "type": "boolean"
  18335. },
  18336. {
  18337. "type": "object",
  18338. "additionalProperties": {
  18339. "anyOf": [
  18340. {
  18341. "type": "object",
  18342. "properties": {
  18343. "disabled": {
  18344. "type": "boolean",
  18345. "enum": [true]
  18346. }
  18347. },
  18348. "required": ["disabled"],
  18349. "additionalProperties": false
  18350. },
  18351. {
  18352. "type": "object",
  18353. "properties": {
  18354. "command": {
  18355. "type": "array",
  18356. "items": {
  18357. "type": "string"
  18358. }
  18359. },
  18360. "extensions": {
  18361. "type": "array",
  18362. "items": {
  18363. "type": "string"
  18364. }
  18365. },
  18366. "disabled": {
  18367. "type": "boolean"
  18368. },
  18369. "env": {
  18370. "type": "object",
  18371. "additionalProperties": {
  18372. "type": "string"
  18373. }
  18374. },
  18375. "initialization": {
  18376. "type": "object"
  18377. }
  18378. },
  18379. "required": ["command"],
  18380. "additionalProperties": false
  18381. }
  18382. ]
  18383. }
  18384. }
  18385. ],
  18386. "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."
  18387. },
  18388. "instructions": {
  18389. "type": "array",
  18390. "items": {
  18391. "type": "string"
  18392. }
  18393. },
  18394. "layout": {
  18395. "$ref": "#/components/schemas/LayoutConfig"
  18396. },
  18397. "permission": {
  18398. "$ref": "#/components/schemas/PermissionConfig"
  18399. },
  18400. "tools": {
  18401. "type": "object",
  18402. "additionalProperties": {
  18403. "type": "boolean"
  18404. }
  18405. },
  18406. "attachment": {
  18407. "$ref": "#/components/schemas/AttachmentConfig"
  18408. },
  18409. "enterprise": {
  18410. "type": "object",
  18411. "properties": {
  18412. "url": {
  18413. "type": "string"
  18414. }
  18415. },
  18416. "additionalProperties": false
  18417. },
  18418. "tool_output": {
  18419. "type": "object",
  18420. "properties": {
  18421. "max_lines": {
  18422. "type": "integer",
  18423. "exclusiveMinimum": 0
  18424. },
  18425. "max_bytes": {
  18426. "type": "integer",
  18427. "exclusiveMinimum": 0
  18428. }
  18429. },
  18430. "additionalProperties": false
  18431. },
  18432. "compaction": {
  18433. "type": "object",
  18434. "properties": {
  18435. "auto": {
  18436. "type": "boolean"
  18437. },
  18438. "prune": {
  18439. "type": "boolean"
  18440. },
  18441. "tail_turns": {
  18442. "type": "integer",
  18443. "minimum": 0
  18444. },
  18445. "preserve_recent_tokens": {
  18446. "type": "integer",
  18447. "minimum": 0
  18448. },
  18449. "reserved": {
  18450. "type": "integer",
  18451. "minimum": 0
  18452. }
  18453. },
  18454. "additionalProperties": false
  18455. },
  18456. "experimental": {
  18457. "type": "object",
  18458. "properties": {
  18459. "disable_paste_summary": {
  18460. "type": "boolean"
  18461. },
  18462. "batch_tool": {
  18463. "type": "boolean"
  18464. },
  18465. "openTelemetry": {
  18466. "type": "boolean"
  18467. },
  18468. "primary_tools": {
  18469. "type": "array",
  18470. "items": {
  18471. "type": "string"
  18472. }
  18473. },
  18474. "continue_loop_on_deny": {
  18475. "type": "boolean"
  18476. },
  18477. "mcp_timeout": {
  18478. "type": "integer",
  18479. "exclusiveMinimum": 0
  18480. },
  18481. "policies": {
  18482. "type": "array",
  18483. "items": {
  18484. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18485. }
  18486. }
  18487. },
  18488. "additionalProperties": false
  18489. }
  18490. },
  18491. "additionalProperties": false
  18492. },
  18493. "Model": {
  18494. "type": "object",
  18495. "properties": {
  18496. "id": {
  18497. "type": "string"
  18498. },
  18499. "providerID": {
  18500. "type": "string"
  18501. },
  18502. "api": {
  18503. "type": "object",
  18504. "properties": {
  18505. "id": {
  18506. "type": "string"
  18507. },
  18508. "url": {
  18509. "type": "string"
  18510. },
  18511. "npm": {
  18512. "type": "string"
  18513. }
  18514. },
  18515. "required": ["id", "url", "npm"],
  18516. "additionalProperties": false
  18517. },
  18518. "name": {
  18519. "type": "string"
  18520. },
  18521. "family": {
  18522. "type": "string"
  18523. },
  18524. "capabilities": {
  18525. "type": "object",
  18526. "properties": {
  18527. "temperature": {
  18528. "type": "boolean"
  18529. },
  18530. "reasoning": {
  18531. "type": "boolean"
  18532. },
  18533. "attachment": {
  18534. "type": "boolean"
  18535. },
  18536. "toolcall": {
  18537. "type": "boolean"
  18538. },
  18539. "input": {
  18540. "type": "object",
  18541. "properties": {
  18542. "text": {
  18543. "type": "boolean"
  18544. },
  18545. "audio": {
  18546. "type": "boolean"
  18547. },
  18548. "image": {
  18549. "type": "boolean"
  18550. },
  18551. "video": {
  18552. "type": "boolean"
  18553. },
  18554. "pdf": {
  18555. "type": "boolean"
  18556. }
  18557. },
  18558. "required": ["text", "audio", "image", "video", "pdf"],
  18559. "additionalProperties": false
  18560. },
  18561. "output": {
  18562. "type": "object",
  18563. "properties": {
  18564. "text": {
  18565. "type": "boolean"
  18566. },
  18567. "audio": {
  18568. "type": "boolean"
  18569. },
  18570. "image": {
  18571. "type": "boolean"
  18572. },
  18573. "video": {
  18574. "type": "boolean"
  18575. },
  18576. "pdf": {
  18577. "type": "boolean"
  18578. }
  18579. },
  18580. "required": ["text", "audio", "image", "video", "pdf"],
  18581. "additionalProperties": false
  18582. },
  18583. "interleaved": {
  18584. "anyOf": [
  18585. {
  18586. "type": "boolean"
  18587. },
  18588. {
  18589. "type": "object",
  18590. "properties": {
  18591. "field": {
  18592. "type": "string",
  18593. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  18594. }
  18595. },
  18596. "required": ["field"],
  18597. "additionalProperties": false
  18598. }
  18599. ]
  18600. }
  18601. },
  18602. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18603. "additionalProperties": false
  18604. },
  18605. "cost": {
  18606. "type": "object",
  18607. "properties": {
  18608. "input": {
  18609. "type": "number"
  18610. },
  18611. "output": {
  18612. "type": "number"
  18613. },
  18614. "cache": {
  18615. "type": "object",
  18616. "properties": {
  18617. "read": {
  18618. "type": "number"
  18619. },
  18620. "write": {
  18621. "type": "number"
  18622. }
  18623. },
  18624. "required": ["read", "write"],
  18625. "additionalProperties": false
  18626. },
  18627. "tiers": {
  18628. "type": "array",
  18629. "items": {
  18630. "type": "object",
  18631. "properties": {
  18632. "input": {
  18633. "type": "number"
  18634. },
  18635. "output": {
  18636. "type": "number"
  18637. },
  18638. "cache": {
  18639. "type": "object",
  18640. "properties": {
  18641. "read": {
  18642. "type": "number"
  18643. },
  18644. "write": {
  18645. "type": "number"
  18646. }
  18647. },
  18648. "required": ["read", "write"],
  18649. "additionalProperties": false
  18650. },
  18651. "tier": {
  18652. "type": "object",
  18653. "properties": {
  18654. "type": {
  18655. "type": "string",
  18656. "enum": ["context"]
  18657. },
  18658. "size": {
  18659. "type": "number"
  18660. }
  18661. },
  18662. "required": ["type", "size"],
  18663. "additionalProperties": false
  18664. }
  18665. },
  18666. "required": ["input", "output", "cache", "tier"],
  18667. "additionalProperties": false
  18668. }
  18669. },
  18670. "experimentalOver200K": {
  18671. "type": "object",
  18672. "properties": {
  18673. "input": {
  18674. "type": "number"
  18675. },
  18676. "output": {
  18677. "type": "number"
  18678. },
  18679. "cache": {
  18680. "type": "object",
  18681. "properties": {
  18682. "read": {
  18683. "type": "number"
  18684. },
  18685. "write": {
  18686. "type": "number"
  18687. }
  18688. },
  18689. "required": ["read", "write"],
  18690. "additionalProperties": false
  18691. }
  18692. },
  18693. "required": ["input", "output", "cache"],
  18694. "additionalProperties": false
  18695. }
  18696. },
  18697. "required": ["input", "output", "cache"],
  18698. "additionalProperties": false
  18699. },
  18700. "limit": {
  18701. "type": "object",
  18702. "properties": {
  18703. "context": {
  18704. "type": "number"
  18705. },
  18706. "input": {
  18707. "type": "number"
  18708. },
  18709. "output": {
  18710. "type": "number"
  18711. }
  18712. },
  18713. "required": ["context", "output"],
  18714. "additionalProperties": false
  18715. },
  18716. "status": {
  18717. "type": "string",
  18718. "enum": ["alpha", "beta", "deprecated", "active"]
  18719. },
  18720. "options": {
  18721. "type": "object"
  18722. },
  18723. "headers": {
  18724. "type": "object",
  18725. "additionalProperties": {
  18726. "type": "string"
  18727. }
  18728. },
  18729. "release_date": {
  18730. "type": "string"
  18731. },
  18732. "variants": {
  18733. "type": "object",
  18734. "additionalProperties": {
  18735. "type": "object"
  18736. }
  18737. }
  18738. },
  18739. "required": [
  18740. "id",
  18741. "providerID",
  18742. "api",
  18743. "name",
  18744. "capabilities",
  18745. "cost",
  18746. "limit",
  18747. "status",
  18748. "options",
  18749. "headers",
  18750. "release_date"
  18751. ],
  18752. "additionalProperties": false
  18753. },
  18754. "Provider": {
  18755. "type": "object",
  18756. "properties": {
  18757. "id": {
  18758. "type": "string"
  18759. },
  18760. "name": {
  18761. "type": "string"
  18762. },
  18763. "source": {
  18764. "type": "string",
  18765. "enum": ["env", "config", "custom", "api"]
  18766. },
  18767. "env": {
  18768. "type": "array",
  18769. "items": {
  18770. "type": "string"
  18771. }
  18772. },
  18773. "key": {
  18774. "type": "string"
  18775. },
  18776. "options": {
  18777. "type": "object"
  18778. },
  18779. "models": {
  18780. "type": "object",
  18781. "additionalProperties": {
  18782. "$ref": "#/components/schemas/Model"
  18783. }
  18784. }
  18785. },
  18786. "required": ["id", "name", "source", "env", "options", "models"],
  18787. "additionalProperties": false
  18788. },
  18789. "ConsoleState": {
  18790. "type": "object",
  18791. "properties": {
  18792. "consoleManagedProviders": {
  18793. "type": "array",
  18794. "items": {
  18795. "type": "string"
  18796. }
  18797. },
  18798. "activeOrgName": {
  18799. "type": "string"
  18800. },
  18801. "switchableOrgCount": {
  18802. "type": "integer",
  18803. "minimum": 0
  18804. }
  18805. },
  18806. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18807. "additionalProperties": false
  18808. },
  18809. "effect_HttpApiError_InternalServerError": {
  18810. "type": "object",
  18811. "properties": {
  18812. "_tag": {
  18813. "type": "string",
  18814. "enum": ["InternalServerError"]
  18815. }
  18816. },
  18817. "required": ["_tag"],
  18818. "additionalProperties": false
  18819. },
  18820. "ToolListItem": {
  18821. "type": "object",
  18822. "properties": {
  18823. "id": {
  18824. "type": "string"
  18825. },
  18826. "description": {
  18827. "type": "string"
  18828. },
  18829. "parameters": {}
  18830. },
  18831. "required": ["id", "description", "parameters"],
  18832. "additionalProperties": false
  18833. },
  18834. "ToolList": {
  18835. "type": "array",
  18836. "items": {
  18837. "$ref": "#/components/schemas/ToolListItem"
  18838. }
  18839. },
  18840. "ToolIDs": {
  18841. "type": "array",
  18842. "items": {
  18843. "type": "string"
  18844. }
  18845. },
  18846. "WorktreeError": {
  18847. "type": "object",
  18848. "properties": {
  18849. "name": {
  18850. "type": "string",
  18851. "enum": [
  18852. "WorktreeNotGitError",
  18853. "WorktreeNameGenerationFailedError",
  18854. "WorktreeCreateFailedError",
  18855. "WorktreeStartCommandFailedError",
  18856. "WorktreeRemoveFailedError",
  18857. "WorktreeResetFailedError",
  18858. "WorktreeListFailedError"
  18859. ]
  18860. },
  18861. "data": {
  18862. "type": "object",
  18863. "properties": {
  18864. "message": {
  18865. "type": "string"
  18866. }
  18867. },
  18868. "required": ["message"],
  18869. "additionalProperties": false
  18870. }
  18871. },
  18872. "required": ["name", "data"],
  18873. "additionalProperties": false
  18874. },
  18875. "WorktreeCreateInput": {
  18876. "type": "object",
  18877. "properties": {
  18878. "name": {
  18879. "type": "string"
  18880. },
  18881. "startCommand": {
  18882. "type": "string",
  18883. "description": "Additional startup script to run after the project's start command"
  18884. }
  18885. },
  18886. "additionalProperties": false
  18887. },
  18888. "Worktree": {
  18889. "type": "object",
  18890. "properties": {
  18891. "name": {
  18892. "type": "string"
  18893. },
  18894. "branch": {
  18895. "type": "string"
  18896. },
  18897. "directory": {
  18898. "type": "string"
  18899. }
  18900. },
  18901. "required": ["name", "directory"],
  18902. "additionalProperties": false
  18903. },
  18904. "WorktreeRemoveInput": {
  18905. "type": "object",
  18906. "properties": {
  18907. "directory": {
  18908. "type": "string"
  18909. }
  18910. },
  18911. "required": ["directory"],
  18912. "additionalProperties": false
  18913. },
  18914. "WorktreeResetInput": {
  18915. "type": "object",
  18916. "properties": {
  18917. "directory": {
  18918. "type": "string"
  18919. }
  18920. },
  18921. "required": ["directory"],
  18922. "additionalProperties": false
  18923. },
  18924. "ProjectSummary": {
  18925. "type": "object",
  18926. "properties": {
  18927. "id": {
  18928. "type": "string"
  18929. },
  18930. "name": {
  18931. "type": "string"
  18932. },
  18933. "worktree": {
  18934. "type": "string"
  18935. }
  18936. },
  18937. "required": ["id", "worktree"],
  18938. "additionalProperties": false
  18939. },
  18940. "GlobalSession": {
  18941. "type": "object",
  18942. "properties": {
  18943. "id": {
  18944. "type": "string",
  18945. "pattern": "^ses"
  18946. },
  18947. "slug": {
  18948. "type": "string"
  18949. },
  18950. "projectID": {
  18951. "type": "string"
  18952. },
  18953. "workspaceID": {
  18954. "type": "string",
  18955. "pattern": "^wrk"
  18956. },
  18957. "directory": {
  18958. "type": "string"
  18959. },
  18960. "path": {
  18961. "type": "string"
  18962. },
  18963. "parentID": {
  18964. "type": "string",
  18965. "pattern": "^ses"
  18966. },
  18967. "summary": {
  18968. "type": "object",
  18969. "properties": {
  18970. "additions": {
  18971. "type": "number"
  18972. },
  18973. "deletions": {
  18974. "type": "number"
  18975. },
  18976. "files": {
  18977. "type": "number"
  18978. },
  18979. "diffs": {
  18980. "type": "array",
  18981. "items": {
  18982. "$ref": "#/components/schemas/SnapshotFileDiff"
  18983. }
  18984. }
  18985. },
  18986. "required": ["additions", "deletions", "files"],
  18987. "additionalProperties": false
  18988. },
  18989. "cost": {
  18990. "type": "number"
  18991. },
  18992. "tokens": {
  18993. "type": "object",
  18994. "properties": {
  18995. "input": {
  18996. "type": "number"
  18997. },
  18998. "output": {
  18999. "type": "number"
  19000. },
  19001. "reasoning": {
  19002. "type": "number"
  19003. },
  19004. "cache": {
  19005. "type": "object",
  19006. "properties": {
  19007. "read": {
  19008. "type": "number"
  19009. },
  19010. "write": {
  19011. "type": "number"
  19012. }
  19013. },
  19014. "required": ["read", "write"],
  19015. "additionalProperties": false
  19016. }
  19017. },
  19018. "required": ["input", "output", "reasoning", "cache"],
  19019. "additionalProperties": false
  19020. },
  19021. "share": {
  19022. "type": "object",
  19023. "properties": {
  19024. "url": {
  19025. "type": "string"
  19026. }
  19027. },
  19028. "required": ["url"],
  19029. "additionalProperties": false
  19030. },
  19031. "title": {
  19032. "type": "string"
  19033. },
  19034. "agent": {
  19035. "type": "string"
  19036. },
  19037. "model": {
  19038. "type": "object",
  19039. "properties": {
  19040. "id": {
  19041. "type": "string"
  19042. },
  19043. "providerID": {
  19044. "type": "string"
  19045. },
  19046. "variant": {
  19047. "type": "string"
  19048. }
  19049. },
  19050. "required": ["id", "providerID"],
  19051. "additionalProperties": false
  19052. },
  19053. "version": {
  19054. "type": "string"
  19055. },
  19056. "metadata": {
  19057. "type": "object"
  19058. },
  19059. "time": {
  19060. "type": "object",
  19061. "properties": {
  19062. "created": {
  19063. "type": "integer",
  19064. "minimum": 0
  19065. },
  19066. "updated": {
  19067. "type": "integer",
  19068. "minimum": 0
  19069. },
  19070. "compacting": {
  19071. "type": "integer",
  19072. "minimum": 0
  19073. },
  19074. "archived": {
  19075. "type": "number"
  19076. }
  19077. },
  19078. "required": ["created", "updated"],
  19079. "additionalProperties": false
  19080. },
  19081. "permission": {
  19082. "$ref": "#/components/schemas/PermissionRuleset"
  19083. },
  19084. "revert": {
  19085. "type": "object",
  19086. "properties": {
  19087. "messageID": {
  19088. "type": "string",
  19089. "pattern": "^msg"
  19090. },
  19091. "partID": {
  19092. "type": "string",
  19093. "pattern": "^prt"
  19094. },
  19095. "snapshot": {
  19096. "type": "string"
  19097. },
  19098. "diff": {
  19099. "type": "string"
  19100. }
  19101. },
  19102. "required": ["messageID"],
  19103. "additionalProperties": false
  19104. },
  19105. "project": {
  19106. "anyOf": [
  19107. {
  19108. "$ref": "#/components/schemas/ProjectSummary"
  19109. },
  19110. {
  19111. "type": "null"
  19112. }
  19113. ]
  19114. }
  19115. },
  19116. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  19117. "additionalProperties": false
  19118. },
  19119. "McpResource": {
  19120. "type": "object",
  19121. "properties": {
  19122. "name": {
  19123. "type": "string"
  19124. },
  19125. "uri": {
  19126. "type": "string"
  19127. },
  19128. "description": {
  19129. "type": "string"
  19130. },
  19131. "mimeType": {
  19132. "type": "string"
  19133. },
  19134. "client": {
  19135. "type": "string"
  19136. }
  19137. },
  19138. "required": ["name", "uri", "client"],
  19139. "additionalProperties": false
  19140. },
  19141. "Symbol": {
  19142. "type": "object",
  19143. "properties": {
  19144. "name": {
  19145. "type": "string"
  19146. },
  19147. "kind": {
  19148. "type": "integer",
  19149. "minimum": 0
  19150. },
  19151. "location": {
  19152. "type": "object",
  19153. "properties": {
  19154. "uri": {
  19155. "type": "string"
  19156. },
  19157. "range": {
  19158. "$ref": "#/components/schemas/Range"
  19159. }
  19160. },
  19161. "required": ["uri", "range"],
  19162. "additionalProperties": false
  19163. }
  19164. },
  19165. "required": ["name", "kind", "location"],
  19166. "additionalProperties": false
  19167. },
  19168. "FileNode": {
  19169. "type": "object",
  19170. "properties": {
  19171. "name": {
  19172. "type": "string"
  19173. },
  19174. "path": {
  19175. "type": "string"
  19176. },
  19177. "absolute": {
  19178. "type": "string"
  19179. },
  19180. "type": {
  19181. "type": "string",
  19182. "enum": ["file", "directory"]
  19183. },
  19184. "ignored": {
  19185. "type": "boolean"
  19186. }
  19187. },
  19188. "required": ["name", "path", "absolute", "type", "ignored"],
  19189. "additionalProperties": false
  19190. },
  19191. "FileContent": {
  19192. "type": "object",
  19193. "properties": {
  19194. "type": {
  19195. "type": "string",
  19196. "enum": ["text", "binary"]
  19197. },
  19198. "content": {
  19199. "type": "string"
  19200. },
  19201. "diff": {
  19202. "type": "string"
  19203. },
  19204. "patch": {
  19205. "type": "object",
  19206. "properties": {
  19207. "oldFileName": {
  19208. "type": "string"
  19209. },
  19210. "newFileName": {
  19211. "type": "string"
  19212. },
  19213. "oldHeader": {
  19214. "type": "string"
  19215. },
  19216. "newHeader": {
  19217. "type": "string"
  19218. },
  19219. "hunks": {
  19220. "type": "array",
  19221. "items": {
  19222. "type": "object",
  19223. "properties": {
  19224. "oldStart": {
  19225. "type": "integer",
  19226. "minimum": 0
  19227. },
  19228. "oldLines": {
  19229. "type": "integer",
  19230. "minimum": 0
  19231. },
  19232. "newStart": {
  19233. "type": "integer",
  19234. "minimum": 0
  19235. },
  19236. "newLines": {
  19237. "type": "integer",
  19238. "minimum": 0
  19239. },
  19240. "lines": {
  19241. "type": "array",
  19242. "items": {
  19243. "type": "string"
  19244. }
  19245. }
  19246. },
  19247. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  19248. "additionalProperties": false
  19249. }
  19250. },
  19251. "index": {
  19252. "type": "string"
  19253. }
  19254. },
  19255. "required": ["oldFileName", "newFileName", "hunks"],
  19256. "additionalProperties": false
  19257. },
  19258. "encoding": {
  19259. "type": "string",
  19260. "enum": ["base64"]
  19261. },
  19262. "mimeType": {
  19263. "type": "string"
  19264. }
  19265. },
  19266. "required": ["type", "content"],
  19267. "additionalProperties": false
  19268. },
  19269. "File": {
  19270. "type": "object",
  19271. "properties": {
  19272. "path": {
  19273. "type": "string"
  19274. },
  19275. "added": {
  19276. "type": "integer",
  19277. "minimum": 0
  19278. },
  19279. "removed": {
  19280. "type": "integer",
  19281. "minimum": 0
  19282. },
  19283. "status": {
  19284. "type": "string",
  19285. "enum": ["added", "deleted", "modified"]
  19286. }
  19287. },
  19288. "required": ["path", "added", "removed", "status"],
  19289. "additionalProperties": false
  19290. },
  19291. "Path": {
  19292. "type": "object",
  19293. "properties": {
  19294. "home": {
  19295. "type": "string"
  19296. },
  19297. "state": {
  19298. "type": "string"
  19299. },
  19300. "config": {
  19301. "type": "string"
  19302. },
  19303. "worktree": {
  19304. "type": "string"
  19305. },
  19306. "directory": {
  19307. "type": "string"
  19308. }
  19309. },
  19310. "required": ["home", "state", "config", "worktree", "directory"],
  19311. "additionalProperties": false
  19312. },
  19313. "VcsInfo": {
  19314. "type": "object",
  19315. "properties": {
  19316. "branch": {
  19317. "type": "string"
  19318. },
  19319. "default_branch": {
  19320. "type": "string"
  19321. }
  19322. },
  19323. "additionalProperties": false
  19324. },
  19325. "VcsFileStatus": {
  19326. "type": "object",
  19327. "properties": {
  19328. "file": {
  19329. "type": "string"
  19330. },
  19331. "additions": {
  19332. "type": "number"
  19333. },
  19334. "deletions": {
  19335. "type": "number"
  19336. },
  19337. "status": {
  19338. "type": "string",
  19339. "enum": ["added", "deleted", "modified"]
  19340. }
  19341. },
  19342. "required": ["file", "additions", "deletions", "status"],
  19343. "additionalProperties": false
  19344. },
  19345. "VcsFileDiff": {
  19346. "type": "object",
  19347. "properties": {
  19348. "file": {
  19349. "type": "string"
  19350. },
  19351. "patch": {
  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"],
  19366. "additionalProperties": false
  19367. },
  19368. "VcsApplyError": {
  19369. "type": "object",
  19370. "properties": {
  19371. "name": {
  19372. "type": "string",
  19373. "enum": ["VcsApplyError"]
  19374. },
  19375. "data": {
  19376. "type": "object",
  19377. "properties": {
  19378. "message": {
  19379. "type": "string"
  19380. },
  19381. "reason": {
  19382. "type": "string",
  19383. "enum": ["non-git", "not-clean"]
  19384. }
  19385. },
  19386. "required": ["message", "reason"],
  19387. "additionalProperties": false
  19388. }
  19389. },
  19390. "required": ["name", "data"],
  19391. "additionalProperties": false
  19392. },
  19393. "Command": {
  19394. "type": "object",
  19395. "properties": {
  19396. "name": {
  19397. "type": "string"
  19398. },
  19399. "description": {
  19400. "type": "string"
  19401. },
  19402. "agent": {
  19403. "type": "string"
  19404. },
  19405. "model": {
  19406. "type": "string"
  19407. },
  19408. "source": {
  19409. "type": "string",
  19410. "enum": ["command", "mcp", "skill"]
  19411. },
  19412. "template": {
  19413. "type": "string"
  19414. },
  19415. "subtask": {
  19416. "type": "boolean"
  19417. },
  19418. "hints": {
  19419. "type": "array",
  19420. "items": {
  19421. "type": "string"
  19422. }
  19423. }
  19424. },
  19425. "required": ["name", "template", "hints"],
  19426. "additionalProperties": false
  19427. },
  19428. "Agent": {
  19429. "type": "object",
  19430. "properties": {
  19431. "name": {
  19432. "type": "string"
  19433. },
  19434. "description": {
  19435. "type": "string"
  19436. },
  19437. "mode": {
  19438. "type": "string",
  19439. "enum": ["subagent", "primary", "all"]
  19440. },
  19441. "native": {
  19442. "type": "boolean"
  19443. },
  19444. "hidden": {
  19445. "type": "boolean"
  19446. },
  19447. "topP": {
  19448. "type": "number"
  19449. },
  19450. "temperature": {
  19451. "type": "number"
  19452. },
  19453. "color": {
  19454. "type": "string"
  19455. },
  19456. "permission": {
  19457. "$ref": "#/components/schemas/PermissionRuleset"
  19458. },
  19459. "model": {
  19460. "type": "object",
  19461. "properties": {
  19462. "modelID": {
  19463. "type": "string"
  19464. },
  19465. "providerID": {
  19466. "type": "string"
  19467. }
  19468. },
  19469. "required": ["modelID", "providerID"],
  19470. "additionalProperties": false
  19471. },
  19472. "variant": {
  19473. "type": "string"
  19474. },
  19475. "prompt": {
  19476. "type": "string"
  19477. },
  19478. "options": {
  19479. "type": "object"
  19480. },
  19481. "steps": {
  19482. "type": "number"
  19483. }
  19484. },
  19485. "required": ["name", "mode", "permission", "options"],
  19486. "additionalProperties": false
  19487. },
  19488. "LSPStatus": {
  19489. "type": "object",
  19490. "properties": {
  19491. "id": {
  19492. "type": "string"
  19493. },
  19494. "name": {
  19495. "type": "string"
  19496. },
  19497. "root": {
  19498. "type": "string"
  19499. },
  19500. "status": {
  19501. "type": "string",
  19502. "enum": ["connected", "error"]
  19503. }
  19504. },
  19505. "required": ["id", "name", "root", "status"],
  19506. "additionalProperties": false
  19507. },
  19508. "FormatterStatus": {
  19509. "type": "object",
  19510. "properties": {
  19511. "name": {
  19512. "type": "string"
  19513. },
  19514. "extensions": {
  19515. "type": "array",
  19516. "items": {
  19517. "type": "string"
  19518. }
  19519. },
  19520. "enabled": {
  19521. "type": "boolean"
  19522. }
  19523. },
  19524. "required": ["name", "extensions", "enabled"],
  19525. "additionalProperties": false
  19526. },
  19527. "MCPStatusConnected": {
  19528. "type": "object",
  19529. "properties": {
  19530. "status": {
  19531. "type": "string",
  19532. "enum": ["connected"]
  19533. }
  19534. },
  19535. "required": ["status"],
  19536. "additionalProperties": false
  19537. },
  19538. "MCPStatusDisabled": {
  19539. "type": "object",
  19540. "properties": {
  19541. "status": {
  19542. "type": "string",
  19543. "enum": ["disabled"]
  19544. }
  19545. },
  19546. "required": ["status"],
  19547. "additionalProperties": false
  19548. },
  19549. "MCPStatusFailed": {
  19550. "type": "object",
  19551. "properties": {
  19552. "status": {
  19553. "type": "string",
  19554. "enum": ["failed"]
  19555. },
  19556. "error": {
  19557. "type": "string"
  19558. }
  19559. },
  19560. "required": ["status", "error"],
  19561. "additionalProperties": false
  19562. },
  19563. "MCPStatusNeedsAuth": {
  19564. "type": "object",
  19565. "properties": {
  19566. "status": {
  19567. "type": "string",
  19568. "enum": ["needs_auth"]
  19569. }
  19570. },
  19571. "required": ["status"],
  19572. "additionalProperties": false
  19573. },
  19574. "MCPStatusNeedsClientRegistration": {
  19575. "type": "object",
  19576. "properties": {
  19577. "status": {
  19578. "type": "string",
  19579. "enum": ["needs_client_registration"]
  19580. },
  19581. "error": {
  19582. "type": "string"
  19583. }
  19584. },
  19585. "required": ["status", "error"],
  19586. "additionalProperties": false
  19587. },
  19588. "MCPStatus": {
  19589. "anyOf": [
  19590. {
  19591. "$ref": "#/components/schemas/MCPStatusConnected"
  19592. },
  19593. {
  19594. "$ref": "#/components/schemas/MCPStatusDisabled"
  19595. },
  19596. {
  19597. "$ref": "#/components/schemas/MCPStatusFailed"
  19598. },
  19599. {
  19600. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19601. },
  19602. {
  19603. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19604. }
  19605. ]
  19606. },
  19607. "McpUnsupportedOAuthError": {
  19608. "type": "object",
  19609. "properties": {
  19610. "error": {
  19611. "type": "string"
  19612. }
  19613. },
  19614. "required": ["error"],
  19615. "additionalProperties": false
  19616. },
  19617. "McpServerNotFoundError": {
  19618. "type": "object",
  19619. "properties": {
  19620. "_tag": {
  19621. "type": "string",
  19622. "enum": ["McpServerNotFoundError"]
  19623. },
  19624. "name": {
  19625. "type": "string"
  19626. },
  19627. "message": {
  19628. "type": "string"
  19629. }
  19630. },
  19631. "required": ["_tag", "name", "message"],
  19632. "additionalProperties": false
  19633. },
  19634. "Project": {
  19635. "type": "object",
  19636. "properties": {
  19637. "id": {
  19638. "type": "string"
  19639. },
  19640. "worktree": {
  19641. "type": "string"
  19642. },
  19643. "vcs": {
  19644. "type": "string",
  19645. "enum": ["git"]
  19646. },
  19647. "name": {
  19648. "type": "string"
  19649. },
  19650. "icon": {
  19651. "type": "object",
  19652. "properties": {
  19653. "url": {
  19654. "type": "string"
  19655. },
  19656. "override": {
  19657. "type": "string"
  19658. },
  19659. "color": {
  19660. "type": "string"
  19661. }
  19662. },
  19663. "additionalProperties": false
  19664. },
  19665. "commands": {
  19666. "type": "object",
  19667. "properties": {
  19668. "start": {
  19669. "type": "string",
  19670. "description": "Startup script to run when creating a new workspace (worktree)"
  19671. }
  19672. },
  19673. "additionalProperties": false
  19674. },
  19675. "time": {
  19676. "type": "object",
  19677. "properties": {
  19678. "created": {
  19679. "type": "integer",
  19680. "minimum": 0
  19681. },
  19682. "updated": {
  19683. "type": "integer",
  19684. "minimum": 0
  19685. },
  19686. "initialized": {
  19687. "type": "integer",
  19688. "minimum": 0
  19689. }
  19690. },
  19691. "required": ["created", "updated"],
  19692. "additionalProperties": false
  19693. },
  19694. "sandboxes": {
  19695. "type": "array",
  19696. "items": {
  19697. "type": "string"
  19698. }
  19699. }
  19700. },
  19701. "required": ["id", "worktree", "time", "sandboxes"],
  19702. "additionalProperties": false
  19703. },
  19704. "ProjectNotFoundError": {
  19705. "type": "object",
  19706. "properties": {
  19707. "_tag": {
  19708. "type": "string",
  19709. "enum": ["ProjectNotFoundError"]
  19710. },
  19711. "projectID": {
  19712. "type": "string"
  19713. },
  19714. "message": {
  19715. "type": "string"
  19716. }
  19717. },
  19718. "required": ["_tag", "projectID", "message"],
  19719. "additionalProperties": false
  19720. },
  19721. "ProjectCopyError": {
  19722. "type": "object",
  19723. "properties": {
  19724. "name": {
  19725. "type": "string",
  19726. "enum": ["ProjectCopyError"]
  19727. },
  19728. "data": {
  19729. "type": "object",
  19730. "properties": {
  19731. "message": {
  19732. "type": "string"
  19733. },
  19734. "forceRequired": {
  19735. "type": "boolean"
  19736. }
  19737. },
  19738. "required": ["message"],
  19739. "additionalProperties": false
  19740. }
  19741. },
  19742. "required": ["name", "data"],
  19743. "additionalProperties": false
  19744. },
  19745. "PtyNotFoundError": {
  19746. "type": "object",
  19747. "properties": {
  19748. "_tag": {
  19749. "type": "string",
  19750. "enum": ["PtyNotFoundError"]
  19751. },
  19752. "ptyID": {
  19753. "type": "string"
  19754. },
  19755. "message": {
  19756. "type": "string"
  19757. }
  19758. },
  19759. "required": ["_tag", "ptyID", "message"],
  19760. "additionalProperties": false
  19761. },
  19762. "PtyForbiddenError": {
  19763. "type": "object",
  19764. "properties": {
  19765. "_tag": {
  19766. "type": "string",
  19767. "enum": ["PtyForbiddenError"]
  19768. },
  19769. "message": {
  19770. "type": "string"
  19771. }
  19772. },
  19773. "required": ["_tag", "message"],
  19774. "additionalProperties": false
  19775. },
  19776. "QuestionRequest": {
  19777. "type": "object",
  19778. "properties": {
  19779. "id": {
  19780. "type": "string",
  19781. "pattern": "^que"
  19782. },
  19783. "sessionID": {
  19784. "type": "string",
  19785. "pattern": "^ses"
  19786. },
  19787. "questions": {
  19788. "type": "array",
  19789. "items": {
  19790. "$ref": "#/components/schemas/QuestionInfo"
  19791. },
  19792. "description": "Questions to ask"
  19793. },
  19794. "tool": {
  19795. "$ref": "#/components/schemas/QuestionTool"
  19796. }
  19797. },
  19798. "required": ["id", "sessionID", "questions"],
  19799. "additionalProperties": false
  19800. },
  19801. "QuestionNotFoundError": {
  19802. "type": "object",
  19803. "properties": {
  19804. "_tag": {
  19805. "type": "string",
  19806. "enum": ["QuestionNotFoundError"]
  19807. },
  19808. "requestID": {
  19809. "type": "string"
  19810. },
  19811. "message": {
  19812. "type": "string"
  19813. }
  19814. },
  19815. "required": ["_tag", "requestID", "message"],
  19816. "additionalProperties": false
  19817. },
  19818. "PermissionRequest": {
  19819. "type": "object",
  19820. "properties": {
  19821. "id": {
  19822. "type": "string",
  19823. "pattern": "^per"
  19824. },
  19825. "sessionID": {
  19826. "type": "string",
  19827. "pattern": "^ses"
  19828. },
  19829. "permission": {
  19830. "type": "string"
  19831. },
  19832. "patterns": {
  19833. "type": "array",
  19834. "items": {
  19835. "type": "string"
  19836. }
  19837. },
  19838. "metadata": {
  19839. "type": "object"
  19840. },
  19841. "always": {
  19842. "type": "array",
  19843. "items": {
  19844. "type": "string"
  19845. }
  19846. },
  19847. "tool": {
  19848. "type": "object",
  19849. "properties": {
  19850. "messageID": {
  19851. "type": "string"
  19852. },
  19853. "callID": {
  19854. "type": "string"
  19855. }
  19856. },
  19857. "required": ["messageID", "callID"],
  19858. "additionalProperties": false
  19859. }
  19860. },
  19861. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19862. "additionalProperties": false
  19863. },
  19864. "PermissionNotFoundError": {
  19865. "type": "object",
  19866. "properties": {
  19867. "_tag": {
  19868. "type": "string",
  19869. "enum": ["PermissionNotFoundError"]
  19870. },
  19871. "requestID": {
  19872. "type": "string"
  19873. },
  19874. "message": {
  19875. "type": "string"
  19876. }
  19877. },
  19878. "required": ["_tag", "requestID", "message"],
  19879. "additionalProperties": false
  19880. },
  19881. "ProviderAuthMethod": {
  19882. "type": "object",
  19883. "properties": {
  19884. "type": {
  19885. "type": "string",
  19886. "enum": ["oauth", "api"]
  19887. },
  19888. "label": {
  19889. "type": "string"
  19890. },
  19891. "prompts": {
  19892. "type": "array",
  19893. "items": {
  19894. "anyOf": [
  19895. {
  19896. "type": "object",
  19897. "properties": {
  19898. "type": {
  19899. "type": "string",
  19900. "enum": ["text"]
  19901. },
  19902. "key": {
  19903. "type": "string"
  19904. },
  19905. "message": {
  19906. "type": "string"
  19907. },
  19908. "placeholder": {
  19909. "type": "string"
  19910. },
  19911. "when": {
  19912. "type": "object",
  19913. "properties": {
  19914. "key": {
  19915. "type": "string"
  19916. },
  19917. "op": {
  19918. "type": "string",
  19919. "enum": ["eq", "neq"]
  19920. },
  19921. "value": {
  19922. "type": "string"
  19923. }
  19924. },
  19925. "required": ["key", "op", "value"],
  19926. "additionalProperties": false
  19927. }
  19928. },
  19929. "required": ["type", "key", "message"],
  19930. "additionalProperties": false
  19931. },
  19932. {
  19933. "type": "object",
  19934. "properties": {
  19935. "type": {
  19936. "type": "string",
  19937. "enum": ["select"]
  19938. },
  19939. "key": {
  19940. "type": "string"
  19941. },
  19942. "message": {
  19943. "type": "string"
  19944. },
  19945. "options": {
  19946. "type": "array",
  19947. "items": {
  19948. "type": "object",
  19949. "properties": {
  19950. "label": {
  19951. "type": "string"
  19952. },
  19953. "value": {
  19954. "type": "string"
  19955. },
  19956. "hint": {
  19957. "type": "string"
  19958. }
  19959. },
  19960. "required": ["label", "value"],
  19961. "additionalProperties": false
  19962. }
  19963. },
  19964. "when": {
  19965. "type": "object",
  19966. "properties": {
  19967. "key": {
  19968. "type": "string"
  19969. },
  19970. "op": {
  19971. "type": "string",
  19972. "enum": ["eq", "neq"]
  19973. },
  19974. "value": {
  19975. "type": "string"
  19976. }
  19977. },
  19978. "required": ["key", "op", "value"],
  19979. "additionalProperties": false
  19980. }
  19981. },
  19982. "required": ["type", "key", "message", "options"],
  19983. "additionalProperties": false
  19984. }
  19985. ]
  19986. }
  19987. }
  19988. },
  19989. "required": ["type", "label"],
  19990. "additionalProperties": false
  19991. },
  19992. "ProviderAuthAuthorization": {
  19993. "type": "object",
  19994. "properties": {
  19995. "url": {
  19996. "type": "string"
  19997. },
  19998. "method": {
  19999. "type": "string",
  20000. "enum": ["auto", "code"]
  20001. },
  20002. "instructions": {
  20003. "type": "string"
  20004. }
  20005. },
  20006. "required": ["url", "method", "instructions"],
  20007. "additionalProperties": false
  20008. },
  20009. "ProviderAuthError1": {
  20010. "type": "object",
  20011. "properties": {
  20012. "name": {
  20013. "type": "string",
  20014. "enum": [
  20015. "BadRequest",
  20016. "ProviderAuthOauthMissing",
  20017. "ProviderAuthOauthCodeMissing",
  20018. "ProviderAuthOauthCallbackFailed",
  20019. "ProviderAuthValidationFailed"
  20020. ]
  20021. },
  20022. "data": {
  20023. "type": "object",
  20024. "properties": {
  20025. "providerID": {
  20026. "type": "string"
  20027. },
  20028. "field": {
  20029. "type": "string"
  20030. },
  20031. "message": {
  20032. "type": "string"
  20033. },
  20034. "kind": {
  20035. "type": "string"
  20036. }
  20037. },
  20038. "additionalProperties": false
  20039. }
  20040. },
  20041. "required": ["name", "data"],
  20042. "additionalProperties": false
  20043. },
  20044. "ReferenceDescriptor": {
  20045. "anyOf": [
  20046. {
  20047. "type": "object",
  20048. "properties": {
  20049. "name": {
  20050. "type": "string"
  20051. },
  20052. "kind": {
  20053. "type": "string",
  20054. "enum": ["local"]
  20055. },
  20056. "path": {
  20057. "type": "string"
  20058. }
  20059. },
  20060. "required": ["name", "kind", "path"],
  20061. "additionalProperties": false
  20062. },
  20063. {
  20064. "type": "object",
  20065. "properties": {
  20066. "name": {
  20067. "type": "string"
  20068. },
  20069. "kind": {
  20070. "type": "string",
  20071. "enum": ["git"]
  20072. },
  20073. "repository": {
  20074. "type": "string"
  20075. },
  20076. "path": {
  20077. "type": "string"
  20078. },
  20079. "branch": {
  20080. "type": "string"
  20081. }
  20082. },
  20083. "required": ["name", "kind", "repository", "path"],
  20084. "additionalProperties": false
  20085. },
  20086. {
  20087. "type": "object",
  20088. "properties": {
  20089. "name": {
  20090. "type": "string"
  20091. },
  20092. "kind": {
  20093. "type": "string",
  20094. "enum": ["invalid"]
  20095. },
  20096. "repository": {
  20097. "type": "string"
  20098. },
  20099. "message": {
  20100. "type": "string"
  20101. }
  20102. },
  20103. "required": ["name", "kind", "message"],
  20104. "additionalProperties": false
  20105. }
  20106. ]
  20107. },
  20108. "NotFoundError": {
  20109. "type": "object",
  20110. "required": ["name", "data"],
  20111. "properties": {
  20112. "name": {
  20113. "type": "string",
  20114. "enum": ["NotFoundError"]
  20115. },
  20116. "data": {
  20117. "type": "object",
  20118. "required": ["message"],
  20119. "properties": {
  20120. "message": {
  20121. "type": "string"
  20122. }
  20123. }
  20124. }
  20125. }
  20126. },
  20127. "TextPartInput": {
  20128. "type": "object",
  20129. "properties": {
  20130. "id": {
  20131. "type": "string",
  20132. "pattern": "^prt"
  20133. },
  20134. "type": {
  20135. "type": "string",
  20136. "enum": ["text"]
  20137. },
  20138. "text": {
  20139. "type": "string"
  20140. },
  20141. "synthetic": {
  20142. "type": "boolean"
  20143. },
  20144. "ignored": {
  20145. "type": "boolean"
  20146. },
  20147. "time": {
  20148. "type": "object",
  20149. "properties": {
  20150. "start": {
  20151. "type": "integer",
  20152. "minimum": 0
  20153. },
  20154. "end": {
  20155. "type": "integer",
  20156. "minimum": 0
  20157. }
  20158. },
  20159. "required": ["start"],
  20160. "additionalProperties": false
  20161. },
  20162. "metadata": {
  20163. "type": "object"
  20164. }
  20165. },
  20166. "required": ["type", "text"],
  20167. "additionalProperties": false
  20168. },
  20169. "FilePartInput": {
  20170. "type": "object",
  20171. "properties": {
  20172. "id": {
  20173. "type": "string",
  20174. "pattern": "^prt"
  20175. },
  20176. "type": {
  20177. "type": "string",
  20178. "enum": ["file"]
  20179. },
  20180. "mime": {
  20181. "type": "string"
  20182. },
  20183. "filename": {
  20184. "type": "string"
  20185. },
  20186. "url": {
  20187. "type": "string"
  20188. },
  20189. "source": {
  20190. "$ref": "#/components/schemas/FilePartSource"
  20191. }
  20192. },
  20193. "required": ["type", "mime", "url"],
  20194. "additionalProperties": false
  20195. },
  20196. "AgentPartInput": {
  20197. "type": "object",
  20198. "properties": {
  20199. "id": {
  20200. "type": "string",
  20201. "pattern": "^prt"
  20202. },
  20203. "type": {
  20204. "type": "string",
  20205. "enum": ["agent"]
  20206. },
  20207. "name": {
  20208. "type": "string"
  20209. },
  20210. "source": {
  20211. "type": "object",
  20212. "properties": {
  20213. "value": {
  20214. "type": "string"
  20215. },
  20216. "start": {
  20217. "type": "integer",
  20218. "minimum": 0
  20219. },
  20220. "end": {
  20221. "type": "integer",
  20222. "minimum": 0
  20223. }
  20224. },
  20225. "required": ["value", "start", "end"],
  20226. "additionalProperties": false
  20227. }
  20228. },
  20229. "required": ["type", "name"],
  20230. "additionalProperties": false
  20231. },
  20232. "SubtaskPartInput": {
  20233. "type": "object",
  20234. "properties": {
  20235. "id": {
  20236. "type": "string",
  20237. "pattern": "^prt"
  20238. },
  20239. "type": {
  20240. "type": "string",
  20241. "enum": ["subtask"]
  20242. },
  20243. "prompt": {
  20244. "type": "string"
  20245. },
  20246. "description": {
  20247. "type": "string"
  20248. },
  20249. "agent": {
  20250. "type": "string"
  20251. },
  20252. "model": {
  20253. "type": "object",
  20254. "properties": {
  20255. "providerID": {
  20256. "type": "string"
  20257. },
  20258. "modelID": {
  20259. "type": "string"
  20260. }
  20261. },
  20262. "required": ["providerID", "modelID"],
  20263. "additionalProperties": false
  20264. },
  20265. "command": {
  20266. "type": "string"
  20267. }
  20268. },
  20269. "required": ["type", "prompt", "description", "agent"],
  20270. "additionalProperties": false
  20271. },
  20272. "SessionBusyError": {
  20273. "type": "object",
  20274. "properties": {
  20275. "_tag": {
  20276. "type": "string",
  20277. "enum": ["SessionBusyError"]
  20278. },
  20279. "sessionID": {
  20280. "type": "string"
  20281. },
  20282. "message": {
  20283. "type": "string"
  20284. }
  20285. },
  20286. "required": ["_tag", "sessionID", "message"],
  20287. "additionalProperties": false
  20288. },
  20289. "EventTuiPromptAppend": {
  20290. "type": "object",
  20291. "properties": {
  20292. "type": {
  20293. "type": "string",
  20294. "enum": ["tui.prompt.append"]
  20295. },
  20296. "properties": {
  20297. "type": "object",
  20298. "properties": {
  20299. "text": {
  20300. "type": "string"
  20301. }
  20302. },
  20303. "required": ["text"],
  20304. "additionalProperties": false
  20305. }
  20306. },
  20307. "required": ["type", "properties"],
  20308. "additionalProperties": false
  20309. },
  20310. "EventTuiCommandExecute": {
  20311. "type": "object",
  20312. "properties": {
  20313. "type": {
  20314. "type": "string",
  20315. "enum": ["tui.command.execute"]
  20316. },
  20317. "properties": {
  20318. "type": "object",
  20319. "properties": {
  20320. "command": {
  20321. "anyOf": [
  20322. {
  20323. "type": "string",
  20324. "enum": [
  20325. "session.list",
  20326. "session.new",
  20327. "session.share",
  20328. "session.interrupt",
  20329. "session.compact",
  20330. "session.page.up",
  20331. "session.page.down",
  20332. "session.line.up",
  20333. "session.line.down",
  20334. "session.half.page.up",
  20335. "session.half.page.down",
  20336. "session.first",
  20337. "session.last",
  20338. "prompt.clear",
  20339. "prompt.submit",
  20340. "agent.cycle"
  20341. ]
  20342. },
  20343. {
  20344. "type": "string"
  20345. }
  20346. ]
  20347. }
  20348. },
  20349. "required": ["command"],
  20350. "additionalProperties": false
  20351. }
  20352. },
  20353. "required": ["type", "properties"],
  20354. "additionalProperties": false
  20355. },
  20356. "EventTuiToastShow": {
  20357. "type": "object",
  20358. "properties": {
  20359. "type": {
  20360. "type": "string",
  20361. "enum": ["tui.toast.show"]
  20362. },
  20363. "properties": {
  20364. "type": "object",
  20365. "properties": {
  20366. "title": {
  20367. "type": "string"
  20368. },
  20369. "message": {
  20370. "type": "string"
  20371. },
  20372. "variant": {
  20373. "type": "string",
  20374. "enum": ["info", "success", "warning", "error"]
  20375. },
  20376. "duration": {
  20377. "type": "integer",
  20378. "exclusiveMinimum": 0
  20379. }
  20380. },
  20381. "required": ["message", "variant"],
  20382. "additionalProperties": false
  20383. }
  20384. },
  20385. "required": ["type", "properties"],
  20386. "additionalProperties": false
  20387. },
  20388. "EventTuiSessionSelect": {
  20389. "type": "object",
  20390. "properties": {
  20391. "type": {
  20392. "type": "string",
  20393. "enum": ["tui.session.select"]
  20394. },
  20395. "properties": {
  20396. "type": "object",
  20397. "properties": {
  20398. "sessionID": {
  20399. "type": "string",
  20400. "pattern": "^ses",
  20401. "description": "Session ID to navigate to"
  20402. }
  20403. },
  20404. "required": ["sessionID"],
  20405. "additionalProperties": false
  20406. }
  20407. },
  20408. "required": ["type", "properties"],
  20409. "additionalProperties": false
  20410. },
  20411. "Workspace": {
  20412. "type": "object",
  20413. "properties": {
  20414. "id": {
  20415. "type": "string",
  20416. "pattern": "^wrk"
  20417. },
  20418. "type": {
  20419. "type": "string"
  20420. },
  20421. "name": {
  20422. "type": "string"
  20423. },
  20424. "branch": {
  20425. "anyOf": [
  20426. {
  20427. "type": "string"
  20428. },
  20429. {
  20430. "type": "null"
  20431. }
  20432. ]
  20433. },
  20434. "directory": {
  20435. "anyOf": [
  20436. {
  20437. "type": "string"
  20438. },
  20439. {
  20440. "type": "null"
  20441. }
  20442. ]
  20443. },
  20444. "extra": {
  20445. "anyOf": [
  20446. {},
  20447. {
  20448. "type": "null"
  20449. }
  20450. ]
  20451. },
  20452. "projectID": {
  20453. "type": "string"
  20454. },
  20455. "timeUsed": {
  20456. "anyOf": [
  20457. {
  20458. "type": "number"
  20459. },
  20460. {
  20461. "type": "string",
  20462. "enum": ["NaN"]
  20463. },
  20464. {
  20465. "type": "string",
  20466. "enum": ["Infinity"]
  20467. },
  20468. {
  20469. "type": "string",
  20470. "enum": ["-Infinity"]
  20471. },
  20472. {
  20473. "type": "string",
  20474. "enum": ["Infinity", "-Infinity", "NaN"]
  20475. }
  20476. ]
  20477. }
  20478. },
  20479. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20480. "additionalProperties": false
  20481. },
  20482. "WorkspaceCreateError": {
  20483. "type": "object",
  20484. "properties": {
  20485. "name": {
  20486. "type": "string",
  20487. "enum": ["WorkspaceCreateError"]
  20488. },
  20489. "data": {
  20490. "type": "object",
  20491. "properties": {
  20492. "message": {
  20493. "type": "string"
  20494. }
  20495. },
  20496. "required": ["message"],
  20497. "additionalProperties": false
  20498. }
  20499. },
  20500. "required": ["name", "data"],
  20501. "additionalProperties": false
  20502. },
  20503. "WorkspaceWarpError": {
  20504. "type": "object",
  20505. "properties": {
  20506. "name": {
  20507. "type": "string",
  20508. "enum": ["WorkspaceWarpError"]
  20509. },
  20510. "data": {
  20511. "type": "object",
  20512. "properties": {
  20513. "message": {
  20514. "type": "string"
  20515. }
  20516. },
  20517. "required": ["message"],
  20518. "additionalProperties": false
  20519. }
  20520. },
  20521. "required": ["name", "data"],
  20522. "additionalProperties": false
  20523. },
  20524. "UnauthorizedError": {
  20525. "type": "object",
  20526. "properties": {
  20527. "_tag": {
  20528. "type": "string",
  20529. "enum": ["UnauthorizedError"]
  20530. },
  20531. "message": {
  20532. "type": "string"
  20533. }
  20534. },
  20535. "required": ["_tag", "message"],
  20536. "additionalProperties": false
  20537. },
  20538. "SessionsResponse": {
  20539. "type": "object",
  20540. "properties": {
  20541. "data": {
  20542. "type": "array",
  20543. "items": {
  20544. "$ref": "#/components/schemas/SessionV2Info"
  20545. }
  20546. },
  20547. "cursor": {
  20548. "type": "object",
  20549. "properties": {
  20550. "previous": {
  20551. "type": "string"
  20552. },
  20553. "next": {
  20554. "type": "string"
  20555. }
  20556. },
  20557. "additionalProperties": false
  20558. }
  20559. },
  20560. "required": ["data", "cursor"],
  20561. "additionalProperties": false
  20562. },
  20563. "InvalidCursorError": {
  20564. "type": "object",
  20565. "properties": {
  20566. "_tag": {
  20567. "type": "string",
  20568. "enum": ["InvalidCursorError"]
  20569. },
  20570. "message": {
  20571. "type": "string"
  20572. }
  20573. },
  20574. "required": ["_tag", "message"],
  20575. "additionalProperties": false
  20576. },
  20577. "ConflictError": {
  20578. "type": "object",
  20579. "properties": {
  20580. "_tag": {
  20581. "type": "string",
  20582. "enum": ["ConflictError"]
  20583. },
  20584. "message": {
  20585. "type": "string"
  20586. },
  20587. "resource": {
  20588. "type": "string"
  20589. }
  20590. },
  20591. "required": ["_tag", "message"],
  20592. "additionalProperties": false
  20593. },
  20594. "SessionNotFoundError": {
  20595. "type": "object",
  20596. "properties": {
  20597. "_tag": {
  20598. "type": "string",
  20599. "enum": ["SessionNotFoundError"]
  20600. },
  20601. "sessionID": {
  20602. "type": "string"
  20603. },
  20604. "message": {
  20605. "type": "string"
  20606. }
  20607. },
  20608. "required": ["_tag", "sessionID", "message"],
  20609. "additionalProperties": false
  20610. },
  20611. "ServiceUnavailableError": {
  20612. "type": "object",
  20613. "properties": {
  20614. "_tag": {
  20615. "type": "string",
  20616. "enum": ["ServiceUnavailableError"]
  20617. },
  20618. "message": {
  20619. "type": "string"
  20620. },
  20621. "service": {
  20622. "type": "string"
  20623. }
  20624. },
  20625. "required": ["_tag", "message"],
  20626. "additionalProperties": false
  20627. },
  20628. "UnknownError1": {
  20629. "type": "object",
  20630. "properties": {
  20631. "_tag": {
  20632. "type": "string",
  20633. "enum": ["UnknownError"]
  20634. },
  20635. "message": {
  20636. "type": "string"
  20637. },
  20638. "ref": {
  20639. "type": "string"
  20640. }
  20641. },
  20642. "required": ["_tag", "message"],
  20643. "additionalProperties": false
  20644. },
  20645. "SessionMessagesResponse": {
  20646. "type": "object",
  20647. "properties": {
  20648. "data": {
  20649. "type": "array",
  20650. "items": {
  20651. "$ref": "#/components/schemas/SessionMessage"
  20652. }
  20653. },
  20654. "cursor": {
  20655. "type": "object",
  20656. "properties": {
  20657. "previous": {
  20658. "type": "string"
  20659. },
  20660. "next": {
  20661. "type": "string"
  20662. }
  20663. },
  20664. "additionalProperties": false
  20665. }
  20666. },
  20667. "required": ["data", "cursor"],
  20668. "additionalProperties": false
  20669. },
  20670. "ProviderNotFoundError": {
  20671. "type": "object",
  20672. "properties": {
  20673. "_tag": {
  20674. "type": "string",
  20675. "enum": ["ProviderNotFoundError"]
  20676. },
  20677. "providerID": {
  20678. "type": "string"
  20679. },
  20680. "message": {
  20681. "type": "string"
  20682. }
  20683. },
  20684. "required": ["_tag", "providerID", "message"],
  20685. "additionalProperties": false
  20686. },
  20687. "effect_HttpApiError_Forbidden": {
  20688. "type": "object",
  20689. "properties": {
  20690. "_tag": {
  20691. "type": "string",
  20692. "enum": ["Forbidden"]
  20693. }
  20694. },
  20695. "required": ["_tag"],
  20696. "additionalProperties": false
  20697. },
  20698. "Event.tui.prompt.append": {
  20699. "type": "object",
  20700. "properties": {
  20701. "id": {
  20702. "type": "string",
  20703. "pattern": "^evt_"
  20704. },
  20705. "type": {
  20706. "type": "string",
  20707. "enum": ["tui.prompt.append"]
  20708. },
  20709. "properties": {
  20710. "type": "object",
  20711. "properties": {
  20712. "text": {
  20713. "type": "string"
  20714. }
  20715. },
  20716. "required": ["text"],
  20717. "additionalProperties": false
  20718. }
  20719. },
  20720. "required": ["id", "type", "properties"],
  20721. "additionalProperties": false
  20722. },
  20723. "Event.tui.command.execute": {
  20724. "type": "object",
  20725. "properties": {
  20726. "id": {
  20727. "type": "string",
  20728. "pattern": "^evt_"
  20729. },
  20730. "type": {
  20731. "type": "string",
  20732. "enum": ["tui.command.execute"]
  20733. },
  20734. "properties": {
  20735. "type": "object",
  20736. "properties": {
  20737. "command": {
  20738. "anyOf": [
  20739. {
  20740. "type": "string",
  20741. "enum": [
  20742. "session.list",
  20743. "session.new",
  20744. "session.share",
  20745. "session.interrupt",
  20746. "session.compact",
  20747. "session.page.up",
  20748. "session.page.down",
  20749. "session.line.up",
  20750. "session.line.down",
  20751. "session.half.page.up",
  20752. "session.half.page.down",
  20753. "session.first",
  20754. "session.last",
  20755. "prompt.clear",
  20756. "prompt.submit",
  20757. "agent.cycle"
  20758. ]
  20759. },
  20760. {
  20761. "type": "string"
  20762. }
  20763. ]
  20764. }
  20765. },
  20766. "required": ["command"],
  20767. "additionalProperties": false
  20768. }
  20769. },
  20770. "required": ["id", "type", "properties"],
  20771. "additionalProperties": false
  20772. },
  20773. "Event.tui.toast.show": {
  20774. "type": "object",
  20775. "properties": {
  20776. "id": {
  20777. "type": "string",
  20778. "pattern": "^evt_"
  20779. },
  20780. "type": {
  20781. "type": "string",
  20782. "enum": ["tui.toast.show"]
  20783. },
  20784. "properties": {
  20785. "type": "object",
  20786. "properties": {
  20787. "title": {
  20788. "type": "string"
  20789. },
  20790. "message": {
  20791. "type": "string"
  20792. },
  20793. "variant": {
  20794. "type": "string",
  20795. "enum": ["info", "success", "warning", "error"]
  20796. },
  20797. "duration": {
  20798. "type": "integer",
  20799. "exclusiveMinimum": 0
  20800. }
  20801. },
  20802. "required": ["message", "variant"],
  20803. "additionalProperties": false
  20804. }
  20805. },
  20806. "required": ["id", "type", "properties"],
  20807. "additionalProperties": false
  20808. },
  20809. "Event.tui.session.select": {
  20810. "type": "object",
  20811. "properties": {
  20812. "id": {
  20813. "type": "string",
  20814. "pattern": "^evt_"
  20815. },
  20816. "type": {
  20817. "type": "string",
  20818. "enum": ["tui.session.select"]
  20819. },
  20820. "properties": {
  20821. "type": "object",
  20822. "properties": {
  20823. "sessionID": {
  20824. "type": "string",
  20825. "pattern": "^ses",
  20826. "description": "Session ID to navigate to"
  20827. }
  20828. },
  20829. "required": ["sessionID"],
  20830. "additionalProperties": false
  20831. }
  20832. },
  20833. "required": ["id", "type", "properties"],
  20834. "additionalProperties": false
  20835. },
  20836. "MoveSessionDestination": {
  20837. "type": "object",
  20838. "properties": {
  20839. "directory": {
  20840. "type": "string"
  20841. }
  20842. },
  20843. "required": ["directory"],
  20844. "additionalProperties": false
  20845. },
  20846. "ModelV2Info": {
  20847. "type": "object",
  20848. "properties": {
  20849. "id": {
  20850. "type": "string"
  20851. },
  20852. "providerID": {
  20853. "type": "string"
  20854. },
  20855. "family": {
  20856. "type": "string"
  20857. },
  20858. "name": {
  20859. "type": "string"
  20860. },
  20861. "api": {
  20862. "anyOf": [
  20863. {
  20864. "type": "object",
  20865. "properties": {
  20866. "id": {
  20867. "type": "string"
  20868. },
  20869. "type": {
  20870. "type": "string",
  20871. "enum": ["aisdk"]
  20872. },
  20873. "package": {
  20874. "type": "string"
  20875. },
  20876. "url": {
  20877. "type": "string"
  20878. },
  20879. "settings": {
  20880. "type": "object"
  20881. }
  20882. },
  20883. "required": ["id", "type", "package"],
  20884. "additionalProperties": false
  20885. },
  20886. {
  20887. "type": "object",
  20888. "properties": {
  20889. "id": {
  20890. "type": "string"
  20891. },
  20892. "type": {
  20893. "type": "string",
  20894. "enum": ["native"]
  20895. },
  20896. "url": {
  20897. "type": "string"
  20898. },
  20899. "settings": {
  20900. "type": "object"
  20901. }
  20902. },
  20903. "required": ["id", "type", "settings"],
  20904. "additionalProperties": false
  20905. }
  20906. ]
  20907. },
  20908. "capabilities": {
  20909. "type": "object",
  20910. "properties": {
  20911. "tools": {
  20912. "type": "boolean"
  20913. },
  20914. "input": {
  20915. "type": "array",
  20916. "items": {
  20917. "type": "string"
  20918. }
  20919. },
  20920. "output": {
  20921. "type": "array",
  20922. "items": {
  20923. "type": "string"
  20924. }
  20925. }
  20926. },
  20927. "required": ["tools", "input", "output"],
  20928. "additionalProperties": false
  20929. },
  20930. "request": {
  20931. "type": "object",
  20932. "properties": {
  20933. "headers": {
  20934. "type": "object",
  20935. "additionalProperties": {
  20936. "type": "string"
  20937. }
  20938. },
  20939. "body": {
  20940. "type": "object"
  20941. },
  20942. "generation": {
  20943. "type": "object",
  20944. "properties": {
  20945. "maxTokens": {
  20946. "anyOf": [
  20947. {
  20948. "type": "number"
  20949. },
  20950. {
  20951. "type": "string",
  20952. "enum": ["NaN"]
  20953. },
  20954. {
  20955. "type": "string",
  20956. "enum": ["Infinity"]
  20957. },
  20958. {
  20959. "type": "string",
  20960. "enum": ["-Infinity"]
  20961. },
  20962. {
  20963. "type": "string",
  20964. "enum": ["Infinity", "-Infinity", "NaN"]
  20965. }
  20966. ]
  20967. },
  20968. "temperature": {
  20969. "anyOf": [
  20970. {
  20971. "type": "number"
  20972. },
  20973. {
  20974. "type": "string",
  20975. "enum": ["NaN"]
  20976. },
  20977. {
  20978. "type": "string",
  20979. "enum": ["Infinity"]
  20980. },
  20981. {
  20982. "type": "string",
  20983. "enum": ["-Infinity"]
  20984. },
  20985. {
  20986. "type": "string",
  20987. "enum": ["Infinity", "-Infinity", "NaN"]
  20988. }
  20989. ]
  20990. },
  20991. "topP": {
  20992. "anyOf": [
  20993. {
  20994. "type": "number"
  20995. },
  20996. {
  20997. "type": "string",
  20998. "enum": ["NaN"]
  20999. },
  21000. {
  21001. "type": "string",
  21002. "enum": ["Infinity"]
  21003. },
  21004. {
  21005. "type": "string",
  21006. "enum": ["-Infinity"]
  21007. },
  21008. {
  21009. "type": "string",
  21010. "enum": ["Infinity", "-Infinity", "NaN"]
  21011. }
  21012. ]
  21013. },
  21014. "topK": {
  21015. "anyOf": [
  21016. {
  21017. "type": "number"
  21018. },
  21019. {
  21020. "type": "string",
  21021. "enum": ["NaN"]
  21022. },
  21023. {
  21024. "type": "string",
  21025. "enum": ["Infinity"]
  21026. },
  21027. {
  21028. "type": "string",
  21029. "enum": ["-Infinity"]
  21030. },
  21031. {
  21032. "type": "string",
  21033. "enum": ["Infinity", "-Infinity", "NaN"]
  21034. }
  21035. ]
  21036. },
  21037. "frequencyPenalty": {
  21038. "anyOf": [
  21039. {
  21040. "type": "number"
  21041. },
  21042. {
  21043. "type": "string",
  21044. "enum": ["NaN"]
  21045. },
  21046. {
  21047. "type": "string",
  21048. "enum": ["Infinity"]
  21049. },
  21050. {
  21051. "type": "string",
  21052. "enum": ["-Infinity"]
  21053. },
  21054. {
  21055. "type": "string",
  21056. "enum": ["Infinity", "-Infinity", "NaN"]
  21057. }
  21058. ]
  21059. },
  21060. "presencePenalty": {
  21061. "anyOf": [
  21062. {
  21063. "type": "number"
  21064. },
  21065. {
  21066. "type": "string",
  21067. "enum": ["NaN"]
  21068. },
  21069. {
  21070. "type": "string",
  21071. "enum": ["Infinity"]
  21072. },
  21073. {
  21074. "type": "string",
  21075. "enum": ["-Infinity"]
  21076. },
  21077. {
  21078. "type": "string",
  21079. "enum": ["Infinity", "-Infinity", "NaN"]
  21080. }
  21081. ]
  21082. },
  21083. "seed": {
  21084. "anyOf": [
  21085. {
  21086. "type": "number"
  21087. },
  21088. {
  21089. "type": "string",
  21090. "enum": ["NaN"]
  21091. },
  21092. {
  21093. "type": "string",
  21094. "enum": ["Infinity"]
  21095. },
  21096. {
  21097. "type": "string",
  21098. "enum": ["-Infinity"]
  21099. },
  21100. {
  21101. "type": "string",
  21102. "enum": ["Infinity", "-Infinity", "NaN"]
  21103. }
  21104. ]
  21105. },
  21106. "stop": {
  21107. "type": "array",
  21108. "items": {
  21109. "type": "string"
  21110. }
  21111. }
  21112. },
  21113. "additionalProperties": false
  21114. },
  21115. "options": {
  21116. "type": "object"
  21117. },
  21118. "variant": {
  21119. "type": "string"
  21120. }
  21121. },
  21122. "required": ["headers", "body"],
  21123. "additionalProperties": false
  21124. },
  21125. "variants": {
  21126. "type": "array",
  21127. "items": {
  21128. "type": "object",
  21129. "properties": {
  21130. "id": {
  21131. "type": "string"
  21132. },
  21133. "headers": {
  21134. "type": "object",
  21135. "additionalProperties": {
  21136. "type": "string"
  21137. }
  21138. },
  21139. "body": {
  21140. "type": "object"
  21141. },
  21142. "generation": {
  21143. "type": "object",
  21144. "properties": {
  21145. "maxTokens": {
  21146. "anyOf": [
  21147. {
  21148. "type": "number"
  21149. },
  21150. {
  21151. "type": "string",
  21152. "enum": ["NaN"]
  21153. },
  21154. {
  21155. "type": "string",
  21156. "enum": ["Infinity"]
  21157. },
  21158. {
  21159. "type": "string",
  21160. "enum": ["-Infinity"]
  21161. },
  21162. {
  21163. "type": "string",
  21164. "enum": ["Infinity", "-Infinity", "NaN"]
  21165. }
  21166. ]
  21167. },
  21168. "temperature": {
  21169. "anyOf": [
  21170. {
  21171. "type": "number"
  21172. },
  21173. {
  21174. "type": "string",
  21175. "enum": ["NaN"]
  21176. },
  21177. {
  21178. "type": "string",
  21179. "enum": ["Infinity"]
  21180. },
  21181. {
  21182. "type": "string",
  21183. "enum": ["-Infinity"]
  21184. },
  21185. {
  21186. "type": "string",
  21187. "enum": ["Infinity", "-Infinity", "NaN"]
  21188. }
  21189. ]
  21190. },
  21191. "topP": {
  21192. "anyOf": [
  21193. {
  21194. "type": "number"
  21195. },
  21196. {
  21197. "type": "string",
  21198. "enum": ["NaN"]
  21199. },
  21200. {
  21201. "type": "string",
  21202. "enum": ["Infinity"]
  21203. },
  21204. {
  21205. "type": "string",
  21206. "enum": ["-Infinity"]
  21207. },
  21208. {
  21209. "type": "string",
  21210. "enum": ["Infinity", "-Infinity", "NaN"]
  21211. }
  21212. ]
  21213. },
  21214. "topK": {
  21215. "anyOf": [
  21216. {
  21217. "type": "number"
  21218. },
  21219. {
  21220. "type": "string",
  21221. "enum": ["NaN"]
  21222. },
  21223. {
  21224. "type": "string",
  21225. "enum": ["Infinity"]
  21226. },
  21227. {
  21228. "type": "string",
  21229. "enum": ["-Infinity"]
  21230. },
  21231. {
  21232. "type": "string",
  21233. "enum": ["Infinity", "-Infinity", "NaN"]
  21234. }
  21235. ]
  21236. },
  21237. "frequencyPenalty": {
  21238. "anyOf": [
  21239. {
  21240. "type": "number"
  21241. },
  21242. {
  21243. "type": "string",
  21244. "enum": ["NaN"]
  21245. },
  21246. {
  21247. "type": "string",
  21248. "enum": ["Infinity"]
  21249. },
  21250. {
  21251. "type": "string",
  21252. "enum": ["-Infinity"]
  21253. },
  21254. {
  21255. "type": "string",
  21256. "enum": ["Infinity", "-Infinity", "NaN"]
  21257. }
  21258. ]
  21259. },
  21260. "presencePenalty": {
  21261. "anyOf": [
  21262. {
  21263. "type": "number"
  21264. },
  21265. {
  21266. "type": "string",
  21267. "enum": ["NaN"]
  21268. },
  21269. {
  21270. "type": "string",
  21271. "enum": ["Infinity"]
  21272. },
  21273. {
  21274. "type": "string",
  21275. "enum": ["-Infinity"]
  21276. },
  21277. {
  21278. "type": "string",
  21279. "enum": ["Infinity", "-Infinity", "NaN"]
  21280. }
  21281. ]
  21282. },
  21283. "seed": {
  21284. "anyOf": [
  21285. {
  21286. "type": "number"
  21287. },
  21288. {
  21289. "type": "string",
  21290. "enum": ["NaN"]
  21291. },
  21292. {
  21293. "type": "string",
  21294. "enum": ["Infinity"]
  21295. },
  21296. {
  21297. "type": "string",
  21298. "enum": ["-Infinity"]
  21299. },
  21300. {
  21301. "type": "string",
  21302. "enum": ["Infinity", "-Infinity", "NaN"]
  21303. }
  21304. ]
  21305. },
  21306. "stop": {
  21307. "type": "array",
  21308. "items": {
  21309. "type": "string"
  21310. }
  21311. }
  21312. },
  21313. "additionalProperties": false
  21314. },
  21315. "options": {
  21316. "type": "object"
  21317. }
  21318. },
  21319. "required": ["id", "headers", "body"],
  21320. "additionalProperties": false
  21321. }
  21322. },
  21323. "time": {
  21324. "type": "object",
  21325. "properties": {
  21326. "released": {
  21327. "anyOf": [
  21328. {
  21329. "type": "number"
  21330. },
  21331. {
  21332. "type": "string",
  21333. "enum": ["NaN"]
  21334. },
  21335. {
  21336. "type": "string",
  21337. "enum": ["Infinity"]
  21338. },
  21339. {
  21340. "type": "string",
  21341. "enum": ["-Infinity"]
  21342. },
  21343. {
  21344. "type": "string",
  21345. "enum": ["Infinity", "-Infinity", "NaN"]
  21346. }
  21347. ]
  21348. }
  21349. },
  21350. "required": ["released"],
  21351. "additionalProperties": false
  21352. },
  21353. "cost": {
  21354. "type": "array",
  21355. "items": {
  21356. "type": "object",
  21357. "properties": {
  21358. "tier": {
  21359. "type": "object",
  21360. "properties": {
  21361. "type": {
  21362. "type": "string",
  21363. "enum": ["context"]
  21364. },
  21365. "size": {
  21366. "type": "integer"
  21367. }
  21368. },
  21369. "required": ["type", "size"],
  21370. "additionalProperties": false
  21371. },
  21372. "input": {
  21373. "type": "number"
  21374. },
  21375. "output": {
  21376. "type": "number"
  21377. },
  21378. "cache": {
  21379. "type": "object",
  21380. "properties": {
  21381. "read": {
  21382. "type": "number"
  21383. },
  21384. "write": {
  21385. "type": "number"
  21386. }
  21387. },
  21388. "required": ["read", "write"],
  21389. "additionalProperties": false
  21390. }
  21391. },
  21392. "required": ["input", "output", "cache"],
  21393. "additionalProperties": false
  21394. }
  21395. },
  21396. "status": {
  21397. "type": "string",
  21398. "enum": ["alpha", "beta", "deprecated", "active"]
  21399. },
  21400. "enabled": {
  21401. "type": "boolean"
  21402. },
  21403. "limit": {
  21404. "type": "object",
  21405. "properties": {
  21406. "context": {
  21407. "type": "integer"
  21408. },
  21409. "input": {
  21410. "type": "integer"
  21411. },
  21412. "output": {
  21413. "type": "integer"
  21414. }
  21415. },
  21416. "required": ["context", "output"],
  21417. "additionalProperties": false
  21418. }
  21419. },
  21420. "required": [
  21421. "id",
  21422. "providerID",
  21423. "name",
  21424. "api",
  21425. "capabilities",
  21426. "request",
  21427. "variants",
  21428. "time",
  21429. "cost",
  21430. "status",
  21431. "enabled",
  21432. "limit"
  21433. ],
  21434. "additionalProperties": false
  21435. },
  21436. "LocationRef": {
  21437. "type": "object",
  21438. "properties": {
  21439. "directory": {
  21440. "type": "string"
  21441. },
  21442. "workspaceID": {
  21443. "type": "string",
  21444. "pattern": "^wrk"
  21445. }
  21446. },
  21447. "required": ["directory"],
  21448. "additionalProperties": false
  21449. },
  21450. "PromptSource": {
  21451. "type": "object",
  21452. "properties": {
  21453. "start": {
  21454. "type": "number"
  21455. },
  21456. "end": {
  21457. "type": "number"
  21458. },
  21459. "text": {
  21460. "type": "string"
  21461. }
  21462. },
  21463. "required": ["start", "end", "text"],
  21464. "additionalProperties": false
  21465. },
  21466. "PromptFileAttachment": {
  21467. "type": "object",
  21468. "properties": {
  21469. "uri": {
  21470. "type": "string"
  21471. },
  21472. "mime": {
  21473. "type": "string"
  21474. },
  21475. "name": {
  21476. "type": "string"
  21477. },
  21478. "description": {
  21479. "type": "string"
  21480. },
  21481. "source": {
  21482. "$ref": "#/components/schemas/PromptSource"
  21483. }
  21484. },
  21485. "required": ["uri", "mime"],
  21486. "additionalProperties": false
  21487. },
  21488. "PromptAgentAttachment": {
  21489. "type": "object",
  21490. "properties": {
  21491. "name": {
  21492. "type": "string"
  21493. },
  21494. "source": {
  21495. "$ref": "#/components/schemas/PromptSource"
  21496. }
  21497. },
  21498. "required": ["name"],
  21499. "additionalProperties": false
  21500. },
  21501. "PromptReferenceAttachment": {
  21502. "type": "object",
  21503. "properties": {
  21504. "name": {
  21505. "type": "string"
  21506. },
  21507. "kind": {
  21508. "type": "string",
  21509. "enum": ["local", "git", "invalid"]
  21510. },
  21511. "uri": {
  21512. "type": "string"
  21513. },
  21514. "repository": {
  21515. "type": "string"
  21516. },
  21517. "branch": {
  21518. "type": "string"
  21519. },
  21520. "target": {
  21521. "type": "string"
  21522. },
  21523. "targetUri": {
  21524. "type": "string"
  21525. },
  21526. "problem": {
  21527. "type": "string"
  21528. },
  21529. "source": {
  21530. "$ref": "#/components/schemas/PromptSource"
  21531. }
  21532. },
  21533. "required": ["name", "kind"],
  21534. "additionalProperties": false
  21535. },
  21536. "SessionErrorUnknown": {
  21537. "type": "object",
  21538. "properties": {
  21539. "type": {
  21540. "type": "string",
  21541. "enum": ["unknown"]
  21542. },
  21543. "message": {
  21544. "type": "string"
  21545. }
  21546. },
  21547. "required": ["type", "message"],
  21548. "additionalProperties": false
  21549. },
  21550. "ToolTextContent": {
  21551. "type": "object",
  21552. "properties": {
  21553. "type": {
  21554. "type": "string",
  21555. "enum": ["text"]
  21556. },
  21557. "text": {
  21558. "type": "string"
  21559. }
  21560. },
  21561. "required": ["type", "text"],
  21562. "additionalProperties": false
  21563. },
  21564. "ToolFileContent": {
  21565. "type": "object",
  21566. "properties": {
  21567. "type": {
  21568. "type": "string",
  21569. "enum": ["file"]
  21570. },
  21571. "source": {
  21572. "anyOf": [
  21573. {
  21574. "type": "object",
  21575. "properties": {
  21576. "type": {
  21577. "type": "string",
  21578. "enum": ["data"]
  21579. },
  21580. "data": {
  21581. "type": "string"
  21582. }
  21583. },
  21584. "required": ["type", "data"],
  21585. "additionalProperties": false
  21586. },
  21587. {
  21588. "type": "object",
  21589. "properties": {
  21590. "type": {
  21591. "type": "string",
  21592. "enum": ["url"]
  21593. },
  21594. "url": {
  21595. "type": "string"
  21596. }
  21597. },
  21598. "required": ["type", "url"],
  21599. "additionalProperties": false
  21600. },
  21601. {
  21602. "type": "object",
  21603. "properties": {
  21604. "type": {
  21605. "type": "string",
  21606. "enum": ["file"]
  21607. },
  21608. "uri": {
  21609. "type": "string"
  21610. }
  21611. },
  21612. "required": ["type", "uri"],
  21613. "additionalProperties": false
  21614. }
  21615. ]
  21616. },
  21617. "mime": {
  21618. "type": "string"
  21619. },
  21620. "name": {
  21621. "type": "string"
  21622. }
  21623. },
  21624. "required": ["type", "source", "mime"],
  21625. "additionalProperties": false
  21626. },
  21627. "SessionNextRetry_error": {
  21628. "type": "object",
  21629. "properties": {
  21630. "message": {
  21631. "type": "string"
  21632. },
  21633. "statusCode": {
  21634. "type": "number"
  21635. },
  21636. "isRetryable": {
  21637. "type": "boolean"
  21638. },
  21639. "responseHeaders": {
  21640. "type": "object",
  21641. "additionalProperties": {
  21642. "type": "string"
  21643. }
  21644. },
  21645. "responseBody": {
  21646. "type": "string"
  21647. },
  21648. "metadata": {
  21649. "type": "object",
  21650. "additionalProperties": {
  21651. "type": "string"
  21652. }
  21653. }
  21654. },
  21655. "required": ["message", "isRetryable"],
  21656. "additionalProperties": false
  21657. },
  21658. "AuthOAuthCredential": {
  21659. "type": "object",
  21660. "properties": {
  21661. "type": {
  21662. "type": "string",
  21663. "enum": ["oauth"]
  21664. },
  21665. "refresh": {
  21666. "type": "string"
  21667. },
  21668. "access": {
  21669. "type": "string"
  21670. },
  21671. "expires": {
  21672. "type": "integer",
  21673. "minimum": 0
  21674. }
  21675. },
  21676. "required": ["type", "refresh", "access", "expires"],
  21677. "additionalProperties": false
  21678. },
  21679. "AuthApiKeyCredential": {
  21680. "type": "object",
  21681. "properties": {
  21682. "type": {
  21683. "type": "string",
  21684. "enum": ["api"]
  21685. },
  21686. "key": {
  21687. "type": "string"
  21688. },
  21689. "metadata": {
  21690. "type": "object",
  21691. "additionalProperties": {
  21692. "type": "string"
  21693. }
  21694. }
  21695. },
  21696. "required": ["type", "key"],
  21697. "additionalProperties": false
  21698. },
  21699. "AuthCredential": {
  21700. "anyOf": [
  21701. {
  21702. "$ref": "#/components/schemas/AuthOAuthCredential"
  21703. },
  21704. {
  21705. "$ref": "#/components/schemas/AuthApiKeyCredential"
  21706. }
  21707. ]
  21708. },
  21709. "AuthInfo": {
  21710. "type": "object",
  21711. "properties": {
  21712. "id": {
  21713. "type": "string"
  21714. },
  21715. "serviceID": {
  21716. "type": "string"
  21717. },
  21718. "description": {
  21719. "type": "string"
  21720. },
  21721. "credential": {
  21722. "$ref": "#/components/schemas/AuthCredential"
  21723. }
  21724. },
  21725. "required": ["id", "serviceID", "description", "credential"],
  21726. "additionalProperties": false
  21727. },
  21728. "PermissionV2Source": {
  21729. "type": "object",
  21730. "properties": {
  21731. "type": {
  21732. "type": "string",
  21733. "enum": ["tool"]
  21734. },
  21735. "messageID": {
  21736. "type": "string"
  21737. },
  21738. "callID": {
  21739. "type": "string"
  21740. }
  21741. },
  21742. "required": ["type", "messageID", "callID"],
  21743. "additionalProperties": false
  21744. },
  21745. "PermissionV2Reply": {
  21746. "type": "string",
  21747. "enum": ["once", "always", "reject"]
  21748. },
  21749. "QuestionV2Option": {
  21750. "type": "object",
  21751. "properties": {
  21752. "label": {
  21753. "type": "string",
  21754. "description": "Display text (1-5 words, concise)"
  21755. },
  21756. "description": {
  21757. "type": "string",
  21758. "description": "Explanation of choice"
  21759. }
  21760. },
  21761. "required": ["label", "description"],
  21762. "additionalProperties": false
  21763. },
  21764. "QuestionV2Info": {
  21765. "type": "object",
  21766. "properties": {
  21767. "question": {
  21768. "type": "string",
  21769. "description": "Complete question"
  21770. },
  21771. "header": {
  21772. "type": "string",
  21773. "description": "Very short label (max 30 chars)"
  21774. },
  21775. "options": {
  21776. "type": "array",
  21777. "items": {
  21778. "$ref": "#/components/schemas/QuestionV2Option"
  21779. },
  21780. "description": "Available choices"
  21781. },
  21782. "multiple": {
  21783. "type": "boolean"
  21784. },
  21785. "custom": {
  21786. "type": "boolean"
  21787. }
  21788. },
  21789. "required": ["question", "header", "options"],
  21790. "additionalProperties": false
  21791. },
  21792. "QuestionV2Tool": {
  21793. "type": "object",
  21794. "properties": {
  21795. "messageID": {
  21796. "type": "string"
  21797. },
  21798. "callID": {
  21799. "type": "string"
  21800. }
  21801. },
  21802. "required": ["messageID", "callID"],
  21803. "additionalProperties": false
  21804. },
  21805. "QuestionV2Answer": {
  21806. "type": "array",
  21807. "items": {
  21808. "type": "string"
  21809. }
  21810. },
  21811. "EventServerInstanceDisposed": {
  21812. "type": "object",
  21813. "properties": {
  21814. "id": {
  21815. "type": "string"
  21816. },
  21817. "type": {
  21818. "type": "string",
  21819. "enum": ["server.instance.disposed"]
  21820. },
  21821. "properties": {
  21822. "type": "object",
  21823. "properties": {
  21824. "directory": {
  21825. "type": "string"
  21826. }
  21827. },
  21828. "required": ["directory"],
  21829. "additionalProperties": false
  21830. }
  21831. },
  21832. "required": ["id", "type", "properties"],
  21833. "additionalProperties": false
  21834. },
  21835. "SyncEventSessionCreated": {
  21836. "type": "object",
  21837. "properties": {
  21838. "type": {
  21839. "type": "string",
  21840. "enum": ["sync"]
  21841. },
  21842. "id": {
  21843. "type": "string",
  21844. "pattern": "^evt_"
  21845. },
  21846. "syncEvent": {
  21847. "type": "object",
  21848. "properties": {
  21849. "type": {
  21850. "type": "string",
  21851. "enum": ["session.created.1"]
  21852. },
  21853. "id": {
  21854. "type": "string",
  21855. "pattern": "^evt_"
  21856. },
  21857. "seq": {
  21858. "type": "number"
  21859. },
  21860. "aggregateID": {
  21861. "type": "string"
  21862. },
  21863. "data": {
  21864. "type": "object",
  21865. "properties": {
  21866. "sessionID": {
  21867. "type": "string",
  21868. "pattern": "^ses"
  21869. },
  21870. "info": {
  21871. "$ref": "#/components/schemas/Session"
  21872. }
  21873. },
  21874. "required": ["sessionID", "info"],
  21875. "additionalProperties": false
  21876. }
  21877. },
  21878. "required": ["type", "id", "seq", "aggregateID", "data"],
  21879. "additionalProperties": false
  21880. }
  21881. },
  21882. "required": ["type", "id", "syncEvent"],
  21883. "additionalProperties": false
  21884. },
  21885. "SyncEventSessionUpdated": {
  21886. "type": "object",
  21887. "properties": {
  21888. "type": {
  21889. "type": "string",
  21890. "enum": ["sync"]
  21891. },
  21892. "id": {
  21893. "type": "string",
  21894. "pattern": "^evt_"
  21895. },
  21896. "syncEvent": {
  21897. "type": "object",
  21898. "properties": {
  21899. "type": {
  21900. "type": "string",
  21901. "enum": ["session.updated.1"]
  21902. },
  21903. "id": {
  21904. "type": "string",
  21905. "pattern": "^evt_"
  21906. },
  21907. "seq": {
  21908. "type": "number"
  21909. },
  21910. "aggregateID": {
  21911. "type": "string"
  21912. },
  21913. "data": {
  21914. "type": "object",
  21915. "properties": {
  21916. "sessionID": {
  21917. "type": "string",
  21918. "pattern": "^ses"
  21919. },
  21920. "info": {
  21921. "$ref": "#/components/schemas/Session"
  21922. }
  21923. },
  21924. "required": ["sessionID", "info"],
  21925. "additionalProperties": false
  21926. }
  21927. },
  21928. "required": ["type", "id", "seq", "aggregateID", "data"],
  21929. "additionalProperties": false
  21930. }
  21931. },
  21932. "required": ["type", "id", "syncEvent"],
  21933. "additionalProperties": false
  21934. },
  21935. "SyncEventSessionDeleted": {
  21936. "type": "object",
  21937. "properties": {
  21938. "type": {
  21939. "type": "string",
  21940. "enum": ["sync"]
  21941. },
  21942. "id": {
  21943. "type": "string",
  21944. "pattern": "^evt_"
  21945. },
  21946. "syncEvent": {
  21947. "type": "object",
  21948. "properties": {
  21949. "type": {
  21950. "type": "string",
  21951. "enum": ["session.deleted.1"]
  21952. },
  21953. "id": {
  21954. "type": "string",
  21955. "pattern": "^evt_"
  21956. },
  21957. "seq": {
  21958. "type": "number"
  21959. },
  21960. "aggregateID": {
  21961. "type": "string"
  21962. },
  21963. "data": {
  21964. "type": "object",
  21965. "properties": {
  21966. "sessionID": {
  21967. "type": "string",
  21968. "pattern": "^ses"
  21969. },
  21970. "info": {
  21971. "$ref": "#/components/schemas/Session"
  21972. }
  21973. },
  21974. "required": ["sessionID", "info"],
  21975. "additionalProperties": false
  21976. }
  21977. },
  21978. "required": ["type", "id", "seq", "aggregateID", "data"],
  21979. "additionalProperties": false
  21980. }
  21981. },
  21982. "required": ["type", "id", "syncEvent"],
  21983. "additionalProperties": false
  21984. },
  21985. "SyncEventMessageUpdated": {
  21986. "type": "object",
  21987. "properties": {
  21988. "type": {
  21989. "type": "string",
  21990. "enum": ["sync"]
  21991. },
  21992. "id": {
  21993. "type": "string",
  21994. "pattern": "^evt_"
  21995. },
  21996. "syncEvent": {
  21997. "type": "object",
  21998. "properties": {
  21999. "type": {
  22000. "type": "string",
  22001. "enum": ["message.updated.1"]
  22002. },
  22003. "id": {
  22004. "type": "string",
  22005. "pattern": "^evt_"
  22006. },
  22007. "seq": {
  22008. "type": "number"
  22009. },
  22010. "aggregateID": {
  22011. "type": "string"
  22012. },
  22013. "data": {
  22014. "type": "object",
  22015. "properties": {
  22016. "sessionID": {
  22017. "type": "string",
  22018. "pattern": "^ses"
  22019. },
  22020. "info": {
  22021. "$ref": "#/components/schemas/Message"
  22022. }
  22023. },
  22024. "required": ["sessionID", "info"],
  22025. "additionalProperties": false
  22026. }
  22027. },
  22028. "required": ["type", "id", "seq", "aggregateID", "data"],
  22029. "additionalProperties": false
  22030. }
  22031. },
  22032. "required": ["type", "id", "syncEvent"],
  22033. "additionalProperties": false
  22034. },
  22035. "SyncEventMessageRemoved": {
  22036. "type": "object",
  22037. "properties": {
  22038. "type": {
  22039. "type": "string",
  22040. "enum": ["sync"]
  22041. },
  22042. "id": {
  22043. "type": "string",
  22044. "pattern": "^evt_"
  22045. },
  22046. "syncEvent": {
  22047. "type": "object",
  22048. "properties": {
  22049. "type": {
  22050. "type": "string",
  22051. "enum": ["message.removed.1"]
  22052. },
  22053. "id": {
  22054. "type": "string",
  22055. "pattern": "^evt_"
  22056. },
  22057. "seq": {
  22058. "type": "number"
  22059. },
  22060. "aggregateID": {
  22061. "type": "string"
  22062. },
  22063. "data": {
  22064. "type": "object",
  22065. "properties": {
  22066. "sessionID": {
  22067. "type": "string",
  22068. "pattern": "^ses"
  22069. },
  22070. "messageID": {
  22071. "type": "string",
  22072. "pattern": "^msg"
  22073. }
  22074. },
  22075. "required": ["sessionID", "messageID"],
  22076. "additionalProperties": false
  22077. }
  22078. },
  22079. "required": ["type", "id", "seq", "aggregateID", "data"],
  22080. "additionalProperties": false
  22081. }
  22082. },
  22083. "required": ["type", "id", "syncEvent"],
  22084. "additionalProperties": false
  22085. },
  22086. "SyncEventMessagePartUpdated": {
  22087. "type": "object",
  22088. "properties": {
  22089. "type": {
  22090. "type": "string",
  22091. "enum": ["sync"]
  22092. },
  22093. "id": {
  22094. "type": "string",
  22095. "pattern": "^evt_"
  22096. },
  22097. "syncEvent": {
  22098. "type": "object",
  22099. "properties": {
  22100. "type": {
  22101. "type": "string",
  22102. "enum": ["message.part.updated.1"]
  22103. },
  22104. "id": {
  22105. "type": "string",
  22106. "pattern": "^evt_"
  22107. },
  22108. "seq": {
  22109. "type": "number"
  22110. },
  22111. "aggregateID": {
  22112. "type": "string"
  22113. },
  22114. "data": {
  22115. "type": "object",
  22116. "properties": {
  22117. "sessionID": {
  22118. "type": "string",
  22119. "pattern": "^ses"
  22120. },
  22121. "part": {
  22122. "$ref": "#/components/schemas/Part"
  22123. },
  22124. "time": {
  22125. "type": "number"
  22126. }
  22127. },
  22128. "required": ["sessionID", "part", "time"],
  22129. "additionalProperties": false
  22130. }
  22131. },
  22132. "required": ["type", "id", "seq", "aggregateID", "data"],
  22133. "additionalProperties": false
  22134. }
  22135. },
  22136. "required": ["type", "id", "syncEvent"],
  22137. "additionalProperties": false
  22138. },
  22139. "SyncEventMessagePartRemoved": {
  22140. "type": "object",
  22141. "properties": {
  22142. "type": {
  22143. "type": "string",
  22144. "enum": ["sync"]
  22145. },
  22146. "id": {
  22147. "type": "string",
  22148. "pattern": "^evt_"
  22149. },
  22150. "syncEvent": {
  22151. "type": "object",
  22152. "properties": {
  22153. "type": {
  22154. "type": "string",
  22155. "enum": ["message.part.removed.1"]
  22156. },
  22157. "id": {
  22158. "type": "string",
  22159. "pattern": "^evt_"
  22160. },
  22161. "seq": {
  22162. "type": "number"
  22163. },
  22164. "aggregateID": {
  22165. "type": "string"
  22166. },
  22167. "data": {
  22168. "type": "object",
  22169. "properties": {
  22170. "sessionID": {
  22171. "type": "string",
  22172. "pattern": "^ses"
  22173. },
  22174. "messageID": {
  22175. "type": "string",
  22176. "pattern": "^msg"
  22177. },
  22178. "partID": {
  22179. "type": "string",
  22180. "pattern": "^prt"
  22181. }
  22182. },
  22183. "required": ["sessionID", "messageID", "partID"],
  22184. "additionalProperties": false
  22185. }
  22186. },
  22187. "required": ["type", "id", "seq", "aggregateID", "data"],
  22188. "additionalProperties": false
  22189. }
  22190. },
  22191. "required": ["type", "id", "syncEvent"],
  22192. "additionalProperties": false
  22193. },
  22194. "SyncEventSessionNextAgentSwitched": {
  22195. "type": "object",
  22196. "properties": {
  22197. "type": {
  22198. "type": "string",
  22199. "enum": ["sync"]
  22200. },
  22201. "id": {
  22202. "type": "string",
  22203. "pattern": "^evt_"
  22204. },
  22205. "syncEvent": {
  22206. "type": "object",
  22207. "properties": {
  22208. "type": {
  22209. "type": "string",
  22210. "enum": ["session.next.agent.switched.1"]
  22211. },
  22212. "id": {
  22213. "type": "string",
  22214. "pattern": "^evt_"
  22215. },
  22216. "seq": {
  22217. "type": "number"
  22218. },
  22219. "aggregateID": {
  22220. "type": "string"
  22221. },
  22222. "data": {
  22223. "type": "object",
  22224. "properties": {
  22225. "timestamp": {
  22226. "type": "number"
  22227. },
  22228. "sessionID": {
  22229. "type": "string",
  22230. "pattern": "^ses"
  22231. },
  22232. "messageID": {
  22233. "type": "string",
  22234. "pattern": "^msg_"
  22235. },
  22236. "agent": {
  22237. "type": "string"
  22238. }
  22239. },
  22240. "required": ["timestamp", "sessionID", "messageID", "agent"],
  22241. "additionalProperties": false
  22242. }
  22243. },
  22244. "required": ["type", "id", "seq", "aggregateID", "data"],
  22245. "additionalProperties": false
  22246. }
  22247. },
  22248. "required": ["type", "id", "syncEvent"],
  22249. "additionalProperties": false
  22250. },
  22251. "SyncEventSessionNextModelSwitched": {
  22252. "type": "object",
  22253. "properties": {
  22254. "type": {
  22255. "type": "string",
  22256. "enum": ["sync"]
  22257. },
  22258. "id": {
  22259. "type": "string",
  22260. "pattern": "^evt_"
  22261. },
  22262. "syncEvent": {
  22263. "type": "object",
  22264. "properties": {
  22265. "type": {
  22266. "type": "string",
  22267. "enum": ["session.next.model.switched.1"]
  22268. },
  22269. "id": {
  22270. "type": "string",
  22271. "pattern": "^evt_"
  22272. },
  22273. "seq": {
  22274. "type": "number"
  22275. },
  22276. "aggregateID": {
  22277. "type": "string"
  22278. },
  22279. "data": {
  22280. "type": "object",
  22281. "properties": {
  22282. "timestamp": {
  22283. "type": "number"
  22284. },
  22285. "sessionID": {
  22286. "type": "string",
  22287. "pattern": "^ses"
  22288. },
  22289. "messageID": {
  22290. "type": "string",
  22291. "pattern": "^msg_"
  22292. },
  22293. "model": {
  22294. "type": "object",
  22295. "properties": {
  22296. "id": {
  22297. "type": "string"
  22298. },
  22299. "providerID": {
  22300. "type": "string"
  22301. },
  22302. "variant": {
  22303. "type": "string"
  22304. }
  22305. },
  22306. "required": ["id", "providerID"],
  22307. "additionalProperties": false
  22308. }
  22309. },
  22310. "required": ["timestamp", "sessionID", "messageID", "model"],
  22311. "additionalProperties": false
  22312. }
  22313. },
  22314. "required": ["type", "id", "seq", "aggregateID", "data"],
  22315. "additionalProperties": false
  22316. }
  22317. },
  22318. "required": ["type", "id", "syncEvent"],
  22319. "additionalProperties": false
  22320. },
  22321. "SyncEventSessionNextMoved": {
  22322. "type": "object",
  22323. "properties": {
  22324. "type": {
  22325. "type": "string",
  22326. "enum": ["sync"]
  22327. },
  22328. "id": {
  22329. "type": "string",
  22330. "pattern": "^evt_"
  22331. },
  22332. "syncEvent": {
  22333. "type": "object",
  22334. "properties": {
  22335. "type": {
  22336. "type": "string",
  22337. "enum": ["session.next.moved.1"]
  22338. },
  22339. "id": {
  22340. "type": "string",
  22341. "pattern": "^evt_"
  22342. },
  22343. "seq": {
  22344. "type": "number"
  22345. },
  22346. "aggregateID": {
  22347. "type": "string"
  22348. },
  22349. "data": {
  22350. "type": "object",
  22351. "properties": {
  22352. "timestamp": {
  22353. "type": "number"
  22354. },
  22355. "sessionID": {
  22356. "type": "string",
  22357. "pattern": "^ses"
  22358. },
  22359. "location": {
  22360. "$ref": "#/components/schemas/LocationRef"
  22361. },
  22362. "subdirectory": {
  22363. "type": "string"
  22364. }
  22365. },
  22366. "required": ["timestamp", "sessionID", "location"],
  22367. "additionalProperties": false
  22368. }
  22369. },
  22370. "required": ["type", "id", "seq", "aggregateID", "data"],
  22371. "additionalProperties": false
  22372. }
  22373. },
  22374. "required": ["type", "id", "syncEvent"],
  22375. "additionalProperties": false
  22376. },
  22377. "SyncEventSessionNextPrompted": {
  22378. "type": "object",
  22379. "properties": {
  22380. "type": {
  22381. "type": "string",
  22382. "enum": ["sync"]
  22383. },
  22384. "id": {
  22385. "type": "string",
  22386. "pattern": "^evt_"
  22387. },
  22388. "syncEvent": {
  22389. "type": "object",
  22390. "properties": {
  22391. "type": {
  22392. "type": "string",
  22393. "enum": ["session.next.prompted.1"]
  22394. },
  22395. "id": {
  22396. "type": "string",
  22397. "pattern": "^evt_"
  22398. },
  22399. "seq": {
  22400. "type": "number"
  22401. },
  22402. "aggregateID": {
  22403. "type": "string"
  22404. },
  22405. "data": {
  22406. "type": "object",
  22407. "properties": {
  22408. "timestamp": {
  22409. "type": "number"
  22410. },
  22411. "sessionID": {
  22412. "type": "string",
  22413. "pattern": "^ses"
  22414. },
  22415. "messageID": {
  22416. "type": "string",
  22417. "pattern": "^msg_"
  22418. },
  22419. "prompt": {
  22420. "$ref": "#/components/schemas/Prompt"
  22421. },
  22422. "delivery": {
  22423. "type": "string",
  22424. "enum": ["steer", "queue"]
  22425. }
  22426. },
  22427. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22428. "additionalProperties": false
  22429. }
  22430. },
  22431. "required": ["type", "id", "seq", "aggregateID", "data"],
  22432. "additionalProperties": false
  22433. }
  22434. },
  22435. "required": ["type", "id", "syncEvent"],
  22436. "additionalProperties": false
  22437. },
  22438. "SyncEventSessionNextPromptAdmitted": {
  22439. "type": "object",
  22440. "properties": {
  22441. "type": {
  22442. "type": "string",
  22443. "enum": ["sync"]
  22444. },
  22445. "id": {
  22446. "type": "string",
  22447. "pattern": "^evt_"
  22448. },
  22449. "syncEvent": {
  22450. "type": "object",
  22451. "properties": {
  22452. "type": {
  22453. "type": "string",
  22454. "enum": ["session.next.prompt.admitted.1"]
  22455. },
  22456. "id": {
  22457. "type": "string",
  22458. "pattern": "^evt_"
  22459. },
  22460. "seq": {
  22461. "type": "number"
  22462. },
  22463. "aggregateID": {
  22464. "type": "string"
  22465. },
  22466. "data": {
  22467. "type": "object",
  22468. "properties": {
  22469. "timestamp": {
  22470. "type": "number"
  22471. },
  22472. "sessionID": {
  22473. "type": "string",
  22474. "pattern": "^ses"
  22475. },
  22476. "messageID": {
  22477. "type": "string",
  22478. "pattern": "^msg_"
  22479. },
  22480. "prompt": {
  22481. "$ref": "#/components/schemas/Prompt"
  22482. },
  22483. "delivery": {
  22484. "type": "string",
  22485. "enum": ["steer", "queue"]
  22486. }
  22487. },
  22488. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  22489. "additionalProperties": false
  22490. }
  22491. },
  22492. "required": ["type", "id", "seq", "aggregateID", "data"],
  22493. "additionalProperties": false
  22494. }
  22495. },
  22496. "required": ["type", "id", "syncEvent"],
  22497. "additionalProperties": false
  22498. },
  22499. "SyncEventSessionNextPromptPromoted": {
  22500. "type": "object",
  22501. "properties": {
  22502. "type": {
  22503. "type": "string",
  22504. "enum": ["sync"]
  22505. },
  22506. "id": {
  22507. "type": "string",
  22508. "pattern": "^evt_"
  22509. },
  22510. "syncEvent": {
  22511. "type": "object",
  22512. "properties": {
  22513. "type": {
  22514. "type": "string",
  22515. "enum": ["session.next.prompt.promoted.1"]
  22516. },
  22517. "id": {
  22518. "type": "string",
  22519. "pattern": "^evt_"
  22520. },
  22521. "seq": {
  22522. "type": "number"
  22523. },
  22524. "aggregateID": {
  22525. "type": "string"
  22526. },
  22527. "data": {
  22528. "type": "object",
  22529. "properties": {
  22530. "timestamp": {
  22531. "type": "number"
  22532. },
  22533. "sessionID": {
  22534. "type": "string",
  22535. "pattern": "^ses"
  22536. },
  22537. "messageID": {
  22538. "type": "string",
  22539. "pattern": "^msg_"
  22540. },
  22541. "prompt": {
  22542. "$ref": "#/components/schemas/Prompt"
  22543. },
  22544. "timeCreated": {
  22545. "type": "number"
  22546. }
  22547. },
  22548. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  22549. "additionalProperties": false
  22550. }
  22551. },
  22552. "required": ["type", "id", "seq", "aggregateID", "data"],
  22553. "additionalProperties": false
  22554. }
  22555. },
  22556. "required": ["type", "id", "syncEvent"],
  22557. "additionalProperties": false
  22558. },
  22559. "SyncEventSessionNextInterruptRequested": {
  22560. "type": "object",
  22561. "properties": {
  22562. "type": {
  22563. "type": "string",
  22564. "enum": ["sync"]
  22565. },
  22566. "id": {
  22567. "type": "string",
  22568. "pattern": "^evt_"
  22569. },
  22570. "syncEvent": {
  22571. "type": "object",
  22572. "properties": {
  22573. "type": {
  22574. "type": "string",
  22575. "enum": ["session.next.interrupt.requested.1"]
  22576. },
  22577. "id": {
  22578. "type": "string",
  22579. "pattern": "^evt_"
  22580. },
  22581. "seq": {
  22582. "type": "number"
  22583. },
  22584. "aggregateID": {
  22585. "type": "string"
  22586. },
  22587. "data": {
  22588. "type": "object",
  22589. "properties": {
  22590. "timestamp": {
  22591. "type": "number"
  22592. },
  22593. "sessionID": {
  22594. "type": "string",
  22595. "pattern": "^ses"
  22596. }
  22597. },
  22598. "required": ["timestamp", "sessionID"],
  22599. "additionalProperties": false
  22600. }
  22601. },
  22602. "required": ["type", "id", "seq", "aggregateID", "data"],
  22603. "additionalProperties": false
  22604. }
  22605. },
  22606. "required": ["type", "id", "syncEvent"],
  22607. "additionalProperties": false
  22608. },
  22609. "SyncEventSessionNextContextUpdated": {
  22610. "type": "object",
  22611. "properties": {
  22612. "type": {
  22613. "type": "string",
  22614. "enum": ["sync"]
  22615. },
  22616. "id": {
  22617. "type": "string",
  22618. "pattern": "^evt_"
  22619. },
  22620. "syncEvent": {
  22621. "type": "object",
  22622. "properties": {
  22623. "type": {
  22624. "type": "string",
  22625. "enum": ["session.next.context.updated.1"]
  22626. },
  22627. "id": {
  22628. "type": "string",
  22629. "pattern": "^evt_"
  22630. },
  22631. "seq": {
  22632. "type": "number"
  22633. },
  22634. "aggregateID": {
  22635. "type": "string"
  22636. },
  22637. "data": {
  22638. "type": "object",
  22639. "properties": {
  22640. "timestamp": {
  22641. "type": "number"
  22642. },
  22643. "sessionID": {
  22644. "type": "string",
  22645. "pattern": "^ses"
  22646. },
  22647. "messageID": {
  22648. "type": "string",
  22649. "pattern": "^msg_"
  22650. },
  22651. "text": {
  22652. "type": "string"
  22653. }
  22654. },
  22655. "required": ["timestamp", "sessionID", "messageID", "text"],
  22656. "additionalProperties": false
  22657. }
  22658. },
  22659. "required": ["type", "id", "seq", "aggregateID", "data"],
  22660. "additionalProperties": false
  22661. }
  22662. },
  22663. "required": ["type", "id", "syncEvent"],
  22664. "additionalProperties": false
  22665. },
  22666. "SyncEventSessionNextSynthetic": {
  22667. "type": "object",
  22668. "properties": {
  22669. "type": {
  22670. "type": "string",
  22671. "enum": ["sync"]
  22672. },
  22673. "id": {
  22674. "type": "string",
  22675. "pattern": "^evt_"
  22676. },
  22677. "syncEvent": {
  22678. "type": "object",
  22679. "properties": {
  22680. "type": {
  22681. "type": "string",
  22682. "enum": ["session.next.synthetic.1"]
  22683. },
  22684. "id": {
  22685. "type": "string",
  22686. "pattern": "^evt_"
  22687. },
  22688. "seq": {
  22689. "type": "number"
  22690. },
  22691. "aggregateID": {
  22692. "type": "string"
  22693. },
  22694. "data": {
  22695. "type": "object",
  22696. "properties": {
  22697. "timestamp": {
  22698. "type": "number"
  22699. },
  22700. "sessionID": {
  22701. "type": "string",
  22702. "pattern": "^ses"
  22703. },
  22704. "messageID": {
  22705. "type": "string",
  22706. "pattern": "^msg_"
  22707. },
  22708. "text": {
  22709. "type": "string"
  22710. }
  22711. },
  22712. "required": ["timestamp", "sessionID", "messageID", "text"],
  22713. "additionalProperties": false
  22714. }
  22715. },
  22716. "required": ["type", "id", "seq", "aggregateID", "data"],
  22717. "additionalProperties": false
  22718. }
  22719. },
  22720. "required": ["type", "id", "syncEvent"],
  22721. "additionalProperties": false
  22722. },
  22723. "SyncEventSessionNextShellStarted": {
  22724. "type": "object",
  22725. "properties": {
  22726. "type": {
  22727. "type": "string",
  22728. "enum": ["sync"]
  22729. },
  22730. "id": {
  22731. "type": "string",
  22732. "pattern": "^evt_"
  22733. },
  22734. "syncEvent": {
  22735. "type": "object",
  22736. "properties": {
  22737. "type": {
  22738. "type": "string",
  22739. "enum": ["session.next.shell.started.1"]
  22740. },
  22741. "id": {
  22742. "type": "string",
  22743. "pattern": "^evt_"
  22744. },
  22745. "seq": {
  22746. "type": "number"
  22747. },
  22748. "aggregateID": {
  22749. "type": "string"
  22750. },
  22751. "data": {
  22752. "type": "object",
  22753. "properties": {
  22754. "timestamp": {
  22755. "type": "number"
  22756. },
  22757. "sessionID": {
  22758. "type": "string",
  22759. "pattern": "^ses"
  22760. },
  22761. "messageID": {
  22762. "type": "string",
  22763. "pattern": "^msg_"
  22764. },
  22765. "callID": {
  22766. "type": "string"
  22767. },
  22768. "command": {
  22769. "type": "string"
  22770. }
  22771. },
  22772. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  22773. "additionalProperties": false
  22774. }
  22775. },
  22776. "required": ["type", "id", "seq", "aggregateID", "data"],
  22777. "additionalProperties": false
  22778. }
  22779. },
  22780. "required": ["type", "id", "syncEvent"],
  22781. "additionalProperties": false
  22782. },
  22783. "SyncEventSessionNextShellEnded": {
  22784. "type": "object",
  22785. "properties": {
  22786. "type": {
  22787. "type": "string",
  22788. "enum": ["sync"]
  22789. },
  22790. "id": {
  22791. "type": "string",
  22792. "pattern": "^evt_"
  22793. },
  22794. "syncEvent": {
  22795. "type": "object",
  22796. "properties": {
  22797. "type": {
  22798. "type": "string",
  22799. "enum": ["session.next.shell.ended.1"]
  22800. },
  22801. "id": {
  22802. "type": "string",
  22803. "pattern": "^evt_"
  22804. },
  22805. "seq": {
  22806. "type": "number"
  22807. },
  22808. "aggregateID": {
  22809. "type": "string"
  22810. },
  22811. "data": {
  22812. "type": "object",
  22813. "properties": {
  22814. "timestamp": {
  22815. "type": "number"
  22816. },
  22817. "sessionID": {
  22818. "type": "string",
  22819. "pattern": "^ses"
  22820. },
  22821. "callID": {
  22822. "type": "string"
  22823. },
  22824. "output": {
  22825. "type": "string"
  22826. }
  22827. },
  22828. "required": ["timestamp", "sessionID", "callID", "output"],
  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. "SyncEventSessionNextStepStarted": {
  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.started.1"]
  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. "agent": {
  22882. "type": "string"
  22883. },
  22884. "model": {
  22885. "type": "object",
  22886. "properties": {
  22887. "id": {
  22888. "type": "string"
  22889. },
  22890. "providerID": {
  22891. "type": "string"
  22892. },
  22893. "variant": {
  22894. "type": "string"
  22895. }
  22896. },
  22897. "required": ["id", "providerID"],
  22898. "additionalProperties": false
  22899. },
  22900. "snapshot": {
  22901. "type": "string"
  22902. }
  22903. },
  22904. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  22905. "additionalProperties": false
  22906. }
  22907. },
  22908. "required": ["type", "id", "seq", "aggregateID", "data"],
  22909. "additionalProperties": false
  22910. }
  22911. },
  22912. "required": ["type", "id", "syncEvent"],
  22913. "additionalProperties": false
  22914. },
  22915. "SyncEventSessionNextStepEnded": {
  22916. "type": "object",
  22917. "properties": {
  22918. "type": {
  22919. "type": "string",
  22920. "enum": ["sync"]
  22921. },
  22922. "id": {
  22923. "type": "string",
  22924. "pattern": "^evt_"
  22925. },
  22926. "syncEvent": {
  22927. "type": "object",
  22928. "properties": {
  22929. "type": {
  22930. "type": "string",
  22931. "enum": ["session.next.step.ended.2"]
  22932. },
  22933. "id": {
  22934. "type": "string",
  22935. "pattern": "^evt_"
  22936. },
  22937. "seq": {
  22938. "type": "number"
  22939. },
  22940. "aggregateID": {
  22941. "type": "string"
  22942. },
  22943. "data": {
  22944. "type": "object",
  22945. "properties": {
  22946. "timestamp": {
  22947. "type": "number"
  22948. },
  22949. "sessionID": {
  22950. "type": "string",
  22951. "pattern": "^ses"
  22952. },
  22953. "assistantMessageID": {
  22954. "type": "string",
  22955. "pattern": "^msg_"
  22956. },
  22957. "finish": {
  22958. "type": "string"
  22959. },
  22960. "cost": {
  22961. "type": "number"
  22962. },
  22963. "tokens": {
  22964. "type": "object",
  22965. "properties": {
  22966. "input": {
  22967. "type": "number"
  22968. },
  22969. "output": {
  22970. "type": "number"
  22971. },
  22972. "reasoning": {
  22973. "type": "number"
  22974. },
  22975. "cache": {
  22976. "type": "object",
  22977. "properties": {
  22978. "read": {
  22979. "type": "number"
  22980. },
  22981. "write": {
  22982. "type": "number"
  22983. }
  22984. },
  22985. "required": ["read", "write"],
  22986. "additionalProperties": false
  22987. }
  22988. },
  22989. "required": ["input", "output", "reasoning", "cache"],
  22990. "additionalProperties": false
  22991. },
  22992. "snapshot": {
  22993. "type": "string"
  22994. }
  22995. },
  22996. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22997. "additionalProperties": false
  22998. }
  22999. },
  23000. "required": ["type", "id", "seq", "aggregateID", "data"],
  23001. "additionalProperties": false
  23002. }
  23003. },
  23004. "required": ["type", "id", "syncEvent"],
  23005. "additionalProperties": false
  23006. },
  23007. "SyncEventSessionNextStepFailed": {
  23008. "type": "object",
  23009. "properties": {
  23010. "type": {
  23011. "type": "string",
  23012. "enum": ["sync"]
  23013. },
  23014. "id": {
  23015. "type": "string",
  23016. "pattern": "^evt_"
  23017. },
  23018. "syncEvent": {
  23019. "type": "object",
  23020. "properties": {
  23021. "type": {
  23022. "type": "string",
  23023. "enum": ["session.next.step.failed.2"]
  23024. },
  23025. "id": {
  23026. "type": "string",
  23027. "pattern": "^evt_"
  23028. },
  23029. "seq": {
  23030. "type": "number"
  23031. },
  23032. "aggregateID": {
  23033. "type": "string"
  23034. },
  23035. "data": {
  23036. "type": "object",
  23037. "properties": {
  23038. "timestamp": {
  23039. "type": "number"
  23040. },
  23041. "sessionID": {
  23042. "type": "string",
  23043. "pattern": "^ses"
  23044. },
  23045. "assistantMessageID": {
  23046. "type": "string",
  23047. "pattern": "^msg_"
  23048. },
  23049. "error": {
  23050. "$ref": "#/components/schemas/SessionErrorUnknown"
  23051. }
  23052. },
  23053. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  23054. "additionalProperties": false
  23055. }
  23056. },
  23057. "required": ["type", "id", "seq", "aggregateID", "data"],
  23058. "additionalProperties": false
  23059. }
  23060. },
  23061. "required": ["type", "id", "syncEvent"],
  23062. "additionalProperties": false
  23063. },
  23064. "SyncEventSessionNextTextStarted": {
  23065. "type": "object",
  23066. "properties": {
  23067. "type": {
  23068. "type": "string",
  23069. "enum": ["sync"]
  23070. },
  23071. "id": {
  23072. "type": "string",
  23073. "pattern": "^evt_"
  23074. },
  23075. "syncEvent": {
  23076. "type": "object",
  23077. "properties": {
  23078. "type": {
  23079. "type": "string",
  23080. "enum": ["session.next.text.started.1"]
  23081. },
  23082. "id": {
  23083. "type": "string",
  23084. "pattern": "^evt_"
  23085. },
  23086. "seq": {
  23087. "type": "number"
  23088. },
  23089. "aggregateID": {
  23090. "type": "string"
  23091. },
  23092. "data": {
  23093. "type": "object",
  23094. "properties": {
  23095. "timestamp": {
  23096. "type": "number"
  23097. },
  23098. "sessionID": {
  23099. "type": "string",
  23100. "pattern": "^ses"
  23101. },
  23102. "assistantMessageID": {
  23103. "type": "string",
  23104. "pattern": "^msg_"
  23105. },
  23106. "textID": {
  23107. "type": "string"
  23108. }
  23109. },
  23110. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  23111. "additionalProperties": false
  23112. }
  23113. },
  23114. "required": ["type", "id", "seq", "aggregateID", "data"],
  23115. "additionalProperties": false
  23116. }
  23117. },
  23118. "required": ["type", "id", "syncEvent"],
  23119. "additionalProperties": false
  23120. },
  23121. "SyncEventSessionNextTextEnded": {
  23122. "type": "object",
  23123. "properties": {
  23124. "type": {
  23125. "type": "string",
  23126. "enum": ["sync"]
  23127. },
  23128. "id": {
  23129. "type": "string",
  23130. "pattern": "^evt_"
  23131. },
  23132. "syncEvent": {
  23133. "type": "object",
  23134. "properties": {
  23135. "type": {
  23136. "type": "string",
  23137. "enum": ["session.next.text.ended.1"]
  23138. },
  23139. "id": {
  23140. "type": "string",
  23141. "pattern": "^evt_"
  23142. },
  23143. "seq": {
  23144. "type": "number"
  23145. },
  23146. "aggregateID": {
  23147. "type": "string"
  23148. },
  23149. "data": {
  23150. "type": "object",
  23151. "properties": {
  23152. "timestamp": {
  23153. "type": "number"
  23154. },
  23155. "sessionID": {
  23156. "type": "string",
  23157. "pattern": "^ses"
  23158. },
  23159. "assistantMessageID": {
  23160. "type": "string",
  23161. "pattern": "^msg_"
  23162. },
  23163. "textID": {
  23164. "type": "string"
  23165. },
  23166. "text": {
  23167. "type": "string"
  23168. }
  23169. },
  23170. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  23171. "additionalProperties": false
  23172. }
  23173. },
  23174. "required": ["type", "id", "seq", "aggregateID", "data"],
  23175. "additionalProperties": false
  23176. }
  23177. },
  23178. "required": ["type", "id", "syncEvent"],
  23179. "additionalProperties": false
  23180. },
  23181. "SyncEventSessionNextReasoningStarted": {
  23182. "type": "object",
  23183. "properties": {
  23184. "type": {
  23185. "type": "string",
  23186. "enum": ["sync"]
  23187. },
  23188. "id": {
  23189. "type": "string",
  23190. "pattern": "^evt_"
  23191. },
  23192. "syncEvent": {
  23193. "type": "object",
  23194. "properties": {
  23195. "type": {
  23196. "type": "string",
  23197. "enum": ["session.next.reasoning.started.1"]
  23198. },
  23199. "id": {
  23200. "type": "string",
  23201. "pattern": "^evt_"
  23202. },
  23203. "seq": {
  23204. "type": "number"
  23205. },
  23206. "aggregateID": {
  23207. "type": "string"
  23208. },
  23209. "data": {
  23210. "type": "object",
  23211. "properties": {
  23212. "timestamp": {
  23213. "type": "number"
  23214. },
  23215. "sessionID": {
  23216. "type": "string",
  23217. "pattern": "^ses"
  23218. },
  23219. "assistantMessageID": {
  23220. "type": "string",
  23221. "pattern": "^msg_"
  23222. },
  23223. "reasoningID": {
  23224. "type": "string"
  23225. },
  23226. "providerMetadata": {
  23227. "type": "object",
  23228. "additionalProperties": {
  23229. "type": "object"
  23230. }
  23231. }
  23232. },
  23233. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  23234. "additionalProperties": false
  23235. }
  23236. },
  23237. "required": ["type", "id", "seq", "aggregateID", "data"],
  23238. "additionalProperties": false
  23239. }
  23240. },
  23241. "required": ["type", "id", "syncEvent"],
  23242. "additionalProperties": false
  23243. },
  23244. "SyncEventSessionNextReasoningEnded": {
  23245. "type": "object",
  23246. "properties": {
  23247. "type": {
  23248. "type": "string",
  23249. "enum": ["sync"]
  23250. },
  23251. "id": {
  23252. "type": "string",
  23253. "pattern": "^evt_"
  23254. },
  23255. "syncEvent": {
  23256. "type": "object",
  23257. "properties": {
  23258. "type": {
  23259. "type": "string",
  23260. "enum": ["session.next.reasoning.ended.1"]
  23261. },
  23262. "id": {
  23263. "type": "string",
  23264. "pattern": "^evt_"
  23265. },
  23266. "seq": {
  23267. "type": "number"
  23268. },
  23269. "aggregateID": {
  23270. "type": "string"
  23271. },
  23272. "data": {
  23273. "type": "object",
  23274. "properties": {
  23275. "timestamp": {
  23276. "type": "number"
  23277. },
  23278. "sessionID": {
  23279. "type": "string",
  23280. "pattern": "^ses"
  23281. },
  23282. "assistantMessageID": {
  23283. "type": "string",
  23284. "pattern": "^msg_"
  23285. },
  23286. "reasoningID": {
  23287. "type": "string"
  23288. },
  23289. "text": {
  23290. "type": "string"
  23291. },
  23292. "providerMetadata": {
  23293. "type": "object",
  23294. "additionalProperties": {
  23295. "type": "object"
  23296. }
  23297. }
  23298. },
  23299. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  23300. "additionalProperties": false
  23301. }
  23302. },
  23303. "required": ["type", "id", "seq", "aggregateID", "data"],
  23304. "additionalProperties": false
  23305. }
  23306. },
  23307. "required": ["type", "id", "syncEvent"],
  23308. "additionalProperties": false
  23309. },
  23310. "SyncEventSessionNextToolInputStarted": {
  23311. "type": "object",
  23312. "properties": {
  23313. "type": {
  23314. "type": "string",
  23315. "enum": ["sync"]
  23316. },
  23317. "id": {
  23318. "type": "string",
  23319. "pattern": "^evt_"
  23320. },
  23321. "syncEvent": {
  23322. "type": "object",
  23323. "properties": {
  23324. "type": {
  23325. "type": "string",
  23326. "enum": ["session.next.tool.input.started.1"]
  23327. },
  23328. "id": {
  23329. "type": "string",
  23330. "pattern": "^evt_"
  23331. },
  23332. "seq": {
  23333. "type": "number"
  23334. },
  23335. "aggregateID": {
  23336. "type": "string"
  23337. },
  23338. "data": {
  23339. "type": "object",
  23340. "properties": {
  23341. "timestamp": {
  23342. "type": "number"
  23343. },
  23344. "sessionID": {
  23345. "type": "string",
  23346. "pattern": "^ses"
  23347. },
  23348. "assistantMessageID": {
  23349. "type": "string",
  23350. "pattern": "^msg_"
  23351. },
  23352. "callID": {
  23353. "type": "string"
  23354. },
  23355. "name": {
  23356. "type": "string"
  23357. }
  23358. },
  23359. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  23360. "additionalProperties": false
  23361. }
  23362. },
  23363. "required": ["type", "id", "seq", "aggregateID", "data"],
  23364. "additionalProperties": false
  23365. }
  23366. },
  23367. "required": ["type", "id", "syncEvent"],
  23368. "additionalProperties": false
  23369. },
  23370. "SyncEventSessionNextToolInputEnded": {
  23371. "type": "object",
  23372. "properties": {
  23373. "type": {
  23374. "type": "string",
  23375. "enum": ["sync"]
  23376. },
  23377. "id": {
  23378. "type": "string",
  23379. "pattern": "^evt_"
  23380. },
  23381. "syncEvent": {
  23382. "type": "object",
  23383. "properties": {
  23384. "type": {
  23385. "type": "string",
  23386. "enum": ["session.next.tool.input.ended.1"]
  23387. },
  23388. "id": {
  23389. "type": "string",
  23390. "pattern": "^evt_"
  23391. },
  23392. "seq": {
  23393. "type": "number"
  23394. },
  23395. "aggregateID": {
  23396. "type": "string"
  23397. },
  23398. "data": {
  23399. "type": "object",
  23400. "properties": {
  23401. "timestamp": {
  23402. "type": "number"
  23403. },
  23404. "sessionID": {
  23405. "type": "string",
  23406. "pattern": "^ses"
  23407. },
  23408. "assistantMessageID": {
  23409. "type": "string",
  23410. "pattern": "^msg_"
  23411. },
  23412. "callID": {
  23413. "type": "string"
  23414. },
  23415. "text": {
  23416. "type": "string"
  23417. }
  23418. },
  23419. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  23420. "additionalProperties": false
  23421. }
  23422. },
  23423. "required": ["type", "id", "seq", "aggregateID", "data"],
  23424. "additionalProperties": false
  23425. }
  23426. },
  23427. "required": ["type", "id", "syncEvent"],
  23428. "additionalProperties": false
  23429. },
  23430. "SyncEventSessionNextToolCalled": {
  23431. "type": "object",
  23432. "properties": {
  23433. "type": {
  23434. "type": "string",
  23435. "enum": ["sync"]
  23436. },
  23437. "id": {
  23438. "type": "string",
  23439. "pattern": "^evt_"
  23440. },
  23441. "syncEvent": {
  23442. "type": "object",
  23443. "properties": {
  23444. "type": {
  23445. "type": "string",
  23446. "enum": ["session.next.tool.called.1"]
  23447. },
  23448. "id": {
  23449. "type": "string",
  23450. "pattern": "^evt_"
  23451. },
  23452. "seq": {
  23453. "type": "number"
  23454. },
  23455. "aggregateID": {
  23456. "type": "string"
  23457. },
  23458. "data": {
  23459. "type": "object",
  23460. "properties": {
  23461. "timestamp": {
  23462. "type": "number"
  23463. },
  23464. "sessionID": {
  23465. "type": "string",
  23466. "pattern": "^ses"
  23467. },
  23468. "assistantMessageID": {
  23469. "type": "string",
  23470. "pattern": "^msg_"
  23471. },
  23472. "callID": {
  23473. "type": "string"
  23474. },
  23475. "tool": {
  23476. "type": "string"
  23477. },
  23478. "input": {
  23479. "type": "object"
  23480. },
  23481. "provider": {
  23482. "type": "object",
  23483. "properties": {
  23484. "executed": {
  23485. "type": "boolean"
  23486. },
  23487. "metadata": {
  23488. "type": "object",
  23489. "additionalProperties": {
  23490. "type": "object"
  23491. }
  23492. }
  23493. },
  23494. "required": ["executed"],
  23495. "additionalProperties": false
  23496. }
  23497. },
  23498. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  23499. "additionalProperties": false
  23500. }
  23501. },
  23502. "required": ["type", "id", "seq", "aggregateID", "data"],
  23503. "additionalProperties": false
  23504. }
  23505. },
  23506. "required": ["type", "id", "syncEvent"],
  23507. "additionalProperties": false
  23508. },
  23509. "SyncEventSessionNextToolProgress": {
  23510. "type": "object",
  23511. "properties": {
  23512. "type": {
  23513. "type": "string",
  23514. "enum": ["sync"]
  23515. },
  23516. "id": {
  23517. "type": "string",
  23518. "pattern": "^evt_"
  23519. },
  23520. "syncEvent": {
  23521. "type": "object",
  23522. "properties": {
  23523. "type": {
  23524. "type": "string",
  23525. "enum": ["session.next.tool.progress.1"]
  23526. },
  23527. "id": {
  23528. "type": "string",
  23529. "pattern": "^evt_"
  23530. },
  23531. "seq": {
  23532. "type": "number"
  23533. },
  23534. "aggregateID": {
  23535. "type": "string"
  23536. },
  23537. "data": {
  23538. "type": "object",
  23539. "properties": {
  23540. "timestamp": {
  23541. "type": "number"
  23542. },
  23543. "sessionID": {
  23544. "type": "string",
  23545. "pattern": "^ses"
  23546. },
  23547. "assistantMessageID": {
  23548. "type": "string",
  23549. "pattern": "^msg_"
  23550. },
  23551. "callID": {
  23552. "type": "string"
  23553. },
  23554. "structured": {
  23555. "type": "object"
  23556. },
  23557. "content": {
  23558. "type": "array",
  23559. "items": {
  23560. "anyOf": [
  23561. {
  23562. "$ref": "#/components/schemas/ToolTextContent"
  23563. },
  23564. {
  23565. "$ref": "#/components/schemas/ToolFileContent"
  23566. }
  23567. ]
  23568. }
  23569. }
  23570. },
  23571. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  23572. "additionalProperties": false
  23573. }
  23574. },
  23575. "required": ["type", "id", "seq", "aggregateID", "data"],
  23576. "additionalProperties": false
  23577. }
  23578. },
  23579. "required": ["type", "id", "syncEvent"],
  23580. "additionalProperties": false
  23581. },
  23582. "SyncEventSessionNextToolSuccess": {
  23583. "type": "object",
  23584. "properties": {
  23585. "type": {
  23586. "type": "string",
  23587. "enum": ["sync"]
  23588. },
  23589. "id": {
  23590. "type": "string",
  23591. "pattern": "^evt_"
  23592. },
  23593. "syncEvent": {
  23594. "type": "object",
  23595. "properties": {
  23596. "type": {
  23597. "type": "string",
  23598. "enum": ["session.next.tool.success.1"]
  23599. },
  23600. "id": {
  23601. "type": "string",
  23602. "pattern": "^evt_"
  23603. },
  23604. "seq": {
  23605. "type": "number"
  23606. },
  23607. "aggregateID": {
  23608. "type": "string"
  23609. },
  23610. "data": {
  23611. "type": "object",
  23612. "properties": {
  23613. "timestamp": {
  23614. "type": "number"
  23615. },
  23616. "sessionID": {
  23617. "type": "string",
  23618. "pattern": "^ses"
  23619. },
  23620. "assistantMessageID": {
  23621. "type": "string",
  23622. "pattern": "^msg_"
  23623. },
  23624. "callID": {
  23625. "type": "string"
  23626. },
  23627. "structured": {
  23628. "type": "object"
  23629. },
  23630. "content": {
  23631. "type": "array",
  23632. "items": {
  23633. "anyOf": [
  23634. {
  23635. "$ref": "#/components/schemas/ToolTextContent"
  23636. },
  23637. {
  23638. "$ref": "#/components/schemas/ToolFileContent"
  23639. }
  23640. ]
  23641. }
  23642. },
  23643. "outputPaths": {
  23644. "type": "array",
  23645. "items": {
  23646. "type": "string"
  23647. }
  23648. },
  23649. "result": {},
  23650. "provider": {
  23651. "type": "object",
  23652. "properties": {
  23653. "executed": {
  23654. "type": "boolean"
  23655. },
  23656. "metadata": {
  23657. "type": "object",
  23658. "additionalProperties": {
  23659. "type": "object"
  23660. }
  23661. }
  23662. },
  23663. "required": ["executed"],
  23664. "additionalProperties": false
  23665. }
  23666. },
  23667. "required": [
  23668. "timestamp",
  23669. "sessionID",
  23670. "assistantMessageID",
  23671. "callID",
  23672. "structured",
  23673. "content",
  23674. "provider"
  23675. ],
  23676. "additionalProperties": false
  23677. }
  23678. },
  23679. "required": ["type", "id", "seq", "aggregateID", "data"],
  23680. "additionalProperties": false
  23681. }
  23682. },
  23683. "required": ["type", "id", "syncEvent"],
  23684. "additionalProperties": false
  23685. },
  23686. "SyncEventSessionNextToolFailed": {
  23687. "type": "object",
  23688. "properties": {
  23689. "type": {
  23690. "type": "string",
  23691. "enum": ["sync"]
  23692. },
  23693. "id": {
  23694. "type": "string",
  23695. "pattern": "^evt_"
  23696. },
  23697. "syncEvent": {
  23698. "type": "object",
  23699. "properties": {
  23700. "type": {
  23701. "type": "string",
  23702. "enum": ["session.next.tool.failed.1"]
  23703. },
  23704. "id": {
  23705. "type": "string",
  23706. "pattern": "^evt_"
  23707. },
  23708. "seq": {
  23709. "type": "number"
  23710. },
  23711. "aggregateID": {
  23712. "type": "string"
  23713. },
  23714. "data": {
  23715. "type": "object",
  23716. "properties": {
  23717. "timestamp": {
  23718. "type": "number"
  23719. },
  23720. "sessionID": {
  23721. "type": "string",
  23722. "pattern": "^ses"
  23723. },
  23724. "assistantMessageID": {
  23725. "type": "string",
  23726. "pattern": "^msg_"
  23727. },
  23728. "callID": {
  23729. "type": "string"
  23730. },
  23731. "error": {
  23732. "$ref": "#/components/schemas/SessionErrorUnknown"
  23733. },
  23734. "result": {},
  23735. "provider": {
  23736. "type": "object",
  23737. "properties": {
  23738. "executed": {
  23739. "type": "boolean"
  23740. },
  23741. "metadata": {
  23742. "type": "object",
  23743. "additionalProperties": {
  23744. "type": "object"
  23745. }
  23746. }
  23747. },
  23748. "required": ["executed"],
  23749. "additionalProperties": false
  23750. }
  23751. },
  23752. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  23753. "additionalProperties": false
  23754. }
  23755. },
  23756. "required": ["type", "id", "seq", "aggregateID", "data"],
  23757. "additionalProperties": false
  23758. }
  23759. },
  23760. "required": ["type", "id", "syncEvent"],
  23761. "additionalProperties": false
  23762. },
  23763. "SyncEventSessionNextRetried": {
  23764. "type": "object",
  23765. "properties": {
  23766. "type": {
  23767. "type": "string",
  23768. "enum": ["sync"]
  23769. },
  23770. "id": {
  23771. "type": "string",
  23772. "pattern": "^evt_"
  23773. },
  23774. "syncEvent": {
  23775. "type": "object",
  23776. "properties": {
  23777. "type": {
  23778. "type": "string",
  23779. "enum": ["session.next.retried.1"]
  23780. },
  23781. "id": {
  23782. "type": "string",
  23783. "pattern": "^evt_"
  23784. },
  23785. "seq": {
  23786. "type": "number"
  23787. },
  23788. "aggregateID": {
  23789. "type": "string"
  23790. },
  23791. "data": {
  23792. "type": "object",
  23793. "properties": {
  23794. "timestamp": {
  23795. "type": "number"
  23796. },
  23797. "sessionID": {
  23798. "type": "string",
  23799. "pattern": "^ses"
  23800. },
  23801. "attempt": {
  23802. "type": "number"
  23803. },
  23804. "error": {
  23805. "$ref": "#/components/schemas/SessionNextRetry_error"
  23806. }
  23807. },
  23808. "required": ["timestamp", "sessionID", "attempt", "error"],
  23809. "additionalProperties": false
  23810. }
  23811. },
  23812. "required": ["type", "id", "seq", "aggregateID", "data"],
  23813. "additionalProperties": false
  23814. }
  23815. },
  23816. "required": ["type", "id", "syncEvent"],
  23817. "additionalProperties": false
  23818. },
  23819. "SyncEventSessionNextCompactionStarted": {
  23820. "type": "object",
  23821. "properties": {
  23822. "type": {
  23823. "type": "string",
  23824. "enum": ["sync"]
  23825. },
  23826. "id": {
  23827. "type": "string",
  23828. "pattern": "^evt_"
  23829. },
  23830. "syncEvent": {
  23831. "type": "object",
  23832. "properties": {
  23833. "type": {
  23834. "type": "string",
  23835. "enum": ["session.next.compaction.started.1"]
  23836. },
  23837. "id": {
  23838. "type": "string",
  23839. "pattern": "^evt_"
  23840. },
  23841. "seq": {
  23842. "type": "number"
  23843. },
  23844. "aggregateID": {
  23845. "type": "string"
  23846. },
  23847. "data": {
  23848. "type": "object",
  23849. "properties": {
  23850. "timestamp": {
  23851. "type": "number"
  23852. },
  23853. "sessionID": {
  23854. "type": "string",
  23855. "pattern": "^ses"
  23856. },
  23857. "messageID": {
  23858. "type": "string",
  23859. "pattern": "^msg_"
  23860. },
  23861. "reason": {
  23862. "type": "string",
  23863. "enum": ["auto", "manual"]
  23864. }
  23865. },
  23866. "required": ["timestamp", "sessionID", "messageID", "reason"],
  23867. "additionalProperties": false
  23868. }
  23869. },
  23870. "required": ["type", "id", "seq", "aggregateID", "data"],
  23871. "additionalProperties": false
  23872. }
  23873. },
  23874. "required": ["type", "id", "syncEvent"],
  23875. "additionalProperties": false
  23876. },
  23877. "SyncEventSessionNextCompactionEnded": {
  23878. "type": "object",
  23879. "properties": {
  23880. "type": {
  23881. "type": "string",
  23882. "enum": ["sync"]
  23883. },
  23884. "id": {
  23885. "type": "string",
  23886. "pattern": "^evt_"
  23887. },
  23888. "syncEvent": {
  23889. "type": "object",
  23890. "properties": {
  23891. "type": {
  23892. "type": "string",
  23893. "enum": ["session.next.compaction.ended.2"]
  23894. },
  23895. "id": {
  23896. "type": "string",
  23897. "pattern": "^evt_"
  23898. },
  23899. "seq": {
  23900. "type": "number"
  23901. },
  23902. "aggregateID": {
  23903. "type": "string"
  23904. },
  23905. "data": {
  23906. "type": "object",
  23907. "properties": {
  23908. "timestamp": {
  23909. "type": "number"
  23910. },
  23911. "sessionID": {
  23912. "type": "string",
  23913. "pattern": "^ses"
  23914. },
  23915. "messageID": {
  23916. "type": "string",
  23917. "pattern": "^msg_"
  23918. },
  23919. "reason": {
  23920. "type": "string",
  23921. "enum": ["auto", "manual"]
  23922. },
  23923. "text": {
  23924. "type": "string"
  23925. },
  23926. "recent": {
  23927. "type": "string"
  23928. }
  23929. },
  23930. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  23931. "additionalProperties": false
  23932. }
  23933. },
  23934. "required": ["type", "id", "seq", "aggregateID", "data"],
  23935. "additionalProperties": false
  23936. }
  23937. },
  23938. "required": ["type", "id", "syncEvent"],
  23939. "additionalProperties": false
  23940. },
  23941. "PolicyEffect": {
  23942. "type": "string",
  23943. "enum": ["allow", "deny"]
  23944. },
  23945. "ConfigV2ExperimentalPolicy": {
  23946. "type": "object",
  23947. "properties": {
  23948. "action": {
  23949. "type": "string",
  23950. "enum": ["provider.use"]
  23951. },
  23952. "effect": {
  23953. "$ref": "#/components/schemas/PolicyEffect"
  23954. },
  23955. "resource": {
  23956. "type": "string"
  23957. }
  23958. },
  23959. "required": ["action", "effect", "resource"],
  23960. "additionalProperties": false
  23961. },
  23962. "ProjectDirectories": {
  23963. "type": "array",
  23964. "items": {
  23965. "type": "string"
  23966. }
  23967. },
  23968. "ProjectCopyCopy": {
  23969. "type": "object",
  23970. "properties": {
  23971. "directory": {
  23972. "type": "string"
  23973. }
  23974. },
  23975. "required": ["directory"],
  23976. "additionalProperties": false
  23977. },
  23978. "LocationInfo": {
  23979. "type": "object",
  23980. "properties": {
  23981. "directory": {
  23982. "type": "string"
  23983. },
  23984. "workspaceID": {
  23985. "type": "string",
  23986. "pattern": "^wrk"
  23987. },
  23988. "project": {
  23989. "type": "object",
  23990. "properties": {
  23991. "id": {
  23992. "type": "string"
  23993. },
  23994. "directory": {
  23995. "type": "string"
  23996. }
  23997. },
  23998. "required": ["id", "directory"],
  23999. "additionalProperties": false
  24000. }
  24001. },
  24002. "required": ["directory", "project"],
  24003. "additionalProperties": false
  24004. },
  24005. "PermissionV2Effect": {
  24006. "type": "string",
  24007. "enum": ["allow", "deny", "ask"]
  24008. },
  24009. "PermissionV2Rule": {
  24010. "type": "object",
  24011. "properties": {
  24012. "action": {
  24013. "type": "string"
  24014. },
  24015. "resource": {
  24016. "type": "string"
  24017. },
  24018. "effect": {
  24019. "$ref": "#/components/schemas/PermissionV2Effect"
  24020. }
  24021. },
  24022. "required": ["action", "resource", "effect"],
  24023. "additionalProperties": false
  24024. },
  24025. "PermissionV2Ruleset": {
  24026. "type": "array",
  24027. "items": {
  24028. "$ref": "#/components/schemas/PermissionV2Rule"
  24029. }
  24030. },
  24031. "AgentV2Info": {
  24032. "type": "object",
  24033. "properties": {
  24034. "id": {
  24035. "type": "string"
  24036. },
  24037. "model": {
  24038. "type": "object",
  24039. "properties": {
  24040. "id": {
  24041. "type": "string"
  24042. },
  24043. "providerID": {
  24044. "type": "string"
  24045. },
  24046. "variant": {
  24047. "type": "string"
  24048. }
  24049. },
  24050. "required": ["id", "providerID"],
  24051. "additionalProperties": false
  24052. },
  24053. "request": {
  24054. "type": "object",
  24055. "properties": {
  24056. "headers": {
  24057. "type": "object",
  24058. "additionalProperties": {
  24059. "type": "string"
  24060. }
  24061. },
  24062. "body": {
  24063. "type": "object"
  24064. }
  24065. },
  24066. "required": ["headers", "body"],
  24067. "additionalProperties": false
  24068. },
  24069. "system": {
  24070. "type": "string"
  24071. },
  24072. "description": {
  24073. "type": "string"
  24074. },
  24075. "mode": {
  24076. "type": "string",
  24077. "enum": ["subagent", "primary", "all"]
  24078. },
  24079. "hidden": {
  24080. "type": "boolean"
  24081. },
  24082. "color": {
  24083. "anyOf": [
  24084. {
  24085. "type": "string",
  24086. "pattern": "^#[0-9a-fA-F]{6}$"
  24087. },
  24088. {
  24089. "type": "string",
  24090. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  24091. }
  24092. ]
  24093. },
  24094. "steps": {
  24095. "type": "integer",
  24096. "exclusiveMinimum": 0
  24097. },
  24098. "permissions": {
  24099. "$ref": "#/components/schemas/PermissionV2Ruleset"
  24100. }
  24101. },
  24102. "required": ["id", "request", "mode", "hidden", "permissions"],
  24103. "additionalProperties": false
  24104. },
  24105. "SessionV2Info": {
  24106. "type": "object",
  24107. "properties": {
  24108. "id": {
  24109. "type": "string",
  24110. "pattern": "^ses"
  24111. },
  24112. "parentID": {
  24113. "type": "string",
  24114. "pattern": "^ses"
  24115. },
  24116. "projectID": {
  24117. "type": "string"
  24118. },
  24119. "agent": {
  24120. "type": "string"
  24121. },
  24122. "model": {
  24123. "type": "object",
  24124. "properties": {
  24125. "id": {
  24126. "type": "string"
  24127. },
  24128. "providerID": {
  24129. "type": "string"
  24130. },
  24131. "variant": {
  24132. "type": "string"
  24133. }
  24134. },
  24135. "required": ["id", "providerID"],
  24136. "additionalProperties": false
  24137. },
  24138. "cost": {
  24139. "type": "number"
  24140. },
  24141. "tokens": {
  24142. "type": "object",
  24143. "properties": {
  24144. "input": {
  24145. "type": "number"
  24146. },
  24147. "output": {
  24148. "type": "number"
  24149. },
  24150. "reasoning": {
  24151. "type": "number"
  24152. },
  24153. "cache": {
  24154. "type": "object",
  24155. "properties": {
  24156. "read": {
  24157. "type": "number"
  24158. },
  24159. "write": {
  24160. "type": "number"
  24161. }
  24162. },
  24163. "required": ["read", "write"],
  24164. "additionalProperties": false
  24165. }
  24166. },
  24167. "required": ["input", "output", "reasoning", "cache"],
  24168. "additionalProperties": false
  24169. },
  24170. "time": {
  24171. "type": "object",
  24172. "properties": {
  24173. "created": {
  24174. "type": "number"
  24175. },
  24176. "updated": {
  24177. "type": "number"
  24178. },
  24179. "archived": {
  24180. "type": "number"
  24181. }
  24182. },
  24183. "required": ["created", "updated"],
  24184. "additionalProperties": false
  24185. },
  24186. "title": {
  24187. "type": "string"
  24188. },
  24189. "location": {
  24190. "$ref": "#/components/schemas/LocationRef"
  24191. },
  24192. "subpath": {
  24193. "type": "string"
  24194. }
  24195. },
  24196. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  24197. "additionalProperties": false
  24198. },
  24199. "SessionInputAdmitted": {
  24200. "type": "object",
  24201. "properties": {
  24202. "admittedSeq": {
  24203. "type": "integer",
  24204. "minimum": 0
  24205. },
  24206. "id": {
  24207. "type": "string",
  24208. "pattern": "^msg_"
  24209. },
  24210. "sessionID": {
  24211. "type": "string",
  24212. "pattern": "^ses"
  24213. },
  24214. "prompt": {
  24215. "$ref": "#/components/schemas/Prompt"
  24216. },
  24217. "delivery": {
  24218. "type": "string",
  24219. "enum": ["steer", "queue"]
  24220. },
  24221. "timeCreated": {
  24222. "type": "number"
  24223. },
  24224. "promotedSeq": {
  24225. "type": "integer",
  24226. "minimum": 0
  24227. }
  24228. },
  24229. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  24230. "additionalProperties": false
  24231. },
  24232. "SessionMessageAgentSwitched": {
  24233. "type": "object",
  24234. "properties": {
  24235. "id": {
  24236. "type": "string",
  24237. "pattern": "^msg_"
  24238. },
  24239. "metadata": {
  24240. "type": "object"
  24241. },
  24242. "time": {
  24243. "type": "object",
  24244. "properties": {
  24245. "created": {
  24246. "type": "number"
  24247. }
  24248. },
  24249. "required": ["created"],
  24250. "additionalProperties": false
  24251. },
  24252. "type": {
  24253. "type": "string",
  24254. "enum": ["agent-switched"]
  24255. },
  24256. "agent": {
  24257. "type": "string"
  24258. }
  24259. },
  24260. "required": ["id", "time", "type", "agent"],
  24261. "additionalProperties": false
  24262. },
  24263. "SessionMessageModelSwitched": {
  24264. "type": "object",
  24265. "properties": {
  24266. "id": {
  24267. "type": "string",
  24268. "pattern": "^msg_"
  24269. },
  24270. "metadata": {
  24271. "type": "object"
  24272. },
  24273. "time": {
  24274. "type": "object",
  24275. "properties": {
  24276. "created": {
  24277. "type": "number"
  24278. }
  24279. },
  24280. "required": ["created"],
  24281. "additionalProperties": false
  24282. },
  24283. "type": {
  24284. "type": "string",
  24285. "enum": ["model-switched"]
  24286. },
  24287. "model": {
  24288. "type": "object",
  24289. "properties": {
  24290. "id": {
  24291. "type": "string"
  24292. },
  24293. "providerID": {
  24294. "type": "string"
  24295. },
  24296. "variant": {
  24297. "type": "string"
  24298. }
  24299. },
  24300. "required": ["id", "providerID"],
  24301. "additionalProperties": false
  24302. }
  24303. },
  24304. "required": ["id", "time", "type", "model"],
  24305. "additionalProperties": false
  24306. },
  24307. "SessionMessageUser": {
  24308. "type": "object",
  24309. "properties": {
  24310. "id": {
  24311. "type": "string",
  24312. "pattern": "^msg_"
  24313. },
  24314. "metadata": {
  24315. "type": "object"
  24316. },
  24317. "time": {
  24318. "type": "object",
  24319. "properties": {
  24320. "created": {
  24321. "type": "number"
  24322. }
  24323. },
  24324. "required": ["created"],
  24325. "additionalProperties": false
  24326. },
  24327. "text": {
  24328. "type": "string"
  24329. },
  24330. "files": {
  24331. "type": "array",
  24332. "items": {
  24333. "$ref": "#/components/schemas/PromptFileAttachment"
  24334. }
  24335. },
  24336. "agents": {
  24337. "type": "array",
  24338. "items": {
  24339. "$ref": "#/components/schemas/PromptAgentAttachment"
  24340. }
  24341. },
  24342. "references": {
  24343. "type": "array",
  24344. "items": {
  24345. "$ref": "#/components/schemas/PromptReferenceAttachment"
  24346. }
  24347. },
  24348. "type": {
  24349. "type": "string",
  24350. "enum": ["user"]
  24351. }
  24352. },
  24353. "required": ["id", "time", "text", "type"],
  24354. "additionalProperties": false
  24355. },
  24356. "SessionMessageSynthetic": {
  24357. "type": "object",
  24358. "properties": {
  24359. "id": {
  24360. "type": "string",
  24361. "pattern": "^msg_"
  24362. },
  24363. "metadata": {
  24364. "type": "object"
  24365. },
  24366. "time": {
  24367. "type": "object",
  24368. "properties": {
  24369. "created": {
  24370. "type": "number"
  24371. }
  24372. },
  24373. "required": ["created"],
  24374. "additionalProperties": false
  24375. },
  24376. "sessionID": {
  24377. "type": "string",
  24378. "pattern": "^ses"
  24379. },
  24380. "text": {
  24381. "type": "string"
  24382. },
  24383. "type": {
  24384. "type": "string",
  24385. "enum": ["synthetic"]
  24386. }
  24387. },
  24388. "required": ["id", "time", "sessionID", "text", "type"],
  24389. "additionalProperties": false
  24390. },
  24391. "SessionMessageSystem": {
  24392. "type": "object",
  24393. "properties": {
  24394. "id": {
  24395. "type": "string",
  24396. "pattern": "^msg_"
  24397. },
  24398. "metadata": {
  24399. "type": "object"
  24400. },
  24401. "time": {
  24402. "type": "object",
  24403. "properties": {
  24404. "created": {
  24405. "type": "number"
  24406. }
  24407. },
  24408. "required": ["created"],
  24409. "additionalProperties": false
  24410. },
  24411. "type": {
  24412. "type": "string",
  24413. "enum": ["system"]
  24414. },
  24415. "text": {
  24416. "type": "string"
  24417. }
  24418. },
  24419. "required": ["id", "time", "type", "text"],
  24420. "additionalProperties": false
  24421. },
  24422. "SessionMessageShell": {
  24423. "type": "object",
  24424. "properties": {
  24425. "id": {
  24426. "type": "string",
  24427. "pattern": "^msg_"
  24428. },
  24429. "metadata": {
  24430. "type": "object"
  24431. },
  24432. "time": {
  24433. "type": "object",
  24434. "properties": {
  24435. "created": {
  24436. "type": "number"
  24437. },
  24438. "completed": {
  24439. "type": "number"
  24440. }
  24441. },
  24442. "required": ["created"],
  24443. "additionalProperties": false
  24444. },
  24445. "type": {
  24446. "type": "string",
  24447. "enum": ["shell"]
  24448. },
  24449. "callID": {
  24450. "type": "string"
  24451. },
  24452. "command": {
  24453. "type": "string"
  24454. },
  24455. "output": {
  24456. "type": "string"
  24457. }
  24458. },
  24459. "required": ["id", "time", "type", "callID", "command", "output"],
  24460. "additionalProperties": false
  24461. },
  24462. "SessionMessageAssistantText": {
  24463. "type": "object",
  24464. "properties": {
  24465. "type": {
  24466. "type": "string",
  24467. "enum": ["text"]
  24468. },
  24469. "id": {
  24470. "type": "string"
  24471. },
  24472. "text": {
  24473. "type": "string"
  24474. }
  24475. },
  24476. "required": ["type", "id", "text"],
  24477. "additionalProperties": false
  24478. },
  24479. "SessionMessageAssistantReasoning": {
  24480. "type": "object",
  24481. "properties": {
  24482. "type": {
  24483. "type": "string",
  24484. "enum": ["reasoning"]
  24485. },
  24486. "id": {
  24487. "type": "string"
  24488. },
  24489. "text": {
  24490. "type": "string"
  24491. },
  24492. "providerMetadata": {
  24493. "type": "object",
  24494. "additionalProperties": {
  24495. "type": "object"
  24496. }
  24497. }
  24498. },
  24499. "required": ["type", "id", "text"],
  24500. "additionalProperties": false
  24501. },
  24502. "SessionMessageToolStatePending": {
  24503. "type": "object",
  24504. "properties": {
  24505. "status": {
  24506. "type": "string",
  24507. "enum": ["pending"]
  24508. },
  24509. "input": {
  24510. "type": "string"
  24511. }
  24512. },
  24513. "required": ["status", "input"],
  24514. "additionalProperties": false
  24515. },
  24516. "SessionMessageToolStateRunning": {
  24517. "type": "object",
  24518. "properties": {
  24519. "status": {
  24520. "type": "string",
  24521. "enum": ["running"]
  24522. },
  24523. "input": {
  24524. "type": "object"
  24525. },
  24526. "structured": {
  24527. "type": "object"
  24528. },
  24529. "content": {
  24530. "type": "array",
  24531. "items": {
  24532. "anyOf": [
  24533. {
  24534. "$ref": "#/components/schemas/ToolTextContent"
  24535. },
  24536. {
  24537. "$ref": "#/components/schemas/ToolFileContent"
  24538. }
  24539. ]
  24540. }
  24541. }
  24542. },
  24543. "required": ["status", "input", "structured", "content"],
  24544. "additionalProperties": false
  24545. },
  24546. "SessionMessageToolStateCompleted": {
  24547. "type": "object",
  24548. "properties": {
  24549. "status": {
  24550. "type": "string",
  24551. "enum": ["completed"]
  24552. },
  24553. "input": {
  24554. "type": "object"
  24555. },
  24556. "attachments": {
  24557. "type": "array",
  24558. "items": {
  24559. "$ref": "#/components/schemas/PromptFileAttachment"
  24560. }
  24561. },
  24562. "content": {
  24563. "type": "array",
  24564. "items": {
  24565. "anyOf": [
  24566. {
  24567. "$ref": "#/components/schemas/ToolTextContent"
  24568. },
  24569. {
  24570. "$ref": "#/components/schemas/ToolFileContent"
  24571. }
  24572. ]
  24573. }
  24574. },
  24575. "outputPaths": {
  24576. "type": "array",
  24577. "items": {
  24578. "type": "string"
  24579. }
  24580. },
  24581. "structured": {
  24582. "type": "object"
  24583. },
  24584. "result": {}
  24585. },
  24586. "required": ["status", "input", "content", "structured"],
  24587. "additionalProperties": false
  24588. },
  24589. "SessionMessageToolStateError": {
  24590. "type": "object",
  24591. "properties": {
  24592. "status": {
  24593. "type": "string",
  24594. "enum": ["error"]
  24595. },
  24596. "input": {
  24597. "type": "object"
  24598. },
  24599. "content": {
  24600. "type": "array",
  24601. "items": {
  24602. "anyOf": [
  24603. {
  24604. "$ref": "#/components/schemas/ToolTextContent"
  24605. },
  24606. {
  24607. "$ref": "#/components/schemas/ToolFileContent"
  24608. }
  24609. ]
  24610. }
  24611. },
  24612. "structured": {
  24613. "type": "object"
  24614. },
  24615. "error": {
  24616. "$ref": "#/components/schemas/SessionErrorUnknown"
  24617. },
  24618. "result": {}
  24619. },
  24620. "required": ["status", "input", "content", "structured", "error"],
  24621. "additionalProperties": false
  24622. },
  24623. "SessionMessageAssistantTool": {
  24624. "type": "object",
  24625. "properties": {
  24626. "type": {
  24627. "type": "string",
  24628. "enum": ["tool"]
  24629. },
  24630. "id": {
  24631. "type": "string"
  24632. },
  24633. "name": {
  24634. "type": "string"
  24635. },
  24636. "provider": {
  24637. "type": "object",
  24638. "properties": {
  24639. "executed": {
  24640. "type": "boolean"
  24641. },
  24642. "metadata": {
  24643. "type": "object",
  24644. "additionalProperties": {
  24645. "type": "object"
  24646. }
  24647. },
  24648. "resultMetadata": {
  24649. "type": "object",
  24650. "additionalProperties": {
  24651. "type": "object"
  24652. }
  24653. }
  24654. },
  24655. "required": ["executed"],
  24656. "additionalProperties": false
  24657. },
  24658. "state": {
  24659. "anyOf": [
  24660. {
  24661. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  24662. },
  24663. {
  24664. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  24665. },
  24666. {
  24667. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  24668. },
  24669. {
  24670. "$ref": "#/components/schemas/SessionMessageToolStateError"
  24671. }
  24672. ]
  24673. },
  24674. "time": {
  24675. "type": "object",
  24676. "properties": {
  24677. "created": {
  24678. "type": "number"
  24679. },
  24680. "ran": {
  24681. "type": "number"
  24682. },
  24683. "completed": {
  24684. "type": "number"
  24685. },
  24686. "pruned": {
  24687. "type": "number"
  24688. }
  24689. },
  24690. "required": ["created"],
  24691. "additionalProperties": false
  24692. }
  24693. },
  24694. "required": ["type", "id", "name", "state", "time"],
  24695. "additionalProperties": false
  24696. },
  24697. "SessionMessageAssistant": {
  24698. "type": "object",
  24699. "properties": {
  24700. "id": {
  24701. "type": "string",
  24702. "pattern": "^msg_"
  24703. },
  24704. "metadata": {
  24705. "type": "object"
  24706. },
  24707. "time": {
  24708. "type": "object",
  24709. "properties": {
  24710. "created": {
  24711. "type": "number"
  24712. },
  24713. "completed": {
  24714. "type": "number"
  24715. }
  24716. },
  24717. "required": ["created"],
  24718. "additionalProperties": false
  24719. },
  24720. "type": {
  24721. "type": "string",
  24722. "enum": ["assistant"]
  24723. },
  24724. "agent": {
  24725. "type": "string"
  24726. },
  24727. "model": {
  24728. "type": "object",
  24729. "properties": {
  24730. "id": {
  24731. "type": "string"
  24732. },
  24733. "providerID": {
  24734. "type": "string"
  24735. },
  24736. "variant": {
  24737. "type": "string"
  24738. }
  24739. },
  24740. "required": ["id", "providerID"],
  24741. "additionalProperties": false
  24742. },
  24743. "content": {
  24744. "type": "array",
  24745. "items": {
  24746. "anyOf": [
  24747. {
  24748. "$ref": "#/components/schemas/SessionMessageAssistantText"
  24749. },
  24750. {
  24751. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  24752. },
  24753. {
  24754. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  24755. }
  24756. ]
  24757. }
  24758. },
  24759. "snapshot": {
  24760. "type": "object",
  24761. "properties": {
  24762. "start": {
  24763. "type": "string"
  24764. },
  24765. "end": {
  24766. "type": "string"
  24767. }
  24768. },
  24769. "additionalProperties": false
  24770. },
  24771. "finish": {
  24772. "type": "string"
  24773. },
  24774. "cost": {
  24775. "type": "number"
  24776. },
  24777. "tokens": {
  24778. "type": "object",
  24779. "properties": {
  24780. "input": {
  24781. "type": "number"
  24782. },
  24783. "output": {
  24784. "type": "number"
  24785. },
  24786. "reasoning": {
  24787. "type": "number"
  24788. },
  24789. "cache": {
  24790. "type": "object",
  24791. "properties": {
  24792. "read": {
  24793. "type": "number"
  24794. },
  24795. "write": {
  24796. "type": "number"
  24797. }
  24798. },
  24799. "required": ["read", "write"],
  24800. "additionalProperties": false
  24801. }
  24802. },
  24803. "required": ["input", "output", "reasoning", "cache"],
  24804. "additionalProperties": false
  24805. },
  24806. "error": {
  24807. "$ref": "#/components/schemas/SessionErrorUnknown"
  24808. }
  24809. },
  24810. "required": ["id", "time", "type", "agent", "model", "content"],
  24811. "additionalProperties": false
  24812. },
  24813. "SessionMessageCompaction": {
  24814. "type": "object",
  24815. "properties": {
  24816. "type": {
  24817. "type": "string",
  24818. "enum": ["compaction"]
  24819. },
  24820. "reason": {
  24821. "type": "string",
  24822. "enum": ["auto", "manual"]
  24823. },
  24824. "summary": {
  24825. "type": "string"
  24826. },
  24827. "recent": {
  24828. "type": "string"
  24829. },
  24830. "id": {
  24831. "type": "string",
  24832. "pattern": "^msg_"
  24833. },
  24834. "metadata": {
  24835. "type": "object"
  24836. },
  24837. "time": {
  24838. "type": "object",
  24839. "properties": {
  24840. "created": {
  24841. "type": "number"
  24842. }
  24843. },
  24844. "required": ["created"],
  24845. "additionalProperties": false
  24846. }
  24847. },
  24848. "required": ["type", "reason", "summary", "recent", "id", "time"],
  24849. "additionalProperties": false
  24850. },
  24851. "SessionMessage": {
  24852. "anyOf": [
  24853. {
  24854. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  24855. },
  24856. {
  24857. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  24858. },
  24859. {
  24860. "$ref": "#/components/schemas/SessionMessageUser"
  24861. },
  24862. {
  24863. "$ref": "#/components/schemas/SessionMessageSynthetic"
  24864. },
  24865. {
  24866. "$ref": "#/components/schemas/SessionMessageSystem"
  24867. },
  24868. {
  24869. "$ref": "#/components/schemas/SessionMessageShell"
  24870. },
  24871. {
  24872. "$ref": "#/components/schemas/SessionMessageAssistant"
  24873. },
  24874. {
  24875. "$ref": "#/components/schemas/SessionMessageCompaction"
  24876. }
  24877. ]
  24878. },
  24879. "ProviderV2Info": {
  24880. "type": "object",
  24881. "properties": {
  24882. "id": {
  24883. "type": "string"
  24884. },
  24885. "name": {
  24886. "type": "string"
  24887. },
  24888. "enabled": {
  24889. "anyOf": [
  24890. {
  24891. "type": "boolean",
  24892. "enum": [false]
  24893. },
  24894. {
  24895. "type": "object",
  24896. "properties": {
  24897. "via": {
  24898. "type": "string",
  24899. "enum": ["env"]
  24900. },
  24901. "name": {
  24902. "type": "string"
  24903. }
  24904. },
  24905. "required": ["via", "name"],
  24906. "additionalProperties": false
  24907. },
  24908. {
  24909. "type": "object",
  24910. "properties": {
  24911. "via": {
  24912. "type": "string",
  24913. "enum": ["account"]
  24914. },
  24915. "service": {
  24916. "type": "string"
  24917. }
  24918. },
  24919. "required": ["via", "service"],
  24920. "additionalProperties": false
  24921. },
  24922. {
  24923. "type": "object",
  24924. "properties": {
  24925. "via": {
  24926. "type": "string",
  24927. "enum": ["custom"]
  24928. },
  24929. "data": {
  24930. "type": "object"
  24931. }
  24932. },
  24933. "required": ["via", "data"],
  24934. "additionalProperties": false
  24935. }
  24936. ]
  24937. },
  24938. "env": {
  24939. "type": "array",
  24940. "items": {
  24941. "type": "string"
  24942. }
  24943. },
  24944. "api": {
  24945. "anyOf": [
  24946. {
  24947. "type": "object",
  24948. "properties": {
  24949. "type": {
  24950. "type": "string",
  24951. "enum": ["aisdk"]
  24952. },
  24953. "package": {
  24954. "type": "string"
  24955. },
  24956. "url": {
  24957. "type": "string"
  24958. },
  24959. "settings": {
  24960. "type": "object"
  24961. }
  24962. },
  24963. "required": ["type", "package"],
  24964. "additionalProperties": false
  24965. },
  24966. {
  24967. "type": "object",
  24968. "properties": {
  24969. "type": {
  24970. "type": "string",
  24971. "enum": ["native"]
  24972. },
  24973. "url": {
  24974. "type": "string"
  24975. },
  24976. "settings": {
  24977. "type": "object"
  24978. }
  24979. },
  24980. "required": ["type", "settings"],
  24981. "additionalProperties": false
  24982. }
  24983. ]
  24984. },
  24985. "request": {
  24986. "type": "object",
  24987. "properties": {
  24988. "headers": {
  24989. "type": "object",
  24990. "additionalProperties": {
  24991. "type": "string"
  24992. }
  24993. },
  24994. "body": {
  24995. "type": "object"
  24996. }
  24997. },
  24998. "required": ["headers", "body"],
  24999. "additionalProperties": false
  25000. }
  25001. },
  25002. "required": ["id", "name", "enabled", "env", "api", "request"],
  25003. "additionalProperties": false
  25004. },
  25005. "PermissionV2Request": {
  25006. "type": "object",
  25007. "properties": {
  25008. "id": {
  25009. "type": "string",
  25010. "pattern": "^per"
  25011. },
  25012. "sessionID": {
  25013. "type": "string",
  25014. "pattern": "^ses"
  25015. },
  25016. "action": {
  25017. "type": "string"
  25018. },
  25019. "resources": {
  25020. "type": "array",
  25021. "items": {
  25022. "type": "string"
  25023. }
  25024. },
  25025. "save": {
  25026. "type": "array",
  25027. "items": {
  25028. "type": "string"
  25029. }
  25030. },
  25031. "metadata": {
  25032. "type": "object"
  25033. },
  25034. "source": {
  25035. "$ref": "#/components/schemas/PermissionV2Source"
  25036. }
  25037. },
  25038. "required": ["id", "sessionID", "action", "resources"],
  25039. "additionalProperties": false
  25040. },
  25041. "PermissionSavedInfo": {
  25042. "type": "object",
  25043. "properties": {
  25044. "id": {
  25045. "type": "string"
  25046. },
  25047. "projectID": {
  25048. "type": "string"
  25049. },
  25050. "action": {
  25051. "type": "string"
  25052. },
  25053. "resource": {
  25054. "type": "string"
  25055. }
  25056. },
  25057. "required": ["id", "projectID", "action", "resource"],
  25058. "additionalProperties": false
  25059. },
  25060. "FileSystemTextContent": {
  25061. "type": "object",
  25062. "properties": {
  25063. "type": {
  25064. "type": "string",
  25065. "enum": ["text"]
  25066. },
  25067. "content": {
  25068. "type": "string"
  25069. },
  25070. "mime": {
  25071. "type": "string"
  25072. }
  25073. },
  25074. "required": ["type", "content", "mime"],
  25075. "additionalProperties": false
  25076. },
  25077. "FileSystemBinaryContent": {
  25078. "type": "object",
  25079. "properties": {
  25080. "type": {
  25081. "type": "string",
  25082. "enum": ["binary"]
  25083. },
  25084. "content": {
  25085. "type": "string"
  25086. },
  25087. "encoding": {
  25088. "type": "string",
  25089. "enum": ["base64"]
  25090. },
  25091. "mime": {
  25092. "type": "string"
  25093. }
  25094. },
  25095. "required": ["type", "content", "encoding", "mime"],
  25096. "additionalProperties": false
  25097. },
  25098. "FileSystemEntry": {
  25099. "type": "object",
  25100. "properties": {
  25101. "path": {
  25102. "type": "string"
  25103. },
  25104. "uri": {
  25105. "type": "string"
  25106. },
  25107. "type": {
  25108. "type": "string",
  25109. "enum": ["file", "directory"]
  25110. },
  25111. "mime": {
  25112. "type": "string"
  25113. }
  25114. },
  25115. "required": ["path", "uri", "type", "mime"],
  25116. "additionalProperties": false
  25117. },
  25118. "CommandV2Info": {
  25119. "type": "object",
  25120. "properties": {
  25121. "name": {
  25122. "type": "string"
  25123. },
  25124. "template": {
  25125. "type": "string"
  25126. },
  25127. "description": {
  25128. "type": "string"
  25129. },
  25130. "agent": {
  25131. "type": "string"
  25132. },
  25133. "model": {
  25134. "type": "object",
  25135. "properties": {
  25136. "id": {
  25137. "type": "string"
  25138. },
  25139. "providerID": {
  25140. "type": "string"
  25141. },
  25142. "variant": {
  25143. "type": "string"
  25144. }
  25145. },
  25146. "required": ["id", "providerID"],
  25147. "additionalProperties": false
  25148. },
  25149. "subtask": {
  25150. "type": "boolean"
  25151. }
  25152. },
  25153. "required": ["name", "template"],
  25154. "additionalProperties": false
  25155. },
  25156. "SkillV2Info": {
  25157. "type": "object",
  25158. "properties": {
  25159. "name": {
  25160. "type": "string"
  25161. },
  25162. "description": {
  25163. "type": "string"
  25164. },
  25165. "slash": {
  25166. "type": "boolean"
  25167. },
  25168. "location": {
  25169. "type": "string"
  25170. },
  25171. "content": {
  25172. "type": "string"
  25173. }
  25174. },
  25175. "required": ["name", "location", "content"],
  25176. "additionalProperties": false
  25177. },
  25178. "QuestionV2Request": {
  25179. "type": "object",
  25180. "properties": {
  25181. "id": {
  25182. "type": "string",
  25183. "pattern": "^que"
  25184. },
  25185. "sessionID": {
  25186. "type": "string",
  25187. "pattern": "^ses"
  25188. },
  25189. "questions": {
  25190. "type": "array",
  25191. "items": {
  25192. "$ref": "#/components/schemas/QuestionV2Info"
  25193. },
  25194. "description": "Questions to ask"
  25195. },
  25196. "tool": {
  25197. "$ref": "#/components/schemas/QuestionV2Tool"
  25198. }
  25199. },
  25200. "required": ["id", "sessionID", "questions"],
  25201. "additionalProperties": false
  25202. },
  25203. "QuestionV2Reply": {
  25204. "type": "object",
  25205. "properties": {
  25206. "answers": {
  25207. "type": "array",
  25208. "items": {
  25209. "$ref": "#/components/schemas/QuestionV2Answer"
  25210. },
  25211. "description": "User answers in order of questions (each answer is an array of selected labels)"
  25212. }
  25213. },
  25214. "required": ["answers"],
  25215. "additionalProperties": false
  25216. },
  25217. "EventModels-devRefreshed": {
  25218. "type": "object",
  25219. "properties": {
  25220. "id": {
  25221. "type": "string",
  25222. "pattern": "^evt_"
  25223. },
  25224. "type": {
  25225. "type": "string",
  25226. "enum": ["models-dev.refreshed"]
  25227. },
  25228. "properties": {
  25229. "type": "object",
  25230. "properties": {}
  25231. }
  25232. },
  25233. "required": ["id", "type", "properties"],
  25234. "additionalProperties": false
  25235. },
  25236. "EventPluginAdded": {
  25237. "type": "object",
  25238. "properties": {
  25239. "id": {
  25240. "type": "string",
  25241. "pattern": "^evt_"
  25242. },
  25243. "type": {
  25244. "type": "string",
  25245. "enum": ["plugin.added"]
  25246. },
  25247. "properties": {
  25248. "type": "object",
  25249. "properties": {
  25250. "id": {
  25251. "type": "string"
  25252. }
  25253. },
  25254. "required": ["id"],
  25255. "additionalProperties": false
  25256. }
  25257. },
  25258. "required": ["id", "type", "properties"],
  25259. "additionalProperties": false
  25260. },
  25261. "ModelV2Info1": {
  25262. "type": "object",
  25263. "properties": {
  25264. "id": {
  25265. "type": "string"
  25266. },
  25267. "providerID": {
  25268. "type": "string"
  25269. },
  25270. "family": {
  25271. "type": "string"
  25272. },
  25273. "name": {
  25274. "type": "string"
  25275. },
  25276. "api": {
  25277. "anyOf": [
  25278. {
  25279. "type": "object",
  25280. "properties": {
  25281. "id": {
  25282. "type": "string"
  25283. },
  25284. "type": {
  25285. "type": "string",
  25286. "enum": ["aisdk"]
  25287. },
  25288. "package": {
  25289. "type": "string"
  25290. },
  25291. "url": {
  25292. "type": "string"
  25293. },
  25294. "settings": {
  25295. "type": "object"
  25296. }
  25297. },
  25298. "required": ["id", "type", "package"],
  25299. "additionalProperties": false
  25300. },
  25301. {
  25302. "type": "object",
  25303. "properties": {
  25304. "id": {
  25305. "type": "string"
  25306. },
  25307. "type": {
  25308. "type": "string",
  25309. "enum": ["native"]
  25310. },
  25311. "url": {
  25312. "type": "string"
  25313. },
  25314. "settings": {
  25315. "type": "object"
  25316. }
  25317. },
  25318. "required": ["id", "type", "settings"],
  25319. "additionalProperties": false
  25320. }
  25321. ]
  25322. },
  25323. "capabilities": {
  25324. "type": "object",
  25325. "properties": {
  25326. "tools": {
  25327. "type": "boolean"
  25328. },
  25329. "input": {
  25330. "type": "array",
  25331. "items": {
  25332. "type": "string"
  25333. }
  25334. },
  25335. "output": {
  25336. "type": "array",
  25337. "items": {
  25338. "type": "string"
  25339. }
  25340. }
  25341. },
  25342. "required": ["tools", "input", "output"],
  25343. "additionalProperties": false
  25344. },
  25345. "request": {
  25346. "type": "object",
  25347. "properties": {
  25348. "headers": {
  25349. "type": "object",
  25350. "additionalProperties": {
  25351. "type": "string"
  25352. }
  25353. },
  25354. "body": {
  25355. "type": "object"
  25356. },
  25357. "generation": {
  25358. "type": "object",
  25359. "properties": {
  25360. "maxTokens": {
  25361. "anyOf": [
  25362. {
  25363. "type": "number"
  25364. },
  25365. {
  25366. "type": "string",
  25367. "enum": ["NaN"]
  25368. },
  25369. {
  25370. "type": "string",
  25371. "enum": ["Infinity"]
  25372. },
  25373. {
  25374. "type": "string",
  25375. "enum": ["-Infinity"]
  25376. }
  25377. ]
  25378. },
  25379. "temperature": {
  25380. "anyOf": [
  25381. {
  25382. "type": "number"
  25383. },
  25384. {
  25385. "type": "string",
  25386. "enum": ["NaN"]
  25387. },
  25388. {
  25389. "type": "string",
  25390. "enum": ["Infinity"]
  25391. },
  25392. {
  25393. "type": "string",
  25394. "enum": ["-Infinity"]
  25395. }
  25396. ]
  25397. },
  25398. "topP": {
  25399. "anyOf": [
  25400. {
  25401. "type": "number"
  25402. },
  25403. {
  25404. "type": "string",
  25405. "enum": ["NaN"]
  25406. },
  25407. {
  25408. "type": "string",
  25409. "enum": ["Infinity"]
  25410. },
  25411. {
  25412. "type": "string",
  25413. "enum": ["-Infinity"]
  25414. }
  25415. ]
  25416. },
  25417. "topK": {
  25418. "anyOf": [
  25419. {
  25420. "type": "number"
  25421. },
  25422. {
  25423. "type": "string",
  25424. "enum": ["NaN"]
  25425. },
  25426. {
  25427. "type": "string",
  25428. "enum": ["Infinity"]
  25429. },
  25430. {
  25431. "type": "string",
  25432. "enum": ["-Infinity"]
  25433. }
  25434. ]
  25435. },
  25436. "frequencyPenalty": {
  25437. "anyOf": [
  25438. {
  25439. "type": "number"
  25440. },
  25441. {
  25442. "type": "string",
  25443. "enum": ["NaN"]
  25444. },
  25445. {
  25446. "type": "string",
  25447. "enum": ["Infinity"]
  25448. },
  25449. {
  25450. "type": "string",
  25451. "enum": ["-Infinity"]
  25452. }
  25453. ]
  25454. },
  25455. "presencePenalty": {
  25456. "anyOf": [
  25457. {
  25458. "type": "number"
  25459. },
  25460. {
  25461. "type": "string",
  25462. "enum": ["NaN"]
  25463. },
  25464. {
  25465. "type": "string",
  25466. "enum": ["Infinity"]
  25467. },
  25468. {
  25469. "type": "string",
  25470. "enum": ["-Infinity"]
  25471. }
  25472. ]
  25473. },
  25474. "seed": {
  25475. "anyOf": [
  25476. {
  25477. "type": "number"
  25478. },
  25479. {
  25480. "type": "string",
  25481. "enum": ["NaN"]
  25482. },
  25483. {
  25484. "type": "string",
  25485. "enum": ["Infinity"]
  25486. },
  25487. {
  25488. "type": "string",
  25489. "enum": ["-Infinity"]
  25490. }
  25491. ]
  25492. },
  25493. "stop": {
  25494. "type": "array",
  25495. "items": {
  25496. "type": "string"
  25497. }
  25498. }
  25499. },
  25500. "additionalProperties": false
  25501. },
  25502. "options": {
  25503. "type": "object"
  25504. },
  25505. "variant": {
  25506. "type": "string"
  25507. }
  25508. },
  25509. "required": ["headers", "body"],
  25510. "additionalProperties": false
  25511. },
  25512. "variants": {
  25513. "type": "array",
  25514. "items": {
  25515. "type": "object",
  25516. "properties": {
  25517. "id": {
  25518. "type": "string"
  25519. },
  25520. "headers": {
  25521. "type": "object",
  25522. "additionalProperties": {
  25523. "type": "string"
  25524. }
  25525. },
  25526. "body": {
  25527. "type": "object"
  25528. },
  25529. "generation": {
  25530. "type": "object",
  25531. "properties": {
  25532. "maxTokens": {
  25533. "anyOf": [
  25534. {
  25535. "type": "number"
  25536. },
  25537. {
  25538. "type": "string",
  25539. "enum": ["NaN"]
  25540. },
  25541. {
  25542. "type": "string",
  25543. "enum": ["Infinity"]
  25544. },
  25545. {
  25546. "type": "string",
  25547. "enum": ["-Infinity"]
  25548. }
  25549. ]
  25550. },
  25551. "temperature": {
  25552. "anyOf": [
  25553. {
  25554. "type": "number"
  25555. },
  25556. {
  25557. "type": "string",
  25558. "enum": ["NaN"]
  25559. },
  25560. {
  25561. "type": "string",
  25562. "enum": ["Infinity"]
  25563. },
  25564. {
  25565. "type": "string",
  25566. "enum": ["-Infinity"]
  25567. }
  25568. ]
  25569. },
  25570. "topP": {
  25571. "anyOf": [
  25572. {
  25573. "type": "number"
  25574. },
  25575. {
  25576. "type": "string",
  25577. "enum": ["NaN"]
  25578. },
  25579. {
  25580. "type": "string",
  25581. "enum": ["Infinity"]
  25582. },
  25583. {
  25584. "type": "string",
  25585. "enum": ["-Infinity"]
  25586. }
  25587. ]
  25588. },
  25589. "topK": {
  25590. "anyOf": [
  25591. {
  25592. "type": "number"
  25593. },
  25594. {
  25595. "type": "string",
  25596. "enum": ["NaN"]
  25597. },
  25598. {
  25599. "type": "string",
  25600. "enum": ["Infinity"]
  25601. },
  25602. {
  25603. "type": "string",
  25604. "enum": ["-Infinity"]
  25605. }
  25606. ]
  25607. },
  25608. "frequencyPenalty": {
  25609. "anyOf": [
  25610. {
  25611. "type": "number"
  25612. },
  25613. {
  25614. "type": "string",
  25615. "enum": ["NaN"]
  25616. },
  25617. {
  25618. "type": "string",
  25619. "enum": ["Infinity"]
  25620. },
  25621. {
  25622. "type": "string",
  25623. "enum": ["-Infinity"]
  25624. }
  25625. ]
  25626. },
  25627. "presencePenalty": {
  25628. "anyOf": [
  25629. {
  25630. "type": "number"
  25631. },
  25632. {
  25633. "type": "string",
  25634. "enum": ["NaN"]
  25635. },
  25636. {
  25637. "type": "string",
  25638. "enum": ["Infinity"]
  25639. },
  25640. {
  25641. "type": "string",
  25642. "enum": ["-Infinity"]
  25643. }
  25644. ]
  25645. },
  25646. "seed": {
  25647. "anyOf": [
  25648. {
  25649. "type": "number"
  25650. },
  25651. {
  25652. "type": "string",
  25653. "enum": ["NaN"]
  25654. },
  25655. {
  25656. "type": "string",
  25657. "enum": ["Infinity"]
  25658. },
  25659. {
  25660. "type": "string",
  25661. "enum": ["-Infinity"]
  25662. }
  25663. ]
  25664. },
  25665. "stop": {
  25666. "type": "array",
  25667. "items": {
  25668. "type": "string"
  25669. }
  25670. }
  25671. },
  25672. "additionalProperties": false
  25673. },
  25674. "options": {
  25675. "type": "object"
  25676. }
  25677. },
  25678. "required": ["id", "headers", "body"],
  25679. "additionalProperties": false
  25680. }
  25681. },
  25682. "time": {
  25683. "type": "object",
  25684. "properties": {
  25685. "released": {
  25686. "anyOf": [
  25687. {
  25688. "type": "number"
  25689. },
  25690. {
  25691. "type": "string",
  25692. "enum": ["NaN"]
  25693. },
  25694. {
  25695. "type": "string",
  25696. "enum": ["Infinity"]
  25697. },
  25698. {
  25699. "type": "string",
  25700. "enum": ["-Infinity"]
  25701. }
  25702. ]
  25703. }
  25704. },
  25705. "required": ["released"],
  25706. "additionalProperties": false
  25707. },
  25708. "cost": {
  25709. "type": "array",
  25710. "items": {
  25711. "type": "object",
  25712. "properties": {
  25713. "tier": {
  25714. "type": "object",
  25715. "properties": {
  25716. "type": {
  25717. "type": "string",
  25718. "enum": ["context"]
  25719. },
  25720. "size": {
  25721. "type": "integer"
  25722. }
  25723. },
  25724. "required": ["type", "size"],
  25725. "additionalProperties": false
  25726. },
  25727. "input": {
  25728. "type": "number"
  25729. },
  25730. "output": {
  25731. "type": "number"
  25732. },
  25733. "cache": {
  25734. "type": "object",
  25735. "properties": {
  25736. "read": {
  25737. "type": "number"
  25738. },
  25739. "write": {
  25740. "type": "number"
  25741. }
  25742. },
  25743. "required": ["read", "write"],
  25744. "additionalProperties": false
  25745. }
  25746. },
  25747. "required": ["input", "output", "cache"],
  25748. "additionalProperties": false
  25749. }
  25750. },
  25751. "status": {
  25752. "type": "string",
  25753. "enum": ["alpha", "beta", "deprecated", "active"]
  25754. },
  25755. "enabled": {
  25756. "type": "boolean"
  25757. },
  25758. "limit": {
  25759. "type": "object",
  25760. "properties": {
  25761. "context": {
  25762. "type": "integer"
  25763. },
  25764. "input": {
  25765. "type": "integer"
  25766. },
  25767. "output": {
  25768. "type": "integer"
  25769. }
  25770. },
  25771. "required": ["context", "output"],
  25772. "additionalProperties": false
  25773. }
  25774. },
  25775. "required": [
  25776. "id",
  25777. "providerID",
  25778. "name",
  25779. "api",
  25780. "capabilities",
  25781. "request",
  25782. "variants",
  25783. "time",
  25784. "cost",
  25785. "status",
  25786. "enabled",
  25787. "limit"
  25788. ],
  25789. "additionalProperties": false
  25790. },
  25791. "EventCatalogModelUpdated": {
  25792. "type": "object",
  25793. "properties": {
  25794. "id": {
  25795. "type": "string",
  25796. "pattern": "^evt_"
  25797. },
  25798. "type": {
  25799. "type": "string",
  25800. "enum": ["catalog.model.updated"]
  25801. },
  25802. "properties": {
  25803. "type": "object",
  25804. "properties": {
  25805. "model": {
  25806. "$ref": "#/components/schemas/ModelV2Info1"
  25807. }
  25808. },
  25809. "required": ["model"],
  25810. "additionalProperties": false
  25811. }
  25812. },
  25813. "required": ["id", "type", "properties"],
  25814. "additionalProperties": false
  25815. },
  25816. "EventSessionCreated": {
  25817. "type": "object",
  25818. "properties": {
  25819. "id": {
  25820. "type": "string",
  25821. "pattern": "^evt_"
  25822. },
  25823. "type": {
  25824. "type": "string",
  25825. "enum": ["session.created"]
  25826. },
  25827. "properties": {
  25828. "type": "object",
  25829. "properties": {
  25830. "sessionID": {
  25831. "type": "string",
  25832. "pattern": "^ses"
  25833. },
  25834. "info": {
  25835. "$ref": "#/components/schemas/Session"
  25836. }
  25837. },
  25838. "required": ["sessionID", "info"],
  25839. "additionalProperties": false
  25840. }
  25841. },
  25842. "required": ["id", "type", "properties"],
  25843. "additionalProperties": false
  25844. },
  25845. "EventSessionUpdated": {
  25846. "type": "object",
  25847. "properties": {
  25848. "id": {
  25849. "type": "string",
  25850. "pattern": "^evt_"
  25851. },
  25852. "type": {
  25853. "type": "string",
  25854. "enum": ["session.updated"]
  25855. },
  25856. "properties": {
  25857. "type": "object",
  25858. "properties": {
  25859. "sessionID": {
  25860. "type": "string",
  25861. "pattern": "^ses"
  25862. },
  25863. "info": {
  25864. "$ref": "#/components/schemas/Session"
  25865. }
  25866. },
  25867. "required": ["sessionID", "info"],
  25868. "additionalProperties": false
  25869. }
  25870. },
  25871. "required": ["id", "type", "properties"],
  25872. "additionalProperties": false
  25873. },
  25874. "EventSessionDeleted": {
  25875. "type": "object",
  25876. "properties": {
  25877. "id": {
  25878. "type": "string",
  25879. "pattern": "^evt_"
  25880. },
  25881. "type": {
  25882. "type": "string",
  25883. "enum": ["session.deleted"]
  25884. },
  25885. "properties": {
  25886. "type": "object",
  25887. "properties": {
  25888. "sessionID": {
  25889. "type": "string",
  25890. "pattern": "^ses"
  25891. },
  25892. "info": {
  25893. "$ref": "#/components/schemas/Session"
  25894. }
  25895. },
  25896. "required": ["sessionID", "info"],
  25897. "additionalProperties": false
  25898. }
  25899. },
  25900. "required": ["id", "type", "properties"],
  25901. "additionalProperties": false
  25902. },
  25903. "EventMessageUpdated": {
  25904. "type": "object",
  25905. "properties": {
  25906. "id": {
  25907. "type": "string",
  25908. "pattern": "^evt_"
  25909. },
  25910. "type": {
  25911. "type": "string",
  25912. "enum": ["message.updated"]
  25913. },
  25914. "properties": {
  25915. "type": "object",
  25916. "properties": {
  25917. "sessionID": {
  25918. "type": "string",
  25919. "pattern": "^ses"
  25920. },
  25921. "info": {
  25922. "$ref": "#/components/schemas/Message"
  25923. }
  25924. },
  25925. "required": ["sessionID", "info"],
  25926. "additionalProperties": false
  25927. }
  25928. },
  25929. "required": ["id", "type", "properties"],
  25930. "additionalProperties": false
  25931. },
  25932. "EventMessageRemoved": {
  25933. "type": "object",
  25934. "properties": {
  25935. "id": {
  25936. "type": "string",
  25937. "pattern": "^evt_"
  25938. },
  25939. "type": {
  25940. "type": "string",
  25941. "enum": ["message.removed"]
  25942. },
  25943. "properties": {
  25944. "type": "object",
  25945. "properties": {
  25946. "sessionID": {
  25947. "type": "string",
  25948. "pattern": "^ses"
  25949. },
  25950. "messageID": {
  25951. "type": "string",
  25952. "pattern": "^msg"
  25953. }
  25954. },
  25955. "required": ["sessionID", "messageID"],
  25956. "additionalProperties": false
  25957. }
  25958. },
  25959. "required": ["id", "type", "properties"],
  25960. "additionalProperties": false
  25961. },
  25962. "EventMessagePartUpdated": {
  25963. "type": "object",
  25964. "properties": {
  25965. "id": {
  25966. "type": "string",
  25967. "pattern": "^evt_"
  25968. },
  25969. "type": {
  25970. "type": "string",
  25971. "enum": ["message.part.updated"]
  25972. },
  25973. "properties": {
  25974. "type": "object",
  25975. "properties": {
  25976. "sessionID": {
  25977. "type": "string",
  25978. "pattern": "^ses"
  25979. },
  25980. "part": {
  25981. "$ref": "#/components/schemas/Part"
  25982. },
  25983. "time": {
  25984. "type": "number"
  25985. }
  25986. },
  25987. "required": ["sessionID", "part", "time"],
  25988. "additionalProperties": false
  25989. }
  25990. },
  25991. "required": ["id", "type", "properties"],
  25992. "additionalProperties": false
  25993. },
  25994. "EventMessagePartRemoved": {
  25995. "type": "object",
  25996. "properties": {
  25997. "id": {
  25998. "type": "string",
  25999. "pattern": "^evt_"
  26000. },
  26001. "type": {
  26002. "type": "string",
  26003. "enum": ["message.part.removed"]
  26004. },
  26005. "properties": {
  26006. "type": "object",
  26007. "properties": {
  26008. "sessionID": {
  26009. "type": "string",
  26010. "pattern": "^ses"
  26011. },
  26012. "messageID": {
  26013. "type": "string",
  26014. "pattern": "^msg"
  26015. },
  26016. "partID": {
  26017. "type": "string",
  26018. "pattern": "^prt"
  26019. }
  26020. },
  26021. "required": ["sessionID", "messageID", "partID"],
  26022. "additionalProperties": false
  26023. }
  26024. },
  26025. "required": ["id", "type", "properties"],
  26026. "additionalProperties": false
  26027. },
  26028. "EventSessionNextAgentSwitched": {
  26029. "type": "object",
  26030. "properties": {
  26031. "id": {
  26032. "type": "string",
  26033. "pattern": "^evt_"
  26034. },
  26035. "type": {
  26036. "type": "string",
  26037. "enum": ["session.next.agent.switched"]
  26038. },
  26039. "properties": {
  26040. "type": "object",
  26041. "properties": {
  26042. "timestamp": {
  26043. "type": "number"
  26044. },
  26045. "sessionID": {
  26046. "type": "string",
  26047. "pattern": "^ses"
  26048. },
  26049. "messageID": {
  26050. "type": "string",
  26051. "pattern": "^msg_"
  26052. },
  26053. "agent": {
  26054. "type": "string"
  26055. }
  26056. },
  26057. "required": ["timestamp", "sessionID", "messageID", "agent"],
  26058. "additionalProperties": false
  26059. }
  26060. },
  26061. "required": ["id", "type", "properties"],
  26062. "additionalProperties": false
  26063. },
  26064. "EventSessionNextModelSwitched": {
  26065. "type": "object",
  26066. "properties": {
  26067. "id": {
  26068. "type": "string",
  26069. "pattern": "^evt_"
  26070. },
  26071. "type": {
  26072. "type": "string",
  26073. "enum": ["session.next.model.switched"]
  26074. },
  26075. "properties": {
  26076. "type": "object",
  26077. "properties": {
  26078. "timestamp": {
  26079. "type": "number"
  26080. },
  26081. "sessionID": {
  26082. "type": "string",
  26083. "pattern": "^ses"
  26084. },
  26085. "messageID": {
  26086. "type": "string",
  26087. "pattern": "^msg_"
  26088. },
  26089. "model": {
  26090. "type": "object",
  26091. "properties": {
  26092. "id": {
  26093. "type": "string"
  26094. },
  26095. "providerID": {
  26096. "type": "string"
  26097. },
  26098. "variant": {
  26099. "type": "string"
  26100. }
  26101. },
  26102. "required": ["id", "providerID"],
  26103. "additionalProperties": false
  26104. }
  26105. },
  26106. "required": ["timestamp", "sessionID", "messageID", "model"],
  26107. "additionalProperties": false
  26108. }
  26109. },
  26110. "required": ["id", "type", "properties"],
  26111. "additionalProperties": false
  26112. },
  26113. "EventSessionNextMoved": {
  26114. "type": "object",
  26115. "properties": {
  26116. "id": {
  26117. "type": "string",
  26118. "pattern": "^evt_"
  26119. },
  26120. "type": {
  26121. "type": "string",
  26122. "enum": ["session.next.moved"]
  26123. },
  26124. "properties": {
  26125. "type": "object",
  26126. "properties": {
  26127. "timestamp": {
  26128. "type": "number"
  26129. },
  26130. "sessionID": {
  26131. "type": "string",
  26132. "pattern": "^ses"
  26133. },
  26134. "location": {
  26135. "$ref": "#/components/schemas/LocationRef"
  26136. },
  26137. "subdirectory": {
  26138. "type": "string"
  26139. }
  26140. },
  26141. "required": ["timestamp", "sessionID", "location"],
  26142. "additionalProperties": false
  26143. }
  26144. },
  26145. "required": ["id", "type", "properties"],
  26146. "additionalProperties": false
  26147. },
  26148. "EventSessionNextPrompted": {
  26149. "type": "object",
  26150. "properties": {
  26151. "id": {
  26152. "type": "string",
  26153. "pattern": "^evt_"
  26154. },
  26155. "type": {
  26156. "type": "string",
  26157. "enum": ["session.next.prompted"]
  26158. },
  26159. "properties": {
  26160. "type": "object",
  26161. "properties": {
  26162. "timestamp": {
  26163. "type": "number"
  26164. },
  26165. "sessionID": {
  26166. "type": "string",
  26167. "pattern": "^ses"
  26168. },
  26169. "messageID": {
  26170. "type": "string",
  26171. "pattern": "^msg_"
  26172. },
  26173. "prompt": {
  26174. "$ref": "#/components/schemas/Prompt"
  26175. },
  26176. "delivery": {
  26177. "type": "string",
  26178. "enum": ["steer", "queue"]
  26179. }
  26180. },
  26181. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26182. "additionalProperties": false
  26183. }
  26184. },
  26185. "required": ["id", "type", "properties"],
  26186. "additionalProperties": false
  26187. },
  26188. "EventSessionNextPromptAdmitted": {
  26189. "type": "object",
  26190. "properties": {
  26191. "id": {
  26192. "type": "string",
  26193. "pattern": "^evt_"
  26194. },
  26195. "type": {
  26196. "type": "string",
  26197. "enum": ["session.next.prompt.admitted"]
  26198. },
  26199. "properties": {
  26200. "type": "object",
  26201. "properties": {
  26202. "timestamp": {
  26203. "type": "number"
  26204. },
  26205. "sessionID": {
  26206. "type": "string",
  26207. "pattern": "^ses"
  26208. },
  26209. "messageID": {
  26210. "type": "string",
  26211. "pattern": "^msg_"
  26212. },
  26213. "prompt": {
  26214. "$ref": "#/components/schemas/Prompt"
  26215. },
  26216. "delivery": {
  26217. "type": "string",
  26218. "enum": ["steer", "queue"]
  26219. }
  26220. },
  26221. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  26222. "additionalProperties": false
  26223. }
  26224. },
  26225. "required": ["id", "type", "properties"],
  26226. "additionalProperties": false
  26227. },
  26228. "EventSessionNextPromptPromoted": {
  26229. "type": "object",
  26230. "properties": {
  26231. "id": {
  26232. "type": "string",
  26233. "pattern": "^evt_"
  26234. },
  26235. "type": {
  26236. "type": "string",
  26237. "enum": ["session.next.prompt.promoted"]
  26238. },
  26239. "properties": {
  26240. "type": "object",
  26241. "properties": {
  26242. "timestamp": {
  26243. "type": "number"
  26244. },
  26245. "sessionID": {
  26246. "type": "string",
  26247. "pattern": "^ses"
  26248. },
  26249. "messageID": {
  26250. "type": "string",
  26251. "pattern": "^msg_"
  26252. },
  26253. "prompt": {
  26254. "$ref": "#/components/schemas/Prompt"
  26255. },
  26256. "timeCreated": {
  26257. "type": "number"
  26258. }
  26259. },
  26260. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  26261. "additionalProperties": false
  26262. }
  26263. },
  26264. "required": ["id", "type", "properties"],
  26265. "additionalProperties": false
  26266. },
  26267. "EventSessionNextInterruptRequested": {
  26268. "type": "object",
  26269. "properties": {
  26270. "id": {
  26271. "type": "string",
  26272. "pattern": "^evt_"
  26273. },
  26274. "type": {
  26275. "type": "string",
  26276. "enum": ["session.next.interrupt.requested"]
  26277. },
  26278. "properties": {
  26279. "type": "object",
  26280. "properties": {
  26281. "timestamp": {
  26282. "type": "number"
  26283. },
  26284. "sessionID": {
  26285. "type": "string",
  26286. "pattern": "^ses"
  26287. }
  26288. },
  26289. "required": ["timestamp", "sessionID"],
  26290. "additionalProperties": false
  26291. }
  26292. },
  26293. "required": ["id", "type", "properties"],
  26294. "additionalProperties": false
  26295. },
  26296. "EventSessionNextContextUpdated": {
  26297. "type": "object",
  26298. "properties": {
  26299. "id": {
  26300. "type": "string",
  26301. "pattern": "^evt_"
  26302. },
  26303. "type": {
  26304. "type": "string",
  26305. "enum": ["session.next.context.updated"]
  26306. },
  26307. "properties": {
  26308. "type": "object",
  26309. "properties": {
  26310. "timestamp": {
  26311. "type": "number"
  26312. },
  26313. "sessionID": {
  26314. "type": "string",
  26315. "pattern": "^ses"
  26316. },
  26317. "messageID": {
  26318. "type": "string",
  26319. "pattern": "^msg_"
  26320. },
  26321. "text": {
  26322. "type": "string"
  26323. }
  26324. },
  26325. "required": ["timestamp", "sessionID", "messageID", "text"],
  26326. "additionalProperties": false
  26327. }
  26328. },
  26329. "required": ["id", "type", "properties"],
  26330. "additionalProperties": false
  26331. },
  26332. "EventSessionNextSynthetic": {
  26333. "type": "object",
  26334. "properties": {
  26335. "id": {
  26336. "type": "string",
  26337. "pattern": "^evt_"
  26338. },
  26339. "type": {
  26340. "type": "string",
  26341. "enum": ["session.next.synthetic"]
  26342. },
  26343. "properties": {
  26344. "type": "object",
  26345. "properties": {
  26346. "timestamp": {
  26347. "type": "number"
  26348. },
  26349. "sessionID": {
  26350. "type": "string",
  26351. "pattern": "^ses"
  26352. },
  26353. "messageID": {
  26354. "type": "string",
  26355. "pattern": "^msg_"
  26356. },
  26357. "text": {
  26358. "type": "string"
  26359. }
  26360. },
  26361. "required": ["timestamp", "sessionID", "messageID", "text"],
  26362. "additionalProperties": false
  26363. }
  26364. },
  26365. "required": ["id", "type", "properties"],
  26366. "additionalProperties": false
  26367. },
  26368. "EventSessionNextShellStarted": {
  26369. "type": "object",
  26370. "properties": {
  26371. "id": {
  26372. "type": "string",
  26373. "pattern": "^evt_"
  26374. },
  26375. "type": {
  26376. "type": "string",
  26377. "enum": ["session.next.shell.started"]
  26378. },
  26379. "properties": {
  26380. "type": "object",
  26381. "properties": {
  26382. "timestamp": {
  26383. "type": "number"
  26384. },
  26385. "sessionID": {
  26386. "type": "string",
  26387. "pattern": "^ses"
  26388. },
  26389. "messageID": {
  26390. "type": "string",
  26391. "pattern": "^msg_"
  26392. },
  26393. "callID": {
  26394. "type": "string"
  26395. },
  26396. "command": {
  26397. "type": "string"
  26398. }
  26399. },
  26400. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  26401. "additionalProperties": false
  26402. }
  26403. },
  26404. "required": ["id", "type", "properties"],
  26405. "additionalProperties": false
  26406. },
  26407. "EventSessionNextShellEnded": {
  26408. "type": "object",
  26409. "properties": {
  26410. "id": {
  26411. "type": "string",
  26412. "pattern": "^evt_"
  26413. },
  26414. "type": {
  26415. "type": "string",
  26416. "enum": ["session.next.shell.ended"]
  26417. },
  26418. "properties": {
  26419. "type": "object",
  26420. "properties": {
  26421. "timestamp": {
  26422. "type": "number"
  26423. },
  26424. "sessionID": {
  26425. "type": "string",
  26426. "pattern": "^ses"
  26427. },
  26428. "callID": {
  26429. "type": "string"
  26430. },
  26431. "output": {
  26432. "type": "string"
  26433. }
  26434. },
  26435. "required": ["timestamp", "sessionID", "callID", "output"],
  26436. "additionalProperties": false
  26437. }
  26438. },
  26439. "required": ["id", "type", "properties"],
  26440. "additionalProperties": false
  26441. },
  26442. "EventSessionNextStepStarted": {
  26443. "type": "object",
  26444. "properties": {
  26445. "id": {
  26446. "type": "string",
  26447. "pattern": "^evt_"
  26448. },
  26449. "type": {
  26450. "type": "string",
  26451. "enum": ["session.next.step.started"]
  26452. },
  26453. "properties": {
  26454. "type": "object",
  26455. "properties": {
  26456. "timestamp": {
  26457. "type": "number"
  26458. },
  26459. "sessionID": {
  26460. "type": "string",
  26461. "pattern": "^ses"
  26462. },
  26463. "assistantMessageID": {
  26464. "type": "string",
  26465. "pattern": "^msg_"
  26466. },
  26467. "agent": {
  26468. "type": "string"
  26469. },
  26470. "model": {
  26471. "type": "object",
  26472. "properties": {
  26473. "id": {
  26474. "type": "string"
  26475. },
  26476. "providerID": {
  26477. "type": "string"
  26478. },
  26479. "variant": {
  26480. "type": "string"
  26481. }
  26482. },
  26483. "required": ["id", "providerID"],
  26484. "additionalProperties": false
  26485. },
  26486. "snapshot": {
  26487. "type": "string"
  26488. }
  26489. },
  26490. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  26491. "additionalProperties": false
  26492. }
  26493. },
  26494. "required": ["id", "type", "properties"],
  26495. "additionalProperties": false
  26496. },
  26497. "EventSessionNextStepEnded": {
  26498. "type": "object",
  26499. "properties": {
  26500. "id": {
  26501. "type": "string",
  26502. "pattern": "^evt_"
  26503. },
  26504. "type": {
  26505. "type": "string",
  26506. "enum": ["session.next.step.ended"]
  26507. },
  26508. "properties": {
  26509. "type": "object",
  26510. "properties": {
  26511. "timestamp": {
  26512. "type": "number"
  26513. },
  26514. "sessionID": {
  26515. "type": "string",
  26516. "pattern": "^ses"
  26517. },
  26518. "assistantMessageID": {
  26519. "type": "string",
  26520. "pattern": "^msg_"
  26521. },
  26522. "finish": {
  26523. "type": "string"
  26524. },
  26525. "cost": {
  26526. "type": "number"
  26527. },
  26528. "tokens": {
  26529. "type": "object",
  26530. "properties": {
  26531. "input": {
  26532. "type": "number"
  26533. },
  26534. "output": {
  26535. "type": "number"
  26536. },
  26537. "reasoning": {
  26538. "type": "number"
  26539. },
  26540. "cache": {
  26541. "type": "object",
  26542. "properties": {
  26543. "read": {
  26544. "type": "number"
  26545. },
  26546. "write": {
  26547. "type": "number"
  26548. }
  26549. },
  26550. "required": ["read", "write"],
  26551. "additionalProperties": false
  26552. }
  26553. },
  26554. "required": ["input", "output", "reasoning", "cache"],
  26555. "additionalProperties": false
  26556. },
  26557. "snapshot": {
  26558. "type": "string"
  26559. }
  26560. },
  26561. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  26562. "additionalProperties": false
  26563. }
  26564. },
  26565. "required": ["id", "type", "properties"],
  26566. "additionalProperties": false
  26567. },
  26568. "EventSessionNextStepFailed": {
  26569. "type": "object",
  26570. "properties": {
  26571. "id": {
  26572. "type": "string",
  26573. "pattern": "^evt_"
  26574. },
  26575. "type": {
  26576. "type": "string",
  26577. "enum": ["session.next.step.failed"]
  26578. },
  26579. "properties": {
  26580. "type": "object",
  26581. "properties": {
  26582. "timestamp": {
  26583. "type": "number"
  26584. },
  26585. "sessionID": {
  26586. "type": "string",
  26587. "pattern": "^ses"
  26588. },
  26589. "assistantMessageID": {
  26590. "type": "string",
  26591. "pattern": "^msg_"
  26592. },
  26593. "error": {
  26594. "$ref": "#/components/schemas/SessionErrorUnknown"
  26595. }
  26596. },
  26597. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  26598. "additionalProperties": false
  26599. }
  26600. },
  26601. "required": ["id", "type", "properties"],
  26602. "additionalProperties": false
  26603. },
  26604. "EventSessionNextTextStarted": {
  26605. "type": "object",
  26606. "properties": {
  26607. "id": {
  26608. "type": "string",
  26609. "pattern": "^evt_"
  26610. },
  26611. "type": {
  26612. "type": "string",
  26613. "enum": ["session.next.text.started"]
  26614. },
  26615. "properties": {
  26616. "type": "object",
  26617. "properties": {
  26618. "timestamp": {
  26619. "type": "number"
  26620. },
  26621. "sessionID": {
  26622. "type": "string",
  26623. "pattern": "^ses"
  26624. },
  26625. "assistantMessageID": {
  26626. "type": "string",
  26627. "pattern": "^msg_"
  26628. },
  26629. "textID": {
  26630. "type": "string"
  26631. }
  26632. },
  26633. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26634. "additionalProperties": false
  26635. }
  26636. },
  26637. "required": ["id", "type", "properties"],
  26638. "additionalProperties": false
  26639. },
  26640. "EventSessionNextTextDelta": {
  26641. "type": "object",
  26642. "properties": {
  26643. "id": {
  26644. "type": "string",
  26645. "pattern": "^evt_"
  26646. },
  26647. "type": {
  26648. "type": "string",
  26649. "enum": ["session.next.text.delta"]
  26650. },
  26651. "properties": {
  26652. "type": "object",
  26653. "properties": {
  26654. "timestamp": {
  26655. "type": "number"
  26656. },
  26657. "sessionID": {
  26658. "type": "string",
  26659. "pattern": "^ses"
  26660. },
  26661. "assistantMessageID": {
  26662. "type": "string",
  26663. "pattern": "^msg_"
  26664. },
  26665. "textID": {
  26666. "type": "string"
  26667. },
  26668. "delta": {
  26669. "type": "string"
  26670. }
  26671. },
  26672. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  26673. "additionalProperties": false
  26674. }
  26675. },
  26676. "required": ["id", "type", "properties"],
  26677. "additionalProperties": false
  26678. },
  26679. "EventSessionNextTextEnded": {
  26680. "type": "object",
  26681. "properties": {
  26682. "id": {
  26683. "type": "string",
  26684. "pattern": "^evt_"
  26685. },
  26686. "type": {
  26687. "type": "string",
  26688. "enum": ["session.next.text.ended"]
  26689. },
  26690. "properties": {
  26691. "type": "object",
  26692. "properties": {
  26693. "timestamp": {
  26694. "type": "number"
  26695. },
  26696. "sessionID": {
  26697. "type": "string",
  26698. "pattern": "^ses"
  26699. },
  26700. "assistantMessageID": {
  26701. "type": "string",
  26702. "pattern": "^msg_"
  26703. },
  26704. "textID": {
  26705. "type": "string"
  26706. },
  26707. "text": {
  26708. "type": "string"
  26709. }
  26710. },
  26711. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26712. "additionalProperties": false
  26713. }
  26714. },
  26715. "required": ["id", "type", "properties"],
  26716. "additionalProperties": false
  26717. },
  26718. "EventSessionNextReasoningStarted": {
  26719. "type": "object",
  26720. "properties": {
  26721. "id": {
  26722. "type": "string",
  26723. "pattern": "^evt_"
  26724. },
  26725. "type": {
  26726. "type": "string",
  26727. "enum": ["session.next.reasoning.started"]
  26728. },
  26729. "properties": {
  26730. "type": "object",
  26731. "properties": {
  26732. "timestamp": {
  26733. "type": "number"
  26734. },
  26735. "sessionID": {
  26736. "type": "string",
  26737. "pattern": "^ses"
  26738. },
  26739. "assistantMessageID": {
  26740. "type": "string",
  26741. "pattern": "^msg_"
  26742. },
  26743. "reasoningID": {
  26744. "type": "string"
  26745. },
  26746. "providerMetadata": {
  26747. "type": "object",
  26748. "additionalProperties": {
  26749. "type": "object"
  26750. }
  26751. }
  26752. },
  26753. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26754. "additionalProperties": false
  26755. }
  26756. },
  26757. "required": ["id", "type", "properties"],
  26758. "additionalProperties": false
  26759. },
  26760. "EventSessionNextReasoningDelta": {
  26761. "type": "object",
  26762. "properties": {
  26763. "id": {
  26764. "type": "string",
  26765. "pattern": "^evt_"
  26766. },
  26767. "type": {
  26768. "type": "string",
  26769. "enum": ["session.next.reasoning.delta"]
  26770. },
  26771. "properties": {
  26772. "type": "object",
  26773. "properties": {
  26774. "timestamp": {
  26775. "type": "number"
  26776. },
  26777. "sessionID": {
  26778. "type": "string",
  26779. "pattern": "^ses"
  26780. },
  26781. "assistantMessageID": {
  26782. "type": "string",
  26783. "pattern": "^msg_"
  26784. },
  26785. "reasoningID": {
  26786. "type": "string"
  26787. },
  26788. "delta": {
  26789. "type": "string"
  26790. }
  26791. },
  26792. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  26793. "additionalProperties": false
  26794. }
  26795. },
  26796. "required": ["id", "type", "properties"],
  26797. "additionalProperties": false
  26798. },
  26799. "EventSessionNextReasoningEnded": {
  26800. "type": "object",
  26801. "properties": {
  26802. "id": {
  26803. "type": "string",
  26804. "pattern": "^evt_"
  26805. },
  26806. "type": {
  26807. "type": "string",
  26808. "enum": ["session.next.reasoning.ended"]
  26809. },
  26810. "properties": {
  26811. "type": "object",
  26812. "properties": {
  26813. "timestamp": {
  26814. "type": "number"
  26815. },
  26816. "sessionID": {
  26817. "type": "string",
  26818. "pattern": "^ses"
  26819. },
  26820. "assistantMessageID": {
  26821. "type": "string",
  26822. "pattern": "^msg_"
  26823. },
  26824. "reasoningID": {
  26825. "type": "string"
  26826. },
  26827. "text": {
  26828. "type": "string"
  26829. },
  26830. "providerMetadata": {
  26831. "type": "object",
  26832. "additionalProperties": {
  26833. "type": "object"
  26834. }
  26835. }
  26836. },
  26837. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26838. "additionalProperties": false
  26839. }
  26840. },
  26841. "required": ["id", "type", "properties"],
  26842. "additionalProperties": false
  26843. },
  26844. "EventSessionNextToolInputStarted": {
  26845. "type": "object",
  26846. "properties": {
  26847. "id": {
  26848. "type": "string",
  26849. "pattern": "^evt_"
  26850. },
  26851. "type": {
  26852. "type": "string",
  26853. "enum": ["session.next.tool.input.started"]
  26854. },
  26855. "properties": {
  26856. "type": "object",
  26857. "properties": {
  26858. "timestamp": {
  26859. "type": "number"
  26860. },
  26861. "sessionID": {
  26862. "type": "string",
  26863. "pattern": "^ses"
  26864. },
  26865. "assistantMessageID": {
  26866. "type": "string",
  26867. "pattern": "^msg_"
  26868. },
  26869. "callID": {
  26870. "type": "string"
  26871. },
  26872. "name": {
  26873. "type": "string"
  26874. }
  26875. },
  26876. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26877. "additionalProperties": false
  26878. }
  26879. },
  26880. "required": ["id", "type", "properties"],
  26881. "additionalProperties": false
  26882. },
  26883. "EventSessionNextToolInputDelta": {
  26884. "type": "object",
  26885. "properties": {
  26886. "id": {
  26887. "type": "string",
  26888. "pattern": "^evt_"
  26889. },
  26890. "type": {
  26891. "type": "string",
  26892. "enum": ["session.next.tool.input.delta"]
  26893. },
  26894. "properties": {
  26895. "type": "object",
  26896. "properties": {
  26897. "timestamp": {
  26898. "type": "number"
  26899. },
  26900. "sessionID": {
  26901. "type": "string",
  26902. "pattern": "^ses"
  26903. },
  26904. "assistantMessageID": {
  26905. "type": "string",
  26906. "pattern": "^msg_"
  26907. },
  26908. "callID": {
  26909. "type": "string"
  26910. },
  26911. "delta": {
  26912. "type": "string"
  26913. }
  26914. },
  26915. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  26916. "additionalProperties": false
  26917. }
  26918. },
  26919. "required": ["id", "type", "properties"],
  26920. "additionalProperties": false
  26921. },
  26922. "EventSessionNextToolInputEnded": {
  26923. "type": "object",
  26924. "properties": {
  26925. "id": {
  26926. "type": "string",
  26927. "pattern": "^evt_"
  26928. },
  26929. "type": {
  26930. "type": "string",
  26931. "enum": ["session.next.tool.input.ended"]
  26932. },
  26933. "properties": {
  26934. "type": "object",
  26935. "properties": {
  26936. "timestamp": {
  26937. "type": "number"
  26938. },
  26939. "sessionID": {
  26940. "type": "string",
  26941. "pattern": "^ses"
  26942. },
  26943. "assistantMessageID": {
  26944. "type": "string",
  26945. "pattern": "^msg_"
  26946. },
  26947. "callID": {
  26948. "type": "string"
  26949. },
  26950. "text": {
  26951. "type": "string"
  26952. }
  26953. },
  26954. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26955. "additionalProperties": false
  26956. }
  26957. },
  26958. "required": ["id", "type", "properties"],
  26959. "additionalProperties": false
  26960. },
  26961. "EventSessionNextToolCalled": {
  26962. "type": "object",
  26963. "properties": {
  26964. "id": {
  26965. "type": "string",
  26966. "pattern": "^evt_"
  26967. },
  26968. "type": {
  26969. "type": "string",
  26970. "enum": ["session.next.tool.called"]
  26971. },
  26972. "properties": {
  26973. "type": "object",
  26974. "properties": {
  26975. "timestamp": {
  26976. "type": "number"
  26977. },
  26978. "sessionID": {
  26979. "type": "string",
  26980. "pattern": "^ses"
  26981. },
  26982. "assistantMessageID": {
  26983. "type": "string",
  26984. "pattern": "^msg_"
  26985. },
  26986. "callID": {
  26987. "type": "string"
  26988. },
  26989. "tool": {
  26990. "type": "string"
  26991. },
  26992. "input": {
  26993. "type": "object"
  26994. },
  26995. "provider": {
  26996. "type": "object",
  26997. "properties": {
  26998. "executed": {
  26999. "type": "boolean"
  27000. },
  27001. "metadata": {
  27002. "type": "object",
  27003. "additionalProperties": {
  27004. "type": "object"
  27005. }
  27006. }
  27007. },
  27008. "required": ["executed"],
  27009. "additionalProperties": false
  27010. }
  27011. },
  27012. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  27013. "additionalProperties": false
  27014. }
  27015. },
  27016. "required": ["id", "type", "properties"],
  27017. "additionalProperties": false
  27018. },
  27019. "EventSessionNextToolProgress": {
  27020. "type": "object",
  27021. "properties": {
  27022. "id": {
  27023. "type": "string",
  27024. "pattern": "^evt_"
  27025. },
  27026. "type": {
  27027. "type": "string",
  27028. "enum": ["session.next.tool.progress"]
  27029. },
  27030. "properties": {
  27031. "type": "object",
  27032. "properties": {
  27033. "timestamp": {
  27034. "type": "number"
  27035. },
  27036. "sessionID": {
  27037. "type": "string",
  27038. "pattern": "^ses"
  27039. },
  27040. "assistantMessageID": {
  27041. "type": "string",
  27042. "pattern": "^msg_"
  27043. },
  27044. "callID": {
  27045. "type": "string"
  27046. },
  27047. "structured": {
  27048. "type": "object"
  27049. },
  27050. "content": {
  27051. "type": "array",
  27052. "items": {
  27053. "anyOf": [
  27054. {
  27055. "$ref": "#/components/schemas/ToolTextContent"
  27056. },
  27057. {
  27058. "$ref": "#/components/schemas/ToolFileContent"
  27059. }
  27060. ]
  27061. }
  27062. }
  27063. },
  27064. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  27065. "additionalProperties": false
  27066. }
  27067. },
  27068. "required": ["id", "type", "properties"],
  27069. "additionalProperties": false
  27070. },
  27071. "EventSessionNextToolSuccess": {
  27072. "type": "object",
  27073. "properties": {
  27074. "id": {
  27075. "type": "string",
  27076. "pattern": "^evt_"
  27077. },
  27078. "type": {
  27079. "type": "string",
  27080. "enum": ["session.next.tool.success"]
  27081. },
  27082. "properties": {
  27083. "type": "object",
  27084. "properties": {
  27085. "timestamp": {
  27086. "type": "number"
  27087. },
  27088. "sessionID": {
  27089. "type": "string",
  27090. "pattern": "^ses"
  27091. },
  27092. "assistantMessageID": {
  27093. "type": "string",
  27094. "pattern": "^msg_"
  27095. },
  27096. "callID": {
  27097. "type": "string"
  27098. },
  27099. "structured": {
  27100. "type": "object"
  27101. },
  27102. "content": {
  27103. "type": "array",
  27104. "items": {
  27105. "anyOf": [
  27106. {
  27107. "$ref": "#/components/schemas/ToolTextContent"
  27108. },
  27109. {
  27110. "$ref": "#/components/schemas/ToolFileContent"
  27111. }
  27112. ]
  27113. }
  27114. },
  27115. "outputPaths": {
  27116. "type": "array",
  27117. "items": {
  27118. "type": "string"
  27119. }
  27120. },
  27121. "result": {},
  27122. "provider": {
  27123. "type": "object",
  27124. "properties": {
  27125. "executed": {
  27126. "type": "boolean"
  27127. },
  27128. "metadata": {
  27129. "type": "object",
  27130. "additionalProperties": {
  27131. "type": "object"
  27132. }
  27133. }
  27134. },
  27135. "required": ["executed"],
  27136. "additionalProperties": false
  27137. }
  27138. },
  27139. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  27140. "additionalProperties": false
  27141. }
  27142. },
  27143. "required": ["id", "type", "properties"],
  27144. "additionalProperties": false
  27145. },
  27146. "EventSessionNextToolFailed": {
  27147. "type": "object",
  27148. "properties": {
  27149. "id": {
  27150. "type": "string",
  27151. "pattern": "^evt_"
  27152. },
  27153. "type": {
  27154. "type": "string",
  27155. "enum": ["session.next.tool.failed"]
  27156. },
  27157. "properties": {
  27158. "type": "object",
  27159. "properties": {
  27160. "timestamp": {
  27161. "type": "number"
  27162. },
  27163. "sessionID": {
  27164. "type": "string",
  27165. "pattern": "^ses"
  27166. },
  27167. "assistantMessageID": {
  27168. "type": "string",
  27169. "pattern": "^msg_"
  27170. },
  27171. "callID": {
  27172. "type": "string"
  27173. },
  27174. "error": {
  27175. "$ref": "#/components/schemas/SessionErrorUnknown"
  27176. },
  27177. "result": {},
  27178. "provider": {
  27179. "type": "object",
  27180. "properties": {
  27181. "executed": {
  27182. "type": "boolean"
  27183. },
  27184. "metadata": {
  27185. "type": "object",
  27186. "additionalProperties": {
  27187. "type": "object"
  27188. }
  27189. }
  27190. },
  27191. "required": ["executed"],
  27192. "additionalProperties": false
  27193. }
  27194. },
  27195. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  27196. "additionalProperties": false
  27197. }
  27198. },
  27199. "required": ["id", "type", "properties"],
  27200. "additionalProperties": false
  27201. },
  27202. "EventSessionNextRetried": {
  27203. "type": "object",
  27204. "properties": {
  27205. "id": {
  27206. "type": "string",
  27207. "pattern": "^evt_"
  27208. },
  27209. "type": {
  27210. "type": "string",
  27211. "enum": ["session.next.retried"]
  27212. },
  27213. "properties": {
  27214. "type": "object",
  27215. "properties": {
  27216. "timestamp": {
  27217. "type": "number"
  27218. },
  27219. "sessionID": {
  27220. "type": "string",
  27221. "pattern": "^ses"
  27222. },
  27223. "attempt": {
  27224. "type": "number"
  27225. },
  27226. "error": {
  27227. "$ref": "#/components/schemas/SessionNextRetry_error"
  27228. }
  27229. },
  27230. "required": ["timestamp", "sessionID", "attempt", "error"],
  27231. "additionalProperties": false
  27232. }
  27233. },
  27234. "required": ["id", "type", "properties"],
  27235. "additionalProperties": false
  27236. },
  27237. "EventSessionNextCompactionStarted": {
  27238. "type": "object",
  27239. "properties": {
  27240. "id": {
  27241. "type": "string",
  27242. "pattern": "^evt_"
  27243. },
  27244. "type": {
  27245. "type": "string",
  27246. "enum": ["session.next.compaction.started"]
  27247. },
  27248. "properties": {
  27249. "type": "object",
  27250. "properties": {
  27251. "timestamp": {
  27252. "type": "number"
  27253. },
  27254. "sessionID": {
  27255. "type": "string",
  27256. "pattern": "^ses"
  27257. },
  27258. "messageID": {
  27259. "type": "string",
  27260. "pattern": "^msg_"
  27261. },
  27262. "reason": {
  27263. "type": "string",
  27264. "enum": ["auto", "manual"]
  27265. }
  27266. },
  27267. "required": ["timestamp", "sessionID", "messageID", "reason"],
  27268. "additionalProperties": false
  27269. }
  27270. },
  27271. "required": ["id", "type", "properties"],
  27272. "additionalProperties": false
  27273. },
  27274. "EventSessionNextCompactionDelta": {
  27275. "type": "object",
  27276. "properties": {
  27277. "id": {
  27278. "type": "string",
  27279. "pattern": "^evt_"
  27280. },
  27281. "type": {
  27282. "type": "string",
  27283. "enum": ["session.next.compaction.delta"]
  27284. },
  27285. "properties": {
  27286. "type": "object",
  27287. "properties": {
  27288. "timestamp": {
  27289. "type": "number"
  27290. },
  27291. "sessionID": {
  27292. "type": "string",
  27293. "pattern": "^ses"
  27294. },
  27295. "messageID": {
  27296. "type": "string",
  27297. "pattern": "^msg_"
  27298. },
  27299. "text": {
  27300. "type": "string"
  27301. }
  27302. },
  27303. "required": ["timestamp", "sessionID", "messageID", "text"],
  27304. "additionalProperties": false
  27305. }
  27306. },
  27307. "required": ["id", "type", "properties"],
  27308. "additionalProperties": false
  27309. },
  27310. "EventSessionNextCompactionEnded": {
  27311. "type": "object",
  27312. "properties": {
  27313. "id": {
  27314. "type": "string",
  27315. "pattern": "^evt_"
  27316. },
  27317. "type": {
  27318. "type": "string",
  27319. "enum": ["session.next.compaction.ended"]
  27320. },
  27321. "properties": {
  27322. "type": "object",
  27323. "properties": {
  27324. "timestamp": {
  27325. "type": "number"
  27326. },
  27327. "sessionID": {
  27328. "type": "string",
  27329. "pattern": "^ses"
  27330. },
  27331. "messageID": {
  27332. "type": "string",
  27333. "pattern": "^msg_"
  27334. },
  27335. "reason": {
  27336. "type": "string",
  27337. "enum": ["auto", "manual"]
  27338. },
  27339. "text": {
  27340. "type": "string"
  27341. },
  27342. "recent": {
  27343. "type": "string"
  27344. }
  27345. },
  27346. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  27347. "additionalProperties": false
  27348. }
  27349. },
  27350. "required": ["id", "type", "properties"],
  27351. "additionalProperties": false
  27352. },
  27353. "EventMessagePartDelta": {
  27354. "type": "object",
  27355. "properties": {
  27356. "id": {
  27357. "type": "string",
  27358. "pattern": "^evt_"
  27359. },
  27360. "type": {
  27361. "type": "string",
  27362. "enum": ["message.part.delta"]
  27363. },
  27364. "properties": {
  27365. "type": "object",
  27366. "properties": {
  27367. "sessionID": {
  27368. "type": "string",
  27369. "pattern": "^ses"
  27370. },
  27371. "messageID": {
  27372. "type": "string",
  27373. "pattern": "^msg"
  27374. },
  27375. "partID": {
  27376. "type": "string",
  27377. "pattern": "^prt"
  27378. },
  27379. "field": {
  27380. "type": "string"
  27381. },
  27382. "delta": {
  27383. "type": "string"
  27384. }
  27385. },
  27386. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  27387. "additionalProperties": false
  27388. }
  27389. },
  27390. "required": ["id", "type", "properties"],
  27391. "additionalProperties": false
  27392. },
  27393. "EventSessionDiff": {
  27394. "type": "object",
  27395. "properties": {
  27396. "id": {
  27397. "type": "string",
  27398. "pattern": "^evt_"
  27399. },
  27400. "type": {
  27401. "type": "string",
  27402. "enum": ["session.diff"]
  27403. },
  27404. "properties": {
  27405. "type": "object",
  27406. "properties": {
  27407. "sessionID": {
  27408. "type": "string",
  27409. "pattern": "^ses"
  27410. },
  27411. "diff": {
  27412. "type": "array",
  27413. "items": {
  27414. "$ref": "#/components/schemas/SnapshotFileDiff"
  27415. }
  27416. }
  27417. },
  27418. "required": ["sessionID", "diff"],
  27419. "additionalProperties": false
  27420. }
  27421. },
  27422. "required": ["id", "type", "properties"],
  27423. "additionalProperties": false
  27424. },
  27425. "EventSessionError": {
  27426. "type": "object",
  27427. "properties": {
  27428. "id": {
  27429. "type": "string",
  27430. "pattern": "^evt_"
  27431. },
  27432. "type": {
  27433. "type": "string",
  27434. "enum": ["session.error"]
  27435. },
  27436. "properties": {
  27437. "type": "object",
  27438. "properties": {
  27439. "sessionID": {
  27440. "type": "string",
  27441. "pattern": "^ses"
  27442. },
  27443. "error": {
  27444. "anyOf": [
  27445. {
  27446. "$ref": "#/components/schemas/ProviderAuthError"
  27447. },
  27448. {
  27449. "$ref": "#/components/schemas/UnknownError"
  27450. },
  27451. {
  27452. "$ref": "#/components/schemas/MessageOutputLengthError"
  27453. },
  27454. {
  27455. "$ref": "#/components/schemas/MessageAbortedError"
  27456. },
  27457. {
  27458. "$ref": "#/components/schemas/StructuredOutputError"
  27459. },
  27460. {
  27461. "$ref": "#/components/schemas/ContextOverflowError"
  27462. },
  27463. {
  27464. "$ref": "#/components/schemas/APIError"
  27465. }
  27466. ]
  27467. }
  27468. },
  27469. "additionalProperties": false
  27470. }
  27471. },
  27472. "required": ["id", "type", "properties"],
  27473. "additionalProperties": false
  27474. },
  27475. "EventInstallationUpdated": {
  27476. "type": "object",
  27477. "properties": {
  27478. "id": {
  27479. "type": "string",
  27480. "pattern": "^evt_"
  27481. },
  27482. "type": {
  27483. "type": "string",
  27484. "enum": ["installation.updated"]
  27485. },
  27486. "properties": {
  27487. "type": "object",
  27488. "properties": {
  27489. "version": {
  27490. "type": "string"
  27491. }
  27492. },
  27493. "required": ["version"],
  27494. "additionalProperties": false
  27495. }
  27496. },
  27497. "required": ["id", "type", "properties"],
  27498. "additionalProperties": false
  27499. },
  27500. "EventInstallationUpdate-available": {
  27501. "type": "object",
  27502. "properties": {
  27503. "id": {
  27504. "type": "string",
  27505. "pattern": "^evt_"
  27506. },
  27507. "type": {
  27508. "type": "string",
  27509. "enum": ["installation.update-available"]
  27510. },
  27511. "properties": {
  27512. "type": "object",
  27513. "properties": {
  27514. "version": {
  27515. "type": "string"
  27516. }
  27517. },
  27518. "required": ["version"],
  27519. "additionalProperties": false
  27520. }
  27521. },
  27522. "required": ["id", "type", "properties"],
  27523. "additionalProperties": false
  27524. },
  27525. "EventFileEdited": {
  27526. "type": "object",
  27527. "properties": {
  27528. "id": {
  27529. "type": "string",
  27530. "pattern": "^evt_"
  27531. },
  27532. "type": {
  27533. "type": "string",
  27534. "enum": ["file.edited"]
  27535. },
  27536. "properties": {
  27537. "type": "object",
  27538. "properties": {
  27539. "file": {
  27540. "type": "string"
  27541. }
  27542. },
  27543. "required": ["file"],
  27544. "additionalProperties": false
  27545. }
  27546. },
  27547. "required": ["id", "type", "properties"],
  27548. "additionalProperties": false
  27549. },
  27550. "EventAccountAdded": {
  27551. "type": "object",
  27552. "properties": {
  27553. "id": {
  27554. "type": "string",
  27555. "pattern": "^evt_"
  27556. },
  27557. "type": {
  27558. "type": "string",
  27559. "enum": ["account.added"]
  27560. },
  27561. "properties": {
  27562. "type": "object",
  27563. "properties": {
  27564. "account": {
  27565. "$ref": "#/components/schemas/AuthInfo"
  27566. }
  27567. },
  27568. "required": ["account"],
  27569. "additionalProperties": false
  27570. }
  27571. },
  27572. "required": ["id", "type", "properties"],
  27573. "additionalProperties": false
  27574. },
  27575. "EventAccountRemoved": {
  27576. "type": "object",
  27577. "properties": {
  27578. "id": {
  27579. "type": "string",
  27580. "pattern": "^evt_"
  27581. },
  27582. "type": {
  27583. "type": "string",
  27584. "enum": ["account.removed"]
  27585. },
  27586. "properties": {
  27587. "type": "object",
  27588. "properties": {
  27589. "account": {
  27590. "$ref": "#/components/schemas/AuthInfo"
  27591. }
  27592. },
  27593. "required": ["account"],
  27594. "additionalProperties": false
  27595. }
  27596. },
  27597. "required": ["id", "type", "properties"],
  27598. "additionalProperties": false
  27599. },
  27600. "EventAccountSwitched": {
  27601. "type": "object",
  27602. "properties": {
  27603. "id": {
  27604. "type": "string",
  27605. "pattern": "^evt_"
  27606. },
  27607. "type": {
  27608. "type": "string",
  27609. "enum": ["account.switched"]
  27610. },
  27611. "properties": {
  27612. "type": "object",
  27613. "properties": {
  27614. "serviceID": {
  27615. "type": "string"
  27616. },
  27617. "from": {
  27618. "type": "string"
  27619. },
  27620. "to": {
  27621. "type": "string"
  27622. }
  27623. },
  27624. "required": ["serviceID"],
  27625. "additionalProperties": false
  27626. }
  27627. },
  27628. "required": ["id", "type", "properties"],
  27629. "additionalProperties": false
  27630. },
  27631. "EventPermissionV2Asked": {
  27632. "type": "object",
  27633. "properties": {
  27634. "id": {
  27635. "type": "string",
  27636. "pattern": "^evt_"
  27637. },
  27638. "type": {
  27639. "type": "string",
  27640. "enum": ["permission.v2.asked"]
  27641. },
  27642. "properties": {
  27643. "type": "object",
  27644. "properties": {
  27645. "id": {
  27646. "type": "string",
  27647. "pattern": "^per"
  27648. },
  27649. "sessionID": {
  27650. "type": "string",
  27651. "pattern": "^ses"
  27652. },
  27653. "action": {
  27654. "type": "string"
  27655. },
  27656. "resources": {
  27657. "type": "array",
  27658. "items": {
  27659. "type": "string"
  27660. }
  27661. },
  27662. "save": {
  27663. "type": "array",
  27664. "items": {
  27665. "type": "string"
  27666. }
  27667. },
  27668. "metadata": {
  27669. "type": "object"
  27670. },
  27671. "source": {
  27672. "$ref": "#/components/schemas/PermissionV2Source"
  27673. }
  27674. },
  27675. "required": ["id", "sessionID", "action", "resources"],
  27676. "additionalProperties": false
  27677. }
  27678. },
  27679. "required": ["id", "type", "properties"],
  27680. "additionalProperties": false
  27681. },
  27682. "EventPermissionV2Replied": {
  27683. "type": "object",
  27684. "properties": {
  27685. "id": {
  27686. "type": "string",
  27687. "pattern": "^evt_"
  27688. },
  27689. "type": {
  27690. "type": "string",
  27691. "enum": ["permission.v2.replied"]
  27692. },
  27693. "properties": {
  27694. "type": "object",
  27695. "properties": {
  27696. "sessionID": {
  27697. "type": "string",
  27698. "pattern": "^ses"
  27699. },
  27700. "requestID": {
  27701. "type": "string",
  27702. "pattern": "^per"
  27703. },
  27704. "reply": {
  27705. "$ref": "#/components/schemas/PermissionV2Reply"
  27706. }
  27707. },
  27708. "required": ["sessionID", "requestID", "reply"],
  27709. "additionalProperties": false
  27710. }
  27711. },
  27712. "required": ["id", "type", "properties"],
  27713. "additionalProperties": false
  27714. },
  27715. "EventFileWatcherUpdated": {
  27716. "type": "object",
  27717. "properties": {
  27718. "id": {
  27719. "type": "string",
  27720. "pattern": "^evt_"
  27721. },
  27722. "type": {
  27723. "type": "string",
  27724. "enum": ["file.watcher.updated"]
  27725. },
  27726. "properties": {
  27727. "type": "object",
  27728. "properties": {
  27729. "file": {
  27730. "type": "string"
  27731. },
  27732. "event": {
  27733. "type": "string",
  27734. "enum": ["add", "change", "unlink"]
  27735. }
  27736. },
  27737. "required": ["file", "event"],
  27738. "additionalProperties": false
  27739. }
  27740. },
  27741. "required": ["id", "type", "properties"],
  27742. "additionalProperties": false
  27743. },
  27744. "EventPtyCreated": {
  27745. "type": "object",
  27746. "properties": {
  27747. "id": {
  27748. "type": "string",
  27749. "pattern": "^evt_"
  27750. },
  27751. "type": {
  27752. "type": "string",
  27753. "enum": ["pty.created"]
  27754. },
  27755. "properties": {
  27756. "type": "object",
  27757. "properties": {
  27758. "info": {
  27759. "$ref": "#/components/schemas/Pty"
  27760. }
  27761. },
  27762. "required": ["info"],
  27763. "additionalProperties": false
  27764. }
  27765. },
  27766. "required": ["id", "type", "properties"],
  27767. "additionalProperties": false
  27768. },
  27769. "EventPtyUpdated": {
  27770. "type": "object",
  27771. "properties": {
  27772. "id": {
  27773. "type": "string",
  27774. "pattern": "^evt_"
  27775. },
  27776. "type": {
  27777. "type": "string",
  27778. "enum": ["pty.updated"]
  27779. },
  27780. "properties": {
  27781. "type": "object",
  27782. "properties": {
  27783. "info": {
  27784. "$ref": "#/components/schemas/Pty"
  27785. }
  27786. },
  27787. "required": ["info"],
  27788. "additionalProperties": false
  27789. }
  27790. },
  27791. "required": ["id", "type", "properties"],
  27792. "additionalProperties": false
  27793. },
  27794. "EventPtyExited": {
  27795. "type": "object",
  27796. "properties": {
  27797. "id": {
  27798. "type": "string",
  27799. "pattern": "^evt_"
  27800. },
  27801. "type": {
  27802. "type": "string",
  27803. "enum": ["pty.exited"]
  27804. },
  27805. "properties": {
  27806. "type": "object",
  27807. "properties": {
  27808. "id": {
  27809. "type": "string",
  27810. "pattern": "^pty"
  27811. },
  27812. "exitCode": {
  27813. "type": "integer",
  27814. "minimum": 0
  27815. }
  27816. },
  27817. "required": ["id", "exitCode"],
  27818. "additionalProperties": false
  27819. }
  27820. },
  27821. "required": ["id", "type", "properties"],
  27822. "additionalProperties": false
  27823. },
  27824. "EventPtyDeleted": {
  27825. "type": "object",
  27826. "properties": {
  27827. "id": {
  27828. "type": "string",
  27829. "pattern": "^evt_"
  27830. },
  27831. "type": {
  27832. "type": "string",
  27833. "enum": ["pty.deleted"]
  27834. },
  27835. "properties": {
  27836. "type": "object",
  27837. "properties": {
  27838. "id": {
  27839. "type": "string",
  27840. "pattern": "^pty"
  27841. }
  27842. },
  27843. "required": ["id"],
  27844. "additionalProperties": false
  27845. }
  27846. },
  27847. "required": ["id", "type", "properties"],
  27848. "additionalProperties": false
  27849. },
  27850. "EventQuestionV2Asked": {
  27851. "type": "object",
  27852. "properties": {
  27853. "id": {
  27854. "type": "string",
  27855. "pattern": "^evt_"
  27856. },
  27857. "type": {
  27858. "type": "string",
  27859. "enum": ["question.v2.asked"]
  27860. },
  27861. "properties": {
  27862. "type": "object",
  27863. "properties": {
  27864. "id": {
  27865. "type": "string",
  27866. "pattern": "^que"
  27867. },
  27868. "sessionID": {
  27869. "type": "string",
  27870. "pattern": "^ses"
  27871. },
  27872. "questions": {
  27873. "type": "array",
  27874. "items": {
  27875. "$ref": "#/components/schemas/QuestionV2Info"
  27876. },
  27877. "description": "Questions to ask"
  27878. },
  27879. "tool": {
  27880. "$ref": "#/components/schemas/QuestionV2Tool"
  27881. }
  27882. },
  27883. "required": ["id", "sessionID", "questions"],
  27884. "additionalProperties": false
  27885. }
  27886. },
  27887. "required": ["id", "type", "properties"],
  27888. "additionalProperties": false
  27889. },
  27890. "EventQuestionV2Replied": {
  27891. "type": "object",
  27892. "properties": {
  27893. "id": {
  27894. "type": "string",
  27895. "pattern": "^evt_"
  27896. },
  27897. "type": {
  27898. "type": "string",
  27899. "enum": ["question.v2.replied"]
  27900. },
  27901. "properties": {
  27902. "type": "object",
  27903. "properties": {
  27904. "sessionID": {
  27905. "type": "string",
  27906. "pattern": "^ses"
  27907. },
  27908. "requestID": {
  27909. "type": "string",
  27910. "pattern": "^que"
  27911. },
  27912. "answers": {
  27913. "type": "array",
  27914. "items": {
  27915. "$ref": "#/components/schemas/QuestionV2Answer"
  27916. }
  27917. }
  27918. },
  27919. "required": ["sessionID", "requestID", "answers"],
  27920. "additionalProperties": false
  27921. }
  27922. },
  27923. "required": ["id", "type", "properties"],
  27924. "additionalProperties": false
  27925. },
  27926. "EventQuestionV2Rejected": {
  27927. "type": "object",
  27928. "properties": {
  27929. "id": {
  27930. "type": "string",
  27931. "pattern": "^evt_"
  27932. },
  27933. "type": {
  27934. "type": "string",
  27935. "enum": ["question.v2.rejected"]
  27936. },
  27937. "properties": {
  27938. "type": "object",
  27939. "properties": {
  27940. "sessionID": {
  27941. "type": "string",
  27942. "pattern": "^ses"
  27943. },
  27944. "requestID": {
  27945. "type": "string",
  27946. "pattern": "^que"
  27947. }
  27948. },
  27949. "required": ["sessionID", "requestID"],
  27950. "additionalProperties": false
  27951. }
  27952. },
  27953. "required": ["id", "type", "properties"],
  27954. "additionalProperties": false
  27955. },
  27956. "EventTodoUpdated": {
  27957. "type": "object",
  27958. "properties": {
  27959. "id": {
  27960. "type": "string",
  27961. "pattern": "^evt_"
  27962. },
  27963. "type": {
  27964. "type": "string",
  27965. "enum": ["todo.updated"]
  27966. },
  27967. "properties": {
  27968. "type": "object",
  27969. "properties": {
  27970. "sessionID": {
  27971. "type": "string",
  27972. "pattern": "^ses"
  27973. },
  27974. "todos": {
  27975. "type": "array",
  27976. "items": {
  27977. "$ref": "#/components/schemas/Todo"
  27978. }
  27979. }
  27980. },
  27981. "required": ["sessionID", "todos"],
  27982. "additionalProperties": false
  27983. }
  27984. },
  27985. "required": ["id", "type", "properties"],
  27986. "additionalProperties": false
  27987. },
  27988. "EventLspUpdated": {
  27989. "type": "object",
  27990. "properties": {
  27991. "id": {
  27992. "type": "string",
  27993. "pattern": "^evt_"
  27994. },
  27995. "type": {
  27996. "type": "string",
  27997. "enum": ["lsp.updated"]
  27998. },
  27999. "properties": {
  28000. "type": "object",
  28001. "properties": {}
  28002. }
  28003. },
  28004. "required": ["id", "type", "properties"],
  28005. "additionalProperties": false
  28006. },
  28007. "EventPermissionAsked": {
  28008. "type": "object",
  28009. "properties": {
  28010. "id": {
  28011. "type": "string",
  28012. "pattern": "^evt_"
  28013. },
  28014. "type": {
  28015. "type": "string",
  28016. "enum": ["permission.asked"]
  28017. },
  28018. "properties": {
  28019. "type": "object",
  28020. "properties": {
  28021. "id": {
  28022. "type": "string",
  28023. "pattern": "^per"
  28024. },
  28025. "sessionID": {
  28026. "type": "string",
  28027. "pattern": "^ses"
  28028. },
  28029. "permission": {
  28030. "type": "string"
  28031. },
  28032. "patterns": {
  28033. "type": "array",
  28034. "items": {
  28035. "type": "string"
  28036. }
  28037. },
  28038. "metadata": {
  28039. "type": "object"
  28040. },
  28041. "always": {
  28042. "type": "array",
  28043. "items": {
  28044. "type": "string"
  28045. }
  28046. },
  28047. "tool": {
  28048. "type": "object",
  28049. "properties": {
  28050. "messageID": {
  28051. "type": "string"
  28052. },
  28053. "callID": {
  28054. "type": "string"
  28055. }
  28056. },
  28057. "required": ["messageID", "callID"],
  28058. "additionalProperties": false
  28059. }
  28060. },
  28061. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  28062. "additionalProperties": false
  28063. }
  28064. },
  28065. "required": ["id", "type", "properties"],
  28066. "additionalProperties": false
  28067. },
  28068. "EventPermissionReplied": {
  28069. "type": "object",
  28070. "properties": {
  28071. "id": {
  28072. "type": "string",
  28073. "pattern": "^evt_"
  28074. },
  28075. "type": {
  28076. "type": "string",
  28077. "enum": ["permission.replied"]
  28078. },
  28079. "properties": {
  28080. "type": "object",
  28081. "properties": {
  28082. "sessionID": {
  28083. "type": "string",
  28084. "pattern": "^ses"
  28085. },
  28086. "requestID": {
  28087. "type": "string",
  28088. "pattern": "^per"
  28089. },
  28090. "reply": {
  28091. "type": "string",
  28092. "enum": ["once", "always", "reject"]
  28093. }
  28094. },
  28095. "required": ["sessionID", "requestID", "reply"],
  28096. "additionalProperties": false
  28097. }
  28098. },
  28099. "required": ["id", "type", "properties"],
  28100. "additionalProperties": false
  28101. },
  28102. "EventMcpToolsChanged": {
  28103. "type": "object",
  28104. "properties": {
  28105. "id": {
  28106. "type": "string",
  28107. "pattern": "^evt_"
  28108. },
  28109. "type": {
  28110. "type": "string",
  28111. "enum": ["mcp.tools.changed"]
  28112. },
  28113. "properties": {
  28114. "type": "object",
  28115. "properties": {
  28116. "server": {
  28117. "type": "string"
  28118. }
  28119. },
  28120. "required": ["server"],
  28121. "additionalProperties": false
  28122. }
  28123. },
  28124. "required": ["id", "type", "properties"],
  28125. "additionalProperties": false
  28126. },
  28127. "EventMcpBrowserOpenFailed": {
  28128. "type": "object",
  28129. "properties": {
  28130. "id": {
  28131. "type": "string",
  28132. "pattern": "^evt_"
  28133. },
  28134. "type": {
  28135. "type": "string",
  28136. "enum": ["mcp.browser.open.failed"]
  28137. },
  28138. "properties": {
  28139. "type": "object",
  28140. "properties": {
  28141. "mcpName": {
  28142. "type": "string"
  28143. },
  28144. "url": {
  28145. "type": "string"
  28146. }
  28147. },
  28148. "required": ["mcpName", "url"],
  28149. "additionalProperties": false
  28150. }
  28151. },
  28152. "required": ["id", "type", "properties"],
  28153. "additionalProperties": false
  28154. },
  28155. "EventCommandExecuted": {
  28156. "type": "object",
  28157. "properties": {
  28158. "id": {
  28159. "type": "string",
  28160. "pattern": "^evt_"
  28161. },
  28162. "type": {
  28163. "type": "string",
  28164. "enum": ["command.executed"]
  28165. },
  28166. "properties": {
  28167. "type": "object",
  28168. "properties": {
  28169. "name": {
  28170. "type": "string"
  28171. },
  28172. "sessionID": {
  28173. "type": "string",
  28174. "pattern": "^ses"
  28175. },
  28176. "arguments": {
  28177. "type": "string"
  28178. },
  28179. "messageID": {
  28180. "type": "string",
  28181. "pattern": "^msg"
  28182. }
  28183. },
  28184. "required": ["name", "sessionID", "arguments", "messageID"],
  28185. "additionalProperties": false
  28186. }
  28187. },
  28188. "required": ["id", "type", "properties"],
  28189. "additionalProperties": false
  28190. },
  28191. "EventProjectDirectoriesUpdated": {
  28192. "type": "object",
  28193. "properties": {
  28194. "id": {
  28195. "type": "string",
  28196. "pattern": "^evt_"
  28197. },
  28198. "type": {
  28199. "type": "string",
  28200. "enum": ["project.directories.updated"]
  28201. },
  28202. "properties": {
  28203. "type": "object",
  28204. "properties": {
  28205. "projectID": {
  28206. "type": "string"
  28207. }
  28208. },
  28209. "required": ["projectID"],
  28210. "additionalProperties": false
  28211. }
  28212. },
  28213. "required": ["id", "type", "properties"],
  28214. "additionalProperties": false
  28215. },
  28216. "EventProjectUpdated": {
  28217. "type": "object",
  28218. "properties": {
  28219. "id": {
  28220. "type": "string",
  28221. "pattern": "^evt_"
  28222. },
  28223. "type": {
  28224. "type": "string",
  28225. "enum": ["project.updated"]
  28226. },
  28227. "properties": {
  28228. "type": "object",
  28229. "properties": {
  28230. "id": {
  28231. "type": "string"
  28232. },
  28233. "worktree": {
  28234. "type": "string"
  28235. },
  28236. "vcs": {
  28237. "type": "string",
  28238. "enum": ["git"]
  28239. },
  28240. "name": {
  28241. "type": "string"
  28242. },
  28243. "icon": {
  28244. "type": "object",
  28245. "properties": {
  28246. "url": {
  28247. "type": "string"
  28248. },
  28249. "override": {
  28250. "type": "string"
  28251. },
  28252. "color": {
  28253. "type": "string"
  28254. }
  28255. },
  28256. "additionalProperties": false
  28257. },
  28258. "commands": {
  28259. "type": "object",
  28260. "properties": {
  28261. "start": {
  28262. "type": "string",
  28263. "description": "Startup script to run when creating a new workspace (worktree)"
  28264. }
  28265. },
  28266. "additionalProperties": false
  28267. },
  28268. "time": {
  28269. "type": "object",
  28270. "properties": {
  28271. "created": {
  28272. "type": "integer",
  28273. "minimum": 0
  28274. },
  28275. "updated": {
  28276. "type": "integer",
  28277. "minimum": 0
  28278. },
  28279. "initialized": {
  28280. "type": "integer",
  28281. "minimum": 0
  28282. }
  28283. },
  28284. "required": ["created", "updated"],
  28285. "additionalProperties": false
  28286. },
  28287. "sandboxes": {
  28288. "type": "array",
  28289. "items": {
  28290. "type": "string"
  28291. }
  28292. }
  28293. },
  28294. "required": ["id", "worktree", "time", "sandboxes"],
  28295. "additionalProperties": false
  28296. }
  28297. },
  28298. "required": ["id", "type", "properties"],
  28299. "additionalProperties": false
  28300. },
  28301. "EventQuestionAsked": {
  28302. "type": "object",
  28303. "properties": {
  28304. "id": {
  28305. "type": "string",
  28306. "pattern": "^evt_"
  28307. },
  28308. "type": {
  28309. "type": "string",
  28310. "enum": ["question.asked"]
  28311. },
  28312. "properties": {
  28313. "type": "object",
  28314. "properties": {
  28315. "id": {
  28316. "type": "string",
  28317. "pattern": "^que"
  28318. },
  28319. "sessionID": {
  28320. "type": "string",
  28321. "pattern": "^ses"
  28322. },
  28323. "questions": {
  28324. "type": "array",
  28325. "items": {
  28326. "$ref": "#/components/schemas/QuestionInfo"
  28327. },
  28328. "description": "Questions to ask"
  28329. },
  28330. "tool": {
  28331. "$ref": "#/components/schemas/QuestionTool"
  28332. }
  28333. },
  28334. "required": ["id", "sessionID", "questions"],
  28335. "additionalProperties": false
  28336. }
  28337. },
  28338. "required": ["id", "type", "properties"],
  28339. "additionalProperties": false
  28340. },
  28341. "EventQuestionReplied": {
  28342. "type": "object",
  28343. "properties": {
  28344. "id": {
  28345. "type": "string",
  28346. "pattern": "^evt_"
  28347. },
  28348. "type": {
  28349. "type": "string",
  28350. "enum": ["question.replied"]
  28351. },
  28352. "properties": {
  28353. "type": "object",
  28354. "properties": {
  28355. "sessionID": {
  28356. "type": "string",
  28357. "pattern": "^ses"
  28358. },
  28359. "requestID": {
  28360. "type": "string",
  28361. "pattern": "^que"
  28362. },
  28363. "answers": {
  28364. "type": "array",
  28365. "items": {
  28366. "$ref": "#/components/schemas/QuestionAnswer"
  28367. }
  28368. }
  28369. },
  28370. "required": ["sessionID", "requestID", "answers"],
  28371. "additionalProperties": false
  28372. }
  28373. },
  28374. "required": ["id", "type", "properties"],
  28375. "additionalProperties": false
  28376. },
  28377. "EventQuestionRejected": {
  28378. "type": "object",
  28379. "properties": {
  28380. "id": {
  28381. "type": "string",
  28382. "pattern": "^evt_"
  28383. },
  28384. "type": {
  28385. "type": "string",
  28386. "enum": ["question.rejected"]
  28387. },
  28388. "properties": {
  28389. "type": "object",
  28390. "properties": {
  28391. "sessionID": {
  28392. "type": "string",
  28393. "pattern": "^ses"
  28394. },
  28395. "requestID": {
  28396. "type": "string",
  28397. "pattern": "^que"
  28398. }
  28399. },
  28400. "required": ["sessionID", "requestID"],
  28401. "additionalProperties": false
  28402. }
  28403. },
  28404. "required": ["id", "type", "properties"],
  28405. "additionalProperties": false
  28406. },
  28407. "EventSessionStatus": {
  28408. "type": "object",
  28409. "properties": {
  28410. "id": {
  28411. "type": "string",
  28412. "pattern": "^evt_"
  28413. },
  28414. "type": {
  28415. "type": "string",
  28416. "enum": ["session.status"]
  28417. },
  28418. "properties": {
  28419. "type": "object",
  28420. "properties": {
  28421. "sessionID": {
  28422. "type": "string",
  28423. "pattern": "^ses"
  28424. },
  28425. "status": {
  28426. "$ref": "#/components/schemas/SessionStatus"
  28427. }
  28428. },
  28429. "required": ["sessionID", "status"],
  28430. "additionalProperties": false
  28431. }
  28432. },
  28433. "required": ["id", "type", "properties"],
  28434. "additionalProperties": false
  28435. },
  28436. "EventSessionIdle": {
  28437. "type": "object",
  28438. "properties": {
  28439. "id": {
  28440. "type": "string",
  28441. "pattern": "^evt_"
  28442. },
  28443. "type": {
  28444. "type": "string",
  28445. "enum": ["session.idle"]
  28446. },
  28447. "properties": {
  28448. "type": "object",
  28449. "properties": {
  28450. "sessionID": {
  28451. "type": "string",
  28452. "pattern": "^ses"
  28453. }
  28454. },
  28455. "required": ["sessionID"],
  28456. "additionalProperties": false
  28457. }
  28458. },
  28459. "required": ["id", "type", "properties"],
  28460. "additionalProperties": false
  28461. },
  28462. "EventSessionCompacted": {
  28463. "type": "object",
  28464. "properties": {
  28465. "id": {
  28466. "type": "string",
  28467. "pattern": "^evt_"
  28468. },
  28469. "type": {
  28470. "type": "string",
  28471. "enum": ["session.compacted"]
  28472. },
  28473. "properties": {
  28474. "type": "object",
  28475. "properties": {
  28476. "sessionID": {
  28477. "type": "string",
  28478. "pattern": "^ses"
  28479. }
  28480. },
  28481. "required": ["sessionID"],
  28482. "additionalProperties": false
  28483. }
  28484. },
  28485. "required": ["id", "type", "properties"],
  28486. "additionalProperties": false
  28487. },
  28488. "EventVcsBranchUpdated": {
  28489. "type": "object",
  28490. "properties": {
  28491. "id": {
  28492. "type": "string",
  28493. "pattern": "^evt_"
  28494. },
  28495. "type": {
  28496. "type": "string",
  28497. "enum": ["vcs.branch.updated"]
  28498. },
  28499. "properties": {
  28500. "type": "object",
  28501. "properties": {
  28502. "branch": {
  28503. "type": "string"
  28504. }
  28505. },
  28506. "additionalProperties": false
  28507. }
  28508. },
  28509. "required": ["id", "type", "properties"],
  28510. "additionalProperties": false
  28511. },
  28512. "EventWorktreeReady": {
  28513. "type": "object",
  28514. "properties": {
  28515. "id": {
  28516. "type": "string",
  28517. "pattern": "^evt_"
  28518. },
  28519. "type": {
  28520. "type": "string",
  28521. "enum": ["worktree.ready"]
  28522. },
  28523. "properties": {
  28524. "type": "object",
  28525. "properties": {
  28526. "name": {
  28527. "type": "string"
  28528. },
  28529. "branch": {
  28530. "type": "string"
  28531. }
  28532. },
  28533. "required": ["name"],
  28534. "additionalProperties": false
  28535. }
  28536. },
  28537. "required": ["id", "type", "properties"],
  28538. "additionalProperties": false
  28539. },
  28540. "EventWorktreeFailed": {
  28541. "type": "object",
  28542. "properties": {
  28543. "id": {
  28544. "type": "string",
  28545. "pattern": "^evt_"
  28546. },
  28547. "type": {
  28548. "type": "string",
  28549. "enum": ["worktree.failed"]
  28550. },
  28551. "properties": {
  28552. "type": "object",
  28553. "properties": {
  28554. "message": {
  28555. "type": "string"
  28556. }
  28557. },
  28558. "required": ["message"],
  28559. "additionalProperties": false
  28560. }
  28561. },
  28562. "required": ["id", "type", "properties"],
  28563. "additionalProperties": false
  28564. },
  28565. "EventWorkspaceReady": {
  28566. "type": "object",
  28567. "properties": {
  28568. "id": {
  28569. "type": "string",
  28570. "pattern": "^evt_"
  28571. },
  28572. "type": {
  28573. "type": "string",
  28574. "enum": ["workspace.ready"]
  28575. },
  28576. "properties": {
  28577. "type": "object",
  28578. "properties": {
  28579. "name": {
  28580. "type": "string"
  28581. }
  28582. },
  28583. "required": ["name"],
  28584. "additionalProperties": false
  28585. }
  28586. },
  28587. "required": ["id", "type", "properties"],
  28588. "additionalProperties": false
  28589. },
  28590. "EventWorkspaceFailed": {
  28591. "type": "object",
  28592. "properties": {
  28593. "id": {
  28594. "type": "string",
  28595. "pattern": "^evt_"
  28596. },
  28597. "type": {
  28598. "type": "string",
  28599. "enum": ["workspace.failed"]
  28600. },
  28601. "properties": {
  28602. "type": "object",
  28603. "properties": {
  28604. "message": {
  28605. "type": "string"
  28606. }
  28607. },
  28608. "required": ["message"],
  28609. "additionalProperties": false
  28610. }
  28611. },
  28612. "required": ["id", "type", "properties"],
  28613. "additionalProperties": false
  28614. },
  28615. "EventWorkspaceStatus": {
  28616. "type": "object",
  28617. "properties": {
  28618. "id": {
  28619. "type": "string",
  28620. "pattern": "^evt_"
  28621. },
  28622. "type": {
  28623. "type": "string",
  28624. "enum": ["workspace.status"]
  28625. },
  28626. "properties": {
  28627. "type": "object",
  28628. "properties": {
  28629. "workspaceID": {
  28630. "type": "string",
  28631. "pattern": "^wrk"
  28632. },
  28633. "status": {
  28634. "type": "string",
  28635. "enum": ["connected", "connecting", "disconnected", "error"]
  28636. }
  28637. },
  28638. "required": ["workspaceID", "status"],
  28639. "additionalProperties": false
  28640. }
  28641. },
  28642. "required": ["id", "type", "properties"],
  28643. "additionalProperties": false
  28644. },
  28645. "EventServerConnected": {
  28646. "type": "object",
  28647. "properties": {
  28648. "id": {
  28649. "type": "string",
  28650. "pattern": "^evt_"
  28651. },
  28652. "type": {
  28653. "type": "string",
  28654. "enum": ["server.connected"]
  28655. },
  28656. "properties": {
  28657. "type": "object",
  28658. "properties": {}
  28659. }
  28660. },
  28661. "required": ["id", "type", "properties"],
  28662. "additionalProperties": false
  28663. },
  28664. "EventGlobalDisposed": {
  28665. "type": "object",
  28666. "properties": {
  28667. "id": {
  28668. "type": "string",
  28669. "pattern": "^evt_"
  28670. },
  28671. "type": {
  28672. "type": "string",
  28673. "enum": ["global.disposed"]
  28674. },
  28675. "properties": {
  28676. "type": "object",
  28677. "properties": {}
  28678. }
  28679. },
  28680. "required": ["id", "type", "properties"],
  28681. "additionalProperties": false
  28682. },
  28683. "BadRequestError": {
  28684. "type": "object",
  28685. "required": ["name", "data"],
  28686. "properties": {
  28687. "name": {
  28688. "type": "string",
  28689. "enum": ["BadRequest"]
  28690. },
  28691. "data": {
  28692. "type": "object",
  28693. "required": ["message"],
  28694. "properties": {
  28695. "message": {
  28696. "type": "string"
  28697. },
  28698. "kind": {
  28699. "type": "string",
  28700. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  28701. }
  28702. }
  28703. }
  28704. }
  28705. }
  28706. }
  28707. },
  28708. "security": [],
  28709. "tags": [
  28710. {
  28711. "name": "control",
  28712. "description": "Control plane routes."
  28713. },
  28714. {
  28715. "name": "controlPlane",
  28716. "description": "Control-plane orchestration routes."
  28717. },
  28718. {
  28719. "name": "global",
  28720. "description": "Global server routes."
  28721. },
  28722. {
  28723. "name": "event",
  28724. "description": "Instance event stream route."
  28725. },
  28726. {
  28727. "name": "config",
  28728. "description": "Experimental HttpApi config routes."
  28729. },
  28730. {
  28731. "name": "experimental",
  28732. "description": "Experimental HttpApi read-only routes."
  28733. },
  28734. {
  28735. "name": "file",
  28736. "description": "Experimental HttpApi file routes."
  28737. },
  28738. {
  28739. "name": "instance",
  28740. "description": "Experimental HttpApi instance read routes."
  28741. },
  28742. {
  28743. "name": "mcp",
  28744. "description": "Experimental HttpApi MCP routes."
  28745. },
  28746. {
  28747. "name": "project",
  28748. "description": "Experimental HttpApi project routes."
  28749. },
  28750. {
  28751. "name": "projectCopy",
  28752. "description": "Project copy management routes."
  28753. },
  28754. {
  28755. "name": "pty",
  28756. "description": "Experimental HttpApi PTY routes."
  28757. },
  28758. {
  28759. "name": "question",
  28760. "description": "Question routes."
  28761. },
  28762. {
  28763. "name": "permission",
  28764. "description": "Experimental HttpApi permission routes."
  28765. },
  28766. {
  28767. "name": "provider",
  28768. "description": "Experimental HttpApi provider routes."
  28769. },
  28770. {
  28771. "name": "reference",
  28772. "description": "Configured reference routes."
  28773. },
  28774. {
  28775. "name": "session",
  28776. "description": "Experimental HttpApi session routes."
  28777. },
  28778. {
  28779. "name": "sync",
  28780. "description": "Experimental HttpApi sync routes."
  28781. },
  28782. {
  28783. "name": "tui",
  28784. "description": "Experimental HttpApi TUI routes."
  28785. },
  28786. {
  28787. "name": "workspace",
  28788. "description": "Experimental HttpApi workspace routes."
  28789. },
  28790. {
  28791. "name": "opencode HttpApi",
  28792. "description": "Experimental HttpApi surface for selected instance routes."
  28793. },
  28794. {
  28795. "name": "opencode HttpApi",
  28796. "description": "Experimental HttpApi surface for selected instance routes."
  28797. },
  28798. {
  28799. "name": "sessions",
  28800. "description": "Experimental session routes."
  28801. },
  28802. {
  28803. "name": "messages",
  28804. "description": "Experimental message routes."
  28805. },
  28806. {
  28807. "name": "models",
  28808. "description": "Experimental model routes."
  28809. },
  28810. {
  28811. "name": "providers",
  28812. "description": "Experimental provider routes."
  28813. },
  28814. {
  28815. "name": "permissions",
  28816. "description": "Experimental permission routes."
  28817. },
  28818. {
  28819. "name": "filesystem",
  28820. "description": "Experimental location-scoped filesystem routes."
  28821. },
  28822. {
  28823. "name": "commands",
  28824. "description": "Experimental command routes."
  28825. },
  28826. {
  28827. "name": "skills",
  28828. "description": "Experimental skill routes."
  28829. },
  28830. {
  28831. "name": "events",
  28832. "description": "Experimental event stream route."
  28833. },
  28834. {
  28835. "name": "session questions",
  28836. "description": "Experimental session question routes."
  28837. },
  28838. {
  28839. "name": "pty",
  28840. "description": "PTY websocket route."
  28841. }
  28842. ]
  28843. }