openapi.json 556 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341
  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": "Bad request",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "$ref": "#/components/schemas/BadRequestError"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "description": "Set authentication credentials",
  47. "summary": "Set auth credentials",
  48. "requestBody": {
  49. "content": {
  50. "application/json": {
  51. "schema": {
  52. "$ref": "#/components/schemas/Auth"
  53. }
  54. }
  55. }
  56. },
  57. "x-codeSamples": [
  58. {
  59. "lang": "js",
  60. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  61. }
  62. ]
  63. },
  64. "delete": {
  65. "tags": ["control"],
  66. "operationId": "auth.remove",
  67. "parameters": [
  68. {
  69. "name": "providerID",
  70. "in": "path",
  71. "schema": {
  72. "type": "string"
  73. },
  74. "required": true
  75. }
  76. ],
  77. "responses": {
  78. "200": {
  79. "description": "Successfully removed authentication credentials",
  80. "content": {
  81. "application/json": {
  82. "schema": {
  83. "type": "boolean",
  84. "description": "Successfully removed authentication credentials"
  85. }
  86. }
  87. }
  88. },
  89. "400": {
  90. "description": "Bad request",
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "$ref": "#/components/schemas/BadRequestError"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "description": "Remove authentication credentials",
  101. "summary": "Remove auth credentials",
  102. "x-codeSamples": [
  103. {
  104. "lang": "js",
  105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  106. }
  107. ]
  108. }
  109. },
  110. "/log": {
  111. "post": {
  112. "tags": ["control"],
  113. "operationId": "app.log",
  114. "parameters": [
  115. {
  116. "name": "directory",
  117. "in": "query",
  118. "schema": {
  119. "type": "string"
  120. },
  121. "required": false
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "schema": {
  127. "type": "string"
  128. },
  129. "required": false
  130. }
  131. ],
  132. "responses": {
  133. "200": {
  134. "description": "Log entry written successfully",
  135. "content": {
  136. "application/json": {
  137. "schema": {
  138. "type": "boolean",
  139. "description": "Log entry written successfully"
  140. }
  141. }
  142. }
  143. },
  144. "400": {
  145. "description": "Bad request",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "#/components/schemas/BadRequestError"
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "description": "Write a log entry to the server logs with specified level and metadata.",
  156. "summary": "Write log",
  157. "requestBody": {
  158. "content": {
  159. "application/json": {
  160. "schema": {
  161. "type": "object",
  162. "properties": {
  163. "service": {
  164. "type": "string",
  165. "description": "Service name for the log entry"
  166. },
  167. "level": {
  168. "type": "string",
  169. "enum": ["debug", "info", "error", "warn"],
  170. "description": "Log level"
  171. },
  172. "message": {
  173. "type": "string",
  174. "description": "Log message"
  175. },
  176. "extra": {
  177. "type": "object"
  178. }
  179. },
  180. "required": ["service", "level", "message"],
  181. "additionalProperties": false
  182. }
  183. }
  184. }
  185. },
  186. "x-codeSamples": [
  187. {
  188. "lang": "js",
  189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  190. }
  191. ]
  192. }
  193. },
  194. "/global/health": {
  195. "get": {
  196. "tags": ["global"],
  197. "operationId": "global.health",
  198. "parameters": [],
  199. "responses": {
  200. "200": {
  201. "description": "Health information",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "properties": {
  207. "healthy": {
  208. "type": "boolean",
  209. "enum": [true]
  210. },
  211. "version": {
  212. "type": "string"
  213. }
  214. },
  215. "required": ["healthy", "version"],
  216. "additionalProperties": false,
  217. "description": "Health information"
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "description": "Get health information about the OpenCode server.",
  224. "summary": "Get health",
  225. "x-codeSamples": [
  226. {
  227. "lang": "js",
  228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  229. }
  230. ]
  231. }
  232. },
  233. "/global/event": {
  234. "get": {
  235. "tags": ["global"],
  236. "operationId": "global.event",
  237. "parameters": [],
  238. "responses": {
  239. "200": {
  240. "description": "Event stream",
  241. "content": {
  242. "text/event-stream": {
  243. "schema": {
  244. "$ref": "#/components/schemas/GlobalEvent"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  251. "summary": "Get global events",
  252. "x-codeSamples": [
  253. {
  254. "lang": "js",
  255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  256. }
  257. ]
  258. }
  259. },
  260. "/global/config": {
  261. "get": {
  262. "tags": ["global"],
  263. "operationId": "global.config.get",
  264. "parameters": [],
  265. "responses": {
  266. "200": {
  267. "description": "Get global config info",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "$ref": "#/components/schemas/Config"
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  278. "summary": "Get global configuration",
  279. "x-codeSamples": [
  280. {
  281. "lang": "js",
  282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  283. }
  284. ]
  285. },
  286. "patch": {
  287. "tags": ["global"],
  288. "operationId": "global.config.update",
  289. "parameters": [],
  290. "responses": {
  291. "200": {
  292. "description": "Successfully updated global config",
  293. "content": {
  294. "application/json": {
  295. "schema": {
  296. "$ref": "#/components/schemas/Config"
  297. }
  298. }
  299. }
  300. },
  301. "400": {
  302. "description": "Bad request",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "$ref": "#/components/schemas/BadRequestError"
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "description": "Update global OpenCode configuration settings and preferences.",
  313. "summary": "Update global configuration",
  314. "requestBody": {
  315. "content": {
  316. "application/json": {
  317. "schema": {
  318. "$ref": "#/components/schemas/Config"
  319. }
  320. }
  321. }
  322. },
  323. "x-codeSamples": [
  324. {
  325. "lang": "js",
  326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  327. }
  328. ]
  329. }
  330. },
  331. "/global/dispose": {
  332. "post": {
  333. "tags": ["global"],
  334. "operationId": "global.dispose",
  335. "parameters": [],
  336. "responses": {
  337. "200": {
  338. "description": "Global disposed",
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "boolean",
  343. "description": "Global disposed"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  350. "summary": "Dispose instance",
  351. "x-codeSamples": [
  352. {
  353. "lang": "js",
  354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  355. }
  356. ]
  357. }
  358. },
  359. "/global/upgrade": {
  360. "post": {
  361. "tags": ["global"],
  362. "operationId": "global.upgrade",
  363. "parameters": [],
  364. "responses": {
  365. "200": {
  366. "description": "Upgrade result",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "anyOf": [
  371. {
  372. "type": "object",
  373. "properties": {
  374. "success": {
  375. "type": "boolean",
  376. "enum": [true]
  377. },
  378. "version": {
  379. "type": "string"
  380. }
  381. },
  382. "required": ["success", "version"],
  383. "additionalProperties": false
  384. },
  385. {
  386. "type": "object",
  387. "properties": {
  388. "success": {
  389. "type": "boolean",
  390. "enum": [false]
  391. },
  392. "error": {
  393. "type": "string"
  394. }
  395. },
  396. "required": ["success", "error"],
  397. "additionalProperties": false
  398. }
  399. ],
  400. "description": "Upgrade result"
  401. }
  402. }
  403. }
  404. },
  405. "400": {
  406. "description": "Bad request",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "$ref": "#/components/schemas/BadRequestError"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "description": "Upgrade opencode to the specified version or latest if not specified.",
  417. "summary": "Upgrade opencode",
  418. "requestBody": {
  419. "content": {
  420. "application/json": {
  421. "schema": {
  422. "type": "object",
  423. "properties": {
  424. "target": {
  425. "type": "string"
  426. }
  427. },
  428. "additionalProperties": false
  429. }
  430. }
  431. }
  432. },
  433. "x-codeSamples": [
  434. {
  435. "lang": "js",
  436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  437. }
  438. ]
  439. }
  440. },
  441. "/event": {
  442. "get": {
  443. "tags": ["event"],
  444. "operationId": "event.subscribe",
  445. "parameters": [
  446. {
  447. "name": "directory",
  448. "in": "query",
  449. "schema": {
  450. "type": "string"
  451. },
  452. "required": false
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "schema": {
  458. "type": "string"
  459. },
  460. "required": false
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "Event stream",
  466. "content": {
  467. "text/event-stream": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Event"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "description": "Get events",
  476. "summary": "Subscribe to events",
  477. "x-codeSamples": [
  478. {
  479. "lang": "js",
  480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  481. }
  482. ]
  483. }
  484. },
  485. "/config": {
  486. "get": {
  487. "tags": ["config"],
  488. "operationId": "config.get",
  489. "parameters": [
  490. {
  491. "name": "directory",
  492. "in": "query",
  493. "schema": {
  494. "type": "string"
  495. },
  496. "required": false
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "schema": {
  502. "type": "string"
  503. },
  504. "required": false
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "Get config info",
  510. "content": {
  511. "application/json": {
  512. "schema": {
  513. "$ref": "#/components/schemas/Config"
  514. }
  515. }
  516. }
  517. }
  518. },
  519. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  520. "summary": "Get configuration",
  521. "x-codeSamples": [
  522. {
  523. "lang": "js",
  524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  525. }
  526. ]
  527. },
  528. "patch": {
  529. "tags": ["config"],
  530. "operationId": "config.update",
  531. "parameters": [
  532. {
  533. "name": "directory",
  534. "in": "query",
  535. "schema": {
  536. "type": "string"
  537. },
  538. "required": false
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "schema": {
  544. "type": "string"
  545. },
  546. "required": false
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "Successfully updated config",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "$ref": "#/components/schemas/Config"
  556. }
  557. }
  558. }
  559. },
  560. "400": {
  561. "description": "Bad request",
  562. "content": {
  563. "application/json": {
  564. "schema": {
  565. "$ref": "#/components/schemas/BadRequestError"
  566. }
  567. }
  568. }
  569. }
  570. },
  571. "description": "Update OpenCode configuration settings and preferences.",
  572. "summary": "Update configuration",
  573. "requestBody": {
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/Config"
  578. }
  579. }
  580. }
  581. },
  582. "x-codeSamples": [
  583. {
  584. "lang": "js",
  585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  586. }
  587. ]
  588. }
  589. },
  590. "/config/providers": {
  591. "get": {
  592. "tags": ["config"],
  593. "operationId": "config.providers",
  594. "parameters": [
  595. {
  596. "name": "directory",
  597. "in": "query",
  598. "schema": {
  599. "type": "string"
  600. },
  601. "required": false
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "schema": {
  607. "type": "string"
  608. },
  609. "required": false
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "List of providers",
  615. "content": {
  616. "application/json": {
  617. "schema": {
  618. "type": "object",
  619. "properties": {
  620. "providers": {
  621. "type": "array",
  622. "items": {
  623. "$ref": "#/components/schemas/Provider"
  624. }
  625. },
  626. "default": {
  627. "type": "object",
  628. "additionalProperties": {
  629. "type": "string"
  630. }
  631. }
  632. },
  633. "required": ["providers", "default"],
  634. "additionalProperties": false,
  635. "description": "List of providers"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "description": "Get a list of all configured AI providers and their default models.",
  642. "summary": "List config providers",
  643. "x-codeSamples": [
  644. {
  645. "lang": "js",
  646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  647. }
  648. ]
  649. }
  650. },
  651. "/experimental/console": {
  652. "get": {
  653. "tags": ["experimental"],
  654. "operationId": "experimental.console.get",
  655. "parameters": [
  656. {
  657. "name": "directory",
  658. "in": "query",
  659. "schema": {
  660. "type": "string"
  661. },
  662. "required": false
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "schema": {
  668. "type": "string"
  669. },
  670. "required": false
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "Active Console provider metadata",
  676. "content": {
  677. "application/json": {
  678. "schema": {
  679. "$ref": "#/components/schemas/ConsoleState"
  680. }
  681. }
  682. }
  683. },
  684. "500": {
  685. "description": "InternalServerError",
  686. "content": {
  687. "application/json": {
  688. "schema": {
  689. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  696. "summary": "Get active Console provider metadata",
  697. "x-codeSamples": [
  698. {
  699. "lang": "js",
  700. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  701. }
  702. ]
  703. }
  704. },
  705. "/experimental/console/orgs": {
  706. "get": {
  707. "tags": ["experimental"],
  708. "operationId": "experimental.console.listOrgs",
  709. "parameters": [
  710. {
  711. "name": "directory",
  712. "in": "query",
  713. "schema": {
  714. "type": "string"
  715. },
  716. "required": false
  717. },
  718. {
  719. "name": "workspace",
  720. "in": "query",
  721. "schema": {
  722. "type": "string"
  723. },
  724. "required": false
  725. }
  726. ],
  727. "responses": {
  728. "200": {
  729. "description": "Switchable Console orgs",
  730. "content": {
  731. "application/json": {
  732. "schema": {
  733. "type": "object",
  734. "properties": {
  735. "orgs": {
  736. "type": "array",
  737. "items": {
  738. "type": "object",
  739. "properties": {
  740. "accountID": {
  741. "type": "string"
  742. },
  743. "accountEmail": {
  744. "type": "string"
  745. },
  746. "accountUrl": {
  747. "type": "string"
  748. },
  749. "orgID": {
  750. "type": "string"
  751. },
  752. "orgName": {
  753. "type": "string"
  754. },
  755. "active": {
  756. "type": "boolean"
  757. }
  758. },
  759. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  760. "additionalProperties": false
  761. }
  762. }
  763. },
  764. "required": ["orgs"],
  765. "additionalProperties": false,
  766. "description": "Switchable Console orgs"
  767. }
  768. }
  769. }
  770. },
  771. "500": {
  772. "description": "InternalServerError",
  773. "content": {
  774. "application/json": {
  775. "schema": {
  776. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  777. }
  778. }
  779. }
  780. }
  781. },
  782. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  783. "summary": "List switchable Console orgs",
  784. "x-codeSamples": [
  785. {
  786. "lang": "js",
  787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  788. }
  789. ]
  790. }
  791. },
  792. "/experimental/console/switch": {
  793. "post": {
  794. "tags": ["experimental"],
  795. "operationId": "experimental.console.switchOrg",
  796. "parameters": [
  797. {
  798. "name": "directory",
  799. "in": "query",
  800. "schema": {
  801. "type": "string"
  802. },
  803. "required": false
  804. },
  805. {
  806. "name": "workspace",
  807. "in": "query",
  808. "schema": {
  809. "type": "string"
  810. },
  811. "required": false
  812. }
  813. ],
  814. "responses": {
  815. "200": {
  816. "description": "Switch success",
  817. "content": {
  818. "application/json": {
  819. "schema": {
  820. "type": "boolean",
  821. "description": "Switch success"
  822. }
  823. }
  824. }
  825. }
  826. },
  827. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  828. "summary": "Switch active Console org",
  829. "requestBody": {
  830. "content": {
  831. "application/json": {
  832. "schema": {
  833. "type": "object",
  834. "properties": {
  835. "accountID": {
  836. "type": "string"
  837. },
  838. "orgID": {
  839. "type": "string"
  840. }
  841. },
  842. "required": ["accountID", "orgID"],
  843. "additionalProperties": false
  844. }
  845. }
  846. }
  847. },
  848. "x-codeSamples": [
  849. {
  850. "lang": "js",
  851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  852. }
  853. ]
  854. }
  855. },
  856. "/experimental/tool": {
  857. "get": {
  858. "tags": ["experimental"],
  859. "operationId": "tool.list",
  860. "parameters": [
  861. {
  862. "name": "directory",
  863. "in": "query",
  864. "schema": {
  865. "type": "string"
  866. },
  867. "required": false
  868. },
  869. {
  870. "name": "workspace",
  871. "in": "query",
  872. "schema": {
  873. "type": "string"
  874. },
  875. "required": false
  876. },
  877. {
  878. "name": "provider",
  879. "in": "query",
  880. "schema": {
  881. "type": "string"
  882. },
  883. "required": true
  884. },
  885. {
  886. "name": "model",
  887. "in": "query",
  888. "schema": {
  889. "type": "string"
  890. },
  891. "required": true
  892. }
  893. ],
  894. "responses": {
  895. "200": {
  896. "description": "Tools",
  897. "content": {
  898. "application/json": {
  899. "schema": {
  900. "$ref": "#/components/schemas/ToolList"
  901. }
  902. }
  903. }
  904. },
  905. "400": {
  906. "description": "Bad request",
  907. "content": {
  908. "application/json": {
  909. "schema": {
  910. "$ref": "#/components/schemas/BadRequestError"
  911. }
  912. }
  913. }
  914. }
  915. },
  916. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  917. "summary": "List tools",
  918. "x-codeSamples": [
  919. {
  920. "lang": "js",
  921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  922. }
  923. ]
  924. }
  925. },
  926. "/experimental/tool/ids": {
  927. "get": {
  928. "tags": ["experimental"],
  929. "operationId": "tool.ids",
  930. "parameters": [
  931. {
  932. "name": "directory",
  933. "in": "query",
  934. "schema": {
  935. "type": "string"
  936. },
  937. "required": false
  938. },
  939. {
  940. "name": "workspace",
  941. "in": "query",
  942. "schema": {
  943. "type": "string"
  944. },
  945. "required": false
  946. }
  947. ],
  948. "responses": {
  949. "200": {
  950. "description": "Tool IDs",
  951. "content": {
  952. "application/json": {
  953. "schema": {
  954. "$ref": "#/components/schemas/ToolIDs"
  955. }
  956. }
  957. }
  958. },
  959. "400": {
  960. "description": "Bad request",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/BadRequestError"
  965. }
  966. }
  967. }
  968. }
  969. },
  970. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  971. "summary": "List tool IDs",
  972. "x-codeSamples": [
  973. {
  974. "lang": "js",
  975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  976. }
  977. ]
  978. }
  979. },
  980. "/experimental/worktree": {
  981. "get": {
  982. "tags": ["experimental"],
  983. "operationId": "worktree.list",
  984. "parameters": [
  985. {
  986. "name": "directory",
  987. "in": "query",
  988. "schema": {
  989. "type": "string"
  990. },
  991. "required": false
  992. },
  993. {
  994. "name": "workspace",
  995. "in": "query",
  996. "schema": {
  997. "type": "string"
  998. },
  999. "required": false
  1000. }
  1001. ],
  1002. "responses": {
  1003. "200": {
  1004. "description": "List of worktree directories",
  1005. "content": {
  1006. "application/json": {
  1007. "schema": {
  1008. "type": "array",
  1009. "items": {
  1010. "type": "string"
  1011. },
  1012. "description": "List of worktree directories"
  1013. }
  1014. }
  1015. }
  1016. },
  1017. "400": {
  1018. "description": "WorktreeError",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/WorktreeError"
  1023. }
  1024. }
  1025. }
  1026. }
  1027. },
  1028. "description": "List all sandbox worktrees for the current project.",
  1029. "summary": "List worktrees",
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1034. }
  1035. ]
  1036. },
  1037. "post": {
  1038. "tags": ["experimental"],
  1039. "operationId": "worktree.create",
  1040. "parameters": [
  1041. {
  1042. "name": "directory",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. },
  1049. {
  1050. "name": "workspace",
  1051. "in": "query",
  1052. "schema": {
  1053. "type": "string"
  1054. },
  1055. "required": false
  1056. }
  1057. ],
  1058. "responses": {
  1059. "200": {
  1060. "description": "Worktree created",
  1061. "content": {
  1062. "application/json": {
  1063. "schema": {
  1064. "$ref": "#/components/schemas/Worktree"
  1065. }
  1066. }
  1067. }
  1068. },
  1069. "400": {
  1070. "description": "WorktreeError",
  1071. "content": {
  1072. "application/json": {
  1073. "schema": {
  1074. "$ref": "#/components/schemas/WorktreeError"
  1075. }
  1076. }
  1077. }
  1078. }
  1079. },
  1080. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1081. "summary": "Create worktree",
  1082. "requestBody": {
  1083. "content": {
  1084. "application/json": {
  1085. "schema": {
  1086. "$ref": "#/components/schemas/WorktreeCreateInput"
  1087. }
  1088. }
  1089. }
  1090. },
  1091. "x-codeSamples": [
  1092. {
  1093. "lang": "js",
  1094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1095. }
  1096. ]
  1097. },
  1098. "delete": {
  1099. "tags": ["experimental"],
  1100. "operationId": "worktree.remove",
  1101. "parameters": [
  1102. {
  1103. "name": "directory",
  1104. "in": "query",
  1105. "schema": {
  1106. "type": "string"
  1107. },
  1108. "required": false
  1109. },
  1110. {
  1111. "name": "workspace",
  1112. "in": "query",
  1113. "schema": {
  1114. "type": "string"
  1115. },
  1116. "required": false
  1117. }
  1118. ],
  1119. "responses": {
  1120. "200": {
  1121. "description": "Worktree removed",
  1122. "content": {
  1123. "application/json": {
  1124. "schema": {
  1125. "type": "boolean",
  1126. "description": "Worktree removed"
  1127. }
  1128. }
  1129. }
  1130. },
  1131. "400": {
  1132. "description": "WorktreeError",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/WorktreeError"
  1137. }
  1138. }
  1139. }
  1140. }
  1141. },
  1142. "description": "Remove a git worktree and delete its branch.",
  1143. "summary": "Remove worktree",
  1144. "requestBody": {
  1145. "content": {
  1146. "application/json": {
  1147. "schema": {
  1148. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "x-codeSamples": [
  1154. {
  1155. "lang": "js",
  1156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1157. }
  1158. ]
  1159. }
  1160. },
  1161. "/experimental/worktree/reset": {
  1162. "post": {
  1163. "tags": ["experimental"],
  1164. "operationId": "worktree.reset",
  1165. "parameters": [
  1166. {
  1167. "name": "directory",
  1168. "in": "query",
  1169. "schema": {
  1170. "type": "string"
  1171. },
  1172. "required": false
  1173. },
  1174. {
  1175. "name": "workspace",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. }
  1182. ],
  1183. "responses": {
  1184. "200": {
  1185. "description": "Worktree reset",
  1186. "content": {
  1187. "application/json": {
  1188. "schema": {
  1189. "type": "boolean",
  1190. "description": "Worktree reset"
  1191. }
  1192. }
  1193. }
  1194. },
  1195. "400": {
  1196. "description": "WorktreeError",
  1197. "content": {
  1198. "application/json": {
  1199. "schema": {
  1200. "$ref": "#/components/schemas/WorktreeError"
  1201. }
  1202. }
  1203. }
  1204. }
  1205. },
  1206. "description": "Reset a worktree branch to the primary default branch.",
  1207. "summary": "Reset worktree",
  1208. "requestBody": {
  1209. "content": {
  1210. "application/json": {
  1211. "schema": {
  1212. "$ref": "#/components/schemas/WorktreeResetInput"
  1213. }
  1214. }
  1215. }
  1216. },
  1217. "x-codeSamples": [
  1218. {
  1219. "lang": "js",
  1220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1221. }
  1222. ]
  1223. }
  1224. },
  1225. "/experimental/session": {
  1226. "get": {
  1227. "tags": ["experimental"],
  1228. "operationId": "experimental.session.list",
  1229. "parameters": [
  1230. {
  1231. "name": "directory",
  1232. "in": "query",
  1233. "schema": {
  1234. "type": "string"
  1235. },
  1236. "required": false
  1237. },
  1238. {
  1239. "name": "workspace",
  1240. "in": "query",
  1241. "schema": {
  1242. "type": "string"
  1243. },
  1244. "required": false
  1245. },
  1246. {
  1247. "name": "roots",
  1248. "in": "query",
  1249. "schema": {
  1250. "anyOf": [
  1251. {
  1252. "type": "boolean"
  1253. },
  1254. {
  1255. "type": "string",
  1256. "enum": ["true", "false"]
  1257. }
  1258. ]
  1259. },
  1260. "required": false
  1261. },
  1262. {
  1263. "name": "start",
  1264. "in": "query",
  1265. "schema": {
  1266. "type": "number"
  1267. },
  1268. "required": false
  1269. },
  1270. {
  1271. "name": "cursor",
  1272. "in": "query",
  1273. "schema": {
  1274. "type": "number"
  1275. },
  1276. "required": false
  1277. },
  1278. {
  1279. "name": "search",
  1280. "in": "query",
  1281. "schema": {
  1282. "type": "string"
  1283. },
  1284. "required": false
  1285. },
  1286. {
  1287. "name": "limit",
  1288. "in": "query",
  1289. "schema": {
  1290. "type": "number"
  1291. },
  1292. "required": false
  1293. },
  1294. {
  1295. "name": "archived",
  1296. "in": "query",
  1297. "schema": {
  1298. "anyOf": [
  1299. {
  1300. "type": "boolean"
  1301. },
  1302. {
  1303. "type": "string",
  1304. "enum": ["true", "false"]
  1305. }
  1306. ]
  1307. },
  1308. "required": false
  1309. }
  1310. ],
  1311. "responses": {
  1312. "200": {
  1313. "description": "List of sessions",
  1314. "content": {
  1315. "application/json": {
  1316. "schema": {
  1317. "type": "array",
  1318. "items": {
  1319. "$ref": "#/components/schemas/GlobalSession"
  1320. },
  1321. "description": "List of sessions"
  1322. }
  1323. }
  1324. }
  1325. }
  1326. },
  1327. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1328. "summary": "List sessions",
  1329. "x-codeSamples": [
  1330. {
  1331. "lang": "js",
  1332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1333. }
  1334. ]
  1335. }
  1336. },
  1337. "/experimental/resource": {
  1338. "get": {
  1339. "tags": ["experimental"],
  1340. "operationId": "experimental.resource.list",
  1341. "parameters": [
  1342. {
  1343. "name": "directory",
  1344. "in": "query",
  1345. "schema": {
  1346. "type": "string"
  1347. },
  1348. "required": false
  1349. },
  1350. {
  1351. "name": "workspace",
  1352. "in": "query",
  1353. "schema": {
  1354. "type": "string"
  1355. },
  1356. "required": false
  1357. }
  1358. ],
  1359. "responses": {
  1360. "200": {
  1361. "description": "MCP resources",
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "type": "object",
  1366. "additionalProperties": {
  1367. "$ref": "#/components/schemas/McpResource"
  1368. },
  1369. "description": "MCP resources"
  1370. }
  1371. }
  1372. }
  1373. }
  1374. },
  1375. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1376. "summary": "Get MCP resources",
  1377. "x-codeSamples": [
  1378. {
  1379. "lang": "js",
  1380. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1381. }
  1382. ]
  1383. }
  1384. },
  1385. "/find": {
  1386. "get": {
  1387. "tags": ["file"],
  1388. "operationId": "find.text",
  1389. "parameters": [
  1390. {
  1391. "name": "directory",
  1392. "in": "query",
  1393. "schema": {
  1394. "type": "string"
  1395. },
  1396. "required": false
  1397. },
  1398. {
  1399. "name": "workspace",
  1400. "in": "query",
  1401. "schema": {
  1402. "type": "string"
  1403. },
  1404. "required": false
  1405. },
  1406. {
  1407. "name": "pattern",
  1408. "in": "query",
  1409. "schema": {
  1410. "type": "string"
  1411. },
  1412. "required": true
  1413. }
  1414. ],
  1415. "responses": {
  1416. "200": {
  1417. "description": "Matches",
  1418. "content": {
  1419. "application/json": {
  1420. "schema": {
  1421. "type": "array",
  1422. "items": {
  1423. "type": "object",
  1424. "properties": {
  1425. "path": {
  1426. "type": "object",
  1427. "properties": {
  1428. "text": {
  1429. "type": "string"
  1430. }
  1431. },
  1432. "required": ["text"],
  1433. "additionalProperties": false
  1434. },
  1435. "lines": {
  1436. "type": "object",
  1437. "properties": {
  1438. "text": {
  1439. "type": "string"
  1440. }
  1441. },
  1442. "required": ["text"],
  1443. "additionalProperties": false
  1444. },
  1445. "line_number": {
  1446. "type": "integer",
  1447. "minimum": 0
  1448. },
  1449. "absolute_offset": {
  1450. "type": "integer",
  1451. "minimum": 0
  1452. },
  1453. "submatches": {
  1454. "type": "array",
  1455. "items": {
  1456. "type": "object",
  1457. "properties": {
  1458. "match": {
  1459. "type": "object",
  1460. "properties": {
  1461. "text": {
  1462. "type": "string"
  1463. }
  1464. },
  1465. "required": ["text"],
  1466. "additionalProperties": false
  1467. },
  1468. "start": {
  1469. "type": "integer",
  1470. "minimum": 0
  1471. },
  1472. "end": {
  1473. "type": "integer",
  1474. "minimum": 0
  1475. }
  1476. },
  1477. "required": ["match", "start", "end"],
  1478. "additionalProperties": false
  1479. }
  1480. }
  1481. },
  1482. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1483. "additionalProperties": false
  1484. },
  1485. "description": "Matches"
  1486. }
  1487. }
  1488. }
  1489. }
  1490. },
  1491. "description": "Search for text patterns across files in the project using ripgrep.",
  1492. "summary": "Find text",
  1493. "x-codeSamples": [
  1494. {
  1495. "lang": "js",
  1496. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1497. }
  1498. ]
  1499. }
  1500. },
  1501. "/find/file": {
  1502. "get": {
  1503. "tags": ["file"],
  1504. "operationId": "find.files",
  1505. "parameters": [
  1506. {
  1507. "name": "directory",
  1508. "in": "query",
  1509. "schema": {
  1510. "type": "string"
  1511. },
  1512. "required": false
  1513. },
  1514. {
  1515. "name": "workspace",
  1516. "in": "query",
  1517. "schema": {
  1518. "type": "string"
  1519. },
  1520. "required": false
  1521. },
  1522. {
  1523. "name": "query",
  1524. "in": "query",
  1525. "schema": {
  1526. "type": "string"
  1527. },
  1528. "required": true
  1529. },
  1530. {
  1531. "name": "dirs",
  1532. "in": "query",
  1533. "schema": {
  1534. "type": "string",
  1535. "enum": ["true", "false"]
  1536. },
  1537. "required": false
  1538. },
  1539. {
  1540. "name": "type",
  1541. "in": "query",
  1542. "schema": {
  1543. "type": "string",
  1544. "enum": ["file", "directory"]
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "limit",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "integer",
  1553. "minimum": 1,
  1554. "maximum": 200
  1555. },
  1556. "required": false
  1557. }
  1558. ],
  1559. "responses": {
  1560. "200": {
  1561. "description": "File paths",
  1562. "content": {
  1563. "application/json": {
  1564. "schema": {
  1565. "type": "array",
  1566. "items": {
  1567. "type": "string"
  1568. },
  1569. "description": "File paths"
  1570. }
  1571. }
  1572. }
  1573. }
  1574. },
  1575. "description": "Search for files or directories by name or pattern in the project directory.",
  1576. "summary": "Find files",
  1577. "x-codeSamples": [
  1578. {
  1579. "lang": "js",
  1580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1581. }
  1582. ]
  1583. }
  1584. },
  1585. "/find/symbol": {
  1586. "get": {
  1587. "tags": ["file"],
  1588. "operationId": "find.symbols",
  1589. "parameters": [
  1590. {
  1591. "name": "directory",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": false
  1597. },
  1598. {
  1599. "name": "workspace",
  1600. "in": "query",
  1601. "schema": {
  1602. "type": "string"
  1603. },
  1604. "required": false
  1605. },
  1606. {
  1607. "name": "query",
  1608. "in": "query",
  1609. "schema": {
  1610. "type": "string"
  1611. },
  1612. "required": true
  1613. }
  1614. ],
  1615. "responses": {
  1616. "200": {
  1617. "description": "Symbols",
  1618. "content": {
  1619. "application/json": {
  1620. "schema": {
  1621. "type": "array",
  1622. "items": {
  1623. "$ref": "#/components/schemas/Symbol"
  1624. },
  1625. "description": "Symbols"
  1626. }
  1627. }
  1628. }
  1629. }
  1630. },
  1631. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1632. "summary": "Find symbols",
  1633. "x-codeSamples": [
  1634. {
  1635. "lang": "js",
  1636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1637. }
  1638. ]
  1639. }
  1640. },
  1641. "/file": {
  1642. "get": {
  1643. "tags": ["file"],
  1644. "operationId": "file.list",
  1645. "parameters": [
  1646. {
  1647. "name": "directory",
  1648. "in": "query",
  1649. "schema": {
  1650. "type": "string"
  1651. },
  1652. "required": false
  1653. },
  1654. {
  1655. "name": "workspace",
  1656. "in": "query",
  1657. "schema": {
  1658. "type": "string"
  1659. },
  1660. "required": false
  1661. },
  1662. {
  1663. "name": "path",
  1664. "in": "query",
  1665. "schema": {
  1666. "type": "string"
  1667. },
  1668. "required": true
  1669. }
  1670. ],
  1671. "responses": {
  1672. "200": {
  1673. "description": "Files and directories",
  1674. "content": {
  1675. "application/json": {
  1676. "schema": {
  1677. "type": "array",
  1678. "items": {
  1679. "$ref": "#/components/schemas/FileNode"
  1680. },
  1681. "description": "Files and directories"
  1682. }
  1683. }
  1684. }
  1685. }
  1686. },
  1687. "description": "List files and directories in a specified path.",
  1688. "summary": "List files",
  1689. "x-codeSamples": [
  1690. {
  1691. "lang": "js",
  1692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1693. }
  1694. ]
  1695. }
  1696. },
  1697. "/file/content": {
  1698. "get": {
  1699. "tags": ["file"],
  1700. "operationId": "file.read",
  1701. "parameters": [
  1702. {
  1703. "name": "directory",
  1704. "in": "query",
  1705. "schema": {
  1706. "type": "string"
  1707. },
  1708. "required": false
  1709. },
  1710. {
  1711. "name": "workspace",
  1712. "in": "query",
  1713. "schema": {
  1714. "type": "string"
  1715. },
  1716. "required": false
  1717. },
  1718. {
  1719. "name": "path",
  1720. "in": "query",
  1721. "schema": {
  1722. "type": "string"
  1723. },
  1724. "required": true
  1725. }
  1726. ],
  1727. "responses": {
  1728. "200": {
  1729. "description": "File content",
  1730. "content": {
  1731. "application/json": {
  1732. "schema": {
  1733. "$ref": "#/components/schemas/FileContent"
  1734. }
  1735. }
  1736. }
  1737. }
  1738. },
  1739. "description": "Read the content of a specified file.",
  1740. "summary": "Read file",
  1741. "x-codeSamples": [
  1742. {
  1743. "lang": "js",
  1744. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1745. }
  1746. ]
  1747. }
  1748. },
  1749. "/file/status": {
  1750. "get": {
  1751. "tags": ["file"],
  1752. "operationId": "file.status",
  1753. "parameters": [
  1754. {
  1755. "name": "directory",
  1756. "in": "query",
  1757. "schema": {
  1758. "type": "string"
  1759. },
  1760. "required": false
  1761. },
  1762. {
  1763. "name": "workspace",
  1764. "in": "query",
  1765. "schema": {
  1766. "type": "string"
  1767. },
  1768. "required": false
  1769. }
  1770. ],
  1771. "responses": {
  1772. "200": {
  1773. "description": "File status",
  1774. "content": {
  1775. "application/json": {
  1776. "schema": {
  1777. "type": "array",
  1778. "items": {
  1779. "$ref": "#/components/schemas/File"
  1780. },
  1781. "description": "File status"
  1782. }
  1783. }
  1784. }
  1785. }
  1786. },
  1787. "description": "Get the git status of all files in the project.",
  1788. "summary": "Get file status",
  1789. "x-codeSamples": [
  1790. {
  1791. "lang": "js",
  1792. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1793. }
  1794. ]
  1795. }
  1796. },
  1797. "/instance/dispose": {
  1798. "post": {
  1799. "tags": ["instance"],
  1800. "operationId": "instance.dispose",
  1801. "parameters": [
  1802. {
  1803. "name": "directory",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "workspace",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": false
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Instance disposed",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "boolean",
  1826. "description": "Instance disposed"
  1827. }
  1828. }
  1829. }
  1830. }
  1831. },
  1832. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1833. "summary": "Dispose instance",
  1834. "x-codeSamples": [
  1835. {
  1836. "lang": "js",
  1837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1838. }
  1839. ]
  1840. }
  1841. },
  1842. "/path": {
  1843. "get": {
  1844. "tags": ["instance"],
  1845. "operationId": "path.get",
  1846. "parameters": [
  1847. {
  1848. "name": "directory",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": false
  1854. },
  1855. {
  1856. "name": "workspace",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string"
  1860. },
  1861. "required": false
  1862. }
  1863. ],
  1864. "responses": {
  1865. "200": {
  1866. "description": "Path",
  1867. "content": {
  1868. "application/json": {
  1869. "schema": {
  1870. "$ref": "#/components/schemas/Path"
  1871. }
  1872. }
  1873. }
  1874. }
  1875. },
  1876. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1877. "summary": "Get paths",
  1878. "x-codeSamples": [
  1879. {
  1880. "lang": "js",
  1881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1882. }
  1883. ]
  1884. }
  1885. },
  1886. "/vcs": {
  1887. "get": {
  1888. "tags": ["instance"],
  1889. "operationId": "vcs.get",
  1890. "parameters": [
  1891. {
  1892. "name": "directory",
  1893. "in": "query",
  1894. "schema": {
  1895. "type": "string"
  1896. },
  1897. "required": false
  1898. },
  1899. {
  1900. "name": "workspace",
  1901. "in": "query",
  1902. "schema": {
  1903. "type": "string"
  1904. },
  1905. "required": false
  1906. }
  1907. ],
  1908. "responses": {
  1909. "200": {
  1910. "description": "VCS info",
  1911. "content": {
  1912. "application/json": {
  1913. "schema": {
  1914. "$ref": "#/components/schemas/VcsInfo"
  1915. }
  1916. }
  1917. }
  1918. }
  1919. },
  1920. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1921. "summary": "Get VCS info",
  1922. "x-codeSamples": [
  1923. {
  1924. "lang": "js",
  1925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1926. }
  1927. ]
  1928. }
  1929. },
  1930. "/vcs/status": {
  1931. "get": {
  1932. "tags": ["instance"],
  1933. "operationId": "vcs.status",
  1934. "parameters": [
  1935. {
  1936. "name": "directory",
  1937. "in": "query",
  1938. "schema": {
  1939. "type": "string"
  1940. },
  1941. "required": false
  1942. },
  1943. {
  1944. "name": "workspace",
  1945. "in": "query",
  1946. "schema": {
  1947. "type": "string"
  1948. },
  1949. "required": false
  1950. }
  1951. ],
  1952. "responses": {
  1953. "200": {
  1954. "description": "VCS status",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "type": "array",
  1959. "items": {
  1960. "$ref": "#/components/schemas/VcsFileStatus"
  1961. },
  1962. "description": "VCS status"
  1963. }
  1964. }
  1965. }
  1966. }
  1967. },
  1968. "description": "Retrieve changed files in the current working tree without patches.",
  1969. "summary": "Get VCS status",
  1970. "x-codeSamples": [
  1971. {
  1972. "lang": "js",
  1973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1974. }
  1975. ]
  1976. }
  1977. },
  1978. "/vcs/diff": {
  1979. "get": {
  1980. "tags": ["instance"],
  1981. "operationId": "vcs.diff",
  1982. "parameters": [
  1983. {
  1984. "name": "directory",
  1985. "in": "query",
  1986. "schema": {
  1987. "type": "string"
  1988. },
  1989. "required": false
  1990. },
  1991. {
  1992. "name": "workspace",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "mode",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string",
  2004. "enum": ["git", "branch"]
  2005. },
  2006. "required": true
  2007. }
  2008. ],
  2009. "responses": {
  2010. "200": {
  2011. "description": "VCS diff",
  2012. "content": {
  2013. "application/json": {
  2014. "schema": {
  2015. "type": "array",
  2016. "items": {
  2017. "$ref": "#/components/schemas/VcsFileDiff"
  2018. },
  2019. "description": "VCS diff"
  2020. }
  2021. }
  2022. }
  2023. }
  2024. },
  2025. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2026. "summary": "Get VCS diff",
  2027. "x-codeSamples": [
  2028. {
  2029. "lang": "js",
  2030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2031. }
  2032. ]
  2033. }
  2034. },
  2035. "/vcs/diff/raw": {
  2036. "get": {
  2037. "tags": ["instance"],
  2038. "operationId": "vcs.diff.raw",
  2039. "parameters": [
  2040. {
  2041. "name": "directory",
  2042. "in": "query",
  2043. "schema": {
  2044. "type": "string"
  2045. },
  2046. "required": false
  2047. },
  2048. {
  2049. "name": "workspace",
  2050. "in": "query",
  2051. "schema": {
  2052. "type": "string"
  2053. },
  2054. "required": false
  2055. }
  2056. ],
  2057. "responses": {
  2058. "200": {
  2059. "description": "Raw VCS diff",
  2060. "content": {
  2061. "text/x-diff; charset=utf-8": {
  2062. "schema": {
  2063. "type": "string"
  2064. }
  2065. }
  2066. }
  2067. }
  2068. },
  2069. "description": "Retrieve a raw patch for current uncommitted changes.",
  2070. "summary": "Get raw VCS diff",
  2071. "x-codeSamples": [
  2072. {
  2073. "lang": "js",
  2074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2075. }
  2076. ]
  2077. }
  2078. },
  2079. "/vcs/apply": {
  2080. "post": {
  2081. "tags": ["instance"],
  2082. "operationId": "vcs.apply",
  2083. "parameters": [
  2084. {
  2085. "name": "directory",
  2086. "in": "query",
  2087. "schema": {
  2088. "type": "string"
  2089. },
  2090. "required": false
  2091. },
  2092. {
  2093. "name": "workspace",
  2094. "in": "query",
  2095. "schema": {
  2096. "type": "string"
  2097. },
  2098. "required": false
  2099. }
  2100. ],
  2101. "responses": {
  2102. "200": {
  2103. "description": "VCS patch applied",
  2104. "content": {
  2105. "application/json": {
  2106. "schema": {
  2107. "type": "object",
  2108. "properties": {
  2109. "applied": {
  2110. "type": "boolean"
  2111. }
  2112. },
  2113. "required": ["applied"],
  2114. "additionalProperties": false,
  2115. "description": "VCS patch applied"
  2116. }
  2117. }
  2118. }
  2119. },
  2120. "400": {
  2121. "description": "VcsApplyError",
  2122. "content": {
  2123. "application/json": {
  2124. "schema": {
  2125. "$ref": "#/components/schemas/VcsApplyError"
  2126. }
  2127. }
  2128. }
  2129. }
  2130. },
  2131. "description": "Apply a raw patch to the current working tree.",
  2132. "summary": "Apply VCS patch",
  2133. "requestBody": {
  2134. "content": {
  2135. "application/json": {
  2136. "schema": {
  2137. "type": "object",
  2138. "properties": {
  2139. "patch": {
  2140. "type": "string"
  2141. }
  2142. },
  2143. "required": ["patch"],
  2144. "additionalProperties": false
  2145. }
  2146. }
  2147. }
  2148. },
  2149. "x-codeSamples": [
  2150. {
  2151. "lang": "js",
  2152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2153. }
  2154. ]
  2155. }
  2156. },
  2157. "/command": {
  2158. "get": {
  2159. "tags": ["instance"],
  2160. "operationId": "command.list",
  2161. "parameters": [
  2162. {
  2163. "name": "directory",
  2164. "in": "query",
  2165. "schema": {
  2166. "type": "string"
  2167. },
  2168. "required": false
  2169. },
  2170. {
  2171. "name": "workspace",
  2172. "in": "query",
  2173. "schema": {
  2174. "type": "string"
  2175. },
  2176. "required": false
  2177. }
  2178. ],
  2179. "responses": {
  2180. "200": {
  2181. "description": "List of commands",
  2182. "content": {
  2183. "application/json": {
  2184. "schema": {
  2185. "type": "array",
  2186. "items": {
  2187. "$ref": "#/components/schemas/Command"
  2188. },
  2189. "description": "List of commands"
  2190. }
  2191. }
  2192. }
  2193. }
  2194. },
  2195. "description": "Get a list of all available commands in the OpenCode system.",
  2196. "summary": "List commands",
  2197. "x-codeSamples": [
  2198. {
  2199. "lang": "js",
  2200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2201. }
  2202. ]
  2203. }
  2204. },
  2205. "/agent": {
  2206. "get": {
  2207. "tags": ["instance"],
  2208. "operationId": "app.agents",
  2209. "parameters": [
  2210. {
  2211. "name": "directory",
  2212. "in": "query",
  2213. "schema": {
  2214. "type": "string"
  2215. },
  2216. "required": false
  2217. },
  2218. {
  2219. "name": "workspace",
  2220. "in": "query",
  2221. "schema": {
  2222. "type": "string"
  2223. },
  2224. "required": false
  2225. }
  2226. ],
  2227. "responses": {
  2228. "200": {
  2229. "description": "List of agents",
  2230. "content": {
  2231. "application/json": {
  2232. "schema": {
  2233. "type": "array",
  2234. "items": {
  2235. "$ref": "#/components/schemas/Agent"
  2236. },
  2237. "description": "List of agents"
  2238. }
  2239. }
  2240. }
  2241. }
  2242. },
  2243. "description": "Get a list of all available AI agents in the OpenCode system.",
  2244. "summary": "List agents",
  2245. "x-codeSamples": [
  2246. {
  2247. "lang": "js",
  2248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2249. }
  2250. ]
  2251. }
  2252. },
  2253. "/skill": {
  2254. "get": {
  2255. "tags": ["instance"],
  2256. "operationId": "app.skills",
  2257. "parameters": [
  2258. {
  2259. "name": "directory",
  2260. "in": "query",
  2261. "schema": {
  2262. "type": "string"
  2263. },
  2264. "required": false
  2265. },
  2266. {
  2267. "name": "workspace",
  2268. "in": "query",
  2269. "schema": {
  2270. "type": "string"
  2271. },
  2272. "required": false
  2273. }
  2274. ],
  2275. "responses": {
  2276. "200": {
  2277. "description": "List of skills",
  2278. "content": {
  2279. "application/json": {
  2280. "schema": {
  2281. "type": "array",
  2282. "items": {
  2283. "type": "object",
  2284. "properties": {
  2285. "name": {
  2286. "type": "string"
  2287. },
  2288. "description": {
  2289. "type": "string"
  2290. },
  2291. "location": {
  2292. "type": "string"
  2293. },
  2294. "content": {
  2295. "type": "string"
  2296. }
  2297. },
  2298. "required": ["name", "location", "content"],
  2299. "additionalProperties": false
  2300. },
  2301. "description": "List of skills"
  2302. }
  2303. }
  2304. }
  2305. }
  2306. },
  2307. "description": "Get a list of all available skills in the OpenCode system.",
  2308. "summary": "List skills",
  2309. "x-codeSamples": [
  2310. {
  2311. "lang": "js",
  2312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2313. }
  2314. ]
  2315. }
  2316. },
  2317. "/lsp": {
  2318. "get": {
  2319. "tags": ["instance"],
  2320. "operationId": "lsp.status",
  2321. "parameters": [
  2322. {
  2323. "name": "directory",
  2324. "in": "query",
  2325. "schema": {
  2326. "type": "string"
  2327. },
  2328. "required": false
  2329. },
  2330. {
  2331. "name": "workspace",
  2332. "in": "query",
  2333. "schema": {
  2334. "type": "string"
  2335. },
  2336. "required": false
  2337. }
  2338. ],
  2339. "responses": {
  2340. "200": {
  2341. "description": "LSP server status",
  2342. "content": {
  2343. "application/json": {
  2344. "schema": {
  2345. "type": "array",
  2346. "items": {
  2347. "$ref": "#/components/schemas/LSPStatus"
  2348. },
  2349. "description": "LSP server status"
  2350. }
  2351. }
  2352. }
  2353. }
  2354. },
  2355. "description": "Get LSP server status",
  2356. "summary": "Get LSP status",
  2357. "x-codeSamples": [
  2358. {
  2359. "lang": "js",
  2360. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2361. }
  2362. ]
  2363. }
  2364. },
  2365. "/formatter": {
  2366. "get": {
  2367. "tags": ["instance"],
  2368. "operationId": "formatter.status",
  2369. "parameters": [
  2370. {
  2371. "name": "directory",
  2372. "in": "query",
  2373. "schema": {
  2374. "type": "string"
  2375. },
  2376. "required": false
  2377. },
  2378. {
  2379. "name": "workspace",
  2380. "in": "query",
  2381. "schema": {
  2382. "type": "string"
  2383. },
  2384. "required": false
  2385. }
  2386. ],
  2387. "responses": {
  2388. "200": {
  2389. "description": "Formatter status",
  2390. "content": {
  2391. "application/json": {
  2392. "schema": {
  2393. "type": "array",
  2394. "items": {
  2395. "$ref": "#/components/schemas/FormatterStatus"
  2396. },
  2397. "description": "Formatter status"
  2398. }
  2399. }
  2400. }
  2401. }
  2402. },
  2403. "description": "Get formatter status",
  2404. "summary": "Get formatter status",
  2405. "x-codeSamples": [
  2406. {
  2407. "lang": "js",
  2408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2409. }
  2410. ]
  2411. }
  2412. },
  2413. "/mcp": {
  2414. "get": {
  2415. "tags": ["mcp"],
  2416. "operationId": "mcp.status",
  2417. "parameters": [
  2418. {
  2419. "name": "directory",
  2420. "in": "query",
  2421. "schema": {
  2422. "type": "string"
  2423. },
  2424. "required": false
  2425. },
  2426. {
  2427. "name": "workspace",
  2428. "in": "query",
  2429. "schema": {
  2430. "type": "string"
  2431. },
  2432. "required": false
  2433. }
  2434. ],
  2435. "responses": {
  2436. "200": {
  2437. "description": "MCP server status",
  2438. "content": {
  2439. "application/json": {
  2440. "schema": {
  2441. "type": "object",
  2442. "additionalProperties": {
  2443. "$ref": "#/components/schemas/MCPStatus"
  2444. },
  2445. "description": "MCP server status"
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2452. "summary": "Get MCP status",
  2453. "x-codeSamples": [
  2454. {
  2455. "lang": "js",
  2456. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2457. }
  2458. ]
  2459. },
  2460. "post": {
  2461. "tags": ["mcp"],
  2462. "operationId": "mcp.add",
  2463. "parameters": [
  2464. {
  2465. "name": "directory",
  2466. "in": "query",
  2467. "schema": {
  2468. "type": "string"
  2469. },
  2470. "required": false
  2471. },
  2472. {
  2473. "name": "workspace",
  2474. "in": "query",
  2475. "schema": {
  2476. "type": "string"
  2477. },
  2478. "required": false
  2479. }
  2480. ],
  2481. "responses": {
  2482. "200": {
  2483. "description": "MCP server added successfully",
  2484. "content": {
  2485. "application/json": {
  2486. "schema": {
  2487. "type": "object",
  2488. "additionalProperties": {
  2489. "$ref": "#/components/schemas/MCPStatus"
  2490. },
  2491. "description": "MCP server added successfully"
  2492. }
  2493. }
  2494. }
  2495. },
  2496. "400": {
  2497. "description": "Bad request",
  2498. "content": {
  2499. "application/json": {
  2500. "schema": {
  2501. "$ref": "#/components/schemas/BadRequestError"
  2502. }
  2503. }
  2504. }
  2505. }
  2506. },
  2507. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2508. "summary": "Add MCP server",
  2509. "requestBody": {
  2510. "content": {
  2511. "application/json": {
  2512. "schema": {
  2513. "type": "object",
  2514. "properties": {
  2515. "name": {
  2516. "type": "string"
  2517. },
  2518. "config": {
  2519. "anyOf": [
  2520. {
  2521. "$ref": "#/components/schemas/McpLocalConfig"
  2522. },
  2523. {
  2524. "$ref": "#/components/schemas/McpRemoteConfig"
  2525. }
  2526. ]
  2527. }
  2528. },
  2529. "required": ["name", "config"],
  2530. "additionalProperties": false
  2531. }
  2532. }
  2533. }
  2534. },
  2535. "x-codeSamples": [
  2536. {
  2537. "lang": "js",
  2538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2539. }
  2540. ]
  2541. }
  2542. },
  2543. "/mcp/{name}/auth": {
  2544. "post": {
  2545. "tags": ["mcp"],
  2546. "operationId": "mcp.auth.start",
  2547. "parameters": [
  2548. {
  2549. "name": "name",
  2550. "in": "path",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": true
  2555. },
  2556. {
  2557. "name": "directory",
  2558. "in": "query",
  2559. "schema": {
  2560. "type": "string"
  2561. },
  2562. "required": false
  2563. },
  2564. {
  2565. "name": "workspace",
  2566. "in": "query",
  2567. "schema": {
  2568. "type": "string"
  2569. },
  2570. "required": false
  2571. }
  2572. ],
  2573. "responses": {
  2574. "200": {
  2575. "description": "OAuth flow started",
  2576. "content": {
  2577. "application/json": {
  2578. "schema": {
  2579. "type": "object",
  2580. "properties": {
  2581. "authorizationUrl": {
  2582. "type": "string"
  2583. },
  2584. "oauthState": {
  2585. "type": "string"
  2586. }
  2587. },
  2588. "required": ["authorizationUrl", "oauthState"],
  2589. "additionalProperties": false,
  2590. "description": "OAuth flow started"
  2591. }
  2592. }
  2593. }
  2594. },
  2595. "400": {
  2596. "description": "McpUnsupportedOAuthError",
  2597. "content": {
  2598. "application/json": {
  2599. "schema": {
  2600. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2601. }
  2602. }
  2603. }
  2604. },
  2605. "404": {
  2606. "description": "Not found",
  2607. "content": {
  2608. "application/json": {
  2609. "schema": {
  2610. "$ref": "#/components/schemas/NotFoundError"
  2611. }
  2612. }
  2613. }
  2614. }
  2615. },
  2616. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2617. "summary": "Start MCP OAuth",
  2618. "x-codeSamples": [
  2619. {
  2620. "lang": "js",
  2621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2622. }
  2623. ]
  2624. },
  2625. "delete": {
  2626. "tags": ["mcp"],
  2627. "operationId": "mcp.auth.remove",
  2628. "parameters": [
  2629. {
  2630. "name": "name",
  2631. "in": "path",
  2632. "schema": {
  2633. "type": "string"
  2634. },
  2635. "required": true
  2636. },
  2637. {
  2638. "name": "directory",
  2639. "in": "query",
  2640. "schema": {
  2641. "type": "string"
  2642. },
  2643. "required": false
  2644. },
  2645. {
  2646. "name": "workspace",
  2647. "in": "query",
  2648. "schema": {
  2649. "type": "string"
  2650. },
  2651. "required": false
  2652. }
  2653. ],
  2654. "responses": {
  2655. "200": {
  2656. "description": "OAuth credentials removed",
  2657. "content": {
  2658. "application/json": {
  2659. "schema": {
  2660. "type": "object",
  2661. "properties": {
  2662. "success": {
  2663. "type": "boolean",
  2664. "enum": [true]
  2665. }
  2666. },
  2667. "required": ["success"],
  2668. "additionalProperties": false,
  2669. "description": "OAuth credentials removed"
  2670. }
  2671. }
  2672. }
  2673. },
  2674. "404": {
  2675. "description": "Not found",
  2676. "content": {
  2677. "application/json": {
  2678. "schema": {
  2679. "$ref": "#/components/schemas/NotFoundError"
  2680. }
  2681. }
  2682. }
  2683. }
  2684. },
  2685. "description": "Remove OAuth credentials for an MCP server.",
  2686. "summary": "Remove MCP OAuth",
  2687. "x-codeSamples": [
  2688. {
  2689. "lang": "js",
  2690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2691. }
  2692. ]
  2693. }
  2694. },
  2695. "/mcp/{name}/auth/callback": {
  2696. "post": {
  2697. "tags": ["mcp"],
  2698. "operationId": "mcp.auth.callback",
  2699. "parameters": [
  2700. {
  2701. "name": "name",
  2702. "in": "path",
  2703. "schema": {
  2704. "type": "string"
  2705. },
  2706. "required": true
  2707. },
  2708. {
  2709. "name": "directory",
  2710. "in": "query",
  2711. "schema": {
  2712. "type": "string"
  2713. },
  2714. "required": false
  2715. },
  2716. {
  2717. "name": "workspace",
  2718. "in": "query",
  2719. "schema": {
  2720. "type": "string"
  2721. },
  2722. "required": false
  2723. }
  2724. ],
  2725. "responses": {
  2726. "200": {
  2727. "description": "OAuth authentication completed",
  2728. "content": {
  2729. "application/json": {
  2730. "schema": {
  2731. "$ref": "#/components/schemas/MCPStatus"
  2732. }
  2733. }
  2734. }
  2735. },
  2736. "400": {
  2737. "description": "Bad request",
  2738. "content": {
  2739. "application/json": {
  2740. "schema": {
  2741. "$ref": "#/components/schemas/BadRequestError"
  2742. }
  2743. }
  2744. }
  2745. },
  2746. "404": {
  2747. "description": "Not found",
  2748. "content": {
  2749. "application/json": {
  2750. "schema": {
  2751. "$ref": "#/components/schemas/NotFoundError"
  2752. }
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2758. "summary": "Complete MCP OAuth",
  2759. "requestBody": {
  2760. "content": {
  2761. "application/json": {
  2762. "schema": {
  2763. "type": "object",
  2764. "properties": {
  2765. "code": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["code"],
  2770. "additionalProperties": false
  2771. }
  2772. }
  2773. }
  2774. },
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp/{name}/auth/authenticate": {
  2784. "post": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.auth.authenticate",
  2787. "parameters": [
  2788. {
  2789. "name": "name",
  2790. "in": "path",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": true
  2795. },
  2796. {
  2797. "name": "directory",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. },
  2804. {
  2805. "name": "workspace",
  2806. "in": "query",
  2807. "schema": {
  2808. "type": "string"
  2809. },
  2810. "required": false
  2811. }
  2812. ],
  2813. "responses": {
  2814. "200": {
  2815. "description": "OAuth authentication completed",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "$ref": "#/components/schemas/MCPStatus"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "400": {
  2825. "description": "McpUnsupportedOAuthError",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2830. }
  2831. }
  2832. }
  2833. },
  2834. "404": {
  2835. "description": "Not found",
  2836. "content": {
  2837. "application/json": {
  2838. "schema": {
  2839. "$ref": "#/components/schemas/NotFoundError"
  2840. }
  2841. }
  2842. }
  2843. }
  2844. },
  2845. "description": "Start OAuth flow and wait for callback (opens browser).",
  2846. "summary": "Authenticate MCP OAuth",
  2847. "x-codeSamples": [
  2848. {
  2849. "lang": "js",
  2850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2851. }
  2852. ]
  2853. }
  2854. },
  2855. "/mcp/{name}/connect": {
  2856. "post": {
  2857. "tags": ["mcp"],
  2858. "operationId": "mcp.connect",
  2859. "parameters": [
  2860. {
  2861. "name": "name",
  2862. "in": "path",
  2863. "schema": {
  2864. "type": "string"
  2865. },
  2866. "required": true
  2867. },
  2868. {
  2869. "name": "directory",
  2870. "in": "query",
  2871. "schema": {
  2872. "type": "string"
  2873. },
  2874. "required": false
  2875. },
  2876. {
  2877. "name": "workspace",
  2878. "in": "query",
  2879. "schema": {
  2880. "type": "string"
  2881. },
  2882. "required": false
  2883. }
  2884. ],
  2885. "responses": {
  2886. "200": {
  2887. "description": "MCP server connected successfully",
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "boolean",
  2892. "description": "MCP server connected successfully"
  2893. }
  2894. }
  2895. }
  2896. }
  2897. },
  2898. "description": "Connect an MCP server.",
  2899. "x-codeSamples": [
  2900. {
  2901. "lang": "js",
  2902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "/mcp/{name}/disconnect": {
  2908. "post": {
  2909. "tags": ["mcp"],
  2910. "operationId": "mcp.disconnect",
  2911. "parameters": [
  2912. {
  2913. "name": "name",
  2914. "in": "path",
  2915. "schema": {
  2916. "type": "string"
  2917. },
  2918. "required": true
  2919. },
  2920. {
  2921. "name": "directory",
  2922. "in": "query",
  2923. "schema": {
  2924. "type": "string"
  2925. },
  2926. "required": false
  2927. },
  2928. {
  2929. "name": "workspace",
  2930. "in": "query",
  2931. "schema": {
  2932. "type": "string"
  2933. },
  2934. "required": false
  2935. }
  2936. ],
  2937. "responses": {
  2938. "200": {
  2939. "description": "MCP server disconnected successfully",
  2940. "content": {
  2941. "application/json": {
  2942. "schema": {
  2943. "type": "boolean",
  2944. "description": "MCP server disconnected successfully"
  2945. }
  2946. }
  2947. }
  2948. }
  2949. },
  2950. "description": "Disconnect an MCP server.",
  2951. "x-codeSamples": [
  2952. {
  2953. "lang": "js",
  2954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2955. }
  2956. ]
  2957. }
  2958. },
  2959. "/project": {
  2960. "get": {
  2961. "tags": ["project"],
  2962. "operationId": "project.list",
  2963. "parameters": [
  2964. {
  2965. "name": "directory",
  2966. "in": "query",
  2967. "schema": {
  2968. "type": "string"
  2969. },
  2970. "required": false
  2971. },
  2972. {
  2973. "name": "workspace",
  2974. "in": "query",
  2975. "schema": {
  2976. "type": "string"
  2977. },
  2978. "required": false
  2979. }
  2980. ],
  2981. "responses": {
  2982. "200": {
  2983. "description": "List of projects",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "type": "array",
  2988. "items": {
  2989. "$ref": "#/components/schemas/Project"
  2990. },
  2991. "description": "List of projects"
  2992. }
  2993. }
  2994. }
  2995. }
  2996. },
  2997. "description": "Get a list of projects that have been opened with OpenCode.",
  2998. "summary": "List all projects",
  2999. "x-codeSamples": [
  3000. {
  3001. "lang": "js",
  3002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3003. }
  3004. ]
  3005. }
  3006. },
  3007. "/project/current": {
  3008. "get": {
  3009. "tags": ["project"],
  3010. "operationId": "project.current",
  3011. "parameters": [
  3012. {
  3013. "name": "directory",
  3014. "in": "query",
  3015. "schema": {
  3016. "type": "string"
  3017. },
  3018. "required": false
  3019. },
  3020. {
  3021. "name": "workspace",
  3022. "in": "query",
  3023. "schema": {
  3024. "type": "string"
  3025. },
  3026. "required": false
  3027. }
  3028. ],
  3029. "responses": {
  3030. "200": {
  3031. "description": "Current project information",
  3032. "content": {
  3033. "application/json": {
  3034. "schema": {
  3035. "$ref": "#/components/schemas/Project"
  3036. }
  3037. }
  3038. }
  3039. }
  3040. },
  3041. "description": "Retrieve the currently active project that OpenCode is working with.",
  3042. "summary": "Get current project",
  3043. "x-codeSamples": [
  3044. {
  3045. "lang": "js",
  3046. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3047. }
  3048. ]
  3049. }
  3050. },
  3051. "/project/git/init": {
  3052. "post": {
  3053. "tags": ["project"],
  3054. "operationId": "project.initGit",
  3055. "parameters": [
  3056. {
  3057. "name": "directory",
  3058. "in": "query",
  3059. "schema": {
  3060. "type": "string"
  3061. },
  3062. "required": false
  3063. },
  3064. {
  3065. "name": "workspace",
  3066. "in": "query",
  3067. "schema": {
  3068. "type": "string"
  3069. },
  3070. "required": false
  3071. }
  3072. ],
  3073. "responses": {
  3074. "200": {
  3075. "description": "Project information after git initialization",
  3076. "content": {
  3077. "application/json": {
  3078. "schema": {
  3079. "$ref": "#/components/schemas/Project"
  3080. }
  3081. }
  3082. }
  3083. }
  3084. },
  3085. "description": "Create a git repository for the current project and return the refreshed project info.",
  3086. "summary": "Initialize git repository",
  3087. "x-codeSamples": [
  3088. {
  3089. "lang": "js",
  3090. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3091. }
  3092. ]
  3093. }
  3094. },
  3095. "/project/{projectID}": {
  3096. "patch": {
  3097. "tags": ["project"],
  3098. "operationId": "project.update",
  3099. "parameters": [
  3100. {
  3101. "name": "projectID",
  3102. "in": "path",
  3103. "schema": {
  3104. "type": "string"
  3105. },
  3106. "required": true
  3107. },
  3108. {
  3109. "name": "directory",
  3110. "in": "query",
  3111. "schema": {
  3112. "type": "string"
  3113. },
  3114. "required": false
  3115. },
  3116. {
  3117. "name": "workspace",
  3118. "in": "query",
  3119. "schema": {
  3120. "type": "string"
  3121. },
  3122. "required": false
  3123. }
  3124. ],
  3125. "responses": {
  3126. "200": {
  3127. "description": "Updated project information",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/Project"
  3132. }
  3133. }
  3134. }
  3135. },
  3136. "400": {
  3137. "description": "Bad request",
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "$ref": "#/components/schemas/BadRequestError"
  3142. }
  3143. }
  3144. }
  3145. },
  3146. "404": {
  3147. "description": "Not found",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "$ref": "#/components/schemas/NotFoundError"
  3152. }
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "description": "Update project properties such as name, icon, and commands.",
  3158. "summary": "Update project",
  3159. "requestBody": {
  3160. "content": {
  3161. "application/json": {
  3162. "schema": {
  3163. "type": "object",
  3164. "properties": {
  3165. "name": {
  3166. "type": "string"
  3167. },
  3168. "icon": {
  3169. "type": "object",
  3170. "properties": {
  3171. "url": {
  3172. "type": "string"
  3173. },
  3174. "override": {
  3175. "type": "string"
  3176. },
  3177. "color": {
  3178. "type": "string"
  3179. }
  3180. },
  3181. "additionalProperties": false
  3182. },
  3183. "commands": {
  3184. "type": "object",
  3185. "properties": {
  3186. "start": {
  3187. "type": "string",
  3188. "description": "Startup script to run when creating a new workspace (worktree)"
  3189. }
  3190. },
  3191. "additionalProperties": false
  3192. }
  3193. },
  3194. "additionalProperties": false
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "x-codeSamples": [
  3200. {
  3201. "lang": "js",
  3202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3203. }
  3204. ]
  3205. }
  3206. },
  3207. "/pty/shells": {
  3208. "get": {
  3209. "tags": ["pty"],
  3210. "operationId": "pty.shells",
  3211. "parameters": [
  3212. {
  3213. "name": "directory",
  3214. "in": "query",
  3215. "schema": {
  3216. "type": "string"
  3217. },
  3218. "required": false
  3219. },
  3220. {
  3221. "name": "workspace",
  3222. "in": "query",
  3223. "schema": {
  3224. "type": "string"
  3225. },
  3226. "required": false
  3227. }
  3228. ],
  3229. "responses": {
  3230. "200": {
  3231. "description": "List of shells",
  3232. "content": {
  3233. "application/json": {
  3234. "schema": {
  3235. "type": "array",
  3236. "items": {
  3237. "type": "object",
  3238. "properties": {
  3239. "path": {
  3240. "type": "string"
  3241. },
  3242. "name": {
  3243. "type": "string"
  3244. },
  3245. "acceptable": {
  3246. "type": "boolean"
  3247. }
  3248. },
  3249. "required": ["path", "name", "acceptable"],
  3250. "additionalProperties": false
  3251. },
  3252. "description": "List of shells"
  3253. }
  3254. }
  3255. }
  3256. }
  3257. },
  3258. "description": "Get a list of available shells on the system.",
  3259. "summary": "List available shells",
  3260. "x-codeSamples": [
  3261. {
  3262. "lang": "js",
  3263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3264. }
  3265. ]
  3266. }
  3267. },
  3268. "/pty": {
  3269. "get": {
  3270. "tags": ["pty"],
  3271. "operationId": "pty.list",
  3272. "parameters": [
  3273. {
  3274. "name": "directory",
  3275. "in": "query",
  3276. "schema": {
  3277. "type": "string"
  3278. },
  3279. "required": false
  3280. },
  3281. {
  3282. "name": "workspace",
  3283. "in": "query",
  3284. "schema": {
  3285. "type": "string"
  3286. },
  3287. "required": false
  3288. }
  3289. ],
  3290. "responses": {
  3291. "200": {
  3292. "description": "List of sessions",
  3293. "content": {
  3294. "application/json": {
  3295. "schema": {
  3296. "type": "array",
  3297. "items": {
  3298. "$ref": "#/components/schemas/Pty"
  3299. },
  3300. "description": "List of sessions"
  3301. }
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3307. "summary": "List PTY sessions",
  3308. "x-codeSamples": [
  3309. {
  3310. "lang": "js",
  3311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3312. }
  3313. ]
  3314. },
  3315. "post": {
  3316. "tags": ["pty"],
  3317. "operationId": "pty.create",
  3318. "parameters": [
  3319. {
  3320. "name": "directory",
  3321. "in": "query",
  3322. "schema": {
  3323. "type": "string"
  3324. },
  3325. "required": false
  3326. },
  3327. {
  3328. "name": "workspace",
  3329. "in": "query",
  3330. "schema": {
  3331. "type": "string"
  3332. },
  3333. "required": false
  3334. }
  3335. ],
  3336. "responses": {
  3337. "200": {
  3338. "description": "Created session",
  3339. "content": {
  3340. "application/json": {
  3341. "schema": {
  3342. "$ref": "#/components/schemas/Pty"
  3343. }
  3344. }
  3345. }
  3346. },
  3347. "400": {
  3348. "description": "Bad request",
  3349. "content": {
  3350. "application/json": {
  3351. "schema": {
  3352. "$ref": "#/components/schemas/BadRequestError"
  3353. }
  3354. }
  3355. }
  3356. }
  3357. },
  3358. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3359. "summary": "Create PTY session",
  3360. "requestBody": {
  3361. "content": {
  3362. "application/json": {
  3363. "schema": {
  3364. "type": "object",
  3365. "properties": {
  3366. "command": {
  3367. "type": "string"
  3368. },
  3369. "args": {
  3370. "type": "array",
  3371. "items": {
  3372. "type": "string"
  3373. }
  3374. },
  3375. "cwd": {
  3376. "type": "string"
  3377. },
  3378. "title": {
  3379. "type": "string"
  3380. },
  3381. "env": {
  3382. "type": "object",
  3383. "additionalProperties": {
  3384. "type": "string"
  3385. }
  3386. }
  3387. },
  3388. "additionalProperties": false
  3389. }
  3390. }
  3391. }
  3392. },
  3393. "x-codeSamples": [
  3394. {
  3395. "lang": "js",
  3396. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3397. }
  3398. ]
  3399. }
  3400. },
  3401. "/pty/{ptyID}": {
  3402. "get": {
  3403. "tags": ["pty"],
  3404. "operationId": "pty.get",
  3405. "parameters": [
  3406. {
  3407. "name": "ptyID",
  3408. "in": "path",
  3409. "schema": {
  3410. "type": "string",
  3411. "pattern": "^pty"
  3412. },
  3413. "required": true
  3414. },
  3415. {
  3416. "name": "directory",
  3417. "in": "query",
  3418. "schema": {
  3419. "type": "string"
  3420. },
  3421. "required": false
  3422. },
  3423. {
  3424. "name": "workspace",
  3425. "in": "query",
  3426. "schema": {
  3427. "type": "string"
  3428. },
  3429. "required": false
  3430. }
  3431. ],
  3432. "responses": {
  3433. "200": {
  3434. "description": "Session info",
  3435. "content": {
  3436. "application/json": {
  3437. "schema": {
  3438. "$ref": "#/components/schemas/Pty"
  3439. }
  3440. }
  3441. }
  3442. },
  3443. "404": {
  3444. "description": "NotFoundError",
  3445. "content": {
  3446. "application/json": {
  3447. "schema": {
  3448. "$ref": "#/components/schemas/NotFoundError"
  3449. }
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3455. "summary": "Get PTY session",
  3456. "x-codeSamples": [
  3457. {
  3458. "lang": "js",
  3459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3460. }
  3461. ]
  3462. },
  3463. "put": {
  3464. "tags": ["pty"],
  3465. "operationId": "pty.update",
  3466. "parameters": [
  3467. {
  3468. "name": "ptyID",
  3469. "in": "path",
  3470. "schema": {
  3471. "type": "string",
  3472. "pattern": "^pty"
  3473. },
  3474. "required": true
  3475. },
  3476. {
  3477. "name": "directory",
  3478. "in": "query",
  3479. "schema": {
  3480. "type": "string"
  3481. },
  3482. "required": false
  3483. },
  3484. {
  3485. "name": "workspace",
  3486. "in": "query",
  3487. "schema": {
  3488. "type": "string"
  3489. },
  3490. "required": false
  3491. }
  3492. ],
  3493. "responses": {
  3494. "200": {
  3495. "description": "Updated session",
  3496. "content": {
  3497. "application/json": {
  3498. "schema": {
  3499. "$ref": "#/components/schemas/Pty"
  3500. }
  3501. }
  3502. }
  3503. },
  3504. "400": {
  3505. "description": "Bad request",
  3506. "content": {
  3507. "application/json": {
  3508. "schema": {
  3509. "$ref": "#/components/schemas/BadRequestError"
  3510. }
  3511. }
  3512. }
  3513. }
  3514. },
  3515. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3516. "summary": "Update PTY session",
  3517. "requestBody": {
  3518. "content": {
  3519. "application/json": {
  3520. "schema": {
  3521. "type": "object",
  3522. "properties": {
  3523. "title": {
  3524. "type": "string"
  3525. },
  3526. "size": {
  3527. "type": "object",
  3528. "properties": {
  3529. "rows": {
  3530. "type": "integer",
  3531. "exclusiveMinimum": 0
  3532. },
  3533. "cols": {
  3534. "type": "integer",
  3535. "exclusiveMinimum": 0
  3536. }
  3537. },
  3538. "required": ["rows", "cols"],
  3539. "additionalProperties": false
  3540. }
  3541. },
  3542. "additionalProperties": false
  3543. }
  3544. }
  3545. }
  3546. },
  3547. "x-codeSamples": [
  3548. {
  3549. "lang": "js",
  3550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3551. }
  3552. ]
  3553. },
  3554. "delete": {
  3555. "tags": ["pty"],
  3556. "operationId": "pty.remove",
  3557. "parameters": [
  3558. {
  3559. "name": "ptyID",
  3560. "in": "path",
  3561. "schema": {
  3562. "type": "string",
  3563. "pattern": "^pty"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Session removed",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "type": "boolean",
  3591. "description": "Session removed"
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "404": {
  3597. "description": "NotFoundError",
  3598. "content": {
  3599. "application/json": {
  3600. "schema": {
  3601. "$ref": "#/components/schemas/NotFoundError"
  3602. }
  3603. }
  3604. }
  3605. }
  3606. },
  3607. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3608. "summary": "Remove PTY session",
  3609. "x-codeSamples": [
  3610. {
  3611. "lang": "js",
  3612. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3613. }
  3614. ]
  3615. }
  3616. },
  3617. "/pty/{ptyID}/connect-token": {
  3618. "post": {
  3619. "tags": ["pty"],
  3620. "operationId": "pty.connectToken",
  3621. "parameters": [
  3622. {
  3623. "name": "ptyID",
  3624. "in": "path",
  3625. "schema": {
  3626. "type": "string",
  3627. "pattern": "^pty"
  3628. },
  3629. "required": true
  3630. },
  3631. {
  3632. "name": "directory",
  3633. "in": "query",
  3634. "schema": {
  3635. "type": "string"
  3636. },
  3637. "required": false
  3638. },
  3639. {
  3640. "name": "workspace",
  3641. "in": "query",
  3642. "schema": {
  3643. "type": "string"
  3644. },
  3645. "required": false
  3646. }
  3647. ],
  3648. "responses": {
  3649. "200": {
  3650. "description": "WebSocket connect token",
  3651. "content": {
  3652. "application/json": {
  3653. "schema": {
  3654. "type": "object",
  3655. "properties": {
  3656. "ticket": {
  3657. "type": "string"
  3658. },
  3659. "expires_in": {
  3660. "type": "integer",
  3661. "exclusiveMinimum": 0
  3662. }
  3663. },
  3664. "required": ["ticket", "expires_in"],
  3665. "additionalProperties": false,
  3666. "description": "WebSocket connect token"
  3667. }
  3668. }
  3669. }
  3670. },
  3671. "403": {
  3672. "description": "Forbidden",
  3673. "content": {
  3674. "application/json": {
  3675. "schema": {
  3676. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3677. }
  3678. }
  3679. }
  3680. },
  3681. "404": {
  3682. "description": "NotFoundError",
  3683. "content": {
  3684. "application/json": {
  3685. "schema": {
  3686. "$ref": "#/components/schemas/NotFoundError"
  3687. }
  3688. }
  3689. }
  3690. }
  3691. },
  3692. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3693. "summary": "Create PTY WebSocket token",
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/question": {
  3703. "get": {
  3704. "tags": ["question"],
  3705. "operationId": "question.list",
  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 pending questions",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "$ref": "#/components/schemas/QuestionRequest"
  3733. },
  3734. "description": "List of pending questions"
  3735. }
  3736. }
  3737. }
  3738. }
  3739. },
  3740. "description": "Get all pending question requests across all sessions.",
  3741. "summary": "List pending questions",
  3742. "x-codeSamples": [
  3743. {
  3744. "lang": "js",
  3745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3746. }
  3747. ]
  3748. }
  3749. },
  3750. "/question/{requestID}/reply": {
  3751. "post": {
  3752. "tags": ["question"],
  3753. "operationId": "question.reply",
  3754. "parameters": [
  3755. {
  3756. "name": "requestID",
  3757. "in": "path",
  3758. "schema": {
  3759. "type": "string",
  3760. "pattern": "^que"
  3761. },
  3762. "required": true
  3763. },
  3764. {
  3765. "name": "directory",
  3766. "in": "query",
  3767. "schema": {
  3768. "type": "string"
  3769. },
  3770. "required": false
  3771. },
  3772. {
  3773. "name": "workspace",
  3774. "in": "query",
  3775. "schema": {
  3776. "type": "string"
  3777. },
  3778. "required": false
  3779. }
  3780. ],
  3781. "responses": {
  3782. "200": {
  3783. "description": "Question answered successfully",
  3784. "content": {
  3785. "application/json": {
  3786. "schema": {
  3787. "type": "boolean",
  3788. "description": "Question answered successfully"
  3789. }
  3790. }
  3791. }
  3792. },
  3793. "400": {
  3794. "description": "Bad request",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/BadRequestError"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "404": {
  3804. "description": "Not found",
  3805. "content": {
  3806. "application/json": {
  3807. "schema": {
  3808. "$ref": "#/components/schemas/NotFoundError"
  3809. }
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "description": "Provide answers to a question request from the AI assistant.",
  3815. "summary": "Reply to question request",
  3816. "requestBody": {
  3817. "content": {
  3818. "application/json": {
  3819. "schema": {
  3820. "type": "object",
  3821. "properties": {
  3822. "answers": {
  3823. "type": "array",
  3824. "items": {
  3825. "$ref": "#/components/schemas/QuestionAnswer"
  3826. },
  3827. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3828. }
  3829. },
  3830. "required": ["answers"],
  3831. "additionalProperties": false
  3832. }
  3833. }
  3834. }
  3835. },
  3836. "x-codeSamples": [
  3837. {
  3838. "lang": "js",
  3839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3840. }
  3841. ]
  3842. }
  3843. },
  3844. "/question/{requestID}/reject": {
  3845. "post": {
  3846. "tags": ["question"],
  3847. "operationId": "question.reject",
  3848. "parameters": [
  3849. {
  3850. "name": "requestID",
  3851. "in": "path",
  3852. "schema": {
  3853. "type": "string",
  3854. "pattern": "^que"
  3855. },
  3856. "required": true
  3857. },
  3858. {
  3859. "name": "directory",
  3860. "in": "query",
  3861. "schema": {
  3862. "type": "string"
  3863. },
  3864. "required": false
  3865. },
  3866. {
  3867. "name": "workspace",
  3868. "in": "query",
  3869. "schema": {
  3870. "type": "string"
  3871. },
  3872. "required": false
  3873. }
  3874. ],
  3875. "responses": {
  3876. "200": {
  3877. "description": "Question rejected successfully",
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "boolean",
  3882. "description": "Question rejected successfully"
  3883. }
  3884. }
  3885. }
  3886. },
  3887. "400": {
  3888. "description": "Bad request",
  3889. "content": {
  3890. "application/json": {
  3891. "schema": {
  3892. "$ref": "#/components/schemas/BadRequestError"
  3893. }
  3894. }
  3895. }
  3896. },
  3897. "404": {
  3898. "description": "Not found",
  3899. "content": {
  3900. "application/json": {
  3901. "schema": {
  3902. "$ref": "#/components/schemas/NotFoundError"
  3903. }
  3904. }
  3905. }
  3906. }
  3907. },
  3908. "description": "Reject a question request from the AI assistant.",
  3909. "summary": "Reject question request",
  3910. "x-codeSamples": [
  3911. {
  3912. "lang": "js",
  3913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3914. }
  3915. ]
  3916. }
  3917. },
  3918. "/permission": {
  3919. "get": {
  3920. "tags": ["permission"],
  3921. "operationId": "permission.list",
  3922. "parameters": [
  3923. {
  3924. "name": "directory",
  3925. "in": "query",
  3926. "schema": {
  3927. "type": "string"
  3928. },
  3929. "required": false
  3930. },
  3931. {
  3932. "name": "workspace",
  3933. "in": "query",
  3934. "schema": {
  3935. "type": "string"
  3936. },
  3937. "required": false
  3938. }
  3939. ],
  3940. "responses": {
  3941. "200": {
  3942. "description": "List of pending permissions",
  3943. "content": {
  3944. "application/json": {
  3945. "schema": {
  3946. "type": "array",
  3947. "items": {
  3948. "$ref": "#/components/schemas/PermissionRequest"
  3949. },
  3950. "description": "List of pending permissions"
  3951. }
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "description": "Get all pending permission requests across all sessions.",
  3957. "summary": "List pending permissions",
  3958. "x-codeSamples": [
  3959. {
  3960. "lang": "js",
  3961. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3962. }
  3963. ]
  3964. }
  3965. },
  3966. "/permission/{requestID}/reply": {
  3967. "post": {
  3968. "tags": ["permission"],
  3969. "operationId": "permission.reply",
  3970. "parameters": [
  3971. {
  3972. "name": "requestID",
  3973. "in": "path",
  3974. "schema": {
  3975. "type": "string",
  3976. "pattern": "^per"
  3977. },
  3978. "required": true
  3979. },
  3980. {
  3981. "name": "directory",
  3982. "in": "query",
  3983. "schema": {
  3984. "type": "string"
  3985. },
  3986. "required": false
  3987. },
  3988. {
  3989. "name": "workspace",
  3990. "in": "query",
  3991. "schema": {
  3992. "type": "string"
  3993. },
  3994. "required": false
  3995. }
  3996. ],
  3997. "responses": {
  3998. "200": {
  3999. "description": "Permission processed successfully",
  4000. "content": {
  4001. "application/json": {
  4002. "schema": {
  4003. "type": "boolean",
  4004. "description": "Permission processed successfully"
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "400": {
  4010. "description": "Bad request",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "$ref": "#/components/schemas/BadRequestError"
  4015. }
  4016. }
  4017. }
  4018. },
  4019. "404": {
  4020. "description": "Not found",
  4021. "content": {
  4022. "application/json": {
  4023. "schema": {
  4024. "$ref": "#/components/schemas/NotFoundError"
  4025. }
  4026. }
  4027. }
  4028. }
  4029. },
  4030. "description": "Approve or deny a permission request from the AI assistant.",
  4031. "summary": "Respond to permission request",
  4032. "requestBody": {
  4033. "content": {
  4034. "application/json": {
  4035. "schema": {
  4036. "type": "object",
  4037. "properties": {
  4038. "reply": {
  4039. "type": "string",
  4040. "enum": ["once", "always", "reject"]
  4041. },
  4042. "message": {
  4043. "type": "string"
  4044. }
  4045. },
  4046. "required": ["reply"],
  4047. "additionalProperties": false
  4048. }
  4049. }
  4050. }
  4051. },
  4052. "x-codeSamples": [
  4053. {
  4054. "lang": "js",
  4055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4056. }
  4057. ]
  4058. }
  4059. },
  4060. "/provider": {
  4061. "get": {
  4062. "tags": ["provider"],
  4063. "operationId": "provider.list",
  4064. "parameters": [
  4065. {
  4066. "name": "directory",
  4067. "in": "query",
  4068. "schema": {
  4069. "type": "string"
  4070. },
  4071. "required": false
  4072. },
  4073. {
  4074. "name": "workspace",
  4075. "in": "query",
  4076. "schema": {
  4077. "type": "string"
  4078. },
  4079. "required": false
  4080. }
  4081. ],
  4082. "responses": {
  4083. "200": {
  4084. "description": "List of providers",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "type": "object",
  4089. "properties": {
  4090. "all": {
  4091. "type": "array",
  4092. "items": {
  4093. "$ref": "#/components/schemas/Provider"
  4094. }
  4095. },
  4096. "default": {
  4097. "type": "object",
  4098. "additionalProperties": {
  4099. "type": "string"
  4100. }
  4101. },
  4102. "connected": {
  4103. "type": "array",
  4104. "items": {
  4105. "type": "string"
  4106. }
  4107. }
  4108. },
  4109. "required": ["all", "default", "connected"],
  4110. "additionalProperties": false,
  4111. "description": "List of providers"
  4112. }
  4113. }
  4114. }
  4115. }
  4116. },
  4117. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4118. "summary": "List providers",
  4119. "x-codeSamples": [
  4120. {
  4121. "lang": "js",
  4122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4123. }
  4124. ]
  4125. }
  4126. },
  4127. "/provider/auth": {
  4128. "get": {
  4129. "tags": ["provider"],
  4130. "operationId": "provider.auth",
  4131. "parameters": [
  4132. {
  4133. "name": "directory",
  4134. "in": "query",
  4135. "schema": {
  4136. "type": "string"
  4137. },
  4138. "required": false
  4139. },
  4140. {
  4141. "name": "workspace",
  4142. "in": "query",
  4143. "schema": {
  4144. "type": "string"
  4145. },
  4146. "required": false
  4147. }
  4148. ],
  4149. "responses": {
  4150. "200": {
  4151. "description": "Provider auth methods",
  4152. "content": {
  4153. "application/json": {
  4154. "schema": {
  4155. "type": "object",
  4156. "additionalProperties": {
  4157. "type": "array",
  4158. "items": {
  4159. "$ref": "#/components/schemas/ProviderAuthMethod"
  4160. }
  4161. },
  4162. "description": "Provider auth methods"
  4163. }
  4164. }
  4165. }
  4166. }
  4167. },
  4168. "description": "Retrieve available authentication methods for all AI providers.",
  4169. "summary": "Get provider auth methods",
  4170. "x-codeSamples": [
  4171. {
  4172. "lang": "js",
  4173. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4174. }
  4175. ]
  4176. }
  4177. },
  4178. "/provider/{providerID}/oauth/authorize": {
  4179. "post": {
  4180. "tags": ["provider"],
  4181. "operationId": "provider.oauth.authorize",
  4182. "parameters": [
  4183. {
  4184. "name": "providerID",
  4185. "in": "path",
  4186. "schema": {
  4187. "type": "string"
  4188. },
  4189. "required": true
  4190. },
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "Authorization URL and method",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4215. }
  4216. }
  4217. }
  4218. },
  4219. "400": {
  4220. "description": "ProviderAuthError",
  4221. "content": {
  4222. "application/json": {
  4223. "schema": {
  4224. "$ref": "#/components/schemas/ProviderAuthError1"
  4225. }
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "description": "Start the OAuth authorization flow for a provider.",
  4231. "summary": "Start OAuth authorization",
  4232. "requestBody": {
  4233. "content": {
  4234. "application/json": {
  4235. "schema": {
  4236. "type": "object",
  4237. "properties": {
  4238. "method": {
  4239. "type": "number",
  4240. "description": "Auth method index"
  4241. },
  4242. "inputs": {
  4243. "type": "object",
  4244. "additionalProperties": {
  4245. "type": "string"
  4246. }
  4247. }
  4248. },
  4249. "required": ["method"],
  4250. "additionalProperties": false
  4251. }
  4252. }
  4253. }
  4254. },
  4255. "x-codeSamples": [
  4256. {
  4257. "lang": "js",
  4258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4259. }
  4260. ]
  4261. }
  4262. },
  4263. "/provider/{providerID}/oauth/callback": {
  4264. "post": {
  4265. "tags": ["provider"],
  4266. "operationId": "provider.oauth.callback",
  4267. "parameters": [
  4268. {
  4269. "name": "providerID",
  4270. "in": "path",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": true
  4275. },
  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": "OAuth callback processed successfully",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "boolean",
  4300. "description": "OAuth callback processed successfully"
  4301. }
  4302. }
  4303. }
  4304. },
  4305. "400": {
  4306. "description": "ProviderAuthError",
  4307. "content": {
  4308. "application/json": {
  4309. "schema": {
  4310. "$ref": "#/components/schemas/ProviderAuthError1"
  4311. }
  4312. }
  4313. }
  4314. }
  4315. },
  4316. "description": "Handle the OAuth callback from a provider after user authorization.",
  4317. "summary": "Handle OAuth callback",
  4318. "requestBody": {
  4319. "content": {
  4320. "application/json": {
  4321. "schema": {
  4322. "type": "object",
  4323. "properties": {
  4324. "method": {
  4325. "type": "number",
  4326. "description": "Auth method index"
  4327. },
  4328. "code": {
  4329. "type": "string"
  4330. }
  4331. },
  4332. "required": ["method"],
  4333. "additionalProperties": false
  4334. }
  4335. }
  4336. }
  4337. },
  4338. "x-codeSamples": [
  4339. {
  4340. "lang": "js",
  4341. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4342. }
  4343. ]
  4344. }
  4345. },
  4346. "/session": {
  4347. "get": {
  4348. "tags": ["session"],
  4349. "operationId": "session.list",
  4350. "parameters": [
  4351. {
  4352. "name": "directory",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. },
  4359. {
  4360. "name": "workspace",
  4361. "in": "query",
  4362. "schema": {
  4363. "type": "string"
  4364. },
  4365. "required": false
  4366. },
  4367. {
  4368. "name": "scope",
  4369. "in": "query",
  4370. "schema": {
  4371. "type": "string",
  4372. "enum": ["project"]
  4373. },
  4374. "required": false
  4375. },
  4376. {
  4377. "name": "path",
  4378. "in": "query",
  4379. "schema": {
  4380. "type": "string"
  4381. },
  4382. "required": false
  4383. },
  4384. {
  4385. "name": "roots",
  4386. "in": "query",
  4387. "schema": {
  4388. "anyOf": [
  4389. {
  4390. "type": "boolean"
  4391. },
  4392. {
  4393. "type": "string",
  4394. "enum": ["true", "false"]
  4395. }
  4396. ]
  4397. },
  4398. "required": false
  4399. },
  4400. {
  4401. "name": "start",
  4402. "in": "query",
  4403. "schema": {
  4404. "type": "number"
  4405. },
  4406. "required": false
  4407. },
  4408. {
  4409. "name": "search",
  4410. "in": "query",
  4411. "schema": {
  4412. "type": "string"
  4413. },
  4414. "required": false
  4415. },
  4416. {
  4417. "name": "limit",
  4418. "in": "query",
  4419. "schema": {
  4420. "type": "number"
  4421. },
  4422. "required": false
  4423. }
  4424. ],
  4425. "responses": {
  4426. "200": {
  4427. "description": "List of sessions",
  4428. "content": {
  4429. "application/json": {
  4430. "schema": {
  4431. "type": "array",
  4432. "items": {
  4433. "$ref": "#/components/schemas/Session"
  4434. },
  4435. "description": "List of sessions"
  4436. }
  4437. }
  4438. }
  4439. }
  4440. },
  4441. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4442. "summary": "List sessions",
  4443. "x-codeSamples": [
  4444. {
  4445. "lang": "js",
  4446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4447. }
  4448. ]
  4449. },
  4450. "post": {
  4451. "tags": ["session"],
  4452. "operationId": "session.create",
  4453. "parameters": [
  4454. {
  4455. "name": "directory",
  4456. "in": "query",
  4457. "schema": {
  4458. "type": "string"
  4459. },
  4460. "required": false
  4461. },
  4462. {
  4463. "name": "workspace",
  4464. "in": "query",
  4465. "schema": {
  4466. "type": "string"
  4467. },
  4468. "required": false
  4469. }
  4470. ],
  4471. "responses": {
  4472. "200": {
  4473. "description": "Successfully created session",
  4474. "content": {
  4475. "application/json": {
  4476. "schema": {
  4477. "$ref": "#/components/schemas/Session"
  4478. }
  4479. }
  4480. }
  4481. },
  4482. "400": {
  4483. "description": "Bad request",
  4484. "content": {
  4485. "application/json": {
  4486. "schema": {
  4487. "$ref": "#/components/schemas/BadRequestError"
  4488. }
  4489. }
  4490. }
  4491. }
  4492. },
  4493. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4494. "summary": "Create session",
  4495. "requestBody": {
  4496. "content": {
  4497. "application/json": {
  4498. "schema": {
  4499. "type": "object",
  4500. "properties": {
  4501. "parentID": {
  4502. "type": "string",
  4503. "pattern": "^ses"
  4504. },
  4505. "title": {
  4506. "type": "string"
  4507. },
  4508. "agent": {
  4509. "type": "string"
  4510. },
  4511. "model": {
  4512. "type": "object",
  4513. "properties": {
  4514. "id": {
  4515. "type": "string"
  4516. },
  4517. "providerID": {
  4518. "type": "string"
  4519. },
  4520. "variant": {
  4521. "type": "string"
  4522. }
  4523. },
  4524. "required": ["id", "providerID"],
  4525. "additionalProperties": false
  4526. },
  4527. "permission": {
  4528. "$ref": "#/components/schemas/PermissionRuleset"
  4529. },
  4530. "workspaceID": {
  4531. "type": "string",
  4532. "pattern": "^wrk"
  4533. }
  4534. },
  4535. "additionalProperties": false
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "x-codeSamples": [
  4541. {
  4542. "lang": "js",
  4543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4544. }
  4545. ]
  4546. }
  4547. },
  4548. "/session/status": {
  4549. "get": {
  4550. "tags": ["session"],
  4551. "operationId": "session.status",
  4552. "parameters": [
  4553. {
  4554. "name": "directory",
  4555. "in": "query",
  4556. "schema": {
  4557. "type": "string"
  4558. },
  4559. "required": false
  4560. },
  4561. {
  4562. "name": "workspace",
  4563. "in": "query",
  4564. "schema": {
  4565. "type": "string"
  4566. },
  4567. "required": false
  4568. }
  4569. ],
  4570. "responses": {
  4571. "200": {
  4572. "description": "Get session status",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "type": "object",
  4577. "additionalProperties": {
  4578. "$ref": "#/components/schemas/SessionStatus"
  4579. },
  4580. "description": "Get session status"
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "400": {
  4586. "description": "Bad request",
  4587. "content": {
  4588. "application/json": {
  4589. "schema": {
  4590. "$ref": "#/components/schemas/BadRequestError"
  4591. }
  4592. }
  4593. }
  4594. }
  4595. },
  4596. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4597. "summary": "Get session status",
  4598. "x-codeSamples": [
  4599. {
  4600. "lang": "js",
  4601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4602. }
  4603. ]
  4604. }
  4605. },
  4606. "/session/{sessionID}": {
  4607. "get": {
  4608. "tags": ["session"],
  4609. "operationId": "session.get",
  4610. "parameters": [
  4611. {
  4612. "name": "sessionID",
  4613. "in": "path",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^ses"
  4617. },
  4618. "required": true
  4619. },
  4620. {
  4621. "name": "directory",
  4622. "in": "query",
  4623. "schema": {
  4624. "type": "string"
  4625. },
  4626. "required": false
  4627. },
  4628. {
  4629. "name": "workspace",
  4630. "in": "query",
  4631. "schema": {
  4632. "type": "string"
  4633. },
  4634. "required": false
  4635. }
  4636. ],
  4637. "responses": {
  4638. "200": {
  4639. "description": "Get session",
  4640. "content": {
  4641. "application/json": {
  4642. "schema": {
  4643. "$ref": "#/components/schemas/Session"
  4644. }
  4645. }
  4646. }
  4647. },
  4648. "400": {
  4649. "description": "Bad request",
  4650. "content": {
  4651. "application/json": {
  4652. "schema": {
  4653. "$ref": "#/components/schemas/BadRequestError"
  4654. }
  4655. }
  4656. }
  4657. },
  4658. "404": {
  4659. "description": "NotFoundError",
  4660. "content": {
  4661. "application/json": {
  4662. "schema": {
  4663. "$ref": "#/components/schemas/NotFoundError"
  4664. }
  4665. }
  4666. }
  4667. }
  4668. },
  4669. "description": "Retrieve detailed information about a specific OpenCode session.",
  4670. "summary": "Get session",
  4671. "x-codeSamples": [
  4672. {
  4673. "lang": "js",
  4674. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4675. }
  4676. ]
  4677. },
  4678. "delete": {
  4679. "tags": ["session"],
  4680. "operationId": "session.delete",
  4681. "parameters": [
  4682. {
  4683. "name": "sessionID",
  4684. "in": "path",
  4685. "schema": {
  4686. "type": "string",
  4687. "pattern": "^ses"
  4688. },
  4689. "required": true
  4690. },
  4691. {
  4692. "name": "directory",
  4693. "in": "query",
  4694. "schema": {
  4695. "type": "string"
  4696. },
  4697. "required": false
  4698. },
  4699. {
  4700. "name": "workspace",
  4701. "in": "query",
  4702. "schema": {
  4703. "type": "string"
  4704. },
  4705. "required": false
  4706. }
  4707. ],
  4708. "responses": {
  4709. "200": {
  4710. "description": "Successfully deleted session",
  4711. "content": {
  4712. "application/json": {
  4713. "schema": {
  4714. "type": "boolean",
  4715. "description": "Successfully deleted session"
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "400": {
  4721. "description": "Bad request",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/BadRequestError"
  4726. }
  4727. }
  4728. }
  4729. },
  4730. "404": {
  4731. "description": "NotFoundError",
  4732. "content": {
  4733. "application/json": {
  4734. "schema": {
  4735. "$ref": "#/components/schemas/NotFoundError"
  4736. }
  4737. }
  4738. }
  4739. }
  4740. },
  4741. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4742. "summary": "Delete session",
  4743. "x-codeSamples": [
  4744. {
  4745. "lang": "js",
  4746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4747. }
  4748. ]
  4749. },
  4750. "patch": {
  4751. "tags": ["session"],
  4752. "operationId": "session.update",
  4753. "parameters": [
  4754. {
  4755. "name": "sessionID",
  4756. "in": "path",
  4757. "schema": {
  4758. "type": "string",
  4759. "pattern": "^ses"
  4760. },
  4761. "required": true
  4762. },
  4763. {
  4764. "name": "directory",
  4765. "in": "query",
  4766. "schema": {
  4767. "type": "string"
  4768. },
  4769. "required": false
  4770. },
  4771. {
  4772. "name": "workspace",
  4773. "in": "query",
  4774. "schema": {
  4775. "type": "string"
  4776. },
  4777. "required": false
  4778. }
  4779. ],
  4780. "responses": {
  4781. "200": {
  4782. "description": "Successfully updated session",
  4783. "content": {
  4784. "application/json": {
  4785. "schema": {
  4786. "$ref": "#/components/schemas/Session"
  4787. }
  4788. }
  4789. }
  4790. },
  4791. "400": {
  4792. "description": "Bad request",
  4793. "content": {
  4794. "application/json": {
  4795. "schema": {
  4796. "$ref": "#/components/schemas/BadRequestError"
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "404": {
  4802. "description": "NotFoundError",
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "$ref": "#/components/schemas/NotFoundError"
  4807. }
  4808. }
  4809. }
  4810. }
  4811. },
  4812. "description": "Update properties of an existing session, such as title or other metadata.",
  4813. "summary": "Update session",
  4814. "requestBody": {
  4815. "content": {
  4816. "application/json": {
  4817. "schema": {
  4818. "type": "object",
  4819. "properties": {
  4820. "title": {
  4821. "type": "string"
  4822. },
  4823. "permission": {
  4824. "$ref": "#/components/schemas/PermissionRuleset"
  4825. },
  4826. "time": {
  4827. "type": "object",
  4828. "properties": {
  4829. "archived": {
  4830. "type": "number"
  4831. }
  4832. },
  4833. "additionalProperties": false
  4834. }
  4835. },
  4836. "additionalProperties": false
  4837. }
  4838. }
  4839. }
  4840. },
  4841. "x-codeSamples": [
  4842. {
  4843. "lang": "js",
  4844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4845. }
  4846. ]
  4847. }
  4848. },
  4849. "/session/{sessionID}/children": {
  4850. "get": {
  4851. "tags": ["session"],
  4852. "operationId": "session.children",
  4853. "parameters": [
  4854. {
  4855. "name": "sessionID",
  4856. "in": "path",
  4857. "schema": {
  4858. "type": "string",
  4859. "pattern": "^ses"
  4860. },
  4861. "required": true
  4862. },
  4863. {
  4864. "name": "directory",
  4865. "in": "query",
  4866. "schema": {
  4867. "type": "string"
  4868. },
  4869. "required": false
  4870. },
  4871. {
  4872. "name": "workspace",
  4873. "in": "query",
  4874. "schema": {
  4875. "type": "string"
  4876. },
  4877. "required": false
  4878. }
  4879. ],
  4880. "responses": {
  4881. "200": {
  4882. "description": "List of children",
  4883. "content": {
  4884. "application/json": {
  4885. "schema": {
  4886. "type": "array",
  4887. "items": {
  4888. "$ref": "#/components/schemas/Session"
  4889. },
  4890. "description": "List of children"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "400": {
  4896. "description": "Bad request",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/BadRequestError"
  4901. }
  4902. }
  4903. }
  4904. },
  4905. "404": {
  4906. "description": "NotFoundError",
  4907. "content": {
  4908. "application/json": {
  4909. "schema": {
  4910. "$ref": "#/components/schemas/NotFoundError"
  4911. }
  4912. }
  4913. }
  4914. }
  4915. },
  4916. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4917. "summary": "Get session children",
  4918. "x-codeSamples": [
  4919. {
  4920. "lang": "js",
  4921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4922. }
  4923. ]
  4924. }
  4925. },
  4926. "/session/{sessionID}/todo": {
  4927. "get": {
  4928. "tags": ["session"],
  4929. "operationId": "session.todo",
  4930. "parameters": [
  4931. {
  4932. "name": "sessionID",
  4933. "in": "path",
  4934. "schema": {
  4935. "type": "string",
  4936. "pattern": "^ses"
  4937. },
  4938. "required": true
  4939. },
  4940. {
  4941. "name": "directory",
  4942. "in": "query",
  4943. "schema": {
  4944. "type": "string"
  4945. },
  4946. "required": false
  4947. },
  4948. {
  4949. "name": "workspace",
  4950. "in": "query",
  4951. "schema": {
  4952. "type": "string"
  4953. },
  4954. "required": false
  4955. }
  4956. ],
  4957. "responses": {
  4958. "200": {
  4959. "description": "Todo list",
  4960. "content": {
  4961. "application/json": {
  4962. "schema": {
  4963. "type": "array",
  4964. "items": {
  4965. "$ref": "#/components/schemas/Todo"
  4966. },
  4967. "description": "Todo list"
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "400": {
  4973. "description": "Bad request",
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "$ref": "#/components/schemas/BadRequestError"
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "404": {
  4983. "description": "NotFoundError",
  4984. "content": {
  4985. "application/json": {
  4986. "schema": {
  4987. "$ref": "#/components/schemas/NotFoundError"
  4988. }
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4994. "summary": "Get session todos",
  4995. "x-codeSamples": [
  4996. {
  4997. "lang": "js",
  4998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4999. }
  5000. ]
  5001. }
  5002. },
  5003. "/session/{sessionID}/diff": {
  5004. "get": {
  5005. "tags": ["session"],
  5006. "operationId": "session.diff",
  5007. "parameters": [
  5008. {
  5009. "name": "sessionID",
  5010. "in": "path",
  5011. "schema": {
  5012. "type": "string",
  5013. "pattern": "^ses"
  5014. },
  5015. "required": true
  5016. },
  5017. {
  5018. "name": "directory",
  5019. "in": "query",
  5020. "schema": {
  5021. "type": "string"
  5022. },
  5023. "required": false
  5024. },
  5025. {
  5026. "name": "workspace",
  5027. "in": "query",
  5028. "schema": {
  5029. "type": "string"
  5030. },
  5031. "required": false
  5032. },
  5033. {
  5034. "name": "messageID",
  5035. "in": "query",
  5036. "schema": {
  5037. "type": "string",
  5038. "pattern": "^msg"
  5039. },
  5040. "required": false
  5041. }
  5042. ],
  5043. "responses": {
  5044. "200": {
  5045. "description": "Successfully retrieved diff",
  5046. "content": {
  5047. "application/json": {
  5048. "schema": {
  5049. "type": "array",
  5050. "items": {
  5051. "$ref": "#/components/schemas/SnapshotFileDiff"
  5052. },
  5053. "description": "Successfully retrieved diff"
  5054. }
  5055. }
  5056. }
  5057. }
  5058. },
  5059. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5060. "summary": "Get message diff",
  5061. "x-codeSamples": [
  5062. {
  5063. "lang": "js",
  5064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5065. }
  5066. ]
  5067. }
  5068. },
  5069. "/session/{sessionID}/message": {
  5070. "get": {
  5071. "tags": ["session"],
  5072. "operationId": "session.messages",
  5073. "parameters": [
  5074. {
  5075. "name": "sessionID",
  5076. "in": "path",
  5077. "schema": {
  5078. "type": "string",
  5079. "pattern": "^ses"
  5080. },
  5081. "required": true
  5082. },
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. },
  5099. {
  5100. "name": "limit",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "integer",
  5104. "minimum": 0,
  5105. "maximum": 9007199254740991
  5106. },
  5107. "required": false
  5108. },
  5109. {
  5110. "name": "before",
  5111. "in": "query",
  5112. "schema": {
  5113. "type": "string"
  5114. },
  5115. "required": false
  5116. }
  5117. ],
  5118. "responses": {
  5119. "200": {
  5120. "description": "List of messages",
  5121. "content": {
  5122. "application/json": {
  5123. "schema": {
  5124. "type": "array",
  5125. "items": {
  5126. "type": "object",
  5127. "properties": {
  5128. "info": {
  5129. "$ref": "#/components/schemas/Message"
  5130. },
  5131. "parts": {
  5132. "type": "array",
  5133. "items": {
  5134. "$ref": "#/components/schemas/Part"
  5135. }
  5136. }
  5137. },
  5138. "required": ["info", "parts"],
  5139. "additionalProperties": false
  5140. },
  5141. "description": "List of messages"
  5142. }
  5143. }
  5144. }
  5145. },
  5146. "400": {
  5147. "description": "Bad request",
  5148. "content": {
  5149. "application/json": {
  5150. "schema": {
  5151. "$ref": "#/components/schemas/BadRequestError"
  5152. }
  5153. }
  5154. }
  5155. },
  5156. "404": {
  5157. "description": "NotFoundError",
  5158. "content": {
  5159. "application/json": {
  5160. "schema": {
  5161. "$ref": "#/components/schemas/NotFoundError"
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5168. "summary": "Get session messages",
  5169. "x-codeSamples": [
  5170. {
  5171. "lang": "js",
  5172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5173. }
  5174. ]
  5175. },
  5176. "post": {
  5177. "tags": ["session"],
  5178. "operationId": "session.prompt",
  5179. "parameters": [
  5180. {
  5181. "name": "sessionID",
  5182. "in": "path",
  5183. "schema": {
  5184. "type": "string",
  5185. "pattern": "^ses"
  5186. },
  5187. "required": true
  5188. },
  5189. {
  5190. "name": "directory",
  5191. "in": "query",
  5192. "schema": {
  5193. "type": "string"
  5194. },
  5195. "required": false
  5196. },
  5197. {
  5198. "name": "workspace",
  5199. "in": "query",
  5200. "schema": {
  5201. "type": "string"
  5202. },
  5203. "required": false
  5204. }
  5205. ],
  5206. "responses": {
  5207. "200": {
  5208. "description": "Created message",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "type": "object",
  5213. "required": ["info", "parts"],
  5214. "properties": {
  5215. "info": {
  5216. "$ref": "#/components/schemas/AssistantMessage"
  5217. },
  5218. "parts": {
  5219. "type": "array",
  5220. "items": {
  5221. "$ref": "#/components/schemas/Part"
  5222. }
  5223. }
  5224. }
  5225. }
  5226. }
  5227. }
  5228. },
  5229. "400": {
  5230. "description": "Bad request",
  5231. "content": {
  5232. "application/json": {
  5233. "schema": {
  5234. "$ref": "#/components/schemas/BadRequestError"
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "404": {
  5240. "description": "NotFoundError",
  5241. "content": {
  5242. "application/json": {
  5243. "schema": {
  5244. "$ref": "#/components/schemas/NotFoundError"
  5245. }
  5246. }
  5247. }
  5248. }
  5249. },
  5250. "description": "Create and send a new message to a session, streaming the AI response.",
  5251. "summary": "Send message",
  5252. "requestBody": {
  5253. "content": {
  5254. "application/json": {
  5255. "schema": {
  5256. "type": "object",
  5257. "properties": {
  5258. "messageID": {
  5259. "type": "string",
  5260. "pattern": "^msg"
  5261. },
  5262. "model": {
  5263. "type": "object",
  5264. "properties": {
  5265. "providerID": {
  5266. "type": "string"
  5267. },
  5268. "modelID": {
  5269. "type": "string"
  5270. }
  5271. },
  5272. "required": ["providerID", "modelID"],
  5273. "additionalProperties": false
  5274. },
  5275. "agent": {
  5276. "type": "string"
  5277. },
  5278. "noReply": {
  5279. "type": "boolean"
  5280. },
  5281. "tools": {
  5282. "type": "object",
  5283. "additionalProperties": {
  5284. "type": "boolean"
  5285. }
  5286. },
  5287. "format": {
  5288. "$ref": "#/components/schemas/OutputFormat"
  5289. },
  5290. "system": {
  5291. "type": "string"
  5292. },
  5293. "variant": {
  5294. "type": "string"
  5295. },
  5296. "parts": {
  5297. "type": "array",
  5298. "items": {
  5299. "anyOf": [
  5300. {
  5301. "$ref": "#/components/schemas/TextPartInput"
  5302. },
  5303. {
  5304. "$ref": "#/components/schemas/FilePartInput"
  5305. },
  5306. {
  5307. "$ref": "#/components/schemas/AgentPartInput"
  5308. },
  5309. {
  5310. "$ref": "#/components/schemas/SubtaskPartInput"
  5311. }
  5312. ]
  5313. }
  5314. }
  5315. },
  5316. "required": ["parts"],
  5317. "additionalProperties": false
  5318. }
  5319. }
  5320. }
  5321. },
  5322. "x-codeSamples": [
  5323. {
  5324. "lang": "js",
  5325. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5326. }
  5327. ]
  5328. }
  5329. },
  5330. "/session/{sessionID}/message/{messageID}": {
  5331. "get": {
  5332. "tags": ["session"],
  5333. "operationId": "session.message",
  5334. "parameters": [
  5335. {
  5336. "name": "sessionID",
  5337. "in": "path",
  5338. "schema": {
  5339. "type": "string",
  5340. "pattern": "^ses"
  5341. },
  5342. "required": true
  5343. },
  5344. {
  5345. "name": "messageID",
  5346. "in": "path",
  5347. "schema": {
  5348. "type": "string",
  5349. "pattern": "^msg"
  5350. },
  5351. "required": true
  5352. },
  5353. {
  5354. "name": "directory",
  5355. "in": "query",
  5356. "schema": {
  5357. "type": "string"
  5358. },
  5359. "required": false
  5360. },
  5361. {
  5362. "name": "workspace",
  5363. "in": "query",
  5364. "schema": {
  5365. "type": "string"
  5366. },
  5367. "required": false
  5368. }
  5369. ],
  5370. "responses": {
  5371. "200": {
  5372. "description": "Message",
  5373. "content": {
  5374. "application/json": {
  5375. "schema": {
  5376. "type": "object",
  5377. "properties": {
  5378. "info": {
  5379. "$ref": "#/components/schemas/Message"
  5380. },
  5381. "parts": {
  5382. "type": "array",
  5383. "items": {
  5384. "$ref": "#/components/schemas/Part"
  5385. }
  5386. }
  5387. },
  5388. "required": ["info", "parts"],
  5389. "additionalProperties": false,
  5390. "description": "Message"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "400": {
  5396. "description": "Bad request",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "$ref": "#/components/schemas/BadRequestError"
  5401. }
  5402. }
  5403. }
  5404. },
  5405. "404": {
  5406. "description": "NotFoundError",
  5407. "content": {
  5408. "application/json": {
  5409. "schema": {
  5410. "$ref": "#/components/schemas/NotFoundError"
  5411. }
  5412. }
  5413. }
  5414. }
  5415. },
  5416. "description": "Retrieve a specific message from a session by its message ID.",
  5417. "summary": "Get message",
  5418. "x-codeSamples": [
  5419. {
  5420. "lang": "js",
  5421. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5422. }
  5423. ]
  5424. },
  5425. "delete": {
  5426. "tags": ["session"],
  5427. "operationId": "session.deleteMessage",
  5428. "parameters": [
  5429. {
  5430. "name": "sessionID",
  5431. "in": "path",
  5432. "schema": {
  5433. "type": "string",
  5434. "pattern": "^ses"
  5435. },
  5436. "required": true
  5437. },
  5438. {
  5439. "name": "messageID",
  5440. "in": "path",
  5441. "schema": {
  5442. "type": "string",
  5443. "pattern": "^msg"
  5444. },
  5445. "required": true
  5446. },
  5447. {
  5448. "name": "directory",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. },
  5455. {
  5456. "name": "workspace",
  5457. "in": "query",
  5458. "schema": {
  5459. "type": "string"
  5460. },
  5461. "required": false
  5462. }
  5463. ],
  5464. "responses": {
  5465. "200": {
  5466. "description": "Successfully deleted message",
  5467. "content": {
  5468. "application/json": {
  5469. "schema": {
  5470. "type": "boolean",
  5471. "description": "Successfully deleted message"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "Bad request",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "$ref": "#/components/schemas/BadRequestError"
  5482. }
  5483. }
  5484. }
  5485. },
  5486. "404": {
  5487. "description": "NotFoundError",
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "$ref": "#/components/schemas/NotFoundError"
  5492. }
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5498. "summary": "Delete message",
  5499. "x-codeSamples": [
  5500. {
  5501. "lang": "js",
  5502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5503. }
  5504. ]
  5505. }
  5506. },
  5507. "/session/{sessionID}/fork": {
  5508. "post": {
  5509. "tags": ["session"],
  5510. "operationId": "session.fork",
  5511. "parameters": [
  5512. {
  5513. "name": "sessionID",
  5514. "in": "path",
  5515. "schema": {
  5516. "type": "string",
  5517. "pattern": "^ses"
  5518. },
  5519. "required": true
  5520. },
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "200",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "Bad request",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "$ref": "#/components/schemas/BadRequestError"
  5555. }
  5556. }
  5557. }
  5558. },
  5559. "404": {
  5560. "description": "NotFoundError",
  5561. "content": {
  5562. "application/json": {
  5563. "schema": {
  5564. "$ref": "#/components/schemas/NotFoundError"
  5565. }
  5566. }
  5567. }
  5568. }
  5569. },
  5570. "description": "Create a new session by forking an existing session at a specific message point.",
  5571. "summary": "Fork session",
  5572. "requestBody": {
  5573. "content": {
  5574. "application/json": {
  5575. "schema": {
  5576. "type": "object",
  5577. "properties": {
  5578. "messageID": {
  5579. "type": "string",
  5580. "pattern": "^msg"
  5581. }
  5582. },
  5583. "additionalProperties": false
  5584. }
  5585. }
  5586. }
  5587. },
  5588. "x-codeSamples": [
  5589. {
  5590. "lang": "js",
  5591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5592. }
  5593. ]
  5594. }
  5595. },
  5596. "/session/{sessionID}/abort": {
  5597. "post": {
  5598. "tags": ["session"],
  5599. "operationId": "session.abort",
  5600. "parameters": [
  5601. {
  5602. "name": "sessionID",
  5603. "in": "path",
  5604. "schema": {
  5605. "type": "string",
  5606. "pattern": "^ses"
  5607. },
  5608. "required": true
  5609. },
  5610. {
  5611. "name": "directory",
  5612. "in": "query",
  5613. "schema": {
  5614. "type": "string"
  5615. },
  5616. "required": false
  5617. },
  5618. {
  5619. "name": "workspace",
  5620. "in": "query",
  5621. "schema": {
  5622. "type": "string"
  5623. },
  5624. "required": false
  5625. }
  5626. ],
  5627. "responses": {
  5628. "200": {
  5629. "description": "Aborted session",
  5630. "content": {
  5631. "application/json": {
  5632. "schema": {
  5633. "type": "boolean",
  5634. "description": "Aborted session"
  5635. }
  5636. }
  5637. }
  5638. },
  5639. "400": {
  5640. "description": "Bad request",
  5641. "content": {
  5642. "application/json": {
  5643. "schema": {
  5644. "$ref": "#/components/schemas/BadRequestError"
  5645. }
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5651. "summary": "Abort session",
  5652. "x-codeSamples": [
  5653. {
  5654. "lang": "js",
  5655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5656. }
  5657. ]
  5658. }
  5659. },
  5660. "/session/{sessionID}/init": {
  5661. "post": {
  5662. "tags": ["session"],
  5663. "operationId": "session.init",
  5664. "parameters": [
  5665. {
  5666. "name": "sessionID",
  5667. "in": "path",
  5668. "schema": {
  5669. "type": "string",
  5670. "pattern": "^ses"
  5671. },
  5672. "required": true
  5673. },
  5674. {
  5675. "name": "directory",
  5676. "in": "query",
  5677. "schema": {
  5678. "type": "string"
  5679. },
  5680. "required": false
  5681. },
  5682. {
  5683. "name": "workspace",
  5684. "in": "query",
  5685. "schema": {
  5686. "type": "string"
  5687. },
  5688. "required": false
  5689. }
  5690. ],
  5691. "responses": {
  5692. "200": {
  5693. "description": "200",
  5694. "content": {
  5695. "application/json": {
  5696. "schema": {
  5697. "type": "boolean",
  5698. "description": "200"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "400": {
  5704. "description": "Bad request",
  5705. "content": {
  5706. "application/json": {
  5707. "schema": {
  5708. "$ref": "#/components/schemas/BadRequestError"
  5709. }
  5710. }
  5711. }
  5712. },
  5713. "404": {
  5714. "description": "NotFoundError",
  5715. "content": {
  5716. "application/json": {
  5717. "schema": {
  5718. "$ref": "#/components/schemas/NotFoundError"
  5719. }
  5720. }
  5721. }
  5722. }
  5723. },
  5724. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5725. "summary": "Initialize session",
  5726. "requestBody": {
  5727. "content": {
  5728. "application/json": {
  5729. "schema": {
  5730. "type": "object",
  5731. "properties": {
  5732. "modelID": {
  5733. "type": "string"
  5734. },
  5735. "providerID": {
  5736. "type": "string"
  5737. },
  5738. "messageID": {
  5739. "type": "string",
  5740. "pattern": "^msg"
  5741. }
  5742. },
  5743. "required": ["modelID", "providerID", "messageID"],
  5744. "additionalProperties": false
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "x-codeSamples": [
  5750. {
  5751. "lang": "js",
  5752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5753. }
  5754. ]
  5755. }
  5756. },
  5757. "/session/{sessionID}/share": {
  5758. "post": {
  5759. "tags": ["session"],
  5760. "operationId": "session.share",
  5761. "parameters": [
  5762. {
  5763. "name": "sessionID",
  5764. "in": "path",
  5765. "schema": {
  5766. "type": "string",
  5767. "pattern": "^ses"
  5768. },
  5769. "required": true
  5770. },
  5771. {
  5772. "name": "directory",
  5773. "in": "query",
  5774. "schema": {
  5775. "type": "string"
  5776. },
  5777. "required": false
  5778. },
  5779. {
  5780. "name": "workspace",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. }
  5787. ],
  5788. "responses": {
  5789. "200": {
  5790. "description": "Successfully shared session",
  5791. "content": {
  5792. "application/json": {
  5793. "schema": {
  5794. "$ref": "#/components/schemas/Session"
  5795. }
  5796. }
  5797. }
  5798. },
  5799. "404": {
  5800. "description": "NotFoundError",
  5801. "content": {
  5802. "application/json": {
  5803. "schema": {
  5804. "$ref": "#/components/schemas/NotFoundError"
  5805. }
  5806. }
  5807. }
  5808. },
  5809. "500": {
  5810. "description": "InternalServerError",
  5811. "content": {
  5812. "application/json": {
  5813. "schema": {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5815. }
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5821. "summary": "Share session",
  5822. "x-codeSamples": [
  5823. {
  5824. "lang": "js",
  5825. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5826. }
  5827. ]
  5828. },
  5829. "delete": {
  5830. "tags": ["session"],
  5831. "operationId": "session.unshare",
  5832. "parameters": [
  5833. {
  5834. "name": "sessionID",
  5835. "in": "path",
  5836. "schema": {
  5837. "type": "string",
  5838. "pattern": "^ses"
  5839. },
  5840. "required": true
  5841. },
  5842. {
  5843. "name": "directory",
  5844. "in": "query",
  5845. "schema": {
  5846. "type": "string"
  5847. },
  5848. "required": false
  5849. },
  5850. {
  5851. "name": "workspace",
  5852. "in": "query",
  5853. "schema": {
  5854. "type": "string"
  5855. },
  5856. "required": false
  5857. }
  5858. ],
  5859. "responses": {
  5860. "200": {
  5861. "description": "Successfully unshared session",
  5862. "content": {
  5863. "application/json": {
  5864. "schema": {
  5865. "$ref": "#/components/schemas/Session"
  5866. }
  5867. }
  5868. }
  5869. },
  5870. "404": {
  5871. "description": "NotFoundError",
  5872. "content": {
  5873. "application/json": {
  5874. "schema": {
  5875. "$ref": "#/components/schemas/NotFoundError"
  5876. }
  5877. }
  5878. }
  5879. },
  5880. "500": {
  5881. "description": "InternalServerError",
  5882. "content": {
  5883. "application/json": {
  5884. "schema": {
  5885. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5886. }
  5887. }
  5888. }
  5889. }
  5890. },
  5891. "description": "Remove the shareable link for a session, making it private again.",
  5892. "summary": "Unshare session",
  5893. "x-codeSamples": [
  5894. {
  5895. "lang": "js",
  5896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5897. }
  5898. ]
  5899. }
  5900. },
  5901. "/session/{sessionID}/summarize": {
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.summarize",
  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": "Summarized session",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "boolean",
  5939. "description": "Summarized session"
  5940. }
  5941. }
  5942. }
  5943. },
  5944. "400": {
  5945. "description": "Bad request",
  5946. "content": {
  5947. "application/json": {
  5948. "schema": {
  5949. "$ref": "#/components/schemas/BadRequestError"
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "404": {
  5955. "description": "NotFoundError",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/NotFoundError"
  5960. }
  5961. }
  5962. }
  5963. }
  5964. },
  5965. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5966. "summary": "Summarize session",
  5967. "requestBody": {
  5968. "content": {
  5969. "application/json": {
  5970. "schema": {
  5971. "type": "object",
  5972. "properties": {
  5973. "providerID": {
  5974. "type": "string"
  5975. },
  5976. "modelID": {
  5977. "type": "string"
  5978. },
  5979. "auto": {
  5980. "type": "boolean"
  5981. }
  5982. },
  5983. "required": ["providerID", "modelID"],
  5984. "additionalProperties": false
  5985. }
  5986. }
  5987. }
  5988. },
  5989. "x-codeSamples": [
  5990. {
  5991. "lang": "js",
  5992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5993. }
  5994. ]
  5995. }
  5996. },
  5997. "/session/{sessionID}/prompt_async": {
  5998. "post": {
  5999. "tags": ["session"],
  6000. "operationId": "session.prompt_async",
  6001. "parameters": [
  6002. {
  6003. "name": "sessionID",
  6004. "in": "path",
  6005. "schema": {
  6006. "type": "string",
  6007. "pattern": "^ses"
  6008. },
  6009. "required": true
  6010. },
  6011. {
  6012. "name": "directory",
  6013. "in": "query",
  6014. "schema": {
  6015. "type": "string"
  6016. },
  6017. "required": false
  6018. },
  6019. {
  6020. "name": "workspace",
  6021. "in": "query",
  6022. "schema": {
  6023. "type": "string"
  6024. },
  6025. "required": false
  6026. }
  6027. ],
  6028. "responses": {
  6029. "204": {
  6030. "description": "Prompt accepted"
  6031. },
  6032. "400": {
  6033. "description": "Bad request",
  6034. "content": {
  6035. "application/json": {
  6036. "schema": {
  6037. "$ref": "#/components/schemas/BadRequestError"
  6038. }
  6039. }
  6040. }
  6041. },
  6042. "404": {
  6043. "description": "NotFoundError",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "$ref": "#/components/schemas/NotFoundError"
  6048. }
  6049. }
  6050. }
  6051. }
  6052. },
  6053. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6054. "summary": "Send async message",
  6055. "requestBody": {
  6056. "content": {
  6057. "application/json": {
  6058. "schema": {
  6059. "type": "object",
  6060. "properties": {
  6061. "messageID": {
  6062. "type": "string",
  6063. "pattern": "^msg"
  6064. },
  6065. "model": {
  6066. "type": "object",
  6067. "properties": {
  6068. "providerID": {
  6069. "type": "string"
  6070. },
  6071. "modelID": {
  6072. "type": "string"
  6073. }
  6074. },
  6075. "required": ["providerID", "modelID"],
  6076. "additionalProperties": false
  6077. },
  6078. "agent": {
  6079. "type": "string"
  6080. },
  6081. "noReply": {
  6082. "type": "boolean"
  6083. },
  6084. "tools": {
  6085. "type": "object",
  6086. "additionalProperties": {
  6087. "type": "boolean"
  6088. }
  6089. },
  6090. "format": {
  6091. "$ref": "#/components/schemas/OutputFormat"
  6092. },
  6093. "system": {
  6094. "type": "string"
  6095. },
  6096. "variant": {
  6097. "type": "string"
  6098. },
  6099. "parts": {
  6100. "type": "array",
  6101. "items": {
  6102. "anyOf": [
  6103. {
  6104. "$ref": "#/components/schemas/TextPartInput"
  6105. },
  6106. {
  6107. "$ref": "#/components/schemas/FilePartInput"
  6108. },
  6109. {
  6110. "$ref": "#/components/schemas/AgentPartInput"
  6111. },
  6112. {
  6113. "$ref": "#/components/schemas/SubtaskPartInput"
  6114. }
  6115. ]
  6116. }
  6117. }
  6118. },
  6119. "required": ["parts"],
  6120. "additionalProperties": false
  6121. }
  6122. }
  6123. }
  6124. },
  6125. "x-codeSamples": [
  6126. {
  6127. "lang": "js",
  6128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6129. }
  6130. ]
  6131. }
  6132. },
  6133. "/session/{sessionID}/command": {
  6134. "post": {
  6135. "tags": ["session"],
  6136. "operationId": "session.command",
  6137. "parameters": [
  6138. {
  6139. "name": "sessionID",
  6140. "in": "path",
  6141. "schema": {
  6142. "type": "string",
  6143. "pattern": "^ses"
  6144. },
  6145. "required": true
  6146. },
  6147. {
  6148. "name": "directory",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "workspace",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string"
  6160. },
  6161. "required": false
  6162. }
  6163. ],
  6164. "responses": {
  6165. "200": {
  6166. "description": "Created message",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "type": "object",
  6171. "required": ["info", "parts"],
  6172. "properties": {
  6173. "info": {
  6174. "$ref": "#/components/schemas/AssistantMessage"
  6175. },
  6176. "parts": {
  6177. "type": "array",
  6178. "items": {
  6179. "$ref": "#/components/schemas/Part"
  6180. }
  6181. }
  6182. }
  6183. }
  6184. }
  6185. }
  6186. },
  6187. "400": {
  6188. "description": "Bad request",
  6189. "content": {
  6190. "application/json": {
  6191. "schema": {
  6192. "$ref": "#/components/schemas/BadRequestError"
  6193. }
  6194. }
  6195. }
  6196. },
  6197. "404": {
  6198. "description": "NotFoundError",
  6199. "content": {
  6200. "application/json": {
  6201. "schema": {
  6202. "$ref": "#/components/schemas/NotFoundError"
  6203. }
  6204. }
  6205. }
  6206. }
  6207. },
  6208. "description": "Send a new command to a session for execution by the AI assistant.",
  6209. "summary": "Send command",
  6210. "requestBody": {
  6211. "content": {
  6212. "application/json": {
  6213. "schema": {
  6214. "type": "object",
  6215. "properties": {
  6216. "messageID": {
  6217. "type": "string",
  6218. "pattern": "^msg"
  6219. },
  6220. "agent": {
  6221. "type": "string"
  6222. },
  6223. "model": {
  6224. "type": "string"
  6225. },
  6226. "arguments": {
  6227. "type": "string"
  6228. },
  6229. "command": {
  6230. "type": "string"
  6231. },
  6232. "variant": {
  6233. "type": "string"
  6234. },
  6235. "parts": {
  6236. "type": "array",
  6237. "items": {
  6238. "type": "object",
  6239. "properties": {
  6240. "id": {
  6241. "type": "string",
  6242. "pattern": "^prt"
  6243. },
  6244. "type": {
  6245. "type": "string",
  6246. "enum": ["file"]
  6247. },
  6248. "mime": {
  6249. "type": "string"
  6250. },
  6251. "filename": {
  6252. "type": "string"
  6253. },
  6254. "url": {
  6255. "type": "string"
  6256. },
  6257. "source": {
  6258. "$ref": "#/components/schemas/FilePartSource"
  6259. }
  6260. },
  6261. "required": ["type", "mime", "url"],
  6262. "additionalProperties": false
  6263. }
  6264. }
  6265. },
  6266. "required": ["arguments", "command"],
  6267. "additionalProperties": false
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "x-codeSamples": [
  6273. {
  6274. "lang": "js",
  6275. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6276. }
  6277. ]
  6278. }
  6279. },
  6280. "/session/{sessionID}/shell": {
  6281. "post": {
  6282. "tags": ["session"],
  6283. "operationId": "session.shell",
  6284. "parameters": [
  6285. {
  6286. "name": "sessionID",
  6287. "in": "path",
  6288. "schema": {
  6289. "type": "string",
  6290. "pattern": "^ses"
  6291. },
  6292. "required": true
  6293. },
  6294. {
  6295. "name": "directory",
  6296. "in": "query",
  6297. "schema": {
  6298. "type": "string"
  6299. },
  6300. "required": false
  6301. },
  6302. {
  6303. "name": "workspace",
  6304. "in": "query",
  6305. "schema": {
  6306. "type": "string"
  6307. },
  6308. "required": false
  6309. }
  6310. ],
  6311. "responses": {
  6312. "200": {
  6313. "description": "Created message",
  6314. "content": {
  6315. "application/json": {
  6316. "schema": {
  6317. "type": "object",
  6318. "properties": {
  6319. "info": {
  6320. "$ref": "#/components/schemas/Message"
  6321. },
  6322. "parts": {
  6323. "type": "array",
  6324. "items": {
  6325. "$ref": "#/components/schemas/Part"
  6326. }
  6327. }
  6328. },
  6329. "required": ["info", "parts"],
  6330. "additionalProperties": false,
  6331. "description": "Created message"
  6332. }
  6333. }
  6334. }
  6335. },
  6336. "400": {
  6337. "description": "Bad request",
  6338. "content": {
  6339. "application/json": {
  6340. "schema": {
  6341. "$ref": "#/components/schemas/BadRequestError"
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "404": {
  6347. "description": "NotFoundError",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "$ref": "#/components/schemas/NotFoundError"
  6352. }
  6353. }
  6354. }
  6355. }
  6356. },
  6357. "description": "Execute a shell command within the session context and return the AI's response.",
  6358. "summary": "Run shell command",
  6359. "requestBody": {
  6360. "content": {
  6361. "application/json": {
  6362. "schema": {
  6363. "type": "object",
  6364. "properties": {
  6365. "messageID": {
  6366. "type": "string",
  6367. "pattern": "^msg"
  6368. },
  6369. "agent": {
  6370. "type": "string"
  6371. },
  6372. "model": {
  6373. "type": "object",
  6374. "properties": {
  6375. "providerID": {
  6376. "type": "string"
  6377. },
  6378. "modelID": {
  6379. "type": "string"
  6380. }
  6381. },
  6382. "required": ["providerID", "modelID"],
  6383. "additionalProperties": false
  6384. },
  6385. "command": {
  6386. "type": "string"
  6387. }
  6388. },
  6389. "required": ["agent", "command"],
  6390. "additionalProperties": false
  6391. }
  6392. }
  6393. }
  6394. },
  6395. "x-codeSamples": [
  6396. {
  6397. "lang": "js",
  6398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6399. }
  6400. ]
  6401. }
  6402. },
  6403. "/session/{sessionID}/revert": {
  6404. "post": {
  6405. "tags": ["session"],
  6406. "operationId": "session.revert",
  6407. "parameters": [
  6408. {
  6409. "name": "sessionID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^ses"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Updated session",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "$ref": "#/components/schemas/Session"
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "400": {
  6446. "description": "Bad request",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/BadRequestError"
  6451. }
  6452. }
  6453. }
  6454. },
  6455. "404": {
  6456. "description": "NotFoundError",
  6457. "content": {
  6458. "application/json": {
  6459. "schema": {
  6460. "$ref": "#/components/schemas/NotFoundError"
  6461. }
  6462. }
  6463. }
  6464. }
  6465. },
  6466. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6467. "summary": "Revert message",
  6468. "requestBody": {
  6469. "content": {
  6470. "application/json": {
  6471. "schema": {
  6472. "type": "object",
  6473. "properties": {
  6474. "messageID": {
  6475. "type": "string",
  6476. "pattern": "^msg"
  6477. },
  6478. "partID": {
  6479. "type": "string",
  6480. "pattern": "^prt"
  6481. }
  6482. },
  6483. "required": ["messageID"],
  6484. "additionalProperties": false
  6485. }
  6486. }
  6487. }
  6488. },
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6493. }
  6494. ]
  6495. }
  6496. },
  6497. "/session/{sessionID}/unrevert": {
  6498. "post": {
  6499. "tags": ["session"],
  6500. "operationId": "session.unrevert",
  6501. "parameters": [
  6502. {
  6503. "name": "sessionID",
  6504. "in": "path",
  6505. "schema": {
  6506. "type": "string",
  6507. "pattern": "^ses"
  6508. },
  6509. "required": true
  6510. },
  6511. {
  6512. "name": "directory",
  6513. "in": "query",
  6514. "schema": {
  6515. "type": "string"
  6516. },
  6517. "required": false
  6518. },
  6519. {
  6520. "name": "workspace",
  6521. "in": "query",
  6522. "schema": {
  6523. "type": "string"
  6524. },
  6525. "required": false
  6526. }
  6527. ],
  6528. "responses": {
  6529. "200": {
  6530. "description": "Updated session",
  6531. "content": {
  6532. "application/json": {
  6533. "schema": {
  6534. "$ref": "#/components/schemas/Session"
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "400": {
  6540. "description": "Bad request",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/BadRequestError"
  6545. }
  6546. }
  6547. }
  6548. },
  6549. "404": {
  6550. "description": "NotFoundError",
  6551. "content": {
  6552. "application/json": {
  6553. "schema": {
  6554. "$ref": "#/components/schemas/NotFoundError"
  6555. }
  6556. }
  6557. }
  6558. }
  6559. },
  6560. "description": "Restore all previously reverted messages in a session.",
  6561. "summary": "Restore reverted messages",
  6562. "x-codeSamples": [
  6563. {
  6564. "lang": "js",
  6565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6566. }
  6567. ]
  6568. }
  6569. },
  6570. "/session/{sessionID}/permissions/{permissionID}": {
  6571. "post": {
  6572. "tags": ["session"],
  6573. "operationId": "permission.respond",
  6574. "parameters": [
  6575. {
  6576. "name": "sessionID",
  6577. "in": "path",
  6578. "schema": {
  6579. "type": "string",
  6580. "pattern": "^ses"
  6581. },
  6582. "required": true
  6583. },
  6584. {
  6585. "name": "permissionID",
  6586. "in": "path",
  6587. "schema": {
  6588. "type": "string",
  6589. "pattern": "^per"
  6590. },
  6591. "required": true
  6592. },
  6593. {
  6594. "name": "directory",
  6595. "in": "query",
  6596. "schema": {
  6597. "type": "string"
  6598. },
  6599. "required": false
  6600. },
  6601. {
  6602. "name": "workspace",
  6603. "in": "query",
  6604. "schema": {
  6605. "type": "string"
  6606. },
  6607. "required": false
  6608. }
  6609. ],
  6610. "responses": {
  6611. "200": {
  6612. "description": "Permission processed successfully",
  6613. "content": {
  6614. "application/json": {
  6615. "schema": {
  6616. "type": "boolean",
  6617. "description": "Permission processed successfully"
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "400": {
  6623. "description": "Bad request",
  6624. "content": {
  6625. "application/json": {
  6626. "schema": {
  6627. "$ref": "#/components/schemas/BadRequestError"
  6628. }
  6629. }
  6630. }
  6631. },
  6632. "404": {
  6633. "description": "NotFoundError",
  6634. "content": {
  6635. "application/json": {
  6636. "schema": {
  6637. "$ref": "#/components/schemas/NotFoundError"
  6638. }
  6639. }
  6640. }
  6641. }
  6642. },
  6643. "description": "Approve or deny a permission request from the AI assistant.",
  6644. "summary": "Respond to permission",
  6645. "deprecated": true,
  6646. "requestBody": {
  6647. "content": {
  6648. "application/json": {
  6649. "schema": {
  6650. "type": "object",
  6651. "properties": {
  6652. "response": {
  6653. "type": "string",
  6654. "enum": ["once", "always", "reject"]
  6655. }
  6656. },
  6657. "required": ["response"],
  6658. "additionalProperties": false
  6659. }
  6660. }
  6661. }
  6662. },
  6663. "x-codeSamples": [
  6664. {
  6665. "lang": "js",
  6666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6667. }
  6668. ]
  6669. }
  6670. },
  6671. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6672. "delete": {
  6673. "tags": ["session"],
  6674. "operationId": "part.delete",
  6675. "parameters": [
  6676. {
  6677. "name": "sessionID",
  6678. "in": "path",
  6679. "schema": {
  6680. "type": "string",
  6681. "pattern": "^ses"
  6682. },
  6683. "required": true
  6684. },
  6685. {
  6686. "name": "messageID",
  6687. "in": "path",
  6688. "schema": {
  6689. "type": "string",
  6690. "pattern": "^msg"
  6691. },
  6692. "required": true
  6693. },
  6694. {
  6695. "name": "partID",
  6696. "in": "path",
  6697. "schema": {
  6698. "type": "string",
  6699. "pattern": "^prt"
  6700. },
  6701. "required": true
  6702. },
  6703. {
  6704. "name": "directory",
  6705. "in": "query",
  6706. "schema": {
  6707. "type": "string"
  6708. },
  6709. "required": false
  6710. },
  6711. {
  6712. "name": "workspace",
  6713. "in": "query",
  6714. "schema": {
  6715. "type": "string"
  6716. },
  6717. "required": false
  6718. }
  6719. ],
  6720. "responses": {
  6721. "200": {
  6722. "description": "Successfully deleted part",
  6723. "content": {
  6724. "application/json": {
  6725. "schema": {
  6726. "type": "boolean",
  6727. "description": "Successfully deleted part"
  6728. }
  6729. }
  6730. }
  6731. },
  6732. "400": {
  6733. "description": "Bad request",
  6734. "content": {
  6735. "application/json": {
  6736. "schema": {
  6737. "$ref": "#/components/schemas/BadRequestError"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "404": {
  6743. "description": "NotFoundError",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "$ref": "#/components/schemas/NotFoundError"
  6748. }
  6749. }
  6750. }
  6751. }
  6752. },
  6753. "description": "Delete a part from a message.",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6758. }
  6759. ]
  6760. },
  6761. "patch": {
  6762. "tags": ["session"],
  6763. "operationId": "part.update",
  6764. "parameters": [
  6765. {
  6766. "name": "sessionID",
  6767. "in": "path",
  6768. "schema": {
  6769. "type": "string",
  6770. "pattern": "^ses"
  6771. },
  6772. "required": true
  6773. },
  6774. {
  6775. "name": "messageID",
  6776. "in": "path",
  6777. "schema": {
  6778. "type": "string",
  6779. "pattern": "^msg"
  6780. },
  6781. "required": true
  6782. },
  6783. {
  6784. "name": "partID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^prt"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "Successfully updated part",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "$ref": "#/components/schemas/Part"
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "400": {
  6821. "description": "Bad request",
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/BadRequestError"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "404": {
  6831. "description": "NotFoundError",
  6832. "content": {
  6833. "application/json": {
  6834. "schema": {
  6835. "$ref": "#/components/schemas/NotFoundError"
  6836. }
  6837. }
  6838. }
  6839. }
  6840. },
  6841. "description": "Update a part in a message.",
  6842. "requestBody": {
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "$ref": "#/components/schemas/Part"
  6847. }
  6848. }
  6849. }
  6850. },
  6851. "x-codeSamples": [
  6852. {
  6853. "lang": "js",
  6854. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6855. }
  6856. ]
  6857. }
  6858. },
  6859. "/sync/start": {
  6860. "post": {
  6861. "tags": ["sync"],
  6862. "operationId": "sync.start",
  6863. "parameters": [
  6864. {
  6865. "name": "directory",
  6866. "in": "query",
  6867. "schema": {
  6868. "type": "string"
  6869. },
  6870. "required": false
  6871. },
  6872. {
  6873. "name": "workspace",
  6874. "in": "query",
  6875. "schema": {
  6876. "type": "string"
  6877. },
  6878. "required": false
  6879. }
  6880. ],
  6881. "responses": {
  6882. "200": {
  6883. "description": "Workspace sync started",
  6884. "content": {
  6885. "application/json": {
  6886. "schema": {
  6887. "type": "boolean",
  6888. "description": "Workspace sync started"
  6889. }
  6890. }
  6891. }
  6892. }
  6893. },
  6894. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6895. "summary": "Start workspace sync",
  6896. "x-codeSamples": [
  6897. {
  6898. "lang": "js",
  6899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6900. }
  6901. ]
  6902. }
  6903. },
  6904. "/sync/replay": {
  6905. "post": {
  6906. "tags": ["sync"],
  6907. "operationId": "sync.replay",
  6908. "parameters": [
  6909. {
  6910. "name": "directory",
  6911. "in": "query",
  6912. "schema": {
  6913. "type": "string"
  6914. },
  6915. "required": false
  6916. },
  6917. {
  6918. "name": "workspace",
  6919. "in": "query",
  6920. "schema": {
  6921. "type": "string"
  6922. },
  6923. "required": false
  6924. }
  6925. ],
  6926. "responses": {
  6927. "200": {
  6928. "description": "Replayed sync events",
  6929. "content": {
  6930. "application/json": {
  6931. "schema": {
  6932. "type": "object",
  6933. "properties": {
  6934. "sessionID": {
  6935. "type": "string"
  6936. }
  6937. },
  6938. "required": ["sessionID"],
  6939. "additionalProperties": false,
  6940. "description": "Replayed sync events"
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "400": {
  6946. "description": "Bad request",
  6947. "content": {
  6948. "application/json": {
  6949. "schema": {
  6950. "$ref": "#/components/schemas/BadRequestError"
  6951. }
  6952. }
  6953. }
  6954. }
  6955. },
  6956. "description": "Validate and replay a complete sync event history.",
  6957. "summary": "Replay sync events",
  6958. "requestBody": {
  6959. "content": {
  6960. "application/json": {
  6961. "schema": {
  6962. "type": "object",
  6963. "properties": {
  6964. "directory": {
  6965. "type": "string"
  6966. },
  6967. "events": {
  6968. "type": "array",
  6969. "minItems": 1,
  6970. "items": {
  6971. "type": "object",
  6972. "properties": {
  6973. "id": {
  6974. "type": "string"
  6975. },
  6976. "aggregateID": {
  6977. "type": "string"
  6978. },
  6979. "seq": {
  6980. "type": "integer",
  6981. "minimum": 0
  6982. },
  6983. "type": {
  6984. "type": "string"
  6985. },
  6986. "data": {
  6987. "type": "object"
  6988. }
  6989. },
  6990. "required": ["id", "aggregateID", "seq", "type", "data"],
  6991. "additionalProperties": false
  6992. }
  6993. }
  6994. },
  6995. "required": ["directory", "events"],
  6996. "additionalProperties": false
  6997. }
  6998. }
  6999. }
  7000. },
  7001. "x-codeSamples": [
  7002. {
  7003. "lang": "js",
  7004. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7005. }
  7006. ]
  7007. }
  7008. },
  7009. "/sync/steal": {
  7010. "post": {
  7011. "tags": ["sync"],
  7012. "operationId": "sync.steal",
  7013. "parameters": [
  7014. {
  7015. "name": "directory",
  7016. "in": "query",
  7017. "schema": {
  7018. "type": "string"
  7019. },
  7020. "required": false
  7021. },
  7022. {
  7023. "name": "workspace",
  7024. "in": "query",
  7025. "schema": {
  7026. "type": "string"
  7027. },
  7028. "required": false
  7029. }
  7030. ],
  7031. "responses": {
  7032. "200": {
  7033. "description": "Session stolen into workspace",
  7034. "content": {
  7035. "application/json": {
  7036. "schema": {
  7037. "type": "object",
  7038. "properties": {
  7039. "sessionID": {
  7040. "type": "string",
  7041. "pattern": "^ses"
  7042. }
  7043. },
  7044. "required": ["sessionID"],
  7045. "additionalProperties": false,
  7046. "description": "Session stolen into workspace"
  7047. }
  7048. }
  7049. }
  7050. },
  7051. "400": {
  7052. "description": "Bad request",
  7053. "content": {
  7054. "application/json": {
  7055. "schema": {
  7056. "$ref": "#/components/schemas/BadRequestError"
  7057. }
  7058. }
  7059. }
  7060. }
  7061. },
  7062. "description": "Update a session to belong to the current workspace through the sync event system.",
  7063. "summary": "Steal session into workspace",
  7064. "requestBody": {
  7065. "content": {
  7066. "application/json": {
  7067. "schema": {
  7068. "type": "object",
  7069. "properties": {
  7070. "sessionID": {
  7071. "type": "string",
  7072. "pattern": "^ses"
  7073. }
  7074. },
  7075. "required": ["sessionID"],
  7076. "additionalProperties": false
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "x-codeSamples": [
  7082. {
  7083. "lang": "js",
  7084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7085. }
  7086. ]
  7087. }
  7088. },
  7089. "/sync/history": {
  7090. "post": {
  7091. "tags": ["sync"],
  7092. "operationId": "sync.history.list",
  7093. "parameters": [
  7094. {
  7095. "name": "directory",
  7096. "in": "query",
  7097. "schema": {
  7098. "type": "string"
  7099. },
  7100. "required": false
  7101. },
  7102. {
  7103. "name": "workspace",
  7104. "in": "query",
  7105. "schema": {
  7106. "type": "string"
  7107. },
  7108. "required": false
  7109. }
  7110. ],
  7111. "responses": {
  7112. "200": {
  7113. "description": "Sync events",
  7114. "content": {
  7115. "application/json": {
  7116. "schema": {
  7117. "type": "array",
  7118. "items": {
  7119. "type": "object",
  7120. "properties": {
  7121. "id": {
  7122. "type": "string"
  7123. },
  7124. "aggregate_id": {
  7125. "type": "string"
  7126. },
  7127. "seq": {
  7128. "type": "integer",
  7129. "minimum": 0
  7130. },
  7131. "type": {
  7132. "type": "string"
  7133. },
  7134. "data": {
  7135. "type": "object"
  7136. }
  7137. },
  7138. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7139. "additionalProperties": false
  7140. },
  7141. "description": "Sync events"
  7142. }
  7143. }
  7144. }
  7145. },
  7146. "400": {
  7147. "description": "Bad request",
  7148. "content": {
  7149. "application/json": {
  7150. "schema": {
  7151. "$ref": "#/components/schemas/BadRequestError"
  7152. }
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "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.",
  7158. "summary": "List sync events",
  7159. "requestBody": {
  7160. "content": {
  7161. "application/json": {
  7162. "schema": {
  7163. "type": "object",
  7164. "additionalProperties": {
  7165. "type": "integer",
  7166. "minimum": 0
  7167. }
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "x-codeSamples": [
  7173. {
  7174. "lang": "js",
  7175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7176. }
  7177. ]
  7178. }
  7179. },
  7180. "/api/session": {
  7181. "get": {
  7182. "tags": ["v2"],
  7183. "operationId": "v2.session.list",
  7184. "parameters": [
  7185. {
  7186. "name": "directory",
  7187. "in": "query",
  7188. "schema": {
  7189. "type": "string"
  7190. },
  7191. "required": false
  7192. },
  7193. {
  7194. "name": "workspace",
  7195. "in": "query",
  7196. "schema": {
  7197. "type": "string"
  7198. },
  7199. "required": false
  7200. },
  7201. {
  7202. "name": "limit",
  7203. "in": "query",
  7204. "schema": {
  7205. "type": "number"
  7206. },
  7207. "required": false
  7208. },
  7209. {
  7210. "name": "order",
  7211. "in": "query",
  7212. "schema": {
  7213. "type": "string",
  7214. "enum": ["asc", "desc"]
  7215. },
  7216. "required": false
  7217. },
  7218. {
  7219. "name": "path",
  7220. "in": "query",
  7221. "schema": {
  7222. "type": "string"
  7223. },
  7224. "required": false
  7225. },
  7226. {
  7227. "name": "roots",
  7228. "in": "query",
  7229. "schema": {
  7230. "anyOf": [
  7231. {
  7232. "type": "boolean"
  7233. },
  7234. {
  7235. "type": "string",
  7236. "enum": ["true", "false"]
  7237. }
  7238. ]
  7239. },
  7240. "required": false
  7241. },
  7242. {
  7243. "name": "start",
  7244. "in": "query",
  7245. "schema": {
  7246. "type": "number"
  7247. },
  7248. "required": false
  7249. },
  7250. {
  7251. "name": "search",
  7252. "in": "query",
  7253. "schema": {
  7254. "type": "string"
  7255. },
  7256. "required": false
  7257. },
  7258. {
  7259. "name": "cursor",
  7260. "in": "query",
  7261. "schema": {
  7262. "type": "string",
  7263. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7264. },
  7265. "required": false
  7266. }
  7267. ],
  7268. "responses": {
  7269. "200": {
  7270. "description": "V2SessionsResponse",
  7271. "content": {
  7272. "application/json": {
  7273. "schema": {
  7274. "$ref": "#/components/schemas/V2SessionsResponse"
  7275. }
  7276. }
  7277. }
  7278. },
  7279. "400": {
  7280. "description": "Bad request",
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "$ref": "#/components/schemas/BadRequestError"
  7285. }
  7286. }
  7287. }
  7288. }
  7289. },
  7290. "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.",
  7291. "summary": "List v2 sessions",
  7292. "x-codeSamples": [
  7293. {
  7294. "lang": "js",
  7295. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7296. }
  7297. ]
  7298. }
  7299. },
  7300. "/api/session/{sessionID}/prompt": {
  7301. "post": {
  7302. "tags": ["v2"],
  7303. "operationId": "v2.session.prompt",
  7304. "parameters": [
  7305. {
  7306. "name": "sessionID",
  7307. "in": "path",
  7308. "schema": {
  7309. "type": "string",
  7310. "pattern": "^ses"
  7311. },
  7312. "required": true
  7313. },
  7314. {
  7315. "name": "directory",
  7316. "in": "query",
  7317. "schema": {
  7318. "type": "string"
  7319. },
  7320. "required": false
  7321. },
  7322. {
  7323. "name": "workspace",
  7324. "in": "query",
  7325. "schema": {
  7326. "type": "string"
  7327. },
  7328. "required": false
  7329. }
  7330. ],
  7331. "responses": {
  7332. "200": {
  7333. "description": "Session.Message",
  7334. "content": {
  7335. "application/json": {
  7336. "schema": {
  7337. "$ref": "#/components/schemas/SessionMessage"
  7338. }
  7339. }
  7340. }
  7341. }
  7342. },
  7343. "description": "Create a v2 session message and queue it for the agent loop.",
  7344. "summary": "Send v2 message",
  7345. "requestBody": {
  7346. "content": {
  7347. "application/json": {
  7348. "schema": {
  7349. "type": "object",
  7350. "properties": {
  7351. "prompt": {
  7352. "$ref": "#/components/schemas/Prompt"
  7353. },
  7354. "delivery": {
  7355. "$ref": "#/components/schemas/SessionDelivery"
  7356. }
  7357. },
  7358. "required": ["prompt"],
  7359. "additionalProperties": false
  7360. }
  7361. }
  7362. }
  7363. },
  7364. "x-codeSamples": [
  7365. {
  7366. "lang": "js",
  7367. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7368. }
  7369. ]
  7370. }
  7371. },
  7372. "/api/session/{sessionID}/compact": {
  7373. "post": {
  7374. "tags": ["v2"],
  7375. "operationId": "v2.session.compact",
  7376. "parameters": [
  7377. {
  7378. "name": "sessionID",
  7379. "in": "path",
  7380. "schema": {
  7381. "type": "string",
  7382. "pattern": "^ses"
  7383. },
  7384. "required": true
  7385. },
  7386. {
  7387. "name": "directory",
  7388. "in": "query",
  7389. "schema": {
  7390. "type": "string"
  7391. },
  7392. "required": false
  7393. },
  7394. {
  7395. "name": "workspace",
  7396. "in": "query",
  7397. "schema": {
  7398. "type": "string"
  7399. },
  7400. "required": false
  7401. }
  7402. ],
  7403. "responses": {
  7404. "204": {
  7405. "description": "<No Content>"
  7406. }
  7407. },
  7408. "description": "Compact a v2 session conversation.",
  7409. "summary": "Compact v2 session",
  7410. "x-codeSamples": [
  7411. {
  7412. "lang": "js",
  7413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7414. }
  7415. ]
  7416. }
  7417. },
  7418. "/api/session/{sessionID}/wait": {
  7419. "post": {
  7420. "tags": ["v2"],
  7421. "operationId": "v2.session.wait",
  7422. "parameters": [
  7423. {
  7424. "name": "sessionID",
  7425. "in": "path",
  7426. "schema": {
  7427. "type": "string",
  7428. "pattern": "^ses"
  7429. },
  7430. "required": true
  7431. },
  7432. {
  7433. "name": "directory",
  7434. "in": "query",
  7435. "schema": {
  7436. "type": "string"
  7437. },
  7438. "required": false
  7439. },
  7440. {
  7441. "name": "workspace",
  7442. "in": "query",
  7443. "schema": {
  7444. "type": "string"
  7445. },
  7446. "required": false
  7447. }
  7448. ],
  7449. "responses": {
  7450. "204": {
  7451. "description": "<No Content>"
  7452. }
  7453. },
  7454. "description": "Wait for a v2 session agent loop to become idle.",
  7455. "summary": "Wait for v2 session",
  7456. "x-codeSamples": [
  7457. {
  7458. "lang": "js",
  7459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7460. }
  7461. ]
  7462. }
  7463. },
  7464. "/api/session/{sessionID}/context": {
  7465. "get": {
  7466. "tags": ["v2"],
  7467. "operationId": "v2.session.context",
  7468. "parameters": [
  7469. {
  7470. "name": "sessionID",
  7471. "in": "path",
  7472. "schema": {
  7473. "type": "string",
  7474. "pattern": "^ses"
  7475. },
  7476. "required": true
  7477. },
  7478. {
  7479. "name": "directory",
  7480. "in": "query",
  7481. "schema": {
  7482. "type": "string"
  7483. },
  7484. "required": false
  7485. },
  7486. {
  7487. "name": "workspace",
  7488. "in": "query",
  7489. "schema": {
  7490. "type": "string"
  7491. },
  7492. "required": false
  7493. }
  7494. ],
  7495. "responses": {
  7496. "200": {
  7497. "description": "Success",
  7498. "content": {
  7499. "application/json": {
  7500. "schema": {
  7501. "type": "array",
  7502. "items": {
  7503. "$ref": "#/components/schemas/SessionMessage"
  7504. }
  7505. }
  7506. }
  7507. }
  7508. }
  7509. },
  7510. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7511. "summary": "Get v2 session context",
  7512. "x-codeSamples": [
  7513. {
  7514. "lang": "js",
  7515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7516. }
  7517. ]
  7518. }
  7519. },
  7520. "/api/session/{sessionID}/message": {
  7521. "get": {
  7522. "tags": ["v2 messages"],
  7523. "operationId": "v2.session.messages",
  7524. "parameters": [
  7525. {
  7526. "name": "sessionID",
  7527. "in": "path",
  7528. "schema": {
  7529. "type": "string",
  7530. "pattern": "^ses"
  7531. },
  7532. "required": true
  7533. },
  7534. {
  7535. "name": "directory",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. },
  7542. {
  7543. "name": "workspace",
  7544. "in": "query",
  7545. "schema": {
  7546. "type": "string"
  7547. },
  7548. "required": false
  7549. },
  7550. {
  7551. "name": "limit",
  7552. "in": "query",
  7553. "schema": {
  7554. "type": "number"
  7555. },
  7556. "required": false
  7557. },
  7558. {
  7559. "name": "order",
  7560. "in": "query",
  7561. "schema": {
  7562. "type": "string",
  7563. "enum": ["asc", "desc"]
  7564. },
  7565. "required": false
  7566. },
  7567. {
  7568. "name": "cursor",
  7569. "in": "query",
  7570. "schema": {
  7571. "type": "string",
  7572. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7573. },
  7574. "required": false
  7575. }
  7576. ],
  7577. "responses": {
  7578. "200": {
  7579. "description": "V2SessionMessagesResponse",
  7580. "content": {
  7581. "application/json": {
  7582. "schema": {
  7583. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7584. }
  7585. }
  7586. }
  7587. },
  7588. "400": {
  7589. "description": "Bad request",
  7590. "content": {
  7591. "application/json": {
  7592. "schema": {
  7593. "$ref": "#/components/schemas/BadRequestError"
  7594. }
  7595. }
  7596. }
  7597. }
  7598. },
  7599. "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.",
  7600. "summary": "Get v2 session messages",
  7601. "x-codeSamples": [
  7602. {
  7603. "lang": "js",
  7604. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7605. }
  7606. ]
  7607. }
  7608. },
  7609. "/api/model": {
  7610. "get": {
  7611. "tags": ["v2 models"],
  7612. "operationId": "v2.model.list",
  7613. "parameters": [
  7614. {
  7615. "name": "location",
  7616. "in": "query",
  7617. "schema": {
  7618. "type": "object",
  7619. "properties": {
  7620. "directory": {
  7621. "type": "string"
  7622. },
  7623. "workspace": {
  7624. "type": "string"
  7625. }
  7626. },
  7627. "additionalProperties": false
  7628. },
  7629. "required": false,
  7630. "style": "deepObject",
  7631. "explode": true
  7632. }
  7633. ],
  7634. "responses": {
  7635. "200": {
  7636. "description": "Success",
  7637. "content": {
  7638. "application/json": {
  7639. "schema": {
  7640. "type": "array",
  7641. "items": {
  7642. "$ref": "#/components/schemas/ModelV2Info"
  7643. }
  7644. }
  7645. }
  7646. }
  7647. }
  7648. },
  7649. "description": "Retrieve available v2 models ordered by release date.",
  7650. "summary": "List v2 models",
  7651. "x-codeSamples": [
  7652. {
  7653. "lang": "js",
  7654. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  7655. }
  7656. ]
  7657. }
  7658. },
  7659. "/api/provider": {
  7660. "get": {
  7661. "tags": ["v2 providers"],
  7662. "operationId": "v2.provider.list",
  7663. "parameters": [
  7664. {
  7665. "name": "location",
  7666. "in": "query",
  7667. "schema": {
  7668. "type": "object",
  7669. "properties": {
  7670. "directory": {
  7671. "type": "string"
  7672. },
  7673. "workspace": {
  7674. "type": "string"
  7675. }
  7676. },
  7677. "additionalProperties": false
  7678. },
  7679. "required": false,
  7680. "style": "deepObject",
  7681. "explode": true
  7682. }
  7683. ],
  7684. "responses": {
  7685. "200": {
  7686. "description": "Success",
  7687. "content": {
  7688. "application/json": {
  7689. "schema": {
  7690. "type": "array",
  7691. "items": {
  7692. "$ref": "#/components/schemas/ProviderV2Info"
  7693. }
  7694. }
  7695. }
  7696. }
  7697. }
  7698. },
  7699. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  7700. "summary": "List v2 providers",
  7701. "x-codeSamples": [
  7702. {
  7703. "lang": "js",
  7704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  7705. }
  7706. ]
  7707. }
  7708. },
  7709. "/api/provider/{providerID}": {
  7710. "get": {
  7711. "tags": ["v2 providers"],
  7712. "operationId": "v2.provider.get",
  7713. "parameters": [
  7714. {
  7715. "name": "providerID",
  7716. "in": "path",
  7717. "schema": {
  7718. "type": "string"
  7719. },
  7720. "required": true
  7721. },
  7722. {
  7723. "name": "location",
  7724. "in": "query",
  7725. "schema": {
  7726. "type": "object",
  7727. "properties": {
  7728. "directory": {
  7729. "type": "string"
  7730. },
  7731. "workspace": {
  7732. "type": "string"
  7733. }
  7734. },
  7735. "additionalProperties": false
  7736. },
  7737. "required": false,
  7738. "style": "deepObject",
  7739. "explode": true
  7740. }
  7741. ],
  7742. "responses": {
  7743. "200": {
  7744. "description": "ProviderV2.Info",
  7745. "content": {
  7746. "application/json": {
  7747. "schema": {
  7748. "$ref": "#/components/schemas/ProviderV2Info"
  7749. }
  7750. }
  7751. }
  7752. },
  7753. "404": {
  7754. "description": "NotFoundError",
  7755. "content": {
  7756. "application/json": {
  7757. "schema": {
  7758. "$ref": "#/components/schemas/NotFoundError"
  7759. }
  7760. }
  7761. }
  7762. }
  7763. },
  7764. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  7765. "summary": "Get v2 provider",
  7766. "x-codeSamples": [
  7767. {
  7768. "lang": "js",
  7769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  7770. }
  7771. ]
  7772. }
  7773. },
  7774. "/tui/append-prompt": {
  7775. "post": {
  7776. "tags": ["tui"],
  7777. "operationId": "tui.appendPrompt",
  7778. "parameters": [
  7779. {
  7780. "name": "directory",
  7781. "in": "query",
  7782. "schema": {
  7783. "type": "string"
  7784. },
  7785. "required": false
  7786. },
  7787. {
  7788. "name": "workspace",
  7789. "in": "query",
  7790. "schema": {
  7791. "type": "string"
  7792. },
  7793. "required": false
  7794. }
  7795. ],
  7796. "responses": {
  7797. "200": {
  7798. "description": "Prompt processed successfully",
  7799. "content": {
  7800. "application/json": {
  7801. "schema": {
  7802. "type": "boolean",
  7803. "description": "Prompt processed successfully"
  7804. }
  7805. }
  7806. }
  7807. },
  7808. "400": {
  7809. "description": "Bad request",
  7810. "content": {
  7811. "application/json": {
  7812. "schema": {
  7813. "$ref": "#/components/schemas/BadRequestError"
  7814. }
  7815. }
  7816. }
  7817. }
  7818. },
  7819. "description": "Append prompt to the TUI.",
  7820. "summary": "Append TUI prompt",
  7821. "requestBody": {
  7822. "content": {
  7823. "application/json": {
  7824. "schema": {
  7825. "type": "object",
  7826. "properties": {
  7827. "text": {
  7828. "type": "string"
  7829. }
  7830. },
  7831. "required": ["text"],
  7832. "additionalProperties": false
  7833. }
  7834. }
  7835. }
  7836. },
  7837. "x-codeSamples": [
  7838. {
  7839. "lang": "js",
  7840. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7841. }
  7842. ]
  7843. }
  7844. },
  7845. "/tui/open-help": {
  7846. "post": {
  7847. "tags": ["tui"],
  7848. "operationId": "tui.openHelp",
  7849. "parameters": [
  7850. {
  7851. "name": "directory",
  7852. "in": "query",
  7853. "schema": {
  7854. "type": "string"
  7855. },
  7856. "required": false
  7857. },
  7858. {
  7859. "name": "workspace",
  7860. "in": "query",
  7861. "schema": {
  7862. "type": "string"
  7863. },
  7864. "required": false
  7865. }
  7866. ],
  7867. "responses": {
  7868. "200": {
  7869. "description": "Help dialog opened successfully",
  7870. "content": {
  7871. "application/json": {
  7872. "schema": {
  7873. "type": "boolean",
  7874. "description": "Help dialog opened successfully"
  7875. }
  7876. }
  7877. }
  7878. }
  7879. },
  7880. "description": "Open the help dialog in the TUI to display user assistance information.",
  7881. "summary": "Open help dialog",
  7882. "x-codeSamples": [
  7883. {
  7884. "lang": "js",
  7885. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7886. }
  7887. ]
  7888. }
  7889. },
  7890. "/tui/open-sessions": {
  7891. "post": {
  7892. "tags": ["tui"],
  7893. "operationId": "tui.openSessions",
  7894. "parameters": [
  7895. {
  7896. "name": "directory",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. },
  7903. {
  7904. "name": "workspace",
  7905. "in": "query",
  7906. "schema": {
  7907. "type": "string"
  7908. },
  7909. "required": false
  7910. }
  7911. ],
  7912. "responses": {
  7913. "200": {
  7914. "description": "Session dialog opened successfully",
  7915. "content": {
  7916. "application/json": {
  7917. "schema": {
  7918. "type": "boolean",
  7919. "description": "Session dialog opened successfully"
  7920. }
  7921. }
  7922. }
  7923. }
  7924. },
  7925. "description": "Open the session dialog.",
  7926. "summary": "Open sessions dialog",
  7927. "x-codeSamples": [
  7928. {
  7929. "lang": "js",
  7930. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7931. }
  7932. ]
  7933. }
  7934. },
  7935. "/tui/open-themes": {
  7936. "post": {
  7937. "tags": ["tui"],
  7938. "operationId": "tui.openThemes",
  7939. "parameters": [
  7940. {
  7941. "name": "directory",
  7942. "in": "query",
  7943. "schema": {
  7944. "type": "string"
  7945. },
  7946. "required": false
  7947. },
  7948. {
  7949. "name": "workspace",
  7950. "in": "query",
  7951. "schema": {
  7952. "type": "string"
  7953. },
  7954. "required": false
  7955. }
  7956. ],
  7957. "responses": {
  7958. "200": {
  7959. "description": "Theme dialog opened successfully",
  7960. "content": {
  7961. "application/json": {
  7962. "schema": {
  7963. "type": "boolean",
  7964. "description": "Theme dialog opened successfully"
  7965. }
  7966. }
  7967. }
  7968. }
  7969. },
  7970. "description": "Open the theme dialog.",
  7971. "summary": "Open themes dialog",
  7972. "x-codeSamples": [
  7973. {
  7974. "lang": "js",
  7975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7976. }
  7977. ]
  7978. }
  7979. },
  7980. "/tui/open-models": {
  7981. "post": {
  7982. "tags": ["tui"],
  7983. "operationId": "tui.openModels",
  7984. "parameters": [
  7985. {
  7986. "name": "directory",
  7987. "in": "query",
  7988. "schema": {
  7989. "type": "string"
  7990. },
  7991. "required": false
  7992. },
  7993. {
  7994. "name": "workspace",
  7995. "in": "query",
  7996. "schema": {
  7997. "type": "string"
  7998. },
  7999. "required": false
  8000. }
  8001. ],
  8002. "responses": {
  8003. "200": {
  8004. "description": "Model dialog opened successfully",
  8005. "content": {
  8006. "application/json": {
  8007. "schema": {
  8008. "type": "boolean",
  8009. "description": "Model dialog opened successfully"
  8010. }
  8011. }
  8012. }
  8013. }
  8014. },
  8015. "description": "Open the model dialog.",
  8016. "summary": "Open models dialog",
  8017. "x-codeSamples": [
  8018. {
  8019. "lang": "js",
  8020. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8021. }
  8022. ]
  8023. }
  8024. },
  8025. "/tui/submit-prompt": {
  8026. "post": {
  8027. "tags": ["tui"],
  8028. "operationId": "tui.submitPrompt",
  8029. "parameters": [
  8030. {
  8031. "name": "directory",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "workspace",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "string"
  8043. },
  8044. "required": false
  8045. }
  8046. ],
  8047. "responses": {
  8048. "200": {
  8049. "description": "Prompt submitted successfully",
  8050. "content": {
  8051. "application/json": {
  8052. "schema": {
  8053. "type": "boolean",
  8054. "description": "Prompt submitted successfully"
  8055. }
  8056. }
  8057. }
  8058. }
  8059. },
  8060. "description": "Submit the prompt.",
  8061. "summary": "Submit TUI prompt",
  8062. "x-codeSamples": [
  8063. {
  8064. "lang": "js",
  8065. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8066. }
  8067. ]
  8068. }
  8069. },
  8070. "/tui/clear-prompt": {
  8071. "post": {
  8072. "tags": ["tui"],
  8073. "operationId": "tui.clearPrompt",
  8074. "parameters": [
  8075. {
  8076. "name": "directory",
  8077. "in": "query",
  8078. "schema": {
  8079. "type": "string"
  8080. },
  8081. "required": false
  8082. },
  8083. {
  8084. "name": "workspace",
  8085. "in": "query",
  8086. "schema": {
  8087. "type": "string"
  8088. },
  8089. "required": false
  8090. }
  8091. ],
  8092. "responses": {
  8093. "200": {
  8094. "description": "Prompt cleared successfully",
  8095. "content": {
  8096. "application/json": {
  8097. "schema": {
  8098. "type": "boolean",
  8099. "description": "Prompt cleared successfully"
  8100. }
  8101. }
  8102. }
  8103. }
  8104. },
  8105. "description": "Clear the prompt.",
  8106. "summary": "Clear TUI prompt",
  8107. "x-codeSamples": [
  8108. {
  8109. "lang": "js",
  8110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8111. }
  8112. ]
  8113. }
  8114. },
  8115. "/tui/execute-command": {
  8116. "post": {
  8117. "tags": ["tui"],
  8118. "operationId": "tui.executeCommand",
  8119. "parameters": [
  8120. {
  8121. "name": "directory",
  8122. "in": "query",
  8123. "schema": {
  8124. "type": "string"
  8125. },
  8126. "required": false
  8127. },
  8128. {
  8129. "name": "workspace",
  8130. "in": "query",
  8131. "schema": {
  8132. "type": "string"
  8133. },
  8134. "required": false
  8135. }
  8136. ],
  8137. "responses": {
  8138. "200": {
  8139. "description": "Command executed successfully",
  8140. "content": {
  8141. "application/json": {
  8142. "schema": {
  8143. "type": "boolean",
  8144. "description": "Command executed successfully"
  8145. }
  8146. }
  8147. }
  8148. },
  8149. "400": {
  8150. "description": "Bad request",
  8151. "content": {
  8152. "application/json": {
  8153. "schema": {
  8154. "$ref": "#/components/schemas/BadRequestError"
  8155. }
  8156. }
  8157. }
  8158. }
  8159. },
  8160. "description": "Execute a TUI command.",
  8161. "summary": "Execute TUI command",
  8162. "requestBody": {
  8163. "content": {
  8164. "application/json": {
  8165. "schema": {
  8166. "type": "object",
  8167. "properties": {
  8168. "command": {
  8169. "type": "string"
  8170. }
  8171. },
  8172. "required": ["command"],
  8173. "additionalProperties": false
  8174. }
  8175. }
  8176. }
  8177. },
  8178. "x-codeSamples": [
  8179. {
  8180. "lang": "js",
  8181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8182. }
  8183. ]
  8184. }
  8185. },
  8186. "/tui/show-toast": {
  8187. "post": {
  8188. "tags": ["tui"],
  8189. "operationId": "tui.showToast",
  8190. "parameters": [
  8191. {
  8192. "name": "directory",
  8193. "in": "query",
  8194. "schema": {
  8195. "type": "string"
  8196. },
  8197. "required": false
  8198. },
  8199. {
  8200. "name": "workspace",
  8201. "in": "query",
  8202. "schema": {
  8203. "type": "string"
  8204. },
  8205. "required": false
  8206. }
  8207. ],
  8208. "responses": {
  8209. "200": {
  8210. "description": "Toast notification shown successfully",
  8211. "content": {
  8212. "application/json": {
  8213. "schema": {
  8214. "type": "boolean",
  8215. "description": "Toast notification shown successfully"
  8216. }
  8217. }
  8218. }
  8219. }
  8220. },
  8221. "description": "Show a toast notification in the TUI.",
  8222. "summary": "Show TUI toast",
  8223. "requestBody": {
  8224. "content": {
  8225. "application/json": {
  8226. "schema": {
  8227. "type": "object",
  8228. "properties": {
  8229. "title": {
  8230. "type": "string"
  8231. },
  8232. "message": {
  8233. "type": "string"
  8234. },
  8235. "variant": {
  8236. "type": "string",
  8237. "enum": ["info", "success", "warning", "error"]
  8238. },
  8239. "duration": {
  8240. "type": "integer",
  8241. "exclusiveMinimum": 0
  8242. }
  8243. },
  8244. "required": ["message", "variant"],
  8245. "additionalProperties": false
  8246. }
  8247. }
  8248. }
  8249. },
  8250. "x-codeSamples": [
  8251. {
  8252. "lang": "js",
  8253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8254. }
  8255. ]
  8256. }
  8257. },
  8258. "/tui/publish": {
  8259. "post": {
  8260. "tags": ["tui"],
  8261. "operationId": "tui.publish",
  8262. "parameters": [
  8263. {
  8264. "name": "directory",
  8265. "in": "query",
  8266. "schema": {
  8267. "type": "string"
  8268. },
  8269. "required": false
  8270. },
  8271. {
  8272. "name": "workspace",
  8273. "in": "query",
  8274. "schema": {
  8275. "type": "string"
  8276. },
  8277. "required": false
  8278. }
  8279. ],
  8280. "responses": {
  8281. "200": {
  8282. "description": "Event published successfully",
  8283. "content": {
  8284. "application/json": {
  8285. "schema": {
  8286. "type": "boolean",
  8287. "description": "Event published successfully"
  8288. }
  8289. }
  8290. }
  8291. },
  8292. "400": {
  8293. "description": "Bad request",
  8294. "content": {
  8295. "application/json": {
  8296. "schema": {
  8297. "$ref": "#/components/schemas/BadRequestError"
  8298. }
  8299. }
  8300. }
  8301. }
  8302. },
  8303. "description": "Publish a TUI event.",
  8304. "summary": "Publish TUI event",
  8305. "requestBody": {
  8306. "content": {
  8307. "application/json": {
  8308. "schema": {
  8309. "anyOf": [
  8310. {
  8311. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8312. },
  8313. {
  8314. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8315. },
  8316. {
  8317. "$ref": "#/components/schemas/EventTuiToastShow"
  8318. },
  8319. {
  8320. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8321. }
  8322. ]
  8323. }
  8324. }
  8325. }
  8326. },
  8327. "x-codeSamples": [
  8328. {
  8329. "lang": "js",
  8330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8331. }
  8332. ]
  8333. }
  8334. },
  8335. "/tui/select-session": {
  8336. "post": {
  8337. "tags": ["tui"],
  8338. "operationId": "tui.selectSession",
  8339. "parameters": [
  8340. {
  8341. "name": "directory",
  8342. "in": "query",
  8343. "schema": {
  8344. "type": "string"
  8345. },
  8346. "required": false
  8347. },
  8348. {
  8349. "name": "workspace",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. }
  8356. ],
  8357. "responses": {
  8358. "200": {
  8359. "description": "Session selected successfully",
  8360. "content": {
  8361. "application/json": {
  8362. "schema": {
  8363. "type": "boolean",
  8364. "description": "Session selected successfully"
  8365. }
  8366. }
  8367. }
  8368. },
  8369. "400": {
  8370. "description": "Bad request",
  8371. "content": {
  8372. "application/json": {
  8373. "schema": {
  8374. "$ref": "#/components/schemas/BadRequestError"
  8375. }
  8376. }
  8377. }
  8378. },
  8379. "404": {
  8380. "description": "NotFoundError",
  8381. "content": {
  8382. "application/json": {
  8383. "schema": {
  8384. "$ref": "#/components/schemas/NotFoundError"
  8385. }
  8386. }
  8387. }
  8388. }
  8389. },
  8390. "description": "Navigate the TUI to display the specified session.",
  8391. "summary": "Select session",
  8392. "requestBody": {
  8393. "content": {
  8394. "application/json": {
  8395. "schema": {
  8396. "type": "object",
  8397. "properties": {
  8398. "sessionID": {
  8399. "type": "string",
  8400. "pattern": "^ses",
  8401. "description": "Session ID to navigate to"
  8402. }
  8403. },
  8404. "required": ["sessionID"],
  8405. "additionalProperties": false
  8406. }
  8407. }
  8408. }
  8409. },
  8410. "x-codeSamples": [
  8411. {
  8412. "lang": "js",
  8413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8414. }
  8415. ]
  8416. }
  8417. },
  8418. "/tui/control/next": {
  8419. "get": {
  8420. "tags": ["tui"],
  8421. "operationId": "tui.control.next",
  8422. "parameters": [
  8423. {
  8424. "name": "directory",
  8425. "in": "query",
  8426. "schema": {
  8427. "type": "string"
  8428. },
  8429. "required": false
  8430. },
  8431. {
  8432. "name": "workspace",
  8433. "in": "query",
  8434. "schema": {
  8435. "type": "string"
  8436. },
  8437. "required": false
  8438. }
  8439. ],
  8440. "responses": {
  8441. "200": {
  8442. "description": "Next TUI request",
  8443. "content": {
  8444. "application/json": {
  8445. "schema": {
  8446. "type": "object",
  8447. "properties": {
  8448. "path": {
  8449. "type": "string"
  8450. },
  8451. "body": {}
  8452. },
  8453. "required": ["path", "body"],
  8454. "additionalProperties": false,
  8455. "description": "Next TUI request"
  8456. }
  8457. }
  8458. }
  8459. }
  8460. },
  8461. "description": "Retrieve the next TUI request from the queue for processing.",
  8462. "summary": "Get next TUI request",
  8463. "x-codeSamples": [
  8464. {
  8465. "lang": "js",
  8466. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8467. }
  8468. ]
  8469. }
  8470. },
  8471. "/tui/control/response": {
  8472. "post": {
  8473. "tags": ["tui"],
  8474. "operationId": "tui.control.response",
  8475. "parameters": [
  8476. {
  8477. "name": "directory",
  8478. "in": "query",
  8479. "schema": {
  8480. "type": "string"
  8481. },
  8482. "required": false
  8483. },
  8484. {
  8485. "name": "workspace",
  8486. "in": "query",
  8487. "schema": {
  8488. "type": "string"
  8489. },
  8490. "required": false
  8491. }
  8492. ],
  8493. "responses": {
  8494. "200": {
  8495. "description": "Response submitted successfully",
  8496. "content": {
  8497. "application/json": {
  8498. "schema": {
  8499. "type": "boolean",
  8500. "description": "Response submitted successfully"
  8501. }
  8502. }
  8503. }
  8504. }
  8505. },
  8506. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8507. "summary": "Submit TUI response",
  8508. "requestBody": {
  8509. "content": {
  8510. "application/json": {
  8511. "schema": {}
  8512. }
  8513. }
  8514. },
  8515. "x-codeSamples": [
  8516. {
  8517. "lang": "js",
  8518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8519. }
  8520. ]
  8521. }
  8522. },
  8523. "/experimental/workspace/adapter": {
  8524. "get": {
  8525. "tags": ["workspace"],
  8526. "operationId": "experimental.workspace.adapter.list",
  8527. "parameters": [
  8528. {
  8529. "name": "directory",
  8530. "in": "query",
  8531. "schema": {
  8532. "type": "string"
  8533. },
  8534. "required": false
  8535. },
  8536. {
  8537. "name": "workspace",
  8538. "in": "query",
  8539. "schema": {
  8540. "type": "string"
  8541. },
  8542. "required": false
  8543. }
  8544. ],
  8545. "responses": {
  8546. "200": {
  8547. "description": "Workspace adapters",
  8548. "content": {
  8549. "application/json": {
  8550. "schema": {
  8551. "type": "array",
  8552. "items": {
  8553. "type": "object",
  8554. "properties": {
  8555. "type": {
  8556. "type": "string"
  8557. },
  8558. "name": {
  8559. "type": "string"
  8560. },
  8561. "description": {
  8562. "type": "string"
  8563. }
  8564. },
  8565. "required": ["type", "name", "description"],
  8566. "additionalProperties": false
  8567. },
  8568. "description": "Workspace adapters"
  8569. }
  8570. }
  8571. }
  8572. }
  8573. },
  8574. "description": "List all available workspace adapters for the current project.",
  8575. "summary": "List workspace adapters",
  8576. "x-codeSamples": [
  8577. {
  8578. "lang": "js",
  8579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8580. }
  8581. ]
  8582. }
  8583. },
  8584. "/experimental/workspace": {
  8585. "get": {
  8586. "tags": ["workspace"],
  8587. "operationId": "experimental.workspace.list",
  8588. "parameters": [
  8589. {
  8590. "name": "directory",
  8591. "in": "query",
  8592. "schema": {
  8593. "type": "string"
  8594. },
  8595. "required": false
  8596. },
  8597. {
  8598. "name": "workspace",
  8599. "in": "query",
  8600. "schema": {
  8601. "type": "string"
  8602. },
  8603. "required": false
  8604. }
  8605. ],
  8606. "responses": {
  8607. "200": {
  8608. "description": "Workspaces",
  8609. "content": {
  8610. "application/json": {
  8611. "schema": {
  8612. "type": "array",
  8613. "items": {
  8614. "$ref": "#/components/schemas/Workspace"
  8615. },
  8616. "description": "Workspaces"
  8617. }
  8618. }
  8619. }
  8620. }
  8621. },
  8622. "description": "List all workspaces.",
  8623. "summary": "List workspaces",
  8624. "x-codeSamples": [
  8625. {
  8626. "lang": "js",
  8627. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8628. }
  8629. ]
  8630. },
  8631. "post": {
  8632. "tags": ["workspace"],
  8633. "operationId": "experimental.workspace.create",
  8634. "parameters": [
  8635. {
  8636. "name": "directory",
  8637. "in": "query",
  8638. "schema": {
  8639. "type": "string"
  8640. },
  8641. "required": false
  8642. },
  8643. {
  8644. "name": "workspace",
  8645. "in": "query",
  8646. "schema": {
  8647. "type": "string"
  8648. },
  8649. "required": false
  8650. }
  8651. ],
  8652. "responses": {
  8653. "200": {
  8654. "description": "Workspace created",
  8655. "content": {
  8656. "application/json": {
  8657. "schema": {
  8658. "$ref": "#/components/schemas/Workspace"
  8659. }
  8660. }
  8661. }
  8662. },
  8663. "400": {
  8664. "description": "Bad request",
  8665. "content": {
  8666. "application/json": {
  8667. "schema": {
  8668. "$ref": "#/components/schemas/BadRequestError"
  8669. }
  8670. }
  8671. }
  8672. }
  8673. },
  8674. "description": "Create a workspace for the current project.",
  8675. "summary": "Create workspace",
  8676. "requestBody": {
  8677. "content": {
  8678. "application/json": {
  8679. "schema": {
  8680. "type": "object",
  8681. "properties": {
  8682. "id": {
  8683. "type": "string",
  8684. "pattern": "^wrk"
  8685. },
  8686. "type": {
  8687. "type": "string"
  8688. },
  8689. "branch": {
  8690. "anyOf": [
  8691. {
  8692. "type": "string"
  8693. },
  8694. {
  8695. "type": "null"
  8696. }
  8697. ]
  8698. },
  8699. "extra": {
  8700. "anyOf": [
  8701. {},
  8702. {
  8703. "type": "null"
  8704. }
  8705. ]
  8706. }
  8707. },
  8708. "required": ["type"],
  8709. "additionalProperties": false
  8710. }
  8711. }
  8712. }
  8713. },
  8714. "x-codeSamples": [
  8715. {
  8716. "lang": "js",
  8717. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8718. }
  8719. ]
  8720. }
  8721. },
  8722. "/experimental/workspace/sync-list": {
  8723. "post": {
  8724. "tags": ["workspace"],
  8725. "operationId": "experimental.workspace.syncList",
  8726. "parameters": [
  8727. {
  8728. "name": "directory",
  8729. "in": "query",
  8730. "schema": {
  8731. "type": "string"
  8732. },
  8733. "required": false
  8734. },
  8735. {
  8736. "name": "workspace",
  8737. "in": "query",
  8738. "schema": {
  8739. "type": "string"
  8740. },
  8741. "required": false
  8742. }
  8743. ],
  8744. "responses": {
  8745. "204": {
  8746. "description": "Workspace list synced"
  8747. }
  8748. },
  8749. "description": "Register missing workspaces returned by workspace adapters.",
  8750. "summary": "Sync workspace list",
  8751. "x-codeSamples": [
  8752. {
  8753. "lang": "js",
  8754. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8755. }
  8756. ]
  8757. }
  8758. },
  8759. "/experimental/workspace/status": {
  8760. "get": {
  8761. "tags": ["workspace"],
  8762. "operationId": "experimental.workspace.status",
  8763. "parameters": [
  8764. {
  8765. "name": "directory",
  8766. "in": "query",
  8767. "schema": {
  8768. "type": "string"
  8769. },
  8770. "required": false
  8771. },
  8772. {
  8773. "name": "workspace",
  8774. "in": "query",
  8775. "schema": {
  8776. "type": "string"
  8777. },
  8778. "required": false
  8779. }
  8780. ],
  8781. "responses": {
  8782. "200": {
  8783. "description": "Workspace status",
  8784. "content": {
  8785. "application/json": {
  8786. "schema": {
  8787. "type": "array",
  8788. "items": {
  8789. "type": "object",
  8790. "properties": {
  8791. "workspaceID": {
  8792. "type": "string",
  8793. "pattern": "^wrk"
  8794. },
  8795. "status": {
  8796. "type": "string",
  8797. "enum": ["connected", "connecting", "disconnected", "error"]
  8798. }
  8799. },
  8800. "required": ["workspaceID", "status"],
  8801. "additionalProperties": false
  8802. },
  8803. "description": "Workspace status"
  8804. }
  8805. }
  8806. }
  8807. }
  8808. },
  8809. "description": "Get connection status for workspaces in the current project.",
  8810. "summary": "Workspace status",
  8811. "x-codeSamples": [
  8812. {
  8813. "lang": "js",
  8814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8815. }
  8816. ]
  8817. }
  8818. },
  8819. "/experimental/workspace/{id}": {
  8820. "delete": {
  8821. "tags": ["workspace"],
  8822. "operationId": "experimental.workspace.remove",
  8823. "parameters": [
  8824. {
  8825. "name": "id",
  8826. "in": "path",
  8827. "schema": {
  8828. "type": "string",
  8829. "pattern": "^wrk"
  8830. },
  8831. "required": true
  8832. },
  8833. {
  8834. "name": "directory",
  8835. "in": "query",
  8836. "schema": {
  8837. "type": "string"
  8838. },
  8839. "required": false
  8840. },
  8841. {
  8842. "name": "workspace",
  8843. "in": "query",
  8844. "schema": {
  8845. "type": "string"
  8846. },
  8847. "required": false
  8848. }
  8849. ],
  8850. "responses": {
  8851. "200": {
  8852. "description": "Workspace removed",
  8853. "content": {
  8854. "application/json": {
  8855. "schema": {
  8856. "$ref": "#/components/schemas/Workspace"
  8857. }
  8858. }
  8859. }
  8860. },
  8861. "400": {
  8862. "description": "Bad request",
  8863. "content": {
  8864. "application/json": {
  8865. "schema": {
  8866. "$ref": "#/components/schemas/BadRequestError"
  8867. }
  8868. }
  8869. }
  8870. }
  8871. },
  8872. "description": "Remove an existing workspace.",
  8873. "summary": "Remove workspace",
  8874. "x-codeSamples": [
  8875. {
  8876. "lang": "js",
  8877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8878. }
  8879. ]
  8880. }
  8881. },
  8882. "/experimental/workspace/warp": {
  8883. "post": {
  8884. "tags": ["workspace"],
  8885. "operationId": "experimental.workspace.warp",
  8886. "parameters": [
  8887. {
  8888. "name": "directory",
  8889. "in": "query",
  8890. "schema": {
  8891. "type": "string"
  8892. },
  8893. "required": false
  8894. },
  8895. {
  8896. "name": "workspace",
  8897. "in": "query",
  8898. "schema": {
  8899. "type": "string"
  8900. },
  8901. "required": false
  8902. }
  8903. ],
  8904. "responses": {
  8905. "204": {
  8906. "description": "Session warped"
  8907. },
  8908. "400": {
  8909. "description": "WorkspaceWarpError | VcsApplyError",
  8910. "content": {
  8911. "application/json": {
  8912. "schema": {
  8913. "anyOf": [
  8914. {
  8915. "$ref": "#/components/schemas/WorkspaceWarpError"
  8916. },
  8917. {
  8918. "$ref": "#/components/schemas/VcsApplyError"
  8919. }
  8920. ]
  8921. }
  8922. }
  8923. }
  8924. }
  8925. },
  8926. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8927. "summary": "Warp session into workspace",
  8928. "requestBody": {
  8929. "content": {
  8930. "application/json": {
  8931. "schema": {
  8932. "type": "object",
  8933. "properties": {
  8934. "id": {
  8935. "anyOf": [
  8936. {
  8937. "type": "string",
  8938. "pattern": "^wrk"
  8939. },
  8940. {
  8941. "type": "null"
  8942. }
  8943. ]
  8944. },
  8945. "sessionID": {
  8946. "type": "string",
  8947. "pattern": "^ses"
  8948. },
  8949. "copyChanges": {
  8950. "type": "boolean"
  8951. }
  8952. },
  8953. "required": ["id", "sessionID"],
  8954. "additionalProperties": false
  8955. }
  8956. }
  8957. }
  8958. },
  8959. "x-codeSamples": [
  8960. {
  8961. "lang": "js",
  8962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8963. }
  8964. ]
  8965. }
  8966. },
  8967. "/pty/{ptyID}/connect": {
  8968. "get": {
  8969. "tags": ["pty"],
  8970. "operationId": "pty.connect",
  8971. "parameters": [
  8972. {
  8973. "name": "ptyID",
  8974. "in": "path",
  8975. "schema": {
  8976. "type": "string",
  8977. "pattern": "^pty"
  8978. },
  8979. "required": true
  8980. },
  8981. {
  8982. "name": "directory",
  8983. "in": "query",
  8984. "schema": {
  8985. "type": "string"
  8986. },
  8987. "required": false
  8988. },
  8989. {
  8990. "name": "workspace",
  8991. "in": "query",
  8992. "schema": {
  8993. "type": "string"
  8994. },
  8995. "required": false
  8996. }
  8997. ],
  8998. "responses": {
  8999. "200": {
  9000. "description": "Connected session",
  9001. "content": {
  9002. "application/json": {
  9003. "schema": {
  9004. "type": "boolean",
  9005. "description": "Connected session"
  9006. }
  9007. }
  9008. }
  9009. },
  9010. "403": {
  9011. "description": "Forbidden",
  9012. "content": {
  9013. "application/json": {
  9014. "schema": {
  9015. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  9016. }
  9017. }
  9018. }
  9019. },
  9020. "404": {
  9021. "description": "Not found",
  9022. "content": {
  9023. "application/json": {
  9024. "schema": {
  9025. "$ref": "#/components/schemas/NotFoundError"
  9026. }
  9027. }
  9028. }
  9029. }
  9030. },
  9031. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  9032. "summary": "Connect to PTY session",
  9033. "x-codeSamples": [
  9034. {
  9035. "lang": "js",
  9036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  9037. }
  9038. ]
  9039. }
  9040. }
  9041. },
  9042. "components": {
  9043. "schemas": {
  9044. "Event": {
  9045. "anyOf": [
  9046. {
  9047. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  9048. },
  9049. {
  9050. "$ref": "#/components/schemas/EventFileEdited"
  9051. },
  9052. {
  9053. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  9054. },
  9055. {
  9056. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  9057. },
  9058. {
  9059. "$ref": "#/components/schemas/EventLspUpdated"
  9060. },
  9061. {
  9062. "$ref": "#/components/schemas/EventMessagePartDelta"
  9063. },
  9064. {
  9065. "$ref": "#/components/schemas/EventPermissionAsked"
  9066. },
  9067. {
  9068. "$ref": "#/components/schemas/EventPermissionReplied"
  9069. },
  9070. {
  9071. "$ref": "#/components/schemas/EventSessionDiff"
  9072. },
  9073. {
  9074. "$ref": "#/components/schemas/EventSessionError"
  9075. },
  9076. {
  9077. "$ref": "#/components/schemas/EventQuestionAsked"
  9078. },
  9079. {
  9080. "$ref": "#/components/schemas/EventQuestionReplied"
  9081. },
  9082. {
  9083. "$ref": "#/components/schemas/EventQuestionRejected"
  9084. },
  9085. {
  9086. "$ref": "#/components/schemas/EventTodoUpdated"
  9087. },
  9088. {
  9089. "$ref": "#/components/schemas/EventSessionStatus"
  9090. },
  9091. {
  9092. "$ref": "#/components/schemas/EventSessionIdle"
  9093. },
  9094. {
  9095. "$ref": "#/components/schemas/Event.tui.prompt.append"
  9096. },
  9097. {
  9098. "$ref": "#/components/schemas/Event.tui.command.execute"
  9099. },
  9100. {
  9101. "$ref": "#/components/schemas/EventTuiToastShow1"
  9102. },
  9103. {
  9104. "$ref": "#/components/schemas/Event.tui.session.select"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/EventMcpToolsChanged"
  9108. },
  9109. {
  9110. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  9111. },
  9112. {
  9113. "$ref": "#/components/schemas/EventCommandExecuted"
  9114. },
  9115. {
  9116. "$ref": "#/components/schemas/EventProjectUpdated"
  9117. },
  9118. {
  9119. "$ref": "#/components/schemas/EventSessionCompacted"
  9120. },
  9121. {
  9122. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  9123. },
  9124. {
  9125. "$ref": "#/components/schemas/EventWorkspaceReady"
  9126. },
  9127. {
  9128. "$ref": "#/components/schemas/EventWorkspaceFailed"
  9129. },
  9130. {
  9131. "$ref": "#/components/schemas/EventWorkspaceStatus"
  9132. },
  9133. {
  9134. "$ref": "#/components/schemas/EventWorktreeReady"
  9135. },
  9136. {
  9137. "$ref": "#/components/schemas/EventWorktreeFailed"
  9138. },
  9139. {
  9140. "$ref": "#/components/schemas/EventPtyCreated"
  9141. },
  9142. {
  9143. "$ref": "#/components/schemas/EventPtyUpdated"
  9144. },
  9145. {
  9146. "$ref": "#/components/schemas/EventPtyExited"
  9147. },
  9148. {
  9149. "$ref": "#/components/schemas/EventPtyDeleted"
  9150. },
  9151. {
  9152. "$ref": "#/components/schemas/EventInstallationUpdated"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventMessageUpdated"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventMessageRemoved"
  9162. },
  9163. {
  9164. "$ref": "#/components/schemas/EventMessagePartUpdated"
  9165. },
  9166. {
  9167. "$ref": "#/components/schemas/EventMessagePartRemoved"
  9168. },
  9169. {
  9170. "$ref": "#/components/schemas/EventSessionCreated"
  9171. },
  9172. {
  9173. "$ref": "#/components/schemas/EventSessionUpdated"
  9174. },
  9175. {
  9176. "$ref": "#/components/schemas/EventSessionDeleted"
  9177. },
  9178. {
  9179. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9180. },
  9181. {
  9182. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9183. },
  9184. {
  9185. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9186. },
  9187. {
  9188. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9189. },
  9190. {
  9191. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9192. },
  9193. {
  9194. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9195. },
  9196. {
  9197. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9198. },
  9199. {
  9200. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9201. },
  9202. {
  9203. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9204. },
  9205. {
  9206. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9207. },
  9208. {
  9209. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9210. },
  9211. {
  9212. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9213. },
  9214. {
  9215. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9216. },
  9217. {
  9218. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9219. },
  9220. {
  9221. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9222. },
  9223. {
  9224. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9225. },
  9226. {
  9227. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9228. },
  9229. {
  9230. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9231. },
  9232. {
  9233. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9234. },
  9235. {
  9236. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9237. },
  9238. {
  9239. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9240. },
  9241. {
  9242. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9243. },
  9244. {
  9245. "$ref": "#/components/schemas/EventSessionNextRetried"
  9246. },
  9247. {
  9248. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9249. },
  9250. {
  9251. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9252. },
  9253. {
  9254. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9255. },
  9256. {
  9257. "$ref": "#/components/schemas/EventServerConnected"
  9258. },
  9259. {
  9260. "$ref": "#/components/schemas/EventGlobalDisposed"
  9261. },
  9262. {
  9263. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  9264. },
  9265. {
  9266. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9267. },
  9268. {
  9269. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9270. },
  9271. {
  9272. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9273. },
  9274. {
  9275. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9276. },
  9277. {
  9278. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9279. },
  9280. {
  9281. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9282. },
  9283. {
  9284. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9285. },
  9286. {
  9287. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9288. },
  9289. {
  9290. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9291. },
  9292. {
  9293. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9294. },
  9295. {
  9296. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9297. },
  9298. {
  9299. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9300. },
  9301. {
  9302. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9303. },
  9304. {
  9305. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9306. },
  9307. {
  9308. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9309. },
  9310. {
  9311. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9312. },
  9313. {
  9314. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9315. },
  9316. {
  9317. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9318. },
  9319. {
  9320. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9321. },
  9322. {
  9323. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9324. },
  9325. {
  9326. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9327. },
  9328. {
  9329. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9330. },
  9331. {
  9332. "$ref": "#/components/schemas/EventSessionNextRetried"
  9333. },
  9334. {
  9335. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9336. },
  9337. {
  9338. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9339. },
  9340. {
  9341. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9342. }
  9343. ]
  9344. },
  9345. "OAuth": {
  9346. "type": "object",
  9347. "properties": {
  9348. "type": {
  9349. "type": "string",
  9350. "enum": ["oauth"]
  9351. },
  9352. "refresh": {
  9353. "type": "string"
  9354. },
  9355. "access": {
  9356. "type": "string"
  9357. },
  9358. "expires": {
  9359. "type": "integer",
  9360. "minimum": 0
  9361. },
  9362. "accountId": {
  9363. "type": "string"
  9364. },
  9365. "enterpriseUrl": {
  9366. "type": "string"
  9367. }
  9368. },
  9369. "required": ["type", "refresh", "access", "expires"],
  9370. "additionalProperties": false
  9371. },
  9372. "ApiAuth": {
  9373. "type": "object",
  9374. "properties": {
  9375. "type": {
  9376. "type": "string",
  9377. "enum": ["api"]
  9378. },
  9379. "key": {
  9380. "type": "string"
  9381. },
  9382. "metadata": {
  9383. "type": "object",
  9384. "additionalProperties": {
  9385. "type": "string"
  9386. }
  9387. }
  9388. },
  9389. "required": ["type", "key"],
  9390. "additionalProperties": false
  9391. },
  9392. "WellKnownAuth": {
  9393. "type": "object",
  9394. "properties": {
  9395. "type": {
  9396. "type": "string",
  9397. "enum": ["wellknown"]
  9398. },
  9399. "key": {
  9400. "type": "string"
  9401. },
  9402. "token": {
  9403. "type": "string"
  9404. }
  9405. },
  9406. "required": ["type", "key", "token"],
  9407. "additionalProperties": false
  9408. },
  9409. "Auth": {
  9410. "anyOf": [
  9411. {
  9412. "$ref": "#/components/schemas/OAuth"
  9413. },
  9414. {
  9415. "$ref": "#/components/schemas/ApiAuth"
  9416. },
  9417. {
  9418. "$ref": "#/components/schemas/WellKnownAuth"
  9419. }
  9420. ]
  9421. },
  9422. "PermissionRequest": {
  9423. "type": "object",
  9424. "properties": {
  9425. "id": {
  9426. "type": "string",
  9427. "pattern": "^per"
  9428. },
  9429. "sessionID": {
  9430. "type": "string",
  9431. "pattern": "^ses"
  9432. },
  9433. "permission": {
  9434. "type": "string"
  9435. },
  9436. "patterns": {
  9437. "type": "array",
  9438. "items": {
  9439. "type": "string"
  9440. }
  9441. },
  9442. "metadata": {
  9443. "type": "object"
  9444. },
  9445. "always": {
  9446. "type": "array",
  9447. "items": {
  9448. "type": "string"
  9449. }
  9450. },
  9451. "tool": {
  9452. "type": "object",
  9453. "properties": {
  9454. "messageID": {
  9455. "type": "string",
  9456. "pattern": "^msg"
  9457. },
  9458. "callID": {
  9459. "type": "string"
  9460. }
  9461. },
  9462. "required": ["messageID", "callID"],
  9463. "additionalProperties": false
  9464. }
  9465. },
  9466. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9467. "additionalProperties": false
  9468. },
  9469. "SnapshotFileDiff": {
  9470. "type": "object",
  9471. "properties": {
  9472. "file": {
  9473. "type": "string"
  9474. },
  9475. "patch": {
  9476. "type": "string"
  9477. },
  9478. "additions": {
  9479. "type": "number"
  9480. },
  9481. "deletions": {
  9482. "type": "number"
  9483. },
  9484. "status": {
  9485. "type": "string",
  9486. "enum": ["added", "deleted", "modified"]
  9487. }
  9488. },
  9489. "required": ["additions", "deletions"],
  9490. "additionalProperties": false
  9491. },
  9492. "ProviderAuthError": {
  9493. "type": "object",
  9494. "properties": {
  9495. "name": {
  9496. "type": "string",
  9497. "enum": ["ProviderAuthError"]
  9498. },
  9499. "data": {
  9500. "type": "object",
  9501. "properties": {
  9502. "providerID": {
  9503. "type": "string"
  9504. },
  9505. "message": {
  9506. "type": "string"
  9507. }
  9508. },
  9509. "required": ["providerID", "message"],
  9510. "additionalProperties": false
  9511. }
  9512. },
  9513. "required": ["name", "data"],
  9514. "additionalProperties": false
  9515. },
  9516. "UnknownError": {
  9517. "type": "object",
  9518. "properties": {
  9519. "name": {
  9520. "type": "string",
  9521. "enum": ["UnknownError"]
  9522. },
  9523. "data": {
  9524. "type": "object",
  9525. "properties": {
  9526. "message": {
  9527. "type": "string"
  9528. }
  9529. },
  9530. "required": ["message"],
  9531. "additionalProperties": false
  9532. }
  9533. },
  9534. "required": ["name", "data"],
  9535. "additionalProperties": false
  9536. },
  9537. "MessageOutputLengthError": {
  9538. "type": "object",
  9539. "properties": {
  9540. "name": {
  9541. "type": "string",
  9542. "enum": ["MessageOutputLengthError"]
  9543. },
  9544. "data": {
  9545. "type": "object",
  9546. "properties": {}
  9547. }
  9548. },
  9549. "required": ["name", "data"],
  9550. "additionalProperties": false
  9551. },
  9552. "MessageAbortedError": {
  9553. "type": "object",
  9554. "properties": {
  9555. "name": {
  9556. "type": "string",
  9557. "enum": ["MessageAbortedError"]
  9558. },
  9559. "data": {
  9560. "type": "object",
  9561. "properties": {
  9562. "message": {
  9563. "type": "string"
  9564. }
  9565. },
  9566. "required": ["message"],
  9567. "additionalProperties": false
  9568. }
  9569. },
  9570. "required": ["name", "data"],
  9571. "additionalProperties": false
  9572. },
  9573. "StructuredOutputError": {
  9574. "type": "object",
  9575. "properties": {
  9576. "name": {
  9577. "type": "string",
  9578. "enum": ["StructuredOutputError"]
  9579. },
  9580. "data": {
  9581. "type": "object",
  9582. "properties": {
  9583. "message": {
  9584. "type": "string"
  9585. },
  9586. "retries": {
  9587. "type": "integer",
  9588. "minimum": 0
  9589. }
  9590. },
  9591. "required": ["message", "retries"],
  9592. "additionalProperties": false
  9593. }
  9594. },
  9595. "required": ["name", "data"],
  9596. "additionalProperties": false
  9597. },
  9598. "ContextOverflowError": {
  9599. "type": "object",
  9600. "properties": {
  9601. "name": {
  9602. "type": "string",
  9603. "enum": ["ContextOverflowError"]
  9604. },
  9605. "data": {
  9606. "type": "object",
  9607. "properties": {
  9608. "message": {
  9609. "type": "string"
  9610. },
  9611. "responseBody": {
  9612. "type": "string"
  9613. }
  9614. },
  9615. "required": ["message"],
  9616. "additionalProperties": false
  9617. }
  9618. },
  9619. "required": ["name", "data"],
  9620. "additionalProperties": false
  9621. },
  9622. "APIError": {
  9623. "type": "object",
  9624. "properties": {
  9625. "name": {
  9626. "type": "string",
  9627. "enum": ["APIError"]
  9628. },
  9629. "data": {
  9630. "type": "object",
  9631. "properties": {
  9632. "message": {
  9633. "type": "string"
  9634. },
  9635. "statusCode": {
  9636. "type": "integer",
  9637. "minimum": 0
  9638. },
  9639. "isRetryable": {
  9640. "type": "boolean"
  9641. },
  9642. "responseHeaders": {
  9643. "type": "object",
  9644. "additionalProperties": {
  9645. "type": "string"
  9646. }
  9647. },
  9648. "responseBody": {
  9649. "type": "string"
  9650. },
  9651. "metadata": {
  9652. "type": "object",
  9653. "additionalProperties": {
  9654. "type": "string"
  9655. }
  9656. }
  9657. },
  9658. "required": ["message", "isRetryable"],
  9659. "additionalProperties": false
  9660. }
  9661. },
  9662. "required": ["name", "data"],
  9663. "additionalProperties": false
  9664. },
  9665. "QuestionOption": {
  9666. "type": "object",
  9667. "properties": {
  9668. "label": {
  9669. "type": "string",
  9670. "description": "Display text (1-5 words, concise)"
  9671. },
  9672. "description": {
  9673. "type": "string",
  9674. "description": "Explanation of choice"
  9675. }
  9676. },
  9677. "required": ["label", "description"],
  9678. "additionalProperties": false
  9679. },
  9680. "QuestionInfo": {
  9681. "type": "object",
  9682. "properties": {
  9683. "question": {
  9684. "type": "string",
  9685. "description": "Complete question"
  9686. },
  9687. "header": {
  9688. "type": "string",
  9689. "description": "Very short label (max 30 chars)"
  9690. },
  9691. "options": {
  9692. "type": "array",
  9693. "items": {
  9694. "$ref": "#/components/schemas/QuestionOption"
  9695. },
  9696. "description": "Available choices"
  9697. },
  9698. "multiple": {
  9699. "type": "boolean"
  9700. },
  9701. "custom": {
  9702. "type": "boolean"
  9703. }
  9704. },
  9705. "required": ["question", "header", "options"],
  9706. "additionalProperties": false
  9707. },
  9708. "QuestionTool": {
  9709. "type": "object",
  9710. "properties": {
  9711. "messageID": {
  9712. "type": "string",
  9713. "pattern": "^msg"
  9714. },
  9715. "callID": {
  9716. "type": "string"
  9717. }
  9718. },
  9719. "required": ["messageID", "callID"],
  9720. "additionalProperties": false
  9721. },
  9722. "QuestionRequest": {
  9723. "type": "object",
  9724. "properties": {
  9725. "id": {
  9726. "type": "string",
  9727. "pattern": "^que"
  9728. },
  9729. "sessionID": {
  9730. "type": "string",
  9731. "pattern": "^ses"
  9732. },
  9733. "questions": {
  9734. "type": "array",
  9735. "items": {
  9736. "$ref": "#/components/schemas/QuestionInfo"
  9737. },
  9738. "description": "Questions to ask"
  9739. },
  9740. "tool": {
  9741. "$ref": "#/components/schemas/QuestionTool"
  9742. }
  9743. },
  9744. "required": ["id", "sessionID", "questions"],
  9745. "additionalProperties": false
  9746. },
  9747. "QuestionAnswer": {
  9748. "type": "array",
  9749. "items": {
  9750. "type": "string"
  9751. }
  9752. },
  9753. "QuestionReplied": {
  9754. "type": "object",
  9755. "properties": {
  9756. "sessionID": {
  9757. "type": "string",
  9758. "pattern": "^ses"
  9759. },
  9760. "requestID": {
  9761. "type": "string",
  9762. "pattern": "^que"
  9763. },
  9764. "answers": {
  9765. "type": "array",
  9766. "items": {
  9767. "$ref": "#/components/schemas/QuestionAnswer"
  9768. }
  9769. }
  9770. },
  9771. "required": ["sessionID", "requestID", "answers"],
  9772. "additionalProperties": false
  9773. },
  9774. "QuestionRejected": {
  9775. "type": "object",
  9776. "properties": {
  9777. "sessionID": {
  9778. "type": "string",
  9779. "pattern": "^ses"
  9780. },
  9781. "requestID": {
  9782. "type": "string",
  9783. "pattern": "^que"
  9784. }
  9785. },
  9786. "required": ["sessionID", "requestID"],
  9787. "additionalProperties": false
  9788. },
  9789. "Todo": {
  9790. "type": "object",
  9791. "properties": {
  9792. "content": {
  9793. "type": "string",
  9794. "description": "Brief description of the task"
  9795. },
  9796. "status": {
  9797. "type": "string",
  9798. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9799. },
  9800. "priority": {
  9801. "type": "string",
  9802. "description": "Priority level of the task: high, medium, low"
  9803. }
  9804. },
  9805. "required": ["content", "status", "priority"],
  9806. "additionalProperties": false
  9807. },
  9808. "SessionStatus": {
  9809. "anyOf": [
  9810. {
  9811. "type": "object",
  9812. "properties": {
  9813. "type": {
  9814. "type": "string",
  9815. "enum": ["idle"]
  9816. }
  9817. },
  9818. "required": ["type"],
  9819. "additionalProperties": false
  9820. },
  9821. {
  9822. "type": "object",
  9823. "properties": {
  9824. "type": {
  9825. "type": "string",
  9826. "enum": ["retry"]
  9827. },
  9828. "attempt": {
  9829. "type": "integer",
  9830. "minimum": 0
  9831. },
  9832. "message": {
  9833. "type": "string"
  9834. },
  9835. "action": {
  9836. "type": "object",
  9837. "properties": {
  9838. "reason": {
  9839. "type": "string"
  9840. },
  9841. "provider": {
  9842. "type": "string"
  9843. },
  9844. "title": {
  9845. "type": "string"
  9846. },
  9847. "message": {
  9848. "type": "string"
  9849. },
  9850. "label": {
  9851. "type": "string"
  9852. },
  9853. "link": {
  9854. "type": "string"
  9855. }
  9856. },
  9857. "required": ["reason", "provider", "title", "message", "label"],
  9858. "additionalProperties": false
  9859. },
  9860. "next": {
  9861. "type": "integer",
  9862. "minimum": 0
  9863. }
  9864. },
  9865. "required": ["type", "attempt", "message", "next"],
  9866. "additionalProperties": false
  9867. },
  9868. {
  9869. "type": "object",
  9870. "properties": {
  9871. "type": {
  9872. "type": "string",
  9873. "enum": ["busy"]
  9874. }
  9875. },
  9876. "required": ["type"],
  9877. "additionalProperties": false
  9878. }
  9879. ]
  9880. },
  9881. "Event.tui.prompt.append": {
  9882. "type": "object",
  9883. "properties": {
  9884. "id": {
  9885. "type": "string"
  9886. },
  9887. "type": {
  9888. "type": "string",
  9889. "enum": ["tui.prompt.append"]
  9890. },
  9891. "properties": {
  9892. "type": "object",
  9893. "properties": {
  9894. "text": {
  9895. "type": "string"
  9896. }
  9897. },
  9898. "required": ["text"],
  9899. "additionalProperties": false
  9900. }
  9901. },
  9902. "required": ["id", "type", "properties"],
  9903. "additionalProperties": false
  9904. },
  9905. "Event.tui.command.execute": {
  9906. "type": "object",
  9907. "properties": {
  9908. "id": {
  9909. "type": "string"
  9910. },
  9911. "type": {
  9912. "type": "string",
  9913. "enum": ["tui.command.execute"]
  9914. },
  9915. "properties": {
  9916. "type": "object",
  9917. "properties": {
  9918. "command": {
  9919. "anyOf": [
  9920. {
  9921. "type": "string",
  9922. "enum": [
  9923. "session.list",
  9924. "session.new",
  9925. "session.share",
  9926. "session.interrupt",
  9927. "session.compact",
  9928. "session.page.up",
  9929. "session.page.down",
  9930. "session.line.up",
  9931. "session.line.down",
  9932. "session.half.page.up",
  9933. "session.half.page.down",
  9934. "session.first",
  9935. "session.last",
  9936. "prompt.clear",
  9937. "prompt.submit",
  9938. "agent.cycle"
  9939. ]
  9940. },
  9941. {
  9942. "type": "string"
  9943. }
  9944. ]
  9945. }
  9946. },
  9947. "required": ["command"],
  9948. "additionalProperties": false
  9949. }
  9950. },
  9951. "required": ["id", "type", "properties"],
  9952. "additionalProperties": false
  9953. },
  9954. "Event.tui.toast.show": {
  9955. "type": "object",
  9956. "properties": {
  9957. "id": {
  9958. "type": "string"
  9959. },
  9960. "type": {
  9961. "type": "string",
  9962. "enum": ["tui.toast.show"]
  9963. },
  9964. "properties": {
  9965. "type": "object",
  9966. "properties": {
  9967. "title": {
  9968. "type": "string"
  9969. },
  9970. "message": {
  9971. "type": "string"
  9972. },
  9973. "variant": {
  9974. "type": "string",
  9975. "enum": ["info", "success", "warning", "error"]
  9976. },
  9977. "duration": {
  9978. "type": "integer",
  9979. "exclusiveMinimum": 0
  9980. }
  9981. },
  9982. "required": ["message", "variant"],
  9983. "additionalProperties": false
  9984. }
  9985. },
  9986. "required": ["id", "type", "properties"],
  9987. "additionalProperties": false
  9988. },
  9989. "Event.tui.session.select": {
  9990. "type": "object",
  9991. "properties": {
  9992. "id": {
  9993. "type": "string"
  9994. },
  9995. "type": {
  9996. "type": "string",
  9997. "enum": ["tui.session.select"]
  9998. },
  9999. "properties": {
  10000. "type": "object",
  10001. "properties": {
  10002. "sessionID": {
  10003. "type": "string",
  10004. "pattern": "^ses",
  10005. "description": "Session ID to navigate to"
  10006. }
  10007. },
  10008. "required": ["sessionID"],
  10009. "additionalProperties": false
  10010. }
  10011. },
  10012. "required": ["id", "type", "properties"],
  10013. "additionalProperties": false
  10014. },
  10015. "Project": {
  10016. "type": "object",
  10017. "properties": {
  10018. "id": {
  10019. "type": "string"
  10020. },
  10021. "worktree": {
  10022. "type": "string"
  10023. },
  10024. "vcs": {
  10025. "type": "string",
  10026. "enum": ["git"]
  10027. },
  10028. "name": {
  10029. "type": "string"
  10030. },
  10031. "icon": {
  10032. "type": "object",
  10033. "properties": {
  10034. "url": {
  10035. "type": "string"
  10036. },
  10037. "override": {
  10038. "type": "string"
  10039. },
  10040. "color": {
  10041. "type": "string"
  10042. }
  10043. },
  10044. "additionalProperties": false
  10045. },
  10046. "commands": {
  10047. "type": "object",
  10048. "properties": {
  10049. "start": {
  10050. "type": "string",
  10051. "description": "Startup script to run when creating a new workspace (worktree)"
  10052. }
  10053. },
  10054. "additionalProperties": false
  10055. },
  10056. "time": {
  10057. "type": "object",
  10058. "properties": {
  10059. "created": {
  10060. "type": "integer",
  10061. "minimum": 0
  10062. },
  10063. "updated": {
  10064. "type": "integer",
  10065. "minimum": 0
  10066. },
  10067. "initialized": {
  10068. "type": "integer",
  10069. "minimum": 0
  10070. }
  10071. },
  10072. "required": ["created", "updated"],
  10073. "additionalProperties": false
  10074. },
  10075. "sandboxes": {
  10076. "type": "array",
  10077. "items": {
  10078. "type": "string"
  10079. }
  10080. }
  10081. },
  10082. "required": ["id", "worktree", "time", "sandboxes"],
  10083. "additionalProperties": false
  10084. },
  10085. "Pty": {
  10086. "type": "object",
  10087. "properties": {
  10088. "id": {
  10089. "type": "string",
  10090. "pattern": "^pty"
  10091. },
  10092. "title": {
  10093. "type": "string"
  10094. },
  10095. "command": {
  10096. "type": "string"
  10097. },
  10098. "args": {
  10099. "type": "array",
  10100. "items": {
  10101. "type": "string"
  10102. }
  10103. },
  10104. "cwd": {
  10105. "type": "string"
  10106. },
  10107. "status": {
  10108. "type": "string",
  10109. "enum": ["running", "exited"]
  10110. },
  10111. "pid": {
  10112. "type": "integer",
  10113. "exclusiveMinimum": 0
  10114. }
  10115. },
  10116. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  10117. "additionalProperties": false
  10118. },
  10119. "OutputFormatText": {
  10120. "type": "object",
  10121. "properties": {
  10122. "type": {
  10123. "type": "string",
  10124. "enum": ["text"]
  10125. }
  10126. },
  10127. "required": ["type"],
  10128. "additionalProperties": false
  10129. },
  10130. "JSONSchema": {
  10131. "type": "object"
  10132. },
  10133. "OutputFormatJsonSchema": {
  10134. "type": "object",
  10135. "properties": {
  10136. "type": {
  10137. "type": "string",
  10138. "enum": ["json_schema"]
  10139. },
  10140. "schema": {
  10141. "$ref": "#/components/schemas/JSONSchema"
  10142. },
  10143. "retryCount": {
  10144. "type": "integer",
  10145. "minimum": 0
  10146. }
  10147. },
  10148. "required": ["type", "schema"],
  10149. "additionalProperties": false
  10150. },
  10151. "OutputFormat": {
  10152. "anyOf": [
  10153. {
  10154. "$ref": "#/components/schemas/OutputFormatText"
  10155. },
  10156. {
  10157. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  10158. }
  10159. ]
  10160. },
  10161. "UserMessage": {
  10162. "type": "object",
  10163. "properties": {
  10164. "id": {
  10165. "type": "string",
  10166. "pattern": "^msg"
  10167. },
  10168. "sessionID": {
  10169. "type": "string",
  10170. "pattern": "^ses"
  10171. },
  10172. "role": {
  10173. "type": "string",
  10174. "enum": ["user"]
  10175. },
  10176. "time": {
  10177. "type": "object",
  10178. "properties": {
  10179. "created": {
  10180. "type": "integer",
  10181. "minimum": 0
  10182. }
  10183. },
  10184. "required": ["created"],
  10185. "additionalProperties": false
  10186. },
  10187. "format": {
  10188. "$ref": "#/components/schemas/OutputFormat"
  10189. },
  10190. "summary": {
  10191. "type": "object",
  10192. "properties": {
  10193. "title": {
  10194. "type": "string"
  10195. },
  10196. "body": {
  10197. "type": "string"
  10198. },
  10199. "diffs": {
  10200. "type": "array",
  10201. "items": {
  10202. "$ref": "#/components/schemas/SnapshotFileDiff"
  10203. }
  10204. }
  10205. },
  10206. "required": ["diffs"],
  10207. "additionalProperties": false
  10208. },
  10209. "agent": {
  10210. "type": "string"
  10211. },
  10212. "model": {
  10213. "type": "object",
  10214. "properties": {
  10215. "providerID": {
  10216. "type": "string"
  10217. },
  10218. "modelID": {
  10219. "type": "string"
  10220. },
  10221. "variant": {
  10222. "type": "string"
  10223. }
  10224. },
  10225. "required": ["providerID", "modelID"],
  10226. "additionalProperties": false
  10227. },
  10228. "system": {
  10229. "type": "string"
  10230. },
  10231. "tools": {
  10232. "type": "object",
  10233. "additionalProperties": {
  10234. "type": "boolean"
  10235. }
  10236. }
  10237. },
  10238. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  10239. "additionalProperties": false
  10240. },
  10241. "AssistantMessage": {
  10242. "type": "object",
  10243. "properties": {
  10244. "id": {
  10245. "type": "string",
  10246. "pattern": "^msg"
  10247. },
  10248. "sessionID": {
  10249. "type": "string",
  10250. "pattern": "^ses"
  10251. },
  10252. "role": {
  10253. "type": "string",
  10254. "enum": ["assistant"]
  10255. },
  10256. "time": {
  10257. "type": "object",
  10258. "properties": {
  10259. "created": {
  10260. "type": "integer",
  10261. "minimum": 0
  10262. },
  10263. "completed": {
  10264. "type": "integer",
  10265. "minimum": 0
  10266. }
  10267. },
  10268. "required": ["created"],
  10269. "additionalProperties": false
  10270. },
  10271. "error": {
  10272. "anyOf": [
  10273. {
  10274. "$ref": "#/components/schemas/ProviderAuthError"
  10275. },
  10276. {
  10277. "$ref": "#/components/schemas/UnknownError"
  10278. },
  10279. {
  10280. "$ref": "#/components/schemas/MessageOutputLengthError"
  10281. },
  10282. {
  10283. "$ref": "#/components/schemas/MessageAbortedError"
  10284. },
  10285. {
  10286. "$ref": "#/components/schemas/StructuredOutputError"
  10287. },
  10288. {
  10289. "$ref": "#/components/schemas/ContextOverflowError"
  10290. },
  10291. {
  10292. "$ref": "#/components/schemas/APIError"
  10293. }
  10294. ]
  10295. },
  10296. "parentID": {
  10297. "type": "string",
  10298. "pattern": "^msg"
  10299. },
  10300. "modelID": {
  10301. "type": "string"
  10302. },
  10303. "providerID": {
  10304. "type": "string"
  10305. },
  10306. "mode": {
  10307. "type": "string"
  10308. },
  10309. "agent": {
  10310. "type": "string"
  10311. },
  10312. "path": {
  10313. "type": "object",
  10314. "properties": {
  10315. "cwd": {
  10316. "type": "string"
  10317. },
  10318. "root": {
  10319. "type": "string"
  10320. }
  10321. },
  10322. "required": ["cwd", "root"],
  10323. "additionalProperties": false
  10324. },
  10325. "summary": {
  10326. "type": "boolean"
  10327. },
  10328. "cost": {
  10329. "type": "number"
  10330. },
  10331. "tokens": {
  10332. "type": "object",
  10333. "properties": {
  10334. "total": {
  10335. "type": "number"
  10336. },
  10337. "input": {
  10338. "type": "number"
  10339. },
  10340. "output": {
  10341. "type": "number"
  10342. },
  10343. "reasoning": {
  10344. "type": "number"
  10345. },
  10346. "cache": {
  10347. "type": "object",
  10348. "properties": {
  10349. "read": {
  10350. "type": "number"
  10351. },
  10352. "write": {
  10353. "type": "number"
  10354. }
  10355. },
  10356. "required": ["read", "write"],
  10357. "additionalProperties": false
  10358. }
  10359. },
  10360. "required": ["input", "output", "reasoning", "cache"],
  10361. "additionalProperties": false
  10362. },
  10363. "structured": {},
  10364. "variant": {
  10365. "type": "string"
  10366. },
  10367. "finish": {
  10368. "type": "string"
  10369. }
  10370. },
  10371. "required": [
  10372. "id",
  10373. "sessionID",
  10374. "role",
  10375. "time",
  10376. "parentID",
  10377. "modelID",
  10378. "providerID",
  10379. "mode",
  10380. "agent",
  10381. "path",
  10382. "cost",
  10383. "tokens"
  10384. ],
  10385. "additionalProperties": false
  10386. },
  10387. "Message": {
  10388. "anyOf": [
  10389. {
  10390. "$ref": "#/components/schemas/UserMessage"
  10391. },
  10392. {
  10393. "$ref": "#/components/schemas/AssistantMessage"
  10394. }
  10395. ]
  10396. },
  10397. "TextPart": {
  10398. "type": "object",
  10399. "properties": {
  10400. "id": {
  10401. "type": "string",
  10402. "pattern": "^prt"
  10403. },
  10404. "sessionID": {
  10405. "type": "string",
  10406. "pattern": "^ses"
  10407. },
  10408. "messageID": {
  10409. "type": "string",
  10410. "pattern": "^msg"
  10411. },
  10412. "type": {
  10413. "type": "string",
  10414. "enum": ["text"]
  10415. },
  10416. "text": {
  10417. "type": "string"
  10418. },
  10419. "synthetic": {
  10420. "type": "boolean"
  10421. },
  10422. "ignored": {
  10423. "type": "boolean"
  10424. },
  10425. "time": {
  10426. "type": "object",
  10427. "properties": {
  10428. "start": {
  10429. "type": "integer",
  10430. "minimum": 0
  10431. },
  10432. "end": {
  10433. "type": "integer",
  10434. "minimum": 0
  10435. }
  10436. },
  10437. "required": ["start"],
  10438. "additionalProperties": false
  10439. },
  10440. "metadata": {
  10441. "type": "object"
  10442. }
  10443. },
  10444. "required": ["id", "sessionID", "messageID", "type", "text"],
  10445. "additionalProperties": false
  10446. },
  10447. "SubtaskPart": {
  10448. "type": "object",
  10449. "properties": {
  10450. "id": {
  10451. "type": "string",
  10452. "pattern": "^prt"
  10453. },
  10454. "sessionID": {
  10455. "type": "string",
  10456. "pattern": "^ses"
  10457. },
  10458. "messageID": {
  10459. "type": "string",
  10460. "pattern": "^msg"
  10461. },
  10462. "type": {
  10463. "type": "string",
  10464. "enum": ["subtask"]
  10465. },
  10466. "prompt": {
  10467. "type": "string"
  10468. },
  10469. "description": {
  10470. "type": "string"
  10471. },
  10472. "agent": {
  10473. "type": "string"
  10474. },
  10475. "model": {
  10476. "type": "object",
  10477. "properties": {
  10478. "providerID": {
  10479. "type": "string"
  10480. },
  10481. "modelID": {
  10482. "type": "string"
  10483. }
  10484. },
  10485. "required": ["providerID", "modelID"],
  10486. "additionalProperties": false
  10487. },
  10488. "command": {
  10489. "type": "string"
  10490. }
  10491. },
  10492. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10493. "additionalProperties": false
  10494. },
  10495. "ReasoningPart": {
  10496. "type": "object",
  10497. "properties": {
  10498. "id": {
  10499. "type": "string",
  10500. "pattern": "^prt"
  10501. },
  10502. "sessionID": {
  10503. "type": "string",
  10504. "pattern": "^ses"
  10505. },
  10506. "messageID": {
  10507. "type": "string",
  10508. "pattern": "^msg"
  10509. },
  10510. "type": {
  10511. "type": "string",
  10512. "enum": ["reasoning"]
  10513. },
  10514. "text": {
  10515. "type": "string"
  10516. },
  10517. "metadata": {
  10518. "type": "object"
  10519. },
  10520. "time": {
  10521. "type": "object",
  10522. "properties": {
  10523. "start": {
  10524. "type": "integer",
  10525. "minimum": 0
  10526. },
  10527. "end": {
  10528. "type": "integer",
  10529. "minimum": 0
  10530. }
  10531. },
  10532. "required": ["start"],
  10533. "additionalProperties": false
  10534. }
  10535. },
  10536. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10537. "additionalProperties": false
  10538. },
  10539. "FilePartSourceText": {
  10540. "type": "object",
  10541. "properties": {
  10542. "value": {
  10543. "type": "string"
  10544. },
  10545. "start": {
  10546. "type": "number"
  10547. },
  10548. "end": {
  10549. "type": "number"
  10550. }
  10551. },
  10552. "required": ["value", "start", "end"],
  10553. "additionalProperties": false
  10554. },
  10555. "FileSource": {
  10556. "type": "object",
  10557. "properties": {
  10558. "text": {
  10559. "$ref": "#/components/schemas/FilePartSourceText"
  10560. },
  10561. "type": {
  10562. "type": "string",
  10563. "enum": ["file"]
  10564. },
  10565. "path": {
  10566. "type": "string"
  10567. }
  10568. },
  10569. "required": ["text", "type", "path"],
  10570. "additionalProperties": false
  10571. },
  10572. "Range": {
  10573. "type": "object",
  10574. "properties": {
  10575. "start": {
  10576. "type": "object",
  10577. "properties": {
  10578. "line": {
  10579. "type": "integer",
  10580. "minimum": 0
  10581. },
  10582. "character": {
  10583. "type": "integer",
  10584. "minimum": 0
  10585. }
  10586. },
  10587. "required": ["line", "character"],
  10588. "additionalProperties": false
  10589. },
  10590. "end": {
  10591. "type": "object",
  10592. "properties": {
  10593. "line": {
  10594. "type": "integer",
  10595. "minimum": 0
  10596. },
  10597. "character": {
  10598. "type": "integer",
  10599. "minimum": 0
  10600. }
  10601. },
  10602. "required": ["line", "character"],
  10603. "additionalProperties": false
  10604. }
  10605. },
  10606. "required": ["start", "end"],
  10607. "additionalProperties": false
  10608. },
  10609. "SymbolSource": {
  10610. "type": "object",
  10611. "properties": {
  10612. "text": {
  10613. "$ref": "#/components/schemas/FilePartSourceText"
  10614. },
  10615. "type": {
  10616. "type": "string",
  10617. "enum": ["symbol"]
  10618. },
  10619. "path": {
  10620. "type": "string"
  10621. },
  10622. "range": {
  10623. "$ref": "#/components/schemas/Range"
  10624. },
  10625. "name": {
  10626. "type": "string"
  10627. },
  10628. "kind": {
  10629. "type": "integer",
  10630. "minimum": 0
  10631. }
  10632. },
  10633. "required": ["text", "type", "path", "range", "name", "kind"],
  10634. "additionalProperties": false
  10635. },
  10636. "ResourceSource": {
  10637. "type": "object",
  10638. "properties": {
  10639. "text": {
  10640. "$ref": "#/components/schemas/FilePartSourceText"
  10641. },
  10642. "type": {
  10643. "type": "string",
  10644. "enum": ["resource"]
  10645. },
  10646. "clientName": {
  10647. "type": "string"
  10648. },
  10649. "uri": {
  10650. "type": "string"
  10651. }
  10652. },
  10653. "required": ["text", "type", "clientName", "uri"],
  10654. "additionalProperties": false
  10655. },
  10656. "FilePartSource": {
  10657. "anyOf": [
  10658. {
  10659. "$ref": "#/components/schemas/FileSource"
  10660. },
  10661. {
  10662. "$ref": "#/components/schemas/SymbolSource"
  10663. },
  10664. {
  10665. "$ref": "#/components/schemas/ResourceSource"
  10666. }
  10667. ]
  10668. },
  10669. "FilePart": {
  10670. "type": "object",
  10671. "properties": {
  10672. "id": {
  10673. "type": "string",
  10674. "pattern": "^prt"
  10675. },
  10676. "sessionID": {
  10677. "type": "string",
  10678. "pattern": "^ses"
  10679. },
  10680. "messageID": {
  10681. "type": "string",
  10682. "pattern": "^msg"
  10683. },
  10684. "type": {
  10685. "type": "string",
  10686. "enum": ["file"]
  10687. },
  10688. "mime": {
  10689. "type": "string"
  10690. },
  10691. "filename": {
  10692. "type": "string"
  10693. },
  10694. "url": {
  10695. "type": "string"
  10696. },
  10697. "source": {
  10698. "$ref": "#/components/schemas/FilePartSource"
  10699. }
  10700. },
  10701. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10702. "additionalProperties": false
  10703. },
  10704. "ToolStatePending": {
  10705. "type": "object",
  10706. "properties": {
  10707. "status": {
  10708. "type": "string",
  10709. "enum": ["pending"]
  10710. },
  10711. "input": {
  10712. "type": "object"
  10713. },
  10714. "raw": {
  10715. "type": "string"
  10716. }
  10717. },
  10718. "required": ["status", "input", "raw"],
  10719. "additionalProperties": false
  10720. },
  10721. "ToolStateRunning": {
  10722. "type": "object",
  10723. "properties": {
  10724. "status": {
  10725. "type": "string",
  10726. "enum": ["running"]
  10727. },
  10728. "input": {
  10729. "type": "object"
  10730. },
  10731. "title": {
  10732. "type": "string"
  10733. },
  10734. "metadata": {
  10735. "type": "object"
  10736. },
  10737. "time": {
  10738. "type": "object",
  10739. "properties": {
  10740. "start": {
  10741. "type": "integer",
  10742. "minimum": 0
  10743. }
  10744. },
  10745. "required": ["start"],
  10746. "additionalProperties": false
  10747. }
  10748. },
  10749. "required": ["status", "input", "time"],
  10750. "additionalProperties": false
  10751. },
  10752. "ToolStateCompleted": {
  10753. "type": "object",
  10754. "properties": {
  10755. "status": {
  10756. "type": "string",
  10757. "enum": ["completed"]
  10758. },
  10759. "input": {
  10760. "type": "object"
  10761. },
  10762. "output": {
  10763. "type": "string"
  10764. },
  10765. "title": {
  10766. "type": "string"
  10767. },
  10768. "metadata": {
  10769. "type": "object"
  10770. },
  10771. "time": {
  10772. "type": "object",
  10773. "properties": {
  10774. "start": {
  10775. "type": "integer",
  10776. "minimum": 0
  10777. },
  10778. "end": {
  10779. "type": "integer",
  10780. "minimum": 0
  10781. },
  10782. "compacted": {
  10783. "type": "integer",
  10784. "minimum": 0
  10785. }
  10786. },
  10787. "required": ["start", "end"],
  10788. "additionalProperties": false
  10789. },
  10790. "attachments": {
  10791. "type": "array",
  10792. "items": {
  10793. "$ref": "#/components/schemas/FilePart"
  10794. }
  10795. }
  10796. },
  10797. "required": ["status", "input", "output", "title", "metadata", "time"],
  10798. "additionalProperties": false
  10799. },
  10800. "ToolStateError": {
  10801. "type": "object",
  10802. "properties": {
  10803. "status": {
  10804. "type": "string",
  10805. "enum": ["error"]
  10806. },
  10807. "input": {
  10808. "type": "object"
  10809. },
  10810. "error": {
  10811. "type": "string"
  10812. },
  10813. "metadata": {
  10814. "type": "object"
  10815. },
  10816. "time": {
  10817. "type": "object",
  10818. "properties": {
  10819. "start": {
  10820. "type": "integer",
  10821. "minimum": 0
  10822. },
  10823. "end": {
  10824. "type": "integer",
  10825. "minimum": 0
  10826. }
  10827. },
  10828. "required": ["start", "end"],
  10829. "additionalProperties": false
  10830. }
  10831. },
  10832. "required": ["status", "input", "error", "time"],
  10833. "additionalProperties": false
  10834. },
  10835. "ToolState": {
  10836. "anyOf": [
  10837. {
  10838. "$ref": "#/components/schemas/ToolStatePending"
  10839. },
  10840. {
  10841. "$ref": "#/components/schemas/ToolStateRunning"
  10842. },
  10843. {
  10844. "$ref": "#/components/schemas/ToolStateCompleted"
  10845. },
  10846. {
  10847. "$ref": "#/components/schemas/ToolStateError"
  10848. }
  10849. ]
  10850. },
  10851. "ToolPart": {
  10852. "type": "object",
  10853. "properties": {
  10854. "id": {
  10855. "type": "string",
  10856. "pattern": "^prt"
  10857. },
  10858. "sessionID": {
  10859. "type": "string",
  10860. "pattern": "^ses"
  10861. },
  10862. "messageID": {
  10863. "type": "string",
  10864. "pattern": "^msg"
  10865. },
  10866. "type": {
  10867. "type": "string",
  10868. "enum": ["tool"]
  10869. },
  10870. "callID": {
  10871. "type": "string"
  10872. },
  10873. "tool": {
  10874. "type": "string"
  10875. },
  10876. "state": {
  10877. "$ref": "#/components/schemas/ToolState"
  10878. },
  10879. "metadata": {
  10880. "type": "object"
  10881. }
  10882. },
  10883. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10884. "additionalProperties": false
  10885. },
  10886. "StepStartPart": {
  10887. "type": "object",
  10888. "properties": {
  10889. "id": {
  10890. "type": "string",
  10891. "pattern": "^prt"
  10892. },
  10893. "sessionID": {
  10894. "type": "string",
  10895. "pattern": "^ses"
  10896. },
  10897. "messageID": {
  10898. "type": "string",
  10899. "pattern": "^msg"
  10900. },
  10901. "type": {
  10902. "type": "string",
  10903. "enum": ["step-start"]
  10904. },
  10905. "snapshot": {
  10906. "type": "string"
  10907. }
  10908. },
  10909. "required": ["id", "sessionID", "messageID", "type"],
  10910. "additionalProperties": false
  10911. },
  10912. "StepFinishPart": {
  10913. "type": "object",
  10914. "properties": {
  10915. "id": {
  10916. "type": "string",
  10917. "pattern": "^prt"
  10918. },
  10919. "sessionID": {
  10920. "type": "string",
  10921. "pattern": "^ses"
  10922. },
  10923. "messageID": {
  10924. "type": "string",
  10925. "pattern": "^msg"
  10926. },
  10927. "type": {
  10928. "type": "string",
  10929. "enum": ["step-finish"]
  10930. },
  10931. "reason": {
  10932. "type": "string"
  10933. },
  10934. "snapshot": {
  10935. "type": "string"
  10936. },
  10937. "cost": {
  10938. "type": "number"
  10939. },
  10940. "tokens": {
  10941. "type": "object",
  10942. "properties": {
  10943. "total": {
  10944. "type": "number"
  10945. },
  10946. "input": {
  10947. "type": "number"
  10948. },
  10949. "output": {
  10950. "type": "number"
  10951. },
  10952. "reasoning": {
  10953. "type": "number"
  10954. },
  10955. "cache": {
  10956. "type": "object",
  10957. "properties": {
  10958. "read": {
  10959. "type": "number"
  10960. },
  10961. "write": {
  10962. "type": "number"
  10963. }
  10964. },
  10965. "required": ["read", "write"],
  10966. "additionalProperties": false
  10967. }
  10968. },
  10969. "required": ["input", "output", "reasoning", "cache"],
  10970. "additionalProperties": false
  10971. }
  10972. },
  10973. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10974. "additionalProperties": false
  10975. },
  10976. "SnapshotPart": {
  10977. "type": "object",
  10978. "properties": {
  10979. "id": {
  10980. "type": "string",
  10981. "pattern": "^prt"
  10982. },
  10983. "sessionID": {
  10984. "type": "string",
  10985. "pattern": "^ses"
  10986. },
  10987. "messageID": {
  10988. "type": "string",
  10989. "pattern": "^msg"
  10990. },
  10991. "type": {
  10992. "type": "string",
  10993. "enum": ["snapshot"]
  10994. },
  10995. "snapshot": {
  10996. "type": "string"
  10997. }
  10998. },
  10999. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  11000. "additionalProperties": false
  11001. },
  11002. "PatchPart": {
  11003. "type": "object",
  11004. "properties": {
  11005. "id": {
  11006. "type": "string",
  11007. "pattern": "^prt"
  11008. },
  11009. "sessionID": {
  11010. "type": "string",
  11011. "pattern": "^ses"
  11012. },
  11013. "messageID": {
  11014. "type": "string",
  11015. "pattern": "^msg"
  11016. },
  11017. "type": {
  11018. "type": "string",
  11019. "enum": ["patch"]
  11020. },
  11021. "hash": {
  11022. "type": "string"
  11023. },
  11024. "files": {
  11025. "type": "array",
  11026. "items": {
  11027. "type": "string"
  11028. }
  11029. }
  11030. },
  11031. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  11032. "additionalProperties": false
  11033. },
  11034. "AgentPart": {
  11035. "type": "object",
  11036. "properties": {
  11037. "id": {
  11038. "type": "string",
  11039. "pattern": "^prt"
  11040. },
  11041. "sessionID": {
  11042. "type": "string",
  11043. "pattern": "^ses"
  11044. },
  11045. "messageID": {
  11046. "type": "string",
  11047. "pattern": "^msg"
  11048. },
  11049. "type": {
  11050. "type": "string",
  11051. "enum": ["agent"]
  11052. },
  11053. "name": {
  11054. "type": "string"
  11055. },
  11056. "source": {
  11057. "type": "object",
  11058. "properties": {
  11059. "value": {
  11060. "type": "string"
  11061. },
  11062. "start": {
  11063. "type": "integer",
  11064. "minimum": 0
  11065. },
  11066. "end": {
  11067. "type": "integer",
  11068. "minimum": 0
  11069. }
  11070. },
  11071. "required": ["value", "start", "end"],
  11072. "additionalProperties": false
  11073. }
  11074. },
  11075. "required": ["id", "sessionID", "messageID", "type", "name"],
  11076. "additionalProperties": false
  11077. },
  11078. "RetryPart": {
  11079. "type": "object",
  11080. "properties": {
  11081. "id": {
  11082. "type": "string",
  11083. "pattern": "^prt"
  11084. },
  11085. "sessionID": {
  11086. "type": "string",
  11087. "pattern": "^ses"
  11088. },
  11089. "messageID": {
  11090. "type": "string",
  11091. "pattern": "^msg"
  11092. },
  11093. "type": {
  11094. "type": "string",
  11095. "enum": ["retry"]
  11096. },
  11097. "attempt": {
  11098. "type": "integer",
  11099. "minimum": 0
  11100. },
  11101. "error": {
  11102. "$ref": "#/components/schemas/APIError"
  11103. },
  11104. "time": {
  11105. "type": "object",
  11106. "properties": {
  11107. "created": {
  11108. "type": "integer",
  11109. "minimum": 0
  11110. }
  11111. },
  11112. "required": ["created"],
  11113. "additionalProperties": false
  11114. }
  11115. },
  11116. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  11117. "additionalProperties": false
  11118. },
  11119. "CompactionPart": {
  11120. "type": "object",
  11121. "properties": {
  11122. "id": {
  11123. "type": "string",
  11124. "pattern": "^prt"
  11125. },
  11126. "sessionID": {
  11127. "type": "string",
  11128. "pattern": "^ses"
  11129. },
  11130. "messageID": {
  11131. "type": "string",
  11132. "pattern": "^msg"
  11133. },
  11134. "type": {
  11135. "type": "string",
  11136. "enum": ["compaction"]
  11137. },
  11138. "auto": {
  11139. "type": "boolean"
  11140. },
  11141. "overflow": {
  11142. "type": "boolean"
  11143. },
  11144. "tail_start_id": {
  11145. "type": "string",
  11146. "pattern": "^msg"
  11147. }
  11148. },
  11149. "required": ["id", "sessionID", "messageID", "type", "auto"],
  11150. "additionalProperties": false
  11151. },
  11152. "Part": {
  11153. "anyOf": [
  11154. {
  11155. "$ref": "#/components/schemas/TextPart"
  11156. },
  11157. {
  11158. "$ref": "#/components/schemas/SubtaskPart"
  11159. },
  11160. {
  11161. "$ref": "#/components/schemas/ReasoningPart"
  11162. },
  11163. {
  11164. "$ref": "#/components/schemas/FilePart"
  11165. },
  11166. {
  11167. "$ref": "#/components/schemas/ToolPart"
  11168. },
  11169. {
  11170. "$ref": "#/components/schemas/StepStartPart"
  11171. },
  11172. {
  11173. "$ref": "#/components/schemas/StepFinishPart"
  11174. },
  11175. {
  11176. "$ref": "#/components/schemas/SnapshotPart"
  11177. },
  11178. {
  11179. "$ref": "#/components/schemas/PatchPart"
  11180. },
  11181. {
  11182. "$ref": "#/components/schemas/AgentPart"
  11183. },
  11184. {
  11185. "$ref": "#/components/schemas/RetryPart"
  11186. },
  11187. {
  11188. "$ref": "#/components/schemas/CompactionPart"
  11189. }
  11190. ]
  11191. },
  11192. "PermissionAction": {
  11193. "type": "string",
  11194. "enum": ["allow", "deny", "ask"]
  11195. },
  11196. "PermissionRule": {
  11197. "type": "object",
  11198. "properties": {
  11199. "permission": {
  11200. "type": "string"
  11201. },
  11202. "pattern": {
  11203. "type": "string"
  11204. },
  11205. "action": {
  11206. "$ref": "#/components/schemas/PermissionAction"
  11207. }
  11208. },
  11209. "required": ["permission", "pattern", "action"],
  11210. "additionalProperties": false
  11211. },
  11212. "PermissionRuleset": {
  11213. "type": "array",
  11214. "items": {
  11215. "$ref": "#/components/schemas/PermissionRule"
  11216. }
  11217. },
  11218. "Session": {
  11219. "type": "object",
  11220. "properties": {
  11221. "id": {
  11222. "type": "string",
  11223. "pattern": "^ses"
  11224. },
  11225. "slug": {
  11226. "type": "string"
  11227. },
  11228. "projectID": {
  11229. "type": "string"
  11230. },
  11231. "workspaceID": {
  11232. "type": "string",
  11233. "pattern": "^wrk"
  11234. },
  11235. "directory": {
  11236. "type": "string"
  11237. },
  11238. "path": {
  11239. "type": "string"
  11240. },
  11241. "parentID": {
  11242. "type": "string",
  11243. "pattern": "^ses"
  11244. },
  11245. "summary": {
  11246. "type": "object",
  11247. "properties": {
  11248. "additions": {
  11249. "type": "number"
  11250. },
  11251. "deletions": {
  11252. "type": "number"
  11253. },
  11254. "files": {
  11255. "type": "number"
  11256. },
  11257. "diffs": {
  11258. "type": "array",
  11259. "items": {
  11260. "$ref": "#/components/schemas/SnapshotFileDiff"
  11261. }
  11262. }
  11263. },
  11264. "required": ["additions", "deletions", "files"],
  11265. "additionalProperties": false
  11266. },
  11267. "cost": {
  11268. "type": "number"
  11269. },
  11270. "tokens": {
  11271. "type": "object",
  11272. "properties": {
  11273. "input": {
  11274. "type": "number"
  11275. },
  11276. "output": {
  11277. "type": "number"
  11278. },
  11279. "reasoning": {
  11280. "type": "number"
  11281. },
  11282. "cache": {
  11283. "type": "object",
  11284. "properties": {
  11285. "read": {
  11286. "type": "number"
  11287. },
  11288. "write": {
  11289. "type": "number"
  11290. }
  11291. },
  11292. "required": ["read", "write"],
  11293. "additionalProperties": false
  11294. }
  11295. },
  11296. "required": ["input", "output", "reasoning", "cache"],
  11297. "additionalProperties": false
  11298. },
  11299. "share": {
  11300. "type": "object",
  11301. "properties": {
  11302. "url": {
  11303. "type": "string"
  11304. }
  11305. },
  11306. "required": ["url"],
  11307. "additionalProperties": false
  11308. },
  11309. "title": {
  11310. "type": "string"
  11311. },
  11312. "agent": {
  11313. "type": "string"
  11314. },
  11315. "model": {
  11316. "type": "object",
  11317. "properties": {
  11318. "id": {
  11319. "type": "string"
  11320. },
  11321. "providerID": {
  11322. "type": "string"
  11323. },
  11324. "variant": {
  11325. "type": "string"
  11326. }
  11327. },
  11328. "required": ["id", "providerID"],
  11329. "additionalProperties": false
  11330. },
  11331. "version": {
  11332. "type": "string"
  11333. },
  11334. "time": {
  11335. "type": "object",
  11336. "properties": {
  11337. "created": {
  11338. "type": "integer",
  11339. "minimum": 0
  11340. },
  11341. "updated": {
  11342. "type": "integer",
  11343. "minimum": 0
  11344. },
  11345. "compacting": {
  11346. "type": "integer",
  11347. "minimum": 0
  11348. },
  11349. "archived": {
  11350. "type": "number"
  11351. }
  11352. },
  11353. "required": ["created", "updated"],
  11354. "additionalProperties": false
  11355. },
  11356. "permission": {
  11357. "$ref": "#/components/schemas/PermissionRuleset"
  11358. },
  11359. "revert": {
  11360. "type": "object",
  11361. "properties": {
  11362. "messageID": {
  11363. "type": "string",
  11364. "pattern": "^msg"
  11365. },
  11366. "partID": {
  11367. "type": "string",
  11368. "pattern": "^prt"
  11369. },
  11370. "snapshot": {
  11371. "type": "string"
  11372. },
  11373. "diff": {
  11374. "type": "string"
  11375. }
  11376. },
  11377. "required": ["messageID"],
  11378. "additionalProperties": false
  11379. }
  11380. },
  11381. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11382. "additionalProperties": false
  11383. },
  11384. "Prompt": {
  11385. "type": "object",
  11386. "properties": {
  11387. "text": {
  11388. "type": "string"
  11389. },
  11390. "files": {
  11391. "type": "array",
  11392. "items": {
  11393. "$ref": "#/components/schemas/PromptFileAttachment"
  11394. }
  11395. },
  11396. "agents": {
  11397. "type": "array",
  11398. "items": {
  11399. "$ref": "#/components/schemas/PromptAgentAttachment"
  11400. }
  11401. },
  11402. "references": {
  11403. "type": "array",
  11404. "items": {
  11405. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11406. }
  11407. }
  11408. },
  11409. "required": ["text"],
  11410. "additionalProperties": false
  11411. },
  11412. "GlobalEvent": {
  11413. "type": "object",
  11414. "properties": {
  11415. "directory": {
  11416. "type": "string"
  11417. },
  11418. "project": {
  11419. "type": "string"
  11420. },
  11421. "workspace": {
  11422. "type": "string"
  11423. },
  11424. "payload": {
  11425. "anyOf": [
  11426. {
  11427. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11428. },
  11429. {
  11430. "$ref": "#/components/schemas/EventFileEdited"
  11431. },
  11432. {
  11433. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11434. },
  11435. {
  11436. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11437. },
  11438. {
  11439. "$ref": "#/components/schemas/EventLspUpdated"
  11440. },
  11441. {
  11442. "$ref": "#/components/schemas/EventMessagePartDelta"
  11443. },
  11444. {
  11445. "$ref": "#/components/schemas/EventPermissionAsked"
  11446. },
  11447. {
  11448. "$ref": "#/components/schemas/EventPermissionReplied"
  11449. },
  11450. {
  11451. "$ref": "#/components/schemas/EventSessionDiff"
  11452. },
  11453. {
  11454. "$ref": "#/components/schemas/EventSessionError"
  11455. },
  11456. {
  11457. "$ref": "#/components/schemas/EventQuestionAsked"
  11458. },
  11459. {
  11460. "$ref": "#/components/schemas/EventQuestionReplied"
  11461. },
  11462. {
  11463. "$ref": "#/components/schemas/EventQuestionRejected"
  11464. },
  11465. {
  11466. "$ref": "#/components/schemas/EventTodoUpdated"
  11467. },
  11468. {
  11469. "$ref": "#/components/schemas/EventSessionStatus"
  11470. },
  11471. {
  11472. "$ref": "#/components/schemas/EventSessionIdle"
  11473. },
  11474. {
  11475. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11476. },
  11477. {
  11478. "$ref": "#/components/schemas/Event.tui.command.execute"
  11479. },
  11480. {
  11481. "$ref": "#/components/schemas/Event.tui.toast.show"
  11482. },
  11483. {
  11484. "$ref": "#/components/schemas/Event.tui.session.select"
  11485. },
  11486. {
  11487. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11488. },
  11489. {
  11490. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11491. },
  11492. {
  11493. "$ref": "#/components/schemas/EventCommandExecuted"
  11494. },
  11495. {
  11496. "$ref": "#/components/schemas/EventProjectUpdated"
  11497. },
  11498. {
  11499. "$ref": "#/components/schemas/EventSessionCompacted"
  11500. },
  11501. {
  11502. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11503. },
  11504. {
  11505. "$ref": "#/components/schemas/EventWorkspaceReady"
  11506. },
  11507. {
  11508. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11509. },
  11510. {
  11511. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11512. },
  11513. {
  11514. "$ref": "#/components/schemas/EventWorktreeReady"
  11515. },
  11516. {
  11517. "$ref": "#/components/schemas/EventWorktreeFailed"
  11518. },
  11519. {
  11520. "$ref": "#/components/schemas/EventPtyCreated"
  11521. },
  11522. {
  11523. "$ref": "#/components/schemas/EventPtyUpdated"
  11524. },
  11525. {
  11526. "$ref": "#/components/schemas/EventPtyExited"
  11527. },
  11528. {
  11529. "$ref": "#/components/schemas/EventPtyDeleted"
  11530. },
  11531. {
  11532. "$ref": "#/components/schemas/EventInstallationUpdated"
  11533. },
  11534. {
  11535. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11536. },
  11537. {
  11538. "$ref": "#/components/schemas/EventMessageUpdated"
  11539. },
  11540. {
  11541. "$ref": "#/components/schemas/EventMessageRemoved"
  11542. },
  11543. {
  11544. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11545. },
  11546. {
  11547. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11548. },
  11549. {
  11550. "$ref": "#/components/schemas/EventSessionCreated"
  11551. },
  11552. {
  11553. "$ref": "#/components/schemas/EventSessionUpdated"
  11554. },
  11555. {
  11556. "$ref": "#/components/schemas/EventSessionDeleted"
  11557. },
  11558. {
  11559. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11560. },
  11561. {
  11562. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11563. },
  11564. {
  11565. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11566. },
  11567. {
  11568. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11569. },
  11570. {
  11571. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11572. },
  11573. {
  11574. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11575. },
  11576. {
  11577. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11578. },
  11579. {
  11580. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11581. },
  11582. {
  11583. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11584. },
  11585. {
  11586. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11587. },
  11588. {
  11589. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11590. },
  11591. {
  11592. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11593. },
  11594. {
  11595. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11596. },
  11597. {
  11598. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11599. },
  11600. {
  11601. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11602. },
  11603. {
  11604. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11605. },
  11606. {
  11607. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11608. },
  11609. {
  11610. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11611. },
  11612. {
  11613. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11614. },
  11615. {
  11616. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11617. },
  11618. {
  11619. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11620. },
  11621. {
  11622. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11623. },
  11624. {
  11625. "$ref": "#/components/schemas/EventSessionNextRetried"
  11626. },
  11627. {
  11628. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11629. },
  11630. {
  11631. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11632. },
  11633. {
  11634. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11635. },
  11636. {
  11637. "$ref": "#/components/schemas/EventServerConnected"
  11638. },
  11639. {
  11640. "$ref": "#/components/schemas/EventGlobalDisposed"
  11641. },
  11642. {
  11643. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11644. },
  11645. {
  11646. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11647. },
  11648. {
  11649. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11650. },
  11651. {
  11652. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11653. },
  11654. {
  11655. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11656. },
  11657. {
  11658. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11659. },
  11660. {
  11661. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11662. },
  11663. {
  11664. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11665. },
  11666. {
  11667. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11668. },
  11669. {
  11670. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11671. },
  11672. {
  11673. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11674. },
  11675. {
  11676. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11677. },
  11678. {
  11679. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11680. },
  11681. {
  11682. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11683. },
  11684. {
  11685. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11686. },
  11687. {
  11688. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11689. },
  11690. {
  11691. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11692. },
  11693. {
  11694. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11695. },
  11696. {
  11697. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11698. },
  11699. {
  11700. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11701. },
  11702. {
  11703. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11704. },
  11705. {
  11706. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11707. },
  11708. {
  11709. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11710. },
  11711. {
  11712. "$ref": "#/components/schemas/EventSessionNextRetried"
  11713. },
  11714. {
  11715. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11716. },
  11717. {
  11718. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11719. },
  11720. {
  11721. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11722. },
  11723. {
  11724. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11725. },
  11726. {
  11727. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11728. },
  11729. {
  11730. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11731. },
  11732. {
  11733. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11734. },
  11735. {
  11736. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11737. },
  11738. {
  11739. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11740. },
  11741. {
  11742. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11743. },
  11744. {
  11745. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11746. },
  11747. {
  11748. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11749. },
  11750. {
  11751. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11752. },
  11753. {
  11754. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11755. },
  11756. {
  11757. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11758. },
  11759. {
  11760. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11761. },
  11762. {
  11763. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11764. },
  11765. {
  11766. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11767. },
  11768. {
  11769. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11770. },
  11771. {
  11772. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11773. },
  11774. {
  11775. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11776. },
  11777. {
  11778. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11779. },
  11780. {
  11781. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11782. },
  11783. {
  11784. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11785. },
  11786. {
  11787. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11788. },
  11789. {
  11790. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11791. },
  11792. {
  11793. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11794. },
  11795. {
  11796. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11797. },
  11798. {
  11799. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11800. },
  11801. {
  11802. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11803. },
  11804. {
  11805. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11806. },
  11807. {
  11808. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11809. },
  11810. {
  11811. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11812. },
  11813. {
  11814. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11815. },
  11816. {
  11817. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11818. },
  11819. {
  11820. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11821. }
  11822. ]
  11823. }
  11824. },
  11825. "required": ["directory", "payload"],
  11826. "additionalProperties": false
  11827. },
  11828. "LogLevel": {
  11829. "type": "string",
  11830. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11831. "description": "Log level"
  11832. },
  11833. "ServerConfig": {
  11834. "type": "object",
  11835. "properties": {
  11836. "port": {
  11837. "type": "integer",
  11838. "exclusiveMinimum": 0
  11839. },
  11840. "hostname": {
  11841. "type": "string"
  11842. },
  11843. "mdns": {
  11844. "type": "boolean"
  11845. },
  11846. "mdnsDomain": {
  11847. "type": "string"
  11848. },
  11849. "cors": {
  11850. "type": "array",
  11851. "items": {
  11852. "type": "string"
  11853. }
  11854. }
  11855. },
  11856. "additionalProperties": false,
  11857. "description": "Server configuration for opencode serve and web commands"
  11858. },
  11859. "ReferenceConfigEntry": {
  11860. "anyOf": [
  11861. {
  11862. "type": "string"
  11863. },
  11864. {
  11865. "type": "object",
  11866. "properties": {
  11867. "repository": {
  11868. "type": "string",
  11869. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11870. },
  11871. "branch": {
  11872. "type": "string"
  11873. }
  11874. },
  11875. "required": ["repository"],
  11876. "additionalProperties": false
  11877. },
  11878. {
  11879. "type": "object",
  11880. "properties": {
  11881. "path": {
  11882. "type": "string",
  11883. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11884. }
  11885. },
  11886. "required": ["path"],
  11887. "additionalProperties": false
  11888. }
  11889. ]
  11890. },
  11891. "ReferenceConfig": {
  11892. "type": "object",
  11893. "additionalProperties": {
  11894. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11895. }
  11896. },
  11897. "PermissionActionConfig": {
  11898. "type": "string",
  11899. "enum": ["ask", "allow", "deny"]
  11900. },
  11901. "PermissionObjectConfig": {
  11902. "type": "object",
  11903. "additionalProperties": {
  11904. "$ref": "#/components/schemas/PermissionActionConfig"
  11905. }
  11906. },
  11907. "PermissionRuleConfig": {
  11908. "anyOf": [
  11909. {
  11910. "$ref": "#/components/schemas/PermissionActionConfig"
  11911. },
  11912. {
  11913. "$ref": "#/components/schemas/PermissionObjectConfig"
  11914. }
  11915. ]
  11916. },
  11917. "PermissionConfig": {
  11918. "anyOf": [
  11919. {
  11920. "$ref": "#/components/schemas/PermissionActionConfig"
  11921. },
  11922. {
  11923. "type": "object",
  11924. "properties": {
  11925. "read": {
  11926. "$ref": "#/components/schemas/PermissionRuleConfig"
  11927. },
  11928. "edit": {
  11929. "$ref": "#/components/schemas/PermissionRuleConfig"
  11930. },
  11931. "glob": {
  11932. "$ref": "#/components/schemas/PermissionRuleConfig"
  11933. },
  11934. "grep": {
  11935. "$ref": "#/components/schemas/PermissionRuleConfig"
  11936. },
  11937. "list": {
  11938. "$ref": "#/components/schemas/PermissionRuleConfig"
  11939. },
  11940. "bash": {
  11941. "$ref": "#/components/schemas/PermissionRuleConfig"
  11942. },
  11943. "task": {
  11944. "$ref": "#/components/schemas/PermissionRuleConfig"
  11945. },
  11946. "external_directory": {
  11947. "$ref": "#/components/schemas/PermissionRuleConfig"
  11948. },
  11949. "todowrite": {
  11950. "$ref": "#/components/schemas/PermissionActionConfig"
  11951. },
  11952. "question": {
  11953. "$ref": "#/components/schemas/PermissionActionConfig"
  11954. },
  11955. "webfetch": {
  11956. "$ref": "#/components/schemas/PermissionActionConfig"
  11957. },
  11958. "websearch": {
  11959. "$ref": "#/components/schemas/PermissionActionConfig"
  11960. },
  11961. "repo_clone": {
  11962. "$ref": "#/components/schemas/PermissionRuleConfig"
  11963. },
  11964. "repo_overview": {
  11965. "$ref": "#/components/schemas/PermissionRuleConfig"
  11966. },
  11967. "lsp": {
  11968. "$ref": "#/components/schemas/PermissionRuleConfig"
  11969. },
  11970. "doom_loop": {
  11971. "$ref": "#/components/schemas/PermissionActionConfig"
  11972. },
  11973. "skill": {
  11974. "$ref": "#/components/schemas/PermissionRuleConfig"
  11975. }
  11976. },
  11977. "additionalProperties": {
  11978. "$ref": "#/components/schemas/PermissionRuleConfig"
  11979. }
  11980. }
  11981. ]
  11982. },
  11983. "AgentConfig": {
  11984. "type": "object",
  11985. "properties": {
  11986. "model": {
  11987. "type": "string"
  11988. },
  11989. "variant": {
  11990. "type": "string"
  11991. },
  11992. "temperature": {
  11993. "type": "number"
  11994. },
  11995. "top_p": {
  11996. "type": "number"
  11997. },
  11998. "prompt": {
  11999. "type": "string"
  12000. },
  12001. "tools": {
  12002. "type": "object",
  12003. "additionalProperties": {
  12004. "type": "boolean"
  12005. }
  12006. },
  12007. "disable": {
  12008. "type": "boolean"
  12009. },
  12010. "description": {
  12011. "type": "string"
  12012. },
  12013. "mode": {
  12014. "type": "string",
  12015. "enum": ["subagent", "primary", "all"]
  12016. },
  12017. "hidden": {
  12018. "type": "boolean"
  12019. },
  12020. "options": {
  12021. "type": "object"
  12022. },
  12023. "color": {
  12024. "anyOf": [
  12025. {
  12026. "type": "string",
  12027. "pattern": "^#[0-9a-fA-F]{6}$"
  12028. },
  12029. {
  12030. "type": "string",
  12031. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  12032. }
  12033. ],
  12034. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  12035. },
  12036. "steps": {
  12037. "type": "integer",
  12038. "exclusiveMinimum": 0
  12039. },
  12040. "maxSteps": {
  12041. "type": "integer",
  12042. "exclusiveMinimum": 0
  12043. },
  12044. "permission": {
  12045. "$ref": "#/components/schemas/PermissionConfig"
  12046. }
  12047. },
  12048. "additionalProperties": {}
  12049. },
  12050. "ProviderConfig": {
  12051. "type": "object",
  12052. "properties": {
  12053. "api": {
  12054. "type": "string"
  12055. },
  12056. "name": {
  12057. "type": "string"
  12058. },
  12059. "env": {
  12060. "type": "array",
  12061. "items": {
  12062. "type": "string"
  12063. }
  12064. },
  12065. "id": {
  12066. "type": "string"
  12067. },
  12068. "npm": {
  12069. "type": "string"
  12070. },
  12071. "whitelist": {
  12072. "type": "array",
  12073. "items": {
  12074. "type": "string"
  12075. }
  12076. },
  12077. "blacklist": {
  12078. "type": "array",
  12079. "items": {
  12080. "type": "string"
  12081. }
  12082. },
  12083. "options": {
  12084. "type": "object",
  12085. "properties": {
  12086. "apiKey": {
  12087. "type": "string"
  12088. },
  12089. "baseURL": {
  12090. "type": "string"
  12091. },
  12092. "enterpriseUrl": {
  12093. "type": "string"
  12094. },
  12095. "setCacheKey": {
  12096. "type": "boolean"
  12097. },
  12098. "timeout": {
  12099. "anyOf": [
  12100. {
  12101. "type": "integer",
  12102. "exclusiveMinimum": 0
  12103. },
  12104. {
  12105. "type": "boolean",
  12106. "enum": [false]
  12107. }
  12108. ],
  12109. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  12110. },
  12111. "chunkTimeout": {
  12112. "type": "integer",
  12113. "exclusiveMinimum": 0
  12114. }
  12115. },
  12116. "additionalProperties": {}
  12117. },
  12118. "models": {
  12119. "type": "object",
  12120. "additionalProperties": {
  12121. "type": "object",
  12122. "properties": {
  12123. "id": {
  12124. "type": "string"
  12125. },
  12126. "name": {
  12127. "type": "string"
  12128. },
  12129. "family": {
  12130. "type": "string"
  12131. },
  12132. "release_date": {
  12133. "type": "string"
  12134. },
  12135. "attachment": {
  12136. "type": "boolean"
  12137. },
  12138. "reasoning": {
  12139. "type": "boolean"
  12140. },
  12141. "temperature": {
  12142. "type": "boolean"
  12143. },
  12144. "tool_call": {
  12145. "type": "boolean"
  12146. },
  12147. "interleaved": {
  12148. "anyOf": [
  12149. {
  12150. "type": "boolean",
  12151. "enum": [true]
  12152. },
  12153. {
  12154. "type": "object",
  12155. "properties": {
  12156. "field": {
  12157. "type": "string",
  12158. "enum": ["reasoning_content", "reasoning_details"]
  12159. }
  12160. },
  12161. "required": ["field"],
  12162. "additionalProperties": false
  12163. }
  12164. ]
  12165. },
  12166. "cost": {
  12167. "type": "object",
  12168. "properties": {
  12169. "input": {
  12170. "type": "number"
  12171. },
  12172. "output": {
  12173. "type": "number"
  12174. },
  12175. "cache_read": {
  12176. "type": "number"
  12177. },
  12178. "cache_write": {
  12179. "type": "number"
  12180. },
  12181. "context_over_200k": {
  12182. "type": "object",
  12183. "properties": {
  12184. "input": {
  12185. "type": "number"
  12186. },
  12187. "output": {
  12188. "type": "number"
  12189. },
  12190. "cache_read": {
  12191. "type": "number"
  12192. },
  12193. "cache_write": {
  12194. "type": "number"
  12195. }
  12196. },
  12197. "required": ["input", "output"],
  12198. "additionalProperties": false
  12199. }
  12200. },
  12201. "required": ["input", "output"],
  12202. "additionalProperties": false
  12203. },
  12204. "limit": {
  12205. "type": "object",
  12206. "properties": {
  12207. "context": {
  12208. "type": "number"
  12209. },
  12210. "input": {
  12211. "type": "number"
  12212. },
  12213. "output": {
  12214. "type": "number"
  12215. }
  12216. },
  12217. "required": ["context", "output"],
  12218. "additionalProperties": false
  12219. },
  12220. "modalities": {
  12221. "type": "object",
  12222. "properties": {
  12223. "input": {
  12224. "type": "array",
  12225. "items": {
  12226. "type": "string",
  12227. "enum": ["text", "audio", "image", "video", "pdf"]
  12228. }
  12229. },
  12230. "output": {
  12231. "type": "array",
  12232. "items": {
  12233. "type": "string",
  12234. "enum": ["text", "audio", "image", "video", "pdf"]
  12235. }
  12236. }
  12237. },
  12238. "required": ["input", "output"],
  12239. "additionalProperties": false
  12240. },
  12241. "experimental": {
  12242. "type": "boolean"
  12243. },
  12244. "status": {
  12245. "type": "string",
  12246. "enum": ["alpha", "beta", "deprecated", "active"]
  12247. },
  12248. "provider": {
  12249. "type": "object",
  12250. "properties": {
  12251. "npm": {
  12252. "type": "string"
  12253. },
  12254. "api": {
  12255. "type": "string"
  12256. }
  12257. },
  12258. "additionalProperties": false
  12259. },
  12260. "options": {
  12261. "type": "object"
  12262. },
  12263. "headers": {
  12264. "type": "object",
  12265. "additionalProperties": {
  12266. "type": "string"
  12267. }
  12268. },
  12269. "variants": {
  12270. "type": "object",
  12271. "additionalProperties": {
  12272. "type": "object",
  12273. "properties": {
  12274. "disabled": {
  12275. "type": "boolean"
  12276. }
  12277. },
  12278. "additionalProperties": {}
  12279. },
  12280. "description": "Variant-specific configuration"
  12281. }
  12282. },
  12283. "additionalProperties": false
  12284. }
  12285. }
  12286. },
  12287. "additionalProperties": false
  12288. },
  12289. "McpLocalConfig": {
  12290. "type": "object",
  12291. "properties": {
  12292. "type": {
  12293. "type": "string",
  12294. "enum": ["local"],
  12295. "description": "Type of MCP server connection"
  12296. },
  12297. "command": {
  12298. "type": "array",
  12299. "items": {
  12300. "type": "string"
  12301. },
  12302. "description": "Command and arguments to run the MCP server"
  12303. },
  12304. "environment": {
  12305. "type": "object",
  12306. "additionalProperties": {
  12307. "type": "string"
  12308. }
  12309. },
  12310. "enabled": {
  12311. "type": "boolean"
  12312. },
  12313. "timeout": {
  12314. "type": "integer",
  12315. "exclusiveMinimum": 0
  12316. }
  12317. },
  12318. "required": ["type", "command"],
  12319. "additionalProperties": false
  12320. },
  12321. "McpOAuthConfig": {
  12322. "type": "object",
  12323. "properties": {
  12324. "clientId": {
  12325. "type": "string"
  12326. },
  12327. "clientSecret": {
  12328. "type": "string"
  12329. },
  12330. "scope": {
  12331. "type": "string"
  12332. },
  12333. "redirectUri": {
  12334. "type": "string"
  12335. }
  12336. },
  12337. "additionalProperties": false
  12338. },
  12339. "McpRemoteConfig": {
  12340. "type": "object",
  12341. "properties": {
  12342. "type": {
  12343. "type": "string",
  12344. "enum": ["remote"],
  12345. "description": "Type of MCP server connection"
  12346. },
  12347. "url": {
  12348. "type": "string",
  12349. "description": "URL of the remote MCP server"
  12350. },
  12351. "enabled": {
  12352. "type": "boolean"
  12353. },
  12354. "headers": {
  12355. "type": "object",
  12356. "additionalProperties": {
  12357. "type": "string"
  12358. }
  12359. },
  12360. "oauth": {
  12361. "anyOf": [
  12362. {
  12363. "$ref": "#/components/schemas/McpOAuthConfig"
  12364. },
  12365. {
  12366. "type": "boolean",
  12367. "enum": [false]
  12368. }
  12369. ],
  12370. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12371. },
  12372. "timeout": {
  12373. "type": "integer",
  12374. "exclusiveMinimum": 0
  12375. }
  12376. },
  12377. "required": ["type", "url"],
  12378. "additionalProperties": false
  12379. },
  12380. "LayoutConfig": {
  12381. "type": "string",
  12382. "enum": ["auto", "stretch"],
  12383. "description": "@deprecated Always uses stretch layout."
  12384. },
  12385. "ImageAttachmentConfig": {
  12386. "type": "object",
  12387. "properties": {
  12388. "auto_resize": {
  12389. "type": "boolean"
  12390. },
  12391. "max_width": {
  12392. "type": "integer",
  12393. "exclusiveMinimum": 0
  12394. },
  12395. "max_height": {
  12396. "type": "integer",
  12397. "exclusiveMinimum": 0
  12398. },
  12399. "max_base64_bytes": {
  12400. "type": "integer",
  12401. "exclusiveMinimum": 0
  12402. }
  12403. },
  12404. "additionalProperties": false
  12405. },
  12406. "AttachmentConfig": {
  12407. "type": "object",
  12408. "properties": {
  12409. "image": {
  12410. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12411. }
  12412. },
  12413. "additionalProperties": false
  12414. },
  12415. "Config": {
  12416. "type": "object",
  12417. "properties": {
  12418. "$schema": {
  12419. "type": "string"
  12420. },
  12421. "shell": {
  12422. "type": "string"
  12423. },
  12424. "logLevel": {
  12425. "$ref": "#/components/schemas/LogLevel"
  12426. },
  12427. "server": {
  12428. "$ref": "#/components/schemas/ServerConfig"
  12429. },
  12430. "command": {
  12431. "type": "object",
  12432. "additionalProperties": {
  12433. "type": "object",
  12434. "properties": {
  12435. "template": {
  12436. "type": "string"
  12437. },
  12438. "description": {
  12439. "type": "string"
  12440. },
  12441. "agent": {
  12442. "type": "string"
  12443. },
  12444. "model": {
  12445. "type": "string"
  12446. },
  12447. "subtask": {
  12448. "type": "boolean"
  12449. }
  12450. },
  12451. "required": ["template"],
  12452. "additionalProperties": false
  12453. }
  12454. },
  12455. "skills": {
  12456. "type": "object",
  12457. "properties": {
  12458. "paths": {
  12459. "type": "array",
  12460. "items": {
  12461. "type": "string"
  12462. }
  12463. },
  12464. "urls": {
  12465. "type": "array",
  12466. "items": {
  12467. "type": "string"
  12468. }
  12469. }
  12470. },
  12471. "additionalProperties": false
  12472. },
  12473. "reference": {
  12474. "$ref": "#/components/schemas/ReferenceConfig"
  12475. },
  12476. "watcher": {
  12477. "type": "object",
  12478. "properties": {
  12479. "ignore": {
  12480. "type": "array",
  12481. "items": {
  12482. "type": "string"
  12483. }
  12484. }
  12485. },
  12486. "additionalProperties": false
  12487. },
  12488. "snapshot": {
  12489. "type": "boolean"
  12490. },
  12491. "plugin": {
  12492. "type": "array",
  12493. "items": {
  12494. "anyOf": [
  12495. {
  12496. "type": "string"
  12497. },
  12498. {
  12499. "type": "array",
  12500. "prefixItems": [
  12501. {
  12502. "type": "string"
  12503. },
  12504. {
  12505. "type": "object"
  12506. }
  12507. ],
  12508. "maxItems": 2,
  12509. "minItems": 2
  12510. }
  12511. ]
  12512. }
  12513. },
  12514. "share": {
  12515. "type": "string",
  12516. "enum": ["manual", "auto", "disabled"]
  12517. },
  12518. "autoshare": {
  12519. "type": "boolean"
  12520. },
  12521. "autoupdate": {
  12522. "anyOf": [
  12523. {
  12524. "type": "boolean"
  12525. },
  12526. {
  12527. "type": "string",
  12528. "enum": ["notify"]
  12529. }
  12530. ],
  12531. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12532. },
  12533. "disabled_providers": {
  12534. "type": "array",
  12535. "items": {
  12536. "type": "string"
  12537. }
  12538. },
  12539. "enabled_providers": {
  12540. "type": "array",
  12541. "items": {
  12542. "type": "string"
  12543. }
  12544. },
  12545. "model": {
  12546. "type": "string"
  12547. },
  12548. "small_model": {
  12549. "type": "string"
  12550. },
  12551. "default_agent": {
  12552. "type": "string"
  12553. },
  12554. "username": {
  12555. "type": "string"
  12556. },
  12557. "mode": {
  12558. "type": "object",
  12559. "properties": {
  12560. "build": {
  12561. "$ref": "#/components/schemas/AgentConfig"
  12562. },
  12563. "plan": {
  12564. "$ref": "#/components/schemas/AgentConfig"
  12565. }
  12566. },
  12567. "additionalProperties": {
  12568. "$ref": "#/components/schemas/AgentConfig"
  12569. }
  12570. },
  12571. "agent": {
  12572. "type": "object",
  12573. "properties": {
  12574. "plan": {
  12575. "$ref": "#/components/schemas/AgentConfig"
  12576. },
  12577. "build": {
  12578. "$ref": "#/components/schemas/AgentConfig"
  12579. },
  12580. "general": {
  12581. "$ref": "#/components/schemas/AgentConfig"
  12582. },
  12583. "explore": {
  12584. "$ref": "#/components/schemas/AgentConfig"
  12585. },
  12586. "scout": {
  12587. "$ref": "#/components/schemas/AgentConfig"
  12588. },
  12589. "title": {
  12590. "$ref": "#/components/schemas/AgentConfig"
  12591. },
  12592. "summary": {
  12593. "$ref": "#/components/schemas/AgentConfig"
  12594. },
  12595. "compaction": {
  12596. "$ref": "#/components/schemas/AgentConfig"
  12597. }
  12598. },
  12599. "additionalProperties": {
  12600. "$ref": "#/components/schemas/AgentConfig"
  12601. }
  12602. },
  12603. "provider": {
  12604. "type": "object",
  12605. "additionalProperties": {
  12606. "$ref": "#/components/schemas/ProviderConfig"
  12607. }
  12608. },
  12609. "mcp": {
  12610. "type": "object",
  12611. "additionalProperties": {
  12612. "anyOf": [
  12613. {
  12614. "$ref": "#/components/schemas/McpLocalConfig"
  12615. },
  12616. {
  12617. "$ref": "#/components/schemas/McpRemoteConfig"
  12618. },
  12619. {
  12620. "type": "object",
  12621. "properties": {
  12622. "enabled": {
  12623. "type": "boolean"
  12624. }
  12625. },
  12626. "required": ["enabled"],
  12627. "additionalProperties": false
  12628. }
  12629. ]
  12630. }
  12631. },
  12632. "formatter": {
  12633. "anyOf": [
  12634. {
  12635. "type": "boolean"
  12636. },
  12637. {
  12638. "type": "object",
  12639. "additionalProperties": {
  12640. "type": "object",
  12641. "properties": {
  12642. "disabled": {
  12643. "type": "boolean"
  12644. },
  12645. "command": {
  12646. "type": "array",
  12647. "items": {
  12648. "type": "string"
  12649. }
  12650. },
  12651. "environment": {
  12652. "type": "object",
  12653. "additionalProperties": {
  12654. "type": "string"
  12655. }
  12656. },
  12657. "extensions": {
  12658. "type": "array",
  12659. "items": {
  12660. "type": "string"
  12661. }
  12662. }
  12663. },
  12664. "additionalProperties": false
  12665. }
  12666. }
  12667. ],
  12668. "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."
  12669. },
  12670. "lsp": {
  12671. "anyOf": [
  12672. {
  12673. "type": "boolean"
  12674. },
  12675. {
  12676. "type": "object",
  12677. "additionalProperties": {
  12678. "anyOf": [
  12679. {
  12680. "type": "object",
  12681. "properties": {
  12682. "disabled": {
  12683. "type": "boolean",
  12684. "enum": [true]
  12685. }
  12686. },
  12687. "required": ["disabled"],
  12688. "additionalProperties": false
  12689. },
  12690. {
  12691. "type": "object",
  12692. "properties": {
  12693. "command": {
  12694. "type": "array",
  12695. "items": {
  12696. "type": "string"
  12697. }
  12698. },
  12699. "extensions": {
  12700. "type": "array",
  12701. "items": {
  12702. "type": "string"
  12703. }
  12704. },
  12705. "disabled": {
  12706. "type": "boolean"
  12707. },
  12708. "env": {
  12709. "type": "object",
  12710. "additionalProperties": {
  12711. "type": "string"
  12712. }
  12713. },
  12714. "initialization": {
  12715. "type": "object"
  12716. }
  12717. },
  12718. "required": ["command"],
  12719. "additionalProperties": false
  12720. }
  12721. ]
  12722. }
  12723. }
  12724. ],
  12725. "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."
  12726. },
  12727. "instructions": {
  12728. "type": "array",
  12729. "items": {
  12730. "type": "string"
  12731. }
  12732. },
  12733. "layout": {
  12734. "$ref": "#/components/schemas/LayoutConfig"
  12735. },
  12736. "permission": {
  12737. "$ref": "#/components/schemas/PermissionConfig"
  12738. },
  12739. "tools": {
  12740. "type": "object",
  12741. "additionalProperties": {
  12742. "type": "boolean"
  12743. }
  12744. },
  12745. "attachment": {
  12746. "$ref": "#/components/schemas/AttachmentConfig"
  12747. },
  12748. "enterprise": {
  12749. "type": "object",
  12750. "properties": {
  12751. "url": {
  12752. "type": "string"
  12753. }
  12754. },
  12755. "additionalProperties": false
  12756. },
  12757. "tool_output": {
  12758. "type": "object",
  12759. "properties": {
  12760. "max_lines": {
  12761. "type": "integer",
  12762. "exclusiveMinimum": 0
  12763. },
  12764. "max_bytes": {
  12765. "type": "integer",
  12766. "exclusiveMinimum": 0
  12767. }
  12768. },
  12769. "additionalProperties": false
  12770. },
  12771. "compaction": {
  12772. "type": "object",
  12773. "properties": {
  12774. "auto": {
  12775. "type": "boolean"
  12776. },
  12777. "prune": {
  12778. "type": "boolean"
  12779. },
  12780. "tail_turns": {
  12781. "type": "integer",
  12782. "minimum": 0
  12783. },
  12784. "preserve_recent_tokens": {
  12785. "type": "integer",
  12786. "minimum": 0
  12787. },
  12788. "reserved": {
  12789. "type": "integer",
  12790. "minimum": 0
  12791. }
  12792. },
  12793. "additionalProperties": false
  12794. },
  12795. "experimental": {
  12796. "type": "object",
  12797. "properties": {
  12798. "disable_paste_summary": {
  12799. "type": "boolean"
  12800. },
  12801. "batch_tool": {
  12802. "type": "boolean"
  12803. },
  12804. "openTelemetry": {
  12805. "type": "boolean"
  12806. },
  12807. "primary_tools": {
  12808. "type": "array",
  12809. "items": {
  12810. "type": "string"
  12811. }
  12812. },
  12813. "continue_loop_on_deny": {
  12814. "type": "boolean"
  12815. },
  12816. "mcp_timeout": {
  12817. "type": "integer",
  12818. "exclusiveMinimum": 0
  12819. }
  12820. },
  12821. "additionalProperties": false
  12822. }
  12823. },
  12824. "additionalProperties": false
  12825. },
  12826. "Model": {
  12827. "type": "object",
  12828. "properties": {
  12829. "id": {
  12830. "type": "string"
  12831. },
  12832. "providerID": {
  12833. "type": "string"
  12834. },
  12835. "api": {
  12836. "type": "object",
  12837. "properties": {
  12838. "id": {
  12839. "type": "string"
  12840. },
  12841. "url": {
  12842. "type": "string"
  12843. },
  12844. "npm": {
  12845. "type": "string"
  12846. }
  12847. },
  12848. "required": ["id", "url", "npm"],
  12849. "additionalProperties": false
  12850. },
  12851. "name": {
  12852. "type": "string"
  12853. },
  12854. "family": {
  12855. "type": "string"
  12856. },
  12857. "capabilities": {
  12858. "type": "object",
  12859. "properties": {
  12860. "temperature": {
  12861. "type": "boolean"
  12862. },
  12863. "reasoning": {
  12864. "type": "boolean"
  12865. },
  12866. "attachment": {
  12867. "type": "boolean"
  12868. },
  12869. "toolcall": {
  12870. "type": "boolean"
  12871. },
  12872. "input": {
  12873. "type": "object",
  12874. "properties": {
  12875. "text": {
  12876. "type": "boolean"
  12877. },
  12878. "audio": {
  12879. "type": "boolean"
  12880. },
  12881. "image": {
  12882. "type": "boolean"
  12883. },
  12884. "video": {
  12885. "type": "boolean"
  12886. },
  12887. "pdf": {
  12888. "type": "boolean"
  12889. }
  12890. },
  12891. "required": ["text", "audio", "image", "video", "pdf"],
  12892. "additionalProperties": false
  12893. },
  12894. "output": {
  12895. "type": "object",
  12896. "properties": {
  12897. "text": {
  12898. "type": "boolean"
  12899. },
  12900. "audio": {
  12901. "type": "boolean"
  12902. },
  12903. "image": {
  12904. "type": "boolean"
  12905. },
  12906. "video": {
  12907. "type": "boolean"
  12908. },
  12909. "pdf": {
  12910. "type": "boolean"
  12911. }
  12912. },
  12913. "required": ["text", "audio", "image", "video", "pdf"],
  12914. "additionalProperties": false
  12915. },
  12916. "interleaved": {
  12917. "anyOf": [
  12918. {
  12919. "type": "boolean"
  12920. },
  12921. {
  12922. "type": "object",
  12923. "properties": {
  12924. "field": {
  12925. "type": "string",
  12926. "enum": ["reasoning_content", "reasoning_details"]
  12927. }
  12928. },
  12929. "required": ["field"],
  12930. "additionalProperties": false
  12931. }
  12932. ]
  12933. }
  12934. },
  12935. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12936. "additionalProperties": false
  12937. },
  12938. "cost": {
  12939. "type": "object",
  12940. "properties": {
  12941. "input": {
  12942. "type": "number"
  12943. },
  12944. "output": {
  12945. "type": "number"
  12946. },
  12947. "cache": {
  12948. "type": "object",
  12949. "properties": {
  12950. "read": {
  12951. "type": "number"
  12952. },
  12953. "write": {
  12954. "type": "number"
  12955. }
  12956. },
  12957. "required": ["read", "write"],
  12958. "additionalProperties": false
  12959. },
  12960. "tiers": {
  12961. "type": "array",
  12962. "items": {
  12963. "type": "object",
  12964. "properties": {
  12965. "input": {
  12966. "type": "number"
  12967. },
  12968. "output": {
  12969. "type": "number"
  12970. },
  12971. "cache": {
  12972. "type": "object",
  12973. "properties": {
  12974. "read": {
  12975. "type": "number"
  12976. },
  12977. "write": {
  12978. "type": "number"
  12979. }
  12980. },
  12981. "required": ["read", "write"],
  12982. "additionalProperties": false
  12983. },
  12984. "tier": {
  12985. "type": "object",
  12986. "properties": {
  12987. "type": {
  12988. "type": "string",
  12989. "enum": ["context"]
  12990. },
  12991. "size": {
  12992. "type": "number"
  12993. }
  12994. },
  12995. "required": ["type", "size"],
  12996. "additionalProperties": false
  12997. }
  12998. },
  12999. "required": ["input", "output", "cache", "tier"],
  13000. "additionalProperties": false
  13001. }
  13002. },
  13003. "experimentalOver200K": {
  13004. "type": "object",
  13005. "properties": {
  13006. "input": {
  13007. "type": "number"
  13008. },
  13009. "output": {
  13010. "type": "number"
  13011. },
  13012. "cache": {
  13013. "type": "object",
  13014. "properties": {
  13015. "read": {
  13016. "type": "number"
  13017. },
  13018. "write": {
  13019. "type": "number"
  13020. }
  13021. },
  13022. "required": ["read", "write"],
  13023. "additionalProperties": false
  13024. }
  13025. },
  13026. "required": ["input", "output", "cache"],
  13027. "additionalProperties": false
  13028. }
  13029. },
  13030. "required": ["input", "output", "cache"],
  13031. "additionalProperties": false
  13032. },
  13033. "limit": {
  13034. "type": "object",
  13035. "properties": {
  13036. "context": {
  13037. "type": "number"
  13038. },
  13039. "input": {
  13040. "type": "number"
  13041. },
  13042. "output": {
  13043. "type": "number"
  13044. }
  13045. },
  13046. "required": ["context", "output"],
  13047. "additionalProperties": false
  13048. },
  13049. "status": {
  13050. "type": "string",
  13051. "enum": ["alpha", "beta", "deprecated", "active"]
  13052. },
  13053. "options": {
  13054. "type": "object"
  13055. },
  13056. "headers": {
  13057. "type": "object",
  13058. "additionalProperties": {
  13059. "type": "string"
  13060. }
  13061. },
  13062. "release_date": {
  13063. "type": "string"
  13064. },
  13065. "variants": {
  13066. "type": "object",
  13067. "additionalProperties": {
  13068. "type": "object"
  13069. }
  13070. }
  13071. },
  13072. "required": [
  13073. "id",
  13074. "providerID",
  13075. "api",
  13076. "name",
  13077. "capabilities",
  13078. "cost",
  13079. "limit",
  13080. "status",
  13081. "options",
  13082. "headers",
  13083. "release_date"
  13084. ],
  13085. "additionalProperties": false
  13086. },
  13087. "Provider": {
  13088. "type": "object",
  13089. "properties": {
  13090. "id": {
  13091. "type": "string"
  13092. },
  13093. "name": {
  13094. "type": "string"
  13095. },
  13096. "source": {
  13097. "type": "string",
  13098. "enum": ["env", "config", "custom", "api"]
  13099. },
  13100. "env": {
  13101. "type": "array",
  13102. "items": {
  13103. "type": "string"
  13104. }
  13105. },
  13106. "key": {
  13107. "type": "string"
  13108. },
  13109. "options": {
  13110. "type": "object"
  13111. },
  13112. "models": {
  13113. "type": "object",
  13114. "additionalProperties": {
  13115. "$ref": "#/components/schemas/Model"
  13116. }
  13117. }
  13118. },
  13119. "required": ["id", "name", "source", "env", "options", "models"],
  13120. "additionalProperties": false
  13121. },
  13122. "ConsoleState": {
  13123. "type": "object",
  13124. "properties": {
  13125. "consoleManagedProviders": {
  13126. "type": "array",
  13127. "items": {
  13128. "type": "string"
  13129. }
  13130. },
  13131. "activeOrgName": {
  13132. "type": "string"
  13133. },
  13134. "switchableOrgCount": {
  13135. "type": "integer",
  13136. "minimum": 0
  13137. }
  13138. },
  13139. "required": ["consoleManagedProviders", "switchableOrgCount"],
  13140. "additionalProperties": false
  13141. },
  13142. "effect_HttpApiError_InternalServerError": {
  13143. "type": "object",
  13144. "properties": {
  13145. "_tag": {
  13146. "type": "string",
  13147. "enum": ["InternalServerError"]
  13148. }
  13149. },
  13150. "required": ["_tag"],
  13151. "additionalProperties": false
  13152. },
  13153. "ToolListItem": {
  13154. "type": "object",
  13155. "properties": {
  13156. "id": {
  13157. "type": "string"
  13158. },
  13159. "description": {
  13160. "type": "string"
  13161. },
  13162. "parameters": {}
  13163. },
  13164. "required": ["id", "description", "parameters"],
  13165. "additionalProperties": false
  13166. },
  13167. "ToolList": {
  13168. "type": "array",
  13169. "items": {
  13170. "$ref": "#/components/schemas/ToolListItem"
  13171. }
  13172. },
  13173. "ToolIDs": {
  13174. "type": "array",
  13175. "items": {
  13176. "type": "string"
  13177. }
  13178. },
  13179. "WorktreeError": {
  13180. "type": "object",
  13181. "properties": {
  13182. "name": {
  13183. "type": "string",
  13184. "enum": [
  13185. "WorktreeNotGitError",
  13186. "WorktreeNameGenerationFailedError",
  13187. "WorktreeCreateFailedError",
  13188. "WorktreeStartCommandFailedError",
  13189. "WorktreeRemoveFailedError",
  13190. "WorktreeResetFailedError",
  13191. "WorktreeListFailedError"
  13192. ]
  13193. },
  13194. "data": {
  13195. "type": "object",
  13196. "properties": {
  13197. "message": {
  13198. "type": "string"
  13199. }
  13200. },
  13201. "required": ["message"],
  13202. "additionalProperties": false
  13203. }
  13204. },
  13205. "required": ["name", "data"],
  13206. "additionalProperties": false
  13207. },
  13208. "WorktreeCreateInput": {
  13209. "type": "object",
  13210. "properties": {
  13211. "name": {
  13212. "type": "string"
  13213. },
  13214. "startCommand": {
  13215. "type": "string",
  13216. "description": "Additional startup script to run after the project's start command"
  13217. }
  13218. },
  13219. "additionalProperties": false
  13220. },
  13221. "Worktree": {
  13222. "type": "object",
  13223. "properties": {
  13224. "name": {
  13225. "type": "string"
  13226. },
  13227. "branch": {
  13228. "type": "string"
  13229. },
  13230. "directory": {
  13231. "type": "string"
  13232. }
  13233. },
  13234. "required": ["name", "directory"],
  13235. "additionalProperties": false
  13236. },
  13237. "WorktreeRemoveInput": {
  13238. "type": "object",
  13239. "properties": {
  13240. "directory": {
  13241. "type": "string"
  13242. }
  13243. },
  13244. "required": ["directory"],
  13245. "additionalProperties": false
  13246. },
  13247. "WorktreeResetInput": {
  13248. "type": "object",
  13249. "properties": {
  13250. "directory": {
  13251. "type": "string"
  13252. }
  13253. },
  13254. "required": ["directory"],
  13255. "additionalProperties": false
  13256. },
  13257. "ProjectSummary": {
  13258. "type": "object",
  13259. "properties": {
  13260. "id": {
  13261. "type": "string"
  13262. },
  13263. "name": {
  13264. "type": "string"
  13265. },
  13266. "worktree": {
  13267. "type": "string"
  13268. }
  13269. },
  13270. "required": ["id", "worktree"],
  13271. "additionalProperties": false
  13272. },
  13273. "GlobalSession": {
  13274. "type": "object",
  13275. "properties": {
  13276. "id": {
  13277. "type": "string",
  13278. "pattern": "^ses"
  13279. },
  13280. "slug": {
  13281. "type": "string"
  13282. },
  13283. "projectID": {
  13284. "type": "string"
  13285. },
  13286. "workspaceID": {
  13287. "type": "string",
  13288. "pattern": "^wrk"
  13289. },
  13290. "directory": {
  13291. "type": "string"
  13292. },
  13293. "path": {
  13294. "type": "string"
  13295. },
  13296. "parentID": {
  13297. "type": "string",
  13298. "pattern": "^ses"
  13299. },
  13300. "summary": {
  13301. "type": "object",
  13302. "properties": {
  13303. "additions": {
  13304. "type": "number"
  13305. },
  13306. "deletions": {
  13307. "type": "number"
  13308. },
  13309. "files": {
  13310. "type": "number"
  13311. },
  13312. "diffs": {
  13313. "type": "array",
  13314. "items": {
  13315. "$ref": "#/components/schemas/SnapshotFileDiff"
  13316. }
  13317. }
  13318. },
  13319. "required": ["additions", "deletions", "files"],
  13320. "additionalProperties": false
  13321. },
  13322. "cost": {
  13323. "type": "number"
  13324. },
  13325. "tokens": {
  13326. "type": "object",
  13327. "properties": {
  13328. "input": {
  13329. "type": "number"
  13330. },
  13331. "output": {
  13332. "type": "number"
  13333. },
  13334. "reasoning": {
  13335. "type": "number"
  13336. },
  13337. "cache": {
  13338. "type": "object",
  13339. "properties": {
  13340. "read": {
  13341. "type": "number"
  13342. },
  13343. "write": {
  13344. "type": "number"
  13345. }
  13346. },
  13347. "required": ["read", "write"],
  13348. "additionalProperties": false
  13349. }
  13350. },
  13351. "required": ["input", "output", "reasoning", "cache"],
  13352. "additionalProperties": false
  13353. },
  13354. "share": {
  13355. "type": "object",
  13356. "properties": {
  13357. "url": {
  13358. "type": "string"
  13359. }
  13360. },
  13361. "required": ["url"],
  13362. "additionalProperties": false
  13363. },
  13364. "title": {
  13365. "type": "string"
  13366. },
  13367. "agent": {
  13368. "type": "string"
  13369. },
  13370. "model": {
  13371. "type": "object",
  13372. "properties": {
  13373. "id": {
  13374. "type": "string"
  13375. },
  13376. "providerID": {
  13377. "type": "string"
  13378. },
  13379. "variant": {
  13380. "type": "string"
  13381. }
  13382. },
  13383. "required": ["id", "providerID"],
  13384. "additionalProperties": false
  13385. },
  13386. "version": {
  13387. "type": "string"
  13388. },
  13389. "time": {
  13390. "type": "object",
  13391. "properties": {
  13392. "created": {
  13393. "type": "integer",
  13394. "minimum": 0
  13395. },
  13396. "updated": {
  13397. "type": "integer",
  13398. "minimum": 0
  13399. },
  13400. "compacting": {
  13401. "type": "integer",
  13402. "minimum": 0
  13403. },
  13404. "archived": {
  13405. "type": "number"
  13406. }
  13407. },
  13408. "required": ["created", "updated"],
  13409. "additionalProperties": false
  13410. },
  13411. "permission": {
  13412. "$ref": "#/components/schemas/PermissionRuleset"
  13413. },
  13414. "revert": {
  13415. "type": "object",
  13416. "properties": {
  13417. "messageID": {
  13418. "type": "string",
  13419. "pattern": "^msg"
  13420. },
  13421. "partID": {
  13422. "type": "string",
  13423. "pattern": "^prt"
  13424. },
  13425. "snapshot": {
  13426. "type": "string"
  13427. },
  13428. "diff": {
  13429. "type": "string"
  13430. }
  13431. },
  13432. "required": ["messageID"],
  13433. "additionalProperties": false
  13434. },
  13435. "project": {
  13436. "anyOf": [
  13437. {
  13438. "$ref": "#/components/schemas/ProjectSummary"
  13439. },
  13440. {
  13441. "type": "null"
  13442. }
  13443. ]
  13444. }
  13445. },
  13446. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13447. "additionalProperties": false
  13448. },
  13449. "McpResource": {
  13450. "type": "object",
  13451. "properties": {
  13452. "name": {
  13453. "type": "string"
  13454. },
  13455. "uri": {
  13456. "type": "string"
  13457. },
  13458. "description": {
  13459. "type": "string"
  13460. },
  13461. "mimeType": {
  13462. "type": "string"
  13463. },
  13464. "client": {
  13465. "type": "string"
  13466. }
  13467. },
  13468. "required": ["name", "uri", "client"],
  13469. "additionalProperties": false
  13470. },
  13471. "Symbol": {
  13472. "type": "object",
  13473. "properties": {
  13474. "name": {
  13475. "type": "string"
  13476. },
  13477. "kind": {
  13478. "type": "integer",
  13479. "minimum": 0
  13480. },
  13481. "location": {
  13482. "type": "object",
  13483. "properties": {
  13484. "uri": {
  13485. "type": "string"
  13486. },
  13487. "range": {
  13488. "$ref": "#/components/schemas/Range"
  13489. }
  13490. },
  13491. "required": ["uri", "range"],
  13492. "additionalProperties": false
  13493. }
  13494. },
  13495. "required": ["name", "kind", "location"],
  13496. "additionalProperties": false
  13497. },
  13498. "FileNode": {
  13499. "type": "object",
  13500. "properties": {
  13501. "name": {
  13502. "type": "string"
  13503. },
  13504. "path": {
  13505. "type": "string"
  13506. },
  13507. "absolute": {
  13508. "type": "string"
  13509. },
  13510. "type": {
  13511. "type": "string",
  13512. "enum": ["file", "directory"]
  13513. },
  13514. "ignored": {
  13515. "type": "boolean"
  13516. }
  13517. },
  13518. "required": ["name", "path", "absolute", "type", "ignored"],
  13519. "additionalProperties": false
  13520. },
  13521. "FileContent": {
  13522. "type": "object",
  13523. "properties": {
  13524. "type": {
  13525. "type": "string",
  13526. "enum": ["text", "binary"]
  13527. },
  13528. "content": {
  13529. "type": "string"
  13530. },
  13531. "diff": {
  13532. "type": "string"
  13533. },
  13534. "patch": {
  13535. "type": "object",
  13536. "properties": {
  13537. "oldFileName": {
  13538. "type": "string"
  13539. },
  13540. "newFileName": {
  13541. "type": "string"
  13542. },
  13543. "oldHeader": {
  13544. "type": "string"
  13545. },
  13546. "newHeader": {
  13547. "type": "string"
  13548. },
  13549. "hunks": {
  13550. "type": "array",
  13551. "items": {
  13552. "type": "object",
  13553. "properties": {
  13554. "oldStart": {
  13555. "type": "integer",
  13556. "minimum": 0
  13557. },
  13558. "oldLines": {
  13559. "type": "integer",
  13560. "minimum": 0
  13561. },
  13562. "newStart": {
  13563. "type": "integer",
  13564. "minimum": 0
  13565. },
  13566. "newLines": {
  13567. "type": "integer",
  13568. "minimum": 0
  13569. },
  13570. "lines": {
  13571. "type": "array",
  13572. "items": {
  13573. "type": "string"
  13574. }
  13575. }
  13576. },
  13577. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13578. "additionalProperties": false
  13579. }
  13580. },
  13581. "index": {
  13582. "type": "string"
  13583. }
  13584. },
  13585. "required": ["oldFileName", "newFileName", "hunks"],
  13586. "additionalProperties": false
  13587. },
  13588. "encoding": {
  13589. "type": "string",
  13590. "enum": ["base64"]
  13591. },
  13592. "mimeType": {
  13593. "type": "string"
  13594. }
  13595. },
  13596. "required": ["type", "content"],
  13597. "additionalProperties": false
  13598. },
  13599. "File": {
  13600. "type": "object",
  13601. "properties": {
  13602. "path": {
  13603. "type": "string"
  13604. },
  13605. "added": {
  13606. "type": "integer",
  13607. "minimum": 0
  13608. },
  13609. "removed": {
  13610. "type": "integer",
  13611. "minimum": 0
  13612. },
  13613. "status": {
  13614. "type": "string",
  13615. "enum": ["added", "deleted", "modified"]
  13616. }
  13617. },
  13618. "required": ["path", "added", "removed", "status"],
  13619. "additionalProperties": false
  13620. },
  13621. "Path": {
  13622. "type": "object",
  13623. "properties": {
  13624. "home": {
  13625. "type": "string"
  13626. },
  13627. "state": {
  13628. "type": "string"
  13629. },
  13630. "config": {
  13631. "type": "string"
  13632. },
  13633. "worktree": {
  13634. "type": "string"
  13635. },
  13636. "directory": {
  13637. "type": "string"
  13638. }
  13639. },
  13640. "required": ["home", "state", "config", "worktree", "directory"],
  13641. "additionalProperties": false
  13642. },
  13643. "VcsInfo": {
  13644. "type": "object",
  13645. "properties": {
  13646. "branch": {
  13647. "type": "string"
  13648. },
  13649. "default_branch": {
  13650. "type": "string"
  13651. }
  13652. },
  13653. "additionalProperties": false
  13654. },
  13655. "VcsFileStatus": {
  13656. "type": "object",
  13657. "properties": {
  13658. "file": {
  13659. "type": "string"
  13660. },
  13661. "additions": {
  13662. "type": "number"
  13663. },
  13664. "deletions": {
  13665. "type": "number"
  13666. },
  13667. "status": {
  13668. "type": "string",
  13669. "enum": ["added", "deleted", "modified"]
  13670. }
  13671. },
  13672. "required": ["file", "additions", "deletions", "status"],
  13673. "additionalProperties": false
  13674. },
  13675. "VcsFileDiff": {
  13676. "type": "object",
  13677. "properties": {
  13678. "file": {
  13679. "type": "string"
  13680. },
  13681. "patch": {
  13682. "type": "string"
  13683. },
  13684. "additions": {
  13685. "type": "number"
  13686. },
  13687. "deletions": {
  13688. "type": "number"
  13689. },
  13690. "status": {
  13691. "type": "string",
  13692. "enum": ["added", "deleted", "modified"]
  13693. }
  13694. },
  13695. "required": ["file", "additions", "deletions"],
  13696. "additionalProperties": false
  13697. },
  13698. "VcsApplyError": {
  13699. "type": "object",
  13700. "properties": {
  13701. "name": {
  13702. "type": "string",
  13703. "enum": ["VcsApplyError"]
  13704. },
  13705. "data": {
  13706. "type": "object",
  13707. "properties": {
  13708. "message": {
  13709. "type": "string"
  13710. },
  13711. "reason": {
  13712. "type": "string",
  13713. "enum": ["non-git", "not-clean"]
  13714. }
  13715. },
  13716. "required": ["message", "reason"],
  13717. "additionalProperties": false
  13718. }
  13719. },
  13720. "required": ["name", "data"],
  13721. "additionalProperties": false
  13722. },
  13723. "Command": {
  13724. "type": "object",
  13725. "properties": {
  13726. "name": {
  13727. "type": "string"
  13728. },
  13729. "description": {
  13730. "type": "string"
  13731. },
  13732. "agent": {
  13733. "type": "string"
  13734. },
  13735. "model": {
  13736. "type": "string"
  13737. },
  13738. "source": {
  13739. "type": "string",
  13740. "enum": ["command", "mcp", "skill"]
  13741. },
  13742. "template": {
  13743. "type": "string"
  13744. },
  13745. "subtask": {
  13746. "type": "boolean"
  13747. },
  13748. "hints": {
  13749. "type": "array",
  13750. "items": {
  13751. "type": "string"
  13752. }
  13753. }
  13754. },
  13755. "required": ["name", "template", "hints"],
  13756. "additionalProperties": false
  13757. },
  13758. "Agent": {
  13759. "type": "object",
  13760. "properties": {
  13761. "name": {
  13762. "type": "string"
  13763. },
  13764. "description": {
  13765. "type": "string"
  13766. },
  13767. "mode": {
  13768. "type": "string",
  13769. "enum": ["subagent", "primary", "all"]
  13770. },
  13771. "native": {
  13772. "type": "boolean"
  13773. },
  13774. "hidden": {
  13775. "type": "boolean"
  13776. },
  13777. "topP": {
  13778. "type": "number"
  13779. },
  13780. "temperature": {
  13781. "type": "number"
  13782. },
  13783. "color": {
  13784. "type": "string"
  13785. },
  13786. "permission": {
  13787. "$ref": "#/components/schemas/PermissionRuleset"
  13788. },
  13789. "model": {
  13790. "type": "object",
  13791. "properties": {
  13792. "modelID": {
  13793. "type": "string"
  13794. },
  13795. "providerID": {
  13796. "type": "string"
  13797. }
  13798. },
  13799. "required": ["modelID", "providerID"],
  13800. "additionalProperties": false
  13801. },
  13802. "variant": {
  13803. "type": "string"
  13804. },
  13805. "prompt": {
  13806. "type": "string"
  13807. },
  13808. "options": {
  13809. "type": "object"
  13810. },
  13811. "steps": {
  13812. "type": "number"
  13813. }
  13814. },
  13815. "required": ["name", "mode", "permission", "options"],
  13816. "additionalProperties": false
  13817. },
  13818. "LSPStatus": {
  13819. "type": "object",
  13820. "properties": {
  13821. "id": {
  13822. "type": "string"
  13823. },
  13824. "name": {
  13825. "type": "string"
  13826. },
  13827. "root": {
  13828. "type": "string"
  13829. },
  13830. "status": {
  13831. "type": "string",
  13832. "enum": ["connected", "error"]
  13833. }
  13834. },
  13835. "required": ["id", "name", "root", "status"],
  13836. "additionalProperties": false
  13837. },
  13838. "FormatterStatus": {
  13839. "type": "object",
  13840. "properties": {
  13841. "name": {
  13842. "type": "string"
  13843. },
  13844. "extensions": {
  13845. "type": "array",
  13846. "items": {
  13847. "type": "string"
  13848. }
  13849. },
  13850. "enabled": {
  13851. "type": "boolean"
  13852. }
  13853. },
  13854. "required": ["name", "extensions", "enabled"],
  13855. "additionalProperties": false
  13856. },
  13857. "MCPStatusConnected": {
  13858. "type": "object",
  13859. "properties": {
  13860. "status": {
  13861. "type": "string",
  13862. "enum": ["connected"]
  13863. }
  13864. },
  13865. "required": ["status"],
  13866. "additionalProperties": false
  13867. },
  13868. "MCPStatusDisabled": {
  13869. "type": "object",
  13870. "properties": {
  13871. "status": {
  13872. "type": "string",
  13873. "enum": ["disabled"]
  13874. }
  13875. },
  13876. "required": ["status"],
  13877. "additionalProperties": false
  13878. },
  13879. "MCPStatusFailed": {
  13880. "type": "object",
  13881. "properties": {
  13882. "status": {
  13883. "type": "string",
  13884. "enum": ["failed"]
  13885. },
  13886. "error": {
  13887. "type": "string"
  13888. }
  13889. },
  13890. "required": ["status", "error"],
  13891. "additionalProperties": false
  13892. },
  13893. "MCPStatusNeedsAuth": {
  13894. "type": "object",
  13895. "properties": {
  13896. "status": {
  13897. "type": "string",
  13898. "enum": ["needs_auth"]
  13899. }
  13900. },
  13901. "required": ["status"],
  13902. "additionalProperties": false
  13903. },
  13904. "MCPStatusNeedsClientRegistration": {
  13905. "type": "object",
  13906. "properties": {
  13907. "status": {
  13908. "type": "string",
  13909. "enum": ["needs_client_registration"]
  13910. },
  13911. "error": {
  13912. "type": "string"
  13913. }
  13914. },
  13915. "required": ["status", "error"],
  13916. "additionalProperties": false
  13917. },
  13918. "MCPStatus": {
  13919. "anyOf": [
  13920. {
  13921. "$ref": "#/components/schemas/MCPStatusConnected"
  13922. },
  13923. {
  13924. "$ref": "#/components/schemas/MCPStatusDisabled"
  13925. },
  13926. {
  13927. "$ref": "#/components/schemas/MCPStatusFailed"
  13928. },
  13929. {
  13930. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13931. },
  13932. {
  13933. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13934. }
  13935. ]
  13936. },
  13937. "McpUnsupportedOAuthError": {
  13938. "type": "object",
  13939. "properties": {
  13940. "error": {
  13941. "type": "string"
  13942. }
  13943. },
  13944. "required": ["error"],
  13945. "additionalProperties": false
  13946. },
  13947. "NotFoundError": {
  13948. "type": "object",
  13949. "required": ["name", "data"],
  13950. "properties": {
  13951. "name": {
  13952. "type": "string",
  13953. "enum": ["NotFoundError"]
  13954. },
  13955. "data": {
  13956. "type": "object",
  13957. "required": ["message"],
  13958. "properties": {
  13959. "message": {
  13960. "type": "string"
  13961. }
  13962. }
  13963. }
  13964. }
  13965. },
  13966. "effect_HttpApiError_Forbidden": {
  13967. "type": "object",
  13968. "properties": {
  13969. "_tag": {
  13970. "type": "string",
  13971. "enum": ["Forbidden"]
  13972. }
  13973. },
  13974. "required": ["_tag"],
  13975. "additionalProperties": false
  13976. },
  13977. "ProviderAuthMethod": {
  13978. "type": "object",
  13979. "properties": {
  13980. "type": {
  13981. "type": "string",
  13982. "enum": ["oauth", "api"]
  13983. },
  13984. "label": {
  13985. "type": "string"
  13986. },
  13987. "prompts": {
  13988. "type": "array",
  13989. "items": {
  13990. "anyOf": [
  13991. {
  13992. "type": "object",
  13993. "properties": {
  13994. "type": {
  13995. "type": "string",
  13996. "enum": ["text"]
  13997. },
  13998. "key": {
  13999. "type": "string"
  14000. },
  14001. "message": {
  14002. "type": "string"
  14003. },
  14004. "placeholder": {
  14005. "type": "string"
  14006. },
  14007. "when": {
  14008. "type": "object",
  14009. "properties": {
  14010. "key": {
  14011. "type": "string"
  14012. },
  14013. "op": {
  14014. "type": "string",
  14015. "enum": ["eq", "neq"]
  14016. },
  14017. "value": {
  14018. "type": "string"
  14019. }
  14020. },
  14021. "required": ["key", "op", "value"],
  14022. "additionalProperties": false
  14023. }
  14024. },
  14025. "required": ["type", "key", "message"],
  14026. "additionalProperties": false
  14027. },
  14028. {
  14029. "type": "object",
  14030. "properties": {
  14031. "type": {
  14032. "type": "string",
  14033. "enum": ["select"]
  14034. },
  14035. "key": {
  14036. "type": "string"
  14037. },
  14038. "message": {
  14039. "type": "string"
  14040. },
  14041. "options": {
  14042. "type": "array",
  14043. "items": {
  14044. "type": "object",
  14045. "properties": {
  14046. "label": {
  14047. "type": "string"
  14048. },
  14049. "value": {
  14050. "type": "string"
  14051. },
  14052. "hint": {
  14053. "type": "string"
  14054. }
  14055. },
  14056. "required": ["label", "value"],
  14057. "additionalProperties": false
  14058. }
  14059. },
  14060. "when": {
  14061. "type": "object",
  14062. "properties": {
  14063. "key": {
  14064. "type": "string"
  14065. },
  14066. "op": {
  14067. "type": "string",
  14068. "enum": ["eq", "neq"]
  14069. },
  14070. "value": {
  14071. "type": "string"
  14072. }
  14073. },
  14074. "required": ["key", "op", "value"],
  14075. "additionalProperties": false
  14076. }
  14077. },
  14078. "required": ["type", "key", "message", "options"],
  14079. "additionalProperties": false
  14080. }
  14081. ]
  14082. }
  14083. }
  14084. },
  14085. "required": ["type", "label"],
  14086. "additionalProperties": false
  14087. },
  14088. "ProviderAuthAuthorization": {
  14089. "type": "object",
  14090. "properties": {
  14091. "url": {
  14092. "type": "string"
  14093. },
  14094. "method": {
  14095. "type": "string",
  14096. "enum": ["auto", "code"]
  14097. },
  14098. "instructions": {
  14099. "type": "string"
  14100. }
  14101. },
  14102. "required": ["url", "method", "instructions"],
  14103. "additionalProperties": false
  14104. },
  14105. "ProviderAuthError1": {
  14106. "type": "object",
  14107. "properties": {
  14108. "name": {
  14109. "type": "string",
  14110. "enum": [
  14111. "BadRequest",
  14112. "ProviderAuthOauthMissing",
  14113. "ProviderAuthOauthCodeMissing",
  14114. "ProviderAuthOauthCallbackFailed",
  14115. "ProviderAuthValidationFailed"
  14116. ]
  14117. },
  14118. "data": {
  14119. "type": "object",
  14120. "properties": {
  14121. "providerID": {
  14122. "type": "string"
  14123. },
  14124. "field": {
  14125. "type": "string"
  14126. },
  14127. "message": {
  14128. "type": "string"
  14129. },
  14130. "kind": {
  14131. "type": "string"
  14132. }
  14133. },
  14134. "additionalProperties": false
  14135. }
  14136. },
  14137. "required": ["name", "data"],
  14138. "additionalProperties": false
  14139. },
  14140. "TextPartInput": {
  14141. "type": "object",
  14142. "properties": {
  14143. "id": {
  14144. "type": "string",
  14145. "pattern": "^prt"
  14146. },
  14147. "type": {
  14148. "type": "string",
  14149. "enum": ["text"]
  14150. },
  14151. "text": {
  14152. "type": "string"
  14153. },
  14154. "synthetic": {
  14155. "type": "boolean"
  14156. },
  14157. "ignored": {
  14158. "type": "boolean"
  14159. },
  14160. "time": {
  14161. "type": "object",
  14162. "properties": {
  14163. "start": {
  14164. "type": "integer",
  14165. "minimum": 0
  14166. },
  14167. "end": {
  14168. "type": "integer",
  14169. "minimum": 0
  14170. }
  14171. },
  14172. "required": ["start"],
  14173. "additionalProperties": false
  14174. },
  14175. "metadata": {
  14176. "type": "object"
  14177. }
  14178. },
  14179. "required": ["type", "text"],
  14180. "additionalProperties": false
  14181. },
  14182. "FilePartInput": {
  14183. "type": "object",
  14184. "properties": {
  14185. "id": {
  14186. "type": "string",
  14187. "pattern": "^prt"
  14188. },
  14189. "type": {
  14190. "type": "string",
  14191. "enum": ["file"]
  14192. },
  14193. "mime": {
  14194. "type": "string"
  14195. },
  14196. "filename": {
  14197. "type": "string"
  14198. },
  14199. "url": {
  14200. "type": "string"
  14201. },
  14202. "source": {
  14203. "$ref": "#/components/schemas/FilePartSource"
  14204. }
  14205. },
  14206. "required": ["type", "mime", "url"],
  14207. "additionalProperties": false
  14208. },
  14209. "AgentPartInput": {
  14210. "type": "object",
  14211. "properties": {
  14212. "id": {
  14213. "type": "string",
  14214. "pattern": "^prt"
  14215. },
  14216. "type": {
  14217. "type": "string",
  14218. "enum": ["agent"]
  14219. },
  14220. "name": {
  14221. "type": "string"
  14222. },
  14223. "source": {
  14224. "type": "object",
  14225. "properties": {
  14226. "value": {
  14227. "type": "string"
  14228. },
  14229. "start": {
  14230. "type": "integer",
  14231. "minimum": 0
  14232. },
  14233. "end": {
  14234. "type": "integer",
  14235. "minimum": 0
  14236. }
  14237. },
  14238. "required": ["value", "start", "end"],
  14239. "additionalProperties": false
  14240. }
  14241. },
  14242. "required": ["type", "name"],
  14243. "additionalProperties": false
  14244. },
  14245. "SubtaskPartInput": {
  14246. "type": "object",
  14247. "properties": {
  14248. "id": {
  14249. "type": "string",
  14250. "pattern": "^prt"
  14251. },
  14252. "type": {
  14253. "type": "string",
  14254. "enum": ["subtask"]
  14255. },
  14256. "prompt": {
  14257. "type": "string"
  14258. },
  14259. "description": {
  14260. "type": "string"
  14261. },
  14262. "agent": {
  14263. "type": "string"
  14264. },
  14265. "model": {
  14266. "type": "object",
  14267. "properties": {
  14268. "providerID": {
  14269. "type": "string"
  14270. },
  14271. "modelID": {
  14272. "type": "string"
  14273. }
  14274. },
  14275. "required": ["providerID", "modelID"],
  14276. "additionalProperties": false
  14277. },
  14278. "command": {
  14279. "type": "string"
  14280. }
  14281. },
  14282. "required": ["type", "prompt", "description", "agent"],
  14283. "additionalProperties": false
  14284. },
  14285. "V2SessionsResponse": {
  14286. "type": "object",
  14287. "properties": {
  14288. "items": {
  14289. "type": "array",
  14290. "items": {
  14291. "$ref": "#/components/schemas/SessionInfo"
  14292. }
  14293. },
  14294. "cursor": {
  14295. "type": "object",
  14296. "properties": {
  14297. "previous": {
  14298. "type": "string"
  14299. },
  14300. "next": {
  14301. "type": "string"
  14302. }
  14303. },
  14304. "additionalProperties": false
  14305. }
  14306. },
  14307. "required": ["items", "cursor"],
  14308. "additionalProperties": false
  14309. },
  14310. "V2SessionMessagesResponse": {
  14311. "type": "object",
  14312. "properties": {
  14313. "items": {
  14314. "type": "array",
  14315. "items": {
  14316. "$ref": "#/components/schemas/SessionMessage"
  14317. }
  14318. },
  14319. "cursor": {
  14320. "type": "object",
  14321. "properties": {
  14322. "previous": {
  14323. "type": "string"
  14324. },
  14325. "next": {
  14326. "type": "string"
  14327. }
  14328. },
  14329. "additionalProperties": false
  14330. }
  14331. },
  14332. "required": ["items", "cursor"],
  14333. "additionalProperties": false
  14334. },
  14335. "EventTuiPromptAppend": {
  14336. "type": "object",
  14337. "properties": {
  14338. "type": {
  14339. "type": "string",
  14340. "enum": ["tui.prompt.append"]
  14341. },
  14342. "properties": {
  14343. "type": "object",
  14344. "properties": {
  14345. "text": {
  14346. "type": "string"
  14347. }
  14348. },
  14349. "required": ["text"],
  14350. "additionalProperties": false
  14351. }
  14352. },
  14353. "required": ["type", "properties"],
  14354. "additionalProperties": false
  14355. },
  14356. "EventTuiCommandExecute": {
  14357. "type": "object",
  14358. "properties": {
  14359. "type": {
  14360. "type": "string",
  14361. "enum": ["tui.command.execute"]
  14362. },
  14363. "properties": {
  14364. "type": "object",
  14365. "properties": {
  14366. "command": {
  14367. "anyOf": [
  14368. {
  14369. "type": "string",
  14370. "enum": [
  14371. "session.list",
  14372. "session.new",
  14373. "session.share",
  14374. "session.interrupt",
  14375. "session.compact",
  14376. "session.page.up",
  14377. "session.page.down",
  14378. "session.line.up",
  14379. "session.line.down",
  14380. "session.half.page.up",
  14381. "session.half.page.down",
  14382. "session.first",
  14383. "session.last",
  14384. "prompt.clear",
  14385. "prompt.submit",
  14386. "agent.cycle"
  14387. ]
  14388. },
  14389. {
  14390. "type": "string"
  14391. }
  14392. ]
  14393. }
  14394. },
  14395. "required": ["command"],
  14396. "additionalProperties": false
  14397. }
  14398. },
  14399. "required": ["type", "properties"],
  14400. "additionalProperties": false
  14401. },
  14402. "EventTuiToastShow": {
  14403. "type": "object",
  14404. "properties": {
  14405. "type": {
  14406. "type": "string",
  14407. "enum": ["tui.toast.show"]
  14408. },
  14409. "properties": {
  14410. "type": "object",
  14411. "properties": {
  14412. "title": {
  14413. "type": "string"
  14414. },
  14415. "message": {
  14416. "type": "string"
  14417. },
  14418. "variant": {
  14419. "type": "string",
  14420. "enum": ["info", "success", "warning", "error"]
  14421. },
  14422. "duration": {
  14423. "type": "integer",
  14424. "exclusiveMinimum": 0
  14425. }
  14426. },
  14427. "required": ["message", "variant"],
  14428. "additionalProperties": false
  14429. }
  14430. },
  14431. "required": ["type", "properties"],
  14432. "additionalProperties": false
  14433. },
  14434. "EventTuiSessionSelect": {
  14435. "type": "object",
  14436. "properties": {
  14437. "type": {
  14438. "type": "string",
  14439. "enum": ["tui.session.select"]
  14440. },
  14441. "properties": {
  14442. "type": "object",
  14443. "properties": {
  14444. "sessionID": {
  14445. "type": "string",
  14446. "pattern": "^ses",
  14447. "description": "Session ID to navigate to"
  14448. }
  14449. },
  14450. "required": ["sessionID"],
  14451. "additionalProperties": false
  14452. }
  14453. },
  14454. "required": ["type", "properties"],
  14455. "additionalProperties": false
  14456. },
  14457. "Workspace": {
  14458. "type": "object",
  14459. "properties": {
  14460. "id": {
  14461. "type": "string",
  14462. "pattern": "^wrk"
  14463. },
  14464. "type": {
  14465. "type": "string"
  14466. },
  14467. "name": {
  14468. "type": "string"
  14469. },
  14470. "branch": {
  14471. "anyOf": [
  14472. {
  14473. "type": "string"
  14474. },
  14475. {
  14476. "type": "null"
  14477. }
  14478. ]
  14479. },
  14480. "directory": {
  14481. "anyOf": [
  14482. {
  14483. "type": "string"
  14484. },
  14485. {
  14486. "type": "null"
  14487. }
  14488. ]
  14489. },
  14490. "extra": {
  14491. "anyOf": [
  14492. {},
  14493. {
  14494. "type": "null"
  14495. }
  14496. ]
  14497. },
  14498. "projectID": {
  14499. "type": "string"
  14500. },
  14501. "timeUsed": {
  14502. "anyOf": [
  14503. {
  14504. "type": "number"
  14505. },
  14506. {
  14507. "type": "string",
  14508. "enum": ["NaN"]
  14509. },
  14510. {
  14511. "type": "string",
  14512. "enum": ["Infinity"]
  14513. },
  14514. {
  14515. "type": "string",
  14516. "enum": ["-Infinity"]
  14517. },
  14518. {
  14519. "type": "string",
  14520. "enum": ["Infinity", "-Infinity", "NaN"]
  14521. }
  14522. ]
  14523. }
  14524. },
  14525. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14526. "additionalProperties": false
  14527. },
  14528. "WorkspaceWarpError": {
  14529. "type": "object",
  14530. "properties": {
  14531. "name": {
  14532. "type": "string",
  14533. "enum": ["WorkspaceWarpError"]
  14534. },
  14535. "data": {
  14536. "type": "object",
  14537. "properties": {
  14538. "message": {
  14539. "type": "string"
  14540. }
  14541. },
  14542. "required": ["message"],
  14543. "additionalProperties": false
  14544. }
  14545. },
  14546. "required": ["name", "data"],
  14547. "additionalProperties": false
  14548. },
  14549. "SyncEventMessageUpdated": {
  14550. "type": "object",
  14551. "properties": {
  14552. "type": {
  14553. "type": "string",
  14554. "enum": ["sync"]
  14555. },
  14556. "name": {
  14557. "type": "string",
  14558. "enum": ["message.updated.1"]
  14559. },
  14560. "id": {
  14561. "type": "string"
  14562. },
  14563. "seq": {
  14564. "type": "number"
  14565. },
  14566. "aggregateID": {
  14567. "type": "string",
  14568. "enum": ["sessionID"]
  14569. },
  14570. "data": {
  14571. "type": "object",
  14572. "properties": {
  14573. "sessionID": {
  14574. "type": "string",
  14575. "pattern": "^ses"
  14576. },
  14577. "info": {
  14578. "$ref": "#/components/schemas/Message"
  14579. }
  14580. },
  14581. "required": ["sessionID", "info"],
  14582. "additionalProperties": false
  14583. }
  14584. },
  14585. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14586. "additionalProperties": false
  14587. },
  14588. "SyncEventMessageRemoved": {
  14589. "type": "object",
  14590. "properties": {
  14591. "type": {
  14592. "type": "string",
  14593. "enum": ["sync"]
  14594. },
  14595. "name": {
  14596. "type": "string",
  14597. "enum": ["message.removed.1"]
  14598. },
  14599. "id": {
  14600. "type": "string"
  14601. },
  14602. "seq": {
  14603. "type": "number"
  14604. },
  14605. "aggregateID": {
  14606. "type": "string",
  14607. "enum": ["sessionID"]
  14608. },
  14609. "data": {
  14610. "type": "object",
  14611. "properties": {
  14612. "sessionID": {
  14613. "type": "string",
  14614. "pattern": "^ses"
  14615. },
  14616. "messageID": {
  14617. "type": "string",
  14618. "pattern": "^msg"
  14619. }
  14620. },
  14621. "required": ["sessionID", "messageID"],
  14622. "additionalProperties": false
  14623. }
  14624. },
  14625. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14626. "additionalProperties": false
  14627. },
  14628. "SyncEventMessagePartUpdated": {
  14629. "type": "object",
  14630. "properties": {
  14631. "type": {
  14632. "type": "string",
  14633. "enum": ["sync"]
  14634. },
  14635. "name": {
  14636. "type": "string",
  14637. "enum": ["message.part.updated.1"]
  14638. },
  14639. "id": {
  14640. "type": "string"
  14641. },
  14642. "seq": {
  14643. "type": "number"
  14644. },
  14645. "aggregateID": {
  14646. "type": "string",
  14647. "enum": ["sessionID"]
  14648. },
  14649. "data": {
  14650. "type": "object",
  14651. "properties": {
  14652. "sessionID": {
  14653. "type": "string",
  14654. "pattern": "^ses"
  14655. },
  14656. "part": {
  14657. "$ref": "#/components/schemas/Part"
  14658. },
  14659. "time": {
  14660. "type": "integer",
  14661. "minimum": 0
  14662. }
  14663. },
  14664. "required": ["sessionID", "part", "time"],
  14665. "additionalProperties": false
  14666. }
  14667. },
  14668. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14669. "additionalProperties": false
  14670. },
  14671. "SyncEventMessagePartRemoved": {
  14672. "type": "object",
  14673. "properties": {
  14674. "type": {
  14675. "type": "string",
  14676. "enum": ["sync"]
  14677. },
  14678. "name": {
  14679. "type": "string",
  14680. "enum": ["message.part.removed.1"]
  14681. },
  14682. "id": {
  14683. "type": "string"
  14684. },
  14685. "seq": {
  14686. "type": "number"
  14687. },
  14688. "aggregateID": {
  14689. "type": "string",
  14690. "enum": ["sessionID"]
  14691. },
  14692. "data": {
  14693. "type": "object",
  14694. "properties": {
  14695. "sessionID": {
  14696. "type": "string",
  14697. "pattern": "^ses"
  14698. },
  14699. "messageID": {
  14700. "type": "string",
  14701. "pattern": "^msg"
  14702. },
  14703. "partID": {
  14704. "type": "string",
  14705. "pattern": "^prt"
  14706. }
  14707. },
  14708. "required": ["sessionID", "messageID", "partID"],
  14709. "additionalProperties": false
  14710. }
  14711. },
  14712. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14713. "additionalProperties": false
  14714. },
  14715. "SyncEventSessionCreated": {
  14716. "type": "object",
  14717. "properties": {
  14718. "type": {
  14719. "type": "string",
  14720. "enum": ["sync"]
  14721. },
  14722. "name": {
  14723. "type": "string",
  14724. "enum": ["session.created.1"]
  14725. },
  14726. "id": {
  14727. "type": "string"
  14728. },
  14729. "seq": {
  14730. "type": "number"
  14731. },
  14732. "aggregateID": {
  14733. "type": "string",
  14734. "enum": ["sessionID"]
  14735. },
  14736. "data": {
  14737. "type": "object",
  14738. "properties": {
  14739. "sessionID": {
  14740. "type": "string",
  14741. "pattern": "^ses"
  14742. },
  14743. "info": {
  14744. "$ref": "#/components/schemas/Session"
  14745. }
  14746. },
  14747. "required": ["sessionID", "info"],
  14748. "additionalProperties": false
  14749. }
  14750. },
  14751. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14752. "additionalProperties": false
  14753. },
  14754. "SyncEventSessionUpdated": {
  14755. "type": "object",
  14756. "properties": {
  14757. "type": {
  14758. "type": "string",
  14759. "enum": ["sync"]
  14760. },
  14761. "name": {
  14762. "type": "string",
  14763. "enum": ["session.updated.1"]
  14764. },
  14765. "id": {
  14766. "type": "string"
  14767. },
  14768. "seq": {
  14769. "type": "number"
  14770. },
  14771. "aggregateID": {
  14772. "type": "string",
  14773. "enum": ["sessionID"]
  14774. },
  14775. "data": {
  14776. "type": "object",
  14777. "properties": {
  14778. "sessionID": {
  14779. "type": "string",
  14780. "pattern": "^ses"
  14781. },
  14782. "info": {
  14783. "type": "object",
  14784. "properties": {
  14785. "id": {
  14786. "anyOf": [
  14787. {
  14788. "type": "string",
  14789. "pattern": "^ses"
  14790. },
  14791. {
  14792. "type": "null"
  14793. }
  14794. ]
  14795. },
  14796. "slug": {
  14797. "anyOf": [
  14798. {
  14799. "type": "string"
  14800. },
  14801. {
  14802. "type": "null"
  14803. }
  14804. ]
  14805. },
  14806. "projectID": {
  14807. "anyOf": [
  14808. {
  14809. "type": "string"
  14810. },
  14811. {
  14812. "type": "null"
  14813. }
  14814. ]
  14815. },
  14816. "workspaceID": {
  14817. "anyOf": [
  14818. {
  14819. "type": "string",
  14820. "pattern": "^wrk"
  14821. },
  14822. {
  14823. "type": "null"
  14824. }
  14825. ]
  14826. },
  14827. "directory": {
  14828. "anyOf": [
  14829. {
  14830. "type": "string"
  14831. },
  14832. {
  14833. "type": "null"
  14834. }
  14835. ]
  14836. },
  14837. "path": {
  14838. "anyOf": [
  14839. {
  14840. "type": "string"
  14841. },
  14842. {
  14843. "type": "null"
  14844. }
  14845. ]
  14846. },
  14847. "parentID": {
  14848. "anyOf": [
  14849. {
  14850. "type": "string",
  14851. "pattern": "^ses"
  14852. },
  14853. {
  14854. "type": "null"
  14855. }
  14856. ]
  14857. },
  14858. "summary": {
  14859. "anyOf": [
  14860. {
  14861. "type": "object",
  14862. "properties": {
  14863. "additions": {
  14864. "type": "number"
  14865. },
  14866. "deletions": {
  14867. "type": "number"
  14868. },
  14869. "files": {
  14870. "type": "number"
  14871. },
  14872. "diffs": {
  14873. "type": "array",
  14874. "items": {
  14875. "$ref": "#/components/schemas/SnapshotFileDiff"
  14876. }
  14877. }
  14878. },
  14879. "required": ["additions", "deletions", "files"],
  14880. "additionalProperties": false
  14881. },
  14882. {
  14883. "type": "null"
  14884. }
  14885. ]
  14886. },
  14887. "cost": {
  14888. "anyOf": [
  14889. {
  14890. "type": "number"
  14891. },
  14892. {
  14893. "type": "null"
  14894. }
  14895. ]
  14896. },
  14897. "tokens": {
  14898. "anyOf": [
  14899. {
  14900. "type": "object",
  14901. "properties": {
  14902. "input": {
  14903. "type": "number"
  14904. },
  14905. "output": {
  14906. "type": "number"
  14907. },
  14908. "reasoning": {
  14909. "type": "number"
  14910. },
  14911. "cache": {
  14912. "type": "object",
  14913. "properties": {
  14914. "read": {
  14915. "type": "number"
  14916. },
  14917. "write": {
  14918. "type": "number"
  14919. }
  14920. },
  14921. "required": ["read", "write"],
  14922. "additionalProperties": false
  14923. }
  14924. },
  14925. "required": ["input", "output", "reasoning", "cache"],
  14926. "additionalProperties": false
  14927. },
  14928. {
  14929. "type": "null"
  14930. }
  14931. ]
  14932. },
  14933. "share": {
  14934. "type": "object",
  14935. "properties": {
  14936. "url": {
  14937. "anyOf": [
  14938. {
  14939. "type": "string"
  14940. },
  14941. {
  14942. "type": "null"
  14943. }
  14944. ]
  14945. }
  14946. },
  14947. "additionalProperties": false
  14948. },
  14949. "title": {
  14950. "anyOf": [
  14951. {
  14952. "type": "string"
  14953. },
  14954. {
  14955. "type": "null"
  14956. }
  14957. ]
  14958. },
  14959. "agent": {
  14960. "anyOf": [
  14961. {
  14962. "type": "string"
  14963. },
  14964. {
  14965. "type": "null"
  14966. }
  14967. ]
  14968. },
  14969. "model": {
  14970. "anyOf": [
  14971. {
  14972. "type": "object",
  14973. "properties": {
  14974. "id": {
  14975. "type": "string"
  14976. },
  14977. "providerID": {
  14978. "type": "string"
  14979. },
  14980. "variant": {
  14981. "type": "string"
  14982. }
  14983. },
  14984. "required": ["id", "providerID"],
  14985. "additionalProperties": false
  14986. },
  14987. {
  14988. "type": "null"
  14989. }
  14990. ]
  14991. },
  14992. "version": {
  14993. "anyOf": [
  14994. {
  14995. "type": "string"
  14996. },
  14997. {
  14998. "type": "null"
  14999. }
  15000. ]
  15001. },
  15002. "time": {
  15003. "type": "object",
  15004. "properties": {
  15005. "created": {
  15006. "anyOf": [
  15007. {
  15008. "type": "integer",
  15009. "minimum": 0
  15010. },
  15011. {
  15012. "type": "null"
  15013. }
  15014. ]
  15015. },
  15016. "updated": {
  15017. "anyOf": [
  15018. {
  15019. "type": "integer",
  15020. "minimum": 0
  15021. },
  15022. {
  15023. "type": "null"
  15024. }
  15025. ]
  15026. },
  15027. "compacting": {
  15028. "anyOf": [
  15029. {
  15030. "type": "integer",
  15031. "minimum": 0
  15032. },
  15033. {
  15034. "type": "null"
  15035. }
  15036. ]
  15037. },
  15038. "archived": {
  15039. "anyOf": [
  15040. {
  15041. "type": "number"
  15042. },
  15043. {
  15044. "type": "null"
  15045. }
  15046. ]
  15047. }
  15048. },
  15049. "additionalProperties": false
  15050. },
  15051. "permission": {
  15052. "anyOf": [
  15053. {
  15054. "$ref": "#/components/schemas/PermissionRuleset"
  15055. },
  15056. {
  15057. "type": "null"
  15058. }
  15059. ]
  15060. },
  15061. "revert": {
  15062. "anyOf": [
  15063. {
  15064. "type": "object",
  15065. "properties": {
  15066. "messageID": {
  15067. "type": "string",
  15068. "pattern": "^msg"
  15069. },
  15070. "partID": {
  15071. "type": "string",
  15072. "pattern": "^prt"
  15073. },
  15074. "snapshot": {
  15075. "type": "string"
  15076. },
  15077. "diff": {
  15078. "type": "string"
  15079. }
  15080. },
  15081. "required": ["messageID"],
  15082. "additionalProperties": false
  15083. },
  15084. {
  15085. "type": "null"
  15086. }
  15087. ]
  15088. }
  15089. },
  15090. "additionalProperties": false
  15091. }
  15092. },
  15093. "required": ["sessionID", "info"],
  15094. "additionalProperties": false
  15095. }
  15096. },
  15097. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15098. "additionalProperties": false
  15099. },
  15100. "SyncEventSessionDeleted": {
  15101. "type": "object",
  15102. "properties": {
  15103. "type": {
  15104. "type": "string",
  15105. "enum": ["sync"]
  15106. },
  15107. "name": {
  15108. "type": "string",
  15109. "enum": ["session.deleted.1"]
  15110. },
  15111. "id": {
  15112. "type": "string"
  15113. },
  15114. "seq": {
  15115. "type": "number"
  15116. },
  15117. "aggregateID": {
  15118. "type": "string",
  15119. "enum": ["sessionID"]
  15120. },
  15121. "data": {
  15122. "type": "object",
  15123. "properties": {
  15124. "sessionID": {
  15125. "type": "string",
  15126. "pattern": "^ses"
  15127. },
  15128. "info": {
  15129. "$ref": "#/components/schemas/Session"
  15130. }
  15131. },
  15132. "required": ["sessionID", "info"],
  15133. "additionalProperties": false
  15134. }
  15135. },
  15136. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15137. "additionalProperties": false
  15138. },
  15139. "SyncEventSessionNextAgentSwitched": {
  15140. "type": "object",
  15141. "properties": {
  15142. "type": {
  15143. "type": "string",
  15144. "enum": ["sync"]
  15145. },
  15146. "name": {
  15147. "type": "string",
  15148. "enum": ["session.next.agent.switched.1"]
  15149. },
  15150. "id": {
  15151. "type": "string"
  15152. },
  15153. "seq": {
  15154. "type": "number"
  15155. },
  15156. "aggregateID": {
  15157. "type": "string",
  15158. "enum": ["sessionID"]
  15159. },
  15160. "data": {
  15161. "type": "object",
  15162. "properties": {
  15163. "timestamp": {
  15164. "type": "number"
  15165. },
  15166. "sessionID": {
  15167. "type": "string",
  15168. "pattern": "^ses"
  15169. },
  15170. "agent": {
  15171. "type": "string"
  15172. }
  15173. },
  15174. "required": ["timestamp", "sessionID", "agent"],
  15175. "additionalProperties": false
  15176. }
  15177. },
  15178. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15179. "additionalProperties": false
  15180. },
  15181. "SyncEventSessionNextModelSwitched": {
  15182. "type": "object",
  15183. "properties": {
  15184. "type": {
  15185. "type": "string",
  15186. "enum": ["sync"]
  15187. },
  15188. "name": {
  15189. "type": "string",
  15190. "enum": ["session.next.model.switched.1"]
  15191. },
  15192. "id": {
  15193. "type": "string"
  15194. },
  15195. "seq": {
  15196. "type": "number"
  15197. },
  15198. "aggregateID": {
  15199. "type": "string",
  15200. "enum": ["sessionID"]
  15201. },
  15202. "data": {
  15203. "type": "object",
  15204. "properties": {
  15205. "timestamp": {
  15206. "type": "number"
  15207. },
  15208. "sessionID": {
  15209. "type": "string",
  15210. "pattern": "^ses"
  15211. },
  15212. "model": {
  15213. "type": "object",
  15214. "properties": {
  15215. "id": {
  15216. "type": "string"
  15217. },
  15218. "providerID": {
  15219. "type": "string"
  15220. },
  15221. "variant": {
  15222. "type": "string"
  15223. }
  15224. },
  15225. "required": ["id", "providerID", "variant"],
  15226. "additionalProperties": false
  15227. }
  15228. },
  15229. "required": ["timestamp", "sessionID", "model"],
  15230. "additionalProperties": false
  15231. }
  15232. },
  15233. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15234. "additionalProperties": false
  15235. },
  15236. "SyncEventSessionNextPrompted": {
  15237. "type": "object",
  15238. "properties": {
  15239. "type": {
  15240. "type": "string",
  15241. "enum": ["sync"]
  15242. },
  15243. "name": {
  15244. "type": "string",
  15245. "enum": ["session.next.prompted.1"]
  15246. },
  15247. "id": {
  15248. "type": "string"
  15249. },
  15250. "seq": {
  15251. "type": "number"
  15252. },
  15253. "aggregateID": {
  15254. "type": "string",
  15255. "enum": ["sessionID"]
  15256. },
  15257. "data": {
  15258. "type": "object",
  15259. "properties": {
  15260. "timestamp": {
  15261. "type": "number"
  15262. },
  15263. "sessionID": {
  15264. "type": "string",
  15265. "pattern": "^ses"
  15266. },
  15267. "prompt": {
  15268. "$ref": "#/components/schemas/Prompt"
  15269. }
  15270. },
  15271. "required": ["timestamp", "sessionID", "prompt"],
  15272. "additionalProperties": false
  15273. }
  15274. },
  15275. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15276. "additionalProperties": false
  15277. },
  15278. "SyncEventSessionNextSynthetic": {
  15279. "type": "object",
  15280. "properties": {
  15281. "type": {
  15282. "type": "string",
  15283. "enum": ["sync"]
  15284. },
  15285. "name": {
  15286. "type": "string",
  15287. "enum": ["session.next.synthetic.1"]
  15288. },
  15289. "id": {
  15290. "type": "string"
  15291. },
  15292. "seq": {
  15293. "type": "number"
  15294. },
  15295. "aggregateID": {
  15296. "type": "string",
  15297. "enum": ["sessionID"]
  15298. },
  15299. "data": {
  15300. "type": "object",
  15301. "properties": {
  15302. "timestamp": {
  15303. "type": "number"
  15304. },
  15305. "sessionID": {
  15306. "type": "string",
  15307. "pattern": "^ses"
  15308. },
  15309. "text": {
  15310. "type": "string"
  15311. }
  15312. },
  15313. "required": ["timestamp", "sessionID", "text"],
  15314. "additionalProperties": false
  15315. }
  15316. },
  15317. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15318. "additionalProperties": false
  15319. },
  15320. "SyncEventSessionNextShellStarted": {
  15321. "type": "object",
  15322. "properties": {
  15323. "type": {
  15324. "type": "string",
  15325. "enum": ["sync"]
  15326. },
  15327. "name": {
  15328. "type": "string",
  15329. "enum": ["session.next.shell.started.1"]
  15330. },
  15331. "id": {
  15332. "type": "string"
  15333. },
  15334. "seq": {
  15335. "type": "number"
  15336. },
  15337. "aggregateID": {
  15338. "type": "string",
  15339. "enum": ["sessionID"]
  15340. },
  15341. "data": {
  15342. "type": "object",
  15343. "properties": {
  15344. "timestamp": {
  15345. "type": "number"
  15346. },
  15347. "sessionID": {
  15348. "type": "string",
  15349. "pattern": "^ses"
  15350. },
  15351. "callID": {
  15352. "type": "string"
  15353. },
  15354. "command": {
  15355. "type": "string"
  15356. }
  15357. },
  15358. "required": ["timestamp", "sessionID", "callID", "command"],
  15359. "additionalProperties": false
  15360. }
  15361. },
  15362. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15363. "additionalProperties": false
  15364. },
  15365. "SyncEventSessionNextShellEnded": {
  15366. "type": "object",
  15367. "properties": {
  15368. "type": {
  15369. "type": "string",
  15370. "enum": ["sync"]
  15371. },
  15372. "name": {
  15373. "type": "string",
  15374. "enum": ["session.next.shell.ended.1"]
  15375. },
  15376. "id": {
  15377. "type": "string"
  15378. },
  15379. "seq": {
  15380. "type": "number"
  15381. },
  15382. "aggregateID": {
  15383. "type": "string",
  15384. "enum": ["sessionID"]
  15385. },
  15386. "data": {
  15387. "type": "object",
  15388. "properties": {
  15389. "timestamp": {
  15390. "type": "number"
  15391. },
  15392. "sessionID": {
  15393. "type": "string",
  15394. "pattern": "^ses"
  15395. },
  15396. "callID": {
  15397. "type": "string"
  15398. },
  15399. "output": {
  15400. "type": "string"
  15401. }
  15402. },
  15403. "required": ["timestamp", "sessionID", "callID", "output"],
  15404. "additionalProperties": false
  15405. }
  15406. },
  15407. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15408. "additionalProperties": false
  15409. },
  15410. "SyncEventSessionNextStepStarted": {
  15411. "type": "object",
  15412. "properties": {
  15413. "type": {
  15414. "type": "string",
  15415. "enum": ["sync"]
  15416. },
  15417. "name": {
  15418. "type": "string",
  15419. "enum": ["session.next.step.started.1"]
  15420. },
  15421. "id": {
  15422. "type": "string"
  15423. },
  15424. "seq": {
  15425. "type": "number"
  15426. },
  15427. "aggregateID": {
  15428. "type": "string",
  15429. "enum": ["sessionID"]
  15430. },
  15431. "data": {
  15432. "type": "object",
  15433. "properties": {
  15434. "timestamp": {
  15435. "type": "number"
  15436. },
  15437. "sessionID": {
  15438. "type": "string",
  15439. "pattern": "^ses"
  15440. },
  15441. "agent": {
  15442. "type": "string"
  15443. },
  15444. "model": {
  15445. "type": "object",
  15446. "properties": {
  15447. "id": {
  15448. "type": "string"
  15449. },
  15450. "providerID": {
  15451. "type": "string"
  15452. },
  15453. "variant": {
  15454. "type": "string"
  15455. }
  15456. },
  15457. "required": ["id", "providerID", "variant"],
  15458. "additionalProperties": false
  15459. },
  15460. "snapshot": {
  15461. "type": "string"
  15462. }
  15463. },
  15464. "required": ["timestamp", "sessionID", "agent", "model"],
  15465. "additionalProperties": false
  15466. }
  15467. },
  15468. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15469. "additionalProperties": false
  15470. },
  15471. "SyncEventSessionNextStepEnded": {
  15472. "type": "object",
  15473. "properties": {
  15474. "type": {
  15475. "type": "string",
  15476. "enum": ["sync"]
  15477. },
  15478. "name": {
  15479. "type": "string",
  15480. "enum": ["session.next.step.ended.1"]
  15481. },
  15482. "id": {
  15483. "type": "string"
  15484. },
  15485. "seq": {
  15486. "type": "number"
  15487. },
  15488. "aggregateID": {
  15489. "type": "string",
  15490. "enum": ["sessionID"]
  15491. },
  15492. "data": {
  15493. "type": "object",
  15494. "properties": {
  15495. "timestamp": {
  15496. "type": "number"
  15497. },
  15498. "sessionID": {
  15499. "type": "string",
  15500. "pattern": "^ses"
  15501. },
  15502. "finish": {
  15503. "type": "string"
  15504. },
  15505. "cost": {
  15506. "type": "number"
  15507. },
  15508. "tokens": {
  15509. "type": "object",
  15510. "properties": {
  15511. "input": {
  15512. "type": "number"
  15513. },
  15514. "output": {
  15515. "type": "number"
  15516. },
  15517. "reasoning": {
  15518. "type": "number"
  15519. },
  15520. "cache": {
  15521. "type": "object",
  15522. "properties": {
  15523. "read": {
  15524. "type": "number"
  15525. },
  15526. "write": {
  15527. "type": "number"
  15528. }
  15529. },
  15530. "required": ["read", "write"],
  15531. "additionalProperties": false
  15532. }
  15533. },
  15534. "required": ["input", "output", "reasoning", "cache"],
  15535. "additionalProperties": false
  15536. },
  15537. "snapshot": {
  15538. "type": "string"
  15539. }
  15540. },
  15541. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15542. "additionalProperties": false
  15543. }
  15544. },
  15545. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15546. "additionalProperties": false
  15547. },
  15548. "SyncEventSessionNextStepFailed": {
  15549. "type": "object",
  15550. "properties": {
  15551. "type": {
  15552. "type": "string",
  15553. "enum": ["sync"]
  15554. },
  15555. "name": {
  15556. "type": "string",
  15557. "enum": ["session.next.step.failed.1"]
  15558. },
  15559. "id": {
  15560. "type": "string"
  15561. },
  15562. "seq": {
  15563. "type": "number"
  15564. },
  15565. "aggregateID": {
  15566. "type": "string",
  15567. "enum": ["sessionID"]
  15568. },
  15569. "data": {
  15570. "type": "object",
  15571. "properties": {
  15572. "timestamp": {
  15573. "type": "number"
  15574. },
  15575. "sessionID": {
  15576. "type": "string",
  15577. "pattern": "^ses"
  15578. },
  15579. "error": {
  15580. "$ref": "#/components/schemas/SessionErrorUnknown"
  15581. }
  15582. },
  15583. "required": ["timestamp", "sessionID", "error"],
  15584. "additionalProperties": false
  15585. }
  15586. },
  15587. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15588. "additionalProperties": false
  15589. },
  15590. "SyncEventSessionNextTextStarted": {
  15591. "type": "object",
  15592. "properties": {
  15593. "type": {
  15594. "type": "string",
  15595. "enum": ["sync"]
  15596. },
  15597. "name": {
  15598. "type": "string",
  15599. "enum": ["session.next.text.started.1"]
  15600. },
  15601. "id": {
  15602. "type": "string"
  15603. },
  15604. "seq": {
  15605. "type": "number"
  15606. },
  15607. "aggregateID": {
  15608. "type": "string",
  15609. "enum": ["sessionID"]
  15610. },
  15611. "data": {
  15612. "type": "object",
  15613. "properties": {
  15614. "timestamp": {
  15615. "type": "number"
  15616. },
  15617. "sessionID": {
  15618. "type": "string",
  15619. "pattern": "^ses"
  15620. }
  15621. },
  15622. "required": ["timestamp", "sessionID"],
  15623. "additionalProperties": false
  15624. }
  15625. },
  15626. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15627. "additionalProperties": false
  15628. },
  15629. "SyncEventSessionNextTextDelta": {
  15630. "type": "object",
  15631. "properties": {
  15632. "type": {
  15633. "type": "string",
  15634. "enum": ["sync"]
  15635. },
  15636. "name": {
  15637. "type": "string",
  15638. "enum": ["session.next.text.delta.1"]
  15639. },
  15640. "id": {
  15641. "type": "string"
  15642. },
  15643. "seq": {
  15644. "type": "number"
  15645. },
  15646. "aggregateID": {
  15647. "type": "string",
  15648. "enum": ["sessionID"]
  15649. },
  15650. "data": {
  15651. "type": "object",
  15652. "properties": {
  15653. "timestamp": {
  15654. "type": "number"
  15655. },
  15656. "sessionID": {
  15657. "type": "string",
  15658. "pattern": "^ses"
  15659. },
  15660. "delta": {
  15661. "type": "string"
  15662. }
  15663. },
  15664. "required": ["timestamp", "sessionID", "delta"],
  15665. "additionalProperties": false
  15666. }
  15667. },
  15668. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15669. "additionalProperties": false
  15670. },
  15671. "SyncEventSessionNextTextEnded": {
  15672. "type": "object",
  15673. "properties": {
  15674. "type": {
  15675. "type": "string",
  15676. "enum": ["sync"]
  15677. },
  15678. "name": {
  15679. "type": "string",
  15680. "enum": ["session.next.text.ended.1"]
  15681. },
  15682. "id": {
  15683. "type": "string"
  15684. },
  15685. "seq": {
  15686. "type": "number"
  15687. },
  15688. "aggregateID": {
  15689. "type": "string",
  15690. "enum": ["sessionID"]
  15691. },
  15692. "data": {
  15693. "type": "object",
  15694. "properties": {
  15695. "timestamp": {
  15696. "type": "number"
  15697. },
  15698. "sessionID": {
  15699. "type": "string",
  15700. "pattern": "^ses"
  15701. },
  15702. "text": {
  15703. "type": "string"
  15704. }
  15705. },
  15706. "required": ["timestamp", "sessionID", "text"],
  15707. "additionalProperties": false
  15708. }
  15709. },
  15710. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15711. "additionalProperties": false
  15712. },
  15713. "SyncEventSessionNextReasoningStarted": {
  15714. "type": "object",
  15715. "properties": {
  15716. "type": {
  15717. "type": "string",
  15718. "enum": ["sync"]
  15719. },
  15720. "name": {
  15721. "type": "string",
  15722. "enum": ["session.next.reasoning.started.1"]
  15723. },
  15724. "id": {
  15725. "type": "string"
  15726. },
  15727. "seq": {
  15728. "type": "number"
  15729. },
  15730. "aggregateID": {
  15731. "type": "string",
  15732. "enum": ["sessionID"]
  15733. },
  15734. "data": {
  15735. "type": "object",
  15736. "properties": {
  15737. "timestamp": {
  15738. "type": "number"
  15739. },
  15740. "sessionID": {
  15741. "type": "string",
  15742. "pattern": "^ses"
  15743. },
  15744. "reasoningID": {
  15745. "type": "string"
  15746. }
  15747. },
  15748. "required": ["timestamp", "sessionID", "reasoningID"],
  15749. "additionalProperties": false
  15750. }
  15751. },
  15752. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15753. "additionalProperties": false
  15754. },
  15755. "SyncEventSessionNextReasoningDelta": {
  15756. "type": "object",
  15757. "properties": {
  15758. "type": {
  15759. "type": "string",
  15760. "enum": ["sync"]
  15761. },
  15762. "name": {
  15763. "type": "string",
  15764. "enum": ["session.next.reasoning.delta.1"]
  15765. },
  15766. "id": {
  15767. "type": "string"
  15768. },
  15769. "seq": {
  15770. "type": "number"
  15771. },
  15772. "aggregateID": {
  15773. "type": "string",
  15774. "enum": ["sessionID"]
  15775. },
  15776. "data": {
  15777. "type": "object",
  15778. "properties": {
  15779. "timestamp": {
  15780. "type": "number"
  15781. },
  15782. "sessionID": {
  15783. "type": "string",
  15784. "pattern": "^ses"
  15785. },
  15786. "reasoningID": {
  15787. "type": "string"
  15788. },
  15789. "delta": {
  15790. "type": "string"
  15791. }
  15792. },
  15793. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15794. "additionalProperties": false
  15795. }
  15796. },
  15797. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15798. "additionalProperties": false
  15799. },
  15800. "SyncEventSessionNextReasoningEnded": {
  15801. "type": "object",
  15802. "properties": {
  15803. "type": {
  15804. "type": "string",
  15805. "enum": ["sync"]
  15806. },
  15807. "name": {
  15808. "type": "string",
  15809. "enum": ["session.next.reasoning.ended.1"]
  15810. },
  15811. "id": {
  15812. "type": "string"
  15813. },
  15814. "seq": {
  15815. "type": "number"
  15816. },
  15817. "aggregateID": {
  15818. "type": "string",
  15819. "enum": ["sessionID"]
  15820. },
  15821. "data": {
  15822. "type": "object",
  15823. "properties": {
  15824. "timestamp": {
  15825. "type": "number"
  15826. },
  15827. "sessionID": {
  15828. "type": "string",
  15829. "pattern": "^ses"
  15830. },
  15831. "reasoningID": {
  15832. "type": "string"
  15833. },
  15834. "text": {
  15835. "type": "string"
  15836. }
  15837. },
  15838. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15839. "additionalProperties": false
  15840. }
  15841. },
  15842. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15843. "additionalProperties": false
  15844. },
  15845. "SyncEventSessionNextToolInputStarted": {
  15846. "type": "object",
  15847. "properties": {
  15848. "type": {
  15849. "type": "string",
  15850. "enum": ["sync"]
  15851. },
  15852. "name": {
  15853. "type": "string",
  15854. "enum": ["session.next.tool.input.started.1"]
  15855. },
  15856. "id": {
  15857. "type": "string"
  15858. },
  15859. "seq": {
  15860. "type": "number"
  15861. },
  15862. "aggregateID": {
  15863. "type": "string",
  15864. "enum": ["sessionID"]
  15865. },
  15866. "data": {
  15867. "type": "object",
  15868. "properties": {
  15869. "timestamp": {
  15870. "type": "number"
  15871. },
  15872. "sessionID": {
  15873. "type": "string",
  15874. "pattern": "^ses"
  15875. },
  15876. "callID": {
  15877. "type": "string"
  15878. },
  15879. "name": {
  15880. "type": "string"
  15881. }
  15882. },
  15883. "required": ["timestamp", "sessionID", "callID", "name"],
  15884. "additionalProperties": false
  15885. }
  15886. },
  15887. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15888. "additionalProperties": false
  15889. },
  15890. "SyncEventSessionNextToolInputDelta": {
  15891. "type": "object",
  15892. "properties": {
  15893. "type": {
  15894. "type": "string",
  15895. "enum": ["sync"]
  15896. },
  15897. "name": {
  15898. "type": "string",
  15899. "enum": ["session.next.tool.input.delta.1"]
  15900. },
  15901. "id": {
  15902. "type": "string"
  15903. },
  15904. "seq": {
  15905. "type": "number"
  15906. },
  15907. "aggregateID": {
  15908. "type": "string",
  15909. "enum": ["sessionID"]
  15910. },
  15911. "data": {
  15912. "type": "object",
  15913. "properties": {
  15914. "timestamp": {
  15915. "type": "number"
  15916. },
  15917. "sessionID": {
  15918. "type": "string",
  15919. "pattern": "^ses"
  15920. },
  15921. "callID": {
  15922. "type": "string"
  15923. },
  15924. "delta": {
  15925. "type": "string"
  15926. }
  15927. },
  15928. "required": ["timestamp", "sessionID", "callID", "delta"],
  15929. "additionalProperties": false
  15930. }
  15931. },
  15932. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15933. "additionalProperties": false
  15934. },
  15935. "SyncEventSessionNextToolInputEnded": {
  15936. "type": "object",
  15937. "properties": {
  15938. "type": {
  15939. "type": "string",
  15940. "enum": ["sync"]
  15941. },
  15942. "name": {
  15943. "type": "string",
  15944. "enum": ["session.next.tool.input.ended.1"]
  15945. },
  15946. "id": {
  15947. "type": "string"
  15948. },
  15949. "seq": {
  15950. "type": "number"
  15951. },
  15952. "aggregateID": {
  15953. "type": "string",
  15954. "enum": ["sessionID"]
  15955. },
  15956. "data": {
  15957. "type": "object",
  15958. "properties": {
  15959. "timestamp": {
  15960. "type": "number"
  15961. },
  15962. "sessionID": {
  15963. "type": "string",
  15964. "pattern": "^ses"
  15965. },
  15966. "callID": {
  15967. "type": "string"
  15968. },
  15969. "text": {
  15970. "type": "string"
  15971. }
  15972. },
  15973. "required": ["timestamp", "sessionID", "callID", "text"],
  15974. "additionalProperties": false
  15975. }
  15976. },
  15977. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15978. "additionalProperties": false
  15979. },
  15980. "SyncEventSessionNextToolCalled": {
  15981. "type": "object",
  15982. "properties": {
  15983. "type": {
  15984. "type": "string",
  15985. "enum": ["sync"]
  15986. },
  15987. "name": {
  15988. "type": "string",
  15989. "enum": ["session.next.tool.called.1"]
  15990. },
  15991. "id": {
  15992. "type": "string"
  15993. },
  15994. "seq": {
  15995. "type": "number"
  15996. },
  15997. "aggregateID": {
  15998. "type": "string",
  15999. "enum": ["sessionID"]
  16000. },
  16001. "data": {
  16002. "type": "object",
  16003. "properties": {
  16004. "timestamp": {
  16005. "type": "number"
  16006. },
  16007. "sessionID": {
  16008. "type": "string",
  16009. "pattern": "^ses"
  16010. },
  16011. "callID": {
  16012. "type": "string"
  16013. },
  16014. "tool": {
  16015. "type": "string"
  16016. },
  16017. "input": {
  16018. "type": "object"
  16019. },
  16020. "provider": {
  16021. "type": "object",
  16022. "properties": {
  16023. "executed": {
  16024. "type": "boolean"
  16025. },
  16026. "metadata": {
  16027. "type": "object"
  16028. }
  16029. },
  16030. "required": ["executed"],
  16031. "additionalProperties": false
  16032. }
  16033. },
  16034. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  16035. "additionalProperties": false
  16036. }
  16037. },
  16038. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16039. "additionalProperties": false
  16040. },
  16041. "SyncEventSessionNextToolProgress": {
  16042. "type": "object",
  16043. "properties": {
  16044. "type": {
  16045. "type": "string",
  16046. "enum": ["sync"]
  16047. },
  16048. "name": {
  16049. "type": "string",
  16050. "enum": ["session.next.tool.progress.1"]
  16051. },
  16052. "id": {
  16053. "type": "string"
  16054. },
  16055. "seq": {
  16056. "type": "number"
  16057. },
  16058. "aggregateID": {
  16059. "type": "string",
  16060. "enum": ["sessionID"]
  16061. },
  16062. "data": {
  16063. "type": "object",
  16064. "properties": {
  16065. "timestamp": {
  16066. "type": "number"
  16067. },
  16068. "sessionID": {
  16069. "type": "string",
  16070. "pattern": "^ses"
  16071. },
  16072. "callID": {
  16073. "type": "string"
  16074. },
  16075. "structured": {
  16076. "type": "object"
  16077. },
  16078. "content": {
  16079. "type": "array",
  16080. "items": {
  16081. "anyOf": [
  16082. {
  16083. "$ref": "#/components/schemas/ToolTextContent"
  16084. },
  16085. {
  16086. "$ref": "#/components/schemas/ToolFileContent"
  16087. }
  16088. ]
  16089. }
  16090. }
  16091. },
  16092. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  16093. "additionalProperties": false
  16094. }
  16095. },
  16096. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16097. "additionalProperties": false
  16098. },
  16099. "SyncEventSessionNextToolSuccess": {
  16100. "type": "object",
  16101. "properties": {
  16102. "type": {
  16103. "type": "string",
  16104. "enum": ["sync"]
  16105. },
  16106. "name": {
  16107. "type": "string",
  16108. "enum": ["session.next.tool.success.1"]
  16109. },
  16110. "id": {
  16111. "type": "string"
  16112. },
  16113. "seq": {
  16114. "type": "number"
  16115. },
  16116. "aggregateID": {
  16117. "type": "string",
  16118. "enum": ["sessionID"]
  16119. },
  16120. "data": {
  16121. "type": "object",
  16122. "properties": {
  16123. "timestamp": {
  16124. "type": "number"
  16125. },
  16126. "sessionID": {
  16127. "type": "string",
  16128. "pattern": "^ses"
  16129. },
  16130. "callID": {
  16131. "type": "string"
  16132. },
  16133. "structured": {
  16134. "type": "object"
  16135. },
  16136. "content": {
  16137. "type": "array",
  16138. "items": {
  16139. "anyOf": [
  16140. {
  16141. "$ref": "#/components/schemas/ToolTextContent"
  16142. },
  16143. {
  16144. "$ref": "#/components/schemas/ToolFileContent"
  16145. }
  16146. ]
  16147. }
  16148. },
  16149. "provider": {
  16150. "type": "object",
  16151. "properties": {
  16152. "executed": {
  16153. "type": "boolean"
  16154. },
  16155. "metadata": {
  16156. "type": "object"
  16157. }
  16158. },
  16159. "required": ["executed"],
  16160. "additionalProperties": false
  16161. }
  16162. },
  16163. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  16164. "additionalProperties": false
  16165. }
  16166. },
  16167. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16168. "additionalProperties": false
  16169. },
  16170. "SyncEventSessionNextToolFailed": {
  16171. "type": "object",
  16172. "properties": {
  16173. "type": {
  16174. "type": "string",
  16175. "enum": ["sync"]
  16176. },
  16177. "name": {
  16178. "type": "string",
  16179. "enum": ["session.next.tool.failed.1"]
  16180. },
  16181. "id": {
  16182. "type": "string"
  16183. },
  16184. "seq": {
  16185. "type": "number"
  16186. },
  16187. "aggregateID": {
  16188. "type": "string",
  16189. "enum": ["sessionID"]
  16190. },
  16191. "data": {
  16192. "type": "object",
  16193. "properties": {
  16194. "timestamp": {
  16195. "type": "number"
  16196. },
  16197. "sessionID": {
  16198. "type": "string",
  16199. "pattern": "^ses"
  16200. },
  16201. "callID": {
  16202. "type": "string"
  16203. },
  16204. "error": {
  16205. "$ref": "#/components/schemas/SessionErrorUnknown"
  16206. },
  16207. "provider": {
  16208. "type": "object",
  16209. "properties": {
  16210. "executed": {
  16211. "type": "boolean"
  16212. },
  16213. "metadata": {
  16214. "type": "object"
  16215. }
  16216. },
  16217. "required": ["executed"],
  16218. "additionalProperties": false
  16219. }
  16220. },
  16221. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  16222. "additionalProperties": false
  16223. }
  16224. },
  16225. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16226. "additionalProperties": false
  16227. },
  16228. "SyncEventSessionNextRetried": {
  16229. "type": "object",
  16230. "properties": {
  16231. "type": {
  16232. "type": "string",
  16233. "enum": ["sync"]
  16234. },
  16235. "name": {
  16236. "type": "string",
  16237. "enum": ["session.next.retried.1"]
  16238. },
  16239. "id": {
  16240. "type": "string"
  16241. },
  16242. "seq": {
  16243. "type": "number"
  16244. },
  16245. "aggregateID": {
  16246. "type": "string",
  16247. "enum": ["sessionID"]
  16248. },
  16249. "data": {
  16250. "type": "object",
  16251. "properties": {
  16252. "timestamp": {
  16253. "type": "number"
  16254. },
  16255. "sessionID": {
  16256. "type": "string",
  16257. "pattern": "^ses"
  16258. },
  16259. "attempt": {
  16260. "type": "number"
  16261. },
  16262. "error": {
  16263. "$ref": "#/components/schemas/SessionNextRetry_error"
  16264. }
  16265. },
  16266. "required": ["timestamp", "sessionID", "attempt", "error"],
  16267. "additionalProperties": false
  16268. }
  16269. },
  16270. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16271. "additionalProperties": false
  16272. },
  16273. "SyncEventSessionNextCompactionStarted": {
  16274. "type": "object",
  16275. "properties": {
  16276. "type": {
  16277. "type": "string",
  16278. "enum": ["sync"]
  16279. },
  16280. "name": {
  16281. "type": "string",
  16282. "enum": ["session.next.compaction.started.1"]
  16283. },
  16284. "id": {
  16285. "type": "string"
  16286. },
  16287. "seq": {
  16288. "type": "number"
  16289. },
  16290. "aggregateID": {
  16291. "type": "string",
  16292. "enum": ["sessionID"]
  16293. },
  16294. "data": {
  16295. "type": "object",
  16296. "properties": {
  16297. "timestamp": {
  16298. "type": "number"
  16299. },
  16300. "sessionID": {
  16301. "type": "string",
  16302. "pattern": "^ses"
  16303. },
  16304. "reason": {
  16305. "type": "string",
  16306. "enum": ["auto", "manual"]
  16307. }
  16308. },
  16309. "required": ["timestamp", "sessionID", "reason"],
  16310. "additionalProperties": false
  16311. }
  16312. },
  16313. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16314. "additionalProperties": false
  16315. },
  16316. "SyncEventSessionNextCompactionDelta": {
  16317. "type": "object",
  16318. "properties": {
  16319. "type": {
  16320. "type": "string",
  16321. "enum": ["sync"]
  16322. },
  16323. "name": {
  16324. "type": "string",
  16325. "enum": ["session.next.compaction.delta.1"]
  16326. },
  16327. "id": {
  16328. "type": "string"
  16329. },
  16330. "seq": {
  16331. "type": "number"
  16332. },
  16333. "aggregateID": {
  16334. "type": "string",
  16335. "enum": ["sessionID"]
  16336. },
  16337. "data": {
  16338. "type": "object",
  16339. "properties": {
  16340. "timestamp": {
  16341. "type": "number"
  16342. },
  16343. "sessionID": {
  16344. "type": "string",
  16345. "pattern": "^ses"
  16346. },
  16347. "text": {
  16348. "type": "string"
  16349. }
  16350. },
  16351. "required": ["timestamp", "sessionID", "text"],
  16352. "additionalProperties": false
  16353. }
  16354. },
  16355. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16356. "additionalProperties": false
  16357. },
  16358. "SyncEventSessionNextCompactionEnded": {
  16359. "type": "object",
  16360. "properties": {
  16361. "type": {
  16362. "type": "string",
  16363. "enum": ["sync"]
  16364. },
  16365. "name": {
  16366. "type": "string",
  16367. "enum": ["session.next.compaction.ended.1"]
  16368. },
  16369. "id": {
  16370. "type": "string"
  16371. },
  16372. "seq": {
  16373. "type": "number"
  16374. },
  16375. "aggregateID": {
  16376. "type": "string",
  16377. "enum": ["sessionID"]
  16378. },
  16379. "data": {
  16380. "type": "object",
  16381. "properties": {
  16382. "timestamp": {
  16383. "type": "number"
  16384. },
  16385. "sessionID": {
  16386. "type": "string",
  16387. "pattern": "^ses"
  16388. },
  16389. "text": {
  16390. "type": "string"
  16391. },
  16392. "include": {
  16393. "type": "string"
  16394. }
  16395. },
  16396. "required": ["timestamp", "sessionID", "text"],
  16397. "additionalProperties": false
  16398. }
  16399. },
  16400. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16401. "additionalProperties": false
  16402. },
  16403. "EventServerInstanceDisposed": {
  16404. "type": "object",
  16405. "properties": {
  16406. "id": {
  16407. "type": "string"
  16408. },
  16409. "type": {
  16410. "type": "string",
  16411. "enum": ["server.instance.disposed"]
  16412. },
  16413. "properties": {
  16414. "type": "object",
  16415. "properties": {
  16416. "directory": {
  16417. "type": "string"
  16418. }
  16419. },
  16420. "required": ["directory"],
  16421. "additionalProperties": false
  16422. }
  16423. },
  16424. "required": ["id", "type", "properties"],
  16425. "additionalProperties": false
  16426. },
  16427. "EventFileEdited": {
  16428. "type": "object",
  16429. "properties": {
  16430. "id": {
  16431. "type": "string"
  16432. },
  16433. "type": {
  16434. "type": "string",
  16435. "enum": ["file.edited"]
  16436. },
  16437. "properties": {
  16438. "type": "object",
  16439. "properties": {
  16440. "file": {
  16441. "type": "string"
  16442. }
  16443. },
  16444. "required": ["file"],
  16445. "additionalProperties": false
  16446. }
  16447. },
  16448. "required": ["id", "type", "properties"],
  16449. "additionalProperties": false
  16450. },
  16451. "EventFileWatcherUpdated": {
  16452. "type": "object",
  16453. "properties": {
  16454. "id": {
  16455. "type": "string"
  16456. },
  16457. "type": {
  16458. "type": "string",
  16459. "enum": ["file.watcher.updated"]
  16460. },
  16461. "properties": {
  16462. "type": "object",
  16463. "properties": {
  16464. "file": {
  16465. "type": "string"
  16466. },
  16467. "event": {
  16468. "type": "string",
  16469. "enum": ["add", "change", "unlink"]
  16470. }
  16471. },
  16472. "required": ["file", "event"],
  16473. "additionalProperties": false
  16474. }
  16475. },
  16476. "required": ["id", "type", "properties"],
  16477. "additionalProperties": false
  16478. },
  16479. "EventLspClientDiagnostics": {
  16480. "type": "object",
  16481. "properties": {
  16482. "id": {
  16483. "type": "string"
  16484. },
  16485. "type": {
  16486. "type": "string",
  16487. "enum": ["lsp.client.diagnostics"]
  16488. },
  16489. "properties": {
  16490. "type": "object",
  16491. "properties": {
  16492. "serverID": {
  16493. "type": "string"
  16494. },
  16495. "path": {
  16496. "type": "string"
  16497. }
  16498. },
  16499. "required": ["serverID", "path"],
  16500. "additionalProperties": false
  16501. }
  16502. },
  16503. "required": ["id", "type", "properties"],
  16504. "additionalProperties": false
  16505. },
  16506. "EventLspUpdated": {
  16507. "type": "object",
  16508. "properties": {
  16509. "id": {
  16510. "type": "string"
  16511. },
  16512. "type": {
  16513. "type": "string",
  16514. "enum": ["lsp.updated"]
  16515. },
  16516. "properties": {
  16517. "type": "object",
  16518. "properties": {}
  16519. }
  16520. },
  16521. "required": ["id", "type", "properties"],
  16522. "additionalProperties": false
  16523. },
  16524. "EventMessagePartDelta": {
  16525. "type": "object",
  16526. "properties": {
  16527. "id": {
  16528. "type": "string"
  16529. },
  16530. "type": {
  16531. "type": "string",
  16532. "enum": ["message.part.delta"]
  16533. },
  16534. "properties": {
  16535. "type": "object",
  16536. "properties": {
  16537. "sessionID": {
  16538. "type": "string",
  16539. "pattern": "^ses"
  16540. },
  16541. "messageID": {
  16542. "type": "string",
  16543. "pattern": "^msg"
  16544. },
  16545. "partID": {
  16546. "type": "string",
  16547. "pattern": "^prt"
  16548. },
  16549. "field": {
  16550. "type": "string"
  16551. },
  16552. "delta": {
  16553. "type": "string"
  16554. }
  16555. },
  16556. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16557. "additionalProperties": false
  16558. }
  16559. },
  16560. "required": ["id", "type", "properties"],
  16561. "additionalProperties": false
  16562. },
  16563. "EventPermissionAsked": {
  16564. "type": "object",
  16565. "properties": {
  16566. "id": {
  16567. "type": "string"
  16568. },
  16569. "type": {
  16570. "type": "string",
  16571. "enum": ["permission.asked"]
  16572. },
  16573. "properties": {
  16574. "$ref": "#/components/schemas/PermissionRequest"
  16575. }
  16576. },
  16577. "required": ["id", "type", "properties"],
  16578. "additionalProperties": false
  16579. },
  16580. "EventPermissionReplied": {
  16581. "type": "object",
  16582. "properties": {
  16583. "id": {
  16584. "type": "string"
  16585. },
  16586. "type": {
  16587. "type": "string",
  16588. "enum": ["permission.replied"]
  16589. },
  16590. "properties": {
  16591. "type": "object",
  16592. "properties": {
  16593. "sessionID": {
  16594. "type": "string",
  16595. "pattern": "^ses"
  16596. },
  16597. "requestID": {
  16598. "type": "string",
  16599. "pattern": "^per"
  16600. },
  16601. "reply": {
  16602. "type": "string",
  16603. "enum": ["once", "always", "reject"]
  16604. }
  16605. },
  16606. "required": ["sessionID", "requestID", "reply"],
  16607. "additionalProperties": false
  16608. }
  16609. },
  16610. "required": ["id", "type", "properties"],
  16611. "additionalProperties": false
  16612. },
  16613. "EventSessionDiff": {
  16614. "type": "object",
  16615. "properties": {
  16616. "id": {
  16617. "type": "string"
  16618. },
  16619. "type": {
  16620. "type": "string",
  16621. "enum": ["session.diff"]
  16622. },
  16623. "properties": {
  16624. "type": "object",
  16625. "properties": {
  16626. "sessionID": {
  16627. "type": "string",
  16628. "pattern": "^ses"
  16629. },
  16630. "diff": {
  16631. "type": "array",
  16632. "items": {
  16633. "$ref": "#/components/schemas/SnapshotFileDiff"
  16634. }
  16635. }
  16636. },
  16637. "required": ["sessionID", "diff"],
  16638. "additionalProperties": false
  16639. }
  16640. },
  16641. "required": ["id", "type", "properties"],
  16642. "additionalProperties": false
  16643. },
  16644. "EventSessionError": {
  16645. "type": "object",
  16646. "properties": {
  16647. "id": {
  16648. "type": "string"
  16649. },
  16650. "type": {
  16651. "type": "string",
  16652. "enum": ["session.error"]
  16653. },
  16654. "properties": {
  16655. "type": "object",
  16656. "properties": {
  16657. "sessionID": {
  16658. "type": "string",
  16659. "pattern": "^ses"
  16660. },
  16661. "error": {
  16662. "anyOf": [
  16663. {
  16664. "$ref": "#/components/schemas/ProviderAuthError"
  16665. },
  16666. {
  16667. "$ref": "#/components/schemas/UnknownError"
  16668. },
  16669. {
  16670. "$ref": "#/components/schemas/MessageOutputLengthError"
  16671. },
  16672. {
  16673. "$ref": "#/components/schemas/MessageAbortedError"
  16674. },
  16675. {
  16676. "$ref": "#/components/schemas/StructuredOutputError"
  16677. },
  16678. {
  16679. "$ref": "#/components/schemas/ContextOverflowError"
  16680. },
  16681. {
  16682. "$ref": "#/components/schemas/APIError"
  16683. }
  16684. ]
  16685. }
  16686. },
  16687. "additionalProperties": false
  16688. }
  16689. },
  16690. "required": ["id", "type", "properties"],
  16691. "additionalProperties": false
  16692. },
  16693. "EventQuestionAsked": {
  16694. "type": "object",
  16695. "properties": {
  16696. "id": {
  16697. "type": "string"
  16698. },
  16699. "type": {
  16700. "type": "string",
  16701. "enum": ["question.asked"]
  16702. },
  16703. "properties": {
  16704. "$ref": "#/components/schemas/QuestionRequest"
  16705. }
  16706. },
  16707. "required": ["id", "type", "properties"],
  16708. "additionalProperties": false
  16709. },
  16710. "EventQuestionReplied": {
  16711. "type": "object",
  16712. "properties": {
  16713. "id": {
  16714. "type": "string"
  16715. },
  16716. "type": {
  16717. "type": "string",
  16718. "enum": ["question.replied"]
  16719. },
  16720. "properties": {
  16721. "$ref": "#/components/schemas/QuestionReplied"
  16722. }
  16723. },
  16724. "required": ["id", "type", "properties"],
  16725. "additionalProperties": false
  16726. },
  16727. "EventQuestionRejected": {
  16728. "type": "object",
  16729. "properties": {
  16730. "id": {
  16731. "type": "string"
  16732. },
  16733. "type": {
  16734. "type": "string",
  16735. "enum": ["question.rejected"]
  16736. },
  16737. "properties": {
  16738. "$ref": "#/components/schemas/QuestionRejected"
  16739. }
  16740. },
  16741. "required": ["id", "type", "properties"],
  16742. "additionalProperties": false
  16743. },
  16744. "EventTodoUpdated": {
  16745. "type": "object",
  16746. "properties": {
  16747. "id": {
  16748. "type": "string"
  16749. },
  16750. "type": {
  16751. "type": "string",
  16752. "enum": ["todo.updated"]
  16753. },
  16754. "properties": {
  16755. "type": "object",
  16756. "properties": {
  16757. "sessionID": {
  16758. "type": "string",
  16759. "pattern": "^ses"
  16760. },
  16761. "todos": {
  16762. "type": "array",
  16763. "items": {
  16764. "$ref": "#/components/schemas/Todo"
  16765. }
  16766. }
  16767. },
  16768. "required": ["sessionID", "todos"],
  16769. "additionalProperties": false
  16770. }
  16771. },
  16772. "required": ["id", "type", "properties"],
  16773. "additionalProperties": false
  16774. },
  16775. "EventSessionStatus": {
  16776. "type": "object",
  16777. "properties": {
  16778. "id": {
  16779. "type": "string"
  16780. },
  16781. "type": {
  16782. "type": "string",
  16783. "enum": ["session.status"]
  16784. },
  16785. "properties": {
  16786. "type": "object",
  16787. "properties": {
  16788. "sessionID": {
  16789. "type": "string",
  16790. "pattern": "^ses"
  16791. },
  16792. "status": {
  16793. "$ref": "#/components/schemas/SessionStatus"
  16794. }
  16795. },
  16796. "required": ["sessionID", "status"],
  16797. "additionalProperties": false
  16798. }
  16799. },
  16800. "required": ["id", "type", "properties"],
  16801. "additionalProperties": false
  16802. },
  16803. "EventSessionIdle": {
  16804. "type": "object",
  16805. "properties": {
  16806. "id": {
  16807. "type": "string"
  16808. },
  16809. "type": {
  16810. "type": "string",
  16811. "enum": ["session.idle"]
  16812. },
  16813. "properties": {
  16814. "type": "object",
  16815. "properties": {
  16816. "sessionID": {
  16817. "type": "string",
  16818. "pattern": "^ses"
  16819. }
  16820. },
  16821. "required": ["sessionID"],
  16822. "additionalProperties": false
  16823. }
  16824. },
  16825. "required": ["id", "type", "properties"],
  16826. "additionalProperties": false
  16827. },
  16828. "EventMcpToolsChanged": {
  16829. "type": "object",
  16830. "properties": {
  16831. "id": {
  16832. "type": "string"
  16833. },
  16834. "type": {
  16835. "type": "string",
  16836. "enum": ["mcp.tools.changed"]
  16837. },
  16838. "properties": {
  16839. "type": "object",
  16840. "properties": {
  16841. "server": {
  16842. "type": "string"
  16843. }
  16844. },
  16845. "required": ["server"],
  16846. "additionalProperties": false
  16847. }
  16848. },
  16849. "required": ["id", "type", "properties"],
  16850. "additionalProperties": false
  16851. },
  16852. "EventMcpBrowserOpenFailed": {
  16853. "type": "object",
  16854. "properties": {
  16855. "id": {
  16856. "type": "string"
  16857. },
  16858. "type": {
  16859. "type": "string",
  16860. "enum": ["mcp.browser.open.failed"]
  16861. },
  16862. "properties": {
  16863. "type": "object",
  16864. "properties": {
  16865. "mcpName": {
  16866. "type": "string"
  16867. },
  16868. "url": {
  16869. "type": "string"
  16870. }
  16871. },
  16872. "required": ["mcpName", "url"],
  16873. "additionalProperties": false
  16874. }
  16875. },
  16876. "required": ["id", "type", "properties"],
  16877. "additionalProperties": false
  16878. },
  16879. "EventCommandExecuted": {
  16880. "type": "object",
  16881. "properties": {
  16882. "id": {
  16883. "type": "string"
  16884. },
  16885. "type": {
  16886. "type": "string",
  16887. "enum": ["command.executed"]
  16888. },
  16889. "properties": {
  16890. "type": "object",
  16891. "properties": {
  16892. "name": {
  16893. "type": "string"
  16894. },
  16895. "sessionID": {
  16896. "type": "string",
  16897. "pattern": "^ses"
  16898. },
  16899. "arguments": {
  16900. "type": "string"
  16901. },
  16902. "messageID": {
  16903. "type": "string",
  16904. "pattern": "^msg"
  16905. }
  16906. },
  16907. "required": ["name", "sessionID", "arguments", "messageID"],
  16908. "additionalProperties": false
  16909. }
  16910. },
  16911. "required": ["id", "type", "properties"],
  16912. "additionalProperties": false
  16913. },
  16914. "EventProjectUpdated": {
  16915. "type": "object",
  16916. "properties": {
  16917. "id": {
  16918. "type": "string"
  16919. },
  16920. "type": {
  16921. "type": "string",
  16922. "enum": ["project.updated"]
  16923. },
  16924. "properties": {
  16925. "$ref": "#/components/schemas/Project"
  16926. }
  16927. },
  16928. "required": ["id", "type", "properties"],
  16929. "additionalProperties": false
  16930. },
  16931. "EventSessionCompacted": {
  16932. "type": "object",
  16933. "properties": {
  16934. "id": {
  16935. "type": "string"
  16936. },
  16937. "type": {
  16938. "type": "string",
  16939. "enum": ["session.compacted"]
  16940. },
  16941. "properties": {
  16942. "type": "object",
  16943. "properties": {
  16944. "sessionID": {
  16945. "type": "string",
  16946. "pattern": "^ses"
  16947. }
  16948. },
  16949. "required": ["sessionID"],
  16950. "additionalProperties": false
  16951. }
  16952. },
  16953. "required": ["id", "type", "properties"],
  16954. "additionalProperties": false
  16955. },
  16956. "EventVcsBranchUpdated": {
  16957. "type": "object",
  16958. "properties": {
  16959. "id": {
  16960. "type": "string"
  16961. },
  16962. "type": {
  16963. "type": "string",
  16964. "enum": ["vcs.branch.updated"]
  16965. },
  16966. "properties": {
  16967. "type": "object",
  16968. "properties": {
  16969. "branch": {
  16970. "type": "string"
  16971. }
  16972. },
  16973. "additionalProperties": false
  16974. }
  16975. },
  16976. "required": ["id", "type", "properties"],
  16977. "additionalProperties": false
  16978. },
  16979. "EventWorkspaceReady": {
  16980. "type": "object",
  16981. "properties": {
  16982. "id": {
  16983. "type": "string"
  16984. },
  16985. "type": {
  16986. "type": "string",
  16987. "enum": ["workspace.ready"]
  16988. },
  16989. "properties": {
  16990. "type": "object",
  16991. "properties": {
  16992. "name": {
  16993. "type": "string"
  16994. }
  16995. },
  16996. "required": ["name"],
  16997. "additionalProperties": false
  16998. }
  16999. },
  17000. "required": ["id", "type", "properties"],
  17001. "additionalProperties": false
  17002. },
  17003. "EventWorkspaceFailed": {
  17004. "type": "object",
  17005. "properties": {
  17006. "id": {
  17007. "type": "string"
  17008. },
  17009. "type": {
  17010. "type": "string",
  17011. "enum": ["workspace.failed"]
  17012. },
  17013. "properties": {
  17014. "type": "object",
  17015. "properties": {
  17016. "message": {
  17017. "type": "string"
  17018. }
  17019. },
  17020. "required": ["message"],
  17021. "additionalProperties": false
  17022. }
  17023. },
  17024. "required": ["id", "type", "properties"],
  17025. "additionalProperties": false
  17026. },
  17027. "EventWorkspaceStatus": {
  17028. "type": "object",
  17029. "properties": {
  17030. "id": {
  17031. "type": "string"
  17032. },
  17033. "type": {
  17034. "type": "string",
  17035. "enum": ["workspace.status"]
  17036. },
  17037. "properties": {
  17038. "type": "object",
  17039. "properties": {
  17040. "workspaceID": {
  17041. "type": "string",
  17042. "pattern": "^wrk"
  17043. },
  17044. "status": {
  17045. "type": "string",
  17046. "enum": ["connected", "connecting", "disconnected", "error"]
  17047. }
  17048. },
  17049. "required": ["workspaceID", "status"],
  17050. "additionalProperties": false
  17051. }
  17052. },
  17053. "required": ["id", "type", "properties"],
  17054. "additionalProperties": false
  17055. },
  17056. "EventWorktreeReady": {
  17057. "type": "object",
  17058. "properties": {
  17059. "id": {
  17060. "type": "string"
  17061. },
  17062. "type": {
  17063. "type": "string",
  17064. "enum": ["worktree.ready"]
  17065. },
  17066. "properties": {
  17067. "type": "object",
  17068. "properties": {
  17069. "name": {
  17070. "type": "string"
  17071. },
  17072. "branch": {
  17073. "type": "string"
  17074. }
  17075. },
  17076. "required": ["name"],
  17077. "additionalProperties": false
  17078. }
  17079. },
  17080. "required": ["id", "type", "properties"],
  17081. "additionalProperties": false
  17082. },
  17083. "EventWorktreeFailed": {
  17084. "type": "object",
  17085. "properties": {
  17086. "id": {
  17087. "type": "string"
  17088. },
  17089. "type": {
  17090. "type": "string",
  17091. "enum": ["worktree.failed"]
  17092. },
  17093. "properties": {
  17094. "type": "object",
  17095. "properties": {
  17096. "message": {
  17097. "type": "string"
  17098. }
  17099. },
  17100. "required": ["message"],
  17101. "additionalProperties": false
  17102. }
  17103. },
  17104. "required": ["id", "type", "properties"],
  17105. "additionalProperties": false
  17106. },
  17107. "EventPtyCreated": {
  17108. "type": "object",
  17109. "properties": {
  17110. "id": {
  17111. "type": "string"
  17112. },
  17113. "type": {
  17114. "type": "string",
  17115. "enum": ["pty.created"]
  17116. },
  17117. "properties": {
  17118. "type": "object",
  17119. "properties": {
  17120. "info": {
  17121. "$ref": "#/components/schemas/Pty"
  17122. }
  17123. },
  17124. "required": ["info"],
  17125. "additionalProperties": false
  17126. }
  17127. },
  17128. "required": ["id", "type", "properties"],
  17129. "additionalProperties": false
  17130. },
  17131. "EventPtyUpdated": {
  17132. "type": "object",
  17133. "properties": {
  17134. "id": {
  17135. "type": "string"
  17136. },
  17137. "type": {
  17138. "type": "string",
  17139. "enum": ["pty.updated"]
  17140. },
  17141. "properties": {
  17142. "type": "object",
  17143. "properties": {
  17144. "info": {
  17145. "$ref": "#/components/schemas/Pty"
  17146. }
  17147. },
  17148. "required": ["info"],
  17149. "additionalProperties": false
  17150. }
  17151. },
  17152. "required": ["id", "type", "properties"],
  17153. "additionalProperties": false
  17154. },
  17155. "EventPtyExited": {
  17156. "type": "object",
  17157. "properties": {
  17158. "id": {
  17159. "type": "string"
  17160. },
  17161. "type": {
  17162. "type": "string",
  17163. "enum": ["pty.exited"]
  17164. },
  17165. "properties": {
  17166. "type": "object",
  17167. "properties": {
  17168. "id": {
  17169. "type": "string",
  17170. "pattern": "^pty"
  17171. },
  17172. "exitCode": {
  17173. "type": "integer",
  17174. "minimum": 0
  17175. }
  17176. },
  17177. "required": ["id", "exitCode"],
  17178. "additionalProperties": false
  17179. }
  17180. },
  17181. "required": ["id", "type", "properties"],
  17182. "additionalProperties": false
  17183. },
  17184. "EventPtyDeleted": {
  17185. "type": "object",
  17186. "properties": {
  17187. "id": {
  17188. "type": "string"
  17189. },
  17190. "type": {
  17191. "type": "string",
  17192. "enum": ["pty.deleted"]
  17193. },
  17194. "properties": {
  17195. "type": "object",
  17196. "properties": {
  17197. "id": {
  17198. "type": "string",
  17199. "pattern": "^pty"
  17200. }
  17201. },
  17202. "required": ["id"],
  17203. "additionalProperties": false
  17204. }
  17205. },
  17206. "required": ["id", "type", "properties"],
  17207. "additionalProperties": false
  17208. },
  17209. "EventInstallationUpdated": {
  17210. "type": "object",
  17211. "properties": {
  17212. "id": {
  17213. "type": "string"
  17214. },
  17215. "type": {
  17216. "type": "string",
  17217. "enum": ["installation.updated"]
  17218. },
  17219. "properties": {
  17220. "type": "object",
  17221. "properties": {
  17222. "version": {
  17223. "type": "string"
  17224. }
  17225. },
  17226. "required": ["version"],
  17227. "additionalProperties": false
  17228. }
  17229. },
  17230. "required": ["id", "type", "properties"],
  17231. "additionalProperties": false
  17232. },
  17233. "EventInstallationUpdate-available": {
  17234. "type": "object",
  17235. "properties": {
  17236. "id": {
  17237. "type": "string"
  17238. },
  17239. "type": {
  17240. "type": "string",
  17241. "enum": ["installation.update-available"]
  17242. },
  17243. "properties": {
  17244. "type": "object",
  17245. "properties": {
  17246. "version": {
  17247. "type": "string"
  17248. }
  17249. },
  17250. "required": ["version"],
  17251. "additionalProperties": false
  17252. }
  17253. },
  17254. "required": ["id", "type", "properties"],
  17255. "additionalProperties": false
  17256. },
  17257. "EventMessageUpdated": {
  17258. "type": "object",
  17259. "properties": {
  17260. "id": {
  17261. "type": "string"
  17262. },
  17263. "type": {
  17264. "type": "string",
  17265. "enum": ["message.updated"]
  17266. },
  17267. "properties": {
  17268. "type": "object",
  17269. "properties": {
  17270. "sessionID": {
  17271. "type": "string",
  17272. "pattern": "^ses"
  17273. },
  17274. "info": {
  17275. "$ref": "#/components/schemas/Message"
  17276. }
  17277. },
  17278. "required": ["sessionID", "info"],
  17279. "additionalProperties": false
  17280. }
  17281. },
  17282. "required": ["id", "type", "properties"],
  17283. "additionalProperties": false
  17284. },
  17285. "EventMessageRemoved": {
  17286. "type": "object",
  17287. "properties": {
  17288. "id": {
  17289. "type": "string"
  17290. },
  17291. "type": {
  17292. "type": "string",
  17293. "enum": ["message.removed"]
  17294. },
  17295. "properties": {
  17296. "type": "object",
  17297. "properties": {
  17298. "sessionID": {
  17299. "type": "string",
  17300. "pattern": "^ses"
  17301. },
  17302. "messageID": {
  17303. "type": "string",
  17304. "pattern": "^msg"
  17305. }
  17306. },
  17307. "required": ["sessionID", "messageID"],
  17308. "additionalProperties": false
  17309. }
  17310. },
  17311. "required": ["id", "type", "properties"],
  17312. "additionalProperties": false
  17313. },
  17314. "EventMessagePartUpdated": {
  17315. "type": "object",
  17316. "properties": {
  17317. "id": {
  17318. "type": "string"
  17319. },
  17320. "type": {
  17321. "type": "string",
  17322. "enum": ["message.part.updated"]
  17323. },
  17324. "properties": {
  17325. "type": "object",
  17326. "properties": {
  17327. "sessionID": {
  17328. "type": "string",
  17329. "pattern": "^ses"
  17330. },
  17331. "part": {
  17332. "$ref": "#/components/schemas/Part"
  17333. },
  17334. "time": {
  17335. "type": "integer",
  17336. "minimum": 0
  17337. }
  17338. },
  17339. "required": ["sessionID", "part", "time"],
  17340. "additionalProperties": false
  17341. }
  17342. },
  17343. "required": ["id", "type", "properties"],
  17344. "additionalProperties": false
  17345. },
  17346. "EventMessagePartRemoved": {
  17347. "type": "object",
  17348. "properties": {
  17349. "id": {
  17350. "type": "string"
  17351. },
  17352. "type": {
  17353. "type": "string",
  17354. "enum": ["message.part.removed"]
  17355. },
  17356. "properties": {
  17357. "type": "object",
  17358. "properties": {
  17359. "sessionID": {
  17360. "type": "string",
  17361. "pattern": "^ses"
  17362. },
  17363. "messageID": {
  17364. "type": "string",
  17365. "pattern": "^msg"
  17366. },
  17367. "partID": {
  17368. "type": "string",
  17369. "pattern": "^prt"
  17370. }
  17371. },
  17372. "required": ["sessionID", "messageID", "partID"],
  17373. "additionalProperties": false
  17374. }
  17375. },
  17376. "required": ["id", "type", "properties"],
  17377. "additionalProperties": false
  17378. },
  17379. "EventSessionCreated": {
  17380. "type": "object",
  17381. "properties": {
  17382. "id": {
  17383. "type": "string"
  17384. },
  17385. "type": {
  17386. "type": "string",
  17387. "enum": ["session.created"]
  17388. },
  17389. "properties": {
  17390. "type": "object",
  17391. "properties": {
  17392. "sessionID": {
  17393. "type": "string",
  17394. "pattern": "^ses"
  17395. },
  17396. "info": {
  17397. "$ref": "#/components/schemas/Session"
  17398. }
  17399. },
  17400. "required": ["sessionID", "info"],
  17401. "additionalProperties": false
  17402. }
  17403. },
  17404. "required": ["id", "type", "properties"],
  17405. "additionalProperties": false
  17406. },
  17407. "EventSessionUpdated": {
  17408. "type": "object",
  17409. "properties": {
  17410. "id": {
  17411. "type": "string"
  17412. },
  17413. "type": {
  17414. "type": "string",
  17415. "enum": ["session.updated"]
  17416. },
  17417. "properties": {
  17418. "type": "object",
  17419. "properties": {
  17420. "sessionID": {
  17421. "type": "string",
  17422. "pattern": "^ses"
  17423. },
  17424. "info": {
  17425. "$ref": "#/components/schemas/Session"
  17426. }
  17427. },
  17428. "required": ["sessionID", "info"],
  17429. "additionalProperties": false
  17430. }
  17431. },
  17432. "required": ["id", "type", "properties"],
  17433. "additionalProperties": false
  17434. },
  17435. "EventSessionDeleted": {
  17436. "type": "object",
  17437. "properties": {
  17438. "id": {
  17439. "type": "string"
  17440. },
  17441. "type": {
  17442. "type": "string",
  17443. "enum": ["session.deleted"]
  17444. },
  17445. "properties": {
  17446. "type": "object",
  17447. "properties": {
  17448. "sessionID": {
  17449. "type": "string",
  17450. "pattern": "^ses"
  17451. },
  17452. "info": {
  17453. "$ref": "#/components/schemas/Session"
  17454. }
  17455. },
  17456. "required": ["sessionID", "info"],
  17457. "additionalProperties": false
  17458. }
  17459. },
  17460. "required": ["id", "type", "properties"],
  17461. "additionalProperties": false
  17462. },
  17463. "EventSessionNextAgentSwitched": {
  17464. "type": "object",
  17465. "properties": {
  17466. "id": {
  17467. "type": "string"
  17468. },
  17469. "type": {
  17470. "type": "string",
  17471. "enum": ["session.next.agent.switched"]
  17472. },
  17473. "properties": {
  17474. "type": "object",
  17475. "properties": {
  17476. "timestamp": {
  17477. "type": "number"
  17478. },
  17479. "sessionID": {
  17480. "type": "string",
  17481. "pattern": "^ses"
  17482. },
  17483. "agent": {
  17484. "type": "string"
  17485. }
  17486. },
  17487. "required": ["timestamp", "sessionID", "agent"],
  17488. "additionalProperties": false
  17489. }
  17490. },
  17491. "required": ["id", "type", "properties"],
  17492. "additionalProperties": false
  17493. },
  17494. "EventSessionNextModelSwitched": {
  17495. "type": "object",
  17496. "properties": {
  17497. "id": {
  17498. "type": "string"
  17499. },
  17500. "type": {
  17501. "type": "string",
  17502. "enum": ["session.next.model.switched"]
  17503. },
  17504. "properties": {
  17505. "type": "object",
  17506. "properties": {
  17507. "timestamp": {
  17508. "type": "number"
  17509. },
  17510. "sessionID": {
  17511. "type": "string",
  17512. "pattern": "^ses"
  17513. },
  17514. "model": {
  17515. "type": "object",
  17516. "properties": {
  17517. "id": {
  17518. "type": "string"
  17519. },
  17520. "providerID": {
  17521. "type": "string"
  17522. },
  17523. "variant": {
  17524. "type": "string"
  17525. }
  17526. },
  17527. "required": ["id", "providerID", "variant"],
  17528. "additionalProperties": false
  17529. }
  17530. },
  17531. "required": ["timestamp", "sessionID", "model"],
  17532. "additionalProperties": false
  17533. }
  17534. },
  17535. "required": ["id", "type", "properties"],
  17536. "additionalProperties": false
  17537. },
  17538. "PromptSource": {
  17539. "type": "object",
  17540. "properties": {
  17541. "start": {
  17542. "type": "number"
  17543. },
  17544. "end": {
  17545. "type": "number"
  17546. },
  17547. "text": {
  17548. "type": "string"
  17549. }
  17550. },
  17551. "required": ["start", "end", "text"],
  17552. "additionalProperties": false
  17553. },
  17554. "PromptFileAttachment": {
  17555. "type": "object",
  17556. "properties": {
  17557. "uri": {
  17558. "type": "string"
  17559. },
  17560. "mime": {
  17561. "type": "string"
  17562. },
  17563. "name": {
  17564. "type": "string"
  17565. },
  17566. "description": {
  17567. "type": "string"
  17568. },
  17569. "source": {
  17570. "$ref": "#/components/schemas/PromptSource"
  17571. }
  17572. },
  17573. "required": ["uri", "mime"],
  17574. "additionalProperties": false
  17575. },
  17576. "PromptAgentAttachment": {
  17577. "type": "object",
  17578. "properties": {
  17579. "name": {
  17580. "type": "string"
  17581. },
  17582. "source": {
  17583. "$ref": "#/components/schemas/PromptSource"
  17584. }
  17585. },
  17586. "required": ["name"],
  17587. "additionalProperties": false
  17588. },
  17589. "PromptReferenceAttachment": {
  17590. "type": "object",
  17591. "properties": {
  17592. "name": {
  17593. "type": "string"
  17594. },
  17595. "kind": {
  17596. "type": "string",
  17597. "enum": ["local", "git", "invalid"]
  17598. },
  17599. "uri": {
  17600. "type": "string"
  17601. },
  17602. "repository": {
  17603. "type": "string"
  17604. },
  17605. "branch": {
  17606. "type": "string"
  17607. },
  17608. "target": {
  17609. "type": "string"
  17610. },
  17611. "targetUri": {
  17612. "type": "string"
  17613. },
  17614. "problem": {
  17615. "type": "string"
  17616. },
  17617. "source": {
  17618. "$ref": "#/components/schemas/PromptSource"
  17619. }
  17620. },
  17621. "required": ["name", "kind"],
  17622. "additionalProperties": false
  17623. },
  17624. "EventSessionNextPrompted": {
  17625. "type": "object",
  17626. "properties": {
  17627. "id": {
  17628. "type": "string"
  17629. },
  17630. "type": {
  17631. "type": "string",
  17632. "enum": ["session.next.prompted"]
  17633. },
  17634. "properties": {
  17635. "type": "object",
  17636. "properties": {
  17637. "timestamp": {
  17638. "type": "number"
  17639. },
  17640. "sessionID": {
  17641. "type": "string",
  17642. "pattern": "^ses"
  17643. },
  17644. "prompt": {
  17645. "$ref": "#/components/schemas/Prompt"
  17646. }
  17647. },
  17648. "required": ["timestamp", "sessionID", "prompt"],
  17649. "additionalProperties": false
  17650. }
  17651. },
  17652. "required": ["id", "type", "properties"],
  17653. "additionalProperties": false
  17654. },
  17655. "EventSessionNextSynthetic": {
  17656. "type": "object",
  17657. "properties": {
  17658. "id": {
  17659. "type": "string"
  17660. },
  17661. "type": {
  17662. "type": "string",
  17663. "enum": ["session.next.synthetic"]
  17664. },
  17665. "properties": {
  17666. "type": "object",
  17667. "properties": {
  17668. "timestamp": {
  17669. "type": "number"
  17670. },
  17671. "sessionID": {
  17672. "type": "string",
  17673. "pattern": "^ses"
  17674. },
  17675. "text": {
  17676. "type": "string"
  17677. }
  17678. },
  17679. "required": ["timestamp", "sessionID", "text"],
  17680. "additionalProperties": false
  17681. }
  17682. },
  17683. "required": ["id", "type", "properties"],
  17684. "additionalProperties": false
  17685. },
  17686. "EventSessionNextShellStarted": {
  17687. "type": "object",
  17688. "properties": {
  17689. "id": {
  17690. "type": "string"
  17691. },
  17692. "type": {
  17693. "type": "string",
  17694. "enum": ["session.next.shell.started"]
  17695. },
  17696. "properties": {
  17697. "type": "object",
  17698. "properties": {
  17699. "timestamp": {
  17700. "type": "number"
  17701. },
  17702. "sessionID": {
  17703. "type": "string",
  17704. "pattern": "^ses"
  17705. },
  17706. "callID": {
  17707. "type": "string"
  17708. },
  17709. "command": {
  17710. "type": "string"
  17711. }
  17712. },
  17713. "required": ["timestamp", "sessionID", "callID", "command"],
  17714. "additionalProperties": false
  17715. }
  17716. },
  17717. "required": ["id", "type", "properties"],
  17718. "additionalProperties": false
  17719. },
  17720. "EventSessionNextShellEnded": {
  17721. "type": "object",
  17722. "properties": {
  17723. "id": {
  17724. "type": "string"
  17725. },
  17726. "type": {
  17727. "type": "string",
  17728. "enum": ["session.next.shell.ended"]
  17729. },
  17730. "properties": {
  17731. "type": "object",
  17732. "properties": {
  17733. "timestamp": {
  17734. "type": "number"
  17735. },
  17736. "sessionID": {
  17737. "type": "string",
  17738. "pattern": "^ses"
  17739. },
  17740. "callID": {
  17741. "type": "string"
  17742. },
  17743. "output": {
  17744. "type": "string"
  17745. }
  17746. },
  17747. "required": ["timestamp", "sessionID", "callID", "output"],
  17748. "additionalProperties": false
  17749. }
  17750. },
  17751. "required": ["id", "type", "properties"],
  17752. "additionalProperties": false
  17753. },
  17754. "EventSessionNextStepStarted": {
  17755. "type": "object",
  17756. "properties": {
  17757. "id": {
  17758. "type": "string"
  17759. },
  17760. "type": {
  17761. "type": "string",
  17762. "enum": ["session.next.step.started"]
  17763. },
  17764. "properties": {
  17765. "type": "object",
  17766. "properties": {
  17767. "timestamp": {
  17768. "type": "number"
  17769. },
  17770. "sessionID": {
  17771. "type": "string",
  17772. "pattern": "^ses"
  17773. },
  17774. "agent": {
  17775. "type": "string"
  17776. },
  17777. "model": {
  17778. "type": "object",
  17779. "properties": {
  17780. "id": {
  17781. "type": "string"
  17782. },
  17783. "providerID": {
  17784. "type": "string"
  17785. },
  17786. "variant": {
  17787. "type": "string"
  17788. }
  17789. },
  17790. "required": ["id", "providerID", "variant"],
  17791. "additionalProperties": false
  17792. },
  17793. "snapshot": {
  17794. "type": "string"
  17795. }
  17796. },
  17797. "required": ["timestamp", "sessionID", "agent", "model"],
  17798. "additionalProperties": false
  17799. }
  17800. },
  17801. "required": ["id", "type", "properties"],
  17802. "additionalProperties": false
  17803. },
  17804. "EventSessionNextStepEnded": {
  17805. "type": "object",
  17806. "properties": {
  17807. "id": {
  17808. "type": "string"
  17809. },
  17810. "type": {
  17811. "type": "string",
  17812. "enum": ["session.next.step.ended"]
  17813. },
  17814. "properties": {
  17815. "type": "object",
  17816. "properties": {
  17817. "timestamp": {
  17818. "type": "number"
  17819. },
  17820. "sessionID": {
  17821. "type": "string",
  17822. "pattern": "^ses"
  17823. },
  17824. "finish": {
  17825. "type": "string"
  17826. },
  17827. "cost": {
  17828. "type": "number"
  17829. },
  17830. "tokens": {
  17831. "type": "object",
  17832. "properties": {
  17833. "input": {
  17834. "type": "number"
  17835. },
  17836. "output": {
  17837. "type": "number"
  17838. },
  17839. "reasoning": {
  17840. "type": "number"
  17841. },
  17842. "cache": {
  17843. "type": "object",
  17844. "properties": {
  17845. "read": {
  17846. "type": "number"
  17847. },
  17848. "write": {
  17849. "type": "number"
  17850. }
  17851. },
  17852. "required": ["read", "write"],
  17853. "additionalProperties": false
  17854. }
  17855. },
  17856. "required": ["input", "output", "reasoning", "cache"],
  17857. "additionalProperties": false
  17858. },
  17859. "snapshot": {
  17860. "type": "string"
  17861. }
  17862. },
  17863. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17864. "additionalProperties": false
  17865. }
  17866. },
  17867. "required": ["id", "type", "properties"],
  17868. "additionalProperties": false
  17869. },
  17870. "SessionErrorUnknown": {
  17871. "type": "object",
  17872. "properties": {
  17873. "type": {
  17874. "type": "string",
  17875. "enum": ["unknown"]
  17876. },
  17877. "message": {
  17878. "type": "string"
  17879. }
  17880. },
  17881. "required": ["type", "message"],
  17882. "additionalProperties": false
  17883. },
  17884. "EventSessionNextStepFailed": {
  17885. "type": "object",
  17886. "properties": {
  17887. "id": {
  17888. "type": "string"
  17889. },
  17890. "type": {
  17891. "type": "string",
  17892. "enum": ["session.next.step.failed"]
  17893. },
  17894. "properties": {
  17895. "type": "object",
  17896. "properties": {
  17897. "timestamp": {
  17898. "type": "number"
  17899. },
  17900. "sessionID": {
  17901. "type": "string",
  17902. "pattern": "^ses"
  17903. },
  17904. "error": {
  17905. "$ref": "#/components/schemas/SessionErrorUnknown"
  17906. }
  17907. },
  17908. "required": ["timestamp", "sessionID", "error"],
  17909. "additionalProperties": false
  17910. }
  17911. },
  17912. "required": ["id", "type", "properties"],
  17913. "additionalProperties": false
  17914. },
  17915. "EventSessionNextTextStarted": {
  17916. "type": "object",
  17917. "properties": {
  17918. "id": {
  17919. "type": "string"
  17920. },
  17921. "type": {
  17922. "type": "string",
  17923. "enum": ["session.next.text.started"]
  17924. },
  17925. "properties": {
  17926. "type": "object",
  17927. "properties": {
  17928. "timestamp": {
  17929. "type": "number"
  17930. },
  17931. "sessionID": {
  17932. "type": "string",
  17933. "pattern": "^ses"
  17934. }
  17935. },
  17936. "required": ["timestamp", "sessionID"],
  17937. "additionalProperties": false
  17938. }
  17939. },
  17940. "required": ["id", "type", "properties"],
  17941. "additionalProperties": false
  17942. },
  17943. "EventSessionNextTextDelta": {
  17944. "type": "object",
  17945. "properties": {
  17946. "id": {
  17947. "type": "string"
  17948. },
  17949. "type": {
  17950. "type": "string",
  17951. "enum": ["session.next.text.delta"]
  17952. },
  17953. "properties": {
  17954. "type": "object",
  17955. "properties": {
  17956. "timestamp": {
  17957. "type": "number"
  17958. },
  17959. "sessionID": {
  17960. "type": "string",
  17961. "pattern": "^ses"
  17962. },
  17963. "delta": {
  17964. "type": "string"
  17965. }
  17966. },
  17967. "required": ["timestamp", "sessionID", "delta"],
  17968. "additionalProperties": false
  17969. }
  17970. },
  17971. "required": ["id", "type", "properties"],
  17972. "additionalProperties": false
  17973. },
  17974. "EventSessionNextTextEnded": {
  17975. "type": "object",
  17976. "properties": {
  17977. "id": {
  17978. "type": "string"
  17979. },
  17980. "type": {
  17981. "type": "string",
  17982. "enum": ["session.next.text.ended"]
  17983. },
  17984. "properties": {
  17985. "type": "object",
  17986. "properties": {
  17987. "timestamp": {
  17988. "type": "number"
  17989. },
  17990. "sessionID": {
  17991. "type": "string",
  17992. "pattern": "^ses"
  17993. },
  17994. "text": {
  17995. "type": "string"
  17996. }
  17997. },
  17998. "required": ["timestamp", "sessionID", "text"],
  17999. "additionalProperties": false
  18000. }
  18001. },
  18002. "required": ["id", "type", "properties"],
  18003. "additionalProperties": false
  18004. },
  18005. "EventSessionNextReasoningStarted": {
  18006. "type": "object",
  18007. "properties": {
  18008. "id": {
  18009. "type": "string"
  18010. },
  18011. "type": {
  18012. "type": "string",
  18013. "enum": ["session.next.reasoning.started"]
  18014. },
  18015. "properties": {
  18016. "type": "object",
  18017. "properties": {
  18018. "timestamp": {
  18019. "type": "number"
  18020. },
  18021. "sessionID": {
  18022. "type": "string",
  18023. "pattern": "^ses"
  18024. },
  18025. "reasoningID": {
  18026. "type": "string"
  18027. }
  18028. },
  18029. "required": ["timestamp", "sessionID", "reasoningID"],
  18030. "additionalProperties": false
  18031. }
  18032. },
  18033. "required": ["id", "type", "properties"],
  18034. "additionalProperties": false
  18035. },
  18036. "EventSessionNextReasoningDelta": {
  18037. "type": "object",
  18038. "properties": {
  18039. "id": {
  18040. "type": "string"
  18041. },
  18042. "type": {
  18043. "type": "string",
  18044. "enum": ["session.next.reasoning.delta"]
  18045. },
  18046. "properties": {
  18047. "type": "object",
  18048. "properties": {
  18049. "timestamp": {
  18050. "type": "number"
  18051. },
  18052. "sessionID": {
  18053. "type": "string",
  18054. "pattern": "^ses"
  18055. },
  18056. "reasoningID": {
  18057. "type": "string"
  18058. },
  18059. "delta": {
  18060. "type": "string"
  18061. }
  18062. },
  18063. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  18064. "additionalProperties": false
  18065. }
  18066. },
  18067. "required": ["id", "type", "properties"],
  18068. "additionalProperties": false
  18069. },
  18070. "EventSessionNextReasoningEnded": {
  18071. "type": "object",
  18072. "properties": {
  18073. "id": {
  18074. "type": "string"
  18075. },
  18076. "type": {
  18077. "type": "string",
  18078. "enum": ["session.next.reasoning.ended"]
  18079. },
  18080. "properties": {
  18081. "type": "object",
  18082. "properties": {
  18083. "timestamp": {
  18084. "type": "number"
  18085. },
  18086. "sessionID": {
  18087. "type": "string",
  18088. "pattern": "^ses"
  18089. },
  18090. "reasoningID": {
  18091. "type": "string"
  18092. },
  18093. "text": {
  18094. "type": "string"
  18095. }
  18096. },
  18097. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  18098. "additionalProperties": false
  18099. }
  18100. },
  18101. "required": ["id", "type", "properties"],
  18102. "additionalProperties": false
  18103. },
  18104. "EventSessionNextToolInputStarted": {
  18105. "type": "object",
  18106. "properties": {
  18107. "id": {
  18108. "type": "string"
  18109. },
  18110. "type": {
  18111. "type": "string",
  18112. "enum": ["session.next.tool.input.started"]
  18113. },
  18114. "properties": {
  18115. "type": "object",
  18116. "properties": {
  18117. "timestamp": {
  18118. "type": "number"
  18119. },
  18120. "sessionID": {
  18121. "type": "string",
  18122. "pattern": "^ses"
  18123. },
  18124. "callID": {
  18125. "type": "string"
  18126. },
  18127. "name": {
  18128. "type": "string"
  18129. }
  18130. },
  18131. "required": ["timestamp", "sessionID", "callID", "name"],
  18132. "additionalProperties": false
  18133. }
  18134. },
  18135. "required": ["id", "type", "properties"],
  18136. "additionalProperties": false
  18137. },
  18138. "EventSessionNextToolInputDelta": {
  18139. "type": "object",
  18140. "properties": {
  18141. "id": {
  18142. "type": "string"
  18143. },
  18144. "type": {
  18145. "type": "string",
  18146. "enum": ["session.next.tool.input.delta"]
  18147. },
  18148. "properties": {
  18149. "type": "object",
  18150. "properties": {
  18151. "timestamp": {
  18152. "type": "number"
  18153. },
  18154. "sessionID": {
  18155. "type": "string",
  18156. "pattern": "^ses"
  18157. },
  18158. "callID": {
  18159. "type": "string"
  18160. },
  18161. "delta": {
  18162. "type": "string"
  18163. }
  18164. },
  18165. "required": ["timestamp", "sessionID", "callID", "delta"],
  18166. "additionalProperties": false
  18167. }
  18168. },
  18169. "required": ["id", "type", "properties"],
  18170. "additionalProperties": false
  18171. },
  18172. "EventSessionNextToolInputEnded": {
  18173. "type": "object",
  18174. "properties": {
  18175. "id": {
  18176. "type": "string"
  18177. },
  18178. "type": {
  18179. "type": "string",
  18180. "enum": ["session.next.tool.input.ended"]
  18181. },
  18182. "properties": {
  18183. "type": "object",
  18184. "properties": {
  18185. "timestamp": {
  18186. "type": "number"
  18187. },
  18188. "sessionID": {
  18189. "type": "string",
  18190. "pattern": "^ses"
  18191. },
  18192. "callID": {
  18193. "type": "string"
  18194. },
  18195. "text": {
  18196. "type": "string"
  18197. }
  18198. },
  18199. "required": ["timestamp", "sessionID", "callID", "text"],
  18200. "additionalProperties": false
  18201. }
  18202. },
  18203. "required": ["id", "type", "properties"],
  18204. "additionalProperties": false
  18205. },
  18206. "EventSessionNextToolCalled": {
  18207. "type": "object",
  18208. "properties": {
  18209. "id": {
  18210. "type": "string"
  18211. },
  18212. "type": {
  18213. "type": "string",
  18214. "enum": ["session.next.tool.called"]
  18215. },
  18216. "properties": {
  18217. "type": "object",
  18218. "properties": {
  18219. "timestamp": {
  18220. "type": "number"
  18221. },
  18222. "sessionID": {
  18223. "type": "string",
  18224. "pattern": "^ses"
  18225. },
  18226. "callID": {
  18227. "type": "string"
  18228. },
  18229. "tool": {
  18230. "type": "string"
  18231. },
  18232. "input": {
  18233. "type": "object"
  18234. },
  18235. "provider": {
  18236. "type": "object",
  18237. "properties": {
  18238. "executed": {
  18239. "type": "boolean"
  18240. },
  18241. "metadata": {
  18242. "type": "object"
  18243. }
  18244. },
  18245. "required": ["executed"],
  18246. "additionalProperties": false
  18247. }
  18248. },
  18249. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  18250. "additionalProperties": false
  18251. }
  18252. },
  18253. "required": ["id", "type", "properties"],
  18254. "additionalProperties": false
  18255. },
  18256. "ToolTextContent": {
  18257. "type": "object",
  18258. "properties": {
  18259. "type": {
  18260. "type": "string",
  18261. "enum": ["text"]
  18262. },
  18263. "text": {
  18264. "type": "string"
  18265. }
  18266. },
  18267. "required": ["type", "text"],
  18268. "additionalProperties": false
  18269. },
  18270. "ToolFileContent": {
  18271. "type": "object",
  18272. "properties": {
  18273. "type": {
  18274. "type": "string",
  18275. "enum": ["file"]
  18276. },
  18277. "uri": {
  18278. "type": "string"
  18279. },
  18280. "mime": {
  18281. "type": "string"
  18282. },
  18283. "name": {
  18284. "type": "string"
  18285. }
  18286. },
  18287. "required": ["type", "uri", "mime"],
  18288. "additionalProperties": false
  18289. },
  18290. "EventSessionNextToolProgress": {
  18291. "type": "object",
  18292. "properties": {
  18293. "id": {
  18294. "type": "string"
  18295. },
  18296. "type": {
  18297. "type": "string",
  18298. "enum": ["session.next.tool.progress"]
  18299. },
  18300. "properties": {
  18301. "type": "object",
  18302. "properties": {
  18303. "timestamp": {
  18304. "type": "number"
  18305. },
  18306. "sessionID": {
  18307. "type": "string",
  18308. "pattern": "^ses"
  18309. },
  18310. "callID": {
  18311. "type": "string"
  18312. },
  18313. "structured": {
  18314. "type": "object"
  18315. },
  18316. "content": {
  18317. "type": "array",
  18318. "items": {
  18319. "anyOf": [
  18320. {
  18321. "$ref": "#/components/schemas/ToolTextContent"
  18322. },
  18323. {
  18324. "$ref": "#/components/schemas/ToolFileContent"
  18325. }
  18326. ]
  18327. }
  18328. }
  18329. },
  18330. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  18331. "additionalProperties": false
  18332. }
  18333. },
  18334. "required": ["id", "type", "properties"],
  18335. "additionalProperties": false
  18336. },
  18337. "EventSessionNextToolSuccess": {
  18338. "type": "object",
  18339. "properties": {
  18340. "id": {
  18341. "type": "string"
  18342. },
  18343. "type": {
  18344. "type": "string",
  18345. "enum": ["session.next.tool.success"]
  18346. },
  18347. "properties": {
  18348. "type": "object",
  18349. "properties": {
  18350. "timestamp": {
  18351. "type": "number"
  18352. },
  18353. "sessionID": {
  18354. "type": "string",
  18355. "pattern": "^ses"
  18356. },
  18357. "callID": {
  18358. "type": "string"
  18359. },
  18360. "structured": {
  18361. "type": "object"
  18362. },
  18363. "content": {
  18364. "type": "array",
  18365. "items": {
  18366. "anyOf": [
  18367. {
  18368. "$ref": "#/components/schemas/ToolTextContent"
  18369. },
  18370. {
  18371. "$ref": "#/components/schemas/ToolFileContent"
  18372. }
  18373. ]
  18374. }
  18375. },
  18376. "provider": {
  18377. "type": "object",
  18378. "properties": {
  18379. "executed": {
  18380. "type": "boolean"
  18381. },
  18382. "metadata": {
  18383. "type": "object"
  18384. }
  18385. },
  18386. "required": ["executed"],
  18387. "additionalProperties": false
  18388. }
  18389. },
  18390. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  18391. "additionalProperties": false
  18392. }
  18393. },
  18394. "required": ["id", "type", "properties"],
  18395. "additionalProperties": false
  18396. },
  18397. "EventSessionNextToolFailed": {
  18398. "type": "object",
  18399. "properties": {
  18400. "id": {
  18401. "type": "string"
  18402. },
  18403. "type": {
  18404. "type": "string",
  18405. "enum": ["session.next.tool.failed"]
  18406. },
  18407. "properties": {
  18408. "type": "object",
  18409. "properties": {
  18410. "timestamp": {
  18411. "type": "number"
  18412. },
  18413. "sessionID": {
  18414. "type": "string",
  18415. "pattern": "^ses"
  18416. },
  18417. "callID": {
  18418. "type": "string"
  18419. },
  18420. "error": {
  18421. "$ref": "#/components/schemas/SessionErrorUnknown"
  18422. },
  18423. "provider": {
  18424. "type": "object",
  18425. "properties": {
  18426. "executed": {
  18427. "type": "boolean"
  18428. },
  18429. "metadata": {
  18430. "type": "object"
  18431. }
  18432. },
  18433. "required": ["executed"],
  18434. "additionalProperties": false
  18435. }
  18436. },
  18437. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18438. "additionalProperties": false
  18439. }
  18440. },
  18441. "required": ["id", "type", "properties"],
  18442. "additionalProperties": false
  18443. },
  18444. "SessionNextRetry_error": {
  18445. "type": "object",
  18446. "properties": {
  18447. "message": {
  18448. "type": "string"
  18449. },
  18450. "statusCode": {
  18451. "type": "number"
  18452. },
  18453. "isRetryable": {
  18454. "type": "boolean"
  18455. },
  18456. "responseHeaders": {
  18457. "type": "object",
  18458. "additionalProperties": {
  18459. "type": "string"
  18460. }
  18461. },
  18462. "responseBody": {
  18463. "type": "string"
  18464. },
  18465. "metadata": {
  18466. "type": "object",
  18467. "additionalProperties": {
  18468. "type": "string"
  18469. }
  18470. }
  18471. },
  18472. "required": ["message", "isRetryable"],
  18473. "additionalProperties": false
  18474. },
  18475. "EventSessionNextRetried": {
  18476. "type": "object",
  18477. "properties": {
  18478. "id": {
  18479. "type": "string"
  18480. },
  18481. "type": {
  18482. "type": "string",
  18483. "enum": ["session.next.retried"]
  18484. },
  18485. "properties": {
  18486. "type": "object",
  18487. "properties": {
  18488. "timestamp": {
  18489. "type": "number"
  18490. },
  18491. "sessionID": {
  18492. "type": "string",
  18493. "pattern": "^ses"
  18494. },
  18495. "attempt": {
  18496. "type": "number"
  18497. },
  18498. "error": {
  18499. "$ref": "#/components/schemas/SessionNextRetry_error"
  18500. }
  18501. },
  18502. "required": ["timestamp", "sessionID", "attempt", "error"],
  18503. "additionalProperties": false
  18504. }
  18505. },
  18506. "required": ["id", "type", "properties"],
  18507. "additionalProperties": false
  18508. },
  18509. "EventSessionNextCompactionStarted": {
  18510. "type": "object",
  18511. "properties": {
  18512. "id": {
  18513. "type": "string"
  18514. },
  18515. "type": {
  18516. "type": "string",
  18517. "enum": ["session.next.compaction.started"]
  18518. },
  18519. "properties": {
  18520. "type": "object",
  18521. "properties": {
  18522. "timestamp": {
  18523. "type": "number"
  18524. },
  18525. "sessionID": {
  18526. "type": "string",
  18527. "pattern": "^ses"
  18528. },
  18529. "reason": {
  18530. "type": "string",
  18531. "enum": ["auto", "manual"]
  18532. }
  18533. },
  18534. "required": ["timestamp", "sessionID", "reason"],
  18535. "additionalProperties": false
  18536. }
  18537. },
  18538. "required": ["id", "type", "properties"],
  18539. "additionalProperties": false
  18540. },
  18541. "EventSessionNextCompactionDelta": {
  18542. "type": "object",
  18543. "properties": {
  18544. "id": {
  18545. "type": "string"
  18546. },
  18547. "type": {
  18548. "type": "string",
  18549. "enum": ["session.next.compaction.delta"]
  18550. },
  18551. "properties": {
  18552. "type": "object",
  18553. "properties": {
  18554. "timestamp": {
  18555. "type": "number"
  18556. },
  18557. "sessionID": {
  18558. "type": "string",
  18559. "pattern": "^ses"
  18560. },
  18561. "text": {
  18562. "type": "string"
  18563. }
  18564. },
  18565. "required": ["timestamp", "sessionID", "text"],
  18566. "additionalProperties": false
  18567. }
  18568. },
  18569. "required": ["id", "type", "properties"],
  18570. "additionalProperties": false
  18571. },
  18572. "EventSessionNextCompactionEnded": {
  18573. "type": "object",
  18574. "properties": {
  18575. "id": {
  18576. "type": "string"
  18577. },
  18578. "type": {
  18579. "type": "string",
  18580. "enum": ["session.next.compaction.ended"]
  18581. },
  18582. "properties": {
  18583. "type": "object",
  18584. "properties": {
  18585. "timestamp": {
  18586. "type": "number"
  18587. },
  18588. "sessionID": {
  18589. "type": "string",
  18590. "pattern": "^ses"
  18591. },
  18592. "text": {
  18593. "type": "string"
  18594. },
  18595. "include": {
  18596. "type": "string"
  18597. }
  18598. },
  18599. "required": ["timestamp", "sessionID", "text"],
  18600. "additionalProperties": false
  18601. }
  18602. },
  18603. "required": ["id", "type", "properties"],
  18604. "additionalProperties": false
  18605. },
  18606. "EventServerConnected": {
  18607. "type": "object",
  18608. "properties": {
  18609. "id": {
  18610. "type": "string"
  18611. },
  18612. "type": {
  18613. "type": "string",
  18614. "enum": ["server.connected"]
  18615. },
  18616. "properties": {
  18617. "type": "object",
  18618. "properties": {}
  18619. }
  18620. },
  18621. "required": ["id", "type", "properties"],
  18622. "additionalProperties": false
  18623. },
  18624. "EventGlobalDisposed": {
  18625. "type": "object",
  18626. "properties": {
  18627. "id": {
  18628. "type": "string"
  18629. },
  18630. "type": {
  18631. "type": "string",
  18632. "enum": ["global.disposed"]
  18633. },
  18634. "properties": {
  18635. "type": "object",
  18636. "properties": {}
  18637. }
  18638. },
  18639. "required": ["id", "type", "properties"],
  18640. "additionalProperties": false
  18641. },
  18642. "ModelV2Info": {
  18643. "type": "object",
  18644. "properties": {
  18645. "id": {
  18646. "type": "string"
  18647. },
  18648. "apiID": {
  18649. "type": "string"
  18650. },
  18651. "providerID": {
  18652. "type": "string"
  18653. },
  18654. "family": {
  18655. "type": "string"
  18656. },
  18657. "name": {
  18658. "type": "string"
  18659. },
  18660. "endpoint": {
  18661. "anyOf": [
  18662. {
  18663. "type": "object",
  18664. "properties": {
  18665. "type": {
  18666. "type": "string",
  18667. "enum": ["unknown"]
  18668. }
  18669. },
  18670. "required": ["type"],
  18671. "additionalProperties": false
  18672. },
  18673. {
  18674. "type": "object",
  18675. "properties": {
  18676. "type": {
  18677. "type": "string",
  18678. "enum": ["openai/responses"]
  18679. },
  18680. "url": {
  18681. "type": "string"
  18682. },
  18683. "websocket": {
  18684. "type": "boolean"
  18685. }
  18686. },
  18687. "required": ["type", "url"],
  18688. "additionalProperties": false
  18689. },
  18690. {
  18691. "type": "object",
  18692. "properties": {
  18693. "type": {
  18694. "type": "string",
  18695. "enum": ["openai/completions"]
  18696. },
  18697. "url": {
  18698. "type": "string"
  18699. },
  18700. "reasoning": {
  18701. "anyOf": [
  18702. {
  18703. "type": "object",
  18704. "properties": {
  18705. "type": {
  18706. "type": "string",
  18707. "enum": ["reasoning_content"]
  18708. }
  18709. },
  18710. "required": ["type"],
  18711. "additionalProperties": false
  18712. },
  18713. {
  18714. "type": "object",
  18715. "properties": {
  18716. "type": {
  18717. "type": "string",
  18718. "enum": ["reasoning_details"]
  18719. }
  18720. },
  18721. "required": ["type"],
  18722. "additionalProperties": false
  18723. }
  18724. ]
  18725. }
  18726. },
  18727. "required": ["type", "url"],
  18728. "additionalProperties": false
  18729. },
  18730. {
  18731. "type": "object",
  18732. "properties": {
  18733. "type": {
  18734. "type": "string",
  18735. "enum": ["anthropic/messages"]
  18736. },
  18737. "url": {
  18738. "type": "string"
  18739. }
  18740. },
  18741. "required": ["type", "url"],
  18742. "additionalProperties": false
  18743. },
  18744. {
  18745. "type": "object",
  18746. "properties": {
  18747. "type": {
  18748. "type": "string",
  18749. "enum": ["aisdk"]
  18750. },
  18751. "package": {
  18752. "type": "string"
  18753. },
  18754. "url": {
  18755. "type": "string"
  18756. }
  18757. },
  18758. "required": ["type", "package"],
  18759. "additionalProperties": false
  18760. }
  18761. ]
  18762. },
  18763. "capabilities": {
  18764. "type": "object",
  18765. "properties": {
  18766. "tools": {
  18767. "type": "boolean"
  18768. },
  18769. "input": {
  18770. "type": "array",
  18771. "items": {
  18772. "type": "string"
  18773. }
  18774. },
  18775. "output": {
  18776. "type": "array",
  18777. "items": {
  18778. "type": "string"
  18779. }
  18780. }
  18781. },
  18782. "required": ["tools", "input", "output"],
  18783. "additionalProperties": false
  18784. },
  18785. "options": {
  18786. "type": "object",
  18787. "properties": {
  18788. "headers": {
  18789. "type": "object",
  18790. "additionalProperties": {
  18791. "type": "string"
  18792. }
  18793. },
  18794. "body": {
  18795. "type": "object"
  18796. },
  18797. "aisdk": {
  18798. "type": "object",
  18799. "properties": {
  18800. "provider": {
  18801. "type": "object"
  18802. },
  18803. "request": {
  18804. "type": "object"
  18805. }
  18806. },
  18807. "required": ["provider", "request"],
  18808. "additionalProperties": false
  18809. },
  18810. "variant": {
  18811. "type": "string"
  18812. }
  18813. },
  18814. "required": ["headers", "body", "aisdk"],
  18815. "additionalProperties": false
  18816. },
  18817. "variants": {
  18818. "type": "array",
  18819. "items": {
  18820. "type": "object",
  18821. "properties": {
  18822. "id": {
  18823. "type": "string"
  18824. },
  18825. "headers": {
  18826. "type": "object",
  18827. "additionalProperties": {
  18828. "type": "string"
  18829. }
  18830. },
  18831. "body": {
  18832. "type": "object"
  18833. },
  18834. "aisdk": {
  18835. "type": "object",
  18836. "properties": {
  18837. "provider": {
  18838. "type": "object"
  18839. },
  18840. "request": {
  18841. "type": "object"
  18842. }
  18843. },
  18844. "required": ["provider", "request"],
  18845. "additionalProperties": false
  18846. }
  18847. },
  18848. "required": ["id", "headers", "body", "aisdk"],
  18849. "additionalProperties": false
  18850. }
  18851. },
  18852. "time": {
  18853. "type": "object",
  18854. "properties": {
  18855. "released": {
  18856. "anyOf": [
  18857. {
  18858. "type": "number"
  18859. },
  18860. {
  18861. "type": "string",
  18862. "enum": ["NaN"]
  18863. },
  18864. {
  18865. "type": "string",
  18866. "enum": ["Infinity"]
  18867. },
  18868. {
  18869. "type": "string",
  18870. "enum": ["-Infinity"]
  18871. },
  18872. {
  18873. "type": "string",
  18874. "enum": ["Infinity", "-Infinity", "NaN"]
  18875. }
  18876. ]
  18877. }
  18878. },
  18879. "required": ["released"],
  18880. "additionalProperties": false
  18881. },
  18882. "cost": {
  18883. "type": "array",
  18884. "items": {
  18885. "type": "object",
  18886. "properties": {
  18887. "tier": {
  18888. "type": "object",
  18889. "properties": {
  18890. "type": {
  18891. "type": "string",
  18892. "enum": ["context"]
  18893. },
  18894. "size": {
  18895. "type": "integer"
  18896. }
  18897. },
  18898. "required": ["type", "size"],
  18899. "additionalProperties": false
  18900. },
  18901. "input": {
  18902. "type": "number"
  18903. },
  18904. "output": {
  18905. "type": "number"
  18906. },
  18907. "cache": {
  18908. "type": "object",
  18909. "properties": {
  18910. "read": {
  18911. "type": "number"
  18912. },
  18913. "write": {
  18914. "type": "number"
  18915. }
  18916. },
  18917. "required": ["read", "write"],
  18918. "additionalProperties": false
  18919. }
  18920. },
  18921. "required": ["input", "output", "cache"],
  18922. "additionalProperties": false
  18923. }
  18924. },
  18925. "status": {
  18926. "type": "string",
  18927. "enum": ["alpha", "beta", "deprecated", "active"]
  18928. },
  18929. "enabled": {
  18930. "type": "boolean"
  18931. },
  18932. "limit": {
  18933. "type": "object",
  18934. "properties": {
  18935. "context": {
  18936. "type": "integer"
  18937. },
  18938. "input": {
  18939. "type": "integer"
  18940. },
  18941. "output": {
  18942. "type": "integer"
  18943. }
  18944. },
  18945. "required": ["context", "output"],
  18946. "additionalProperties": false
  18947. }
  18948. },
  18949. "required": [
  18950. "id",
  18951. "apiID",
  18952. "providerID",
  18953. "name",
  18954. "endpoint",
  18955. "capabilities",
  18956. "options",
  18957. "variants",
  18958. "time",
  18959. "cost",
  18960. "status",
  18961. "enabled",
  18962. "limit"
  18963. ],
  18964. "additionalProperties": false
  18965. },
  18966. "EventCatalogModelUpdated": {
  18967. "type": "object",
  18968. "properties": {
  18969. "id": {
  18970. "type": "string"
  18971. },
  18972. "type": {
  18973. "type": "string",
  18974. "enum": ["catalog.model.updated"]
  18975. },
  18976. "properties": {
  18977. "type": "object",
  18978. "properties": {
  18979. "model": {
  18980. "$ref": "#/components/schemas/ModelV2Info"
  18981. }
  18982. },
  18983. "required": ["model"],
  18984. "additionalProperties": false
  18985. }
  18986. },
  18987. "required": ["id", "type", "properties"],
  18988. "additionalProperties": false
  18989. },
  18990. "SessionInfo": {
  18991. "type": "object",
  18992. "properties": {
  18993. "id": {
  18994. "type": "string",
  18995. "pattern": "^ses"
  18996. },
  18997. "parentID": {
  18998. "type": "string",
  18999. "pattern": "^ses"
  19000. },
  19001. "projectID": {
  19002. "type": "string"
  19003. },
  19004. "workspaceID": {
  19005. "type": "string",
  19006. "pattern": "^wrk"
  19007. },
  19008. "path": {
  19009. "type": "string"
  19010. },
  19011. "agent": {
  19012. "type": "string"
  19013. },
  19014. "model": {
  19015. "type": "object",
  19016. "properties": {
  19017. "id": {
  19018. "type": "string"
  19019. },
  19020. "providerID": {
  19021. "type": "string"
  19022. },
  19023. "variant": {
  19024. "type": "string"
  19025. }
  19026. },
  19027. "required": ["id", "providerID", "variant"],
  19028. "additionalProperties": false
  19029. },
  19030. "cost": {
  19031. "type": "number"
  19032. },
  19033. "tokens": {
  19034. "type": "object",
  19035. "properties": {
  19036. "input": {
  19037. "type": "number"
  19038. },
  19039. "output": {
  19040. "type": "number"
  19041. },
  19042. "reasoning": {
  19043. "type": "number"
  19044. },
  19045. "cache": {
  19046. "type": "object",
  19047. "properties": {
  19048. "read": {
  19049. "type": "number"
  19050. },
  19051. "write": {
  19052. "type": "number"
  19053. }
  19054. },
  19055. "required": ["read", "write"],
  19056. "additionalProperties": false
  19057. }
  19058. },
  19059. "required": ["input", "output", "reasoning", "cache"],
  19060. "additionalProperties": false
  19061. },
  19062. "time": {
  19063. "type": "object",
  19064. "properties": {
  19065. "created": {
  19066. "type": "number"
  19067. },
  19068. "updated": {
  19069. "type": "number"
  19070. },
  19071. "archived": {
  19072. "type": "number"
  19073. }
  19074. },
  19075. "required": ["created", "updated"],
  19076. "additionalProperties": false
  19077. },
  19078. "title": {
  19079. "type": "string"
  19080. }
  19081. },
  19082. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  19083. "additionalProperties": false
  19084. },
  19085. "SessionDelivery": {
  19086. "type": "string",
  19087. "enum": ["immediate", "deferred"]
  19088. },
  19089. "SessionMessageAgentSwitched": {
  19090. "type": "object",
  19091. "properties": {
  19092. "id": {
  19093. "type": "string"
  19094. },
  19095. "metadata": {
  19096. "type": "object"
  19097. },
  19098. "time": {
  19099. "type": "object",
  19100. "properties": {
  19101. "created": {
  19102. "type": "number"
  19103. }
  19104. },
  19105. "required": ["created"],
  19106. "additionalProperties": false
  19107. },
  19108. "type": {
  19109. "type": "string",
  19110. "enum": ["agent-switched"]
  19111. },
  19112. "agent": {
  19113. "type": "string"
  19114. }
  19115. },
  19116. "required": ["id", "time", "type", "agent"],
  19117. "additionalProperties": false
  19118. },
  19119. "SessionMessageModelSwitched": {
  19120. "type": "object",
  19121. "properties": {
  19122. "id": {
  19123. "type": "string"
  19124. },
  19125. "metadata": {
  19126. "type": "object"
  19127. },
  19128. "time": {
  19129. "type": "object",
  19130. "properties": {
  19131. "created": {
  19132. "type": "number"
  19133. }
  19134. },
  19135. "required": ["created"],
  19136. "additionalProperties": false
  19137. },
  19138. "type": {
  19139. "type": "string",
  19140. "enum": ["model-switched"]
  19141. },
  19142. "model": {
  19143. "type": "object",
  19144. "properties": {
  19145. "id": {
  19146. "type": "string"
  19147. },
  19148. "providerID": {
  19149. "type": "string"
  19150. },
  19151. "variant": {
  19152. "type": "string"
  19153. }
  19154. },
  19155. "required": ["id", "providerID", "variant"],
  19156. "additionalProperties": false
  19157. }
  19158. },
  19159. "required": ["id", "time", "type", "model"],
  19160. "additionalProperties": false
  19161. },
  19162. "SessionMessageUser": {
  19163. "type": "object",
  19164. "properties": {
  19165. "id": {
  19166. "type": "string"
  19167. },
  19168. "metadata": {
  19169. "type": "object"
  19170. },
  19171. "time": {
  19172. "type": "object",
  19173. "properties": {
  19174. "created": {
  19175. "type": "number"
  19176. }
  19177. },
  19178. "required": ["created"],
  19179. "additionalProperties": false
  19180. },
  19181. "text": {
  19182. "type": "string"
  19183. },
  19184. "files": {
  19185. "type": "array",
  19186. "items": {
  19187. "$ref": "#/components/schemas/PromptFileAttachment"
  19188. }
  19189. },
  19190. "agents": {
  19191. "type": "array",
  19192. "items": {
  19193. "$ref": "#/components/schemas/PromptAgentAttachment"
  19194. }
  19195. },
  19196. "references": {
  19197. "type": "array",
  19198. "items": {
  19199. "$ref": "#/components/schemas/PromptReferenceAttachment"
  19200. }
  19201. },
  19202. "type": {
  19203. "type": "string",
  19204. "enum": ["user"]
  19205. }
  19206. },
  19207. "required": ["id", "time", "text", "type"],
  19208. "additionalProperties": false
  19209. },
  19210. "SessionMessageSynthetic": {
  19211. "type": "object",
  19212. "properties": {
  19213. "id": {
  19214. "type": "string"
  19215. },
  19216. "metadata": {
  19217. "type": "object"
  19218. },
  19219. "time": {
  19220. "type": "object",
  19221. "properties": {
  19222. "created": {
  19223. "type": "number"
  19224. }
  19225. },
  19226. "required": ["created"],
  19227. "additionalProperties": false
  19228. },
  19229. "sessionID": {
  19230. "type": "string",
  19231. "pattern": "^ses"
  19232. },
  19233. "text": {
  19234. "type": "string"
  19235. },
  19236. "type": {
  19237. "type": "string",
  19238. "enum": ["synthetic"]
  19239. }
  19240. },
  19241. "required": ["id", "time", "sessionID", "text", "type"],
  19242. "additionalProperties": false
  19243. },
  19244. "SessionMessageShell": {
  19245. "type": "object",
  19246. "properties": {
  19247. "id": {
  19248. "type": "string"
  19249. },
  19250. "metadata": {
  19251. "type": "object"
  19252. },
  19253. "time": {
  19254. "type": "object",
  19255. "properties": {
  19256. "created": {
  19257. "type": "number"
  19258. },
  19259. "completed": {
  19260. "type": "number"
  19261. }
  19262. },
  19263. "required": ["created"],
  19264. "additionalProperties": false
  19265. },
  19266. "type": {
  19267. "type": "string",
  19268. "enum": ["shell"]
  19269. },
  19270. "callID": {
  19271. "type": "string"
  19272. },
  19273. "command": {
  19274. "type": "string"
  19275. },
  19276. "output": {
  19277. "type": "string"
  19278. }
  19279. },
  19280. "required": ["id", "time", "type", "callID", "command", "output"],
  19281. "additionalProperties": false
  19282. },
  19283. "SessionMessageAssistantText": {
  19284. "type": "object",
  19285. "properties": {
  19286. "type": {
  19287. "type": "string",
  19288. "enum": ["text"]
  19289. },
  19290. "text": {
  19291. "type": "string"
  19292. }
  19293. },
  19294. "required": ["type", "text"],
  19295. "additionalProperties": false
  19296. },
  19297. "SessionMessageAssistantReasoning": {
  19298. "type": "object",
  19299. "properties": {
  19300. "type": {
  19301. "type": "string",
  19302. "enum": ["reasoning"]
  19303. },
  19304. "id": {
  19305. "type": "string"
  19306. },
  19307. "text": {
  19308. "type": "string"
  19309. }
  19310. },
  19311. "required": ["type", "id", "text"],
  19312. "additionalProperties": false
  19313. },
  19314. "SessionMessageToolStatePending": {
  19315. "type": "object",
  19316. "properties": {
  19317. "status": {
  19318. "type": "string",
  19319. "enum": ["pending"]
  19320. },
  19321. "input": {
  19322. "type": "string"
  19323. }
  19324. },
  19325. "required": ["status", "input"],
  19326. "additionalProperties": false
  19327. },
  19328. "SessionMessageToolStateRunning": {
  19329. "type": "object",
  19330. "properties": {
  19331. "status": {
  19332. "type": "string",
  19333. "enum": ["running"]
  19334. },
  19335. "input": {
  19336. "type": "object"
  19337. },
  19338. "structured": {
  19339. "type": "object"
  19340. },
  19341. "content": {
  19342. "type": "array",
  19343. "items": {
  19344. "anyOf": [
  19345. {
  19346. "$ref": "#/components/schemas/ToolTextContent"
  19347. },
  19348. {
  19349. "$ref": "#/components/schemas/ToolFileContent"
  19350. }
  19351. ]
  19352. }
  19353. }
  19354. },
  19355. "required": ["status", "input", "structured", "content"],
  19356. "additionalProperties": false
  19357. },
  19358. "SessionMessageToolStateCompleted": {
  19359. "type": "object",
  19360. "properties": {
  19361. "status": {
  19362. "type": "string",
  19363. "enum": ["completed"]
  19364. },
  19365. "input": {
  19366. "type": "object"
  19367. },
  19368. "attachments": {
  19369. "type": "array",
  19370. "items": {
  19371. "$ref": "#/components/schemas/PromptFileAttachment"
  19372. }
  19373. },
  19374. "content": {
  19375. "type": "array",
  19376. "items": {
  19377. "anyOf": [
  19378. {
  19379. "$ref": "#/components/schemas/ToolTextContent"
  19380. },
  19381. {
  19382. "$ref": "#/components/schemas/ToolFileContent"
  19383. }
  19384. ]
  19385. }
  19386. },
  19387. "structured": {
  19388. "type": "object"
  19389. }
  19390. },
  19391. "required": ["status", "input", "content", "structured"],
  19392. "additionalProperties": false
  19393. },
  19394. "SessionMessageToolStateError": {
  19395. "type": "object",
  19396. "properties": {
  19397. "status": {
  19398. "type": "string",
  19399. "enum": ["error"]
  19400. },
  19401. "input": {
  19402. "type": "object"
  19403. },
  19404. "content": {
  19405. "type": "array",
  19406. "items": {
  19407. "anyOf": [
  19408. {
  19409. "$ref": "#/components/schemas/ToolTextContent"
  19410. },
  19411. {
  19412. "$ref": "#/components/schemas/ToolFileContent"
  19413. }
  19414. ]
  19415. }
  19416. },
  19417. "structured": {
  19418. "type": "object"
  19419. },
  19420. "error": {
  19421. "$ref": "#/components/schemas/SessionErrorUnknown"
  19422. }
  19423. },
  19424. "required": ["status", "input", "content", "structured", "error"],
  19425. "additionalProperties": false
  19426. },
  19427. "SessionMessageAssistantTool": {
  19428. "type": "object",
  19429. "properties": {
  19430. "type": {
  19431. "type": "string",
  19432. "enum": ["tool"]
  19433. },
  19434. "id": {
  19435. "type": "string"
  19436. },
  19437. "name": {
  19438. "type": "string"
  19439. },
  19440. "provider": {
  19441. "type": "object",
  19442. "properties": {
  19443. "executed": {
  19444. "type": "boolean"
  19445. },
  19446. "metadata": {
  19447. "type": "object"
  19448. }
  19449. },
  19450. "required": ["executed"],
  19451. "additionalProperties": false
  19452. },
  19453. "state": {
  19454. "anyOf": [
  19455. {
  19456. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  19457. },
  19458. {
  19459. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  19460. },
  19461. {
  19462. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  19463. },
  19464. {
  19465. "$ref": "#/components/schemas/SessionMessageToolStateError"
  19466. }
  19467. ]
  19468. },
  19469. "time": {
  19470. "type": "object",
  19471. "properties": {
  19472. "created": {
  19473. "type": "number"
  19474. },
  19475. "ran": {
  19476. "type": "number"
  19477. },
  19478. "completed": {
  19479. "type": "number"
  19480. },
  19481. "pruned": {
  19482. "type": "number"
  19483. }
  19484. },
  19485. "required": ["created"],
  19486. "additionalProperties": false
  19487. }
  19488. },
  19489. "required": ["type", "id", "name", "state", "time"],
  19490. "additionalProperties": false
  19491. },
  19492. "SessionMessageAssistant": {
  19493. "type": "object",
  19494. "properties": {
  19495. "id": {
  19496. "type": "string"
  19497. },
  19498. "metadata": {
  19499. "type": "object"
  19500. },
  19501. "time": {
  19502. "type": "object",
  19503. "properties": {
  19504. "created": {
  19505. "type": "number"
  19506. },
  19507. "completed": {
  19508. "type": "number"
  19509. }
  19510. },
  19511. "required": ["created"],
  19512. "additionalProperties": false
  19513. },
  19514. "type": {
  19515. "type": "string",
  19516. "enum": ["assistant"]
  19517. },
  19518. "agent": {
  19519. "type": "string"
  19520. },
  19521. "model": {
  19522. "type": "object",
  19523. "properties": {
  19524. "id": {
  19525. "type": "string"
  19526. },
  19527. "providerID": {
  19528. "type": "string"
  19529. },
  19530. "variant": {
  19531. "type": "string"
  19532. }
  19533. },
  19534. "required": ["id", "providerID", "variant"],
  19535. "additionalProperties": false
  19536. },
  19537. "content": {
  19538. "type": "array",
  19539. "items": {
  19540. "anyOf": [
  19541. {
  19542. "$ref": "#/components/schemas/SessionMessageAssistantText"
  19543. },
  19544. {
  19545. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  19546. },
  19547. {
  19548. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  19549. }
  19550. ]
  19551. }
  19552. },
  19553. "snapshot": {
  19554. "type": "object",
  19555. "properties": {
  19556. "start": {
  19557. "type": "string"
  19558. },
  19559. "end": {
  19560. "type": "string"
  19561. }
  19562. },
  19563. "additionalProperties": false
  19564. },
  19565. "finish": {
  19566. "type": "string"
  19567. },
  19568. "cost": {
  19569. "type": "number"
  19570. },
  19571. "tokens": {
  19572. "type": "object",
  19573. "properties": {
  19574. "input": {
  19575. "type": "number"
  19576. },
  19577. "output": {
  19578. "type": "number"
  19579. },
  19580. "reasoning": {
  19581. "type": "number"
  19582. },
  19583. "cache": {
  19584. "type": "object",
  19585. "properties": {
  19586. "read": {
  19587. "type": "number"
  19588. },
  19589. "write": {
  19590. "type": "number"
  19591. }
  19592. },
  19593. "required": ["read", "write"],
  19594. "additionalProperties": false
  19595. }
  19596. },
  19597. "required": ["input", "output", "reasoning", "cache"],
  19598. "additionalProperties": false
  19599. },
  19600. "error": {
  19601. "$ref": "#/components/schemas/SessionErrorUnknown"
  19602. }
  19603. },
  19604. "required": ["id", "time", "type", "agent", "model", "content"],
  19605. "additionalProperties": false
  19606. },
  19607. "SessionMessageCompaction": {
  19608. "type": "object",
  19609. "properties": {
  19610. "type": {
  19611. "type": "string",
  19612. "enum": ["compaction"]
  19613. },
  19614. "reason": {
  19615. "type": "string",
  19616. "enum": ["auto", "manual"]
  19617. },
  19618. "summary": {
  19619. "type": "string"
  19620. },
  19621. "include": {
  19622. "type": "string"
  19623. },
  19624. "id": {
  19625. "type": "string"
  19626. },
  19627. "metadata": {
  19628. "type": "object"
  19629. },
  19630. "time": {
  19631. "type": "object",
  19632. "properties": {
  19633. "created": {
  19634. "type": "number"
  19635. }
  19636. },
  19637. "required": ["created"],
  19638. "additionalProperties": false
  19639. }
  19640. },
  19641. "required": ["type", "reason", "summary", "id", "time"],
  19642. "additionalProperties": false
  19643. },
  19644. "SessionMessage": {
  19645. "anyOf": [
  19646. {
  19647. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  19648. },
  19649. {
  19650. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  19651. },
  19652. {
  19653. "$ref": "#/components/schemas/SessionMessageUser"
  19654. },
  19655. {
  19656. "$ref": "#/components/schemas/SessionMessageSynthetic"
  19657. },
  19658. {
  19659. "$ref": "#/components/schemas/SessionMessageShell"
  19660. },
  19661. {
  19662. "$ref": "#/components/schemas/SessionMessageAssistant"
  19663. },
  19664. {
  19665. "$ref": "#/components/schemas/SessionMessageCompaction"
  19666. }
  19667. ]
  19668. },
  19669. "ProviderV2Info": {
  19670. "type": "object",
  19671. "properties": {
  19672. "id": {
  19673. "type": "string"
  19674. },
  19675. "name": {
  19676. "type": "string"
  19677. },
  19678. "enabled": {
  19679. "anyOf": [
  19680. {
  19681. "type": "boolean",
  19682. "enum": [false]
  19683. },
  19684. {
  19685. "type": "object",
  19686. "properties": {
  19687. "via": {
  19688. "type": "string",
  19689. "enum": ["env"]
  19690. },
  19691. "name": {
  19692. "type": "string"
  19693. }
  19694. },
  19695. "required": ["via", "name"],
  19696. "additionalProperties": false
  19697. },
  19698. {
  19699. "type": "object",
  19700. "properties": {
  19701. "via": {
  19702. "type": "string",
  19703. "enum": ["auth"]
  19704. },
  19705. "service": {
  19706. "type": "string"
  19707. }
  19708. },
  19709. "required": ["via", "service"],
  19710. "additionalProperties": false
  19711. },
  19712. {
  19713. "type": "object",
  19714. "properties": {
  19715. "via": {
  19716. "type": "string",
  19717. "enum": ["custom"]
  19718. },
  19719. "data": {
  19720. "type": "object"
  19721. }
  19722. },
  19723. "required": ["via", "data"],
  19724. "additionalProperties": false
  19725. }
  19726. ]
  19727. },
  19728. "env": {
  19729. "type": "array",
  19730. "items": {
  19731. "type": "string"
  19732. }
  19733. },
  19734. "endpoint": {
  19735. "anyOf": [
  19736. {
  19737. "type": "object",
  19738. "properties": {
  19739. "type": {
  19740. "type": "string",
  19741. "enum": ["unknown"]
  19742. }
  19743. },
  19744. "required": ["type"],
  19745. "additionalProperties": false
  19746. },
  19747. {
  19748. "type": "object",
  19749. "properties": {
  19750. "type": {
  19751. "type": "string",
  19752. "enum": ["openai/responses"]
  19753. },
  19754. "url": {
  19755. "type": "string"
  19756. },
  19757. "websocket": {
  19758. "type": "boolean"
  19759. }
  19760. },
  19761. "required": ["type", "url"],
  19762. "additionalProperties": false
  19763. },
  19764. {
  19765. "type": "object",
  19766. "properties": {
  19767. "type": {
  19768. "type": "string",
  19769. "enum": ["openai/completions"]
  19770. },
  19771. "url": {
  19772. "type": "string"
  19773. },
  19774. "reasoning": {
  19775. "anyOf": [
  19776. {
  19777. "type": "object",
  19778. "properties": {
  19779. "type": {
  19780. "type": "string",
  19781. "enum": ["reasoning_content"]
  19782. }
  19783. },
  19784. "required": ["type"],
  19785. "additionalProperties": false
  19786. },
  19787. {
  19788. "type": "object",
  19789. "properties": {
  19790. "type": {
  19791. "type": "string",
  19792. "enum": ["reasoning_details"]
  19793. }
  19794. },
  19795. "required": ["type"],
  19796. "additionalProperties": false
  19797. }
  19798. ]
  19799. }
  19800. },
  19801. "required": ["type", "url"],
  19802. "additionalProperties": false
  19803. },
  19804. {
  19805. "type": "object",
  19806. "properties": {
  19807. "type": {
  19808. "type": "string",
  19809. "enum": ["anthropic/messages"]
  19810. },
  19811. "url": {
  19812. "type": "string"
  19813. }
  19814. },
  19815. "required": ["type", "url"],
  19816. "additionalProperties": false
  19817. },
  19818. {
  19819. "type": "object",
  19820. "properties": {
  19821. "type": {
  19822. "type": "string",
  19823. "enum": ["aisdk"]
  19824. },
  19825. "package": {
  19826. "type": "string"
  19827. },
  19828. "url": {
  19829. "type": "string"
  19830. }
  19831. },
  19832. "required": ["type", "package"],
  19833. "additionalProperties": false
  19834. }
  19835. ]
  19836. },
  19837. "options": {
  19838. "type": "object",
  19839. "properties": {
  19840. "headers": {
  19841. "type": "object",
  19842. "additionalProperties": {
  19843. "type": "string"
  19844. }
  19845. },
  19846. "body": {
  19847. "type": "object"
  19848. },
  19849. "aisdk": {
  19850. "type": "object",
  19851. "properties": {
  19852. "provider": {
  19853. "type": "object"
  19854. },
  19855. "request": {
  19856. "type": "object"
  19857. }
  19858. },
  19859. "required": ["provider", "request"],
  19860. "additionalProperties": false
  19861. }
  19862. },
  19863. "required": ["headers", "body", "aisdk"],
  19864. "additionalProperties": false
  19865. }
  19866. },
  19867. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  19868. "additionalProperties": false
  19869. },
  19870. "EventTuiToastShow1": {
  19871. "type": "object",
  19872. "properties": {
  19873. "id": {
  19874. "type": "string"
  19875. },
  19876. "type": {
  19877. "type": "string",
  19878. "enum": ["tui.toast.show"]
  19879. },
  19880. "properties": {
  19881. "type": "object",
  19882. "properties": {
  19883. "title": {
  19884. "type": "string"
  19885. },
  19886. "message": {
  19887. "type": "string"
  19888. },
  19889. "variant": {
  19890. "type": "string",
  19891. "enum": ["info", "success", "warning", "error"]
  19892. },
  19893. "duration": {
  19894. "type": "integer",
  19895. "exclusiveMinimum": 0
  19896. }
  19897. },
  19898. "required": ["message", "variant"],
  19899. "additionalProperties": false
  19900. }
  19901. },
  19902. "required": ["id", "type", "properties"],
  19903. "additionalProperties": false
  19904. },
  19905. "ModelV2Info1": {
  19906. "type": "object",
  19907. "properties": {
  19908. "id": {
  19909. "type": "string"
  19910. },
  19911. "apiID": {
  19912. "type": "string"
  19913. },
  19914. "providerID": {
  19915. "type": "string"
  19916. },
  19917. "family": {
  19918. "type": "string"
  19919. },
  19920. "name": {
  19921. "type": "string"
  19922. },
  19923. "endpoint": {
  19924. "anyOf": [
  19925. {
  19926. "type": "object",
  19927. "properties": {
  19928. "type": {
  19929. "type": "string",
  19930. "enum": ["unknown"]
  19931. }
  19932. },
  19933. "required": ["type"],
  19934. "additionalProperties": false
  19935. },
  19936. {
  19937. "type": "object",
  19938. "properties": {
  19939. "type": {
  19940. "type": "string",
  19941. "enum": ["openai/responses"]
  19942. },
  19943. "url": {
  19944. "type": "string"
  19945. },
  19946. "websocket": {
  19947. "type": "boolean"
  19948. }
  19949. },
  19950. "required": ["type", "url"],
  19951. "additionalProperties": false
  19952. },
  19953. {
  19954. "type": "object",
  19955. "properties": {
  19956. "type": {
  19957. "type": "string",
  19958. "enum": ["openai/completions"]
  19959. },
  19960. "url": {
  19961. "type": "string"
  19962. },
  19963. "reasoning": {
  19964. "anyOf": [
  19965. {
  19966. "type": "object",
  19967. "properties": {
  19968. "type": {
  19969. "type": "string",
  19970. "enum": ["reasoning_content"]
  19971. }
  19972. },
  19973. "required": ["type"],
  19974. "additionalProperties": false
  19975. },
  19976. {
  19977. "type": "object",
  19978. "properties": {
  19979. "type": {
  19980. "type": "string",
  19981. "enum": ["reasoning_details"]
  19982. }
  19983. },
  19984. "required": ["type"],
  19985. "additionalProperties": false
  19986. }
  19987. ]
  19988. }
  19989. },
  19990. "required": ["type", "url"],
  19991. "additionalProperties": false
  19992. },
  19993. {
  19994. "type": "object",
  19995. "properties": {
  19996. "type": {
  19997. "type": "string",
  19998. "enum": ["anthropic/messages"]
  19999. },
  20000. "url": {
  20001. "type": "string"
  20002. }
  20003. },
  20004. "required": ["type", "url"],
  20005. "additionalProperties": false
  20006. },
  20007. {
  20008. "type": "object",
  20009. "properties": {
  20010. "type": {
  20011. "type": "string",
  20012. "enum": ["aisdk"]
  20013. },
  20014. "package": {
  20015. "type": "string"
  20016. },
  20017. "url": {
  20018. "type": "string"
  20019. }
  20020. },
  20021. "required": ["type", "package"],
  20022. "additionalProperties": false
  20023. }
  20024. ]
  20025. },
  20026. "capabilities": {
  20027. "type": "object",
  20028. "properties": {
  20029. "tools": {
  20030. "type": "boolean"
  20031. },
  20032. "input": {
  20033. "type": "array",
  20034. "items": {
  20035. "type": "string"
  20036. }
  20037. },
  20038. "output": {
  20039. "type": "array",
  20040. "items": {
  20041. "type": "string"
  20042. }
  20043. }
  20044. },
  20045. "required": ["tools", "input", "output"],
  20046. "additionalProperties": false
  20047. },
  20048. "options": {
  20049. "type": "object",
  20050. "properties": {
  20051. "headers": {
  20052. "type": "object",
  20053. "additionalProperties": {
  20054. "type": "string"
  20055. }
  20056. },
  20057. "body": {
  20058. "type": "object"
  20059. },
  20060. "aisdk": {
  20061. "type": "object",
  20062. "properties": {
  20063. "provider": {
  20064. "type": "object"
  20065. },
  20066. "request": {
  20067. "type": "object"
  20068. }
  20069. },
  20070. "required": ["provider", "request"],
  20071. "additionalProperties": false
  20072. },
  20073. "variant": {
  20074. "type": "string"
  20075. }
  20076. },
  20077. "required": ["headers", "body", "aisdk"],
  20078. "additionalProperties": false
  20079. },
  20080. "variants": {
  20081. "type": "array",
  20082. "items": {
  20083. "type": "object",
  20084. "properties": {
  20085. "id": {
  20086. "type": "string"
  20087. },
  20088. "headers": {
  20089. "type": "object",
  20090. "additionalProperties": {
  20091. "type": "string"
  20092. }
  20093. },
  20094. "body": {
  20095. "type": "object"
  20096. },
  20097. "aisdk": {
  20098. "type": "object",
  20099. "properties": {
  20100. "provider": {
  20101. "type": "object"
  20102. },
  20103. "request": {
  20104. "type": "object"
  20105. }
  20106. },
  20107. "required": ["provider", "request"],
  20108. "additionalProperties": false
  20109. }
  20110. },
  20111. "required": ["id", "headers", "body", "aisdk"],
  20112. "additionalProperties": false
  20113. }
  20114. },
  20115. "time": {
  20116. "type": "object",
  20117. "properties": {
  20118. "released": {
  20119. "anyOf": [
  20120. {
  20121. "type": "number"
  20122. },
  20123. {
  20124. "type": "string",
  20125. "enum": ["NaN"]
  20126. },
  20127. {
  20128. "type": "string",
  20129. "enum": ["Infinity"]
  20130. },
  20131. {
  20132. "type": "string",
  20133. "enum": ["-Infinity"]
  20134. }
  20135. ]
  20136. }
  20137. },
  20138. "required": ["released"],
  20139. "additionalProperties": false
  20140. },
  20141. "cost": {
  20142. "type": "array",
  20143. "items": {
  20144. "type": "object",
  20145. "properties": {
  20146. "tier": {
  20147. "type": "object",
  20148. "properties": {
  20149. "type": {
  20150. "type": "string",
  20151. "enum": ["context"]
  20152. },
  20153. "size": {
  20154. "type": "integer"
  20155. }
  20156. },
  20157. "required": ["type", "size"],
  20158. "additionalProperties": false
  20159. },
  20160. "input": {
  20161. "type": "number"
  20162. },
  20163. "output": {
  20164. "type": "number"
  20165. },
  20166. "cache": {
  20167. "type": "object",
  20168. "properties": {
  20169. "read": {
  20170. "type": "number"
  20171. },
  20172. "write": {
  20173. "type": "number"
  20174. }
  20175. },
  20176. "required": ["read", "write"],
  20177. "additionalProperties": false
  20178. }
  20179. },
  20180. "required": ["input", "output", "cache"],
  20181. "additionalProperties": false
  20182. }
  20183. },
  20184. "status": {
  20185. "type": "string",
  20186. "enum": ["alpha", "beta", "deprecated", "active"]
  20187. },
  20188. "enabled": {
  20189. "type": "boolean"
  20190. },
  20191. "limit": {
  20192. "type": "object",
  20193. "properties": {
  20194. "context": {
  20195. "type": "integer"
  20196. },
  20197. "input": {
  20198. "type": "integer"
  20199. },
  20200. "output": {
  20201. "type": "integer"
  20202. }
  20203. },
  20204. "required": ["context", "output"],
  20205. "additionalProperties": false
  20206. }
  20207. },
  20208. "required": [
  20209. "id",
  20210. "apiID",
  20211. "providerID",
  20212. "name",
  20213. "endpoint",
  20214. "capabilities",
  20215. "options",
  20216. "variants",
  20217. "time",
  20218. "cost",
  20219. "status",
  20220. "enabled",
  20221. "limit"
  20222. ],
  20223. "additionalProperties": false
  20224. },
  20225. "BadRequestError": {
  20226. "type": "object",
  20227. "required": ["name", "data"],
  20228. "properties": {
  20229. "name": {
  20230. "type": "string",
  20231. "enum": ["BadRequest"]
  20232. },
  20233. "data": {
  20234. "type": "object",
  20235. "required": ["message"],
  20236. "properties": {
  20237. "message": {
  20238. "type": "string"
  20239. },
  20240. "kind": {
  20241. "type": "string",
  20242. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  20243. }
  20244. }
  20245. }
  20246. }
  20247. }
  20248. }
  20249. },
  20250. "security": [],
  20251. "tags": [
  20252. {
  20253. "name": "control",
  20254. "description": "Control plane routes."
  20255. },
  20256. {
  20257. "name": "global",
  20258. "description": "Global server routes."
  20259. },
  20260. {
  20261. "name": "event",
  20262. "description": "Instance event stream route."
  20263. },
  20264. {
  20265. "name": "config",
  20266. "description": "Experimental HttpApi config routes."
  20267. },
  20268. {
  20269. "name": "experimental",
  20270. "description": "Experimental HttpApi read-only routes."
  20271. },
  20272. {
  20273. "name": "file",
  20274. "description": "Experimental HttpApi file routes."
  20275. },
  20276. {
  20277. "name": "instance",
  20278. "description": "Experimental HttpApi instance read routes."
  20279. },
  20280. {
  20281. "name": "mcp",
  20282. "description": "Experimental HttpApi MCP routes."
  20283. },
  20284. {
  20285. "name": "project",
  20286. "description": "Experimental HttpApi project routes."
  20287. },
  20288. {
  20289. "name": "pty",
  20290. "description": "Experimental HttpApi PTY routes."
  20291. },
  20292. {
  20293. "name": "question",
  20294. "description": "Question routes."
  20295. },
  20296. {
  20297. "name": "permission",
  20298. "description": "Experimental HttpApi permission routes."
  20299. },
  20300. {
  20301. "name": "provider",
  20302. "description": "Experimental HttpApi provider routes."
  20303. },
  20304. {
  20305. "name": "session",
  20306. "description": "Experimental HttpApi session routes."
  20307. },
  20308. {
  20309. "name": "sync",
  20310. "description": "Experimental HttpApi sync routes."
  20311. },
  20312. {
  20313. "name": "v2",
  20314. "description": "Experimental v2 routes."
  20315. },
  20316. {
  20317. "name": "v2 messages",
  20318. "description": "Experimental v2 message routes."
  20319. },
  20320. {
  20321. "name": "v2 models",
  20322. "description": "Experimental v2 model routes."
  20323. },
  20324. {
  20325. "name": "v2 providers",
  20326. "description": "Experimental v2 provider routes."
  20327. },
  20328. {
  20329. "name": "tui",
  20330. "description": "Experimental HttpApi TUI routes."
  20331. },
  20332. {
  20333. "name": "workspace",
  20334. "description": "Experimental HttpApi workspace routes."
  20335. },
  20336. {
  20337. "name": "pty",
  20338. "description": "PTY websocket route."
  20339. }
  20340. ]
  20341. }