openapi.json 699 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028
  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. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. },
  2292. {
  2293. "name": "context",
  2294. "in": "query",
  2295. "schema": {
  2296. "type": "integer",
  2297. "minimum": 0
  2298. },
  2299. "required": false
  2300. }
  2301. ],
  2302. "responses": {
  2303. "200": {
  2304. "description": "VCS diff",
  2305. "content": {
  2306. "application/json": {
  2307. "schema": {
  2308. "type": "array",
  2309. "items": {
  2310. "$ref": "#/components/schemas/VcsFileDiff"
  2311. },
  2312. "description": "VCS diff"
  2313. }
  2314. }
  2315. }
  2316. },
  2317. "400": {
  2318. "description": "Bad request",
  2319. "content": {
  2320. "application/json": {
  2321. "schema": {
  2322. "$ref": "#/components/schemas/BadRequestError"
  2323. }
  2324. }
  2325. }
  2326. }
  2327. },
  2328. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2329. "summary": "Get VCS diff",
  2330. "x-codeSamples": [
  2331. {
  2332. "lang": "js",
  2333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2334. }
  2335. ]
  2336. }
  2337. },
  2338. "/vcs/diff/raw": {
  2339. "get": {
  2340. "tags": ["instance"],
  2341. "operationId": "vcs.diff.raw",
  2342. "parameters": [
  2343. {
  2344. "name": "directory",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string"
  2348. },
  2349. "required": false
  2350. },
  2351. {
  2352. "name": "workspace",
  2353. "in": "query",
  2354. "schema": {
  2355. "type": "string"
  2356. },
  2357. "required": false
  2358. }
  2359. ],
  2360. "responses": {
  2361. "200": {
  2362. "description": "Raw VCS diff",
  2363. "content": {
  2364. "text/x-diff; charset=utf-8": {
  2365. "schema": {
  2366. "type": "string"
  2367. }
  2368. }
  2369. }
  2370. },
  2371. "400": {
  2372. "description": "Bad request",
  2373. "content": {
  2374. "application/json": {
  2375. "schema": {
  2376. "$ref": "#/components/schemas/BadRequestError"
  2377. }
  2378. }
  2379. }
  2380. }
  2381. },
  2382. "description": "Retrieve a raw patch for current uncommitted changes.",
  2383. "summary": "Get raw VCS diff",
  2384. "x-codeSamples": [
  2385. {
  2386. "lang": "js",
  2387. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2388. }
  2389. ]
  2390. }
  2391. },
  2392. "/vcs/apply": {
  2393. "post": {
  2394. "tags": ["instance"],
  2395. "operationId": "vcs.apply",
  2396. "parameters": [
  2397. {
  2398. "name": "directory",
  2399. "in": "query",
  2400. "schema": {
  2401. "type": "string"
  2402. },
  2403. "required": false
  2404. },
  2405. {
  2406. "name": "workspace",
  2407. "in": "query",
  2408. "schema": {
  2409. "type": "string"
  2410. },
  2411. "required": false
  2412. }
  2413. ],
  2414. "responses": {
  2415. "200": {
  2416. "description": "VCS patch applied",
  2417. "content": {
  2418. "application/json": {
  2419. "schema": {
  2420. "type": "object",
  2421. "properties": {
  2422. "applied": {
  2423. "type": "boolean"
  2424. }
  2425. },
  2426. "required": ["applied"],
  2427. "additionalProperties": false,
  2428. "description": "VCS patch applied"
  2429. }
  2430. }
  2431. }
  2432. },
  2433. "400": {
  2434. "description": "VcsApplyError | InvalidRequestError",
  2435. "content": {
  2436. "application/json": {
  2437. "schema": {
  2438. "anyOf": [
  2439. {
  2440. "$ref": "#/components/schemas/VcsApplyError"
  2441. },
  2442. {
  2443. "$ref": "#/components/schemas/InvalidRequestError"
  2444. }
  2445. ]
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Apply a raw patch to the current working tree.",
  2452. "summary": "Apply VCS patch",
  2453. "requestBody": {
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "properties": {
  2459. "patch": {
  2460. "type": "string"
  2461. }
  2462. },
  2463. "required": ["patch"],
  2464. "additionalProperties": false
  2465. }
  2466. }
  2467. }
  2468. },
  2469. "x-codeSamples": [
  2470. {
  2471. "lang": "js",
  2472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2473. }
  2474. ]
  2475. }
  2476. },
  2477. "/command": {
  2478. "get": {
  2479. "tags": ["instance"],
  2480. "operationId": "command.list",
  2481. "parameters": [
  2482. {
  2483. "name": "directory",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. },
  2490. {
  2491. "name": "workspace",
  2492. "in": "query",
  2493. "schema": {
  2494. "type": "string"
  2495. },
  2496. "required": false
  2497. }
  2498. ],
  2499. "responses": {
  2500. "200": {
  2501. "description": "List of commands",
  2502. "content": {
  2503. "application/json": {
  2504. "schema": {
  2505. "type": "array",
  2506. "items": {
  2507. "$ref": "#/components/schemas/Command"
  2508. },
  2509. "description": "List of commands"
  2510. }
  2511. }
  2512. }
  2513. },
  2514. "400": {
  2515. "description": "Bad request",
  2516. "content": {
  2517. "application/json": {
  2518. "schema": {
  2519. "$ref": "#/components/schemas/BadRequestError"
  2520. }
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "description": "Get a list of all available commands in the OpenCode system.",
  2526. "summary": "List commands",
  2527. "x-codeSamples": [
  2528. {
  2529. "lang": "js",
  2530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2531. }
  2532. ]
  2533. }
  2534. },
  2535. "/agent": {
  2536. "get": {
  2537. "tags": ["instance"],
  2538. "operationId": "app.agents",
  2539. "parameters": [
  2540. {
  2541. "name": "directory",
  2542. "in": "query",
  2543. "schema": {
  2544. "type": "string"
  2545. },
  2546. "required": false
  2547. },
  2548. {
  2549. "name": "workspace",
  2550. "in": "query",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": false
  2555. }
  2556. ],
  2557. "responses": {
  2558. "200": {
  2559. "description": "List of agents",
  2560. "content": {
  2561. "application/json": {
  2562. "schema": {
  2563. "type": "array",
  2564. "items": {
  2565. "$ref": "#/components/schemas/Agent"
  2566. },
  2567. "description": "List of agents"
  2568. }
  2569. }
  2570. }
  2571. },
  2572. "400": {
  2573. "description": "Bad request",
  2574. "content": {
  2575. "application/json": {
  2576. "schema": {
  2577. "$ref": "#/components/schemas/BadRequestError"
  2578. }
  2579. }
  2580. }
  2581. }
  2582. },
  2583. "description": "Get a list of all available AI agents in the OpenCode system.",
  2584. "summary": "List agents",
  2585. "x-codeSamples": [
  2586. {
  2587. "lang": "js",
  2588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2589. }
  2590. ]
  2591. }
  2592. },
  2593. "/skill": {
  2594. "get": {
  2595. "tags": ["instance"],
  2596. "operationId": "app.skills",
  2597. "parameters": [
  2598. {
  2599. "name": "directory",
  2600. "in": "query",
  2601. "schema": {
  2602. "type": "string"
  2603. },
  2604. "required": false
  2605. },
  2606. {
  2607. "name": "workspace",
  2608. "in": "query",
  2609. "schema": {
  2610. "type": "string"
  2611. },
  2612. "required": false
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "description": "List of skills",
  2618. "content": {
  2619. "application/json": {
  2620. "schema": {
  2621. "type": "array",
  2622. "items": {
  2623. "type": "object",
  2624. "properties": {
  2625. "name": {
  2626. "type": "string"
  2627. },
  2628. "description": {
  2629. "type": "string"
  2630. },
  2631. "location": {
  2632. "type": "string"
  2633. },
  2634. "content": {
  2635. "type": "string"
  2636. }
  2637. },
  2638. "required": ["name", "location", "content"],
  2639. "additionalProperties": false
  2640. },
  2641. "description": "List of skills"
  2642. }
  2643. }
  2644. }
  2645. },
  2646. "400": {
  2647. "description": "Bad request",
  2648. "content": {
  2649. "application/json": {
  2650. "schema": {
  2651. "$ref": "#/components/schemas/BadRequestError"
  2652. }
  2653. }
  2654. }
  2655. }
  2656. },
  2657. "description": "Get a list of all available skills in the OpenCode system.",
  2658. "summary": "List skills",
  2659. "x-codeSamples": [
  2660. {
  2661. "lang": "js",
  2662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2663. }
  2664. ]
  2665. }
  2666. },
  2667. "/lsp": {
  2668. "get": {
  2669. "tags": ["instance"],
  2670. "operationId": "lsp.status",
  2671. "parameters": [
  2672. {
  2673. "name": "directory",
  2674. "in": "query",
  2675. "schema": {
  2676. "type": "string"
  2677. },
  2678. "required": false
  2679. },
  2680. {
  2681. "name": "workspace",
  2682. "in": "query",
  2683. "schema": {
  2684. "type": "string"
  2685. },
  2686. "required": false
  2687. }
  2688. ],
  2689. "responses": {
  2690. "200": {
  2691. "description": "LSP server status",
  2692. "content": {
  2693. "application/json": {
  2694. "schema": {
  2695. "type": "array",
  2696. "items": {
  2697. "$ref": "#/components/schemas/LSPStatus"
  2698. },
  2699. "description": "LSP server status"
  2700. }
  2701. }
  2702. }
  2703. },
  2704. "400": {
  2705. "description": "Bad request",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "$ref": "#/components/schemas/BadRequestError"
  2710. }
  2711. }
  2712. }
  2713. }
  2714. },
  2715. "description": "Get LSP server status",
  2716. "summary": "Get LSP status",
  2717. "x-codeSamples": [
  2718. {
  2719. "lang": "js",
  2720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2721. }
  2722. ]
  2723. }
  2724. },
  2725. "/formatter": {
  2726. "get": {
  2727. "tags": ["instance"],
  2728. "operationId": "formatter.status",
  2729. "parameters": [
  2730. {
  2731. "name": "directory",
  2732. "in": "query",
  2733. "schema": {
  2734. "type": "string"
  2735. },
  2736. "required": false
  2737. },
  2738. {
  2739. "name": "workspace",
  2740. "in": "query",
  2741. "schema": {
  2742. "type": "string"
  2743. },
  2744. "required": false
  2745. }
  2746. ],
  2747. "responses": {
  2748. "200": {
  2749. "description": "Formatter status",
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "array",
  2754. "items": {
  2755. "$ref": "#/components/schemas/FormatterStatus"
  2756. },
  2757. "description": "Formatter status"
  2758. }
  2759. }
  2760. }
  2761. },
  2762. "400": {
  2763. "description": "Bad request",
  2764. "content": {
  2765. "application/json": {
  2766. "schema": {
  2767. "$ref": "#/components/schemas/BadRequestError"
  2768. }
  2769. }
  2770. }
  2771. }
  2772. },
  2773. "description": "Get formatter status",
  2774. "summary": "Get formatter status",
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp": {
  2784. "get": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.status",
  2787. "parameters": [
  2788. {
  2789. "name": "directory",
  2790. "in": "query",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": false
  2795. },
  2796. {
  2797. "name": "workspace",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. }
  2804. ],
  2805. "responses": {
  2806. "200": {
  2807. "description": "MCP server status",
  2808. "content": {
  2809. "application/json": {
  2810. "schema": {
  2811. "type": "object",
  2812. "additionalProperties": {
  2813. "$ref": "#/components/schemas/MCPStatus"
  2814. },
  2815. "description": "MCP server status"
  2816. }
  2817. }
  2818. }
  2819. },
  2820. "400": {
  2821. "description": "Bad request",
  2822. "content": {
  2823. "application/json": {
  2824. "schema": {
  2825. "$ref": "#/components/schemas/BadRequestError"
  2826. }
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2832. "summary": "Get MCP status",
  2833. "x-codeSamples": [
  2834. {
  2835. "lang": "js",
  2836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2837. }
  2838. ]
  2839. },
  2840. "post": {
  2841. "tags": ["mcp"],
  2842. "operationId": "mcp.add",
  2843. "parameters": [
  2844. {
  2845. "name": "directory",
  2846. "in": "query",
  2847. "schema": {
  2848. "type": "string"
  2849. },
  2850. "required": false
  2851. },
  2852. {
  2853. "name": "workspace",
  2854. "in": "query",
  2855. "schema": {
  2856. "type": "string"
  2857. },
  2858. "required": false
  2859. }
  2860. ],
  2861. "responses": {
  2862. "200": {
  2863. "description": "MCP server added successfully",
  2864. "content": {
  2865. "application/json": {
  2866. "schema": {
  2867. "type": "object",
  2868. "additionalProperties": {
  2869. "$ref": "#/components/schemas/MCPStatus"
  2870. },
  2871. "description": "MCP server added successfully"
  2872. }
  2873. }
  2874. }
  2875. },
  2876. "400": {
  2877. "description": "BadRequest | InvalidRequestError",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "anyOf": [
  2882. {
  2883. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2884. },
  2885. {
  2886. "$ref": "#/components/schemas/InvalidRequestError"
  2887. }
  2888. ]
  2889. }
  2890. }
  2891. }
  2892. }
  2893. },
  2894. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2895. "summary": "Add MCP server",
  2896. "requestBody": {
  2897. "content": {
  2898. "application/json": {
  2899. "schema": {
  2900. "type": "object",
  2901. "properties": {
  2902. "name": {
  2903. "type": "string"
  2904. },
  2905. "config": {
  2906. "anyOf": [
  2907. {
  2908. "$ref": "#/components/schemas/McpLocalConfig"
  2909. },
  2910. {
  2911. "$ref": "#/components/schemas/McpRemoteConfig"
  2912. }
  2913. ]
  2914. }
  2915. },
  2916. "required": ["name", "config"],
  2917. "additionalProperties": false
  2918. }
  2919. }
  2920. }
  2921. },
  2922. "x-codeSamples": [
  2923. {
  2924. "lang": "js",
  2925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2926. }
  2927. ]
  2928. }
  2929. },
  2930. "/mcp/{name}/auth": {
  2931. "post": {
  2932. "tags": ["mcp"],
  2933. "operationId": "mcp.auth.start",
  2934. "parameters": [
  2935. {
  2936. "name": "name",
  2937. "in": "path",
  2938. "schema": {
  2939. "type": "string"
  2940. },
  2941. "required": true
  2942. },
  2943. {
  2944. "name": "directory",
  2945. "in": "query",
  2946. "schema": {
  2947. "type": "string"
  2948. },
  2949. "required": false
  2950. },
  2951. {
  2952. "name": "workspace",
  2953. "in": "query",
  2954. "schema": {
  2955. "type": "string"
  2956. },
  2957. "required": false
  2958. }
  2959. ],
  2960. "responses": {
  2961. "200": {
  2962. "description": "OAuth flow started",
  2963. "content": {
  2964. "application/json": {
  2965. "schema": {
  2966. "type": "object",
  2967. "properties": {
  2968. "authorizationUrl": {
  2969. "type": "string"
  2970. },
  2971. "oauthState": {
  2972. "type": "string"
  2973. }
  2974. },
  2975. "required": ["authorizationUrl", "oauthState"],
  2976. "additionalProperties": false,
  2977. "description": "OAuth flow started"
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "400": {
  2983. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "anyOf": [
  2988. {
  2989. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2990. },
  2991. {
  2992. "$ref": "#/components/schemas/InvalidRequestError"
  2993. }
  2994. ]
  2995. }
  2996. }
  2997. }
  2998. },
  2999. "404": {
  3000. "description": "McpServerNotFoundError",
  3001. "content": {
  3002. "application/json": {
  3003. "schema": {
  3004. "$ref": "#/components/schemas/McpServerNotFoundError"
  3005. }
  3006. }
  3007. }
  3008. }
  3009. },
  3010. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3011. "summary": "Start MCP OAuth",
  3012. "x-codeSamples": [
  3013. {
  3014. "lang": "js",
  3015. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3016. }
  3017. ]
  3018. },
  3019. "delete": {
  3020. "tags": ["mcp"],
  3021. "operationId": "mcp.auth.remove",
  3022. "parameters": [
  3023. {
  3024. "name": "name",
  3025. "in": "path",
  3026. "schema": {
  3027. "type": "string"
  3028. },
  3029. "required": true
  3030. },
  3031. {
  3032. "name": "directory",
  3033. "in": "query",
  3034. "schema": {
  3035. "type": "string"
  3036. },
  3037. "required": false
  3038. },
  3039. {
  3040. "name": "workspace",
  3041. "in": "query",
  3042. "schema": {
  3043. "type": "string"
  3044. },
  3045. "required": false
  3046. }
  3047. ],
  3048. "responses": {
  3049. "200": {
  3050. "description": "OAuth credentials removed",
  3051. "content": {
  3052. "application/json": {
  3053. "schema": {
  3054. "type": "object",
  3055. "properties": {
  3056. "success": {
  3057. "type": "boolean",
  3058. "enum": [true]
  3059. }
  3060. },
  3061. "required": ["success"],
  3062. "additionalProperties": false,
  3063. "description": "OAuth credentials removed"
  3064. }
  3065. }
  3066. }
  3067. },
  3068. "400": {
  3069. "description": "Bad request",
  3070. "content": {
  3071. "application/json": {
  3072. "schema": {
  3073. "$ref": "#/components/schemas/BadRequestError"
  3074. }
  3075. }
  3076. }
  3077. },
  3078. "404": {
  3079. "description": "McpServerNotFoundError",
  3080. "content": {
  3081. "application/json": {
  3082. "schema": {
  3083. "$ref": "#/components/schemas/McpServerNotFoundError"
  3084. }
  3085. }
  3086. }
  3087. }
  3088. },
  3089. "description": "Remove OAuth credentials for an MCP server.",
  3090. "summary": "Remove MCP OAuth",
  3091. "x-codeSamples": [
  3092. {
  3093. "lang": "js",
  3094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3095. }
  3096. ]
  3097. }
  3098. },
  3099. "/mcp/{name}/auth/callback": {
  3100. "post": {
  3101. "tags": ["mcp"],
  3102. "operationId": "mcp.auth.callback",
  3103. "parameters": [
  3104. {
  3105. "name": "name",
  3106. "in": "path",
  3107. "schema": {
  3108. "type": "string"
  3109. },
  3110. "required": true
  3111. },
  3112. {
  3113. "name": "directory",
  3114. "in": "query",
  3115. "schema": {
  3116. "type": "string"
  3117. },
  3118. "required": false
  3119. },
  3120. {
  3121. "name": "workspace",
  3122. "in": "query",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": false
  3127. }
  3128. ],
  3129. "responses": {
  3130. "200": {
  3131. "description": "OAuth authentication completed",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/MCPStatus"
  3136. }
  3137. }
  3138. }
  3139. },
  3140. "400": {
  3141. "description": "BadRequest | InvalidRequestError",
  3142. "content": {
  3143. "application/json": {
  3144. "schema": {
  3145. "anyOf": [
  3146. {
  3147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3148. },
  3149. {
  3150. "$ref": "#/components/schemas/InvalidRequestError"
  3151. }
  3152. ]
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "404": {
  3158. "description": "McpServerNotFoundError",
  3159. "content": {
  3160. "application/json": {
  3161. "schema": {
  3162. "$ref": "#/components/schemas/McpServerNotFoundError"
  3163. }
  3164. }
  3165. }
  3166. }
  3167. },
  3168. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3169. "summary": "Complete MCP OAuth",
  3170. "requestBody": {
  3171. "content": {
  3172. "application/json": {
  3173. "schema": {
  3174. "type": "object",
  3175. "properties": {
  3176. "code": {
  3177. "type": "string"
  3178. }
  3179. },
  3180. "required": ["code"],
  3181. "additionalProperties": false
  3182. }
  3183. }
  3184. }
  3185. },
  3186. "x-codeSamples": [
  3187. {
  3188. "lang": "js",
  3189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3190. }
  3191. ]
  3192. }
  3193. },
  3194. "/mcp/{name}/auth/authenticate": {
  3195. "post": {
  3196. "tags": ["mcp"],
  3197. "operationId": "mcp.auth.authenticate",
  3198. "parameters": [
  3199. {
  3200. "name": "name",
  3201. "in": "path",
  3202. "schema": {
  3203. "type": "string"
  3204. },
  3205. "required": true
  3206. },
  3207. {
  3208. "name": "directory",
  3209. "in": "query",
  3210. "schema": {
  3211. "type": "string"
  3212. },
  3213. "required": false
  3214. },
  3215. {
  3216. "name": "workspace",
  3217. "in": "query",
  3218. "schema": {
  3219. "type": "string"
  3220. },
  3221. "required": false
  3222. }
  3223. ],
  3224. "responses": {
  3225. "200": {
  3226. "description": "OAuth authentication completed",
  3227. "content": {
  3228. "application/json": {
  3229. "schema": {
  3230. "$ref": "#/components/schemas/MCPStatus"
  3231. }
  3232. }
  3233. }
  3234. },
  3235. "400": {
  3236. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3237. "content": {
  3238. "application/json": {
  3239. "schema": {
  3240. "anyOf": [
  3241. {
  3242. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3243. },
  3244. {
  3245. "$ref": "#/components/schemas/InvalidRequestError"
  3246. }
  3247. ]
  3248. }
  3249. }
  3250. }
  3251. },
  3252. "404": {
  3253. "description": "McpServerNotFoundError",
  3254. "content": {
  3255. "application/json": {
  3256. "schema": {
  3257. "$ref": "#/components/schemas/McpServerNotFoundError"
  3258. }
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "description": "Start OAuth flow and wait for callback (opens browser).",
  3264. "summary": "Authenticate MCP OAuth",
  3265. "x-codeSamples": [
  3266. {
  3267. "lang": "js",
  3268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3269. }
  3270. ]
  3271. }
  3272. },
  3273. "/mcp/{name}/connect": {
  3274. "post": {
  3275. "tags": ["mcp"],
  3276. "operationId": "mcp.connect",
  3277. "parameters": [
  3278. {
  3279. "name": "name",
  3280. "in": "path",
  3281. "schema": {
  3282. "type": "string"
  3283. },
  3284. "required": true
  3285. },
  3286. {
  3287. "name": "directory",
  3288. "in": "query",
  3289. "schema": {
  3290. "type": "string"
  3291. },
  3292. "required": false
  3293. },
  3294. {
  3295. "name": "workspace",
  3296. "in": "query",
  3297. "schema": {
  3298. "type": "string"
  3299. },
  3300. "required": false
  3301. }
  3302. ],
  3303. "responses": {
  3304. "200": {
  3305. "description": "MCP server connected successfully",
  3306. "content": {
  3307. "application/json": {
  3308. "schema": {
  3309. "type": "boolean",
  3310. "description": "MCP server connected successfully"
  3311. }
  3312. }
  3313. }
  3314. },
  3315. "400": {
  3316. "description": "Bad request",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/BadRequestError"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "404": {
  3326. "description": "McpServerNotFoundError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "$ref": "#/components/schemas/McpServerNotFoundError"
  3331. }
  3332. }
  3333. }
  3334. }
  3335. },
  3336. "description": "Connect an MCP server.",
  3337. "x-codeSamples": [
  3338. {
  3339. "lang": "js",
  3340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3341. }
  3342. ]
  3343. }
  3344. },
  3345. "/mcp/{name}/disconnect": {
  3346. "post": {
  3347. "tags": ["mcp"],
  3348. "operationId": "mcp.disconnect",
  3349. "parameters": [
  3350. {
  3351. "name": "name",
  3352. "in": "path",
  3353. "schema": {
  3354. "type": "string"
  3355. },
  3356. "required": true
  3357. },
  3358. {
  3359. "name": "directory",
  3360. "in": "query",
  3361. "schema": {
  3362. "type": "string"
  3363. },
  3364. "required": false
  3365. },
  3366. {
  3367. "name": "workspace",
  3368. "in": "query",
  3369. "schema": {
  3370. "type": "string"
  3371. },
  3372. "required": false
  3373. }
  3374. ],
  3375. "responses": {
  3376. "200": {
  3377. "description": "MCP server disconnected successfully",
  3378. "content": {
  3379. "application/json": {
  3380. "schema": {
  3381. "type": "boolean",
  3382. "description": "MCP server disconnected successfully"
  3383. }
  3384. }
  3385. }
  3386. },
  3387. "400": {
  3388. "description": "Bad request",
  3389. "content": {
  3390. "application/json": {
  3391. "schema": {
  3392. "$ref": "#/components/schemas/BadRequestError"
  3393. }
  3394. }
  3395. }
  3396. },
  3397. "404": {
  3398. "description": "McpServerNotFoundError",
  3399. "content": {
  3400. "application/json": {
  3401. "schema": {
  3402. "$ref": "#/components/schemas/McpServerNotFoundError"
  3403. }
  3404. }
  3405. }
  3406. }
  3407. },
  3408. "description": "Disconnect an MCP server.",
  3409. "x-codeSamples": [
  3410. {
  3411. "lang": "js",
  3412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3413. }
  3414. ]
  3415. }
  3416. },
  3417. "/project": {
  3418. "get": {
  3419. "tags": ["project"],
  3420. "operationId": "project.list",
  3421. "parameters": [
  3422. {
  3423. "name": "directory",
  3424. "in": "query",
  3425. "schema": {
  3426. "type": "string"
  3427. },
  3428. "required": false
  3429. },
  3430. {
  3431. "name": "workspace",
  3432. "in": "query",
  3433. "schema": {
  3434. "type": "string"
  3435. },
  3436. "required": false
  3437. }
  3438. ],
  3439. "responses": {
  3440. "200": {
  3441. "description": "List of projects",
  3442. "content": {
  3443. "application/json": {
  3444. "schema": {
  3445. "type": "array",
  3446. "items": {
  3447. "$ref": "#/components/schemas/Project"
  3448. },
  3449. "description": "List of projects"
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "400": {
  3455. "description": "Bad request",
  3456. "content": {
  3457. "application/json": {
  3458. "schema": {
  3459. "$ref": "#/components/schemas/BadRequestError"
  3460. }
  3461. }
  3462. }
  3463. }
  3464. },
  3465. "description": "Get a list of projects that have been opened with OpenCode.",
  3466. "summary": "List all projects",
  3467. "x-codeSamples": [
  3468. {
  3469. "lang": "js",
  3470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3471. }
  3472. ]
  3473. }
  3474. },
  3475. "/project/current": {
  3476. "get": {
  3477. "tags": ["project"],
  3478. "operationId": "project.current",
  3479. "parameters": [
  3480. {
  3481. "name": "directory",
  3482. "in": "query",
  3483. "schema": {
  3484. "type": "string"
  3485. },
  3486. "required": false
  3487. },
  3488. {
  3489. "name": "workspace",
  3490. "in": "query",
  3491. "schema": {
  3492. "type": "string"
  3493. },
  3494. "required": false
  3495. }
  3496. ],
  3497. "responses": {
  3498. "200": {
  3499. "description": "Current project information",
  3500. "content": {
  3501. "application/json": {
  3502. "schema": {
  3503. "$ref": "#/components/schemas/Project"
  3504. }
  3505. }
  3506. }
  3507. },
  3508. "400": {
  3509. "description": "Bad request",
  3510. "content": {
  3511. "application/json": {
  3512. "schema": {
  3513. "$ref": "#/components/schemas/BadRequestError"
  3514. }
  3515. }
  3516. }
  3517. }
  3518. },
  3519. "description": "Retrieve the currently active project that OpenCode is working with.",
  3520. "summary": "Get current project",
  3521. "x-codeSamples": [
  3522. {
  3523. "lang": "js",
  3524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3525. }
  3526. ]
  3527. }
  3528. },
  3529. "/project/git/init": {
  3530. "post": {
  3531. "tags": ["project"],
  3532. "operationId": "project.initGit",
  3533. "parameters": [
  3534. {
  3535. "name": "directory",
  3536. "in": "query",
  3537. "schema": {
  3538. "type": "string"
  3539. },
  3540. "required": false
  3541. },
  3542. {
  3543. "name": "workspace",
  3544. "in": "query",
  3545. "schema": {
  3546. "type": "string"
  3547. },
  3548. "required": false
  3549. }
  3550. ],
  3551. "responses": {
  3552. "200": {
  3553. "description": "Project information after git initialization",
  3554. "content": {
  3555. "application/json": {
  3556. "schema": {
  3557. "$ref": "#/components/schemas/Project"
  3558. }
  3559. }
  3560. }
  3561. },
  3562. "400": {
  3563. "description": "Bad request",
  3564. "content": {
  3565. "application/json": {
  3566. "schema": {
  3567. "$ref": "#/components/schemas/BadRequestError"
  3568. }
  3569. }
  3570. }
  3571. }
  3572. },
  3573. "description": "Create a git repository for the current project and return the refreshed project info.",
  3574. "summary": "Initialize git repository",
  3575. "x-codeSamples": [
  3576. {
  3577. "lang": "js",
  3578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3579. }
  3580. ]
  3581. }
  3582. },
  3583. "/project/{projectID}": {
  3584. "patch": {
  3585. "tags": ["project"],
  3586. "operationId": "project.update",
  3587. "parameters": [
  3588. {
  3589. "name": "projectID",
  3590. "in": "path",
  3591. "schema": {
  3592. "type": "string"
  3593. },
  3594. "required": true
  3595. },
  3596. {
  3597. "name": "directory",
  3598. "in": "query",
  3599. "schema": {
  3600. "type": "string"
  3601. },
  3602. "required": false
  3603. },
  3604. {
  3605. "name": "workspace",
  3606. "in": "query",
  3607. "schema": {
  3608. "type": "string"
  3609. },
  3610. "required": false
  3611. }
  3612. ],
  3613. "responses": {
  3614. "200": {
  3615. "description": "Updated project information",
  3616. "content": {
  3617. "application/json": {
  3618. "schema": {
  3619. "$ref": "#/components/schemas/Project"
  3620. }
  3621. }
  3622. }
  3623. },
  3624. "400": {
  3625. "description": "BadRequest | InvalidRequestError",
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "anyOf": [
  3630. {
  3631. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3632. },
  3633. {
  3634. "$ref": "#/components/schemas/InvalidRequestError"
  3635. }
  3636. ]
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "404": {
  3642. "description": "ProjectNotFoundError",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/ProjectNotFoundError"
  3647. }
  3648. }
  3649. }
  3650. }
  3651. },
  3652. "description": "Update project properties such as name, icon, and commands.",
  3653. "summary": "Update project",
  3654. "requestBody": {
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "type": "object",
  3659. "properties": {
  3660. "name": {
  3661. "type": "string"
  3662. },
  3663. "icon": {
  3664. "type": "object",
  3665. "properties": {
  3666. "url": {
  3667. "type": "string"
  3668. },
  3669. "override": {
  3670. "type": "string"
  3671. },
  3672. "color": {
  3673. "type": "string"
  3674. }
  3675. },
  3676. "additionalProperties": false
  3677. },
  3678. "commands": {
  3679. "type": "object",
  3680. "properties": {
  3681. "start": {
  3682. "type": "string",
  3683. "description": "Startup script to run when creating a new workspace (worktree)"
  3684. }
  3685. },
  3686. "additionalProperties": false
  3687. }
  3688. },
  3689. "additionalProperties": false
  3690. }
  3691. }
  3692. }
  3693. },
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/pty/shells": {
  3703. "get": {
  3704. "tags": ["pty"],
  3705. "operationId": "pty.shells",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of shells",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "type": "object",
  3733. "properties": {
  3734. "path": {
  3735. "type": "string"
  3736. },
  3737. "name": {
  3738. "type": "string"
  3739. },
  3740. "acceptable": {
  3741. "type": "boolean"
  3742. }
  3743. },
  3744. "required": ["path", "name", "acceptable"],
  3745. "additionalProperties": false
  3746. },
  3747. "description": "List of shells"
  3748. }
  3749. }
  3750. }
  3751. },
  3752. "400": {
  3753. "description": "Bad request",
  3754. "content": {
  3755. "application/json": {
  3756. "schema": {
  3757. "$ref": "#/components/schemas/BadRequestError"
  3758. }
  3759. }
  3760. }
  3761. }
  3762. },
  3763. "description": "Get a list of available shells on the system.",
  3764. "summary": "List available shells",
  3765. "x-codeSamples": [
  3766. {
  3767. "lang": "js",
  3768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3769. }
  3770. ]
  3771. }
  3772. },
  3773. "/pty": {
  3774. "get": {
  3775. "tags": ["pty"],
  3776. "operationId": "pty.list",
  3777. "parameters": [
  3778. {
  3779. "name": "directory",
  3780. "in": "query",
  3781. "schema": {
  3782. "type": "string"
  3783. },
  3784. "required": false
  3785. },
  3786. {
  3787. "name": "workspace",
  3788. "in": "query",
  3789. "schema": {
  3790. "type": "string"
  3791. },
  3792. "required": false
  3793. }
  3794. ],
  3795. "responses": {
  3796. "200": {
  3797. "description": "List of sessions",
  3798. "content": {
  3799. "application/json": {
  3800. "schema": {
  3801. "type": "array",
  3802. "items": {
  3803. "$ref": "#/components/schemas/Pty"
  3804. },
  3805. "description": "List of sessions"
  3806. }
  3807. }
  3808. }
  3809. },
  3810. "400": {
  3811. "description": "Bad request",
  3812. "content": {
  3813. "application/json": {
  3814. "schema": {
  3815. "$ref": "#/components/schemas/BadRequestError"
  3816. }
  3817. }
  3818. }
  3819. }
  3820. },
  3821. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3822. "summary": "List PTY sessions",
  3823. "x-codeSamples": [
  3824. {
  3825. "lang": "js",
  3826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3827. }
  3828. ]
  3829. },
  3830. "post": {
  3831. "tags": ["pty"],
  3832. "operationId": "pty.create",
  3833. "parameters": [
  3834. {
  3835. "name": "directory",
  3836. "in": "query",
  3837. "schema": {
  3838. "type": "string"
  3839. },
  3840. "required": false
  3841. },
  3842. {
  3843. "name": "workspace",
  3844. "in": "query",
  3845. "schema": {
  3846. "type": "string"
  3847. },
  3848. "required": false
  3849. }
  3850. ],
  3851. "responses": {
  3852. "200": {
  3853. "description": "Created session",
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "$ref": "#/components/schemas/Pty"
  3858. }
  3859. }
  3860. }
  3861. },
  3862. "400": {
  3863. "description": "BadRequest | InvalidRequestError",
  3864. "content": {
  3865. "application/json": {
  3866. "schema": {
  3867. "anyOf": [
  3868. {
  3869. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3870. },
  3871. {
  3872. "$ref": "#/components/schemas/InvalidRequestError"
  3873. }
  3874. ]
  3875. }
  3876. }
  3877. }
  3878. }
  3879. },
  3880. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3881. "summary": "Create PTY session",
  3882. "requestBody": {
  3883. "content": {
  3884. "application/json": {
  3885. "schema": {
  3886. "type": "object",
  3887. "properties": {
  3888. "command": {
  3889. "type": "string"
  3890. },
  3891. "args": {
  3892. "type": "array",
  3893. "items": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "cwd": {
  3898. "type": "string"
  3899. },
  3900. "title": {
  3901. "type": "string"
  3902. },
  3903. "env": {
  3904. "type": "object",
  3905. "additionalProperties": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. },
  3910. "additionalProperties": false
  3911. }
  3912. }
  3913. }
  3914. },
  3915. "x-codeSamples": [
  3916. {
  3917. "lang": "js",
  3918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3919. }
  3920. ]
  3921. }
  3922. },
  3923. "/pty/{ptyID}": {
  3924. "get": {
  3925. "tags": ["pty"],
  3926. "operationId": "pty.get",
  3927. "parameters": [
  3928. {
  3929. "name": "ptyID",
  3930. "in": "path",
  3931. "schema": {
  3932. "type": "string",
  3933. "pattern": "^pty"
  3934. },
  3935. "required": true
  3936. },
  3937. {
  3938. "name": "directory",
  3939. "in": "query",
  3940. "schema": {
  3941. "type": "string"
  3942. },
  3943. "required": false
  3944. },
  3945. {
  3946. "name": "workspace",
  3947. "in": "query",
  3948. "schema": {
  3949. "type": "string"
  3950. },
  3951. "required": false
  3952. }
  3953. ],
  3954. "responses": {
  3955. "200": {
  3956. "description": "Session info",
  3957. "content": {
  3958. "application/json": {
  3959. "schema": {
  3960. "$ref": "#/components/schemas/Pty"
  3961. }
  3962. }
  3963. }
  3964. },
  3965. "400": {
  3966. "description": "Bad request",
  3967. "content": {
  3968. "application/json": {
  3969. "schema": {
  3970. "$ref": "#/components/schemas/BadRequestError"
  3971. }
  3972. }
  3973. }
  3974. },
  3975. "404": {
  3976. "description": "PtyNotFoundError",
  3977. "content": {
  3978. "application/json": {
  3979. "schema": {
  3980. "$ref": "#/components/schemas/PtyNotFoundError"
  3981. }
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3987. "summary": "Get PTY session",
  3988. "x-codeSamples": [
  3989. {
  3990. "lang": "js",
  3991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3992. }
  3993. ]
  3994. },
  3995. "put": {
  3996. "tags": ["pty"],
  3997. "operationId": "pty.update",
  3998. "parameters": [
  3999. {
  4000. "name": "ptyID",
  4001. "in": "path",
  4002. "schema": {
  4003. "type": "string",
  4004. "pattern": "^pty"
  4005. },
  4006. "required": true
  4007. },
  4008. {
  4009. "name": "directory",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. },
  4016. {
  4017. "name": "workspace",
  4018. "in": "query",
  4019. "schema": {
  4020. "type": "string"
  4021. },
  4022. "required": false
  4023. }
  4024. ],
  4025. "responses": {
  4026. "200": {
  4027. "description": "Updated session",
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "$ref": "#/components/schemas/Pty"
  4032. }
  4033. }
  4034. }
  4035. },
  4036. "400": {
  4037. "description": "BadRequest | InvalidRequestError",
  4038. "content": {
  4039. "application/json": {
  4040. "schema": {
  4041. "anyOf": [
  4042. {
  4043. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4044. },
  4045. {
  4046. "$ref": "#/components/schemas/InvalidRequestError"
  4047. }
  4048. ]
  4049. }
  4050. }
  4051. }
  4052. },
  4053. "404": {
  4054. "description": "PtyNotFoundError",
  4055. "content": {
  4056. "application/json": {
  4057. "schema": {
  4058. "$ref": "#/components/schemas/PtyNotFoundError"
  4059. }
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4065. "summary": "Update PTY session",
  4066. "requestBody": {
  4067. "content": {
  4068. "application/json": {
  4069. "schema": {
  4070. "type": "object",
  4071. "properties": {
  4072. "title": {
  4073. "type": "string"
  4074. },
  4075. "size": {
  4076. "type": "object",
  4077. "properties": {
  4078. "rows": {
  4079. "type": "integer",
  4080. "exclusiveMinimum": 0
  4081. },
  4082. "cols": {
  4083. "type": "integer",
  4084. "exclusiveMinimum": 0
  4085. }
  4086. },
  4087. "required": ["rows", "cols"],
  4088. "additionalProperties": false
  4089. }
  4090. },
  4091. "additionalProperties": false
  4092. }
  4093. }
  4094. }
  4095. },
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4100. }
  4101. ]
  4102. },
  4103. "delete": {
  4104. "tags": ["pty"],
  4105. "operationId": "pty.remove",
  4106. "parameters": [
  4107. {
  4108. "name": "ptyID",
  4109. "in": "path",
  4110. "schema": {
  4111. "type": "string",
  4112. "pattern": "^pty"
  4113. },
  4114. "required": true
  4115. },
  4116. {
  4117. "name": "directory",
  4118. "in": "query",
  4119. "schema": {
  4120. "type": "string"
  4121. },
  4122. "required": false
  4123. },
  4124. {
  4125. "name": "workspace",
  4126. "in": "query",
  4127. "schema": {
  4128. "type": "string"
  4129. },
  4130. "required": false
  4131. }
  4132. ],
  4133. "responses": {
  4134. "200": {
  4135. "description": "Session removed",
  4136. "content": {
  4137. "application/json": {
  4138. "schema": {
  4139. "type": "boolean",
  4140. "description": "Session removed"
  4141. }
  4142. }
  4143. }
  4144. },
  4145. "400": {
  4146. "description": "Bad request",
  4147. "content": {
  4148. "application/json": {
  4149. "schema": {
  4150. "$ref": "#/components/schemas/BadRequestError"
  4151. }
  4152. }
  4153. }
  4154. },
  4155. "404": {
  4156. "description": "PtyNotFoundError",
  4157. "content": {
  4158. "application/json": {
  4159. "schema": {
  4160. "$ref": "#/components/schemas/PtyNotFoundError"
  4161. }
  4162. }
  4163. }
  4164. }
  4165. },
  4166. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4167. "summary": "Remove PTY session",
  4168. "x-codeSamples": [
  4169. {
  4170. "lang": "js",
  4171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4172. }
  4173. ]
  4174. }
  4175. },
  4176. "/pty/{ptyID}/connect-token": {
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.connectToken",
  4180. "parameters": [
  4181. {
  4182. "name": "ptyID",
  4183. "in": "path",
  4184. "schema": {
  4185. "type": "string",
  4186. "pattern": "^pty"
  4187. },
  4188. "required": true
  4189. },
  4190. {
  4191. "name": "directory",
  4192. "in": "query",
  4193. "schema": {
  4194. "type": "string"
  4195. },
  4196. "required": false
  4197. },
  4198. {
  4199. "name": "workspace",
  4200. "in": "query",
  4201. "schema": {
  4202. "type": "string"
  4203. },
  4204. "required": false
  4205. }
  4206. ],
  4207. "responses": {
  4208. "200": {
  4209. "description": "WebSocket connect token",
  4210. "content": {
  4211. "application/json": {
  4212. "schema": {
  4213. "type": "object",
  4214. "properties": {
  4215. "ticket": {
  4216. "type": "string"
  4217. },
  4218. "expires_in": {
  4219. "type": "integer",
  4220. "exclusiveMinimum": 0
  4221. }
  4222. },
  4223. "required": ["ticket", "expires_in"],
  4224. "additionalProperties": false,
  4225. "description": "WebSocket connect token"
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "400": {
  4231. "description": "Bad request",
  4232. "content": {
  4233. "application/json": {
  4234. "schema": {
  4235. "$ref": "#/components/schemas/BadRequestError"
  4236. }
  4237. }
  4238. }
  4239. },
  4240. "403": {
  4241. "description": "PtyForbiddenError",
  4242. "content": {
  4243. "application/json": {
  4244. "schema": {
  4245. "$ref": "#/components/schemas/PtyForbiddenError"
  4246. }
  4247. }
  4248. }
  4249. },
  4250. "404": {
  4251. "description": "PtyNotFoundError",
  4252. "content": {
  4253. "application/json": {
  4254. "schema": {
  4255. "$ref": "#/components/schemas/PtyNotFoundError"
  4256. }
  4257. }
  4258. }
  4259. }
  4260. },
  4261. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4262. "summary": "Create PTY WebSocket token",
  4263. "x-codeSamples": [
  4264. {
  4265. "lang": "js",
  4266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4267. }
  4268. ]
  4269. }
  4270. },
  4271. "/question": {
  4272. "get": {
  4273. "tags": ["question"],
  4274. "operationId": "question.list",
  4275. "parameters": [
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "List of pending questions",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "array",
  4300. "items": {
  4301. "$ref": "#/components/schemas/QuestionRequest"
  4302. },
  4303. "description": "List of pending questions"
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "400": {
  4309. "description": "Bad request",
  4310. "content": {
  4311. "application/json": {
  4312. "schema": {
  4313. "$ref": "#/components/schemas/BadRequestError"
  4314. }
  4315. }
  4316. }
  4317. }
  4318. },
  4319. "description": "Get all pending question requests across all sessions.",
  4320. "summary": "List pending questions",
  4321. "x-codeSamples": [
  4322. {
  4323. "lang": "js",
  4324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4325. }
  4326. ]
  4327. }
  4328. },
  4329. "/question/{requestID}/reply": {
  4330. "post": {
  4331. "tags": ["question"],
  4332. "operationId": "question.reply",
  4333. "parameters": [
  4334. {
  4335. "name": "requestID",
  4336. "in": "path",
  4337. "schema": {
  4338. "type": "string",
  4339. "pattern": "^que"
  4340. },
  4341. "required": true
  4342. },
  4343. {
  4344. "name": "directory",
  4345. "in": "query",
  4346. "schema": {
  4347. "type": "string"
  4348. },
  4349. "required": false
  4350. },
  4351. {
  4352. "name": "workspace",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. }
  4359. ],
  4360. "responses": {
  4361. "200": {
  4362. "description": "Question answered successfully",
  4363. "content": {
  4364. "application/json": {
  4365. "schema": {
  4366. "type": "boolean",
  4367. "description": "Question answered successfully"
  4368. }
  4369. }
  4370. }
  4371. },
  4372. "400": {
  4373. "description": "BadRequest | InvalidRequestError",
  4374. "content": {
  4375. "application/json": {
  4376. "schema": {
  4377. "anyOf": [
  4378. {
  4379. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4380. },
  4381. {
  4382. "$ref": "#/components/schemas/InvalidRequestError"
  4383. }
  4384. ]
  4385. }
  4386. }
  4387. }
  4388. },
  4389. "404": {
  4390. "description": "QuestionNotFoundError",
  4391. "content": {
  4392. "application/json": {
  4393. "schema": {
  4394. "$ref": "#/components/schemas/QuestionNotFoundError"
  4395. }
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "description": "Provide answers to a question request from the AI assistant.",
  4401. "summary": "Reply to question request",
  4402. "requestBody": {
  4403. "content": {
  4404. "application/json": {
  4405. "schema": {
  4406. "type": "object",
  4407. "properties": {
  4408. "answers": {
  4409. "type": "array",
  4410. "items": {
  4411. "$ref": "#/components/schemas/QuestionAnswer"
  4412. },
  4413. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4414. }
  4415. },
  4416. "required": ["answers"],
  4417. "additionalProperties": false
  4418. }
  4419. }
  4420. }
  4421. },
  4422. "x-codeSamples": [
  4423. {
  4424. "lang": "js",
  4425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4426. }
  4427. ]
  4428. }
  4429. },
  4430. "/question/{requestID}/reject": {
  4431. "post": {
  4432. "tags": ["question"],
  4433. "operationId": "question.reject",
  4434. "parameters": [
  4435. {
  4436. "name": "requestID",
  4437. "in": "path",
  4438. "schema": {
  4439. "type": "string",
  4440. "pattern": "^que"
  4441. },
  4442. "required": true
  4443. },
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Question rejected successfully",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "type": "boolean",
  4468. "description": "Question rejected successfully"
  4469. }
  4470. }
  4471. }
  4472. },
  4473. "400": {
  4474. "description": "BadRequest | InvalidRequestError",
  4475. "content": {
  4476. "application/json": {
  4477. "schema": {
  4478. "anyOf": [
  4479. {
  4480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4481. },
  4482. {
  4483. "$ref": "#/components/schemas/InvalidRequestError"
  4484. }
  4485. ]
  4486. }
  4487. }
  4488. }
  4489. },
  4490. "404": {
  4491. "description": "QuestionNotFoundError",
  4492. "content": {
  4493. "application/json": {
  4494. "schema": {
  4495. "$ref": "#/components/schemas/QuestionNotFoundError"
  4496. }
  4497. }
  4498. }
  4499. }
  4500. },
  4501. "description": "Reject a question request from the AI assistant.",
  4502. "summary": "Reject question request",
  4503. "x-codeSamples": [
  4504. {
  4505. "lang": "js",
  4506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4507. }
  4508. ]
  4509. }
  4510. },
  4511. "/permission": {
  4512. "get": {
  4513. "tags": ["permission"],
  4514. "operationId": "permission.list",
  4515. "parameters": [
  4516. {
  4517. "name": "directory",
  4518. "in": "query",
  4519. "schema": {
  4520. "type": "string"
  4521. },
  4522. "required": false
  4523. },
  4524. {
  4525. "name": "workspace",
  4526. "in": "query",
  4527. "schema": {
  4528. "type": "string"
  4529. },
  4530. "required": false
  4531. }
  4532. ],
  4533. "responses": {
  4534. "200": {
  4535. "description": "List of pending permissions",
  4536. "content": {
  4537. "application/json": {
  4538. "schema": {
  4539. "type": "array",
  4540. "items": {
  4541. "$ref": "#/components/schemas/PermissionRequest"
  4542. },
  4543. "description": "List of pending permissions"
  4544. }
  4545. }
  4546. }
  4547. },
  4548. "400": {
  4549. "description": "Bad request",
  4550. "content": {
  4551. "application/json": {
  4552. "schema": {
  4553. "$ref": "#/components/schemas/BadRequestError"
  4554. }
  4555. }
  4556. }
  4557. }
  4558. },
  4559. "description": "Get all pending permission requests across all sessions.",
  4560. "summary": "List pending permissions",
  4561. "x-codeSamples": [
  4562. {
  4563. "lang": "js",
  4564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4565. }
  4566. ]
  4567. }
  4568. },
  4569. "/permission/{requestID}/reply": {
  4570. "post": {
  4571. "tags": ["permission"],
  4572. "operationId": "permission.reply",
  4573. "parameters": [
  4574. {
  4575. "name": "requestID",
  4576. "in": "path",
  4577. "schema": {
  4578. "type": "string",
  4579. "pattern": "^per"
  4580. },
  4581. "required": true
  4582. },
  4583. {
  4584. "name": "directory",
  4585. "in": "query",
  4586. "schema": {
  4587. "type": "string"
  4588. },
  4589. "required": false
  4590. },
  4591. {
  4592. "name": "workspace",
  4593. "in": "query",
  4594. "schema": {
  4595. "type": "string"
  4596. },
  4597. "required": false
  4598. }
  4599. ],
  4600. "responses": {
  4601. "200": {
  4602. "description": "Permission processed successfully",
  4603. "content": {
  4604. "application/json": {
  4605. "schema": {
  4606. "type": "boolean",
  4607. "description": "Permission processed successfully"
  4608. }
  4609. }
  4610. }
  4611. },
  4612. "400": {
  4613. "description": "BadRequest | InvalidRequestError",
  4614. "content": {
  4615. "application/json": {
  4616. "schema": {
  4617. "anyOf": [
  4618. {
  4619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4620. },
  4621. {
  4622. "$ref": "#/components/schemas/InvalidRequestError"
  4623. }
  4624. ]
  4625. }
  4626. }
  4627. }
  4628. },
  4629. "404": {
  4630. "description": "PermissionNotFoundError",
  4631. "content": {
  4632. "application/json": {
  4633. "schema": {
  4634. "$ref": "#/components/schemas/PermissionNotFoundError"
  4635. }
  4636. }
  4637. }
  4638. }
  4639. },
  4640. "description": "Approve or deny a permission request from the AI assistant.",
  4641. "summary": "Respond to permission request",
  4642. "requestBody": {
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "object",
  4647. "properties": {
  4648. "reply": {
  4649. "type": "string",
  4650. "enum": ["once", "always", "reject"]
  4651. },
  4652. "message": {
  4653. "type": "string"
  4654. }
  4655. },
  4656. "required": ["reply"],
  4657. "additionalProperties": false
  4658. }
  4659. }
  4660. }
  4661. },
  4662. "x-codeSamples": [
  4663. {
  4664. "lang": "js",
  4665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4666. }
  4667. ]
  4668. }
  4669. },
  4670. "/provider": {
  4671. "get": {
  4672. "tags": ["provider"],
  4673. "operationId": "provider.list",
  4674. "parameters": [
  4675. {
  4676. "name": "directory",
  4677. "in": "query",
  4678. "schema": {
  4679. "type": "string"
  4680. },
  4681. "required": false
  4682. },
  4683. {
  4684. "name": "workspace",
  4685. "in": "query",
  4686. "schema": {
  4687. "type": "string"
  4688. },
  4689. "required": false
  4690. }
  4691. ],
  4692. "responses": {
  4693. "200": {
  4694. "description": "List of providers",
  4695. "content": {
  4696. "application/json": {
  4697. "schema": {
  4698. "type": "object",
  4699. "properties": {
  4700. "all": {
  4701. "type": "array",
  4702. "items": {
  4703. "$ref": "#/components/schemas/Provider"
  4704. }
  4705. },
  4706. "default": {
  4707. "type": "object",
  4708. "additionalProperties": {
  4709. "type": "string"
  4710. }
  4711. },
  4712. "connected": {
  4713. "type": "array",
  4714. "items": {
  4715. "type": "string"
  4716. }
  4717. }
  4718. },
  4719. "required": ["all", "default", "connected"],
  4720. "additionalProperties": false,
  4721. "description": "List of providers"
  4722. }
  4723. }
  4724. }
  4725. },
  4726. "400": {
  4727. "description": "Bad request",
  4728. "content": {
  4729. "application/json": {
  4730. "schema": {
  4731. "$ref": "#/components/schemas/BadRequestError"
  4732. }
  4733. }
  4734. }
  4735. }
  4736. },
  4737. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4738. "summary": "List providers",
  4739. "x-codeSamples": [
  4740. {
  4741. "lang": "js",
  4742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4743. }
  4744. ]
  4745. }
  4746. },
  4747. "/provider/auth": {
  4748. "get": {
  4749. "tags": ["provider"],
  4750. "operationId": "provider.auth",
  4751. "parameters": [
  4752. {
  4753. "name": "directory",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. },
  4760. {
  4761. "name": "workspace",
  4762. "in": "query",
  4763. "schema": {
  4764. "type": "string"
  4765. },
  4766. "required": false
  4767. }
  4768. ],
  4769. "responses": {
  4770. "200": {
  4771. "description": "Provider auth methods",
  4772. "content": {
  4773. "application/json": {
  4774. "schema": {
  4775. "type": "object",
  4776. "additionalProperties": {
  4777. "type": "array",
  4778. "items": {
  4779. "$ref": "#/components/schemas/ProviderAuthMethod"
  4780. }
  4781. },
  4782. "description": "Provider auth methods"
  4783. }
  4784. }
  4785. }
  4786. },
  4787. "400": {
  4788. "description": "Bad request",
  4789. "content": {
  4790. "application/json": {
  4791. "schema": {
  4792. "$ref": "#/components/schemas/BadRequestError"
  4793. }
  4794. }
  4795. }
  4796. }
  4797. },
  4798. "description": "Retrieve available authentication methods for all AI providers.",
  4799. "summary": "Get provider auth methods",
  4800. "x-codeSamples": [
  4801. {
  4802. "lang": "js",
  4803. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4804. }
  4805. ]
  4806. }
  4807. },
  4808. "/provider/{providerID}/oauth/authorize": {
  4809. "post": {
  4810. "tags": ["provider"],
  4811. "operationId": "provider.oauth.authorize",
  4812. "parameters": [
  4813. {
  4814. "name": "providerID",
  4815. "in": "path",
  4816. "schema": {
  4817. "type": "string"
  4818. },
  4819. "required": true
  4820. },
  4821. {
  4822. "name": "directory",
  4823. "in": "query",
  4824. "schema": {
  4825. "type": "string"
  4826. },
  4827. "required": false
  4828. },
  4829. {
  4830. "name": "workspace",
  4831. "in": "query",
  4832. "schema": {
  4833. "type": "string"
  4834. },
  4835. "required": false
  4836. }
  4837. ],
  4838. "responses": {
  4839. "200": {
  4840. "description": "Authorization URL and method",
  4841. "content": {
  4842. "application/json": {
  4843. "schema": {
  4844. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4845. }
  4846. }
  4847. }
  4848. },
  4849. "400": {
  4850. "description": "ProviderAuthError | InvalidRequestError",
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "anyOf": [
  4855. {
  4856. "$ref": "#/components/schemas/ProviderAuthError1"
  4857. },
  4858. {
  4859. "$ref": "#/components/schemas/InvalidRequestError"
  4860. }
  4861. ]
  4862. }
  4863. }
  4864. }
  4865. }
  4866. },
  4867. "description": "Start the OAuth authorization flow for a provider.",
  4868. "summary": "Start OAuth authorization",
  4869. "requestBody": {
  4870. "content": {
  4871. "application/json": {
  4872. "schema": {
  4873. "type": "object",
  4874. "properties": {
  4875. "method": {
  4876. "type": "number",
  4877. "description": "Auth method index"
  4878. },
  4879. "inputs": {
  4880. "type": "object",
  4881. "additionalProperties": {
  4882. "type": "string"
  4883. }
  4884. }
  4885. },
  4886. "required": ["method"],
  4887. "additionalProperties": false
  4888. }
  4889. }
  4890. }
  4891. },
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/provider/{providerID}/oauth/callback": {
  4901. "post": {
  4902. "tags": ["provider"],
  4903. "operationId": "provider.oauth.callback",
  4904. "parameters": [
  4905. {
  4906. "name": "providerID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string"
  4910. },
  4911. "required": true
  4912. },
  4913. {
  4914. "name": "directory",
  4915. "in": "query",
  4916. "schema": {
  4917. "type": "string"
  4918. },
  4919. "required": false
  4920. },
  4921. {
  4922. "name": "workspace",
  4923. "in": "query",
  4924. "schema": {
  4925. "type": "string"
  4926. },
  4927. "required": false
  4928. }
  4929. ],
  4930. "responses": {
  4931. "200": {
  4932. "description": "OAuth callback processed successfully",
  4933. "content": {
  4934. "application/json": {
  4935. "schema": {
  4936. "type": "boolean",
  4937. "description": "OAuth callback processed successfully"
  4938. }
  4939. }
  4940. }
  4941. },
  4942. "400": {
  4943. "description": "ProviderAuthError | InvalidRequestError",
  4944. "content": {
  4945. "application/json": {
  4946. "schema": {
  4947. "anyOf": [
  4948. {
  4949. "$ref": "#/components/schemas/ProviderAuthError1"
  4950. },
  4951. {
  4952. "$ref": "#/components/schemas/InvalidRequestError"
  4953. }
  4954. ]
  4955. }
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "description": "Handle the OAuth callback from a provider after user authorization.",
  4961. "summary": "Handle OAuth callback",
  4962. "requestBody": {
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "type": "object",
  4967. "properties": {
  4968. "method": {
  4969. "type": "number",
  4970. "description": "Auth method index"
  4971. },
  4972. "code": {
  4973. "type": "string"
  4974. }
  4975. },
  4976. "required": ["method"],
  4977. "additionalProperties": false
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "x-codeSamples": [
  4983. {
  4984. "lang": "js",
  4985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4986. }
  4987. ]
  4988. }
  4989. },
  4990. "/session": {
  4991. "get": {
  4992. "tags": ["session"],
  4993. "operationId": "session.list",
  4994. "parameters": [
  4995. {
  4996. "name": "directory",
  4997. "in": "query",
  4998. "schema": {
  4999. "type": "string"
  5000. },
  5001. "required": false
  5002. },
  5003. {
  5004. "name": "workspace",
  5005. "in": "query",
  5006. "schema": {
  5007. "type": "string"
  5008. },
  5009. "required": false
  5010. },
  5011. {
  5012. "name": "scope",
  5013. "in": "query",
  5014. "schema": {
  5015. "type": "string",
  5016. "enum": ["project"]
  5017. },
  5018. "required": false
  5019. },
  5020. {
  5021. "name": "path",
  5022. "in": "query",
  5023. "schema": {
  5024. "type": "string"
  5025. },
  5026. "required": false
  5027. },
  5028. {
  5029. "name": "roots",
  5030. "in": "query",
  5031. "schema": {
  5032. "anyOf": [
  5033. {
  5034. "type": "boolean"
  5035. },
  5036. {
  5037. "type": "string",
  5038. "enum": ["true", "false"]
  5039. }
  5040. ]
  5041. },
  5042. "required": false
  5043. },
  5044. {
  5045. "name": "start",
  5046. "in": "query",
  5047. "schema": {
  5048. "type": "number"
  5049. },
  5050. "required": false
  5051. },
  5052. {
  5053. "name": "search",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "limit",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "number"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "List of sessions",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "array",
  5076. "items": {
  5077. "$ref": "#/components/schemas/Session"
  5078. },
  5079. "description": "List of sessions"
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "400": {
  5085. "description": "Bad request",
  5086. "content": {
  5087. "application/json": {
  5088. "schema": {
  5089. "$ref": "#/components/schemas/BadRequestError"
  5090. }
  5091. }
  5092. }
  5093. }
  5094. },
  5095. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5096. "summary": "List sessions",
  5097. "x-codeSamples": [
  5098. {
  5099. "lang": "js",
  5100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5101. }
  5102. ]
  5103. },
  5104. "post": {
  5105. "tags": ["session"],
  5106. "operationId": "session.create",
  5107. "parameters": [
  5108. {
  5109. "name": "directory",
  5110. "in": "query",
  5111. "schema": {
  5112. "type": "string"
  5113. },
  5114. "required": false
  5115. },
  5116. {
  5117. "name": "workspace",
  5118. "in": "query",
  5119. "schema": {
  5120. "type": "string"
  5121. },
  5122. "required": false
  5123. }
  5124. ],
  5125. "responses": {
  5126. "200": {
  5127. "description": "Successfully created session",
  5128. "content": {
  5129. "application/json": {
  5130. "schema": {
  5131. "$ref": "#/components/schemas/Session"
  5132. }
  5133. }
  5134. }
  5135. },
  5136. "400": {
  5137. "description": "BadRequest | InvalidRequestError",
  5138. "content": {
  5139. "application/json": {
  5140. "schema": {
  5141. "anyOf": [
  5142. {
  5143. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5144. },
  5145. {
  5146. "$ref": "#/components/schemas/InvalidRequestError"
  5147. }
  5148. ]
  5149. }
  5150. }
  5151. }
  5152. }
  5153. },
  5154. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5155. "summary": "Create session",
  5156. "requestBody": {
  5157. "content": {
  5158. "application/json": {
  5159. "schema": {
  5160. "type": "object",
  5161. "properties": {
  5162. "parentID": {
  5163. "type": "string",
  5164. "pattern": "^ses"
  5165. },
  5166. "title": {
  5167. "type": "string"
  5168. },
  5169. "agent": {
  5170. "type": "string"
  5171. },
  5172. "model": {
  5173. "type": "object",
  5174. "properties": {
  5175. "id": {
  5176. "type": "string"
  5177. },
  5178. "providerID": {
  5179. "type": "string"
  5180. },
  5181. "variant": {
  5182. "type": "string"
  5183. }
  5184. },
  5185. "required": ["id", "providerID"],
  5186. "additionalProperties": false
  5187. },
  5188. "metadata": {
  5189. "type": "object"
  5190. },
  5191. "permission": {
  5192. "$ref": "#/components/schemas/PermissionRuleset"
  5193. },
  5194. "workspaceID": {
  5195. "type": "string",
  5196. "pattern": "^wrk"
  5197. }
  5198. },
  5199. "additionalProperties": false
  5200. }
  5201. }
  5202. }
  5203. },
  5204. "x-codeSamples": [
  5205. {
  5206. "lang": "js",
  5207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5208. }
  5209. ]
  5210. }
  5211. },
  5212. "/session/status": {
  5213. "get": {
  5214. "tags": ["session"],
  5215. "operationId": "session.status",
  5216. "parameters": [
  5217. {
  5218. "name": "directory",
  5219. "in": "query",
  5220. "schema": {
  5221. "type": "string"
  5222. },
  5223. "required": false
  5224. },
  5225. {
  5226. "name": "workspace",
  5227. "in": "query",
  5228. "schema": {
  5229. "type": "string"
  5230. },
  5231. "required": false
  5232. }
  5233. ],
  5234. "responses": {
  5235. "200": {
  5236. "description": "Get session status",
  5237. "content": {
  5238. "application/json": {
  5239. "schema": {
  5240. "type": "object",
  5241. "additionalProperties": {
  5242. "$ref": "#/components/schemas/SessionStatus"
  5243. },
  5244. "description": "Get session status"
  5245. }
  5246. }
  5247. }
  5248. },
  5249. "400": {
  5250. "description": "BadRequest | InvalidRequestError",
  5251. "content": {
  5252. "application/json": {
  5253. "schema": {
  5254. "anyOf": [
  5255. {
  5256. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5257. },
  5258. {
  5259. "$ref": "#/components/schemas/InvalidRequestError"
  5260. }
  5261. ]
  5262. }
  5263. }
  5264. }
  5265. }
  5266. },
  5267. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5268. "summary": "Get session status",
  5269. "x-codeSamples": [
  5270. {
  5271. "lang": "js",
  5272. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5273. }
  5274. ]
  5275. }
  5276. },
  5277. "/session/{sessionID}": {
  5278. "get": {
  5279. "tags": ["session"],
  5280. "operationId": "session.get",
  5281. "parameters": [
  5282. {
  5283. "name": "sessionID",
  5284. "in": "path",
  5285. "schema": {
  5286. "type": "string",
  5287. "pattern": "^ses"
  5288. },
  5289. "required": true
  5290. },
  5291. {
  5292. "name": "directory",
  5293. "in": "query",
  5294. "schema": {
  5295. "type": "string"
  5296. },
  5297. "required": false
  5298. },
  5299. {
  5300. "name": "workspace",
  5301. "in": "query",
  5302. "schema": {
  5303. "type": "string"
  5304. },
  5305. "required": false
  5306. }
  5307. ],
  5308. "responses": {
  5309. "200": {
  5310. "description": "Get session",
  5311. "content": {
  5312. "application/json": {
  5313. "schema": {
  5314. "$ref": "#/components/schemas/Session"
  5315. }
  5316. }
  5317. }
  5318. },
  5319. "400": {
  5320. "description": "BadRequest | InvalidRequestError",
  5321. "content": {
  5322. "application/json": {
  5323. "schema": {
  5324. "anyOf": [
  5325. {
  5326. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5327. },
  5328. {
  5329. "$ref": "#/components/schemas/InvalidRequestError"
  5330. }
  5331. ]
  5332. }
  5333. }
  5334. }
  5335. },
  5336. "404": {
  5337. "description": "NotFoundError",
  5338. "content": {
  5339. "application/json": {
  5340. "schema": {
  5341. "$ref": "#/components/schemas/NotFoundError"
  5342. }
  5343. }
  5344. }
  5345. }
  5346. },
  5347. "description": "Retrieve detailed information about a specific OpenCode session.",
  5348. "summary": "Get session",
  5349. "x-codeSamples": [
  5350. {
  5351. "lang": "js",
  5352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5353. }
  5354. ]
  5355. },
  5356. "delete": {
  5357. "tags": ["session"],
  5358. "operationId": "session.delete",
  5359. "parameters": [
  5360. {
  5361. "name": "sessionID",
  5362. "in": "path",
  5363. "schema": {
  5364. "type": "string",
  5365. "pattern": "^ses"
  5366. },
  5367. "required": true
  5368. },
  5369. {
  5370. "name": "directory",
  5371. "in": "query",
  5372. "schema": {
  5373. "type": "string"
  5374. },
  5375. "required": false
  5376. },
  5377. {
  5378. "name": "workspace",
  5379. "in": "query",
  5380. "schema": {
  5381. "type": "string"
  5382. },
  5383. "required": false
  5384. }
  5385. ],
  5386. "responses": {
  5387. "200": {
  5388. "description": "Successfully deleted session",
  5389. "content": {
  5390. "application/json": {
  5391. "schema": {
  5392. "type": "boolean",
  5393. "description": "Successfully deleted session"
  5394. }
  5395. }
  5396. }
  5397. },
  5398. "400": {
  5399. "description": "BadRequest | InvalidRequestError",
  5400. "content": {
  5401. "application/json": {
  5402. "schema": {
  5403. "anyOf": [
  5404. {
  5405. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5406. },
  5407. {
  5408. "$ref": "#/components/schemas/InvalidRequestError"
  5409. }
  5410. ]
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "404": {
  5416. "description": "NotFoundError",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/NotFoundError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5427. "summary": "Delete session",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "patch": {
  5436. "tags": ["session"],
  5437. "operationId": "session.update",
  5438. "parameters": [
  5439. {
  5440. "name": "sessionID",
  5441. "in": "path",
  5442. "schema": {
  5443. "type": "string",
  5444. "pattern": "^ses"
  5445. },
  5446. "required": true
  5447. },
  5448. {
  5449. "name": "directory",
  5450. "in": "query",
  5451. "schema": {
  5452. "type": "string"
  5453. },
  5454. "required": false
  5455. },
  5456. {
  5457. "name": "workspace",
  5458. "in": "query",
  5459. "schema": {
  5460. "type": "string"
  5461. },
  5462. "required": false
  5463. }
  5464. ],
  5465. "responses": {
  5466. "200": {
  5467. "description": "Successfully updated session",
  5468. "content": {
  5469. "application/json": {
  5470. "schema": {
  5471. "$ref": "#/components/schemas/Session"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "BadRequest | InvalidRequestError",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "anyOf": [
  5482. {
  5483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5484. },
  5485. {
  5486. "$ref": "#/components/schemas/InvalidRequestError"
  5487. }
  5488. ]
  5489. }
  5490. }
  5491. }
  5492. },
  5493. "404": {
  5494. "description": "NotFoundError",
  5495. "content": {
  5496. "application/json": {
  5497. "schema": {
  5498. "$ref": "#/components/schemas/NotFoundError"
  5499. }
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "description": "Update properties of an existing session, such as title or other metadata.",
  5505. "summary": "Update session",
  5506. "requestBody": {
  5507. "content": {
  5508. "application/json": {
  5509. "schema": {
  5510. "type": "object",
  5511. "properties": {
  5512. "title": {
  5513. "type": "string"
  5514. },
  5515. "metadata": {
  5516. "type": "object"
  5517. },
  5518. "permission": {
  5519. "$ref": "#/components/schemas/PermissionRuleset"
  5520. },
  5521. "time": {
  5522. "type": "object",
  5523. "properties": {
  5524. "archived": {
  5525. "type": "number"
  5526. }
  5527. },
  5528. "additionalProperties": false
  5529. }
  5530. },
  5531. "additionalProperties": false
  5532. }
  5533. }
  5534. }
  5535. },
  5536. "x-codeSamples": [
  5537. {
  5538. "lang": "js",
  5539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5540. }
  5541. ]
  5542. }
  5543. },
  5544. "/session/{sessionID}/children": {
  5545. "get": {
  5546. "tags": ["session"],
  5547. "operationId": "session.children",
  5548. "parameters": [
  5549. {
  5550. "name": "sessionID",
  5551. "in": "path",
  5552. "schema": {
  5553. "type": "string",
  5554. "pattern": "^ses"
  5555. },
  5556. "required": true
  5557. },
  5558. {
  5559. "name": "directory",
  5560. "in": "query",
  5561. "schema": {
  5562. "type": "string"
  5563. },
  5564. "required": false
  5565. },
  5566. {
  5567. "name": "workspace",
  5568. "in": "query",
  5569. "schema": {
  5570. "type": "string"
  5571. },
  5572. "required": false
  5573. }
  5574. ],
  5575. "responses": {
  5576. "200": {
  5577. "description": "List of children",
  5578. "content": {
  5579. "application/json": {
  5580. "schema": {
  5581. "type": "array",
  5582. "items": {
  5583. "$ref": "#/components/schemas/Session"
  5584. },
  5585. "description": "List of children"
  5586. }
  5587. }
  5588. }
  5589. },
  5590. "400": {
  5591. "description": "BadRequest | InvalidRequestError",
  5592. "content": {
  5593. "application/json": {
  5594. "schema": {
  5595. "anyOf": [
  5596. {
  5597. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5598. },
  5599. {
  5600. "$ref": "#/components/schemas/InvalidRequestError"
  5601. }
  5602. ]
  5603. }
  5604. }
  5605. }
  5606. },
  5607. "404": {
  5608. "description": "NotFoundError",
  5609. "content": {
  5610. "application/json": {
  5611. "schema": {
  5612. "$ref": "#/components/schemas/NotFoundError"
  5613. }
  5614. }
  5615. }
  5616. }
  5617. },
  5618. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5619. "summary": "Get session children",
  5620. "x-codeSamples": [
  5621. {
  5622. "lang": "js",
  5623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5624. }
  5625. ]
  5626. }
  5627. },
  5628. "/session/{sessionID}/todo": {
  5629. "get": {
  5630. "tags": ["session"],
  5631. "operationId": "session.todo",
  5632. "parameters": [
  5633. {
  5634. "name": "sessionID",
  5635. "in": "path",
  5636. "schema": {
  5637. "type": "string",
  5638. "pattern": "^ses"
  5639. },
  5640. "required": true
  5641. },
  5642. {
  5643. "name": "directory",
  5644. "in": "query",
  5645. "schema": {
  5646. "type": "string"
  5647. },
  5648. "required": false
  5649. },
  5650. {
  5651. "name": "workspace",
  5652. "in": "query",
  5653. "schema": {
  5654. "type": "string"
  5655. },
  5656. "required": false
  5657. }
  5658. ],
  5659. "responses": {
  5660. "200": {
  5661. "description": "Todo list",
  5662. "content": {
  5663. "application/json": {
  5664. "schema": {
  5665. "type": "array",
  5666. "items": {
  5667. "$ref": "#/components/schemas/Todo"
  5668. },
  5669. "description": "Todo list"
  5670. }
  5671. }
  5672. }
  5673. },
  5674. "400": {
  5675. "description": "BadRequest | InvalidRequestError",
  5676. "content": {
  5677. "application/json": {
  5678. "schema": {
  5679. "anyOf": [
  5680. {
  5681. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5682. },
  5683. {
  5684. "$ref": "#/components/schemas/InvalidRequestError"
  5685. }
  5686. ]
  5687. }
  5688. }
  5689. }
  5690. },
  5691. "404": {
  5692. "description": "NotFoundError",
  5693. "content": {
  5694. "application/json": {
  5695. "schema": {
  5696. "$ref": "#/components/schemas/NotFoundError"
  5697. }
  5698. }
  5699. }
  5700. }
  5701. },
  5702. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5703. "summary": "Get session todos",
  5704. "x-codeSamples": [
  5705. {
  5706. "lang": "js",
  5707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5708. }
  5709. ]
  5710. }
  5711. },
  5712. "/session/{sessionID}/diff": {
  5713. "get": {
  5714. "tags": ["session"],
  5715. "operationId": "session.diff",
  5716. "parameters": [
  5717. {
  5718. "name": "sessionID",
  5719. "in": "path",
  5720. "schema": {
  5721. "type": "string",
  5722. "pattern": "^ses"
  5723. },
  5724. "required": true
  5725. },
  5726. {
  5727. "name": "directory",
  5728. "in": "query",
  5729. "schema": {
  5730. "type": "string"
  5731. },
  5732. "required": false
  5733. },
  5734. {
  5735. "name": "workspace",
  5736. "in": "query",
  5737. "schema": {
  5738. "type": "string"
  5739. },
  5740. "required": false
  5741. },
  5742. {
  5743. "name": "messageID",
  5744. "in": "query",
  5745. "schema": {
  5746. "type": "string",
  5747. "pattern": "^msg"
  5748. },
  5749. "required": false
  5750. }
  5751. ],
  5752. "responses": {
  5753. "200": {
  5754. "description": "Successfully retrieved diff",
  5755. "content": {
  5756. "application/json": {
  5757. "schema": {
  5758. "type": "array",
  5759. "items": {
  5760. "$ref": "#/components/schemas/SnapshotFileDiff"
  5761. },
  5762. "description": "Successfully retrieved diff"
  5763. }
  5764. }
  5765. }
  5766. },
  5767. "400": {
  5768. "description": "Bad request",
  5769. "content": {
  5770. "application/json": {
  5771. "schema": {
  5772. "$ref": "#/components/schemas/BadRequestError"
  5773. }
  5774. }
  5775. }
  5776. }
  5777. },
  5778. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5779. "summary": "Get message diff",
  5780. "x-codeSamples": [
  5781. {
  5782. "lang": "js",
  5783. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5784. }
  5785. ]
  5786. }
  5787. },
  5788. "/session/{sessionID}/message": {
  5789. "get": {
  5790. "tags": ["session"],
  5791. "operationId": "session.messages",
  5792. "parameters": [
  5793. {
  5794. "name": "sessionID",
  5795. "in": "path",
  5796. "schema": {
  5797. "type": "string",
  5798. "pattern": "^ses"
  5799. },
  5800. "required": true
  5801. },
  5802. {
  5803. "name": "directory",
  5804. "in": "query",
  5805. "schema": {
  5806. "type": "string"
  5807. },
  5808. "required": false
  5809. },
  5810. {
  5811. "name": "workspace",
  5812. "in": "query",
  5813. "schema": {
  5814. "type": "string"
  5815. },
  5816. "required": false
  5817. },
  5818. {
  5819. "name": "limit",
  5820. "in": "query",
  5821. "schema": {
  5822. "type": "integer",
  5823. "minimum": 0,
  5824. "maximum": 9007199254740991
  5825. },
  5826. "required": false
  5827. },
  5828. {
  5829. "name": "before",
  5830. "in": "query",
  5831. "schema": {
  5832. "type": "string"
  5833. },
  5834. "required": false
  5835. }
  5836. ],
  5837. "responses": {
  5838. "200": {
  5839. "description": "List of messages",
  5840. "content": {
  5841. "application/json": {
  5842. "schema": {
  5843. "type": "array",
  5844. "items": {
  5845. "type": "object",
  5846. "properties": {
  5847. "info": {
  5848. "$ref": "#/components/schemas/Message"
  5849. },
  5850. "parts": {
  5851. "type": "array",
  5852. "items": {
  5853. "$ref": "#/components/schemas/Part"
  5854. }
  5855. }
  5856. },
  5857. "required": ["info", "parts"],
  5858. "additionalProperties": false
  5859. },
  5860. "description": "List of messages"
  5861. }
  5862. }
  5863. }
  5864. },
  5865. "400": {
  5866. "description": "BadRequest | InvalidRequestError",
  5867. "content": {
  5868. "application/json": {
  5869. "schema": {
  5870. "anyOf": [
  5871. {
  5872. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5873. },
  5874. {
  5875. "$ref": "#/components/schemas/InvalidRequestError"
  5876. }
  5877. ]
  5878. }
  5879. }
  5880. }
  5881. },
  5882. "404": {
  5883. "description": "NotFoundError",
  5884. "content": {
  5885. "application/json": {
  5886. "schema": {
  5887. "$ref": "#/components/schemas/NotFoundError"
  5888. }
  5889. }
  5890. }
  5891. }
  5892. },
  5893. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5894. "summary": "Get session messages",
  5895. "x-codeSamples": [
  5896. {
  5897. "lang": "js",
  5898. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5899. }
  5900. ]
  5901. },
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.prompt",
  5905. "parameters": [
  5906. {
  5907. "name": "sessionID",
  5908. "in": "path",
  5909. "schema": {
  5910. "type": "string",
  5911. "pattern": "^ses"
  5912. },
  5913. "required": true
  5914. },
  5915. {
  5916. "name": "directory",
  5917. "in": "query",
  5918. "schema": {
  5919. "type": "string"
  5920. },
  5921. "required": false
  5922. },
  5923. {
  5924. "name": "workspace",
  5925. "in": "query",
  5926. "schema": {
  5927. "type": "string"
  5928. },
  5929. "required": false
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "description": "Created message",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "object",
  5939. "required": ["info", "parts"],
  5940. "properties": {
  5941. "info": {
  5942. "$ref": "#/components/schemas/AssistantMessage"
  5943. },
  5944. "parts": {
  5945. "type": "array",
  5946. "items": {
  5947. "$ref": "#/components/schemas/Part"
  5948. }
  5949. }
  5950. }
  5951. }
  5952. }
  5953. }
  5954. },
  5955. "400": {
  5956. "description": "BadRequest | InvalidRequestError",
  5957. "content": {
  5958. "application/json": {
  5959. "schema": {
  5960. "anyOf": [
  5961. {
  5962. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5963. },
  5964. {
  5965. "$ref": "#/components/schemas/InvalidRequestError"
  5966. }
  5967. ]
  5968. }
  5969. }
  5970. }
  5971. },
  5972. "404": {
  5973. "description": "NotFoundError",
  5974. "content": {
  5975. "application/json": {
  5976. "schema": {
  5977. "$ref": "#/components/schemas/NotFoundError"
  5978. }
  5979. }
  5980. }
  5981. }
  5982. },
  5983. "description": "Create and send a new message to a session, streaming the AI response.",
  5984. "summary": "Send message",
  5985. "requestBody": {
  5986. "content": {
  5987. "application/json": {
  5988. "schema": {
  5989. "type": "object",
  5990. "properties": {
  5991. "messageID": {
  5992. "type": "string",
  5993. "pattern": "^msg"
  5994. },
  5995. "model": {
  5996. "type": "object",
  5997. "properties": {
  5998. "providerID": {
  5999. "type": "string"
  6000. },
  6001. "modelID": {
  6002. "type": "string"
  6003. }
  6004. },
  6005. "required": ["providerID", "modelID"],
  6006. "additionalProperties": false
  6007. },
  6008. "agent": {
  6009. "type": "string"
  6010. },
  6011. "noReply": {
  6012. "type": "boolean"
  6013. },
  6014. "tools": {
  6015. "type": "object",
  6016. "additionalProperties": {
  6017. "type": "boolean"
  6018. }
  6019. },
  6020. "format": {
  6021. "$ref": "#/components/schemas/OutputFormat"
  6022. },
  6023. "system": {
  6024. "type": "string"
  6025. },
  6026. "variant": {
  6027. "type": "string"
  6028. },
  6029. "parts": {
  6030. "type": "array",
  6031. "items": {
  6032. "anyOf": [
  6033. {
  6034. "$ref": "#/components/schemas/TextPartInput"
  6035. },
  6036. {
  6037. "$ref": "#/components/schemas/FilePartInput"
  6038. },
  6039. {
  6040. "$ref": "#/components/schemas/AgentPartInput"
  6041. },
  6042. {
  6043. "$ref": "#/components/schemas/SubtaskPartInput"
  6044. }
  6045. ]
  6046. }
  6047. }
  6048. },
  6049. "required": ["parts"],
  6050. "additionalProperties": false
  6051. }
  6052. }
  6053. }
  6054. },
  6055. "x-codeSamples": [
  6056. {
  6057. "lang": "js",
  6058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6059. }
  6060. ]
  6061. }
  6062. },
  6063. "/session/{sessionID}/message/{messageID}": {
  6064. "get": {
  6065. "tags": ["session"],
  6066. "operationId": "session.message",
  6067. "parameters": [
  6068. {
  6069. "name": "sessionID",
  6070. "in": "path",
  6071. "schema": {
  6072. "type": "string",
  6073. "pattern": "^ses"
  6074. },
  6075. "required": true
  6076. },
  6077. {
  6078. "name": "messageID",
  6079. "in": "path",
  6080. "schema": {
  6081. "type": "string",
  6082. "pattern": "^msg"
  6083. },
  6084. "required": true
  6085. },
  6086. {
  6087. "name": "directory",
  6088. "in": "query",
  6089. "schema": {
  6090. "type": "string"
  6091. },
  6092. "required": false
  6093. },
  6094. {
  6095. "name": "workspace",
  6096. "in": "query",
  6097. "schema": {
  6098. "type": "string"
  6099. },
  6100. "required": false
  6101. }
  6102. ],
  6103. "responses": {
  6104. "200": {
  6105. "description": "Message",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "type": "object",
  6110. "properties": {
  6111. "info": {
  6112. "$ref": "#/components/schemas/Message"
  6113. },
  6114. "parts": {
  6115. "type": "array",
  6116. "items": {
  6117. "$ref": "#/components/schemas/Part"
  6118. }
  6119. }
  6120. },
  6121. "required": ["info", "parts"],
  6122. "additionalProperties": false,
  6123. "description": "Message"
  6124. }
  6125. }
  6126. }
  6127. },
  6128. "400": {
  6129. "description": "BadRequest | InvalidRequestError",
  6130. "content": {
  6131. "application/json": {
  6132. "schema": {
  6133. "anyOf": [
  6134. {
  6135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6136. },
  6137. {
  6138. "$ref": "#/components/schemas/InvalidRequestError"
  6139. }
  6140. ]
  6141. }
  6142. }
  6143. }
  6144. },
  6145. "404": {
  6146. "description": "NotFoundError",
  6147. "content": {
  6148. "application/json": {
  6149. "schema": {
  6150. "$ref": "#/components/schemas/NotFoundError"
  6151. }
  6152. }
  6153. }
  6154. }
  6155. },
  6156. "description": "Retrieve a specific message from a session by its message ID.",
  6157. "summary": "Get message",
  6158. "x-codeSamples": [
  6159. {
  6160. "lang": "js",
  6161. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6162. }
  6163. ]
  6164. },
  6165. "delete": {
  6166. "tags": ["session"],
  6167. "operationId": "session.deleteMessage",
  6168. "parameters": [
  6169. {
  6170. "name": "sessionID",
  6171. "in": "path",
  6172. "schema": {
  6173. "type": "string",
  6174. "pattern": "^ses"
  6175. },
  6176. "required": true
  6177. },
  6178. {
  6179. "name": "messageID",
  6180. "in": "path",
  6181. "schema": {
  6182. "type": "string",
  6183. "pattern": "^msg"
  6184. },
  6185. "required": true
  6186. },
  6187. {
  6188. "name": "directory",
  6189. "in": "query",
  6190. "schema": {
  6191. "type": "string"
  6192. },
  6193. "required": false
  6194. },
  6195. {
  6196. "name": "workspace",
  6197. "in": "query",
  6198. "schema": {
  6199. "type": "string"
  6200. },
  6201. "required": false
  6202. }
  6203. ],
  6204. "responses": {
  6205. "200": {
  6206. "description": "Successfully deleted message",
  6207. "content": {
  6208. "application/json": {
  6209. "schema": {
  6210. "type": "boolean",
  6211. "description": "Successfully deleted message"
  6212. }
  6213. }
  6214. }
  6215. },
  6216. "400": {
  6217. "description": "BadRequest | InvalidRequestError",
  6218. "content": {
  6219. "application/json": {
  6220. "schema": {
  6221. "anyOf": [
  6222. {
  6223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6224. },
  6225. {
  6226. "$ref": "#/components/schemas/InvalidRequestError"
  6227. }
  6228. ]
  6229. }
  6230. }
  6231. }
  6232. },
  6233. "404": {
  6234. "description": "NotFoundError",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "$ref": "#/components/schemas/NotFoundError"
  6239. }
  6240. }
  6241. }
  6242. },
  6243. "409": {
  6244. "description": "SessionBusyError",
  6245. "content": {
  6246. "application/json": {
  6247. "schema": {
  6248. "$ref": "#/components/schemas/SessionBusyError"
  6249. }
  6250. }
  6251. }
  6252. }
  6253. },
  6254. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6255. "summary": "Delete message",
  6256. "x-codeSamples": [
  6257. {
  6258. "lang": "js",
  6259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6260. }
  6261. ]
  6262. }
  6263. },
  6264. "/session/{sessionID}/fork": {
  6265. "post": {
  6266. "tags": ["session"],
  6267. "operationId": "session.fork",
  6268. "parameters": [
  6269. {
  6270. "name": "sessionID",
  6271. "in": "path",
  6272. "schema": {
  6273. "type": "string",
  6274. "pattern": "^ses"
  6275. },
  6276. "required": true
  6277. },
  6278. {
  6279. "name": "directory",
  6280. "in": "query",
  6281. "schema": {
  6282. "type": "string"
  6283. },
  6284. "required": false
  6285. },
  6286. {
  6287. "name": "workspace",
  6288. "in": "query",
  6289. "schema": {
  6290. "type": "string"
  6291. },
  6292. "required": false
  6293. }
  6294. ],
  6295. "responses": {
  6296. "200": {
  6297. "description": "200",
  6298. "content": {
  6299. "application/json": {
  6300. "schema": {
  6301. "$ref": "#/components/schemas/Session"
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "400": {
  6307. "description": "BadRequest | InvalidRequestError",
  6308. "content": {
  6309. "application/json": {
  6310. "schema": {
  6311. "anyOf": [
  6312. {
  6313. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6314. },
  6315. {
  6316. "$ref": "#/components/schemas/InvalidRequestError"
  6317. }
  6318. ]
  6319. }
  6320. }
  6321. }
  6322. },
  6323. "404": {
  6324. "description": "NotFoundError",
  6325. "content": {
  6326. "application/json": {
  6327. "schema": {
  6328. "$ref": "#/components/schemas/NotFoundError"
  6329. }
  6330. }
  6331. }
  6332. }
  6333. },
  6334. "description": "Create a new session by forking an existing session at a specific message point.",
  6335. "summary": "Fork session",
  6336. "requestBody": {
  6337. "content": {
  6338. "application/json": {
  6339. "schema": {
  6340. "type": "object",
  6341. "properties": {
  6342. "messageID": {
  6343. "type": "string",
  6344. "pattern": "^msg"
  6345. }
  6346. },
  6347. "additionalProperties": false
  6348. }
  6349. }
  6350. }
  6351. },
  6352. "x-codeSamples": [
  6353. {
  6354. "lang": "js",
  6355. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6356. }
  6357. ]
  6358. }
  6359. },
  6360. "/session/{sessionID}/abort": {
  6361. "post": {
  6362. "tags": ["session"],
  6363. "operationId": "session.abort",
  6364. "parameters": [
  6365. {
  6366. "name": "sessionID",
  6367. "in": "path",
  6368. "schema": {
  6369. "type": "string",
  6370. "pattern": "^ses"
  6371. },
  6372. "required": true
  6373. },
  6374. {
  6375. "name": "directory",
  6376. "in": "query",
  6377. "schema": {
  6378. "type": "string"
  6379. },
  6380. "required": false
  6381. },
  6382. {
  6383. "name": "workspace",
  6384. "in": "query",
  6385. "schema": {
  6386. "type": "string"
  6387. },
  6388. "required": false
  6389. }
  6390. ],
  6391. "responses": {
  6392. "200": {
  6393. "description": "Aborted session",
  6394. "content": {
  6395. "application/json": {
  6396. "schema": {
  6397. "type": "boolean",
  6398. "description": "Aborted session"
  6399. }
  6400. }
  6401. }
  6402. },
  6403. "400": {
  6404. "description": "BadRequest | InvalidRequestError",
  6405. "content": {
  6406. "application/json": {
  6407. "schema": {
  6408. "anyOf": [
  6409. {
  6410. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6411. },
  6412. {
  6413. "$ref": "#/components/schemas/InvalidRequestError"
  6414. }
  6415. ]
  6416. }
  6417. }
  6418. }
  6419. }
  6420. },
  6421. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6422. "summary": "Abort session",
  6423. "x-codeSamples": [
  6424. {
  6425. "lang": "js",
  6426. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6427. }
  6428. ]
  6429. }
  6430. },
  6431. "/session/{sessionID}/init": {
  6432. "post": {
  6433. "tags": ["session"],
  6434. "operationId": "session.init",
  6435. "parameters": [
  6436. {
  6437. "name": "sessionID",
  6438. "in": "path",
  6439. "schema": {
  6440. "type": "string",
  6441. "pattern": "^ses"
  6442. },
  6443. "required": true
  6444. },
  6445. {
  6446. "name": "directory",
  6447. "in": "query",
  6448. "schema": {
  6449. "type": "string"
  6450. },
  6451. "required": false
  6452. },
  6453. {
  6454. "name": "workspace",
  6455. "in": "query",
  6456. "schema": {
  6457. "type": "string"
  6458. },
  6459. "required": false
  6460. }
  6461. ],
  6462. "responses": {
  6463. "200": {
  6464. "description": "200",
  6465. "content": {
  6466. "application/json": {
  6467. "schema": {
  6468. "type": "boolean",
  6469. "description": "200"
  6470. }
  6471. }
  6472. }
  6473. },
  6474. "400": {
  6475. "description": "BadRequest | InvalidRequestError",
  6476. "content": {
  6477. "application/json": {
  6478. "schema": {
  6479. "anyOf": [
  6480. {
  6481. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6482. },
  6483. {
  6484. "$ref": "#/components/schemas/InvalidRequestError"
  6485. }
  6486. ]
  6487. }
  6488. }
  6489. }
  6490. },
  6491. "404": {
  6492. "description": "NotFoundError",
  6493. "content": {
  6494. "application/json": {
  6495. "schema": {
  6496. "$ref": "#/components/schemas/NotFoundError"
  6497. }
  6498. }
  6499. }
  6500. }
  6501. },
  6502. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6503. "summary": "Initialize session",
  6504. "requestBody": {
  6505. "content": {
  6506. "application/json": {
  6507. "schema": {
  6508. "type": "object",
  6509. "properties": {
  6510. "modelID": {
  6511. "type": "string"
  6512. },
  6513. "providerID": {
  6514. "type": "string"
  6515. },
  6516. "messageID": {
  6517. "type": "string",
  6518. "pattern": "^msg"
  6519. }
  6520. },
  6521. "required": ["modelID", "providerID", "messageID"],
  6522. "additionalProperties": false
  6523. }
  6524. }
  6525. }
  6526. },
  6527. "x-codeSamples": [
  6528. {
  6529. "lang": "js",
  6530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6531. }
  6532. ]
  6533. }
  6534. },
  6535. "/session/{sessionID}/share": {
  6536. "post": {
  6537. "tags": ["session"],
  6538. "operationId": "session.share",
  6539. "parameters": [
  6540. {
  6541. "name": "sessionID",
  6542. "in": "path",
  6543. "schema": {
  6544. "type": "string",
  6545. "pattern": "^ses"
  6546. },
  6547. "required": true
  6548. },
  6549. {
  6550. "name": "directory",
  6551. "in": "query",
  6552. "schema": {
  6553. "type": "string"
  6554. },
  6555. "required": false
  6556. },
  6557. {
  6558. "name": "workspace",
  6559. "in": "query",
  6560. "schema": {
  6561. "type": "string"
  6562. },
  6563. "required": false
  6564. }
  6565. ],
  6566. "responses": {
  6567. "200": {
  6568. "description": "Successfully shared session",
  6569. "content": {
  6570. "application/json": {
  6571. "schema": {
  6572. "$ref": "#/components/schemas/Session"
  6573. }
  6574. }
  6575. }
  6576. },
  6577. "400": {
  6578. "description": "Bad request",
  6579. "content": {
  6580. "application/json": {
  6581. "schema": {
  6582. "$ref": "#/components/schemas/BadRequestError"
  6583. }
  6584. }
  6585. }
  6586. },
  6587. "404": {
  6588. "description": "NotFoundError",
  6589. "content": {
  6590. "application/json": {
  6591. "schema": {
  6592. "$ref": "#/components/schemas/NotFoundError"
  6593. }
  6594. }
  6595. }
  6596. },
  6597. "500": {
  6598. "description": "InternalServerError",
  6599. "content": {
  6600. "application/json": {
  6601. "schema": {
  6602. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6603. }
  6604. }
  6605. }
  6606. }
  6607. },
  6608. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6609. "summary": "Share session",
  6610. "x-codeSamples": [
  6611. {
  6612. "lang": "js",
  6613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6614. }
  6615. ]
  6616. },
  6617. "delete": {
  6618. "tags": ["session"],
  6619. "operationId": "session.unshare",
  6620. "parameters": [
  6621. {
  6622. "name": "sessionID",
  6623. "in": "path",
  6624. "schema": {
  6625. "type": "string",
  6626. "pattern": "^ses"
  6627. },
  6628. "required": true
  6629. },
  6630. {
  6631. "name": "directory",
  6632. "in": "query",
  6633. "schema": {
  6634. "type": "string"
  6635. },
  6636. "required": false
  6637. },
  6638. {
  6639. "name": "workspace",
  6640. "in": "query",
  6641. "schema": {
  6642. "type": "string"
  6643. },
  6644. "required": false
  6645. }
  6646. ],
  6647. "responses": {
  6648. "200": {
  6649. "description": "Successfully unshared session",
  6650. "content": {
  6651. "application/json": {
  6652. "schema": {
  6653. "$ref": "#/components/schemas/Session"
  6654. }
  6655. }
  6656. }
  6657. },
  6658. "400": {
  6659. "description": "Bad request",
  6660. "content": {
  6661. "application/json": {
  6662. "schema": {
  6663. "$ref": "#/components/schemas/BadRequestError"
  6664. }
  6665. }
  6666. }
  6667. },
  6668. "404": {
  6669. "description": "NotFoundError",
  6670. "content": {
  6671. "application/json": {
  6672. "schema": {
  6673. "$ref": "#/components/schemas/NotFoundError"
  6674. }
  6675. }
  6676. }
  6677. },
  6678. "500": {
  6679. "description": "InternalServerError",
  6680. "content": {
  6681. "application/json": {
  6682. "schema": {
  6683. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6684. }
  6685. }
  6686. }
  6687. }
  6688. },
  6689. "description": "Remove the shareable link for a session, making it private again.",
  6690. "summary": "Unshare session",
  6691. "x-codeSamples": [
  6692. {
  6693. "lang": "js",
  6694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6695. }
  6696. ]
  6697. }
  6698. },
  6699. "/session/{sessionID}/summarize": {
  6700. "post": {
  6701. "tags": ["session"],
  6702. "operationId": "session.summarize",
  6703. "parameters": [
  6704. {
  6705. "name": "sessionID",
  6706. "in": "path",
  6707. "schema": {
  6708. "type": "string",
  6709. "pattern": "^ses"
  6710. },
  6711. "required": true
  6712. },
  6713. {
  6714. "name": "directory",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. },
  6721. {
  6722. "name": "workspace",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. }
  6729. ],
  6730. "responses": {
  6731. "200": {
  6732. "description": "Summarized session",
  6733. "content": {
  6734. "application/json": {
  6735. "schema": {
  6736. "type": "boolean",
  6737. "description": "Summarized session"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "400": {
  6743. "description": "BadRequest | InvalidRequestError",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "anyOf": [
  6748. {
  6749. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6750. },
  6751. {
  6752. "$ref": "#/components/schemas/InvalidRequestError"
  6753. }
  6754. ]
  6755. }
  6756. }
  6757. }
  6758. },
  6759. "404": {
  6760. "description": "NotFoundError",
  6761. "content": {
  6762. "application/json": {
  6763. "schema": {
  6764. "$ref": "#/components/schemas/NotFoundError"
  6765. }
  6766. }
  6767. }
  6768. }
  6769. },
  6770. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6771. "summary": "Summarize session",
  6772. "requestBody": {
  6773. "content": {
  6774. "application/json": {
  6775. "schema": {
  6776. "type": "object",
  6777. "properties": {
  6778. "providerID": {
  6779. "type": "string"
  6780. },
  6781. "modelID": {
  6782. "type": "string"
  6783. },
  6784. "auto": {
  6785. "type": "boolean"
  6786. }
  6787. },
  6788. "required": ["providerID", "modelID"],
  6789. "additionalProperties": false
  6790. }
  6791. }
  6792. }
  6793. },
  6794. "x-codeSamples": [
  6795. {
  6796. "lang": "js",
  6797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6798. }
  6799. ]
  6800. }
  6801. },
  6802. "/session/{sessionID}/prompt_async": {
  6803. "post": {
  6804. "tags": ["session"],
  6805. "operationId": "session.prompt_async",
  6806. "parameters": [
  6807. {
  6808. "name": "sessionID",
  6809. "in": "path",
  6810. "schema": {
  6811. "type": "string",
  6812. "pattern": "^ses"
  6813. },
  6814. "required": true
  6815. },
  6816. {
  6817. "name": "directory",
  6818. "in": "query",
  6819. "schema": {
  6820. "type": "string"
  6821. },
  6822. "required": false
  6823. },
  6824. {
  6825. "name": "workspace",
  6826. "in": "query",
  6827. "schema": {
  6828. "type": "string"
  6829. },
  6830. "required": false
  6831. }
  6832. ],
  6833. "responses": {
  6834. "204": {
  6835. "description": "Prompt accepted"
  6836. },
  6837. "400": {
  6838. "description": "BadRequest | InvalidRequestError",
  6839. "content": {
  6840. "application/json": {
  6841. "schema": {
  6842. "anyOf": [
  6843. {
  6844. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6845. },
  6846. {
  6847. "$ref": "#/components/schemas/InvalidRequestError"
  6848. }
  6849. ]
  6850. }
  6851. }
  6852. }
  6853. },
  6854. "404": {
  6855. "description": "NotFoundError",
  6856. "content": {
  6857. "application/json": {
  6858. "schema": {
  6859. "$ref": "#/components/schemas/NotFoundError"
  6860. }
  6861. }
  6862. }
  6863. }
  6864. },
  6865. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6866. "summary": "Send async message",
  6867. "requestBody": {
  6868. "content": {
  6869. "application/json": {
  6870. "schema": {
  6871. "type": "object",
  6872. "properties": {
  6873. "messageID": {
  6874. "type": "string",
  6875. "pattern": "^msg"
  6876. },
  6877. "model": {
  6878. "type": "object",
  6879. "properties": {
  6880. "providerID": {
  6881. "type": "string"
  6882. },
  6883. "modelID": {
  6884. "type": "string"
  6885. }
  6886. },
  6887. "required": ["providerID", "modelID"],
  6888. "additionalProperties": false
  6889. },
  6890. "agent": {
  6891. "type": "string"
  6892. },
  6893. "noReply": {
  6894. "type": "boolean"
  6895. },
  6896. "tools": {
  6897. "type": "object",
  6898. "additionalProperties": {
  6899. "type": "boolean"
  6900. }
  6901. },
  6902. "format": {
  6903. "$ref": "#/components/schemas/OutputFormat"
  6904. },
  6905. "system": {
  6906. "type": "string"
  6907. },
  6908. "variant": {
  6909. "type": "string"
  6910. },
  6911. "parts": {
  6912. "type": "array",
  6913. "items": {
  6914. "anyOf": [
  6915. {
  6916. "$ref": "#/components/schemas/TextPartInput"
  6917. },
  6918. {
  6919. "$ref": "#/components/schemas/FilePartInput"
  6920. },
  6921. {
  6922. "$ref": "#/components/schemas/AgentPartInput"
  6923. },
  6924. {
  6925. "$ref": "#/components/schemas/SubtaskPartInput"
  6926. }
  6927. ]
  6928. }
  6929. }
  6930. },
  6931. "required": ["parts"],
  6932. "additionalProperties": false
  6933. }
  6934. }
  6935. }
  6936. },
  6937. "x-codeSamples": [
  6938. {
  6939. "lang": "js",
  6940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6941. }
  6942. ]
  6943. }
  6944. },
  6945. "/session/{sessionID}/command": {
  6946. "post": {
  6947. "tags": ["session"],
  6948. "operationId": "session.command",
  6949. "parameters": [
  6950. {
  6951. "name": "sessionID",
  6952. "in": "path",
  6953. "schema": {
  6954. "type": "string",
  6955. "pattern": "^ses"
  6956. },
  6957. "required": true
  6958. },
  6959. {
  6960. "name": "directory",
  6961. "in": "query",
  6962. "schema": {
  6963. "type": "string"
  6964. },
  6965. "required": false
  6966. },
  6967. {
  6968. "name": "workspace",
  6969. "in": "query",
  6970. "schema": {
  6971. "type": "string"
  6972. },
  6973. "required": false
  6974. }
  6975. ],
  6976. "responses": {
  6977. "200": {
  6978. "description": "Created message",
  6979. "content": {
  6980. "application/json": {
  6981. "schema": {
  6982. "type": "object",
  6983. "required": ["info", "parts"],
  6984. "properties": {
  6985. "info": {
  6986. "$ref": "#/components/schemas/AssistantMessage"
  6987. },
  6988. "parts": {
  6989. "type": "array",
  6990. "items": {
  6991. "$ref": "#/components/schemas/Part"
  6992. }
  6993. }
  6994. }
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "400": {
  7000. "description": "BadRequest | InvalidRequestError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "anyOf": [
  7005. {
  7006. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7007. },
  7008. {
  7009. "$ref": "#/components/schemas/InvalidRequestError"
  7010. }
  7011. ]
  7012. }
  7013. }
  7014. }
  7015. },
  7016. "404": {
  7017. "description": "NotFoundError",
  7018. "content": {
  7019. "application/json": {
  7020. "schema": {
  7021. "$ref": "#/components/schemas/NotFoundError"
  7022. }
  7023. }
  7024. }
  7025. }
  7026. },
  7027. "description": "Send a new command to a session for execution by the AI assistant.",
  7028. "summary": "Send command",
  7029. "requestBody": {
  7030. "content": {
  7031. "application/json": {
  7032. "schema": {
  7033. "type": "object",
  7034. "properties": {
  7035. "messageID": {
  7036. "type": "string",
  7037. "pattern": "^msg"
  7038. },
  7039. "agent": {
  7040. "type": "string"
  7041. },
  7042. "model": {
  7043. "type": "string"
  7044. },
  7045. "arguments": {
  7046. "type": "string"
  7047. },
  7048. "command": {
  7049. "type": "string"
  7050. },
  7051. "variant": {
  7052. "type": "string"
  7053. },
  7054. "parts": {
  7055. "type": "array",
  7056. "items": {
  7057. "type": "object",
  7058. "properties": {
  7059. "id": {
  7060. "type": "string",
  7061. "pattern": "^prt"
  7062. },
  7063. "type": {
  7064. "type": "string",
  7065. "enum": ["file"]
  7066. },
  7067. "mime": {
  7068. "type": "string"
  7069. },
  7070. "filename": {
  7071. "type": "string"
  7072. },
  7073. "url": {
  7074. "type": "string"
  7075. },
  7076. "source": {
  7077. "$ref": "#/components/schemas/FilePartSource"
  7078. }
  7079. },
  7080. "required": ["type", "mime", "url"],
  7081. "additionalProperties": false
  7082. }
  7083. }
  7084. },
  7085. "required": ["arguments", "command"],
  7086. "additionalProperties": false
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "x-codeSamples": [
  7092. {
  7093. "lang": "js",
  7094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7095. }
  7096. ]
  7097. }
  7098. },
  7099. "/session/{sessionID}/shell": {
  7100. "post": {
  7101. "tags": ["session"],
  7102. "operationId": "session.shell",
  7103. "parameters": [
  7104. {
  7105. "name": "sessionID",
  7106. "in": "path",
  7107. "schema": {
  7108. "type": "string",
  7109. "pattern": "^ses"
  7110. },
  7111. "required": true
  7112. },
  7113. {
  7114. "name": "directory",
  7115. "in": "query",
  7116. "schema": {
  7117. "type": "string"
  7118. },
  7119. "required": false
  7120. },
  7121. {
  7122. "name": "workspace",
  7123. "in": "query",
  7124. "schema": {
  7125. "type": "string"
  7126. },
  7127. "required": false
  7128. }
  7129. ],
  7130. "responses": {
  7131. "200": {
  7132. "description": "Created message",
  7133. "content": {
  7134. "application/json": {
  7135. "schema": {
  7136. "type": "object",
  7137. "properties": {
  7138. "info": {
  7139. "$ref": "#/components/schemas/Message"
  7140. },
  7141. "parts": {
  7142. "type": "array",
  7143. "items": {
  7144. "$ref": "#/components/schemas/Part"
  7145. }
  7146. }
  7147. },
  7148. "required": ["info", "parts"],
  7149. "additionalProperties": false,
  7150. "description": "Created message"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. },
  7182. "409": {
  7183. "description": "SessionBusyError",
  7184. "content": {
  7185. "application/json": {
  7186. "schema": {
  7187. "$ref": "#/components/schemas/SessionBusyError"
  7188. }
  7189. }
  7190. }
  7191. }
  7192. },
  7193. "description": "Execute a shell command within the session context and return the AI's response.",
  7194. "summary": "Run shell command",
  7195. "requestBody": {
  7196. "content": {
  7197. "application/json": {
  7198. "schema": {
  7199. "type": "object",
  7200. "properties": {
  7201. "messageID": {
  7202. "type": "string",
  7203. "pattern": "^msg"
  7204. },
  7205. "agent": {
  7206. "type": "string"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "command": {
  7222. "type": "string"
  7223. }
  7224. },
  7225. "required": ["agent", "command"],
  7226. "additionalProperties": false
  7227. }
  7228. }
  7229. }
  7230. },
  7231. "x-codeSamples": [
  7232. {
  7233. "lang": "js",
  7234. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7235. }
  7236. ]
  7237. }
  7238. },
  7239. "/session/{sessionID}/revert": {
  7240. "post": {
  7241. "tags": ["session"],
  7242. "operationId": "session.revert",
  7243. "parameters": [
  7244. {
  7245. "name": "sessionID",
  7246. "in": "path",
  7247. "schema": {
  7248. "type": "string",
  7249. "pattern": "^ses"
  7250. },
  7251. "required": true
  7252. },
  7253. {
  7254. "name": "directory",
  7255. "in": "query",
  7256. "schema": {
  7257. "type": "string"
  7258. },
  7259. "required": false
  7260. },
  7261. {
  7262. "name": "workspace",
  7263. "in": "query",
  7264. "schema": {
  7265. "type": "string"
  7266. },
  7267. "required": false
  7268. }
  7269. ],
  7270. "responses": {
  7271. "200": {
  7272. "description": "Updated session",
  7273. "content": {
  7274. "application/json": {
  7275. "schema": {
  7276. "$ref": "#/components/schemas/Session"
  7277. }
  7278. }
  7279. }
  7280. },
  7281. "400": {
  7282. "description": "BadRequest | InvalidRequestError",
  7283. "content": {
  7284. "application/json": {
  7285. "schema": {
  7286. "anyOf": [
  7287. {
  7288. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7289. },
  7290. {
  7291. "$ref": "#/components/schemas/InvalidRequestError"
  7292. }
  7293. ]
  7294. }
  7295. }
  7296. }
  7297. },
  7298. "404": {
  7299. "description": "NotFoundError",
  7300. "content": {
  7301. "application/json": {
  7302. "schema": {
  7303. "$ref": "#/components/schemas/NotFoundError"
  7304. }
  7305. }
  7306. }
  7307. },
  7308. "409": {
  7309. "description": "SessionBusyError",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "$ref": "#/components/schemas/SessionBusyError"
  7314. }
  7315. }
  7316. }
  7317. }
  7318. },
  7319. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7320. "summary": "Revert message",
  7321. "requestBody": {
  7322. "content": {
  7323. "application/json": {
  7324. "schema": {
  7325. "type": "object",
  7326. "properties": {
  7327. "messageID": {
  7328. "type": "string",
  7329. "pattern": "^msg"
  7330. },
  7331. "partID": {
  7332. "type": "string",
  7333. "pattern": "^prt"
  7334. }
  7335. },
  7336. "required": ["messageID"],
  7337. "additionalProperties": false
  7338. }
  7339. }
  7340. }
  7341. },
  7342. "x-codeSamples": [
  7343. {
  7344. "lang": "js",
  7345. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7346. }
  7347. ]
  7348. }
  7349. },
  7350. "/session/{sessionID}/unrevert": {
  7351. "post": {
  7352. "tags": ["session"],
  7353. "operationId": "session.unrevert",
  7354. "parameters": [
  7355. {
  7356. "name": "sessionID",
  7357. "in": "path",
  7358. "schema": {
  7359. "type": "string",
  7360. "pattern": "^ses"
  7361. },
  7362. "required": true
  7363. },
  7364. {
  7365. "name": "directory",
  7366. "in": "query",
  7367. "schema": {
  7368. "type": "string"
  7369. },
  7370. "required": false
  7371. },
  7372. {
  7373. "name": "workspace",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. }
  7380. ],
  7381. "responses": {
  7382. "200": {
  7383. "description": "Updated session",
  7384. "content": {
  7385. "application/json": {
  7386. "schema": {
  7387. "$ref": "#/components/schemas/Session"
  7388. }
  7389. }
  7390. }
  7391. },
  7392. "400": {
  7393. "description": "BadRequest | InvalidRequestError",
  7394. "content": {
  7395. "application/json": {
  7396. "schema": {
  7397. "anyOf": [
  7398. {
  7399. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7400. },
  7401. {
  7402. "$ref": "#/components/schemas/InvalidRequestError"
  7403. }
  7404. ]
  7405. }
  7406. }
  7407. }
  7408. },
  7409. "404": {
  7410. "description": "NotFoundError",
  7411. "content": {
  7412. "application/json": {
  7413. "schema": {
  7414. "$ref": "#/components/schemas/NotFoundError"
  7415. }
  7416. }
  7417. }
  7418. },
  7419. "409": {
  7420. "description": "SessionBusyError",
  7421. "content": {
  7422. "application/json": {
  7423. "schema": {
  7424. "$ref": "#/components/schemas/SessionBusyError"
  7425. }
  7426. }
  7427. }
  7428. }
  7429. },
  7430. "description": "Restore all previously reverted messages in a session.",
  7431. "summary": "Restore reverted messages",
  7432. "x-codeSamples": [
  7433. {
  7434. "lang": "js",
  7435. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7436. }
  7437. ]
  7438. }
  7439. },
  7440. "/session/{sessionID}/permissions/{permissionID}": {
  7441. "post": {
  7442. "tags": ["session"],
  7443. "operationId": "permission.respond",
  7444. "parameters": [
  7445. {
  7446. "name": "sessionID",
  7447. "in": "path",
  7448. "schema": {
  7449. "type": "string",
  7450. "pattern": "^ses"
  7451. },
  7452. "required": true
  7453. },
  7454. {
  7455. "name": "permissionID",
  7456. "in": "path",
  7457. "schema": {
  7458. "type": "string",
  7459. "pattern": "^per"
  7460. },
  7461. "required": true
  7462. },
  7463. {
  7464. "name": "directory",
  7465. "in": "query",
  7466. "schema": {
  7467. "type": "string"
  7468. },
  7469. "required": false
  7470. },
  7471. {
  7472. "name": "workspace",
  7473. "in": "query",
  7474. "schema": {
  7475. "type": "string"
  7476. },
  7477. "required": false
  7478. }
  7479. ],
  7480. "responses": {
  7481. "200": {
  7482. "description": "Permission processed successfully",
  7483. "content": {
  7484. "application/json": {
  7485. "schema": {
  7486. "type": "boolean",
  7487. "description": "Permission processed successfully"
  7488. }
  7489. }
  7490. }
  7491. },
  7492. "400": {
  7493. "description": "BadRequest | InvalidRequestError",
  7494. "content": {
  7495. "application/json": {
  7496. "schema": {
  7497. "anyOf": [
  7498. {
  7499. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7500. },
  7501. {
  7502. "$ref": "#/components/schemas/InvalidRequestError"
  7503. }
  7504. ]
  7505. }
  7506. }
  7507. }
  7508. },
  7509. "404": {
  7510. "description": "NotFoundError | PermissionNotFoundError",
  7511. "content": {
  7512. "application/json": {
  7513. "schema": {
  7514. "anyOf": [
  7515. {
  7516. "$ref": "#/components/schemas/NotFoundError"
  7517. },
  7518. {
  7519. "$ref": "#/components/schemas/PermissionNotFoundError"
  7520. }
  7521. ]
  7522. }
  7523. }
  7524. }
  7525. }
  7526. },
  7527. "description": "Approve or deny a permission request from the AI assistant.",
  7528. "summary": "Respond to permission",
  7529. "deprecated": true,
  7530. "requestBody": {
  7531. "content": {
  7532. "application/json": {
  7533. "schema": {
  7534. "type": "object",
  7535. "properties": {
  7536. "response": {
  7537. "type": "string",
  7538. "enum": ["once", "always", "reject"]
  7539. }
  7540. },
  7541. "required": ["response"],
  7542. "additionalProperties": false
  7543. }
  7544. }
  7545. }
  7546. },
  7547. "x-codeSamples": [
  7548. {
  7549. "lang": "js",
  7550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7551. }
  7552. ]
  7553. }
  7554. },
  7555. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7556. "delete": {
  7557. "tags": ["session"],
  7558. "operationId": "part.delete",
  7559. "parameters": [
  7560. {
  7561. "name": "sessionID",
  7562. "in": "path",
  7563. "schema": {
  7564. "type": "string",
  7565. "pattern": "^ses"
  7566. },
  7567. "required": true
  7568. },
  7569. {
  7570. "name": "messageID",
  7571. "in": "path",
  7572. "schema": {
  7573. "type": "string",
  7574. "pattern": "^msg"
  7575. },
  7576. "required": true
  7577. },
  7578. {
  7579. "name": "partID",
  7580. "in": "path",
  7581. "schema": {
  7582. "type": "string",
  7583. "pattern": "^prt"
  7584. },
  7585. "required": true
  7586. },
  7587. {
  7588. "name": "directory",
  7589. "in": "query",
  7590. "schema": {
  7591. "type": "string"
  7592. },
  7593. "required": false
  7594. },
  7595. {
  7596. "name": "workspace",
  7597. "in": "query",
  7598. "schema": {
  7599. "type": "string"
  7600. },
  7601. "required": false
  7602. }
  7603. ],
  7604. "responses": {
  7605. "200": {
  7606. "description": "Successfully deleted part",
  7607. "content": {
  7608. "application/json": {
  7609. "schema": {
  7610. "type": "boolean",
  7611. "description": "Successfully deleted part"
  7612. }
  7613. }
  7614. }
  7615. },
  7616. "400": {
  7617. "description": "BadRequest | InvalidRequestError",
  7618. "content": {
  7619. "application/json": {
  7620. "schema": {
  7621. "anyOf": [
  7622. {
  7623. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7624. },
  7625. {
  7626. "$ref": "#/components/schemas/InvalidRequestError"
  7627. }
  7628. ]
  7629. }
  7630. }
  7631. }
  7632. },
  7633. "404": {
  7634. "description": "NotFoundError",
  7635. "content": {
  7636. "application/json": {
  7637. "schema": {
  7638. "$ref": "#/components/schemas/NotFoundError"
  7639. }
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "description": "Delete a part from a message.",
  7645. "x-codeSamples": [
  7646. {
  7647. "lang": "js",
  7648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7649. }
  7650. ]
  7651. },
  7652. "patch": {
  7653. "tags": ["session"],
  7654. "operationId": "part.update",
  7655. "parameters": [
  7656. {
  7657. "name": "sessionID",
  7658. "in": "path",
  7659. "schema": {
  7660. "type": "string",
  7661. "pattern": "^ses"
  7662. },
  7663. "required": true
  7664. },
  7665. {
  7666. "name": "messageID",
  7667. "in": "path",
  7668. "schema": {
  7669. "type": "string",
  7670. "pattern": "^msg"
  7671. },
  7672. "required": true
  7673. },
  7674. {
  7675. "name": "partID",
  7676. "in": "path",
  7677. "schema": {
  7678. "type": "string",
  7679. "pattern": "^prt"
  7680. },
  7681. "required": true
  7682. },
  7683. {
  7684. "name": "directory",
  7685. "in": "query",
  7686. "schema": {
  7687. "type": "string"
  7688. },
  7689. "required": false
  7690. },
  7691. {
  7692. "name": "workspace",
  7693. "in": "query",
  7694. "schema": {
  7695. "type": "string"
  7696. },
  7697. "required": false
  7698. }
  7699. ],
  7700. "responses": {
  7701. "200": {
  7702. "description": "Successfully updated part",
  7703. "content": {
  7704. "application/json": {
  7705. "schema": {
  7706. "$ref": "#/components/schemas/Part"
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "400": {
  7712. "description": "BadRequest | InvalidRequestError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "anyOf": [
  7717. {
  7718. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7719. },
  7720. {
  7721. "$ref": "#/components/schemas/InvalidRequestError"
  7722. }
  7723. ]
  7724. }
  7725. }
  7726. }
  7727. },
  7728. "404": {
  7729. "description": "NotFoundError",
  7730. "content": {
  7731. "application/json": {
  7732. "schema": {
  7733. "$ref": "#/components/schemas/NotFoundError"
  7734. }
  7735. }
  7736. }
  7737. }
  7738. },
  7739. "description": "Update a part in a message.",
  7740. "requestBody": {
  7741. "content": {
  7742. "application/json": {
  7743. "schema": {
  7744. "$ref": "#/components/schemas/Part"
  7745. }
  7746. }
  7747. }
  7748. },
  7749. "x-codeSamples": [
  7750. {
  7751. "lang": "js",
  7752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7753. }
  7754. ]
  7755. }
  7756. },
  7757. "/sync/start": {
  7758. "post": {
  7759. "tags": ["sync"],
  7760. "operationId": "sync.start",
  7761. "parameters": [
  7762. {
  7763. "name": "directory",
  7764. "in": "query",
  7765. "schema": {
  7766. "type": "string"
  7767. },
  7768. "required": false
  7769. },
  7770. {
  7771. "name": "workspace",
  7772. "in": "query",
  7773. "schema": {
  7774. "type": "string"
  7775. },
  7776. "required": false
  7777. }
  7778. ],
  7779. "responses": {
  7780. "200": {
  7781. "description": "Workspace sync started",
  7782. "content": {
  7783. "application/json": {
  7784. "schema": {
  7785. "type": "boolean",
  7786. "description": "Workspace sync started"
  7787. }
  7788. }
  7789. }
  7790. },
  7791. "400": {
  7792. "description": "Bad request",
  7793. "content": {
  7794. "application/json": {
  7795. "schema": {
  7796. "$ref": "#/components/schemas/BadRequestError"
  7797. }
  7798. }
  7799. }
  7800. }
  7801. },
  7802. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7803. "summary": "Start workspace sync",
  7804. "x-codeSamples": [
  7805. {
  7806. "lang": "js",
  7807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7808. }
  7809. ]
  7810. }
  7811. },
  7812. "/sync/replay": {
  7813. "post": {
  7814. "tags": ["sync"],
  7815. "operationId": "sync.replay",
  7816. "parameters": [
  7817. {
  7818. "name": "directory",
  7819. "in": "query",
  7820. "schema": {
  7821. "type": "string"
  7822. },
  7823. "required": false
  7824. },
  7825. {
  7826. "name": "workspace",
  7827. "in": "query",
  7828. "schema": {
  7829. "type": "string"
  7830. },
  7831. "required": false
  7832. }
  7833. ],
  7834. "responses": {
  7835. "200": {
  7836. "description": "Replayed sync events",
  7837. "content": {
  7838. "application/json": {
  7839. "schema": {
  7840. "type": "object",
  7841. "properties": {
  7842. "sessionID": {
  7843. "type": "string"
  7844. }
  7845. },
  7846. "required": ["sessionID"],
  7847. "additionalProperties": false,
  7848. "description": "Replayed sync events"
  7849. }
  7850. }
  7851. }
  7852. },
  7853. "400": {
  7854. "description": "BadRequest | InvalidRequestError",
  7855. "content": {
  7856. "application/json": {
  7857. "schema": {
  7858. "anyOf": [
  7859. {
  7860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7861. },
  7862. {
  7863. "$ref": "#/components/schemas/InvalidRequestError"
  7864. }
  7865. ]
  7866. }
  7867. }
  7868. }
  7869. }
  7870. },
  7871. "description": "Validate and replay a complete sync event history.",
  7872. "summary": "Replay sync events",
  7873. "requestBody": {
  7874. "content": {
  7875. "application/json": {
  7876. "schema": {
  7877. "type": "object",
  7878. "properties": {
  7879. "directory": {
  7880. "type": "string"
  7881. },
  7882. "events": {
  7883. "type": "array",
  7884. "minItems": 1,
  7885. "items": {
  7886. "type": "object",
  7887. "properties": {
  7888. "id": {
  7889. "type": "string"
  7890. },
  7891. "aggregateID": {
  7892. "type": "string"
  7893. },
  7894. "seq": {
  7895. "type": "integer",
  7896. "minimum": 0
  7897. },
  7898. "type": {
  7899. "type": "string"
  7900. },
  7901. "data": {
  7902. "type": "object"
  7903. }
  7904. },
  7905. "required": ["id", "aggregateID", "seq", "type", "data"],
  7906. "additionalProperties": false
  7907. }
  7908. }
  7909. },
  7910. "required": ["directory", "events"],
  7911. "additionalProperties": false
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "x-codeSamples": [
  7917. {
  7918. "lang": "js",
  7919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7920. }
  7921. ]
  7922. }
  7923. },
  7924. "/sync/steal": {
  7925. "post": {
  7926. "tags": ["sync"],
  7927. "operationId": "sync.steal",
  7928. "parameters": [
  7929. {
  7930. "name": "directory",
  7931. "in": "query",
  7932. "schema": {
  7933. "type": "string"
  7934. },
  7935. "required": false
  7936. },
  7937. {
  7938. "name": "workspace",
  7939. "in": "query",
  7940. "schema": {
  7941. "type": "string"
  7942. },
  7943. "required": false
  7944. }
  7945. ],
  7946. "responses": {
  7947. "200": {
  7948. "description": "Session stolen into workspace",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "type": "object",
  7953. "properties": {
  7954. "sessionID": {
  7955. "type": "string",
  7956. "pattern": "^ses"
  7957. }
  7958. },
  7959. "required": ["sessionID"],
  7960. "additionalProperties": false,
  7961. "description": "Session stolen into workspace"
  7962. }
  7963. }
  7964. }
  7965. },
  7966. "400": {
  7967. "description": "BadRequest | InvalidRequestError",
  7968. "content": {
  7969. "application/json": {
  7970. "schema": {
  7971. "anyOf": [
  7972. {
  7973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7974. },
  7975. {
  7976. "$ref": "#/components/schemas/InvalidRequestError"
  7977. }
  7978. ]
  7979. }
  7980. }
  7981. }
  7982. }
  7983. },
  7984. "description": "Update a session to belong to the current workspace through the sync event system.",
  7985. "summary": "Steal session into workspace",
  7986. "requestBody": {
  7987. "content": {
  7988. "application/json": {
  7989. "schema": {
  7990. "type": "object",
  7991. "properties": {
  7992. "sessionID": {
  7993. "type": "string",
  7994. "pattern": "^ses"
  7995. }
  7996. },
  7997. "required": ["sessionID"],
  7998. "additionalProperties": false
  7999. }
  8000. }
  8001. }
  8002. },
  8003. "x-codeSamples": [
  8004. {
  8005. "lang": "js",
  8006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8007. }
  8008. ]
  8009. }
  8010. },
  8011. "/sync/history": {
  8012. "post": {
  8013. "tags": ["sync"],
  8014. "operationId": "sync.history.list",
  8015. "parameters": [
  8016. {
  8017. "name": "directory",
  8018. "in": "query",
  8019. "schema": {
  8020. "type": "string"
  8021. },
  8022. "required": false
  8023. },
  8024. {
  8025. "name": "workspace",
  8026. "in": "query",
  8027. "schema": {
  8028. "type": "string"
  8029. },
  8030. "required": false
  8031. }
  8032. ],
  8033. "responses": {
  8034. "200": {
  8035. "description": "Sync events",
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "type": "array",
  8040. "items": {
  8041. "type": "object",
  8042. "properties": {
  8043. "id": {
  8044. "type": "string"
  8045. },
  8046. "aggregate_id": {
  8047. "type": "string"
  8048. },
  8049. "seq": {
  8050. "type": "integer",
  8051. "minimum": 0
  8052. },
  8053. "type": {
  8054. "type": "string"
  8055. },
  8056. "data": {
  8057. "type": "object"
  8058. }
  8059. },
  8060. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8061. "additionalProperties": false
  8062. },
  8063. "description": "Sync events"
  8064. }
  8065. }
  8066. }
  8067. },
  8068. "400": {
  8069. "description": "BadRequest | InvalidRequestError",
  8070. "content": {
  8071. "application/json": {
  8072. "schema": {
  8073. "anyOf": [
  8074. {
  8075. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8076. },
  8077. {
  8078. "$ref": "#/components/schemas/InvalidRequestError"
  8079. }
  8080. ]
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "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.",
  8087. "summary": "List sync events",
  8088. "requestBody": {
  8089. "content": {
  8090. "application/json": {
  8091. "schema": {
  8092. "type": "object",
  8093. "additionalProperties": {
  8094. "type": "integer",
  8095. "minimum": 0
  8096. }
  8097. }
  8098. }
  8099. }
  8100. },
  8101. "x-codeSamples": [
  8102. {
  8103. "lang": "js",
  8104. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8105. }
  8106. ]
  8107. }
  8108. },
  8109. "/api/session": {
  8110. "get": {
  8111. "tags": ["v2"],
  8112. "operationId": "v2.session.list",
  8113. "parameters": [
  8114. {
  8115. "name": "workspace",
  8116. "in": "query",
  8117. "schema": {
  8118. "type": "string",
  8119. "pattern": "^wrk"
  8120. },
  8121. "required": false
  8122. },
  8123. {
  8124. "name": "limit",
  8125. "in": "query",
  8126. "schema": {
  8127. "type": "number"
  8128. },
  8129. "required": false
  8130. },
  8131. {
  8132. "name": "order",
  8133. "in": "query",
  8134. "schema": {
  8135. "type": "string",
  8136. "enum": ["asc", "desc"]
  8137. },
  8138. "required": false
  8139. },
  8140. {
  8141. "name": "search",
  8142. "in": "query",
  8143. "schema": {
  8144. "type": "string"
  8145. },
  8146. "required": false
  8147. },
  8148. {
  8149. "name": "directory",
  8150. "in": "query",
  8151. "schema": {
  8152. "type": "string"
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "project",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. },
  8164. {
  8165. "name": "subpath",
  8166. "in": "query",
  8167. "schema": {
  8168. "type": "string"
  8169. },
  8170. "required": false
  8171. },
  8172. {
  8173. "name": "cursor",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string",
  8177. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  8178. },
  8179. "required": false
  8180. }
  8181. ],
  8182. "security": [],
  8183. "responses": {
  8184. "200": {
  8185. "description": "V2SessionsResponse",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "$ref": "#/components/schemas/V2SessionsResponse"
  8190. }
  8191. }
  8192. }
  8193. },
  8194. "400": {
  8195. "description": "InvalidCursorError | InvalidRequestError",
  8196. "content": {
  8197. "application/json": {
  8198. "schema": {
  8199. "anyOf": [
  8200. {
  8201. "$ref": "#/components/schemas/InvalidCursorError"
  8202. },
  8203. {
  8204. "$ref": "#/components/schemas/InvalidRequestError"
  8205. },
  8206. {
  8207. "$ref": "#/components/schemas/InvalidRequestError"
  8208. }
  8209. ]
  8210. }
  8211. }
  8212. }
  8213. },
  8214. "401": {
  8215. "description": "UnauthorizedError",
  8216. "content": {
  8217. "application/json": {
  8218. "schema": {
  8219. "$ref": "#/components/schemas/UnauthorizedError"
  8220. }
  8221. }
  8222. }
  8223. }
  8224. },
  8225. "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.",
  8226. "summary": "List v2 sessions",
  8227. "x-codeSamples": [
  8228. {
  8229. "lang": "js",
  8230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8231. }
  8232. ]
  8233. }
  8234. },
  8235. "/api/session/{sessionID}/prompt": {
  8236. "post": {
  8237. "tags": ["v2"],
  8238. "operationId": "v2.session.prompt",
  8239. "parameters": [
  8240. {
  8241. "name": "sessionID",
  8242. "in": "path",
  8243. "schema": {
  8244. "type": "string",
  8245. "pattern": "^ses"
  8246. },
  8247. "required": true
  8248. },
  8249. {
  8250. "name": "directory",
  8251. "in": "query",
  8252. "schema": {
  8253. "type": "string"
  8254. },
  8255. "required": false
  8256. },
  8257. {
  8258. "name": "workspace",
  8259. "in": "query",
  8260. "schema": {
  8261. "type": "string"
  8262. },
  8263. "required": false
  8264. }
  8265. ],
  8266. "security": [],
  8267. "responses": {
  8268. "200": {
  8269. "description": "Session.Message",
  8270. "content": {
  8271. "application/json": {
  8272. "schema": {
  8273. "$ref": "#/components/schemas/SessionMessage"
  8274. }
  8275. }
  8276. }
  8277. },
  8278. "400": {
  8279. "description": "InvalidRequestError",
  8280. "content": {
  8281. "application/json": {
  8282. "schema": {
  8283. "$ref": "#/components/schemas/InvalidRequestError"
  8284. }
  8285. }
  8286. }
  8287. },
  8288. "401": {
  8289. "description": "UnauthorizedError",
  8290. "content": {
  8291. "application/json": {
  8292. "schema": {
  8293. "$ref": "#/components/schemas/UnauthorizedError"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "404": {
  8299. "description": "SessionNotFoundError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "$ref": "#/components/schemas/SessionNotFoundError"
  8304. }
  8305. }
  8306. }
  8307. },
  8308. "503": {
  8309. "description": "ServiceUnavailableError",
  8310. "content": {
  8311. "application/json": {
  8312. "schema": {
  8313. "$ref": "#/components/schemas/ServiceUnavailableError"
  8314. }
  8315. }
  8316. }
  8317. }
  8318. },
  8319. "description": "Create a v2 session message and queue it for the agent loop.",
  8320. "summary": "Send v2 message",
  8321. "requestBody": {
  8322. "content": {
  8323. "application/json": {
  8324. "schema": {
  8325. "type": "object",
  8326. "properties": {
  8327. "prompt": {
  8328. "$ref": "#/components/schemas/Prompt"
  8329. },
  8330. "delivery": {
  8331. "$ref": "#/components/schemas/SessionDelivery"
  8332. }
  8333. },
  8334. "required": ["prompt"],
  8335. "additionalProperties": false
  8336. }
  8337. }
  8338. }
  8339. },
  8340. "x-codeSamples": [
  8341. {
  8342. "lang": "js",
  8343. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8344. }
  8345. ]
  8346. }
  8347. },
  8348. "/api/session/{sessionID}/compact": {
  8349. "post": {
  8350. "tags": ["v2"],
  8351. "operationId": "v2.session.compact",
  8352. "parameters": [
  8353. {
  8354. "name": "sessionID",
  8355. "in": "path",
  8356. "schema": {
  8357. "type": "string",
  8358. "pattern": "^ses"
  8359. },
  8360. "required": true
  8361. },
  8362. {
  8363. "name": "directory",
  8364. "in": "query",
  8365. "schema": {
  8366. "type": "string"
  8367. },
  8368. "required": false
  8369. },
  8370. {
  8371. "name": "workspace",
  8372. "in": "query",
  8373. "schema": {
  8374. "type": "string"
  8375. },
  8376. "required": false
  8377. }
  8378. ],
  8379. "security": [],
  8380. "responses": {
  8381. "204": {
  8382. "description": "<No Content>"
  8383. },
  8384. "400": {
  8385. "description": "InvalidRequestError",
  8386. "content": {
  8387. "application/json": {
  8388. "schema": {
  8389. "$ref": "#/components/schemas/InvalidRequestError"
  8390. }
  8391. }
  8392. }
  8393. },
  8394. "401": {
  8395. "description": "UnauthorizedError",
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "$ref": "#/components/schemas/UnauthorizedError"
  8400. }
  8401. }
  8402. }
  8403. },
  8404. "404": {
  8405. "description": "SessionNotFoundError",
  8406. "content": {
  8407. "application/json": {
  8408. "schema": {
  8409. "$ref": "#/components/schemas/SessionNotFoundError"
  8410. }
  8411. }
  8412. }
  8413. },
  8414. "503": {
  8415. "description": "ServiceUnavailableError",
  8416. "content": {
  8417. "application/json": {
  8418. "schema": {
  8419. "$ref": "#/components/schemas/ServiceUnavailableError"
  8420. }
  8421. }
  8422. }
  8423. }
  8424. },
  8425. "description": "Compact a v2 session conversation.",
  8426. "summary": "Compact v2 session",
  8427. "x-codeSamples": [
  8428. {
  8429. "lang": "js",
  8430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8431. }
  8432. ]
  8433. }
  8434. },
  8435. "/api/session/{sessionID}/wait": {
  8436. "post": {
  8437. "tags": ["v2"],
  8438. "operationId": "v2.session.wait",
  8439. "parameters": [
  8440. {
  8441. "name": "sessionID",
  8442. "in": "path",
  8443. "schema": {
  8444. "type": "string",
  8445. "pattern": "^ses"
  8446. },
  8447. "required": true
  8448. },
  8449. {
  8450. "name": "directory",
  8451. "in": "query",
  8452. "schema": {
  8453. "type": "string"
  8454. },
  8455. "required": false
  8456. },
  8457. {
  8458. "name": "workspace",
  8459. "in": "query",
  8460. "schema": {
  8461. "type": "string"
  8462. },
  8463. "required": false
  8464. }
  8465. ],
  8466. "security": [],
  8467. "responses": {
  8468. "204": {
  8469. "description": "<No Content>"
  8470. },
  8471. "400": {
  8472. "description": "InvalidRequestError",
  8473. "content": {
  8474. "application/json": {
  8475. "schema": {
  8476. "$ref": "#/components/schemas/InvalidRequestError"
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "401": {
  8482. "description": "UnauthorizedError",
  8483. "content": {
  8484. "application/json": {
  8485. "schema": {
  8486. "$ref": "#/components/schemas/UnauthorizedError"
  8487. }
  8488. }
  8489. }
  8490. },
  8491. "404": {
  8492. "description": "SessionNotFoundError",
  8493. "content": {
  8494. "application/json": {
  8495. "schema": {
  8496. "$ref": "#/components/schemas/SessionNotFoundError"
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "503": {
  8502. "description": "ServiceUnavailableError",
  8503. "content": {
  8504. "application/json": {
  8505. "schema": {
  8506. "$ref": "#/components/schemas/ServiceUnavailableError"
  8507. }
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "description": "Wait for a v2 session agent loop to become idle.",
  8513. "summary": "Wait for v2 session",
  8514. "x-codeSamples": [
  8515. {
  8516. "lang": "js",
  8517. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8518. }
  8519. ]
  8520. }
  8521. },
  8522. "/api/session/{sessionID}/context": {
  8523. "get": {
  8524. "tags": ["v2"],
  8525. "operationId": "v2.session.context",
  8526. "parameters": [
  8527. {
  8528. "name": "sessionID",
  8529. "in": "path",
  8530. "schema": {
  8531. "type": "string",
  8532. "pattern": "^ses"
  8533. },
  8534. "required": true
  8535. },
  8536. {
  8537. "name": "directory",
  8538. "in": "query",
  8539. "schema": {
  8540. "type": "string"
  8541. },
  8542. "required": false
  8543. },
  8544. {
  8545. "name": "workspace",
  8546. "in": "query",
  8547. "schema": {
  8548. "type": "string"
  8549. },
  8550. "required": false
  8551. }
  8552. ],
  8553. "security": [],
  8554. "responses": {
  8555. "200": {
  8556. "description": "Success",
  8557. "content": {
  8558. "application/json": {
  8559. "schema": {
  8560. "type": "array",
  8561. "items": {
  8562. "$ref": "#/components/schemas/SessionMessage"
  8563. }
  8564. }
  8565. }
  8566. }
  8567. },
  8568. "400": {
  8569. "description": "InvalidRequestError",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "$ref": "#/components/schemas/InvalidRequestError"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "401": {
  8579. "description": "UnauthorizedError",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/UnauthorizedError"
  8584. }
  8585. }
  8586. }
  8587. },
  8588. "404": {
  8589. "description": "SessionNotFoundError",
  8590. "content": {
  8591. "application/json": {
  8592. "schema": {
  8593. "$ref": "#/components/schemas/SessionNotFoundError"
  8594. }
  8595. }
  8596. }
  8597. },
  8598. "500": {
  8599. "description": "UnknownError",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "$ref": "#/components/schemas/UnknownError1"
  8604. }
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8610. "summary": "Get v2 session context",
  8611. "x-codeSamples": [
  8612. {
  8613. "lang": "js",
  8614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8615. }
  8616. ]
  8617. }
  8618. },
  8619. "/api/session/{sessionID}/message": {
  8620. "get": {
  8621. "tags": ["v2 messages"],
  8622. "operationId": "v2.session.messages",
  8623. "parameters": [
  8624. {
  8625. "name": "sessionID",
  8626. "in": "path",
  8627. "schema": {
  8628. "type": "string",
  8629. "pattern": "^ses"
  8630. },
  8631. "required": true
  8632. },
  8633. {
  8634. "name": "directory",
  8635. "in": "query",
  8636. "schema": {
  8637. "type": "string"
  8638. },
  8639. "required": false
  8640. },
  8641. {
  8642. "name": "workspace",
  8643. "in": "query",
  8644. "schema": {
  8645. "type": "string"
  8646. },
  8647. "required": false
  8648. },
  8649. {
  8650. "name": "limit",
  8651. "in": "query",
  8652. "schema": {
  8653. "type": "number"
  8654. },
  8655. "required": false
  8656. },
  8657. {
  8658. "name": "order",
  8659. "in": "query",
  8660. "schema": {
  8661. "type": "string",
  8662. "enum": ["asc", "desc"]
  8663. },
  8664. "required": false
  8665. },
  8666. {
  8667. "name": "cursor",
  8668. "in": "query",
  8669. "schema": {
  8670. "type": "string",
  8671. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "security": [],
  8677. "responses": {
  8678. "200": {
  8679. "description": "V2SessionMessagesResponse",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "InvalidCursorError | InvalidRequestError",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "anyOf": [
  8694. {
  8695. "$ref": "#/components/schemas/InvalidCursorError"
  8696. },
  8697. {
  8698. "$ref": "#/components/schemas/InvalidRequestError"
  8699. }
  8700. ]
  8701. }
  8702. }
  8703. }
  8704. },
  8705. "401": {
  8706. "description": "UnauthorizedError",
  8707. "content": {
  8708. "application/json": {
  8709. "schema": {
  8710. "$ref": "#/components/schemas/UnauthorizedError"
  8711. }
  8712. }
  8713. }
  8714. },
  8715. "404": {
  8716. "description": "SessionNotFoundError",
  8717. "content": {
  8718. "application/json": {
  8719. "schema": {
  8720. "$ref": "#/components/schemas/SessionNotFoundError"
  8721. }
  8722. }
  8723. }
  8724. },
  8725. "500": {
  8726. "description": "UnknownError",
  8727. "content": {
  8728. "application/json": {
  8729. "schema": {
  8730. "$ref": "#/components/schemas/UnknownError1"
  8731. }
  8732. }
  8733. }
  8734. }
  8735. },
  8736. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  8737. "summary": "Get v2 session messages",
  8738. "x-codeSamples": [
  8739. {
  8740. "lang": "js",
  8741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8742. }
  8743. ]
  8744. }
  8745. },
  8746. "/api/model": {
  8747. "get": {
  8748. "tags": ["v2 models"],
  8749. "operationId": "v2.model.list",
  8750. "parameters": [
  8751. {
  8752. "name": "location",
  8753. "in": "query",
  8754. "schema": {
  8755. "type": "object",
  8756. "properties": {
  8757. "directory": {
  8758. "type": "string"
  8759. },
  8760. "workspace": {
  8761. "type": "string"
  8762. }
  8763. },
  8764. "additionalProperties": false
  8765. },
  8766. "required": false,
  8767. "style": "deepObject",
  8768. "explode": true
  8769. }
  8770. ],
  8771. "security": [],
  8772. "responses": {
  8773. "200": {
  8774. "description": "Success",
  8775. "content": {
  8776. "application/json": {
  8777. "schema": {
  8778. "type": "array",
  8779. "items": {
  8780. "$ref": "#/components/schemas/ModelV2Info"
  8781. }
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "400": {
  8787. "description": "InvalidRequestError",
  8788. "content": {
  8789. "application/json": {
  8790. "schema": {
  8791. "$ref": "#/components/schemas/InvalidRequestError"
  8792. }
  8793. }
  8794. }
  8795. },
  8796. "401": {
  8797. "description": "UnauthorizedError",
  8798. "content": {
  8799. "application/json": {
  8800. "schema": {
  8801. "$ref": "#/components/schemas/UnauthorizedError"
  8802. }
  8803. }
  8804. }
  8805. },
  8806. "503": {
  8807. "description": "ServiceUnavailableError",
  8808. "content": {
  8809. "application/json": {
  8810. "schema": {
  8811. "$ref": "#/components/schemas/ServiceUnavailableError"
  8812. }
  8813. }
  8814. }
  8815. }
  8816. },
  8817. "description": "Retrieve available v2 models ordered by release date.",
  8818. "summary": "List v2 models",
  8819. "x-codeSamples": [
  8820. {
  8821. "lang": "js",
  8822. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8823. }
  8824. ]
  8825. }
  8826. },
  8827. "/api/provider": {
  8828. "get": {
  8829. "tags": ["v2 providers"],
  8830. "operationId": "v2.provider.list",
  8831. "parameters": [
  8832. {
  8833. "name": "location",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "object",
  8837. "properties": {
  8838. "directory": {
  8839. "type": "string"
  8840. },
  8841. "workspace": {
  8842. "type": "string"
  8843. }
  8844. },
  8845. "additionalProperties": false
  8846. },
  8847. "required": false,
  8848. "style": "deepObject",
  8849. "explode": true
  8850. }
  8851. ],
  8852. "security": [],
  8853. "responses": {
  8854. "200": {
  8855. "description": "Success",
  8856. "content": {
  8857. "application/json": {
  8858. "schema": {
  8859. "type": "array",
  8860. "items": {
  8861. "$ref": "#/components/schemas/ProviderV2Info"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "400": {
  8868. "description": "InvalidRequestError",
  8869. "content": {
  8870. "application/json": {
  8871. "schema": {
  8872. "$ref": "#/components/schemas/InvalidRequestError"
  8873. }
  8874. }
  8875. }
  8876. },
  8877. "401": {
  8878. "description": "UnauthorizedError",
  8879. "content": {
  8880. "application/json": {
  8881. "schema": {
  8882. "$ref": "#/components/schemas/UnauthorizedError"
  8883. }
  8884. }
  8885. }
  8886. },
  8887. "503": {
  8888. "description": "ServiceUnavailableError",
  8889. "content": {
  8890. "application/json": {
  8891. "schema": {
  8892. "$ref": "#/components/schemas/ServiceUnavailableError"
  8893. }
  8894. }
  8895. }
  8896. }
  8897. },
  8898. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8899. "summary": "List v2 providers",
  8900. "x-codeSamples": [
  8901. {
  8902. "lang": "js",
  8903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8904. }
  8905. ]
  8906. }
  8907. },
  8908. "/api/provider/{providerID}": {
  8909. "get": {
  8910. "tags": ["v2 providers"],
  8911. "operationId": "v2.provider.get",
  8912. "parameters": [
  8913. {
  8914. "name": "providerID",
  8915. "in": "path",
  8916. "schema": {
  8917. "type": "string"
  8918. },
  8919. "required": true
  8920. },
  8921. {
  8922. "name": "location",
  8923. "in": "query",
  8924. "schema": {
  8925. "type": "object",
  8926. "properties": {
  8927. "directory": {
  8928. "type": "string"
  8929. },
  8930. "workspace": {
  8931. "type": "string"
  8932. }
  8933. },
  8934. "additionalProperties": false
  8935. },
  8936. "required": false,
  8937. "style": "deepObject",
  8938. "explode": true
  8939. }
  8940. ],
  8941. "security": [],
  8942. "responses": {
  8943. "200": {
  8944. "description": "ProviderV2.Info",
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "$ref": "#/components/schemas/ProviderV2Info"
  8949. }
  8950. }
  8951. }
  8952. },
  8953. "400": {
  8954. "description": "InvalidRequestError",
  8955. "content": {
  8956. "application/json": {
  8957. "schema": {
  8958. "$ref": "#/components/schemas/InvalidRequestError"
  8959. }
  8960. }
  8961. }
  8962. },
  8963. "401": {
  8964. "description": "UnauthorizedError",
  8965. "content": {
  8966. "application/json": {
  8967. "schema": {
  8968. "$ref": "#/components/schemas/UnauthorizedError"
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "404": {
  8974. "description": "ProviderNotFoundError",
  8975. "content": {
  8976. "application/json": {
  8977. "schema": {
  8978. "$ref": "#/components/schemas/ProviderNotFoundError"
  8979. }
  8980. }
  8981. }
  8982. },
  8983. "503": {
  8984. "description": "ServiceUnavailableError",
  8985. "content": {
  8986. "application/json": {
  8987. "schema": {
  8988. "$ref": "#/components/schemas/ServiceUnavailableError"
  8989. }
  8990. }
  8991. }
  8992. }
  8993. },
  8994. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8995. "summary": "Get v2 provider",
  8996. "x-codeSamples": [
  8997. {
  8998. "lang": "js",
  8999. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9000. }
  9001. ]
  9002. }
  9003. },
  9004. "/api/permission/request": {
  9005. "get": {
  9006. "tags": ["v2 permissions"],
  9007. "operationId": "v2.permission.request.list",
  9008. "parameters": [
  9009. {
  9010. "name": "location",
  9011. "in": "query",
  9012. "schema": {
  9013. "type": "object",
  9014. "properties": {
  9015. "directory": {
  9016. "type": "string"
  9017. },
  9018. "workspace": {
  9019. "type": "string"
  9020. }
  9021. },
  9022. "additionalProperties": false
  9023. },
  9024. "required": false,
  9025. "style": "deepObject",
  9026. "explode": true
  9027. }
  9028. ],
  9029. "security": [],
  9030. "responses": {
  9031. "200": {
  9032. "description": "Success",
  9033. "content": {
  9034. "application/json": {
  9035. "schema": {
  9036. "type": "array",
  9037. "items": {
  9038. "$ref": "#/components/schemas/PermissionV2Request"
  9039. }
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "InvalidRequestError",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "$ref": "#/components/schemas/InvalidRequestError"
  9050. }
  9051. }
  9052. }
  9053. },
  9054. "401": {
  9055. "description": "UnauthorizedError",
  9056. "content": {
  9057. "application/json": {
  9058. "schema": {
  9059. "$ref": "#/components/schemas/UnauthorizedError"
  9060. }
  9061. }
  9062. }
  9063. }
  9064. },
  9065. "description": "Retrieve pending permission requests for a location.",
  9066. "summary": "List pending permission requests",
  9067. "x-codeSamples": [
  9068. {
  9069. "lang": "js",
  9070. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  9071. }
  9072. ]
  9073. }
  9074. },
  9075. "/api/session/{sessionID}/permission/request": {
  9076. "get": {
  9077. "tags": ["v2 session permissions"],
  9078. "operationId": "v2.session.permission.list",
  9079. "parameters": [
  9080. {
  9081. "name": "sessionID",
  9082. "in": "path",
  9083. "schema": {
  9084. "type": "string",
  9085. "pattern": "^ses"
  9086. },
  9087. "required": true
  9088. }
  9089. ],
  9090. "security": [],
  9091. "responses": {
  9092. "200": {
  9093. "description": "Success",
  9094. "content": {
  9095. "application/json": {
  9096. "schema": {
  9097. "type": "array",
  9098. "items": {
  9099. "$ref": "#/components/schemas/PermissionV2Request"
  9100. }
  9101. }
  9102. }
  9103. }
  9104. },
  9105. "400": {
  9106. "description": "InvalidRequestError",
  9107. "content": {
  9108. "application/json": {
  9109. "schema": {
  9110. "$ref": "#/components/schemas/InvalidRequestError"
  9111. }
  9112. }
  9113. }
  9114. },
  9115. "401": {
  9116. "description": "UnauthorizedError",
  9117. "content": {
  9118. "application/json": {
  9119. "schema": {
  9120. "$ref": "#/components/schemas/UnauthorizedError"
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "404": {
  9126. "description": "SessionNotFoundError",
  9127. "content": {
  9128. "application/json": {
  9129. "schema": {
  9130. "$ref": "#/components/schemas/SessionNotFoundError"
  9131. }
  9132. }
  9133. }
  9134. }
  9135. },
  9136. "description": "Retrieve pending permission requests owned by a session.",
  9137. "summary": "List session permission requests",
  9138. "x-codeSamples": [
  9139. {
  9140. "lang": "js",
  9141. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  9142. }
  9143. ]
  9144. }
  9145. },
  9146. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  9147. "post": {
  9148. "tags": ["v2 session permissions"],
  9149. "operationId": "v2.session.permission.reply",
  9150. "parameters": [
  9151. {
  9152. "name": "sessionID",
  9153. "in": "path",
  9154. "schema": {
  9155. "type": "string",
  9156. "pattern": "^ses"
  9157. },
  9158. "required": true
  9159. },
  9160. {
  9161. "name": "requestID",
  9162. "in": "path",
  9163. "schema": {
  9164. "type": "string",
  9165. "pattern": "^per"
  9166. },
  9167. "required": true
  9168. }
  9169. ],
  9170. "security": [],
  9171. "responses": {
  9172. "204": {
  9173. "description": "<No Content>"
  9174. },
  9175. "400": {
  9176. "description": "InvalidRequestError",
  9177. "content": {
  9178. "application/json": {
  9179. "schema": {
  9180. "$ref": "#/components/schemas/InvalidRequestError"
  9181. }
  9182. }
  9183. }
  9184. },
  9185. "401": {
  9186. "description": "UnauthorizedError",
  9187. "content": {
  9188. "application/json": {
  9189. "schema": {
  9190. "$ref": "#/components/schemas/UnauthorizedError"
  9191. }
  9192. }
  9193. }
  9194. },
  9195. "404": {
  9196. "description": "SessionNotFoundError | PermissionNotFoundError",
  9197. "content": {
  9198. "application/json": {
  9199. "schema": {
  9200. "anyOf": [
  9201. {
  9202. "$ref": "#/components/schemas/SessionNotFoundError"
  9203. },
  9204. {
  9205. "$ref": "#/components/schemas/PermissionNotFoundError"
  9206. }
  9207. ]
  9208. }
  9209. }
  9210. }
  9211. }
  9212. },
  9213. "description": "Respond to a pending permission request owned by a session.",
  9214. "summary": "Reply to pending permission request",
  9215. "requestBody": {
  9216. "content": {
  9217. "application/json": {
  9218. "schema": {
  9219. "type": "object",
  9220. "properties": {
  9221. "reply": {
  9222. "$ref": "#/components/schemas/PermissionV2Reply"
  9223. },
  9224. "message": {
  9225. "type": "string"
  9226. }
  9227. },
  9228. "required": ["reply"],
  9229. "additionalProperties": false
  9230. }
  9231. }
  9232. }
  9233. },
  9234. "x-codeSamples": [
  9235. {
  9236. "lang": "js",
  9237. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  9238. }
  9239. ]
  9240. }
  9241. },
  9242. "/api/permission/saved": {
  9243. "get": {
  9244. "tags": ["v2 saved permissions"],
  9245. "operationId": "v2.permission.saved.list",
  9246. "parameters": [
  9247. {
  9248. "name": "projectID",
  9249. "in": "query",
  9250. "schema": {
  9251. "type": "string"
  9252. },
  9253. "required": false
  9254. }
  9255. ],
  9256. "security": [],
  9257. "responses": {
  9258. "200": {
  9259. "description": "Success",
  9260. "content": {
  9261. "application/json": {
  9262. "schema": {
  9263. "type": "array",
  9264. "items": {
  9265. "$ref": "#/components/schemas/PermissionSavedInfo"
  9266. }
  9267. }
  9268. }
  9269. }
  9270. },
  9271. "400": {
  9272. "description": "InvalidRequestError",
  9273. "content": {
  9274. "application/json": {
  9275. "schema": {
  9276. "$ref": "#/components/schemas/InvalidRequestError"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "401": {
  9282. "description": "UnauthorizedError",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/UnauthorizedError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Retrieve saved permissions, optionally filtered by project.",
  9293. "summary": "List saved permissions",
  9294. "x-codeSamples": [
  9295. {
  9296. "lang": "js",
  9297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  9298. }
  9299. ]
  9300. }
  9301. },
  9302. "/api/permission/saved/{id}": {
  9303. "delete": {
  9304. "tags": ["v2 saved permissions"],
  9305. "operationId": "v2.permission.saved.remove",
  9306. "parameters": [
  9307. {
  9308. "name": "id",
  9309. "in": "path",
  9310. "schema": {
  9311. "type": "string"
  9312. },
  9313. "required": true
  9314. }
  9315. ],
  9316. "security": [],
  9317. "responses": {
  9318. "204": {
  9319. "description": "<No Content>"
  9320. },
  9321. "400": {
  9322. "description": "InvalidRequestError",
  9323. "content": {
  9324. "application/json": {
  9325. "schema": {
  9326. "$ref": "#/components/schemas/InvalidRequestError"
  9327. }
  9328. }
  9329. }
  9330. },
  9331. "401": {
  9332. "description": "UnauthorizedError",
  9333. "content": {
  9334. "application/json": {
  9335. "schema": {
  9336. "$ref": "#/components/schemas/UnauthorizedError"
  9337. }
  9338. }
  9339. }
  9340. }
  9341. },
  9342. "description": "Remove a saved permission by ID.",
  9343. "summary": "Remove saved permission",
  9344. "x-codeSamples": [
  9345. {
  9346. "lang": "js",
  9347. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  9348. }
  9349. ]
  9350. }
  9351. },
  9352. "/api/fs/read": {
  9353. "get": {
  9354. "tags": ["v2 filesystem"],
  9355. "operationId": "v2.fs.read",
  9356. "parameters": [
  9357. {
  9358. "name": "location",
  9359. "in": "query",
  9360. "schema": {
  9361. "type": "object",
  9362. "properties": {
  9363. "directory": {
  9364. "type": "string"
  9365. },
  9366. "workspace": {
  9367. "type": "string"
  9368. }
  9369. },
  9370. "additionalProperties": false
  9371. },
  9372. "required": false,
  9373. "style": "deepObject",
  9374. "explode": true
  9375. },
  9376. {
  9377. "name": "path",
  9378. "in": "query",
  9379. "schema": {
  9380. "type": "string"
  9381. },
  9382. "required": true
  9383. },
  9384. {
  9385. "name": "reference",
  9386. "in": "query",
  9387. "schema": {
  9388. "type": "string"
  9389. },
  9390. "required": false
  9391. }
  9392. ],
  9393. "security": [],
  9394. "responses": {
  9395. "200": {
  9396. "description": "Success",
  9397. "content": {
  9398. "application/json": {
  9399. "schema": {
  9400. "anyOf": [
  9401. {
  9402. "$ref": "#/components/schemas/LocationFileSystemTextContent"
  9403. },
  9404. {
  9405. "$ref": "#/components/schemas/LocationFileSystemBinaryContent"
  9406. }
  9407. ]
  9408. }
  9409. }
  9410. }
  9411. },
  9412. "400": {
  9413. "description": "InvalidRequestError",
  9414. "content": {
  9415. "application/json": {
  9416. "schema": {
  9417. "$ref": "#/components/schemas/InvalidRequestError"
  9418. }
  9419. }
  9420. }
  9421. },
  9422. "401": {
  9423. "description": "UnauthorizedError",
  9424. "content": {
  9425. "application/json": {
  9426. "schema": {
  9427. "$ref": "#/components/schemas/UnauthorizedError"
  9428. }
  9429. }
  9430. }
  9431. }
  9432. },
  9433. "description": "Read one file relative to the requested location.",
  9434. "summary": "Read file",
  9435. "x-codeSamples": [
  9436. {
  9437. "lang": "js",
  9438. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  9439. }
  9440. ]
  9441. }
  9442. },
  9443. "/api/fs/list": {
  9444. "get": {
  9445. "tags": ["v2 filesystem"],
  9446. "operationId": "v2.fs.list",
  9447. "parameters": [
  9448. {
  9449. "name": "location",
  9450. "in": "query",
  9451. "schema": {
  9452. "type": "object",
  9453. "properties": {
  9454. "directory": {
  9455. "type": "string"
  9456. },
  9457. "workspace": {
  9458. "type": "string"
  9459. }
  9460. },
  9461. "additionalProperties": false
  9462. },
  9463. "required": false,
  9464. "style": "deepObject",
  9465. "explode": true
  9466. },
  9467. {
  9468. "name": "path",
  9469. "in": "query",
  9470. "schema": {
  9471. "type": "string"
  9472. },
  9473. "required": false
  9474. },
  9475. {
  9476. "name": "reference",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. }
  9483. ],
  9484. "security": [],
  9485. "responses": {
  9486. "200": {
  9487. "description": "Success",
  9488. "content": {
  9489. "application/json": {
  9490. "schema": {
  9491. "type": "array",
  9492. "items": {
  9493. "$ref": "#/components/schemas/LocationFileSystemEntry"
  9494. }
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "400": {
  9500. "description": "InvalidRequestError",
  9501. "content": {
  9502. "application/json": {
  9503. "schema": {
  9504. "$ref": "#/components/schemas/InvalidRequestError"
  9505. }
  9506. }
  9507. }
  9508. },
  9509. "401": {
  9510. "description": "UnauthorizedError",
  9511. "content": {
  9512. "application/json": {
  9513. "schema": {
  9514. "$ref": "#/components/schemas/UnauthorizedError"
  9515. }
  9516. }
  9517. }
  9518. }
  9519. },
  9520. "description": "List direct children of one directory relative to the requested location.",
  9521. "summary": "List directory",
  9522. "x-codeSamples": [
  9523. {
  9524. "lang": "js",
  9525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  9526. }
  9527. ]
  9528. }
  9529. },
  9530. "/tui/append-prompt": {
  9531. "post": {
  9532. "tags": ["tui"],
  9533. "operationId": "tui.appendPrompt",
  9534. "parameters": [
  9535. {
  9536. "name": "directory",
  9537. "in": "query",
  9538. "schema": {
  9539. "type": "string"
  9540. },
  9541. "required": false
  9542. },
  9543. {
  9544. "name": "workspace",
  9545. "in": "query",
  9546. "schema": {
  9547. "type": "string"
  9548. },
  9549. "required": false
  9550. }
  9551. ],
  9552. "responses": {
  9553. "200": {
  9554. "description": "Prompt processed successfully",
  9555. "content": {
  9556. "application/json": {
  9557. "schema": {
  9558. "type": "boolean",
  9559. "description": "Prompt processed successfully"
  9560. }
  9561. }
  9562. }
  9563. },
  9564. "400": {
  9565. "description": "BadRequest | InvalidRequestError",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "anyOf": [
  9570. {
  9571. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9572. },
  9573. {
  9574. "$ref": "#/components/schemas/InvalidRequestError"
  9575. }
  9576. ]
  9577. }
  9578. }
  9579. }
  9580. }
  9581. },
  9582. "description": "Append prompt to the TUI.",
  9583. "summary": "Append TUI prompt",
  9584. "requestBody": {
  9585. "content": {
  9586. "application/json": {
  9587. "schema": {
  9588. "type": "object",
  9589. "properties": {
  9590. "text": {
  9591. "type": "string"
  9592. }
  9593. },
  9594. "required": ["text"],
  9595. "additionalProperties": false
  9596. }
  9597. }
  9598. }
  9599. },
  9600. "x-codeSamples": [
  9601. {
  9602. "lang": "js",
  9603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9604. }
  9605. ]
  9606. }
  9607. },
  9608. "/tui/open-help": {
  9609. "post": {
  9610. "tags": ["tui"],
  9611. "operationId": "tui.openHelp",
  9612. "parameters": [
  9613. {
  9614. "name": "directory",
  9615. "in": "query",
  9616. "schema": {
  9617. "type": "string"
  9618. },
  9619. "required": false
  9620. },
  9621. {
  9622. "name": "workspace",
  9623. "in": "query",
  9624. "schema": {
  9625. "type": "string"
  9626. },
  9627. "required": false
  9628. }
  9629. ],
  9630. "responses": {
  9631. "200": {
  9632. "description": "Help dialog opened successfully",
  9633. "content": {
  9634. "application/json": {
  9635. "schema": {
  9636. "type": "boolean",
  9637. "description": "Help dialog opened successfully"
  9638. }
  9639. }
  9640. }
  9641. },
  9642. "400": {
  9643. "description": "Bad request",
  9644. "content": {
  9645. "application/json": {
  9646. "schema": {
  9647. "$ref": "#/components/schemas/BadRequestError"
  9648. }
  9649. }
  9650. }
  9651. }
  9652. },
  9653. "description": "Open the help dialog in the TUI to display user assistance information.",
  9654. "summary": "Open help dialog",
  9655. "x-codeSamples": [
  9656. {
  9657. "lang": "js",
  9658. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9659. }
  9660. ]
  9661. }
  9662. },
  9663. "/tui/open-sessions": {
  9664. "post": {
  9665. "tags": ["tui"],
  9666. "operationId": "tui.openSessions",
  9667. "parameters": [
  9668. {
  9669. "name": "directory",
  9670. "in": "query",
  9671. "schema": {
  9672. "type": "string"
  9673. },
  9674. "required": false
  9675. },
  9676. {
  9677. "name": "workspace",
  9678. "in": "query",
  9679. "schema": {
  9680. "type": "string"
  9681. },
  9682. "required": false
  9683. }
  9684. ],
  9685. "responses": {
  9686. "200": {
  9687. "description": "Session dialog opened successfully",
  9688. "content": {
  9689. "application/json": {
  9690. "schema": {
  9691. "type": "boolean",
  9692. "description": "Session dialog opened successfully"
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "400": {
  9698. "description": "Bad request",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "$ref": "#/components/schemas/BadRequestError"
  9703. }
  9704. }
  9705. }
  9706. }
  9707. },
  9708. "description": "Open the session dialog.",
  9709. "summary": "Open sessions dialog",
  9710. "x-codeSamples": [
  9711. {
  9712. "lang": "js",
  9713. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9714. }
  9715. ]
  9716. }
  9717. },
  9718. "/tui/open-themes": {
  9719. "post": {
  9720. "tags": ["tui"],
  9721. "operationId": "tui.openThemes",
  9722. "parameters": [
  9723. {
  9724. "name": "directory",
  9725. "in": "query",
  9726. "schema": {
  9727. "type": "string"
  9728. },
  9729. "required": false
  9730. },
  9731. {
  9732. "name": "workspace",
  9733. "in": "query",
  9734. "schema": {
  9735. "type": "string"
  9736. },
  9737. "required": false
  9738. }
  9739. ],
  9740. "responses": {
  9741. "200": {
  9742. "description": "Theme dialog opened successfully",
  9743. "content": {
  9744. "application/json": {
  9745. "schema": {
  9746. "type": "boolean",
  9747. "description": "Theme dialog opened successfully"
  9748. }
  9749. }
  9750. }
  9751. },
  9752. "400": {
  9753. "description": "Bad request",
  9754. "content": {
  9755. "application/json": {
  9756. "schema": {
  9757. "$ref": "#/components/schemas/BadRequestError"
  9758. }
  9759. }
  9760. }
  9761. }
  9762. },
  9763. "description": "Open the theme dialog.",
  9764. "summary": "Open themes dialog",
  9765. "x-codeSamples": [
  9766. {
  9767. "lang": "js",
  9768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9769. }
  9770. ]
  9771. }
  9772. },
  9773. "/tui/open-models": {
  9774. "post": {
  9775. "tags": ["tui"],
  9776. "operationId": "tui.openModels",
  9777. "parameters": [
  9778. {
  9779. "name": "directory",
  9780. "in": "query",
  9781. "schema": {
  9782. "type": "string"
  9783. },
  9784. "required": false
  9785. },
  9786. {
  9787. "name": "workspace",
  9788. "in": "query",
  9789. "schema": {
  9790. "type": "string"
  9791. },
  9792. "required": false
  9793. }
  9794. ],
  9795. "responses": {
  9796. "200": {
  9797. "description": "Model dialog opened successfully",
  9798. "content": {
  9799. "application/json": {
  9800. "schema": {
  9801. "type": "boolean",
  9802. "description": "Model dialog opened successfully"
  9803. }
  9804. }
  9805. }
  9806. },
  9807. "400": {
  9808. "description": "Bad request",
  9809. "content": {
  9810. "application/json": {
  9811. "schema": {
  9812. "$ref": "#/components/schemas/BadRequestError"
  9813. }
  9814. }
  9815. }
  9816. }
  9817. },
  9818. "description": "Open the model dialog.",
  9819. "summary": "Open models dialog",
  9820. "x-codeSamples": [
  9821. {
  9822. "lang": "js",
  9823. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9824. }
  9825. ]
  9826. }
  9827. },
  9828. "/tui/submit-prompt": {
  9829. "post": {
  9830. "tags": ["tui"],
  9831. "operationId": "tui.submitPrompt",
  9832. "parameters": [
  9833. {
  9834. "name": "directory",
  9835. "in": "query",
  9836. "schema": {
  9837. "type": "string"
  9838. },
  9839. "required": false
  9840. },
  9841. {
  9842. "name": "workspace",
  9843. "in": "query",
  9844. "schema": {
  9845. "type": "string"
  9846. },
  9847. "required": false
  9848. }
  9849. ],
  9850. "responses": {
  9851. "200": {
  9852. "description": "Prompt submitted successfully",
  9853. "content": {
  9854. "application/json": {
  9855. "schema": {
  9856. "type": "boolean",
  9857. "description": "Prompt submitted successfully"
  9858. }
  9859. }
  9860. }
  9861. },
  9862. "400": {
  9863. "description": "Bad request",
  9864. "content": {
  9865. "application/json": {
  9866. "schema": {
  9867. "$ref": "#/components/schemas/BadRequestError"
  9868. }
  9869. }
  9870. }
  9871. }
  9872. },
  9873. "description": "Submit the prompt.",
  9874. "summary": "Submit TUI prompt",
  9875. "x-codeSamples": [
  9876. {
  9877. "lang": "js",
  9878. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9879. }
  9880. ]
  9881. }
  9882. },
  9883. "/tui/clear-prompt": {
  9884. "post": {
  9885. "tags": ["tui"],
  9886. "operationId": "tui.clearPrompt",
  9887. "parameters": [
  9888. {
  9889. "name": "directory",
  9890. "in": "query",
  9891. "schema": {
  9892. "type": "string"
  9893. },
  9894. "required": false
  9895. },
  9896. {
  9897. "name": "workspace",
  9898. "in": "query",
  9899. "schema": {
  9900. "type": "string"
  9901. },
  9902. "required": false
  9903. }
  9904. ],
  9905. "responses": {
  9906. "200": {
  9907. "description": "Prompt cleared successfully",
  9908. "content": {
  9909. "application/json": {
  9910. "schema": {
  9911. "type": "boolean",
  9912. "description": "Prompt cleared successfully"
  9913. }
  9914. }
  9915. }
  9916. },
  9917. "400": {
  9918. "description": "Bad request",
  9919. "content": {
  9920. "application/json": {
  9921. "schema": {
  9922. "$ref": "#/components/schemas/BadRequestError"
  9923. }
  9924. }
  9925. }
  9926. }
  9927. },
  9928. "description": "Clear the prompt.",
  9929. "summary": "Clear TUI prompt",
  9930. "x-codeSamples": [
  9931. {
  9932. "lang": "js",
  9933. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9934. }
  9935. ]
  9936. }
  9937. },
  9938. "/tui/execute-command": {
  9939. "post": {
  9940. "tags": ["tui"],
  9941. "operationId": "tui.executeCommand",
  9942. "parameters": [
  9943. {
  9944. "name": "directory",
  9945. "in": "query",
  9946. "schema": {
  9947. "type": "string"
  9948. },
  9949. "required": false
  9950. },
  9951. {
  9952. "name": "workspace",
  9953. "in": "query",
  9954. "schema": {
  9955. "type": "string"
  9956. },
  9957. "required": false
  9958. }
  9959. ],
  9960. "responses": {
  9961. "200": {
  9962. "description": "Command executed successfully",
  9963. "content": {
  9964. "application/json": {
  9965. "schema": {
  9966. "type": "boolean",
  9967. "description": "Command executed successfully"
  9968. }
  9969. }
  9970. }
  9971. },
  9972. "400": {
  9973. "description": "BadRequest | InvalidRequestError",
  9974. "content": {
  9975. "application/json": {
  9976. "schema": {
  9977. "anyOf": [
  9978. {
  9979. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9980. },
  9981. {
  9982. "$ref": "#/components/schemas/InvalidRequestError"
  9983. }
  9984. ]
  9985. }
  9986. }
  9987. }
  9988. }
  9989. },
  9990. "description": "Execute a TUI command.",
  9991. "summary": "Execute TUI command",
  9992. "requestBody": {
  9993. "content": {
  9994. "application/json": {
  9995. "schema": {
  9996. "type": "object",
  9997. "properties": {
  9998. "command": {
  9999. "type": "string"
  10000. }
  10001. },
  10002. "required": ["command"],
  10003. "additionalProperties": false
  10004. }
  10005. }
  10006. }
  10007. },
  10008. "x-codeSamples": [
  10009. {
  10010. "lang": "js",
  10011. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  10012. }
  10013. ]
  10014. }
  10015. },
  10016. "/tui/show-toast": {
  10017. "post": {
  10018. "tags": ["tui"],
  10019. "operationId": "tui.showToast",
  10020. "parameters": [
  10021. {
  10022. "name": "directory",
  10023. "in": "query",
  10024. "schema": {
  10025. "type": "string"
  10026. },
  10027. "required": false
  10028. },
  10029. {
  10030. "name": "workspace",
  10031. "in": "query",
  10032. "schema": {
  10033. "type": "string"
  10034. },
  10035. "required": false
  10036. }
  10037. ],
  10038. "responses": {
  10039. "200": {
  10040. "description": "Toast notification shown successfully",
  10041. "content": {
  10042. "application/json": {
  10043. "schema": {
  10044. "type": "boolean",
  10045. "description": "Toast notification shown successfully"
  10046. }
  10047. }
  10048. }
  10049. },
  10050. "400": {
  10051. "description": "Bad request",
  10052. "content": {
  10053. "application/json": {
  10054. "schema": {
  10055. "$ref": "#/components/schemas/BadRequestError"
  10056. }
  10057. }
  10058. }
  10059. }
  10060. },
  10061. "description": "Show a toast notification in the TUI.",
  10062. "summary": "Show TUI toast",
  10063. "requestBody": {
  10064. "content": {
  10065. "application/json": {
  10066. "schema": {
  10067. "type": "object",
  10068. "properties": {
  10069. "title": {
  10070. "type": "string"
  10071. },
  10072. "message": {
  10073. "type": "string"
  10074. },
  10075. "variant": {
  10076. "type": "string",
  10077. "enum": ["info", "success", "warning", "error"]
  10078. },
  10079. "duration": {
  10080. "type": "integer",
  10081. "exclusiveMinimum": 0
  10082. }
  10083. },
  10084. "required": ["message", "variant"],
  10085. "additionalProperties": false
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "x-codeSamples": [
  10091. {
  10092. "lang": "js",
  10093. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  10094. }
  10095. ]
  10096. }
  10097. },
  10098. "/tui/publish": {
  10099. "post": {
  10100. "tags": ["tui"],
  10101. "operationId": "tui.publish",
  10102. "parameters": [
  10103. {
  10104. "name": "directory",
  10105. "in": "query",
  10106. "schema": {
  10107. "type": "string"
  10108. },
  10109. "required": false
  10110. },
  10111. {
  10112. "name": "workspace",
  10113. "in": "query",
  10114. "schema": {
  10115. "type": "string"
  10116. },
  10117. "required": false
  10118. }
  10119. ],
  10120. "responses": {
  10121. "200": {
  10122. "description": "Event published successfully",
  10123. "content": {
  10124. "application/json": {
  10125. "schema": {
  10126. "type": "boolean",
  10127. "description": "Event published successfully"
  10128. }
  10129. }
  10130. }
  10131. },
  10132. "400": {
  10133. "description": "BadRequest | InvalidRequestError",
  10134. "content": {
  10135. "application/json": {
  10136. "schema": {
  10137. "anyOf": [
  10138. {
  10139. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10140. },
  10141. {
  10142. "$ref": "#/components/schemas/InvalidRequestError"
  10143. }
  10144. ]
  10145. }
  10146. }
  10147. }
  10148. }
  10149. },
  10150. "description": "Publish a TUI event.",
  10151. "summary": "Publish TUI event",
  10152. "requestBody": {
  10153. "content": {
  10154. "application/json": {
  10155. "schema": {
  10156. "anyOf": [
  10157. {
  10158. "$ref": "#/components/schemas/EventTuiPromptAppend"
  10159. },
  10160. {
  10161. "$ref": "#/components/schemas/EventTuiCommandExecute"
  10162. },
  10163. {
  10164. "$ref": "#/components/schemas/EventTuiToastShow"
  10165. },
  10166. {
  10167. "$ref": "#/components/schemas/EventTuiSessionSelect"
  10168. }
  10169. ]
  10170. }
  10171. }
  10172. }
  10173. },
  10174. "x-codeSamples": [
  10175. {
  10176. "lang": "js",
  10177. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  10178. }
  10179. ]
  10180. }
  10181. },
  10182. "/tui/select-session": {
  10183. "post": {
  10184. "tags": ["tui"],
  10185. "operationId": "tui.selectSession",
  10186. "parameters": [
  10187. {
  10188. "name": "directory",
  10189. "in": "query",
  10190. "schema": {
  10191. "type": "string"
  10192. },
  10193. "required": false
  10194. },
  10195. {
  10196. "name": "workspace",
  10197. "in": "query",
  10198. "schema": {
  10199. "type": "string"
  10200. },
  10201. "required": false
  10202. }
  10203. ],
  10204. "responses": {
  10205. "200": {
  10206. "description": "Session selected successfully",
  10207. "content": {
  10208. "application/json": {
  10209. "schema": {
  10210. "type": "boolean",
  10211. "description": "Session selected successfully"
  10212. }
  10213. }
  10214. }
  10215. },
  10216. "400": {
  10217. "description": "BadRequest | InvalidRequestError",
  10218. "content": {
  10219. "application/json": {
  10220. "schema": {
  10221. "anyOf": [
  10222. {
  10223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10224. },
  10225. {
  10226. "$ref": "#/components/schemas/InvalidRequestError"
  10227. }
  10228. ]
  10229. }
  10230. }
  10231. }
  10232. },
  10233. "404": {
  10234. "description": "NotFoundError",
  10235. "content": {
  10236. "application/json": {
  10237. "schema": {
  10238. "$ref": "#/components/schemas/NotFoundError"
  10239. }
  10240. }
  10241. }
  10242. }
  10243. },
  10244. "description": "Navigate the TUI to display the specified session.",
  10245. "summary": "Select session",
  10246. "requestBody": {
  10247. "content": {
  10248. "application/json": {
  10249. "schema": {
  10250. "type": "object",
  10251. "properties": {
  10252. "sessionID": {
  10253. "type": "string",
  10254. "pattern": "^ses",
  10255. "description": "Session ID to navigate to"
  10256. }
  10257. },
  10258. "required": ["sessionID"],
  10259. "additionalProperties": false
  10260. }
  10261. }
  10262. }
  10263. },
  10264. "x-codeSamples": [
  10265. {
  10266. "lang": "js",
  10267. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  10268. }
  10269. ]
  10270. }
  10271. },
  10272. "/tui/control/next": {
  10273. "get": {
  10274. "tags": ["tui"],
  10275. "operationId": "tui.control.next",
  10276. "parameters": [
  10277. {
  10278. "name": "directory",
  10279. "in": "query",
  10280. "schema": {
  10281. "type": "string"
  10282. },
  10283. "required": false
  10284. },
  10285. {
  10286. "name": "workspace",
  10287. "in": "query",
  10288. "schema": {
  10289. "type": "string"
  10290. },
  10291. "required": false
  10292. }
  10293. ],
  10294. "responses": {
  10295. "200": {
  10296. "description": "Next TUI request",
  10297. "content": {
  10298. "application/json": {
  10299. "schema": {
  10300. "type": "object",
  10301. "properties": {
  10302. "path": {
  10303. "type": "string"
  10304. },
  10305. "body": {}
  10306. },
  10307. "required": ["path", "body"],
  10308. "additionalProperties": false,
  10309. "description": "Next TUI request"
  10310. }
  10311. }
  10312. }
  10313. },
  10314. "400": {
  10315. "description": "Bad request",
  10316. "content": {
  10317. "application/json": {
  10318. "schema": {
  10319. "$ref": "#/components/schemas/BadRequestError"
  10320. }
  10321. }
  10322. }
  10323. }
  10324. },
  10325. "description": "Retrieve the next TUI request from the queue for processing.",
  10326. "summary": "Get next TUI request",
  10327. "x-codeSamples": [
  10328. {
  10329. "lang": "js",
  10330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  10331. }
  10332. ]
  10333. }
  10334. },
  10335. "/tui/control/response": {
  10336. "post": {
  10337. "tags": ["tui"],
  10338. "operationId": "tui.control.response",
  10339. "parameters": [
  10340. {
  10341. "name": "directory",
  10342. "in": "query",
  10343. "schema": {
  10344. "type": "string"
  10345. },
  10346. "required": false
  10347. },
  10348. {
  10349. "name": "workspace",
  10350. "in": "query",
  10351. "schema": {
  10352. "type": "string"
  10353. },
  10354. "required": false
  10355. }
  10356. ],
  10357. "responses": {
  10358. "200": {
  10359. "description": "Response submitted successfully",
  10360. "content": {
  10361. "application/json": {
  10362. "schema": {
  10363. "type": "boolean",
  10364. "description": "Response submitted successfully"
  10365. }
  10366. }
  10367. }
  10368. },
  10369. "400": {
  10370. "description": "Bad request",
  10371. "content": {
  10372. "application/json": {
  10373. "schema": {
  10374. "$ref": "#/components/schemas/BadRequestError"
  10375. }
  10376. }
  10377. }
  10378. }
  10379. },
  10380. "description": "Submit a response to the TUI request queue to complete a pending request.",
  10381. "summary": "Submit TUI response",
  10382. "requestBody": {
  10383. "content": {
  10384. "application/json": {
  10385. "schema": {}
  10386. }
  10387. }
  10388. },
  10389. "x-codeSamples": [
  10390. {
  10391. "lang": "js",
  10392. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  10393. }
  10394. ]
  10395. }
  10396. },
  10397. "/experimental/workspace/adapter": {
  10398. "get": {
  10399. "tags": ["workspace"],
  10400. "operationId": "experimental.workspace.adapter.list",
  10401. "parameters": [
  10402. {
  10403. "name": "directory",
  10404. "in": "query",
  10405. "schema": {
  10406. "type": "string"
  10407. },
  10408. "required": false
  10409. },
  10410. {
  10411. "name": "workspace",
  10412. "in": "query",
  10413. "schema": {
  10414. "type": "string"
  10415. },
  10416. "required": false
  10417. }
  10418. ],
  10419. "responses": {
  10420. "200": {
  10421. "description": "Workspace adapters",
  10422. "content": {
  10423. "application/json": {
  10424. "schema": {
  10425. "type": "array",
  10426. "items": {
  10427. "type": "object",
  10428. "properties": {
  10429. "type": {
  10430. "type": "string"
  10431. },
  10432. "name": {
  10433. "type": "string"
  10434. },
  10435. "description": {
  10436. "type": "string"
  10437. }
  10438. },
  10439. "required": ["type", "name", "description"],
  10440. "additionalProperties": false
  10441. },
  10442. "description": "Workspace adapters"
  10443. }
  10444. }
  10445. }
  10446. },
  10447. "400": {
  10448. "description": "Bad request",
  10449. "content": {
  10450. "application/json": {
  10451. "schema": {
  10452. "$ref": "#/components/schemas/BadRequestError"
  10453. }
  10454. }
  10455. }
  10456. }
  10457. },
  10458. "description": "List all available workspace adapters for the current project.",
  10459. "summary": "List workspace adapters",
  10460. "x-codeSamples": [
  10461. {
  10462. "lang": "js",
  10463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  10464. }
  10465. ]
  10466. }
  10467. },
  10468. "/experimental/workspace": {
  10469. "get": {
  10470. "tags": ["workspace"],
  10471. "operationId": "experimental.workspace.list",
  10472. "parameters": [
  10473. {
  10474. "name": "directory",
  10475. "in": "query",
  10476. "schema": {
  10477. "type": "string"
  10478. },
  10479. "required": false
  10480. },
  10481. {
  10482. "name": "workspace",
  10483. "in": "query",
  10484. "schema": {
  10485. "type": "string"
  10486. },
  10487. "required": false
  10488. }
  10489. ],
  10490. "responses": {
  10491. "200": {
  10492. "description": "Workspaces",
  10493. "content": {
  10494. "application/json": {
  10495. "schema": {
  10496. "type": "array",
  10497. "items": {
  10498. "$ref": "#/components/schemas/Workspace"
  10499. },
  10500. "description": "Workspaces"
  10501. }
  10502. }
  10503. }
  10504. },
  10505. "400": {
  10506. "description": "Bad request",
  10507. "content": {
  10508. "application/json": {
  10509. "schema": {
  10510. "$ref": "#/components/schemas/BadRequestError"
  10511. }
  10512. }
  10513. }
  10514. }
  10515. },
  10516. "description": "List all workspaces.",
  10517. "summary": "List workspaces",
  10518. "x-codeSamples": [
  10519. {
  10520. "lang": "js",
  10521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10522. }
  10523. ]
  10524. },
  10525. "post": {
  10526. "tags": ["workspace"],
  10527. "operationId": "experimental.workspace.create",
  10528. "parameters": [
  10529. {
  10530. "name": "directory",
  10531. "in": "query",
  10532. "schema": {
  10533. "type": "string"
  10534. },
  10535. "required": false
  10536. },
  10537. {
  10538. "name": "workspace",
  10539. "in": "query",
  10540. "schema": {
  10541. "type": "string"
  10542. },
  10543. "required": false
  10544. }
  10545. ],
  10546. "responses": {
  10547. "200": {
  10548. "description": "Workspace created",
  10549. "content": {
  10550. "application/json": {
  10551. "schema": {
  10552. "$ref": "#/components/schemas/Workspace"
  10553. }
  10554. }
  10555. }
  10556. },
  10557. "400": {
  10558. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  10559. "content": {
  10560. "application/json": {
  10561. "schema": {
  10562. "anyOf": [
  10563. {
  10564. "$ref": "#/components/schemas/WorkspaceCreateError"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/InvalidRequestError"
  10571. }
  10572. ]
  10573. }
  10574. }
  10575. }
  10576. }
  10577. },
  10578. "description": "Create a workspace for the current project.",
  10579. "summary": "Create workspace",
  10580. "requestBody": {
  10581. "content": {
  10582. "application/json": {
  10583. "schema": {
  10584. "type": "object",
  10585. "properties": {
  10586. "id": {
  10587. "type": "string",
  10588. "pattern": "^wrk"
  10589. },
  10590. "type": {
  10591. "type": "string"
  10592. },
  10593. "branch": {
  10594. "anyOf": [
  10595. {
  10596. "type": "string"
  10597. },
  10598. {
  10599. "type": "null"
  10600. }
  10601. ]
  10602. },
  10603. "extra": {
  10604. "anyOf": [
  10605. {},
  10606. {
  10607. "type": "null"
  10608. }
  10609. ]
  10610. }
  10611. },
  10612. "required": ["type"],
  10613. "additionalProperties": false
  10614. }
  10615. }
  10616. }
  10617. },
  10618. "x-codeSamples": [
  10619. {
  10620. "lang": "js",
  10621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10622. }
  10623. ]
  10624. }
  10625. },
  10626. "/experimental/workspace/sync-list": {
  10627. "post": {
  10628. "tags": ["workspace"],
  10629. "operationId": "experimental.workspace.syncList",
  10630. "parameters": [
  10631. {
  10632. "name": "directory",
  10633. "in": "query",
  10634. "schema": {
  10635. "type": "string"
  10636. },
  10637. "required": false
  10638. },
  10639. {
  10640. "name": "workspace",
  10641. "in": "query",
  10642. "schema": {
  10643. "type": "string"
  10644. },
  10645. "required": false
  10646. }
  10647. ],
  10648. "responses": {
  10649. "204": {
  10650. "description": "Workspace list synced"
  10651. },
  10652. "400": {
  10653. "description": "Bad request",
  10654. "content": {
  10655. "application/json": {
  10656. "schema": {
  10657. "$ref": "#/components/schemas/BadRequestError"
  10658. }
  10659. }
  10660. }
  10661. }
  10662. },
  10663. "description": "Register missing workspaces returned by workspace adapters.",
  10664. "summary": "Sync workspace list",
  10665. "x-codeSamples": [
  10666. {
  10667. "lang": "js",
  10668. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10669. }
  10670. ]
  10671. }
  10672. },
  10673. "/experimental/workspace/status": {
  10674. "get": {
  10675. "tags": ["workspace"],
  10676. "operationId": "experimental.workspace.status",
  10677. "parameters": [
  10678. {
  10679. "name": "directory",
  10680. "in": "query",
  10681. "schema": {
  10682. "type": "string"
  10683. },
  10684. "required": false
  10685. },
  10686. {
  10687. "name": "workspace",
  10688. "in": "query",
  10689. "schema": {
  10690. "type": "string"
  10691. },
  10692. "required": false
  10693. }
  10694. ],
  10695. "responses": {
  10696. "200": {
  10697. "description": "Workspace status",
  10698. "content": {
  10699. "application/json": {
  10700. "schema": {
  10701. "type": "array",
  10702. "items": {
  10703. "type": "object",
  10704. "properties": {
  10705. "workspaceID": {
  10706. "type": "string",
  10707. "pattern": "^wrk"
  10708. },
  10709. "status": {
  10710. "type": "string",
  10711. "enum": ["connected", "connecting", "disconnected", "error"]
  10712. }
  10713. },
  10714. "required": ["workspaceID", "status"],
  10715. "additionalProperties": false
  10716. },
  10717. "description": "Workspace status"
  10718. }
  10719. }
  10720. }
  10721. },
  10722. "400": {
  10723. "description": "Bad request",
  10724. "content": {
  10725. "application/json": {
  10726. "schema": {
  10727. "$ref": "#/components/schemas/BadRequestError"
  10728. }
  10729. }
  10730. }
  10731. }
  10732. },
  10733. "description": "Get connection status for workspaces in the current project.",
  10734. "summary": "Workspace status",
  10735. "x-codeSamples": [
  10736. {
  10737. "lang": "js",
  10738. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10739. }
  10740. ]
  10741. }
  10742. },
  10743. "/experimental/workspace/{id}": {
  10744. "delete": {
  10745. "tags": ["workspace"],
  10746. "operationId": "experimental.workspace.remove",
  10747. "parameters": [
  10748. {
  10749. "name": "id",
  10750. "in": "path",
  10751. "schema": {
  10752. "type": "string",
  10753. "pattern": "^wrk"
  10754. },
  10755. "required": true
  10756. },
  10757. {
  10758. "name": "directory",
  10759. "in": "query",
  10760. "schema": {
  10761. "type": "string"
  10762. },
  10763. "required": false
  10764. },
  10765. {
  10766. "name": "workspace",
  10767. "in": "query",
  10768. "schema": {
  10769. "type": "string"
  10770. },
  10771. "required": false
  10772. }
  10773. ],
  10774. "responses": {
  10775. "200": {
  10776. "description": "Workspace removed",
  10777. "content": {
  10778. "application/json": {
  10779. "schema": {
  10780. "$ref": "#/components/schemas/Workspace"
  10781. }
  10782. }
  10783. }
  10784. },
  10785. "400": {
  10786. "description": "BadRequest | InvalidRequestError",
  10787. "content": {
  10788. "application/json": {
  10789. "schema": {
  10790. "anyOf": [
  10791. {
  10792. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10793. },
  10794. {
  10795. "$ref": "#/components/schemas/InvalidRequestError"
  10796. }
  10797. ]
  10798. }
  10799. }
  10800. }
  10801. }
  10802. },
  10803. "description": "Remove an existing workspace.",
  10804. "summary": "Remove workspace",
  10805. "x-codeSamples": [
  10806. {
  10807. "lang": "js",
  10808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10809. }
  10810. ]
  10811. }
  10812. },
  10813. "/experimental/workspace/warp": {
  10814. "post": {
  10815. "tags": ["workspace"],
  10816. "operationId": "experimental.workspace.warp",
  10817. "parameters": [
  10818. {
  10819. "name": "directory",
  10820. "in": "query",
  10821. "schema": {
  10822. "type": "string"
  10823. },
  10824. "required": false
  10825. },
  10826. {
  10827. "name": "workspace",
  10828. "in": "query",
  10829. "schema": {
  10830. "type": "string"
  10831. },
  10832. "required": false
  10833. }
  10834. ],
  10835. "responses": {
  10836. "204": {
  10837. "description": "Session warped"
  10838. },
  10839. "400": {
  10840. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10841. "content": {
  10842. "application/json": {
  10843. "schema": {
  10844. "anyOf": [
  10845. {
  10846. "$ref": "#/components/schemas/WorkspaceWarpError"
  10847. },
  10848. {
  10849. "$ref": "#/components/schemas/VcsApplyError"
  10850. },
  10851. {
  10852. "$ref": "#/components/schemas/InvalidRequestError"
  10853. }
  10854. ]
  10855. }
  10856. }
  10857. }
  10858. },
  10859. "404": {
  10860. "description": "NotFoundError",
  10861. "content": {
  10862. "application/json": {
  10863. "schema": {
  10864. "$ref": "#/components/schemas/NotFoundError"
  10865. }
  10866. }
  10867. }
  10868. }
  10869. },
  10870. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10871. "summary": "Warp session into workspace",
  10872. "requestBody": {
  10873. "content": {
  10874. "application/json": {
  10875. "schema": {
  10876. "type": "object",
  10877. "properties": {
  10878. "id": {
  10879. "anyOf": [
  10880. {
  10881. "type": "string",
  10882. "pattern": "^wrk"
  10883. },
  10884. {
  10885. "type": "null"
  10886. }
  10887. ]
  10888. },
  10889. "sessionID": {
  10890. "type": "string",
  10891. "pattern": "^ses"
  10892. },
  10893. "copyChanges": {
  10894. "type": "boolean"
  10895. }
  10896. },
  10897. "required": ["id", "sessionID"],
  10898. "additionalProperties": false
  10899. }
  10900. }
  10901. }
  10902. },
  10903. "x-codeSamples": [
  10904. {
  10905. "lang": "js",
  10906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10907. }
  10908. ]
  10909. }
  10910. },
  10911. "/pty/{ptyID}/connect": {
  10912. "get": {
  10913. "tags": ["pty"],
  10914. "operationId": "pty.connect",
  10915. "parameters": [
  10916. {
  10917. "name": "ptyID",
  10918. "in": "path",
  10919. "schema": {
  10920. "type": "string",
  10921. "pattern": "^pty"
  10922. },
  10923. "required": true
  10924. },
  10925. {
  10926. "in": "query",
  10927. "name": "directory",
  10928. "schema": {
  10929. "type": "string"
  10930. }
  10931. },
  10932. {
  10933. "in": "query",
  10934. "name": "workspace",
  10935. "schema": {
  10936. "type": "string"
  10937. }
  10938. },
  10939. {
  10940. "in": "query",
  10941. "name": "cursor",
  10942. "schema": {
  10943. "type": "string"
  10944. }
  10945. },
  10946. {
  10947. "in": "query",
  10948. "name": "ticket",
  10949. "schema": {
  10950. "type": "string"
  10951. }
  10952. }
  10953. ],
  10954. "responses": {
  10955. "200": {
  10956. "description": "Connected session",
  10957. "content": {
  10958. "application/json": {
  10959. "schema": {
  10960. "type": "boolean",
  10961. "description": "Connected session"
  10962. }
  10963. }
  10964. }
  10965. },
  10966. "403": {
  10967. "description": "Forbidden",
  10968. "content": {
  10969. "application/json": {
  10970. "schema": {
  10971. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10972. }
  10973. }
  10974. }
  10975. },
  10976. "404": {
  10977. "description": "Not found",
  10978. "content": {
  10979. "application/json": {
  10980. "schema": {
  10981. "$ref": "#/components/schemas/NotFoundError"
  10982. }
  10983. }
  10984. }
  10985. }
  10986. },
  10987. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10988. "summary": "Connect to PTY session",
  10989. "x-codeSamples": [
  10990. {
  10991. "lang": "js",
  10992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10993. }
  10994. ]
  10995. }
  10996. }
  10997. },
  10998. "components": {
  10999. "schemas": {
  11000. "Event": {
  11001. "anyOf": [
  11002. {
  11003. "$ref": "#/components/schemas/EventModels-devRefreshed"
  11004. },
  11005. {
  11006. "$ref": "#/components/schemas/EventPluginAdded"
  11007. },
  11008. {
  11009. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11010. },
  11011. {
  11012. "$ref": "#/components/schemas/EventFileEdited"
  11013. },
  11014. {
  11015. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11016. },
  11017. {
  11018. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11019. },
  11020. {
  11021. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11022. },
  11023. {
  11024. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11025. },
  11026. {
  11027. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11028. },
  11029. {
  11030. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11031. },
  11032. {
  11033. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11034. },
  11035. {
  11036. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11037. },
  11038. {
  11039. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11040. },
  11041. {
  11042. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11043. },
  11044. {
  11045. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11046. },
  11047. {
  11048. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11049. },
  11050. {
  11051. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11052. },
  11053. {
  11054. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11055. },
  11056. {
  11057. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11058. },
  11059. {
  11060. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11061. },
  11062. {
  11063. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11064. },
  11065. {
  11066. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11067. },
  11068. {
  11069. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11070. },
  11071. {
  11072. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11073. },
  11074. {
  11075. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11076. },
  11077. {
  11078. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11079. },
  11080. {
  11081. "$ref": "#/components/schemas/EventSessionNextRetried"
  11082. },
  11083. {
  11084. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11085. },
  11086. {
  11087. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11088. },
  11089. {
  11090. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11091. },
  11092. {
  11093. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11094. },
  11095. {
  11096. "$ref": "#/components/schemas/EventSessionCreated"
  11097. },
  11098. {
  11099. "$ref": "#/components/schemas/EventSessionUpdated"
  11100. },
  11101. {
  11102. "$ref": "#/components/schemas/EventSessionDeleted"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/EventMessageUpdated"
  11106. },
  11107. {
  11108. "$ref": "#/components/schemas/EventMessageRemoved"
  11109. },
  11110. {
  11111. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11112. },
  11113. {
  11114. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11115. },
  11116. {
  11117. "$ref": "#/components/schemas/EventMessagePartDelta"
  11118. },
  11119. {
  11120. "$ref": "#/components/schemas/EventSessionDiff"
  11121. },
  11122. {
  11123. "$ref": "#/components/schemas/EventSessionError"
  11124. },
  11125. {
  11126. "$ref": "#/components/schemas/EventPermissionAsked"
  11127. },
  11128. {
  11129. "$ref": "#/components/schemas/EventPermissionReplied"
  11130. },
  11131. {
  11132. "$ref": "#/components/schemas/EventQuestionAsked"
  11133. },
  11134. {
  11135. "$ref": "#/components/schemas/EventQuestionReplied"
  11136. },
  11137. {
  11138. "$ref": "#/components/schemas/EventQuestionRejected"
  11139. },
  11140. {
  11141. "$ref": "#/components/schemas/EventTodoUpdated"
  11142. },
  11143. {
  11144. "$ref": "#/components/schemas/EventSessionStatus"
  11145. },
  11146. {
  11147. "$ref": "#/components/schemas/EventSessionIdle"
  11148. },
  11149. {
  11150. "$ref": "#/components/schemas/EventSessionCompacted"
  11151. },
  11152. {
  11153. "$ref": "#/components/schemas/EventLspUpdated"
  11154. },
  11155. {
  11156. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11157. },
  11158. {
  11159. "$ref": "#/components/schemas/Event.tui.command.execute"
  11160. },
  11161. {
  11162. "$ref": "#/components/schemas/Event.tui.toast.show"
  11163. },
  11164. {
  11165. "$ref": "#/components/schemas/Event.tui.session.select"
  11166. },
  11167. {
  11168. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11169. },
  11170. {
  11171. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11172. },
  11173. {
  11174. "$ref": "#/components/schemas/EventCommandExecuted"
  11175. },
  11176. {
  11177. "$ref": "#/components/schemas/EventProjectUpdated"
  11178. },
  11179. {
  11180. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11181. },
  11182. {
  11183. "$ref": "#/components/schemas/EventWorkspaceReady"
  11184. },
  11185. {
  11186. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11187. },
  11188. {
  11189. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11190. },
  11191. {
  11192. "$ref": "#/components/schemas/EventWorktreeReady"
  11193. },
  11194. {
  11195. "$ref": "#/components/schemas/EventWorktreeFailed"
  11196. },
  11197. {
  11198. "$ref": "#/components/schemas/EventPtyCreated"
  11199. },
  11200. {
  11201. "$ref": "#/components/schemas/EventPtyUpdated"
  11202. },
  11203. {
  11204. "$ref": "#/components/schemas/EventPtyExited"
  11205. },
  11206. {
  11207. "$ref": "#/components/schemas/EventPtyDeleted"
  11208. },
  11209. {
  11210. "$ref": "#/components/schemas/EventInstallationUpdated"
  11211. },
  11212. {
  11213. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11214. },
  11215. {
  11216. "$ref": "#/components/schemas/EventServerConnected"
  11217. },
  11218. {
  11219. "$ref": "#/components/schemas/EventGlobalDisposed"
  11220. },
  11221. {
  11222. "$ref": "#/components/schemas/EventPermissionV2Asked"
  11223. },
  11224. {
  11225. "$ref": "#/components/schemas/EventPermissionV2Replied"
  11226. },
  11227. {
  11228. "$ref": "#/components/schemas/EventAccountAdded"
  11229. },
  11230. {
  11231. "$ref": "#/components/schemas/EventAccountRemoved"
  11232. },
  11233. {
  11234. "$ref": "#/components/schemas/EventAccountSwitched"
  11235. },
  11236. {
  11237. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11238. }
  11239. ]
  11240. },
  11241. "QuestionReplied": {
  11242. "type": "object",
  11243. "properties": {
  11244. "sessionID": {
  11245. "type": "string",
  11246. "pattern": "^ses"
  11247. },
  11248. "requestID": {
  11249. "type": "string",
  11250. "pattern": "^que"
  11251. },
  11252. "answers": {
  11253. "type": "array",
  11254. "items": {
  11255. "$ref": "#/components/schemas/QuestionAnswer"
  11256. }
  11257. }
  11258. },
  11259. "required": ["sessionID", "requestID", "answers"],
  11260. "additionalProperties": false
  11261. },
  11262. "QuestionRejected": {
  11263. "type": "object",
  11264. "properties": {
  11265. "sessionID": {
  11266. "type": "string",
  11267. "pattern": "^ses"
  11268. },
  11269. "requestID": {
  11270. "type": "string",
  11271. "pattern": "^que"
  11272. }
  11273. },
  11274. "required": ["sessionID", "requestID"],
  11275. "additionalProperties": false
  11276. },
  11277. "OAuth": {
  11278. "type": "object",
  11279. "properties": {
  11280. "type": {
  11281. "type": "string",
  11282. "enum": ["oauth"]
  11283. },
  11284. "refresh": {
  11285. "type": "string"
  11286. },
  11287. "access": {
  11288. "type": "string"
  11289. },
  11290. "expires": {
  11291. "type": "integer",
  11292. "minimum": 0
  11293. },
  11294. "accountId": {
  11295. "type": "string"
  11296. },
  11297. "enterpriseUrl": {
  11298. "type": "string"
  11299. }
  11300. },
  11301. "required": ["type", "refresh", "access", "expires"],
  11302. "additionalProperties": false
  11303. },
  11304. "ApiAuth": {
  11305. "type": "object",
  11306. "properties": {
  11307. "type": {
  11308. "type": "string",
  11309. "enum": ["api"]
  11310. },
  11311. "key": {
  11312. "type": "string"
  11313. },
  11314. "metadata": {
  11315. "type": "object",
  11316. "additionalProperties": {
  11317. "type": "string"
  11318. }
  11319. }
  11320. },
  11321. "required": ["type", "key"],
  11322. "additionalProperties": false
  11323. },
  11324. "WellKnownAuth": {
  11325. "type": "object",
  11326. "properties": {
  11327. "type": {
  11328. "type": "string",
  11329. "enum": ["wellknown"]
  11330. },
  11331. "key": {
  11332. "type": "string"
  11333. },
  11334. "token": {
  11335. "type": "string"
  11336. }
  11337. },
  11338. "required": ["type", "key", "token"],
  11339. "additionalProperties": false
  11340. },
  11341. "Auth": {
  11342. "anyOf": [
  11343. {
  11344. "$ref": "#/components/schemas/OAuth"
  11345. },
  11346. {
  11347. "$ref": "#/components/schemas/ApiAuth"
  11348. },
  11349. {
  11350. "$ref": "#/components/schemas/WellKnownAuth"
  11351. }
  11352. ]
  11353. },
  11354. "effect_HttpApiError_BadRequest": {
  11355. "type": "object",
  11356. "properties": {
  11357. "_tag": {
  11358. "type": "string",
  11359. "enum": ["BadRequest"]
  11360. }
  11361. },
  11362. "required": ["_tag"],
  11363. "additionalProperties": false
  11364. },
  11365. "InvalidRequestError": {
  11366. "type": "object",
  11367. "properties": {
  11368. "_tag": {
  11369. "type": "string",
  11370. "enum": ["InvalidRequestError"]
  11371. },
  11372. "message": {
  11373. "type": "string"
  11374. },
  11375. "kind": {
  11376. "type": "string"
  11377. },
  11378. "field": {
  11379. "type": "string"
  11380. }
  11381. },
  11382. "required": ["_tag", "message"],
  11383. "additionalProperties": false
  11384. },
  11385. "Prompt": {
  11386. "type": "object",
  11387. "properties": {
  11388. "text": {
  11389. "type": "string"
  11390. },
  11391. "files": {
  11392. "type": "array",
  11393. "items": {
  11394. "$ref": "#/components/schemas/PromptFileAttachment"
  11395. }
  11396. },
  11397. "agents": {
  11398. "type": "array",
  11399. "items": {
  11400. "$ref": "#/components/schemas/PromptAgentAttachment"
  11401. }
  11402. },
  11403. "references": {
  11404. "type": "array",
  11405. "items": {
  11406. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11407. }
  11408. }
  11409. },
  11410. "required": ["text"],
  11411. "additionalProperties": false
  11412. },
  11413. "SnapshotFileDiff": {
  11414. "type": "object",
  11415. "properties": {
  11416. "file": {
  11417. "type": "string"
  11418. },
  11419. "patch": {
  11420. "type": "string"
  11421. },
  11422. "additions": {
  11423. "type": "number"
  11424. },
  11425. "deletions": {
  11426. "type": "number"
  11427. },
  11428. "status": {
  11429. "type": "string",
  11430. "enum": ["added", "deleted", "modified"]
  11431. }
  11432. },
  11433. "required": ["additions", "deletions"],
  11434. "additionalProperties": false
  11435. },
  11436. "PermissionAction": {
  11437. "type": "string",
  11438. "enum": ["allow", "deny", "ask"]
  11439. },
  11440. "PermissionRule": {
  11441. "type": "object",
  11442. "properties": {
  11443. "permission": {
  11444. "type": "string"
  11445. },
  11446. "pattern": {
  11447. "type": "string"
  11448. },
  11449. "action": {
  11450. "$ref": "#/components/schemas/PermissionAction"
  11451. }
  11452. },
  11453. "required": ["permission", "pattern", "action"],
  11454. "additionalProperties": false
  11455. },
  11456. "PermissionRuleset": {
  11457. "type": "array",
  11458. "items": {
  11459. "$ref": "#/components/schemas/PermissionRule"
  11460. }
  11461. },
  11462. "Session": {
  11463. "type": "object",
  11464. "properties": {
  11465. "id": {
  11466. "type": "string",
  11467. "pattern": "^ses"
  11468. },
  11469. "slug": {
  11470. "type": "string"
  11471. },
  11472. "projectID": {
  11473. "type": "string"
  11474. },
  11475. "workspaceID": {
  11476. "type": "string",
  11477. "pattern": "^wrk"
  11478. },
  11479. "directory": {
  11480. "type": "string"
  11481. },
  11482. "path": {
  11483. "type": "string"
  11484. },
  11485. "parentID": {
  11486. "type": "string",
  11487. "pattern": "^ses"
  11488. },
  11489. "summary": {
  11490. "type": "object",
  11491. "properties": {
  11492. "additions": {
  11493. "type": "number"
  11494. },
  11495. "deletions": {
  11496. "type": "number"
  11497. },
  11498. "files": {
  11499. "type": "number"
  11500. },
  11501. "diffs": {
  11502. "type": "array",
  11503. "items": {
  11504. "$ref": "#/components/schemas/SnapshotFileDiff"
  11505. }
  11506. }
  11507. },
  11508. "required": ["additions", "deletions", "files"],
  11509. "additionalProperties": false
  11510. },
  11511. "cost": {
  11512. "type": "number"
  11513. },
  11514. "tokens": {
  11515. "type": "object",
  11516. "properties": {
  11517. "input": {
  11518. "type": "number"
  11519. },
  11520. "output": {
  11521. "type": "number"
  11522. },
  11523. "reasoning": {
  11524. "type": "number"
  11525. },
  11526. "cache": {
  11527. "type": "object",
  11528. "properties": {
  11529. "read": {
  11530. "type": "number"
  11531. },
  11532. "write": {
  11533. "type": "number"
  11534. }
  11535. },
  11536. "required": ["read", "write"],
  11537. "additionalProperties": false
  11538. }
  11539. },
  11540. "required": ["input", "output", "reasoning", "cache"],
  11541. "additionalProperties": false
  11542. },
  11543. "share": {
  11544. "type": "object",
  11545. "properties": {
  11546. "url": {
  11547. "type": "string"
  11548. }
  11549. },
  11550. "required": ["url"],
  11551. "additionalProperties": false
  11552. },
  11553. "title": {
  11554. "type": "string"
  11555. },
  11556. "agent": {
  11557. "type": "string"
  11558. },
  11559. "model": {
  11560. "type": "object",
  11561. "properties": {
  11562. "id": {
  11563. "type": "string"
  11564. },
  11565. "providerID": {
  11566. "type": "string"
  11567. },
  11568. "variant": {
  11569. "type": "string"
  11570. }
  11571. },
  11572. "required": ["id", "providerID"],
  11573. "additionalProperties": false
  11574. },
  11575. "version": {
  11576. "type": "string"
  11577. },
  11578. "metadata": {
  11579. "type": "object"
  11580. },
  11581. "time": {
  11582. "type": "object",
  11583. "properties": {
  11584. "created": {
  11585. "type": "integer",
  11586. "minimum": 0
  11587. },
  11588. "updated": {
  11589. "type": "integer",
  11590. "minimum": 0
  11591. },
  11592. "compacting": {
  11593. "type": "integer",
  11594. "minimum": 0
  11595. },
  11596. "archived": {
  11597. "type": "number"
  11598. }
  11599. },
  11600. "required": ["created", "updated"],
  11601. "additionalProperties": false
  11602. },
  11603. "permission": {
  11604. "$ref": "#/components/schemas/PermissionRuleset"
  11605. },
  11606. "revert": {
  11607. "type": "object",
  11608. "properties": {
  11609. "messageID": {
  11610. "type": "string",
  11611. "pattern": "^msg"
  11612. },
  11613. "partID": {
  11614. "type": "string",
  11615. "pattern": "^prt"
  11616. },
  11617. "snapshot": {
  11618. "type": "string"
  11619. },
  11620. "diff": {
  11621. "type": "string"
  11622. }
  11623. },
  11624. "required": ["messageID"],
  11625. "additionalProperties": false
  11626. }
  11627. },
  11628. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11629. "additionalProperties": false
  11630. },
  11631. "OutputFormatText": {
  11632. "type": "object",
  11633. "properties": {
  11634. "type": {
  11635. "type": "string",
  11636. "enum": ["text"]
  11637. }
  11638. },
  11639. "required": ["type"],
  11640. "additionalProperties": false
  11641. },
  11642. "JSONSchema": {
  11643. "type": "object"
  11644. },
  11645. "OutputFormatJsonSchema": {
  11646. "type": "object",
  11647. "properties": {
  11648. "type": {
  11649. "type": "string",
  11650. "enum": ["json_schema"]
  11651. },
  11652. "schema": {
  11653. "$ref": "#/components/schemas/JSONSchema"
  11654. },
  11655. "retryCount": {
  11656. "type": "integer",
  11657. "minimum": 0
  11658. }
  11659. },
  11660. "required": ["type", "schema"],
  11661. "additionalProperties": false
  11662. },
  11663. "OutputFormat": {
  11664. "anyOf": [
  11665. {
  11666. "$ref": "#/components/schemas/OutputFormatText"
  11667. },
  11668. {
  11669. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11670. }
  11671. ]
  11672. },
  11673. "UserMessage": {
  11674. "type": "object",
  11675. "properties": {
  11676. "id": {
  11677. "type": "string",
  11678. "pattern": "^msg"
  11679. },
  11680. "sessionID": {
  11681. "type": "string",
  11682. "pattern": "^ses"
  11683. },
  11684. "role": {
  11685. "type": "string",
  11686. "enum": ["user"]
  11687. },
  11688. "time": {
  11689. "type": "object",
  11690. "properties": {
  11691. "created": {
  11692. "type": "integer",
  11693. "minimum": 0
  11694. }
  11695. },
  11696. "required": ["created"],
  11697. "additionalProperties": false
  11698. },
  11699. "format": {
  11700. "$ref": "#/components/schemas/OutputFormat"
  11701. },
  11702. "summary": {
  11703. "type": "object",
  11704. "properties": {
  11705. "title": {
  11706. "type": "string"
  11707. },
  11708. "body": {
  11709. "type": "string"
  11710. },
  11711. "diffs": {
  11712. "type": "array",
  11713. "items": {
  11714. "$ref": "#/components/schemas/SnapshotFileDiff"
  11715. }
  11716. }
  11717. },
  11718. "required": ["diffs"],
  11719. "additionalProperties": false
  11720. },
  11721. "agent": {
  11722. "type": "string"
  11723. },
  11724. "model": {
  11725. "type": "object",
  11726. "properties": {
  11727. "providerID": {
  11728. "type": "string"
  11729. },
  11730. "modelID": {
  11731. "type": "string"
  11732. },
  11733. "variant": {
  11734. "type": "string"
  11735. }
  11736. },
  11737. "required": ["providerID", "modelID"],
  11738. "additionalProperties": false
  11739. },
  11740. "system": {
  11741. "type": "string"
  11742. },
  11743. "tools": {
  11744. "type": "object",
  11745. "additionalProperties": {
  11746. "type": "boolean"
  11747. }
  11748. }
  11749. },
  11750. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11751. "additionalProperties": false
  11752. },
  11753. "ProviderAuthError": {
  11754. "type": "object",
  11755. "properties": {
  11756. "name": {
  11757. "type": "string",
  11758. "enum": ["ProviderAuthError"]
  11759. },
  11760. "data": {
  11761. "type": "object",
  11762. "properties": {
  11763. "providerID": {
  11764. "type": "string"
  11765. },
  11766. "message": {
  11767. "type": "string"
  11768. }
  11769. },
  11770. "required": ["providerID", "message"],
  11771. "additionalProperties": false
  11772. }
  11773. },
  11774. "required": ["name", "data"],
  11775. "additionalProperties": false
  11776. },
  11777. "UnknownError": {
  11778. "type": "object",
  11779. "properties": {
  11780. "name": {
  11781. "type": "string",
  11782. "enum": ["UnknownError"]
  11783. },
  11784. "data": {
  11785. "type": "object",
  11786. "properties": {
  11787. "message": {
  11788. "type": "string"
  11789. },
  11790. "ref": {
  11791. "type": "string"
  11792. }
  11793. },
  11794. "required": ["message"],
  11795. "additionalProperties": false
  11796. }
  11797. },
  11798. "required": ["name", "data"],
  11799. "additionalProperties": false
  11800. },
  11801. "MessageOutputLengthError": {
  11802. "type": "object",
  11803. "properties": {
  11804. "name": {
  11805. "type": "string",
  11806. "enum": ["MessageOutputLengthError"]
  11807. },
  11808. "data": {
  11809. "type": "object",
  11810. "properties": {}
  11811. }
  11812. },
  11813. "required": ["name", "data"],
  11814. "additionalProperties": false
  11815. },
  11816. "MessageAbortedError": {
  11817. "type": "object",
  11818. "properties": {
  11819. "name": {
  11820. "type": "string",
  11821. "enum": ["MessageAbortedError"]
  11822. },
  11823. "data": {
  11824. "type": "object",
  11825. "properties": {
  11826. "message": {
  11827. "type": "string"
  11828. }
  11829. },
  11830. "required": ["message"],
  11831. "additionalProperties": false
  11832. }
  11833. },
  11834. "required": ["name", "data"],
  11835. "additionalProperties": false
  11836. },
  11837. "StructuredOutputError": {
  11838. "type": "object",
  11839. "properties": {
  11840. "name": {
  11841. "type": "string",
  11842. "enum": ["StructuredOutputError"]
  11843. },
  11844. "data": {
  11845. "type": "object",
  11846. "properties": {
  11847. "message": {
  11848. "type": "string"
  11849. },
  11850. "retries": {
  11851. "type": "integer",
  11852. "minimum": 0
  11853. }
  11854. },
  11855. "required": ["message", "retries"],
  11856. "additionalProperties": false
  11857. }
  11858. },
  11859. "required": ["name", "data"],
  11860. "additionalProperties": false
  11861. },
  11862. "ContextOverflowError": {
  11863. "type": "object",
  11864. "properties": {
  11865. "name": {
  11866. "type": "string",
  11867. "enum": ["ContextOverflowError"]
  11868. },
  11869. "data": {
  11870. "type": "object",
  11871. "properties": {
  11872. "message": {
  11873. "type": "string"
  11874. },
  11875. "responseBody": {
  11876. "type": "string"
  11877. }
  11878. },
  11879. "required": ["message"],
  11880. "additionalProperties": false
  11881. }
  11882. },
  11883. "required": ["name", "data"],
  11884. "additionalProperties": false
  11885. },
  11886. "APIError": {
  11887. "type": "object",
  11888. "properties": {
  11889. "name": {
  11890. "type": "string",
  11891. "enum": ["APIError"]
  11892. },
  11893. "data": {
  11894. "type": "object",
  11895. "properties": {
  11896. "message": {
  11897. "type": "string"
  11898. },
  11899. "statusCode": {
  11900. "type": "integer",
  11901. "minimum": 0
  11902. },
  11903. "isRetryable": {
  11904. "type": "boolean"
  11905. },
  11906. "responseHeaders": {
  11907. "type": "object",
  11908. "additionalProperties": {
  11909. "type": "string"
  11910. }
  11911. },
  11912. "responseBody": {
  11913. "type": "string"
  11914. },
  11915. "metadata": {
  11916. "type": "object",
  11917. "additionalProperties": {
  11918. "type": "string"
  11919. }
  11920. }
  11921. },
  11922. "required": ["message", "isRetryable"],
  11923. "additionalProperties": false
  11924. }
  11925. },
  11926. "required": ["name", "data"],
  11927. "additionalProperties": false
  11928. },
  11929. "AssistantMessage": {
  11930. "type": "object",
  11931. "properties": {
  11932. "id": {
  11933. "type": "string",
  11934. "pattern": "^msg"
  11935. },
  11936. "sessionID": {
  11937. "type": "string",
  11938. "pattern": "^ses"
  11939. },
  11940. "role": {
  11941. "type": "string",
  11942. "enum": ["assistant"]
  11943. },
  11944. "time": {
  11945. "type": "object",
  11946. "properties": {
  11947. "created": {
  11948. "type": "integer",
  11949. "minimum": 0
  11950. },
  11951. "completed": {
  11952. "type": "integer",
  11953. "minimum": 0
  11954. }
  11955. },
  11956. "required": ["created"],
  11957. "additionalProperties": false
  11958. },
  11959. "error": {
  11960. "anyOf": [
  11961. {
  11962. "$ref": "#/components/schemas/ProviderAuthError"
  11963. },
  11964. {
  11965. "$ref": "#/components/schemas/UnknownError"
  11966. },
  11967. {
  11968. "$ref": "#/components/schemas/MessageOutputLengthError"
  11969. },
  11970. {
  11971. "$ref": "#/components/schemas/MessageAbortedError"
  11972. },
  11973. {
  11974. "$ref": "#/components/schemas/StructuredOutputError"
  11975. },
  11976. {
  11977. "$ref": "#/components/schemas/ContextOverflowError"
  11978. },
  11979. {
  11980. "$ref": "#/components/schemas/APIError"
  11981. }
  11982. ]
  11983. },
  11984. "parentID": {
  11985. "type": "string",
  11986. "pattern": "^msg"
  11987. },
  11988. "modelID": {
  11989. "type": "string"
  11990. },
  11991. "providerID": {
  11992. "type": "string"
  11993. },
  11994. "mode": {
  11995. "type": "string"
  11996. },
  11997. "agent": {
  11998. "type": "string"
  11999. },
  12000. "path": {
  12001. "type": "object",
  12002. "properties": {
  12003. "cwd": {
  12004. "type": "string"
  12005. },
  12006. "root": {
  12007. "type": "string"
  12008. }
  12009. },
  12010. "required": ["cwd", "root"],
  12011. "additionalProperties": false
  12012. },
  12013. "summary": {
  12014. "type": "boolean"
  12015. },
  12016. "cost": {
  12017. "type": "number"
  12018. },
  12019. "tokens": {
  12020. "type": "object",
  12021. "properties": {
  12022. "total": {
  12023. "type": "number"
  12024. },
  12025. "input": {
  12026. "type": "number"
  12027. },
  12028. "output": {
  12029. "type": "number"
  12030. },
  12031. "reasoning": {
  12032. "type": "number"
  12033. },
  12034. "cache": {
  12035. "type": "object",
  12036. "properties": {
  12037. "read": {
  12038. "type": "number"
  12039. },
  12040. "write": {
  12041. "type": "number"
  12042. }
  12043. },
  12044. "required": ["read", "write"],
  12045. "additionalProperties": false
  12046. }
  12047. },
  12048. "required": ["input", "output", "reasoning", "cache"],
  12049. "additionalProperties": false
  12050. },
  12051. "structured": {},
  12052. "variant": {
  12053. "type": "string"
  12054. },
  12055. "finish": {
  12056. "type": "string"
  12057. }
  12058. },
  12059. "required": [
  12060. "id",
  12061. "sessionID",
  12062. "role",
  12063. "time",
  12064. "parentID",
  12065. "modelID",
  12066. "providerID",
  12067. "mode",
  12068. "agent",
  12069. "path",
  12070. "cost",
  12071. "tokens"
  12072. ],
  12073. "additionalProperties": false
  12074. },
  12075. "Message": {
  12076. "anyOf": [
  12077. {
  12078. "$ref": "#/components/schemas/UserMessage"
  12079. },
  12080. {
  12081. "$ref": "#/components/schemas/AssistantMessage"
  12082. }
  12083. ]
  12084. },
  12085. "TextPart": {
  12086. "type": "object",
  12087. "properties": {
  12088. "id": {
  12089. "type": "string",
  12090. "pattern": "^prt"
  12091. },
  12092. "sessionID": {
  12093. "type": "string",
  12094. "pattern": "^ses"
  12095. },
  12096. "messageID": {
  12097. "type": "string",
  12098. "pattern": "^msg"
  12099. },
  12100. "type": {
  12101. "type": "string",
  12102. "enum": ["text"]
  12103. },
  12104. "text": {
  12105. "type": "string"
  12106. },
  12107. "synthetic": {
  12108. "type": "boolean"
  12109. },
  12110. "ignored": {
  12111. "type": "boolean"
  12112. },
  12113. "time": {
  12114. "type": "object",
  12115. "properties": {
  12116. "start": {
  12117. "type": "integer",
  12118. "minimum": 0
  12119. },
  12120. "end": {
  12121. "type": "integer",
  12122. "minimum": 0
  12123. }
  12124. },
  12125. "required": ["start"],
  12126. "additionalProperties": false
  12127. },
  12128. "metadata": {
  12129. "type": "object"
  12130. }
  12131. },
  12132. "required": ["id", "sessionID", "messageID", "type", "text"],
  12133. "additionalProperties": false
  12134. },
  12135. "SubtaskPart": {
  12136. "type": "object",
  12137. "properties": {
  12138. "id": {
  12139. "type": "string",
  12140. "pattern": "^prt"
  12141. },
  12142. "sessionID": {
  12143. "type": "string",
  12144. "pattern": "^ses"
  12145. },
  12146. "messageID": {
  12147. "type": "string",
  12148. "pattern": "^msg"
  12149. },
  12150. "type": {
  12151. "type": "string",
  12152. "enum": ["subtask"]
  12153. },
  12154. "prompt": {
  12155. "type": "string"
  12156. },
  12157. "description": {
  12158. "type": "string"
  12159. },
  12160. "agent": {
  12161. "type": "string"
  12162. },
  12163. "model": {
  12164. "type": "object",
  12165. "properties": {
  12166. "providerID": {
  12167. "type": "string"
  12168. },
  12169. "modelID": {
  12170. "type": "string"
  12171. }
  12172. },
  12173. "required": ["providerID", "modelID"],
  12174. "additionalProperties": false
  12175. },
  12176. "command": {
  12177. "type": "string"
  12178. }
  12179. },
  12180. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  12181. "additionalProperties": false
  12182. },
  12183. "ReasoningPart": {
  12184. "type": "object",
  12185. "properties": {
  12186. "id": {
  12187. "type": "string",
  12188. "pattern": "^prt"
  12189. },
  12190. "sessionID": {
  12191. "type": "string",
  12192. "pattern": "^ses"
  12193. },
  12194. "messageID": {
  12195. "type": "string",
  12196. "pattern": "^msg"
  12197. },
  12198. "type": {
  12199. "type": "string",
  12200. "enum": ["reasoning"]
  12201. },
  12202. "text": {
  12203. "type": "string"
  12204. },
  12205. "metadata": {
  12206. "type": "object"
  12207. },
  12208. "time": {
  12209. "type": "object",
  12210. "properties": {
  12211. "start": {
  12212. "type": "integer",
  12213. "minimum": 0
  12214. },
  12215. "end": {
  12216. "type": "integer",
  12217. "minimum": 0
  12218. }
  12219. },
  12220. "required": ["start"],
  12221. "additionalProperties": false
  12222. }
  12223. },
  12224. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  12225. "additionalProperties": false
  12226. },
  12227. "FilePartSourceText": {
  12228. "type": "object",
  12229. "properties": {
  12230. "value": {
  12231. "type": "string"
  12232. },
  12233. "start": {
  12234. "type": "number"
  12235. },
  12236. "end": {
  12237. "type": "number"
  12238. }
  12239. },
  12240. "required": ["value", "start", "end"],
  12241. "additionalProperties": false
  12242. },
  12243. "FileSource": {
  12244. "type": "object",
  12245. "properties": {
  12246. "text": {
  12247. "$ref": "#/components/schemas/FilePartSourceText"
  12248. },
  12249. "type": {
  12250. "type": "string",
  12251. "enum": ["file"]
  12252. },
  12253. "path": {
  12254. "type": "string"
  12255. }
  12256. },
  12257. "required": ["text", "type", "path"],
  12258. "additionalProperties": false
  12259. },
  12260. "Range": {
  12261. "type": "object",
  12262. "properties": {
  12263. "start": {
  12264. "type": "object",
  12265. "properties": {
  12266. "line": {
  12267. "type": "integer",
  12268. "minimum": 0
  12269. },
  12270. "character": {
  12271. "type": "integer",
  12272. "minimum": 0
  12273. }
  12274. },
  12275. "required": ["line", "character"],
  12276. "additionalProperties": false
  12277. },
  12278. "end": {
  12279. "type": "object",
  12280. "properties": {
  12281. "line": {
  12282. "type": "integer",
  12283. "minimum": 0
  12284. },
  12285. "character": {
  12286. "type": "integer",
  12287. "minimum": 0
  12288. }
  12289. },
  12290. "required": ["line", "character"],
  12291. "additionalProperties": false
  12292. }
  12293. },
  12294. "required": ["start", "end"],
  12295. "additionalProperties": false
  12296. },
  12297. "SymbolSource": {
  12298. "type": "object",
  12299. "properties": {
  12300. "text": {
  12301. "$ref": "#/components/schemas/FilePartSourceText"
  12302. },
  12303. "type": {
  12304. "type": "string",
  12305. "enum": ["symbol"]
  12306. },
  12307. "path": {
  12308. "type": "string"
  12309. },
  12310. "range": {
  12311. "$ref": "#/components/schemas/Range"
  12312. },
  12313. "name": {
  12314. "type": "string"
  12315. },
  12316. "kind": {
  12317. "type": "integer",
  12318. "minimum": 0
  12319. }
  12320. },
  12321. "required": ["text", "type", "path", "range", "name", "kind"],
  12322. "additionalProperties": false
  12323. },
  12324. "ResourceSource": {
  12325. "type": "object",
  12326. "properties": {
  12327. "text": {
  12328. "$ref": "#/components/schemas/FilePartSourceText"
  12329. },
  12330. "type": {
  12331. "type": "string",
  12332. "enum": ["resource"]
  12333. },
  12334. "clientName": {
  12335. "type": "string"
  12336. },
  12337. "uri": {
  12338. "type": "string"
  12339. }
  12340. },
  12341. "required": ["text", "type", "clientName", "uri"],
  12342. "additionalProperties": false
  12343. },
  12344. "FilePartSource": {
  12345. "anyOf": [
  12346. {
  12347. "$ref": "#/components/schemas/FileSource"
  12348. },
  12349. {
  12350. "$ref": "#/components/schemas/SymbolSource"
  12351. },
  12352. {
  12353. "$ref": "#/components/schemas/ResourceSource"
  12354. }
  12355. ]
  12356. },
  12357. "FilePart": {
  12358. "type": "object",
  12359. "properties": {
  12360. "id": {
  12361. "type": "string",
  12362. "pattern": "^prt"
  12363. },
  12364. "sessionID": {
  12365. "type": "string",
  12366. "pattern": "^ses"
  12367. },
  12368. "messageID": {
  12369. "type": "string",
  12370. "pattern": "^msg"
  12371. },
  12372. "type": {
  12373. "type": "string",
  12374. "enum": ["file"]
  12375. },
  12376. "mime": {
  12377. "type": "string"
  12378. },
  12379. "filename": {
  12380. "type": "string"
  12381. },
  12382. "url": {
  12383. "type": "string"
  12384. },
  12385. "source": {
  12386. "$ref": "#/components/schemas/FilePartSource"
  12387. }
  12388. },
  12389. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12390. "additionalProperties": false
  12391. },
  12392. "ToolStatePending": {
  12393. "type": "object",
  12394. "properties": {
  12395. "status": {
  12396. "type": "string",
  12397. "enum": ["pending"]
  12398. },
  12399. "input": {
  12400. "type": "object"
  12401. },
  12402. "raw": {
  12403. "type": "string"
  12404. }
  12405. },
  12406. "required": ["status", "input", "raw"],
  12407. "additionalProperties": false
  12408. },
  12409. "ToolStateRunning": {
  12410. "type": "object",
  12411. "properties": {
  12412. "status": {
  12413. "type": "string",
  12414. "enum": ["running"]
  12415. },
  12416. "input": {
  12417. "type": "object"
  12418. },
  12419. "title": {
  12420. "type": "string"
  12421. },
  12422. "metadata": {
  12423. "type": "object"
  12424. },
  12425. "time": {
  12426. "type": "object",
  12427. "properties": {
  12428. "start": {
  12429. "type": "integer",
  12430. "minimum": 0
  12431. }
  12432. },
  12433. "required": ["start"],
  12434. "additionalProperties": false
  12435. }
  12436. },
  12437. "required": ["status", "input", "time"],
  12438. "additionalProperties": false
  12439. },
  12440. "ToolStateCompleted": {
  12441. "type": "object",
  12442. "properties": {
  12443. "status": {
  12444. "type": "string",
  12445. "enum": ["completed"]
  12446. },
  12447. "input": {
  12448. "type": "object"
  12449. },
  12450. "output": {
  12451. "type": "string"
  12452. },
  12453. "title": {
  12454. "type": "string"
  12455. },
  12456. "metadata": {
  12457. "type": "object"
  12458. },
  12459. "time": {
  12460. "type": "object",
  12461. "properties": {
  12462. "start": {
  12463. "type": "integer",
  12464. "minimum": 0
  12465. },
  12466. "end": {
  12467. "type": "integer",
  12468. "minimum": 0
  12469. },
  12470. "compacted": {
  12471. "type": "integer",
  12472. "minimum": 0
  12473. }
  12474. },
  12475. "required": ["start", "end"],
  12476. "additionalProperties": false
  12477. },
  12478. "attachments": {
  12479. "type": "array",
  12480. "items": {
  12481. "$ref": "#/components/schemas/FilePart"
  12482. }
  12483. }
  12484. },
  12485. "required": ["status", "input", "output", "title", "metadata", "time"],
  12486. "additionalProperties": false
  12487. },
  12488. "ToolStateError": {
  12489. "type": "object",
  12490. "properties": {
  12491. "status": {
  12492. "type": "string",
  12493. "enum": ["error"]
  12494. },
  12495. "input": {
  12496. "type": "object"
  12497. },
  12498. "error": {
  12499. "type": "string"
  12500. },
  12501. "metadata": {
  12502. "type": "object"
  12503. },
  12504. "time": {
  12505. "type": "object",
  12506. "properties": {
  12507. "start": {
  12508. "type": "integer",
  12509. "minimum": 0
  12510. },
  12511. "end": {
  12512. "type": "integer",
  12513. "minimum": 0
  12514. }
  12515. },
  12516. "required": ["start", "end"],
  12517. "additionalProperties": false
  12518. }
  12519. },
  12520. "required": ["status", "input", "error", "time"],
  12521. "additionalProperties": false
  12522. },
  12523. "ToolState": {
  12524. "anyOf": [
  12525. {
  12526. "$ref": "#/components/schemas/ToolStatePending"
  12527. },
  12528. {
  12529. "$ref": "#/components/schemas/ToolStateRunning"
  12530. },
  12531. {
  12532. "$ref": "#/components/schemas/ToolStateCompleted"
  12533. },
  12534. {
  12535. "$ref": "#/components/schemas/ToolStateError"
  12536. }
  12537. ]
  12538. },
  12539. "ToolPart": {
  12540. "type": "object",
  12541. "properties": {
  12542. "id": {
  12543. "type": "string",
  12544. "pattern": "^prt"
  12545. },
  12546. "sessionID": {
  12547. "type": "string",
  12548. "pattern": "^ses"
  12549. },
  12550. "messageID": {
  12551. "type": "string",
  12552. "pattern": "^msg"
  12553. },
  12554. "type": {
  12555. "type": "string",
  12556. "enum": ["tool"]
  12557. },
  12558. "callID": {
  12559. "type": "string"
  12560. },
  12561. "tool": {
  12562. "type": "string"
  12563. },
  12564. "state": {
  12565. "$ref": "#/components/schemas/ToolState"
  12566. },
  12567. "metadata": {
  12568. "type": "object"
  12569. }
  12570. },
  12571. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12572. "additionalProperties": false
  12573. },
  12574. "StepStartPart": {
  12575. "type": "object",
  12576. "properties": {
  12577. "id": {
  12578. "type": "string",
  12579. "pattern": "^prt"
  12580. },
  12581. "sessionID": {
  12582. "type": "string",
  12583. "pattern": "^ses"
  12584. },
  12585. "messageID": {
  12586. "type": "string",
  12587. "pattern": "^msg"
  12588. },
  12589. "type": {
  12590. "type": "string",
  12591. "enum": ["step-start"]
  12592. },
  12593. "snapshot": {
  12594. "type": "string"
  12595. }
  12596. },
  12597. "required": ["id", "sessionID", "messageID", "type"],
  12598. "additionalProperties": false
  12599. },
  12600. "StepFinishPart": {
  12601. "type": "object",
  12602. "properties": {
  12603. "id": {
  12604. "type": "string",
  12605. "pattern": "^prt"
  12606. },
  12607. "sessionID": {
  12608. "type": "string",
  12609. "pattern": "^ses"
  12610. },
  12611. "messageID": {
  12612. "type": "string",
  12613. "pattern": "^msg"
  12614. },
  12615. "type": {
  12616. "type": "string",
  12617. "enum": ["step-finish"]
  12618. },
  12619. "reason": {
  12620. "type": "string"
  12621. },
  12622. "snapshot": {
  12623. "type": "string"
  12624. },
  12625. "cost": {
  12626. "type": "number"
  12627. },
  12628. "tokens": {
  12629. "type": "object",
  12630. "properties": {
  12631. "total": {
  12632. "type": "number"
  12633. },
  12634. "input": {
  12635. "type": "number"
  12636. },
  12637. "output": {
  12638. "type": "number"
  12639. },
  12640. "reasoning": {
  12641. "type": "number"
  12642. },
  12643. "cache": {
  12644. "type": "object",
  12645. "properties": {
  12646. "read": {
  12647. "type": "number"
  12648. },
  12649. "write": {
  12650. "type": "number"
  12651. }
  12652. },
  12653. "required": ["read", "write"],
  12654. "additionalProperties": false
  12655. }
  12656. },
  12657. "required": ["input", "output", "reasoning", "cache"],
  12658. "additionalProperties": false
  12659. }
  12660. },
  12661. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12662. "additionalProperties": false
  12663. },
  12664. "SnapshotPart": {
  12665. "type": "object",
  12666. "properties": {
  12667. "id": {
  12668. "type": "string",
  12669. "pattern": "^prt"
  12670. },
  12671. "sessionID": {
  12672. "type": "string",
  12673. "pattern": "^ses"
  12674. },
  12675. "messageID": {
  12676. "type": "string",
  12677. "pattern": "^msg"
  12678. },
  12679. "type": {
  12680. "type": "string",
  12681. "enum": ["snapshot"]
  12682. },
  12683. "snapshot": {
  12684. "type": "string"
  12685. }
  12686. },
  12687. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12688. "additionalProperties": false
  12689. },
  12690. "PatchPart": {
  12691. "type": "object",
  12692. "properties": {
  12693. "id": {
  12694. "type": "string",
  12695. "pattern": "^prt"
  12696. },
  12697. "sessionID": {
  12698. "type": "string",
  12699. "pattern": "^ses"
  12700. },
  12701. "messageID": {
  12702. "type": "string",
  12703. "pattern": "^msg"
  12704. },
  12705. "type": {
  12706. "type": "string",
  12707. "enum": ["patch"]
  12708. },
  12709. "hash": {
  12710. "type": "string"
  12711. },
  12712. "files": {
  12713. "type": "array",
  12714. "items": {
  12715. "type": "string"
  12716. }
  12717. }
  12718. },
  12719. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12720. "additionalProperties": false
  12721. },
  12722. "AgentPart": {
  12723. "type": "object",
  12724. "properties": {
  12725. "id": {
  12726. "type": "string",
  12727. "pattern": "^prt"
  12728. },
  12729. "sessionID": {
  12730. "type": "string",
  12731. "pattern": "^ses"
  12732. },
  12733. "messageID": {
  12734. "type": "string",
  12735. "pattern": "^msg"
  12736. },
  12737. "type": {
  12738. "type": "string",
  12739. "enum": ["agent"]
  12740. },
  12741. "name": {
  12742. "type": "string"
  12743. },
  12744. "source": {
  12745. "type": "object",
  12746. "properties": {
  12747. "value": {
  12748. "type": "string"
  12749. },
  12750. "start": {
  12751. "type": "integer",
  12752. "minimum": 0
  12753. },
  12754. "end": {
  12755. "type": "integer",
  12756. "minimum": 0
  12757. }
  12758. },
  12759. "required": ["value", "start", "end"],
  12760. "additionalProperties": false
  12761. }
  12762. },
  12763. "required": ["id", "sessionID", "messageID", "type", "name"],
  12764. "additionalProperties": false
  12765. },
  12766. "RetryPart": {
  12767. "type": "object",
  12768. "properties": {
  12769. "id": {
  12770. "type": "string",
  12771. "pattern": "^prt"
  12772. },
  12773. "sessionID": {
  12774. "type": "string",
  12775. "pattern": "^ses"
  12776. },
  12777. "messageID": {
  12778. "type": "string",
  12779. "pattern": "^msg"
  12780. },
  12781. "type": {
  12782. "type": "string",
  12783. "enum": ["retry"]
  12784. },
  12785. "attempt": {
  12786. "type": "integer",
  12787. "minimum": 0
  12788. },
  12789. "error": {
  12790. "$ref": "#/components/schemas/APIError"
  12791. },
  12792. "time": {
  12793. "type": "object",
  12794. "properties": {
  12795. "created": {
  12796. "type": "integer",
  12797. "minimum": 0
  12798. }
  12799. },
  12800. "required": ["created"],
  12801. "additionalProperties": false
  12802. }
  12803. },
  12804. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12805. "additionalProperties": false
  12806. },
  12807. "CompactionPart": {
  12808. "type": "object",
  12809. "properties": {
  12810. "id": {
  12811. "type": "string",
  12812. "pattern": "^prt"
  12813. },
  12814. "sessionID": {
  12815. "type": "string",
  12816. "pattern": "^ses"
  12817. },
  12818. "messageID": {
  12819. "type": "string",
  12820. "pattern": "^msg"
  12821. },
  12822. "type": {
  12823. "type": "string",
  12824. "enum": ["compaction"]
  12825. },
  12826. "auto": {
  12827. "type": "boolean"
  12828. },
  12829. "overflow": {
  12830. "type": "boolean"
  12831. },
  12832. "tail_start_id": {
  12833. "type": "string",
  12834. "pattern": "^msg"
  12835. }
  12836. },
  12837. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12838. "additionalProperties": false
  12839. },
  12840. "Part": {
  12841. "anyOf": [
  12842. {
  12843. "$ref": "#/components/schemas/TextPart"
  12844. },
  12845. {
  12846. "$ref": "#/components/schemas/SubtaskPart"
  12847. },
  12848. {
  12849. "$ref": "#/components/schemas/ReasoningPart"
  12850. },
  12851. {
  12852. "$ref": "#/components/schemas/FilePart"
  12853. },
  12854. {
  12855. "$ref": "#/components/schemas/ToolPart"
  12856. },
  12857. {
  12858. "$ref": "#/components/schemas/StepStartPart"
  12859. },
  12860. {
  12861. "$ref": "#/components/schemas/StepFinishPart"
  12862. },
  12863. {
  12864. "$ref": "#/components/schemas/SnapshotPart"
  12865. },
  12866. {
  12867. "$ref": "#/components/schemas/PatchPart"
  12868. },
  12869. {
  12870. "$ref": "#/components/schemas/AgentPart"
  12871. },
  12872. {
  12873. "$ref": "#/components/schemas/RetryPart"
  12874. },
  12875. {
  12876. "$ref": "#/components/schemas/CompactionPart"
  12877. }
  12878. ]
  12879. },
  12880. "QuestionOption": {
  12881. "type": "object",
  12882. "properties": {
  12883. "label": {
  12884. "type": "string",
  12885. "description": "Display text (1-5 words, concise)"
  12886. },
  12887. "description": {
  12888. "type": "string",
  12889. "description": "Explanation of choice"
  12890. }
  12891. },
  12892. "required": ["label", "description"],
  12893. "additionalProperties": false
  12894. },
  12895. "QuestionInfo": {
  12896. "type": "object",
  12897. "properties": {
  12898. "question": {
  12899. "type": "string",
  12900. "description": "Complete question"
  12901. },
  12902. "header": {
  12903. "type": "string",
  12904. "description": "Very short label (max 30 chars)"
  12905. },
  12906. "options": {
  12907. "type": "array",
  12908. "items": {
  12909. "$ref": "#/components/schemas/QuestionOption"
  12910. },
  12911. "description": "Available choices"
  12912. },
  12913. "multiple": {
  12914. "type": "boolean"
  12915. },
  12916. "custom": {
  12917. "type": "boolean"
  12918. }
  12919. },
  12920. "required": ["question", "header", "options"],
  12921. "additionalProperties": false
  12922. },
  12923. "QuestionTool": {
  12924. "type": "object",
  12925. "properties": {
  12926. "messageID": {
  12927. "type": "string",
  12928. "pattern": "^msg"
  12929. },
  12930. "callID": {
  12931. "type": "string"
  12932. }
  12933. },
  12934. "required": ["messageID", "callID"],
  12935. "additionalProperties": false
  12936. },
  12937. "QuestionAnswer": {
  12938. "type": "array",
  12939. "items": {
  12940. "type": "string"
  12941. }
  12942. },
  12943. "Todo": {
  12944. "type": "object",
  12945. "properties": {
  12946. "content": {
  12947. "type": "string",
  12948. "description": "Brief description of the task"
  12949. },
  12950. "status": {
  12951. "type": "string",
  12952. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  12953. },
  12954. "priority": {
  12955. "type": "string",
  12956. "description": "Priority level of the task: high, medium, low"
  12957. }
  12958. },
  12959. "required": ["content", "status", "priority"],
  12960. "additionalProperties": false
  12961. },
  12962. "SessionStatus": {
  12963. "anyOf": [
  12964. {
  12965. "type": "object",
  12966. "properties": {
  12967. "type": {
  12968. "type": "string",
  12969. "enum": ["idle"]
  12970. }
  12971. },
  12972. "required": ["type"],
  12973. "additionalProperties": false
  12974. },
  12975. {
  12976. "type": "object",
  12977. "properties": {
  12978. "type": {
  12979. "type": "string",
  12980. "enum": ["retry"]
  12981. },
  12982. "attempt": {
  12983. "type": "integer",
  12984. "minimum": 0
  12985. },
  12986. "message": {
  12987. "type": "string"
  12988. },
  12989. "action": {
  12990. "type": "object",
  12991. "properties": {
  12992. "reason": {
  12993. "type": "string"
  12994. },
  12995. "provider": {
  12996. "type": "string"
  12997. },
  12998. "title": {
  12999. "type": "string"
  13000. },
  13001. "message": {
  13002. "type": "string"
  13003. },
  13004. "label": {
  13005. "type": "string"
  13006. },
  13007. "link": {
  13008. "type": "string"
  13009. }
  13010. },
  13011. "required": ["reason", "provider", "title", "message", "label"],
  13012. "additionalProperties": false
  13013. },
  13014. "next": {
  13015. "type": "integer",
  13016. "minimum": 0
  13017. }
  13018. },
  13019. "required": ["type", "attempt", "message", "next"],
  13020. "additionalProperties": false
  13021. },
  13022. {
  13023. "type": "object",
  13024. "properties": {
  13025. "type": {
  13026. "type": "string",
  13027. "enum": ["busy"]
  13028. }
  13029. },
  13030. "required": ["type"],
  13031. "additionalProperties": false
  13032. }
  13033. ]
  13034. },
  13035. "Pty": {
  13036. "type": "object",
  13037. "properties": {
  13038. "id": {
  13039. "type": "string",
  13040. "pattern": "^pty"
  13041. },
  13042. "title": {
  13043. "type": "string"
  13044. },
  13045. "command": {
  13046. "type": "string"
  13047. },
  13048. "args": {
  13049. "type": "array",
  13050. "items": {
  13051. "type": "string"
  13052. }
  13053. },
  13054. "cwd": {
  13055. "type": "string"
  13056. },
  13057. "status": {
  13058. "type": "string",
  13059. "enum": ["running", "exited"]
  13060. },
  13061. "pid": {
  13062. "type": "integer",
  13063. "minimum": 0
  13064. }
  13065. },
  13066. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  13067. "additionalProperties": false
  13068. },
  13069. "GlobalEvent": {
  13070. "type": "object",
  13071. "properties": {
  13072. "directory": {
  13073. "type": "string"
  13074. },
  13075. "project": {
  13076. "type": "string"
  13077. },
  13078. "workspace": {
  13079. "type": "string"
  13080. },
  13081. "payload": {
  13082. "anyOf": [
  13083. {
  13084. "type": "object",
  13085. "properties": {
  13086. "id": {
  13087. "type": "string"
  13088. },
  13089. "type": {
  13090. "type": "string",
  13091. "enum": ["models-dev.refreshed"]
  13092. },
  13093. "properties": {
  13094. "type": "object",
  13095. "properties": {}
  13096. }
  13097. },
  13098. "required": ["id", "type", "properties"],
  13099. "additionalProperties": false
  13100. },
  13101. {
  13102. "type": "object",
  13103. "properties": {
  13104. "id": {
  13105. "type": "string"
  13106. },
  13107. "type": {
  13108. "type": "string",
  13109. "enum": ["plugin.added"]
  13110. },
  13111. "properties": {
  13112. "type": "object",
  13113. "properties": {
  13114. "id": {
  13115. "type": "string"
  13116. }
  13117. },
  13118. "required": ["id"],
  13119. "additionalProperties": false
  13120. }
  13121. },
  13122. "required": ["id", "type", "properties"],
  13123. "additionalProperties": false
  13124. },
  13125. {
  13126. "type": "object",
  13127. "properties": {
  13128. "id": {
  13129. "type": "string"
  13130. },
  13131. "type": {
  13132. "type": "string",
  13133. "enum": ["catalog.model.updated"]
  13134. },
  13135. "properties": {
  13136. "type": "object",
  13137. "properties": {
  13138. "model": {
  13139. "$ref": "#/components/schemas/ModelV2Info"
  13140. }
  13141. },
  13142. "required": ["model"],
  13143. "additionalProperties": false
  13144. }
  13145. },
  13146. "required": ["id", "type", "properties"],
  13147. "additionalProperties": false
  13148. },
  13149. {
  13150. "type": "object",
  13151. "properties": {
  13152. "id": {
  13153. "type": "string"
  13154. },
  13155. "type": {
  13156. "type": "string",
  13157. "enum": ["file.edited"]
  13158. },
  13159. "properties": {
  13160. "type": "object",
  13161. "properties": {
  13162. "file": {
  13163. "type": "string"
  13164. }
  13165. },
  13166. "required": ["file"],
  13167. "additionalProperties": false
  13168. }
  13169. },
  13170. "required": ["id", "type", "properties"],
  13171. "additionalProperties": false
  13172. },
  13173. {
  13174. "type": "object",
  13175. "properties": {
  13176. "id": {
  13177. "type": "string"
  13178. },
  13179. "type": {
  13180. "type": "string",
  13181. "enum": ["session.next.agent.switched"]
  13182. },
  13183. "properties": {
  13184. "type": "object",
  13185. "properties": {
  13186. "timestamp": {
  13187. "type": "number"
  13188. },
  13189. "sessionID": {
  13190. "type": "string",
  13191. "pattern": "^ses"
  13192. },
  13193. "agent": {
  13194. "type": "string"
  13195. }
  13196. },
  13197. "required": ["timestamp", "sessionID", "agent"],
  13198. "additionalProperties": false
  13199. }
  13200. },
  13201. "required": ["id", "type", "properties"],
  13202. "additionalProperties": false
  13203. },
  13204. {
  13205. "type": "object",
  13206. "properties": {
  13207. "id": {
  13208. "type": "string"
  13209. },
  13210. "type": {
  13211. "type": "string",
  13212. "enum": ["session.next.model.switched"]
  13213. },
  13214. "properties": {
  13215. "type": "object",
  13216. "properties": {
  13217. "timestamp": {
  13218. "type": "number"
  13219. },
  13220. "sessionID": {
  13221. "type": "string",
  13222. "pattern": "^ses"
  13223. },
  13224. "model": {
  13225. "type": "object",
  13226. "properties": {
  13227. "id": {
  13228. "type": "string"
  13229. },
  13230. "providerID": {
  13231. "type": "string"
  13232. },
  13233. "variant": {
  13234. "type": "string"
  13235. }
  13236. },
  13237. "required": ["id", "providerID"],
  13238. "additionalProperties": false
  13239. }
  13240. },
  13241. "required": ["timestamp", "sessionID", "model"],
  13242. "additionalProperties": false
  13243. }
  13244. },
  13245. "required": ["id", "type", "properties"],
  13246. "additionalProperties": false
  13247. },
  13248. {
  13249. "type": "object",
  13250. "properties": {
  13251. "id": {
  13252. "type": "string"
  13253. },
  13254. "type": {
  13255. "type": "string",
  13256. "enum": ["session.next.prompted"]
  13257. },
  13258. "properties": {
  13259. "type": "object",
  13260. "properties": {
  13261. "timestamp": {
  13262. "type": "number"
  13263. },
  13264. "sessionID": {
  13265. "type": "string",
  13266. "pattern": "^ses"
  13267. },
  13268. "prompt": {
  13269. "$ref": "#/components/schemas/Prompt"
  13270. }
  13271. },
  13272. "required": ["timestamp", "sessionID", "prompt"],
  13273. "additionalProperties": false
  13274. }
  13275. },
  13276. "required": ["id", "type", "properties"],
  13277. "additionalProperties": false
  13278. },
  13279. {
  13280. "type": "object",
  13281. "properties": {
  13282. "id": {
  13283. "type": "string"
  13284. },
  13285. "type": {
  13286. "type": "string",
  13287. "enum": ["session.next.synthetic"]
  13288. },
  13289. "properties": {
  13290. "type": "object",
  13291. "properties": {
  13292. "timestamp": {
  13293. "type": "number"
  13294. },
  13295. "sessionID": {
  13296. "type": "string",
  13297. "pattern": "^ses"
  13298. },
  13299. "text": {
  13300. "type": "string"
  13301. }
  13302. },
  13303. "required": ["timestamp", "sessionID", "text"],
  13304. "additionalProperties": false
  13305. }
  13306. },
  13307. "required": ["id", "type", "properties"],
  13308. "additionalProperties": false
  13309. },
  13310. {
  13311. "type": "object",
  13312. "properties": {
  13313. "id": {
  13314. "type": "string"
  13315. },
  13316. "type": {
  13317. "type": "string",
  13318. "enum": ["session.next.shell.started"]
  13319. },
  13320. "properties": {
  13321. "type": "object",
  13322. "properties": {
  13323. "timestamp": {
  13324. "type": "number"
  13325. },
  13326. "sessionID": {
  13327. "type": "string",
  13328. "pattern": "^ses"
  13329. },
  13330. "callID": {
  13331. "type": "string"
  13332. },
  13333. "command": {
  13334. "type": "string"
  13335. }
  13336. },
  13337. "required": ["timestamp", "sessionID", "callID", "command"],
  13338. "additionalProperties": false
  13339. }
  13340. },
  13341. "required": ["id", "type", "properties"],
  13342. "additionalProperties": false
  13343. },
  13344. {
  13345. "type": "object",
  13346. "properties": {
  13347. "id": {
  13348. "type": "string"
  13349. },
  13350. "type": {
  13351. "type": "string",
  13352. "enum": ["session.next.shell.ended"]
  13353. },
  13354. "properties": {
  13355. "type": "object",
  13356. "properties": {
  13357. "timestamp": {
  13358. "type": "number"
  13359. },
  13360. "sessionID": {
  13361. "type": "string",
  13362. "pattern": "^ses"
  13363. },
  13364. "callID": {
  13365. "type": "string"
  13366. },
  13367. "output": {
  13368. "type": "string"
  13369. }
  13370. },
  13371. "required": ["timestamp", "sessionID", "callID", "output"],
  13372. "additionalProperties": false
  13373. }
  13374. },
  13375. "required": ["id", "type", "properties"],
  13376. "additionalProperties": false
  13377. },
  13378. {
  13379. "type": "object",
  13380. "properties": {
  13381. "id": {
  13382. "type": "string"
  13383. },
  13384. "type": {
  13385. "type": "string",
  13386. "enum": ["session.next.step.started"]
  13387. },
  13388. "properties": {
  13389. "type": "object",
  13390. "properties": {
  13391. "timestamp": {
  13392. "type": "number"
  13393. },
  13394. "sessionID": {
  13395. "type": "string",
  13396. "pattern": "^ses"
  13397. },
  13398. "agent": {
  13399. "type": "string"
  13400. },
  13401. "model": {
  13402. "type": "object",
  13403. "properties": {
  13404. "id": {
  13405. "type": "string"
  13406. },
  13407. "providerID": {
  13408. "type": "string"
  13409. },
  13410. "variant": {
  13411. "type": "string"
  13412. }
  13413. },
  13414. "required": ["id", "providerID"],
  13415. "additionalProperties": false
  13416. },
  13417. "snapshot": {
  13418. "type": "string"
  13419. }
  13420. },
  13421. "required": ["timestamp", "sessionID", "agent", "model"],
  13422. "additionalProperties": false
  13423. }
  13424. },
  13425. "required": ["id", "type", "properties"],
  13426. "additionalProperties": false
  13427. },
  13428. {
  13429. "type": "object",
  13430. "properties": {
  13431. "id": {
  13432. "type": "string"
  13433. },
  13434. "type": {
  13435. "type": "string",
  13436. "enum": ["session.next.step.ended"]
  13437. },
  13438. "properties": {
  13439. "type": "object",
  13440. "properties": {
  13441. "timestamp": {
  13442. "type": "number"
  13443. },
  13444. "sessionID": {
  13445. "type": "string",
  13446. "pattern": "^ses"
  13447. },
  13448. "finish": {
  13449. "type": "string"
  13450. },
  13451. "cost": {
  13452. "type": "number"
  13453. },
  13454. "tokens": {
  13455. "type": "object",
  13456. "properties": {
  13457. "input": {
  13458. "type": "number"
  13459. },
  13460. "output": {
  13461. "type": "number"
  13462. },
  13463. "reasoning": {
  13464. "type": "number"
  13465. },
  13466. "cache": {
  13467. "type": "object",
  13468. "properties": {
  13469. "read": {
  13470. "type": "number"
  13471. },
  13472. "write": {
  13473. "type": "number"
  13474. }
  13475. },
  13476. "required": ["read", "write"],
  13477. "additionalProperties": false
  13478. }
  13479. },
  13480. "required": ["input", "output", "reasoning", "cache"],
  13481. "additionalProperties": false
  13482. },
  13483. "snapshot": {
  13484. "type": "string"
  13485. }
  13486. },
  13487. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  13488. "additionalProperties": false
  13489. }
  13490. },
  13491. "required": ["id", "type", "properties"],
  13492. "additionalProperties": false
  13493. },
  13494. {
  13495. "type": "object",
  13496. "properties": {
  13497. "id": {
  13498. "type": "string"
  13499. },
  13500. "type": {
  13501. "type": "string",
  13502. "enum": ["session.next.step.failed"]
  13503. },
  13504. "properties": {
  13505. "type": "object",
  13506. "properties": {
  13507. "timestamp": {
  13508. "type": "number"
  13509. },
  13510. "sessionID": {
  13511. "type": "string",
  13512. "pattern": "^ses"
  13513. },
  13514. "error": {
  13515. "$ref": "#/components/schemas/SessionErrorUnknown"
  13516. }
  13517. },
  13518. "required": ["timestamp", "sessionID", "error"],
  13519. "additionalProperties": false
  13520. }
  13521. },
  13522. "required": ["id", "type", "properties"],
  13523. "additionalProperties": false
  13524. },
  13525. {
  13526. "type": "object",
  13527. "properties": {
  13528. "id": {
  13529. "type": "string"
  13530. },
  13531. "type": {
  13532. "type": "string",
  13533. "enum": ["session.next.text.started"]
  13534. },
  13535. "properties": {
  13536. "type": "object",
  13537. "properties": {
  13538. "timestamp": {
  13539. "type": "number"
  13540. },
  13541. "sessionID": {
  13542. "type": "string",
  13543. "pattern": "^ses"
  13544. }
  13545. },
  13546. "required": ["timestamp", "sessionID"],
  13547. "additionalProperties": false
  13548. }
  13549. },
  13550. "required": ["id", "type", "properties"],
  13551. "additionalProperties": false
  13552. },
  13553. {
  13554. "type": "object",
  13555. "properties": {
  13556. "id": {
  13557. "type": "string"
  13558. },
  13559. "type": {
  13560. "type": "string",
  13561. "enum": ["session.next.text.delta"]
  13562. },
  13563. "properties": {
  13564. "type": "object",
  13565. "properties": {
  13566. "timestamp": {
  13567. "type": "number"
  13568. },
  13569. "sessionID": {
  13570. "type": "string",
  13571. "pattern": "^ses"
  13572. },
  13573. "delta": {
  13574. "type": "string"
  13575. }
  13576. },
  13577. "required": ["timestamp", "sessionID", "delta"],
  13578. "additionalProperties": false
  13579. }
  13580. },
  13581. "required": ["id", "type", "properties"],
  13582. "additionalProperties": false
  13583. },
  13584. {
  13585. "type": "object",
  13586. "properties": {
  13587. "id": {
  13588. "type": "string"
  13589. },
  13590. "type": {
  13591. "type": "string",
  13592. "enum": ["session.next.text.ended"]
  13593. },
  13594. "properties": {
  13595. "type": "object",
  13596. "properties": {
  13597. "timestamp": {
  13598. "type": "number"
  13599. },
  13600. "sessionID": {
  13601. "type": "string",
  13602. "pattern": "^ses"
  13603. },
  13604. "text": {
  13605. "type": "string"
  13606. }
  13607. },
  13608. "required": ["timestamp", "sessionID", "text"],
  13609. "additionalProperties": false
  13610. }
  13611. },
  13612. "required": ["id", "type", "properties"],
  13613. "additionalProperties": false
  13614. },
  13615. {
  13616. "type": "object",
  13617. "properties": {
  13618. "id": {
  13619. "type": "string"
  13620. },
  13621. "type": {
  13622. "type": "string",
  13623. "enum": ["session.next.reasoning.started"]
  13624. },
  13625. "properties": {
  13626. "type": "object",
  13627. "properties": {
  13628. "timestamp": {
  13629. "type": "number"
  13630. },
  13631. "sessionID": {
  13632. "type": "string",
  13633. "pattern": "^ses"
  13634. },
  13635. "reasoningID": {
  13636. "type": "string"
  13637. }
  13638. },
  13639. "required": ["timestamp", "sessionID", "reasoningID"],
  13640. "additionalProperties": false
  13641. }
  13642. },
  13643. "required": ["id", "type", "properties"],
  13644. "additionalProperties": false
  13645. },
  13646. {
  13647. "type": "object",
  13648. "properties": {
  13649. "id": {
  13650. "type": "string"
  13651. },
  13652. "type": {
  13653. "type": "string",
  13654. "enum": ["session.next.reasoning.delta"]
  13655. },
  13656. "properties": {
  13657. "type": "object",
  13658. "properties": {
  13659. "timestamp": {
  13660. "type": "number"
  13661. },
  13662. "sessionID": {
  13663. "type": "string",
  13664. "pattern": "^ses"
  13665. },
  13666. "reasoningID": {
  13667. "type": "string"
  13668. },
  13669. "delta": {
  13670. "type": "string"
  13671. }
  13672. },
  13673. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  13674. "additionalProperties": false
  13675. }
  13676. },
  13677. "required": ["id", "type", "properties"],
  13678. "additionalProperties": false
  13679. },
  13680. {
  13681. "type": "object",
  13682. "properties": {
  13683. "id": {
  13684. "type": "string"
  13685. },
  13686. "type": {
  13687. "type": "string",
  13688. "enum": ["session.next.reasoning.ended"]
  13689. },
  13690. "properties": {
  13691. "type": "object",
  13692. "properties": {
  13693. "timestamp": {
  13694. "type": "number"
  13695. },
  13696. "sessionID": {
  13697. "type": "string",
  13698. "pattern": "^ses"
  13699. },
  13700. "reasoningID": {
  13701. "type": "string"
  13702. },
  13703. "text": {
  13704. "type": "string"
  13705. }
  13706. },
  13707. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  13708. "additionalProperties": false
  13709. }
  13710. },
  13711. "required": ["id", "type", "properties"],
  13712. "additionalProperties": false
  13713. },
  13714. {
  13715. "type": "object",
  13716. "properties": {
  13717. "id": {
  13718. "type": "string"
  13719. },
  13720. "type": {
  13721. "type": "string",
  13722. "enum": ["session.next.tool.input.started"]
  13723. },
  13724. "properties": {
  13725. "type": "object",
  13726. "properties": {
  13727. "timestamp": {
  13728. "type": "number"
  13729. },
  13730. "sessionID": {
  13731. "type": "string",
  13732. "pattern": "^ses"
  13733. },
  13734. "callID": {
  13735. "type": "string"
  13736. },
  13737. "name": {
  13738. "type": "string"
  13739. }
  13740. },
  13741. "required": ["timestamp", "sessionID", "callID", "name"],
  13742. "additionalProperties": false
  13743. }
  13744. },
  13745. "required": ["id", "type", "properties"],
  13746. "additionalProperties": false
  13747. },
  13748. {
  13749. "type": "object",
  13750. "properties": {
  13751. "id": {
  13752. "type": "string"
  13753. },
  13754. "type": {
  13755. "type": "string",
  13756. "enum": ["session.next.tool.input.delta"]
  13757. },
  13758. "properties": {
  13759. "type": "object",
  13760. "properties": {
  13761. "timestamp": {
  13762. "type": "number"
  13763. },
  13764. "sessionID": {
  13765. "type": "string",
  13766. "pattern": "^ses"
  13767. },
  13768. "callID": {
  13769. "type": "string"
  13770. },
  13771. "delta": {
  13772. "type": "string"
  13773. }
  13774. },
  13775. "required": ["timestamp", "sessionID", "callID", "delta"],
  13776. "additionalProperties": false
  13777. }
  13778. },
  13779. "required": ["id", "type", "properties"],
  13780. "additionalProperties": false
  13781. },
  13782. {
  13783. "type": "object",
  13784. "properties": {
  13785. "id": {
  13786. "type": "string"
  13787. },
  13788. "type": {
  13789. "type": "string",
  13790. "enum": ["session.next.tool.input.ended"]
  13791. },
  13792. "properties": {
  13793. "type": "object",
  13794. "properties": {
  13795. "timestamp": {
  13796. "type": "number"
  13797. },
  13798. "sessionID": {
  13799. "type": "string",
  13800. "pattern": "^ses"
  13801. },
  13802. "callID": {
  13803. "type": "string"
  13804. },
  13805. "text": {
  13806. "type": "string"
  13807. }
  13808. },
  13809. "required": ["timestamp", "sessionID", "callID", "text"],
  13810. "additionalProperties": false
  13811. }
  13812. },
  13813. "required": ["id", "type", "properties"],
  13814. "additionalProperties": false
  13815. },
  13816. {
  13817. "type": "object",
  13818. "properties": {
  13819. "id": {
  13820. "type": "string"
  13821. },
  13822. "type": {
  13823. "type": "string",
  13824. "enum": ["session.next.tool.called"]
  13825. },
  13826. "properties": {
  13827. "type": "object",
  13828. "properties": {
  13829. "timestamp": {
  13830. "type": "number"
  13831. },
  13832. "sessionID": {
  13833. "type": "string",
  13834. "pattern": "^ses"
  13835. },
  13836. "callID": {
  13837. "type": "string"
  13838. },
  13839. "tool": {
  13840. "type": "string"
  13841. },
  13842. "input": {
  13843. "type": "object"
  13844. },
  13845. "provider": {
  13846. "type": "object",
  13847. "properties": {
  13848. "executed": {
  13849. "type": "boolean"
  13850. },
  13851. "metadata": {
  13852. "type": "object"
  13853. }
  13854. },
  13855. "required": ["executed"],
  13856. "additionalProperties": false
  13857. }
  13858. },
  13859. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  13860. "additionalProperties": false
  13861. }
  13862. },
  13863. "required": ["id", "type", "properties"],
  13864. "additionalProperties": false
  13865. },
  13866. {
  13867. "type": "object",
  13868. "properties": {
  13869. "id": {
  13870. "type": "string"
  13871. },
  13872. "type": {
  13873. "type": "string",
  13874. "enum": ["session.next.tool.progress"]
  13875. },
  13876. "properties": {
  13877. "type": "object",
  13878. "properties": {
  13879. "timestamp": {
  13880. "type": "number"
  13881. },
  13882. "sessionID": {
  13883. "type": "string",
  13884. "pattern": "^ses"
  13885. },
  13886. "callID": {
  13887. "type": "string"
  13888. },
  13889. "structured": {
  13890. "type": "object"
  13891. },
  13892. "content": {
  13893. "type": "array",
  13894. "items": {
  13895. "anyOf": [
  13896. {
  13897. "$ref": "#/components/schemas/ToolTextContent"
  13898. },
  13899. {
  13900. "$ref": "#/components/schemas/ToolFileContent"
  13901. }
  13902. ]
  13903. }
  13904. }
  13905. },
  13906. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  13907. "additionalProperties": false
  13908. }
  13909. },
  13910. "required": ["id", "type", "properties"],
  13911. "additionalProperties": false
  13912. },
  13913. {
  13914. "type": "object",
  13915. "properties": {
  13916. "id": {
  13917. "type": "string"
  13918. },
  13919. "type": {
  13920. "type": "string",
  13921. "enum": ["session.next.tool.success"]
  13922. },
  13923. "properties": {
  13924. "type": "object",
  13925. "properties": {
  13926. "timestamp": {
  13927. "type": "number"
  13928. },
  13929. "sessionID": {
  13930. "type": "string",
  13931. "pattern": "^ses"
  13932. },
  13933. "callID": {
  13934. "type": "string"
  13935. },
  13936. "structured": {
  13937. "type": "object"
  13938. },
  13939. "content": {
  13940. "type": "array",
  13941. "items": {
  13942. "anyOf": [
  13943. {
  13944. "$ref": "#/components/schemas/ToolTextContent"
  13945. },
  13946. {
  13947. "$ref": "#/components/schemas/ToolFileContent"
  13948. }
  13949. ]
  13950. }
  13951. },
  13952. "provider": {
  13953. "type": "object",
  13954. "properties": {
  13955. "executed": {
  13956. "type": "boolean"
  13957. },
  13958. "metadata": {
  13959. "type": "object"
  13960. }
  13961. },
  13962. "required": ["executed"],
  13963. "additionalProperties": false
  13964. }
  13965. },
  13966. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  13967. "additionalProperties": false
  13968. }
  13969. },
  13970. "required": ["id", "type", "properties"],
  13971. "additionalProperties": false
  13972. },
  13973. {
  13974. "type": "object",
  13975. "properties": {
  13976. "id": {
  13977. "type": "string"
  13978. },
  13979. "type": {
  13980. "type": "string",
  13981. "enum": ["session.next.tool.failed"]
  13982. },
  13983. "properties": {
  13984. "type": "object",
  13985. "properties": {
  13986. "timestamp": {
  13987. "type": "number"
  13988. },
  13989. "sessionID": {
  13990. "type": "string",
  13991. "pattern": "^ses"
  13992. },
  13993. "callID": {
  13994. "type": "string"
  13995. },
  13996. "error": {
  13997. "$ref": "#/components/schemas/SessionErrorUnknown"
  13998. },
  13999. "provider": {
  14000. "type": "object",
  14001. "properties": {
  14002. "executed": {
  14003. "type": "boolean"
  14004. },
  14005. "metadata": {
  14006. "type": "object"
  14007. }
  14008. },
  14009. "required": ["executed"],
  14010. "additionalProperties": false
  14011. }
  14012. },
  14013. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  14014. "additionalProperties": false
  14015. }
  14016. },
  14017. "required": ["id", "type", "properties"],
  14018. "additionalProperties": false
  14019. },
  14020. {
  14021. "type": "object",
  14022. "properties": {
  14023. "id": {
  14024. "type": "string"
  14025. },
  14026. "type": {
  14027. "type": "string",
  14028. "enum": ["session.next.retried"]
  14029. },
  14030. "properties": {
  14031. "type": "object",
  14032. "properties": {
  14033. "timestamp": {
  14034. "type": "number"
  14035. },
  14036. "sessionID": {
  14037. "type": "string",
  14038. "pattern": "^ses"
  14039. },
  14040. "attempt": {
  14041. "type": "number"
  14042. },
  14043. "error": {
  14044. "$ref": "#/components/schemas/SessionNextRetry_error"
  14045. }
  14046. },
  14047. "required": ["timestamp", "sessionID", "attempt", "error"],
  14048. "additionalProperties": false
  14049. }
  14050. },
  14051. "required": ["id", "type", "properties"],
  14052. "additionalProperties": false
  14053. },
  14054. {
  14055. "type": "object",
  14056. "properties": {
  14057. "id": {
  14058. "type": "string"
  14059. },
  14060. "type": {
  14061. "type": "string",
  14062. "enum": ["session.next.compaction.started"]
  14063. },
  14064. "properties": {
  14065. "type": "object",
  14066. "properties": {
  14067. "timestamp": {
  14068. "type": "number"
  14069. },
  14070. "sessionID": {
  14071. "type": "string",
  14072. "pattern": "^ses"
  14073. },
  14074. "reason": {
  14075. "type": "string",
  14076. "enum": ["auto", "manual"]
  14077. }
  14078. },
  14079. "required": ["timestamp", "sessionID", "reason"],
  14080. "additionalProperties": false
  14081. }
  14082. },
  14083. "required": ["id", "type", "properties"],
  14084. "additionalProperties": false
  14085. },
  14086. {
  14087. "type": "object",
  14088. "properties": {
  14089. "id": {
  14090. "type": "string"
  14091. },
  14092. "type": {
  14093. "type": "string",
  14094. "enum": ["session.next.compaction.delta"]
  14095. },
  14096. "properties": {
  14097. "type": "object",
  14098. "properties": {
  14099. "timestamp": {
  14100. "type": "number"
  14101. },
  14102. "sessionID": {
  14103. "type": "string",
  14104. "pattern": "^ses"
  14105. },
  14106. "text": {
  14107. "type": "string"
  14108. }
  14109. },
  14110. "required": ["timestamp", "sessionID", "text"],
  14111. "additionalProperties": false
  14112. }
  14113. },
  14114. "required": ["id", "type", "properties"],
  14115. "additionalProperties": false
  14116. },
  14117. {
  14118. "type": "object",
  14119. "properties": {
  14120. "id": {
  14121. "type": "string"
  14122. },
  14123. "type": {
  14124. "type": "string",
  14125. "enum": ["session.next.compaction.ended"]
  14126. },
  14127. "properties": {
  14128. "type": "object",
  14129. "properties": {
  14130. "timestamp": {
  14131. "type": "number"
  14132. },
  14133. "sessionID": {
  14134. "type": "string",
  14135. "pattern": "^ses"
  14136. },
  14137. "text": {
  14138. "type": "string"
  14139. },
  14140. "include": {
  14141. "type": "string"
  14142. }
  14143. },
  14144. "required": ["timestamp", "sessionID", "text"],
  14145. "additionalProperties": false
  14146. }
  14147. },
  14148. "required": ["id", "type", "properties"],
  14149. "additionalProperties": false
  14150. },
  14151. {
  14152. "type": "object",
  14153. "properties": {
  14154. "id": {
  14155. "type": "string"
  14156. },
  14157. "type": {
  14158. "type": "string",
  14159. "enum": ["file.watcher.updated"]
  14160. },
  14161. "properties": {
  14162. "type": "object",
  14163. "properties": {
  14164. "file": {
  14165. "type": "string"
  14166. },
  14167. "event": {
  14168. "type": "string",
  14169. "enum": ["add", "change", "unlink"]
  14170. }
  14171. },
  14172. "required": ["file", "event"],
  14173. "additionalProperties": false
  14174. }
  14175. },
  14176. "required": ["id", "type", "properties"],
  14177. "additionalProperties": false
  14178. },
  14179. {
  14180. "type": "object",
  14181. "properties": {
  14182. "id": {
  14183. "type": "string"
  14184. },
  14185. "type": {
  14186. "type": "string",
  14187. "enum": ["session.created"]
  14188. },
  14189. "properties": {
  14190. "type": "object",
  14191. "properties": {
  14192. "sessionID": {
  14193. "type": "string",
  14194. "pattern": "^ses"
  14195. },
  14196. "info": {
  14197. "$ref": "#/components/schemas/Session"
  14198. }
  14199. },
  14200. "required": ["sessionID", "info"],
  14201. "additionalProperties": false
  14202. }
  14203. },
  14204. "required": ["id", "type", "properties"],
  14205. "additionalProperties": false
  14206. },
  14207. {
  14208. "type": "object",
  14209. "properties": {
  14210. "id": {
  14211. "type": "string"
  14212. },
  14213. "type": {
  14214. "type": "string",
  14215. "enum": ["session.updated"]
  14216. },
  14217. "properties": {
  14218. "type": "object",
  14219. "properties": {
  14220. "sessionID": {
  14221. "type": "string",
  14222. "pattern": "^ses"
  14223. },
  14224. "info": {
  14225. "$ref": "#/components/schemas/Session"
  14226. }
  14227. },
  14228. "required": ["sessionID", "info"],
  14229. "additionalProperties": false
  14230. }
  14231. },
  14232. "required": ["id", "type", "properties"],
  14233. "additionalProperties": false
  14234. },
  14235. {
  14236. "type": "object",
  14237. "properties": {
  14238. "id": {
  14239. "type": "string"
  14240. },
  14241. "type": {
  14242. "type": "string",
  14243. "enum": ["session.deleted"]
  14244. },
  14245. "properties": {
  14246. "type": "object",
  14247. "properties": {
  14248. "sessionID": {
  14249. "type": "string",
  14250. "pattern": "^ses"
  14251. },
  14252. "info": {
  14253. "$ref": "#/components/schemas/Session"
  14254. }
  14255. },
  14256. "required": ["sessionID", "info"],
  14257. "additionalProperties": false
  14258. }
  14259. },
  14260. "required": ["id", "type", "properties"],
  14261. "additionalProperties": false
  14262. },
  14263. {
  14264. "type": "object",
  14265. "properties": {
  14266. "id": {
  14267. "type": "string"
  14268. },
  14269. "type": {
  14270. "type": "string",
  14271. "enum": ["message.updated"]
  14272. },
  14273. "properties": {
  14274. "type": "object",
  14275. "properties": {
  14276. "sessionID": {
  14277. "type": "string",
  14278. "pattern": "^ses"
  14279. },
  14280. "info": {
  14281. "$ref": "#/components/schemas/Message"
  14282. }
  14283. },
  14284. "required": ["sessionID", "info"],
  14285. "additionalProperties": false
  14286. }
  14287. },
  14288. "required": ["id", "type", "properties"],
  14289. "additionalProperties": false
  14290. },
  14291. {
  14292. "type": "object",
  14293. "properties": {
  14294. "id": {
  14295. "type": "string"
  14296. },
  14297. "type": {
  14298. "type": "string",
  14299. "enum": ["message.removed"]
  14300. },
  14301. "properties": {
  14302. "type": "object",
  14303. "properties": {
  14304. "sessionID": {
  14305. "type": "string",
  14306. "pattern": "^ses"
  14307. },
  14308. "messageID": {
  14309. "type": "string",
  14310. "pattern": "^msg"
  14311. }
  14312. },
  14313. "required": ["sessionID", "messageID"],
  14314. "additionalProperties": false
  14315. }
  14316. },
  14317. "required": ["id", "type", "properties"],
  14318. "additionalProperties": false
  14319. },
  14320. {
  14321. "type": "object",
  14322. "properties": {
  14323. "id": {
  14324. "type": "string"
  14325. },
  14326. "type": {
  14327. "type": "string",
  14328. "enum": ["message.part.updated"]
  14329. },
  14330. "properties": {
  14331. "type": "object",
  14332. "properties": {
  14333. "sessionID": {
  14334. "type": "string",
  14335. "pattern": "^ses"
  14336. },
  14337. "part": {
  14338. "$ref": "#/components/schemas/Part"
  14339. },
  14340. "time": {
  14341. "type": "number"
  14342. }
  14343. },
  14344. "required": ["sessionID", "part", "time"],
  14345. "additionalProperties": false
  14346. }
  14347. },
  14348. "required": ["id", "type", "properties"],
  14349. "additionalProperties": false
  14350. },
  14351. {
  14352. "type": "object",
  14353. "properties": {
  14354. "id": {
  14355. "type": "string"
  14356. },
  14357. "type": {
  14358. "type": "string",
  14359. "enum": ["message.part.removed"]
  14360. },
  14361. "properties": {
  14362. "type": "object",
  14363. "properties": {
  14364. "sessionID": {
  14365. "type": "string",
  14366. "pattern": "^ses"
  14367. },
  14368. "messageID": {
  14369. "type": "string",
  14370. "pattern": "^msg"
  14371. },
  14372. "partID": {
  14373. "type": "string",
  14374. "pattern": "^prt"
  14375. }
  14376. },
  14377. "required": ["sessionID", "messageID", "partID"],
  14378. "additionalProperties": false
  14379. }
  14380. },
  14381. "required": ["id", "type", "properties"],
  14382. "additionalProperties": false
  14383. },
  14384. {
  14385. "type": "object",
  14386. "properties": {
  14387. "id": {
  14388. "type": "string"
  14389. },
  14390. "type": {
  14391. "type": "string",
  14392. "enum": ["message.part.delta"]
  14393. },
  14394. "properties": {
  14395. "type": "object",
  14396. "properties": {
  14397. "sessionID": {
  14398. "type": "string",
  14399. "pattern": "^ses"
  14400. },
  14401. "messageID": {
  14402. "type": "string",
  14403. "pattern": "^msg"
  14404. },
  14405. "partID": {
  14406. "type": "string",
  14407. "pattern": "^prt"
  14408. },
  14409. "field": {
  14410. "type": "string"
  14411. },
  14412. "delta": {
  14413. "type": "string"
  14414. }
  14415. },
  14416. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  14417. "additionalProperties": false
  14418. }
  14419. },
  14420. "required": ["id", "type", "properties"],
  14421. "additionalProperties": false
  14422. },
  14423. {
  14424. "type": "object",
  14425. "properties": {
  14426. "id": {
  14427. "type": "string"
  14428. },
  14429. "type": {
  14430. "type": "string",
  14431. "enum": ["session.diff"]
  14432. },
  14433. "properties": {
  14434. "type": "object",
  14435. "properties": {
  14436. "sessionID": {
  14437. "type": "string",
  14438. "pattern": "^ses"
  14439. },
  14440. "diff": {
  14441. "type": "array",
  14442. "items": {
  14443. "$ref": "#/components/schemas/SnapshotFileDiff"
  14444. }
  14445. }
  14446. },
  14447. "required": ["sessionID", "diff"],
  14448. "additionalProperties": false
  14449. }
  14450. },
  14451. "required": ["id", "type", "properties"],
  14452. "additionalProperties": false
  14453. },
  14454. {
  14455. "type": "object",
  14456. "properties": {
  14457. "id": {
  14458. "type": "string"
  14459. },
  14460. "type": {
  14461. "type": "string",
  14462. "enum": ["session.error"]
  14463. },
  14464. "properties": {
  14465. "type": "object",
  14466. "properties": {
  14467. "sessionID": {
  14468. "type": "string",
  14469. "pattern": "^ses"
  14470. },
  14471. "error": {
  14472. "anyOf": [
  14473. {
  14474. "$ref": "#/components/schemas/ProviderAuthError"
  14475. },
  14476. {
  14477. "$ref": "#/components/schemas/UnknownError"
  14478. },
  14479. {
  14480. "$ref": "#/components/schemas/MessageOutputLengthError"
  14481. },
  14482. {
  14483. "$ref": "#/components/schemas/MessageAbortedError"
  14484. },
  14485. {
  14486. "$ref": "#/components/schemas/StructuredOutputError"
  14487. },
  14488. {
  14489. "$ref": "#/components/schemas/ContextOverflowError"
  14490. },
  14491. {
  14492. "$ref": "#/components/schemas/APIError"
  14493. }
  14494. ]
  14495. }
  14496. },
  14497. "additionalProperties": false
  14498. }
  14499. },
  14500. "required": ["id", "type", "properties"],
  14501. "additionalProperties": false
  14502. },
  14503. {
  14504. "type": "object",
  14505. "properties": {
  14506. "id": {
  14507. "type": "string"
  14508. },
  14509. "type": {
  14510. "type": "string",
  14511. "enum": ["permission.asked"]
  14512. },
  14513. "properties": {
  14514. "type": "object",
  14515. "properties": {
  14516. "id": {
  14517. "type": "string",
  14518. "pattern": "^per"
  14519. },
  14520. "sessionID": {
  14521. "type": "string",
  14522. "pattern": "^ses"
  14523. },
  14524. "permission": {
  14525. "type": "string"
  14526. },
  14527. "patterns": {
  14528. "type": "array",
  14529. "items": {
  14530. "type": "string"
  14531. }
  14532. },
  14533. "metadata": {
  14534. "type": "object"
  14535. },
  14536. "always": {
  14537. "type": "array",
  14538. "items": {
  14539. "type": "string"
  14540. }
  14541. },
  14542. "tool": {
  14543. "type": "object",
  14544. "properties": {
  14545. "messageID": {
  14546. "type": "string"
  14547. },
  14548. "callID": {
  14549. "type": "string"
  14550. }
  14551. },
  14552. "required": ["messageID", "callID"],
  14553. "additionalProperties": false
  14554. }
  14555. },
  14556. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  14557. "additionalProperties": false
  14558. }
  14559. },
  14560. "required": ["id", "type", "properties"],
  14561. "additionalProperties": false
  14562. },
  14563. {
  14564. "type": "object",
  14565. "properties": {
  14566. "id": {
  14567. "type": "string"
  14568. },
  14569. "type": {
  14570. "type": "string",
  14571. "enum": ["permission.replied"]
  14572. },
  14573. "properties": {
  14574. "type": "object",
  14575. "properties": {
  14576. "sessionID": {
  14577. "type": "string",
  14578. "pattern": "^ses"
  14579. },
  14580. "requestID": {
  14581. "type": "string",
  14582. "pattern": "^per"
  14583. },
  14584. "reply": {
  14585. "type": "string",
  14586. "enum": ["once", "always", "reject"]
  14587. }
  14588. },
  14589. "required": ["sessionID", "requestID", "reply"],
  14590. "additionalProperties": false
  14591. }
  14592. },
  14593. "required": ["id", "type", "properties"],
  14594. "additionalProperties": false
  14595. },
  14596. {
  14597. "type": "object",
  14598. "properties": {
  14599. "id": {
  14600. "type": "string"
  14601. },
  14602. "type": {
  14603. "type": "string",
  14604. "enum": ["question.asked"]
  14605. },
  14606. "properties": {
  14607. "type": "object",
  14608. "properties": {
  14609. "id": {
  14610. "type": "string",
  14611. "pattern": "^que"
  14612. },
  14613. "sessionID": {
  14614. "type": "string",
  14615. "pattern": "^ses"
  14616. },
  14617. "questions": {
  14618. "type": "array",
  14619. "items": {
  14620. "$ref": "#/components/schemas/QuestionInfo"
  14621. },
  14622. "description": "Questions to ask"
  14623. },
  14624. "tool": {
  14625. "$ref": "#/components/schemas/QuestionTool"
  14626. }
  14627. },
  14628. "required": ["id", "sessionID", "questions"],
  14629. "additionalProperties": false
  14630. }
  14631. },
  14632. "required": ["id", "type", "properties"],
  14633. "additionalProperties": false
  14634. },
  14635. {
  14636. "type": "object",
  14637. "properties": {
  14638. "id": {
  14639. "type": "string"
  14640. },
  14641. "type": {
  14642. "type": "string",
  14643. "enum": ["question.replied"]
  14644. },
  14645. "properties": {
  14646. "type": "object",
  14647. "properties": {
  14648. "sessionID": {
  14649. "type": "string",
  14650. "pattern": "^ses"
  14651. },
  14652. "requestID": {
  14653. "type": "string",
  14654. "pattern": "^que"
  14655. },
  14656. "answers": {
  14657. "type": "array",
  14658. "items": {
  14659. "$ref": "#/components/schemas/QuestionAnswer"
  14660. }
  14661. }
  14662. },
  14663. "required": ["sessionID", "requestID", "answers"],
  14664. "additionalProperties": false
  14665. }
  14666. },
  14667. "required": ["id", "type", "properties"],
  14668. "additionalProperties": false
  14669. },
  14670. {
  14671. "type": "object",
  14672. "properties": {
  14673. "id": {
  14674. "type": "string"
  14675. },
  14676. "type": {
  14677. "type": "string",
  14678. "enum": ["question.rejected"]
  14679. },
  14680. "properties": {
  14681. "type": "object",
  14682. "properties": {
  14683. "sessionID": {
  14684. "type": "string",
  14685. "pattern": "^ses"
  14686. },
  14687. "requestID": {
  14688. "type": "string",
  14689. "pattern": "^que"
  14690. }
  14691. },
  14692. "required": ["sessionID", "requestID"],
  14693. "additionalProperties": false
  14694. }
  14695. },
  14696. "required": ["id", "type", "properties"],
  14697. "additionalProperties": false
  14698. },
  14699. {
  14700. "type": "object",
  14701. "properties": {
  14702. "id": {
  14703. "type": "string"
  14704. },
  14705. "type": {
  14706. "type": "string",
  14707. "enum": ["todo.updated"]
  14708. },
  14709. "properties": {
  14710. "type": "object",
  14711. "properties": {
  14712. "sessionID": {
  14713. "type": "string",
  14714. "pattern": "^ses"
  14715. },
  14716. "todos": {
  14717. "type": "array",
  14718. "items": {
  14719. "$ref": "#/components/schemas/Todo"
  14720. }
  14721. }
  14722. },
  14723. "required": ["sessionID", "todos"],
  14724. "additionalProperties": false
  14725. }
  14726. },
  14727. "required": ["id", "type", "properties"],
  14728. "additionalProperties": false
  14729. },
  14730. {
  14731. "type": "object",
  14732. "properties": {
  14733. "id": {
  14734. "type": "string"
  14735. },
  14736. "type": {
  14737. "type": "string",
  14738. "enum": ["session.status"]
  14739. },
  14740. "properties": {
  14741. "type": "object",
  14742. "properties": {
  14743. "sessionID": {
  14744. "type": "string",
  14745. "pattern": "^ses"
  14746. },
  14747. "status": {
  14748. "$ref": "#/components/schemas/SessionStatus"
  14749. }
  14750. },
  14751. "required": ["sessionID", "status"],
  14752. "additionalProperties": false
  14753. }
  14754. },
  14755. "required": ["id", "type", "properties"],
  14756. "additionalProperties": false
  14757. },
  14758. {
  14759. "type": "object",
  14760. "properties": {
  14761. "id": {
  14762. "type": "string"
  14763. },
  14764. "type": {
  14765. "type": "string",
  14766. "enum": ["session.idle"]
  14767. },
  14768. "properties": {
  14769. "type": "object",
  14770. "properties": {
  14771. "sessionID": {
  14772. "type": "string",
  14773. "pattern": "^ses"
  14774. }
  14775. },
  14776. "required": ["sessionID"],
  14777. "additionalProperties": false
  14778. }
  14779. },
  14780. "required": ["id", "type", "properties"],
  14781. "additionalProperties": false
  14782. },
  14783. {
  14784. "type": "object",
  14785. "properties": {
  14786. "id": {
  14787. "type": "string"
  14788. },
  14789. "type": {
  14790. "type": "string",
  14791. "enum": ["session.compacted"]
  14792. },
  14793. "properties": {
  14794. "type": "object",
  14795. "properties": {
  14796. "sessionID": {
  14797. "type": "string",
  14798. "pattern": "^ses"
  14799. }
  14800. },
  14801. "required": ["sessionID"],
  14802. "additionalProperties": false
  14803. }
  14804. },
  14805. "required": ["id", "type", "properties"],
  14806. "additionalProperties": false
  14807. },
  14808. {
  14809. "type": "object",
  14810. "properties": {
  14811. "id": {
  14812. "type": "string"
  14813. },
  14814. "type": {
  14815. "type": "string",
  14816. "enum": ["lsp.updated"]
  14817. },
  14818. "properties": {
  14819. "type": "object",
  14820. "properties": {}
  14821. }
  14822. },
  14823. "required": ["id", "type", "properties"],
  14824. "additionalProperties": false
  14825. },
  14826. {
  14827. "type": "object",
  14828. "properties": {
  14829. "id": {
  14830. "type": "string"
  14831. },
  14832. "type": {
  14833. "type": "string",
  14834. "enum": ["tui.prompt.append"]
  14835. },
  14836. "properties": {
  14837. "type": "object",
  14838. "properties": {
  14839. "text": {
  14840. "type": "string"
  14841. }
  14842. },
  14843. "required": ["text"],
  14844. "additionalProperties": false
  14845. }
  14846. },
  14847. "required": ["id", "type", "properties"],
  14848. "additionalProperties": false
  14849. },
  14850. {
  14851. "type": "object",
  14852. "properties": {
  14853. "id": {
  14854. "type": "string"
  14855. },
  14856. "type": {
  14857. "type": "string",
  14858. "enum": ["tui.command.execute"]
  14859. },
  14860. "properties": {
  14861. "type": "object",
  14862. "properties": {
  14863. "command": {
  14864. "anyOf": [
  14865. {
  14866. "type": "string",
  14867. "enum": [
  14868. "session.list",
  14869. "session.new",
  14870. "session.share",
  14871. "session.interrupt",
  14872. "session.compact",
  14873. "session.page.up",
  14874. "session.page.down",
  14875. "session.line.up",
  14876. "session.line.down",
  14877. "session.half.page.up",
  14878. "session.half.page.down",
  14879. "session.first",
  14880. "session.last",
  14881. "prompt.clear",
  14882. "prompt.submit",
  14883. "agent.cycle"
  14884. ]
  14885. },
  14886. {
  14887. "type": "string"
  14888. }
  14889. ]
  14890. }
  14891. },
  14892. "required": ["command"],
  14893. "additionalProperties": false
  14894. }
  14895. },
  14896. "required": ["id", "type", "properties"],
  14897. "additionalProperties": false
  14898. },
  14899. {
  14900. "type": "object",
  14901. "properties": {
  14902. "id": {
  14903. "type": "string"
  14904. },
  14905. "type": {
  14906. "type": "string",
  14907. "enum": ["tui.toast.show"]
  14908. },
  14909. "properties": {
  14910. "type": "object",
  14911. "properties": {
  14912. "title": {
  14913. "type": "string"
  14914. },
  14915. "message": {
  14916. "type": "string"
  14917. },
  14918. "variant": {
  14919. "type": "string",
  14920. "enum": ["info", "success", "warning", "error"]
  14921. },
  14922. "duration": {
  14923. "type": "integer",
  14924. "exclusiveMinimum": 0
  14925. }
  14926. },
  14927. "required": ["message", "variant"],
  14928. "additionalProperties": false
  14929. }
  14930. },
  14931. "required": ["id", "type", "properties"],
  14932. "additionalProperties": false
  14933. },
  14934. {
  14935. "type": "object",
  14936. "properties": {
  14937. "id": {
  14938. "type": "string"
  14939. },
  14940. "type": {
  14941. "type": "string",
  14942. "enum": ["tui.session.select"]
  14943. },
  14944. "properties": {
  14945. "type": "object",
  14946. "properties": {
  14947. "sessionID": {
  14948. "type": "string",
  14949. "pattern": "^ses",
  14950. "description": "Session ID to navigate to"
  14951. }
  14952. },
  14953. "required": ["sessionID"],
  14954. "additionalProperties": false
  14955. }
  14956. },
  14957. "required": ["id", "type", "properties"],
  14958. "additionalProperties": false
  14959. },
  14960. {
  14961. "type": "object",
  14962. "properties": {
  14963. "id": {
  14964. "type": "string"
  14965. },
  14966. "type": {
  14967. "type": "string",
  14968. "enum": ["mcp.tools.changed"]
  14969. },
  14970. "properties": {
  14971. "type": "object",
  14972. "properties": {
  14973. "server": {
  14974. "type": "string"
  14975. }
  14976. },
  14977. "required": ["server"],
  14978. "additionalProperties": false
  14979. }
  14980. },
  14981. "required": ["id", "type", "properties"],
  14982. "additionalProperties": false
  14983. },
  14984. {
  14985. "type": "object",
  14986. "properties": {
  14987. "id": {
  14988. "type": "string"
  14989. },
  14990. "type": {
  14991. "type": "string",
  14992. "enum": ["mcp.browser.open.failed"]
  14993. },
  14994. "properties": {
  14995. "type": "object",
  14996. "properties": {
  14997. "mcpName": {
  14998. "type": "string"
  14999. },
  15000. "url": {
  15001. "type": "string"
  15002. }
  15003. },
  15004. "required": ["mcpName", "url"],
  15005. "additionalProperties": false
  15006. }
  15007. },
  15008. "required": ["id", "type", "properties"],
  15009. "additionalProperties": false
  15010. },
  15011. {
  15012. "type": "object",
  15013. "properties": {
  15014. "id": {
  15015. "type": "string"
  15016. },
  15017. "type": {
  15018. "type": "string",
  15019. "enum": ["command.executed"]
  15020. },
  15021. "properties": {
  15022. "type": "object",
  15023. "properties": {
  15024. "name": {
  15025. "type": "string"
  15026. },
  15027. "sessionID": {
  15028. "type": "string",
  15029. "pattern": "^ses"
  15030. },
  15031. "arguments": {
  15032. "type": "string"
  15033. },
  15034. "messageID": {
  15035. "type": "string",
  15036. "pattern": "^msg"
  15037. }
  15038. },
  15039. "required": ["name", "sessionID", "arguments", "messageID"],
  15040. "additionalProperties": false
  15041. }
  15042. },
  15043. "required": ["id", "type", "properties"],
  15044. "additionalProperties": false
  15045. },
  15046. {
  15047. "type": "object",
  15048. "properties": {
  15049. "id": {
  15050. "type": "string"
  15051. },
  15052. "type": {
  15053. "type": "string",
  15054. "enum": ["project.updated"]
  15055. },
  15056. "properties": {
  15057. "type": "object",
  15058. "properties": {
  15059. "id": {
  15060. "type": "string"
  15061. },
  15062. "worktree": {
  15063. "type": "string"
  15064. },
  15065. "vcs": {
  15066. "type": "string",
  15067. "enum": ["git"]
  15068. },
  15069. "name": {
  15070. "type": "string"
  15071. },
  15072. "icon": {
  15073. "type": "object",
  15074. "properties": {
  15075. "url": {
  15076. "type": "string"
  15077. },
  15078. "override": {
  15079. "type": "string"
  15080. },
  15081. "color": {
  15082. "type": "string"
  15083. }
  15084. },
  15085. "additionalProperties": false
  15086. },
  15087. "commands": {
  15088. "type": "object",
  15089. "properties": {
  15090. "start": {
  15091. "type": "string",
  15092. "description": "Startup script to run when creating a new workspace (worktree)"
  15093. }
  15094. },
  15095. "additionalProperties": false
  15096. },
  15097. "time": {
  15098. "type": "object",
  15099. "properties": {
  15100. "created": {
  15101. "type": "integer",
  15102. "minimum": 0
  15103. },
  15104. "updated": {
  15105. "type": "integer",
  15106. "minimum": 0
  15107. },
  15108. "initialized": {
  15109. "type": "integer",
  15110. "minimum": 0
  15111. }
  15112. },
  15113. "required": ["created", "updated"],
  15114. "additionalProperties": false
  15115. },
  15116. "sandboxes": {
  15117. "type": "array",
  15118. "items": {
  15119. "type": "string"
  15120. }
  15121. }
  15122. },
  15123. "required": ["id", "worktree", "time", "sandboxes"],
  15124. "additionalProperties": false
  15125. }
  15126. },
  15127. "required": ["id", "type", "properties"],
  15128. "additionalProperties": false
  15129. },
  15130. {
  15131. "type": "object",
  15132. "properties": {
  15133. "id": {
  15134. "type": "string"
  15135. },
  15136. "type": {
  15137. "type": "string",
  15138. "enum": ["vcs.branch.updated"]
  15139. },
  15140. "properties": {
  15141. "type": "object",
  15142. "properties": {
  15143. "branch": {
  15144. "type": "string"
  15145. }
  15146. },
  15147. "additionalProperties": false
  15148. }
  15149. },
  15150. "required": ["id", "type", "properties"],
  15151. "additionalProperties": false
  15152. },
  15153. {
  15154. "type": "object",
  15155. "properties": {
  15156. "id": {
  15157. "type": "string"
  15158. },
  15159. "type": {
  15160. "type": "string",
  15161. "enum": ["workspace.ready"]
  15162. },
  15163. "properties": {
  15164. "type": "object",
  15165. "properties": {
  15166. "name": {
  15167. "type": "string"
  15168. }
  15169. },
  15170. "required": ["name"],
  15171. "additionalProperties": false
  15172. }
  15173. },
  15174. "required": ["id", "type", "properties"],
  15175. "additionalProperties": false
  15176. },
  15177. {
  15178. "type": "object",
  15179. "properties": {
  15180. "id": {
  15181. "type": "string"
  15182. },
  15183. "type": {
  15184. "type": "string",
  15185. "enum": ["workspace.failed"]
  15186. },
  15187. "properties": {
  15188. "type": "object",
  15189. "properties": {
  15190. "message": {
  15191. "type": "string"
  15192. }
  15193. },
  15194. "required": ["message"],
  15195. "additionalProperties": false
  15196. }
  15197. },
  15198. "required": ["id", "type", "properties"],
  15199. "additionalProperties": false
  15200. },
  15201. {
  15202. "type": "object",
  15203. "properties": {
  15204. "id": {
  15205. "type": "string"
  15206. },
  15207. "type": {
  15208. "type": "string",
  15209. "enum": ["workspace.status"]
  15210. },
  15211. "properties": {
  15212. "type": "object",
  15213. "properties": {
  15214. "workspaceID": {
  15215. "type": "string",
  15216. "pattern": "^wrk"
  15217. },
  15218. "status": {
  15219. "type": "string",
  15220. "enum": ["connected", "connecting", "disconnected", "error"]
  15221. }
  15222. },
  15223. "required": ["workspaceID", "status"],
  15224. "additionalProperties": false
  15225. }
  15226. },
  15227. "required": ["id", "type", "properties"],
  15228. "additionalProperties": false
  15229. },
  15230. {
  15231. "type": "object",
  15232. "properties": {
  15233. "id": {
  15234. "type": "string"
  15235. },
  15236. "type": {
  15237. "type": "string",
  15238. "enum": ["worktree.ready"]
  15239. },
  15240. "properties": {
  15241. "type": "object",
  15242. "properties": {
  15243. "name": {
  15244. "type": "string"
  15245. },
  15246. "branch": {
  15247. "type": "string"
  15248. }
  15249. },
  15250. "required": ["name"],
  15251. "additionalProperties": false
  15252. }
  15253. },
  15254. "required": ["id", "type", "properties"],
  15255. "additionalProperties": false
  15256. },
  15257. {
  15258. "type": "object",
  15259. "properties": {
  15260. "id": {
  15261. "type": "string"
  15262. },
  15263. "type": {
  15264. "type": "string",
  15265. "enum": ["worktree.failed"]
  15266. },
  15267. "properties": {
  15268. "type": "object",
  15269. "properties": {
  15270. "message": {
  15271. "type": "string"
  15272. }
  15273. },
  15274. "required": ["message"],
  15275. "additionalProperties": false
  15276. }
  15277. },
  15278. "required": ["id", "type", "properties"],
  15279. "additionalProperties": false
  15280. },
  15281. {
  15282. "type": "object",
  15283. "properties": {
  15284. "id": {
  15285. "type": "string"
  15286. },
  15287. "type": {
  15288. "type": "string",
  15289. "enum": ["pty.created"]
  15290. },
  15291. "properties": {
  15292. "type": "object",
  15293. "properties": {
  15294. "info": {
  15295. "$ref": "#/components/schemas/Pty"
  15296. }
  15297. },
  15298. "required": ["info"],
  15299. "additionalProperties": false
  15300. }
  15301. },
  15302. "required": ["id", "type", "properties"],
  15303. "additionalProperties": false
  15304. },
  15305. {
  15306. "type": "object",
  15307. "properties": {
  15308. "id": {
  15309. "type": "string"
  15310. },
  15311. "type": {
  15312. "type": "string",
  15313. "enum": ["pty.updated"]
  15314. },
  15315. "properties": {
  15316. "type": "object",
  15317. "properties": {
  15318. "info": {
  15319. "$ref": "#/components/schemas/Pty"
  15320. }
  15321. },
  15322. "required": ["info"],
  15323. "additionalProperties": false
  15324. }
  15325. },
  15326. "required": ["id", "type", "properties"],
  15327. "additionalProperties": false
  15328. },
  15329. {
  15330. "type": "object",
  15331. "properties": {
  15332. "id": {
  15333. "type": "string"
  15334. },
  15335. "type": {
  15336. "type": "string",
  15337. "enum": ["pty.exited"]
  15338. },
  15339. "properties": {
  15340. "type": "object",
  15341. "properties": {
  15342. "id": {
  15343. "type": "string",
  15344. "pattern": "^pty"
  15345. },
  15346. "exitCode": {
  15347. "type": "integer",
  15348. "minimum": 0
  15349. }
  15350. },
  15351. "required": ["id", "exitCode"],
  15352. "additionalProperties": false
  15353. }
  15354. },
  15355. "required": ["id", "type", "properties"],
  15356. "additionalProperties": false
  15357. },
  15358. {
  15359. "type": "object",
  15360. "properties": {
  15361. "id": {
  15362. "type": "string"
  15363. },
  15364. "type": {
  15365. "type": "string",
  15366. "enum": ["pty.deleted"]
  15367. },
  15368. "properties": {
  15369. "type": "object",
  15370. "properties": {
  15371. "id": {
  15372. "type": "string",
  15373. "pattern": "^pty"
  15374. }
  15375. },
  15376. "required": ["id"],
  15377. "additionalProperties": false
  15378. }
  15379. },
  15380. "required": ["id", "type", "properties"],
  15381. "additionalProperties": false
  15382. },
  15383. {
  15384. "type": "object",
  15385. "properties": {
  15386. "id": {
  15387. "type": "string"
  15388. },
  15389. "type": {
  15390. "type": "string",
  15391. "enum": ["installation.updated"]
  15392. },
  15393. "properties": {
  15394. "type": "object",
  15395. "properties": {
  15396. "version": {
  15397. "type": "string"
  15398. }
  15399. },
  15400. "required": ["version"],
  15401. "additionalProperties": false
  15402. }
  15403. },
  15404. "required": ["id", "type", "properties"],
  15405. "additionalProperties": false
  15406. },
  15407. {
  15408. "type": "object",
  15409. "properties": {
  15410. "id": {
  15411. "type": "string"
  15412. },
  15413. "type": {
  15414. "type": "string",
  15415. "enum": ["installation.update-available"]
  15416. },
  15417. "properties": {
  15418. "type": "object",
  15419. "properties": {
  15420. "version": {
  15421. "type": "string"
  15422. }
  15423. },
  15424. "required": ["version"],
  15425. "additionalProperties": false
  15426. }
  15427. },
  15428. "required": ["id", "type", "properties"],
  15429. "additionalProperties": false
  15430. },
  15431. {
  15432. "type": "object",
  15433. "properties": {
  15434. "id": {
  15435. "type": "string"
  15436. },
  15437. "type": {
  15438. "type": "string",
  15439. "enum": ["server.connected"]
  15440. },
  15441. "properties": {
  15442. "type": "object",
  15443. "properties": {}
  15444. }
  15445. },
  15446. "required": ["id", "type", "properties"],
  15447. "additionalProperties": false
  15448. },
  15449. {
  15450. "type": "object",
  15451. "properties": {
  15452. "id": {
  15453. "type": "string"
  15454. },
  15455. "type": {
  15456. "type": "string",
  15457. "enum": ["global.disposed"]
  15458. },
  15459. "properties": {
  15460. "type": "object",
  15461. "properties": {}
  15462. }
  15463. },
  15464. "required": ["id", "type", "properties"],
  15465. "additionalProperties": false
  15466. },
  15467. {
  15468. "type": "object",
  15469. "properties": {
  15470. "id": {
  15471. "type": "string"
  15472. },
  15473. "type": {
  15474. "type": "string",
  15475. "enum": ["permission.v2.asked"]
  15476. },
  15477. "properties": {
  15478. "type": "object",
  15479. "properties": {
  15480. "id": {
  15481. "type": "string",
  15482. "pattern": "^per"
  15483. },
  15484. "sessionID": {
  15485. "type": "string",
  15486. "pattern": "^ses"
  15487. },
  15488. "action": {
  15489. "type": "string"
  15490. },
  15491. "resources": {
  15492. "type": "array",
  15493. "items": {
  15494. "type": "string"
  15495. }
  15496. },
  15497. "save": {
  15498. "type": "array",
  15499. "items": {
  15500. "type": "string"
  15501. }
  15502. },
  15503. "metadata": {
  15504. "type": "object"
  15505. },
  15506. "source": {
  15507. "$ref": "#/components/schemas/PermissionV2Source"
  15508. }
  15509. },
  15510. "required": ["id", "sessionID", "action", "resources"],
  15511. "additionalProperties": false
  15512. }
  15513. },
  15514. "required": ["id", "type", "properties"],
  15515. "additionalProperties": false
  15516. },
  15517. {
  15518. "type": "object",
  15519. "properties": {
  15520. "id": {
  15521. "type": "string"
  15522. },
  15523. "type": {
  15524. "type": "string",
  15525. "enum": ["permission.v2.replied"]
  15526. },
  15527. "properties": {
  15528. "type": "object",
  15529. "properties": {
  15530. "sessionID": {
  15531. "type": "string",
  15532. "pattern": "^ses"
  15533. },
  15534. "requestID": {
  15535. "type": "string",
  15536. "pattern": "^per"
  15537. },
  15538. "reply": {
  15539. "$ref": "#/components/schemas/PermissionV2Reply"
  15540. }
  15541. },
  15542. "required": ["sessionID", "requestID", "reply"],
  15543. "additionalProperties": false
  15544. }
  15545. },
  15546. "required": ["id", "type", "properties"],
  15547. "additionalProperties": false
  15548. },
  15549. {
  15550. "type": "object",
  15551. "properties": {
  15552. "id": {
  15553. "type": "string"
  15554. },
  15555. "type": {
  15556. "type": "string",
  15557. "enum": ["account.added"]
  15558. },
  15559. "properties": {
  15560. "type": "object",
  15561. "properties": {
  15562. "account": {
  15563. "$ref": "#/components/schemas/AuthInfo"
  15564. }
  15565. },
  15566. "required": ["account"],
  15567. "additionalProperties": false
  15568. }
  15569. },
  15570. "required": ["id", "type", "properties"],
  15571. "additionalProperties": false
  15572. },
  15573. {
  15574. "type": "object",
  15575. "properties": {
  15576. "id": {
  15577. "type": "string"
  15578. },
  15579. "type": {
  15580. "type": "string",
  15581. "enum": ["account.removed"]
  15582. },
  15583. "properties": {
  15584. "type": "object",
  15585. "properties": {
  15586. "account": {
  15587. "$ref": "#/components/schemas/AuthInfo"
  15588. }
  15589. },
  15590. "required": ["account"],
  15591. "additionalProperties": false
  15592. }
  15593. },
  15594. "required": ["id", "type", "properties"],
  15595. "additionalProperties": false
  15596. },
  15597. {
  15598. "type": "object",
  15599. "properties": {
  15600. "id": {
  15601. "type": "string"
  15602. },
  15603. "type": {
  15604. "type": "string",
  15605. "enum": ["account.switched"]
  15606. },
  15607. "properties": {
  15608. "type": "object",
  15609. "properties": {
  15610. "serviceID": {
  15611. "type": "string"
  15612. },
  15613. "from": {
  15614. "type": "string"
  15615. },
  15616. "to": {
  15617. "type": "string"
  15618. }
  15619. },
  15620. "required": ["serviceID"],
  15621. "additionalProperties": false
  15622. }
  15623. },
  15624. "required": ["id", "type", "properties"],
  15625. "additionalProperties": false
  15626. },
  15627. {
  15628. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15629. },
  15630. {
  15631. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  15632. },
  15633. {
  15634. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  15635. },
  15636. {
  15637. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  15638. },
  15639. {
  15640. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  15641. },
  15642. {
  15643. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  15644. },
  15645. {
  15646. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  15647. },
  15648. {
  15649. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  15650. },
  15651. {
  15652. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  15653. },
  15654. {
  15655. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  15656. },
  15657. {
  15658. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  15659. },
  15660. {
  15661. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  15662. },
  15663. {
  15664. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  15665. },
  15666. {
  15667. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  15668. },
  15669. {
  15670. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  15671. },
  15672. {
  15673. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  15674. },
  15675. {
  15676. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  15677. },
  15678. {
  15679. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  15680. },
  15681. {
  15682. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  15683. },
  15684. {
  15685. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  15686. },
  15687. {
  15688. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  15689. },
  15690. {
  15691. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  15692. },
  15693. {
  15694. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  15695. },
  15696. {
  15697. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  15698. },
  15699. {
  15700. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  15701. },
  15702. {
  15703. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  15704. },
  15705. {
  15706. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  15707. },
  15708. {
  15709. "$ref": "#/components/schemas/SyncEventSessionCreated"
  15710. },
  15711. {
  15712. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  15713. },
  15714. {
  15715. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  15716. },
  15717. {
  15718. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  15719. },
  15720. {
  15721. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  15722. },
  15723. {
  15724. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  15725. },
  15726. {
  15727. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  15728. }
  15729. ]
  15730. }
  15731. },
  15732. "required": ["directory", "payload"],
  15733. "additionalProperties": false
  15734. },
  15735. "LogLevel": {
  15736. "type": "string",
  15737. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  15738. "description": "Log level"
  15739. },
  15740. "ServerConfig": {
  15741. "type": "object",
  15742. "properties": {
  15743. "port": {
  15744. "type": "integer",
  15745. "exclusiveMinimum": 0
  15746. },
  15747. "hostname": {
  15748. "type": "string"
  15749. },
  15750. "mdns": {
  15751. "type": "boolean"
  15752. },
  15753. "mdnsDomain": {
  15754. "type": "string"
  15755. },
  15756. "cors": {
  15757. "type": "array",
  15758. "items": {
  15759. "type": "string"
  15760. }
  15761. }
  15762. },
  15763. "additionalProperties": false,
  15764. "description": "Server configuration for opencode serve and web commands"
  15765. },
  15766. "ReferenceConfigEntry": {
  15767. "anyOf": [
  15768. {
  15769. "type": "string"
  15770. },
  15771. {
  15772. "type": "object",
  15773. "properties": {
  15774. "repository": {
  15775. "type": "string",
  15776. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  15777. },
  15778. "branch": {
  15779. "type": "string"
  15780. }
  15781. },
  15782. "required": ["repository"],
  15783. "additionalProperties": false
  15784. },
  15785. {
  15786. "type": "object",
  15787. "properties": {
  15788. "path": {
  15789. "type": "string",
  15790. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  15791. }
  15792. },
  15793. "required": ["path"],
  15794. "additionalProperties": false
  15795. }
  15796. ]
  15797. },
  15798. "ReferenceConfig": {
  15799. "type": "object",
  15800. "additionalProperties": {
  15801. "$ref": "#/components/schemas/ReferenceConfigEntry"
  15802. }
  15803. },
  15804. "PermissionActionConfig": {
  15805. "type": "string",
  15806. "enum": ["ask", "allow", "deny"]
  15807. },
  15808. "PermissionObjectConfig": {
  15809. "type": "object",
  15810. "additionalProperties": {
  15811. "$ref": "#/components/schemas/PermissionActionConfig"
  15812. }
  15813. },
  15814. "PermissionRuleConfig": {
  15815. "anyOf": [
  15816. {
  15817. "$ref": "#/components/schemas/PermissionActionConfig"
  15818. },
  15819. {
  15820. "$ref": "#/components/schemas/PermissionObjectConfig"
  15821. }
  15822. ]
  15823. },
  15824. "PermissionConfig": {
  15825. "anyOf": [
  15826. {
  15827. "$ref": "#/components/schemas/PermissionActionConfig"
  15828. },
  15829. {
  15830. "type": "object",
  15831. "properties": {
  15832. "read": {
  15833. "$ref": "#/components/schemas/PermissionRuleConfig"
  15834. },
  15835. "edit": {
  15836. "$ref": "#/components/schemas/PermissionRuleConfig"
  15837. },
  15838. "glob": {
  15839. "$ref": "#/components/schemas/PermissionRuleConfig"
  15840. },
  15841. "grep": {
  15842. "$ref": "#/components/schemas/PermissionRuleConfig"
  15843. },
  15844. "list": {
  15845. "$ref": "#/components/schemas/PermissionRuleConfig"
  15846. },
  15847. "bash": {
  15848. "$ref": "#/components/schemas/PermissionRuleConfig"
  15849. },
  15850. "task": {
  15851. "$ref": "#/components/schemas/PermissionRuleConfig"
  15852. },
  15853. "external_directory": {
  15854. "$ref": "#/components/schemas/PermissionRuleConfig"
  15855. },
  15856. "todowrite": {
  15857. "$ref": "#/components/schemas/PermissionActionConfig"
  15858. },
  15859. "question": {
  15860. "$ref": "#/components/schemas/PermissionActionConfig"
  15861. },
  15862. "webfetch": {
  15863. "$ref": "#/components/schemas/PermissionActionConfig"
  15864. },
  15865. "websearch": {
  15866. "$ref": "#/components/schemas/PermissionActionConfig"
  15867. },
  15868. "repo_clone": {
  15869. "$ref": "#/components/schemas/PermissionRuleConfig"
  15870. },
  15871. "repo_overview": {
  15872. "$ref": "#/components/schemas/PermissionRuleConfig"
  15873. },
  15874. "lsp": {
  15875. "$ref": "#/components/schemas/PermissionRuleConfig"
  15876. },
  15877. "doom_loop": {
  15878. "$ref": "#/components/schemas/PermissionActionConfig"
  15879. },
  15880. "skill": {
  15881. "$ref": "#/components/schemas/PermissionRuleConfig"
  15882. }
  15883. },
  15884. "additionalProperties": {
  15885. "$ref": "#/components/schemas/PermissionRuleConfig"
  15886. }
  15887. }
  15888. ]
  15889. },
  15890. "AgentConfig": {
  15891. "type": "object",
  15892. "properties": {
  15893. "model": {
  15894. "type": "string"
  15895. },
  15896. "variant": {
  15897. "type": "string"
  15898. },
  15899. "temperature": {
  15900. "type": "number"
  15901. },
  15902. "top_p": {
  15903. "type": "number"
  15904. },
  15905. "prompt": {
  15906. "type": "string"
  15907. },
  15908. "tools": {
  15909. "type": "object",
  15910. "additionalProperties": {
  15911. "type": "boolean"
  15912. }
  15913. },
  15914. "disable": {
  15915. "type": "boolean"
  15916. },
  15917. "description": {
  15918. "type": "string"
  15919. },
  15920. "mode": {
  15921. "type": "string",
  15922. "enum": ["subagent", "primary", "all"]
  15923. },
  15924. "hidden": {
  15925. "type": "boolean"
  15926. },
  15927. "options": {
  15928. "type": "object"
  15929. },
  15930. "color": {
  15931. "anyOf": [
  15932. {
  15933. "type": "string",
  15934. "pattern": "^#[0-9a-fA-F]{6}$"
  15935. },
  15936. {
  15937. "type": "string",
  15938. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  15939. }
  15940. ],
  15941. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  15942. },
  15943. "steps": {
  15944. "type": "integer",
  15945. "exclusiveMinimum": 0
  15946. },
  15947. "maxSteps": {
  15948. "type": "integer",
  15949. "exclusiveMinimum": 0
  15950. },
  15951. "permission": {
  15952. "$ref": "#/components/schemas/PermissionConfig"
  15953. }
  15954. },
  15955. "additionalProperties": {}
  15956. },
  15957. "ProviderConfig": {
  15958. "type": "object",
  15959. "properties": {
  15960. "api": {
  15961. "type": "string"
  15962. },
  15963. "name": {
  15964. "type": "string"
  15965. },
  15966. "env": {
  15967. "type": "array",
  15968. "items": {
  15969. "type": "string"
  15970. }
  15971. },
  15972. "id": {
  15973. "type": "string"
  15974. },
  15975. "npm": {
  15976. "type": "string"
  15977. },
  15978. "whitelist": {
  15979. "type": "array",
  15980. "items": {
  15981. "type": "string"
  15982. }
  15983. },
  15984. "blacklist": {
  15985. "type": "array",
  15986. "items": {
  15987. "type": "string"
  15988. }
  15989. },
  15990. "options": {
  15991. "type": "object",
  15992. "properties": {
  15993. "apiKey": {
  15994. "type": "string"
  15995. },
  15996. "baseURL": {
  15997. "type": "string"
  15998. },
  15999. "enterpriseUrl": {
  16000. "type": "string"
  16001. },
  16002. "setCacheKey": {
  16003. "type": "boolean"
  16004. },
  16005. "timeout": {
  16006. "anyOf": [
  16007. {
  16008. "type": "integer",
  16009. "exclusiveMinimum": 0
  16010. },
  16011. {
  16012. "type": "boolean",
  16013. "enum": [false]
  16014. }
  16015. ],
  16016. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  16017. },
  16018. "headerTimeout": {
  16019. "anyOf": [
  16020. {
  16021. "type": "integer",
  16022. "exclusiveMinimum": 0
  16023. },
  16024. {
  16025. "type": "boolean",
  16026. "enum": [false]
  16027. }
  16028. ],
  16029. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  16030. },
  16031. "chunkTimeout": {
  16032. "type": "integer",
  16033. "exclusiveMinimum": 0
  16034. }
  16035. },
  16036. "additionalProperties": {}
  16037. },
  16038. "models": {
  16039. "type": "object",
  16040. "additionalProperties": {
  16041. "type": "object",
  16042. "properties": {
  16043. "id": {
  16044. "type": "string"
  16045. },
  16046. "name": {
  16047. "type": "string"
  16048. },
  16049. "family": {
  16050. "type": "string"
  16051. },
  16052. "release_date": {
  16053. "type": "string"
  16054. },
  16055. "attachment": {
  16056. "type": "boolean"
  16057. },
  16058. "reasoning": {
  16059. "type": "boolean"
  16060. },
  16061. "temperature": {
  16062. "type": "boolean"
  16063. },
  16064. "tool_call": {
  16065. "type": "boolean"
  16066. },
  16067. "interleaved": {
  16068. "anyOf": [
  16069. {
  16070. "type": "boolean",
  16071. "enum": [true]
  16072. },
  16073. {
  16074. "type": "object",
  16075. "properties": {
  16076. "field": {
  16077. "type": "string",
  16078. "enum": ["reasoning_content", "reasoning_details"]
  16079. }
  16080. },
  16081. "required": ["field"],
  16082. "additionalProperties": false
  16083. }
  16084. ]
  16085. },
  16086. "cost": {
  16087. "type": "object",
  16088. "properties": {
  16089. "input": {
  16090. "type": "number"
  16091. },
  16092. "output": {
  16093. "type": "number"
  16094. },
  16095. "cache_read": {
  16096. "type": "number"
  16097. },
  16098. "cache_write": {
  16099. "type": "number"
  16100. },
  16101. "context_over_200k": {
  16102. "type": "object",
  16103. "properties": {
  16104. "input": {
  16105. "type": "number"
  16106. },
  16107. "output": {
  16108. "type": "number"
  16109. },
  16110. "cache_read": {
  16111. "type": "number"
  16112. },
  16113. "cache_write": {
  16114. "type": "number"
  16115. }
  16116. },
  16117. "required": ["input", "output"],
  16118. "additionalProperties": false
  16119. }
  16120. },
  16121. "required": ["input", "output"],
  16122. "additionalProperties": false
  16123. },
  16124. "limit": {
  16125. "type": "object",
  16126. "properties": {
  16127. "context": {
  16128. "type": "number"
  16129. },
  16130. "input": {
  16131. "type": "number"
  16132. },
  16133. "output": {
  16134. "type": "number"
  16135. }
  16136. },
  16137. "required": ["context", "output"],
  16138. "additionalProperties": false
  16139. },
  16140. "modalities": {
  16141. "type": "object",
  16142. "properties": {
  16143. "input": {
  16144. "type": "array",
  16145. "items": {
  16146. "type": "string",
  16147. "enum": ["text", "audio", "image", "video", "pdf"]
  16148. }
  16149. },
  16150. "output": {
  16151. "type": "array",
  16152. "items": {
  16153. "type": "string",
  16154. "enum": ["text", "audio", "image", "video", "pdf"]
  16155. }
  16156. }
  16157. },
  16158. "additionalProperties": false
  16159. },
  16160. "experimental": {
  16161. "type": "boolean"
  16162. },
  16163. "status": {
  16164. "type": "string",
  16165. "enum": ["alpha", "beta", "deprecated", "active"]
  16166. },
  16167. "provider": {
  16168. "type": "object",
  16169. "properties": {
  16170. "npm": {
  16171. "type": "string"
  16172. },
  16173. "api": {
  16174. "type": "string"
  16175. }
  16176. },
  16177. "additionalProperties": false
  16178. },
  16179. "options": {
  16180. "type": "object"
  16181. },
  16182. "headers": {
  16183. "type": "object",
  16184. "additionalProperties": {
  16185. "type": "string"
  16186. }
  16187. },
  16188. "variants": {
  16189. "type": "object",
  16190. "additionalProperties": {
  16191. "type": "object",
  16192. "properties": {
  16193. "disabled": {
  16194. "type": "boolean"
  16195. }
  16196. },
  16197. "additionalProperties": {}
  16198. },
  16199. "description": "Variant-specific configuration"
  16200. }
  16201. },
  16202. "additionalProperties": false
  16203. }
  16204. }
  16205. },
  16206. "additionalProperties": false
  16207. },
  16208. "McpLocalConfig": {
  16209. "type": "object",
  16210. "properties": {
  16211. "type": {
  16212. "type": "string",
  16213. "enum": ["local"],
  16214. "description": "Type of MCP server connection"
  16215. },
  16216. "command": {
  16217. "type": "array",
  16218. "items": {
  16219. "type": "string"
  16220. },
  16221. "description": "Command and arguments to run the MCP server"
  16222. },
  16223. "environment": {
  16224. "type": "object",
  16225. "additionalProperties": {
  16226. "type": "string"
  16227. }
  16228. },
  16229. "enabled": {
  16230. "type": "boolean"
  16231. },
  16232. "timeout": {
  16233. "type": "integer",
  16234. "exclusiveMinimum": 0
  16235. }
  16236. },
  16237. "required": ["type", "command"],
  16238. "additionalProperties": false
  16239. },
  16240. "McpOAuthConfig": {
  16241. "type": "object",
  16242. "properties": {
  16243. "clientId": {
  16244. "type": "string"
  16245. },
  16246. "clientSecret": {
  16247. "type": "string"
  16248. },
  16249. "scope": {
  16250. "type": "string"
  16251. },
  16252. "callbackPort": {
  16253. "type": "integer",
  16254. "minimum": 1,
  16255. "maximum": 65535
  16256. },
  16257. "redirectUri": {
  16258. "type": "string"
  16259. }
  16260. },
  16261. "additionalProperties": false
  16262. },
  16263. "McpRemoteConfig": {
  16264. "type": "object",
  16265. "properties": {
  16266. "type": {
  16267. "type": "string",
  16268. "enum": ["remote"],
  16269. "description": "Type of MCP server connection"
  16270. },
  16271. "url": {
  16272. "type": "string",
  16273. "description": "URL of the remote MCP server"
  16274. },
  16275. "enabled": {
  16276. "type": "boolean"
  16277. },
  16278. "headers": {
  16279. "type": "object",
  16280. "additionalProperties": {
  16281. "type": "string"
  16282. }
  16283. },
  16284. "oauth": {
  16285. "anyOf": [
  16286. {
  16287. "$ref": "#/components/schemas/McpOAuthConfig"
  16288. },
  16289. {
  16290. "type": "boolean",
  16291. "enum": [false]
  16292. }
  16293. ],
  16294. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  16295. },
  16296. "timeout": {
  16297. "type": "integer",
  16298. "exclusiveMinimum": 0
  16299. }
  16300. },
  16301. "required": ["type", "url"],
  16302. "additionalProperties": false
  16303. },
  16304. "LayoutConfig": {
  16305. "type": "string",
  16306. "enum": ["auto", "stretch"],
  16307. "description": "@deprecated Always uses stretch layout."
  16308. },
  16309. "ImageAttachmentConfig": {
  16310. "type": "object",
  16311. "properties": {
  16312. "auto_resize": {
  16313. "type": "boolean"
  16314. },
  16315. "max_width": {
  16316. "type": "integer",
  16317. "exclusiveMinimum": 0
  16318. },
  16319. "max_height": {
  16320. "type": "integer",
  16321. "exclusiveMinimum": 0
  16322. },
  16323. "max_base64_bytes": {
  16324. "type": "integer",
  16325. "exclusiveMinimum": 0
  16326. }
  16327. },
  16328. "additionalProperties": false
  16329. },
  16330. "AttachmentConfig": {
  16331. "type": "object",
  16332. "properties": {
  16333. "image": {
  16334. "$ref": "#/components/schemas/ImageAttachmentConfig"
  16335. }
  16336. },
  16337. "additionalProperties": false
  16338. },
  16339. "Config": {
  16340. "type": "object",
  16341. "properties": {
  16342. "$schema": {
  16343. "type": "string"
  16344. },
  16345. "shell": {
  16346. "type": "string"
  16347. },
  16348. "logLevel": {
  16349. "$ref": "#/components/schemas/LogLevel"
  16350. },
  16351. "server": {
  16352. "$ref": "#/components/schemas/ServerConfig"
  16353. },
  16354. "command": {
  16355. "type": "object",
  16356. "additionalProperties": {
  16357. "type": "object",
  16358. "properties": {
  16359. "template": {
  16360. "type": "string"
  16361. },
  16362. "description": {
  16363. "type": "string"
  16364. },
  16365. "agent": {
  16366. "type": "string"
  16367. },
  16368. "model": {
  16369. "type": "string"
  16370. },
  16371. "subtask": {
  16372. "type": "boolean"
  16373. }
  16374. },
  16375. "required": ["template"],
  16376. "additionalProperties": false
  16377. }
  16378. },
  16379. "skills": {
  16380. "type": "object",
  16381. "properties": {
  16382. "paths": {
  16383. "type": "array",
  16384. "items": {
  16385. "type": "string"
  16386. }
  16387. },
  16388. "urls": {
  16389. "type": "array",
  16390. "items": {
  16391. "type": "string"
  16392. }
  16393. }
  16394. },
  16395. "additionalProperties": false
  16396. },
  16397. "reference": {
  16398. "$ref": "#/components/schemas/ReferenceConfig"
  16399. },
  16400. "watcher": {
  16401. "type": "object",
  16402. "properties": {
  16403. "ignore": {
  16404. "type": "array",
  16405. "items": {
  16406. "type": "string"
  16407. }
  16408. }
  16409. },
  16410. "additionalProperties": false
  16411. },
  16412. "snapshot": {
  16413. "type": "boolean"
  16414. },
  16415. "plugin": {
  16416. "type": "array",
  16417. "items": {
  16418. "anyOf": [
  16419. {
  16420. "type": "string"
  16421. },
  16422. {
  16423. "type": "array",
  16424. "prefixItems": [
  16425. {
  16426. "type": "string"
  16427. },
  16428. {
  16429. "type": "object"
  16430. }
  16431. ],
  16432. "maxItems": 2,
  16433. "minItems": 2
  16434. }
  16435. ]
  16436. }
  16437. },
  16438. "share": {
  16439. "type": "string",
  16440. "enum": ["manual", "auto", "disabled"]
  16441. },
  16442. "autoshare": {
  16443. "type": "boolean"
  16444. },
  16445. "autoupdate": {
  16446. "anyOf": [
  16447. {
  16448. "type": "boolean"
  16449. },
  16450. {
  16451. "type": "string",
  16452. "enum": ["notify"]
  16453. }
  16454. ],
  16455. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  16456. },
  16457. "disabled_providers": {
  16458. "type": "array",
  16459. "items": {
  16460. "type": "string"
  16461. }
  16462. },
  16463. "enabled_providers": {
  16464. "type": "array",
  16465. "items": {
  16466. "type": "string"
  16467. }
  16468. },
  16469. "model": {
  16470. "type": "string"
  16471. },
  16472. "small_model": {
  16473. "type": "string"
  16474. },
  16475. "default_agent": {
  16476. "type": "string"
  16477. },
  16478. "username": {
  16479. "type": "string"
  16480. },
  16481. "mode": {
  16482. "type": "object",
  16483. "properties": {
  16484. "build": {
  16485. "$ref": "#/components/schemas/AgentConfig"
  16486. },
  16487. "plan": {
  16488. "$ref": "#/components/schemas/AgentConfig"
  16489. }
  16490. },
  16491. "additionalProperties": {
  16492. "$ref": "#/components/schemas/AgentConfig"
  16493. }
  16494. },
  16495. "agent": {
  16496. "type": "object",
  16497. "properties": {
  16498. "plan": {
  16499. "$ref": "#/components/schemas/AgentConfig"
  16500. },
  16501. "build": {
  16502. "$ref": "#/components/schemas/AgentConfig"
  16503. },
  16504. "general": {
  16505. "$ref": "#/components/schemas/AgentConfig"
  16506. },
  16507. "explore": {
  16508. "$ref": "#/components/schemas/AgentConfig"
  16509. },
  16510. "scout": {
  16511. "$ref": "#/components/schemas/AgentConfig"
  16512. },
  16513. "title": {
  16514. "$ref": "#/components/schemas/AgentConfig"
  16515. },
  16516. "summary": {
  16517. "$ref": "#/components/schemas/AgentConfig"
  16518. },
  16519. "compaction": {
  16520. "$ref": "#/components/schemas/AgentConfig"
  16521. }
  16522. },
  16523. "additionalProperties": {
  16524. "$ref": "#/components/schemas/AgentConfig"
  16525. }
  16526. },
  16527. "provider": {
  16528. "type": "object",
  16529. "additionalProperties": {
  16530. "$ref": "#/components/schemas/ProviderConfig"
  16531. }
  16532. },
  16533. "mcp": {
  16534. "type": "object",
  16535. "additionalProperties": {
  16536. "anyOf": [
  16537. {
  16538. "$ref": "#/components/schemas/McpLocalConfig"
  16539. },
  16540. {
  16541. "$ref": "#/components/schemas/McpRemoteConfig"
  16542. },
  16543. {
  16544. "type": "object",
  16545. "properties": {
  16546. "enabled": {
  16547. "type": "boolean"
  16548. }
  16549. },
  16550. "required": ["enabled"],
  16551. "additionalProperties": false
  16552. }
  16553. ]
  16554. }
  16555. },
  16556. "formatter": {
  16557. "anyOf": [
  16558. {
  16559. "type": "boolean"
  16560. },
  16561. {
  16562. "type": "object",
  16563. "additionalProperties": {
  16564. "type": "object",
  16565. "properties": {
  16566. "disabled": {
  16567. "type": "boolean"
  16568. },
  16569. "command": {
  16570. "type": "array",
  16571. "items": {
  16572. "type": "string"
  16573. }
  16574. },
  16575. "environment": {
  16576. "type": "object",
  16577. "additionalProperties": {
  16578. "type": "string"
  16579. }
  16580. },
  16581. "extensions": {
  16582. "type": "array",
  16583. "items": {
  16584. "type": "string"
  16585. }
  16586. }
  16587. },
  16588. "additionalProperties": false
  16589. }
  16590. }
  16591. ],
  16592. "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."
  16593. },
  16594. "lsp": {
  16595. "anyOf": [
  16596. {
  16597. "type": "boolean"
  16598. },
  16599. {
  16600. "type": "object",
  16601. "additionalProperties": {
  16602. "anyOf": [
  16603. {
  16604. "type": "object",
  16605. "properties": {
  16606. "disabled": {
  16607. "type": "boolean",
  16608. "enum": [true]
  16609. }
  16610. },
  16611. "required": ["disabled"],
  16612. "additionalProperties": false
  16613. },
  16614. {
  16615. "type": "object",
  16616. "properties": {
  16617. "command": {
  16618. "type": "array",
  16619. "items": {
  16620. "type": "string"
  16621. }
  16622. },
  16623. "extensions": {
  16624. "type": "array",
  16625. "items": {
  16626. "type": "string"
  16627. }
  16628. },
  16629. "disabled": {
  16630. "type": "boolean"
  16631. },
  16632. "env": {
  16633. "type": "object",
  16634. "additionalProperties": {
  16635. "type": "string"
  16636. }
  16637. },
  16638. "initialization": {
  16639. "type": "object"
  16640. }
  16641. },
  16642. "required": ["command"],
  16643. "additionalProperties": false
  16644. }
  16645. ]
  16646. }
  16647. }
  16648. ],
  16649. "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."
  16650. },
  16651. "instructions": {
  16652. "type": "array",
  16653. "items": {
  16654. "type": "string"
  16655. }
  16656. },
  16657. "layout": {
  16658. "$ref": "#/components/schemas/LayoutConfig"
  16659. },
  16660. "permission": {
  16661. "$ref": "#/components/schemas/PermissionConfig"
  16662. },
  16663. "tools": {
  16664. "type": "object",
  16665. "additionalProperties": {
  16666. "type": "boolean"
  16667. }
  16668. },
  16669. "attachment": {
  16670. "$ref": "#/components/schemas/AttachmentConfig"
  16671. },
  16672. "enterprise": {
  16673. "type": "object",
  16674. "properties": {
  16675. "url": {
  16676. "type": "string"
  16677. }
  16678. },
  16679. "additionalProperties": false
  16680. },
  16681. "tool_output": {
  16682. "type": "object",
  16683. "properties": {
  16684. "max_lines": {
  16685. "type": "integer",
  16686. "exclusiveMinimum": 0
  16687. },
  16688. "max_bytes": {
  16689. "type": "integer",
  16690. "exclusiveMinimum": 0
  16691. }
  16692. },
  16693. "additionalProperties": false
  16694. },
  16695. "compaction": {
  16696. "type": "object",
  16697. "properties": {
  16698. "auto": {
  16699. "type": "boolean"
  16700. },
  16701. "prune": {
  16702. "type": "boolean"
  16703. },
  16704. "tail_turns": {
  16705. "type": "integer",
  16706. "minimum": 0
  16707. },
  16708. "preserve_recent_tokens": {
  16709. "type": "integer",
  16710. "minimum": 0
  16711. },
  16712. "reserved": {
  16713. "type": "integer",
  16714. "minimum": 0
  16715. }
  16716. },
  16717. "additionalProperties": false
  16718. },
  16719. "experimental": {
  16720. "type": "object",
  16721. "properties": {
  16722. "disable_paste_summary": {
  16723. "type": "boolean"
  16724. },
  16725. "batch_tool": {
  16726. "type": "boolean"
  16727. },
  16728. "openTelemetry": {
  16729. "type": "boolean"
  16730. },
  16731. "primary_tools": {
  16732. "type": "array",
  16733. "items": {
  16734. "type": "string"
  16735. }
  16736. },
  16737. "continue_loop_on_deny": {
  16738. "type": "boolean"
  16739. },
  16740. "mcp_timeout": {
  16741. "type": "integer",
  16742. "exclusiveMinimum": 0
  16743. },
  16744. "policies": {
  16745. "type": "array",
  16746. "items": {
  16747. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  16748. }
  16749. }
  16750. },
  16751. "additionalProperties": false
  16752. }
  16753. },
  16754. "additionalProperties": false
  16755. },
  16756. "Model": {
  16757. "type": "object",
  16758. "properties": {
  16759. "id": {
  16760. "type": "string"
  16761. },
  16762. "providerID": {
  16763. "type": "string"
  16764. },
  16765. "api": {
  16766. "type": "object",
  16767. "properties": {
  16768. "id": {
  16769. "type": "string"
  16770. },
  16771. "url": {
  16772. "type": "string"
  16773. },
  16774. "npm": {
  16775. "type": "string"
  16776. }
  16777. },
  16778. "required": ["id", "url", "npm"],
  16779. "additionalProperties": false
  16780. },
  16781. "name": {
  16782. "type": "string"
  16783. },
  16784. "family": {
  16785. "type": "string"
  16786. },
  16787. "capabilities": {
  16788. "type": "object",
  16789. "properties": {
  16790. "temperature": {
  16791. "type": "boolean"
  16792. },
  16793. "reasoning": {
  16794. "type": "boolean"
  16795. },
  16796. "attachment": {
  16797. "type": "boolean"
  16798. },
  16799. "toolcall": {
  16800. "type": "boolean"
  16801. },
  16802. "input": {
  16803. "type": "object",
  16804. "properties": {
  16805. "text": {
  16806. "type": "boolean"
  16807. },
  16808. "audio": {
  16809. "type": "boolean"
  16810. },
  16811. "image": {
  16812. "type": "boolean"
  16813. },
  16814. "video": {
  16815. "type": "boolean"
  16816. },
  16817. "pdf": {
  16818. "type": "boolean"
  16819. }
  16820. },
  16821. "required": ["text", "audio", "image", "video", "pdf"],
  16822. "additionalProperties": false
  16823. },
  16824. "output": {
  16825. "type": "object",
  16826. "properties": {
  16827. "text": {
  16828. "type": "boolean"
  16829. },
  16830. "audio": {
  16831. "type": "boolean"
  16832. },
  16833. "image": {
  16834. "type": "boolean"
  16835. },
  16836. "video": {
  16837. "type": "boolean"
  16838. },
  16839. "pdf": {
  16840. "type": "boolean"
  16841. }
  16842. },
  16843. "required": ["text", "audio", "image", "video", "pdf"],
  16844. "additionalProperties": false
  16845. },
  16846. "interleaved": {
  16847. "anyOf": [
  16848. {
  16849. "type": "boolean"
  16850. },
  16851. {
  16852. "type": "object",
  16853. "properties": {
  16854. "field": {
  16855. "type": "string",
  16856. "enum": ["reasoning_content", "reasoning_details"]
  16857. }
  16858. },
  16859. "required": ["field"],
  16860. "additionalProperties": false
  16861. }
  16862. ]
  16863. }
  16864. },
  16865. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  16866. "additionalProperties": false
  16867. },
  16868. "cost": {
  16869. "type": "object",
  16870. "properties": {
  16871. "input": {
  16872. "type": "number"
  16873. },
  16874. "output": {
  16875. "type": "number"
  16876. },
  16877. "cache": {
  16878. "type": "object",
  16879. "properties": {
  16880. "read": {
  16881. "type": "number"
  16882. },
  16883. "write": {
  16884. "type": "number"
  16885. }
  16886. },
  16887. "required": ["read", "write"],
  16888. "additionalProperties": false
  16889. },
  16890. "tiers": {
  16891. "type": "array",
  16892. "items": {
  16893. "type": "object",
  16894. "properties": {
  16895. "input": {
  16896. "type": "number"
  16897. },
  16898. "output": {
  16899. "type": "number"
  16900. },
  16901. "cache": {
  16902. "type": "object",
  16903. "properties": {
  16904. "read": {
  16905. "type": "number"
  16906. },
  16907. "write": {
  16908. "type": "number"
  16909. }
  16910. },
  16911. "required": ["read", "write"],
  16912. "additionalProperties": false
  16913. },
  16914. "tier": {
  16915. "type": "object",
  16916. "properties": {
  16917. "type": {
  16918. "type": "string",
  16919. "enum": ["context"]
  16920. },
  16921. "size": {
  16922. "type": "number"
  16923. }
  16924. },
  16925. "required": ["type", "size"],
  16926. "additionalProperties": false
  16927. }
  16928. },
  16929. "required": ["input", "output", "cache", "tier"],
  16930. "additionalProperties": false
  16931. }
  16932. },
  16933. "experimentalOver200K": {
  16934. "type": "object",
  16935. "properties": {
  16936. "input": {
  16937. "type": "number"
  16938. },
  16939. "output": {
  16940. "type": "number"
  16941. },
  16942. "cache": {
  16943. "type": "object",
  16944. "properties": {
  16945. "read": {
  16946. "type": "number"
  16947. },
  16948. "write": {
  16949. "type": "number"
  16950. }
  16951. },
  16952. "required": ["read", "write"],
  16953. "additionalProperties": false
  16954. }
  16955. },
  16956. "required": ["input", "output", "cache"],
  16957. "additionalProperties": false
  16958. }
  16959. },
  16960. "required": ["input", "output", "cache"],
  16961. "additionalProperties": false
  16962. },
  16963. "limit": {
  16964. "type": "object",
  16965. "properties": {
  16966. "context": {
  16967. "type": "number"
  16968. },
  16969. "input": {
  16970. "type": "number"
  16971. },
  16972. "output": {
  16973. "type": "number"
  16974. }
  16975. },
  16976. "required": ["context", "output"],
  16977. "additionalProperties": false
  16978. },
  16979. "status": {
  16980. "type": "string",
  16981. "enum": ["alpha", "beta", "deprecated", "active"]
  16982. },
  16983. "options": {
  16984. "type": "object"
  16985. },
  16986. "headers": {
  16987. "type": "object",
  16988. "additionalProperties": {
  16989. "type": "string"
  16990. }
  16991. },
  16992. "release_date": {
  16993. "type": "string"
  16994. },
  16995. "variants": {
  16996. "type": "object",
  16997. "additionalProperties": {
  16998. "type": "object"
  16999. }
  17000. }
  17001. },
  17002. "required": [
  17003. "id",
  17004. "providerID",
  17005. "api",
  17006. "name",
  17007. "capabilities",
  17008. "cost",
  17009. "limit",
  17010. "status",
  17011. "options",
  17012. "headers",
  17013. "release_date"
  17014. ],
  17015. "additionalProperties": false
  17016. },
  17017. "Provider": {
  17018. "type": "object",
  17019. "properties": {
  17020. "id": {
  17021. "type": "string"
  17022. },
  17023. "name": {
  17024. "type": "string"
  17025. },
  17026. "source": {
  17027. "type": "string",
  17028. "enum": ["env", "config", "custom", "api"]
  17029. },
  17030. "env": {
  17031. "type": "array",
  17032. "items": {
  17033. "type": "string"
  17034. }
  17035. },
  17036. "key": {
  17037. "type": "string"
  17038. },
  17039. "options": {
  17040. "type": "object"
  17041. },
  17042. "models": {
  17043. "type": "object",
  17044. "additionalProperties": {
  17045. "$ref": "#/components/schemas/Model"
  17046. }
  17047. }
  17048. },
  17049. "required": ["id", "name", "source", "env", "options", "models"],
  17050. "additionalProperties": false
  17051. },
  17052. "ConsoleState": {
  17053. "type": "object",
  17054. "properties": {
  17055. "consoleManagedProviders": {
  17056. "type": "array",
  17057. "items": {
  17058. "type": "string"
  17059. }
  17060. },
  17061. "activeOrgName": {
  17062. "type": "string"
  17063. },
  17064. "switchableOrgCount": {
  17065. "type": "integer",
  17066. "minimum": 0
  17067. }
  17068. },
  17069. "required": ["consoleManagedProviders", "switchableOrgCount"],
  17070. "additionalProperties": false
  17071. },
  17072. "effect_HttpApiError_InternalServerError": {
  17073. "type": "object",
  17074. "properties": {
  17075. "_tag": {
  17076. "type": "string",
  17077. "enum": ["InternalServerError"]
  17078. }
  17079. },
  17080. "required": ["_tag"],
  17081. "additionalProperties": false
  17082. },
  17083. "ToolListItem": {
  17084. "type": "object",
  17085. "properties": {
  17086. "id": {
  17087. "type": "string"
  17088. },
  17089. "description": {
  17090. "type": "string"
  17091. },
  17092. "parameters": {}
  17093. },
  17094. "required": ["id", "description", "parameters"],
  17095. "additionalProperties": false
  17096. },
  17097. "ToolList": {
  17098. "type": "array",
  17099. "items": {
  17100. "$ref": "#/components/schemas/ToolListItem"
  17101. }
  17102. },
  17103. "ToolIDs": {
  17104. "type": "array",
  17105. "items": {
  17106. "type": "string"
  17107. }
  17108. },
  17109. "WorktreeError": {
  17110. "type": "object",
  17111. "properties": {
  17112. "name": {
  17113. "type": "string",
  17114. "enum": [
  17115. "WorktreeNotGitError",
  17116. "WorktreeNameGenerationFailedError",
  17117. "WorktreeCreateFailedError",
  17118. "WorktreeStartCommandFailedError",
  17119. "WorktreeRemoveFailedError",
  17120. "WorktreeResetFailedError",
  17121. "WorktreeListFailedError"
  17122. ]
  17123. },
  17124. "data": {
  17125. "type": "object",
  17126. "properties": {
  17127. "message": {
  17128. "type": "string"
  17129. }
  17130. },
  17131. "required": ["message"],
  17132. "additionalProperties": false
  17133. }
  17134. },
  17135. "required": ["name", "data"],
  17136. "additionalProperties": false
  17137. },
  17138. "WorktreeCreateInput": {
  17139. "type": "object",
  17140. "properties": {
  17141. "name": {
  17142. "type": "string"
  17143. },
  17144. "startCommand": {
  17145. "type": "string",
  17146. "description": "Additional startup script to run after the project's start command"
  17147. }
  17148. },
  17149. "additionalProperties": false
  17150. },
  17151. "Worktree": {
  17152. "type": "object",
  17153. "properties": {
  17154. "name": {
  17155. "type": "string"
  17156. },
  17157. "branch": {
  17158. "type": "string"
  17159. },
  17160. "directory": {
  17161. "type": "string"
  17162. }
  17163. },
  17164. "required": ["name", "directory"],
  17165. "additionalProperties": false
  17166. },
  17167. "WorktreeRemoveInput": {
  17168. "type": "object",
  17169. "properties": {
  17170. "directory": {
  17171. "type": "string"
  17172. }
  17173. },
  17174. "required": ["directory"],
  17175. "additionalProperties": false
  17176. },
  17177. "WorktreeResetInput": {
  17178. "type": "object",
  17179. "properties": {
  17180. "directory": {
  17181. "type": "string"
  17182. }
  17183. },
  17184. "required": ["directory"],
  17185. "additionalProperties": false
  17186. },
  17187. "ProjectSummary": {
  17188. "type": "object",
  17189. "properties": {
  17190. "id": {
  17191. "type": "string"
  17192. },
  17193. "name": {
  17194. "type": "string"
  17195. },
  17196. "worktree": {
  17197. "type": "string"
  17198. }
  17199. },
  17200. "required": ["id", "worktree"],
  17201. "additionalProperties": false
  17202. },
  17203. "GlobalSession": {
  17204. "type": "object",
  17205. "properties": {
  17206. "id": {
  17207. "type": "string",
  17208. "pattern": "^ses"
  17209. },
  17210. "slug": {
  17211. "type": "string"
  17212. },
  17213. "projectID": {
  17214. "type": "string"
  17215. },
  17216. "workspaceID": {
  17217. "type": "string",
  17218. "pattern": "^wrk"
  17219. },
  17220. "directory": {
  17221. "type": "string"
  17222. },
  17223. "path": {
  17224. "type": "string"
  17225. },
  17226. "parentID": {
  17227. "type": "string",
  17228. "pattern": "^ses"
  17229. },
  17230. "summary": {
  17231. "type": "object",
  17232. "properties": {
  17233. "additions": {
  17234. "type": "number"
  17235. },
  17236. "deletions": {
  17237. "type": "number"
  17238. },
  17239. "files": {
  17240. "type": "number"
  17241. },
  17242. "diffs": {
  17243. "type": "array",
  17244. "items": {
  17245. "$ref": "#/components/schemas/SnapshotFileDiff"
  17246. }
  17247. }
  17248. },
  17249. "required": ["additions", "deletions", "files"],
  17250. "additionalProperties": false
  17251. },
  17252. "cost": {
  17253. "type": "number"
  17254. },
  17255. "tokens": {
  17256. "type": "object",
  17257. "properties": {
  17258. "input": {
  17259. "type": "number"
  17260. },
  17261. "output": {
  17262. "type": "number"
  17263. },
  17264. "reasoning": {
  17265. "type": "number"
  17266. },
  17267. "cache": {
  17268. "type": "object",
  17269. "properties": {
  17270. "read": {
  17271. "type": "number"
  17272. },
  17273. "write": {
  17274. "type": "number"
  17275. }
  17276. },
  17277. "required": ["read", "write"],
  17278. "additionalProperties": false
  17279. }
  17280. },
  17281. "required": ["input", "output", "reasoning", "cache"],
  17282. "additionalProperties": false
  17283. },
  17284. "share": {
  17285. "type": "object",
  17286. "properties": {
  17287. "url": {
  17288. "type": "string"
  17289. }
  17290. },
  17291. "required": ["url"],
  17292. "additionalProperties": false
  17293. },
  17294. "title": {
  17295. "type": "string"
  17296. },
  17297. "agent": {
  17298. "type": "string"
  17299. },
  17300. "model": {
  17301. "type": "object",
  17302. "properties": {
  17303. "id": {
  17304. "type": "string"
  17305. },
  17306. "providerID": {
  17307. "type": "string"
  17308. },
  17309. "variant": {
  17310. "type": "string"
  17311. }
  17312. },
  17313. "required": ["id", "providerID"],
  17314. "additionalProperties": false
  17315. },
  17316. "version": {
  17317. "type": "string"
  17318. },
  17319. "metadata": {
  17320. "type": "object"
  17321. },
  17322. "time": {
  17323. "type": "object",
  17324. "properties": {
  17325. "created": {
  17326. "type": "integer",
  17327. "minimum": 0
  17328. },
  17329. "updated": {
  17330. "type": "integer",
  17331. "minimum": 0
  17332. },
  17333. "compacting": {
  17334. "type": "integer",
  17335. "minimum": 0
  17336. },
  17337. "archived": {
  17338. "type": "number"
  17339. }
  17340. },
  17341. "required": ["created", "updated"],
  17342. "additionalProperties": false
  17343. },
  17344. "permission": {
  17345. "$ref": "#/components/schemas/PermissionRuleset"
  17346. },
  17347. "revert": {
  17348. "type": "object",
  17349. "properties": {
  17350. "messageID": {
  17351. "type": "string",
  17352. "pattern": "^msg"
  17353. },
  17354. "partID": {
  17355. "type": "string",
  17356. "pattern": "^prt"
  17357. },
  17358. "snapshot": {
  17359. "type": "string"
  17360. },
  17361. "diff": {
  17362. "type": "string"
  17363. }
  17364. },
  17365. "required": ["messageID"],
  17366. "additionalProperties": false
  17367. },
  17368. "project": {
  17369. "anyOf": [
  17370. {
  17371. "$ref": "#/components/schemas/ProjectSummary"
  17372. },
  17373. {
  17374. "type": "null"
  17375. }
  17376. ]
  17377. }
  17378. },
  17379. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  17380. "additionalProperties": false
  17381. },
  17382. "McpResource": {
  17383. "type": "object",
  17384. "properties": {
  17385. "name": {
  17386. "type": "string"
  17387. },
  17388. "uri": {
  17389. "type": "string"
  17390. },
  17391. "description": {
  17392. "type": "string"
  17393. },
  17394. "mimeType": {
  17395. "type": "string"
  17396. },
  17397. "client": {
  17398. "type": "string"
  17399. }
  17400. },
  17401. "required": ["name", "uri", "client"],
  17402. "additionalProperties": false
  17403. },
  17404. "Symbol": {
  17405. "type": "object",
  17406. "properties": {
  17407. "name": {
  17408. "type": "string"
  17409. },
  17410. "kind": {
  17411. "type": "integer",
  17412. "minimum": 0
  17413. },
  17414. "location": {
  17415. "type": "object",
  17416. "properties": {
  17417. "uri": {
  17418. "type": "string"
  17419. },
  17420. "range": {
  17421. "$ref": "#/components/schemas/Range"
  17422. }
  17423. },
  17424. "required": ["uri", "range"],
  17425. "additionalProperties": false
  17426. }
  17427. },
  17428. "required": ["name", "kind", "location"],
  17429. "additionalProperties": false
  17430. },
  17431. "FileNode": {
  17432. "type": "object",
  17433. "properties": {
  17434. "name": {
  17435. "type": "string"
  17436. },
  17437. "path": {
  17438. "type": "string"
  17439. },
  17440. "absolute": {
  17441. "type": "string"
  17442. },
  17443. "type": {
  17444. "type": "string",
  17445. "enum": ["file", "directory"]
  17446. },
  17447. "ignored": {
  17448. "type": "boolean"
  17449. }
  17450. },
  17451. "required": ["name", "path", "absolute", "type", "ignored"],
  17452. "additionalProperties": false
  17453. },
  17454. "FileContent": {
  17455. "type": "object",
  17456. "properties": {
  17457. "type": {
  17458. "type": "string",
  17459. "enum": ["text", "binary"]
  17460. },
  17461. "content": {
  17462. "type": "string"
  17463. },
  17464. "diff": {
  17465. "type": "string"
  17466. },
  17467. "patch": {
  17468. "type": "object",
  17469. "properties": {
  17470. "oldFileName": {
  17471. "type": "string"
  17472. },
  17473. "newFileName": {
  17474. "type": "string"
  17475. },
  17476. "oldHeader": {
  17477. "type": "string"
  17478. },
  17479. "newHeader": {
  17480. "type": "string"
  17481. },
  17482. "hunks": {
  17483. "type": "array",
  17484. "items": {
  17485. "type": "object",
  17486. "properties": {
  17487. "oldStart": {
  17488. "type": "integer",
  17489. "minimum": 0
  17490. },
  17491. "oldLines": {
  17492. "type": "integer",
  17493. "minimum": 0
  17494. },
  17495. "newStart": {
  17496. "type": "integer",
  17497. "minimum": 0
  17498. },
  17499. "newLines": {
  17500. "type": "integer",
  17501. "minimum": 0
  17502. },
  17503. "lines": {
  17504. "type": "array",
  17505. "items": {
  17506. "type": "string"
  17507. }
  17508. }
  17509. },
  17510. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  17511. "additionalProperties": false
  17512. }
  17513. },
  17514. "index": {
  17515. "type": "string"
  17516. }
  17517. },
  17518. "required": ["oldFileName", "newFileName", "hunks"],
  17519. "additionalProperties": false
  17520. },
  17521. "encoding": {
  17522. "type": "string",
  17523. "enum": ["base64"]
  17524. },
  17525. "mimeType": {
  17526. "type": "string"
  17527. }
  17528. },
  17529. "required": ["type", "content"],
  17530. "additionalProperties": false
  17531. },
  17532. "File": {
  17533. "type": "object",
  17534. "properties": {
  17535. "path": {
  17536. "type": "string"
  17537. },
  17538. "added": {
  17539. "type": "integer",
  17540. "minimum": 0
  17541. },
  17542. "removed": {
  17543. "type": "integer",
  17544. "minimum": 0
  17545. },
  17546. "status": {
  17547. "type": "string",
  17548. "enum": ["added", "deleted", "modified"]
  17549. }
  17550. },
  17551. "required": ["path", "added", "removed", "status"],
  17552. "additionalProperties": false
  17553. },
  17554. "Path": {
  17555. "type": "object",
  17556. "properties": {
  17557. "home": {
  17558. "type": "string"
  17559. },
  17560. "state": {
  17561. "type": "string"
  17562. },
  17563. "config": {
  17564. "type": "string"
  17565. },
  17566. "worktree": {
  17567. "type": "string"
  17568. },
  17569. "directory": {
  17570. "type": "string"
  17571. }
  17572. },
  17573. "required": ["home", "state", "config", "worktree", "directory"],
  17574. "additionalProperties": false
  17575. },
  17576. "VcsInfo": {
  17577. "type": "object",
  17578. "properties": {
  17579. "branch": {
  17580. "type": "string"
  17581. },
  17582. "default_branch": {
  17583. "type": "string"
  17584. }
  17585. },
  17586. "additionalProperties": false
  17587. },
  17588. "VcsFileStatus": {
  17589. "type": "object",
  17590. "properties": {
  17591. "file": {
  17592. "type": "string"
  17593. },
  17594. "additions": {
  17595. "type": "number"
  17596. },
  17597. "deletions": {
  17598. "type": "number"
  17599. },
  17600. "status": {
  17601. "type": "string",
  17602. "enum": ["added", "deleted", "modified"]
  17603. }
  17604. },
  17605. "required": ["file", "additions", "deletions", "status"],
  17606. "additionalProperties": false
  17607. },
  17608. "VcsFileDiff": {
  17609. "type": "object",
  17610. "properties": {
  17611. "file": {
  17612. "type": "string"
  17613. },
  17614. "patch": {
  17615. "type": "string"
  17616. },
  17617. "additions": {
  17618. "type": "number"
  17619. },
  17620. "deletions": {
  17621. "type": "number"
  17622. },
  17623. "status": {
  17624. "type": "string",
  17625. "enum": ["added", "deleted", "modified"]
  17626. }
  17627. },
  17628. "required": ["file", "additions", "deletions"],
  17629. "additionalProperties": false
  17630. },
  17631. "VcsApplyError": {
  17632. "type": "object",
  17633. "properties": {
  17634. "name": {
  17635. "type": "string",
  17636. "enum": ["VcsApplyError"]
  17637. },
  17638. "data": {
  17639. "type": "object",
  17640. "properties": {
  17641. "message": {
  17642. "type": "string"
  17643. },
  17644. "reason": {
  17645. "type": "string",
  17646. "enum": ["non-git", "not-clean"]
  17647. }
  17648. },
  17649. "required": ["message", "reason"],
  17650. "additionalProperties": false
  17651. }
  17652. },
  17653. "required": ["name", "data"],
  17654. "additionalProperties": false
  17655. },
  17656. "Command": {
  17657. "type": "object",
  17658. "properties": {
  17659. "name": {
  17660. "type": "string"
  17661. },
  17662. "description": {
  17663. "type": "string"
  17664. },
  17665. "agent": {
  17666. "type": "string"
  17667. },
  17668. "model": {
  17669. "type": "string"
  17670. },
  17671. "source": {
  17672. "type": "string",
  17673. "enum": ["command", "mcp", "skill"]
  17674. },
  17675. "template": {
  17676. "type": "string"
  17677. },
  17678. "subtask": {
  17679. "type": "boolean"
  17680. },
  17681. "hints": {
  17682. "type": "array",
  17683. "items": {
  17684. "type": "string"
  17685. }
  17686. }
  17687. },
  17688. "required": ["name", "template", "hints"],
  17689. "additionalProperties": false
  17690. },
  17691. "Agent": {
  17692. "type": "object",
  17693. "properties": {
  17694. "name": {
  17695. "type": "string"
  17696. },
  17697. "description": {
  17698. "type": "string"
  17699. },
  17700. "mode": {
  17701. "type": "string",
  17702. "enum": ["subagent", "primary", "all"]
  17703. },
  17704. "native": {
  17705. "type": "boolean"
  17706. },
  17707. "hidden": {
  17708. "type": "boolean"
  17709. },
  17710. "topP": {
  17711. "type": "number"
  17712. },
  17713. "temperature": {
  17714. "type": "number"
  17715. },
  17716. "color": {
  17717. "type": "string"
  17718. },
  17719. "permission": {
  17720. "$ref": "#/components/schemas/PermissionRuleset"
  17721. },
  17722. "model": {
  17723. "type": "object",
  17724. "properties": {
  17725. "modelID": {
  17726. "type": "string"
  17727. },
  17728. "providerID": {
  17729. "type": "string"
  17730. }
  17731. },
  17732. "required": ["modelID", "providerID"],
  17733. "additionalProperties": false
  17734. },
  17735. "variant": {
  17736. "type": "string"
  17737. },
  17738. "prompt": {
  17739. "type": "string"
  17740. },
  17741. "options": {
  17742. "type": "object"
  17743. },
  17744. "steps": {
  17745. "type": "number"
  17746. }
  17747. },
  17748. "required": ["name", "mode", "permission", "options"],
  17749. "additionalProperties": false
  17750. },
  17751. "LSPStatus": {
  17752. "type": "object",
  17753. "properties": {
  17754. "id": {
  17755. "type": "string"
  17756. },
  17757. "name": {
  17758. "type": "string"
  17759. },
  17760. "root": {
  17761. "type": "string"
  17762. },
  17763. "status": {
  17764. "type": "string",
  17765. "enum": ["connected", "error"]
  17766. }
  17767. },
  17768. "required": ["id", "name", "root", "status"],
  17769. "additionalProperties": false
  17770. },
  17771. "FormatterStatus": {
  17772. "type": "object",
  17773. "properties": {
  17774. "name": {
  17775. "type": "string"
  17776. },
  17777. "extensions": {
  17778. "type": "array",
  17779. "items": {
  17780. "type": "string"
  17781. }
  17782. },
  17783. "enabled": {
  17784. "type": "boolean"
  17785. }
  17786. },
  17787. "required": ["name", "extensions", "enabled"],
  17788. "additionalProperties": false
  17789. },
  17790. "MCPStatusConnected": {
  17791. "type": "object",
  17792. "properties": {
  17793. "status": {
  17794. "type": "string",
  17795. "enum": ["connected"]
  17796. }
  17797. },
  17798. "required": ["status"],
  17799. "additionalProperties": false
  17800. },
  17801. "MCPStatusDisabled": {
  17802. "type": "object",
  17803. "properties": {
  17804. "status": {
  17805. "type": "string",
  17806. "enum": ["disabled"]
  17807. }
  17808. },
  17809. "required": ["status"],
  17810. "additionalProperties": false
  17811. },
  17812. "MCPStatusFailed": {
  17813. "type": "object",
  17814. "properties": {
  17815. "status": {
  17816. "type": "string",
  17817. "enum": ["failed"]
  17818. },
  17819. "error": {
  17820. "type": "string"
  17821. }
  17822. },
  17823. "required": ["status", "error"],
  17824. "additionalProperties": false
  17825. },
  17826. "MCPStatusNeedsAuth": {
  17827. "type": "object",
  17828. "properties": {
  17829. "status": {
  17830. "type": "string",
  17831. "enum": ["needs_auth"]
  17832. }
  17833. },
  17834. "required": ["status"],
  17835. "additionalProperties": false
  17836. },
  17837. "MCPStatusNeedsClientRegistration": {
  17838. "type": "object",
  17839. "properties": {
  17840. "status": {
  17841. "type": "string",
  17842. "enum": ["needs_client_registration"]
  17843. },
  17844. "error": {
  17845. "type": "string"
  17846. }
  17847. },
  17848. "required": ["status", "error"],
  17849. "additionalProperties": false
  17850. },
  17851. "MCPStatus": {
  17852. "anyOf": [
  17853. {
  17854. "$ref": "#/components/schemas/MCPStatusConnected"
  17855. },
  17856. {
  17857. "$ref": "#/components/schemas/MCPStatusDisabled"
  17858. },
  17859. {
  17860. "$ref": "#/components/schemas/MCPStatusFailed"
  17861. },
  17862. {
  17863. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  17864. },
  17865. {
  17866. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  17867. }
  17868. ]
  17869. },
  17870. "McpUnsupportedOAuthError": {
  17871. "type": "object",
  17872. "properties": {
  17873. "error": {
  17874. "type": "string"
  17875. }
  17876. },
  17877. "required": ["error"],
  17878. "additionalProperties": false
  17879. },
  17880. "McpServerNotFoundError": {
  17881. "type": "object",
  17882. "properties": {
  17883. "_tag": {
  17884. "type": "string",
  17885. "enum": ["McpServerNotFoundError"]
  17886. },
  17887. "name": {
  17888. "type": "string"
  17889. },
  17890. "message": {
  17891. "type": "string"
  17892. }
  17893. },
  17894. "required": ["_tag", "name", "message"],
  17895. "additionalProperties": false
  17896. },
  17897. "Project": {
  17898. "type": "object",
  17899. "properties": {
  17900. "id": {
  17901. "type": "string"
  17902. },
  17903. "worktree": {
  17904. "type": "string"
  17905. },
  17906. "vcs": {
  17907. "type": "string",
  17908. "enum": ["git"]
  17909. },
  17910. "name": {
  17911. "type": "string"
  17912. },
  17913. "icon": {
  17914. "type": "object",
  17915. "properties": {
  17916. "url": {
  17917. "type": "string"
  17918. },
  17919. "override": {
  17920. "type": "string"
  17921. },
  17922. "color": {
  17923. "type": "string"
  17924. }
  17925. },
  17926. "additionalProperties": false
  17927. },
  17928. "commands": {
  17929. "type": "object",
  17930. "properties": {
  17931. "start": {
  17932. "type": "string",
  17933. "description": "Startup script to run when creating a new workspace (worktree)"
  17934. }
  17935. },
  17936. "additionalProperties": false
  17937. },
  17938. "time": {
  17939. "type": "object",
  17940. "properties": {
  17941. "created": {
  17942. "type": "integer",
  17943. "minimum": 0
  17944. },
  17945. "updated": {
  17946. "type": "integer",
  17947. "minimum": 0
  17948. },
  17949. "initialized": {
  17950. "type": "integer",
  17951. "minimum": 0
  17952. }
  17953. },
  17954. "required": ["created", "updated"],
  17955. "additionalProperties": false
  17956. },
  17957. "sandboxes": {
  17958. "type": "array",
  17959. "items": {
  17960. "type": "string"
  17961. }
  17962. }
  17963. },
  17964. "required": ["id", "worktree", "time", "sandboxes"],
  17965. "additionalProperties": false
  17966. },
  17967. "ProjectNotFoundError": {
  17968. "type": "object",
  17969. "properties": {
  17970. "_tag": {
  17971. "type": "string",
  17972. "enum": ["ProjectNotFoundError"]
  17973. },
  17974. "projectID": {
  17975. "type": "string"
  17976. },
  17977. "message": {
  17978. "type": "string"
  17979. }
  17980. },
  17981. "required": ["_tag", "projectID", "message"],
  17982. "additionalProperties": false
  17983. },
  17984. "PtyNotFoundError": {
  17985. "type": "object",
  17986. "properties": {
  17987. "_tag": {
  17988. "type": "string",
  17989. "enum": ["PtyNotFoundError"]
  17990. },
  17991. "ptyID": {
  17992. "type": "string"
  17993. },
  17994. "message": {
  17995. "type": "string"
  17996. }
  17997. },
  17998. "required": ["_tag", "ptyID", "message"],
  17999. "additionalProperties": false
  18000. },
  18001. "PtyForbiddenError": {
  18002. "type": "object",
  18003. "properties": {
  18004. "_tag": {
  18005. "type": "string",
  18006. "enum": ["PtyForbiddenError"]
  18007. },
  18008. "message": {
  18009. "type": "string"
  18010. }
  18011. },
  18012. "required": ["_tag", "message"],
  18013. "additionalProperties": false
  18014. },
  18015. "QuestionRequest": {
  18016. "type": "object",
  18017. "properties": {
  18018. "id": {
  18019. "type": "string",
  18020. "pattern": "^que"
  18021. },
  18022. "sessionID": {
  18023. "type": "string",
  18024. "pattern": "^ses"
  18025. },
  18026. "questions": {
  18027. "type": "array",
  18028. "items": {
  18029. "$ref": "#/components/schemas/QuestionInfo"
  18030. },
  18031. "description": "Questions to ask"
  18032. },
  18033. "tool": {
  18034. "$ref": "#/components/schemas/QuestionTool"
  18035. }
  18036. },
  18037. "required": ["id", "sessionID", "questions"],
  18038. "additionalProperties": false
  18039. },
  18040. "QuestionNotFoundError": {
  18041. "type": "object",
  18042. "properties": {
  18043. "_tag": {
  18044. "type": "string",
  18045. "enum": ["QuestionNotFoundError"]
  18046. },
  18047. "requestID": {
  18048. "type": "string"
  18049. },
  18050. "message": {
  18051. "type": "string"
  18052. }
  18053. },
  18054. "required": ["_tag", "requestID", "message"],
  18055. "additionalProperties": false
  18056. },
  18057. "PermissionRequest": {
  18058. "type": "object",
  18059. "properties": {
  18060. "id": {
  18061. "type": "string",
  18062. "pattern": "^per"
  18063. },
  18064. "sessionID": {
  18065. "type": "string",
  18066. "pattern": "^ses"
  18067. },
  18068. "permission": {
  18069. "type": "string"
  18070. },
  18071. "patterns": {
  18072. "type": "array",
  18073. "items": {
  18074. "type": "string"
  18075. }
  18076. },
  18077. "metadata": {
  18078. "type": "object"
  18079. },
  18080. "always": {
  18081. "type": "array",
  18082. "items": {
  18083. "type": "string"
  18084. }
  18085. },
  18086. "tool": {
  18087. "type": "object",
  18088. "properties": {
  18089. "messageID": {
  18090. "type": "string"
  18091. },
  18092. "callID": {
  18093. "type": "string"
  18094. }
  18095. },
  18096. "required": ["messageID", "callID"],
  18097. "additionalProperties": false
  18098. }
  18099. },
  18100. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  18101. "additionalProperties": false
  18102. },
  18103. "PermissionNotFoundError": {
  18104. "type": "object",
  18105. "properties": {
  18106. "_tag": {
  18107. "type": "string",
  18108. "enum": ["PermissionNotFoundError"]
  18109. },
  18110. "requestID": {
  18111. "type": "string"
  18112. },
  18113. "message": {
  18114. "type": "string"
  18115. }
  18116. },
  18117. "required": ["_tag", "requestID", "message"],
  18118. "additionalProperties": false
  18119. },
  18120. "ProviderAuthMethod": {
  18121. "type": "object",
  18122. "properties": {
  18123. "type": {
  18124. "type": "string",
  18125. "enum": ["oauth", "api"]
  18126. },
  18127. "label": {
  18128. "type": "string"
  18129. },
  18130. "prompts": {
  18131. "type": "array",
  18132. "items": {
  18133. "anyOf": [
  18134. {
  18135. "type": "object",
  18136. "properties": {
  18137. "type": {
  18138. "type": "string",
  18139. "enum": ["text"]
  18140. },
  18141. "key": {
  18142. "type": "string"
  18143. },
  18144. "message": {
  18145. "type": "string"
  18146. },
  18147. "placeholder": {
  18148. "type": "string"
  18149. },
  18150. "when": {
  18151. "type": "object",
  18152. "properties": {
  18153. "key": {
  18154. "type": "string"
  18155. },
  18156. "op": {
  18157. "type": "string",
  18158. "enum": ["eq", "neq"]
  18159. },
  18160. "value": {
  18161. "type": "string"
  18162. }
  18163. },
  18164. "required": ["key", "op", "value"],
  18165. "additionalProperties": false
  18166. }
  18167. },
  18168. "required": ["type", "key", "message"],
  18169. "additionalProperties": false
  18170. },
  18171. {
  18172. "type": "object",
  18173. "properties": {
  18174. "type": {
  18175. "type": "string",
  18176. "enum": ["select"]
  18177. },
  18178. "key": {
  18179. "type": "string"
  18180. },
  18181. "message": {
  18182. "type": "string"
  18183. },
  18184. "options": {
  18185. "type": "array",
  18186. "items": {
  18187. "type": "object",
  18188. "properties": {
  18189. "label": {
  18190. "type": "string"
  18191. },
  18192. "value": {
  18193. "type": "string"
  18194. },
  18195. "hint": {
  18196. "type": "string"
  18197. }
  18198. },
  18199. "required": ["label", "value"],
  18200. "additionalProperties": false
  18201. }
  18202. },
  18203. "when": {
  18204. "type": "object",
  18205. "properties": {
  18206. "key": {
  18207. "type": "string"
  18208. },
  18209. "op": {
  18210. "type": "string",
  18211. "enum": ["eq", "neq"]
  18212. },
  18213. "value": {
  18214. "type": "string"
  18215. }
  18216. },
  18217. "required": ["key", "op", "value"],
  18218. "additionalProperties": false
  18219. }
  18220. },
  18221. "required": ["type", "key", "message", "options"],
  18222. "additionalProperties": false
  18223. }
  18224. ]
  18225. }
  18226. }
  18227. },
  18228. "required": ["type", "label"],
  18229. "additionalProperties": false
  18230. },
  18231. "ProviderAuthAuthorization": {
  18232. "type": "object",
  18233. "properties": {
  18234. "url": {
  18235. "type": "string"
  18236. },
  18237. "method": {
  18238. "type": "string",
  18239. "enum": ["auto", "code"]
  18240. },
  18241. "instructions": {
  18242. "type": "string"
  18243. }
  18244. },
  18245. "required": ["url", "method", "instructions"],
  18246. "additionalProperties": false
  18247. },
  18248. "ProviderAuthError1": {
  18249. "type": "object",
  18250. "properties": {
  18251. "name": {
  18252. "type": "string",
  18253. "enum": [
  18254. "BadRequest",
  18255. "ProviderAuthOauthMissing",
  18256. "ProviderAuthOauthCodeMissing",
  18257. "ProviderAuthOauthCallbackFailed",
  18258. "ProviderAuthValidationFailed"
  18259. ]
  18260. },
  18261. "data": {
  18262. "type": "object",
  18263. "properties": {
  18264. "providerID": {
  18265. "type": "string"
  18266. },
  18267. "field": {
  18268. "type": "string"
  18269. },
  18270. "message": {
  18271. "type": "string"
  18272. },
  18273. "kind": {
  18274. "type": "string"
  18275. }
  18276. },
  18277. "additionalProperties": false
  18278. }
  18279. },
  18280. "required": ["name", "data"],
  18281. "additionalProperties": false
  18282. },
  18283. "NotFoundError": {
  18284. "type": "object",
  18285. "required": ["name", "data"],
  18286. "properties": {
  18287. "name": {
  18288. "type": "string",
  18289. "enum": ["NotFoundError"]
  18290. },
  18291. "data": {
  18292. "type": "object",
  18293. "required": ["message"],
  18294. "properties": {
  18295. "message": {
  18296. "type": "string"
  18297. }
  18298. }
  18299. }
  18300. }
  18301. },
  18302. "TextPartInput": {
  18303. "type": "object",
  18304. "properties": {
  18305. "id": {
  18306. "type": "string",
  18307. "pattern": "^prt"
  18308. },
  18309. "type": {
  18310. "type": "string",
  18311. "enum": ["text"]
  18312. },
  18313. "text": {
  18314. "type": "string"
  18315. },
  18316. "synthetic": {
  18317. "type": "boolean"
  18318. },
  18319. "ignored": {
  18320. "type": "boolean"
  18321. },
  18322. "time": {
  18323. "type": "object",
  18324. "properties": {
  18325. "start": {
  18326. "type": "integer",
  18327. "minimum": 0
  18328. },
  18329. "end": {
  18330. "type": "integer",
  18331. "minimum": 0
  18332. }
  18333. },
  18334. "required": ["start"],
  18335. "additionalProperties": false
  18336. },
  18337. "metadata": {
  18338. "type": "object"
  18339. }
  18340. },
  18341. "required": ["type", "text"],
  18342. "additionalProperties": false
  18343. },
  18344. "FilePartInput": {
  18345. "type": "object",
  18346. "properties": {
  18347. "id": {
  18348. "type": "string",
  18349. "pattern": "^prt"
  18350. },
  18351. "type": {
  18352. "type": "string",
  18353. "enum": ["file"]
  18354. },
  18355. "mime": {
  18356. "type": "string"
  18357. },
  18358. "filename": {
  18359. "type": "string"
  18360. },
  18361. "url": {
  18362. "type": "string"
  18363. },
  18364. "source": {
  18365. "$ref": "#/components/schemas/FilePartSource"
  18366. }
  18367. },
  18368. "required": ["type", "mime", "url"],
  18369. "additionalProperties": false
  18370. },
  18371. "AgentPartInput": {
  18372. "type": "object",
  18373. "properties": {
  18374. "id": {
  18375. "type": "string",
  18376. "pattern": "^prt"
  18377. },
  18378. "type": {
  18379. "type": "string",
  18380. "enum": ["agent"]
  18381. },
  18382. "name": {
  18383. "type": "string"
  18384. },
  18385. "source": {
  18386. "type": "object",
  18387. "properties": {
  18388. "value": {
  18389. "type": "string"
  18390. },
  18391. "start": {
  18392. "type": "integer",
  18393. "minimum": 0
  18394. },
  18395. "end": {
  18396. "type": "integer",
  18397. "minimum": 0
  18398. }
  18399. },
  18400. "required": ["value", "start", "end"],
  18401. "additionalProperties": false
  18402. }
  18403. },
  18404. "required": ["type", "name"],
  18405. "additionalProperties": false
  18406. },
  18407. "SubtaskPartInput": {
  18408. "type": "object",
  18409. "properties": {
  18410. "id": {
  18411. "type": "string",
  18412. "pattern": "^prt"
  18413. },
  18414. "type": {
  18415. "type": "string",
  18416. "enum": ["subtask"]
  18417. },
  18418. "prompt": {
  18419. "type": "string"
  18420. },
  18421. "description": {
  18422. "type": "string"
  18423. },
  18424. "agent": {
  18425. "type": "string"
  18426. },
  18427. "model": {
  18428. "type": "object",
  18429. "properties": {
  18430. "providerID": {
  18431. "type": "string"
  18432. },
  18433. "modelID": {
  18434. "type": "string"
  18435. }
  18436. },
  18437. "required": ["providerID", "modelID"],
  18438. "additionalProperties": false
  18439. },
  18440. "command": {
  18441. "type": "string"
  18442. }
  18443. },
  18444. "required": ["type", "prompt", "description", "agent"],
  18445. "additionalProperties": false
  18446. },
  18447. "SessionBusyError": {
  18448. "type": "object",
  18449. "properties": {
  18450. "_tag": {
  18451. "type": "string",
  18452. "enum": ["SessionBusyError"]
  18453. },
  18454. "sessionID": {
  18455. "type": "string"
  18456. },
  18457. "message": {
  18458. "type": "string"
  18459. }
  18460. },
  18461. "required": ["_tag", "sessionID", "message"],
  18462. "additionalProperties": false
  18463. },
  18464. "V2SessionsResponse": {
  18465. "type": "object",
  18466. "properties": {
  18467. "items": {
  18468. "type": "array",
  18469. "items": {
  18470. "$ref": "#/components/schemas/SessionV2Info"
  18471. }
  18472. },
  18473. "cursor": {
  18474. "type": "object",
  18475. "properties": {
  18476. "previous": {
  18477. "type": "string"
  18478. },
  18479. "next": {
  18480. "type": "string"
  18481. }
  18482. },
  18483. "additionalProperties": false
  18484. }
  18485. },
  18486. "required": ["items", "cursor"],
  18487. "additionalProperties": false
  18488. },
  18489. "InvalidCursorError": {
  18490. "type": "object",
  18491. "properties": {
  18492. "_tag": {
  18493. "type": "string",
  18494. "enum": ["InvalidCursorError"]
  18495. },
  18496. "message": {
  18497. "type": "string"
  18498. }
  18499. },
  18500. "required": ["_tag", "message"],
  18501. "additionalProperties": false
  18502. },
  18503. "UnauthorizedError": {
  18504. "type": "object",
  18505. "properties": {
  18506. "_tag": {
  18507. "type": "string",
  18508. "enum": ["UnauthorizedError"]
  18509. },
  18510. "message": {
  18511. "type": "string"
  18512. }
  18513. },
  18514. "required": ["_tag", "message"],
  18515. "additionalProperties": false
  18516. },
  18517. "SessionNotFoundError": {
  18518. "type": "object",
  18519. "properties": {
  18520. "_tag": {
  18521. "type": "string",
  18522. "enum": ["SessionNotFoundError"]
  18523. },
  18524. "sessionID": {
  18525. "type": "string"
  18526. },
  18527. "message": {
  18528. "type": "string"
  18529. }
  18530. },
  18531. "required": ["_tag", "sessionID", "message"],
  18532. "additionalProperties": false
  18533. },
  18534. "ServiceUnavailableError": {
  18535. "type": "object",
  18536. "properties": {
  18537. "_tag": {
  18538. "type": "string",
  18539. "enum": ["ServiceUnavailableError"]
  18540. },
  18541. "message": {
  18542. "type": "string"
  18543. },
  18544. "service": {
  18545. "type": "string"
  18546. }
  18547. },
  18548. "required": ["_tag", "message"],
  18549. "additionalProperties": false
  18550. },
  18551. "UnknownError1": {
  18552. "type": "object",
  18553. "properties": {
  18554. "_tag": {
  18555. "type": "string",
  18556. "enum": ["UnknownError"]
  18557. },
  18558. "message": {
  18559. "type": "string"
  18560. },
  18561. "ref": {
  18562. "type": "string"
  18563. }
  18564. },
  18565. "required": ["_tag", "message"],
  18566. "additionalProperties": false
  18567. },
  18568. "V2SessionMessagesResponse": {
  18569. "type": "object",
  18570. "properties": {
  18571. "items": {
  18572. "type": "array",
  18573. "items": {
  18574. "$ref": "#/components/schemas/SessionMessage"
  18575. }
  18576. },
  18577. "cursor": {
  18578. "type": "object",
  18579. "properties": {
  18580. "previous": {
  18581. "type": "string"
  18582. },
  18583. "next": {
  18584. "type": "string"
  18585. }
  18586. },
  18587. "additionalProperties": false
  18588. }
  18589. },
  18590. "required": ["items", "cursor"],
  18591. "additionalProperties": false
  18592. },
  18593. "ProviderNotFoundError": {
  18594. "type": "object",
  18595. "properties": {
  18596. "_tag": {
  18597. "type": "string",
  18598. "enum": ["ProviderNotFoundError"]
  18599. },
  18600. "providerID": {
  18601. "type": "string"
  18602. },
  18603. "message": {
  18604. "type": "string"
  18605. }
  18606. },
  18607. "required": ["_tag", "providerID", "message"],
  18608. "additionalProperties": false
  18609. },
  18610. "EventTuiPromptAppend": {
  18611. "type": "object",
  18612. "properties": {
  18613. "type": {
  18614. "type": "string",
  18615. "enum": ["tui.prompt.append"]
  18616. },
  18617. "properties": {
  18618. "type": "object",
  18619. "properties": {
  18620. "text": {
  18621. "type": "string"
  18622. }
  18623. },
  18624. "required": ["text"],
  18625. "additionalProperties": false
  18626. }
  18627. },
  18628. "required": ["type", "properties"],
  18629. "additionalProperties": false
  18630. },
  18631. "EventTuiCommandExecute": {
  18632. "type": "object",
  18633. "properties": {
  18634. "type": {
  18635. "type": "string",
  18636. "enum": ["tui.command.execute"]
  18637. },
  18638. "properties": {
  18639. "type": "object",
  18640. "properties": {
  18641. "command": {
  18642. "anyOf": [
  18643. {
  18644. "type": "string",
  18645. "enum": [
  18646. "session.list",
  18647. "session.new",
  18648. "session.share",
  18649. "session.interrupt",
  18650. "session.compact",
  18651. "session.page.up",
  18652. "session.page.down",
  18653. "session.line.up",
  18654. "session.line.down",
  18655. "session.half.page.up",
  18656. "session.half.page.down",
  18657. "session.first",
  18658. "session.last",
  18659. "prompt.clear",
  18660. "prompt.submit",
  18661. "agent.cycle"
  18662. ]
  18663. },
  18664. {
  18665. "type": "string"
  18666. }
  18667. ]
  18668. }
  18669. },
  18670. "required": ["command"],
  18671. "additionalProperties": false
  18672. }
  18673. },
  18674. "required": ["type", "properties"],
  18675. "additionalProperties": false
  18676. },
  18677. "EventTuiToastShow": {
  18678. "type": "object",
  18679. "properties": {
  18680. "type": {
  18681. "type": "string",
  18682. "enum": ["tui.toast.show"]
  18683. },
  18684. "properties": {
  18685. "type": "object",
  18686. "properties": {
  18687. "title": {
  18688. "type": "string"
  18689. },
  18690. "message": {
  18691. "type": "string"
  18692. },
  18693. "variant": {
  18694. "type": "string",
  18695. "enum": ["info", "success", "warning", "error"]
  18696. },
  18697. "duration": {
  18698. "type": "integer",
  18699. "exclusiveMinimum": 0
  18700. }
  18701. },
  18702. "required": ["message", "variant"],
  18703. "additionalProperties": false
  18704. }
  18705. },
  18706. "required": ["type", "properties"],
  18707. "additionalProperties": false
  18708. },
  18709. "EventTuiSessionSelect": {
  18710. "type": "object",
  18711. "properties": {
  18712. "type": {
  18713. "type": "string",
  18714. "enum": ["tui.session.select"]
  18715. },
  18716. "properties": {
  18717. "type": "object",
  18718. "properties": {
  18719. "sessionID": {
  18720. "type": "string",
  18721. "pattern": "^ses",
  18722. "description": "Session ID to navigate to"
  18723. }
  18724. },
  18725. "required": ["sessionID"],
  18726. "additionalProperties": false
  18727. }
  18728. },
  18729. "required": ["type", "properties"],
  18730. "additionalProperties": false
  18731. },
  18732. "Workspace": {
  18733. "type": "object",
  18734. "properties": {
  18735. "id": {
  18736. "type": "string",
  18737. "pattern": "^wrk"
  18738. },
  18739. "type": {
  18740. "type": "string"
  18741. },
  18742. "name": {
  18743. "type": "string"
  18744. },
  18745. "branch": {
  18746. "anyOf": [
  18747. {
  18748. "type": "string"
  18749. },
  18750. {
  18751. "type": "null"
  18752. }
  18753. ]
  18754. },
  18755. "directory": {
  18756. "anyOf": [
  18757. {
  18758. "type": "string"
  18759. },
  18760. {
  18761. "type": "null"
  18762. }
  18763. ]
  18764. },
  18765. "extra": {
  18766. "anyOf": [
  18767. {},
  18768. {
  18769. "type": "null"
  18770. }
  18771. ]
  18772. },
  18773. "projectID": {
  18774. "type": "string"
  18775. },
  18776. "timeUsed": {
  18777. "anyOf": [
  18778. {
  18779. "type": "number"
  18780. },
  18781. {
  18782. "type": "string",
  18783. "enum": ["NaN"]
  18784. },
  18785. {
  18786. "type": "string",
  18787. "enum": ["Infinity"]
  18788. },
  18789. {
  18790. "type": "string",
  18791. "enum": ["-Infinity"]
  18792. },
  18793. {
  18794. "type": "string",
  18795. "enum": ["Infinity", "-Infinity", "NaN"]
  18796. }
  18797. ]
  18798. }
  18799. },
  18800. "required": ["id", "type", "name", "projectID", "timeUsed"],
  18801. "additionalProperties": false
  18802. },
  18803. "WorkspaceCreateError": {
  18804. "type": "object",
  18805. "properties": {
  18806. "name": {
  18807. "type": "string",
  18808. "enum": ["WorkspaceCreateError"]
  18809. },
  18810. "data": {
  18811. "type": "object",
  18812. "properties": {
  18813. "message": {
  18814. "type": "string"
  18815. }
  18816. },
  18817. "required": ["message"],
  18818. "additionalProperties": false
  18819. }
  18820. },
  18821. "required": ["name", "data"],
  18822. "additionalProperties": false
  18823. },
  18824. "WorkspaceWarpError": {
  18825. "type": "object",
  18826. "properties": {
  18827. "name": {
  18828. "type": "string",
  18829. "enum": ["WorkspaceWarpError"]
  18830. },
  18831. "data": {
  18832. "type": "object",
  18833. "properties": {
  18834. "message": {
  18835. "type": "string"
  18836. }
  18837. },
  18838. "required": ["message"],
  18839. "additionalProperties": false
  18840. }
  18841. },
  18842. "required": ["name", "data"],
  18843. "additionalProperties": false
  18844. },
  18845. "effect_HttpApiError_Forbidden": {
  18846. "type": "object",
  18847. "properties": {
  18848. "_tag": {
  18849. "type": "string",
  18850. "enum": ["Forbidden"]
  18851. }
  18852. },
  18853. "required": ["_tag"],
  18854. "additionalProperties": false
  18855. },
  18856. "Event.tui.prompt.append": {
  18857. "type": "object",
  18858. "properties": {
  18859. "id": {
  18860. "type": "string"
  18861. },
  18862. "type": {
  18863. "type": "string",
  18864. "enum": ["tui.prompt.append"]
  18865. },
  18866. "properties": {
  18867. "type": "object",
  18868. "properties": {
  18869. "text": {
  18870. "type": "string"
  18871. }
  18872. },
  18873. "required": ["text"],
  18874. "additionalProperties": false
  18875. }
  18876. },
  18877. "required": ["id", "type", "properties"],
  18878. "additionalProperties": false
  18879. },
  18880. "Event.tui.command.execute": {
  18881. "type": "object",
  18882. "properties": {
  18883. "id": {
  18884. "type": "string"
  18885. },
  18886. "type": {
  18887. "type": "string",
  18888. "enum": ["tui.command.execute"]
  18889. },
  18890. "properties": {
  18891. "type": "object",
  18892. "properties": {
  18893. "command": {
  18894. "anyOf": [
  18895. {
  18896. "type": "string",
  18897. "enum": [
  18898. "session.list",
  18899. "session.new",
  18900. "session.share",
  18901. "session.interrupt",
  18902. "session.compact",
  18903. "session.page.up",
  18904. "session.page.down",
  18905. "session.line.up",
  18906. "session.line.down",
  18907. "session.half.page.up",
  18908. "session.half.page.down",
  18909. "session.first",
  18910. "session.last",
  18911. "prompt.clear",
  18912. "prompt.submit",
  18913. "agent.cycle"
  18914. ]
  18915. },
  18916. {
  18917. "type": "string"
  18918. }
  18919. ]
  18920. }
  18921. },
  18922. "required": ["command"],
  18923. "additionalProperties": false
  18924. }
  18925. },
  18926. "required": ["id", "type", "properties"],
  18927. "additionalProperties": false
  18928. },
  18929. "Event.tui.toast.show": {
  18930. "type": "object",
  18931. "properties": {
  18932. "id": {
  18933. "type": "string"
  18934. },
  18935. "type": {
  18936. "type": "string",
  18937. "enum": ["tui.toast.show"]
  18938. },
  18939. "properties": {
  18940. "type": "object",
  18941. "properties": {
  18942. "title": {
  18943. "type": "string"
  18944. },
  18945. "message": {
  18946. "type": "string"
  18947. },
  18948. "variant": {
  18949. "type": "string",
  18950. "enum": ["info", "success", "warning", "error"]
  18951. },
  18952. "duration": {
  18953. "type": "integer",
  18954. "exclusiveMinimum": 0
  18955. }
  18956. },
  18957. "required": ["message", "variant"],
  18958. "additionalProperties": false
  18959. }
  18960. },
  18961. "required": ["id", "type", "properties"],
  18962. "additionalProperties": false
  18963. },
  18964. "Event.tui.session.select": {
  18965. "type": "object",
  18966. "properties": {
  18967. "id": {
  18968. "type": "string"
  18969. },
  18970. "type": {
  18971. "type": "string",
  18972. "enum": ["tui.session.select"]
  18973. },
  18974. "properties": {
  18975. "type": "object",
  18976. "properties": {
  18977. "sessionID": {
  18978. "type": "string",
  18979. "pattern": "^ses",
  18980. "description": "Session ID to navigate to"
  18981. }
  18982. },
  18983. "required": ["sessionID"],
  18984. "additionalProperties": false
  18985. }
  18986. },
  18987. "required": ["id", "type", "properties"],
  18988. "additionalProperties": false
  18989. },
  18990. "ModelV2Info": {
  18991. "type": "object",
  18992. "properties": {
  18993. "id": {
  18994. "type": "string"
  18995. },
  18996. "apiID": {
  18997. "type": "string"
  18998. },
  18999. "providerID": {
  19000. "type": "string"
  19001. },
  19002. "family": {
  19003. "type": "string"
  19004. },
  19005. "name": {
  19006. "type": "string"
  19007. },
  19008. "endpoint": {
  19009. "anyOf": [
  19010. {
  19011. "type": "object",
  19012. "properties": {
  19013. "type": {
  19014. "type": "string",
  19015. "enum": ["unknown"]
  19016. }
  19017. },
  19018. "required": ["type"],
  19019. "additionalProperties": false
  19020. },
  19021. {
  19022. "type": "object",
  19023. "properties": {
  19024. "type": {
  19025. "type": "string",
  19026. "enum": ["openai/responses"]
  19027. },
  19028. "url": {
  19029. "type": "string"
  19030. },
  19031. "websocket": {
  19032. "type": "boolean"
  19033. }
  19034. },
  19035. "required": ["type", "url"],
  19036. "additionalProperties": false
  19037. },
  19038. {
  19039. "type": "object",
  19040. "properties": {
  19041. "type": {
  19042. "type": "string",
  19043. "enum": ["openai/completions"]
  19044. },
  19045. "url": {
  19046. "type": "string"
  19047. },
  19048. "reasoning": {
  19049. "anyOf": [
  19050. {
  19051. "type": "object",
  19052. "properties": {
  19053. "type": {
  19054. "type": "string",
  19055. "enum": ["reasoning_content"]
  19056. }
  19057. },
  19058. "required": ["type"],
  19059. "additionalProperties": false
  19060. },
  19061. {
  19062. "type": "object",
  19063. "properties": {
  19064. "type": {
  19065. "type": "string",
  19066. "enum": ["reasoning_details"]
  19067. }
  19068. },
  19069. "required": ["type"],
  19070. "additionalProperties": false
  19071. }
  19072. ]
  19073. }
  19074. },
  19075. "required": ["type", "url"],
  19076. "additionalProperties": false
  19077. },
  19078. {
  19079. "type": "object",
  19080. "properties": {
  19081. "type": {
  19082. "type": "string",
  19083. "enum": ["anthropic/messages"]
  19084. },
  19085. "url": {
  19086. "type": "string"
  19087. }
  19088. },
  19089. "required": ["type", "url"],
  19090. "additionalProperties": false
  19091. },
  19092. {
  19093. "type": "object",
  19094. "properties": {
  19095. "type": {
  19096. "type": "string",
  19097. "enum": ["aisdk"]
  19098. },
  19099. "package": {
  19100. "type": "string"
  19101. },
  19102. "url": {
  19103. "type": "string"
  19104. }
  19105. },
  19106. "required": ["type", "package"],
  19107. "additionalProperties": false
  19108. }
  19109. ]
  19110. },
  19111. "capabilities": {
  19112. "type": "object",
  19113. "properties": {
  19114. "tools": {
  19115. "type": "boolean"
  19116. },
  19117. "input": {
  19118. "type": "array",
  19119. "items": {
  19120. "type": "string"
  19121. }
  19122. },
  19123. "output": {
  19124. "type": "array",
  19125. "items": {
  19126. "type": "string"
  19127. }
  19128. }
  19129. },
  19130. "required": ["tools", "input", "output"],
  19131. "additionalProperties": false
  19132. },
  19133. "options": {
  19134. "type": "object",
  19135. "properties": {
  19136. "headers": {
  19137. "type": "object",
  19138. "additionalProperties": {
  19139. "type": "string"
  19140. }
  19141. },
  19142. "body": {
  19143. "type": "object"
  19144. },
  19145. "aisdk": {
  19146. "type": "object",
  19147. "properties": {
  19148. "provider": {
  19149. "type": "object"
  19150. },
  19151. "request": {
  19152. "type": "object"
  19153. }
  19154. },
  19155. "required": ["provider", "request"],
  19156. "additionalProperties": false
  19157. },
  19158. "variant": {
  19159. "type": "string"
  19160. }
  19161. },
  19162. "required": ["headers", "body", "aisdk"],
  19163. "additionalProperties": false
  19164. },
  19165. "variants": {
  19166. "type": "array",
  19167. "items": {
  19168. "type": "object",
  19169. "properties": {
  19170. "id": {
  19171. "type": "string"
  19172. },
  19173. "headers": {
  19174. "type": "object",
  19175. "additionalProperties": {
  19176. "type": "string"
  19177. }
  19178. },
  19179. "body": {
  19180. "type": "object"
  19181. },
  19182. "aisdk": {
  19183. "type": "object",
  19184. "properties": {
  19185. "provider": {
  19186. "type": "object"
  19187. },
  19188. "request": {
  19189. "type": "object"
  19190. }
  19191. },
  19192. "required": ["provider", "request"],
  19193. "additionalProperties": false
  19194. }
  19195. },
  19196. "required": ["id", "headers", "body", "aisdk"],
  19197. "additionalProperties": false
  19198. }
  19199. },
  19200. "time": {
  19201. "type": "object",
  19202. "properties": {
  19203. "released": {
  19204. "anyOf": [
  19205. {
  19206. "type": "number"
  19207. },
  19208. {
  19209. "type": "string",
  19210. "enum": ["NaN"]
  19211. },
  19212. {
  19213. "type": "string",
  19214. "enum": ["Infinity"]
  19215. },
  19216. {
  19217. "type": "string",
  19218. "enum": ["-Infinity"]
  19219. },
  19220. {
  19221. "type": "string",
  19222. "enum": ["Infinity", "-Infinity", "NaN"]
  19223. }
  19224. ]
  19225. }
  19226. },
  19227. "required": ["released"],
  19228. "additionalProperties": false
  19229. },
  19230. "cost": {
  19231. "type": "array",
  19232. "items": {
  19233. "type": "object",
  19234. "properties": {
  19235. "tier": {
  19236. "type": "object",
  19237. "properties": {
  19238. "type": {
  19239. "type": "string",
  19240. "enum": ["context"]
  19241. },
  19242. "size": {
  19243. "type": "integer"
  19244. }
  19245. },
  19246. "required": ["type", "size"],
  19247. "additionalProperties": false
  19248. },
  19249. "input": {
  19250. "type": "number"
  19251. },
  19252. "output": {
  19253. "type": "number"
  19254. },
  19255. "cache": {
  19256. "type": "object",
  19257. "properties": {
  19258. "read": {
  19259. "type": "number"
  19260. },
  19261. "write": {
  19262. "type": "number"
  19263. }
  19264. },
  19265. "required": ["read", "write"],
  19266. "additionalProperties": false
  19267. }
  19268. },
  19269. "required": ["input", "output", "cache"],
  19270. "additionalProperties": false
  19271. }
  19272. },
  19273. "status": {
  19274. "type": "string",
  19275. "enum": ["alpha", "beta", "deprecated", "active"]
  19276. },
  19277. "enabled": {
  19278. "type": "boolean"
  19279. },
  19280. "limit": {
  19281. "type": "object",
  19282. "properties": {
  19283. "context": {
  19284. "type": "integer"
  19285. },
  19286. "input": {
  19287. "type": "integer"
  19288. },
  19289. "output": {
  19290. "type": "integer"
  19291. }
  19292. },
  19293. "required": ["context", "output"],
  19294. "additionalProperties": false
  19295. }
  19296. },
  19297. "required": [
  19298. "id",
  19299. "apiID",
  19300. "providerID",
  19301. "name",
  19302. "endpoint",
  19303. "capabilities",
  19304. "options",
  19305. "variants",
  19306. "time",
  19307. "cost",
  19308. "status",
  19309. "enabled",
  19310. "limit"
  19311. ],
  19312. "additionalProperties": false
  19313. },
  19314. "PromptSource": {
  19315. "type": "object",
  19316. "properties": {
  19317. "start": {
  19318. "type": "number"
  19319. },
  19320. "end": {
  19321. "type": "number"
  19322. },
  19323. "text": {
  19324. "type": "string"
  19325. }
  19326. },
  19327. "required": ["start", "end", "text"],
  19328. "additionalProperties": false
  19329. },
  19330. "PromptFileAttachment": {
  19331. "type": "object",
  19332. "properties": {
  19333. "uri": {
  19334. "type": "string"
  19335. },
  19336. "mime": {
  19337. "type": "string"
  19338. },
  19339. "name": {
  19340. "type": "string"
  19341. },
  19342. "description": {
  19343. "type": "string"
  19344. },
  19345. "source": {
  19346. "$ref": "#/components/schemas/PromptSource"
  19347. }
  19348. },
  19349. "required": ["uri", "mime"],
  19350. "additionalProperties": false
  19351. },
  19352. "PromptAgentAttachment": {
  19353. "type": "object",
  19354. "properties": {
  19355. "name": {
  19356. "type": "string"
  19357. },
  19358. "source": {
  19359. "$ref": "#/components/schemas/PromptSource"
  19360. }
  19361. },
  19362. "required": ["name"],
  19363. "additionalProperties": false
  19364. },
  19365. "PromptReferenceAttachment": {
  19366. "type": "object",
  19367. "properties": {
  19368. "name": {
  19369. "type": "string"
  19370. },
  19371. "kind": {
  19372. "type": "string",
  19373. "enum": ["local", "git", "invalid"]
  19374. },
  19375. "uri": {
  19376. "type": "string"
  19377. },
  19378. "repository": {
  19379. "type": "string"
  19380. },
  19381. "branch": {
  19382. "type": "string"
  19383. },
  19384. "target": {
  19385. "type": "string"
  19386. },
  19387. "targetUri": {
  19388. "type": "string"
  19389. },
  19390. "problem": {
  19391. "type": "string"
  19392. },
  19393. "source": {
  19394. "$ref": "#/components/schemas/PromptSource"
  19395. }
  19396. },
  19397. "required": ["name", "kind"],
  19398. "additionalProperties": false
  19399. },
  19400. "SessionErrorUnknown": {
  19401. "type": "object",
  19402. "properties": {
  19403. "type": {
  19404. "type": "string",
  19405. "enum": ["unknown"]
  19406. },
  19407. "message": {
  19408. "type": "string"
  19409. }
  19410. },
  19411. "required": ["type", "message"],
  19412. "additionalProperties": false
  19413. },
  19414. "ToolTextContent": {
  19415. "type": "object",
  19416. "properties": {
  19417. "type": {
  19418. "type": "string",
  19419. "enum": ["text"]
  19420. },
  19421. "text": {
  19422. "type": "string"
  19423. }
  19424. },
  19425. "required": ["type", "text"],
  19426. "additionalProperties": false
  19427. },
  19428. "ToolFileContent": {
  19429. "type": "object",
  19430. "properties": {
  19431. "type": {
  19432. "type": "string",
  19433. "enum": ["file"]
  19434. },
  19435. "uri": {
  19436. "type": "string"
  19437. },
  19438. "mime": {
  19439. "type": "string"
  19440. },
  19441. "name": {
  19442. "type": "string"
  19443. }
  19444. },
  19445. "required": ["type", "uri", "mime"],
  19446. "additionalProperties": false
  19447. },
  19448. "SessionNextRetry_error": {
  19449. "type": "object",
  19450. "properties": {
  19451. "message": {
  19452. "type": "string"
  19453. },
  19454. "statusCode": {
  19455. "type": "number"
  19456. },
  19457. "isRetryable": {
  19458. "type": "boolean"
  19459. },
  19460. "responseHeaders": {
  19461. "type": "object",
  19462. "additionalProperties": {
  19463. "type": "string"
  19464. }
  19465. },
  19466. "responseBody": {
  19467. "type": "string"
  19468. },
  19469. "metadata": {
  19470. "type": "object",
  19471. "additionalProperties": {
  19472. "type": "string"
  19473. }
  19474. }
  19475. },
  19476. "required": ["message", "isRetryable"],
  19477. "additionalProperties": false
  19478. },
  19479. "PermissionV2Source": {
  19480. "type": "object",
  19481. "properties": {
  19482. "type": {
  19483. "type": "string",
  19484. "enum": ["tool"]
  19485. },
  19486. "messageID": {
  19487. "type": "string"
  19488. },
  19489. "callID": {
  19490. "type": "string"
  19491. }
  19492. },
  19493. "required": ["type", "messageID", "callID"],
  19494. "additionalProperties": false
  19495. },
  19496. "PermissionV2Reply": {
  19497. "type": "string",
  19498. "enum": ["once", "always", "reject"]
  19499. },
  19500. "AuthOAuthCredential": {
  19501. "type": "object",
  19502. "properties": {
  19503. "type": {
  19504. "type": "string",
  19505. "enum": ["oauth"]
  19506. },
  19507. "refresh": {
  19508. "type": "string"
  19509. },
  19510. "access": {
  19511. "type": "string"
  19512. },
  19513. "expires": {
  19514. "type": "integer",
  19515. "minimum": 0
  19516. }
  19517. },
  19518. "required": ["type", "refresh", "access", "expires"],
  19519. "additionalProperties": false
  19520. },
  19521. "AuthApiKeyCredential": {
  19522. "type": "object",
  19523. "properties": {
  19524. "type": {
  19525. "type": "string",
  19526. "enum": ["api"]
  19527. },
  19528. "key": {
  19529. "type": "string"
  19530. },
  19531. "metadata": {
  19532. "type": "object",
  19533. "additionalProperties": {
  19534. "type": "string"
  19535. }
  19536. }
  19537. },
  19538. "required": ["type", "key"],
  19539. "additionalProperties": false
  19540. },
  19541. "AuthCredential": {
  19542. "anyOf": [
  19543. {
  19544. "$ref": "#/components/schemas/AuthOAuthCredential"
  19545. },
  19546. {
  19547. "$ref": "#/components/schemas/AuthApiKeyCredential"
  19548. }
  19549. ]
  19550. },
  19551. "AuthInfo": {
  19552. "type": "object",
  19553. "properties": {
  19554. "id": {
  19555. "type": "string"
  19556. },
  19557. "serviceID": {
  19558. "type": "string"
  19559. },
  19560. "description": {
  19561. "type": "string"
  19562. },
  19563. "credential": {
  19564. "$ref": "#/components/schemas/AuthCredential"
  19565. }
  19566. },
  19567. "required": ["id", "serviceID", "description", "credential"],
  19568. "additionalProperties": false
  19569. },
  19570. "EventServerInstanceDisposed": {
  19571. "type": "object",
  19572. "properties": {
  19573. "id": {
  19574. "type": "string"
  19575. },
  19576. "type": {
  19577. "type": "string",
  19578. "enum": ["server.instance.disposed"]
  19579. },
  19580. "properties": {
  19581. "type": "object",
  19582. "properties": {
  19583. "directory": {
  19584. "type": "string"
  19585. }
  19586. },
  19587. "required": ["directory"],
  19588. "additionalProperties": false
  19589. }
  19590. },
  19591. "required": ["id", "type", "properties"],
  19592. "additionalProperties": false
  19593. },
  19594. "SyncEventSessionNextAgentSwitched": {
  19595. "type": "object",
  19596. "properties": {
  19597. "type": {
  19598. "type": "string",
  19599. "enum": ["sync"]
  19600. },
  19601. "name": {
  19602. "type": "string",
  19603. "enum": ["session.next.agent.switched.1"]
  19604. },
  19605. "id": {
  19606. "type": "string"
  19607. },
  19608. "seq": {
  19609. "type": "number"
  19610. },
  19611. "aggregateID": {
  19612. "type": "string",
  19613. "enum": ["sessionID"]
  19614. },
  19615. "data": {
  19616. "type": "object",
  19617. "properties": {
  19618. "timestamp": {
  19619. "type": "number"
  19620. },
  19621. "sessionID": {
  19622. "type": "string",
  19623. "pattern": "^ses"
  19624. },
  19625. "agent": {
  19626. "type": "string"
  19627. }
  19628. },
  19629. "required": ["timestamp", "sessionID", "agent"],
  19630. "additionalProperties": false
  19631. }
  19632. },
  19633. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19634. "additionalProperties": false
  19635. },
  19636. "SyncEventSessionNextModelSwitched": {
  19637. "type": "object",
  19638. "properties": {
  19639. "type": {
  19640. "type": "string",
  19641. "enum": ["sync"]
  19642. },
  19643. "name": {
  19644. "type": "string",
  19645. "enum": ["session.next.model.switched.1"]
  19646. },
  19647. "id": {
  19648. "type": "string"
  19649. },
  19650. "seq": {
  19651. "type": "number"
  19652. },
  19653. "aggregateID": {
  19654. "type": "string",
  19655. "enum": ["sessionID"]
  19656. },
  19657. "data": {
  19658. "type": "object",
  19659. "properties": {
  19660. "timestamp": {
  19661. "type": "number"
  19662. },
  19663. "sessionID": {
  19664. "type": "string",
  19665. "pattern": "^ses"
  19666. },
  19667. "model": {
  19668. "type": "object",
  19669. "properties": {
  19670. "id": {
  19671. "type": "string"
  19672. },
  19673. "providerID": {
  19674. "type": "string"
  19675. },
  19676. "variant": {
  19677. "type": "string"
  19678. }
  19679. },
  19680. "required": ["id", "providerID"],
  19681. "additionalProperties": false
  19682. }
  19683. },
  19684. "required": ["timestamp", "sessionID", "model"],
  19685. "additionalProperties": false
  19686. }
  19687. },
  19688. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19689. "additionalProperties": false
  19690. },
  19691. "SyncEventSessionNextPrompted": {
  19692. "type": "object",
  19693. "properties": {
  19694. "type": {
  19695. "type": "string",
  19696. "enum": ["sync"]
  19697. },
  19698. "name": {
  19699. "type": "string",
  19700. "enum": ["session.next.prompted.1"]
  19701. },
  19702. "id": {
  19703. "type": "string"
  19704. },
  19705. "seq": {
  19706. "type": "number"
  19707. },
  19708. "aggregateID": {
  19709. "type": "string",
  19710. "enum": ["sessionID"]
  19711. },
  19712. "data": {
  19713. "type": "object",
  19714. "properties": {
  19715. "timestamp": {
  19716. "type": "number"
  19717. },
  19718. "sessionID": {
  19719. "type": "string",
  19720. "pattern": "^ses"
  19721. },
  19722. "prompt": {
  19723. "$ref": "#/components/schemas/Prompt"
  19724. }
  19725. },
  19726. "required": ["timestamp", "sessionID", "prompt"],
  19727. "additionalProperties": false
  19728. }
  19729. },
  19730. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19731. "additionalProperties": false
  19732. },
  19733. "SyncEventSessionNextSynthetic": {
  19734. "type": "object",
  19735. "properties": {
  19736. "type": {
  19737. "type": "string",
  19738. "enum": ["sync"]
  19739. },
  19740. "name": {
  19741. "type": "string",
  19742. "enum": ["session.next.synthetic.1"]
  19743. },
  19744. "id": {
  19745. "type": "string"
  19746. },
  19747. "seq": {
  19748. "type": "number"
  19749. },
  19750. "aggregateID": {
  19751. "type": "string",
  19752. "enum": ["sessionID"]
  19753. },
  19754. "data": {
  19755. "type": "object",
  19756. "properties": {
  19757. "timestamp": {
  19758. "type": "number"
  19759. },
  19760. "sessionID": {
  19761. "type": "string",
  19762. "pattern": "^ses"
  19763. },
  19764. "text": {
  19765. "type": "string"
  19766. }
  19767. },
  19768. "required": ["timestamp", "sessionID", "text"],
  19769. "additionalProperties": false
  19770. }
  19771. },
  19772. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19773. "additionalProperties": false
  19774. },
  19775. "SyncEventSessionNextShellStarted": {
  19776. "type": "object",
  19777. "properties": {
  19778. "type": {
  19779. "type": "string",
  19780. "enum": ["sync"]
  19781. },
  19782. "name": {
  19783. "type": "string",
  19784. "enum": ["session.next.shell.started.1"]
  19785. },
  19786. "id": {
  19787. "type": "string"
  19788. },
  19789. "seq": {
  19790. "type": "number"
  19791. },
  19792. "aggregateID": {
  19793. "type": "string",
  19794. "enum": ["sessionID"]
  19795. },
  19796. "data": {
  19797. "type": "object",
  19798. "properties": {
  19799. "timestamp": {
  19800. "type": "number"
  19801. },
  19802. "sessionID": {
  19803. "type": "string",
  19804. "pattern": "^ses"
  19805. },
  19806. "callID": {
  19807. "type": "string"
  19808. },
  19809. "command": {
  19810. "type": "string"
  19811. }
  19812. },
  19813. "required": ["timestamp", "sessionID", "callID", "command"],
  19814. "additionalProperties": false
  19815. }
  19816. },
  19817. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19818. "additionalProperties": false
  19819. },
  19820. "SyncEventSessionNextShellEnded": {
  19821. "type": "object",
  19822. "properties": {
  19823. "type": {
  19824. "type": "string",
  19825. "enum": ["sync"]
  19826. },
  19827. "name": {
  19828. "type": "string",
  19829. "enum": ["session.next.shell.ended.1"]
  19830. },
  19831. "id": {
  19832. "type": "string"
  19833. },
  19834. "seq": {
  19835. "type": "number"
  19836. },
  19837. "aggregateID": {
  19838. "type": "string",
  19839. "enum": ["sessionID"]
  19840. },
  19841. "data": {
  19842. "type": "object",
  19843. "properties": {
  19844. "timestamp": {
  19845. "type": "number"
  19846. },
  19847. "sessionID": {
  19848. "type": "string",
  19849. "pattern": "^ses"
  19850. },
  19851. "callID": {
  19852. "type": "string"
  19853. },
  19854. "output": {
  19855. "type": "string"
  19856. }
  19857. },
  19858. "required": ["timestamp", "sessionID", "callID", "output"],
  19859. "additionalProperties": false
  19860. }
  19861. },
  19862. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19863. "additionalProperties": false
  19864. },
  19865. "SyncEventSessionNextStepStarted": {
  19866. "type": "object",
  19867. "properties": {
  19868. "type": {
  19869. "type": "string",
  19870. "enum": ["sync"]
  19871. },
  19872. "name": {
  19873. "type": "string",
  19874. "enum": ["session.next.step.started.1"]
  19875. },
  19876. "id": {
  19877. "type": "string"
  19878. },
  19879. "seq": {
  19880. "type": "number"
  19881. },
  19882. "aggregateID": {
  19883. "type": "string",
  19884. "enum": ["sessionID"]
  19885. },
  19886. "data": {
  19887. "type": "object",
  19888. "properties": {
  19889. "timestamp": {
  19890. "type": "number"
  19891. },
  19892. "sessionID": {
  19893. "type": "string",
  19894. "pattern": "^ses"
  19895. },
  19896. "agent": {
  19897. "type": "string"
  19898. },
  19899. "model": {
  19900. "type": "object",
  19901. "properties": {
  19902. "id": {
  19903. "type": "string"
  19904. },
  19905. "providerID": {
  19906. "type": "string"
  19907. },
  19908. "variant": {
  19909. "type": "string"
  19910. }
  19911. },
  19912. "required": ["id", "providerID"],
  19913. "additionalProperties": false
  19914. },
  19915. "snapshot": {
  19916. "type": "string"
  19917. }
  19918. },
  19919. "required": ["timestamp", "sessionID", "agent", "model"],
  19920. "additionalProperties": false
  19921. }
  19922. },
  19923. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  19924. "additionalProperties": false
  19925. },
  19926. "SyncEventSessionNextStepEnded": {
  19927. "type": "object",
  19928. "properties": {
  19929. "type": {
  19930. "type": "string",
  19931. "enum": ["sync"]
  19932. },
  19933. "name": {
  19934. "type": "string",
  19935. "enum": ["session.next.step.ended.1"]
  19936. },
  19937. "id": {
  19938. "type": "string"
  19939. },
  19940. "seq": {
  19941. "type": "number"
  19942. },
  19943. "aggregateID": {
  19944. "type": "string",
  19945. "enum": ["sessionID"]
  19946. },
  19947. "data": {
  19948. "type": "object",
  19949. "properties": {
  19950. "timestamp": {
  19951. "type": "number"
  19952. },
  19953. "sessionID": {
  19954. "type": "string",
  19955. "pattern": "^ses"
  19956. },
  19957. "finish": {
  19958. "type": "string"
  19959. },
  19960. "cost": {
  19961. "type": "number"
  19962. },
  19963. "tokens": {
  19964. "type": "object",
  19965. "properties": {
  19966. "input": {
  19967. "type": "number"
  19968. },
  19969. "output": {
  19970. "type": "number"
  19971. },
  19972. "reasoning": {
  19973. "type": "number"
  19974. },
  19975. "cache": {
  19976. "type": "object",
  19977. "properties": {
  19978. "read": {
  19979. "type": "number"
  19980. },
  19981. "write": {
  19982. "type": "number"
  19983. }
  19984. },
  19985. "required": ["read", "write"],
  19986. "additionalProperties": false
  19987. }
  19988. },
  19989. "required": ["input", "output", "reasoning", "cache"],
  19990. "additionalProperties": false
  19991. },
  19992. "snapshot": {
  19993. "type": "string"
  19994. }
  19995. },
  19996. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19997. "additionalProperties": false
  19998. }
  19999. },
  20000. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20001. "additionalProperties": false
  20002. },
  20003. "SyncEventSessionNextStepFailed": {
  20004. "type": "object",
  20005. "properties": {
  20006. "type": {
  20007. "type": "string",
  20008. "enum": ["sync"]
  20009. },
  20010. "name": {
  20011. "type": "string",
  20012. "enum": ["session.next.step.failed.1"]
  20013. },
  20014. "id": {
  20015. "type": "string"
  20016. },
  20017. "seq": {
  20018. "type": "number"
  20019. },
  20020. "aggregateID": {
  20021. "type": "string",
  20022. "enum": ["sessionID"]
  20023. },
  20024. "data": {
  20025. "type": "object",
  20026. "properties": {
  20027. "timestamp": {
  20028. "type": "number"
  20029. },
  20030. "sessionID": {
  20031. "type": "string",
  20032. "pattern": "^ses"
  20033. },
  20034. "error": {
  20035. "$ref": "#/components/schemas/SessionErrorUnknown"
  20036. }
  20037. },
  20038. "required": ["timestamp", "sessionID", "error"],
  20039. "additionalProperties": false
  20040. }
  20041. },
  20042. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20043. "additionalProperties": false
  20044. },
  20045. "SyncEventSessionNextTextStarted": {
  20046. "type": "object",
  20047. "properties": {
  20048. "type": {
  20049. "type": "string",
  20050. "enum": ["sync"]
  20051. },
  20052. "name": {
  20053. "type": "string",
  20054. "enum": ["session.next.text.started.1"]
  20055. },
  20056. "id": {
  20057. "type": "string"
  20058. },
  20059. "seq": {
  20060. "type": "number"
  20061. },
  20062. "aggregateID": {
  20063. "type": "string",
  20064. "enum": ["sessionID"]
  20065. },
  20066. "data": {
  20067. "type": "object",
  20068. "properties": {
  20069. "timestamp": {
  20070. "type": "number"
  20071. },
  20072. "sessionID": {
  20073. "type": "string",
  20074. "pattern": "^ses"
  20075. }
  20076. },
  20077. "required": ["timestamp", "sessionID"],
  20078. "additionalProperties": false
  20079. }
  20080. },
  20081. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20082. "additionalProperties": false
  20083. },
  20084. "SyncEventSessionNextTextDelta": {
  20085. "type": "object",
  20086. "properties": {
  20087. "type": {
  20088. "type": "string",
  20089. "enum": ["sync"]
  20090. },
  20091. "name": {
  20092. "type": "string",
  20093. "enum": ["session.next.text.delta.1"]
  20094. },
  20095. "id": {
  20096. "type": "string"
  20097. },
  20098. "seq": {
  20099. "type": "number"
  20100. },
  20101. "aggregateID": {
  20102. "type": "string",
  20103. "enum": ["sessionID"]
  20104. },
  20105. "data": {
  20106. "type": "object",
  20107. "properties": {
  20108. "timestamp": {
  20109. "type": "number"
  20110. },
  20111. "sessionID": {
  20112. "type": "string",
  20113. "pattern": "^ses"
  20114. },
  20115. "delta": {
  20116. "type": "string"
  20117. }
  20118. },
  20119. "required": ["timestamp", "sessionID", "delta"],
  20120. "additionalProperties": false
  20121. }
  20122. },
  20123. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20124. "additionalProperties": false
  20125. },
  20126. "SyncEventSessionNextTextEnded": {
  20127. "type": "object",
  20128. "properties": {
  20129. "type": {
  20130. "type": "string",
  20131. "enum": ["sync"]
  20132. },
  20133. "name": {
  20134. "type": "string",
  20135. "enum": ["session.next.text.ended.1"]
  20136. },
  20137. "id": {
  20138. "type": "string"
  20139. },
  20140. "seq": {
  20141. "type": "number"
  20142. },
  20143. "aggregateID": {
  20144. "type": "string",
  20145. "enum": ["sessionID"]
  20146. },
  20147. "data": {
  20148. "type": "object",
  20149. "properties": {
  20150. "timestamp": {
  20151. "type": "number"
  20152. },
  20153. "sessionID": {
  20154. "type": "string",
  20155. "pattern": "^ses"
  20156. },
  20157. "text": {
  20158. "type": "string"
  20159. }
  20160. },
  20161. "required": ["timestamp", "sessionID", "text"],
  20162. "additionalProperties": false
  20163. }
  20164. },
  20165. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20166. "additionalProperties": false
  20167. },
  20168. "SyncEventSessionNextReasoningStarted": {
  20169. "type": "object",
  20170. "properties": {
  20171. "type": {
  20172. "type": "string",
  20173. "enum": ["sync"]
  20174. },
  20175. "name": {
  20176. "type": "string",
  20177. "enum": ["session.next.reasoning.started.1"]
  20178. },
  20179. "id": {
  20180. "type": "string"
  20181. },
  20182. "seq": {
  20183. "type": "number"
  20184. },
  20185. "aggregateID": {
  20186. "type": "string",
  20187. "enum": ["sessionID"]
  20188. },
  20189. "data": {
  20190. "type": "object",
  20191. "properties": {
  20192. "timestamp": {
  20193. "type": "number"
  20194. },
  20195. "sessionID": {
  20196. "type": "string",
  20197. "pattern": "^ses"
  20198. },
  20199. "reasoningID": {
  20200. "type": "string"
  20201. }
  20202. },
  20203. "required": ["timestamp", "sessionID", "reasoningID"],
  20204. "additionalProperties": false
  20205. }
  20206. },
  20207. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20208. "additionalProperties": false
  20209. },
  20210. "SyncEventSessionNextReasoningDelta": {
  20211. "type": "object",
  20212. "properties": {
  20213. "type": {
  20214. "type": "string",
  20215. "enum": ["sync"]
  20216. },
  20217. "name": {
  20218. "type": "string",
  20219. "enum": ["session.next.reasoning.delta.1"]
  20220. },
  20221. "id": {
  20222. "type": "string"
  20223. },
  20224. "seq": {
  20225. "type": "number"
  20226. },
  20227. "aggregateID": {
  20228. "type": "string",
  20229. "enum": ["sessionID"]
  20230. },
  20231. "data": {
  20232. "type": "object",
  20233. "properties": {
  20234. "timestamp": {
  20235. "type": "number"
  20236. },
  20237. "sessionID": {
  20238. "type": "string",
  20239. "pattern": "^ses"
  20240. },
  20241. "reasoningID": {
  20242. "type": "string"
  20243. },
  20244. "delta": {
  20245. "type": "string"
  20246. }
  20247. },
  20248. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  20249. "additionalProperties": false
  20250. }
  20251. },
  20252. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20253. "additionalProperties": false
  20254. },
  20255. "SyncEventSessionNextReasoningEnded": {
  20256. "type": "object",
  20257. "properties": {
  20258. "type": {
  20259. "type": "string",
  20260. "enum": ["sync"]
  20261. },
  20262. "name": {
  20263. "type": "string",
  20264. "enum": ["session.next.reasoning.ended.1"]
  20265. },
  20266. "id": {
  20267. "type": "string"
  20268. },
  20269. "seq": {
  20270. "type": "number"
  20271. },
  20272. "aggregateID": {
  20273. "type": "string",
  20274. "enum": ["sessionID"]
  20275. },
  20276. "data": {
  20277. "type": "object",
  20278. "properties": {
  20279. "timestamp": {
  20280. "type": "number"
  20281. },
  20282. "sessionID": {
  20283. "type": "string",
  20284. "pattern": "^ses"
  20285. },
  20286. "reasoningID": {
  20287. "type": "string"
  20288. },
  20289. "text": {
  20290. "type": "string"
  20291. }
  20292. },
  20293. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  20294. "additionalProperties": false
  20295. }
  20296. },
  20297. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20298. "additionalProperties": false
  20299. },
  20300. "SyncEventSessionNextToolInputStarted": {
  20301. "type": "object",
  20302. "properties": {
  20303. "type": {
  20304. "type": "string",
  20305. "enum": ["sync"]
  20306. },
  20307. "name": {
  20308. "type": "string",
  20309. "enum": ["session.next.tool.input.started.1"]
  20310. },
  20311. "id": {
  20312. "type": "string"
  20313. },
  20314. "seq": {
  20315. "type": "number"
  20316. },
  20317. "aggregateID": {
  20318. "type": "string",
  20319. "enum": ["sessionID"]
  20320. },
  20321. "data": {
  20322. "type": "object",
  20323. "properties": {
  20324. "timestamp": {
  20325. "type": "number"
  20326. },
  20327. "sessionID": {
  20328. "type": "string",
  20329. "pattern": "^ses"
  20330. },
  20331. "callID": {
  20332. "type": "string"
  20333. },
  20334. "name": {
  20335. "type": "string"
  20336. }
  20337. },
  20338. "required": ["timestamp", "sessionID", "callID", "name"],
  20339. "additionalProperties": false
  20340. }
  20341. },
  20342. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20343. "additionalProperties": false
  20344. },
  20345. "SyncEventSessionNextToolInputDelta": {
  20346. "type": "object",
  20347. "properties": {
  20348. "type": {
  20349. "type": "string",
  20350. "enum": ["sync"]
  20351. },
  20352. "name": {
  20353. "type": "string",
  20354. "enum": ["session.next.tool.input.delta.1"]
  20355. },
  20356. "id": {
  20357. "type": "string"
  20358. },
  20359. "seq": {
  20360. "type": "number"
  20361. },
  20362. "aggregateID": {
  20363. "type": "string",
  20364. "enum": ["sessionID"]
  20365. },
  20366. "data": {
  20367. "type": "object",
  20368. "properties": {
  20369. "timestamp": {
  20370. "type": "number"
  20371. },
  20372. "sessionID": {
  20373. "type": "string",
  20374. "pattern": "^ses"
  20375. },
  20376. "callID": {
  20377. "type": "string"
  20378. },
  20379. "delta": {
  20380. "type": "string"
  20381. }
  20382. },
  20383. "required": ["timestamp", "sessionID", "callID", "delta"],
  20384. "additionalProperties": false
  20385. }
  20386. },
  20387. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20388. "additionalProperties": false
  20389. },
  20390. "SyncEventSessionNextToolInputEnded": {
  20391. "type": "object",
  20392. "properties": {
  20393. "type": {
  20394. "type": "string",
  20395. "enum": ["sync"]
  20396. },
  20397. "name": {
  20398. "type": "string",
  20399. "enum": ["session.next.tool.input.ended.1"]
  20400. },
  20401. "id": {
  20402. "type": "string"
  20403. },
  20404. "seq": {
  20405. "type": "number"
  20406. },
  20407. "aggregateID": {
  20408. "type": "string",
  20409. "enum": ["sessionID"]
  20410. },
  20411. "data": {
  20412. "type": "object",
  20413. "properties": {
  20414. "timestamp": {
  20415. "type": "number"
  20416. },
  20417. "sessionID": {
  20418. "type": "string",
  20419. "pattern": "^ses"
  20420. },
  20421. "callID": {
  20422. "type": "string"
  20423. },
  20424. "text": {
  20425. "type": "string"
  20426. }
  20427. },
  20428. "required": ["timestamp", "sessionID", "callID", "text"],
  20429. "additionalProperties": false
  20430. }
  20431. },
  20432. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20433. "additionalProperties": false
  20434. },
  20435. "SyncEventSessionNextToolCalled": {
  20436. "type": "object",
  20437. "properties": {
  20438. "type": {
  20439. "type": "string",
  20440. "enum": ["sync"]
  20441. },
  20442. "name": {
  20443. "type": "string",
  20444. "enum": ["session.next.tool.called.1"]
  20445. },
  20446. "id": {
  20447. "type": "string"
  20448. },
  20449. "seq": {
  20450. "type": "number"
  20451. },
  20452. "aggregateID": {
  20453. "type": "string",
  20454. "enum": ["sessionID"]
  20455. },
  20456. "data": {
  20457. "type": "object",
  20458. "properties": {
  20459. "timestamp": {
  20460. "type": "number"
  20461. },
  20462. "sessionID": {
  20463. "type": "string",
  20464. "pattern": "^ses"
  20465. },
  20466. "callID": {
  20467. "type": "string"
  20468. },
  20469. "tool": {
  20470. "type": "string"
  20471. },
  20472. "input": {
  20473. "type": "object"
  20474. },
  20475. "provider": {
  20476. "type": "object",
  20477. "properties": {
  20478. "executed": {
  20479. "type": "boolean"
  20480. },
  20481. "metadata": {
  20482. "type": "object"
  20483. }
  20484. },
  20485. "required": ["executed"],
  20486. "additionalProperties": false
  20487. }
  20488. },
  20489. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  20490. "additionalProperties": false
  20491. }
  20492. },
  20493. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20494. "additionalProperties": false
  20495. },
  20496. "SyncEventSessionNextToolProgress": {
  20497. "type": "object",
  20498. "properties": {
  20499. "type": {
  20500. "type": "string",
  20501. "enum": ["sync"]
  20502. },
  20503. "name": {
  20504. "type": "string",
  20505. "enum": ["session.next.tool.progress.1"]
  20506. },
  20507. "id": {
  20508. "type": "string"
  20509. },
  20510. "seq": {
  20511. "type": "number"
  20512. },
  20513. "aggregateID": {
  20514. "type": "string",
  20515. "enum": ["sessionID"]
  20516. },
  20517. "data": {
  20518. "type": "object",
  20519. "properties": {
  20520. "timestamp": {
  20521. "type": "number"
  20522. },
  20523. "sessionID": {
  20524. "type": "string",
  20525. "pattern": "^ses"
  20526. },
  20527. "callID": {
  20528. "type": "string"
  20529. },
  20530. "structured": {
  20531. "type": "object"
  20532. },
  20533. "content": {
  20534. "type": "array",
  20535. "items": {
  20536. "anyOf": [
  20537. {
  20538. "$ref": "#/components/schemas/ToolTextContent"
  20539. },
  20540. {
  20541. "$ref": "#/components/schemas/ToolFileContent"
  20542. }
  20543. ]
  20544. }
  20545. }
  20546. },
  20547. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20548. "additionalProperties": false
  20549. }
  20550. },
  20551. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20552. "additionalProperties": false
  20553. },
  20554. "SyncEventSessionNextToolSuccess": {
  20555. "type": "object",
  20556. "properties": {
  20557. "type": {
  20558. "type": "string",
  20559. "enum": ["sync"]
  20560. },
  20561. "name": {
  20562. "type": "string",
  20563. "enum": ["session.next.tool.success.1"]
  20564. },
  20565. "id": {
  20566. "type": "string"
  20567. },
  20568. "seq": {
  20569. "type": "number"
  20570. },
  20571. "aggregateID": {
  20572. "type": "string",
  20573. "enum": ["sessionID"]
  20574. },
  20575. "data": {
  20576. "type": "object",
  20577. "properties": {
  20578. "timestamp": {
  20579. "type": "number"
  20580. },
  20581. "sessionID": {
  20582. "type": "string",
  20583. "pattern": "^ses"
  20584. },
  20585. "callID": {
  20586. "type": "string"
  20587. },
  20588. "structured": {
  20589. "type": "object"
  20590. },
  20591. "content": {
  20592. "type": "array",
  20593. "items": {
  20594. "anyOf": [
  20595. {
  20596. "$ref": "#/components/schemas/ToolTextContent"
  20597. },
  20598. {
  20599. "$ref": "#/components/schemas/ToolFileContent"
  20600. }
  20601. ]
  20602. }
  20603. },
  20604. "provider": {
  20605. "type": "object",
  20606. "properties": {
  20607. "executed": {
  20608. "type": "boolean"
  20609. },
  20610. "metadata": {
  20611. "type": "object"
  20612. }
  20613. },
  20614. "required": ["executed"],
  20615. "additionalProperties": false
  20616. }
  20617. },
  20618. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20619. "additionalProperties": false
  20620. }
  20621. },
  20622. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20623. "additionalProperties": false
  20624. },
  20625. "SyncEventSessionNextToolFailed": {
  20626. "type": "object",
  20627. "properties": {
  20628. "type": {
  20629. "type": "string",
  20630. "enum": ["sync"]
  20631. },
  20632. "name": {
  20633. "type": "string",
  20634. "enum": ["session.next.tool.failed.1"]
  20635. },
  20636. "id": {
  20637. "type": "string"
  20638. },
  20639. "seq": {
  20640. "type": "number"
  20641. },
  20642. "aggregateID": {
  20643. "type": "string",
  20644. "enum": ["sessionID"]
  20645. },
  20646. "data": {
  20647. "type": "object",
  20648. "properties": {
  20649. "timestamp": {
  20650. "type": "number"
  20651. },
  20652. "sessionID": {
  20653. "type": "string",
  20654. "pattern": "^ses"
  20655. },
  20656. "callID": {
  20657. "type": "string"
  20658. },
  20659. "error": {
  20660. "$ref": "#/components/schemas/SessionErrorUnknown"
  20661. },
  20662. "provider": {
  20663. "type": "object",
  20664. "properties": {
  20665. "executed": {
  20666. "type": "boolean"
  20667. },
  20668. "metadata": {
  20669. "type": "object"
  20670. }
  20671. },
  20672. "required": ["executed"],
  20673. "additionalProperties": false
  20674. }
  20675. },
  20676. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20677. "additionalProperties": false
  20678. }
  20679. },
  20680. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20681. "additionalProperties": false
  20682. },
  20683. "SyncEventSessionNextRetried": {
  20684. "type": "object",
  20685. "properties": {
  20686. "type": {
  20687. "type": "string",
  20688. "enum": ["sync"]
  20689. },
  20690. "name": {
  20691. "type": "string",
  20692. "enum": ["session.next.retried.1"]
  20693. },
  20694. "id": {
  20695. "type": "string"
  20696. },
  20697. "seq": {
  20698. "type": "number"
  20699. },
  20700. "aggregateID": {
  20701. "type": "string",
  20702. "enum": ["sessionID"]
  20703. },
  20704. "data": {
  20705. "type": "object",
  20706. "properties": {
  20707. "timestamp": {
  20708. "type": "number"
  20709. },
  20710. "sessionID": {
  20711. "type": "string",
  20712. "pattern": "^ses"
  20713. },
  20714. "attempt": {
  20715. "type": "number"
  20716. },
  20717. "error": {
  20718. "$ref": "#/components/schemas/SessionNextRetry_error"
  20719. }
  20720. },
  20721. "required": ["timestamp", "sessionID", "attempt", "error"],
  20722. "additionalProperties": false
  20723. }
  20724. },
  20725. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20726. "additionalProperties": false
  20727. },
  20728. "SyncEventSessionNextCompactionStarted": {
  20729. "type": "object",
  20730. "properties": {
  20731. "type": {
  20732. "type": "string",
  20733. "enum": ["sync"]
  20734. },
  20735. "name": {
  20736. "type": "string",
  20737. "enum": ["session.next.compaction.started.1"]
  20738. },
  20739. "id": {
  20740. "type": "string"
  20741. },
  20742. "seq": {
  20743. "type": "number"
  20744. },
  20745. "aggregateID": {
  20746. "type": "string",
  20747. "enum": ["sessionID"]
  20748. },
  20749. "data": {
  20750. "type": "object",
  20751. "properties": {
  20752. "timestamp": {
  20753. "type": "number"
  20754. },
  20755. "sessionID": {
  20756. "type": "string",
  20757. "pattern": "^ses"
  20758. },
  20759. "reason": {
  20760. "type": "string",
  20761. "enum": ["auto", "manual"]
  20762. }
  20763. },
  20764. "required": ["timestamp", "sessionID", "reason"],
  20765. "additionalProperties": false
  20766. }
  20767. },
  20768. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20769. "additionalProperties": false
  20770. },
  20771. "SyncEventSessionNextCompactionDelta": {
  20772. "type": "object",
  20773. "properties": {
  20774. "type": {
  20775. "type": "string",
  20776. "enum": ["sync"]
  20777. },
  20778. "name": {
  20779. "type": "string",
  20780. "enum": ["session.next.compaction.delta.1"]
  20781. },
  20782. "id": {
  20783. "type": "string"
  20784. },
  20785. "seq": {
  20786. "type": "number"
  20787. },
  20788. "aggregateID": {
  20789. "type": "string",
  20790. "enum": ["sessionID"]
  20791. },
  20792. "data": {
  20793. "type": "object",
  20794. "properties": {
  20795. "timestamp": {
  20796. "type": "number"
  20797. },
  20798. "sessionID": {
  20799. "type": "string",
  20800. "pattern": "^ses"
  20801. },
  20802. "text": {
  20803. "type": "string"
  20804. }
  20805. },
  20806. "required": ["timestamp", "sessionID", "text"],
  20807. "additionalProperties": false
  20808. }
  20809. },
  20810. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20811. "additionalProperties": false
  20812. },
  20813. "SyncEventSessionNextCompactionEnded": {
  20814. "type": "object",
  20815. "properties": {
  20816. "type": {
  20817. "type": "string",
  20818. "enum": ["sync"]
  20819. },
  20820. "name": {
  20821. "type": "string",
  20822. "enum": ["session.next.compaction.ended.1"]
  20823. },
  20824. "id": {
  20825. "type": "string"
  20826. },
  20827. "seq": {
  20828. "type": "number"
  20829. },
  20830. "aggregateID": {
  20831. "type": "string",
  20832. "enum": ["sessionID"]
  20833. },
  20834. "data": {
  20835. "type": "object",
  20836. "properties": {
  20837. "timestamp": {
  20838. "type": "number"
  20839. },
  20840. "sessionID": {
  20841. "type": "string",
  20842. "pattern": "^ses"
  20843. },
  20844. "text": {
  20845. "type": "string"
  20846. },
  20847. "include": {
  20848. "type": "string"
  20849. }
  20850. },
  20851. "required": ["timestamp", "sessionID", "text"],
  20852. "additionalProperties": false
  20853. }
  20854. },
  20855. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20856. "additionalProperties": false
  20857. },
  20858. "SyncEventSessionCreated": {
  20859. "type": "object",
  20860. "properties": {
  20861. "type": {
  20862. "type": "string",
  20863. "enum": ["sync"]
  20864. },
  20865. "name": {
  20866. "type": "string",
  20867. "enum": ["session.created.1"]
  20868. },
  20869. "id": {
  20870. "type": "string"
  20871. },
  20872. "seq": {
  20873. "type": "number"
  20874. },
  20875. "aggregateID": {
  20876. "type": "string",
  20877. "enum": ["sessionID"]
  20878. },
  20879. "data": {
  20880. "type": "object",
  20881. "properties": {
  20882. "sessionID": {
  20883. "type": "string",
  20884. "pattern": "^ses"
  20885. },
  20886. "info": {
  20887. "$ref": "#/components/schemas/Session"
  20888. }
  20889. },
  20890. "required": ["sessionID", "info"],
  20891. "additionalProperties": false
  20892. }
  20893. },
  20894. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20895. "additionalProperties": false
  20896. },
  20897. "SyncEventSessionUpdated": {
  20898. "type": "object",
  20899. "properties": {
  20900. "type": {
  20901. "type": "string",
  20902. "enum": ["sync"]
  20903. },
  20904. "name": {
  20905. "type": "string",
  20906. "enum": ["session.updated.1"]
  20907. },
  20908. "id": {
  20909. "type": "string"
  20910. },
  20911. "seq": {
  20912. "type": "number"
  20913. },
  20914. "aggregateID": {
  20915. "type": "string",
  20916. "enum": ["sessionID"]
  20917. },
  20918. "data": {
  20919. "type": "object",
  20920. "properties": {
  20921. "sessionID": {
  20922. "type": "string",
  20923. "pattern": "^ses"
  20924. },
  20925. "info": {
  20926. "$ref": "#/components/schemas/Session"
  20927. }
  20928. },
  20929. "required": ["sessionID", "info"],
  20930. "additionalProperties": false
  20931. }
  20932. },
  20933. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20934. "additionalProperties": false
  20935. },
  20936. "SyncEventSessionDeleted": {
  20937. "type": "object",
  20938. "properties": {
  20939. "type": {
  20940. "type": "string",
  20941. "enum": ["sync"]
  20942. },
  20943. "name": {
  20944. "type": "string",
  20945. "enum": ["session.deleted.1"]
  20946. },
  20947. "id": {
  20948. "type": "string"
  20949. },
  20950. "seq": {
  20951. "type": "number"
  20952. },
  20953. "aggregateID": {
  20954. "type": "string",
  20955. "enum": ["sessionID"]
  20956. },
  20957. "data": {
  20958. "type": "object",
  20959. "properties": {
  20960. "sessionID": {
  20961. "type": "string",
  20962. "pattern": "^ses"
  20963. },
  20964. "info": {
  20965. "$ref": "#/components/schemas/Session"
  20966. }
  20967. },
  20968. "required": ["sessionID", "info"],
  20969. "additionalProperties": false
  20970. }
  20971. },
  20972. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  20973. "additionalProperties": false
  20974. },
  20975. "SyncEventMessageUpdated": {
  20976. "type": "object",
  20977. "properties": {
  20978. "type": {
  20979. "type": "string",
  20980. "enum": ["sync"]
  20981. },
  20982. "name": {
  20983. "type": "string",
  20984. "enum": ["message.updated.1"]
  20985. },
  20986. "id": {
  20987. "type": "string"
  20988. },
  20989. "seq": {
  20990. "type": "number"
  20991. },
  20992. "aggregateID": {
  20993. "type": "string",
  20994. "enum": ["sessionID"]
  20995. },
  20996. "data": {
  20997. "type": "object",
  20998. "properties": {
  20999. "sessionID": {
  21000. "type": "string",
  21001. "pattern": "^ses"
  21002. },
  21003. "info": {
  21004. "$ref": "#/components/schemas/Message"
  21005. }
  21006. },
  21007. "required": ["sessionID", "info"],
  21008. "additionalProperties": false
  21009. }
  21010. },
  21011. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21012. "additionalProperties": false
  21013. },
  21014. "SyncEventMessageRemoved": {
  21015. "type": "object",
  21016. "properties": {
  21017. "type": {
  21018. "type": "string",
  21019. "enum": ["sync"]
  21020. },
  21021. "name": {
  21022. "type": "string",
  21023. "enum": ["message.removed.1"]
  21024. },
  21025. "id": {
  21026. "type": "string"
  21027. },
  21028. "seq": {
  21029. "type": "number"
  21030. },
  21031. "aggregateID": {
  21032. "type": "string",
  21033. "enum": ["sessionID"]
  21034. },
  21035. "data": {
  21036. "type": "object",
  21037. "properties": {
  21038. "sessionID": {
  21039. "type": "string",
  21040. "pattern": "^ses"
  21041. },
  21042. "messageID": {
  21043. "type": "string",
  21044. "pattern": "^msg"
  21045. }
  21046. },
  21047. "required": ["sessionID", "messageID"],
  21048. "additionalProperties": false
  21049. }
  21050. },
  21051. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21052. "additionalProperties": false
  21053. },
  21054. "SyncEventMessagePartUpdated": {
  21055. "type": "object",
  21056. "properties": {
  21057. "type": {
  21058. "type": "string",
  21059. "enum": ["sync"]
  21060. },
  21061. "name": {
  21062. "type": "string",
  21063. "enum": ["message.part.updated.1"]
  21064. },
  21065. "id": {
  21066. "type": "string"
  21067. },
  21068. "seq": {
  21069. "type": "number"
  21070. },
  21071. "aggregateID": {
  21072. "type": "string",
  21073. "enum": ["sessionID"]
  21074. },
  21075. "data": {
  21076. "type": "object",
  21077. "properties": {
  21078. "sessionID": {
  21079. "type": "string",
  21080. "pattern": "^ses"
  21081. },
  21082. "part": {
  21083. "$ref": "#/components/schemas/Part"
  21084. },
  21085. "time": {
  21086. "type": "number"
  21087. }
  21088. },
  21089. "required": ["sessionID", "part", "time"],
  21090. "additionalProperties": false
  21091. }
  21092. },
  21093. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21094. "additionalProperties": false
  21095. },
  21096. "SyncEventMessagePartRemoved": {
  21097. "type": "object",
  21098. "properties": {
  21099. "type": {
  21100. "type": "string",
  21101. "enum": ["sync"]
  21102. },
  21103. "name": {
  21104. "type": "string",
  21105. "enum": ["message.part.removed.1"]
  21106. },
  21107. "id": {
  21108. "type": "string"
  21109. },
  21110. "seq": {
  21111. "type": "number"
  21112. },
  21113. "aggregateID": {
  21114. "type": "string",
  21115. "enum": ["sessionID"]
  21116. },
  21117. "data": {
  21118. "type": "object",
  21119. "properties": {
  21120. "sessionID": {
  21121. "type": "string",
  21122. "pattern": "^ses"
  21123. },
  21124. "messageID": {
  21125. "type": "string",
  21126. "pattern": "^msg"
  21127. },
  21128. "partID": {
  21129. "type": "string",
  21130. "pattern": "^prt"
  21131. }
  21132. },
  21133. "required": ["sessionID", "messageID", "partID"],
  21134. "additionalProperties": false
  21135. }
  21136. },
  21137. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  21138. "additionalProperties": false
  21139. },
  21140. "PolicyEffect": {
  21141. "type": "string",
  21142. "enum": ["allow", "deny"]
  21143. },
  21144. "ConfigV2ExperimentalPolicy": {
  21145. "type": "object",
  21146. "properties": {
  21147. "action": {
  21148. "type": "string",
  21149. "enum": ["provider.use"]
  21150. },
  21151. "effect": {
  21152. "$ref": "#/components/schemas/PolicyEffect"
  21153. },
  21154. "resource": {
  21155. "type": "string"
  21156. }
  21157. },
  21158. "required": ["action", "effect", "resource"],
  21159. "additionalProperties": false
  21160. },
  21161. "LocationRef": {
  21162. "type": "object",
  21163. "properties": {
  21164. "directory": {
  21165. "type": "string"
  21166. },
  21167. "workspaceID": {
  21168. "type": "string"
  21169. }
  21170. },
  21171. "required": ["directory"],
  21172. "additionalProperties": false
  21173. },
  21174. "SessionV2Info": {
  21175. "type": "object",
  21176. "properties": {
  21177. "id": {
  21178. "type": "string",
  21179. "pattern": "^ses"
  21180. },
  21181. "parentID": {
  21182. "type": "string",
  21183. "pattern": "^ses"
  21184. },
  21185. "projectID": {
  21186. "type": "string"
  21187. },
  21188. "agent": {
  21189. "type": "string"
  21190. },
  21191. "model": {
  21192. "type": "object",
  21193. "properties": {
  21194. "id": {
  21195. "type": "string"
  21196. },
  21197. "providerID": {
  21198. "type": "string"
  21199. },
  21200. "variant": {
  21201. "type": "string"
  21202. }
  21203. },
  21204. "required": ["id", "providerID"],
  21205. "additionalProperties": false
  21206. },
  21207. "cost": {
  21208. "type": "number"
  21209. },
  21210. "tokens": {
  21211. "type": "object",
  21212. "properties": {
  21213. "input": {
  21214. "type": "number"
  21215. },
  21216. "output": {
  21217. "type": "number"
  21218. },
  21219. "reasoning": {
  21220. "type": "number"
  21221. },
  21222. "cache": {
  21223. "type": "object",
  21224. "properties": {
  21225. "read": {
  21226. "type": "number"
  21227. },
  21228. "write": {
  21229. "type": "number"
  21230. }
  21231. },
  21232. "required": ["read", "write"],
  21233. "additionalProperties": false
  21234. }
  21235. },
  21236. "required": ["input", "output", "reasoning", "cache"],
  21237. "additionalProperties": false
  21238. },
  21239. "time": {
  21240. "type": "object",
  21241. "properties": {
  21242. "created": {
  21243. "type": "number"
  21244. },
  21245. "updated": {
  21246. "type": "number"
  21247. },
  21248. "archived": {
  21249. "type": "number"
  21250. }
  21251. },
  21252. "required": ["created", "updated"],
  21253. "additionalProperties": false
  21254. },
  21255. "title": {
  21256. "type": "string"
  21257. },
  21258. "location": {
  21259. "$ref": "#/components/schemas/LocationRef"
  21260. },
  21261. "subpath": {
  21262. "type": "string"
  21263. }
  21264. },
  21265. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  21266. "additionalProperties": false
  21267. },
  21268. "SessionDelivery": {
  21269. "type": "string",
  21270. "enum": ["immediate", "deferred"]
  21271. },
  21272. "SessionMessageAgentSwitched": {
  21273. "type": "object",
  21274. "properties": {
  21275. "id": {
  21276. "type": "string"
  21277. },
  21278. "metadata": {
  21279. "type": "object"
  21280. },
  21281. "time": {
  21282. "type": "object",
  21283. "properties": {
  21284. "created": {
  21285. "type": "number"
  21286. }
  21287. },
  21288. "required": ["created"],
  21289. "additionalProperties": false
  21290. },
  21291. "type": {
  21292. "type": "string",
  21293. "enum": ["agent-switched"]
  21294. },
  21295. "agent": {
  21296. "type": "string"
  21297. }
  21298. },
  21299. "required": ["id", "time", "type", "agent"],
  21300. "additionalProperties": false
  21301. },
  21302. "SessionMessageModelSwitched": {
  21303. "type": "object",
  21304. "properties": {
  21305. "id": {
  21306. "type": "string"
  21307. },
  21308. "metadata": {
  21309. "type": "object"
  21310. },
  21311. "time": {
  21312. "type": "object",
  21313. "properties": {
  21314. "created": {
  21315. "type": "number"
  21316. }
  21317. },
  21318. "required": ["created"],
  21319. "additionalProperties": false
  21320. },
  21321. "type": {
  21322. "type": "string",
  21323. "enum": ["model-switched"]
  21324. },
  21325. "model": {
  21326. "type": "object",
  21327. "properties": {
  21328. "id": {
  21329. "type": "string"
  21330. },
  21331. "providerID": {
  21332. "type": "string"
  21333. },
  21334. "variant": {
  21335. "type": "string"
  21336. }
  21337. },
  21338. "required": ["id", "providerID"],
  21339. "additionalProperties": false
  21340. }
  21341. },
  21342. "required": ["id", "time", "type", "model"],
  21343. "additionalProperties": false
  21344. },
  21345. "SessionMessageUser": {
  21346. "type": "object",
  21347. "properties": {
  21348. "id": {
  21349. "type": "string"
  21350. },
  21351. "metadata": {
  21352. "type": "object"
  21353. },
  21354. "time": {
  21355. "type": "object",
  21356. "properties": {
  21357. "created": {
  21358. "type": "number"
  21359. }
  21360. },
  21361. "required": ["created"],
  21362. "additionalProperties": false
  21363. },
  21364. "text": {
  21365. "type": "string"
  21366. },
  21367. "files": {
  21368. "type": "array",
  21369. "items": {
  21370. "$ref": "#/components/schemas/PromptFileAttachment"
  21371. }
  21372. },
  21373. "agents": {
  21374. "type": "array",
  21375. "items": {
  21376. "$ref": "#/components/schemas/PromptAgentAttachment"
  21377. }
  21378. },
  21379. "references": {
  21380. "type": "array",
  21381. "items": {
  21382. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21383. }
  21384. },
  21385. "type": {
  21386. "type": "string",
  21387. "enum": ["user"]
  21388. }
  21389. },
  21390. "required": ["id", "time", "text", "type"],
  21391. "additionalProperties": false
  21392. },
  21393. "SessionMessageSynthetic": {
  21394. "type": "object",
  21395. "properties": {
  21396. "id": {
  21397. "type": "string"
  21398. },
  21399. "metadata": {
  21400. "type": "object"
  21401. },
  21402. "time": {
  21403. "type": "object",
  21404. "properties": {
  21405. "created": {
  21406. "type": "number"
  21407. }
  21408. },
  21409. "required": ["created"],
  21410. "additionalProperties": false
  21411. },
  21412. "sessionID": {
  21413. "type": "string",
  21414. "pattern": "^ses"
  21415. },
  21416. "text": {
  21417. "type": "string"
  21418. },
  21419. "type": {
  21420. "type": "string",
  21421. "enum": ["synthetic"]
  21422. }
  21423. },
  21424. "required": ["id", "time", "sessionID", "text", "type"],
  21425. "additionalProperties": false
  21426. },
  21427. "SessionMessageShell": {
  21428. "type": "object",
  21429. "properties": {
  21430. "id": {
  21431. "type": "string"
  21432. },
  21433. "metadata": {
  21434. "type": "object"
  21435. },
  21436. "time": {
  21437. "type": "object",
  21438. "properties": {
  21439. "created": {
  21440. "type": "number"
  21441. },
  21442. "completed": {
  21443. "type": "number"
  21444. }
  21445. },
  21446. "required": ["created"],
  21447. "additionalProperties": false
  21448. },
  21449. "type": {
  21450. "type": "string",
  21451. "enum": ["shell"]
  21452. },
  21453. "callID": {
  21454. "type": "string"
  21455. },
  21456. "command": {
  21457. "type": "string"
  21458. },
  21459. "output": {
  21460. "type": "string"
  21461. }
  21462. },
  21463. "required": ["id", "time", "type", "callID", "command", "output"],
  21464. "additionalProperties": false
  21465. },
  21466. "SessionMessageAssistantText": {
  21467. "type": "object",
  21468. "properties": {
  21469. "type": {
  21470. "type": "string",
  21471. "enum": ["text"]
  21472. },
  21473. "text": {
  21474. "type": "string"
  21475. }
  21476. },
  21477. "required": ["type", "text"],
  21478. "additionalProperties": false
  21479. },
  21480. "SessionMessageAssistantReasoning": {
  21481. "type": "object",
  21482. "properties": {
  21483. "type": {
  21484. "type": "string",
  21485. "enum": ["reasoning"]
  21486. },
  21487. "id": {
  21488. "type": "string"
  21489. },
  21490. "text": {
  21491. "type": "string"
  21492. }
  21493. },
  21494. "required": ["type", "id", "text"],
  21495. "additionalProperties": false
  21496. },
  21497. "SessionMessageToolStatePending": {
  21498. "type": "object",
  21499. "properties": {
  21500. "status": {
  21501. "type": "string",
  21502. "enum": ["pending"]
  21503. },
  21504. "input": {
  21505. "type": "string"
  21506. }
  21507. },
  21508. "required": ["status", "input"],
  21509. "additionalProperties": false
  21510. },
  21511. "SessionMessageToolStateRunning": {
  21512. "type": "object",
  21513. "properties": {
  21514. "status": {
  21515. "type": "string",
  21516. "enum": ["running"]
  21517. },
  21518. "input": {
  21519. "type": "object"
  21520. },
  21521. "structured": {
  21522. "type": "object"
  21523. },
  21524. "content": {
  21525. "type": "array",
  21526. "items": {
  21527. "anyOf": [
  21528. {
  21529. "$ref": "#/components/schemas/ToolTextContent"
  21530. },
  21531. {
  21532. "$ref": "#/components/schemas/ToolFileContent"
  21533. }
  21534. ]
  21535. }
  21536. }
  21537. },
  21538. "required": ["status", "input", "structured", "content"],
  21539. "additionalProperties": false
  21540. },
  21541. "SessionMessageToolStateCompleted": {
  21542. "type": "object",
  21543. "properties": {
  21544. "status": {
  21545. "type": "string",
  21546. "enum": ["completed"]
  21547. },
  21548. "input": {
  21549. "type": "object"
  21550. },
  21551. "attachments": {
  21552. "type": "array",
  21553. "items": {
  21554. "$ref": "#/components/schemas/PromptFileAttachment"
  21555. }
  21556. },
  21557. "content": {
  21558. "type": "array",
  21559. "items": {
  21560. "anyOf": [
  21561. {
  21562. "$ref": "#/components/schemas/ToolTextContent"
  21563. },
  21564. {
  21565. "$ref": "#/components/schemas/ToolFileContent"
  21566. }
  21567. ]
  21568. }
  21569. },
  21570. "structured": {
  21571. "type": "object"
  21572. }
  21573. },
  21574. "required": ["status", "input", "content", "structured"],
  21575. "additionalProperties": false
  21576. },
  21577. "SessionMessageToolStateError": {
  21578. "type": "object",
  21579. "properties": {
  21580. "status": {
  21581. "type": "string",
  21582. "enum": ["error"]
  21583. },
  21584. "input": {
  21585. "type": "object"
  21586. },
  21587. "content": {
  21588. "type": "array",
  21589. "items": {
  21590. "anyOf": [
  21591. {
  21592. "$ref": "#/components/schemas/ToolTextContent"
  21593. },
  21594. {
  21595. "$ref": "#/components/schemas/ToolFileContent"
  21596. }
  21597. ]
  21598. }
  21599. },
  21600. "structured": {
  21601. "type": "object"
  21602. },
  21603. "error": {
  21604. "$ref": "#/components/schemas/SessionErrorUnknown"
  21605. }
  21606. },
  21607. "required": ["status", "input", "content", "structured", "error"],
  21608. "additionalProperties": false
  21609. },
  21610. "SessionMessageAssistantTool": {
  21611. "type": "object",
  21612. "properties": {
  21613. "type": {
  21614. "type": "string",
  21615. "enum": ["tool"]
  21616. },
  21617. "id": {
  21618. "type": "string"
  21619. },
  21620. "name": {
  21621. "type": "string"
  21622. },
  21623. "provider": {
  21624. "type": "object",
  21625. "properties": {
  21626. "executed": {
  21627. "type": "boolean"
  21628. },
  21629. "metadata": {
  21630. "type": "object"
  21631. }
  21632. },
  21633. "required": ["executed"],
  21634. "additionalProperties": false
  21635. },
  21636. "state": {
  21637. "anyOf": [
  21638. {
  21639. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21640. },
  21641. {
  21642. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21643. },
  21644. {
  21645. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21646. },
  21647. {
  21648. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21649. }
  21650. ]
  21651. },
  21652. "time": {
  21653. "type": "object",
  21654. "properties": {
  21655. "created": {
  21656. "type": "number"
  21657. },
  21658. "ran": {
  21659. "type": "number"
  21660. },
  21661. "completed": {
  21662. "type": "number"
  21663. },
  21664. "pruned": {
  21665. "type": "number"
  21666. }
  21667. },
  21668. "required": ["created"],
  21669. "additionalProperties": false
  21670. }
  21671. },
  21672. "required": ["type", "id", "name", "state", "time"],
  21673. "additionalProperties": false
  21674. },
  21675. "SessionMessageAssistant": {
  21676. "type": "object",
  21677. "properties": {
  21678. "id": {
  21679. "type": "string"
  21680. },
  21681. "metadata": {
  21682. "type": "object"
  21683. },
  21684. "time": {
  21685. "type": "object",
  21686. "properties": {
  21687. "created": {
  21688. "type": "number"
  21689. },
  21690. "completed": {
  21691. "type": "number"
  21692. }
  21693. },
  21694. "required": ["created"],
  21695. "additionalProperties": false
  21696. },
  21697. "type": {
  21698. "type": "string",
  21699. "enum": ["assistant"]
  21700. },
  21701. "agent": {
  21702. "type": "string"
  21703. },
  21704. "model": {
  21705. "type": "object",
  21706. "properties": {
  21707. "id": {
  21708. "type": "string"
  21709. },
  21710. "providerID": {
  21711. "type": "string"
  21712. },
  21713. "variant": {
  21714. "type": "string"
  21715. }
  21716. },
  21717. "required": ["id", "providerID"],
  21718. "additionalProperties": false
  21719. },
  21720. "content": {
  21721. "type": "array",
  21722. "items": {
  21723. "anyOf": [
  21724. {
  21725. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21726. },
  21727. {
  21728. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21729. },
  21730. {
  21731. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21732. }
  21733. ]
  21734. }
  21735. },
  21736. "snapshot": {
  21737. "type": "object",
  21738. "properties": {
  21739. "start": {
  21740. "type": "string"
  21741. },
  21742. "end": {
  21743. "type": "string"
  21744. }
  21745. },
  21746. "additionalProperties": false
  21747. },
  21748. "finish": {
  21749. "type": "string"
  21750. },
  21751. "cost": {
  21752. "type": "number"
  21753. },
  21754. "tokens": {
  21755. "type": "object",
  21756. "properties": {
  21757. "input": {
  21758. "type": "number"
  21759. },
  21760. "output": {
  21761. "type": "number"
  21762. },
  21763. "reasoning": {
  21764. "type": "number"
  21765. },
  21766. "cache": {
  21767. "type": "object",
  21768. "properties": {
  21769. "read": {
  21770. "type": "number"
  21771. },
  21772. "write": {
  21773. "type": "number"
  21774. }
  21775. },
  21776. "required": ["read", "write"],
  21777. "additionalProperties": false
  21778. }
  21779. },
  21780. "required": ["input", "output", "reasoning", "cache"],
  21781. "additionalProperties": false
  21782. },
  21783. "error": {
  21784. "$ref": "#/components/schemas/SessionErrorUnknown"
  21785. }
  21786. },
  21787. "required": ["id", "time", "type", "agent", "model", "content"],
  21788. "additionalProperties": false
  21789. },
  21790. "SessionMessageCompaction": {
  21791. "type": "object",
  21792. "properties": {
  21793. "type": {
  21794. "type": "string",
  21795. "enum": ["compaction"]
  21796. },
  21797. "reason": {
  21798. "type": "string",
  21799. "enum": ["auto", "manual"]
  21800. },
  21801. "summary": {
  21802. "type": "string"
  21803. },
  21804. "include": {
  21805. "type": "string"
  21806. },
  21807. "id": {
  21808. "type": "string"
  21809. },
  21810. "metadata": {
  21811. "type": "object"
  21812. },
  21813. "time": {
  21814. "type": "object",
  21815. "properties": {
  21816. "created": {
  21817. "type": "number"
  21818. }
  21819. },
  21820. "required": ["created"],
  21821. "additionalProperties": false
  21822. }
  21823. },
  21824. "required": ["type", "reason", "summary", "id", "time"],
  21825. "additionalProperties": false
  21826. },
  21827. "SessionMessage": {
  21828. "anyOf": [
  21829. {
  21830. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21831. },
  21832. {
  21833. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21834. },
  21835. {
  21836. "$ref": "#/components/schemas/SessionMessageUser"
  21837. },
  21838. {
  21839. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21840. },
  21841. {
  21842. "$ref": "#/components/schemas/SessionMessageShell"
  21843. },
  21844. {
  21845. "$ref": "#/components/schemas/SessionMessageAssistant"
  21846. },
  21847. {
  21848. "$ref": "#/components/schemas/SessionMessageCompaction"
  21849. }
  21850. ]
  21851. },
  21852. "ProviderV2Info": {
  21853. "type": "object",
  21854. "properties": {
  21855. "id": {
  21856. "type": "string"
  21857. },
  21858. "name": {
  21859. "type": "string"
  21860. },
  21861. "enabled": {
  21862. "anyOf": [
  21863. {
  21864. "type": "boolean",
  21865. "enum": [false]
  21866. },
  21867. {
  21868. "type": "object",
  21869. "properties": {
  21870. "via": {
  21871. "type": "string",
  21872. "enum": ["env"]
  21873. },
  21874. "name": {
  21875. "type": "string"
  21876. }
  21877. },
  21878. "required": ["via", "name"],
  21879. "additionalProperties": false
  21880. },
  21881. {
  21882. "type": "object",
  21883. "properties": {
  21884. "via": {
  21885. "type": "string",
  21886. "enum": ["account"]
  21887. },
  21888. "service": {
  21889. "type": "string"
  21890. }
  21891. },
  21892. "required": ["via", "service"],
  21893. "additionalProperties": false
  21894. },
  21895. {
  21896. "type": "object",
  21897. "properties": {
  21898. "via": {
  21899. "type": "string",
  21900. "enum": ["custom"]
  21901. },
  21902. "data": {
  21903. "type": "object"
  21904. }
  21905. },
  21906. "required": ["via", "data"],
  21907. "additionalProperties": false
  21908. }
  21909. ]
  21910. },
  21911. "env": {
  21912. "type": "array",
  21913. "items": {
  21914. "type": "string"
  21915. }
  21916. },
  21917. "endpoint": {
  21918. "anyOf": [
  21919. {
  21920. "type": "object",
  21921. "properties": {
  21922. "type": {
  21923. "type": "string",
  21924. "enum": ["unknown"]
  21925. }
  21926. },
  21927. "required": ["type"],
  21928. "additionalProperties": false
  21929. },
  21930. {
  21931. "type": "object",
  21932. "properties": {
  21933. "type": {
  21934. "type": "string",
  21935. "enum": ["openai/responses"]
  21936. },
  21937. "url": {
  21938. "type": "string"
  21939. },
  21940. "websocket": {
  21941. "type": "boolean"
  21942. }
  21943. },
  21944. "required": ["type", "url"],
  21945. "additionalProperties": false
  21946. },
  21947. {
  21948. "type": "object",
  21949. "properties": {
  21950. "type": {
  21951. "type": "string",
  21952. "enum": ["openai/completions"]
  21953. },
  21954. "url": {
  21955. "type": "string"
  21956. },
  21957. "reasoning": {
  21958. "anyOf": [
  21959. {
  21960. "type": "object",
  21961. "properties": {
  21962. "type": {
  21963. "type": "string",
  21964. "enum": ["reasoning_content"]
  21965. }
  21966. },
  21967. "required": ["type"],
  21968. "additionalProperties": false
  21969. },
  21970. {
  21971. "type": "object",
  21972. "properties": {
  21973. "type": {
  21974. "type": "string",
  21975. "enum": ["reasoning_details"]
  21976. }
  21977. },
  21978. "required": ["type"],
  21979. "additionalProperties": false
  21980. }
  21981. ]
  21982. }
  21983. },
  21984. "required": ["type", "url"],
  21985. "additionalProperties": false
  21986. },
  21987. {
  21988. "type": "object",
  21989. "properties": {
  21990. "type": {
  21991. "type": "string",
  21992. "enum": ["anthropic/messages"]
  21993. },
  21994. "url": {
  21995. "type": "string"
  21996. }
  21997. },
  21998. "required": ["type", "url"],
  21999. "additionalProperties": false
  22000. },
  22001. {
  22002. "type": "object",
  22003. "properties": {
  22004. "type": {
  22005. "type": "string",
  22006. "enum": ["aisdk"]
  22007. },
  22008. "package": {
  22009. "type": "string"
  22010. },
  22011. "url": {
  22012. "type": "string"
  22013. }
  22014. },
  22015. "required": ["type", "package"],
  22016. "additionalProperties": false
  22017. }
  22018. ]
  22019. },
  22020. "options": {
  22021. "type": "object",
  22022. "properties": {
  22023. "headers": {
  22024. "type": "object",
  22025. "additionalProperties": {
  22026. "type": "string"
  22027. }
  22028. },
  22029. "body": {
  22030. "type": "object"
  22031. },
  22032. "aisdk": {
  22033. "type": "object",
  22034. "properties": {
  22035. "provider": {
  22036. "type": "object"
  22037. },
  22038. "request": {
  22039. "type": "object"
  22040. }
  22041. },
  22042. "required": ["provider", "request"],
  22043. "additionalProperties": false
  22044. }
  22045. },
  22046. "required": ["headers", "body", "aisdk"],
  22047. "additionalProperties": false
  22048. }
  22049. },
  22050. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  22051. "additionalProperties": false
  22052. },
  22053. "PermissionV2Request": {
  22054. "type": "object",
  22055. "properties": {
  22056. "id": {
  22057. "type": "string",
  22058. "pattern": "^per"
  22059. },
  22060. "sessionID": {
  22061. "type": "string",
  22062. "pattern": "^ses"
  22063. },
  22064. "action": {
  22065. "type": "string"
  22066. },
  22067. "resources": {
  22068. "type": "array",
  22069. "items": {
  22070. "type": "string"
  22071. }
  22072. },
  22073. "save": {
  22074. "type": "array",
  22075. "items": {
  22076. "type": "string"
  22077. }
  22078. },
  22079. "metadata": {
  22080. "type": "object"
  22081. },
  22082. "source": {
  22083. "$ref": "#/components/schemas/PermissionV2Source"
  22084. }
  22085. },
  22086. "required": ["id", "sessionID", "action", "resources"],
  22087. "additionalProperties": false
  22088. },
  22089. "PermissionSavedInfo": {
  22090. "type": "object",
  22091. "properties": {
  22092. "id": {
  22093. "type": "string"
  22094. },
  22095. "projectID": {
  22096. "type": "string"
  22097. },
  22098. "action": {
  22099. "type": "string"
  22100. },
  22101. "resource": {
  22102. "type": "string"
  22103. }
  22104. },
  22105. "required": ["id", "projectID", "action", "resource"],
  22106. "additionalProperties": false
  22107. },
  22108. "LocationFileSystemTextContent": {
  22109. "type": "object",
  22110. "properties": {
  22111. "type": {
  22112. "type": "string",
  22113. "enum": ["text"]
  22114. },
  22115. "content": {
  22116. "type": "string"
  22117. },
  22118. "mime": {
  22119. "type": "string"
  22120. }
  22121. },
  22122. "required": ["type", "content", "mime"],
  22123. "additionalProperties": false
  22124. },
  22125. "LocationFileSystemBinaryContent": {
  22126. "type": "object",
  22127. "properties": {
  22128. "type": {
  22129. "type": "string",
  22130. "enum": ["binary"]
  22131. },
  22132. "content": {
  22133. "type": "string"
  22134. },
  22135. "encoding": {
  22136. "type": "string",
  22137. "enum": ["base64"]
  22138. },
  22139. "mime": {
  22140. "type": "string"
  22141. }
  22142. },
  22143. "required": ["type", "content", "encoding", "mime"],
  22144. "additionalProperties": false
  22145. },
  22146. "LocationFileSystemEntry": {
  22147. "type": "object",
  22148. "properties": {
  22149. "path": {
  22150. "type": "string"
  22151. },
  22152. "uri": {
  22153. "type": "string"
  22154. },
  22155. "type": {
  22156. "type": "string",
  22157. "enum": ["file", "directory"]
  22158. },
  22159. "mime": {
  22160. "type": "string"
  22161. }
  22162. },
  22163. "required": ["path", "uri", "type", "mime"],
  22164. "additionalProperties": false
  22165. },
  22166. "EventModels-devRefreshed": {
  22167. "type": "object",
  22168. "properties": {
  22169. "id": {
  22170. "type": "string"
  22171. },
  22172. "type": {
  22173. "type": "string",
  22174. "enum": ["models-dev.refreshed"]
  22175. },
  22176. "properties": {
  22177. "type": "object",
  22178. "properties": {}
  22179. }
  22180. },
  22181. "required": ["id", "type", "properties"],
  22182. "additionalProperties": false
  22183. },
  22184. "EventPluginAdded": {
  22185. "type": "object",
  22186. "properties": {
  22187. "id": {
  22188. "type": "string"
  22189. },
  22190. "type": {
  22191. "type": "string",
  22192. "enum": ["plugin.added"]
  22193. },
  22194. "properties": {
  22195. "type": "object",
  22196. "properties": {
  22197. "id": {
  22198. "type": "string"
  22199. }
  22200. },
  22201. "required": ["id"],
  22202. "additionalProperties": false
  22203. }
  22204. },
  22205. "required": ["id", "type", "properties"],
  22206. "additionalProperties": false
  22207. },
  22208. "ModelV2Info1": {
  22209. "type": "object",
  22210. "properties": {
  22211. "id": {
  22212. "type": "string"
  22213. },
  22214. "apiID": {
  22215. "type": "string"
  22216. },
  22217. "providerID": {
  22218. "type": "string"
  22219. },
  22220. "family": {
  22221. "type": "string"
  22222. },
  22223. "name": {
  22224. "type": "string"
  22225. },
  22226. "endpoint": {
  22227. "anyOf": [
  22228. {
  22229. "type": "object",
  22230. "properties": {
  22231. "type": {
  22232. "type": "string",
  22233. "enum": ["unknown"]
  22234. }
  22235. },
  22236. "required": ["type"],
  22237. "additionalProperties": false
  22238. },
  22239. {
  22240. "type": "object",
  22241. "properties": {
  22242. "type": {
  22243. "type": "string",
  22244. "enum": ["openai/responses"]
  22245. },
  22246. "url": {
  22247. "type": "string"
  22248. },
  22249. "websocket": {
  22250. "type": "boolean"
  22251. }
  22252. },
  22253. "required": ["type", "url"],
  22254. "additionalProperties": false
  22255. },
  22256. {
  22257. "type": "object",
  22258. "properties": {
  22259. "type": {
  22260. "type": "string",
  22261. "enum": ["openai/completions"]
  22262. },
  22263. "url": {
  22264. "type": "string"
  22265. },
  22266. "reasoning": {
  22267. "anyOf": [
  22268. {
  22269. "type": "object",
  22270. "properties": {
  22271. "type": {
  22272. "type": "string",
  22273. "enum": ["reasoning_content"]
  22274. }
  22275. },
  22276. "required": ["type"],
  22277. "additionalProperties": false
  22278. },
  22279. {
  22280. "type": "object",
  22281. "properties": {
  22282. "type": {
  22283. "type": "string",
  22284. "enum": ["reasoning_details"]
  22285. }
  22286. },
  22287. "required": ["type"],
  22288. "additionalProperties": false
  22289. }
  22290. ]
  22291. }
  22292. },
  22293. "required": ["type", "url"],
  22294. "additionalProperties": false
  22295. },
  22296. {
  22297. "type": "object",
  22298. "properties": {
  22299. "type": {
  22300. "type": "string",
  22301. "enum": ["anthropic/messages"]
  22302. },
  22303. "url": {
  22304. "type": "string"
  22305. }
  22306. },
  22307. "required": ["type", "url"],
  22308. "additionalProperties": false
  22309. },
  22310. {
  22311. "type": "object",
  22312. "properties": {
  22313. "type": {
  22314. "type": "string",
  22315. "enum": ["aisdk"]
  22316. },
  22317. "package": {
  22318. "type": "string"
  22319. },
  22320. "url": {
  22321. "type": "string"
  22322. }
  22323. },
  22324. "required": ["type", "package"],
  22325. "additionalProperties": false
  22326. }
  22327. ]
  22328. },
  22329. "capabilities": {
  22330. "type": "object",
  22331. "properties": {
  22332. "tools": {
  22333. "type": "boolean"
  22334. },
  22335. "input": {
  22336. "type": "array",
  22337. "items": {
  22338. "type": "string"
  22339. }
  22340. },
  22341. "output": {
  22342. "type": "array",
  22343. "items": {
  22344. "type": "string"
  22345. }
  22346. }
  22347. },
  22348. "required": ["tools", "input", "output"],
  22349. "additionalProperties": false
  22350. },
  22351. "options": {
  22352. "type": "object",
  22353. "properties": {
  22354. "headers": {
  22355. "type": "object",
  22356. "additionalProperties": {
  22357. "type": "string"
  22358. }
  22359. },
  22360. "body": {
  22361. "type": "object"
  22362. },
  22363. "aisdk": {
  22364. "type": "object",
  22365. "properties": {
  22366. "provider": {
  22367. "type": "object"
  22368. },
  22369. "request": {
  22370. "type": "object"
  22371. }
  22372. },
  22373. "required": ["provider", "request"],
  22374. "additionalProperties": false
  22375. },
  22376. "variant": {
  22377. "type": "string"
  22378. }
  22379. },
  22380. "required": ["headers", "body", "aisdk"],
  22381. "additionalProperties": false
  22382. },
  22383. "variants": {
  22384. "type": "array",
  22385. "items": {
  22386. "type": "object",
  22387. "properties": {
  22388. "id": {
  22389. "type": "string"
  22390. },
  22391. "headers": {
  22392. "type": "object",
  22393. "additionalProperties": {
  22394. "type": "string"
  22395. }
  22396. },
  22397. "body": {
  22398. "type": "object"
  22399. },
  22400. "aisdk": {
  22401. "type": "object",
  22402. "properties": {
  22403. "provider": {
  22404. "type": "object"
  22405. },
  22406. "request": {
  22407. "type": "object"
  22408. }
  22409. },
  22410. "required": ["provider", "request"],
  22411. "additionalProperties": false
  22412. }
  22413. },
  22414. "required": ["id", "headers", "body", "aisdk"],
  22415. "additionalProperties": false
  22416. }
  22417. },
  22418. "time": {
  22419. "type": "object",
  22420. "properties": {
  22421. "released": {
  22422. "anyOf": [
  22423. {
  22424. "type": "number"
  22425. },
  22426. {
  22427. "type": "string",
  22428. "enum": ["NaN"]
  22429. },
  22430. {
  22431. "type": "string",
  22432. "enum": ["Infinity"]
  22433. },
  22434. {
  22435. "type": "string",
  22436. "enum": ["-Infinity"]
  22437. }
  22438. ]
  22439. }
  22440. },
  22441. "required": ["released"],
  22442. "additionalProperties": false
  22443. },
  22444. "cost": {
  22445. "type": "array",
  22446. "items": {
  22447. "type": "object",
  22448. "properties": {
  22449. "tier": {
  22450. "type": "object",
  22451. "properties": {
  22452. "type": {
  22453. "type": "string",
  22454. "enum": ["context"]
  22455. },
  22456. "size": {
  22457. "type": "integer"
  22458. }
  22459. },
  22460. "required": ["type", "size"],
  22461. "additionalProperties": false
  22462. },
  22463. "input": {
  22464. "type": "number"
  22465. },
  22466. "output": {
  22467. "type": "number"
  22468. },
  22469. "cache": {
  22470. "type": "object",
  22471. "properties": {
  22472. "read": {
  22473. "type": "number"
  22474. },
  22475. "write": {
  22476. "type": "number"
  22477. }
  22478. },
  22479. "required": ["read", "write"],
  22480. "additionalProperties": false
  22481. }
  22482. },
  22483. "required": ["input", "output", "cache"],
  22484. "additionalProperties": false
  22485. }
  22486. },
  22487. "status": {
  22488. "type": "string",
  22489. "enum": ["alpha", "beta", "deprecated", "active"]
  22490. },
  22491. "enabled": {
  22492. "type": "boolean"
  22493. },
  22494. "limit": {
  22495. "type": "object",
  22496. "properties": {
  22497. "context": {
  22498. "type": "integer"
  22499. },
  22500. "input": {
  22501. "type": "integer"
  22502. },
  22503. "output": {
  22504. "type": "integer"
  22505. }
  22506. },
  22507. "required": ["context", "output"],
  22508. "additionalProperties": false
  22509. }
  22510. },
  22511. "required": [
  22512. "id",
  22513. "apiID",
  22514. "providerID",
  22515. "name",
  22516. "endpoint",
  22517. "capabilities",
  22518. "options",
  22519. "variants",
  22520. "time",
  22521. "cost",
  22522. "status",
  22523. "enabled",
  22524. "limit"
  22525. ],
  22526. "additionalProperties": false
  22527. },
  22528. "EventCatalogModelUpdated": {
  22529. "type": "object",
  22530. "properties": {
  22531. "id": {
  22532. "type": "string"
  22533. },
  22534. "type": {
  22535. "type": "string",
  22536. "enum": ["catalog.model.updated"]
  22537. },
  22538. "properties": {
  22539. "type": "object",
  22540. "properties": {
  22541. "model": {
  22542. "$ref": "#/components/schemas/ModelV2Info1"
  22543. }
  22544. },
  22545. "required": ["model"],
  22546. "additionalProperties": false
  22547. }
  22548. },
  22549. "required": ["id", "type", "properties"],
  22550. "additionalProperties": false
  22551. },
  22552. "EventFileEdited": {
  22553. "type": "object",
  22554. "properties": {
  22555. "id": {
  22556. "type": "string"
  22557. },
  22558. "type": {
  22559. "type": "string",
  22560. "enum": ["file.edited"]
  22561. },
  22562. "properties": {
  22563. "type": "object",
  22564. "properties": {
  22565. "file": {
  22566. "type": "string"
  22567. }
  22568. },
  22569. "required": ["file"],
  22570. "additionalProperties": false
  22571. }
  22572. },
  22573. "required": ["id", "type", "properties"],
  22574. "additionalProperties": false
  22575. },
  22576. "EventSessionNextAgentSwitched": {
  22577. "type": "object",
  22578. "properties": {
  22579. "id": {
  22580. "type": "string"
  22581. },
  22582. "type": {
  22583. "type": "string",
  22584. "enum": ["session.next.agent.switched"]
  22585. },
  22586. "properties": {
  22587. "type": "object",
  22588. "properties": {
  22589. "timestamp": {
  22590. "type": "number"
  22591. },
  22592. "sessionID": {
  22593. "type": "string",
  22594. "pattern": "^ses"
  22595. },
  22596. "agent": {
  22597. "type": "string"
  22598. }
  22599. },
  22600. "required": ["timestamp", "sessionID", "agent"],
  22601. "additionalProperties": false
  22602. }
  22603. },
  22604. "required": ["id", "type", "properties"],
  22605. "additionalProperties": false
  22606. },
  22607. "EventSessionNextModelSwitched": {
  22608. "type": "object",
  22609. "properties": {
  22610. "id": {
  22611. "type": "string"
  22612. },
  22613. "type": {
  22614. "type": "string",
  22615. "enum": ["session.next.model.switched"]
  22616. },
  22617. "properties": {
  22618. "type": "object",
  22619. "properties": {
  22620. "timestamp": {
  22621. "type": "number"
  22622. },
  22623. "sessionID": {
  22624. "type": "string",
  22625. "pattern": "^ses"
  22626. },
  22627. "model": {
  22628. "type": "object",
  22629. "properties": {
  22630. "id": {
  22631. "type": "string"
  22632. },
  22633. "providerID": {
  22634. "type": "string"
  22635. },
  22636. "variant": {
  22637. "type": "string"
  22638. }
  22639. },
  22640. "required": ["id", "providerID"],
  22641. "additionalProperties": false
  22642. }
  22643. },
  22644. "required": ["timestamp", "sessionID", "model"],
  22645. "additionalProperties": false
  22646. }
  22647. },
  22648. "required": ["id", "type", "properties"],
  22649. "additionalProperties": false
  22650. },
  22651. "EventSessionNextPrompted": {
  22652. "type": "object",
  22653. "properties": {
  22654. "id": {
  22655. "type": "string"
  22656. },
  22657. "type": {
  22658. "type": "string",
  22659. "enum": ["session.next.prompted"]
  22660. },
  22661. "properties": {
  22662. "type": "object",
  22663. "properties": {
  22664. "timestamp": {
  22665. "type": "number"
  22666. },
  22667. "sessionID": {
  22668. "type": "string",
  22669. "pattern": "^ses"
  22670. },
  22671. "prompt": {
  22672. "$ref": "#/components/schemas/Prompt"
  22673. }
  22674. },
  22675. "required": ["timestamp", "sessionID", "prompt"],
  22676. "additionalProperties": false
  22677. }
  22678. },
  22679. "required": ["id", "type", "properties"],
  22680. "additionalProperties": false
  22681. },
  22682. "EventSessionNextSynthetic": {
  22683. "type": "object",
  22684. "properties": {
  22685. "id": {
  22686. "type": "string"
  22687. },
  22688. "type": {
  22689. "type": "string",
  22690. "enum": ["session.next.synthetic"]
  22691. },
  22692. "properties": {
  22693. "type": "object",
  22694. "properties": {
  22695. "timestamp": {
  22696. "type": "number"
  22697. },
  22698. "sessionID": {
  22699. "type": "string",
  22700. "pattern": "^ses"
  22701. },
  22702. "text": {
  22703. "type": "string"
  22704. }
  22705. },
  22706. "required": ["timestamp", "sessionID", "text"],
  22707. "additionalProperties": false
  22708. }
  22709. },
  22710. "required": ["id", "type", "properties"],
  22711. "additionalProperties": false
  22712. },
  22713. "EventSessionNextShellStarted": {
  22714. "type": "object",
  22715. "properties": {
  22716. "id": {
  22717. "type": "string"
  22718. },
  22719. "type": {
  22720. "type": "string",
  22721. "enum": ["session.next.shell.started"]
  22722. },
  22723. "properties": {
  22724. "type": "object",
  22725. "properties": {
  22726. "timestamp": {
  22727. "type": "number"
  22728. },
  22729. "sessionID": {
  22730. "type": "string",
  22731. "pattern": "^ses"
  22732. },
  22733. "callID": {
  22734. "type": "string"
  22735. },
  22736. "command": {
  22737. "type": "string"
  22738. }
  22739. },
  22740. "required": ["timestamp", "sessionID", "callID", "command"],
  22741. "additionalProperties": false
  22742. }
  22743. },
  22744. "required": ["id", "type", "properties"],
  22745. "additionalProperties": false
  22746. },
  22747. "EventSessionNextShellEnded": {
  22748. "type": "object",
  22749. "properties": {
  22750. "id": {
  22751. "type": "string"
  22752. },
  22753. "type": {
  22754. "type": "string",
  22755. "enum": ["session.next.shell.ended"]
  22756. },
  22757. "properties": {
  22758. "type": "object",
  22759. "properties": {
  22760. "timestamp": {
  22761. "type": "number"
  22762. },
  22763. "sessionID": {
  22764. "type": "string",
  22765. "pattern": "^ses"
  22766. },
  22767. "callID": {
  22768. "type": "string"
  22769. },
  22770. "output": {
  22771. "type": "string"
  22772. }
  22773. },
  22774. "required": ["timestamp", "sessionID", "callID", "output"],
  22775. "additionalProperties": false
  22776. }
  22777. },
  22778. "required": ["id", "type", "properties"],
  22779. "additionalProperties": false
  22780. },
  22781. "EventSessionNextStepStarted": {
  22782. "type": "object",
  22783. "properties": {
  22784. "id": {
  22785. "type": "string"
  22786. },
  22787. "type": {
  22788. "type": "string",
  22789. "enum": ["session.next.step.started"]
  22790. },
  22791. "properties": {
  22792. "type": "object",
  22793. "properties": {
  22794. "timestamp": {
  22795. "type": "number"
  22796. },
  22797. "sessionID": {
  22798. "type": "string",
  22799. "pattern": "^ses"
  22800. },
  22801. "agent": {
  22802. "type": "string"
  22803. },
  22804. "model": {
  22805. "type": "object",
  22806. "properties": {
  22807. "id": {
  22808. "type": "string"
  22809. },
  22810. "providerID": {
  22811. "type": "string"
  22812. },
  22813. "variant": {
  22814. "type": "string"
  22815. }
  22816. },
  22817. "required": ["id", "providerID"],
  22818. "additionalProperties": false
  22819. },
  22820. "snapshot": {
  22821. "type": "string"
  22822. }
  22823. },
  22824. "required": ["timestamp", "sessionID", "agent", "model"],
  22825. "additionalProperties": false
  22826. }
  22827. },
  22828. "required": ["id", "type", "properties"],
  22829. "additionalProperties": false
  22830. },
  22831. "EventSessionNextStepEnded": {
  22832. "type": "object",
  22833. "properties": {
  22834. "id": {
  22835. "type": "string"
  22836. },
  22837. "type": {
  22838. "type": "string",
  22839. "enum": ["session.next.step.ended"]
  22840. },
  22841. "properties": {
  22842. "type": "object",
  22843. "properties": {
  22844. "timestamp": {
  22845. "type": "number"
  22846. },
  22847. "sessionID": {
  22848. "type": "string",
  22849. "pattern": "^ses"
  22850. },
  22851. "finish": {
  22852. "type": "string"
  22853. },
  22854. "cost": {
  22855. "type": "number"
  22856. },
  22857. "tokens": {
  22858. "type": "object",
  22859. "properties": {
  22860. "input": {
  22861. "type": "number"
  22862. },
  22863. "output": {
  22864. "type": "number"
  22865. },
  22866. "reasoning": {
  22867. "type": "number"
  22868. },
  22869. "cache": {
  22870. "type": "object",
  22871. "properties": {
  22872. "read": {
  22873. "type": "number"
  22874. },
  22875. "write": {
  22876. "type": "number"
  22877. }
  22878. },
  22879. "required": ["read", "write"],
  22880. "additionalProperties": false
  22881. }
  22882. },
  22883. "required": ["input", "output", "reasoning", "cache"],
  22884. "additionalProperties": false
  22885. },
  22886. "snapshot": {
  22887. "type": "string"
  22888. }
  22889. },
  22890. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  22891. "additionalProperties": false
  22892. }
  22893. },
  22894. "required": ["id", "type", "properties"],
  22895. "additionalProperties": false
  22896. },
  22897. "EventSessionNextStepFailed": {
  22898. "type": "object",
  22899. "properties": {
  22900. "id": {
  22901. "type": "string"
  22902. },
  22903. "type": {
  22904. "type": "string",
  22905. "enum": ["session.next.step.failed"]
  22906. },
  22907. "properties": {
  22908. "type": "object",
  22909. "properties": {
  22910. "timestamp": {
  22911. "type": "number"
  22912. },
  22913. "sessionID": {
  22914. "type": "string",
  22915. "pattern": "^ses"
  22916. },
  22917. "error": {
  22918. "$ref": "#/components/schemas/SessionErrorUnknown"
  22919. }
  22920. },
  22921. "required": ["timestamp", "sessionID", "error"],
  22922. "additionalProperties": false
  22923. }
  22924. },
  22925. "required": ["id", "type", "properties"],
  22926. "additionalProperties": false
  22927. },
  22928. "EventSessionNextTextStarted": {
  22929. "type": "object",
  22930. "properties": {
  22931. "id": {
  22932. "type": "string"
  22933. },
  22934. "type": {
  22935. "type": "string",
  22936. "enum": ["session.next.text.started"]
  22937. },
  22938. "properties": {
  22939. "type": "object",
  22940. "properties": {
  22941. "timestamp": {
  22942. "type": "number"
  22943. },
  22944. "sessionID": {
  22945. "type": "string",
  22946. "pattern": "^ses"
  22947. }
  22948. },
  22949. "required": ["timestamp", "sessionID"],
  22950. "additionalProperties": false
  22951. }
  22952. },
  22953. "required": ["id", "type", "properties"],
  22954. "additionalProperties": false
  22955. },
  22956. "EventSessionNextTextDelta": {
  22957. "type": "object",
  22958. "properties": {
  22959. "id": {
  22960. "type": "string"
  22961. },
  22962. "type": {
  22963. "type": "string",
  22964. "enum": ["session.next.text.delta"]
  22965. },
  22966. "properties": {
  22967. "type": "object",
  22968. "properties": {
  22969. "timestamp": {
  22970. "type": "number"
  22971. },
  22972. "sessionID": {
  22973. "type": "string",
  22974. "pattern": "^ses"
  22975. },
  22976. "delta": {
  22977. "type": "string"
  22978. }
  22979. },
  22980. "required": ["timestamp", "sessionID", "delta"],
  22981. "additionalProperties": false
  22982. }
  22983. },
  22984. "required": ["id", "type", "properties"],
  22985. "additionalProperties": false
  22986. },
  22987. "EventSessionNextTextEnded": {
  22988. "type": "object",
  22989. "properties": {
  22990. "id": {
  22991. "type": "string"
  22992. },
  22993. "type": {
  22994. "type": "string",
  22995. "enum": ["session.next.text.ended"]
  22996. },
  22997. "properties": {
  22998. "type": "object",
  22999. "properties": {
  23000. "timestamp": {
  23001. "type": "number"
  23002. },
  23003. "sessionID": {
  23004. "type": "string",
  23005. "pattern": "^ses"
  23006. },
  23007. "text": {
  23008. "type": "string"
  23009. }
  23010. },
  23011. "required": ["timestamp", "sessionID", "text"],
  23012. "additionalProperties": false
  23013. }
  23014. },
  23015. "required": ["id", "type", "properties"],
  23016. "additionalProperties": false
  23017. },
  23018. "EventSessionNextReasoningStarted": {
  23019. "type": "object",
  23020. "properties": {
  23021. "id": {
  23022. "type": "string"
  23023. },
  23024. "type": {
  23025. "type": "string",
  23026. "enum": ["session.next.reasoning.started"]
  23027. },
  23028. "properties": {
  23029. "type": "object",
  23030. "properties": {
  23031. "timestamp": {
  23032. "type": "number"
  23033. },
  23034. "sessionID": {
  23035. "type": "string",
  23036. "pattern": "^ses"
  23037. },
  23038. "reasoningID": {
  23039. "type": "string"
  23040. }
  23041. },
  23042. "required": ["timestamp", "sessionID", "reasoningID"],
  23043. "additionalProperties": false
  23044. }
  23045. },
  23046. "required": ["id", "type", "properties"],
  23047. "additionalProperties": false
  23048. },
  23049. "EventSessionNextReasoningDelta": {
  23050. "type": "object",
  23051. "properties": {
  23052. "id": {
  23053. "type": "string"
  23054. },
  23055. "type": {
  23056. "type": "string",
  23057. "enum": ["session.next.reasoning.delta"]
  23058. },
  23059. "properties": {
  23060. "type": "object",
  23061. "properties": {
  23062. "timestamp": {
  23063. "type": "number"
  23064. },
  23065. "sessionID": {
  23066. "type": "string",
  23067. "pattern": "^ses"
  23068. },
  23069. "reasoningID": {
  23070. "type": "string"
  23071. },
  23072. "delta": {
  23073. "type": "string"
  23074. }
  23075. },
  23076. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  23077. "additionalProperties": false
  23078. }
  23079. },
  23080. "required": ["id", "type", "properties"],
  23081. "additionalProperties": false
  23082. },
  23083. "EventSessionNextReasoningEnded": {
  23084. "type": "object",
  23085. "properties": {
  23086. "id": {
  23087. "type": "string"
  23088. },
  23089. "type": {
  23090. "type": "string",
  23091. "enum": ["session.next.reasoning.ended"]
  23092. },
  23093. "properties": {
  23094. "type": "object",
  23095. "properties": {
  23096. "timestamp": {
  23097. "type": "number"
  23098. },
  23099. "sessionID": {
  23100. "type": "string",
  23101. "pattern": "^ses"
  23102. },
  23103. "reasoningID": {
  23104. "type": "string"
  23105. },
  23106. "text": {
  23107. "type": "string"
  23108. }
  23109. },
  23110. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  23111. "additionalProperties": false
  23112. }
  23113. },
  23114. "required": ["id", "type", "properties"],
  23115. "additionalProperties": false
  23116. },
  23117. "EventSessionNextToolInputStarted": {
  23118. "type": "object",
  23119. "properties": {
  23120. "id": {
  23121. "type": "string"
  23122. },
  23123. "type": {
  23124. "type": "string",
  23125. "enum": ["session.next.tool.input.started"]
  23126. },
  23127. "properties": {
  23128. "type": "object",
  23129. "properties": {
  23130. "timestamp": {
  23131. "type": "number"
  23132. },
  23133. "sessionID": {
  23134. "type": "string",
  23135. "pattern": "^ses"
  23136. },
  23137. "callID": {
  23138. "type": "string"
  23139. },
  23140. "name": {
  23141. "type": "string"
  23142. }
  23143. },
  23144. "required": ["timestamp", "sessionID", "callID", "name"],
  23145. "additionalProperties": false
  23146. }
  23147. },
  23148. "required": ["id", "type", "properties"],
  23149. "additionalProperties": false
  23150. },
  23151. "EventSessionNextToolInputDelta": {
  23152. "type": "object",
  23153. "properties": {
  23154. "id": {
  23155. "type": "string"
  23156. },
  23157. "type": {
  23158. "type": "string",
  23159. "enum": ["session.next.tool.input.delta"]
  23160. },
  23161. "properties": {
  23162. "type": "object",
  23163. "properties": {
  23164. "timestamp": {
  23165. "type": "number"
  23166. },
  23167. "sessionID": {
  23168. "type": "string",
  23169. "pattern": "^ses"
  23170. },
  23171. "callID": {
  23172. "type": "string"
  23173. },
  23174. "delta": {
  23175. "type": "string"
  23176. }
  23177. },
  23178. "required": ["timestamp", "sessionID", "callID", "delta"],
  23179. "additionalProperties": false
  23180. }
  23181. },
  23182. "required": ["id", "type", "properties"],
  23183. "additionalProperties": false
  23184. },
  23185. "EventSessionNextToolInputEnded": {
  23186. "type": "object",
  23187. "properties": {
  23188. "id": {
  23189. "type": "string"
  23190. },
  23191. "type": {
  23192. "type": "string",
  23193. "enum": ["session.next.tool.input.ended"]
  23194. },
  23195. "properties": {
  23196. "type": "object",
  23197. "properties": {
  23198. "timestamp": {
  23199. "type": "number"
  23200. },
  23201. "sessionID": {
  23202. "type": "string",
  23203. "pattern": "^ses"
  23204. },
  23205. "callID": {
  23206. "type": "string"
  23207. },
  23208. "text": {
  23209. "type": "string"
  23210. }
  23211. },
  23212. "required": ["timestamp", "sessionID", "callID", "text"],
  23213. "additionalProperties": false
  23214. }
  23215. },
  23216. "required": ["id", "type", "properties"],
  23217. "additionalProperties": false
  23218. },
  23219. "EventSessionNextToolCalled": {
  23220. "type": "object",
  23221. "properties": {
  23222. "id": {
  23223. "type": "string"
  23224. },
  23225. "type": {
  23226. "type": "string",
  23227. "enum": ["session.next.tool.called"]
  23228. },
  23229. "properties": {
  23230. "type": "object",
  23231. "properties": {
  23232. "timestamp": {
  23233. "type": "number"
  23234. },
  23235. "sessionID": {
  23236. "type": "string",
  23237. "pattern": "^ses"
  23238. },
  23239. "callID": {
  23240. "type": "string"
  23241. },
  23242. "tool": {
  23243. "type": "string"
  23244. },
  23245. "input": {
  23246. "type": "object"
  23247. },
  23248. "provider": {
  23249. "type": "object",
  23250. "properties": {
  23251. "executed": {
  23252. "type": "boolean"
  23253. },
  23254. "metadata": {
  23255. "type": "object"
  23256. }
  23257. },
  23258. "required": ["executed"],
  23259. "additionalProperties": false
  23260. }
  23261. },
  23262. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  23263. "additionalProperties": false
  23264. }
  23265. },
  23266. "required": ["id", "type", "properties"],
  23267. "additionalProperties": false
  23268. },
  23269. "EventSessionNextToolProgress": {
  23270. "type": "object",
  23271. "properties": {
  23272. "id": {
  23273. "type": "string"
  23274. },
  23275. "type": {
  23276. "type": "string",
  23277. "enum": ["session.next.tool.progress"]
  23278. },
  23279. "properties": {
  23280. "type": "object",
  23281. "properties": {
  23282. "timestamp": {
  23283. "type": "number"
  23284. },
  23285. "sessionID": {
  23286. "type": "string",
  23287. "pattern": "^ses"
  23288. },
  23289. "callID": {
  23290. "type": "string"
  23291. },
  23292. "structured": {
  23293. "type": "object"
  23294. },
  23295. "content": {
  23296. "type": "array",
  23297. "items": {
  23298. "anyOf": [
  23299. {
  23300. "$ref": "#/components/schemas/ToolTextContent"
  23301. },
  23302. {
  23303. "$ref": "#/components/schemas/ToolFileContent"
  23304. }
  23305. ]
  23306. }
  23307. }
  23308. },
  23309. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  23310. "additionalProperties": false
  23311. }
  23312. },
  23313. "required": ["id", "type", "properties"],
  23314. "additionalProperties": false
  23315. },
  23316. "EventSessionNextToolSuccess": {
  23317. "type": "object",
  23318. "properties": {
  23319. "id": {
  23320. "type": "string"
  23321. },
  23322. "type": {
  23323. "type": "string",
  23324. "enum": ["session.next.tool.success"]
  23325. },
  23326. "properties": {
  23327. "type": "object",
  23328. "properties": {
  23329. "timestamp": {
  23330. "type": "number"
  23331. },
  23332. "sessionID": {
  23333. "type": "string",
  23334. "pattern": "^ses"
  23335. },
  23336. "callID": {
  23337. "type": "string"
  23338. },
  23339. "structured": {
  23340. "type": "object"
  23341. },
  23342. "content": {
  23343. "type": "array",
  23344. "items": {
  23345. "anyOf": [
  23346. {
  23347. "$ref": "#/components/schemas/ToolTextContent"
  23348. },
  23349. {
  23350. "$ref": "#/components/schemas/ToolFileContent"
  23351. }
  23352. ]
  23353. }
  23354. },
  23355. "provider": {
  23356. "type": "object",
  23357. "properties": {
  23358. "executed": {
  23359. "type": "boolean"
  23360. },
  23361. "metadata": {
  23362. "type": "object"
  23363. }
  23364. },
  23365. "required": ["executed"],
  23366. "additionalProperties": false
  23367. }
  23368. },
  23369. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  23370. "additionalProperties": false
  23371. }
  23372. },
  23373. "required": ["id", "type", "properties"],
  23374. "additionalProperties": false
  23375. },
  23376. "EventSessionNextToolFailed": {
  23377. "type": "object",
  23378. "properties": {
  23379. "id": {
  23380. "type": "string"
  23381. },
  23382. "type": {
  23383. "type": "string",
  23384. "enum": ["session.next.tool.failed"]
  23385. },
  23386. "properties": {
  23387. "type": "object",
  23388. "properties": {
  23389. "timestamp": {
  23390. "type": "number"
  23391. },
  23392. "sessionID": {
  23393. "type": "string",
  23394. "pattern": "^ses"
  23395. },
  23396. "callID": {
  23397. "type": "string"
  23398. },
  23399. "error": {
  23400. "$ref": "#/components/schemas/SessionErrorUnknown"
  23401. },
  23402. "provider": {
  23403. "type": "object",
  23404. "properties": {
  23405. "executed": {
  23406. "type": "boolean"
  23407. },
  23408. "metadata": {
  23409. "type": "object"
  23410. }
  23411. },
  23412. "required": ["executed"],
  23413. "additionalProperties": false
  23414. }
  23415. },
  23416. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  23417. "additionalProperties": false
  23418. }
  23419. },
  23420. "required": ["id", "type", "properties"],
  23421. "additionalProperties": false
  23422. },
  23423. "EventSessionNextRetried": {
  23424. "type": "object",
  23425. "properties": {
  23426. "id": {
  23427. "type": "string"
  23428. },
  23429. "type": {
  23430. "type": "string",
  23431. "enum": ["session.next.retried"]
  23432. },
  23433. "properties": {
  23434. "type": "object",
  23435. "properties": {
  23436. "timestamp": {
  23437. "type": "number"
  23438. },
  23439. "sessionID": {
  23440. "type": "string",
  23441. "pattern": "^ses"
  23442. },
  23443. "attempt": {
  23444. "type": "number"
  23445. },
  23446. "error": {
  23447. "$ref": "#/components/schemas/SessionNextRetry_error"
  23448. }
  23449. },
  23450. "required": ["timestamp", "sessionID", "attempt", "error"],
  23451. "additionalProperties": false
  23452. }
  23453. },
  23454. "required": ["id", "type", "properties"],
  23455. "additionalProperties": false
  23456. },
  23457. "EventSessionNextCompactionStarted": {
  23458. "type": "object",
  23459. "properties": {
  23460. "id": {
  23461. "type": "string"
  23462. },
  23463. "type": {
  23464. "type": "string",
  23465. "enum": ["session.next.compaction.started"]
  23466. },
  23467. "properties": {
  23468. "type": "object",
  23469. "properties": {
  23470. "timestamp": {
  23471. "type": "number"
  23472. },
  23473. "sessionID": {
  23474. "type": "string",
  23475. "pattern": "^ses"
  23476. },
  23477. "reason": {
  23478. "type": "string",
  23479. "enum": ["auto", "manual"]
  23480. }
  23481. },
  23482. "required": ["timestamp", "sessionID", "reason"],
  23483. "additionalProperties": false
  23484. }
  23485. },
  23486. "required": ["id", "type", "properties"],
  23487. "additionalProperties": false
  23488. },
  23489. "EventSessionNextCompactionDelta": {
  23490. "type": "object",
  23491. "properties": {
  23492. "id": {
  23493. "type": "string"
  23494. },
  23495. "type": {
  23496. "type": "string",
  23497. "enum": ["session.next.compaction.delta"]
  23498. },
  23499. "properties": {
  23500. "type": "object",
  23501. "properties": {
  23502. "timestamp": {
  23503. "type": "number"
  23504. },
  23505. "sessionID": {
  23506. "type": "string",
  23507. "pattern": "^ses"
  23508. },
  23509. "text": {
  23510. "type": "string"
  23511. }
  23512. },
  23513. "required": ["timestamp", "sessionID", "text"],
  23514. "additionalProperties": false
  23515. }
  23516. },
  23517. "required": ["id", "type", "properties"],
  23518. "additionalProperties": false
  23519. },
  23520. "EventSessionNextCompactionEnded": {
  23521. "type": "object",
  23522. "properties": {
  23523. "id": {
  23524. "type": "string"
  23525. },
  23526. "type": {
  23527. "type": "string",
  23528. "enum": ["session.next.compaction.ended"]
  23529. },
  23530. "properties": {
  23531. "type": "object",
  23532. "properties": {
  23533. "timestamp": {
  23534. "type": "number"
  23535. },
  23536. "sessionID": {
  23537. "type": "string",
  23538. "pattern": "^ses"
  23539. },
  23540. "text": {
  23541. "type": "string"
  23542. },
  23543. "include": {
  23544. "type": "string"
  23545. }
  23546. },
  23547. "required": ["timestamp", "sessionID", "text"],
  23548. "additionalProperties": false
  23549. }
  23550. },
  23551. "required": ["id", "type", "properties"],
  23552. "additionalProperties": false
  23553. },
  23554. "EventFileWatcherUpdated": {
  23555. "type": "object",
  23556. "properties": {
  23557. "id": {
  23558. "type": "string"
  23559. },
  23560. "type": {
  23561. "type": "string",
  23562. "enum": ["file.watcher.updated"]
  23563. },
  23564. "properties": {
  23565. "type": "object",
  23566. "properties": {
  23567. "file": {
  23568. "type": "string"
  23569. },
  23570. "event": {
  23571. "type": "string",
  23572. "enum": ["add", "change", "unlink"]
  23573. }
  23574. },
  23575. "required": ["file", "event"],
  23576. "additionalProperties": false
  23577. }
  23578. },
  23579. "required": ["id", "type", "properties"],
  23580. "additionalProperties": false
  23581. },
  23582. "EventSessionCreated": {
  23583. "type": "object",
  23584. "properties": {
  23585. "id": {
  23586. "type": "string"
  23587. },
  23588. "type": {
  23589. "type": "string",
  23590. "enum": ["session.created"]
  23591. },
  23592. "properties": {
  23593. "type": "object",
  23594. "properties": {
  23595. "sessionID": {
  23596. "type": "string",
  23597. "pattern": "^ses"
  23598. },
  23599. "info": {
  23600. "$ref": "#/components/schemas/Session"
  23601. }
  23602. },
  23603. "required": ["sessionID", "info"],
  23604. "additionalProperties": false
  23605. }
  23606. },
  23607. "required": ["id", "type", "properties"],
  23608. "additionalProperties": false
  23609. },
  23610. "EventSessionUpdated": {
  23611. "type": "object",
  23612. "properties": {
  23613. "id": {
  23614. "type": "string"
  23615. },
  23616. "type": {
  23617. "type": "string",
  23618. "enum": ["session.updated"]
  23619. },
  23620. "properties": {
  23621. "type": "object",
  23622. "properties": {
  23623. "sessionID": {
  23624. "type": "string",
  23625. "pattern": "^ses"
  23626. },
  23627. "info": {
  23628. "$ref": "#/components/schemas/Session"
  23629. }
  23630. },
  23631. "required": ["sessionID", "info"],
  23632. "additionalProperties": false
  23633. }
  23634. },
  23635. "required": ["id", "type", "properties"],
  23636. "additionalProperties": false
  23637. },
  23638. "EventSessionDeleted": {
  23639. "type": "object",
  23640. "properties": {
  23641. "id": {
  23642. "type": "string"
  23643. },
  23644. "type": {
  23645. "type": "string",
  23646. "enum": ["session.deleted"]
  23647. },
  23648. "properties": {
  23649. "type": "object",
  23650. "properties": {
  23651. "sessionID": {
  23652. "type": "string",
  23653. "pattern": "^ses"
  23654. },
  23655. "info": {
  23656. "$ref": "#/components/schemas/Session"
  23657. }
  23658. },
  23659. "required": ["sessionID", "info"],
  23660. "additionalProperties": false
  23661. }
  23662. },
  23663. "required": ["id", "type", "properties"],
  23664. "additionalProperties": false
  23665. },
  23666. "EventMessageUpdated": {
  23667. "type": "object",
  23668. "properties": {
  23669. "id": {
  23670. "type": "string"
  23671. },
  23672. "type": {
  23673. "type": "string",
  23674. "enum": ["message.updated"]
  23675. },
  23676. "properties": {
  23677. "type": "object",
  23678. "properties": {
  23679. "sessionID": {
  23680. "type": "string",
  23681. "pattern": "^ses"
  23682. },
  23683. "info": {
  23684. "$ref": "#/components/schemas/Message"
  23685. }
  23686. },
  23687. "required": ["sessionID", "info"],
  23688. "additionalProperties": false
  23689. }
  23690. },
  23691. "required": ["id", "type", "properties"],
  23692. "additionalProperties": false
  23693. },
  23694. "EventMessageRemoved": {
  23695. "type": "object",
  23696. "properties": {
  23697. "id": {
  23698. "type": "string"
  23699. },
  23700. "type": {
  23701. "type": "string",
  23702. "enum": ["message.removed"]
  23703. },
  23704. "properties": {
  23705. "type": "object",
  23706. "properties": {
  23707. "sessionID": {
  23708. "type": "string",
  23709. "pattern": "^ses"
  23710. },
  23711. "messageID": {
  23712. "type": "string",
  23713. "pattern": "^msg"
  23714. }
  23715. },
  23716. "required": ["sessionID", "messageID"],
  23717. "additionalProperties": false
  23718. }
  23719. },
  23720. "required": ["id", "type", "properties"],
  23721. "additionalProperties": false
  23722. },
  23723. "EventMessagePartUpdated": {
  23724. "type": "object",
  23725. "properties": {
  23726. "id": {
  23727. "type": "string"
  23728. },
  23729. "type": {
  23730. "type": "string",
  23731. "enum": ["message.part.updated"]
  23732. },
  23733. "properties": {
  23734. "type": "object",
  23735. "properties": {
  23736. "sessionID": {
  23737. "type": "string",
  23738. "pattern": "^ses"
  23739. },
  23740. "part": {
  23741. "$ref": "#/components/schemas/Part"
  23742. },
  23743. "time": {
  23744. "type": "number"
  23745. }
  23746. },
  23747. "required": ["sessionID", "part", "time"],
  23748. "additionalProperties": false
  23749. }
  23750. },
  23751. "required": ["id", "type", "properties"],
  23752. "additionalProperties": false
  23753. },
  23754. "EventMessagePartRemoved": {
  23755. "type": "object",
  23756. "properties": {
  23757. "id": {
  23758. "type": "string"
  23759. },
  23760. "type": {
  23761. "type": "string",
  23762. "enum": ["message.part.removed"]
  23763. },
  23764. "properties": {
  23765. "type": "object",
  23766. "properties": {
  23767. "sessionID": {
  23768. "type": "string",
  23769. "pattern": "^ses"
  23770. },
  23771. "messageID": {
  23772. "type": "string",
  23773. "pattern": "^msg"
  23774. },
  23775. "partID": {
  23776. "type": "string",
  23777. "pattern": "^prt"
  23778. }
  23779. },
  23780. "required": ["sessionID", "messageID", "partID"],
  23781. "additionalProperties": false
  23782. }
  23783. },
  23784. "required": ["id", "type", "properties"],
  23785. "additionalProperties": false
  23786. },
  23787. "EventMessagePartDelta": {
  23788. "type": "object",
  23789. "properties": {
  23790. "id": {
  23791. "type": "string"
  23792. },
  23793. "type": {
  23794. "type": "string",
  23795. "enum": ["message.part.delta"]
  23796. },
  23797. "properties": {
  23798. "type": "object",
  23799. "properties": {
  23800. "sessionID": {
  23801. "type": "string",
  23802. "pattern": "^ses"
  23803. },
  23804. "messageID": {
  23805. "type": "string",
  23806. "pattern": "^msg"
  23807. },
  23808. "partID": {
  23809. "type": "string",
  23810. "pattern": "^prt"
  23811. },
  23812. "field": {
  23813. "type": "string"
  23814. },
  23815. "delta": {
  23816. "type": "string"
  23817. }
  23818. },
  23819. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  23820. "additionalProperties": false
  23821. }
  23822. },
  23823. "required": ["id", "type", "properties"],
  23824. "additionalProperties": false
  23825. },
  23826. "EventSessionDiff": {
  23827. "type": "object",
  23828. "properties": {
  23829. "id": {
  23830. "type": "string"
  23831. },
  23832. "type": {
  23833. "type": "string",
  23834. "enum": ["session.diff"]
  23835. },
  23836. "properties": {
  23837. "type": "object",
  23838. "properties": {
  23839. "sessionID": {
  23840. "type": "string",
  23841. "pattern": "^ses"
  23842. },
  23843. "diff": {
  23844. "type": "array",
  23845. "items": {
  23846. "$ref": "#/components/schemas/SnapshotFileDiff"
  23847. }
  23848. }
  23849. },
  23850. "required": ["sessionID", "diff"],
  23851. "additionalProperties": false
  23852. }
  23853. },
  23854. "required": ["id", "type", "properties"],
  23855. "additionalProperties": false
  23856. },
  23857. "EventSessionError": {
  23858. "type": "object",
  23859. "properties": {
  23860. "id": {
  23861. "type": "string"
  23862. },
  23863. "type": {
  23864. "type": "string",
  23865. "enum": ["session.error"]
  23866. },
  23867. "properties": {
  23868. "type": "object",
  23869. "properties": {
  23870. "sessionID": {
  23871. "type": "string",
  23872. "pattern": "^ses"
  23873. },
  23874. "error": {
  23875. "anyOf": [
  23876. {
  23877. "$ref": "#/components/schemas/ProviderAuthError"
  23878. },
  23879. {
  23880. "$ref": "#/components/schemas/UnknownError"
  23881. },
  23882. {
  23883. "$ref": "#/components/schemas/MessageOutputLengthError"
  23884. },
  23885. {
  23886. "$ref": "#/components/schemas/MessageAbortedError"
  23887. },
  23888. {
  23889. "$ref": "#/components/schemas/StructuredOutputError"
  23890. },
  23891. {
  23892. "$ref": "#/components/schemas/ContextOverflowError"
  23893. },
  23894. {
  23895. "$ref": "#/components/schemas/APIError"
  23896. }
  23897. ]
  23898. }
  23899. },
  23900. "additionalProperties": false
  23901. }
  23902. },
  23903. "required": ["id", "type", "properties"],
  23904. "additionalProperties": false
  23905. },
  23906. "EventPermissionAsked": {
  23907. "type": "object",
  23908. "properties": {
  23909. "id": {
  23910. "type": "string"
  23911. },
  23912. "type": {
  23913. "type": "string",
  23914. "enum": ["permission.asked"]
  23915. },
  23916. "properties": {
  23917. "type": "object",
  23918. "properties": {
  23919. "id": {
  23920. "type": "string",
  23921. "pattern": "^per"
  23922. },
  23923. "sessionID": {
  23924. "type": "string",
  23925. "pattern": "^ses"
  23926. },
  23927. "permission": {
  23928. "type": "string"
  23929. },
  23930. "patterns": {
  23931. "type": "array",
  23932. "items": {
  23933. "type": "string"
  23934. }
  23935. },
  23936. "metadata": {
  23937. "type": "object"
  23938. },
  23939. "always": {
  23940. "type": "array",
  23941. "items": {
  23942. "type": "string"
  23943. }
  23944. },
  23945. "tool": {
  23946. "type": "object",
  23947. "properties": {
  23948. "messageID": {
  23949. "type": "string"
  23950. },
  23951. "callID": {
  23952. "type": "string"
  23953. }
  23954. },
  23955. "required": ["messageID", "callID"],
  23956. "additionalProperties": false
  23957. }
  23958. },
  23959. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  23960. "additionalProperties": false
  23961. }
  23962. },
  23963. "required": ["id", "type", "properties"],
  23964. "additionalProperties": false
  23965. },
  23966. "EventPermissionReplied": {
  23967. "type": "object",
  23968. "properties": {
  23969. "id": {
  23970. "type": "string"
  23971. },
  23972. "type": {
  23973. "type": "string",
  23974. "enum": ["permission.replied"]
  23975. },
  23976. "properties": {
  23977. "type": "object",
  23978. "properties": {
  23979. "sessionID": {
  23980. "type": "string",
  23981. "pattern": "^ses"
  23982. },
  23983. "requestID": {
  23984. "type": "string",
  23985. "pattern": "^per"
  23986. },
  23987. "reply": {
  23988. "type": "string",
  23989. "enum": ["once", "always", "reject"]
  23990. }
  23991. },
  23992. "required": ["sessionID", "requestID", "reply"],
  23993. "additionalProperties": false
  23994. }
  23995. },
  23996. "required": ["id", "type", "properties"],
  23997. "additionalProperties": false
  23998. },
  23999. "EventQuestionAsked": {
  24000. "type": "object",
  24001. "properties": {
  24002. "id": {
  24003. "type": "string"
  24004. },
  24005. "type": {
  24006. "type": "string",
  24007. "enum": ["question.asked"]
  24008. },
  24009. "properties": {
  24010. "type": "object",
  24011. "properties": {
  24012. "id": {
  24013. "type": "string",
  24014. "pattern": "^que"
  24015. },
  24016. "sessionID": {
  24017. "type": "string",
  24018. "pattern": "^ses"
  24019. },
  24020. "questions": {
  24021. "type": "array",
  24022. "items": {
  24023. "$ref": "#/components/schemas/QuestionInfo"
  24024. },
  24025. "description": "Questions to ask"
  24026. },
  24027. "tool": {
  24028. "$ref": "#/components/schemas/QuestionTool"
  24029. }
  24030. },
  24031. "required": ["id", "sessionID", "questions"],
  24032. "additionalProperties": false
  24033. }
  24034. },
  24035. "required": ["id", "type", "properties"],
  24036. "additionalProperties": false
  24037. },
  24038. "EventQuestionReplied": {
  24039. "type": "object",
  24040. "properties": {
  24041. "id": {
  24042. "type": "string"
  24043. },
  24044. "type": {
  24045. "type": "string",
  24046. "enum": ["question.replied"]
  24047. },
  24048. "properties": {
  24049. "type": "object",
  24050. "properties": {
  24051. "sessionID": {
  24052. "type": "string",
  24053. "pattern": "^ses"
  24054. },
  24055. "requestID": {
  24056. "type": "string",
  24057. "pattern": "^que"
  24058. },
  24059. "answers": {
  24060. "type": "array",
  24061. "items": {
  24062. "$ref": "#/components/schemas/QuestionAnswer"
  24063. }
  24064. }
  24065. },
  24066. "required": ["sessionID", "requestID", "answers"],
  24067. "additionalProperties": false
  24068. }
  24069. },
  24070. "required": ["id", "type", "properties"],
  24071. "additionalProperties": false
  24072. },
  24073. "EventQuestionRejected": {
  24074. "type": "object",
  24075. "properties": {
  24076. "id": {
  24077. "type": "string"
  24078. },
  24079. "type": {
  24080. "type": "string",
  24081. "enum": ["question.rejected"]
  24082. },
  24083. "properties": {
  24084. "type": "object",
  24085. "properties": {
  24086. "sessionID": {
  24087. "type": "string",
  24088. "pattern": "^ses"
  24089. },
  24090. "requestID": {
  24091. "type": "string",
  24092. "pattern": "^que"
  24093. }
  24094. },
  24095. "required": ["sessionID", "requestID"],
  24096. "additionalProperties": false
  24097. }
  24098. },
  24099. "required": ["id", "type", "properties"],
  24100. "additionalProperties": false
  24101. },
  24102. "EventTodoUpdated": {
  24103. "type": "object",
  24104. "properties": {
  24105. "id": {
  24106. "type": "string"
  24107. },
  24108. "type": {
  24109. "type": "string",
  24110. "enum": ["todo.updated"]
  24111. },
  24112. "properties": {
  24113. "type": "object",
  24114. "properties": {
  24115. "sessionID": {
  24116. "type": "string",
  24117. "pattern": "^ses"
  24118. },
  24119. "todos": {
  24120. "type": "array",
  24121. "items": {
  24122. "$ref": "#/components/schemas/Todo"
  24123. }
  24124. }
  24125. },
  24126. "required": ["sessionID", "todos"],
  24127. "additionalProperties": false
  24128. }
  24129. },
  24130. "required": ["id", "type", "properties"],
  24131. "additionalProperties": false
  24132. },
  24133. "EventSessionStatus": {
  24134. "type": "object",
  24135. "properties": {
  24136. "id": {
  24137. "type": "string"
  24138. },
  24139. "type": {
  24140. "type": "string",
  24141. "enum": ["session.status"]
  24142. },
  24143. "properties": {
  24144. "type": "object",
  24145. "properties": {
  24146. "sessionID": {
  24147. "type": "string",
  24148. "pattern": "^ses"
  24149. },
  24150. "status": {
  24151. "$ref": "#/components/schemas/SessionStatus"
  24152. }
  24153. },
  24154. "required": ["sessionID", "status"],
  24155. "additionalProperties": false
  24156. }
  24157. },
  24158. "required": ["id", "type", "properties"],
  24159. "additionalProperties": false
  24160. },
  24161. "EventSessionIdle": {
  24162. "type": "object",
  24163. "properties": {
  24164. "id": {
  24165. "type": "string"
  24166. },
  24167. "type": {
  24168. "type": "string",
  24169. "enum": ["session.idle"]
  24170. },
  24171. "properties": {
  24172. "type": "object",
  24173. "properties": {
  24174. "sessionID": {
  24175. "type": "string",
  24176. "pattern": "^ses"
  24177. }
  24178. },
  24179. "required": ["sessionID"],
  24180. "additionalProperties": false
  24181. }
  24182. },
  24183. "required": ["id", "type", "properties"],
  24184. "additionalProperties": false
  24185. },
  24186. "EventSessionCompacted": {
  24187. "type": "object",
  24188. "properties": {
  24189. "id": {
  24190. "type": "string"
  24191. },
  24192. "type": {
  24193. "type": "string",
  24194. "enum": ["session.compacted"]
  24195. },
  24196. "properties": {
  24197. "type": "object",
  24198. "properties": {
  24199. "sessionID": {
  24200. "type": "string",
  24201. "pattern": "^ses"
  24202. }
  24203. },
  24204. "required": ["sessionID"],
  24205. "additionalProperties": false
  24206. }
  24207. },
  24208. "required": ["id", "type", "properties"],
  24209. "additionalProperties": false
  24210. },
  24211. "EventLspUpdated": {
  24212. "type": "object",
  24213. "properties": {
  24214. "id": {
  24215. "type": "string"
  24216. },
  24217. "type": {
  24218. "type": "string",
  24219. "enum": ["lsp.updated"]
  24220. },
  24221. "properties": {
  24222. "type": "object",
  24223. "properties": {}
  24224. }
  24225. },
  24226. "required": ["id", "type", "properties"],
  24227. "additionalProperties": false
  24228. },
  24229. "EventMcpToolsChanged": {
  24230. "type": "object",
  24231. "properties": {
  24232. "id": {
  24233. "type": "string"
  24234. },
  24235. "type": {
  24236. "type": "string",
  24237. "enum": ["mcp.tools.changed"]
  24238. },
  24239. "properties": {
  24240. "type": "object",
  24241. "properties": {
  24242. "server": {
  24243. "type": "string"
  24244. }
  24245. },
  24246. "required": ["server"],
  24247. "additionalProperties": false
  24248. }
  24249. },
  24250. "required": ["id", "type", "properties"],
  24251. "additionalProperties": false
  24252. },
  24253. "EventMcpBrowserOpenFailed": {
  24254. "type": "object",
  24255. "properties": {
  24256. "id": {
  24257. "type": "string"
  24258. },
  24259. "type": {
  24260. "type": "string",
  24261. "enum": ["mcp.browser.open.failed"]
  24262. },
  24263. "properties": {
  24264. "type": "object",
  24265. "properties": {
  24266. "mcpName": {
  24267. "type": "string"
  24268. },
  24269. "url": {
  24270. "type": "string"
  24271. }
  24272. },
  24273. "required": ["mcpName", "url"],
  24274. "additionalProperties": false
  24275. }
  24276. },
  24277. "required": ["id", "type", "properties"],
  24278. "additionalProperties": false
  24279. },
  24280. "EventCommandExecuted": {
  24281. "type": "object",
  24282. "properties": {
  24283. "id": {
  24284. "type": "string"
  24285. },
  24286. "type": {
  24287. "type": "string",
  24288. "enum": ["command.executed"]
  24289. },
  24290. "properties": {
  24291. "type": "object",
  24292. "properties": {
  24293. "name": {
  24294. "type": "string"
  24295. },
  24296. "sessionID": {
  24297. "type": "string",
  24298. "pattern": "^ses"
  24299. },
  24300. "arguments": {
  24301. "type": "string"
  24302. },
  24303. "messageID": {
  24304. "type": "string",
  24305. "pattern": "^msg"
  24306. }
  24307. },
  24308. "required": ["name", "sessionID", "arguments", "messageID"],
  24309. "additionalProperties": false
  24310. }
  24311. },
  24312. "required": ["id", "type", "properties"],
  24313. "additionalProperties": false
  24314. },
  24315. "EventProjectUpdated": {
  24316. "type": "object",
  24317. "properties": {
  24318. "id": {
  24319. "type": "string"
  24320. },
  24321. "type": {
  24322. "type": "string",
  24323. "enum": ["project.updated"]
  24324. },
  24325. "properties": {
  24326. "type": "object",
  24327. "properties": {
  24328. "id": {
  24329. "type": "string"
  24330. },
  24331. "worktree": {
  24332. "type": "string"
  24333. },
  24334. "vcs": {
  24335. "type": "string",
  24336. "enum": ["git"]
  24337. },
  24338. "name": {
  24339. "type": "string"
  24340. },
  24341. "icon": {
  24342. "type": "object",
  24343. "properties": {
  24344. "url": {
  24345. "type": "string"
  24346. },
  24347. "override": {
  24348. "type": "string"
  24349. },
  24350. "color": {
  24351. "type": "string"
  24352. }
  24353. },
  24354. "additionalProperties": false
  24355. },
  24356. "commands": {
  24357. "type": "object",
  24358. "properties": {
  24359. "start": {
  24360. "type": "string",
  24361. "description": "Startup script to run when creating a new workspace (worktree)"
  24362. }
  24363. },
  24364. "additionalProperties": false
  24365. },
  24366. "time": {
  24367. "type": "object",
  24368. "properties": {
  24369. "created": {
  24370. "type": "integer",
  24371. "minimum": 0
  24372. },
  24373. "updated": {
  24374. "type": "integer",
  24375. "minimum": 0
  24376. },
  24377. "initialized": {
  24378. "type": "integer",
  24379. "minimum": 0
  24380. }
  24381. },
  24382. "required": ["created", "updated"],
  24383. "additionalProperties": false
  24384. },
  24385. "sandboxes": {
  24386. "type": "array",
  24387. "items": {
  24388. "type": "string"
  24389. }
  24390. }
  24391. },
  24392. "required": ["id", "worktree", "time", "sandboxes"],
  24393. "additionalProperties": false
  24394. }
  24395. },
  24396. "required": ["id", "type", "properties"],
  24397. "additionalProperties": false
  24398. },
  24399. "EventVcsBranchUpdated": {
  24400. "type": "object",
  24401. "properties": {
  24402. "id": {
  24403. "type": "string"
  24404. },
  24405. "type": {
  24406. "type": "string",
  24407. "enum": ["vcs.branch.updated"]
  24408. },
  24409. "properties": {
  24410. "type": "object",
  24411. "properties": {
  24412. "branch": {
  24413. "type": "string"
  24414. }
  24415. },
  24416. "additionalProperties": false
  24417. }
  24418. },
  24419. "required": ["id", "type", "properties"],
  24420. "additionalProperties": false
  24421. },
  24422. "EventWorkspaceReady": {
  24423. "type": "object",
  24424. "properties": {
  24425. "id": {
  24426. "type": "string"
  24427. },
  24428. "type": {
  24429. "type": "string",
  24430. "enum": ["workspace.ready"]
  24431. },
  24432. "properties": {
  24433. "type": "object",
  24434. "properties": {
  24435. "name": {
  24436. "type": "string"
  24437. }
  24438. },
  24439. "required": ["name"],
  24440. "additionalProperties": false
  24441. }
  24442. },
  24443. "required": ["id", "type", "properties"],
  24444. "additionalProperties": false
  24445. },
  24446. "EventWorkspaceFailed": {
  24447. "type": "object",
  24448. "properties": {
  24449. "id": {
  24450. "type": "string"
  24451. },
  24452. "type": {
  24453. "type": "string",
  24454. "enum": ["workspace.failed"]
  24455. },
  24456. "properties": {
  24457. "type": "object",
  24458. "properties": {
  24459. "message": {
  24460. "type": "string"
  24461. }
  24462. },
  24463. "required": ["message"],
  24464. "additionalProperties": false
  24465. }
  24466. },
  24467. "required": ["id", "type", "properties"],
  24468. "additionalProperties": false
  24469. },
  24470. "EventWorkspaceStatus": {
  24471. "type": "object",
  24472. "properties": {
  24473. "id": {
  24474. "type": "string"
  24475. },
  24476. "type": {
  24477. "type": "string",
  24478. "enum": ["workspace.status"]
  24479. },
  24480. "properties": {
  24481. "type": "object",
  24482. "properties": {
  24483. "workspaceID": {
  24484. "type": "string",
  24485. "pattern": "^wrk"
  24486. },
  24487. "status": {
  24488. "type": "string",
  24489. "enum": ["connected", "connecting", "disconnected", "error"]
  24490. }
  24491. },
  24492. "required": ["workspaceID", "status"],
  24493. "additionalProperties": false
  24494. }
  24495. },
  24496. "required": ["id", "type", "properties"],
  24497. "additionalProperties": false
  24498. },
  24499. "EventWorktreeReady": {
  24500. "type": "object",
  24501. "properties": {
  24502. "id": {
  24503. "type": "string"
  24504. },
  24505. "type": {
  24506. "type": "string",
  24507. "enum": ["worktree.ready"]
  24508. },
  24509. "properties": {
  24510. "type": "object",
  24511. "properties": {
  24512. "name": {
  24513. "type": "string"
  24514. },
  24515. "branch": {
  24516. "type": "string"
  24517. }
  24518. },
  24519. "required": ["name"],
  24520. "additionalProperties": false
  24521. }
  24522. },
  24523. "required": ["id", "type", "properties"],
  24524. "additionalProperties": false
  24525. },
  24526. "EventWorktreeFailed": {
  24527. "type": "object",
  24528. "properties": {
  24529. "id": {
  24530. "type": "string"
  24531. },
  24532. "type": {
  24533. "type": "string",
  24534. "enum": ["worktree.failed"]
  24535. },
  24536. "properties": {
  24537. "type": "object",
  24538. "properties": {
  24539. "message": {
  24540. "type": "string"
  24541. }
  24542. },
  24543. "required": ["message"],
  24544. "additionalProperties": false
  24545. }
  24546. },
  24547. "required": ["id", "type", "properties"],
  24548. "additionalProperties": false
  24549. },
  24550. "EventPtyCreated": {
  24551. "type": "object",
  24552. "properties": {
  24553. "id": {
  24554. "type": "string"
  24555. },
  24556. "type": {
  24557. "type": "string",
  24558. "enum": ["pty.created"]
  24559. },
  24560. "properties": {
  24561. "type": "object",
  24562. "properties": {
  24563. "info": {
  24564. "$ref": "#/components/schemas/Pty"
  24565. }
  24566. },
  24567. "required": ["info"],
  24568. "additionalProperties": false
  24569. }
  24570. },
  24571. "required": ["id", "type", "properties"],
  24572. "additionalProperties": false
  24573. },
  24574. "EventPtyUpdated": {
  24575. "type": "object",
  24576. "properties": {
  24577. "id": {
  24578. "type": "string"
  24579. },
  24580. "type": {
  24581. "type": "string",
  24582. "enum": ["pty.updated"]
  24583. },
  24584. "properties": {
  24585. "type": "object",
  24586. "properties": {
  24587. "info": {
  24588. "$ref": "#/components/schemas/Pty"
  24589. }
  24590. },
  24591. "required": ["info"],
  24592. "additionalProperties": false
  24593. }
  24594. },
  24595. "required": ["id", "type", "properties"],
  24596. "additionalProperties": false
  24597. },
  24598. "EventPtyExited": {
  24599. "type": "object",
  24600. "properties": {
  24601. "id": {
  24602. "type": "string"
  24603. },
  24604. "type": {
  24605. "type": "string",
  24606. "enum": ["pty.exited"]
  24607. },
  24608. "properties": {
  24609. "type": "object",
  24610. "properties": {
  24611. "id": {
  24612. "type": "string",
  24613. "pattern": "^pty"
  24614. },
  24615. "exitCode": {
  24616. "type": "integer",
  24617. "minimum": 0
  24618. }
  24619. },
  24620. "required": ["id", "exitCode"],
  24621. "additionalProperties": false
  24622. }
  24623. },
  24624. "required": ["id", "type", "properties"],
  24625. "additionalProperties": false
  24626. },
  24627. "EventPtyDeleted": {
  24628. "type": "object",
  24629. "properties": {
  24630. "id": {
  24631. "type": "string"
  24632. },
  24633. "type": {
  24634. "type": "string",
  24635. "enum": ["pty.deleted"]
  24636. },
  24637. "properties": {
  24638. "type": "object",
  24639. "properties": {
  24640. "id": {
  24641. "type": "string",
  24642. "pattern": "^pty"
  24643. }
  24644. },
  24645. "required": ["id"],
  24646. "additionalProperties": false
  24647. }
  24648. },
  24649. "required": ["id", "type", "properties"],
  24650. "additionalProperties": false
  24651. },
  24652. "EventInstallationUpdated": {
  24653. "type": "object",
  24654. "properties": {
  24655. "id": {
  24656. "type": "string"
  24657. },
  24658. "type": {
  24659. "type": "string",
  24660. "enum": ["installation.updated"]
  24661. },
  24662. "properties": {
  24663. "type": "object",
  24664. "properties": {
  24665. "version": {
  24666. "type": "string"
  24667. }
  24668. },
  24669. "required": ["version"],
  24670. "additionalProperties": false
  24671. }
  24672. },
  24673. "required": ["id", "type", "properties"],
  24674. "additionalProperties": false
  24675. },
  24676. "EventInstallationUpdate-available": {
  24677. "type": "object",
  24678. "properties": {
  24679. "id": {
  24680. "type": "string"
  24681. },
  24682. "type": {
  24683. "type": "string",
  24684. "enum": ["installation.update-available"]
  24685. },
  24686. "properties": {
  24687. "type": "object",
  24688. "properties": {
  24689. "version": {
  24690. "type": "string"
  24691. }
  24692. },
  24693. "required": ["version"],
  24694. "additionalProperties": false
  24695. }
  24696. },
  24697. "required": ["id", "type", "properties"],
  24698. "additionalProperties": false
  24699. },
  24700. "EventServerConnected": {
  24701. "type": "object",
  24702. "properties": {
  24703. "id": {
  24704. "type": "string"
  24705. },
  24706. "type": {
  24707. "type": "string",
  24708. "enum": ["server.connected"]
  24709. },
  24710. "properties": {
  24711. "type": "object",
  24712. "properties": {}
  24713. }
  24714. },
  24715. "required": ["id", "type", "properties"],
  24716. "additionalProperties": false
  24717. },
  24718. "EventGlobalDisposed": {
  24719. "type": "object",
  24720. "properties": {
  24721. "id": {
  24722. "type": "string"
  24723. },
  24724. "type": {
  24725. "type": "string",
  24726. "enum": ["global.disposed"]
  24727. },
  24728. "properties": {
  24729. "type": "object",
  24730. "properties": {}
  24731. }
  24732. },
  24733. "required": ["id", "type", "properties"],
  24734. "additionalProperties": false
  24735. },
  24736. "EventPermissionV2Asked": {
  24737. "type": "object",
  24738. "properties": {
  24739. "id": {
  24740. "type": "string"
  24741. },
  24742. "type": {
  24743. "type": "string",
  24744. "enum": ["permission.v2.asked"]
  24745. },
  24746. "properties": {
  24747. "type": "object",
  24748. "properties": {
  24749. "id": {
  24750. "type": "string",
  24751. "pattern": "^per"
  24752. },
  24753. "sessionID": {
  24754. "type": "string",
  24755. "pattern": "^ses"
  24756. },
  24757. "action": {
  24758. "type": "string"
  24759. },
  24760. "resources": {
  24761. "type": "array",
  24762. "items": {
  24763. "type": "string"
  24764. }
  24765. },
  24766. "save": {
  24767. "type": "array",
  24768. "items": {
  24769. "type": "string"
  24770. }
  24771. },
  24772. "metadata": {
  24773. "type": "object"
  24774. },
  24775. "source": {
  24776. "$ref": "#/components/schemas/PermissionV2Source"
  24777. }
  24778. },
  24779. "required": ["id", "sessionID", "action", "resources"],
  24780. "additionalProperties": false
  24781. }
  24782. },
  24783. "required": ["id", "type", "properties"],
  24784. "additionalProperties": false
  24785. },
  24786. "EventPermissionV2Replied": {
  24787. "type": "object",
  24788. "properties": {
  24789. "id": {
  24790. "type": "string"
  24791. },
  24792. "type": {
  24793. "type": "string",
  24794. "enum": ["permission.v2.replied"]
  24795. },
  24796. "properties": {
  24797. "type": "object",
  24798. "properties": {
  24799. "sessionID": {
  24800. "type": "string",
  24801. "pattern": "^ses"
  24802. },
  24803. "requestID": {
  24804. "type": "string",
  24805. "pattern": "^per"
  24806. },
  24807. "reply": {
  24808. "$ref": "#/components/schemas/PermissionV2Reply"
  24809. }
  24810. },
  24811. "required": ["sessionID", "requestID", "reply"],
  24812. "additionalProperties": false
  24813. }
  24814. },
  24815. "required": ["id", "type", "properties"],
  24816. "additionalProperties": false
  24817. },
  24818. "EventAccountAdded": {
  24819. "type": "object",
  24820. "properties": {
  24821. "id": {
  24822. "type": "string"
  24823. },
  24824. "type": {
  24825. "type": "string",
  24826. "enum": ["account.added"]
  24827. },
  24828. "properties": {
  24829. "type": "object",
  24830. "properties": {
  24831. "account": {
  24832. "$ref": "#/components/schemas/AuthInfo"
  24833. }
  24834. },
  24835. "required": ["account"],
  24836. "additionalProperties": false
  24837. }
  24838. },
  24839. "required": ["id", "type", "properties"],
  24840. "additionalProperties": false
  24841. },
  24842. "EventAccountRemoved": {
  24843. "type": "object",
  24844. "properties": {
  24845. "id": {
  24846. "type": "string"
  24847. },
  24848. "type": {
  24849. "type": "string",
  24850. "enum": ["account.removed"]
  24851. },
  24852. "properties": {
  24853. "type": "object",
  24854. "properties": {
  24855. "account": {
  24856. "$ref": "#/components/schemas/AuthInfo"
  24857. }
  24858. },
  24859. "required": ["account"],
  24860. "additionalProperties": false
  24861. }
  24862. },
  24863. "required": ["id", "type", "properties"],
  24864. "additionalProperties": false
  24865. },
  24866. "EventAccountSwitched": {
  24867. "type": "object",
  24868. "properties": {
  24869. "id": {
  24870. "type": "string"
  24871. },
  24872. "type": {
  24873. "type": "string",
  24874. "enum": ["account.switched"]
  24875. },
  24876. "properties": {
  24877. "type": "object",
  24878. "properties": {
  24879. "serviceID": {
  24880. "type": "string"
  24881. },
  24882. "from": {
  24883. "type": "string"
  24884. },
  24885. "to": {
  24886. "type": "string"
  24887. }
  24888. },
  24889. "required": ["serviceID"],
  24890. "additionalProperties": false
  24891. }
  24892. },
  24893. "required": ["id", "type", "properties"],
  24894. "additionalProperties": false
  24895. },
  24896. "BadRequestError": {
  24897. "type": "object",
  24898. "required": ["name", "data"],
  24899. "properties": {
  24900. "name": {
  24901. "type": "string",
  24902. "enum": ["BadRequest"]
  24903. },
  24904. "data": {
  24905. "type": "object",
  24906. "required": ["message"],
  24907. "properties": {
  24908. "message": {
  24909. "type": "string"
  24910. },
  24911. "kind": {
  24912. "type": "string",
  24913. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  24914. }
  24915. }
  24916. }
  24917. }
  24918. }
  24919. }
  24920. },
  24921. "security": [],
  24922. "tags": [
  24923. {
  24924. "name": "control",
  24925. "description": "Control plane routes."
  24926. },
  24927. {
  24928. "name": "global",
  24929. "description": "Global server routes."
  24930. },
  24931. {
  24932. "name": "event",
  24933. "description": "Instance event stream route."
  24934. },
  24935. {
  24936. "name": "config",
  24937. "description": "Experimental HttpApi config routes."
  24938. },
  24939. {
  24940. "name": "experimental",
  24941. "description": "Experimental HttpApi read-only routes."
  24942. },
  24943. {
  24944. "name": "file",
  24945. "description": "Experimental HttpApi file routes."
  24946. },
  24947. {
  24948. "name": "instance",
  24949. "description": "Experimental HttpApi instance read routes."
  24950. },
  24951. {
  24952. "name": "mcp",
  24953. "description": "Experimental HttpApi MCP routes."
  24954. },
  24955. {
  24956. "name": "project",
  24957. "description": "Experimental HttpApi project routes."
  24958. },
  24959. {
  24960. "name": "pty",
  24961. "description": "Experimental HttpApi PTY routes."
  24962. },
  24963. {
  24964. "name": "question",
  24965. "description": "Question routes."
  24966. },
  24967. {
  24968. "name": "permission",
  24969. "description": "Experimental HttpApi permission routes."
  24970. },
  24971. {
  24972. "name": "provider",
  24973. "description": "Experimental HttpApi provider routes."
  24974. },
  24975. {
  24976. "name": "session",
  24977. "description": "Experimental HttpApi session routes."
  24978. },
  24979. {
  24980. "name": "sync",
  24981. "description": "Experimental HttpApi sync routes."
  24982. },
  24983. {
  24984. "name": "v2",
  24985. "description": "Experimental v2 routes."
  24986. },
  24987. {
  24988. "name": "v2 messages",
  24989. "description": "Experimental v2 message routes."
  24990. },
  24991. {
  24992. "name": "v2 models",
  24993. "description": "Experimental v2 model routes."
  24994. },
  24995. {
  24996. "name": "v2 providers",
  24997. "description": "Experimental v2 provider routes."
  24998. },
  24999. {
  25000. "name": "v2 permissions",
  25001. "description": "Experimental v2 permission routes."
  25002. },
  25003. {
  25004. "name": "v2 session permissions",
  25005. "description": "Experimental v2 session permission routes."
  25006. },
  25007. {
  25008. "name": "v2 saved permissions",
  25009. "description": "Experimental v2 saved permission routes."
  25010. },
  25011. {
  25012. "name": "v2 filesystem",
  25013. "description": "Experimental v2 location-scoped filesystem routes."
  25014. },
  25015. {
  25016. "name": "tui",
  25017. "description": "Experimental HttpApi TUI routes."
  25018. },
  25019. {
  25020. "name": "workspace",
  25021. "description": "Experimental HttpApi workspace routes."
  25022. },
  25023. {
  25024. "name": "pty",
  25025. "description": "PTY websocket route."
  25026. }
  25027. ]
  25028. }