openapi.json 666 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946
  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/Session1"
  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/Session3"
  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/Session2"
  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/Session4"
  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/Session1"
  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/Session5"
  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/Session6"
  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/Session7"
  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/Session8"
  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/Session9"
  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": "directory",
  8116. "in": "query",
  8117. "schema": {
  8118. "type": "string"
  8119. },
  8120. "required": false
  8121. },
  8122. {
  8123. "name": "workspace",
  8124. "in": "query",
  8125. "schema": {
  8126. "type": "string"
  8127. },
  8128. "required": false
  8129. },
  8130. {
  8131. "name": "limit",
  8132. "in": "query",
  8133. "schema": {
  8134. "type": "number"
  8135. },
  8136. "required": false
  8137. },
  8138. {
  8139. "name": "order",
  8140. "in": "query",
  8141. "schema": {
  8142. "type": "string",
  8143. "enum": ["asc", "desc"]
  8144. },
  8145. "required": false
  8146. },
  8147. {
  8148. "name": "path",
  8149. "in": "query",
  8150. "schema": {
  8151. "type": "string"
  8152. },
  8153. "required": false
  8154. },
  8155. {
  8156. "name": "roots",
  8157. "in": "query",
  8158. "schema": {
  8159. "anyOf": [
  8160. {
  8161. "type": "boolean"
  8162. },
  8163. {
  8164. "type": "string",
  8165. "enum": ["true", "false"]
  8166. }
  8167. ]
  8168. },
  8169. "required": false
  8170. },
  8171. {
  8172. "name": "start",
  8173. "in": "query",
  8174. "schema": {
  8175. "type": "number"
  8176. },
  8177. "required": false
  8178. },
  8179. {
  8180. "name": "search",
  8181. "in": "query",
  8182. "schema": {
  8183. "type": "string"
  8184. },
  8185. "required": false
  8186. },
  8187. {
  8188. "name": "cursor",
  8189. "in": "query",
  8190. "schema": {
  8191. "type": "string",
  8192. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8193. },
  8194. "required": false
  8195. }
  8196. ],
  8197. "security": [],
  8198. "responses": {
  8199. "200": {
  8200. "description": "V2SessionsResponse",
  8201. "content": {
  8202. "application/json": {
  8203. "schema": {
  8204. "$ref": "#/components/schemas/V2SessionsResponse"
  8205. }
  8206. }
  8207. }
  8208. },
  8209. "400": {
  8210. "description": "InvalidCursorError | InvalidRequestError",
  8211. "content": {
  8212. "application/json": {
  8213. "schema": {
  8214. "anyOf": [
  8215. {
  8216. "$ref": "#/components/schemas/InvalidCursorError"
  8217. },
  8218. {
  8219. "$ref": "#/components/schemas/InvalidRequestError"
  8220. },
  8221. {
  8222. "$ref": "#/components/schemas/InvalidRequestError"
  8223. }
  8224. ]
  8225. }
  8226. }
  8227. }
  8228. },
  8229. "401": {
  8230. "description": "UnauthorizedError",
  8231. "content": {
  8232. "application/json": {
  8233. "schema": {
  8234. "$ref": "#/components/schemas/UnauthorizedError"
  8235. }
  8236. }
  8237. }
  8238. }
  8239. },
  8240. "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.",
  8241. "summary": "List v2 sessions",
  8242. "x-codeSamples": [
  8243. {
  8244. "lang": "js",
  8245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8246. }
  8247. ]
  8248. }
  8249. },
  8250. "/api/session/{sessionID}/prompt": {
  8251. "post": {
  8252. "tags": ["v2"],
  8253. "operationId": "v2.session.prompt",
  8254. "parameters": [
  8255. {
  8256. "name": "sessionID",
  8257. "in": "path",
  8258. "schema": {
  8259. "type": "string",
  8260. "pattern": "^ses"
  8261. },
  8262. "required": true
  8263. },
  8264. {
  8265. "name": "directory",
  8266. "in": "query",
  8267. "schema": {
  8268. "type": "string"
  8269. },
  8270. "required": false
  8271. },
  8272. {
  8273. "name": "workspace",
  8274. "in": "query",
  8275. "schema": {
  8276. "type": "string"
  8277. },
  8278. "required": false
  8279. }
  8280. ],
  8281. "security": [],
  8282. "responses": {
  8283. "200": {
  8284. "description": "Session.Message",
  8285. "content": {
  8286. "application/json": {
  8287. "schema": {
  8288. "$ref": "#/components/schemas/SessionMessage"
  8289. }
  8290. }
  8291. }
  8292. },
  8293. "400": {
  8294. "description": "InvalidRequestError",
  8295. "content": {
  8296. "application/json": {
  8297. "schema": {
  8298. "$ref": "#/components/schemas/InvalidRequestError"
  8299. }
  8300. }
  8301. }
  8302. },
  8303. "401": {
  8304. "description": "UnauthorizedError",
  8305. "content": {
  8306. "application/json": {
  8307. "schema": {
  8308. "$ref": "#/components/schemas/UnauthorizedError"
  8309. }
  8310. }
  8311. }
  8312. },
  8313. "404": {
  8314. "description": "SessionNotFoundError",
  8315. "content": {
  8316. "application/json": {
  8317. "schema": {
  8318. "$ref": "#/components/schemas/SessionNotFoundError"
  8319. }
  8320. }
  8321. }
  8322. },
  8323. "503": {
  8324. "description": "ServiceUnavailableError",
  8325. "content": {
  8326. "application/json": {
  8327. "schema": {
  8328. "$ref": "#/components/schemas/ServiceUnavailableError"
  8329. }
  8330. }
  8331. }
  8332. }
  8333. },
  8334. "description": "Create a v2 session message and queue it for the agent loop.",
  8335. "summary": "Send v2 message",
  8336. "requestBody": {
  8337. "content": {
  8338. "application/json": {
  8339. "schema": {
  8340. "type": "object",
  8341. "properties": {
  8342. "prompt": {
  8343. "$ref": "#/components/schemas/Prompt"
  8344. },
  8345. "delivery": {
  8346. "$ref": "#/components/schemas/SessionDelivery"
  8347. }
  8348. },
  8349. "required": ["prompt"],
  8350. "additionalProperties": false
  8351. }
  8352. }
  8353. }
  8354. },
  8355. "x-codeSamples": [
  8356. {
  8357. "lang": "js",
  8358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8359. }
  8360. ]
  8361. }
  8362. },
  8363. "/api/session/{sessionID}/compact": {
  8364. "post": {
  8365. "tags": ["v2"],
  8366. "operationId": "v2.session.compact",
  8367. "parameters": [
  8368. {
  8369. "name": "sessionID",
  8370. "in": "path",
  8371. "schema": {
  8372. "type": "string",
  8373. "pattern": "^ses"
  8374. },
  8375. "required": true
  8376. },
  8377. {
  8378. "name": "directory",
  8379. "in": "query",
  8380. "schema": {
  8381. "type": "string"
  8382. },
  8383. "required": false
  8384. },
  8385. {
  8386. "name": "workspace",
  8387. "in": "query",
  8388. "schema": {
  8389. "type": "string"
  8390. },
  8391. "required": false
  8392. }
  8393. ],
  8394. "security": [],
  8395. "responses": {
  8396. "204": {
  8397. "description": "<No Content>"
  8398. },
  8399. "400": {
  8400. "description": "InvalidRequestError",
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "$ref": "#/components/schemas/InvalidRequestError"
  8405. }
  8406. }
  8407. }
  8408. },
  8409. "401": {
  8410. "description": "UnauthorizedError",
  8411. "content": {
  8412. "application/json": {
  8413. "schema": {
  8414. "$ref": "#/components/schemas/UnauthorizedError"
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "404": {
  8420. "description": "SessionNotFoundError",
  8421. "content": {
  8422. "application/json": {
  8423. "schema": {
  8424. "$ref": "#/components/schemas/SessionNotFoundError"
  8425. }
  8426. }
  8427. }
  8428. },
  8429. "503": {
  8430. "description": "ServiceUnavailableError",
  8431. "content": {
  8432. "application/json": {
  8433. "schema": {
  8434. "$ref": "#/components/schemas/ServiceUnavailableError"
  8435. }
  8436. }
  8437. }
  8438. }
  8439. },
  8440. "description": "Compact a v2 session conversation.",
  8441. "summary": "Compact v2 session",
  8442. "x-codeSamples": [
  8443. {
  8444. "lang": "js",
  8445. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8446. }
  8447. ]
  8448. }
  8449. },
  8450. "/api/session/{sessionID}/wait": {
  8451. "post": {
  8452. "tags": ["v2"],
  8453. "operationId": "v2.session.wait",
  8454. "parameters": [
  8455. {
  8456. "name": "sessionID",
  8457. "in": "path",
  8458. "schema": {
  8459. "type": "string",
  8460. "pattern": "^ses"
  8461. },
  8462. "required": true
  8463. },
  8464. {
  8465. "name": "directory",
  8466. "in": "query",
  8467. "schema": {
  8468. "type": "string"
  8469. },
  8470. "required": false
  8471. },
  8472. {
  8473. "name": "workspace",
  8474. "in": "query",
  8475. "schema": {
  8476. "type": "string"
  8477. },
  8478. "required": false
  8479. }
  8480. ],
  8481. "security": [],
  8482. "responses": {
  8483. "204": {
  8484. "description": "<No Content>"
  8485. },
  8486. "400": {
  8487. "description": "InvalidRequestError",
  8488. "content": {
  8489. "application/json": {
  8490. "schema": {
  8491. "$ref": "#/components/schemas/InvalidRequestError"
  8492. }
  8493. }
  8494. }
  8495. },
  8496. "401": {
  8497. "description": "UnauthorizedError",
  8498. "content": {
  8499. "application/json": {
  8500. "schema": {
  8501. "$ref": "#/components/schemas/UnauthorizedError"
  8502. }
  8503. }
  8504. }
  8505. },
  8506. "404": {
  8507. "description": "SessionNotFoundError",
  8508. "content": {
  8509. "application/json": {
  8510. "schema": {
  8511. "$ref": "#/components/schemas/SessionNotFoundError"
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "503": {
  8517. "description": "ServiceUnavailableError",
  8518. "content": {
  8519. "application/json": {
  8520. "schema": {
  8521. "$ref": "#/components/schemas/ServiceUnavailableError"
  8522. }
  8523. }
  8524. }
  8525. }
  8526. },
  8527. "description": "Wait for a v2 session agent loop to become idle.",
  8528. "summary": "Wait for v2 session",
  8529. "x-codeSamples": [
  8530. {
  8531. "lang": "js",
  8532. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8533. }
  8534. ]
  8535. }
  8536. },
  8537. "/api/session/{sessionID}/context": {
  8538. "get": {
  8539. "tags": ["v2"],
  8540. "operationId": "v2.session.context",
  8541. "parameters": [
  8542. {
  8543. "name": "sessionID",
  8544. "in": "path",
  8545. "schema": {
  8546. "type": "string",
  8547. "pattern": "^ses"
  8548. },
  8549. "required": true
  8550. },
  8551. {
  8552. "name": "directory",
  8553. "in": "query",
  8554. "schema": {
  8555. "type": "string"
  8556. },
  8557. "required": false
  8558. },
  8559. {
  8560. "name": "workspace",
  8561. "in": "query",
  8562. "schema": {
  8563. "type": "string"
  8564. },
  8565. "required": false
  8566. }
  8567. ],
  8568. "security": [],
  8569. "responses": {
  8570. "200": {
  8571. "description": "Success",
  8572. "content": {
  8573. "application/json": {
  8574. "schema": {
  8575. "type": "array",
  8576. "items": {
  8577. "$ref": "#/components/schemas/SessionMessage"
  8578. }
  8579. }
  8580. }
  8581. }
  8582. },
  8583. "400": {
  8584. "description": "InvalidRequestError",
  8585. "content": {
  8586. "application/json": {
  8587. "schema": {
  8588. "$ref": "#/components/schemas/InvalidRequestError"
  8589. }
  8590. }
  8591. }
  8592. },
  8593. "401": {
  8594. "description": "UnauthorizedError",
  8595. "content": {
  8596. "application/json": {
  8597. "schema": {
  8598. "$ref": "#/components/schemas/UnauthorizedError"
  8599. }
  8600. }
  8601. }
  8602. },
  8603. "404": {
  8604. "description": "SessionNotFoundError",
  8605. "content": {
  8606. "application/json": {
  8607. "schema": {
  8608. "$ref": "#/components/schemas/SessionNotFoundError"
  8609. }
  8610. }
  8611. }
  8612. },
  8613. "500": {
  8614. "description": "UnknownError",
  8615. "content": {
  8616. "application/json": {
  8617. "schema": {
  8618. "$ref": "#/components/schemas/UnknownError1"
  8619. }
  8620. }
  8621. }
  8622. }
  8623. },
  8624. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8625. "summary": "Get v2 session context",
  8626. "x-codeSamples": [
  8627. {
  8628. "lang": "js",
  8629. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8630. }
  8631. ]
  8632. }
  8633. },
  8634. "/api/session/{sessionID}/message": {
  8635. "get": {
  8636. "tags": ["v2 messages"],
  8637. "operationId": "v2.session.messages",
  8638. "parameters": [
  8639. {
  8640. "name": "sessionID",
  8641. "in": "path",
  8642. "schema": {
  8643. "type": "string",
  8644. "pattern": "^ses"
  8645. },
  8646. "required": true
  8647. },
  8648. {
  8649. "name": "directory",
  8650. "in": "query",
  8651. "schema": {
  8652. "type": "string"
  8653. },
  8654. "required": false
  8655. },
  8656. {
  8657. "name": "workspace",
  8658. "in": "query",
  8659. "schema": {
  8660. "type": "string"
  8661. },
  8662. "required": false
  8663. },
  8664. {
  8665. "name": "limit",
  8666. "in": "query",
  8667. "schema": {
  8668. "type": "number"
  8669. },
  8670. "required": false
  8671. },
  8672. {
  8673. "name": "order",
  8674. "in": "query",
  8675. "schema": {
  8676. "type": "string",
  8677. "enum": ["asc", "desc"]
  8678. },
  8679. "required": false
  8680. },
  8681. {
  8682. "name": "cursor",
  8683. "in": "query",
  8684. "schema": {
  8685. "type": "string",
  8686. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8687. },
  8688. "required": false
  8689. }
  8690. ],
  8691. "security": [],
  8692. "responses": {
  8693. "200": {
  8694. "description": "V2SessionMessagesResponse",
  8695. "content": {
  8696. "application/json": {
  8697. "schema": {
  8698. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8699. }
  8700. }
  8701. }
  8702. },
  8703. "400": {
  8704. "description": "InvalidCursorError | InvalidRequestError",
  8705. "content": {
  8706. "application/json": {
  8707. "schema": {
  8708. "anyOf": [
  8709. {
  8710. "$ref": "#/components/schemas/InvalidCursorError"
  8711. },
  8712. {
  8713. "$ref": "#/components/schemas/InvalidRequestError"
  8714. }
  8715. ]
  8716. }
  8717. }
  8718. }
  8719. },
  8720. "401": {
  8721. "description": "UnauthorizedError",
  8722. "content": {
  8723. "application/json": {
  8724. "schema": {
  8725. "$ref": "#/components/schemas/UnauthorizedError"
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "404": {
  8731. "description": "SessionNotFoundError",
  8732. "content": {
  8733. "application/json": {
  8734. "schema": {
  8735. "$ref": "#/components/schemas/SessionNotFoundError"
  8736. }
  8737. }
  8738. }
  8739. },
  8740. "500": {
  8741. "description": "UnknownError",
  8742. "content": {
  8743. "application/json": {
  8744. "schema": {
  8745. "$ref": "#/components/schemas/UnknownError1"
  8746. }
  8747. }
  8748. }
  8749. }
  8750. },
  8751. "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.",
  8752. "summary": "Get v2 session messages",
  8753. "x-codeSamples": [
  8754. {
  8755. "lang": "js",
  8756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8757. }
  8758. ]
  8759. }
  8760. },
  8761. "/api/model": {
  8762. "get": {
  8763. "tags": ["v2 models"],
  8764. "operationId": "v2.model.list",
  8765. "parameters": [
  8766. {
  8767. "name": "location",
  8768. "in": "query",
  8769. "schema": {
  8770. "type": "object",
  8771. "properties": {
  8772. "directory": {
  8773. "type": "string"
  8774. },
  8775. "workspace": {
  8776. "type": "string"
  8777. }
  8778. },
  8779. "additionalProperties": false
  8780. },
  8781. "required": false,
  8782. "style": "deepObject",
  8783. "explode": true
  8784. }
  8785. ],
  8786. "security": [],
  8787. "responses": {
  8788. "200": {
  8789. "description": "Success",
  8790. "content": {
  8791. "application/json": {
  8792. "schema": {
  8793. "type": "array",
  8794. "items": {
  8795. "$ref": "#/components/schemas/ModelV2Info"
  8796. }
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "InvalidRequestError",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/InvalidRequestError"
  8807. }
  8808. }
  8809. }
  8810. },
  8811. "401": {
  8812. "description": "UnauthorizedError",
  8813. "content": {
  8814. "application/json": {
  8815. "schema": {
  8816. "$ref": "#/components/schemas/UnauthorizedError"
  8817. }
  8818. }
  8819. }
  8820. },
  8821. "503": {
  8822. "description": "ServiceUnavailableError",
  8823. "content": {
  8824. "application/json": {
  8825. "schema": {
  8826. "$ref": "#/components/schemas/ServiceUnavailableError"
  8827. }
  8828. }
  8829. }
  8830. }
  8831. },
  8832. "description": "Retrieve available v2 models ordered by release date.",
  8833. "summary": "List v2 models",
  8834. "x-codeSamples": [
  8835. {
  8836. "lang": "js",
  8837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8838. }
  8839. ]
  8840. }
  8841. },
  8842. "/api/provider": {
  8843. "get": {
  8844. "tags": ["v2 providers"],
  8845. "operationId": "v2.provider.list",
  8846. "parameters": [
  8847. {
  8848. "name": "location",
  8849. "in": "query",
  8850. "schema": {
  8851. "type": "object",
  8852. "properties": {
  8853. "directory": {
  8854. "type": "string"
  8855. },
  8856. "workspace": {
  8857. "type": "string"
  8858. }
  8859. },
  8860. "additionalProperties": false
  8861. },
  8862. "required": false,
  8863. "style": "deepObject",
  8864. "explode": true
  8865. }
  8866. ],
  8867. "security": [],
  8868. "responses": {
  8869. "200": {
  8870. "description": "Success",
  8871. "content": {
  8872. "application/json": {
  8873. "schema": {
  8874. "type": "array",
  8875. "items": {
  8876. "$ref": "#/components/schemas/ProviderV2Info"
  8877. }
  8878. }
  8879. }
  8880. }
  8881. },
  8882. "400": {
  8883. "description": "InvalidRequestError",
  8884. "content": {
  8885. "application/json": {
  8886. "schema": {
  8887. "$ref": "#/components/schemas/InvalidRequestError"
  8888. }
  8889. }
  8890. }
  8891. },
  8892. "401": {
  8893. "description": "UnauthorizedError",
  8894. "content": {
  8895. "application/json": {
  8896. "schema": {
  8897. "$ref": "#/components/schemas/UnauthorizedError"
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "503": {
  8903. "description": "ServiceUnavailableError",
  8904. "content": {
  8905. "application/json": {
  8906. "schema": {
  8907. "$ref": "#/components/schemas/ServiceUnavailableError"
  8908. }
  8909. }
  8910. }
  8911. }
  8912. },
  8913. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8914. "summary": "List v2 providers",
  8915. "x-codeSamples": [
  8916. {
  8917. "lang": "js",
  8918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8919. }
  8920. ]
  8921. }
  8922. },
  8923. "/api/provider/{providerID}": {
  8924. "get": {
  8925. "tags": ["v2 providers"],
  8926. "operationId": "v2.provider.get",
  8927. "parameters": [
  8928. {
  8929. "name": "providerID",
  8930. "in": "path",
  8931. "schema": {
  8932. "type": "string"
  8933. },
  8934. "required": true
  8935. },
  8936. {
  8937. "name": "location",
  8938. "in": "query",
  8939. "schema": {
  8940. "type": "object",
  8941. "properties": {
  8942. "directory": {
  8943. "type": "string"
  8944. },
  8945. "workspace": {
  8946. "type": "string"
  8947. }
  8948. },
  8949. "additionalProperties": false
  8950. },
  8951. "required": false,
  8952. "style": "deepObject",
  8953. "explode": true
  8954. }
  8955. ],
  8956. "security": [],
  8957. "responses": {
  8958. "200": {
  8959. "description": "ProviderV2.Info",
  8960. "content": {
  8961. "application/json": {
  8962. "schema": {
  8963. "$ref": "#/components/schemas/ProviderV2Info"
  8964. }
  8965. }
  8966. }
  8967. },
  8968. "400": {
  8969. "description": "InvalidRequestError",
  8970. "content": {
  8971. "application/json": {
  8972. "schema": {
  8973. "$ref": "#/components/schemas/InvalidRequestError"
  8974. }
  8975. }
  8976. }
  8977. },
  8978. "401": {
  8979. "description": "UnauthorizedError",
  8980. "content": {
  8981. "application/json": {
  8982. "schema": {
  8983. "$ref": "#/components/schemas/UnauthorizedError"
  8984. }
  8985. }
  8986. }
  8987. },
  8988. "404": {
  8989. "description": "ProviderNotFoundError",
  8990. "content": {
  8991. "application/json": {
  8992. "schema": {
  8993. "$ref": "#/components/schemas/ProviderNotFoundError"
  8994. }
  8995. }
  8996. }
  8997. },
  8998. "503": {
  8999. "description": "ServiceUnavailableError",
  9000. "content": {
  9001. "application/json": {
  9002. "schema": {
  9003. "$ref": "#/components/schemas/ServiceUnavailableError"
  9004. }
  9005. }
  9006. }
  9007. }
  9008. },
  9009. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  9010. "summary": "Get v2 provider",
  9011. "x-codeSamples": [
  9012. {
  9013. "lang": "js",
  9014. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9015. }
  9016. ]
  9017. }
  9018. },
  9019. "/tui/append-prompt": {
  9020. "post": {
  9021. "tags": ["tui"],
  9022. "operationId": "tui.appendPrompt",
  9023. "parameters": [
  9024. {
  9025. "name": "directory",
  9026. "in": "query",
  9027. "schema": {
  9028. "type": "string"
  9029. },
  9030. "required": false
  9031. },
  9032. {
  9033. "name": "workspace",
  9034. "in": "query",
  9035. "schema": {
  9036. "type": "string"
  9037. },
  9038. "required": false
  9039. }
  9040. ],
  9041. "responses": {
  9042. "200": {
  9043. "description": "Prompt processed successfully",
  9044. "content": {
  9045. "application/json": {
  9046. "schema": {
  9047. "type": "boolean",
  9048. "description": "Prompt processed successfully"
  9049. }
  9050. }
  9051. }
  9052. },
  9053. "400": {
  9054. "description": "BadRequest | InvalidRequestError",
  9055. "content": {
  9056. "application/json": {
  9057. "schema": {
  9058. "anyOf": [
  9059. {
  9060. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9061. },
  9062. {
  9063. "$ref": "#/components/schemas/InvalidRequestError"
  9064. }
  9065. ]
  9066. }
  9067. }
  9068. }
  9069. }
  9070. },
  9071. "description": "Append prompt to the TUI.",
  9072. "summary": "Append TUI prompt",
  9073. "requestBody": {
  9074. "content": {
  9075. "application/json": {
  9076. "schema": {
  9077. "type": "object",
  9078. "properties": {
  9079. "text": {
  9080. "type": "string"
  9081. }
  9082. },
  9083. "required": ["text"],
  9084. "additionalProperties": false
  9085. }
  9086. }
  9087. }
  9088. },
  9089. "x-codeSamples": [
  9090. {
  9091. "lang": "js",
  9092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9093. }
  9094. ]
  9095. }
  9096. },
  9097. "/tui/open-help": {
  9098. "post": {
  9099. "tags": ["tui"],
  9100. "operationId": "tui.openHelp",
  9101. "parameters": [
  9102. {
  9103. "name": "directory",
  9104. "in": "query",
  9105. "schema": {
  9106. "type": "string"
  9107. },
  9108. "required": false
  9109. },
  9110. {
  9111. "name": "workspace",
  9112. "in": "query",
  9113. "schema": {
  9114. "type": "string"
  9115. },
  9116. "required": false
  9117. }
  9118. ],
  9119. "responses": {
  9120. "200": {
  9121. "description": "Help dialog opened successfully",
  9122. "content": {
  9123. "application/json": {
  9124. "schema": {
  9125. "type": "boolean",
  9126. "description": "Help dialog opened successfully"
  9127. }
  9128. }
  9129. }
  9130. },
  9131. "400": {
  9132. "description": "Bad request",
  9133. "content": {
  9134. "application/json": {
  9135. "schema": {
  9136. "$ref": "#/components/schemas/BadRequestError"
  9137. }
  9138. }
  9139. }
  9140. }
  9141. },
  9142. "description": "Open the help dialog in the TUI to display user assistance information.",
  9143. "summary": "Open help dialog",
  9144. "x-codeSamples": [
  9145. {
  9146. "lang": "js",
  9147. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9148. }
  9149. ]
  9150. }
  9151. },
  9152. "/tui/open-sessions": {
  9153. "post": {
  9154. "tags": ["tui"],
  9155. "operationId": "tui.openSessions",
  9156. "parameters": [
  9157. {
  9158. "name": "directory",
  9159. "in": "query",
  9160. "schema": {
  9161. "type": "string"
  9162. },
  9163. "required": false
  9164. },
  9165. {
  9166. "name": "workspace",
  9167. "in": "query",
  9168. "schema": {
  9169. "type": "string"
  9170. },
  9171. "required": false
  9172. }
  9173. ],
  9174. "responses": {
  9175. "200": {
  9176. "description": "Session dialog opened successfully",
  9177. "content": {
  9178. "application/json": {
  9179. "schema": {
  9180. "type": "boolean",
  9181. "description": "Session dialog opened successfully"
  9182. }
  9183. }
  9184. }
  9185. },
  9186. "400": {
  9187. "description": "Bad request",
  9188. "content": {
  9189. "application/json": {
  9190. "schema": {
  9191. "$ref": "#/components/schemas/BadRequestError"
  9192. }
  9193. }
  9194. }
  9195. }
  9196. },
  9197. "description": "Open the session dialog.",
  9198. "summary": "Open sessions dialog",
  9199. "x-codeSamples": [
  9200. {
  9201. "lang": "js",
  9202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9203. }
  9204. ]
  9205. }
  9206. },
  9207. "/tui/open-themes": {
  9208. "post": {
  9209. "tags": ["tui"],
  9210. "operationId": "tui.openThemes",
  9211. "parameters": [
  9212. {
  9213. "name": "directory",
  9214. "in": "query",
  9215. "schema": {
  9216. "type": "string"
  9217. },
  9218. "required": false
  9219. },
  9220. {
  9221. "name": "workspace",
  9222. "in": "query",
  9223. "schema": {
  9224. "type": "string"
  9225. },
  9226. "required": false
  9227. }
  9228. ],
  9229. "responses": {
  9230. "200": {
  9231. "description": "Theme dialog opened successfully",
  9232. "content": {
  9233. "application/json": {
  9234. "schema": {
  9235. "type": "boolean",
  9236. "description": "Theme dialog opened successfully"
  9237. }
  9238. }
  9239. }
  9240. },
  9241. "400": {
  9242. "description": "Bad request",
  9243. "content": {
  9244. "application/json": {
  9245. "schema": {
  9246. "$ref": "#/components/schemas/BadRequestError"
  9247. }
  9248. }
  9249. }
  9250. }
  9251. },
  9252. "description": "Open the theme dialog.",
  9253. "summary": "Open themes dialog",
  9254. "x-codeSamples": [
  9255. {
  9256. "lang": "js",
  9257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9258. }
  9259. ]
  9260. }
  9261. },
  9262. "/tui/open-models": {
  9263. "post": {
  9264. "tags": ["tui"],
  9265. "operationId": "tui.openModels",
  9266. "parameters": [
  9267. {
  9268. "name": "directory",
  9269. "in": "query",
  9270. "schema": {
  9271. "type": "string"
  9272. },
  9273. "required": false
  9274. },
  9275. {
  9276. "name": "workspace",
  9277. "in": "query",
  9278. "schema": {
  9279. "type": "string"
  9280. },
  9281. "required": false
  9282. }
  9283. ],
  9284. "responses": {
  9285. "200": {
  9286. "description": "Model dialog opened successfully",
  9287. "content": {
  9288. "application/json": {
  9289. "schema": {
  9290. "type": "boolean",
  9291. "description": "Model dialog opened successfully"
  9292. }
  9293. }
  9294. }
  9295. },
  9296. "400": {
  9297. "description": "Bad request",
  9298. "content": {
  9299. "application/json": {
  9300. "schema": {
  9301. "$ref": "#/components/schemas/BadRequestError"
  9302. }
  9303. }
  9304. }
  9305. }
  9306. },
  9307. "description": "Open the model dialog.",
  9308. "summary": "Open models dialog",
  9309. "x-codeSamples": [
  9310. {
  9311. "lang": "js",
  9312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9313. }
  9314. ]
  9315. }
  9316. },
  9317. "/tui/submit-prompt": {
  9318. "post": {
  9319. "tags": ["tui"],
  9320. "operationId": "tui.submitPrompt",
  9321. "parameters": [
  9322. {
  9323. "name": "directory",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. },
  9330. {
  9331. "name": "workspace",
  9332. "in": "query",
  9333. "schema": {
  9334. "type": "string"
  9335. },
  9336. "required": false
  9337. }
  9338. ],
  9339. "responses": {
  9340. "200": {
  9341. "description": "Prompt submitted successfully",
  9342. "content": {
  9343. "application/json": {
  9344. "schema": {
  9345. "type": "boolean",
  9346. "description": "Prompt submitted successfully"
  9347. }
  9348. }
  9349. }
  9350. },
  9351. "400": {
  9352. "description": "Bad request",
  9353. "content": {
  9354. "application/json": {
  9355. "schema": {
  9356. "$ref": "#/components/schemas/BadRequestError"
  9357. }
  9358. }
  9359. }
  9360. }
  9361. },
  9362. "description": "Submit the prompt.",
  9363. "summary": "Submit TUI prompt",
  9364. "x-codeSamples": [
  9365. {
  9366. "lang": "js",
  9367. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9368. }
  9369. ]
  9370. }
  9371. },
  9372. "/tui/clear-prompt": {
  9373. "post": {
  9374. "tags": ["tui"],
  9375. "operationId": "tui.clearPrompt",
  9376. "parameters": [
  9377. {
  9378. "name": "directory",
  9379. "in": "query",
  9380. "schema": {
  9381. "type": "string"
  9382. },
  9383. "required": false
  9384. },
  9385. {
  9386. "name": "workspace",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. }
  9393. ],
  9394. "responses": {
  9395. "200": {
  9396. "description": "Prompt cleared successfully",
  9397. "content": {
  9398. "application/json": {
  9399. "schema": {
  9400. "type": "boolean",
  9401. "description": "Prompt cleared successfully"
  9402. }
  9403. }
  9404. }
  9405. },
  9406. "400": {
  9407. "description": "Bad request",
  9408. "content": {
  9409. "application/json": {
  9410. "schema": {
  9411. "$ref": "#/components/schemas/BadRequestError"
  9412. }
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "description": "Clear the prompt.",
  9418. "summary": "Clear TUI prompt",
  9419. "x-codeSamples": [
  9420. {
  9421. "lang": "js",
  9422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9423. }
  9424. ]
  9425. }
  9426. },
  9427. "/tui/execute-command": {
  9428. "post": {
  9429. "tags": ["tui"],
  9430. "operationId": "tui.executeCommand",
  9431. "parameters": [
  9432. {
  9433. "name": "directory",
  9434. "in": "query",
  9435. "schema": {
  9436. "type": "string"
  9437. },
  9438. "required": false
  9439. },
  9440. {
  9441. "name": "workspace",
  9442. "in": "query",
  9443. "schema": {
  9444. "type": "string"
  9445. },
  9446. "required": false
  9447. }
  9448. ],
  9449. "responses": {
  9450. "200": {
  9451. "description": "Command executed successfully",
  9452. "content": {
  9453. "application/json": {
  9454. "schema": {
  9455. "type": "boolean",
  9456. "description": "Command executed successfully"
  9457. }
  9458. }
  9459. }
  9460. },
  9461. "400": {
  9462. "description": "BadRequest | InvalidRequestError",
  9463. "content": {
  9464. "application/json": {
  9465. "schema": {
  9466. "anyOf": [
  9467. {
  9468. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9469. },
  9470. {
  9471. "$ref": "#/components/schemas/InvalidRequestError"
  9472. }
  9473. ]
  9474. }
  9475. }
  9476. }
  9477. }
  9478. },
  9479. "description": "Execute a TUI command.",
  9480. "summary": "Execute TUI command",
  9481. "requestBody": {
  9482. "content": {
  9483. "application/json": {
  9484. "schema": {
  9485. "type": "object",
  9486. "properties": {
  9487. "command": {
  9488. "type": "string"
  9489. }
  9490. },
  9491. "required": ["command"],
  9492. "additionalProperties": false
  9493. }
  9494. }
  9495. }
  9496. },
  9497. "x-codeSamples": [
  9498. {
  9499. "lang": "js",
  9500. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9501. }
  9502. ]
  9503. }
  9504. },
  9505. "/tui/show-toast": {
  9506. "post": {
  9507. "tags": ["tui"],
  9508. "operationId": "tui.showToast",
  9509. "parameters": [
  9510. {
  9511. "name": "directory",
  9512. "in": "query",
  9513. "schema": {
  9514. "type": "string"
  9515. },
  9516. "required": false
  9517. },
  9518. {
  9519. "name": "workspace",
  9520. "in": "query",
  9521. "schema": {
  9522. "type": "string"
  9523. },
  9524. "required": false
  9525. }
  9526. ],
  9527. "responses": {
  9528. "200": {
  9529. "description": "Toast notification shown successfully",
  9530. "content": {
  9531. "application/json": {
  9532. "schema": {
  9533. "type": "boolean",
  9534. "description": "Toast notification shown successfully"
  9535. }
  9536. }
  9537. }
  9538. },
  9539. "400": {
  9540. "description": "Bad request",
  9541. "content": {
  9542. "application/json": {
  9543. "schema": {
  9544. "$ref": "#/components/schemas/BadRequestError"
  9545. }
  9546. }
  9547. }
  9548. }
  9549. },
  9550. "description": "Show a toast notification in the TUI.",
  9551. "summary": "Show TUI toast",
  9552. "requestBody": {
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "type": "object",
  9557. "properties": {
  9558. "title": {
  9559. "type": "string"
  9560. },
  9561. "message": {
  9562. "type": "string"
  9563. },
  9564. "variant": {
  9565. "type": "string",
  9566. "enum": ["info", "success", "warning", "error"]
  9567. },
  9568. "duration": {
  9569. "type": "integer",
  9570. "exclusiveMinimum": 0
  9571. }
  9572. },
  9573. "required": ["message", "variant"],
  9574. "additionalProperties": false
  9575. }
  9576. }
  9577. }
  9578. },
  9579. "x-codeSamples": [
  9580. {
  9581. "lang": "js",
  9582. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9583. }
  9584. ]
  9585. }
  9586. },
  9587. "/tui/publish": {
  9588. "post": {
  9589. "tags": ["tui"],
  9590. "operationId": "tui.publish",
  9591. "parameters": [
  9592. {
  9593. "name": "directory",
  9594. "in": "query",
  9595. "schema": {
  9596. "type": "string"
  9597. },
  9598. "required": false
  9599. },
  9600. {
  9601. "name": "workspace",
  9602. "in": "query",
  9603. "schema": {
  9604. "type": "string"
  9605. },
  9606. "required": false
  9607. }
  9608. ],
  9609. "responses": {
  9610. "200": {
  9611. "description": "Event published successfully",
  9612. "content": {
  9613. "application/json": {
  9614. "schema": {
  9615. "type": "boolean",
  9616. "description": "Event published successfully"
  9617. }
  9618. }
  9619. }
  9620. },
  9621. "400": {
  9622. "description": "BadRequest | InvalidRequestError",
  9623. "content": {
  9624. "application/json": {
  9625. "schema": {
  9626. "anyOf": [
  9627. {
  9628. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9629. },
  9630. {
  9631. "$ref": "#/components/schemas/InvalidRequestError"
  9632. }
  9633. ]
  9634. }
  9635. }
  9636. }
  9637. }
  9638. },
  9639. "description": "Publish a TUI event.",
  9640. "summary": "Publish TUI event",
  9641. "requestBody": {
  9642. "content": {
  9643. "application/json": {
  9644. "schema": {
  9645. "anyOf": [
  9646. {
  9647. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9648. },
  9649. {
  9650. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9651. },
  9652. {
  9653. "$ref": "#/components/schemas/EventTuiToastShow"
  9654. },
  9655. {
  9656. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9657. }
  9658. ]
  9659. }
  9660. }
  9661. }
  9662. },
  9663. "x-codeSamples": [
  9664. {
  9665. "lang": "js",
  9666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9667. }
  9668. ]
  9669. }
  9670. },
  9671. "/tui/select-session": {
  9672. "post": {
  9673. "tags": ["tui"],
  9674. "operationId": "tui.selectSession",
  9675. "parameters": [
  9676. {
  9677. "name": "directory",
  9678. "in": "query",
  9679. "schema": {
  9680. "type": "string"
  9681. },
  9682. "required": false
  9683. },
  9684. {
  9685. "name": "workspace",
  9686. "in": "query",
  9687. "schema": {
  9688. "type": "string"
  9689. },
  9690. "required": false
  9691. }
  9692. ],
  9693. "responses": {
  9694. "200": {
  9695. "description": "Session selected successfully",
  9696. "content": {
  9697. "application/json": {
  9698. "schema": {
  9699. "type": "boolean",
  9700. "description": "Session selected successfully"
  9701. }
  9702. }
  9703. }
  9704. },
  9705. "400": {
  9706. "description": "BadRequest | InvalidRequestError",
  9707. "content": {
  9708. "application/json": {
  9709. "schema": {
  9710. "anyOf": [
  9711. {
  9712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9713. },
  9714. {
  9715. "$ref": "#/components/schemas/InvalidRequestError"
  9716. }
  9717. ]
  9718. }
  9719. }
  9720. }
  9721. },
  9722. "404": {
  9723. "description": "NotFoundError",
  9724. "content": {
  9725. "application/json": {
  9726. "schema": {
  9727. "$ref": "#/components/schemas/NotFoundError"
  9728. }
  9729. }
  9730. }
  9731. }
  9732. },
  9733. "description": "Navigate the TUI to display the specified session.",
  9734. "summary": "Select session",
  9735. "requestBody": {
  9736. "content": {
  9737. "application/json": {
  9738. "schema": {
  9739. "type": "object",
  9740. "properties": {
  9741. "sessionID": {
  9742. "type": "string",
  9743. "pattern": "^ses",
  9744. "description": "Session ID to navigate to"
  9745. }
  9746. },
  9747. "required": ["sessionID"],
  9748. "additionalProperties": false
  9749. }
  9750. }
  9751. }
  9752. },
  9753. "x-codeSamples": [
  9754. {
  9755. "lang": "js",
  9756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9757. }
  9758. ]
  9759. }
  9760. },
  9761. "/tui/control/next": {
  9762. "get": {
  9763. "tags": ["tui"],
  9764. "operationId": "tui.control.next",
  9765. "parameters": [
  9766. {
  9767. "name": "directory",
  9768. "in": "query",
  9769. "schema": {
  9770. "type": "string"
  9771. },
  9772. "required": false
  9773. },
  9774. {
  9775. "name": "workspace",
  9776. "in": "query",
  9777. "schema": {
  9778. "type": "string"
  9779. },
  9780. "required": false
  9781. }
  9782. ],
  9783. "responses": {
  9784. "200": {
  9785. "description": "Next TUI request",
  9786. "content": {
  9787. "application/json": {
  9788. "schema": {
  9789. "type": "object",
  9790. "properties": {
  9791. "path": {
  9792. "type": "string"
  9793. },
  9794. "body": {}
  9795. },
  9796. "required": ["path", "body"],
  9797. "additionalProperties": false,
  9798. "description": "Next TUI request"
  9799. }
  9800. }
  9801. }
  9802. },
  9803. "400": {
  9804. "description": "Bad request",
  9805. "content": {
  9806. "application/json": {
  9807. "schema": {
  9808. "$ref": "#/components/schemas/BadRequestError"
  9809. }
  9810. }
  9811. }
  9812. }
  9813. },
  9814. "description": "Retrieve the next TUI request from the queue for processing.",
  9815. "summary": "Get next TUI request",
  9816. "x-codeSamples": [
  9817. {
  9818. "lang": "js",
  9819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9820. }
  9821. ]
  9822. }
  9823. },
  9824. "/tui/control/response": {
  9825. "post": {
  9826. "tags": ["tui"],
  9827. "operationId": "tui.control.response",
  9828. "parameters": [
  9829. {
  9830. "name": "directory",
  9831. "in": "query",
  9832. "schema": {
  9833. "type": "string"
  9834. },
  9835. "required": false
  9836. },
  9837. {
  9838. "name": "workspace",
  9839. "in": "query",
  9840. "schema": {
  9841. "type": "string"
  9842. },
  9843. "required": false
  9844. }
  9845. ],
  9846. "responses": {
  9847. "200": {
  9848. "description": "Response submitted successfully",
  9849. "content": {
  9850. "application/json": {
  9851. "schema": {
  9852. "type": "boolean",
  9853. "description": "Response submitted successfully"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "400": {
  9859. "description": "Bad request",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/BadRequestError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9870. "summary": "Submit TUI response",
  9871. "requestBody": {
  9872. "content": {
  9873. "application/json": {
  9874. "schema": {}
  9875. }
  9876. }
  9877. },
  9878. "x-codeSamples": [
  9879. {
  9880. "lang": "js",
  9881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9882. }
  9883. ]
  9884. }
  9885. },
  9886. "/experimental/workspace/adapter": {
  9887. "get": {
  9888. "tags": ["workspace"],
  9889. "operationId": "experimental.workspace.adapter.list",
  9890. "parameters": [
  9891. {
  9892. "name": "directory",
  9893. "in": "query",
  9894. "schema": {
  9895. "type": "string"
  9896. },
  9897. "required": false
  9898. },
  9899. {
  9900. "name": "workspace",
  9901. "in": "query",
  9902. "schema": {
  9903. "type": "string"
  9904. },
  9905. "required": false
  9906. }
  9907. ],
  9908. "responses": {
  9909. "200": {
  9910. "description": "Workspace adapters",
  9911. "content": {
  9912. "application/json": {
  9913. "schema": {
  9914. "type": "array",
  9915. "items": {
  9916. "type": "object",
  9917. "properties": {
  9918. "type": {
  9919. "type": "string"
  9920. },
  9921. "name": {
  9922. "type": "string"
  9923. },
  9924. "description": {
  9925. "type": "string"
  9926. }
  9927. },
  9928. "required": ["type", "name", "description"],
  9929. "additionalProperties": false
  9930. },
  9931. "description": "Workspace adapters"
  9932. }
  9933. }
  9934. }
  9935. },
  9936. "400": {
  9937. "description": "Bad request",
  9938. "content": {
  9939. "application/json": {
  9940. "schema": {
  9941. "$ref": "#/components/schemas/BadRequestError"
  9942. }
  9943. }
  9944. }
  9945. }
  9946. },
  9947. "description": "List all available workspace adapters for the current project.",
  9948. "summary": "List workspace adapters",
  9949. "x-codeSamples": [
  9950. {
  9951. "lang": "js",
  9952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9953. }
  9954. ]
  9955. }
  9956. },
  9957. "/experimental/workspace": {
  9958. "get": {
  9959. "tags": ["workspace"],
  9960. "operationId": "experimental.workspace.list",
  9961. "parameters": [
  9962. {
  9963. "name": "directory",
  9964. "in": "query",
  9965. "schema": {
  9966. "type": "string"
  9967. },
  9968. "required": false
  9969. },
  9970. {
  9971. "name": "workspace",
  9972. "in": "query",
  9973. "schema": {
  9974. "type": "string"
  9975. },
  9976. "required": false
  9977. }
  9978. ],
  9979. "responses": {
  9980. "200": {
  9981. "description": "Workspaces",
  9982. "content": {
  9983. "application/json": {
  9984. "schema": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/Workspace"
  9988. },
  9989. "description": "Workspaces"
  9990. }
  9991. }
  9992. }
  9993. },
  9994. "400": {
  9995. "description": "Bad request",
  9996. "content": {
  9997. "application/json": {
  9998. "schema": {
  9999. "$ref": "#/components/schemas/BadRequestError"
  10000. }
  10001. }
  10002. }
  10003. }
  10004. },
  10005. "description": "List all workspaces.",
  10006. "summary": "List workspaces",
  10007. "x-codeSamples": [
  10008. {
  10009. "lang": "js",
  10010. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10011. }
  10012. ]
  10013. },
  10014. "post": {
  10015. "tags": ["workspace"],
  10016. "operationId": "experimental.workspace.create",
  10017. "parameters": [
  10018. {
  10019. "name": "directory",
  10020. "in": "query",
  10021. "schema": {
  10022. "type": "string"
  10023. },
  10024. "required": false
  10025. },
  10026. {
  10027. "name": "workspace",
  10028. "in": "query",
  10029. "schema": {
  10030. "type": "string"
  10031. },
  10032. "required": false
  10033. }
  10034. ],
  10035. "responses": {
  10036. "200": {
  10037. "description": "Workspace created",
  10038. "content": {
  10039. "application/json": {
  10040. "schema": {
  10041. "$ref": "#/components/schemas/Workspace"
  10042. }
  10043. }
  10044. }
  10045. },
  10046. "400": {
  10047. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  10048. "content": {
  10049. "application/json": {
  10050. "schema": {
  10051. "anyOf": [
  10052. {
  10053. "$ref": "#/components/schemas/WorkspaceCreateError"
  10054. },
  10055. {
  10056. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10057. },
  10058. {
  10059. "$ref": "#/components/schemas/InvalidRequestError"
  10060. }
  10061. ]
  10062. }
  10063. }
  10064. }
  10065. }
  10066. },
  10067. "description": "Create a workspace for the current project.",
  10068. "summary": "Create workspace",
  10069. "requestBody": {
  10070. "content": {
  10071. "application/json": {
  10072. "schema": {
  10073. "type": "object",
  10074. "properties": {
  10075. "id": {
  10076. "type": "string",
  10077. "pattern": "^wrk"
  10078. },
  10079. "type": {
  10080. "type": "string"
  10081. },
  10082. "branch": {
  10083. "anyOf": [
  10084. {
  10085. "type": "string"
  10086. },
  10087. {
  10088. "type": "null"
  10089. }
  10090. ]
  10091. },
  10092. "extra": {
  10093. "anyOf": [
  10094. {},
  10095. {
  10096. "type": "null"
  10097. }
  10098. ]
  10099. }
  10100. },
  10101. "required": ["type"],
  10102. "additionalProperties": false
  10103. }
  10104. }
  10105. }
  10106. },
  10107. "x-codeSamples": [
  10108. {
  10109. "lang": "js",
  10110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10111. }
  10112. ]
  10113. }
  10114. },
  10115. "/experimental/workspace/sync-list": {
  10116. "post": {
  10117. "tags": ["workspace"],
  10118. "operationId": "experimental.workspace.syncList",
  10119. "parameters": [
  10120. {
  10121. "name": "directory",
  10122. "in": "query",
  10123. "schema": {
  10124. "type": "string"
  10125. },
  10126. "required": false
  10127. },
  10128. {
  10129. "name": "workspace",
  10130. "in": "query",
  10131. "schema": {
  10132. "type": "string"
  10133. },
  10134. "required": false
  10135. }
  10136. ],
  10137. "responses": {
  10138. "204": {
  10139. "description": "Workspace list synced"
  10140. },
  10141. "400": {
  10142. "description": "Bad request",
  10143. "content": {
  10144. "application/json": {
  10145. "schema": {
  10146. "$ref": "#/components/schemas/BadRequestError"
  10147. }
  10148. }
  10149. }
  10150. }
  10151. },
  10152. "description": "Register missing workspaces returned by workspace adapters.",
  10153. "summary": "Sync workspace list",
  10154. "x-codeSamples": [
  10155. {
  10156. "lang": "js",
  10157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10158. }
  10159. ]
  10160. }
  10161. },
  10162. "/experimental/workspace/status": {
  10163. "get": {
  10164. "tags": ["workspace"],
  10165. "operationId": "experimental.workspace.status",
  10166. "parameters": [
  10167. {
  10168. "name": "directory",
  10169. "in": "query",
  10170. "schema": {
  10171. "type": "string"
  10172. },
  10173. "required": false
  10174. },
  10175. {
  10176. "name": "workspace",
  10177. "in": "query",
  10178. "schema": {
  10179. "type": "string"
  10180. },
  10181. "required": false
  10182. }
  10183. ],
  10184. "responses": {
  10185. "200": {
  10186. "description": "Workspace status",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "type": "array",
  10191. "items": {
  10192. "type": "object",
  10193. "properties": {
  10194. "workspaceID": {
  10195. "type": "string",
  10196. "pattern": "^wrk"
  10197. },
  10198. "status": {
  10199. "type": "string",
  10200. "enum": ["connected", "connecting", "disconnected", "error"]
  10201. }
  10202. },
  10203. "required": ["workspaceID", "status"],
  10204. "additionalProperties": false
  10205. },
  10206. "description": "Workspace status"
  10207. }
  10208. }
  10209. }
  10210. },
  10211. "400": {
  10212. "description": "Bad request",
  10213. "content": {
  10214. "application/json": {
  10215. "schema": {
  10216. "$ref": "#/components/schemas/BadRequestError"
  10217. }
  10218. }
  10219. }
  10220. }
  10221. },
  10222. "description": "Get connection status for workspaces in the current project.",
  10223. "summary": "Workspace status",
  10224. "x-codeSamples": [
  10225. {
  10226. "lang": "js",
  10227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10228. }
  10229. ]
  10230. }
  10231. },
  10232. "/experimental/workspace/{id}": {
  10233. "delete": {
  10234. "tags": ["workspace"],
  10235. "operationId": "experimental.workspace.remove",
  10236. "parameters": [
  10237. {
  10238. "name": "id",
  10239. "in": "path",
  10240. "schema": {
  10241. "type": "string",
  10242. "pattern": "^wrk"
  10243. },
  10244. "required": true
  10245. },
  10246. {
  10247. "name": "directory",
  10248. "in": "query",
  10249. "schema": {
  10250. "type": "string"
  10251. },
  10252. "required": false
  10253. },
  10254. {
  10255. "name": "workspace",
  10256. "in": "query",
  10257. "schema": {
  10258. "type": "string"
  10259. },
  10260. "required": false
  10261. }
  10262. ],
  10263. "responses": {
  10264. "200": {
  10265. "description": "Workspace removed",
  10266. "content": {
  10267. "application/json": {
  10268. "schema": {
  10269. "$ref": "#/components/schemas/Workspace"
  10270. }
  10271. }
  10272. }
  10273. },
  10274. "400": {
  10275. "description": "BadRequest | InvalidRequestError",
  10276. "content": {
  10277. "application/json": {
  10278. "schema": {
  10279. "anyOf": [
  10280. {
  10281. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10282. },
  10283. {
  10284. "$ref": "#/components/schemas/InvalidRequestError"
  10285. }
  10286. ]
  10287. }
  10288. }
  10289. }
  10290. }
  10291. },
  10292. "description": "Remove an existing workspace.",
  10293. "summary": "Remove workspace",
  10294. "x-codeSamples": [
  10295. {
  10296. "lang": "js",
  10297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10298. }
  10299. ]
  10300. }
  10301. },
  10302. "/experimental/workspace/warp": {
  10303. "post": {
  10304. "tags": ["workspace"],
  10305. "operationId": "experimental.workspace.warp",
  10306. "parameters": [
  10307. {
  10308. "name": "directory",
  10309. "in": "query",
  10310. "schema": {
  10311. "type": "string"
  10312. },
  10313. "required": false
  10314. },
  10315. {
  10316. "name": "workspace",
  10317. "in": "query",
  10318. "schema": {
  10319. "type": "string"
  10320. },
  10321. "required": false
  10322. }
  10323. ],
  10324. "responses": {
  10325. "204": {
  10326. "description": "Session warped"
  10327. },
  10328. "400": {
  10329. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "anyOf": [
  10334. {
  10335. "$ref": "#/components/schemas/WorkspaceWarpError"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/VcsApplyError"
  10339. },
  10340. {
  10341. "$ref": "#/components/schemas/InvalidRequestError"
  10342. }
  10343. ]
  10344. }
  10345. }
  10346. }
  10347. },
  10348. "404": {
  10349. "description": "NotFoundError",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/NotFoundError"
  10354. }
  10355. }
  10356. }
  10357. }
  10358. },
  10359. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10360. "summary": "Warp session into workspace",
  10361. "requestBody": {
  10362. "content": {
  10363. "application/json": {
  10364. "schema": {
  10365. "type": "object",
  10366. "properties": {
  10367. "id": {
  10368. "anyOf": [
  10369. {
  10370. "type": "string",
  10371. "pattern": "^wrk"
  10372. },
  10373. {
  10374. "type": "null"
  10375. }
  10376. ]
  10377. },
  10378. "sessionID": {
  10379. "type": "string",
  10380. "pattern": "^ses"
  10381. },
  10382. "copyChanges": {
  10383. "type": "boolean"
  10384. }
  10385. },
  10386. "required": ["id", "sessionID"],
  10387. "additionalProperties": false
  10388. }
  10389. }
  10390. }
  10391. },
  10392. "x-codeSamples": [
  10393. {
  10394. "lang": "js",
  10395. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10396. }
  10397. ]
  10398. }
  10399. },
  10400. "/pty/{ptyID}/connect": {
  10401. "get": {
  10402. "tags": ["pty"],
  10403. "operationId": "pty.connect",
  10404. "parameters": [
  10405. {
  10406. "name": "ptyID",
  10407. "in": "path",
  10408. "schema": {
  10409. "type": "string",
  10410. "pattern": "^pty"
  10411. },
  10412. "required": true
  10413. },
  10414. {
  10415. "in": "query",
  10416. "name": "directory",
  10417. "schema": {
  10418. "type": "string"
  10419. }
  10420. },
  10421. {
  10422. "in": "query",
  10423. "name": "workspace",
  10424. "schema": {
  10425. "type": "string"
  10426. }
  10427. },
  10428. {
  10429. "in": "query",
  10430. "name": "cursor",
  10431. "schema": {
  10432. "type": "string"
  10433. }
  10434. },
  10435. {
  10436. "in": "query",
  10437. "name": "ticket",
  10438. "schema": {
  10439. "type": "string"
  10440. }
  10441. }
  10442. ],
  10443. "responses": {
  10444. "200": {
  10445. "description": "Connected session",
  10446. "content": {
  10447. "application/json": {
  10448. "schema": {
  10449. "type": "boolean",
  10450. "description": "Connected session"
  10451. }
  10452. }
  10453. }
  10454. },
  10455. "403": {
  10456. "description": "Forbidden",
  10457. "content": {
  10458. "application/json": {
  10459. "schema": {
  10460. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10461. }
  10462. }
  10463. }
  10464. },
  10465. "404": {
  10466. "description": "Not found",
  10467. "content": {
  10468. "application/json": {
  10469. "schema": {
  10470. "$ref": "#/components/schemas/NotFoundError"
  10471. }
  10472. }
  10473. }
  10474. }
  10475. },
  10476. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10477. "summary": "Connect to PTY session",
  10478. "x-codeSamples": [
  10479. {
  10480. "lang": "js",
  10481. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10482. }
  10483. ]
  10484. }
  10485. }
  10486. },
  10487. "components": {
  10488. "schemas": {
  10489. "Event": {
  10490. "anyOf": [
  10491. {
  10492. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10493. },
  10494. {
  10495. "$ref": "#/components/schemas/EventPluginAdded"
  10496. },
  10497. {
  10498. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10499. },
  10500. {
  10501. "$ref": "#/components/schemas/EventFileEdited"
  10502. },
  10503. {
  10504. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10505. },
  10506. {
  10507. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10508. },
  10509. {
  10510. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10511. },
  10512. {
  10513. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10514. },
  10515. {
  10516. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10517. },
  10518. {
  10519. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10523. },
  10524. {
  10525. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10526. },
  10527. {
  10528. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10529. },
  10530. {
  10531. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10532. },
  10533. {
  10534. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10535. },
  10536. {
  10537. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10538. },
  10539. {
  10540. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10541. },
  10542. {
  10543. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10544. },
  10545. {
  10546. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10547. },
  10548. {
  10549. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10550. },
  10551. {
  10552. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10553. },
  10554. {
  10555. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10556. },
  10557. {
  10558. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10559. },
  10560. {
  10561. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10562. },
  10563. {
  10564. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/EventSessionNextRetried"
  10571. },
  10572. {
  10573. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10574. },
  10575. {
  10576. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10577. },
  10578. {
  10579. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10580. },
  10581. {
  10582. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10583. },
  10584. {
  10585. "$ref": "#/components/schemas/EventSessionCreated"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/EventSessionUpdated"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/EventSessionDeleted"
  10592. },
  10593. {
  10594. "$ref": "#/components/schemas/EventMessageUpdated"
  10595. },
  10596. {
  10597. "$ref": "#/components/schemas/EventMessageRemoved"
  10598. },
  10599. {
  10600. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10601. },
  10602. {
  10603. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10604. },
  10605. {
  10606. "$ref": "#/components/schemas/EventMessagePartDelta"
  10607. },
  10608. {
  10609. "$ref": "#/components/schemas/EventPermissionAsked"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/EventPermissionReplied"
  10613. },
  10614. {
  10615. "$ref": "#/components/schemas/EventSessionDiff"
  10616. },
  10617. {
  10618. "$ref": "#/components/schemas/EventSessionError"
  10619. },
  10620. {
  10621. "$ref": "#/components/schemas/EventQuestionAsked"
  10622. },
  10623. {
  10624. "$ref": "#/components/schemas/EventQuestionReplied"
  10625. },
  10626. {
  10627. "$ref": "#/components/schemas/EventQuestionRejected"
  10628. },
  10629. {
  10630. "$ref": "#/components/schemas/EventTodoUpdated"
  10631. },
  10632. {
  10633. "$ref": "#/components/schemas/EventSessionStatus"
  10634. },
  10635. {
  10636. "$ref": "#/components/schemas/EventSessionIdle"
  10637. },
  10638. {
  10639. "$ref": "#/components/schemas/EventSessionCompacted"
  10640. },
  10641. {
  10642. "$ref": "#/components/schemas/EventLspUpdated"
  10643. },
  10644. {
  10645. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10646. },
  10647. {
  10648. "$ref": "#/components/schemas/Event.tui.command.execute"
  10649. },
  10650. {
  10651. "$ref": "#/components/schemas/Event.tui.toast.show"
  10652. },
  10653. {
  10654. "$ref": "#/components/schemas/Event.tui.session.select"
  10655. },
  10656. {
  10657. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10658. },
  10659. {
  10660. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10661. },
  10662. {
  10663. "$ref": "#/components/schemas/EventCommandExecuted"
  10664. },
  10665. {
  10666. "$ref": "#/components/schemas/EventProjectUpdated"
  10667. },
  10668. {
  10669. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/EventWorkspaceReady"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10676. },
  10677. {
  10678. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/EventWorktreeReady"
  10682. },
  10683. {
  10684. "$ref": "#/components/schemas/EventWorktreeFailed"
  10685. },
  10686. {
  10687. "$ref": "#/components/schemas/EventPtyCreated"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/EventPtyUpdated"
  10691. },
  10692. {
  10693. "$ref": "#/components/schemas/EventPtyExited"
  10694. },
  10695. {
  10696. "$ref": "#/components/schemas/EventPtyDeleted"
  10697. },
  10698. {
  10699. "$ref": "#/components/schemas/EventInstallationUpdated"
  10700. },
  10701. {
  10702. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10703. },
  10704. {
  10705. "$ref": "#/components/schemas/EventServerConnected"
  10706. },
  10707. {
  10708. "$ref": "#/components/schemas/EventGlobalDisposed"
  10709. },
  10710. {
  10711. "$ref": "#/components/schemas/EventAccountAdded"
  10712. },
  10713. {
  10714. "$ref": "#/components/schemas/EventAccountRemoved"
  10715. },
  10716. {
  10717. "$ref": "#/components/schemas/EventAccountSwitched"
  10718. }
  10719. ]
  10720. },
  10721. "OAuth": {
  10722. "type": "object",
  10723. "properties": {
  10724. "type": {
  10725. "type": "string",
  10726. "enum": ["oauth"]
  10727. },
  10728. "refresh": {
  10729. "type": "string"
  10730. },
  10731. "access": {
  10732. "type": "string"
  10733. },
  10734. "expires": {
  10735. "type": "integer",
  10736. "minimum": 0
  10737. },
  10738. "accountId": {
  10739. "type": "string"
  10740. },
  10741. "enterpriseUrl": {
  10742. "type": "string"
  10743. }
  10744. },
  10745. "required": ["type", "refresh", "access", "expires"],
  10746. "additionalProperties": false
  10747. },
  10748. "ApiAuth": {
  10749. "type": "object",
  10750. "properties": {
  10751. "type": {
  10752. "type": "string",
  10753. "enum": ["api"]
  10754. },
  10755. "key": {
  10756. "type": "string"
  10757. },
  10758. "metadata": {
  10759. "type": "object",
  10760. "additionalProperties": {
  10761. "type": "string"
  10762. }
  10763. }
  10764. },
  10765. "required": ["type", "key"],
  10766. "additionalProperties": false
  10767. },
  10768. "WellKnownAuth": {
  10769. "type": "object",
  10770. "properties": {
  10771. "type": {
  10772. "type": "string",
  10773. "enum": ["wellknown"]
  10774. },
  10775. "key": {
  10776. "type": "string"
  10777. },
  10778. "token": {
  10779. "type": "string"
  10780. }
  10781. },
  10782. "required": ["type", "key", "token"],
  10783. "additionalProperties": false
  10784. },
  10785. "Auth": {
  10786. "anyOf": [
  10787. {
  10788. "$ref": "#/components/schemas/OAuth"
  10789. },
  10790. {
  10791. "$ref": "#/components/schemas/ApiAuth"
  10792. },
  10793. {
  10794. "$ref": "#/components/schemas/WellKnownAuth"
  10795. }
  10796. ]
  10797. },
  10798. "effect_HttpApiError_BadRequest": {
  10799. "type": "object",
  10800. "properties": {
  10801. "_tag": {
  10802. "type": "string",
  10803. "enum": ["BadRequest"]
  10804. }
  10805. },
  10806. "required": ["_tag"],
  10807. "additionalProperties": false
  10808. },
  10809. "InvalidRequestError": {
  10810. "type": "object",
  10811. "properties": {
  10812. "_tag": {
  10813. "type": "string",
  10814. "enum": ["InvalidRequestError"]
  10815. },
  10816. "message": {
  10817. "type": "string"
  10818. },
  10819. "kind": {
  10820. "type": "string"
  10821. },
  10822. "field": {
  10823. "type": "string"
  10824. }
  10825. },
  10826. "required": ["_tag", "message"],
  10827. "additionalProperties": false
  10828. },
  10829. "Prompt": {
  10830. "type": "object",
  10831. "properties": {
  10832. "text": {
  10833. "type": "string"
  10834. },
  10835. "files": {
  10836. "type": "array",
  10837. "items": {
  10838. "$ref": "#/components/schemas/PromptFileAttachment"
  10839. }
  10840. },
  10841. "agents": {
  10842. "type": "array",
  10843. "items": {
  10844. "$ref": "#/components/schemas/PromptAgentAttachment"
  10845. }
  10846. },
  10847. "references": {
  10848. "type": "array",
  10849. "items": {
  10850. "$ref": "#/components/schemas/PromptReferenceAttachment"
  10851. }
  10852. }
  10853. },
  10854. "required": ["text"],
  10855. "additionalProperties": false
  10856. },
  10857. "SnapshotFileDiff": {
  10858. "type": "object",
  10859. "properties": {
  10860. "file": {
  10861. "type": "string"
  10862. },
  10863. "patch": {
  10864. "type": "string"
  10865. },
  10866. "additions": {
  10867. "type": "number"
  10868. },
  10869. "deletions": {
  10870. "type": "number"
  10871. },
  10872. "status": {
  10873. "type": "string",
  10874. "enum": ["added", "deleted", "modified"]
  10875. }
  10876. },
  10877. "required": ["additions", "deletions"],
  10878. "additionalProperties": false
  10879. },
  10880. "Session": {
  10881. "type": "object",
  10882. "properties": {
  10883. "id": {
  10884. "type": "string",
  10885. "pattern": "^ses"
  10886. },
  10887. "slug": {
  10888. "type": "string"
  10889. },
  10890. "projectID": {
  10891. "type": "string"
  10892. },
  10893. "workspaceID": {
  10894. "type": "string",
  10895. "pattern": "^wrk"
  10896. },
  10897. "directory": {
  10898. "type": "string"
  10899. },
  10900. "path": {
  10901. "type": "string"
  10902. },
  10903. "parentID": {
  10904. "type": "string",
  10905. "pattern": "^ses"
  10906. },
  10907. "summary": {
  10908. "type": "object",
  10909. "properties": {
  10910. "additions": {
  10911. "type": "number"
  10912. },
  10913. "deletions": {
  10914. "type": "number"
  10915. },
  10916. "files": {
  10917. "type": "number"
  10918. },
  10919. "diffs": {
  10920. "type": "array",
  10921. "items": {
  10922. "$ref": "#/components/schemas/SnapshotFileDiff"
  10923. }
  10924. }
  10925. },
  10926. "required": ["additions", "deletions", "files"],
  10927. "additionalProperties": false
  10928. },
  10929. "cost": {
  10930. "type": "number"
  10931. },
  10932. "tokens": {
  10933. "type": "object",
  10934. "properties": {
  10935. "input": {
  10936. "type": "number"
  10937. },
  10938. "output": {
  10939. "type": "number"
  10940. },
  10941. "reasoning": {
  10942. "type": "number"
  10943. },
  10944. "cache": {
  10945. "type": "object",
  10946. "properties": {
  10947. "read": {
  10948. "type": "number"
  10949. },
  10950. "write": {
  10951. "type": "number"
  10952. }
  10953. },
  10954. "required": ["read", "write"],
  10955. "additionalProperties": false
  10956. }
  10957. },
  10958. "required": ["input", "output", "reasoning", "cache"],
  10959. "additionalProperties": false
  10960. },
  10961. "share": {
  10962. "type": "object",
  10963. "properties": {
  10964. "url": {
  10965. "type": "string"
  10966. }
  10967. },
  10968. "required": ["url"],
  10969. "additionalProperties": false
  10970. },
  10971. "title": {
  10972. "type": "string"
  10973. },
  10974. "agent": {
  10975. "type": "string"
  10976. },
  10977. "model": {
  10978. "type": "object",
  10979. "properties": {
  10980. "id": {
  10981. "type": "string"
  10982. },
  10983. "providerID": {
  10984. "type": "string"
  10985. },
  10986. "variant": {
  10987. "type": "string"
  10988. }
  10989. },
  10990. "required": ["id", "providerID"],
  10991. "additionalProperties": false
  10992. },
  10993. "version": {
  10994. "type": "string"
  10995. },
  10996. "metadata": {
  10997. "type": "object"
  10998. },
  10999. "time": {
  11000. "type": "object",
  11001. "properties": {
  11002. "created": {
  11003. "type": "integer",
  11004. "minimum": 0
  11005. },
  11006. "updated": {
  11007. "type": "integer",
  11008. "minimum": 0
  11009. },
  11010. "compacting": {
  11011. "type": "integer",
  11012. "minimum": 0
  11013. },
  11014. "archived": {
  11015. "type": "number"
  11016. }
  11017. },
  11018. "required": ["created", "updated"],
  11019. "additionalProperties": false
  11020. },
  11021. "permission": {
  11022. "$ref": "#/components/schemas/PermissionV2Ruleset"
  11023. },
  11024. "revert": {
  11025. "type": "object",
  11026. "properties": {
  11027. "messageID": {
  11028. "type": "string",
  11029. "pattern": "^msg"
  11030. },
  11031. "partID": {
  11032. "type": "string",
  11033. "pattern": "^prt"
  11034. },
  11035. "snapshot": {
  11036. "type": "string"
  11037. },
  11038. "diff": {
  11039. "type": "string"
  11040. }
  11041. },
  11042. "required": ["messageID"],
  11043. "additionalProperties": false
  11044. }
  11045. },
  11046. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11047. "additionalProperties": false
  11048. },
  11049. "OutputFormatText": {
  11050. "type": "object",
  11051. "properties": {
  11052. "type": {
  11053. "type": "string",
  11054. "enum": ["text"]
  11055. }
  11056. },
  11057. "required": ["type"],
  11058. "additionalProperties": false
  11059. },
  11060. "JSONSchema": {
  11061. "type": "object"
  11062. },
  11063. "OutputFormatJsonSchema": {
  11064. "type": "object",
  11065. "properties": {
  11066. "type": {
  11067. "type": "string",
  11068. "enum": ["json_schema"]
  11069. },
  11070. "schema": {
  11071. "$ref": "#/components/schemas/JSONSchema"
  11072. },
  11073. "retryCount": {
  11074. "type": "integer",
  11075. "minimum": 0
  11076. }
  11077. },
  11078. "required": ["type", "schema"],
  11079. "additionalProperties": false
  11080. },
  11081. "OutputFormat": {
  11082. "anyOf": [
  11083. {
  11084. "$ref": "#/components/schemas/OutputFormatText"
  11085. },
  11086. {
  11087. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11088. }
  11089. ]
  11090. },
  11091. "UserMessage": {
  11092. "type": "object",
  11093. "properties": {
  11094. "id": {
  11095. "type": "string",
  11096. "pattern": "^msg"
  11097. },
  11098. "sessionID": {
  11099. "type": "string",
  11100. "pattern": "^ses"
  11101. },
  11102. "role": {
  11103. "type": "string",
  11104. "enum": ["user"]
  11105. },
  11106. "time": {
  11107. "type": "object",
  11108. "properties": {
  11109. "created": {
  11110. "type": "integer",
  11111. "minimum": 0
  11112. }
  11113. },
  11114. "required": ["created"],
  11115. "additionalProperties": false
  11116. },
  11117. "format": {
  11118. "$ref": "#/components/schemas/OutputFormat"
  11119. },
  11120. "summary": {
  11121. "type": "object",
  11122. "properties": {
  11123. "title": {
  11124. "type": "string"
  11125. },
  11126. "body": {
  11127. "type": "string"
  11128. },
  11129. "diffs": {
  11130. "type": "array",
  11131. "items": {
  11132. "$ref": "#/components/schemas/SnapshotFileDiff"
  11133. }
  11134. }
  11135. },
  11136. "required": ["diffs"],
  11137. "additionalProperties": false
  11138. },
  11139. "agent": {
  11140. "type": "string"
  11141. },
  11142. "model": {
  11143. "type": "object",
  11144. "properties": {
  11145. "providerID": {
  11146. "type": "string"
  11147. },
  11148. "modelID": {
  11149. "type": "string"
  11150. },
  11151. "variant": {
  11152. "type": "string"
  11153. }
  11154. },
  11155. "required": ["providerID", "modelID"],
  11156. "additionalProperties": false
  11157. },
  11158. "system": {
  11159. "type": "string"
  11160. },
  11161. "tools": {
  11162. "type": "object",
  11163. "additionalProperties": {
  11164. "type": "boolean"
  11165. }
  11166. }
  11167. },
  11168. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11169. "additionalProperties": false
  11170. },
  11171. "ProviderAuthError": {
  11172. "type": "object",
  11173. "properties": {
  11174. "name": {
  11175. "type": "string",
  11176. "enum": ["ProviderAuthError"]
  11177. },
  11178. "data": {
  11179. "type": "object",
  11180. "properties": {
  11181. "providerID": {
  11182. "type": "string"
  11183. },
  11184. "message": {
  11185. "type": "string"
  11186. }
  11187. },
  11188. "required": ["providerID", "message"],
  11189. "additionalProperties": false
  11190. }
  11191. },
  11192. "required": ["name", "data"],
  11193. "additionalProperties": false
  11194. },
  11195. "UnknownError": {
  11196. "type": "object",
  11197. "properties": {
  11198. "name": {
  11199. "type": "string",
  11200. "enum": ["UnknownError"]
  11201. },
  11202. "data": {
  11203. "type": "object",
  11204. "properties": {
  11205. "message": {
  11206. "type": "string"
  11207. },
  11208. "ref": {
  11209. "type": "string"
  11210. }
  11211. },
  11212. "required": ["message"],
  11213. "additionalProperties": false
  11214. }
  11215. },
  11216. "required": ["name", "data"],
  11217. "additionalProperties": false
  11218. },
  11219. "MessageOutputLengthError": {
  11220. "type": "object",
  11221. "properties": {
  11222. "name": {
  11223. "type": "string",
  11224. "enum": ["MessageOutputLengthError"]
  11225. },
  11226. "data": {
  11227. "type": "object",
  11228. "properties": {}
  11229. }
  11230. },
  11231. "required": ["name", "data"],
  11232. "additionalProperties": false
  11233. },
  11234. "MessageAbortedError": {
  11235. "type": "object",
  11236. "properties": {
  11237. "name": {
  11238. "type": "string",
  11239. "enum": ["MessageAbortedError"]
  11240. },
  11241. "data": {
  11242. "type": "object",
  11243. "properties": {
  11244. "message": {
  11245. "type": "string"
  11246. }
  11247. },
  11248. "required": ["message"],
  11249. "additionalProperties": false
  11250. }
  11251. },
  11252. "required": ["name", "data"],
  11253. "additionalProperties": false
  11254. },
  11255. "StructuredOutputError": {
  11256. "type": "object",
  11257. "properties": {
  11258. "name": {
  11259. "type": "string",
  11260. "enum": ["StructuredOutputError"]
  11261. },
  11262. "data": {
  11263. "type": "object",
  11264. "properties": {
  11265. "message": {
  11266. "type": "string"
  11267. },
  11268. "retries": {
  11269. "type": "integer",
  11270. "minimum": 0
  11271. }
  11272. },
  11273. "required": ["message", "retries"],
  11274. "additionalProperties": false
  11275. }
  11276. },
  11277. "required": ["name", "data"],
  11278. "additionalProperties": false
  11279. },
  11280. "ContextOverflowError": {
  11281. "type": "object",
  11282. "properties": {
  11283. "name": {
  11284. "type": "string",
  11285. "enum": ["ContextOverflowError"]
  11286. },
  11287. "data": {
  11288. "type": "object",
  11289. "properties": {
  11290. "message": {
  11291. "type": "string"
  11292. },
  11293. "responseBody": {
  11294. "type": "string"
  11295. }
  11296. },
  11297. "required": ["message"],
  11298. "additionalProperties": false
  11299. }
  11300. },
  11301. "required": ["name", "data"],
  11302. "additionalProperties": false
  11303. },
  11304. "APIError": {
  11305. "type": "object",
  11306. "properties": {
  11307. "name": {
  11308. "type": "string",
  11309. "enum": ["APIError"]
  11310. },
  11311. "data": {
  11312. "type": "object",
  11313. "properties": {
  11314. "message": {
  11315. "type": "string"
  11316. },
  11317. "statusCode": {
  11318. "type": "integer",
  11319. "minimum": 0
  11320. },
  11321. "isRetryable": {
  11322. "type": "boolean"
  11323. },
  11324. "responseHeaders": {
  11325. "type": "object",
  11326. "additionalProperties": {
  11327. "type": "string"
  11328. }
  11329. },
  11330. "responseBody": {
  11331. "type": "string"
  11332. },
  11333. "metadata": {
  11334. "type": "object",
  11335. "additionalProperties": {
  11336. "type": "string"
  11337. }
  11338. }
  11339. },
  11340. "required": ["message", "isRetryable"],
  11341. "additionalProperties": false
  11342. }
  11343. },
  11344. "required": ["name", "data"],
  11345. "additionalProperties": false
  11346. },
  11347. "AssistantMessage": {
  11348. "type": "object",
  11349. "properties": {
  11350. "id": {
  11351. "type": "string",
  11352. "pattern": "^msg"
  11353. },
  11354. "sessionID": {
  11355. "type": "string",
  11356. "pattern": "^ses"
  11357. },
  11358. "role": {
  11359. "type": "string",
  11360. "enum": ["assistant"]
  11361. },
  11362. "time": {
  11363. "type": "object",
  11364. "properties": {
  11365. "created": {
  11366. "type": "integer",
  11367. "minimum": 0
  11368. },
  11369. "completed": {
  11370. "type": "integer",
  11371. "minimum": 0
  11372. }
  11373. },
  11374. "required": ["created"],
  11375. "additionalProperties": false
  11376. },
  11377. "error": {
  11378. "anyOf": [
  11379. {
  11380. "$ref": "#/components/schemas/ProviderAuthError"
  11381. },
  11382. {
  11383. "$ref": "#/components/schemas/UnknownError"
  11384. },
  11385. {
  11386. "$ref": "#/components/schemas/MessageOutputLengthError"
  11387. },
  11388. {
  11389. "$ref": "#/components/schemas/MessageAbortedError"
  11390. },
  11391. {
  11392. "$ref": "#/components/schemas/StructuredOutputError"
  11393. },
  11394. {
  11395. "$ref": "#/components/schemas/ContextOverflowError"
  11396. },
  11397. {
  11398. "$ref": "#/components/schemas/APIError"
  11399. }
  11400. ]
  11401. },
  11402. "parentID": {
  11403. "type": "string",
  11404. "pattern": "^msg"
  11405. },
  11406. "modelID": {
  11407. "type": "string"
  11408. },
  11409. "providerID": {
  11410. "type": "string"
  11411. },
  11412. "mode": {
  11413. "type": "string"
  11414. },
  11415. "agent": {
  11416. "type": "string"
  11417. },
  11418. "path": {
  11419. "type": "object",
  11420. "properties": {
  11421. "cwd": {
  11422. "type": "string"
  11423. },
  11424. "root": {
  11425. "type": "string"
  11426. }
  11427. },
  11428. "required": ["cwd", "root"],
  11429. "additionalProperties": false
  11430. },
  11431. "summary": {
  11432. "type": "boolean"
  11433. },
  11434. "cost": {
  11435. "type": "number"
  11436. },
  11437. "tokens": {
  11438. "type": "object",
  11439. "properties": {
  11440. "total": {
  11441. "type": "number"
  11442. },
  11443. "input": {
  11444. "type": "number"
  11445. },
  11446. "output": {
  11447. "type": "number"
  11448. },
  11449. "reasoning": {
  11450. "type": "number"
  11451. },
  11452. "cache": {
  11453. "type": "object",
  11454. "properties": {
  11455. "read": {
  11456. "type": "number"
  11457. },
  11458. "write": {
  11459. "type": "number"
  11460. }
  11461. },
  11462. "required": ["read", "write"],
  11463. "additionalProperties": false
  11464. }
  11465. },
  11466. "required": ["input", "output", "reasoning", "cache"],
  11467. "additionalProperties": false
  11468. },
  11469. "structured": {},
  11470. "variant": {
  11471. "type": "string"
  11472. },
  11473. "finish": {
  11474. "type": "string"
  11475. }
  11476. },
  11477. "required": [
  11478. "id",
  11479. "sessionID",
  11480. "role",
  11481. "time",
  11482. "parentID",
  11483. "modelID",
  11484. "providerID",
  11485. "mode",
  11486. "agent",
  11487. "path",
  11488. "cost",
  11489. "tokens"
  11490. ],
  11491. "additionalProperties": false
  11492. },
  11493. "Message": {
  11494. "anyOf": [
  11495. {
  11496. "$ref": "#/components/schemas/UserMessage"
  11497. },
  11498. {
  11499. "$ref": "#/components/schemas/AssistantMessage"
  11500. }
  11501. ]
  11502. },
  11503. "TextPart": {
  11504. "type": "object",
  11505. "properties": {
  11506. "id": {
  11507. "type": "string",
  11508. "pattern": "^prt"
  11509. },
  11510. "sessionID": {
  11511. "type": "string",
  11512. "pattern": "^ses"
  11513. },
  11514. "messageID": {
  11515. "type": "string",
  11516. "pattern": "^msg"
  11517. },
  11518. "type": {
  11519. "type": "string",
  11520. "enum": ["text"]
  11521. },
  11522. "text": {
  11523. "type": "string"
  11524. },
  11525. "synthetic": {
  11526. "type": "boolean"
  11527. },
  11528. "ignored": {
  11529. "type": "boolean"
  11530. },
  11531. "time": {
  11532. "type": "object",
  11533. "properties": {
  11534. "start": {
  11535. "type": "integer",
  11536. "minimum": 0
  11537. },
  11538. "end": {
  11539. "type": "integer",
  11540. "minimum": 0
  11541. }
  11542. },
  11543. "required": ["start"],
  11544. "additionalProperties": false
  11545. },
  11546. "metadata": {
  11547. "type": "object"
  11548. }
  11549. },
  11550. "required": ["id", "sessionID", "messageID", "type", "text"],
  11551. "additionalProperties": false
  11552. },
  11553. "SubtaskPart": {
  11554. "type": "object",
  11555. "properties": {
  11556. "id": {
  11557. "type": "string",
  11558. "pattern": "^prt"
  11559. },
  11560. "sessionID": {
  11561. "type": "string",
  11562. "pattern": "^ses"
  11563. },
  11564. "messageID": {
  11565. "type": "string",
  11566. "pattern": "^msg"
  11567. },
  11568. "type": {
  11569. "type": "string",
  11570. "enum": ["subtask"]
  11571. },
  11572. "prompt": {
  11573. "type": "string"
  11574. },
  11575. "description": {
  11576. "type": "string"
  11577. },
  11578. "agent": {
  11579. "type": "string"
  11580. },
  11581. "model": {
  11582. "type": "object",
  11583. "properties": {
  11584. "providerID": {
  11585. "type": "string"
  11586. },
  11587. "modelID": {
  11588. "type": "string"
  11589. }
  11590. },
  11591. "required": ["providerID", "modelID"],
  11592. "additionalProperties": false
  11593. },
  11594. "command": {
  11595. "type": "string"
  11596. }
  11597. },
  11598. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11599. "additionalProperties": false
  11600. },
  11601. "ReasoningPart": {
  11602. "type": "object",
  11603. "properties": {
  11604. "id": {
  11605. "type": "string",
  11606. "pattern": "^prt"
  11607. },
  11608. "sessionID": {
  11609. "type": "string",
  11610. "pattern": "^ses"
  11611. },
  11612. "messageID": {
  11613. "type": "string",
  11614. "pattern": "^msg"
  11615. },
  11616. "type": {
  11617. "type": "string",
  11618. "enum": ["reasoning"]
  11619. },
  11620. "text": {
  11621. "type": "string"
  11622. },
  11623. "metadata": {
  11624. "type": "object"
  11625. },
  11626. "time": {
  11627. "type": "object",
  11628. "properties": {
  11629. "start": {
  11630. "type": "integer",
  11631. "minimum": 0
  11632. },
  11633. "end": {
  11634. "type": "integer",
  11635. "minimum": 0
  11636. }
  11637. },
  11638. "required": ["start"],
  11639. "additionalProperties": false
  11640. }
  11641. },
  11642. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11643. "additionalProperties": false
  11644. },
  11645. "FilePartSourceText": {
  11646. "type": "object",
  11647. "properties": {
  11648. "value": {
  11649. "type": "string"
  11650. },
  11651. "start": {
  11652. "type": "number"
  11653. },
  11654. "end": {
  11655. "type": "number"
  11656. }
  11657. },
  11658. "required": ["value", "start", "end"],
  11659. "additionalProperties": false
  11660. },
  11661. "FileSource": {
  11662. "type": "object",
  11663. "properties": {
  11664. "text": {
  11665. "$ref": "#/components/schemas/FilePartSourceText"
  11666. },
  11667. "type": {
  11668. "type": "string",
  11669. "enum": ["file"]
  11670. },
  11671. "path": {
  11672. "type": "string"
  11673. }
  11674. },
  11675. "required": ["text", "type", "path"],
  11676. "additionalProperties": false
  11677. },
  11678. "Range": {
  11679. "type": "object",
  11680. "properties": {
  11681. "start": {
  11682. "type": "object",
  11683. "properties": {
  11684. "line": {
  11685. "type": "integer",
  11686. "minimum": 0
  11687. },
  11688. "character": {
  11689. "type": "integer",
  11690. "minimum": 0
  11691. }
  11692. },
  11693. "required": ["line", "character"],
  11694. "additionalProperties": false
  11695. },
  11696. "end": {
  11697. "type": "object",
  11698. "properties": {
  11699. "line": {
  11700. "type": "integer",
  11701. "minimum": 0
  11702. },
  11703. "character": {
  11704. "type": "integer",
  11705. "minimum": 0
  11706. }
  11707. },
  11708. "required": ["line", "character"],
  11709. "additionalProperties": false
  11710. }
  11711. },
  11712. "required": ["start", "end"],
  11713. "additionalProperties": false
  11714. },
  11715. "SymbolSource": {
  11716. "type": "object",
  11717. "properties": {
  11718. "text": {
  11719. "$ref": "#/components/schemas/FilePartSourceText"
  11720. },
  11721. "type": {
  11722. "type": "string",
  11723. "enum": ["symbol"]
  11724. },
  11725. "path": {
  11726. "type": "string"
  11727. },
  11728. "range": {
  11729. "$ref": "#/components/schemas/Range"
  11730. },
  11731. "name": {
  11732. "type": "string"
  11733. },
  11734. "kind": {
  11735. "type": "integer",
  11736. "minimum": 0
  11737. }
  11738. },
  11739. "required": ["text", "type", "path", "range", "name", "kind"],
  11740. "additionalProperties": false
  11741. },
  11742. "ResourceSource": {
  11743. "type": "object",
  11744. "properties": {
  11745. "text": {
  11746. "$ref": "#/components/schemas/FilePartSourceText"
  11747. },
  11748. "type": {
  11749. "type": "string",
  11750. "enum": ["resource"]
  11751. },
  11752. "clientName": {
  11753. "type": "string"
  11754. },
  11755. "uri": {
  11756. "type": "string"
  11757. }
  11758. },
  11759. "required": ["text", "type", "clientName", "uri"],
  11760. "additionalProperties": false
  11761. },
  11762. "FilePartSource": {
  11763. "anyOf": [
  11764. {
  11765. "$ref": "#/components/schemas/FileSource"
  11766. },
  11767. {
  11768. "$ref": "#/components/schemas/SymbolSource"
  11769. },
  11770. {
  11771. "$ref": "#/components/schemas/ResourceSource"
  11772. }
  11773. ]
  11774. },
  11775. "FilePart": {
  11776. "type": "object",
  11777. "properties": {
  11778. "id": {
  11779. "type": "string",
  11780. "pattern": "^prt"
  11781. },
  11782. "sessionID": {
  11783. "type": "string",
  11784. "pattern": "^ses"
  11785. },
  11786. "messageID": {
  11787. "type": "string",
  11788. "pattern": "^msg"
  11789. },
  11790. "type": {
  11791. "type": "string",
  11792. "enum": ["file"]
  11793. },
  11794. "mime": {
  11795. "type": "string"
  11796. },
  11797. "filename": {
  11798. "type": "string"
  11799. },
  11800. "url": {
  11801. "type": "string"
  11802. },
  11803. "source": {
  11804. "$ref": "#/components/schemas/FilePartSource"
  11805. }
  11806. },
  11807. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  11808. "additionalProperties": false
  11809. },
  11810. "ToolStatePending": {
  11811. "type": "object",
  11812. "properties": {
  11813. "status": {
  11814. "type": "string",
  11815. "enum": ["pending"]
  11816. },
  11817. "input": {
  11818. "type": "object"
  11819. },
  11820. "raw": {
  11821. "type": "string"
  11822. }
  11823. },
  11824. "required": ["status", "input", "raw"],
  11825. "additionalProperties": false
  11826. },
  11827. "ToolStateRunning": {
  11828. "type": "object",
  11829. "properties": {
  11830. "status": {
  11831. "type": "string",
  11832. "enum": ["running"]
  11833. },
  11834. "input": {
  11835. "type": "object"
  11836. },
  11837. "title": {
  11838. "type": "string"
  11839. },
  11840. "metadata": {
  11841. "type": "object"
  11842. },
  11843. "time": {
  11844. "type": "object",
  11845. "properties": {
  11846. "start": {
  11847. "type": "integer",
  11848. "minimum": 0
  11849. }
  11850. },
  11851. "required": ["start"],
  11852. "additionalProperties": false
  11853. }
  11854. },
  11855. "required": ["status", "input", "time"],
  11856. "additionalProperties": false
  11857. },
  11858. "ToolStateCompleted": {
  11859. "type": "object",
  11860. "properties": {
  11861. "status": {
  11862. "type": "string",
  11863. "enum": ["completed"]
  11864. },
  11865. "input": {
  11866. "type": "object"
  11867. },
  11868. "output": {
  11869. "type": "string"
  11870. },
  11871. "title": {
  11872. "type": "string"
  11873. },
  11874. "metadata": {
  11875. "type": "object"
  11876. },
  11877. "time": {
  11878. "type": "object",
  11879. "properties": {
  11880. "start": {
  11881. "type": "integer",
  11882. "minimum": 0
  11883. },
  11884. "end": {
  11885. "type": "integer",
  11886. "minimum": 0
  11887. },
  11888. "compacted": {
  11889. "type": "integer",
  11890. "minimum": 0
  11891. }
  11892. },
  11893. "required": ["start", "end"],
  11894. "additionalProperties": false
  11895. },
  11896. "attachments": {
  11897. "type": "array",
  11898. "items": {
  11899. "$ref": "#/components/schemas/FilePart"
  11900. }
  11901. }
  11902. },
  11903. "required": ["status", "input", "output", "title", "metadata", "time"],
  11904. "additionalProperties": false
  11905. },
  11906. "ToolStateError": {
  11907. "type": "object",
  11908. "properties": {
  11909. "status": {
  11910. "type": "string",
  11911. "enum": ["error"]
  11912. },
  11913. "input": {
  11914. "type": "object"
  11915. },
  11916. "error": {
  11917. "type": "string"
  11918. },
  11919. "metadata": {
  11920. "type": "object"
  11921. },
  11922. "time": {
  11923. "type": "object",
  11924. "properties": {
  11925. "start": {
  11926. "type": "integer",
  11927. "minimum": 0
  11928. },
  11929. "end": {
  11930. "type": "integer",
  11931. "minimum": 0
  11932. }
  11933. },
  11934. "required": ["start", "end"],
  11935. "additionalProperties": false
  11936. }
  11937. },
  11938. "required": ["status", "input", "error", "time"],
  11939. "additionalProperties": false
  11940. },
  11941. "ToolState": {
  11942. "anyOf": [
  11943. {
  11944. "$ref": "#/components/schemas/ToolStatePending"
  11945. },
  11946. {
  11947. "$ref": "#/components/schemas/ToolStateRunning"
  11948. },
  11949. {
  11950. "$ref": "#/components/schemas/ToolStateCompleted"
  11951. },
  11952. {
  11953. "$ref": "#/components/schemas/ToolStateError"
  11954. }
  11955. ]
  11956. },
  11957. "ToolPart": {
  11958. "type": "object",
  11959. "properties": {
  11960. "id": {
  11961. "type": "string",
  11962. "pattern": "^prt"
  11963. },
  11964. "sessionID": {
  11965. "type": "string",
  11966. "pattern": "^ses"
  11967. },
  11968. "messageID": {
  11969. "type": "string",
  11970. "pattern": "^msg"
  11971. },
  11972. "type": {
  11973. "type": "string",
  11974. "enum": ["tool"]
  11975. },
  11976. "callID": {
  11977. "type": "string"
  11978. },
  11979. "tool": {
  11980. "type": "string"
  11981. },
  11982. "state": {
  11983. "$ref": "#/components/schemas/ToolState"
  11984. },
  11985. "metadata": {
  11986. "type": "object"
  11987. }
  11988. },
  11989. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  11990. "additionalProperties": false
  11991. },
  11992. "StepStartPart": {
  11993. "type": "object",
  11994. "properties": {
  11995. "id": {
  11996. "type": "string",
  11997. "pattern": "^prt"
  11998. },
  11999. "sessionID": {
  12000. "type": "string",
  12001. "pattern": "^ses"
  12002. },
  12003. "messageID": {
  12004. "type": "string",
  12005. "pattern": "^msg"
  12006. },
  12007. "type": {
  12008. "type": "string",
  12009. "enum": ["step-start"]
  12010. },
  12011. "snapshot": {
  12012. "type": "string"
  12013. }
  12014. },
  12015. "required": ["id", "sessionID", "messageID", "type"],
  12016. "additionalProperties": false
  12017. },
  12018. "StepFinishPart": {
  12019. "type": "object",
  12020. "properties": {
  12021. "id": {
  12022. "type": "string",
  12023. "pattern": "^prt"
  12024. },
  12025. "sessionID": {
  12026. "type": "string",
  12027. "pattern": "^ses"
  12028. },
  12029. "messageID": {
  12030. "type": "string",
  12031. "pattern": "^msg"
  12032. },
  12033. "type": {
  12034. "type": "string",
  12035. "enum": ["step-finish"]
  12036. },
  12037. "reason": {
  12038. "type": "string"
  12039. },
  12040. "snapshot": {
  12041. "type": "string"
  12042. },
  12043. "cost": {
  12044. "type": "number"
  12045. },
  12046. "tokens": {
  12047. "type": "object",
  12048. "properties": {
  12049. "total": {
  12050. "type": "number"
  12051. },
  12052. "input": {
  12053. "type": "number"
  12054. },
  12055. "output": {
  12056. "type": "number"
  12057. },
  12058. "reasoning": {
  12059. "type": "number"
  12060. },
  12061. "cache": {
  12062. "type": "object",
  12063. "properties": {
  12064. "read": {
  12065. "type": "number"
  12066. },
  12067. "write": {
  12068. "type": "number"
  12069. }
  12070. },
  12071. "required": ["read", "write"],
  12072. "additionalProperties": false
  12073. }
  12074. },
  12075. "required": ["input", "output", "reasoning", "cache"],
  12076. "additionalProperties": false
  12077. }
  12078. },
  12079. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12080. "additionalProperties": false
  12081. },
  12082. "SnapshotPart": {
  12083. "type": "object",
  12084. "properties": {
  12085. "id": {
  12086. "type": "string",
  12087. "pattern": "^prt"
  12088. },
  12089. "sessionID": {
  12090. "type": "string",
  12091. "pattern": "^ses"
  12092. },
  12093. "messageID": {
  12094. "type": "string",
  12095. "pattern": "^msg"
  12096. },
  12097. "type": {
  12098. "type": "string",
  12099. "enum": ["snapshot"]
  12100. },
  12101. "snapshot": {
  12102. "type": "string"
  12103. }
  12104. },
  12105. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12106. "additionalProperties": false
  12107. },
  12108. "PatchPart": {
  12109. "type": "object",
  12110. "properties": {
  12111. "id": {
  12112. "type": "string",
  12113. "pattern": "^prt"
  12114. },
  12115. "sessionID": {
  12116. "type": "string",
  12117. "pattern": "^ses"
  12118. },
  12119. "messageID": {
  12120. "type": "string",
  12121. "pattern": "^msg"
  12122. },
  12123. "type": {
  12124. "type": "string",
  12125. "enum": ["patch"]
  12126. },
  12127. "hash": {
  12128. "type": "string"
  12129. },
  12130. "files": {
  12131. "type": "array",
  12132. "items": {
  12133. "type": "string"
  12134. }
  12135. }
  12136. },
  12137. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12138. "additionalProperties": false
  12139. },
  12140. "AgentPart": {
  12141. "type": "object",
  12142. "properties": {
  12143. "id": {
  12144. "type": "string",
  12145. "pattern": "^prt"
  12146. },
  12147. "sessionID": {
  12148. "type": "string",
  12149. "pattern": "^ses"
  12150. },
  12151. "messageID": {
  12152. "type": "string",
  12153. "pattern": "^msg"
  12154. },
  12155. "type": {
  12156. "type": "string",
  12157. "enum": ["agent"]
  12158. },
  12159. "name": {
  12160. "type": "string"
  12161. },
  12162. "source": {
  12163. "type": "object",
  12164. "properties": {
  12165. "value": {
  12166. "type": "string"
  12167. },
  12168. "start": {
  12169. "type": "integer",
  12170. "minimum": 0
  12171. },
  12172. "end": {
  12173. "type": "integer",
  12174. "minimum": 0
  12175. }
  12176. },
  12177. "required": ["value", "start", "end"],
  12178. "additionalProperties": false
  12179. }
  12180. },
  12181. "required": ["id", "sessionID", "messageID", "type", "name"],
  12182. "additionalProperties": false
  12183. },
  12184. "RetryPart": {
  12185. "type": "object",
  12186. "properties": {
  12187. "id": {
  12188. "type": "string",
  12189. "pattern": "^prt"
  12190. },
  12191. "sessionID": {
  12192. "type": "string",
  12193. "pattern": "^ses"
  12194. },
  12195. "messageID": {
  12196. "type": "string",
  12197. "pattern": "^msg"
  12198. },
  12199. "type": {
  12200. "type": "string",
  12201. "enum": ["retry"]
  12202. },
  12203. "attempt": {
  12204. "type": "integer",
  12205. "minimum": 0
  12206. },
  12207. "error": {
  12208. "$ref": "#/components/schemas/APIError"
  12209. },
  12210. "time": {
  12211. "type": "object",
  12212. "properties": {
  12213. "created": {
  12214. "type": "integer",
  12215. "minimum": 0
  12216. }
  12217. },
  12218. "required": ["created"],
  12219. "additionalProperties": false
  12220. }
  12221. },
  12222. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12223. "additionalProperties": false
  12224. },
  12225. "CompactionPart": {
  12226. "type": "object",
  12227. "properties": {
  12228. "id": {
  12229. "type": "string",
  12230. "pattern": "^prt"
  12231. },
  12232. "sessionID": {
  12233. "type": "string",
  12234. "pattern": "^ses"
  12235. },
  12236. "messageID": {
  12237. "type": "string",
  12238. "pattern": "^msg"
  12239. },
  12240. "type": {
  12241. "type": "string",
  12242. "enum": ["compaction"]
  12243. },
  12244. "auto": {
  12245. "type": "boolean"
  12246. },
  12247. "overflow": {
  12248. "type": "boolean"
  12249. },
  12250. "tail_start_id": {
  12251. "type": "string",
  12252. "pattern": "^msg"
  12253. }
  12254. },
  12255. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12256. "additionalProperties": false
  12257. },
  12258. "Part": {
  12259. "anyOf": [
  12260. {
  12261. "$ref": "#/components/schemas/TextPart"
  12262. },
  12263. {
  12264. "$ref": "#/components/schemas/SubtaskPart"
  12265. },
  12266. {
  12267. "$ref": "#/components/schemas/ReasoningPart"
  12268. },
  12269. {
  12270. "$ref": "#/components/schemas/FilePart"
  12271. },
  12272. {
  12273. "$ref": "#/components/schemas/ToolPart"
  12274. },
  12275. {
  12276. "$ref": "#/components/schemas/StepStartPart"
  12277. },
  12278. {
  12279. "$ref": "#/components/schemas/StepFinishPart"
  12280. },
  12281. {
  12282. "$ref": "#/components/schemas/SnapshotPart"
  12283. },
  12284. {
  12285. "$ref": "#/components/schemas/PatchPart"
  12286. },
  12287. {
  12288. "$ref": "#/components/schemas/AgentPart"
  12289. },
  12290. {
  12291. "$ref": "#/components/schemas/RetryPart"
  12292. },
  12293. {
  12294. "$ref": "#/components/schemas/CompactionPart"
  12295. }
  12296. ]
  12297. },
  12298. "QuestionOption": {
  12299. "type": "object",
  12300. "properties": {
  12301. "label": {
  12302. "type": "string",
  12303. "description": "Display text (1-5 words, concise)"
  12304. },
  12305. "description": {
  12306. "type": "string",
  12307. "description": "Explanation of choice"
  12308. }
  12309. },
  12310. "required": ["label", "description"],
  12311. "additionalProperties": false
  12312. },
  12313. "QuestionInfo": {
  12314. "type": "object",
  12315. "properties": {
  12316. "question": {
  12317. "type": "string",
  12318. "description": "Complete question"
  12319. },
  12320. "header": {
  12321. "type": "string",
  12322. "description": "Very short label (max 30 chars)"
  12323. },
  12324. "options": {
  12325. "type": "array",
  12326. "items": {
  12327. "$ref": "#/components/schemas/QuestionOption"
  12328. },
  12329. "description": "Available choices"
  12330. },
  12331. "multiple": {
  12332. "type": "boolean"
  12333. },
  12334. "custom": {
  12335. "type": "boolean"
  12336. }
  12337. },
  12338. "required": ["question", "header", "options"],
  12339. "additionalProperties": false
  12340. },
  12341. "QuestionTool": {
  12342. "type": "object",
  12343. "properties": {
  12344. "messageID": {
  12345. "type": "string",
  12346. "pattern": "^msg"
  12347. },
  12348. "callID": {
  12349. "type": "string"
  12350. }
  12351. },
  12352. "required": ["messageID", "callID"],
  12353. "additionalProperties": false
  12354. },
  12355. "QuestionAnswer": {
  12356. "type": "array",
  12357. "items": {
  12358. "type": "string"
  12359. }
  12360. },
  12361. "Todo": {
  12362. "type": "object",
  12363. "properties": {
  12364. "content": {
  12365. "type": "string",
  12366. "description": "Brief description of the task"
  12367. },
  12368. "status": {
  12369. "type": "string",
  12370. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  12371. },
  12372. "priority": {
  12373. "type": "string",
  12374. "description": "Priority level of the task: high, medium, low"
  12375. }
  12376. },
  12377. "required": ["content", "status", "priority"],
  12378. "additionalProperties": false
  12379. },
  12380. "SessionStatus": {
  12381. "anyOf": [
  12382. {
  12383. "type": "object",
  12384. "properties": {
  12385. "type": {
  12386. "type": "string",
  12387. "enum": ["idle"]
  12388. }
  12389. },
  12390. "required": ["type"],
  12391. "additionalProperties": false
  12392. },
  12393. {
  12394. "type": "object",
  12395. "properties": {
  12396. "type": {
  12397. "type": "string",
  12398. "enum": ["retry"]
  12399. },
  12400. "attempt": {
  12401. "type": "integer",
  12402. "minimum": 0
  12403. },
  12404. "message": {
  12405. "type": "string"
  12406. },
  12407. "action": {
  12408. "type": "object",
  12409. "properties": {
  12410. "reason": {
  12411. "type": "string"
  12412. },
  12413. "provider": {
  12414. "type": "string"
  12415. },
  12416. "title": {
  12417. "type": "string"
  12418. },
  12419. "message": {
  12420. "type": "string"
  12421. },
  12422. "label": {
  12423. "type": "string"
  12424. },
  12425. "link": {
  12426. "type": "string"
  12427. }
  12428. },
  12429. "required": ["reason", "provider", "title", "message", "label"],
  12430. "additionalProperties": false
  12431. },
  12432. "next": {
  12433. "type": "integer",
  12434. "minimum": 0
  12435. }
  12436. },
  12437. "required": ["type", "attempt", "message", "next"],
  12438. "additionalProperties": false
  12439. },
  12440. {
  12441. "type": "object",
  12442. "properties": {
  12443. "type": {
  12444. "type": "string",
  12445. "enum": ["busy"]
  12446. }
  12447. },
  12448. "required": ["type"],
  12449. "additionalProperties": false
  12450. }
  12451. ]
  12452. },
  12453. "Pty": {
  12454. "type": "object",
  12455. "properties": {
  12456. "id": {
  12457. "type": "string",
  12458. "pattern": "^pty"
  12459. },
  12460. "title": {
  12461. "type": "string"
  12462. },
  12463. "command": {
  12464. "type": "string"
  12465. },
  12466. "args": {
  12467. "type": "array",
  12468. "items": {
  12469. "type": "string"
  12470. }
  12471. },
  12472. "cwd": {
  12473. "type": "string"
  12474. },
  12475. "status": {
  12476. "type": "string",
  12477. "enum": ["running", "exited"]
  12478. },
  12479. "pid": {
  12480. "type": "integer",
  12481. "minimum": 0
  12482. }
  12483. },
  12484. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  12485. "additionalProperties": false
  12486. },
  12487. "GlobalEvent": {
  12488. "type": "object",
  12489. "properties": {
  12490. "directory": {
  12491. "type": "string"
  12492. },
  12493. "project": {
  12494. "type": "string"
  12495. },
  12496. "workspace": {
  12497. "type": "string"
  12498. },
  12499. "payload": {
  12500. "anyOf": [
  12501. {
  12502. "type": "object",
  12503. "properties": {
  12504. "id": {
  12505. "type": "string"
  12506. },
  12507. "type": {
  12508. "type": "string",
  12509. "enum": ["models-dev.refreshed"]
  12510. },
  12511. "properties": {
  12512. "type": "object",
  12513. "properties": {}
  12514. }
  12515. },
  12516. "required": ["id", "type", "properties"],
  12517. "additionalProperties": false
  12518. },
  12519. {
  12520. "type": "object",
  12521. "properties": {
  12522. "id": {
  12523. "type": "string"
  12524. },
  12525. "type": {
  12526. "type": "string",
  12527. "enum": ["plugin.added"]
  12528. },
  12529. "properties": {
  12530. "type": "object",
  12531. "properties": {
  12532. "id": {
  12533. "type": "string"
  12534. }
  12535. },
  12536. "required": ["id"],
  12537. "additionalProperties": false
  12538. }
  12539. },
  12540. "required": ["id", "type", "properties"],
  12541. "additionalProperties": false
  12542. },
  12543. {
  12544. "type": "object",
  12545. "properties": {
  12546. "id": {
  12547. "type": "string"
  12548. },
  12549. "type": {
  12550. "type": "string",
  12551. "enum": ["catalog.model.updated"]
  12552. },
  12553. "properties": {
  12554. "type": "object",
  12555. "properties": {
  12556. "model": {
  12557. "$ref": "#/components/schemas/ModelV2Info"
  12558. }
  12559. },
  12560. "required": ["model"],
  12561. "additionalProperties": false
  12562. }
  12563. },
  12564. "required": ["id", "type", "properties"],
  12565. "additionalProperties": false
  12566. },
  12567. {
  12568. "type": "object",
  12569. "properties": {
  12570. "id": {
  12571. "type": "string"
  12572. },
  12573. "type": {
  12574. "type": "string",
  12575. "enum": ["file.edited"]
  12576. },
  12577. "properties": {
  12578. "type": "object",
  12579. "properties": {
  12580. "file": {
  12581. "type": "string"
  12582. }
  12583. },
  12584. "required": ["file"],
  12585. "additionalProperties": false
  12586. }
  12587. },
  12588. "required": ["id", "type", "properties"],
  12589. "additionalProperties": false
  12590. },
  12591. {
  12592. "type": "object",
  12593. "properties": {
  12594. "id": {
  12595. "type": "string"
  12596. },
  12597. "type": {
  12598. "type": "string",
  12599. "enum": ["session.next.agent.switched"]
  12600. },
  12601. "properties": {
  12602. "type": "object",
  12603. "properties": {
  12604. "timestamp": {
  12605. "type": "number"
  12606. },
  12607. "sessionID": {
  12608. "type": "string",
  12609. "pattern": "^ses"
  12610. },
  12611. "agent": {
  12612. "type": "string"
  12613. }
  12614. },
  12615. "required": ["timestamp", "sessionID", "agent"],
  12616. "additionalProperties": false
  12617. }
  12618. },
  12619. "required": ["id", "type", "properties"],
  12620. "additionalProperties": false
  12621. },
  12622. {
  12623. "type": "object",
  12624. "properties": {
  12625. "id": {
  12626. "type": "string"
  12627. },
  12628. "type": {
  12629. "type": "string",
  12630. "enum": ["session.next.model.switched"]
  12631. },
  12632. "properties": {
  12633. "type": "object",
  12634. "properties": {
  12635. "timestamp": {
  12636. "type": "number"
  12637. },
  12638. "sessionID": {
  12639. "type": "string",
  12640. "pattern": "^ses"
  12641. },
  12642. "model": {
  12643. "type": "object",
  12644. "properties": {
  12645. "id": {
  12646. "type": "string"
  12647. },
  12648. "providerID": {
  12649. "type": "string"
  12650. },
  12651. "variant": {
  12652. "type": "string"
  12653. }
  12654. },
  12655. "required": ["id", "providerID"],
  12656. "additionalProperties": false
  12657. }
  12658. },
  12659. "required": ["timestamp", "sessionID", "model"],
  12660. "additionalProperties": false
  12661. }
  12662. },
  12663. "required": ["id", "type", "properties"],
  12664. "additionalProperties": false
  12665. },
  12666. {
  12667. "type": "object",
  12668. "properties": {
  12669. "id": {
  12670. "type": "string"
  12671. },
  12672. "type": {
  12673. "type": "string",
  12674. "enum": ["session.next.prompted"]
  12675. },
  12676. "properties": {
  12677. "type": "object",
  12678. "properties": {
  12679. "timestamp": {
  12680. "type": "number"
  12681. },
  12682. "sessionID": {
  12683. "type": "string",
  12684. "pattern": "^ses"
  12685. },
  12686. "prompt": {
  12687. "$ref": "#/components/schemas/Prompt"
  12688. }
  12689. },
  12690. "required": ["timestamp", "sessionID", "prompt"],
  12691. "additionalProperties": false
  12692. }
  12693. },
  12694. "required": ["id", "type", "properties"],
  12695. "additionalProperties": false
  12696. },
  12697. {
  12698. "type": "object",
  12699. "properties": {
  12700. "id": {
  12701. "type": "string"
  12702. },
  12703. "type": {
  12704. "type": "string",
  12705. "enum": ["session.next.synthetic"]
  12706. },
  12707. "properties": {
  12708. "type": "object",
  12709. "properties": {
  12710. "timestamp": {
  12711. "type": "number"
  12712. },
  12713. "sessionID": {
  12714. "type": "string",
  12715. "pattern": "^ses"
  12716. },
  12717. "text": {
  12718. "type": "string"
  12719. }
  12720. },
  12721. "required": ["timestamp", "sessionID", "text"],
  12722. "additionalProperties": false
  12723. }
  12724. },
  12725. "required": ["id", "type", "properties"],
  12726. "additionalProperties": false
  12727. },
  12728. {
  12729. "type": "object",
  12730. "properties": {
  12731. "id": {
  12732. "type": "string"
  12733. },
  12734. "type": {
  12735. "type": "string",
  12736. "enum": ["session.next.shell.started"]
  12737. },
  12738. "properties": {
  12739. "type": "object",
  12740. "properties": {
  12741. "timestamp": {
  12742. "type": "number"
  12743. },
  12744. "sessionID": {
  12745. "type": "string",
  12746. "pattern": "^ses"
  12747. },
  12748. "callID": {
  12749. "type": "string"
  12750. },
  12751. "command": {
  12752. "type": "string"
  12753. }
  12754. },
  12755. "required": ["timestamp", "sessionID", "callID", "command"],
  12756. "additionalProperties": false
  12757. }
  12758. },
  12759. "required": ["id", "type", "properties"],
  12760. "additionalProperties": false
  12761. },
  12762. {
  12763. "type": "object",
  12764. "properties": {
  12765. "id": {
  12766. "type": "string"
  12767. },
  12768. "type": {
  12769. "type": "string",
  12770. "enum": ["session.next.shell.ended"]
  12771. },
  12772. "properties": {
  12773. "type": "object",
  12774. "properties": {
  12775. "timestamp": {
  12776. "type": "number"
  12777. },
  12778. "sessionID": {
  12779. "type": "string",
  12780. "pattern": "^ses"
  12781. },
  12782. "callID": {
  12783. "type": "string"
  12784. },
  12785. "output": {
  12786. "type": "string"
  12787. }
  12788. },
  12789. "required": ["timestamp", "sessionID", "callID", "output"],
  12790. "additionalProperties": false
  12791. }
  12792. },
  12793. "required": ["id", "type", "properties"],
  12794. "additionalProperties": false
  12795. },
  12796. {
  12797. "type": "object",
  12798. "properties": {
  12799. "id": {
  12800. "type": "string"
  12801. },
  12802. "type": {
  12803. "type": "string",
  12804. "enum": ["session.next.step.started"]
  12805. },
  12806. "properties": {
  12807. "type": "object",
  12808. "properties": {
  12809. "timestamp": {
  12810. "type": "number"
  12811. },
  12812. "sessionID": {
  12813. "type": "string",
  12814. "pattern": "^ses"
  12815. },
  12816. "agent": {
  12817. "type": "string"
  12818. },
  12819. "model": {
  12820. "type": "object",
  12821. "properties": {
  12822. "id": {
  12823. "type": "string"
  12824. },
  12825. "providerID": {
  12826. "type": "string"
  12827. },
  12828. "variant": {
  12829. "type": "string"
  12830. }
  12831. },
  12832. "required": ["id", "providerID"],
  12833. "additionalProperties": false
  12834. },
  12835. "snapshot": {
  12836. "type": "string"
  12837. }
  12838. },
  12839. "required": ["timestamp", "sessionID", "agent", "model"],
  12840. "additionalProperties": false
  12841. }
  12842. },
  12843. "required": ["id", "type", "properties"],
  12844. "additionalProperties": false
  12845. },
  12846. {
  12847. "type": "object",
  12848. "properties": {
  12849. "id": {
  12850. "type": "string"
  12851. },
  12852. "type": {
  12853. "type": "string",
  12854. "enum": ["session.next.step.ended"]
  12855. },
  12856. "properties": {
  12857. "type": "object",
  12858. "properties": {
  12859. "timestamp": {
  12860. "type": "number"
  12861. },
  12862. "sessionID": {
  12863. "type": "string",
  12864. "pattern": "^ses"
  12865. },
  12866. "finish": {
  12867. "type": "string"
  12868. },
  12869. "cost": {
  12870. "type": "number"
  12871. },
  12872. "tokens": {
  12873. "type": "object",
  12874. "properties": {
  12875. "input": {
  12876. "type": "number"
  12877. },
  12878. "output": {
  12879. "type": "number"
  12880. },
  12881. "reasoning": {
  12882. "type": "number"
  12883. },
  12884. "cache": {
  12885. "type": "object",
  12886. "properties": {
  12887. "read": {
  12888. "type": "number"
  12889. },
  12890. "write": {
  12891. "type": "number"
  12892. }
  12893. },
  12894. "required": ["read", "write"],
  12895. "additionalProperties": false
  12896. }
  12897. },
  12898. "required": ["input", "output", "reasoning", "cache"],
  12899. "additionalProperties": false
  12900. },
  12901. "snapshot": {
  12902. "type": "string"
  12903. }
  12904. },
  12905. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  12906. "additionalProperties": false
  12907. }
  12908. },
  12909. "required": ["id", "type", "properties"],
  12910. "additionalProperties": false
  12911. },
  12912. {
  12913. "type": "object",
  12914. "properties": {
  12915. "id": {
  12916. "type": "string"
  12917. },
  12918. "type": {
  12919. "type": "string",
  12920. "enum": ["session.next.step.failed"]
  12921. },
  12922. "properties": {
  12923. "type": "object",
  12924. "properties": {
  12925. "timestamp": {
  12926. "type": "number"
  12927. },
  12928. "sessionID": {
  12929. "type": "string",
  12930. "pattern": "^ses"
  12931. },
  12932. "error": {
  12933. "$ref": "#/components/schemas/SessionErrorUnknown"
  12934. }
  12935. },
  12936. "required": ["timestamp", "sessionID", "error"],
  12937. "additionalProperties": false
  12938. }
  12939. },
  12940. "required": ["id", "type", "properties"],
  12941. "additionalProperties": false
  12942. },
  12943. {
  12944. "type": "object",
  12945. "properties": {
  12946. "id": {
  12947. "type": "string"
  12948. },
  12949. "type": {
  12950. "type": "string",
  12951. "enum": ["session.next.text.started"]
  12952. },
  12953. "properties": {
  12954. "type": "object",
  12955. "properties": {
  12956. "timestamp": {
  12957. "type": "number"
  12958. },
  12959. "sessionID": {
  12960. "type": "string",
  12961. "pattern": "^ses"
  12962. }
  12963. },
  12964. "required": ["timestamp", "sessionID"],
  12965. "additionalProperties": false
  12966. }
  12967. },
  12968. "required": ["id", "type", "properties"],
  12969. "additionalProperties": false
  12970. },
  12971. {
  12972. "type": "object",
  12973. "properties": {
  12974. "id": {
  12975. "type": "string"
  12976. },
  12977. "type": {
  12978. "type": "string",
  12979. "enum": ["session.next.text.delta"]
  12980. },
  12981. "properties": {
  12982. "type": "object",
  12983. "properties": {
  12984. "timestamp": {
  12985. "type": "number"
  12986. },
  12987. "sessionID": {
  12988. "type": "string",
  12989. "pattern": "^ses"
  12990. },
  12991. "delta": {
  12992. "type": "string"
  12993. }
  12994. },
  12995. "required": ["timestamp", "sessionID", "delta"],
  12996. "additionalProperties": false
  12997. }
  12998. },
  12999. "required": ["id", "type", "properties"],
  13000. "additionalProperties": false
  13001. },
  13002. {
  13003. "type": "object",
  13004. "properties": {
  13005. "id": {
  13006. "type": "string"
  13007. },
  13008. "type": {
  13009. "type": "string",
  13010. "enum": ["session.next.text.ended"]
  13011. },
  13012. "properties": {
  13013. "type": "object",
  13014. "properties": {
  13015. "timestamp": {
  13016. "type": "number"
  13017. },
  13018. "sessionID": {
  13019. "type": "string",
  13020. "pattern": "^ses"
  13021. },
  13022. "text": {
  13023. "type": "string"
  13024. }
  13025. },
  13026. "required": ["timestamp", "sessionID", "text"],
  13027. "additionalProperties": false
  13028. }
  13029. },
  13030. "required": ["id", "type", "properties"],
  13031. "additionalProperties": false
  13032. },
  13033. {
  13034. "type": "object",
  13035. "properties": {
  13036. "id": {
  13037. "type": "string"
  13038. },
  13039. "type": {
  13040. "type": "string",
  13041. "enum": ["session.next.reasoning.started"]
  13042. },
  13043. "properties": {
  13044. "type": "object",
  13045. "properties": {
  13046. "timestamp": {
  13047. "type": "number"
  13048. },
  13049. "sessionID": {
  13050. "type": "string",
  13051. "pattern": "^ses"
  13052. },
  13053. "reasoningID": {
  13054. "type": "string"
  13055. }
  13056. },
  13057. "required": ["timestamp", "sessionID", "reasoningID"],
  13058. "additionalProperties": false
  13059. }
  13060. },
  13061. "required": ["id", "type", "properties"],
  13062. "additionalProperties": false
  13063. },
  13064. {
  13065. "type": "object",
  13066. "properties": {
  13067. "id": {
  13068. "type": "string"
  13069. },
  13070. "type": {
  13071. "type": "string",
  13072. "enum": ["session.next.reasoning.delta"]
  13073. },
  13074. "properties": {
  13075. "type": "object",
  13076. "properties": {
  13077. "timestamp": {
  13078. "type": "number"
  13079. },
  13080. "sessionID": {
  13081. "type": "string",
  13082. "pattern": "^ses"
  13083. },
  13084. "reasoningID": {
  13085. "type": "string"
  13086. },
  13087. "delta": {
  13088. "type": "string"
  13089. }
  13090. },
  13091. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  13092. "additionalProperties": false
  13093. }
  13094. },
  13095. "required": ["id", "type", "properties"],
  13096. "additionalProperties": false
  13097. },
  13098. {
  13099. "type": "object",
  13100. "properties": {
  13101. "id": {
  13102. "type": "string"
  13103. },
  13104. "type": {
  13105. "type": "string",
  13106. "enum": ["session.next.reasoning.ended"]
  13107. },
  13108. "properties": {
  13109. "type": "object",
  13110. "properties": {
  13111. "timestamp": {
  13112. "type": "number"
  13113. },
  13114. "sessionID": {
  13115. "type": "string",
  13116. "pattern": "^ses"
  13117. },
  13118. "reasoningID": {
  13119. "type": "string"
  13120. },
  13121. "text": {
  13122. "type": "string"
  13123. }
  13124. },
  13125. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  13126. "additionalProperties": false
  13127. }
  13128. },
  13129. "required": ["id", "type", "properties"],
  13130. "additionalProperties": false
  13131. },
  13132. {
  13133. "type": "object",
  13134. "properties": {
  13135. "id": {
  13136. "type": "string"
  13137. },
  13138. "type": {
  13139. "type": "string",
  13140. "enum": ["session.next.tool.input.started"]
  13141. },
  13142. "properties": {
  13143. "type": "object",
  13144. "properties": {
  13145. "timestamp": {
  13146. "type": "number"
  13147. },
  13148. "sessionID": {
  13149. "type": "string",
  13150. "pattern": "^ses"
  13151. },
  13152. "callID": {
  13153. "type": "string"
  13154. },
  13155. "name": {
  13156. "type": "string"
  13157. }
  13158. },
  13159. "required": ["timestamp", "sessionID", "callID", "name"],
  13160. "additionalProperties": false
  13161. }
  13162. },
  13163. "required": ["id", "type", "properties"],
  13164. "additionalProperties": false
  13165. },
  13166. {
  13167. "type": "object",
  13168. "properties": {
  13169. "id": {
  13170. "type": "string"
  13171. },
  13172. "type": {
  13173. "type": "string",
  13174. "enum": ["session.next.tool.input.delta"]
  13175. },
  13176. "properties": {
  13177. "type": "object",
  13178. "properties": {
  13179. "timestamp": {
  13180. "type": "number"
  13181. },
  13182. "sessionID": {
  13183. "type": "string",
  13184. "pattern": "^ses"
  13185. },
  13186. "callID": {
  13187. "type": "string"
  13188. },
  13189. "delta": {
  13190. "type": "string"
  13191. }
  13192. },
  13193. "required": ["timestamp", "sessionID", "callID", "delta"],
  13194. "additionalProperties": false
  13195. }
  13196. },
  13197. "required": ["id", "type", "properties"],
  13198. "additionalProperties": false
  13199. },
  13200. {
  13201. "type": "object",
  13202. "properties": {
  13203. "id": {
  13204. "type": "string"
  13205. },
  13206. "type": {
  13207. "type": "string",
  13208. "enum": ["session.next.tool.input.ended"]
  13209. },
  13210. "properties": {
  13211. "type": "object",
  13212. "properties": {
  13213. "timestamp": {
  13214. "type": "number"
  13215. },
  13216. "sessionID": {
  13217. "type": "string",
  13218. "pattern": "^ses"
  13219. },
  13220. "callID": {
  13221. "type": "string"
  13222. },
  13223. "text": {
  13224. "type": "string"
  13225. }
  13226. },
  13227. "required": ["timestamp", "sessionID", "callID", "text"],
  13228. "additionalProperties": false
  13229. }
  13230. },
  13231. "required": ["id", "type", "properties"],
  13232. "additionalProperties": false
  13233. },
  13234. {
  13235. "type": "object",
  13236. "properties": {
  13237. "id": {
  13238. "type": "string"
  13239. },
  13240. "type": {
  13241. "type": "string",
  13242. "enum": ["session.next.tool.called"]
  13243. },
  13244. "properties": {
  13245. "type": "object",
  13246. "properties": {
  13247. "timestamp": {
  13248. "type": "number"
  13249. },
  13250. "sessionID": {
  13251. "type": "string",
  13252. "pattern": "^ses"
  13253. },
  13254. "callID": {
  13255. "type": "string"
  13256. },
  13257. "tool": {
  13258. "type": "string"
  13259. },
  13260. "input": {
  13261. "type": "object"
  13262. },
  13263. "provider": {
  13264. "type": "object",
  13265. "properties": {
  13266. "executed": {
  13267. "type": "boolean"
  13268. },
  13269. "metadata": {
  13270. "type": "object"
  13271. }
  13272. },
  13273. "required": ["executed"],
  13274. "additionalProperties": false
  13275. }
  13276. },
  13277. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  13278. "additionalProperties": false
  13279. }
  13280. },
  13281. "required": ["id", "type", "properties"],
  13282. "additionalProperties": false
  13283. },
  13284. {
  13285. "type": "object",
  13286. "properties": {
  13287. "id": {
  13288. "type": "string"
  13289. },
  13290. "type": {
  13291. "type": "string",
  13292. "enum": ["session.next.tool.progress"]
  13293. },
  13294. "properties": {
  13295. "type": "object",
  13296. "properties": {
  13297. "timestamp": {
  13298. "type": "number"
  13299. },
  13300. "sessionID": {
  13301. "type": "string",
  13302. "pattern": "^ses"
  13303. },
  13304. "callID": {
  13305. "type": "string"
  13306. },
  13307. "structured": {
  13308. "type": "object"
  13309. },
  13310. "content": {
  13311. "type": "array",
  13312. "items": {
  13313. "anyOf": [
  13314. {
  13315. "$ref": "#/components/schemas/ToolTextContent"
  13316. },
  13317. {
  13318. "$ref": "#/components/schemas/ToolFileContent"
  13319. }
  13320. ]
  13321. }
  13322. }
  13323. },
  13324. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  13325. "additionalProperties": false
  13326. }
  13327. },
  13328. "required": ["id", "type", "properties"],
  13329. "additionalProperties": false
  13330. },
  13331. {
  13332. "type": "object",
  13333. "properties": {
  13334. "id": {
  13335. "type": "string"
  13336. },
  13337. "type": {
  13338. "type": "string",
  13339. "enum": ["session.next.tool.success"]
  13340. },
  13341. "properties": {
  13342. "type": "object",
  13343. "properties": {
  13344. "timestamp": {
  13345. "type": "number"
  13346. },
  13347. "sessionID": {
  13348. "type": "string",
  13349. "pattern": "^ses"
  13350. },
  13351. "callID": {
  13352. "type": "string"
  13353. },
  13354. "structured": {
  13355. "type": "object"
  13356. },
  13357. "content": {
  13358. "type": "array",
  13359. "items": {
  13360. "anyOf": [
  13361. {
  13362. "$ref": "#/components/schemas/ToolTextContent"
  13363. },
  13364. {
  13365. "$ref": "#/components/schemas/ToolFileContent"
  13366. }
  13367. ]
  13368. }
  13369. },
  13370. "provider": {
  13371. "type": "object",
  13372. "properties": {
  13373. "executed": {
  13374. "type": "boolean"
  13375. },
  13376. "metadata": {
  13377. "type": "object"
  13378. }
  13379. },
  13380. "required": ["executed"],
  13381. "additionalProperties": false
  13382. }
  13383. },
  13384. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  13385. "additionalProperties": false
  13386. }
  13387. },
  13388. "required": ["id", "type", "properties"],
  13389. "additionalProperties": false
  13390. },
  13391. {
  13392. "type": "object",
  13393. "properties": {
  13394. "id": {
  13395. "type": "string"
  13396. },
  13397. "type": {
  13398. "type": "string",
  13399. "enum": ["session.next.tool.failed"]
  13400. },
  13401. "properties": {
  13402. "type": "object",
  13403. "properties": {
  13404. "timestamp": {
  13405. "type": "number"
  13406. },
  13407. "sessionID": {
  13408. "type": "string",
  13409. "pattern": "^ses"
  13410. },
  13411. "callID": {
  13412. "type": "string"
  13413. },
  13414. "error": {
  13415. "$ref": "#/components/schemas/SessionErrorUnknown"
  13416. },
  13417. "provider": {
  13418. "type": "object",
  13419. "properties": {
  13420. "executed": {
  13421. "type": "boolean"
  13422. },
  13423. "metadata": {
  13424. "type": "object"
  13425. }
  13426. },
  13427. "required": ["executed"],
  13428. "additionalProperties": false
  13429. }
  13430. },
  13431. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  13432. "additionalProperties": false
  13433. }
  13434. },
  13435. "required": ["id", "type", "properties"],
  13436. "additionalProperties": false
  13437. },
  13438. {
  13439. "type": "object",
  13440. "properties": {
  13441. "id": {
  13442. "type": "string"
  13443. },
  13444. "type": {
  13445. "type": "string",
  13446. "enum": ["session.next.retried"]
  13447. },
  13448. "properties": {
  13449. "type": "object",
  13450. "properties": {
  13451. "timestamp": {
  13452. "type": "number"
  13453. },
  13454. "sessionID": {
  13455. "type": "string",
  13456. "pattern": "^ses"
  13457. },
  13458. "attempt": {
  13459. "type": "number"
  13460. },
  13461. "error": {
  13462. "$ref": "#/components/schemas/SessionNextRetry_error"
  13463. }
  13464. },
  13465. "required": ["timestamp", "sessionID", "attempt", "error"],
  13466. "additionalProperties": false
  13467. }
  13468. },
  13469. "required": ["id", "type", "properties"],
  13470. "additionalProperties": false
  13471. },
  13472. {
  13473. "type": "object",
  13474. "properties": {
  13475. "id": {
  13476. "type": "string"
  13477. },
  13478. "type": {
  13479. "type": "string",
  13480. "enum": ["session.next.compaction.started"]
  13481. },
  13482. "properties": {
  13483. "type": "object",
  13484. "properties": {
  13485. "timestamp": {
  13486. "type": "number"
  13487. },
  13488. "sessionID": {
  13489. "type": "string",
  13490. "pattern": "^ses"
  13491. },
  13492. "reason": {
  13493. "type": "string",
  13494. "enum": ["auto", "manual"]
  13495. }
  13496. },
  13497. "required": ["timestamp", "sessionID", "reason"],
  13498. "additionalProperties": false
  13499. }
  13500. },
  13501. "required": ["id", "type", "properties"],
  13502. "additionalProperties": false
  13503. },
  13504. {
  13505. "type": "object",
  13506. "properties": {
  13507. "id": {
  13508. "type": "string"
  13509. },
  13510. "type": {
  13511. "type": "string",
  13512. "enum": ["session.next.compaction.delta"]
  13513. },
  13514. "properties": {
  13515. "type": "object",
  13516. "properties": {
  13517. "timestamp": {
  13518. "type": "number"
  13519. },
  13520. "sessionID": {
  13521. "type": "string",
  13522. "pattern": "^ses"
  13523. },
  13524. "text": {
  13525. "type": "string"
  13526. }
  13527. },
  13528. "required": ["timestamp", "sessionID", "text"],
  13529. "additionalProperties": false
  13530. }
  13531. },
  13532. "required": ["id", "type", "properties"],
  13533. "additionalProperties": false
  13534. },
  13535. {
  13536. "type": "object",
  13537. "properties": {
  13538. "id": {
  13539. "type": "string"
  13540. },
  13541. "type": {
  13542. "type": "string",
  13543. "enum": ["session.next.compaction.ended"]
  13544. },
  13545. "properties": {
  13546. "type": "object",
  13547. "properties": {
  13548. "timestamp": {
  13549. "type": "number"
  13550. },
  13551. "sessionID": {
  13552. "type": "string",
  13553. "pattern": "^ses"
  13554. },
  13555. "text": {
  13556. "type": "string"
  13557. },
  13558. "include": {
  13559. "type": "string"
  13560. }
  13561. },
  13562. "required": ["timestamp", "sessionID", "text"],
  13563. "additionalProperties": false
  13564. }
  13565. },
  13566. "required": ["id", "type", "properties"],
  13567. "additionalProperties": false
  13568. },
  13569. {
  13570. "type": "object",
  13571. "properties": {
  13572. "id": {
  13573. "type": "string"
  13574. },
  13575. "type": {
  13576. "type": "string",
  13577. "enum": ["file.watcher.updated"]
  13578. },
  13579. "properties": {
  13580. "type": "object",
  13581. "properties": {
  13582. "file": {
  13583. "type": "string"
  13584. },
  13585. "event": {
  13586. "type": "string",
  13587. "enum": ["add", "change", "unlink"]
  13588. }
  13589. },
  13590. "required": ["file", "event"],
  13591. "additionalProperties": false
  13592. }
  13593. },
  13594. "required": ["id", "type", "properties"],
  13595. "additionalProperties": false
  13596. },
  13597. {
  13598. "type": "object",
  13599. "properties": {
  13600. "id": {
  13601. "type": "string"
  13602. },
  13603. "type": {
  13604. "type": "string",
  13605. "enum": ["session.created"]
  13606. },
  13607. "properties": {
  13608. "type": "object",
  13609. "properties": {
  13610. "sessionID": {
  13611. "type": "string",
  13612. "pattern": "^ses"
  13613. },
  13614. "info": {
  13615. "$ref": "#/components/schemas/Session"
  13616. }
  13617. },
  13618. "required": ["sessionID", "info"],
  13619. "additionalProperties": false
  13620. }
  13621. },
  13622. "required": ["id", "type", "properties"],
  13623. "additionalProperties": false
  13624. },
  13625. {
  13626. "type": "object",
  13627. "properties": {
  13628. "id": {
  13629. "type": "string"
  13630. },
  13631. "type": {
  13632. "type": "string",
  13633. "enum": ["session.updated"]
  13634. },
  13635. "properties": {
  13636. "type": "object",
  13637. "properties": {
  13638. "sessionID": {
  13639. "type": "string",
  13640. "pattern": "^ses"
  13641. },
  13642. "info": {
  13643. "$ref": "#/components/schemas/Session"
  13644. }
  13645. },
  13646. "required": ["sessionID", "info"],
  13647. "additionalProperties": false
  13648. }
  13649. },
  13650. "required": ["id", "type", "properties"],
  13651. "additionalProperties": false
  13652. },
  13653. {
  13654. "type": "object",
  13655. "properties": {
  13656. "id": {
  13657. "type": "string"
  13658. },
  13659. "type": {
  13660. "type": "string",
  13661. "enum": ["session.deleted"]
  13662. },
  13663. "properties": {
  13664. "type": "object",
  13665. "properties": {
  13666. "sessionID": {
  13667. "type": "string",
  13668. "pattern": "^ses"
  13669. },
  13670. "info": {
  13671. "$ref": "#/components/schemas/Session"
  13672. }
  13673. },
  13674. "required": ["sessionID", "info"],
  13675. "additionalProperties": false
  13676. }
  13677. },
  13678. "required": ["id", "type", "properties"],
  13679. "additionalProperties": false
  13680. },
  13681. {
  13682. "type": "object",
  13683. "properties": {
  13684. "id": {
  13685. "type": "string"
  13686. },
  13687. "type": {
  13688. "type": "string",
  13689. "enum": ["message.updated"]
  13690. },
  13691. "properties": {
  13692. "type": "object",
  13693. "properties": {
  13694. "sessionID": {
  13695. "type": "string",
  13696. "pattern": "^ses"
  13697. },
  13698. "info": {
  13699. "$ref": "#/components/schemas/Message"
  13700. }
  13701. },
  13702. "required": ["sessionID", "info"],
  13703. "additionalProperties": false
  13704. }
  13705. },
  13706. "required": ["id", "type", "properties"],
  13707. "additionalProperties": false
  13708. },
  13709. {
  13710. "type": "object",
  13711. "properties": {
  13712. "id": {
  13713. "type": "string"
  13714. },
  13715. "type": {
  13716. "type": "string",
  13717. "enum": ["message.removed"]
  13718. },
  13719. "properties": {
  13720. "type": "object",
  13721. "properties": {
  13722. "sessionID": {
  13723. "type": "string",
  13724. "pattern": "^ses"
  13725. },
  13726. "messageID": {
  13727. "type": "string",
  13728. "pattern": "^msg"
  13729. }
  13730. },
  13731. "required": ["sessionID", "messageID"],
  13732. "additionalProperties": false
  13733. }
  13734. },
  13735. "required": ["id", "type", "properties"],
  13736. "additionalProperties": false
  13737. },
  13738. {
  13739. "type": "object",
  13740. "properties": {
  13741. "id": {
  13742. "type": "string"
  13743. },
  13744. "type": {
  13745. "type": "string",
  13746. "enum": ["message.part.updated"]
  13747. },
  13748. "properties": {
  13749. "type": "object",
  13750. "properties": {
  13751. "sessionID": {
  13752. "type": "string",
  13753. "pattern": "^ses"
  13754. },
  13755. "part": {
  13756. "$ref": "#/components/schemas/Part"
  13757. },
  13758. "time": {
  13759. "type": "number"
  13760. }
  13761. },
  13762. "required": ["sessionID", "part", "time"],
  13763. "additionalProperties": false
  13764. }
  13765. },
  13766. "required": ["id", "type", "properties"],
  13767. "additionalProperties": false
  13768. },
  13769. {
  13770. "type": "object",
  13771. "properties": {
  13772. "id": {
  13773. "type": "string"
  13774. },
  13775. "type": {
  13776. "type": "string",
  13777. "enum": ["message.part.removed"]
  13778. },
  13779. "properties": {
  13780. "type": "object",
  13781. "properties": {
  13782. "sessionID": {
  13783. "type": "string",
  13784. "pattern": "^ses"
  13785. },
  13786. "messageID": {
  13787. "type": "string",
  13788. "pattern": "^msg"
  13789. },
  13790. "partID": {
  13791. "type": "string",
  13792. "pattern": "^prt"
  13793. }
  13794. },
  13795. "required": ["sessionID", "messageID", "partID"],
  13796. "additionalProperties": false
  13797. }
  13798. },
  13799. "required": ["id", "type", "properties"],
  13800. "additionalProperties": false
  13801. },
  13802. {
  13803. "type": "object",
  13804. "properties": {
  13805. "id": {
  13806. "type": "string"
  13807. },
  13808. "type": {
  13809. "type": "string",
  13810. "enum": ["message.part.delta"]
  13811. },
  13812. "properties": {
  13813. "type": "object",
  13814. "properties": {
  13815. "sessionID": {
  13816. "type": "string",
  13817. "pattern": "^ses"
  13818. },
  13819. "messageID": {
  13820. "type": "string",
  13821. "pattern": "^msg"
  13822. },
  13823. "partID": {
  13824. "type": "string",
  13825. "pattern": "^prt"
  13826. },
  13827. "field": {
  13828. "type": "string"
  13829. },
  13830. "delta": {
  13831. "type": "string"
  13832. }
  13833. },
  13834. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  13835. "additionalProperties": false
  13836. }
  13837. },
  13838. "required": ["id", "type", "properties"],
  13839. "additionalProperties": false
  13840. },
  13841. {
  13842. "type": "object",
  13843. "properties": {
  13844. "id": {
  13845. "type": "string"
  13846. },
  13847. "type": {
  13848. "type": "string",
  13849. "enum": ["permission.asked"]
  13850. },
  13851. "properties": {
  13852. "type": "object",
  13853. "properties": {
  13854. "id": {
  13855. "type": "string",
  13856. "pattern": "^per"
  13857. },
  13858. "sessionID": {
  13859. "type": "string",
  13860. "pattern": "^ses"
  13861. },
  13862. "permission": {
  13863. "type": "string"
  13864. },
  13865. "patterns": {
  13866. "type": "array",
  13867. "items": {
  13868. "type": "string"
  13869. }
  13870. },
  13871. "metadata": {
  13872. "type": "object"
  13873. },
  13874. "always": {
  13875. "type": "array",
  13876. "items": {
  13877. "type": "string"
  13878. }
  13879. },
  13880. "tool": {
  13881. "type": "object",
  13882. "properties": {
  13883. "messageID": {
  13884. "type": "string",
  13885. "pattern": "^msg"
  13886. },
  13887. "callID": {
  13888. "type": "string"
  13889. }
  13890. },
  13891. "required": ["messageID", "callID"],
  13892. "additionalProperties": false
  13893. }
  13894. },
  13895. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  13896. "additionalProperties": false
  13897. }
  13898. },
  13899. "required": ["id", "type", "properties"],
  13900. "additionalProperties": false
  13901. },
  13902. {
  13903. "type": "object",
  13904. "properties": {
  13905. "id": {
  13906. "type": "string"
  13907. },
  13908. "type": {
  13909. "type": "string",
  13910. "enum": ["permission.replied"]
  13911. },
  13912. "properties": {
  13913. "type": "object",
  13914. "properties": {
  13915. "sessionID": {
  13916. "type": "string",
  13917. "pattern": "^ses"
  13918. },
  13919. "requestID": {
  13920. "type": "string",
  13921. "pattern": "^per"
  13922. },
  13923. "reply": {
  13924. "type": "string",
  13925. "enum": ["once", "always", "reject"]
  13926. }
  13927. },
  13928. "required": ["sessionID", "requestID", "reply"],
  13929. "additionalProperties": false
  13930. }
  13931. },
  13932. "required": ["id", "type", "properties"],
  13933. "additionalProperties": false
  13934. },
  13935. {
  13936. "type": "object",
  13937. "properties": {
  13938. "id": {
  13939. "type": "string"
  13940. },
  13941. "type": {
  13942. "type": "string",
  13943. "enum": ["session.diff"]
  13944. },
  13945. "properties": {
  13946. "type": "object",
  13947. "properties": {
  13948. "sessionID": {
  13949. "type": "string",
  13950. "pattern": "^ses"
  13951. },
  13952. "diff": {
  13953. "type": "array",
  13954. "items": {
  13955. "$ref": "#/components/schemas/SnapshotFileDiff"
  13956. }
  13957. }
  13958. },
  13959. "required": ["sessionID", "diff"],
  13960. "additionalProperties": false
  13961. }
  13962. },
  13963. "required": ["id", "type", "properties"],
  13964. "additionalProperties": false
  13965. },
  13966. {
  13967. "type": "object",
  13968. "properties": {
  13969. "id": {
  13970. "type": "string"
  13971. },
  13972. "type": {
  13973. "type": "string",
  13974. "enum": ["session.error"]
  13975. },
  13976. "properties": {
  13977. "type": "object",
  13978. "properties": {
  13979. "sessionID": {
  13980. "type": "string",
  13981. "pattern": "^ses"
  13982. },
  13983. "error": {
  13984. "anyOf": [
  13985. {
  13986. "$ref": "#/components/schemas/ProviderAuthError"
  13987. },
  13988. {
  13989. "$ref": "#/components/schemas/UnknownError"
  13990. },
  13991. {
  13992. "$ref": "#/components/schemas/MessageOutputLengthError"
  13993. },
  13994. {
  13995. "$ref": "#/components/schemas/MessageAbortedError"
  13996. },
  13997. {
  13998. "$ref": "#/components/schemas/StructuredOutputError"
  13999. },
  14000. {
  14001. "$ref": "#/components/schemas/ContextOverflowError"
  14002. },
  14003. {
  14004. "$ref": "#/components/schemas/APIError"
  14005. }
  14006. ]
  14007. }
  14008. },
  14009. "additionalProperties": false
  14010. }
  14011. },
  14012. "required": ["id", "type", "properties"],
  14013. "additionalProperties": false
  14014. },
  14015. {
  14016. "type": "object",
  14017. "properties": {
  14018. "id": {
  14019. "type": "string"
  14020. },
  14021. "type": {
  14022. "type": "string",
  14023. "enum": ["question.asked"]
  14024. },
  14025. "properties": {
  14026. "type": "object",
  14027. "properties": {
  14028. "id": {
  14029. "type": "string",
  14030. "pattern": "^que"
  14031. },
  14032. "sessionID": {
  14033. "type": "string",
  14034. "pattern": "^ses"
  14035. },
  14036. "questions": {
  14037. "type": "array",
  14038. "items": {
  14039. "$ref": "#/components/schemas/QuestionInfo"
  14040. },
  14041. "description": "Questions to ask"
  14042. },
  14043. "tool": {
  14044. "$ref": "#/components/schemas/QuestionTool"
  14045. }
  14046. },
  14047. "required": ["id", "sessionID", "questions"],
  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": ["question.replied"]
  14063. },
  14064. "properties": {
  14065. "type": "object",
  14066. "properties": {
  14067. "sessionID": {
  14068. "type": "string",
  14069. "pattern": "^ses"
  14070. },
  14071. "requestID": {
  14072. "type": "string",
  14073. "pattern": "^que"
  14074. },
  14075. "answers": {
  14076. "type": "array",
  14077. "items": {
  14078. "$ref": "#/components/schemas/QuestionAnswer"
  14079. }
  14080. }
  14081. },
  14082. "required": ["sessionID", "requestID", "answers"],
  14083. "additionalProperties": false
  14084. }
  14085. },
  14086. "required": ["id", "type", "properties"],
  14087. "additionalProperties": false
  14088. },
  14089. {
  14090. "type": "object",
  14091. "properties": {
  14092. "id": {
  14093. "type": "string"
  14094. },
  14095. "type": {
  14096. "type": "string",
  14097. "enum": ["question.rejected"]
  14098. },
  14099. "properties": {
  14100. "type": "object",
  14101. "properties": {
  14102. "sessionID": {
  14103. "type": "string",
  14104. "pattern": "^ses"
  14105. },
  14106. "requestID": {
  14107. "type": "string",
  14108. "pattern": "^que"
  14109. }
  14110. },
  14111. "required": ["sessionID", "requestID"],
  14112. "additionalProperties": false
  14113. }
  14114. },
  14115. "required": ["id", "type", "properties"],
  14116. "additionalProperties": false
  14117. },
  14118. {
  14119. "type": "object",
  14120. "properties": {
  14121. "id": {
  14122. "type": "string"
  14123. },
  14124. "type": {
  14125. "type": "string",
  14126. "enum": ["todo.updated"]
  14127. },
  14128. "properties": {
  14129. "type": "object",
  14130. "properties": {
  14131. "sessionID": {
  14132. "type": "string",
  14133. "pattern": "^ses"
  14134. },
  14135. "todos": {
  14136. "type": "array",
  14137. "items": {
  14138. "$ref": "#/components/schemas/Todo"
  14139. }
  14140. }
  14141. },
  14142. "required": ["sessionID", "todos"],
  14143. "additionalProperties": false
  14144. }
  14145. },
  14146. "required": ["id", "type", "properties"],
  14147. "additionalProperties": false
  14148. },
  14149. {
  14150. "type": "object",
  14151. "properties": {
  14152. "id": {
  14153. "type": "string"
  14154. },
  14155. "type": {
  14156. "type": "string",
  14157. "enum": ["session.status"]
  14158. },
  14159. "properties": {
  14160. "type": "object",
  14161. "properties": {
  14162. "sessionID": {
  14163. "type": "string",
  14164. "pattern": "^ses"
  14165. },
  14166. "status": {
  14167. "$ref": "#/components/schemas/SessionStatus"
  14168. }
  14169. },
  14170. "required": ["sessionID", "status"],
  14171. "additionalProperties": false
  14172. }
  14173. },
  14174. "required": ["id", "type", "properties"],
  14175. "additionalProperties": false
  14176. },
  14177. {
  14178. "type": "object",
  14179. "properties": {
  14180. "id": {
  14181. "type": "string"
  14182. },
  14183. "type": {
  14184. "type": "string",
  14185. "enum": ["session.idle"]
  14186. },
  14187. "properties": {
  14188. "type": "object",
  14189. "properties": {
  14190. "sessionID": {
  14191. "type": "string",
  14192. "pattern": "^ses"
  14193. }
  14194. },
  14195. "required": ["sessionID"],
  14196. "additionalProperties": false
  14197. }
  14198. },
  14199. "required": ["id", "type", "properties"],
  14200. "additionalProperties": false
  14201. },
  14202. {
  14203. "type": "object",
  14204. "properties": {
  14205. "id": {
  14206. "type": "string"
  14207. },
  14208. "type": {
  14209. "type": "string",
  14210. "enum": ["session.compacted"]
  14211. },
  14212. "properties": {
  14213. "type": "object",
  14214. "properties": {
  14215. "sessionID": {
  14216. "type": "string",
  14217. "pattern": "^ses"
  14218. }
  14219. },
  14220. "required": ["sessionID"],
  14221. "additionalProperties": false
  14222. }
  14223. },
  14224. "required": ["id", "type", "properties"],
  14225. "additionalProperties": false
  14226. },
  14227. {
  14228. "type": "object",
  14229. "properties": {
  14230. "id": {
  14231. "type": "string"
  14232. },
  14233. "type": {
  14234. "type": "string",
  14235. "enum": ["lsp.updated"]
  14236. },
  14237. "properties": {
  14238. "type": "object",
  14239. "properties": {}
  14240. }
  14241. },
  14242. "required": ["id", "type", "properties"],
  14243. "additionalProperties": false
  14244. },
  14245. {
  14246. "type": "object",
  14247. "properties": {
  14248. "id": {
  14249. "type": "string"
  14250. },
  14251. "type": {
  14252. "type": "string",
  14253. "enum": ["tui.prompt.append"]
  14254. },
  14255. "properties": {
  14256. "type": "object",
  14257. "properties": {
  14258. "text": {
  14259. "type": "string"
  14260. }
  14261. },
  14262. "required": ["text"],
  14263. "additionalProperties": false
  14264. }
  14265. },
  14266. "required": ["id", "type", "properties"],
  14267. "additionalProperties": false
  14268. },
  14269. {
  14270. "type": "object",
  14271. "properties": {
  14272. "id": {
  14273. "type": "string"
  14274. },
  14275. "type": {
  14276. "type": "string",
  14277. "enum": ["tui.command.execute"]
  14278. },
  14279. "properties": {
  14280. "type": "object",
  14281. "properties": {
  14282. "command": {
  14283. "anyOf": [
  14284. {
  14285. "type": "string",
  14286. "enum": [
  14287. "session.list",
  14288. "session.new",
  14289. "session.share",
  14290. "session.interrupt",
  14291. "session.compact",
  14292. "session.page.up",
  14293. "session.page.down",
  14294. "session.line.up",
  14295. "session.line.down",
  14296. "session.half.page.up",
  14297. "session.half.page.down",
  14298. "session.first",
  14299. "session.last",
  14300. "prompt.clear",
  14301. "prompt.submit",
  14302. "agent.cycle"
  14303. ]
  14304. },
  14305. {
  14306. "type": "string"
  14307. }
  14308. ]
  14309. }
  14310. },
  14311. "required": ["command"],
  14312. "additionalProperties": false
  14313. }
  14314. },
  14315. "required": ["id", "type", "properties"],
  14316. "additionalProperties": false
  14317. },
  14318. {
  14319. "type": "object",
  14320. "properties": {
  14321. "id": {
  14322. "type": "string"
  14323. },
  14324. "type": {
  14325. "type": "string",
  14326. "enum": ["tui.toast.show"]
  14327. },
  14328. "properties": {
  14329. "type": "object",
  14330. "properties": {
  14331. "title": {
  14332. "type": "string"
  14333. },
  14334. "message": {
  14335. "type": "string"
  14336. },
  14337. "variant": {
  14338. "type": "string",
  14339. "enum": ["info", "success", "warning", "error"]
  14340. },
  14341. "duration": {
  14342. "type": "integer",
  14343. "exclusiveMinimum": 0
  14344. }
  14345. },
  14346. "required": ["message", "variant"],
  14347. "additionalProperties": false
  14348. }
  14349. },
  14350. "required": ["id", "type", "properties"],
  14351. "additionalProperties": false
  14352. },
  14353. {
  14354. "type": "object",
  14355. "properties": {
  14356. "id": {
  14357. "type": "string"
  14358. },
  14359. "type": {
  14360. "type": "string",
  14361. "enum": ["tui.session.select"]
  14362. },
  14363. "properties": {
  14364. "type": "object",
  14365. "properties": {
  14366. "sessionID": {
  14367. "type": "string",
  14368. "pattern": "^ses",
  14369. "description": "Session ID to navigate to"
  14370. }
  14371. },
  14372. "required": ["sessionID"],
  14373. "additionalProperties": false
  14374. }
  14375. },
  14376. "required": ["id", "type", "properties"],
  14377. "additionalProperties": false
  14378. },
  14379. {
  14380. "type": "object",
  14381. "properties": {
  14382. "id": {
  14383. "type": "string"
  14384. },
  14385. "type": {
  14386. "type": "string",
  14387. "enum": ["mcp.tools.changed"]
  14388. },
  14389. "properties": {
  14390. "type": "object",
  14391. "properties": {
  14392. "server": {
  14393. "type": "string"
  14394. }
  14395. },
  14396. "required": ["server"],
  14397. "additionalProperties": false
  14398. }
  14399. },
  14400. "required": ["id", "type", "properties"],
  14401. "additionalProperties": false
  14402. },
  14403. {
  14404. "type": "object",
  14405. "properties": {
  14406. "id": {
  14407. "type": "string"
  14408. },
  14409. "type": {
  14410. "type": "string",
  14411. "enum": ["mcp.browser.open.failed"]
  14412. },
  14413. "properties": {
  14414. "type": "object",
  14415. "properties": {
  14416. "mcpName": {
  14417. "type": "string"
  14418. },
  14419. "url": {
  14420. "type": "string"
  14421. }
  14422. },
  14423. "required": ["mcpName", "url"],
  14424. "additionalProperties": false
  14425. }
  14426. },
  14427. "required": ["id", "type", "properties"],
  14428. "additionalProperties": false
  14429. },
  14430. {
  14431. "type": "object",
  14432. "properties": {
  14433. "id": {
  14434. "type": "string"
  14435. },
  14436. "type": {
  14437. "type": "string",
  14438. "enum": ["command.executed"]
  14439. },
  14440. "properties": {
  14441. "type": "object",
  14442. "properties": {
  14443. "name": {
  14444. "type": "string"
  14445. },
  14446. "sessionID": {
  14447. "type": "string",
  14448. "pattern": "^ses"
  14449. },
  14450. "arguments": {
  14451. "type": "string"
  14452. },
  14453. "messageID": {
  14454. "type": "string",
  14455. "pattern": "^msg"
  14456. }
  14457. },
  14458. "required": ["name", "sessionID", "arguments", "messageID"],
  14459. "additionalProperties": false
  14460. }
  14461. },
  14462. "required": ["id", "type", "properties"],
  14463. "additionalProperties": false
  14464. },
  14465. {
  14466. "type": "object",
  14467. "properties": {
  14468. "id": {
  14469. "type": "string"
  14470. },
  14471. "type": {
  14472. "type": "string",
  14473. "enum": ["project.updated"]
  14474. },
  14475. "properties": {
  14476. "type": "object",
  14477. "properties": {
  14478. "id": {
  14479. "type": "string"
  14480. },
  14481. "worktree": {
  14482. "type": "string"
  14483. },
  14484. "vcs": {
  14485. "type": "string",
  14486. "enum": ["git"]
  14487. },
  14488. "name": {
  14489. "type": "string"
  14490. },
  14491. "icon": {
  14492. "type": "object",
  14493. "properties": {
  14494. "url": {
  14495. "type": "string"
  14496. },
  14497. "override": {
  14498. "type": "string"
  14499. },
  14500. "color": {
  14501. "type": "string"
  14502. }
  14503. },
  14504. "additionalProperties": false
  14505. },
  14506. "commands": {
  14507. "type": "object",
  14508. "properties": {
  14509. "start": {
  14510. "type": "string",
  14511. "description": "Startup script to run when creating a new workspace (worktree)"
  14512. }
  14513. },
  14514. "additionalProperties": false
  14515. },
  14516. "time": {
  14517. "type": "object",
  14518. "properties": {
  14519. "created": {
  14520. "type": "integer",
  14521. "minimum": 0
  14522. },
  14523. "updated": {
  14524. "type": "integer",
  14525. "minimum": 0
  14526. },
  14527. "initialized": {
  14528. "type": "integer",
  14529. "minimum": 0
  14530. }
  14531. },
  14532. "required": ["created", "updated"],
  14533. "additionalProperties": false
  14534. },
  14535. "sandboxes": {
  14536. "type": "array",
  14537. "items": {
  14538. "type": "string"
  14539. }
  14540. }
  14541. },
  14542. "required": ["id", "worktree", "time", "sandboxes"],
  14543. "additionalProperties": false
  14544. }
  14545. },
  14546. "required": ["id", "type", "properties"],
  14547. "additionalProperties": false
  14548. },
  14549. {
  14550. "type": "object",
  14551. "properties": {
  14552. "id": {
  14553. "type": "string"
  14554. },
  14555. "type": {
  14556. "type": "string",
  14557. "enum": ["vcs.branch.updated"]
  14558. },
  14559. "properties": {
  14560. "type": "object",
  14561. "properties": {
  14562. "branch": {
  14563. "type": "string"
  14564. }
  14565. },
  14566. "additionalProperties": false
  14567. }
  14568. },
  14569. "required": ["id", "type", "properties"],
  14570. "additionalProperties": false
  14571. },
  14572. {
  14573. "type": "object",
  14574. "properties": {
  14575. "id": {
  14576. "type": "string"
  14577. },
  14578. "type": {
  14579. "type": "string",
  14580. "enum": ["workspace.ready"]
  14581. },
  14582. "properties": {
  14583. "type": "object",
  14584. "properties": {
  14585. "name": {
  14586. "type": "string"
  14587. }
  14588. },
  14589. "required": ["name"],
  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": ["workspace.failed"]
  14605. },
  14606. "properties": {
  14607. "type": "object",
  14608. "properties": {
  14609. "message": {
  14610. "type": "string"
  14611. }
  14612. },
  14613. "required": ["message"],
  14614. "additionalProperties": false
  14615. }
  14616. },
  14617. "required": ["id", "type", "properties"],
  14618. "additionalProperties": false
  14619. },
  14620. {
  14621. "type": "object",
  14622. "properties": {
  14623. "id": {
  14624. "type": "string"
  14625. },
  14626. "type": {
  14627. "type": "string",
  14628. "enum": ["workspace.status"]
  14629. },
  14630. "properties": {
  14631. "type": "object",
  14632. "properties": {
  14633. "workspaceID": {
  14634. "type": "string",
  14635. "pattern": "^wrk"
  14636. },
  14637. "status": {
  14638. "type": "string",
  14639. "enum": ["connected", "connecting", "disconnected", "error"]
  14640. }
  14641. },
  14642. "required": ["workspaceID", "status"],
  14643. "additionalProperties": false
  14644. }
  14645. },
  14646. "required": ["id", "type", "properties"],
  14647. "additionalProperties": false
  14648. },
  14649. {
  14650. "type": "object",
  14651. "properties": {
  14652. "id": {
  14653. "type": "string"
  14654. },
  14655. "type": {
  14656. "type": "string",
  14657. "enum": ["worktree.ready"]
  14658. },
  14659. "properties": {
  14660. "type": "object",
  14661. "properties": {
  14662. "name": {
  14663. "type": "string"
  14664. },
  14665. "branch": {
  14666. "type": "string"
  14667. }
  14668. },
  14669. "required": ["name"],
  14670. "additionalProperties": false
  14671. }
  14672. },
  14673. "required": ["id", "type", "properties"],
  14674. "additionalProperties": false
  14675. },
  14676. {
  14677. "type": "object",
  14678. "properties": {
  14679. "id": {
  14680. "type": "string"
  14681. },
  14682. "type": {
  14683. "type": "string",
  14684. "enum": ["worktree.failed"]
  14685. },
  14686. "properties": {
  14687. "type": "object",
  14688. "properties": {
  14689. "message": {
  14690. "type": "string"
  14691. }
  14692. },
  14693. "required": ["message"],
  14694. "additionalProperties": false
  14695. }
  14696. },
  14697. "required": ["id", "type", "properties"],
  14698. "additionalProperties": false
  14699. },
  14700. {
  14701. "type": "object",
  14702. "properties": {
  14703. "id": {
  14704. "type": "string"
  14705. },
  14706. "type": {
  14707. "type": "string",
  14708. "enum": ["pty.created"]
  14709. },
  14710. "properties": {
  14711. "type": "object",
  14712. "properties": {
  14713. "info": {
  14714. "$ref": "#/components/schemas/Pty"
  14715. }
  14716. },
  14717. "required": ["info"],
  14718. "additionalProperties": false
  14719. }
  14720. },
  14721. "required": ["id", "type", "properties"],
  14722. "additionalProperties": false
  14723. },
  14724. {
  14725. "type": "object",
  14726. "properties": {
  14727. "id": {
  14728. "type": "string"
  14729. },
  14730. "type": {
  14731. "type": "string",
  14732. "enum": ["pty.updated"]
  14733. },
  14734. "properties": {
  14735. "type": "object",
  14736. "properties": {
  14737. "info": {
  14738. "$ref": "#/components/schemas/Pty"
  14739. }
  14740. },
  14741. "required": ["info"],
  14742. "additionalProperties": false
  14743. }
  14744. },
  14745. "required": ["id", "type", "properties"],
  14746. "additionalProperties": false
  14747. },
  14748. {
  14749. "type": "object",
  14750. "properties": {
  14751. "id": {
  14752. "type": "string"
  14753. },
  14754. "type": {
  14755. "type": "string",
  14756. "enum": ["pty.exited"]
  14757. },
  14758. "properties": {
  14759. "type": "object",
  14760. "properties": {
  14761. "id": {
  14762. "type": "string",
  14763. "pattern": "^pty"
  14764. },
  14765. "exitCode": {
  14766. "type": "integer",
  14767. "minimum": 0
  14768. }
  14769. },
  14770. "required": ["id", "exitCode"],
  14771. "additionalProperties": false
  14772. }
  14773. },
  14774. "required": ["id", "type", "properties"],
  14775. "additionalProperties": false
  14776. },
  14777. {
  14778. "type": "object",
  14779. "properties": {
  14780. "id": {
  14781. "type": "string"
  14782. },
  14783. "type": {
  14784. "type": "string",
  14785. "enum": ["pty.deleted"]
  14786. },
  14787. "properties": {
  14788. "type": "object",
  14789. "properties": {
  14790. "id": {
  14791. "type": "string",
  14792. "pattern": "^pty"
  14793. }
  14794. },
  14795. "required": ["id"],
  14796. "additionalProperties": false
  14797. }
  14798. },
  14799. "required": ["id", "type", "properties"],
  14800. "additionalProperties": false
  14801. },
  14802. {
  14803. "type": "object",
  14804. "properties": {
  14805. "id": {
  14806. "type": "string"
  14807. },
  14808. "type": {
  14809. "type": "string",
  14810. "enum": ["installation.updated"]
  14811. },
  14812. "properties": {
  14813. "type": "object",
  14814. "properties": {
  14815. "version": {
  14816. "type": "string"
  14817. }
  14818. },
  14819. "required": ["version"],
  14820. "additionalProperties": false
  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": ["installation.update-available"]
  14835. },
  14836. "properties": {
  14837. "type": "object",
  14838. "properties": {
  14839. "version": {
  14840. "type": "string"
  14841. }
  14842. },
  14843. "required": ["version"],
  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": ["server.connected"]
  14859. },
  14860. "properties": {
  14861. "type": "object",
  14862. "properties": {}
  14863. }
  14864. },
  14865. "required": ["id", "type", "properties"],
  14866. "additionalProperties": false
  14867. },
  14868. {
  14869. "type": "object",
  14870. "properties": {
  14871. "id": {
  14872. "type": "string"
  14873. },
  14874. "type": {
  14875. "type": "string",
  14876. "enum": ["global.disposed"]
  14877. },
  14878. "properties": {
  14879. "type": "object",
  14880. "properties": {}
  14881. }
  14882. },
  14883. "required": ["id", "type", "properties"],
  14884. "additionalProperties": false
  14885. }
  14886. ]
  14887. }
  14888. },
  14889. "required": ["directory", "payload"],
  14890. "additionalProperties": false
  14891. },
  14892. "LogLevel": {
  14893. "type": "string",
  14894. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  14895. "description": "Log level"
  14896. },
  14897. "ServerConfig": {
  14898. "type": "object",
  14899. "properties": {
  14900. "port": {
  14901. "type": "integer",
  14902. "exclusiveMinimum": 0
  14903. },
  14904. "hostname": {
  14905. "type": "string"
  14906. },
  14907. "mdns": {
  14908. "type": "boolean"
  14909. },
  14910. "mdnsDomain": {
  14911. "type": "string"
  14912. },
  14913. "cors": {
  14914. "type": "array",
  14915. "items": {
  14916. "type": "string"
  14917. }
  14918. }
  14919. },
  14920. "additionalProperties": false,
  14921. "description": "Server configuration for opencode serve and web commands"
  14922. },
  14923. "ReferenceConfigEntry": {
  14924. "anyOf": [
  14925. {
  14926. "type": "string"
  14927. },
  14928. {
  14929. "type": "object",
  14930. "properties": {
  14931. "repository": {
  14932. "type": "string",
  14933. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  14934. },
  14935. "branch": {
  14936. "type": "string"
  14937. }
  14938. },
  14939. "required": ["repository"],
  14940. "additionalProperties": false
  14941. },
  14942. {
  14943. "type": "object",
  14944. "properties": {
  14945. "path": {
  14946. "type": "string",
  14947. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  14948. }
  14949. },
  14950. "required": ["path"],
  14951. "additionalProperties": false
  14952. }
  14953. ]
  14954. },
  14955. "ReferenceConfig": {
  14956. "type": "object",
  14957. "additionalProperties": {
  14958. "$ref": "#/components/schemas/ReferenceConfigEntry"
  14959. }
  14960. },
  14961. "PermissionActionConfig": {
  14962. "type": "string",
  14963. "enum": ["ask", "allow", "deny"]
  14964. },
  14965. "PermissionObjectConfig": {
  14966. "type": "object",
  14967. "additionalProperties": {
  14968. "$ref": "#/components/schemas/PermissionActionConfig"
  14969. }
  14970. },
  14971. "PermissionRuleConfig": {
  14972. "anyOf": [
  14973. {
  14974. "$ref": "#/components/schemas/PermissionActionConfig"
  14975. },
  14976. {
  14977. "$ref": "#/components/schemas/PermissionObjectConfig"
  14978. }
  14979. ]
  14980. },
  14981. "PermissionConfig": {
  14982. "anyOf": [
  14983. {
  14984. "$ref": "#/components/schemas/PermissionActionConfig"
  14985. },
  14986. {
  14987. "type": "object",
  14988. "properties": {
  14989. "read": {
  14990. "$ref": "#/components/schemas/PermissionRuleConfig"
  14991. },
  14992. "edit": {
  14993. "$ref": "#/components/schemas/PermissionRuleConfig"
  14994. },
  14995. "glob": {
  14996. "$ref": "#/components/schemas/PermissionRuleConfig"
  14997. },
  14998. "grep": {
  14999. "$ref": "#/components/schemas/PermissionRuleConfig"
  15000. },
  15001. "list": {
  15002. "$ref": "#/components/schemas/PermissionRuleConfig"
  15003. },
  15004. "bash": {
  15005. "$ref": "#/components/schemas/PermissionRuleConfig"
  15006. },
  15007. "task": {
  15008. "$ref": "#/components/schemas/PermissionRuleConfig"
  15009. },
  15010. "external_directory": {
  15011. "$ref": "#/components/schemas/PermissionRuleConfig"
  15012. },
  15013. "todowrite": {
  15014. "$ref": "#/components/schemas/PermissionActionConfig"
  15015. },
  15016. "question": {
  15017. "$ref": "#/components/schemas/PermissionActionConfig"
  15018. },
  15019. "webfetch": {
  15020. "$ref": "#/components/schemas/PermissionActionConfig"
  15021. },
  15022. "websearch": {
  15023. "$ref": "#/components/schemas/PermissionActionConfig"
  15024. },
  15025. "repo_clone": {
  15026. "$ref": "#/components/schemas/PermissionRuleConfig"
  15027. },
  15028. "repo_overview": {
  15029. "$ref": "#/components/schemas/PermissionRuleConfig"
  15030. },
  15031. "lsp": {
  15032. "$ref": "#/components/schemas/PermissionRuleConfig"
  15033. },
  15034. "doom_loop": {
  15035. "$ref": "#/components/schemas/PermissionActionConfig"
  15036. },
  15037. "skill": {
  15038. "$ref": "#/components/schemas/PermissionRuleConfig"
  15039. }
  15040. },
  15041. "additionalProperties": {
  15042. "$ref": "#/components/schemas/PermissionRuleConfig"
  15043. }
  15044. }
  15045. ]
  15046. },
  15047. "AgentConfig": {
  15048. "type": "object",
  15049. "properties": {
  15050. "model": {
  15051. "type": "string"
  15052. },
  15053. "variant": {
  15054. "type": "string"
  15055. },
  15056. "temperature": {
  15057. "type": "number"
  15058. },
  15059. "top_p": {
  15060. "type": "number"
  15061. },
  15062. "prompt": {
  15063. "type": "string"
  15064. },
  15065. "tools": {
  15066. "type": "object",
  15067. "additionalProperties": {
  15068. "type": "boolean"
  15069. }
  15070. },
  15071. "disable": {
  15072. "type": "boolean"
  15073. },
  15074. "description": {
  15075. "type": "string"
  15076. },
  15077. "mode": {
  15078. "type": "string",
  15079. "enum": ["subagent", "primary", "all"]
  15080. },
  15081. "hidden": {
  15082. "type": "boolean"
  15083. },
  15084. "options": {
  15085. "type": "object"
  15086. },
  15087. "color": {
  15088. "anyOf": [
  15089. {
  15090. "type": "string",
  15091. "pattern": "^#[0-9a-fA-F]{6}$"
  15092. },
  15093. {
  15094. "type": "string",
  15095. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  15096. }
  15097. ],
  15098. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  15099. },
  15100. "steps": {
  15101. "type": "integer",
  15102. "exclusiveMinimum": 0
  15103. },
  15104. "maxSteps": {
  15105. "type": "integer",
  15106. "exclusiveMinimum": 0
  15107. },
  15108. "permission": {
  15109. "$ref": "#/components/schemas/PermissionConfig"
  15110. }
  15111. },
  15112. "additionalProperties": {}
  15113. },
  15114. "ProviderConfig": {
  15115. "type": "object",
  15116. "properties": {
  15117. "api": {
  15118. "type": "string"
  15119. },
  15120. "name": {
  15121. "type": "string"
  15122. },
  15123. "env": {
  15124. "type": "array",
  15125. "items": {
  15126. "type": "string"
  15127. }
  15128. },
  15129. "id": {
  15130. "type": "string"
  15131. },
  15132. "npm": {
  15133. "type": "string"
  15134. },
  15135. "whitelist": {
  15136. "type": "array",
  15137. "items": {
  15138. "type": "string"
  15139. }
  15140. },
  15141. "blacklist": {
  15142. "type": "array",
  15143. "items": {
  15144. "type": "string"
  15145. }
  15146. },
  15147. "options": {
  15148. "type": "object",
  15149. "properties": {
  15150. "apiKey": {
  15151. "type": "string"
  15152. },
  15153. "baseURL": {
  15154. "type": "string"
  15155. },
  15156. "enterpriseUrl": {
  15157. "type": "string"
  15158. },
  15159. "setCacheKey": {
  15160. "type": "boolean"
  15161. },
  15162. "timeout": {
  15163. "anyOf": [
  15164. {
  15165. "type": "integer",
  15166. "exclusiveMinimum": 0
  15167. },
  15168. {
  15169. "type": "boolean",
  15170. "enum": [false]
  15171. }
  15172. ],
  15173. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  15174. },
  15175. "headerTimeout": {
  15176. "anyOf": [
  15177. {
  15178. "type": "integer",
  15179. "exclusiveMinimum": 0
  15180. },
  15181. {
  15182. "type": "boolean",
  15183. "enum": [false]
  15184. }
  15185. ],
  15186. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  15187. },
  15188. "chunkTimeout": {
  15189. "type": "integer",
  15190. "exclusiveMinimum": 0
  15191. }
  15192. },
  15193. "additionalProperties": {}
  15194. },
  15195. "models": {
  15196. "type": "object",
  15197. "additionalProperties": {
  15198. "type": "object",
  15199. "properties": {
  15200. "id": {
  15201. "type": "string"
  15202. },
  15203. "name": {
  15204. "type": "string"
  15205. },
  15206. "family": {
  15207. "type": "string"
  15208. },
  15209. "release_date": {
  15210. "type": "string"
  15211. },
  15212. "attachment": {
  15213. "type": "boolean"
  15214. },
  15215. "reasoning": {
  15216. "type": "boolean"
  15217. },
  15218. "temperature": {
  15219. "type": "boolean"
  15220. },
  15221. "tool_call": {
  15222. "type": "boolean"
  15223. },
  15224. "interleaved": {
  15225. "anyOf": [
  15226. {
  15227. "type": "boolean",
  15228. "enum": [true]
  15229. },
  15230. {
  15231. "type": "object",
  15232. "properties": {
  15233. "field": {
  15234. "type": "string",
  15235. "enum": ["reasoning_content", "reasoning_details"]
  15236. }
  15237. },
  15238. "required": ["field"],
  15239. "additionalProperties": false
  15240. }
  15241. ]
  15242. },
  15243. "cost": {
  15244. "type": "object",
  15245. "properties": {
  15246. "input": {
  15247. "type": "number"
  15248. },
  15249. "output": {
  15250. "type": "number"
  15251. },
  15252. "cache_read": {
  15253. "type": "number"
  15254. },
  15255. "cache_write": {
  15256. "type": "number"
  15257. },
  15258. "context_over_200k": {
  15259. "type": "object",
  15260. "properties": {
  15261. "input": {
  15262. "type": "number"
  15263. },
  15264. "output": {
  15265. "type": "number"
  15266. },
  15267. "cache_read": {
  15268. "type": "number"
  15269. },
  15270. "cache_write": {
  15271. "type": "number"
  15272. }
  15273. },
  15274. "required": ["input", "output"],
  15275. "additionalProperties": false
  15276. }
  15277. },
  15278. "required": ["input", "output"],
  15279. "additionalProperties": false
  15280. },
  15281. "limit": {
  15282. "type": "object",
  15283. "properties": {
  15284. "context": {
  15285. "type": "number"
  15286. },
  15287. "input": {
  15288. "type": "number"
  15289. },
  15290. "output": {
  15291. "type": "number"
  15292. }
  15293. },
  15294. "required": ["context", "output"],
  15295. "additionalProperties": false
  15296. },
  15297. "modalities": {
  15298. "type": "object",
  15299. "properties": {
  15300. "input": {
  15301. "type": "array",
  15302. "items": {
  15303. "type": "string",
  15304. "enum": ["text", "audio", "image", "video", "pdf"]
  15305. }
  15306. },
  15307. "output": {
  15308. "type": "array",
  15309. "items": {
  15310. "type": "string",
  15311. "enum": ["text", "audio", "image", "video", "pdf"]
  15312. }
  15313. }
  15314. },
  15315. "additionalProperties": false
  15316. },
  15317. "experimental": {
  15318. "type": "boolean"
  15319. },
  15320. "status": {
  15321. "type": "string",
  15322. "enum": ["alpha", "beta", "deprecated", "active"]
  15323. },
  15324. "provider": {
  15325. "type": "object",
  15326. "properties": {
  15327. "npm": {
  15328. "type": "string"
  15329. },
  15330. "api": {
  15331. "type": "string"
  15332. }
  15333. },
  15334. "additionalProperties": false
  15335. },
  15336. "options": {
  15337. "type": "object"
  15338. },
  15339. "headers": {
  15340. "type": "object",
  15341. "additionalProperties": {
  15342. "type": "string"
  15343. }
  15344. },
  15345. "variants": {
  15346. "type": "object",
  15347. "additionalProperties": {
  15348. "type": "object",
  15349. "properties": {
  15350. "disabled": {
  15351. "type": "boolean"
  15352. }
  15353. },
  15354. "additionalProperties": {}
  15355. },
  15356. "description": "Variant-specific configuration"
  15357. }
  15358. },
  15359. "additionalProperties": false
  15360. }
  15361. }
  15362. },
  15363. "additionalProperties": false
  15364. },
  15365. "McpLocalConfig": {
  15366. "type": "object",
  15367. "properties": {
  15368. "type": {
  15369. "type": "string",
  15370. "enum": ["local"],
  15371. "description": "Type of MCP server connection"
  15372. },
  15373. "command": {
  15374. "type": "array",
  15375. "items": {
  15376. "type": "string"
  15377. },
  15378. "description": "Command and arguments to run the MCP server"
  15379. },
  15380. "environment": {
  15381. "type": "object",
  15382. "additionalProperties": {
  15383. "type": "string"
  15384. }
  15385. },
  15386. "enabled": {
  15387. "type": "boolean"
  15388. },
  15389. "timeout": {
  15390. "type": "integer",
  15391. "exclusiveMinimum": 0
  15392. }
  15393. },
  15394. "required": ["type", "command"],
  15395. "additionalProperties": false
  15396. },
  15397. "McpOAuthConfig": {
  15398. "type": "object",
  15399. "properties": {
  15400. "clientId": {
  15401. "type": "string"
  15402. },
  15403. "clientSecret": {
  15404. "type": "string"
  15405. },
  15406. "scope": {
  15407. "type": "string"
  15408. },
  15409. "callbackPort": {
  15410. "type": "integer",
  15411. "minimum": 1,
  15412. "maximum": 65535
  15413. },
  15414. "redirectUri": {
  15415. "type": "string"
  15416. }
  15417. },
  15418. "additionalProperties": false
  15419. },
  15420. "McpRemoteConfig": {
  15421. "type": "object",
  15422. "properties": {
  15423. "type": {
  15424. "type": "string",
  15425. "enum": ["remote"],
  15426. "description": "Type of MCP server connection"
  15427. },
  15428. "url": {
  15429. "type": "string",
  15430. "description": "URL of the remote MCP server"
  15431. },
  15432. "enabled": {
  15433. "type": "boolean"
  15434. },
  15435. "headers": {
  15436. "type": "object",
  15437. "additionalProperties": {
  15438. "type": "string"
  15439. }
  15440. },
  15441. "oauth": {
  15442. "anyOf": [
  15443. {
  15444. "$ref": "#/components/schemas/McpOAuthConfig"
  15445. },
  15446. {
  15447. "type": "boolean",
  15448. "enum": [false]
  15449. }
  15450. ],
  15451. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  15452. },
  15453. "timeout": {
  15454. "type": "integer",
  15455. "exclusiveMinimum": 0
  15456. }
  15457. },
  15458. "required": ["type", "url"],
  15459. "additionalProperties": false
  15460. },
  15461. "LayoutConfig": {
  15462. "type": "string",
  15463. "enum": ["auto", "stretch"],
  15464. "description": "@deprecated Always uses stretch layout."
  15465. },
  15466. "ImageAttachmentConfig": {
  15467. "type": "object",
  15468. "properties": {
  15469. "auto_resize": {
  15470. "type": "boolean"
  15471. },
  15472. "max_width": {
  15473. "type": "integer",
  15474. "exclusiveMinimum": 0
  15475. },
  15476. "max_height": {
  15477. "type": "integer",
  15478. "exclusiveMinimum": 0
  15479. },
  15480. "max_base64_bytes": {
  15481. "type": "integer",
  15482. "exclusiveMinimum": 0
  15483. }
  15484. },
  15485. "additionalProperties": false
  15486. },
  15487. "AttachmentConfig": {
  15488. "type": "object",
  15489. "properties": {
  15490. "image": {
  15491. "$ref": "#/components/schemas/ImageAttachmentConfig"
  15492. }
  15493. },
  15494. "additionalProperties": false
  15495. },
  15496. "Config": {
  15497. "type": "object",
  15498. "properties": {
  15499. "$schema": {
  15500. "type": "string"
  15501. },
  15502. "shell": {
  15503. "type": "string"
  15504. },
  15505. "logLevel": {
  15506. "$ref": "#/components/schemas/LogLevel"
  15507. },
  15508. "server": {
  15509. "$ref": "#/components/schemas/ServerConfig"
  15510. },
  15511. "command": {
  15512. "type": "object",
  15513. "additionalProperties": {
  15514. "type": "object",
  15515. "properties": {
  15516. "template": {
  15517. "type": "string"
  15518. },
  15519. "description": {
  15520. "type": "string"
  15521. },
  15522. "agent": {
  15523. "type": "string"
  15524. },
  15525. "model": {
  15526. "type": "string"
  15527. },
  15528. "subtask": {
  15529. "type": "boolean"
  15530. }
  15531. },
  15532. "required": ["template"],
  15533. "additionalProperties": false
  15534. }
  15535. },
  15536. "skills": {
  15537. "type": "object",
  15538. "properties": {
  15539. "paths": {
  15540. "type": "array",
  15541. "items": {
  15542. "type": "string"
  15543. }
  15544. },
  15545. "urls": {
  15546. "type": "array",
  15547. "items": {
  15548. "type": "string"
  15549. }
  15550. }
  15551. },
  15552. "additionalProperties": false
  15553. },
  15554. "reference": {
  15555. "$ref": "#/components/schemas/ReferenceConfig"
  15556. },
  15557. "watcher": {
  15558. "type": "object",
  15559. "properties": {
  15560. "ignore": {
  15561. "type": "array",
  15562. "items": {
  15563. "type": "string"
  15564. }
  15565. }
  15566. },
  15567. "additionalProperties": false
  15568. },
  15569. "snapshot": {
  15570. "type": "boolean"
  15571. },
  15572. "plugin": {
  15573. "type": "array",
  15574. "items": {
  15575. "anyOf": [
  15576. {
  15577. "type": "string"
  15578. },
  15579. {
  15580. "type": "array",
  15581. "prefixItems": [
  15582. {
  15583. "type": "string"
  15584. },
  15585. {
  15586. "type": "object"
  15587. }
  15588. ],
  15589. "maxItems": 2,
  15590. "minItems": 2
  15591. }
  15592. ]
  15593. }
  15594. },
  15595. "share": {
  15596. "type": "string",
  15597. "enum": ["manual", "auto", "disabled"]
  15598. },
  15599. "autoshare": {
  15600. "type": "boolean"
  15601. },
  15602. "autoupdate": {
  15603. "anyOf": [
  15604. {
  15605. "type": "boolean"
  15606. },
  15607. {
  15608. "type": "string",
  15609. "enum": ["notify"]
  15610. }
  15611. ],
  15612. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  15613. },
  15614. "disabled_providers": {
  15615. "type": "array",
  15616. "items": {
  15617. "type": "string"
  15618. }
  15619. },
  15620. "enabled_providers": {
  15621. "type": "array",
  15622. "items": {
  15623. "type": "string"
  15624. }
  15625. },
  15626. "model": {
  15627. "type": "string"
  15628. },
  15629. "small_model": {
  15630. "type": "string"
  15631. },
  15632. "default_agent": {
  15633. "type": "string"
  15634. },
  15635. "username": {
  15636. "type": "string"
  15637. },
  15638. "mode": {
  15639. "type": "object",
  15640. "properties": {
  15641. "build": {
  15642. "$ref": "#/components/schemas/AgentConfig"
  15643. },
  15644. "plan": {
  15645. "$ref": "#/components/schemas/AgentConfig"
  15646. }
  15647. },
  15648. "additionalProperties": {
  15649. "$ref": "#/components/schemas/AgentConfig"
  15650. }
  15651. },
  15652. "agent": {
  15653. "type": "object",
  15654. "properties": {
  15655. "plan": {
  15656. "$ref": "#/components/schemas/AgentConfig"
  15657. },
  15658. "build": {
  15659. "$ref": "#/components/schemas/AgentConfig"
  15660. },
  15661. "general": {
  15662. "$ref": "#/components/schemas/AgentConfig"
  15663. },
  15664. "explore": {
  15665. "$ref": "#/components/schemas/AgentConfig"
  15666. },
  15667. "scout": {
  15668. "$ref": "#/components/schemas/AgentConfig"
  15669. },
  15670. "title": {
  15671. "$ref": "#/components/schemas/AgentConfig"
  15672. },
  15673. "summary": {
  15674. "$ref": "#/components/schemas/AgentConfig"
  15675. },
  15676. "compaction": {
  15677. "$ref": "#/components/schemas/AgentConfig"
  15678. }
  15679. },
  15680. "additionalProperties": {
  15681. "$ref": "#/components/schemas/AgentConfig"
  15682. }
  15683. },
  15684. "provider": {
  15685. "type": "object",
  15686. "additionalProperties": {
  15687. "$ref": "#/components/schemas/ProviderConfig"
  15688. }
  15689. },
  15690. "mcp": {
  15691. "type": "object",
  15692. "additionalProperties": {
  15693. "anyOf": [
  15694. {
  15695. "$ref": "#/components/schemas/McpLocalConfig"
  15696. },
  15697. {
  15698. "$ref": "#/components/schemas/McpRemoteConfig"
  15699. },
  15700. {
  15701. "type": "object",
  15702. "properties": {
  15703. "enabled": {
  15704. "type": "boolean"
  15705. }
  15706. },
  15707. "required": ["enabled"],
  15708. "additionalProperties": false
  15709. }
  15710. ]
  15711. }
  15712. },
  15713. "formatter": {
  15714. "anyOf": [
  15715. {
  15716. "type": "boolean"
  15717. },
  15718. {
  15719. "type": "object",
  15720. "additionalProperties": {
  15721. "type": "object",
  15722. "properties": {
  15723. "disabled": {
  15724. "type": "boolean"
  15725. },
  15726. "command": {
  15727. "type": "array",
  15728. "items": {
  15729. "type": "string"
  15730. }
  15731. },
  15732. "environment": {
  15733. "type": "object",
  15734. "additionalProperties": {
  15735. "type": "string"
  15736. }
  15737. },
  15738. "extensions": {
  15739. "type": "array",
  15740. "items": {
  15741. "type": "string"
  15742. }
  15743. }
  15744. },
  15745. "additionalProperties": false
  15746. }
  15747. }
  15748. ],
  15749. "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."
  15750. },
  15751. "lsp": {
  15752. "anyOf": [
  15753. {
  15754. "type": "boolean"
  15755. },
  15756. {
  15757. "type": "object",
  15758. "additionalProperties": {
  15759. "anyOf": [
  15760. {
  15761. "type": "object",
  15762. "properties": {
  15763. "disabled": {
  15764. "type": "boolean",
  15765. "enum": [true]
  15766. }
  15767. },
  15768. "required": ["disabled"],
  15769. "additionalProperties": false
  15770. },
  15771. {
  15772. "type": "object",
  15773. "properties": {
  15774. "command": {
  15775. "type": "array",
  15776. "items": {
  15777. "type": "string"
  15778. }
  15779. },
  15780. "extensions": {
  15781. "type": "array",
  15782. "items": {
  15783. "type": "string"
  15784. }
  15785. },
  15786. "disabled": {
  15787. "type": "boolean"
  15788. },
  15789. "env": {
  15790. "type": "object",
  15791. "additionalProperties": {
  15792. "type": "string"
  15793. }
  15794. },
  15795. "initialization": {
  15796. "type": "object"
  15797. }
  15798. },
  15799. "required": ["command"],
  15800. "additionalProperties": false
  15801. }
  15802. ]
  15803. }
  15804. }
  15805. ],
  15806. "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."
  15807. },
  15808. "instructions": {
  15809. "type": "array",
  15810. "items": {
  15811. "type": "string"
  15812. }
  15813. },
  15814. "layout": {
  15815. "$ref": "#/components/schemas/LayoutConfig"
  15816. },
  15817. "permission": {
  15818. "$ref": "#/components/schemas/PermissionConfig"
  15819. },
  15820. "tools": {
  15821. "type": "object",
  15822. "additionalProperties": {
  15823. "type": "boolean"
  15824. }
  15825. },
  15826. "attachment": {
  15827. "$ref": "#/components/schemas/AttachmentConfig"
  15828. },
  15829. "enterprise": {
  15830. "type": "object",
  15831. "properties": {
  15832. "url": {
  15833. "type": "string"
  15834. }
  15835. },
  15836. "additionalProperties": false
  15837. },
  15838. "tool_output": {
  15839. "type": "object",
  15840. "properties": {
  15841. "max_lines": {
  15842. "type": "integer",
  15843. "exclusiveMinimum": 0
  15844. },
  15845. "max_bytes": {
  15846. "type": "integer",
  15847. "exclusiveMinimum": 0
  15848. }
  15849. },
  15850. "additionalProperties": false
  15851. },
  15852. "compaction": {
  15853. "type": "object",
  15854. "properties": {
  15855. "auto": {
  15856. "type": "boolean"
  15857. },
  15858. "prune": {
  15859. "type": "boolean"
  15860. },
  15861. "tail_turns": {
  15862. "type": "integer",
  15863. "minimum": 0
  15864. },
  15865. "preserve_recent_tokens": {
  15866. "type": "integer",
  15867. "minimum": 0
  15868. },
  15869. "reserved": {
  15870. "type": "integer",
  15871. "minimum": 0
  15872. }
  15873. },
  15874. "additionalProperties": false
  15875. },
  15876. "experimental": {
  15877. "type": "object",
  15878. "properties": {
  15879. "disable_paste_summary": {
  15880. "type": "boolean"
  15881. },
  15882. "batch_tool": {
  15883. "type": "boolean"
  15884. },
  15885. "openTelemetry": {
  15886. "type": "boolean"
  15887. },
  15888. "primary_tools": {
  15889. "type": "array",
  15890. "items": {
  15891. "type": "string"
  15892. }
  15893. },
  15894. "continue_loop_on_deny": {
  15895. "type": "boolean"
  15896. },
  15897. "mcp_timeout": {
  15898. "type": "integer",
  15899. "exclusiveMinimum": 0
  15900. },
  15901. "policies": {
  15902. "type": "array",
  15903. "items": {
  15904. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  15905. }
  15906. }
  15907. },
  15908. "additionalProperties": false
  15909. }
  15910. },
  15911. "additionalProperties": false
  15912. },
  15913. "Model": {
  15914. "type": "object",
  15915. "properties": {
  15916. "id": {
  15917. "type": "string"
  15918. },
  15919. "providerID": {
  15920. "type": "string"
  15921. },
  15922. "api": {
  15923. "type": "object",
  15924. "properties": {
  15925. "id": {
  15926. "type": "string"
  15927. },
  15928. "url": {
  15929. "type": "string"
  15930. },
  15931. "npm": {
  15932. "type": "string"
  15933. }
  15934. },
  15935. "required": ["id", "url", "npm"],
  15936. "additionalProperties": false
  15937. },
  15938. "name": {
  15939. "type": "string"
  15940. },
  15941. "family": {
  15942. "type": "string"
  15943. },
  15944. "capabilities": {
  15945. "type": "object",
  15946. "properties": {
  15947. "temperature": {
  15948. "type": "boolean"
  15949. },
  15950. "reasoning": {
  15951. "type": "boolean"
  15952. },
  15953. "attachment": {
  15954. "type": "boolean"
  15955. },
  15956. "toolcall": {
  15957. "type": "boolean"
  15958. },
  15959. "input": {
  15960. "type": "object",
  15961. "properties": {
  15962. "text": {
  15963. "type": "boolean"
  15964. },
  15965. "audio": {
  15966. "type": "boolean"
  15967. },
  15968. "image": {
  15969. "type": "boolean"
  15970. },
  15971. "video": {
  15972. "type": "boolean"
  15973. },
  15974. "pdf": {
  15975. "type": "boolean"
  15976. }
  15977. },
  15978. "required": ["text", "audio", "image", "video", "pdf"],
  15979. "additionalProperties": false
  15980. },
  15981. "output": {
  15982. "type": "object",
  15983. "properties": {
  15984. "text": {
  15985. "type": "boolean"
  15986. },
  15987. "audio": {
  15988. "type": "boolean"
  15989. },
  15990. "image": {
  15991. "type": "boolean"
  15992. },
  15993. "video": {
  15994. "type": "boolean"
  15995. },
  15996. "pdf": {
  15997. "type": "boolean"
  15998. }
  15999. },
  16000. "required": ["text", "audio", "image", "video", "pdf"],
  16001. "additionalProperties": false
  16002. },
  16003. "interleaved": {
  16004. "anyOf": [
  16005. {
  16006. "type": "boolean"
  16007. },
  16008. {
  16009. "type": "object",
  16010. "properties": {
  16011. "field": {
  16012. "type": "string",
  16013. "enum": ["reasoning_content", "reasoning_details"]
  16014. }
  16015. },
  16016. "required": ["field"],
  16017. "additionalProperties": false
  16018. }
  16019. ]
  16020. }
  16021. },
  16022. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  16023. "additionalProperties": false
  16024. },
  16025. "cost": {
  16026. "type": "object",
  16027. "properties": {
  16028. "input": {
  16029. "type": "number"
  16030. },
  16031. "output": {
  16032. "type": "number"
  16033. },
  16034. "cache": {
  16035. "type": "object",
  16036. "properties": {
  16037. "read": {
  16038. "type": "number"
  16039. },
  16040. "write": {
  16041. "type": "number"
  16042. }
  16043. },
  16044. "required": ["read", "write"],
  16045. "additionalProperties": false
  16046. },
  16047. "tiers": {
  16048. "type": "array",
  16049. "items": {
  16050. "type": "object",
  16051. "properties": {
  16052. "input": {
  16053. "type": "number"
  16054. },
  16055. "output": {
  16056. "type": "number"
  16057. },
  16058. "cache": {
  16059. "type": "object",
  16060. "properties": {
  16061. "read": {
  16062. "type": "number"
  16063. },
  16064. "write": {
  16065. "type": "number"
  16066. }
  16067. },
  16068. "required": ["read", "write"],
  16069. "additionalProperties": false
  16070. },
  16071. "tier": {
  16072. "type": "object",
  16073. "properties": {
  16074. "type": {
  16075. "type": "string",
  16076. "enum": ["context"]
  16077. },
  16078. "size": {
  16079. "type": "number"
  16080. }
  16081. },
  16082. "required": ["type", "size"],
  16083. "additionalProperties": false
  16084. }
  16085. },
  16086. "required": ["input", "output", "cache", "tier"],
  16087. "additionalProperties": false
  16088. }
  16089. },
  16090. "experimentalOver200K": {
  16091. "type": "object",
  16092. "properties": {
  16093. "input": {
  16094. "type": "number"
  16095. },
  16096. "output": {
  16097. "type": "number"
  16098. },
  16099. "cache": {
  16100. "type": "object",
  16101. "properties": {
  16102. "read": {
  16103. "type": "number"
  16104. },
  16105. "write": {
  16106. "type": "number"
  16107. }
  16108. },
  16109. "required": ["read", "write"],
  16110. "additionalProperties": false
  16111. }
  16112. },
  16113. "required": ["input", "output", "cache"],
  16114. "additionalProperties": false
  16115. }
  16116. },
  16117. "required": ["input", "output", "cache"],
  16118. "additionalProperties": false
  16119. },
  16120. "limit": {
  16121. "type": "object",
  16122. "properties": {
  16123. "context": {
  16124. "type": "number"
  16125. },
  16126. "input": {
  16127. "type": "number"
  16128. },
  16129. "output": {
  16130. "type": "number"
  16131. }
  16132. },
  16133. "required": ["context", "output"],
  16134. "additionalProperties": false
  16135. },
  16136. "status": {
  16137. "type": "string",
  16138. "enum": ["alpha", "beta", "deprecated", "active"]
  16139. },
  16140. "options": {
  16141. "type": "object"
  16142. },
  16143. "headers": {
  16144. "type": "object",
  16145. "additionalProperties": {
  16146. "type": "string"
  16147. }
  16148. },
  16149. "release_date": {
  16150. "type": "string"
  16151. },
  16152. "variants": {
  16153. "type": "object",
  16154. "additionalProperties": {
  16155. "type": "object"
  16156. }
  16157. }
  16158. },
  16159. "required": [
  16160. "id",
  16161. "providerID",
  16162. "api",
  16163. "name",
  16164. "capabilities",
  16165. "cost",
  16166. "limit",
  16167. "status",
  16168. "options",
  16169. "headers",
  16170. "release_date"
  16171. ],
  16172. "additionalProperties": false
  16173. },
  16174. "Provider": {
  16175. "type": "object",
  16176. "properties": {
  16177. "id": {
  16178. "type": "string"
  16179. },
  16180. "name": {
  16181. "type": "string"
  16182. },
  16183. "source": {
  16184. "type": "string",
  16185. "enum": ["env", "config", "custom", "api"]
  16186. },
  16187. "env": {
  16188. "type": "array",
  16189. "items": {
  16190. "type": "string"
  16191. }
  16192. },
  16193. "key": {
  16194. "type": "string"
  16195. },
  16196. "options": {
  16197. "type": "object"
  16198. },
  16199. "models": {
  16200. "type": "object",
  16201. "additionalProperties": {
  16202. "$ref": "#/components/schemas/Model"
  16203. }
  16204. }
  16205. },
  16206. "required": ["id", "name", "source", "env", "options", "models"],
  16207. "additionalProperties": false
  16208. },
  16209. "ConsoleState": {
  16210. "type": "object",
  16211. "properties": {
  16212. "consoleManagedProviders": {
  16213. "type": "array",
  16214. "items": {
  16215. "type": "string"
  16216. }
  16217. },
  16218. "activeOrgName": {
  16219. "type": "string"
  16220. },
  16221. "switchableOrgCount": {
  16222. "type": "integer",
  16223. "minimum": 0
  16224. }
  16225. },
  16226. "required": ["consoleManagedProviders", "switchableOrgCount"],
  16227. "additionalProperties": false
  16228. },
  16229. "effect_HttpApiError_InternalServerError": {
  16230. "type": "object",
  16231. "properties": {
  16232. "_tag": {
  16233. "type": "string",
  16234. "enum": ["InternalServerError"]
  16235. }
  16236. },
  16237. "required": ["_tag"],
  16238. "additionalProperties": false
  16239. },
  16240. "ToolListItem": {
  16241. "type": "object",
  16242. "properties": {
  16243. "id": {
  16244. "type": "string"
  16245. },
  16246. "description": {
  16247. "type": "string"
  16248. },
  16249. "parameters": {}
  16250. },
  16251. "required": ["id", "description", "parameters"],
  16252. "additionalProperties": false
  16253. },
  16254. "ToolList": {
  16255. "type": "array",
  16256. "items": {
  16257. "$ref": "#/components/schemas/ToolListItem"
  16258. }
  16259. },
  16260. "ToolIDs": {
  16261. "type": "array",
  16262. "items": {
  16263. "type": "string"
  16264. }
  16265. },
  16266. "WorktreeError": {
  16267. "type": "object",
  16268. "properties": {
  16269. "name": {
  16270. "type": "string",
  16271. "enum": [
  16272. "WorktreeNotGitError",
  16273. "WorktreeNameGenerationFailedError",
  16274. "WorktreeCreateFailedError",
  16275. "WorktreeStartCommandFailedError",
  16276. "WorktreeRemoveFailedError",
  16277. "WorktreeResetFailedError",
  16278. "WorktreeListFailedError"
  16279. ]
  16280. },
  16281. "data": {
  16282. "type": "object",
  16283. "properties": {
  16284. "message": {
  16285. "type": "string"
  16286. }
  16287. },
  16288. "required": ["message"],
  16289. "additionalProperties": false
  16290. }
  16291. },
  16292. "required": ["name", "data"],
  16293. "additionalProperties": false
  16294. },
  16295. "WorktreeCreateInput": {
  16296. "type": "object",
  16297. "properties": {
  16298. "name": {
  16299. "type": "string"
  16300. },
  16301. "startCommand": {
  16302. "type": "string",
  16303. "description": "Additional startup script to run after the project's start command"
  16304. }
  16305. },
  16306. "additionalProperties": false
  16307. },
  16308. "Worktree": {
  16309. "type": "object",
  16310. "properties": {
  16311. "name": {
  16312. "type": "string"
  16313. },
  16314. "branch": {
  16315. "type": "string"
  16316. },
  16317. "directory": {
  16318. "type": "string"
  16319. }
  16320. },
  16321. "required": ["name", "directory"],
  16322. "additionalProperties": false
  16323. },
  16324. "WorktreeRemoveInput": {
  16325. "type": "object",
  16326. "properties": {
  16327. "directory": {
  16328. "type": "string"
  16329. }
  16330. },
  16331. "required": ["directory"],
  16332. "additionalProperties": false
  16333. },
  16334. "WorktreeResetInput": {
  16335. "type": "object",
  16336. "properties": {
  16337. "directory": {
  16338. "type": "string"
  16339. }
  16340. },
  16341. "required": ["directory"],
  16342. "additionalProperties": false
  16343. },
  16344. "PermissionAction": {
  16345. "type": "string",
  16346. "enum": ["allow", "deny", "ask"]
  16347. },
  16348. "PermissionRule": {
  16349. "type": "object",
  16350. "properties": {
  16351. "permission": {
  16352. "type": "string"
  16353. },
  16354. "pattern": {
  16355. "type": "string"
  16356. },
  16357. "action": {
  16358. "$ref": "#/components/schemas/PermissionAction"
  16359. }
  16360. },
  16361. "required": ["permission", "pattern", "action"],
  16362. "additionalProperties": false
  16363. },
  16364. "PermissionRuleset": {
  16365. "type": "array",
  16366. "items": {
  16367. "$ref": "#/components/schemas/PermissionRule"
  16368. }
  16369. },
  16370. "ProjectSummary": {
  16371. "type": "object",
  16372. "properties": {
  16373. "id": {
  16374. "type": "string"
  16375. },
  16376. "name": {
  16377. "type": "string"
  16378. },
  16379. "worktree": {
  16380. "type": "string"
  16381. }
  16382. },
  16383. "required": ["id", "worktree"],
  16384. "additionalProperties": false
  16385. },
  16386. "GlobalSession": {
  16387. "type": "object",
  16388. "properties": {
  16389. "id": {
  16390. "type": "string",
  16391. "pattern": "^ses"
  16392. },
  16393. "slug": {
  16394. "type": "string"
  16395. },
  16396. "projectID": {
  16397. "type": "string"
  16398. },
  16399. "workspaceID": {
  16400. "type": "string",
  16401. "pattern": "^wrk"
  16402. },
  16403. "directory": {
  16404. "type": "string"
  16405. },
  16406. "path": {
  16407. "type": "string"
  16408. },
  16409. "parentID": {
  16410. "type": "string",
  16411. "pattern": "^ses"
  16412. },
  16413. "summary": {
  16414. "type": "object",
  16415. "properties": {
  16416. "additions": {
  16417. "type": "number"
  16418. },
  16419. "deletions": {
  16420. "type": "number"
  16421. },
  16422. "files": {
  16423. "type": "number"
  16424. },
  16425. "diffs": {
  16426. "type": "array",
  16427. "items": {
  16428. "$ref": "#/components/schemas/SnapshotFileDiff"
  16429. }
  16430. }
  16431. },
  16432. "required": ["additions", "deletions", "files"],
  16433. "additionalProperties": false
  16434. },
  16435. "cost": {
  16436. "type": "number"
  16437. },
  16438. "tokens": {
  16439. "type": "object",
  16440. "properties": {
  16441. "input": {
  16442. "type": "number"
  16443. },
  16444. "output": {
  16445. "type": "number"
  16446. },
  16447. "reasoning": {
  16448. "type": "number"
  16449. },
  16450. "cache": {
  16451. "type": "object",
  16452. "properties": {
  16453. "read": {
  16454. "type": "number"
  16455. },
  16456. "write": {
  16457. "type": "number"
  16458. }
  16459. },
  16460. "required": ["read", "write"],
  16461. "additionalProperties": false
  16462. }
  16463. },
  16464. "required": ["input", "output", "reasoning", "cache"],
  16465. "additionalProperties": false
  16466. },
  16467. "share": {
  16468. "type": "object",
  16469. "properties": {
  16470. "url": {
  16471. "type": "string"
  16472. }
  16473. },
  16474. "required": ["url"],
  16475. "additionalProperties": false
  16476. },
  16477. "title": {
  16478. "type": "string"
  16479. },
  16480. "agent": {
  16481. "type": "string"
  16482. },
  16483. "model": {
  16484. "type": "object",
  16485. "properties": {
  16486. "id": {
  16487. "type": "string"
  16488. },
  16489. "providerID": {
  16490. "type": "string"
  16491. },
  16492. "variant": {
  16493. "type": "string"
  16494. }
  16495. },
  16496. "required": ["id", "providerID"],
  16497. "additionalProperties": false
  16498. },
  16499. "version": {
  16500. "type": "string"
  16501. },
  16502. "metadata": {
  16503. "type": "object"
  16504. },
  16505. "time": {
  16506. "type": "object",
  16507. "properties": {
  16508. "created": {
  16509. "type": "integer",
  16510. "minimum": 0
  16511. },
  16512. "updated": {
  16513. "type": "integer",
  16514. "minimum": 0
  16515. },
  16516. "compacting": {
  16517. "type": "integer",
  16518. "minimum": 0
  16519. },
  16520. "archived": {
  16521. "type": "number"
  16522. }
  16523. },
  16524. "required": ["created", "updated"],
  16525. "additionalProperties": false
  16526. },
  16527. "permission": {
  16528. "$ref": "#/components/schemas/PermissionRuleset"
  16529. },
  16530. "revert": {
  16531. "type": "object",
  16532. "properties": {
  16533. "messageID": {
  16534. "type": "string",
  16535. "pattern": "^msg"
  16536. },
  16537. "partID": {
  16538. "type": "string",
  16539. "pattern": "^prt"
  16540. },
  16541. "snapshot": {
  16542. "type": "string"
  16543. },
  16544. "diff": {
  16545. "type": "string"
  16546. }
  16547. },
  16548. "required": ["messageID"],
  16549. "additionalProperties": false
  16550. },
  16551. "project": {
  16552. "anyOf": [
  16553. {
  16554. "$ref": "#/components/schemas/ProjectSummary"
  16555. },
  16556. {
  16557. "type": "null"
  16558. }
  16559. ]
  16560. }
  16561. },
  16562. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  16563. "additionalProperties": false
  16564. },
  16565. "McpResource": {
  16566. "type": "object",
  16567. "properties": {
  16568. "name": {
  16569. "type": "string"
  16570. },
  16571. "uri": {
  16572. "type": "string"
  16573. },
  16574. "description": {
  16575. "type": "string"
  16576. },
  16577. "mimeType": {
  16578. "type": "string"
  16579. },
  16580. "client": {
  16581. "type": "string"
  16582. }
  16583. },
  16584. "required": ["name", "uri", "client"],
  16585. "additionalProperties": false
  16586. },
  16587. "Symbol": {
  16588. "type": "object",
  16589. "properties": {
  16590. "name": {
  16591. "type": "string"
  16592. },
  16593. "kind": {
  16594. "type": "integer",
  16595. "minimum": 0
  16596. },
  16597. "location": {
  16598. "type": "object",
  16599. "properties": {
  16600. "uri": {
  16601. "type": "string"
  16602. },
  16603. "range": {
  16604. "$ref": "#/components/schemas/Range"
  16605. }
  16606. },
  16607. "required": ["uri", "range"],
  16608. "additionalProperties": false
  16609. }
  16610. },
  16611. "required": ["name", "kind", "location"],
  16612. "additionalProperties": false
  16613. },
  16614. "FileNode": {
  16615. "type": "object",
  16616. "properties": {
  16617. "name": {
  16618. "type": "string"
  16619. },
  16620. "path": {
  16621. "type": "string"
  16622. },
  16623. "absolute": {
  16624. "type": "string"
  16625. },
  16626. "type": {
  16627. "type": "string",
  16628. "enum": ["file", "directory"]
  16629. },
  16630. "ignored": {
  16631. "type": "boolean"
  16632. }
  16633. },
  16634. "required": ["name", "path", "absolute", "type", "ignored"],
  16635. "additionalProperties": false
  16636. },
  16637. "FileContent": {
  16638. "type": "object",
  16639. "properties": {
  16640. "type": {
  16641. "type": "string",
  16642. "enum": ["text", "binary"]
  16643. },
  16644. "content": {
  16645. "type": "string"
  16646. },
  16647. "diff": {
  16648. "type": "string"
  16649. },
  16650. "patch": {
  16651. "type": "object",
  16652. "properties": {
  16653. "oldFileName": {
  16654. "type": "string"
  16655. },
  16656. "newFileName": {
  16657. "type": "string"
  16658. },
  16659. "oldHeader": {
  16660. "type": "string"
  16661. },
  16662. "newHeader": {
  16663. "type": "string"
  16664. },
  16665. "hunks": {
  16666. "type": "array",
  16667. "items": {
  16668. "type": "object",
  16669. "properties": {
  16670. "oldStart": {
  16671. "type": "integer",
  16672. "minimum": 0
  16673. },
  16674. "oldLines": {
  16675. "type": "integer",
  16676. "minimum": 0
  16677. },
  16678. "newStart": {
  16679. "type": "integer",
  16680. "minimum": 0
  16681. },
  16682. "newLines": {
  16683. "type": "integer",
  16684. "minimum": 0
  16685. },
  16686. "lines": {
  16687. "type": "array",
  16688. "items": {
  16689. "type": "string"
  16690. }
  16691. }
  16692. },
  16693. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  16694. "additionalProperties": false
  16695. }
  16696. },
  16697. "index": {
  16698. "type": "string"
  16699. }
  16700. },
  16701. "required": ["oldFileName", "newFileName", "hunks"],
  16702. "additionalProperties": false
  16703. },
  16704. "encoding": {
  16705. "type": "string",
  16706. "enum": ["base64"]
  16707. },
  16708. "mimeType": {
  16709. "type": "string"
  16710. }
  16711. },
  16712. "required": ["type", "content"],
  16713. "additionalProperties": false
  16714. },
  16715. "File": {
  16716. "type": "object",
  16717. "properties": {
  16718. "path": {
  16719. "type": "string"
  16720. },
  16721. "added": {
  16722. "type": "integer",
  16723. "minimum": 0
  16724. },
  16725. "removed": {
  16726. "type": "integer",
  16727. "minimum": 0
  16728. },
  16729. "status": {
  16730. "type": "string",
  16731. "enum": ["added", "deleted", "modified"]
  16732. }
  16733. },
  16734. "required": ["path", "added", "removed", "status"],
  16735. "additionalProperties": false
  16736. },
  16737. "Path": {
  16738. "type": "object",
  16739. "properties": {
  16740. "home": {
  16741. "type": "string"
  16742. },
  16743. "state": {
  16744. "type": "string"
  16745. },
  16746. "config": {
  16747. "type": "string"
  16748. },
  16749. "worktree": {
  16750. "type": "string"
  16751. },
  16752. "directory": {
  16753. "type": "string"
  16754. }
  16755. },
  16756. "required": ["home", "state", "config", "worktree", "directory"],
  16757. "additionalProperties": false
  16758. },
  16759. "VcsInfo": {
  16760. "type": "object",
  16761. "properties": {
  16762. "branch": {
  16763. "type": "string"
  16764. },
  16765. "default_branch": {
  16766. "type": "string"
  16767. }
  16768. },
  16769. "additionalProperties": false
  16770. },
  16771. "VcsFileStatus": {
  16772. "type": "object",
  16773. "properties": {
  16774. "file": {
  16775. "type": "string"
  16776. },
  16777. "additions": {
  16778. "type": "number"
  16779. },
  16780. "deletions": {
  16781. "type": "number"
  16782. },
  16783. "status": {
  16784. "type": "string",
  16785. "enum": ["added", "deleted", "modified"]
  16786. }
  16787. },
  16788. "required": ["file", "additions", "deletions", "status"],
  16789. "additionalProperties": false
  16790. },
  16791. "VcsFileDiff": {
  16792. "type": "object",
  16793. "properties": {
  16794. "file": {
  16795. "type": "string"
  16796. },
  16797. "patch": {
  16798. "type": "string"
  16799. },
  16800. "additions": {
  16801. "type": "number"
  16802. },
  16803. "deletions": {
  16804. "type": "number"
  16805. },
  16806. "status": {
  16807. "type": "string",
  16808. "enum": ["added", "deleted", "modified"]
  16809. }
  16810. },
  16811. "required": ["file", "additions", "deletions"],
  16812. "additionalProperties": false
  16813. },
  16814. "VcsApplyError": {
  16815. "type": "object",
  16816. "properties": {
  16817. "name": {
  16818. "type": "string",
  16819. "enum": ["VcsApplyError"]
  16820. },
  16821. "data": {
  16822. "type": "object",
  16823. "properties": {
  16824. "message": {
  16825. "type": "string"
  16826. },
  16827. "reason": {
  16828. "type": "string",
  16829. "enum": ["non-git", "not-clean"]
  16830. }
  16831. },
  16832. "required": ["message", "reason"],
  16833. "additionalProperties": false
  16834. }
  16835. },
  16836. "required": ["name", "data"],
  16837. "additionalProperties": false
  16838. },
  16839. "Command": {
  16840. "type": "object",
  16841. "properties": {
  16842. "name": {
  16843. "type": "string"
  16844. },
  16845. "description": {
  16846. "type": "string"
  16847. },
  16848. "agent": {
  16849. "type": "string"
  16850. },
  16851. "model": {
  16852. "type": "string"
  16853. },
  16854. "source": {
  16855. "type": "string",
  16856. "enum": ["command", "mcp", "skill"]
  16857. },
  16858. "template": {
  16859. "type": "string"
  16860. },
  16861. "subtask": {
  16862. "type": "boolean"
  16863. },
  16864. "hints": {
  16865. "type": "array",
  16866. "items": {
  16867. "type": "string"
  16868. }
  16869. }
  16870. },
  16871. "required": ["name", "template", "hints"],
  16872. "additionalProperties": false
  16873. },
  16874. "Agent": {
  16875. "type": "object",
  16876. "properties": {
  16877. "name": {
  16878. "type": "string"
  16879. },
  16880. "description": {
  16881. "type": "string"
  16882. },
  16883. "mode": {
  16884. "type": "string",
  16885. "enum": ["subagent", "primary", "all"]
  16886. },
  16887. "native": {
  16888. "type": "boolean"
  16889. },
  16890. "hidden": {
  16891. "type": "boolean"
  16892. },
  16893. "topP": {
  16894. "type": "number"
  16895. },
  16896. "temperature": {
  16897. "type": "number"
  16898. },
  16899. "color": {
  16900. "type": "string"
  16901. },
  16902. "permission": {
  16903. "$ref": "#/components/schemas/PermissionRuleset"
  16904. },
  16905. "model": {
  16906. "type": "object",
  16907. "properties": {
  16908. "modelID": {
  16909. "type": "string"
  16910. },
  16911. "providerID": {
  16912. "type": "string"
  16913. }
  16914. },
  16915. "required": ["modelID", "providerID"],
  16916. "additionalProperties": false
  16917. },
  16918. "variant": {
  16919. "type": "string"
  16920. },
  16921. "prompt": {
  16922. "type": "string"
  16923. },
  16924. "options": {
  16925. "type": "object"
  16926. },
  16927. "steps": {
  16928. "type": "number"
  16929. }
  16930. },
  16931. "required": ["name", "mode", "permission", "options"],
  16932. "additionalProperties": false
  16933. },
  16934. "LSPStatus": {
  16935. "type": "object",
  16936. "properties": {
  16937. "id": {
  16938. "type": "string"
  16939. },
  16940. "name": {
  16941. "type": "string"
  16942. },
  16943. "root": {
  16944. "type": "string"
  16945. },
  16946. "status": {
  16947. "type": "string",
  16948. "enum": ["connected", "error"]
  16949. }
  16950. },
  16951. "required": ["id", "name", "root", "status"],
  16952. "additionalProperties": false
  16953. },
  16954. "FormatterStatus": {
  16955. "type": "object",
  16956. "properties": {
  16957. "name": {
  16958. "type": "string"
  16959. },
  16960. "extensions": {
  16961. "type": "array",
  16962. "items": {
  16963. "type": "string"
  16964. }
  16965. },
  16966. "enabled": {
  16967. "type": "boolean"
  16968. }
  16969. },
  16970. "required": ["name", "extensions", "enabled"],
  16971. "additionalProperties": false
  16972. },
  16973. "MCPStatusConnected": {
  16974. "type": "object",
  16975. "properties": {
  16976. "status": {
  16977. "type": "string",
  16978. "enum": ["connected"]
  16979. }
  16980. },
  16981. "required": ["status"],
  16982. "additionalProperties": false
  16983. },
  16984. "MCPStatusDisabled": {
  16985. "type": "object",
  16986. "properties": {
  16987. "status": {
  16988. "type": "string",
  16989. "enum": ["disabled"]
  16990. }
  16991. },
  16992. "required": ["status"],
  16993. "additionalProperties": false
  16994. },
  16995. "MCPStatusFailed": {
  16996. "type": "object",
  16997. "properties": {
  16998. "status": {
  16999. "type": "string",
  17000. "enum": ["failed"]
  17001. },
  17002. "error": {
  17003. "type": "string"
  17004. }
  17005. },
  17006. "required": ["status", "error"],
  17007. "additionalProperties": false
  17008. },
  17009. "MCPStatusNeedsAuth": {
  17010. "type": "object",
  17011. "properties": {
  17012. "status": {
  17013. "type": "string",
  17014. "enum": ["needs_auth"]
  17015. }
  17016. },
  17017. "required": ["status"],
  17018. "additionalProperties": false
  17019. },
  17020. "MCPStatusNeedsClientRegistration": {
  17021. "type": "object",
  17022. "properties": {
  17023. "status": {
  17024. "type": "string",
  17025. "enum": ["needs_client_registration"]
  17026. },
  17027. "error": {
  17028. "type": "string"
  17029. }
  17030. },
  17031. "required": ["status", "error"],
  17032. "additionalProperties": false
  17033. },
  17034. "MCPStatus": {
  17035. "anyOf": [
  17036. {
  17037. "$ref": "#/components/schemas/MCPStatusConnected"
  17038. },
  17039. {
  17040. "$ref": "#/components/schemas/MCPStatusDisabled"
  17041. },
  17042. {
  17043. "$ref": "#/components/schemas/MCPStatusFailed"
  17044. },
  17045. {
  17046. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  17047. },
  17048. {
  17049. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  17050. }
  17051. ]
  17052. },
  17053. "McpUnsupportedOAuthError": {
  17054. "type": "object",
  17055. "properties": {
  17056. "error": {
  17057. "type": "string"
  17058. }
  17059. },
  17060. "required": ["error"],
  17061. "additionalProperties": false
  17062. },
  17063. "McpServerNotFoundError": {
  17064. "type": "object",
  17065. "properties": {
  17066. "_tag": {
  17067. "type": "string",
  17068. "enum": ["McpServerNotFoundError"]
  17069. },
  17070. "name": {
  17071. "type": "string"
  17072. },
  17073. "message": {
  17074. "type": "string"
  17075. }
  17076. },
  17077. "required": ["_tag", "name", "message"],
  17078. "additionalProperties": false
  17079. },
  17080. "Project": {
  17081. "type": "object",
  17082. "properties": {
  17083. "id": {
  17084. "type": "string"
  17085. },
  17086. "worktree": {
  17087. "type": "string"
  17088. },
  17089. "vcs": {
  17090. "type": "string",
  17091. "enum": ["git"]
  17092. },
  17093. "name": {
  17094. "type": "string"
  17095. },
  17096. "icon": {
  17097. "type": "object",
  17098. "properties": {
  17099. "url": {
  17100. "type": "string"
  17101. },
  17102. "override": {
  17103. "type": "string"
  17104. },
  17105. "color": {
  17106. "type": "string"
  17107. }
  17108. },
  17109. "additionalProperties": false
  17110. },
  17111. "commands": {
  17112. "type": "object",
  17113. "properties": {
  17114. "start": {
  17115. "type": "string",
  17116. "description": "Startup script to run when creating a new workspace (worktree)"
  17117. }
  17118. },
  17119. "additionalProperties": false
  17120. },
  17121. "time": {
  17122. "type": "object",
  17123. "properties": {
  17124. "created": {
  17125. "type": "integer",
  17126. "minimum": 0
  17127. },
  17128. "updated": {
  17129. "type": "integer",
  17130. "minimum": 0
  17131. },
  17132. "initialized": {
  17133. "type": "integer",
  17134. "minimum": 0
  17135. }
  17136. },
  17137. "required": ["created", "updated"],
  17138. "additionalProperties": false
  17139. },
  17140. "sandboxes": {
  17141. "type": "array",
  17142. "items": {
  17143. "type": "string"
  17144. }
  17145. }
  17146. },
  17147. "required": ["id", "worktree", "time", "sandboxes"],
  17148. "additionalProperties": false
  17149. },
  17150. "ProjectNotFoundError": {
  17151. "type": "object",
  17152. "properties": {
  17153. "_tag": {
  17154. "type": "string",
  17155. "enum": ["ProjectNotFoundError"]
  17156. },
  17157. "projectID": {
  17158. "type": "string"
  17159. },
  17160. "message": {
  17161. "type": "string"
  17162. }
  17163. },
  17164. "required": ["_tag", "projectID", "message"],
  17165. "additionalProperties": false
  17166. },
  17167. "PtyNotFoundError": {
  17168. "type": "object",
  17169. "properties": {
  17170. "_tag": {
  17171. "type": "string",
  17172. "enum": ["PtyNotFoundError"]
  17173. },
  17174. "ptyID": {
  17175. "type": "string"
  17176. },
  17177. "message": {
  17178. "type": "string"
  17179. }
  17180. },
  17181. "required": ["_tag", "ptyID", "message"],
  17182. "additionalProperties": false
  17183. },
  17184. "PtyForbiddenError": {
  17185. "type": "object",
  17186. "properties": {
  17187. "_tag": {
  17188. "type": "string",
  17189. "enum": ["PtyForbiddenError"]
  17190. },
  17191. "message": {
  17192. "type": "string"
  17193. }
  17194. },
  17195. "required": ["_tag", "message"],
  17196. "additionalProperties": false
  17197. },
  17198. "QuestionRequest": {
  17199. "type": "object",
  17200. "properties": {
  17201. "id": {
  17202. "type": "string",
  17203. "pattern": "^que"
  17204. },
  17205. "sessionID": {
  17206. "type": "string",
  17207. "pattern": "^ses"
  17208. },
  17209. "questions": {
  17210. "type": "array",
  17211. "items": {
  17212. "$ref": "#/components/schemas/QuestionInfo"
  17213. },
  17214. "description": "Questions to ask"
  17215. },
  17216. "tool": {
  17217. "$ref": "#/components/schemas/QuestionTool"
  17218. }
  17219. },
  17220. "required": ["id", "sessionID", "questions"],
  17221. "additionalProperties": false
  17222. },
  17223. "QuestionNotFoundError": {
  17224. "type": "object",
  17225. "properties": {
  17226. "_tag": {
  17227. "type": "string",
  17228. "enum": ["QuestionNotFoundError"]
  17229. },
  17230. "requestID": {
  17231. "type": "string"
  17232. },
  17233. "message": {
  17234. "type": "string"
  17235. }
  17236. },
  17237. "required": ["_tag", "requestID", "message"],
  17238. "additionalProperties": false
  17239. },
  17240. "PermissionRequest": {
  17241. "type": "object",
  17242. "properties": {
  17243. "id": {
  17244. "type": "string",
  17245. "pattern": "^per"
  17246. },
  17247. "sessionID": {
  17248. "type": "string",
  17249. "pattern": "^ses"
  17250. },
  17251. "permission": {
  17252. "type": "string"
  17253. },
  17254. "patterns": {
  17255. "type": "array",
  17256. "items": {
  17257. "type": "string"
  17258. }
  17259. },
  17260. "metadata": {
  17261. "type": "object"
  17262. },
  17263. "always": {
  17264. "type": "array",
  17265. "items": {
  17266. "type": "string"
  17267. }
  17268. },
  17269. "tool": {
  17270. "type": "object",
  17271. "properties": {
  17272. "messageID": {
  17273. "type": "string",
  17274. "pattern": "^msg"
  17275. },
  17276. "callID": {
  17277. "type": "string"
  17278. }
  17279. },
  17280. "required": ["messageID", "callID"],
  17281. "additionalProperties": false
  17282. }
  17283. },
  17284. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  17285. "additionalProperties": false
  17286. },
  17287. "PermissionNotFoundError": {
  17288. "type": "object",
  17289. "properties": {
  17290. "_tag": {
  17291. "type": "string",
  17292. "enum": ["PermissionNotFoundError"]
  17293. },
  17294. "requestID": {
  17295. "type": "string"
  17296. },
  17297. "message": {
  17298. "type": "string"
  17299. }
  17300. },
  17301. "required": ["_tag", "requestID", "message"],
  17302. "additionalProperties": false
  17303. },
  17304. "ProviderAuthMethod": {
  17305. "type": "object",
  17306. "properties": {
  17307. "type": {
  17308. "type": "string",
  17309. "enum": ["oauth", "api"]
  17310. },
  17311. "label": {
  17312. "type": "string"
  17313. },
  17314. "prompts": {
  17315. "type": "array",
  17316. "items": {
  17317. "anyOf": [
  17318. {
  17319. "type": "object",
  17320. "properties": {
  17321. "type": {
  17322. "type": "string",
  17323. "enum": ["text"]
  17324. },
  17325. "key": {
  17326. "type": "string"
  17327. },
  17328. "message": {
  17329. "type": "string"
  17330. },
  17331. "placeholder": {
  17332. "type": "string"
  17333. },
  17334. "when": {
  17335. "type": "object",
  17336. "properties": {
  17337. "key": {
  17338. "type": "string"
  17339. },
  17340. "op": {
  17341. "type": "string",
  17342. "enum": ["eq", "neq"]
  17343. },
  17344. "value": {
  17345. "type": "string"
  17346. }
  17347. },
  17348. "required": ["key", "op", "value"],
  17349. "additionalProperties": false
  17350. }
  17351. },
  17352. "required": ["type", "key", "message"],
  17353. "additionalProperties": false
  17354. },
  17355. {
  17356. "type": "object",
  17357. "properties": {
  17358. "type": {
  17359. "type": "string",
  17360. "enum": ["select"]
  17361. },
  17362. "key": {
  17363. "type": "string"
  17364. },
  17365. "message": {
  17366. "type": "string"
  17367. },
  17368. "options": {
  17369. "type": "array",
  17370. "items": {
  17371. "type": "object",
  17372. "properties": {
  17373. "label": {
  17374. "type": "string"
  17375. },
  17376. "value": {
  17377. "type": "string"
  17378. },
  17379. "hint": {
  17380. "type": "string"
  17381. }
  17382. },
  17383. "required": ["label", "value"],
  17384. "additionalProperties": false
  17385. }
  17386. },
  17387. "when": {
  17388. "type": "object",
  17389. "properties": {
  17390. "key": {
  17391. "type": "string"
  17392. },
  17393. "op": {
  17394. "type": "string",
  17395. "enum": ["eq", "neq"]
  17396. },
  17397. "value": {
  17398. "type": "string"
  17399. }
  17400. },
  17401. "required": ["key", "op", "value"],
  17402. "additionalProperties": false
  17403. }
  17404. },
  17405. "required": ["type", "key", "message", "options"],
  17406. "additionalProperties": false
  17407. }
  17408. ]
  17409. }
  17410. }
  17411. },
  17412. "required": ["type", "label"],
  17413. "additionalProperties": false
  17414. },
  17415. "ProviderAuthAuthorization": {
  17416. "type": "object",
  17417. "properties": {
  17418. "url": {
  17419. "type": "string"
  17420. },
  17421. "method": {
  17422. "type": "string",
  17423. "enum": ["auto", "code"]
  17424. },
  17425. "instructions": {
  17426. "type": "string"
  17427. }
  17428. },
  17429. "required": ["url", "method", "instructions"],
  17430. "additionalProperties": false
  17431. },
  17432. "ProviderAuthError1": {
  17433. "type": "object",
  17434. "properties": {
  17435. "name": {
  17436. "type": "string",
  17437. "enum": [
  17438. "BadRequest",
  17439. "ProviderAuthOauthMissing",
  17440. "ProviderAuthOauthCodeMissing",
  17441. "ProviderAuthOauthCallbackFailed",
  17442. "ProviderAuthValidationFailed"
  17443. ]
  17444. },
  17445. "data": {
  17446. "type": "object",
  17447. "properties": {
  17448. "providerID": {
  17449. "type": "string"
  17450. },
  17451. "field": {
  17452. "type": "string"
  17453. },
  17454. "message": {
  17455. "type": "string"
  17456. },
  17457. "kind": {
  17458. "type": "string"
  17459. }
  17460. },
  17461. "additionalProperties": false
  17462. }
  17463. },
  17464. "required": ["name", "data"],
  17465. "additionalProperties": false
  17466. },
  17467. "Session1": {
  17468. "type": "object",
  17469. "properties": {
  17470. "id": {
  17471. "type": "string",
  17472. "pattern": "^ses"
  17473. },
  17474. "slug": {
  17475. "type": "string"
  17476. },
  17477. "projectID": {
  17478. "type": "string"
  17479. },
  17480. "workspaceID": {
  17481. "type": "string",
  17482. "pattern": "^wrk"
  17483. },
  17484. "directory": {
  17485. "type": "string"
  17486. },
  17487. "path": {
  17488. "type": "string"
  17489. },
  17490. "parentID": {
  17491. "type": "string",
  17492. "pattern": "^ses"
  17493. },
  17494. "summary": {
  17495. "type": "object",
  17496. "properties": {
  17497. "additions": {
  17498. "type": "number"
  17499. },
  17500. "deletions": {
  17501. "type": "number"
  17502. },
  17503. "files": {
  17504. "type": "number"
  17505. },
  17506. "diffs": {
  17507. "type": "array",
  17508. "items": {
  17509. "$ref": "#/components/schemas/SnapshotFileDiff"
  17510. }
  17511. }
  17512. },
  17513. "required": ["additions", "deletions", "files"],
  17514. "additionalProperties": false
  17515. },
  17516. "cost": {
  17517. "type": "number"
  17518. },
  17519. "tokens": {
  17520. "type": "object",
  17521. "properties": {
  17522. "input": {
  17523. "type": "number"
  17524. },
  17525. "output": {
  17526. "type": "number"
  17527. },
  17528. "reasoning": {
  17529. "type": "number"
  17530. },
  17531. "cache": {
  17532. "type": "object",
  17533. "properties": {
  17534. "read": {
  17535. "type": "number"
  17536. },
  17537. "write": {
  17538. "type": "number"
  17539. }
  17540. },
  17541. "required": ["read", "write"],
  17542. "additionalProperties": false
  17543. }
  17544. },
  17545. "required": ["input", "output", "reasoning", "cache"],
  17546. "additionalProperties": false
  17547. },
  17548. "share": {
  17549. "type": "object",
  17550. "properties": {
  17551. "url": {
  17552. "type": "string"
  17553. }
  17554. },
  17555. "required": ["url"],
  17556. "additionalProperties": false
  17557. },
  17558. "title": {
  17559. "type": "string"
  17560. },
  17561. "agent": {
  17562. "type": "string"
  17563. },
  17564. "model": {
  17565. "type": "object",
  17566. "properties": {
  17567. "id": {
  17568. "type": "string"
  17569. },
  17570. "providerID": {
  17571. "type": "string"
  17572. },
  17573. "variant": {
  17574. "type": "string"
  17575. }
  17576. },
  17577. "required": ["id", "providerID"],
  17578. "additionalProperties": false
  17579. },
  17580. "version": {
  17581. "type": "string"
  17582. },
  17583. "metadata": {
  17584. "type": "object"
  17585. },
  17586. "time": {
  17587. "type": "object",
  17588. "properties": {
  17589. "created": {
  17590. "type": "integer",
  17591. "minimum": 0
  17592. },
  17593. "updated": {
  17594. "type": "integer",
  17595. "minimum": 0
  17596. },
  17597. "compacting": {
  17598. "type": "integer",
  17599. "minimum": 0
  17600. },
  17601. "archived": {
  17602. "type": "number"
  17603. }
  17604. },
  17605. "required": ["created", "updated"],
  17606. "additionalProperties": false
  17607. },
  17608. "permission": {
  17609. "$ref": "#/components/schemas/PermissionRuleset"
  17610. },
  17611. "revert": {
  17612. "type": "object",
  17613. "properties": {
  17614. "messageID": {
  17615. "type": "string",
  17616. "pattern": "^msg"
  17617. },
  17618. "partID": {
  17619. "type": "string",
  17620. "pattern": "^prt"
  17621. },
  17622. "snapshot": {
  17623. "type": "string"
  17624. },
  17625. "diff": {
  17626. "type": "string"
  17627. }
  17628. },
  17629. "required": ["messageID"],
  17630. "additionalProperties": false
  17631. }
  17632. },
  17633. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  17634. "additionalProperties": false
  17635. },
  17636. "Session2": {
  17637. "type": "object",
  17638. "properties": {
  17639. "id": {
  17640. "type": "string",
  17641. "pattern": "^ses"
  17642. },
  17643. "slug": {
  17644. "type": "string"
  17645. },
  17646. "projectID": {
  17647. "type": "string"
  17648. },
  17649. "workspaceID": {
  17650. "type": "string",
  17651. "pattern": "^wrk"
  17652. },
  17653. "directory": {
  17654. "type": "string"
  17655. },
  17656. "path": {
  17657. "type": "string"
  17658. },
  17659. "parentID": {
  17660. "type": "string",
  17661. "pattern": "^ses"
  17662. },
  17663. "summary": {
  17664. "type": "object",
  17665. "properties": {
  17666. "additions": {
  17667. "type": "number"
  17668. },
  17669. "deletions": {
  17670. "type": "number"
  17671. },
  17672. "files": {
  17673. "type": "number"
  17674. },
  17675. "diffs": {
  17676. "type": "array",
  17677. "items": {
  17678. "$ref": "#/components/schemas/SnapshotFileDiff"
  17679. }
  17680. }
  17681. },
  17682. "required": ["additions", "deletions", "files"],
  17683. "additionalProperties": false
  17684. },
  17685. "cost": {
  17686. "type": "number"
  17687. },
  17688. "tokens": {
  17689. "type": "object",
  17690. "properties": {
  17691. "input": {
  17692. "type": "number"
  17693. },
  17694. "output": {
  17695. "type": "number"
  17696. },
  17697. "reasoning": {
  17698. "type": "number"
  17699. },
  17700. "cache": {
  17701. "type": "object",
  17702. "properties": {
  17703. "read": {
  17704. "type": "number"
  17705. },
  17706. "write": {
  17707. "type": "number"
  17708. }
  17709. },
  17710. "required": ["read", "write"],
  17711. "additionalProperties": false
  17712. }
  17713. },
  17714. "required": ["input", "output", "reasoning", "cache"],
  17715. "additionalProperties": false
  17716. },
  17717. "share": {
  17718. "type": "object",
  17719. "properties": {
  17720. "url": {
  17721. "type": "string"
  17722. }
  17723. },
  17724. "required": ["url"],
  17725. "additionalProperties": false
  17726. },
  17727. "title": {
  17728. "type": "string"
  17729. },
  17730. "agent": {
  17731. "type": "string"
  17732. },
  17733. "model": {
  17734. "type": "object",
  17735. "properties": {
  17736. "id": {
  17737. "type": "string"
  17738. },
  17739. "providerID": {
  17740. "type": "string"
  17741. },
  17742. "variant": {
  17743. "type": "string"
  17744. }
  17745. },
  17746. "required": ["id", "providerID"],
  17747. "additionalProperties": false
  17748. },
  17749. "version": {
  17750. "type": "string"
  17751. },
  17752. "metadata": {
  17753. "type": "object"
  17754. },
  17755. "time": {
  17756. "type": "object",
  17757. "properties": {
  17758. "created": {
  17759. "type": "integer",
  17760. "minimum": 0
  17761. },
  17762. "updated": {
  17763. "type": "integer",
  17764. "minimum": 0
  17765. },
  17766. "compacting": {
  17767. "type": "integer",
  17768. "minimum": 0
  17769. },
  17770. "archived": {
  17771. "type": "number"
  17772. }
  17773. },
  17774. "required": ["created", "updated"],
  17775. "additionalProperties": false
  17776. },
  17777. "permission": {
  17778. "$ref": "#/components/schemas/PermissionRuleset"
  17779. },
  17780. "revert": {
  17781. "type": "object",
  17782. "properties": {
  17783. "messageID": {
  17784. "type": "string",
  17785. "pattern": "^msg"
  17786. },
  17787. "partID": {
  17788. "type": "string",
  17789. "pattern": "^prt"
  17790. },
  17791. "snapshot": {
  17792. "type": "string"
  17793. },
  17794. "diff": {
  17795. "type": "string"
  17796. }
  17797. },
  17798. "required": ["messageID"],
  17799. "additionalProperties": false
  17800. }
  17801. },
  17802. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  17803. "additionalProperties": false
  17804. },
  17805. "NotFoundError": {
  17806. "type": "object",
  17807. "required": ["name", "data"],
  17808. "properties": {
  17809. "name": {
  17810. "type": "string",
  17811. "enum": ["NotFoundError"]
  17812. },
  17813. "data": {
  17814. "type": "object",
  17815. "required": ["message"],
  17816. "properties": {
  17817. "message": {
  17818. "type": "string"
  17819. }
  17820. }
  17821. }
  17822. }
  17823. },
  17824. "Session3": {
  17825. "type": "object",
  17826. "properties": {
  17827. "id": {
  17828. "type": "string",
  17829. "pattern": "^ses"
  17830. },
  17831. "slug": {
  17832. "type": "string"
  17833. },
  17834. "projectID": {
  17835. "type": "string"
  17836. },
  17837. "workspaceID": {
  17838. "type": "string",
  17839. "pattern": "^wrk"
  17840. },
  17841. "directory": {
  17842. "type": "string"
  17843. },
  17844. "path": {
  17845. "type": "string"
  17846. },
  17847. "parentID": {
  17848. "type": "string",
  17849. "pattern": "^ses"
  17850. },
  17851. "summary": {
  17852. "type": "object",
  17853. "properties": {
  17854. "additions": {
  17855. "type": "number"
  17856. },
  17857. "deletions": {
  17858. "type": "number"
  17859. },
  17860. "files": {
  17861. "type": "number"
  17862. },
  17863. "diffs": {
  17864. "type": "array",
  17865. "items": {
  17866. "$ref": "#/components/schemas/SnapshotFileDiff"
  17867. }
  17868. }
  17869. },
  17870. "required": ["additions", "deletions", "files"],
  17871. "additionalProperties": false
  17872. },
  17873. "cost": {
  17874. "type": "number"
  17875. },
  17876. "tokens": {
  17877. "type": "object",
  17878. "properties": {
  17879. "input": {
  17880. "type": "number"
  17881. },
  17882. "output": {
  17883. "type": "number"
  17884. },
  17885. "reasoning": {
  17886. "type": "number"
  17887. },
  17888. "cache": {
  17889. "type": "object",
  17890. "properties": {
  17891. "read": {
  17892. "type": "number"
  17893. },
  17894. "write": {
  17895. "type": "number"
  17896. }
  17897. },
  17898. "required": ["read", "write"],
  17899. "additionalProperties": false
  17900. }
  17901. },
  17902. "required": ["input", "output", "reasoning", "cache"],
  17903. "additionalProperties": false
  17904. },
  17905. "share": {
  17906. "type": "object",
  17907. "properties": {
  17908. "url": {
  17909. "type": "string"
  17910. }
  17911. },
  17912. "required": ["url"],
  17913. "additionalProperties": false
  17914. },
  17915. "title": {
  17916. "type": "string"
  17917. },
  17918. "agent": {
  17919. "type": "string"
  17920. },
  17921. "model": {
  17922. "type": "object",
  17923. "properties": {
  17924. "id": {
  17925. "type": "string"
  17926. },
  17927. "providerID": {
  17928. "type": "string"
  17929. },
  17930. "variant": {
  17931. "type": "string"
  17932. }
  17933. },
  17934. "required": ["id", "providerID"],
  17935. "additionalProperties": false
  17936. },
  17937. "version": {
  17938. "type": "string"
  17939. },
  17940. "metadata": {
  17941. "type": "object"
  17942. },
  17943. "time": {
  17944. "type": "object",
  17945. "properties": {
  17946. "created": {
  17947. "type": "integer",
  17948. "minimum": 0
  17949. },
  17950. "updated": {
  17951. "type": "integer",
  17952. "minimum": 0
  17953. },
  17954. "compacting": {
  17955. "type": "integer",
  17956. "minimum": 0
  17957. },
  17958. "archived": {
  17959. "type": "number"
  17960. }
  17961. },
  17962. "required": ["created", "updated"],
  17963. "additionalProperties": false
  17964. },
  17965. "permission": {
  17966. "$ref": "#/components/schemas/PermissionRuleset"
  17967. },
  17968. "revert": {
  17969. "type": "object",
  17970. "properties": {
  17971. "messageID": {
  17972. "type": "string",
  17973. "pattern": "^msg"
  17974. },
  17975. "partID": {
  17976. "type": "string",
  17977. "pattern": "^prt"
  17978. },
  17979. "snapshot": {
  17980. "type": "string"
  17981. },
  17982. "diff": {
  17983. "type": "string"
  17984. }
  17985. },
  17986. "required": ["messageID"],
  17987. "additionalProperties": false
  17988. }
  17989. },
  17990. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  17991. "additionalProperties": false
  17992. },
  17993. "Session4": {
  17994. "type": "object",
  17995. "properties": {
  17996. "id": {
  17997. "type": "string",
  17998. "pattern": "^ses"
  17999. },
  18000. "slug": {
  18001. "type": "string"
  18002. },
  18003. "projectID": {
  18004. "type": "string"
  18005. },
  18006. "workspaceID": {
  18007. "type": "string",
  18008. "pattern": "^wrk"
  18009. },
  18010. "directory": {
  18011. "type": "string"
  18012. },
  18013. "path": {
  18014. "type": "string"
  18015. },
  18016. "parentID": {
  18017. "type": "string",
  18018. "pattern": "^ses"
  18019. },
  18020. "summary": {
  18021. "type": "object",
  18022. "properties": {
  18023. "additions": {
  18024. "type": "number"
  18025. },
  18026. "deletions": {
  18027. "type": "number"
  18028. },
  18029. "files": {
  18030. "type": "number"
  18031. },
  18032. "diffs": {
  18033. "type": "array",
  18034. "items": {
  18035. "$ref": "#/components/schemas/SnapshotFileDiff"
  18036. }
  18037. }
  18038. },
  18039. "required": ["additions", "deletions", "files"],
  18040. "additionalProperties": false
  18041. },
  18042. "cost": {
  18043. "type": "number"
  18044. },
  18045. "tokens": {
  18046. "type": "object",
  18047. "properties": {
  18048. "input": {
  18049. "type": "number"
  18050. },
  18051. "output": {
  18052. "type": "number"
  18053. },
  18054. "reasoning": {
  18055. "type": "number"
  18056. },
  18057. "cache": {
  18058. "type": "object",
  18059. "properties": {
  18060. "read": {
  18061. "type": "number"
  18062. },
  18063. "write": {
  18064. "type": "number"
  18065. }
  18066. },
  18067. "required": ["read", "write"],
  18068. "additionalProperties": false
  18069. }
  18070. },
  18071. "required": ["input", "output", "reasoning", "cache"],
  18072. "additionalProperties": false
  18073. },
  18074. "share": {
  18075. "type": "object",
  18076. "properties": {
  18077. "url": {
  18078. "type": "string"
  18079. }
  18080. },
  18081. "required": ["url"],
  18082. "additionalProperties": false
  18083. },
  18084. "title": {
  18085. "type": "string"
  18086. },
  18087. "agent": {
  18088. "type": "string"
  18089. },
  18090. "model": {
  18091. "type": "object",
  18092. "properties": {
  18093. "id": {
  18094. "type": "string"
  18095. },
  18096. "providerID": {
  18097. "type": "string"
  18098. },
  18099. "variant": {
  18100. "type": "string"
  18101. }
  18102. },
  18103. "required": ["id", "providerID"],
  18104. "additionalProperties": false
  18105. },
  18106. "version": {
  18107. "type": "string"
  18108. },
  18109. "metadata": {
  18110. "type": "object"
  18111. },
  18112. "time": {
  18113. "type": "object",
  18114. "properties": {
  18115. "created": {
  18116. "type": "integer",
  18117. "minimum": 0
  18118. },
  18119. "updated": {
  18120. "type": "integer",
  18121. "minimum": 0
  18122. },
  18123. "compacting": {
  18124. "type": "integer",
  18125. "minimum": 0
  18126. },
  18127. "archived": {
  18128. "type": "number"
  18129. }
  18130. },
  18131. "required": ["created", "updated"],
  18132. "additionalProperties": false
  18133. },
  18134. "permission": {
  18135. "$ref": "#/components/schemas/PermissionRuleset"
  18136. },
  18137. "revert": {
  18138. "type": "object",
  18139. "properties": {
  18140. "messageID": {
  18141. "type": "string",
  18142. "pattern": "^msg"
  18143. },
  18144. "partID": {
  18145. "type": "string",
  18146. "pattern": "^prt"
  18147. },
  18148. "snapshot": {
  18149. "type": "string"
  18150. },
  18151. "diff": {
  18152. "type": "string"
  18153. }
  18154. },
  18155. "required": ["messageID"],
  18156. "additionalProperties": false
  18157. }
  18158. },
  18159. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  18160. "additionalProperties": false
  18161. },
  18162. "Session5": {
  18163. "type": "object",
  18164. "properties": {
  18165. "id": {
  18166. "type": "string",
  18167. "pattern": "^ses"
  18168. },
  18169. "slug": {
  18170. "type": "string"
  18171. },
  18172. "projectID": {
  18173. "type": "string"
  18174. },
  18175. "workspaceID": {
  18176. "type": "string",
  18177. "pattern": "^wrk"
  18178. },
  18179. "directory": {
  18180. "type": "string"
  18181. },
  18182. "path": {
  18183. "type": "string"
  18184. },
  18185. "parentID": {
  18186. "type": "string",
  18187. "pattern": "^ses"
  18188. },
  18189. "summary": {
  18190. "type": "object",
  18191. "properties": {
  18192. "additions": {
  18193. "type": "number"
  18194. },
  18195. "deletions": {
  18196. "type": "number"
  18197. },
  18198. "files": {
  18199. "type": "number"
  18200. },
  18201. "diffs": {
  18202. "type": "array",
  18203. "items": {
  18204. "$ref": "#/components/schemas/SnapshotFileDiff"
  18205. }
  18206. }
  18207. },
  18208. "required": ["additions", "deletions", "files"],
  18209. "additionalProperties": false
  18210. },
  18211. "cost": {
  18212. "type": "number"
  18213. },
  18214. "tokens": {
  18215. "type": "object",
  18216. "properties": {
  18217. "input": {
  18218. "type": "number"
  18219. },
  18220. "output": {
  18221. "type": "number"
  18222. },
  18223. "reasoning": {
  18224. "type": "number"
  18225. },
  18226. "cache": {
  18227. "type": "object",
  18228. "properties": {
  18229. "read": {
  18230. "type": "number"
  18231. },
  18232. "write": {
  18233. "type": "number"
  18234. }
  18235. },
  18236. "required": ["read", "write"],
  18237. "additionalProperties": false
  18238. }
  18239. },
  18240. "required": ["input", "output", "reasoning", "cache"],
  18241. "additionalProperties": false
  18242. },
  18243. "share": {
  18244. "type": "object",
  18245. "properties": {
  18246. "url": {
  18247. "type": "string"
  18248. }
  18249. },
  18250. "required": ["url"],
  18251. "additionalProperties": false
  18252. },
  18253. "title": {
  18254. "type": "string"
  18255. },
  18256. "agent": {
  18257. "type": "string"
  18258. },
  18259. "model": {
  18260. "type": "object",
  18261. "properties": {
  18262. "id": {
  18263. "type": "string"
  18264. },
  18265. "providerID": {
  18266. "type": "string"
  18267. },
  18268. "variant": {
  18269. "type": "string"
  18270. }
  18271. },
  18272. "required": ["id", "providerID"],
  18273. "additionalProperties": false
  18274. },
  18275. "version": {
  18276. "type": "string"
  18277. },
  18278. "metadata": {
  18279. "type": "object"
  18280. },
  18281. "time": {
  18282. "type": "object",
  18283. "properties": {
  18284. "created": {
  18285. "type": "integer",
  18286. "minimum": 0
  18287. },
  18288. "updated": {
  18289. "type": "integer",
  18290. "minimum": 0
  18291. },
  18292. "compacting": {
  18293. "type": "integer",
  18294. "minimum": 0
  18295. },
  18296. "archived": {
  18297. "type": "number"
  18298. }
  18299. },
  18300. "required": ["created", "updated"],
  18301. "additionalProperties": false
  18302. },
  18303. "permission": {
  18304. "$ref": "#/components/schemas/PermissionRuleset"
  18305. },
  18306. "revert": {
  18307. "type": "object",
  18308. "properties": {
  18309. "messageID": {
  18310. "type": "string",
  18311. "pattern": "^msg"
  18312. },
  18313. "partID": {
  18314. "type": "string",
  18315. "pattern": "^prt"
  18316. },
  18317. "snapshot": {
  18318. "type": "string"
  18319. },
  18320. "diff": {
  18321. "type": "string"
  18322. }
  18323. },
  18324. "required": ["messageID"],
  18325. "additionalProperties": false
  18326. }
  18327. },
  18328. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  18329. "additionalProperties": false
  18330. },
  18331. "Session6": {
  18332. "type": "object",
  18333. "properties": {
  18334. "id": {
  18335. "type": "string",
  18336. "pattern": "^ses"
  18337. },
  18338. "slug": {
  18339. "type": "string"
  18340. },
  18341. "projectID": {
  18342. "type": "string"
  18343. },
  18344. "workspaceID": {
  18345. "type": "string",
  18346. "pattern": "^wrk"
  18347. },
  18348. "directory": {
  18349. "type": "string"
  18350. },
  18351. "path": {
  18352. "type": "string"
  18353. },
  18354. "parentID": {
  18355. "type": "string",
  18356. "pattern": "^ses"
  18357. },
  18358. "summary": {
  18359. "type": "object",
  18360. "properties": {
  18361. "additions": {
  18362. "type": "number"
  18363. },
  18364. "deletions": {
  18365. "type": "number"
  18366. },
  18367. "files": {
  18368. "type": "number"
  18369. },
  18370. "diffs": {
  18371. "type": "array",
  18372. "items": {
  18373. "$ref": "#/components/schemas/SnapshotFileDiff"
  18374. }
  18375. }
  18376. },
  18377. "required": ["additions", "deletions", "files"],
  18378. "additionalProperties": false
  18379. },
  18380. "cost": {
  18381. "type": "number"
  18382. },
  18383. "tokens": {
  18384. "type": "object",
  18385. "properties": {
  18386. "input": {
  18387. "type": "number"
  18388. },
  18389. "output": {
  18390. "type": "number"
  18391. },
  18392. "reasoning": {
  18393. "type": "number"
  18394. },
  18395. "cache": {
  18396. "type": "object",
  18397. "properties": {
  18398. "read": {
  18399. "type": "number"
  18400. },
  18401. "write": {
  18402. "type": "number"
  18403. }
  18404. },
  18405. "required": ["read", "write"],
  18406. "additionalProperties": false
  18407. }
  18408. },
  18409. "required": ["input", "output", "reasoning", "cache"],
  18410. "additionalProperties": false
  18411. },
  18412. "share": {
  18413. "type": "object",
  18414. "properties": {
  18415. "url": {
  18416. "type": "string"
  18417. }
  18418. },
  18419. "required": ["url"],
  18420. "additionalProperties": false
  18421. },
  18422. "title": {
  18423. "type": "string"
  18424. },
  18425. "agent": {
  18426. "type": "string"
  18427. },
  18428. "model": {
  18429. "type": "object",
  18430. "properties": {
  18431. "id": {
  18432. "type": "string"
  18433. },
  18434. "providerID": {
  18435. "type": "string"
  18436. },
  18437. "variant": {
  18438. "type": "string"
  18439. }
  18440. },
  18441. "required": ["id", "providerID"],
  18442. "additionalProperties": false
  18443. },
  18444. "version": {
  18445. "type": "string"
  18446. },
  18447. "metadata": {
  18448. "type": "object"
  18449. },
  18450. "time": {
  18451. "type": "object",
  18452. "properties": {
  18453. "created": {
  18454. "type": "integer",
  18455. "minimum": 0
  18456. },
  18457. "updated": {
  18458. "type": "integer",
  18459. "minimum": 0
  18460. },
  18461. "compacting": {
  18462. "type": "integer",
  18463. "minimum": 0
  18464. },
  18465. "archived": {
  18466. "type": "number"
  18467. }
  18468. },
  18469. "required": ["created", "updated"],
  18470. "additionalProperties": false
  18471. },
  18472. "permission": {
  18473. "$ref": "#/components/schemas/PermissionRuleset"
  18474. },
  18475. "revert": {
  18476. "type": "object",
  18477. "properties": {
  18478. "messageID": {
  18479. "type": "string",
  18480. "pattern": "^msg"
  18481. },
  18482. "partID": {
  18483. "type": "string",
  18484. "pattern": "^prt"
  18485. },
  18486. "snapshot": {
  18487. "type": "string"
  18488. },
  18489. "diff": {
  18490. "type": "string"
  18491. }
  18492. },
  18493. "required": ["messageID"],
  18494. "additionalProperties": false
  18495. }
  18496. },
  18497. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  18498. "additionalProperties": false
  18499. },
  18500. "Session7": {
  18501. "type": "object",
  18502. "properties": {
  18503. "id": {
  18504. "type": "string",
  18505. "pattern": "^ses"
  18506. },
  18507. "slug": {
  18508. "type": "string"
  18509. },
  18510. "projectID": {
  18511. "type": "string"
  18512. },
  18513. "workspaceID": {
  18514. "type": "string",
  18515. "pattern": "^wrk"
  18516. },
  18517. "directory": {
  18518. "type": "string"
  18519. },
  18520. "path": {
  18521. "type": "string"
  18522. },
  18523. "parentID": {
  18524. "type": "string",
  18525. "pattern": "^ses"
  18526. },
  18527. "summary": {
  18528. "type": "object",
  18529. "properties": {
  18530. "additions": {
  18531. "type": "number"
  18532. },
  18533. "deletions": {
  18534. "type": "number"
  18535. },
  18536. "files": {
  18537. "type": "number"
  18538. },
  18539. "diffs": {
  18540. "type": "array",
  18541. "items": {
  18542. "$ref": "#/components/schemas/SnapshotFileDiff"
  18543. }
  18544. }
  18545. },
  18546. "required": ["additions", "deletions", "files"],
  18547. "additionalProperties": false
  18548. },
  18549. "cost": {
  18550. "type": "number"
  18551. },
  18552. "tokens": {
  18553. "type": "object",
  18554. "properties": {
  18555. "input": {
  18556. "type": "number"
  18557. },
  18558. "output": {
  18559. "type": "number"
  18560. },
  18561. "reasoning": {
  18562. "type": "number"
  18563. },
  18564. "cache": {
  18565. "type": "object",
  18566. "properties": {
  18567. "read": {
  18568. "type": "number"
  18569. },
  18570. "write": {
  18571. "type": "number"
  18572. }
  18573. },
  18574. "required": ["read", "write"],
  18575. "additionalProperties": false
  18576. }
  18577. },
  18578. "required": ["input", "output", "reasoning", "cache"],
  18579. "additionalProperties": false
  18580. },
  18581. "share": {
  18582. "type": "object",
  18583. "properties": {
  18584. "url": {
  18585. "type": "string"
  18586. }
  18587. },
  18588. "required": ["url"],
  18589. "additionalProperties": false
  18590. },
  18591. "title": {
  18592. "type": "string"
  18593. },
  18594. "agent": {
  18595. "type": "string"
  18596. },
  18597. "model": {
  18598. "type": "object",
  18599. "properties": {
  18600. "id": {
  18601. "type": "string"
  18602. },
  18603. "providerID": {
  18604. "type": "string"
  18605. },
  18606. "variant": {
  18607. "type": "string"
  18608. }
  18609. },
  18610. "required": ["id", "providerID"],
  18611. "additionalProperties": false
  18612. },
  18613. "version": {
  18614. "type": "string"
  18615. },
  18616. "metadata": {
  18617. "type": "object"
  18618. },
  18619. "time": {
  18620. "type": "object",
  18621. "properties": {
  18622. "created": {
  18623. "type": "integer",
  18624. "minimum": 0
  18625. },
  18626. "updated": {
  18627. "type": "integer",
  18628. "minimum": 0
  18629. },
  18630. "compacting": {
  18631. "type": "integer",
  18632. "minimum": 0
  18633. },
  18634. "archived": {
  18635. "type": "number"
  18636. }
  18637. },
  18638. "required": ["created", "updated"],
  18639. "additionalProperties": false
  18640. },
  18641. "permission": {
  18642. "$ref": "#/components/schemas/PermissionRuleset"
  18643. },
  18644. "revert": {
  18645. "type": "object",
  18646. "properties": {
  18647. "messageID": {
  18648. "type": "string",
  18649. "pattern": "^msg"
  18650. },
  18651. "partID": {
  18652. "type": "string",
  18653. "pattern": "^prt"
  18654. },
  18655. "snapshot": {
  18656. "type": "string"
  18657. },
  18658. "diff": {
  18659. "type": "string"
  18660. }
  18661. },
  18662. "required": ["messageID"],
  18663. "additionalProperties": false
  18664. }
  18665. },
  18666. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  18667. "additionalProperties": false
  18668. },
  18669. "TextPartInput": {
  18670. "type": "object",
  18671. "properties": {
  18672. "id": {
  18673. "type": "string",
  18674. "pattern": "^prt"
  18675. },
  18676. "type": {
  18677. "type": "string",
  18678. "enum": ["text"]
  18679. },
  18680. "text": {
  18681. "type": "string"
  18682. },
  18683. "synthetic": {
  18684. "type": "boolean"
  18685. },
  18686. "ignored": {
  18687. "type": "boolean"
  18688. },
  18689. "time": {
  18690. "type": "object",
  18691. "properties": {
  18692. "start": {
  18693. "type": "integer",
  18694. "minimum": 0
  18695. },
  18696. "end": {
  18697. "type": "integer",
  18698. "minimum": 0
  18699. }
  18700. },
  18701. "required": ["start"],
  18702. "additionalProperties": false
  18703. },
  18704. "metadata": {
  18705. "type": "object"
  18706. }
  18707. },
  18708. "required": ["type", "text"],
  18709. "additionalProperties": false
  18710. },
  18711. "FilePartInput": {
  18712. "type": "object",
  18713. "properties": {
  18714. "id": {
  18715. "type": "string",
  18716. "pattern": "^prt"
  18717. },
  18718. "type": {
  18719. "type": "string",
  18720. "enum": ["file"]
  18721. },
  18722. "mime": {
  18723. "type": "string"
  18724. },
  18725. "filename": {
  18726. "type": "string"
  18727. },
  18728. "url": {
  18729. "type": "string"
  18730. },
  18731. "source": {
  18732. "$ref": "#/components/schemas/FilePartSource"
  18733. }
  18734. },
  18735. "required": ["type", "mime", "url"],
  18736. "additionalProperties": false
  18737. },
  18738. "AgentPartInput": {
  18739. "type": "object",
  18740. "properties": {
  18741. "id": {
  18742. "type": "string",
  18743. "pattern": "^prt"
  18744. },
  18745. "type": {
  18746. "type": "string",
  18747. "enum": ["agent"]
  18748. },
  18749. "name": {
  18750. "type": "string"
  18751. },
  18752. "source": {
  18753. "type": "object",
  18754. "properties": {
  18755. "value": {
  18756. "type": "string"
  18757. },
  18758. "start": {
  18759. "type": "integer",
  18760. "minimum": 0
  18761. },
  18762. "end": {
  18763. "type": "integer",
  18764. "minimum": 0
  18765. }
  18766. },
  18767. "required": ["value", "start", "end"],
  18768. "additionalProperties": false
  18769. }
  18770. },
  18771. "required": ["type", "name"],
  18772. "additionalProperties": false
  18773. },
  18774. "SubtaskPartInput": {
  18775. "type": "object",
  18776. "properties": {
  18777. "id": {
  18778. "type": "string",
  18779. "pattern": "^prt"
  18780. },
  18781. "type": {
  18782. "type": "string",
  18783. "enum": ["subtask"]
  18784. },
  18785. "prompt": {
  18786. "type": "string"
  18787. },
  18788. "description": {
  18789. "type": "string"
  18790. },
  18791. "agent": {
  18792. "type": "string"
  18793. },
  18794. "model": {
  18795. "type": "object",
  18796. "properties": {
  18797. "providerID": {
  18798. "type": "string"
  18799. },
  18800. "modelID": {
  18801. "type": "string"
  18802. }
  18803. },
  18804. "required": ["providerID", "modelID"],
  18805. "additionalProperties": false
  18806. },
  18807. "command": {
  18808. "type": "string"
  18809. }
  18810. },
  18811. "required": ["type", "prompt", "description", "agent"],
  18812. "additionalProperties": false
  18813. },
  18814. "SessionBusyError": {
  18815. "type": "object",
  18816. "properties": {
  18817. "_tag": {
  18818. "type": "string",
  18819. "enum": ["SessionBusyError"]
  18820. },
  18821. "sessionID": {
  18822. "type": "string"
  18823. },
  18824. "message": {
  18825. "type": "string"
  18826. }
  18827. },
  18828. "required": ["_tag", "sessionID", "message"],
  18829. "additionalProperties": false
  18830. },
  18831. "Session8": {
  18832. "type": "object",
  18833. "properties": {
  18834. "id": {
  18835. "type": "string",
  18836. "pattern": "^ses"
  18837. },
  18838. "slug": {
  18839. "type": "string"
  18840. },
  18841. "projectID": {
  18842. "type": "string"
  18843. },
  18844. "workspaceID": {
  18845. "type": "string",
  18846. "pattern": "^wrk"
  18847. },
  18848. "directory": {
  18849. "type": "string"
  18850. },
  18851. "path": {
  18852. "type": "string"
  18853. },
  18854. "parentID": {
  18855. "type": "string",
  18856. "pattern": "^ses"
  18857. },
  18858. "summary": {
  18859. "type": "object",
  18860. "properties": {
  18861. "additions": {
  18862. "type": "number"
  18863. },
  18864. "deletions": {
  18865. "type": "number"
  18866. },
  18867. "files": {
  18868. "type": "number"
  18869. },
  18870. "diffs": {
  18871. "type": "array",
  18872. "items": {
  18873. "$ref": "#/components/schemas/SnapshotFileDiff"
  18874. }
  18875. }
  18876. },
  18877. "required": ["additions", "deletions", "files"],
  18878. "additionalProperties": false
  18879. },
  18880. "cost": {
  18881. "type": "number"
  18882. },
  18883. "tokens": {
  18884. "type": "object",
  18885. "properties": {
  18886. "input": {
  18887. "type": "number"
  18888. },
  18889. "output": {
  18890. "type": "number"
  18891. },
  18892. "reasoning": {
  18893. "type": "number"
  18894. },
  18895. "cache": {
  18896. "type": "object",
  18897. "properties": {
  18898. "read": {
  18899. "type": "number"
  18900. },
  18901. "write": {
  18902. "type": "number"
  18903. }
  18904. },
  18905. "required": ["read", "write"],
  18906. "additionalProperties": false
  18907. }
  18908. },
  18909. "required": ["input", "output", "reasoning", "cache"],
  18910. "additionalProperties": false
  18911. },
  18912. "share": {
  18913. "type": "object",
  18914. "properties": {
  18915. "url": {
  18916. "type": "string"
  18917. }
  18918. },
  18919. "required": ["url"],
  18920. "additionalProperties": false
  18921. },
  18922. "title": {
  18923. "type": "string"
  18924. },
  18925. "agent": {
  18926. "type": "string"
  18927. },
  18928. "model": {
  18929. "type": "object",
  18930. "properties": {
  18931. "id": {
  18932. "type": "string"
  18933. },
  18934. "providerID": {
  18935. "type": "string"
  18936. },
  18937. "variant": {
  18938. "type": "string"
  18939. }
  18940. },
  18941. "required": ["id", "providerID"],
  18942. "additionalProperties": false
  18943. },
  18944. "version": {
  18945. "type": "string"
  18946. },
  18947. "metadata": {
  18948. "type": "object"
  18949. },
  18950. "time": {
  18951. "type": "object",
  18952. "properties": {
  18953. "created": {
  18954. "type": "integer",
  18955. "minimum": 0
  18956. },
  18957. "updated": {
  18958. "type": "integer",
  18959. "minimum": 0
  18960. },
  18961. "compacting": {
  18962. "type": "integer",
  18963. "minimum": 0
  18964. },
  18965. "archived": {
  18966. "type": "number"
  18967. }
  18968. },
  18969. "required": ["created", "updated"],
  18970. "additionalProperties": false
  18971. },
  18972. "permission": {
  18973. "$ref": "#/components/schemas/PermissionRuleset"
  18974. },
  18975. "revert": {
  18976. "type": "object",
  18977. "properties": {
  18978. "messageID": {
  18979. "type": "string",
  18980. "pattern": "^msg"
  18981. },
  18982. "partID": {
  18983. "type": "string",
  18984. "pattern": "^prt"
  18985. },
  18986. "snapshot": {
  18987. "type": "string"
  18988. },
  18989. "diff": {
  18990. "type": "string"
  18991. }
  18992. },
  18993. "required": ["messageID"],
  18994. "additionalProperties": false
  18995. }
  18996. },
  18997. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  18998. "additionalProperties": false
  18999. },
  19000. "Session9": {
  19001. "type": "object",
  19002. "properties": {
  19003. "id": {
  19004. "type": "string",
  19005. "pattern": "^ses"
  19006. },
  19007. "slug": {
  19008. "type": "string"
  19009. },
  19010. "projectID": {
  19011. "type": "string"
  19012. },
  19013. "workspaceID": {
  19014. "type": "string",
  19015. "pattern": "^wrk"
  19016. },
  19017. "directory": {
  19018. "type": "string"
  19019. },
  19020. "path": {
  19021. "type": "string"
  19022. },
  19023. "parentID": {
  19024. "type": "string",
  19025. "pattern": "^ses"
  19026. },
  19027. "summary": {
  19028. "type": "object",
  19029. "properties": {
  19030. "additions": {
  19031. "type": "number"
  19032. },
  19033. "deletions": {
  19034. "type": "number"
  19035. },
  19036. "files": {
  19037. "type": "number"
  19038. },
  19039. "diffs": {
  19040. "type": "array",
  19041. "items": {
  19042. "$ref": "#/components/schemas/SnapshotFileDiff"
  19043. }
  19044. }
  19045. },
  19046. "required": ["additions", "deletions", "files"],
  19047. "additionalProperties": false
  19048. },
  19049. "cost": {
  19050. "type": "number"
  19051. },
  19052. "tokens": {
  19053. "type": "object",
  19054. "properties": {
  19055. "input": {
  19056. "type": "number"
  19057. },
  19058. "output": {
  19059. "type": "number"
  19060. },
  19061. "reasoning": {
  19062. "type": "number"
  19063. },
  19064. "cache": {
  19065. "type": "object",
  19066. "properties": {
  19067. "read": {
  19068. "type": "number"
  19069. },
  19070. "write": {
  19071. "type": "number"
  19072. }
  19073. },
  19074. "required": ["read", "write"],
  19075. "additionalProperties": false
  19076. }
  19077. },
  19078. "required": ["input", "output", "reasoning", "cache"],
  19079. "additionalProperties": false
  19080. },
  19081. "share": {
  19082. "type": "object",
  19083. "properties": {
  19084. "url": {
  19085. "type": "string"
  19086. }
  19087. },
  19088. "required": ["url"],
  19089. "additionalProperties": false
  19090. },
  19091. "title": {
  19092. "type": "string"
  19093. },
  19094. "agent": {
  19095. "type": "string"
  19096. },
  19097. "model": {
  19098. "type": "object",
  19099. "properties": {
  19100. "id": {
  19101. "type": "string"
  19102. },
  19103. "providerID": {
  19104. "type": "string"
  19105. },
  19106. "variant": {
  19107. "type": "string"
  19108. }
  19109. },
  19110. "required": ["id", "providerID"],
  19111. "additionalProperties": false
  19112. },
  19113. "version": {
  19114. "type": "string"
  19115. },
  19116. "metadata": {
  19117. "type": "object"
  19118. },
  19119. "time": {
  19120. "type": "object",
  19121. "properties": {
  19122. "created": {
  19123. "type": "integer",
  19124. "minimum": 0
  19125. },
  19126. "updated": {
  19127. "type": "integer",
  19128. "minimum": 0
  19129. },
  19130. "compacting": {
  19131. "type": "integer",
  19132. "minimum": 0
  19133. },
  19134. "archived": {
  19135. "type": "number"
  19136. }
  19137. },
  19138. "required": ["created", "updated"],
  19139. "additionalProperties": false
  19140. },
  19141. "permission": {
  19142. "$ref": "#/components/schemas/PermissionRuleset"
  19143. },
  19144. "revert": {
  19145. "type": "object",
  19146. "properties": {
  19147. "messageID": {
  19148. "type": "string",
  19149. "pattern": "^msg"
  19150. },
  19151. "partID": {
  19152. "type": "string",
  19153. "pattern": "^prt"
  19154. },
  19155. "snapshot": {
  19156. "type": "string"
  19157. },
  19158. "diff": {
  19159. "type": "string"
  19160. }
  19161. },
  19162. "required": ["messageID"],
  19163. "additionalProperties": false
  19164. }
  19165. },
  19166. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  19167. "additionalProperties": false
  19168. },
  19169. "V2SessionsResponse": {
  19170. "type": "object",
  19171. "properties": {
  19172. "items": {
  19173. "type": "array",
  19174. "items": {
  19175. "$ref": "#/components/schemas/SessionInfo"
  19176. }
  19177. },
  19178. "cursor": {
  19179. "type": "object",
  19180. "properties": {
  19181. "previous": {
  19182. "type": "string"
  19183. },
  19184. "next": {
  19185. "type": "string"
  19186. }
  19187. },
  19188. "additionalProperties": false
  19189. }
  19190. },
  19191. "required": ["items", "cursor"],
  19192. "additionalProperties": false
  19193. },
  19194. "InvalidCursorError": {
  19195. "type": "object",
  19196. "properties": {
  19197. "_tag": {
  19198. "type": "string",
  19199. "enum": ["InvalidCursorError"]
  19200. },
  19201. "message": {
  19202. "type": "string"
  19203. }
  19204. },
  19205. "required": ["_tag", "message"],
  19206. "additionalProperties": false
  19207. },
  19208. "UnauthorizedError": {
  19209. "type": "object",
  19210. "properties": {
  19211. "_tag": {
  19212. "type": "string",
  19213. "enum": ["UnauthorizedError"]
  19214. },
  19215. "message": {
  19216. "type": "string"
  19217. }
  19218. },
  19219. "required": ["_tag", "message"],
  19220. "additionalProperties": false
  19221. },
  19222. "SessionNotFoundError": {
  19223. "type": "object",
  19224. "properties": {
  19225. "_tag": {
  19226. "type": "string",
  19227. "enum": ["SessionNotFoundError"]
  19228. },
  19229. "sessionID": {
  19230. "type": "string"
  19231. },
  19232. "message": {
  19233. "type": "string"
  19234. }
  19235. },
  19236. "required": ["_tag", "sessionID", "message"],
  19237. "additionalProperties": false
  19238. },
  19239. "ServiceUnavailableError": {
  19240. "type": "object",
  19241. "properties": {
  19242. "_tag": {
  19243. "type": "string",
  19244. "enum": ["ServiceUnavailableError"]
  19245. },
  19246. "message": {
  19247. "type": "string"
  19248. },
  19249. "service": {
  19250. "type": "string"
  19251. }
  19252. },
  19253. "required": ["_tag", "message"],
  19254. "additionalProperties": false
  19255. },
  19256. "UnknownError1": {
  19257. "type": "object",
  19258. "properties": {
  19259. "_tag": {
  19260. "type": "string",
  19261. "enum": ["UnknownError"]
  19262. },
  19263. "message": {
  19264. "type": "string"
  19265. },
  19266. "ref": {
  19267. "type": "string"
  19268. }
  19269. },
  19270. "required": ["_tag", "message"],
  19271. "additionalProperties": false
  19272. },
  19273. "V2SessionMessagesResponse": {
  19274. "type": "object",
  19275. "properties": {
  19276. "items": {
  19277. "type": "array",
  19278. "items": {
  19279. "$ref": "#/components/schemas/SessionMessage"
  19280. }
  19281. },
  19282. "cursor": {
  19283. "type": "object",
  19284. "properties": {
  19285. "previous": {
  19286. "type": "string"
  19287. },
  19288. "next": {
  19289. "type": "string"
  19290. }
  19291. },
  19292. "additionalProperties": false
  19293. }
  19294. },
  19295. "required": ["items", "cursor"],
  19296. "additionalProperties": false
  19297. },
  19298. "ProviderNotFoundError": {
  19299. "type": "object",
  19300. "properties": {
  19301. "_tag": {
  19302. "type": "string",
  19303. "enum": ["ProviderNotFoundError"]
  19304. },
  19305. "providerID": {
  19306. "type": "string"
  19307. },
  19308. "message": {
  19309. "type": "string"
  19310. }
  19311. },
  19312. "required": ["_tag", "providerID", "message"],
  19313. "additionalProperties": false
  19314. },
  19315. "EventTuiPromptAppend": {
  19316. "type": "object",
  19317. "properties": {
  19318. "type": {
  19319. "type": "string",
  19320. "enum": ["tui.prompt.append"]
  19321. },
  19322. "properties": {
  19323. "type": "object",
  19324. "properties": {
  19325. "text": {
  19326. "type": "string"
  19327. }
  19328. },
  19329. "required": ["text"],
  19330. "additionalProperties": false
  19331. }
  19332. },
  19333. "required": ["type", "properties"],
  19334. "additionalProperties": false
  19335. },
  19336. "EventTuiCommandExecute": {
  19337. "type": "object",
  19338. "properties": {
  19339. "type": {
  19340. "type": "string",
  19341. "enum": ["tui.command.execute"]
  19342. },
  19343. "properties": {
  19344. "type": "object",
  19345. "properties": {
  19346. "command": {
  19347. "anyOf": [
  19348. {
  19349. "type": "string",
  19350. "enum": [
  19351. "session.list",
  19352. "session.new",
  19353. "session.share",
  19354. "session.interrupt",
  19355. "session.compact",
  19356. "session.page.up",
  19357. "session.page.down",
  19358. "session.line.up",
  19359. "session.line.down",
  19360. "session.half.page.up",
  19361. "session.half.page.down",
  19362. "session.first",
  19363. "session.last",
  19364. "prompt.clear",
  19365. "prompt.submit",
  19366. "agent.cycle"
  19367. ]
  19368. },
  19369. {
  19370. "type": "string"
  19371. }
  19372. ]
  19373. }
  19374. },
  19375. "required": ["command"],
  19376. "additionalProperties": false
  19377. }
  19378. },
  19379. "required": ["type", "properties"],
  19380. "additionalProperties": false
  19381. },
  19382. "EventTuiToastShow": {
  19383. "type": "object",
  19384. "properties": {
  19385. "type": {
  19386. "type": "string",
  19387. "enum": ["tui.toast.show"]
  19388. },
  19389. "properties": {
  19390. "type": "object",
  19391. "properties": {
  19392. "title": {
  19393. "type": "string"
  19394. },
  19395. "message": {
  19396. "type": "string"
  19397. },
  19398. "variant": {
  19399. "type": "string",
  19400. "enum": ["info", "success", "warning", "error"]
  19401. },
  19402. "duration": {
  19403. "type": "integer",
  19404. "exclusiveMinimum": 0
  19405. }
  19406. },
  19407. "required": ["message", "variant"],
  19408. "additionalProperties": false
  19409. }
  19410. },
  19411. "required": ["type", "properties"],
  19412. "additionalProperties": false
  19413. },
  19414. "EventTuiSessionSelect": {
  19415. "type": "object",
  19416. "properties": {
  19417. "type": {
  19418. "type": "string",
  19419. "enum": ["tui.session.select"]
  19420. },
  19421. "properties": {
  19422. "type": "object",
  19423. "properties": {
  19424. "sessionID": {
  19425. "type": "string",
  19426. "pattern": "^ses",
  19427. "description": "Session ID to navigate to"
  19428. }
  19429. },
  19430. "required": ["sessionID"],
  19431. "additionalProperties": false
  19432. }
  19433. },
  19434. "required": ["type", "properties"],
  19435. "additionalProperties": false
  19436. },
  19437. "Workspace": {
  19438. "type": "object",
  19439. "properties": {
  19440. "id": {
  19441. "type": "string",
  19442. "pattern": "^wrk"
  19443. },
  19444. "type": {
  19445. "type": "string"
  19446. },
  19447. "name": {
  19448. "type": "string"
  19449. },
  19450. "branch": {
  19451. "anyOf": [
  19452. {
  19453. "type": "string"
  19454. },
  19455. {
  19456. "type": "null"
  19457. }
  19458. ]
  19459. },
  19460. "directory": {
  19461. "anyOf": [
  19462. {
  19463. "type": "string"
  19464. },
  19465. {
  19466. "type": "null"
  19467. }
  19468. ]
  19469. },
  19470. "extra": {
  19471. "anyOf": [
  19472. {},
  19473. {
  19474. "type": "null"
  19475. }
  19476. ]
  19477. },
  19478. "projectID": {
  19479. "type": "string"
  19480. },
  19481. "timeUsed": {
  19482. "anyOf": [
  19483. {
  19484. "type": "number"
  19485. },
  19486. {
  19487. "type": "string",
  19488. "enum": ["NaN"]
  19489. },
  19490. {
  19491. "type": "string",
  19492. "enum": ["Infinity"]
  19493. },
  19494. {
  19495. "type": "string",
  19496. "enum": ["-Infinity"]
  19497. },
  19498. {
  19499. "type": "string",
  19500. "enum": ["Infinity", "-Infinity", "NaN"]
  19501. }
  19502. ]
  19503. }
  19504. },
  19505. "required": ["id", "type", "name", "projectID", "timeUsed"],
  19506. "additionalProperties": false
  19507. },
  19508. "WorkspaceCreateError": {
  19509. "type": "object",
  19510. "properties": {
  19511. "name": {
  19512. "type": "string",
  19513. "enum": ["WorkspaceCreateError"]
  19514. },
  19515. "data": {
  19516. "type": "object",
  19517. "properties": {
  19518. "message": {
  19519. "type": "string"
  19520. }
  19521. },
  19522. "required": ["message"],
  19523. "additionalProperties": false
  19524. }
  19525. },
  19526. "required": ["name", "data"],
  19527. "additionalProperties": false
  19528. },
  19529. "WorkspaceWarpError": {
  19530. "type": "object",
  19531. "properties": {
  19532. "name": {
  19533. "type": "string",
  19534. "enum": ["WorkspaceWarpError"]
  19535. },
  19536. "data": {
  19537. "type": "object",
  19538. "properties": {
  19539. "message": {
  19540. "type": "string"
  19541. }
  19542. },
  19543. "required": ["message"],
  19544. "additionalProperties": false
  19545. }
  19546. },
  19547. "required": ["name", "data"],
  19548. "additionalProperties": false
  19549. },
  19550. "effect_HttpApiError_Forbidden": {
  19551. "type": "object",
  19552. "properties": {
  19553. "_tag": {
  19554. "type": "string",
  19555. "enum": ["Forbidden"]
  19556. }
  19557. },
  19558. "required": ["_tag"],
  19559. "additionalProperties": false
  19560. },
  19561. "Event.tui.prompt.append": {
  19562. "type": "object",
  19563. "properties": {
  19564. "id": {
  19565. "type": "string"
  19566. },
  19567. "type": {
  19568. "type": "string",
  19569. "enum": ["tui.prompt.append"]
  19570. },
  19571. "properties": {
  19572. "type": "object",
  19573. "properties": {
  19574. "text": {
  19575. "type": "string"
  19576. }
  19577. },
  19578. "required": ["text"],
  19579. "additionalProperties": false
  19580. }
  19581. },
  19582. "required": ["id", "type", "properties"],
  19583. "additionalProperties": false
  19584. },
  19585. "Event.tui.command.execute": {
  19586. "type": "object",
  19587. "properties": {
  19588. "id": {
  19589. "type": "string"
  19590. },
  19591. "type": {
  19592. "type": "string",
  19593. "enum": ["tui.command.execute"]
  19594. },
  19595. "properties": {
  19596. "type": "object",
  19597. "properties": {
  19598. "command": {
  19599. "anyOf": [
  19600. {
  19601. "type": "string",
  19602. "enum": [
  19603. "session.list",
  19604. "session.new",
  19605. "session.share",
  19606. "session.interrupt",
  19607. "session.compact",
  19608. "session.page.up",
  19609. "session.page.down",
  19610. "session.line.up",
  19611. "session.line.down",
  19612. "session.half.page.up",
  19613. "session.half.page.down",
  19614. "session.first",
  19615. "session.last",
  19616. "prompt.clear",
  19617. "prompt.submit",
  19618. "agent.cycle"
  19619. ]
  19620. },
  19621. {
  19622. "type": "string"
  19623. }
  19624. ]
  19625. }
  19626. },
  19627. "required": ["command"],
  19628. "additionalProperties": false
  19629. }
  19630. },
  19631. "required": ["id", "type", "properties"],
  19632. "additionalProperties": false
  19633. },
  19634. "Event.tui.toast.show": {
  19635. "type": "object",
  19636. "properties": {
  19637. "id": {
  19638. "type": "string"
  19639. },
  19640. "type": {
  19641. "type": "string",
  19642. "enum": ["tui.toast.show"]
  19643. },
  19644. "properties": {
  19645. "type": "object",
  19646. "properties": {
  19647. "title": {
  19648. "type": "string"
  19649. },
  19650. "message": {
  19651. "type": "string"
  19652. },
  19653. "variant": {
  19654. "type": "string",
  19655. "enum": ["info", "success", "warning", "error"]
  19656. },
  19657. "duration": {
  19658. "type": "integer",
  19659. "exclusiveMinimum": 0
  19660. }
  19661. },
  19662. "required": ["message", "variant"],
  19663. "additionalProperties": false
  19664. }
  19665. },
  19666. "required": ["id", "type", "properties"],
  19667. "additionalProperties": false
  19668. },
  19669. "Event.tui.session.select": {
  19670. "type": "object",
  19671. "properties": {
  19672. "id": {
  19673. "type": "string"
  19674. },
  19675. "type": {
  19676. "type": "string",
  19677. "enum": ["tui.session.select"]
  19678. },
  19679. "properties": {
  19680. "type": "object",
  19681. "properties": {
  19682. "sessionID": {
  19683. "type": "string",
  19684. "pattern": "^ses",
  19685. "description": "Session ID to navigate to"
  19686. }
  19687. },
  19688. "required": ["sessionID"],
  19689. "additionalProperties": false
  19690. }
  19691. },
  19692. "required": ["id", "type", "properties"],
  19693. "additionalProperties": false
  19694. },
  19695. "ModelV2Info": {
  19696. "type": "object",
  19697. "properties": {
  19698. "id": {
  19699. "type": "string"
  19700. },
  19701. "apiID": {
  19702. "type": "string"
  19703. },
  19704. "providerID": {
  19705. "type": "string"
  19706. },
  19707. "family": {
  19708. "type": "string"
  19709. },
  19710. "name": {
  19711. "type": "string"
  19712. },
  19713. "endpoint": {
  19714. "anyOf": [
  19715. {
  19716. "type": "object",
  19717. "properties": {
  19718. "type": {
  19719. "type": "string",
  19720. "enum": ["unknown"]
  19721. }
  19722. },
  19723. "required": ["type"],
  19724. "additionalProperties": false
  19725. },
  19726. {
  19727. "type": "object",
  19728. "properties": {
  19729. "type": {
  19730. "type": "string",
  19731. "enum": ["openai/responses"]
  19732. },
  19733. "url": {
  19734. "type": "string"
  19735. },
  19736. "websocket": {
  19737. "type": "boolean"
  19738. }
  19739. },
  19740. "required": ["type", "url"],
  19741. "additionalProperties": false
  19742. },
  19743. {
  19744. "type": "object",
  19745. "properties": {
  19746. "type": {
  19747. "type": "string",
  19748. "enum": ["openai/completions"]
  19749. },
  19750. "url": {
  19751. "type": "string"
  19752. },
  19753. "reasoning": {
  19754. "anyOf": [
  19755. {
  19756. "type": "object",
  19757. "properties": {
  19758. "type": {
  19759. "type": "string",
  19760. "enum": ["reasoning_content"]
  19761. }
  19762. },
  19763. "required": ["type"],
  19764. "additionalProperties": false
  19765. },
  19766. {
  19767. "type": "object",
  19768. "properties": {
  19769. "type": {
  19770. "type": "string",
  19771. "enum": ["reasoning_details"]
  19772. }
  19773. },
  19774. "required": ["type"],
  19775. "additionalProperties": false
  19776. }
  19777. ]
  19778. }
  19779. },
  19780. "required": ["type", "url"],
  19781. "additionalProperties": false
  19782. },
  19783. {
  19784. "type": "object",
  19785. "properties": {
  19786. "type": {
  19787. "type": "string",
  19788. "enum": ["anthropic/messages"]
  19789. },
  19790. "url": {
  19791. "type": "string"
  19792. }
  19793. },
  19794. "required": ["type", "url"],
  19795. "additionalProperties": false
  19796. },
  19797. {
  19798. "type": "object",
  19799. "properties": {
  19800. "type": {
  19801. "type": "string",
  19802. "enum": ["aisdk"]
  19803. },
  19804. "package": {
  19805. "type": "string"
  19806. },
  19807. "url": {
  19808. "type": "string"
  19809. }
  19810. },
  19811. "required": ["type", "package"],
  19812. "additionalProperties": false
  19813. }
  19814. ]
  19815. },
  19816. "capabilities": {
  19817. "type": "object",
  19818. "properties": {
  19819. "tools": {
  19820. "type": "boolean"
  19821. },
  19822. "input": {
  19823. "type": "array",
  19824. "items": {
  19825. "type": "string"
  19826. }
  19827. },
  19828. "output": {
  19829. "type": "array",
  19830. "items": {
  19831. "type": "string"
  19832. }
  19833. }
  19834. },
  19835. "required": ["tools", "input", "output"],
  19836. "additionalProperties": false
  19837. },
  19838. "options": {
  19839. "type": "object",
  19840. "properties": {
  19841. "headers": {
  19842. "type": "object",
  19843. "additionalProperties": {
  19844. "type": "string"
  19845. }
  19846. },
  19847. "body": {
  19848. "type": "object"
  19849. },
  19850. "aisdk": {
  19851. "type": "object",
  19852. "properties": {
  19853. "provider": {
  19854. "type": "object"
  19855. },
  19856. "request": {
  19857. "type": "object"
  19858. }
  19859. },
  19860. "required": ["provider", "request"],
  19861. "additionalProperties": false
  19862. },
  19863. "variant": {
  19864. "type": "string"
  19865. }
  19866. },
  19867. "required": ["headers", "body", "aisdk"],
  19868. "additionalProperties": false
  19869. },
  19870. "variants": {
  19871. "type": "array",
  19872. "items": {
  19873. "type": "object",
  19874. "properties": {
  19875. "id": {
  19876. "type": "string"
  19877. },
  19878. "headers": {
  19879. "type": "object",
  19880. "additionalProperties": {
  19881. "type": "string"
  19882. }
  19883. },
  19884. "body": {
  19885. "type": "object"
  19886. },
  19887. "aisdk": {
  19888. "type": "object",
  19889. "properties": {
  19890. "provider": {
  19891. "type": "object"
  19892. },
  19893. "request": {
  19894. "type": "object"
  19895. }
  19896. },
  19897. "required": ["provider", "request"],
  19898. "additionalProperties": false
  19899. }
  19900. },
  19901. "required": ["id", "headers", "body", "aisdk"],
  19902. "additionalProperties": false
  19903. }
  19904. },
  19905. "time": {
  19906. "type": "object",
  19907. "properties": {
  19908. "released": {
  19909. "anyOf": [
  19910. {
  19911. "type": "number"
  19912. },
  19913. {
  19914. "type": "string",
  19915. "enum": ["NaN"]
  19916. },
  19917. {
  19918. "type": "string",
  19919. "enum": ["Infinity"]
  19920. },
  19921. {
  19922. "type": "string",
  19923. "enum": ["-Infinity"]
  19924. },
  19925. {
  19926. "type": "string",
  19927. "enum": ["Infinity", "-Infinity", "NaN"]
  19928. }
  19929. ]
  19930. }
  19931. },
  19932. "required": ["released"],
  19933. "additionalProperties": false
  19934. },
  19935. "cost": {
  19936. "type": "array",
  19937. "items": {
  19938. "type": "object",
  19939. "properties": {
  19940. "tier": {
  19941. "type": "object",
  19942. "properties": {
  19943. "type": {
  19944. "type": "string",
  19945. "enum": ["context"]
  19946. },
  19947. "size": {
  19948. "type": "integer"
  19949. }
  19950. },
  19951. "required": ["type", "size"],
  19952. "additionalProperties": false
  19953. },
  19954. "input": {
  19955. "type": "number"
  19956. },
  19957. "output": {
  19958. "type": "number"
  19959. },
  19960. "cache": {
  19961. "type": "object",
  19962. "properties": {
  19963. "read": {
  19964. "type": "number"
  19965. },
  19966. "write": {
  19967. "type": "number"
  19968. }
  19969. },
  19970. "required": ["read", "write"],
  19971. "additionalProperties": false
  19972. }
  19973. },
  19974. "required": ["input", "output", "cache"],
  19975. "additionalProperties": false
  19976. }
  19977. },
  19978. "status": {
  19979. "type": "string",
  19980. "enum": ["alpha", "beta", "deprecated", "active"]
  19981. },
  19982. "enabled": {
  19983. "type": "boolean"
  19984. },
  19985. "limit": {
  19986. "type": "object",
  19987. "properties": {
  19988. "context": {
  19989. "type": "integer"
  19990. },
  19991. "input": {
  19992. "type": "integer"
  19993. },
  19994. "output": {
  19995. "type": "integer"
  19996. }
  19997. },
  19998. "required": ["context", "output"],
  19999. "additionalProperties": false
  20000. }
  20001. },
  20002. "required": [
  20003. "id",
  20004. "apiID",
  20005. "providerID",
  20006. "name",
  20007. "endpoint",
  20008. "capabilities",
  20009. "options",
  20010. "variants",
  20011. "time",
  20012. "cost",
  20013. "status",
  20014. "enabled",
  20015. "limit"
  20016. ],
  20017. "additionalProperties": false
  20018. },
  20019. "PromptSource": {
  20020. "type": "object",
  20021. "properties": {
  20022. "start": {
  20023. "type": "number"
  20024. },
  20025. "end": {
  20026. "type": "number"
  20027. },
  20028. "text": {
  20029. "type": "string"
  20030. }
  20031. },
  20032. "required": ["start", "end", "text"],
  20033. "additionalProperties": false
  20034. },
  20035. "PromptFileAttachment": {
  20036. "type": "object",
  20037. "properties": {
  20038. "uri": {
  20039. "type": "string"
  20040. },
  20041. "mime": {
  20042. "type": "string"
  20043. },
  20044. "name": {
  20045. "type": "string"
  20046. },
  20047. "description": {
  20048. "type": "string"
  20049. },
  20050. "source": {
  20051. "$ref": "#/components/schemas/PromptSource"
  20052. }
  20053. },
  20054. "required": ["uri", "mime"],
  20055. "additionalProperties": false
  20056. },
  20057. "PromptAgentAttachment": {
  20058. "type": "object",
  20059. "properties": {
  20060. "name": {
  20061. "type": "string"
  20062. },
  20063. "source": {
  20064. "$ref": "#/components/schemas/PromptSource"
  20065. }
  20066. },
  20067. "required": ["name"],
  20068. "additionalProperties": false
  20069. },
  20070. "PromptReferenceAttachment": {
  20071. "type": "object",
  20072. "properties": {
  20073. "name": {
  20074. "type": "string"
  20075. },
  20076. "kind": {
  20077. "type": "string",
  20078. "enum": ["local", "git", "invalid"]
  20079. },
  20080. "uri": {
  20081. "type": "string"
  20082. },
  20083. "repository": {
  20084. "type": "string"
  20085. },
  20086. "branch": {
  20087. "type": "string"
  20088. },
  20089. "target": {
  20090. "type": "string"
  20091. },
  20092. "targetUri": {
  20093. "type": "string"
  20094. },
  20095. "problem": {
  20096. "type": "string"
  20097. },
  20098. "source": {
  20099. "$ref": "#/components/schemas/PromptSource"
  20100. }
  20101. },
  20102. "required": ["name", "kind"],
  20103. "additionalProperties": false
  20104. },
  20105. "SessionErrorUnknown": {
  20106. "type": "object",
  20107. "properties": {
  20108. "type": {
  20109. "type": "string",
  20110. "enum": ["unknown"]
  20111. },
  20112. "message": {
  20113. "type": "string"
  20114. }
  20115. },
  20116. "required": ["type", "message"],
  20117. "additionalProperties": false
  20118. },
  20119. "ToolTextContent": {
  20120. "type": "object",
  20121. "properties": {
  20122. "type": {
  20123. "type": "string",
  20124. "enum": ["text"]
  20125. },
  20126. "text": {
  20127. "type": "string"
  20128. }
  20129. },
  20130. "required": ["type", "text"],
  20131. "additionalProperties": false
  20132. },
  20133. "ToolFileContent": {
  20134. "type": "object",
  20135. "properties": {
  20136. "type": {
  20137. "type": "string",
  20138. "enum": ["file"]
  20139. },
  20140. "uri": {
  20141. "type": "string"
  20142. },
  20143. "mime": {
  20144. "type": "string"
  20145. },
  20146. "name": {
  20147. "type": "string"
  20148. }
  20149. },
  20150. "required": ["type", "uri", "mime"],
  20151. "additionalProperties": false
  20152. },
  20153. "SessionNextRetry_error": {
  20154. "type": "object",
  20155. "properties": {
  20156. "message": {
  20157. "type": "string"
  20158. },
  20159. "statusCode": {
  20160. "type": "number"
  20161. },
  20162. "isRetryable": {
  20163. "type": "boolean"
  20164. },
  20165. "responseHeaders": {
  20166. "type": "object",
  20167. "additionalProperties": {
  20168. "type": "string"
  20169. }
  20170. },
  20171. "responseBody": {
  20172. "type": "string"
  20173. },
  20174. "metadata": {
  20175. "type": "object",
  20176. "additionalProperties": {
  20177. "type": "string"
  20178. }
  20179. }
  20180. },
  20181. "required": ["message", "isRetryable"],
  20182. "additionalProperties": false
  20183. },
  20184. "PermissionV2Action": {
  20185. "type": "string",
  20186. "enum": ["allow", "deny", "ask"]
  20187. },
  20188. "PermissionV2Rule": {
  20189. "type": "object",
  20190. "properties": {
  20191. "permission": {
  20192. "type": "string"
  20193. },
  20194. "pattern": {
  20195. "type": "string"
  20196. },
  20197. "action": {
  20198. "$ref": "#/components/schemas/PermissionV2Action"
  20199. }
  20200. },
  20201. "required": ["permission", "pattern", "action"],
  20202. "additionalProperties": false
  20203. },
  20204. "PermissionV2Ruleset": {
  20205. "type": "array",
  20206. "items": {
  20207. "$ref": "#/components/schemas/PermissionV2Rule"
  20208. }
  20209. },
  20210. "PolicyEffect": {
  20211. "type": "string",
  20212. "enum": ["allow", "deny"]
  20213. },
  20214. "ConfigV2ExperimentalPolicy": {
  20215. "type": "object",
  20216. "properties": {
  20217. "action": {
  20218. "type": "string",
  20219. "enum": ["provider.use"]
  20220. },
  20221. "effect": {
  20222. "$ref": "#/components/schemas/PolicyEffect"
  20223. },
  20224. "resource": {
  20225. "type": "string"
  20226. }
  20227. },
  20228. "required": ["action", "effect", "resource"],
  20229. "additionalProperties": false
  20230. },
  20231. "SessionInfo": {
  20232. "type": "object",
  20233. "properties": {
  20234. "id": {
  20235. "type": "string",
  20236. "pattern": "^ses"
  20237. },
  20238. "parentID": {
  20239. "type": "string",
  20240. "pattern": "^ses"
  20241. },
  20242. "projectID": {
  20243. "type": "string"
  20244. },
  20245. "workspaceID": {
  20246. "type": "string",
  20247. "pattern": "^wrk"
  20248. },
  20249. "path": {
  20250. "type": "string"
  20251. },
  20252. "agent": {
  20253. "type": "string"
  20254. },
  20255. "model": {
  20256. "type": "object",
  20257. "properties": {
  20258. "id": {
  20259. "type": "string"
  20260. },
  20261. "providerID": {
  20262. "type": "string"
  20263. },
  20264. "variant": {
  20265. "type": "string"
  20266. }
  20267. },
  20268. "required": ["id", "providerID"],
  20269. "additionalProperties": false
  20270. },
  20271. "cost": {
  20272. "type": "number"
  20273. },
  20274. "tokens": {
  20275. "type": "object",
  20276. "properties": {
  20277. "input": {
  20278. "type": "number"
  20279. },
  20280. "output": {
  20281. "type": "number"
  20282. },
  20283. "reasoning": {
  20284. "type": "number"
  20285. },
  20286. "cache": {
  20287. "type": "object",
  20288. "properties": {
  20289. "read": {
  20290. "type": "number"
  20291. },
  20292. "write": {
  20293. "type": "number"
  20294. }
  20295. },
  20296. "required": ["read", "write"],
  20297. "additionalProperties": false
  20298. }
  20299. },
  20300. "required": ["input", "output", "reasoning", "cache"],
  20301. "additionalProperties": false
  20302. },
  20303. "time": {
  20304. "type": "object",
  20305. "properties": {
  20306. "created": {
  20307. "type": "number"
  20308. },
  20309. "updated": {
  20310. "type": "number"
  20311. },
  20312. "archived": {
  20313. "type": "number"
  20314. }
  20315. },
  20316. "required": ["created", "updated"],
  20317. "additionalProperties": false
  20318. },
  20319. "title": {
  20320. "type": "string"
  20321. }
  20322. },
  20323. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20324. "additionalProperties": false
  20325. },
  20326. "SessionDelivery": {
  20327. "type": "string",
  20328. "enum": ["immediate", "deferred"]
  20329. },
  20330. "SessionMessageAgentSwitched": {
  20331. "type": "object",
  20332. "properties": {
  20333. "id": {
  20334. "type": "string"
  20335. },
  20336. "metadata": {
  20337. "type": "object"
  20338. },
  20339. "time": {
  20340. "type": "object",
  20341. "properties": {
  20342. "created": {
  20343. "type": "number"
  20344. }
  20345. },
  20346. "required": ["created"],
  20347. "additionalProperties": false
  20348. },
  20349. "type": {
  20350. "type": "string",
  20351. "enum": ["agent-switched"]
  20352. },
  20353. "agent": {
  20354. "type": "string"
  20355. }
  20356. },
  20357. "required": ["id", "time", "type", "agent"],
  20358. "additionalProperties": false
  20359. },
  20360. "SessionMessageModelSwitched": {
  20361. "type": "object",
  20362. "properties": {
  20363. "id": {
  20364. "type": "string"
  20365. },
  20366. "metadata": {
  20367. "type": "object"
  20368. },
  20369. "time": {
  20370. "type": "object",
  20371. "properties": {
  20372. "created": {
  20373. "type": "number"
  20374. }
  20375. },
  20376. "required": ["created"],
  20377. "additionalProperties": false
  20378. },
  20379. "type": {
  20380. "type": "string",
  20381. "enum": ["model-switched"]
  20382. },
  20383. "model": {
  20384. "type": "object",
  20385. "properties": {
  20386. "id": {
  20387. "type": "string"
  20388. },
  20389. "providerID": {
  20390. "type": "string"
  20391. },
  20392. "variant": {
  20393. "type": "string"
  20394. }
  20395. },
  20396. "required": ["id", "providerID"],
  20397. "additionalProperties": false
  20398. }
  20399. },
  20400. "required": ["id", "time", "type", "model"],
  20401. "additionalProperties": false
  20402. },
  20403. "SessionMessageUser": {
  20404. "type": "object",
  20405. "properties": {
  20406. "id": {
  20407. "type": "string"
  20408. },
  20409. "metadata": {
  20410. "type": "object"
  20411. },
  20412. "time": {
  20413. "type": "object",
  20414. "properties": {
  20415. "created": {
  20416. "type": "number"
  20417. }
  20418. },
  20419. "required": ["created"],
  20420. "additionalProperties": false
  20421. },
  20422. "text": {
  20423. "type": "string"
  20424. },
  20425. "files": {
  20426. "type": "array",
  20427. "items": {
  20428. "$ref": "#/components/schemas/PromptFileAttachment"
  20429. }
  20430. },
  20431. "agents": {
  20432. "type": "array",
  20433. "items": {
  20434. "$ref": "#/components/schemas/PromptAgentAttachment"
  20435. }
  20436. },
  20437. "references": {
  20438. "type": "array",
  20439. "items": {
  20440. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20441. }
  20442. },
  20443. "type": {
  20444. "type": "string",
  20445. "enum": ["user"]
  20446. }
  20447. },
  20448. "required": ["id", "time", "text", "type"],
  20449. "additionalProperties": false
  20450. },
  20451. "SessionMessageSynthetic": {
  20452. "type": "object",
  20453. "properties": {
  20454. "id": {
  20455. "type": "string"
  20456. },
  20457. "metadata": {
  20458. "type": "object"
  20459. },
  20460. "time": {
  20461. "type": "object",
  20462. "properties": {
  20463. "created": {
  20464. "type": "number"
  20465. }
  20466. },
  20467. "required": ["created"],
  20468. "additionalProperties": false
  20469. },
  20470. "sessionID": {
  20471. "type": "string",
  20472. "pattern": "^ses"
  20473. },
  20474. "text": {
  20475. "type": "string"
  20476. },
  20477. "type": {
  20478. "type": "string",
  20479. "enum": ["synthetic"]
  20480. }
  20481. },
  20482. "required": ["id", "time", "sessionID", "text", "type"],
  20483. "additionalProperties": false
  20484. },
  20485. "SessionMessageShell": {
  20486. "type": "object",
  20487. "properties": {
  20488. "id": {
  20489. "type": "string"
  20490. },
  20491. "metadata": {
  20492. "type": "object"
  20493. },
  20494. "time": {
  20495. "type": "object",
  20496. "properties": {
  20497. "created": {
  20498. "type": "number"
  20499. },
  20500. "completed": {
  20501. "type": "number"
  20502. }
  20503. },
  20504. "required": ["created"],
  20505. "additionalProperties": false
  20506. },
  20507. "type": {
  20508. "type": "string",
  20509. "enum": ["shell"]
  20510. },
  20511. "callID": {
  20512. "type": "string"
  20513. },
  20514. "command": {
  20515. "type": "string"
  20516. },
  20517. "output": {
  20518. "type": "string"
  20519. }
  20520. },
  20521. "required": ["id", "time", "type", "callID", "command", "output"],
  20522. "additionalProperties": false
  20523. },
  20524. "SessionMessageAssistantText": {
  20525. "type": "object",
  20526. "properties": {
  20527. "type": {
  20528. "type": "string",
  20529. "enum": ["text"]
  20530. },
  20531. "text": {
  20532. "type": "string"
  20533. }
  20534. },
  20535. "required": ["type", "text"],
  20536. "additionalProperties": false
  20537. },
  20538. "SessionMessageAssistantReasoning": {
  20539. "type": "object",
  20540. "properties": {
  20541. "type": {
  20542. "type": "string",
  20543. "enum": ["reasoning"]
  20544. },
  20545. "id": {
  20546. "type": "string"
  20547. },
  20548. "text": {
  20549. "type": "string"
  20550. }
  20551. },
  20552. "required": ["type", "id", "text"],
  20553. "additionalProperties": false
  20554. },
  20555. "SessionMessageToolStatePending": {
  20556. "type": "object",
  20557. "properties": {
  20558. "status": {
  20559. "type": "string",
  20560. "enum": ["pending"]
  20561. },
  20562. "input": {
  20563. "type": "string"
  20564. }
  20565. },
  20566. "required": ["status", "input"],
  20567. "additionalProperties": false
  20568. },
  20569. "SessionMessageToolStateRunning": {
  20570. "type": "object",
  20571. "properties": {
  20572. "status": {
  20573. "type": "string",
  20574. "enum": ["running"]
  20575. },
  20576. "input": {
  20577. "type": "object"
  20578. },
  20579. "structured": {
  20580. "type": "object"
  20581. },
  20582. "content": {
  20583. "type": "array",
  20584. "items": {
  20585. "anyOf": [
  20586. {
  20587. "$ref": "#/components/schemas/ToolTextContent"
  20588. },
  20589. {
  20590. "$ref": "#/components/schemas/ToolFileContent"
  20591. }
  20592. ]
  20593. }
  20594. }
  20595. },
  20596. "required": ["status", "input", "structured", "content"],
  20597. "additionalProperties": false
  20598. },
  20599. "SessionMessageToolStateCompleted": {
  20600. "type": "object",
  20601. "properties": {
  20602. "status": {
  20603. "type": "string",
  20604. "enum": ["completed"]
  20605. },
  20606. "input": {
  20607. "type": "object"
  20608. },
  20609. "attachments": {
  20610. "type": "array",
  20611. "items": {
  20612. "$ref": "#/components/schemas/PromptFileAttachment"
  20613. }
  20614. },
  20615. "content": {
  20616. "type": "array",
  20617. "items": {
  20618. "anyOf": [
  20619. {
  20620. "$ref": "#/components/schemas/ToolTextContent"
  20621. },
  20622. {
  20623. "$ref": "#/components/schemas/ToolFileContent"
  20624. }
  20625. ]
  20626. }
  20627. },
  20628. "structured": {
  20629. "type": "object"
  20630. }
  20631. },
  20632. "required": ["status", "input", "content", "structured"],
  20633. "additionalProperties": false
  20634. },
  20635. "SessionMessageToolStateError": {
  20636. "type": "object",
  20637. "properties": {
  20638. "status": {
  20639. "type": "string",
  20640. "enum": ["error"]
  20641. },
  20642. "input": {
  20643. "type": "object"
  20644. },
  20645. "content": {
  20646. "type": "array",
  20647. "items": {
  20648. "anyOf": [
  20649. {
  20650. "$ref": "#/components/schemas/ToolTextContent"
  20651. },
  20652. {
  20653. "$ref": "#/components/schemas/ToolFileContent"
  20654. }
  20655. ]
  20656. }
  20657. },
  20658. "structured": {
  20659. "type": "object"
  20660. },
  20661. "error": {
  20662. "$ref": "#/components/schemas/SessionErrorUnknown"
  20663. }
  20664. },
  20665. "required": ["status", "input", "content", "structured", "error"],
  20666. "additionalProperties": false
  20667. },
  20668. "SessionMessageAssistantTool": {
  20669. "type": "object",
  20670. "properties": {
  20671. "type": {
  20672. "type": "string",
  20673. "enum": ["tool"]
  20674. },
  20675. "id": {
  20676. "type": "string"
  20677. },
  20678. "name": {
  20679. "type": "string"
  20680. },
  20681. "provider": {
  20682. "type": "object",
  20683. "properties": {
  20684. "executed": {
  20685. "type": "boolean"
  20686. },
  20687. "metadata": {
  20688. "type": "object"
  20689. }
  20690. },
  20691. "required": ["executed"],
  20692. "additionalProperties": false
  20693. },
  20694. "state": {
  20695. "anyOf": [
  20696. {
  20697. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  20698. },
  20699. {
  20700. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  20701. },
  20702. {
  20703. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  20704. },
  20705. {
  20706. "$ref": "#/components/schemas/SessionMessageToolStateError"
  20707. }
  20708. ]
  20709. },
  20710. "time": {
  20711. "type": "object",
  20712. "properties": {
  20713. "created": {
  20714. "type": "number"
  20715. },
  20716. "ran": {
  20717. "type": "number"
  20718. },
  20719. "completed": {
  20720. "type": "number"
  20721. },
  20722. "pruned": {
  20723. "type": "number"
  20724. }
  20725. },
  20726. "required": ["created"],
  20727. "additionalProperties": false
  20728. }
  20729. },
  20730. "required": ["type", "id", "name", "state", "time"],
  20731. "additionalProperties": false
  20732. },
  20733. "SessionMessageAssistant": {
  20734. "type": "object",
  20735. "properties": {
  20736. "id": {
  20737. "type": "string"
  20738. },
  20739. "metadata": {
  20740. "type": "object"
  20741. },
  20742. "time": {
  20743. "type": "object",
  20744. "properties": {
  20745. "created": {
  20746. "type": "number"
  20747. },
  20748. "completed": {
  20749. "type": "number"
  20750. }
  20751. },
  20752. "required": ["created"],
  20753. "additionalProperties": false
  20754. },
  20755. "type": {
  20756. "type": "string",
  20757. "enum": ["assistant"]
  20758. },
  20759. "agent": {
  20760. "type": "string"
  20761. },
  20762. "model": {
  20763. "type": "object",
  20764. "properties": {
  20765. "id": {
  20766. "type": "string"
  20767. },
  20768. "providerID": {
  20769. "type": "string"
  20770. },
  20771. "variant": {
  20772. "type": "string"
  20773. }
  20774. },
  20775. "required": ["id", "providerID"],
  20776. "additionalProperties": false
  20777. },
  20778. "content": {
  20779. "type": "array",
  20780. "items": {
  20781. "anyOf": [
  20782. {
  20783. "$ref": "#/components/schemas/SessionMessageAssistantText"
  20784. },
  20785. {
  20786. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  20787. },
  20788. {
  20789. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  20790. }
  20791. ]
  20792. }
  20793. },
  20794. "snapshot": {
  20795. "type": "object",
  20796. "properties": {
  20797. "start": {
  20798. "type": "string"
  20799. },
  20800. "end": {
  20801. "type": "string"
  20802. }
  20803. },
  20804. "additionalProperties": false
  20805. },
  20806. "finish": {
  20807. "type": "string"
  20808. },
  20809. "cost": {
  20810. "type": "number"
  20811. },
  20812. "tokens": {
  20813. "type": "object",
  20814. "properties": {
  20815. "input": {
  20816. "type": "number"
  20817. },
  20818. "output": {
  20819. "type": "number"
  20820. },
  20821. "reasoning": {
  20822. "type": "number"
  20823. },
  20824. "cache": {
  20825. "type": "object",
  20826. "properties": {
  20827. "read": {
  20828. "type": "number"
  20829. },
  20830. "write": {
  20831. "type": "number"
  20832. }
  20833. },
  20834. "required": ["read", "write"],
  20835. "additionalProperties": false
  20836. }
  20837. },
  20838. "required": ["input", "output", "reasoning", "cache"],
  20839. "additionalProperties": false
  20840. },
  20841. "error": {
  20842. "$ref": "#/components/schemas/SessionErrorUnknown"
  20843. }
  20844. },
  20845. "required": ["id", "time", "type", "agent", "model", "content"],
  20846. "additionalProperties": false
  20847. },
  20848. "SessionMessageCompaction": {
  20849. "type": "object",
  20850. "properties": {
  20851. "type": {
  20852. "type": "string",
  20853. "enum": ["compaction"]
  20854. },
  20855. "reason": {
  20856. "type": "string",
  20857. "enum": ["auto", "manual"]
  20858. },
  20859. "summary": {
  20860. "type": "string"
  20861. },
  20862. "include": {
  20863. "type": "string"
  20864. },
  20865. "id": {
  20866. "type": "string"
  20867. },
  20868. "metadata": {
  20869. "type": "object"
  20870. },
  20871. "time": {
  20872. "type": "object",
  20873. "properties": {
  20874. "created": {
  20875. "type": "number"
  20876. }
  20877. },
  20878. "required": ["created"],
  20879. "additionalProperties": false
  20880. }
  20881. },
  20882. "required": ["type", "reason", "summary", "id", "time"],
  20883. "additionalProperties": false
  20884. },
  20885. "SessionMessage": {
  20886. "anyOf": [
  20887. {
  20888. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  20889. },
  20890. {
  20891. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  20892. },
  20893. {
  20894. "$ref": "#/components/schemas/SessionMessageUser"
  20895. },
  20896. {
  20897. "$ref": "#/components/schemas/SessionMessageSynthetic"
  20898. },
  20899. {
  20900. "$ref": "#/components/schemas/SessionMessageShell"
  20901. },
  20902. {
  20903. "$ref": "#/components/schemas/SessionMessageAssistant"
  20904. },
  20905. {
  20906. "$ref": "#/components/schemas/SessionMessageCompaction"
  20907. }
  20908. ]
  20909. },
  20910. "ProviderV2Info": {
  20911. "type": "object",
  20912. "properties": {
  20913. "id": {
  20914. "type": "string"
  20915. },
  20916. "name": {
  20917. "type": "string"
  20918. },
  20919. "enabled": {
  20920. "anyOf": [
  20921. {
  20922. "type": "boolean",
  20923. "enum": [false]
  20924. },
  20925. {
  20926. "type": "object",
  20927. "properties": {
  20928. "via": {
  20929. "type": "string",
  20930. "enum": ["env"]
  20931. },
  20932. "name": {
  20933. "type": "string"
  20934. }
  20935. },
  20936. "required": ["via", "name"],
  20937. "additionalProperties": false
  20938. },
  20939. {
  20940. "type": "object",
  20941. "properties": {
  20942. "via": {
  20943. "type": "string",
  20944. "enum": ["account"]
  20945. },
  20946. "service": {
  20947. "type": "string"
  20948. }
  20949. },
  20950. "required": ["via", "service"],
  20951. "additionalProperties": false
  20952. },
  20953. {
  20954. "type": "object",
  20955. "properties": {
  20956. "via": {
  20957. "type": "string",
  20958. "enum": ["custom"]
  20959. },
  20960. "data": {
  20961. "type": "object"
  20962. }
  20963. },
  20964. "required": ["via", "data"],
  20965. "additionalProperties": false
  20966. }
  20967. ]
  20968. },
  20969. "env": {
  20970. "type": "array",
  20971. "items": {
  20972. "type": "string"
  20973. }
  20974. },
  20975. "endpoint": {
  20976. "anyOf": [
  20977. {
  20978. "type": "object",
  20979. "properties": {
  20980. "type": {
  20981. "type": "string",
  20982. "enum": ["unknown"]
  20983. }
  20984. },
  20985. "required": ["type"],
  20986. "additionalProperties": false
  20987. },
  20988. {
  20989. "type": "object",
  20990. "properties": {
  20991. "type": {
  20992. "type": "string",
  20993. "enum": ["openai/responses"]
  20994. },
  20995. "url": {
  20996. "type": "string"
  20997. },
  20998. "websocket": {
  20999. "type": "boolean"
  21000. }
  21001. },
  21002. "required": ["type", "url"],
  21003. "additionalProperties": false
  21004. },
  21005. {
  21006. "type": "object",
  21007. "properties": {
  21008. "type": {
  21009. "type": "string",
  21010. "enum": ["openai/completions"]
  21011. },
  21012. "url": {
  21013. "type": "string"
  21014. },
  21015. "reasoning": {
  21016. "anyOf": [
  21017. {
  21018. "type": "object",
  21019. "properties": {
  21020. "type": {
  21021. "type": "string",
  21022. "enum": ["reasoning_content"]
  21023. }
  21024. },
  21025. "required": ["type"],
  21026. "additionalProperties": false
  21027. },
  21028. {
  21029. "type": "object",
  21030. "properties": {
  21031. "type": {
  21032. "type": "string",
  21033. "enum": ["reasoning_details"]
  21034. }
  21035. },
  21036. "required": ["type"],
  21037. "additionalProperties": false
  21038. }
  21039. ]
  21040. }
  21041. },
  21042. "required": ["type", "url"],
  21043. "additionalProperties": false
  21044. },
  21045. {
  21046. "type": "object",
  21047. "properties": {
  21048. "type": {
  21049. "type": "string",
  21050. "enum": ["anthropic/messages"]
  21051. },
  21052. "url": {
  21053. "type": "string"
  21054. }
  21055. },
  21056. "required": ["type", "url"],
  21057. "additionalProperties": false
  21058. },
  21059. {
  21060. "type": "object",
  21061. "properties": {
  21062. "type": {
  21063. "type": "string",
  21064. "enum": ["aisdk"]
  21065. },
  21066. "package": {
  21067. "type": "string"
  21068. },
  21069. "url": {
  21070. "type": "string"
  21071. }
  21072. },
  21073. "required": ["type", "package"],
  21074. "additionalProperties": false
  21075. }
  21076. ]
  21077. },
  21078. "options": {
  21079. "type": "object",
  21080. "properties": {
  21081. "headers": {
  21082. "type": "object",
  21083. "additionalProperties": {
  21084. "type": "string"
  21085. }
  21086. },
  21087. "body": {
  21088. "type": "object"
  21089. },
  21090. "aisdk": {
  21091. "type": "object",
  21092. "properties": {
  21093. "provider": {
  21094. "type": "object"
  21095. },
  21096. "request": {
  21097. "type": "object"
  21098. }
  21099. },
  21100. "required": ["provider", "request"],
  21101. "additionalProperties": false
  21102. }
  21103. },
  21104. "required": ["headers", "body", "aisdk"],
  21105. "additionalProperties": false
  21106. }
  21107. },
  21108. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21109. "additionalProperties": false
  21110. },
  21111. "EventModels-devRefreshed": {
  21112. "type": "object",
  21113. "properties": {
  21114. "id": {
  21115. "type": "string"
  21116. },
  21117. "type": {
  21118. "type": "string",
  21119. "enum": ["models-dev.refreshed"]
  21120. },
  21121. "properties": {
  21122. "type": "object",
  21123. "properties": {}
  21124. }
  21125. },
  21126. "required": ["id", "type", "properties"],
  21127. "additionalProperties": false
  21128. },
  21129. "EventPluginAdded": {
  21130. "type": "object",
  21131. "properties": {
  21132. "id": {
  21133. "type": "string"
  21134. },
  21135. "type": {
  21136. "type": "string",
  21137. "enum": ["plugin.added"]
  21138. },
  21139. "properties": {
  21140. "type": "object",
  21141. "properties": {
  21142. "id": {
  21143. "type": "string"
  21144. }
  21145. },
  21146. "required": ["id"],
  21147. "additionalProperties": false
  21148. }
  21149. },
  21150. "required": ["id", "type", "properties"],
  21151. "additionalProperties": false
  21152. },
  21153. "ModelV2Info1": {
  21154. "type": "object",
  21155. "properties": {
  21156. "id": {
  21157. "type": "string"
  21158. },
  21159. "apiID": {
  21160. "type": "string"
  21161. },
  21162. "providerID": {
  21163. "type": "string"
  21164. },
  21165. "family": {
  21166. "type": "string"
  21167. },
  21168. "name": {
  21169. "type": "string"
  21170. },
  21171. "endpoint": {
  21172. "anyOf": [
  21173. {
  21174. "type": "object",
  21175. "properties": {
  21176. "type": {
  21177. "type": "string",
  21178. "enum": ["unknown"]
  21179. }
  21180. },
  21181. "required": ["type"],
  21182. "additionalProperties": false
  21183. },
  21184. {
  21185. "type": "object",
  21186. "properties": {
  21187. "type": {
  21188. "type": "string",
  21189. "enum": ["openai/responses"]
  21190. },
  21191. "url": {
  21192. "type": "string"
  21193. },
  21194. "websocket": {
  21195. "type": "boolean"
  21196. }
  21197. },
  21198. "required": ["type", "url"],
  21199. "additionalProperties": false
  21200. },
  21201. {
  21202. "type": "object",
  21203. "properties": {
  21204. "type": {
  21205. "type": "string",
  21206. "enum": ["openai/completions"]
  21207. },
  21208. "url": {
  21209. "type": "string"
  21210. },
  21211. "reasoning": {
  21212. "anyOf": [
  21213. {
  21214. "type": "object",
  21215. "properties": {
  21216. "type": {
  21217. "type": "string",
  21218. "enum": ["reasoning_content"]
  21219. }
  21220. },
  21221. "required": ["type"],
  21222. "additionalProperties": false
  21223. },
  21224. {
  21225. "type": "object",
  21226. "properties": {
  21227. "type": {
  21228. "type": "string",
  21229. "enum": ["reasoning_details"]
  21230. }
  21231. },
  21232. "required": ["type"],
  21233. "additionalProperties": false
  21234. }
  21235. ]
  21236. }
  21237. },
  21238. "required": ["type", "url"],
  21239. "additionalProperties": false
  21240. },
  21241. {
  21242. "type": "object",
  21243. "properties": {
  21244. "type": {
  21245. "type": "string",
  21246. "enum": ["anthropic/messages"]
  21247. },
  21248. "url": {
  21249. "type": "string"
  21250. }
  21251. },
  21252. "required": ["type", "url"],
  21253. "additionalProperties": false
  21254. },
  21255. {
  21256. "type": "object",
  21257. "properties": {
  21258. "type": {
  21259. "type": "string",
  21260. "enum": ["aisdk"]
  21261. },
  21262. "package": {
  21263. "type": "string"
  21264. },
  21265. "url": {
  21266. "type": "string"
  21267. }
  21268. },
  21269. "required": ["type", "package"],
  21270. "additionalProperties": false
  21271. }
  21272. ]
  21273. },
  21274. "capabilities": {
  21275. "type": "object",
  21276. "properties": {
  21277. "tools": {
  21278. "type": "boolean"
  21279. },
  21280. "input": {
  21281. "type": "array",
  21282. "items": {
  21283. "type": "string"
  21284. }
  21285. },
  21286. "output": {
  21287. "type": "array",
  21288. "items": {
  21289. "type": "string"
  21290. }
  21291. }
  21292. },
  21293. "required": ["tools", "input", "output"],
  21294. "additionalProperties": false
  21295. },
  21296. "options": {
  21297. "type": "object",
  21298. "properties": {
  21299. "headers": {
  21300. "type": "object",
  21301. "additionalProperties": {
  21302. "type": "string"
  21303. }
  21304. },
  21305. "body": {
  21306. "type": "object"
  21307. },
  21308. "aisdk": {
  21309. "type": "object",
  21310. "properties": {
  21311. "provider": {
  21312. "type": "object"
  21313. },
  21314. "request": {
  21315. "type": "object"
  21316. }
  21317. },
  21318. "required": ["provider", "request"],
  21319. "additionalProperties": false
  21320. },
  21321. "variant": {
  21322. "type": "string"
  21323. }
  21324. },
  21325. "required": ["headers", "body", "aisdk"],
  21326. "additionalProperties": false
  21327. },
  21328. "variants": {
  21329. "type": "array",
  21330. "items": {
  21331. "type": "object",
  21332. "properties": {
  21333. "id": {
  21334. "type": "string"
  21335. },
  21336. "headers": {
  21337. "type": "object",
  21338. "additionalProperties": {
  21339. "type": "string"
  21340. }
  21341. },
  21342. "body": {
  21343. "type": "object"
  21344. },
  21345. "aisdk": {
  21346. "type": "object",
  21347. "properties": {
  21348. "provider": {
  21349. "type": "object"
  21350. },
  21351. "request": {
  21352. "type": "object"
  21353. }
  21354. },
  21355. "required": ["provider", "request"],
  21356. "additionalProperties": false
  21357. }
  21358. },
  21359. "required": ["id", "headers", "body", "aisdk"],
  21360. "additionalProperties": false
  21361. }
  21362. },
  21363. "time": {
  21364. "type": "object",
  21365. "properties": {
  21366. "released": {
  21367. "anyOf": [
  21368. {
  21369. "type": "number"
  21370. },
  21371. {
  21372. "type": "string",
  21373. "enum": ["NaN"]
  21374. },
  21375. {
  21376. "type": "string",
  21377. "enum": ["Infinity"]
  21378. },
  21379. {
  21380. "type": "string",
  21381. "enum": ["-Infinity"]
  21382. }
  21383. ]
  21384. }
  21385. },
  21386. "required": ["released"],
  21387. "additionalProperties": false
  21388. },
  21389. "cost": {
  21390. "type": "array",
  21391. "items": {
  21392. "type": "object",
  21393. "properties": {
  21394. "tier": {
  21395. "type": "object",
  21396. "properties": {
  21397. "type": {
  21398. "type": "string",
  21399. "enum": ["context"]
  21400. },
  21401. "size": {
  21402. "type": "integer"
  21403. }
  21404. },
  21405. "required": ["type", "size"],
  21406. "additionalProperties": false
  21407. },
  21408. "input": {
  21409. "type": "number"
  21410. },
  21411. "output": {
  21412. "type": "number"
  21413. },
  21414. "cache": {
  21415. "type": "object",
  21416. "properties": {
  21417. "read": {
  21418. "type": "number"
  21419. },
  21420. "write": {
  21421. "type": "number"
  21422. }
  21423. },
  21424. "required": ["read", "write"],
  21425. "additionalProperties": false
  21426. }
  21427. },
  21428. "required": ["input", "output", "cache"],
  21429. "additionalProperties": false
  21430. }
  21431. },
  21432. "status": {
  21433. "type": "string",
  21434. "enum": ["alpha", "beta", "deprecated", "active"]
  21435. },
  21436. "enabled": {
  21437. "type": "boolean"
  21438. },
  21439. "limit": {
  21440. "type": "object",
  21441. "properties": {
  21442. "context": {
  21443. "type": "integer"
  21444. },
  21445. "input": {
  21446. "type": "integer"
  21447. },
  21448. "output": {
  21449. "type": "integer"
  21450. }
  21451. },
  21452. "required": ["context", "output"],
  21453. "additionalProperties": false
  21454. }
  21455. },
  21456. "required": [
  21457. "id",
  21458. "apiID",
  21459. "providerID",
  21460. "name",
  21461. "endpoint",
  21462. "capabilities",
  21463. "options",
  21464. "variants",
  21465. "time",
  21466. "cost",
  21467. "status",
  21468. "enabled",
  21469. "limit"
  21470. ],
  21471. "additionalProperties": false
  21472. },
  21473. "EventCatalogModelUpdated": {
  21474. "type": "object",
  21475. "properties": {
  21476. "id": {
  21477. "type": "string"
  21478. },
  21479. "type": {
  21480. "type": "string",
  21481. "enum": ["catalog.model.updated"]
  21482. },
  21483. "properties": {
  21484. "type": "object",
  21485. "properties": {
  21486. "model": {
  21487. "$ref": "#/components/schemas/ModelV2Info1"
  21488. }
  21489. },
  21490. "required": ["model"],
  21491. "additionalProperties": false
  21492. }
  21493. },
  21494. "required": ["id", "type", "properties"],
  21495. "additionalProperties": false
  21496. },
  21497. "EventFileEdited": {
  21498. "type": "object",
  21499. "properties": {
  21500. "id": {
  21501. "type": "string"
  21502. },
  21503. "type": {
  21504. "type": "string",
  21505. "enum": ["file.edited"]
  21506. },
  21507. "properties": {
  21508. "type": "object",
  21509. "properties": {
  21510. "file": {
  21511. "type": "string"
  21512. }
  21513. },
  21514. "required": ["file"],
  21515. "additionalProperties": false
  21516. }
  21517. },
  21518. "required": ["id", "type", "properties"],
  21519. "additionalProperties": false
  21520. },
  21521. "EventSessionNextAgentSwitched": {
  21522. "type": "object",
  21523. "properties": {
  21524. "id": {
  21525. "type": "string"
  21526. },
  21527. "type": {
  21528. "type": "string",
  21529. "enum": ["session.next.agent.switched"]
  21530. },
  21531. "properties": {
  21532. "type": "object",
  21533. "properties": {
  21534. "timestamp": {
  21535. "type": "number"
  21536. },
  21537. "sessionID": {
  21538. "type": "string",
  21539. "pattern": "^ses"
  21540. },
  21541. "agent": {
  21542. "type": "string"
  21543. }
  21544. },
  21545. "required": ["timestamp", "sessionID", "agent"],
  21546. "additionalProperties": false
  21547. }
  21548. },
  21549. "required": ["id", "type", "properties"],
  21550. "additionalProperties": false
  21551. },
  21552. "EventSessionNextModelSwitched": {
  21553. "type": "object",
  21554. "properties": {
  21555. "id": {
  21556. "type": "string"
  21557. },
  21558. "type": {
  21559. "type": "string",
  21560. "enum": ["session.next.model.switched"]
  21561. },
  21562. "properties": {
  21563. "type": "object",
  21564. "properties": {
  21565. "timestamp": {
  21566. "type": "number"
  21567. },
  21568. "sessionID": {
  21569. "type": "string",
  21570. "pattern": "^ses"
  21571. },
  21572. "model": {
  21573. "type": "object",
  21574. "properties": {
  21575. "id": {
  21576. "type": "string"
  21577. },
  21578. "providerID": {
  21579. "type": "string"
  21580. },
  21581. "variant": {
  21582. "type": "string"
  21583. }
  21584. },
  21585. "required": ["id", "providerID"],
  21586. "additionalProperties": false
  21587. }
  21588. },
  21589. "required": ["timestamp", "sessionID", "model"],
  21590. "additionalProperties": false
  21591. }
  21592. },
  21593. "required": ["id", "type", "properties"],
  21594. "additionalProperties": false
  21595. },
  21596. "EventSessionNextPrompted": {
  21597. "type": "object",
  21598. "properties": {
  21599. "id": {
  21600. "type": "string"
  21601. },
  21602. "type": {
  21603. "type": "string",
  21604. "enum": ["session.next.prompted"]
  21605. },
  21606. "properties": {
  21607. "type": "object",
  21608. "properties": {
  21609. "timestamp": {
  21610. "type": "number"
  21611. },
  21612. "sessionID": {
  21613. "type": "string",
  21614. "pattern": "^ses"
  21615. },
  21616. "prompt": {
  21617. "$ref": "#/components/schemas/Prompt"
  21618. }
  21619. },
  21620. "required": ["timestamp", "sessionID", "prompt"],
  21621. "additionalProperties": false
  21622. }
  21623. },
  21624. "required": ["id", "type", "properties"],
  21625. "additionalProperties": false
  21626. },
  21627. "EventSessionNextSynthetic": {
  21628. "type": "object",
  21629. "properties": {
  21630. "id": {
  21631. "type": "string"
  21632. },
  21633. "type": {
  21634. "type": "string",
  21635. "enum": ["session.next.synthetic"]
  21636. },
  21637. "properties": {
  21638. "type": "object",
  21639. "properties": {
  21640. "timestamp": {
  21641. "type": "number"
  21642. },
  21643. "sessionID": {
  21644. "type": "string",
  21645. "pattern": "^ses"
  21646. },
  21647. "text": {
  21648. "type": "string"
  21649. }
  21650. },
  21651. "required": ["timestamp", "sessionID", "text"],
  21652. "additionalProperties": false
  21653. }
  21654. },
  21655. "required": ["id", "type", "properties"],
  21656. "additionalProperties": false
  21657. },
  21658. "EventSessionNextShellStarted": {
  21659. "type": "object",
  21660. "properties": {
  21661. "id": {
  21662. "type": "string"
  21663. },
  21664. "type": {
  21665. "type": "string",
  21666. "enum": ["session.next.shell.started"]
  21667. },
  21668. "properties": {
  21669. "type": "object",
  21670. "properties": {
  21671. "timestamp": {
  21672. "type": "number"
  21673. },
  21674. "sessionID": {
  21675. "type": "string",
  21676. "pattern": "^ses"
  21677. },
  21678. "callID": {
  21679. "type": "string"
  21680. },
  21681. "command": {
  21682. "type": "string"
  21683. }
  21684. },
  21685. "required": ["timestamp", "sessionID", "callID", "command"],
  21686. "additionalProperties": false
  21687. }
  21688. },
  21689. "required": ["id", "type", "properties"],
  21690. "additionalProperties": false
  21691. },
  21692. "EventSessionNextShellEnded": {
  21693. "type": "object",
  21694. "properties": {
  21695. "id": {
  21696. "type": "string"
  21697. },
  21698. "type": {
  21699. "type": "string",
  21700. "enum": ["session.next.shell.ended"]
  21701. },
  21702. "properties": {
  21703. "type": "object",
  21704. "properties": {
  21705. "timestamp": {
  21706. "type": "number"
  21707. },
  21708. "sessionID": {
  21709. "type": "string",
  21710. "pattern": "^ses"
  21711. },
  21712. "callID": {
  21713. "type": "string"
  21714. },
  21715. "output": {
  21716. "type": "string"
  21717. }
  21718. },
  21719. "required": ["timestamp", "sessionID", "callID", "output"],
  21720. "additionalProperties": false
  21721. }
  21722. },
  21723. "required": ["id", "type", "properties"],
  21724. "additionalProperties": false
  21725. },
  21726. "EventSessionNextStepStarted": {
  21727. "type": "object",
  21728. "properties": {
  21729. "id": {
  21730. "type": "string"
  21731. },
  21732. "type": {
  21733. "type": "string",
  21734. "enum": ["session.next.step.started"]
  21735. },
  21736. "properties": {
  21737. "type": "object",
  21738. "properties": {
  21739. "timestamp": {
  21740. "type": "number"
  21741. },
  21742. "sessionID": {
  21743. "type": "string",
  21744. "pattern": "^ses"
  21745. },
  21746. "agent": {
  21747. "type": "string"
  21748. },
  21749. "model": {
  21750. "type": "object",
  21751. "properties": {
  21752. "id": {
  21753. "type": "string"
  21754. },
  21755. "providerID": {
  21756. "type": "string"
  21757. },
  21758. "variant": {
  21759. "type": "string"
  21760. }
  21761. },
  21762. "required": ["id", "providerID"],
  21763. "additionalProperties": false
  21764. },
  21765. "snapshot": {
  21766. "type": "string"
  21767. }
  21768. },
  21769. "required": ["timestamp", "sessionID", "agent", "model"],
  21770. "additionalProperties": false
  21771. }
  21772. },
  21773. "required": ["id", "type", "properties"],
  21774. "additionalProperties": false
  21775. },
  21776. "EventSessionNextStepEnded": {
  21777. "type": "object",
  21778. "properties": {
  21779. "id": {
  21780. "type": "string"
  21781. },
  21782. "type": {
  21783. "type": "string",
  21784. "enum": ["session.next.step.ended"]
  21785. },
  21786. "properties": {
  21787. "type": "object",
  21788. "properties": {
  21789. "timestamp": {
  21790. "type": "number"
  21791. },
  21792. "sessionID": {
  21793. "type": "string",
  21794. "pattern": "^ses"
  21795. },
  21796. "finish": {
  21797. "type": "string"
  21798. },
  21799. "cost": {
  21800. "type": "number"
  21801. },
  21802. "tokens": {
  21803. "type": "object",
  21804. "properties": {
  21805. "input": {
  21806. "type": "number"
  21807. },
  21808. "output": {
  21809. "type": "number"
  21810. },
  21811. "reasoning": {
  21812. "type": "number"
  21813. },
  21814. "cache": {
  21815. "type": "object",
  21816. "properties": {
  21817. "read": {
  21818. "type": "number"
  21819. },
  21820. "write": {
  21821. "type": "number"
  21822. }
  21823. },
  21824. "required": ["read", "write"],
  21825. "additionalProperties": false
  21826. }
  21827. },
  21828. "required": ["input", "output", "reasoning", "cache"],
  21829. "additionalProperties": false
  21830. },
  21831. "snapshot": {
  21832. "type": "string"
  21833. }
  21834. },
  21835. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  21836. "additionalProperties": false
  21837. }
  21838. },
  21839. "required": ["id", "type", "properties"],
  21840. "additionalProperties": false
  21841. },
  21842. "EventSessionNextStepFailed": {
  21843. "type": "object",
  21844. "properties": {
  21845. "id": {
  21846. "type": "string"
  21847. },
  21848. "type": {
  21849. "type": "string",
  21850. "enum": ["session.next.step.failed"]
  21851. },
  21852. "properties": {
  21853. "type": "object",
  21854. "properties": {
  21855. "timestamp": {
  21856. "type": "number"
  21857. },
  21858. "sessionID": {
  21859. "type": "string",
  21860. "pattern": "^ses"
  21861. },
  21862. "error": {
  21863. "$ref": "#/components/schemas/SessionErrorUnknown"
  21864. }
  21865. },
  21866. "required": ["timestamp", "sessionID", "error"],
  21867. "additionalProperties": false
  21868. }
  21869. },
  21870. "required": ["id", "type", "properties"],
  21871. "additionalProperties": false
  21872. },
  21873. "EventSessionNextTextStarted": {
  21874. "type": "object",
  21875. "properties": {
  21876. "id": {
  21877. "type": "string"
  21878. },
  21879. "type": {
  21880. "type": "string",
  21881. "enum": ["session.next.text.started"]
  21882. },
  21883. "properties": {
  21884. "type": "object",
  21885. "properties": {
  21886. "timestamp": {
  21887. "type": "number"
  21888. },
  21889. "sessionID": {
  21890. "type": "string",
  21891. "pattern": "^ses"
  21892. }
  21893. },
  21894. "required": ["timestamp", "sessionID"],
  21895. "additionalProperties": false
  21896. }
  21897. },
  21898. "required": ["id", "type", "properties"],
  21899. "additionalProperties": false
  21900. },
  21901. "EventSessionNextTextDelta": {
  21902. "type": "object",
  21903. "properties": {
  21904. "id": {
  21905. "type": "string"
  21906. },
  21907. "type": {
  21908. "type": "string",
  21909. "enum": ["session.next.text.delta"]
  21910. },
  21911. "properties": {
  21912. "type": "object",
  21913. "properties": {
  21914. "timestamp": {
  21915. "type": "number"
  21916. },
  21917. "sessionID": {
  21918. "type": "string",
  21919. "pattern": "^ses"
  21920. },
  21921. "delta": {
  21922. "type": "string"
  21923. }
  21924. },
  21925. "required": ["timestamp", "sessionID", "delta"],
  21926. "additionalProperties": false
  21927. }
  21928. },
  21929. "required": ["id", "type", "properties"],
  21930. "additionalProperties": false
  21931. },
  21932. "EventSessionNextTextEnded": {
  21933. "type": "object",
  21934. "properties": {
  21935. "id": {
  21936. "type": "string"
  21937. },
  21938. "type": {
  21939. "type": "string",
  21940. "enum": ["session.next.text.ended"]
  21941. },
  21942. "properties": {
  21943. "type": "object",
  21944. "properties": {
  21945. "timestamp": {
  21946. "type": "number"
  21947. },
  21948. "sessionID": {
  21949. "type": "string",
  21950. "pattern": "^ses"
  21951. },
  21952. "text": {
  21953. "type": "string"
  21954. }
  21955. },
  21956. "required": ["timestamp", "sessionID", "text"],
  21957. "additionalProperties": false
  21958. }
  21959. },
  21960. "required": ["id", "type", "properties"],
  21961. "additionalProperties": false
  21962. },
  21963. "EventSessionNextReasoningStarted": {
  21964. "type": "object",
  21965. "properties": {
  21966. "id": {
  21967. "type": "string"
  21968. },
  21969. "type": {
  21970. "type": "string",
  21971. "enum": ["session.next.reasoning.started"]
  21972. },
  21973. "properties": {
  21974. "type": "object",
  21975. "properties": {
  21976. "timestamp": {
  21977. "type": "number"
  21978. },
  21979. "sessionID": {
  21980. "type": "string",
  21981. "pattern": "^ses"
  21982. },
  21983. "reasoningID": {
  21984. "type": "string"
  21985. }
  21986. },
  21987. "required": ["timestamp", "sessionID", "reasoningID"],
  21988. "additionalProperties": false
  21989. }
  21990. },
  21991. "required": ["id", "type", "properties"],
  21992. "additionalProperties": false
  21993. },
  21994. "EventSessionNextReasoningDelta": {
  21995. "type": "object",
  21996. "properties": {
  21997. "id": {
  21998. "type": "string"
  21999. },
  22000. "type": {
  22001. "type": "string",
  22002. "enum": ["session.next.reasoning.delta"]
  22003. },
  22004. "properties": {
  22005. "type": "object",
  22006. "properties": {
  22007. "timestamp": {
  22008. "type": "number"
  22009. },
  22010. "sessionID": {
  22011. "type": "string",
  22012. "pattern": "^ses"
  22013. },
  22014. "reasoningID": {
  22015. "type": "string"
  22016. },
  22017. "delta": {
  22018. "type": "string"
  22019. }
  22020. },
  22021. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  22022. "additionalProperties": false
  22023. }
  22024. },
  22025. "required": ["id", "type", "properties"],
  22026. "additionalProperties": false
  22027. },
  22028. "EventSessionNextReasoningEnded": {
  22029. "type": "object",
  22030. "properties": {
  22031. "id": {
  22032. "type": "string"
  22033. },
  22034. "type": {
  22035. "type": "string",
  22036. "enum": ["session.next.reasoning.ended"]
  22037. },
  22038. "properties": {
  22039. "type": "object",
  22040. "properties": {
  22041. "timestamp": {
  22042. "type": "number"
  22043. },
  22044. "sessionID": {
  22045. "type": "string",
  22046. "pattern": "^ses"
  22047. },
  22048. "reasoningID": {
  22049. "type": "string"
  22050. },
  22051. "text": {
  22052. "type": "string"
  22053. }
  22054. },
  22055. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  22056. "additionalProperties": false
  22057. }
  22058. },
  22059. "required": ["id", "type", "properties"],
  22060. "additionalProperties": false
  22061. },
  22062. "EventSessionNextToolInputStarted": {
  22063. "type": "object",
  22064. "properties": {
  22065. "id": {
  22066. "type": "string"
  22067. },
  22068. "type": {
  22069. "type": "string",
  22070. "enum": ["session.next.tool.input.started"]
  22071. },
  22072. "properties": {
  22073. "type": "object",
  22074. "properties": {
  22075. "timestamp": {
  22076. "type": "number"
  22077. },
  22078. "sessionID": {
  22079. "type": "string",
  22080. "pattern": "^ses"
  22081. },
  22082. "callID": {
  22083. "type": "string"
  22084. },
  22085. "name": {
  22086. "type": "string"
  22087. }
  22088. },
  22089. "required": ["timestamp", "sessionID", "callID", "name"],
  22090. "additionalProperties": false
  22091. }
  22092. },
  22093. "required": ["id", "type", "properties"],
  22094. "additionalProperties": false
  22095. },
  22096. "EventSessionNextToolInputDelta": {
  22097. "type": "object",
  22098. "properties": {
  22099. "id": {
  22100. "type": "string"
  22101. },
  22102. "type": {
  22103. "type": "string",
  22104. "enum": ["session.next.tool.input.delta"]
  22105. },
  22106. "properties": {
  22107. "type": "object",
  22108. "properties": {
  22109. "timestamp": {
  22110. "type": "number"
  22111. },
  22112. "sessionID": {
  22113. "type": "string",
  22114. "pattern": "^ses"
  22115. },
  22116. "callID": {
  22117. "type": "string"
  22118. },
  22119. "delta": {
  22120. "type": "string"
  22121. }
  22122. },
  22123. "required": ["timestamp", "sessionID", "callID", "delta"],
  22124. "additionalProperties": false
  22125. }
  22126. },
  22127. "required": ["id", "type", "properties"],
  22128. "additionalProperties": false
  22129. },
  22130. "EventSessionNextToolInputEnded": {
  22131. "type": "object",
  22132. "properties": {
  22133. "id": {
  22134. "type": "string"
  22135. },
  22136. "type": {
  22137. "type": "string",
  22138. "enum": ["session.next.tool.input.ended"]
  22139. },
  22140. "properties": {
  22141. "type": "object",
  22142. "properties": {
  22143. "timestamp": {
  22144. "type": "number"
  22145. },
  22146. "sessionID": {
  22147. "type": "string",
  22148. "pattern": "^ses"
  22149. },
  22150. "callID": {
  22151. "type": "string"
  22152. },
  22153. "text": {
  22154. "type": "string"
  22155. }
  22156. },
  22157. "required": ["timestamp", "sessionID", "callID", "text"],
  22158. "additionalProperties": false
  22159. }
  22160. },
  22161. "required": ["id", "type", "properties"],
  22162. "additionalProperties": false
  22163. },
  22164. "EventSessionNextToolCalled": {
  22165. "type": "object",
  22166. "properties": {
  22167. "id": {
  22168. "type": "string"
  22169. },
  22170. "type": {
  22171. "type": "string",
  22172. "enum": ["session.next.tool.called"]
  22173. },
  22174. "properties": {
  22175. "type": "object",
  22176. "properties": {
  22177. "timestamp": {
  22178. "type": "number"
  22179. },
  22180. "sessionID": {
  22181. "type": "string",
  22182. "pattern": "^ses"
  22183. },
  22184. "callID": {
  22185. "type": "string"
  22186. },
  22187. "tool": {
  22188. "type": "string"
  22189. },
  22190. "input": {
  22191. "type": "object"
  22192. },
  22193. "provider": {
  22194. "type": "object",
  22195. "properties": {
  22196. "executed": {
  22197. "type": "boolean"
  22198. },
  22199. "metadata": {
  22200. "type": "object"
  22201. }
  22202. },
  22203. "required": ["executed"],
  22204. "additionalProperties": false
  22205. }
  22206. },
  22207. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  22208. "additionalProperties": false
  22209. }
  22210. },
  22211. "required": ["id", "type", "properties"],
  22212. "additionalProperties": false
  22213. },
  22214. "EventSessionNextToolProgress": {
  22215. "type": "object",
  22216. "properties": {
  22217. "id": {
  22218. "type": "string"
  22219. },
  22220. "type": {
  22221. "type": "string",
  22222. "enum": ["session.next.tool.progress"]
  22223. },
  22224. "properties": {
  22225. "type": "object",
  22226. "properties": {
  22227. "timestamp": {
  22228. "type": "number"
  22229. },
  22230. "sessionID": {
  22231. "type": "string",
  22232. "pattern": "^ses"
  22233. },
  22234. "callID": {
  22235. "type": "string"
  22236. },
  22237. "structured": {
  22238. "type": "object"
  22239. },
  22240. "content": {
  22241. "type": "array",
  22242. "items": {
  22243. "anyOf": [
  22244. {
  22245. "$ref": "#/components/schemas/ToolTextContent"
  22246. },
  22247. {
  22248. "$ref": "#/components/schemas/ToolFileContent"
  22249. }
  22250. ]
  22251. }
  22252. }
  22253. },
  22254. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  22255. "additionalProperties": false
  22256. }
  22257. },
  22258. "required": ["id", "type", "properties"],
  22259. "additionalProperties": false
  22260. },
  22261. "EventSessionNextToolSuccess": {
  22262. "type": "object",
  22263. "properties": {
  22264. "id": {
  22265. "type": "string"
  22266. },
  22267. "type": {
  22268. "type": "string",
  22269. "enum": ["session.next.tool.success"]
  22270. },
  22271. "properties": {
  22272. "type": "object",
  22273. "properties": {
  22274. "timestamp": {
  22275. "type": "number"
  22276. },
  22277. "sessionID": {
  22278. "type": "string",
  22279. "pattern": "^ses"
  22280. },
  22281. "callID": {
  22282. "type": "string"
  22283. },
  22284. "structured": {
  22285. "type": "object"
  22286. },
  22287. "content": {
  22288. "type": "array",
  22289. "items": {
  22290. "anyOf": [
  22291. {
  22292. "$ref": "#/components/schemas/ToolTextContent"
  22293. },
  22294. {
  22295. "$ref": "#/components/schemas/ToolFileContent"
  22296. }
  22297. ]
  22298. }
  22299. },
  22300. "provider": {
  22301. "type": "object",
  22302. "properties": {
  22303. "executed": {
  22304. "type": "boolean"
  22305. },
  22306. "metadata": {
  22307. "type": "object"
  22308. }
  22309. },
  22310. "required": ["executed"],
  22311. "additionalProperties": false
  22312. }
  22313. },
  22314. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  22315. "additionalProperties": false
  22316. }
  22317. },
  22318. "required": ["id", "type", "properties"],
  22319. "additionalProperties": false
  22320. },
  22321. "EventSessionNextToolFailed": {
  22322. "type": "object",
  22323. "properties": {
  22324. "id": {
  22325. "type": "string"
  22326. },
  22327. "type": {
  22328. "type": "string",
  22329. "enum": ["session.next.tool.failed"]
  22330. },
  22331. "properties": {
  22332. "type": "object",
  22333. "properties": {
  22334. "timestamp": {
  22335. "type": "number"
  22336. },
  22337. "sessionID": {
  22338. "type": "string",
  22339. "pattern": "^ses"
  22340. },
  22341. "callID": {
  22342. "type": "string"
  22343. },
  22344. "error": {
  22345. "$ref": "#/components/schemas/SessionErrorUnknown"
  22346. },
  22347. "provider": {
  22348. "type": "object",
  22349. "properties": {
  22350. "executed": {
  22351. "type": "boolean"
  22352. },
  22353. "metadata": {
  22354. "type": "object"
  22355. }
  22356. },
  22357. "required": ["executed"],
  22358. "additionalProperties": false
  22359. }
  22360. },
  22361. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  22362. "additionalProperties": false
  22363. }
  22364. },
  22365. "required": ["id", "type", "properties"],
  22366. "additionalProperties": false
  22367. },
  22368. "EventSessionNextRetried": {
  22369. "type": "object",
  22370. "properties": {
  22371. "id": {
  22372. "type": "string"
  22373. },
  22374. "type": {
  22375. "type": "string",
  22376. "enum": ["session.next.retried"]
  22377. },
  22378. "properties": {
  22379. "type": "object",
  22380. "properties": {
  22381. "timestamp": {
  22382. "type": "number"
  22383. },
  22384. "sessionID": {
  22385. "type": "string",
  22386. "pattern": "^ses"
  22387. },
  22388. "attempt": {
  22389. "type": "number"
  22390. },
  22391. "error": {
  22392. "$ref": "#/components/schemas/SessionNextRetry_error"
  22393. }
  22394. },
  22395. "required": ["timestamp", "sessionID", "attempt", "error"],
  22396. "additionalProperties": false
  22397. }
  22398. },
  22399. "required": ["id", "type", "properties"],
  22400. "additionalProperties": false
  22401. },
  22402. "EventSessionNextCompactionStarted": {
  22403. "type": "object",
  22404. "properties": {
  22405. "id": {
  22406. "type": "string"
  22407. },
  22408. "type": {
  22409. "type": "string",
  22410. "enum": ["session.next.compaction.started"]
  22411. },
  22412. "properties": {
  22413. "type": "object",
  22414. "properties": {
  22415. "timestamp": {
  22416. "type": "number"
  22417. },
  22418. "sessionID": {
  22419. "type": "string",
  22420. "pattern": "^ses"
  22421. },
  22422. "reason": {
  22423. "type": "string",
  22424. "enum": ["auto", "manual"]
  22425. }
  22426. },
  22427. "required": ["timestamp", "sessionID", "reason"],
  22428. "additionalProperties": false
  22429. }
  22430. },
  22431. "required": ["id", "type", "properties"],
  22432. "additionalProperties": false
  22433. },
  22434. "EventSessionNextCompactionDelta": {
  22435. "type": "object",
  22436. "properties": {
  22437. "id": {
  22438. "type": "string"
  22439. },
  22440. "type": {
  22441. "type": "string",
  22442. "enum": ["session.next.compaction.delta"]
  22443. },
  22444. "properties": {
  22445. "type": "object",
  22446. "properties": {
  22447. "timestamp": {
  22448. "type": "number"
  22449. },
  22450. "sessionID": {
  22451. "type": "string",
  22452. "pattern": "^ses"
  22453. },
  22454. "text": {
  22455. "type": "string"
  22456. }
  22457. },
  22458. "required": ["timestamp", "sessionID", "text"],
  22459. "additionalProperties": false
  22460. }
  22461. },
  22462. "required": ["id", "type", "properties"],
  22463. "additionalProperties": false
  22464. },
  22465. "EventSessionNextCompactionEnded": {
  22466. "type": "object",
  22467. "properties": {
  22468. "id": {
  22469. "type": "string"
  22470. },
  22471. "type": {
  22472. "type": "string",
  22473. "enum": ["session.next.compaction.ended"]
  22474. },
  22475. "properties": {
  22476. "type": "object",
  22477. "properties": {
  22478. "timestamp": {
  22479. "type": "number"
  22480. },
  22481. "sessionID": {
  22482. "type": "string",
  22483. "pattern": "^ses"
  22484. },
  22485. "text": {
  22486. "type": "string"
  22487. },
  22488. "include": {
  22489. "type": "string"
  22490. }
  22491. },
  22492. "required": ["timestamp", "sessionID", "text"],
  22493. "additionalProperties": false
  22494. }
  22495. },
  22496. "required": ["id", "type", "properties"],
  22497. "additionalProperties": false
  22498. },
  22499. "EventFileWatcherUpdated": {
  22500. "type": "object",
  22501. "properties": {
  22502. "id": {
  22503. "type": "string"
  22504. },
  22505. "type": {
  22506. "type": "string",
  22507. "enum": ["file.watcher.updated"]
  22508. },
  22509. "properties": {
  22510. "type": "object",
  22511. "properties": {
  22512. "file": {
  22513. "type": "string"
  22514. },
  22515. "event": {
  22516. "type": "string",
  22517. "enum": ["add", "change", "unlink"]
  22518. }
  22519. },
  22520. "required": ["file", "event"],
  22521. "additionalProperties": false
  22522. }
  22523. },
  22524. "required": ["id", "type", "properties"],
  22525. "additionalProperties": false
  22526. },
  22527. "EventSessionCreated": {
  22528. "type": "object",
  22529. "properties": {
  22530. "id": {
  22531. "type": "string"
  22532. },
  22533. "type": {
  22534. "type": "string",
  22535. "enum": ["session.created"]
  22536. },
  22537. "properties": {
  22538. "type": "object",
  22539. "properties": {
  22540. "sessionID": {
  22541. "type": "string",
  22542. "pattern": "^ses"
  22543. },
  22544. "info": {
  22545. "$ref": "#/components/schemas/Session"
  22546. }
  22547. },
  22548. "required": ["sessionID", "info"],
  22549. "additionalProperties": false
  22550. }
  22551. },
  22552. "required": ["id", "type", "properties"],
  22553. "additionalProperties": false
  22554. },
  22555. "EventSessionUpdated": {
  22556. "type": "object",
  22557. "properties": {
  22558. "id": {
  22559. "type": "string"
  22560. },
  22561. "type": {
  22562. "type": "string",
  22563. "enum": ["session.updated"]
  22564. },
  22565. "properties": {
  22566. "type": "object",
  22567. "properties": {
  22568. "sessionID": {
  22569. "type": "string",
  22570. "pattern": "^ses"
  22571. },
  22572. "info": {
  22573. "$ref": "#/components/schemas/Session"
  22574. }
  22575. },
  22576. "required": ["sessionID", "info"],
  22577. "additionalProperties": false
  22578. }
  22579. },
  22580. "required": ["id", "type", "properties"],
  22581. "additionalProperties": false
  22582. },
  22583. "EventSessionDeleted": {
  22584. "type": "object",
  22585. "properties": {
  22586. "id": {
  22587. "type": "string"
  22588. },
  22589. "type": {
  22590. "type": "string",
  22591. "enum": ["session.deleted"]
  22592. },
  22593. "properties": {
  22594. "type": "object",
  22595. "properties": {
  22596. "sessionID": {
  22597. "type": "string",
  22598. "pattern": "^ses"
  22599. },
  22600. "info": {
  22601. "$ref": "#/components/schemas/Session"
  22602. }
  22603. },
  22604. "required": ["sessionID", "info"],
  22605. "additionalProperties": false
  22606. }
  22607. },
  22608. "required": ["id", "type", "properties"],
  22609. "additionalProperties": false
  22610. },
  22611. "EventMessageUpdated": {
  22612. "type": "object",
  22613. "properties": {
  22614. "id": {
  22615. "type": "string"
  22616. },
  22617. "type": {
  22618. "type": "string",
  22619. "enum": ["message.updated"]
  22620. },
  22621. "properties": {
  22622. "type": "object",
  22623. "properties": {
  22624. "sessionID": {
  22625. "type": "string",
  22626. "pattern": "^ses"
  22627. },
  22628. "info": {
  22629. "$ref": "#/components/schemas/Message"
  22630. }
  22631. },
  22632. "required": ["sessionID", "info"],
  22633. "additionalProperties": false
  22634. }
  22635. },
  22636. "required": ["id", "type", "properties"],
  22637. "additionalProperties": false
  22638. },
  22639. "EventMessageRemoved": {
  22640. "type": "object",
  22641. "properties": {
  22642. "id": {
  22643. "type": "string"
  22644. },
  22645. "type": {
  22646. "type": "string",
  22647. "enum": ["message.removed"]
  22648. },
  22649. "properties": {
  22650. "type": "object",
  22651. "properties": {
  22652. "sessionID": {
  22653. "type": "string",
  22654. "pattern": "^ses"
  22655. },
  22656. "messageID": {
  22657. "type": "string",
  22658. "pattern": "^msg"
  22659. }
  22660. },
  22661. "required": ["sessionID", "messageID"],
  22662. "additionalProperties": false
  22663. }
  22664. },
  22665. "required": ["id", "type", "properties"],
  22666. "additionalProperties": false
  22667. },
  22668. "EventMessagePartUpdated": {
  22669. "type": "object",
  22670. "properties": {
  22671. "id": {
  22672. "type": "string"
  22673. },
  22674. "type": {
  22675. "type": "string",
  22676. "enum": ["message.part.updated"]
  22677. },
  22678. "properties": {
  22679. "type": "object",
  22680. "properties": {
  22681. "sessionID": {
  22682. "type": "string",
  22683. "pattern": "^ses"
  22684. },
  22685. "part": {
  22686. "$ref": "#/components/schemas/Part"
  22687. },
  22688. "time": {
  22689. "type": "number"
  22690. }
  22691. },
  22692. "required": ["sessionID", "part", "time"],
  22693. "additionalProperties": false
  22694. }
  22695. },
  22696. "required": ["id", "type", "properties"],
  22697. "additionalProperties": false
  22698. },
  22699. "EventMessagePartRemoved": {
  22700. "type": "object",
  22701. "properties": {
  22702. "id": {
  22703. "type": "string"
  22704. },
  22705. "type": {
  22706. "type": "string",
  22707. "enum": ["message.part.removed"]
  22708. },
  22709. "properties": {
  22710. "type": "object",
  22711. "properties": {
  22712. "sessionID": {
  22713. "type": "string",
  22714. "pattern": "^ses"
  22715. },
  22716. "messageID": {
  22717. "type": "string",
  22718. "pattern": "^msg"
  22719. },
  22720. "partID": {
  22721. "type": "string",
  22722. "pattern": "^prt"
  22723. }
  22724. },
  22725. "required": ["sessionID", "messageID", "partID"],
  22726. "additionalProperties": false
  22727. }
  22728. },
  22729. "required": ["id", "type", "properties"],
  22730. "additionalProperties": false
  22731. },
  22732. "EventMessagePartDelta": {
  22733. "type": "object",
  22734. "properties": {
  22735. "id": {
  22736. "type": "string"
  22737. },
  22738. "type": {
  22739. "type": "string",
  22740. "enum": ["message.part.delta"]
  22741. },
  22742. "properties": {
  22743. "type": "object",
  22744. "properties": {
  22745. "sessionID": {
  22746. "type": "string",
  22747. "pattern": "^ses"
  22748. },
  22749. "messageID": {
  22750. "type": "string",
  22751. "pattern": "^msg"
  22752. },
  22753. "partID": {
  22754. "type": "string",
  22755. "pattern": "^prt"
  22756. },
  22757. "field": {
  22758. "type": "string"
  22759. },
  22760. "delta": {
  22761. "type": "string"
  22762. }
  22763. },
  22764. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  22765. "additionalProperties": false
  22766. }
  22767. },
  22768. "required": ["id", "type", "properties"],
  22769. "additionalProperties": false
  22770. },
  22771. "EventPermissionAsked": {
  22772. "type": "object",
  22773. "properties": {
  22774. "id": {
  22775. "type": "string"
  22776. },
  22777. "type": {
  22778. "type": "string",
  22779. "enum": ["permission.asked"]
  22780. },
  22781. "properties": {
  22782. "type": "object",
  22783. "properties": {
  22784. "id": {
  22785. "type": "string",
  22786. "pattern": "^per"
  22787. },
  22788. "sessionID": {
  22789. "type": "string",
  22790. "pattern": "^ses"
  22791. },
  22792. "permission": {
  22793. "type": "string"
  22794. },
  22795. "patterns": {
  22796. "type": "array",
  22797. "items": {
  22798. "type": "string"
  22799. }
  22800. },
  22801. "metadata": {
  22802. "type": "object"
  22803. },
  22804. "always": {
  22805. "type": "array",
  22806. "items": {
  22807. "type": "string"
  22808. }
  22809. },
  22810. "tool": {
  22811. "type": "object",
  22812. "properties": {
  22813. "messageID": {
  22814. "type": "string",
  22815. "pattern": "^msg"
  22816. },
  22817. "callID": {
  22818. "type": "string"
  22819. }
  22820. },
  22821. "required": ["messageID", "callID"],
  22822. "additionalProperties": false
  22823. }
  22824. },
  22825. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22826. "additionalProperties": false
  22827. }
  22828. },
  22829. "required": ["id", "type", "properties"],
  22830. "additionalProperties": false
  22831. },
  22832. "EventPermissionReplied": {
  22833. "type": "object",
  22834. "properties": {
  22835. "id": {
  22836. "type": "string"
  22837. },
  22838. "type": {
  22839. "type": "string",
  22840. "enum": ["permission.replied"]
  22841. },
  22842. "properties": {
  22843. "type": "object",
  22844. "properties": {
  22845. "sessionID": {
  22846. "type": "string",
  22847. "pattern": "^ses"
  22848. },
  22849. "requestID": {
  22850. "type": "string",
  22851. "pattern": "^per"
  22852. },
  22853. "reply": {
  22854. "type": "string",
  22855. "enum": ["once", "always", "reject"]
  22856. }
  22857. },
  22858. "required": ["sessionID", "requestID", "reply"],
  22859. "additionalProperties": false
  22860. }
  22861. },
  22862. "required": ["id", "type", "properties"],
  22863. "additionalProperties": false
  22864. },
  22865. "EventSessionDiff": {
  22866. "type": "object",
  22867. "properties": {
  22868. "id": {
  22869. "type": "string"
  22870. },
  22871. "type": {
  22872. "type": "string",
  22873. "enum": ["session.diff"]
  22874. },
  22875. "properties": {
  22876. "type": "object",
  22877. "properties": {
  22878. "sessionID": {
  22879. "type": "string",
  22880. "pattern": "^ses"
  22881. },
  22882. "diff": {
  22883. "type": "array",
  22884. "items": {
  22885. "$ref": "#/components/schemas/SnapshotFileDiff"
  22886. }
  22887. }
  22888. },
  22889. "required": ["sessionID", "diff"],
  22890. "additionalProperties": false
  22891. }
  22892. },
  22893. "required": ["id", "type", "properties"],
  22894. "additionalProperties": false
  22895. },
  22896. "EventSessionError": {
  22897. "type": "object",
  22898. "properties": {
  22899. "id": {
  22900. "type": "string"
  22901. },
  22902. "type": {
  22903. "type": "string",
  22904. "enum": ["session.error"]
  22905. },
  22906. "properties": {
  22907. "type": "object",
  22908. "properties": {
  22909. "sessionID": {
  22910. "type": "string",
  22911. "pattern": "^ses"
  22912. },
  22913. "error": {
  22914. "anyOf": [
  22915. {
  22916. "$ref": "#/components/schemas/ProviderAuthError"
  22917. },
  22918. {
  22919. "$ref": "#/components/schemas/UnknownError"
  22920. },
  22921. {
  22922. "$ref": "#/components/schemas/MessageOutputLengthError"
  22923. },
  22924. {
  22925. "$ref": "#/components/schemas/MessageAbortedError"
  22926. },
  22927. {
  22928. "$ref": "#/components/schemas/StructuredOutputError"
  22929. },
  22930. {
  22931. "$ref": "#/components/schemas/ContextOverflowError"
  22932. },
  22933. {
  22934. "$ref": "#/components/schemas/APIError"
  22935. }
  22936. ]
  22937. }
  22938. },
  22939. "additionalProperties": false
  22940. }
  22941. },
  22942. "required": ["id", "type", "properties"],
  22943. "additionalProperties": false
  22944. },
  22945. "EventQuestionAsked": {
  22946. "type": "object",
  22947. "properties": {
  22948. "id": {
  22949. "type": "string"
  22950. },
  22951. "type": {
  22952. "type": "string",
  22953. "enum": ["question.asked"]
  22954. },
  22955. "properties": {
  22956. "type": "object",
  22957. "properties": {
  22958. "id": {
  22959. "type": "string",
  22960. "pattern": "^que"
  22961. },
  22962. "sessionID": {
  22963. "type": "string",
  22964. "pattern": "^ses"
  22965. },
  22966. "questions": {
  22967. "type": "array",
  22968. "items": {
  22969. "$ref": "#/components/schemas/QuestionInfo"
  22970. },
  22971. "description": "Questions to ask"
  22972. },
  22973. "tool": {
  22974. "$ref": "#/components/schemas/QuestionTool"
  22975. }
  22976. },
  22977. "required": ["id", "sessionID", "questions"],
  22978. "additionalProperties": false
  22979. }
  22980. },
  22981. "required": ["id", "type", "properties"],
  22982. "additionalProperties": false
  22983. },
  22984. "EventQuestionReplied": {
  22985. "type": "object",
  22986. "properties": {
  22987. "id": {
  22988. "type": "string"
  22989. },
  22990. "type": {
  22991. "type": "string",
  22992. "enum": ["question.replied"]
  22993. },
  22994. "properties": {
  22995. "type": "object",
  22996. "properties": {
  22997. "sessionID": {
  22998. "type": "string",
  22999. "pattern": "^ses"
  23000. },
  23001. "requestID": {
  23002. "type": "string",
  23003. "pattern": "^que"
  23004. },
  23005. "answers": {
  23006. "type": "array",
  23007. "items": {
  23008. "$ref": "#/components/schemas/QuestionAnswer"
  23009. }
  23010. }
  23011. },
  23012. "required": ["sessionID", "requestID", "answers"],
  23013. "additionalProperties": false
  23014. }
  23015. },
  23016. "required": ["id", "type", "properties"],
  23017. "additionalProperties": false
  23018. },
  23019. "EventQuestionRejected": {
  23020. "type": "object",
  23021. "properties": {
  23022. "id": {
  23023. "type": "string"
  23024. },
  23025. "type": {
  23026. "type": "string",
  23027. "enum": ["question.rejected"]
  23028. },
  23029. "properties": {
  23030. "type": "object",
  23031. "properties": {
  23032. "sessionID": {
  23033. "type": "string",
  23034. "pattern": "^ses"
  23035. },
  23036. "requestID": {
  23037. "type": "string",
  23038. "pattern": "^que"
  23039. }
  23040. },
  23041. "required": ["sessionID", "requestID"],
  23042. "additionalProperties": false
  23043. }
  23044. },
  23045. "required": ["id", "type", "properties"],
  23046. "additionalProperties": false
  23047. },
  23048. "EventTodoUpdated": {
  23049. "type": "object",
  23050. "properties": {
  23051. "id": {
  23052. "type": "string"
  23053. },
  23054. "type": {
  23055. "type": "string",
  23056. "enum": ["todo.updated"]
  23057. },
  23058. "properties": {
  23059. "type": "object",
  23060. "properties": {
  23061. "sessionID": {
  23062. "type": "string",
  23063. "pattern": "^ses"
  23064. },
  23065. "todos": {
  23066. "type": "array",
  23067. "items": {
  23068. "$ref": "#/components/schemas/Todo"
  23069. }
  23070. }
  23071. },
  23072. "required": ["sessionID", "todos"],
  23073. "additionalProperties": false
  23074. }
  23075. },
  23076. "required": ["id", "type", "properties"],
  23077. "additionalProperties": false
  23078. },
  23079. "EventSessionStatus": {
  23080. "type": "object",
  23081. "properties": {
  23082. "id": {
  23083. "type": "string"
  23084. },
  23085. "type": {
  23086. "type": "string",
  23087. "enum": ["session.status"]
  23088. },
  23089. "properties": {
  23090. "type": "object",
  23091. "properties": {
  23092. "sessionID": {
  23093. "type": "string",
  23094. "pattern": "^ses"
  23095. },
  23096. "status": {
  23097. "$ref": "#/components/schemas/SessionStatus"
  23098. }
  23099. },
  23100. "required": ["sessionID", "status"],
  23101. "additionalProperties": false
  23102. }
  23103. },
  23104. "required": ["id", "type", "properties"],
  23105. "additionalProperties": false
  23106. },
  23107. "EventSessionIdle": {
  23108. "type": "object",
  23109. "properties": {
  23110. "id": {
  23111. "type": "string"
  23112. },
  23113. "type": {
  23114. "type": "string",
  23115. "enum": ["session.idle"]
  23116. },
  23117. "properties": {
  23118. "type": "object",
  23119. "properties": {
  23120. "sessionID": {
  23121. "type": "string",
  23122. "pattern": "^ses"
  23123. }
  23124. },
  23125. "required": ["sessionID"],
  23126. "additionalProperties": false
  23127. }
  23128. },
  23129. "required": ["id", "type", "properties"],
  23130. "additionalProperties": false
  23131. },
  23132. "EventSessionCompacted": {
  23133. "type": "object",
  23134. "properties": {
  23135. "id": {
  23136. "type": "string"
  23137. },
  23138. "type": {
  23139. "type": "string",
  23140. "enum": ["session.compacted"]
  23141. },
  23142. "properties": {
  23143. "type": "object",
  23144. "properties": {
  23145. "sessionID": {
  23146. "type": "string",
  23147. "pattern": "^ses"
  23148. }
  23149. },
  23150. "required": ["sessionID"],
  23151. "additionalProperties": false
  23152. }
  23153. },
  23154. "required": ["id", "type", "properties"],
  23155. "additionalProperties": false
  23156. },
  23157. "EventLspUpdated": {
  23158. "type": "object",
  23159. "properties": {
  23160. "id": {
  23161. "type": "string"
  23162. },
  23163. "type": {
  23164. "type": "string",
  23165. "enum": ["lsp.updated"]
  23166. },
  23167. "properties": {
  23168. "type": "object",
  23169. "properties": {}
  23170. }
  23171. },
  23172. "required": ["id", "type", "properties"],
  23173. "additionalProperties": false
  23174. },
  23175. "EventMcpToolsChanged": {
  23176. "type": "object",
  23177. "properties": {
  23178. "id": {
  23179. "type": "string"
  23180. },
  23181. "type": {
  23182. "type": "string",
  23183. "enum": ["mcp.tools.changed"]
  23184. },
  23185. "properties": {
  23186. "type": "object",
  23187. "properties": {
  23188. "server": {
  23189. "type": "string"
  23190. }
  23191. },
  23192. "required": ["server"],
  23193. "additionalProperties": false
  23194. }
  23195. },
  23196. "required": ["id", "type", "properties"],
  23197. "additionalProperties": false
  23198. },
  23199. "EventMcpBrowserOpenFailed": {
  23200. "type": "object",
  23201. "properties": {
  23202. "id": {
  23203. "type": "string"
  23204. },
  23205. "type": {
  23206. "type": "string",
  23207. "enum": ["mcp.browser.open.failed"]
  23208. },
  23209. "properties": {
  23210. "type": "object",
  23211. "properties": {
  23212. "mcpName": {
  23213. "type": "string"
  23214. },
  23215. "url": {
  23216. "type": "string"
  23217. }
  23218. },
  23219. "required": ["mcpName", "url"],
  23220. "additionalProperties": false
  23221. }
  23222. },
  23223. "required": ["id", "type", "properties"],
  23224. "additionalProperties": false
  23225. },
  23226. "EventCommandExecuted": {
  23227. "type": "object",
  23228. "properties": {
  23229. "id": {
  23230. "type": "string"
  23231. },
  23232. "type": {
  23233. "type": "string",
  23234. "enum": ["command.executed"]
  23235. },
  23236. "properties": {
  23237. "type": "object",
  23238. "properties": {
  23239. "name": {
  23240. "type": "string"
  23241. },
  23242. "sessionID": {
  23243. "type": "string",
  23244. "pattern": "^ses"
  23245. },
  23246. "arguments": {
  23247. "type": "string"
  23248. },
  23249. "messageID": {
  23250. "type": "string",
  23251. "pattern": "^msg"
  23252. }
  23253. },
  23254. "required": ["name", "sessionID", "arguments", "messageID"],
  23255. "additionalProperties": false
  23256. }
  23257. },
  23258. "required": ["id", "type", "properties"],
  23259. "additionalProperties": false
  23260. },
  23261. "EventProjectUpdated": {
  23262. "type": "object",
  23263. "properties": {
  23264. "id": {
  23265. "type": "string"
  23266. },
  23267. "type": {
  23268. "type": "string",
  23269. "enum": ["project.updated"]
  23270. },
  23271. "properties": {
  23272. "type": "object",
  23273. "properties": {
  23274. "id": {
  23275. "type": "string"
  23276. },
  23277. "worktree": {
  23278. "type": "string"
  23279. },
  23280. "vcs": {
  23281. "type": "string",
  23282. "enum": ["git"]
  23283. },
  23284. "name": {
  23285. "type": "string"
  23286. },
  23287. "icon": {
  23288. "type": "object",
  23289. "properties": {
  23290. "url": {
  23291. "type": "string"
  23292. },
  23293. "override": {
  23294. "type": "string"
  23295. },
  23296. "color": {
  23297. "type": "string"
  23298. }
  23299. },
  23300. "additionalProperties": false
  23301. },
  23302. "commands": {
  23303. "type": "object",
  23304. "properties": {
  23305. "start": {
  23306. "type": "string",
  23307. "description": "Startup script to run when creating a new workspace (worktree)"
  23308. }
  23309. },
  23310. "additionalProperties": false
  23311. },
  23312. "time": {
  23313. "type": "object",
  23314. "properties": {
  23315. "created": {
  23316. "type": "integer",
  23317. "minimum": 0
  23318. },
  23319. "updated": {
  23320. "type": "integer",
  23321. "minimum": 0
  23322. },
  23323. "initialized": {
  23324. "type": "integer",
  23325. "minimum": 0
  23326. }
  23327. },
  23328. "required": ["created", "updated"],
  23329. "additionalProperties": false
  23330. },
  23331. "sandboxes": {
  23332. "type": "array",
  23333. "items": {
  23334. "type": "string"
  23335. }
  23336. }
  23337. },
  23338. "required": ["id", "worktree", "time", "sandboxes"],
  23339. "additionalProperties": false
  23340. }
  23341. },
  23342. "required": ["id", "type", "properties"],
  23343. "additionalProperties": false
  23344. },
  23345. "EventVcsBranchUpdated": {
  23346. "type": "object",
  23347. "properties": {
  23348. "id": {
  23349. "type": "string"
  23350. },
  23351. "type": {
  23352. "type": "string",
  23353. "enum": ["vcs.branch.updated"]
  23354. },
  23355. "properties": {
  23356. "type": "object",
  23357. "properties": {
  23358. "branch": {
  23359. "type": "string"
  23360. }
  23361. },
  23362. "additionalProperties": false
  23363. }
  23364. },
  23365. "required": ["id", "type", "properties"],
  23366. "additionalProperties": false
  23367. },
  23368. "EventWorkspaceReady": {
  23369. "type": "object",
  23370. "properties": {
  23371. "id": {
  23372. "type": "string"
  23373. },
  23374. "type": {
  23375. "type": "string",
  23376. "enum": ["workspace.ready"]
  23377. },
  23378. "properties": {
  23379. "type": "object",
  23380. "properties": {
  23381. "name": {
  23382. "type": "string"
  23383. }
  23384. },
  23385. "required": ["name"],
  23386. "additionalProperties": false
  23387. }
  23388. },
  23389. "required": ["id", "type", "properties"],
  23390. "additionalProperties": false
  23391. },
  23392. "EventWorkspaceFailed": {
  23393. "type": "object",
  23394. "properties": {
  23395. "id": {
  23396. "type": "string"
  23397. },
  23398. "type": {
  23399. "type": "string",
  23400. "enum": ["workspace.failed"]
  23401. },
  23402. "properties": {
  23403. "type": "object",
  23404. "properties": {
  23405. "message": {
  23406. "type": "string"
  23407. }
  23408. },
  23409. "required": ["message"],
  23410. "additionalProperties": false
  23411. }
  23412. },
  23413. "required": ["id", "type", "properties"],
  23414. "additionalProperties": false
  23415. },
  23416. "EventWorkspaceStatus": {
  23417. "type": "object",
  23418. "properties": {
  23419. "id": {
  23420. "type": "string"
  23421. },
  23422. "type": {
  23423. "type": "string",
  23424. "enum": ["workspace.status"]
  23425. },
  23426. "properties": {
  23427. "type": "object",
  23428. "properties": {
  23429. "workspaceID": {
  23430. "type": "string",
  23431. "pattern": "^wrk"
  23432. },
  23433. "status": {
  23434. "type": "string",
  23435. "enum": ["connected", "connecting", "disconnected", "error"]
  23436. }
  23437. },
  23438. "required": ["workspaceID", "status"],
  23439. "additionalProperties": false
  23440. }
  23441. },
  23442. "required": ["id", "type", "properties"],
  23443. "additionalProperties": false
  23444. },
  23445. "EventWorktreeReady": {
  23446. "type": "object",
  23447. "properties": {
  23448. "id": {
  23449. "type": "string"
  23450. },
  23451. "type": {
  23452. "type": "string",
  23453. "enum": ["worktree.ready"]
  23454. },
  23455. "properties": {
  23456. "type": "object",
  23457. "properties": {
  23458. "name": {
  23459. "type": "string"
  23460. },
  23461. "branch": {
  23462. "type": "string"
  23463. }
  23464. },
  23465. "required": ["name"],
  23466. "additionalProperties": false
  23467. }
  23468. },
  23469. "required": ["id", "type", "properties"],
  23470. "additionalProperties": false
  23471. },
  23472. "EventWorktreeFailed": {
  23473. "type": "object",
  23474. "properties": {
  23475. "id": {
  23476. "type": "string"
  23477. },
  23478. "type": {
  23479. "type": "string",
  23480. "enum": ["worktree.failed"]
  23481. },
  23482. "properties": {
  23483. "type": "object",
  23484. "properties": {
  23485. "message": {
  23486. "type": "string"
  23487. }
  23488. },
  23489. "required": ["message"],
  23490. "additionalProperties": false
  23491. }
  23492. },
  23493. "required": ["id", "type", "properties"],
  23494. "additionalProperties": false
  23495. },
  23496. "EventPtyCreated": {
  23497. "type": "object",
  23498. "properties": {
  23499. "id": {
  23500. "type": "string"
  23501. },
  23502. "type": {
  23503. "type": "string",
  23504. "enum": ["pty.created"]
  23505. },
  23506. "properties": {
  23507. "type": "object",
  23508. "properties": {
  23509. "info": {
  23510. "$ref": "#/components/schemas/Pty"
  23511. }
  23512. },
  23513. "required": ["info"],
  23514. "additionalProperties": false
  23515. }
  23516. },
  23517. "required": ["id", "type", "properties"],
  23518. "additionalProperties": false
  23519. },
  23520. "EventPtyUpdated": {
  23521. "type": "object",
  23522. "properties": {
  23523. "id": {
  23524. "type": "string"
  23525. },
  23526. "type": {
  23527. "type": "string",
  23528. "enum": ["pty.updated"]
  23529. },
  23530. "properties": {
  23531. "type": "object",
  23532. "properties": {
  23533. "info": {
  23534. "$ref": "#/components/schemas/Pty"
  23535. }
  23536. },
  23537. "required": ["info"],
  23538. "additionalProperties": false
  23539. }
  23540. },
  23541. "required": ["id", "type", "properties"],
  23542. "additionalProperties": false
  23543. },
  23544. "EventPtyExited": {
  23545. "type": "object",
  23546. "properties": {
  23547. "id": {
  23548. "type": "string"
  23549. },
  23550. "type": {
  23551. "type": "string",
  23552. "enum": ["pty.exited"]
  23553. },
  23554. "properties": {
  23555. "type": "object",
  23556. "properties": {
  23557. "id": {
  23558. "type": "string",
  23559. "pattern": "^pty"
  23560. },
  23561. "exitCode": {
  23562. "type": "integer",
  23563. "minimum": 0
  23564. }
  23565. },
  23566. "required": ["id", "exitCode"],
  23567. "additionalProperties": false
  23568. }
  23569. },
  23570. "required": ["id", "type", "properties"],
  23571. "additionalProperties": false
  23572. },
  23573. "EventPtyDeleted": {
  23574. "type": "object",
  23575. "properties": {
  23576. "id": {
  23577. "type": "string"
  23578. },
  23579. "type": {
  23580. "type": "string",
  23581. "enum": ["pty.deleted"]
  23582. },
  23583. "properties": {
  23584. "type": "object",
  23585. "properties": {
  23586. "id": {
  23587. "type": "string",
  23588. "pattern": "^pty"
  23589. }
  23590. },
  23591. "required": ["id"],
  23592. "additionalProperties": false
  23593. }
  23594. },
  23595. "required": ["id", "type", "properties"],
  23596. "additionalProperties": false
  23597. },
  23598. "EventInstallationUpdated": {
  23599. "type": "object",
  23600. "properties": {
  23601. "id": {
  23602. "type": "string"
  23603. },
  23604. "type": {
  23605. "type": "string",
  23606. "enum": ["installation.updated"]
  23607. },
  23608. "properties": {
  23609. "type": "object",
  23610. "properties": {
  23611. "version": {
  23612. "type": "string"
  23613. }
  23614. },
  23615. "required": ["version"],
  23616. "additionalProperties": false
  23617. }
  23618. },
  23619. "required": ["id", "type", "properties"],
  23620. "additionalProperties": false
  23621. },
  23622. "EventInstallationUpdate-available": {
  23623. "type": "object",
  23624. "properties": {
  23625. "id": {
  23626. "type": "string"
  23627. },
  23628. "type": {
  23629. "type": "string",
  23630. "enum": ["installation.update-available"]
  23631. },
  23632. "properties": {
  23633. "type": "object",
  23634. "properties": {
  23635. "version": {
  23636. "type": "string"
  23637. }
  23638. },
  23639. "required": ["version"],
  23640. "additionalProperties": false
  23641. }
  23642. },
  23643. "required": ["id", "type", "properties"],
  23644. "additionalProperties": false
  23645. },
  23646. "EventServerConnected": {
  23647. "type": "object",
  23648. "properties": {
  23649. "id": {
  23650. "type": "string"
  23651. },
  23652. "type": {
  23653. "type": "string",
  23654. "enum": ["server.connected"]
  23655. },
  23656. "properties": {
  23657. "type": "object",
  23658. "properties": {}
  23659. }
  23660. },
  23661. "required": ["id", "type", "properties"],
  23662. "additionalProperties": false
  23663. },
  23664. "EventGlobalDisposed": {
  23665. "type": "object",
  23666. "properties": {
  23667. "id": {
  23668. "type": "string"
  23669. },
  23670. "type": {
  23671. "type": "string",
  23672. "enum": ["global.disposed"]
  23673. },
  23674. "properties": {
  23675. "type": "object",
  23676. "properties": {}
  23677. }
  23678. },
  23679. "required": ["id", "type", "properties"],
  23680. "additionalProperties": false
  23681. },
  23682. "AuthOAuthCredential": {
  23683. "type": "object",
  23684. "properties": {
  23685. "type": {
  23686. "type": "string",
  23687. "enum": ["oauth"]
  23688. },
  23689. "refresh": {
  23690. "type": "string"
  23691. },
  23692. "access": {
  23693. "type": "string"
  23694. },
  23695. "expires": {
  23696. "type": "integer",
  23697. "minimum": 0
  23698. }
  23699. },
  23700. "required": ["type", "refresh", "access", "expires"],
  23701. "additionalProperties": false
  23702. },
  23703. "AuthApiKeyCredential": {
  23704. "type": "object",
  23705. "properties": {
  23706. "type": {
  23707. "type": "string",
  23708. "enum": ["api"]
  23709. },
  23710. "key": {
  23711. "type": "string"
  23712. },
  23713. "metadata": {
  23714. "type": "object",
  23715. "additionalProperties": {
  23716. "type": "string"
  23717. }
  23718. }
  23719. },
  23720. "required": ["type", "key"],
  23721. "additionalProperties": false
  23722. },
  23723. "AuthCredential": {
  23724. "anyOf": [
  23725. {
  23726. "$ref": "#/components/schemas/AuthOAuthCredential"
  23727. },
  23728. {
  23729. "$ref": "#/components/schemas/AuthApiKeyCredential"
  23730. }
  23731. ]
  23732. },
  23733. "AuthInfo": {
  23734. "type": "object",
  23735. "properties": {
  23736. "id": {
  23737. "type": "string"
  23738. },
  23739. "serviceID": {
  23740. "type": "string"
  23741. },
  23742. "description": {
  23743. "type": "string"
  23744. },
  23745. "credential": {
  23746. "$ref": "#/components/schemas/AuthCredential"
  23747. }
  23748. },
  23749. "required": ["id", "serviceID", "description", "credential"],
  23750. "additionalProperties": false
  23751. },
  23752. "EventAccountAdded": {
  23753. "type": "object",
  23754. "properties": {
  23755. "id": {
  23756. "type": "string"
  23757. },
  23758. "type": {
  23759. "type": "string",
  23760. "enum": ["account.added"]
  23761. },
  23762. "properties": {
  23763. "type": "object",
  23764. "properties": {
  23765. "account": {
  23766. "$ref": "#/components/schemas/AuthInfo"
  23767. }
  23768. },
  23769. "required": ["account"],
  23770. "additionalProperties": false
  23771. }
  23772. },
  23773. "required": ["id", "type", "properties"],
  23774. "additionalProperties": false
  23775. },
  23776. "EventAccountRemoved": {
  23777. "type": "object",
  23778. "properties": {
  23779. "id": {
  23780. "type": "string"
  23781. },
  23782. "type": {
  23783. "type": "string",
  23784. "enum": ["account.removed"]
  23785. },
  23786. "properties": {
  23787. "type": "object",
  23788. "properties": {
  23789. "account": {
  23790. "$ref": "#/components/schemas/AuthInfo"
  23791. }
  23792. },
  23793. "required": ["account"],
  23794. "additionalProperties": false
  23795. }
  23796. },
  23797. "required": ["id", "type", "properties"],
  23798. "additionalProperties": false
  23799. },
  23800. "EventAccountSwitched": {
  23801. "type": "object",
  23802. "properties": {
  23803. "id": {
  23804. "type": "string"
  23805. },
  23806. "type": {
  23807. "type": "string",
  23808. "enum": ["account.switched"]
  23809. },
  23810. "properties": {
  23811. "type": "object",
  23812. "properties": {
  23813. "serviceID": {
  23814. "type": "string"
  23815. },
  23816. "from": {
  23817. "type": "string"
  23818. },
  23819. "to": {
  23820. "type": "string"
  23821. }
  23822. },
  23823. "required": ["serviceID"],
  23824. "additionalProperties": false
  23825. }
  23826. },
  23827. "required": ["id", "type", "properties"],
  23828. "additionalProperties": false
  23829. },
  23830. "BadRequestError": {
  23831. "type": "object",
  23832. "required": ["name", "data"],
  23833. "properties": {
  23834. "name": {
  23835. "type": "string",
  23836. "enum": ["BadRequest"]
  23837. },
  23838. "data": {
  23839. "type": "object",
  23840. "required": ["message"],
  23841. "properties": {
  23842. "message": {
  23843. "type": "string"
  23844. },
  23845. "kind": {
  23846. "type": "string",
  23847. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  23848. }
  23849. }
  23850. }
  23851. }
  23852. }
  23853. }
  23854. },
  23855. "security": [],
  23856. "tags": [
  23857. {
  23858. "name": "control",
  23859. "description": "Control plane routes."
  23860. },
  23861. {
  23862. "name": "global",
  23863. "description": "Global server routes."
  23864. },
  23865. {
  23866. "name": "event",
  23867. "description": "Instance event stream route."
  23868. },
  23869. {
  23870. "name": "config",
  23871. "description": "Experimental HttpApi config routes."
  23872. },
  23873. {
  23874. "name": "experimental",
  23875. "description": "Experimental HttpApi read-only routes."
  23876. },
  23877. {
  23878. "name": "file",
  23879. "description": "Experimental HttpApi file routes."
  23880. },
  23881. {
  23882. "name": "instance",
  23883. "description": "Experimental HttpApi instance read routes."
  23884. },
  23885. {
  23886. "name": "mcp",
  23887. "description": "Experimental HttpApi MCP routes."
  23888. },
  23889. {
  23890. "name": "project",
  23891. "description": "Experimental HttpApi project routes."
  23892. },
  23893. {
  23894. "name": "pty",
  23895. "description": "Experimental HttpApi PTY routes."
  23896. },
  23897. {
  23898. "name": "question",
  23899. "description": "Question routes."
  23900. },
  23901. {
  23902. "name": "permission",
  23903. "description": "Experimental HttpApi permission routes."
  23904. },
  23905. {
  23906. "name": "provider",
  23907. "description": "Experimental HttpApi provider routes."
  23908. },
  23909. {
  23910. "name": "session",
  23911. "description": "Experimental HttpApi session routes."
  23912. },
  23913. {
  23914. "name": "sync",
  23915. "description": "Experimental HttpApi sync routes."
  23916. },
  23917. {
  23918. "name": "v2",
  23919. "description": "Experimental v2 routes."
  23920. },
  23921. {
  23922. "name": "v2 messages",
  23923. "description": "Experimental v2 message routes."
  23924. },
  23925. {
  23926. "name": "v2 models",
  23927. "description": "Experimental v2 model routes."
  23928. },
  23929. {
  23930. "name": "v2 providers",
  23931. "description": "Experimental v2 provider routes."
  23932. },
  23933. {
  23934. "name": "tui",
  23935. "description": "Experimental HttpApi TUI routes."
  23936. },
  23937. {
  23938. "name": "workspace",
  23939. "description": "Experimental HttpApi workspace routes."
  23940. },
  23941. {
  23942. "name": "pty",
  23943. "description": "PTY websocket route."
  23944. }
  23945. ]
  23946. }