openapi.json 612 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. },
  2292. {
  2293. "name": "context",
  2294. "in": "query",
  2295. "schema": {
  2296. "type": "integer",
  2297. "minimum": 0
  2298. },
  2299. "required": false
  2300. }
  2301. ],
  2302. "responses": {
  2303. "200": {
  2304. "description": "VCS diff",
  2305. "content": {
  2306. "application/json": {
  2307. "schema": {
  2308. "type": "array",
  2309. "items": {
  2310. "$ref": "#/components/schemas/VcsFileDiff"
  2311. },
  2312. "description": "VCS diff"
  2313. }
  2314. }
  2315. }
  2316. },
  2317. "400": {
  2318. "description": "Bad request",
  2319. "content": {
  2320. "application/json": {
  2321. "schema": {
  2322. "$ref": "#/components/schemas/BadRequestError"
  2323. }
  2324. }
  2325. }
  2326. }
  2327. },
  2328. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2329. "summary": "Get VCS diff",
  2330. "x-codeSamples": [
  2331. {
  2332. "lang": "js",
  2333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2334. }
  2335. ]
  2336. }
  2337. },
  2338. "/vcs/diff/raw": {
  2339. "get": {
  2340. "tags": ["instance"],
  2341. "operationId": "vcs.diff.raw",
  2342. "parameters": [
  2343. {
  2344. "name": "directory",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string"
  2348. },
  2349. "required": false
  2350. },
  2351. {
  2352. "name": "workspace",
  2353. "in": "query",
  2354. "schema": {
  2355. "type": "string"
  2356. },
  2357. "required": false
  2358. }
  2359. ],
  2360. "responses": {
  2361. "200": {
  2362. "description": "Raw VCS diff",
  2363. "content": {
  2364. "text/x-diff; charset=utf-8": {
  2365. "schema": {
  2366. "type": "string"
  2367. }
  2368. }
  2369. }
  2370. },
  2371. "400": {
  2372. "description": "Bad request",
  2373. "content": {
  2374. "application/json": {
  2375. "schema": {
  2376. "$ref": "#/components/schemas/BadRequestError"
  2377. }
  2378. }
  2379. }
  2380. }
  2381. },
  2382. "description": "Retrieve a raw patch for current uncommitted changes.",
  2383. "summary": "Get raw VCS diff",
  2384. "x-codeSamples": [
  2385. {
  2386. "lang": "js",
  2387. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2388. }
  2389. ]
  2390. }
  2391. },
  2392. "/vcs/apply": {
  2393. "post": {
  2394. "tags": ["instance"],
  2395. "operationId": "vcs.apply",
  2396. "parameters": [
  2397. {
  2398. "name": "directory",
  2399. "in": "query",
  2400. "schema": {
  2401. "type": "string"
  2402. },
  2403. "required": false
  2404. },
  2405. {
  2406. "name": "workspace",
  2407. "in": "query",
  2408. "schema": {
  2409. "type": "string"
  2410. },
  2411. "required": false
  2412. }
  2413. ],
  2414. "responses": {
  2415. "200": {
  2416. "description": "VCS patch applied",
  2417. "content": {
  2418. "application/json": {
  2419. "schema": {
  2420. "type": "object",
  2421. "properties": {
  2422. "applied": {
  2423. "type": "boolean"
  2424. }
  2425. },
  2426. "required": ["applied"],
  2427. "additionalProperties": false,
  2428. "description": "VCS patch applied"
  2429. }
  2430. }
  2431. }
  2432. },
  2433. "400": {
  2434. "description": "VcsApplyError | InvalidRequestError",
  2435. "content": {
  2436. "application/json": {
  2437. "schema": {
  2438. "anyOf": [
  2439. {
  2440. "$ref": "#/components/schemas/VcsApplyError"
  2441. },
  2442. {
  2443. "$ref": "#/components/schemas/InvalidRequestError"
  2444. }
  2445. ]
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Apply a raw patch to the current working tree.",
  2452. "summary": "Apply VCS patch",
  2453. "requestBody": {
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "properties": {
  2459. "patch": {
  2460. "type": "string"
  2461. }
  2462. },
  2463. "required": ["patch"],
  2464. "additionalProperties": false
  2465. }
  2466. }
  2467. }
  2468. },
  2469. "x-codeSamples": [
  2470. {
  2471. "lang": "js",
  2472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2473. }
  2474. ]
  2475. }
  2476. },
  2477. "/command": {
  2478. "get": {
  2479. "tags": ["instance"],
  2480. "operationId": "command.list",
  2481. "parameters": [
  2482. {
  2483. "name": "directory",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. },
  2490. {
  2491. "name": "workspace",
  2492. "in": "query",
  2493. "schema": {
  2494. "type": "string"
  2495. },
  2496. "required": false
  2497. }
  2498. ],
  2499. "responses": {
  2500. "200": {
  2501. "description": "List of commands",
  2502. "content": {
  2503. "application/json": {
  2504. "schema": {
  2505. "type": "array",
  2506. "items": {
  2507. "$ref": "#/components/schemas/Command"
  2508. },
  2509. "description": "List of commands"
  2510. }
  2511. }
  2512. }
  2513. },
  2514. "400": {
  2515. "description": "Bad request",
  2516. "content": {
  2517. "application/json": {
  2518. "schema": {
  2519. "$ref": "#/components/schemas/BadRequestError"
  2520. }
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "description": "Get a list of all available commands in the OpenCode system.",
  2526. "summary": "List commands",
  2527. "x-codeSamples": [
  2528. {
  2529. "lang": "js",
  2530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2531. }
  2532. ]
  2533. }
  2534. },
  2535. "/agent": {
  2536. "get": {
  2537. "tags": ["instance"],
  2538. "operationId": "app.agents",
  2539. "parameters": [
  2540. {
  2541. "name": "directory",
  2542. "in": "query",
  2543. "schema": {
  2544. "type": "string"
  2545. },
  2546. "required": false
  2547. },
  2548. {
  2549. "name": "workspace",
  2550. "in": "query",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": false
  2555. }
  2556. ],
  2557. "responses": {
  2558. "200": {
  2559. "description": "List of agents",
  2560. "content": {
  2561. "application/json": {
  2562. "schema": {
  2563. "type": "array",
  2564. "items": {
  2565. "$ref": "#/components/schemas/Agent"
  2566. },
  2567. "description": "List of agents"
  2568. }
  2569. }
  2570. }
  2571. },
  2572. "400": {
  2573. "description": "Bad request",
  2574. "content": {
  2575. "application/json": {
  2576. "schema": {
  2577. "$ref": "#/components/schemas/BadRequestError"
  2578. }
  2579. }
  2580. }
  2581. }
  2582. },
  2583. "description": "Get a list of all available AI agents in the OpenCode system.",
  2584. "summary": "List agents",
  2585. "x-codeSamples": [
  2586. {
  2587. "lang": "js",
  2588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2589. }
  2590. ]
  2591. }
  2592. },
  2593. "/skill": {
  2594. "get": {
  2595. "tags": ["instance"],
  2596. "operationId": "app.skills",
  2597. "parameters": [
  2598. {
  2599. "name": "directory",
  2600. "in": "query",
  2601. "schema": {
  2602. "type": "string"
  2603. },
  2604. "required": false
  2605. },
  2606. {
  2607. "name": "workspace",
  2608. "in": "query",
  2609. "schema": {
  2610. "type": "string"
  2611. },
  2612. "required": false
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "description": "List of skills",
  2618. "content": {
  2619. "application/json": {
  2620. "schema": {
  2621. "type": "array",
  2622. "items": {
  2623. "type": "object",
  2624. "properties": {
  2625. "name": {
  2626. "type": "string"
  2627. },
  2628. "description": {
  2629. "type": "string"
  2630. },
  2631. "location": {
  2632. "type": "string"
  2633. },
  2634. "content": {
  2635. "type": "string"
  2636. }
  2637. },
  2638. "required": ["name", "location", "content"],
  2639. "additionalProperties": false
  2640. },
  2641. "description": "List of skills"
  2642. }
  2643. }
  2644. }
  2645. },
  2646. "400": {
  2647. "description": "Bad request",
  2648. "content": {
  2649. "application/json": {
  2650. "schema": {
  2651. "$ref": "#/components/schemas/BadRequestError"
  2652. }
  2653. }
  2654. }
  2655. }
  2656. },
  2657. "description": "Get a list of all available skills in the OpenCode system.",
  2658. "summary": "List skills",
  2659. "x-codeSamples": [
  2660. {
  2661. "lang": "js",
  2662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2663. }
  2664. ]
  2665. }
  2666. },
  2667. "/lsp": {
  2668. "get": {
  2669. "tags": ["instance"],
  2670. "operationId": "lsp.status",
  2671. "parameters": [
  2672. {
  2673. "name": "directory",
  2674. "in": "query",
  2675. "schema": {
  2676. "type": "string"
  2677. },
  2678. "required": false
  2679. },
  2680. {
  2681. "name": "workspace",
  2682. "in": "query",
  2683. "schema": {
  2684. "type": "string"
  2685. },
  2686. "required": false
  2687. }
  2688. ],
  2689. "responses": {
  2690. "200": {
  2691. "description": "LSP server status",
  2692. "content": {
  2693. "application/json": {
  2694. "schema": {
  2695. "type": "array",
  2696. "items": {
  2697. "$ref": "#/components/schemas/LSPStatus"
  2698. },
  2699. "description": "LSP server status"
  2700. }
  2701. }
  2702. }
  2703. },
  2704. "400": {
  2705. "description": "Bad request",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "$ref": "#/components/schemas/BadRequestError"
  2710. }
  2711. }
  2712. }
  2713. }
  2714. },
  2715. "description": "Get LSP server status",
  2716. "summary": "Get LSP status",
  2717. "x-codeSamples": [
  2718. {
  2719. "lang": "js",
  2720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2721. }
  2722. ]
  2723. }
  2724. },
  2725. "/formatter": {
  2726. "get": {
  2727. "tags": ["instance"],
  2728. "operationId": "formatter.status",
  2729. "parameters": [
  2730. {
  2731. "name": "directory",
  2732. "in": "query",
  2733. "schema": {
  2734. "type": "string"
  2735. },
  2736. "required": false
  2737. },
  2738. {
  2739. "name": "workspace",
  2740. "in": "query",
  2741. "schema": {
  2742. "type": "string"
  2743. },
  2744. "required": false
  2745. }
  2746. ],
  2747. "responses": {
  2748. "200": {
  2749. "description": "Formatter status",
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "array",
  2754. "items": {
  2755. "$ref": "#/components/schemas/FormatterStatus"
  2756. },
  2757. "description": "Formatter status"
  2758. }
  2759. }
  2760. }
  2761. },
  2762. "400": {
  2763. "description": "Bad request",
  2764. "content": {
  2765. "application/json": {
  2766. "schema": {
  2767. "$ref": "#/components/schemas/BadRequestError"
  2768. }
  2769. }
  2770. }
  2771. }
  2772. },
  2773. "description": "Get formatter status",
  2774. "summary": "Get formatter status",
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp": {
  2784. "get": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.status",
  2787. "parameters": [
  2788. {
  2789. "name": "directory",
  2790. "in": "query",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": false
  2795. },
  2796. {
  2797. "name": "workspace",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. }
  2804. ],
  2805. "responses": {
  2806. "200": {
  2807. "description": "MCP server status",
  2808. "content": {
  2809. "application/json": {
  2810. "schema": {
  2811. "type": "object",
  2812. "additionalProperties": {
  2813. "$ref": "#/components/schemas/MCPStatus"
  2814. },
  2815. "description": "MCP server status"
  2816. }
  2817. }
  2818. }
  2819. },
  2820. "400": {
  2821. "description": "Bad request",
  2822. "content": {
  2823. "application/json": {
  2824. "schema": {
  2825. "$ref": "#/components/schemas/BadRequestError"
  2826. }
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2832. "summary": "Get MCP status",
  2833. "x-codeSamples": [
  2834. {
  2835. "lang": "js",
  2836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2837. }
  2838. ]
  2839. },
  2840. "post": {
  2841. "tags": ["mcp"],
  2842. "operationId": "mcp.add",
  2843. "parameters": [
  2844. {
  2845. "name": "directory",
  2846. "in": "query",
  2847. "schema": {
  2848. "type": "string"
  2849. },
  2850. "required": false
  2851. },
  2852. {
  2853. "name": "workspace",
  2854. "in": "query",
  2855. "schema": {
  2856. "type": "string"
  2857. },
  2858. "required": false
  2859. }
  2860. ],
  2861. "responses": {
  2862. "200": {
  2863. "description": "MCP server added successfully",
  2864. "content": {
  2865. "application/json": {
  2866. "schema": {
  2867. "type": "object",
  2868. "additionalProperties": {
  2869. "$ref": "#/components/schemas/MCPStatus"
  2870. },
  2871. "description": "MCP server added successfully"
  2872. }
  2873. }
  2874. }
  2875. },
  2876. "400": {
  2877. "description": "BadRequest | InvalidRequestError",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "anyOf": [
  2882. {
  2883. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2884. },
  2885. {
  2886. "$ref": "#/components/schemas/InvalidRequestError"
  2887. }
  2888. ]
  2889. }
  2890. }
  2891. }
  2892. }
  2893. },
  2894. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2895. "summary": "Add MCP server",
  2896. "requestBody": {
  2897. "content": {
  2898. "application/json": {
  2899. "schema": {
  2900. "type": "object",
  2901. "properties": {
  2902. "name": {
  2903. "type": "string"
  2904. },
  2905. "config": {
  2906. "anyOf": [
  2907. {
  2908. "$ref": "#/components/schemas/McpLocalConfig"
  2909. },
  2910. {
  2911. "$ref": "#/components/schemas/McpRemoteConfig"
  2912. }
  2913. ]
  2914. }
  2915. },
  2916. "required": ["name", "config"],
  2917. "additionalProperties": false
  2918. }
  2919. }
  2920. }
  2921. },
  2922. "x-codeSamples": [
  2923. {
  2924. "lang": "js",
  2925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2926. }
  2927. ]
  2928. }
  2929. },
  2930. "/mcp/{name}/auth": {
  2931. "post": {
  2932. "tags": ["mcp"],
  2933. "operationId": "mcp.auth.start",
  2934. "parameters": [
  2935. {
  2936. "name": "name",
  2937. "in": "path",
  2938. "schema": {
  2939. "type": "string"
  2940. },
  2941. "required": true
  2942. },
  2943. {
  2944. "name": "directory",
  2945. "in": "query",
  2946. "schema": {
  2947. "type": "string"
  2948. },
  2949. "required": false
  2950. },
  2951. {
  2952. "name": "workspace",
  2953. "in": "query",
  2954. "schema": {
  2955. "type": "string"
  2956. },
  2957. "required": false
  2958. }
  2959. ],
  2960. "responses": {
  2961. "200": {
  2962. "description": "OAuth flow started",
  2963. "content": {
  2964. "application/json": {
  2965. "schema": {
  2966. "type": "object",
  2967. "properties": {
  2968. "authorizationUrl": {
  2969. "type": "string"
  2970. },
  2971. "oauthState": {
  2972. "type": "string"
  2973. }
  2974. },
  2975. "required": ["authorizationUrl", "oauthState"],
  2976. "additionalProperties": false,
  2977. "description": "OAuth flow started"
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "400": {
  2983. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "anyOf": [
  2988. {
  2989. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2990. },
  2991. {
  2992. "$ref": "#/components/schemas/InvalidRequestError"
  2993. }
  2994. ]
  2995. }
  2996. }
  2997. }
  2998. },
  2999. "404": {
  3000. "description": "McpServerNotFoundError",
  3001. "content": {
  3002. "application/json": {
  3003. "schema": {
  3004. "$ref": "#/components/schemas/McpServerNotFoundError"
  3005. }
  3006. }
  3007. }
  3008. }
  3009. },
  3010. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3011. "summary": "Start MCP OAuth",
  3012. "x-codeSamples": [
  3013. {
  3014. "lang": "js",
  3015. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3016. }
  3017. ]
  3018. },
  3019. "delete": {
  3020. "tags": ["mcp"],
  3021. "operationId": "mcp.auth.remove",
  3022. "parameters": [
  3023. {
  3024. "name": "name",
  3025. "in": "path",
  3026. "schema": {
  3027. "type": "string"
  3028. },
  3029. "required": true
  3030. },
  3031. {
  3032. "name": "directory",
  3033. "in": "query",
  3034. "schema": {
  3035. "type": "string"
  3036. },
  3037. "required": false
  3038. },
  3039. {
  3040. "name": "workspace",
  3041. "in": "query",
  3042. "schema": {
  3043. "type": "string"
  3044. },
  3045. "required": false
  3046. }
  3047. ],
  3048. "responses": {
  3049. "200": {
  3050. "description": "OAuth credentials removed",
  3051. "content": {
  3052. "application/json": {
  3053. "schema": {
  3054. "type": "object",
  3055. "properties": {
  3056. "success": {
  3057. "type": "boolean",
  3058. "enum": [true]
  3059. }
  3060. },
  3061. "required": ["success"],
  3062. "additionalProperties": false,
  3063. "description": "OAuth credentials removed"
  3064. }
  3065. }
  3066. }
  3067. },
  3068. "400": {
  3069. "description": "Bad request",
  3070. "content": {
  3071. "application/json": {
  3072. "schema": {
  3073. "$ref": "#/components/schemas/BadRequestError"
  3074. }
  3075. }
  3076. }
  3077. },
  3078. "404": {
  3079. "description": "McpServerNotFoundError",
  3080. "content": {
  3081. "application/json": {
  3082. "schema": {
  3083. "$ref": "#/components/schemas/McpServerNotFoundError"
  3084. }
  3085. }
  3086. }
  3087. }
  3088. },
  3089. "description": "Remove OAuth credentials for an MCP server.",
  3090. "summary": "Remove MCP OAuth",
  3091. "x-codeSamples": [
  3092. {
  3093. "lang": "js",
  3094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3095. }
  3096. ]
  3097. }
  3098. },
  3099. "/mcp/{name}/auth/callback": {
  3100. "post": {
  3101. "tags": ["mcp"],
  3102. "operationId": "mcp.auth.callback",
  3103. "parameters": [
  3104. {
  3105. "name": "name",
  3106. "in": "path",
  3107. "schema": {
  3108. "type": "string"
  3109. },
  3110. "required": true
  3111. },
  3112. {
  3113. "name": "directory",
  3114. "in": "query",
  3115. "schema": {
  3116. "type": "string"
  3117. },
  3118. "required": false
  3119. },
  3120. {
  3121. "name": "workspace",
  3122. "in": "query",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": false
  3127. }
  3128. ],
  3129. "responses": {
  3130. "200": {
  3131. "description": "OAuth authentication completed",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/MCPStatus"
  3136. }
  3137. }
  3138. }
  3139. },
  3140. "400": {
  3141. "description": "BadRequest | InvalidRequestError",
  3142. "content": {
  3143. "application/json": {
  3144. "schema": {
  3145. "anyOf": [
  3146. {
  3147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3148. },
  3149. {
  3150. "$ref": "#/components/schemas/InvalidRequestError"
  3151. }
  3152. ]
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "404": {
  3158. "description": "McpServerNotFoundError",
  3159. "content": {
  3160. "application/json": {
  3161. "schema": {
  3162. "$ref": "#/components/schemas/McpServerNotFoundError"
  3163. }
  3164. }
  3165. }
  3166. }
  3167. },
  3168. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3169. "summary": "Complete MCP OAuth",
  3170. "requestBody": {
  3171. "content": {
  3172. "application/json": {
  3173. "schema": {
  3174. "type": "object",
  3175. "properties": {
  3176. "code": {
  3177. "type": "string"
  3178. }
  3179. },
  3180. "required": ["code"],
  3181. "additionalProperties": false
  3182. }
  3183. }
  3184. }
  3185. },
  3186. "x-codeSamples": [
  3187. {
  3188. "lang": "js",
  3189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3190. }
  3191. ]
  3192. }
  3193. },
  3194. "/mcp/{name}/auth/authenticate": {
  3195. "post": {
  3196. "tags": ["mcp"],
  3197. "operationId": "mcp.auth.authenticate",
  3198. "parameters": [
  3199. {
  3200. "name": "name",
  3201. "in": "path",
  3202. "schema": {
  3203. "type": "string"
  3204. },
  3205. "required": true
  3206. },
  3207. {
  3208. "name": "directory",
  3209. "in": "query",
  3210. "schema": {
  3211. "type": "string"
  3212. },
  3213. "required": false
  3214. },
  3215. {
  3216. "name": "workspace",
  3217. "in": "query",
  3218. "schema": {
  3219. "type": "string"
  3220. },
  3221. "required": false
  3222. }
  3223. ],
  3224. "responses": {
  3225. "200": {
  3226. "description": "OAuth authentication completed",
  3227. "content": {
  3228. "application/json": {
  3229. "schema": {
  3230. "$ref": "#/components/schemas/MCPStatus"
  3231. }
  3232. }
  3233. }
  3234. },
  3235. "400": {
  3236. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3237. "content": {
  3238. "application/json": {
  3239. "schema": {
  3240. "anyOf": [
  3241. {
  3242. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3243. },
  3244. {
  3245. "$ref": "#/components/schemas/InvalidRequestError"
  3246. }
  3247. ]
  3248. }
  3249. }
  3250. }
  3251. },
  3252. "404": {
  3253. "description": "McpServerNotFoundError",
  3254. "content": {
  3255. "application/json": {
  3256. "schema": {
  3257. "$ref": "#/components/schemas/McpServerNotFoundError"
  3258. }
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "description": "Start OAuth flow and wait for callback (opens browser).",
  3264. "summary": "Authenticate MCP OAuth",
  3265. "x-codeSamples": [
  3266. {
  3267. "lang": "js",
  3268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3269. }
  3270. ]
  3271. }
  3272. },
  3273. "/mcp/{name}/connect": {
  3274. "post": {
  3275. "tags": ["mcp"],
  3276. "operationId": "mcp.connect",
  3277. "parameters": [
  3278. {
  3279. "name": "name",
  3280. "in": "path",
  3281. "schema": {
  3282. "type": "string"
  3283. },
  3284. "required": true
  3285. },
  3286. {
  3287. "name": "directory",
  3288. "in": "query",
  3289. "schema": {
  3290. "type": "string"
  3291. },
  3292. "required": false
  3293. },
  3294. {
  3295. "name": "workspace",
  3296. "in": "query",
  3297. "schema": {
  3298. "type": "string"
  3299. },
  3300. "required": false
  3301. }
  3302. ],
  3303. "responses": {
  3304. "200": {
  3305. "description": "MCP server connected successfully",
  3306. "content": {
  3307. "application/json": {
  3308. "schema": {
  3309. "type": "boolean",
  3310. "description": "MCP server connected successfully"
  3311. }
  3312. }
  3313. }
  3314. },
  3315. "400": {
  3316. "description": "Bad request",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/BadRequestError"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "404": {
  3326. "description": "McpServerNotFoundError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "$ref": "#/components/schemas/McpServerNotFoundError"
  3331. }
  3332. }
  3333. }
  3334. }
  3335. },
  3336. "description": "Connect an MCP server.",
  3337. "x-codeSamples": [
  3338. {
  3339. "lang": "js",
  3340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3341. }
  3342. ]
  3343. }
  3344. },
  3345. "/mcp/{name}/disconnect": {
  3346. "post": {
  3347. "tags": ["mcp"],
  3348. "operationId": "mcp.disconnect",
  3349. "parameters": [
  3350. {
  3351. "name": "name",
  3352. "in": "path",
  3353. "schema": {
  3354. "type": "string"
  3355. },
  3356. "required": true
  3357. },
  3358. {
  3359. "name": "directory",
  3360. "in": "query",
  3361. "schema": {
  3362. "type": "string"
  3363. },
  3364. "required": false
  3365. },
  3366. {
  3367. "name": "workspace",
  3368. "in": "query",
  3369. "schema": {
  3370. "type": "string"
  3371. },
  3372. "required": false
  3373. }
  3374. ],
  3375. "responses": {
  3376. "200": {
  3377. "description": "MCP server disconnected successfully",
  3378. "content": {
  3379. "application/json": {
  3380. "schema": {
  3381. "type": "boolean",
  3382. "description": "MCP server disconnected successfully"
  3383. }
  3384. }
  3385. }
  3386. },
  3387. "400": {
  3388. "description": "Bad request",
  3389. "content": {
  3390. "application/json": {
  3391. "schema": {
  3392. "$ref": "#/components/schemas/BadRequestError"
  3393. }
  3394. }
  3395. }
  3396. },
  3397. "404": {
  3398. "description": "McpServerNotFoundError",
  3399. "content": {
  3400. "application/json": {
  3401. "schema": {
  3402. "$ref": "#/components/schemas/McpServerNotFoundError"
  3403. }
  3404. }
  3405. }
  3406. }
  3407. },
  3408. "description": "Disconnect an MCP server.",
  3409. "x-codeSamples": [
  3410. {
  3411. "lang": "js",
  3412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3413. }
  3414. ]
  3415. }
  3416. },
  3417. "/project": {
  3418. "get": {
  3419. "tags": ["project"],
  3420. "operationId": "project.list",
  3421. "parameters": [
  3422. {
  3423. "name": "directory",
  3424. "in": "query",
  3425. "schema": {
  3426. "type": "string"
  3427. },
  3428. "required": false
  3429. },
  3430. {
  3431. "name": "workspace",
  3432. "in": "query",
  3433. "schema": {
  3434. "type": "string"
  3435. },
  3436. "required": false
  3437. }
  3438. ],
  3439. "responses": {
  3440. "200": {
  3441. "description": "List of projects",
  3442. "content": {
  3443. "application/json": {
  3444. "schema": {
  3445. "type": "array",
  3446. "items": {
  3447. "$ref": "#/components/schemas/Project"
  3448. },
  3449. "description": "List of projects"
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "400": {
  3455. "description": "Bad request",
  3456. "content": {
  3457. "application/json": {
  3458. "schema": {
  3459. "$ref": "#/components/schemas/BadRequestError"
  3460. }
  3461. }
  3462. }
  3463. }
  3464. },
  3465. "description": "Get a list of projects that have been opened with OpenCode.",
  3466. "summary": "List all projects",
  3467. "x-codeSamples": [
  3468. {
  3469. "lang": "js",
  3470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3471. }
  3472. ]
  3473. }
  3474. },
  3475. "/project/current": {
  3476. "get": {
  3477. "tags": ["project"],
  3478. "operationId": "project.current",
  3479. "parameters": [
  3480. {
  3481. "name": "directory",
  3482. "in": "query",
  3483. "schema": {
  3484. "type": "string"
  3485. },
  3486. "required": false
  3487. },
  3488. {
  3489. "name": "workspace",
  3490. "in": "query",
  3491. "schema": {
  3492. "type": "string"
  3493. },
  3494. "required": false
  3495. }
  3496. ],
  3497. "responses": {
  3498. "200": {
  3499. "description": "Current project information",
  3500. "content": {
  3501. "application/json": {
  3502. "schema": {
  3503. "$ref": "#/components/schemas/Project"
  3504. }
  3505. }
  3506. }
  3507. },
  3508. "400": {
  3509. "description": "Bad request",
  3510. "content": {
  3511. "application/json": {
  3512. "schema": {
  3513. "$ref": "#/components/schemas/BadRequestError"
  3514. }
  3515. }
  3516. }
  3517. }
  3518. },
  3519. "description": "Retrieve the currently active project that OpenCode is working with.",
  3520. "summary": "Get current project",
  3521. "x-codeSamples": [
  3522. {
  3523. "lang": "js",
  3524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3525. }
  3526. ]
  3527. }
  3528. },
  3529. "/project/git/init": {
  3530. "post": {
  3531. "tags": ["project"],
  3532. "operationId": "project.initGit",
  3533. "parameters": [
  3534. {
  3535. "name": "directory",
  3536. "in": "query",
  3537. "schema": {
  3538. "type": "string"
  3539. },
  3540. "required": false
  3541. },
  3542. {
  3543. "name": "workspace",
  3544. "in": "query",
  3545. "schema": {
  3546. "type": "string"
  3547. },
  3548. "required": false
  3549. }
  3550. ],
  3551. "responses": {
  3552. "200": {
  3553. "description": "Project information after git initialization",
  3554. "content": {
  3555. "application/json": {
  3556. "schema": {
  3557. "$ref": "#/components/schemas/Project"
  3558. }
  3559. }
  3560. }
  3561. },
  3562. "400": {
  3563. "description": "Bad request",
  3564. "content": {
  3565. "application/json": {
  3566. "schema": {
  3567. "$ref": "#/components/schemas/BadRequestError"
  3568. }
  3569. }
  3570. }
  3571. }
  3572. },
  3573. "description": "Create a git repository for the current project and return the refreshed project info.",
  3574. "summary": "Initialize git repository",
  3575. "x-codeSamples": [
  3576. {
  3577. "lang": "js",
  3578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3579. }
  3580. ]
  3581. }
  3582. },
  3583. "/project/{projectID}": {
  3584. "patch": {
  3585. "tags": ["project"],
  3586. "operationId": "project.update",
  3587. "parameters": [
  3588. {
  3589. "name": "projectID",
  3590. "in": "path",
  3591. "schema": {
  3592. "type": "string"
  3593. },
  3594. "required": true
  3595. },
  3596. {
  3597. "name": "directory",
  3598. "in": "query",
  3599. "schema": {
  3600. "type": "string"
  3601. },
  3602. "required": false
  3603. },
  3604. {
  3605. "name": "workspace",
  3606. "in": "query",
  3607. "schema": {
  3608. "type": "string"
  3609. },
  3610. "required": false
  3611. }
  3612. ],
  3613. "responses": {
  3614. "200": {
  3615. "description": "Updated project information",
  3616. "content": {
  3617. "application/json": {
  3618. "schema": {
  3619. "$ref": "#/components/schemas/Project"
  3620. }
  3621. }
  3622. }
  3623. },
  3624. "400": {
  3625. "description": "BadRequest | InvalidRequestError",
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "anyOf": [
  3630. {
  3631. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3632. },
  3633. {
  3634. "$ref": "#/components/schemas/InvalidRequestError"
  3635. }
  3636. ]
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "404": {
  3642. "description": "ProjectNotFoundError",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/ProjectNotFoundError"
  3647. }
  3648. }
  3649. }
  3650. }
  3651. },
  3652. "description": "Update project properties such as name, icon, and commands.",
  3653. "summary": "Update project",
  3654. "requestBody": {
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "type": "object",
  3659. "properties": {
  3660. "name": {
  3661. "type": "string"
  3662. },
  3663. "icon": {
  3664. "type": "object",
  3665. "properties": {
  3666. "url": {
  3667. "type": "string"
  3668. },
  3669. "override": {
  3670. "type": "string"
  3671. },
  3672. "color": {
  3673. "type": "string"
  3674. }
  3675. },
  3676. "additionalProperties": false
  3677. },
  3678. "commands": {
  3679. "type": "object",
  3680. "properties": {
  3681. "start": {
  3682. "type": "string",
  3683. "description": "Startup script to run when creating a new workspace (worktree)"
  3684. }
  3685. },
  3686. "additionalProperties": false
  3687. }
  3688. },
  3689. "additionalProperties": false
  3690. }
  3691. }
  3692. }
  3693. },
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/pty/shells": {
  3703. "get": {
  3704. "tags": ["pty"],
  3705. "operationId": "pty.shells",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of shells",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "type": "object",
  3733. "properties": {
  3734. "path": {
  3735. "type": "string"
  3736. },
  3737. "name": {
  3738. "type": "string"
  3739. },
  3740. "acceptable": {
  3741. "type": "boolean"
  3742. }
  3743. },
  3744. "required": ["path", "name", "acceptable"],
  3745. "additionalProperties": false
  3746. },
  3747. "description": "List of shells"
  3748. }
  3749. }
  3750. }
  3751. },
  3752. "400": {
  3753. "description": "Bad request",
  3754. "content": {
  3755. "application/json": {
  3756. "schema": {
  3757. "$ref": "#/components/schemas/BadRequestError"
  3758. }
  3759. }
  3760. }
  3761. }
  3762. },
  3763. "description": "Get a list of available shells on the system.",
  3764. "summary": "List available shells",
  3765. "x-codeSamples": [
  3766. {
  3767. "lang": "js",
  3768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3769. }
  3770. ]
  3771. }
  3772. },
  3773. "/pty": {
  3774. "get": {
  3775. "tags": ["pty"],
  3776. "operationId": "pty.list",
  3777. "parameters": [
  3778. {
  3779. "name": "directory",
  3780. "in": "query",
  3781. "schema": {
  3782. "type": "string"
  3783. },
  3784. "required": false
  3785. },
  3786. {
  3787. "name": "workspace",
  3788. "in": "query",
  3789. "schema": {
  3790. "type": "string"
  3791. },
  3792. "required": false
  3793. }
  3794. ],
  3795. "responses": {
  3796. "200": {
  3797. "description": "List of sessions",
  3798. "content": {
  3799. "application/json": {
  3800. "schema": {
  3801. "type": "array",
  3802. "items": {
  3803. "$ref": "#/components/schemas/Pty"
  3804. },
  3805. "description": "List of sessions"
  3806. }
  3807. }
  3808. }
  3809. },
  3810. "400": {
  3811. "description": "Bad request",
  3812. "content": {
  3813. "application/json": {
  3814. "schema": {
  3815. "$ref": "#/components/schemas/BadRequestError"
  3816. }
  3817. }
  3818. }
  3819. }
  3820. },
  3821. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3822. "summary": "List PTY sessions",
  3823. "x-codeSamples": [
  3824. {
  3825. "lang": "js",
  3826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3827. }
  3828. ]
  3829. },
  3830. "post": {
  3831. "tags": ["pty"],
  3832. "operationId": "pty.create",
  3833. "parameters": [
  3834. {
  3835. "name": "directory",
  3836. "in": "query",
  3837. "schema": {
  3838. "type": "string"
  3839. },
  3840. "required": false
  3841. },
  3842. {
  3843. "name": "workspace",
  3844. "in": "query",
  3845. "schema": {
  3846. "type": "string"
  3847. },
  3848. "required": false
  3849. }
  3850. ],
  3851. "responses": {
  3852. "200": {
  3853. "description": "Created session",
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "$ref": "#/components/schemas/Pty"
  3858. }
  3859. }
  3860. }
  3861. },
  3862. "400": {
  3863. "description": "BadRequest | InvalidRequestError",
  3864. "content": {
  3865. "application/json": {
  3866. "schema": {
  3867. "anyOf": [
  3868. {
  3869. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3870. },
  3871. {
  3872. "$ref": "#/components/schemas/InvalidRequestError"
  3873. }
  3874. ]
  3875. }
  3876. }
  3877. }
  3878. }
  3879. },
  3880. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3881. "summary": "Create PTY session",
  3882. "requestBody": {
  3883. "content": {
  3884. "application/json": {
  3885. "schema": {
  3886. "type": "object",
  3887. "properties": {
  3888. "command": {
  3889. "type": "string"
  3890. },
  3891. "args": {
  3892. "type": "array",
  3893. "items": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "cwd": {
  3898. "type": "string"
  3899. },
  3900. "title": {
  3901. "type": "string"
  3902. },
  3903. "env": {
  3904. "type": "object",
  3905. "additionalProperties": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. },
  3910. "additionalProperties": false
  3911. }
  3912. }
  3913. }
  3914. },
  3915. "x-codeSamples": [
  3916. {
  3917. "lang": "js",
  3918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3919. }
  3920. ]
  3921. }
  3922. },
  3923. "/pty/{ptyID}": {
  3924. "get": {
  3925. "tags": ["pty"],
  3926. "operationId": "pty.get",
  3927. "parameters": [
  3928. {
  3929. "name": "ptyID",
  3930. "in": "path",
  3931. "schema": {
  3932. "type": "string",
  3933. "pattern": "^pty"
  3934. },
  3935. "required": true
  3936. },
  3937. {
  3938. "name": "directory",
  3939. "in": "query",
  3940. "schema": {
  3941. "type": "string"
  3942. },
  3943. "required": false
  3944. },
  3945. {
  3946. "name": "workspace",
  3947. "in": "query",
  3948. "schema": {
  3949. "type": "string"
  3950. },
  3951. "required": false
  3952. }
  3953. ],
  3954. "responses": {
  3955. "200": {
  3956. "description": "Session info",
  3957. "content": {
  3958. "application/json": {
  3959. "schema": {
  3960. "$ref": "#/components/schemas/Pty"
  3961. }
  3962. }
  3963. }
  3964. },
  3965. "400": {
  3966. "description": "Bad request",
  3967. "content": {
  3968. "application/json": {
  3969. "schema": {
  3970. "$ref": "#/components/schemas/BadRequestError"
  3971. }
  3972. }
  3973. }
  3974. },
  3975. "404": {
  3976. "description": "PtyNotFoundError",
  3977. "content": {
  3978. "application/json": {
  3979. "schema": {
  3980. "$ref": "#/components/schemas/PtyNotFoundError"
  3981. }
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3987. "summary": "Get PTY session",
  3988. "x-codeSamples": [
  3989. {
  3990. "lang": "js",
  3991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3992. }
  3993. ]
  3994. },
  3995. "put": {
  3996. "tags": ["pty"],
  3997. "operationId": "pty.update",
  3998. "parameters": [
  3999. {
  4000. "name": "ptyID",
  4001. "in": "path",
  4002. "schema": {
  4003. "type": "string",
  4004. "pattern": "^pty"
  4005. },
  4006. "required": true
  4007. },
  4008. {
  4009. "name": "directory",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. },
  4016. {
  4017. "name": "workspace",
  4018. "in": "query",
  4019. "schema": {
  4020. "type": "string"
  4021. },
  4022. "required": false
  4023. }
  4024. ],
  4025. "responses": {
  4026. "200": {
  4027. "description": "Updated session",
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "$ref": "#/components/schemas/Pty"
  4032. }
  4033. }
  4034. }
  4035. },
  4036. "400": {
  4037. "description": "BadRequest | InvalidRequestError",
  4038. "content": {
  4039. "application/json": {
  4040. "schema": {
  4041. "anyOf": [
  4042. {
  4043. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4044. },
  4045. {
  4046. "$ref": "#/components/schemas/InvalidRequestError"
  4047. }
  4048. ]
  4049. }
  4050. }
  4051. }
  4052. },
  4053. "404": {
  4054. "description": "PtyNotFoundError",
  4055. "content": {
  4056. "application/json": {
  4057. "schema": {
  4058. "$ref": "#/components/schemas/PtyNotFoundError"
  4059. }
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4065. "summary": "Update PTY session",
  4066. "requestBody": {
  4067. "content": {
  4068. "application/json": {
  4069. "schema": {
  4070. "type": "object",
  4071. "properties": {
  4072. "title": {
  4073. "type": "string"
  4074. },
  4075. "size": {
  4076. "type": "object",
  4077. "properties": {
  4078. "rows": {
  4079. "type": "integer",
  4080. "exclusiveMinimum": 0
  4081. },
  4082. "cols": {
  4083. "type": "integer",
  4084. "exclusiveMinimum": 0
  4085. }
  4086. },
  4087. "required": ["rows", "cols"],
  4088. "additionalProperties": false
  4089. }
  4090. },
  4091. "additionalProperties": false
  4092. }
  4093. }
  4094. }
  4095. },
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4100. }
  4101. ]
  4102. },
  4103. "delete": {
  4104. "tags": ["pty"],
  4105. "operationId": "pty.remove",
  4106. "parameters": [
  4107. {
  4108. "name": "ptyID",
  4109. "in": "path",
  4110. "schema": {
  4111. "type": "string",
  4112. "pattern": "^pty"
  4113. },
  4114. "required": true
  4115. },
  4116. {
  4117. "name": "directory",
  4118. "in": "query",
  4119. "schema": {
  4120. "type": "string"
  4121. },
  4122. "required": false
  4123. },
  4124. {
  4125. "name": "workspace",
  4126. "in": "query",
  4127. "schema": {
  4128. "type": "string"
  4129. },
  4130. "required": false
  4131. }
  4132. ],
  4133. "responses": {
  4134. "200": {
  4135. "description": "Session removed",
  4136. "content": {
  4137. "application/json": {
  4138. "schema": {
  4139. "type": "boolean",
  4140. "description": "Session removed"
  4141. }
  4142. }
  4143. }
  4144. },
  4145. "400": {
  4146. "description": "Bad request",
  4147. "content": {
  4148. "application/json": {
  4149. "schema": {
  4150. "$ref": "#/components/schemas/BadRequestError"
  4151. }
  4152. }
  4153. }
  4154. },
  4155. "404": {
  4156. "description": "PtyNotFoundError",
  4157. "content": {
  4158. "application/json": {
  4159. "schema": {
  4160. "$ref": "#/components/schemas/PtyNotFoundError"
  4161. }
  4162. }
  4163. }
  4164. }
  4165. },
  4166. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4167. "summary": "Remove PTY session",
  4168. "x-codeSamples": [
  4169. {
  4170. "lang": "js",
  4171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4172. }
  4173. ]
  4174. }
  4175. },
  4176. "/pty/{ptyID}/connect-token": {
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.connectToken",
  4180. "parameters": [
  4181. {
  4182. "name": "ptyID",
  4183. "in": "path",
  4184. "schema": {
  4185. "type": "string",
  4186. "pattern": "^pty"
  4187. },
  4188. "required": true
  4189. },
  4190. {
  4191. "name": "directory",
  4192. "in": "query",
  4193. "schema": {
  4194. "type": "string"
  4195. },
  4196. "required": false
  4197. },
  4198. {
  4199. "name": "workspace",
  4200. "in": "query",
  4201. "schema": {
  4202. "type": "string"
  4203. },
  4204. "required": false
  4205. }
  4206. ],
  4207. "responses": {
  4208. "200": {
  4209. "description": "WebSocket connect token",
  4210. "content": {
  4211. "application/json": {
  4212. "schema": {
  4213. "type": "object",
  4214. "properties": {
  4215. "ticket": {
  4216. "type": "string"
  4217. },
  4218. "expires_in": {
  4219. "type": "integer",
  4220. "exclusiveMinimum": 0
  4221. }
  4222. },
  4223. "required": ["ticket", "expires_in"],
  4224. "additionalProperties": false,
  4225. "description": "WebSocket connect token"
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "400": {
  4231. "description": "Bad request",
  4232. "content": {
  4233. "application/json": {
  4234. "schema": {
  4235. "$ref": "#/components/schemas/BadRequestError"
  4236. }
  4237. }
  4238. }
  4239. },
  4240. "403": {
  4241. "description": "PtyForbiddenError",
  4242. "content": {
  4243. "application/json": {
  4244. "schema": {
  4245. "$ref": "#/components/schemas/PtyForbiddenError"
  4246. }
  4247. }
  4248. }
  4249. },
  4250. "404": {
  4251. "description": "PtyNotFoundError",
  4252. "content": {
  4253. "application/json": {
  4254. "schema": {
  4255. "$ref": "#/components/schemas/PtyNotFoundError"
  4256. }
  4257. }
  4258. }
  4259. }
  4260. },
  4261. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4262. "summary": "Create PTY WebSocket token",
  4263. "x-codeSamples": [
  4264. {
  4265. "lang": "js",
  4266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4267. }
  4268. ]
  4269. }
  4270. },
  4271. "/question": {
  4272. "get": {
  4273. "tags": ["question"],
  4274. "operationId": "question.list",
  4275. "parameters": [
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "List of pending questions",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "array",
  4300. "items": {
  4301. "$ref": "#/components/schemas/QuestionRequest"
  4302. },
  4303. "description": "List of pending questions"
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "400": {
  4309. "description": "Bad request",
  4310. "content": {
  4311. "application/json": {
  4312. "schema": {
  4313. "$ref": "#/components/schemas/BadRequestError"
  4314. }
  4315. }
  4316. }
  4317. }
  4318. },
  4319. "description": "Get all pending question requests across all sessions.",
  4320. "summary": "List pending questions",
  4321. "x-codeSamples": [
  4322. {
  4323. "lang": "js",
  4324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4325. }
  4326. ]
  4327. }
  4328. },
  4329. "/question/{requestID}/reply": {
  4330. "post": {
  4331. "tags": ["question"],
  4332. "operationId": "question.reply",
  4333. "parameters": [
  4334. {
  4335. "name": "requestID",
  4336. "in": "path",
  4337. "schema": {
  4338. "type": "string",
  4339. "pattern": "^que"
  4340. },
  4341. "required": true
  4342. },
  4343. {
  4344. "name": "directory",
  4345. "in": "query",
  4346. "schema": {
  4347. "type": "string"
  4348. },
  4349. "required": false
  4350. },
  4351. {
  4352. "name": "workspace",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. }
  4359. ],
  4360. "responses": {
  4361. "200": {
  4362. "description": "Question answered successfully",
  4363. "content": {
  4364. "application/json": {
  4365. "schema": {
  4366. "type": "boolean",
  4367. "description": "Question answered successfully"
  4368. }
  4369. }
  4370. }
  4371. },
  4372. "400": {
  4373. "description": "BadRequest | InvalidRequestError",
  4374. "content": {
  4375. "application/json": {
  4376. "schema": {
  4377. "anyOf": [
  4378. {
  4379. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4380. },
  4381. {
  4382. "$ref": "#/components/schemas/InvalidRequestError"
  4383. }
  4384. ]
  4385. }
  4386. }
  4387. }
  4388. },
  4389. "404": {
  4390. "description": "QuestionNotFoundError",
  4391. "content": {
  4392. "application/json": {
  4393. "schema": {
  4394. "$ref": "#/components/schemas/QuestionNotFoundError"
  4395. }
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "description": "Provide answers to a question request from the AI assistant.",
  4401. "summary": "Reply to question request",
  4402. "requestBody": {
  4403. "content": {
  4404. "application/json": {
  4405. "schema": {
  4406. "type": "object",
  4407. "properties": {
  4408. "answers": {
  4409. "type": "array",
  4410. "items": {
  4411. "$ref": "#/components/schemas/QuestionAnswer"
  4412. },
  4413. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4414. }
  4415. },
  4416. "required": ["answers"],
  4417. "additionalProperties": false
  4418. }
  4419. }
  4420. }
  4421. },
  4422. "x-codeSamples": [
  4423. {
  4424. "lang": "js",
  4425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4426. }
  4427. ]
  4428. }
  4429. },
  4430. "/question/{requestID}/reject": {
  4431. "post": {
  4432. "tags": ["question"],
  4433. "operationId": "question.reject",
  4434. "parameters": [
  4435. {
  4436. "name": "requestID",
  4437. "in": "path",
  4438. "schema": {
  4439. "type": "string",
  4440. "pattern": "^que"
  4441. },
  4442. "required": true
  4443. },
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Question rejected successfully",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "type": "boolean",
  4468. "description": "Question rejected successfully"
  4469. }
  4470. }
  4471. }
  4472. },
  4473. "400": {
  4474. "description": "BadRequest | InvalidRequestError",
  4475. "content": {
  4476. "application/json": {
  4477. "schema": {
  4478. "anyOf": [
  4479. {
  4480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4481. },
  4482. {
  4483. "$ref": "#/components/schemas/InvalidRequestError"
  4484. }
  4485. ]
  4486. }
  4487. }
  4488. }
  4489. },
  4490. "404": {
  4491. "description": "QuestionNotFoundError",
  4492. "content": {
  4493. "application/json": {
  4494. "schema": {
  4495. "$ref": "#/components/schemas/QuestionNotFoundError"
  4496. }
  4497. }
  4498. }
  4499. }
  4500. },
  4501. "description": "Reject a question request from the AI assistant.",
  4502. "summary": "Reject question request",
  4503. "x-codeSamples": [
  4504. {
  4505. "lang": "js",
  4506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4507. }
  4508. ]
  4509. }
  4510. },
  4511. "/permission": {
  4512. "get": {
  4513. "tags": ["permission"],
  4514. "operationId": "permission.list",
  4515. "parameters": [
  4516. {
  4517. "name": "directory",
  4518. "in": "query",
  4519. "schema": {
  4520. "type": "string"
  4521. },
  4522. "required": false
  4523. },
  4524. {
  4525. "name": "workspace",
  4526. "in": "query",
  4527. "schema": {
  4528. "type": "string"
  4529. },
  4530. "required": false
  4531. }
  4532. ],
  4533. "responses": {
  4534. "200": {
  4535. "description": "List of pending permissions",
  4536. "content": {
  4537. "application/json": {
  4538. "schema": {
  4539. "type": "array",
  4540. "items": {
  4541. "$ref": "#/components/schemas/PermissionRequest"
  4542. },
  4543. "description": "List of pending permissions"
  4544. }
  4545. }
  4546. }
  4547. },
  4548. "400": {
  4549. "description": "Bad request",
  4550. "content": {
  4551. "application/json": {
  4552. "schema": {
  4553. "$ref": "#/components/schemas/BadRequestError"
  4554. }
  4555. }
  4556. }
  4557. }
  4558. },
  4559. "description": "Get all pending permission requests across all sessions.",
  4560. "summary": "List pending permissions",
  4561. "x-codeSamples": [
  4562. {
  4563. "lang": "js",
  4564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4565. }
  4566. ]
  4567. }
  4568. },
  4569. "/permission/{requestID}/reply": {
  4570. "post": {
  4571. "tags": ["permission"],
  4572. "operationId": "permission.reply",
  4573. "parameters": [
  4574. {
  4575. "name": "requestID",
  4576. "in": "path",
  4577. "schema": {
  4578. "type": "string",
  4579. "pattern": "^per"
  4580. },
  4581. "required": true
  4582. },
  4583. {
  4584. "name": "directory",
  4585. "in": "query",
  4586. "schema": {
  4587. "type": "string"
  4588. },
  4589. "required": false
  4590. },
  4591. {
  4592. "name": "workspace",
  4593. "in": "query",
  4594. "schema": {
  4595. "type": "string"
  4596. },
  4597. "required": false
  4598. }
  4599. ],
  4600. "responses": {
  4601. "200": {
  4602. "description": "Permission processed successfully",
  4603. "content": {
  4604. "application/json": {
  4605. "schema": {
  4606. "type": "boolean",
  4607. "description": "Permission processed successfully"
  4608. }
  4609. }
  4610. }
  4611. },
  4612. "400": {
  4613. "description": "BadRequest | InvalidRequestError",
  4614. "content": {
  4615. "application/json": {
  4616. "schema": {
  4617. "anyOf": [
  4618. {
  4619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4620. },
  4621. {
  4622. "$ref": "#/components/schemas/InvalidRequestError"
  4623. }
  4624. ]
  4625. }
  4626. }
  4627. }
  4628. },
  4629. "404": {
  4630. "description": "PermissionNotFoundError",
  4631. "content": {
  4632. "application/json": {
  4633. "schema": {
  4634. "$ref": "#/components/schemas/PermissionNotFoundError"
  4635. }
  4636. }
  4637. }
  4638. }
  4639. },
  4640. "description": "Approve or deny a permission request from the AI assistant.",
  4641. "summary": "Respond to permission request",
  4642. "requestBody": {
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "object",
  4647. "properties": {
  4648. "reply": {
  4649. "type": "string",
  4650. "enum": ["once", "always", "reject"]
  4651. },
  4652. "message": {
  4653. "type": "string"
  4654. }
  4655. },
  4656. "required": ["reply"],
  4657. "additionalProperties": false
  4658. }
  4659. }
  4660. }
  4661. },
  4662. "x-codeSamples": [
  4663. {
  4664. "lang": "js",
  4665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4666. }
  4667. ]
  4668. }
  4669. },
  4670. "/provider": {
  4671. "get": {
  4672. "tags": ["provider"],
  4673. "operationId": "provider.list",
  4674. "parameters": [
  4675. {
  4676. "name": "directory",
  4677. "in": "query",
  4678. "schema": {
  4679. "type": "string"
  4680. },
  4681. "required": false
  4682. },
  4683. {
  4684. "name": "workspace",
  4685. "in": "query",
  4686. "schema": {
  4687. "type": "string"
  4688. },
  4689. "required": false
  4690. }
  4691. ],
  4692. "responses": {
  4693. "200": {
  4694. "description": "List of providers",
  4695. "content": {
  4696. "application/json": {
  4697. "schema": {
  4698. "type": "object",
  4699. "properties": {
  4700. "all": {
  4701. "type": "array",
  4702. "items": {
  4703. "$ref": "#/components/schemas/Provider"
  4704. }
  4705. },
  4706. "default": {
  4707. "type": "object",
  4708. "additionalProperties": {
  4709. "type": "string"
  4710. }
  4711. },
  4712. "connected": {
  4713. "type": "array",
  4714. "items": {
  4715. "type": "string"
  4716. }
  4717. }
  4718. },
  4719. "required": ["all", "default", "connected"],
  4720. "additionalProperties": false,
  4721. "description": "List of providers"
  4722. }
  4723. }
  4724. }
  4725. },
  4726. "400": {
  4727. "description": "Bad request",
  4728. "content": {
  4729. "application/json": {
  4730. "schema": {
  4731. "$ref": "#/components/schemas/BadRequestError"
  4732. }
  4733. }
  4734. }
  4735. }
  4736. },
  4737. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4738. "summary": "List providers",
  4739. "x-codeSamples": [
  4740. {
  4741. "lang": "js",
  4742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4743. }
  4744. ]
  4745. }
  4746. },
  4747. "/provider/auth": {
  4748. "get": {
  4749. "tags": ["provider"],
  4750. "operationId": "provider.auth",
  4751. "parameters": [
  4752. {
  4753. "name": "directory",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. },
  4760. {
  4761. "name": "workspace",
  4762. "in": "query",
  4763. "schema": {
  4764. "type": "string"
  4765. },
  4766. "required": false
  4767. }
  4768. ],
  4769. "responses": {
  4770. "200": {
  4771. "description": "Provider auth methods",
  4772. "content": {
  4773. "application/json": {
  4774. "schema": {
  4775. "type": "object",
  4776. "additionalProperties": {
  4777. "type": "array",
  4778. "items": {
  4779. "$ref": "#/components/schemas/ProviderAuthMethod"
  4780. }
  4781. },
  4782. "description": "Provider auth methods"
  4783. }
  4784. }
  4785. }
  4786. },
  4787. "400": {
  4788. "description": "Bad request",
  4789. "content": {
  4790. "application/json": {
  4791. "schema": {
  4792. "$ref": "#/components/schemas/BadRequestError"
  4793. }
  4794. }
  4795. }
  4796. }
  4797. },
  4798. "description": "Retrieve available authentication methods for all AI providers.",
  4799. "summary": "Get provider auth methods",
  4800. "x-codeSamples": [
  4801. {
  4802. "lang": "js",
  4803. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4804. }
  4805. ]
  4806. }
  4807. },
  4808. "/provider/{providerID}/oauth/authorize": {
  4809. "post": {
  4810. "tags": ["provider"],
  4811. "operationId": "provider.oauth.authorize",
  4812. "parameters": [
  4813. {
  4814. "name": "providerID",
  4815. "in": "path",
  4816. "schema": {
  4817. "type": "string"
  4818. },
  4819. "required": true
  4820. },
  4821. {
  4822. "name": "directory",
  4823. "in": "query",
  4824. "schema": {
  4825. "type": "string"
  4826. },
  4827. "required": false
  4828. },
  4829. {
  4830. "name": "workspace",
  4831. "in": "query",
  4832. "schema": {
  4833. "type": "string"
  4834. },
  4835. "required": false
  4836. }
  4837. ],
  4838. "responses": {
  4839. "200": {
  4840. "description": "Authorization URL and method",
  4841. "content": {
  4842. "application/json": {
  4843. "schema": {
  4844. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4845. }
  4846. }
  4847. }
  4848. },
  4849. "400": {
  4850. "description": "ProviderAuthError | InvalidRequestError",
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "anyOf": [
  4855. {
  4856. "$ref": "#/components/schemas/ProviderAuthError1"
  4857. },
  4858. {
  4859. "$ref": "#/components/schemas/InvalidRequestError"
  4860. }
  4861. ]
  4862. }
  4863. }
  4864. }
  4865. }
  4866. },
  4867. "description": "Start the OAuth authorization flow for a provider.",
  4868. "summary": "Start OAuth authorization",
  4869. "requestBody": {
  4870. "content": {
  4871. "application/json": {
  4872. "schema": {
  4873. "type": "object",
  4874. "properties": {
  4875. "method": {
  4876. "type": "number",
  4877. "description": "Auth method index"
  4878. },
  4879. "inputs": {
  4880. "type": "object",
  4881. "additionalProperties": {
  4882. "type": "string"
  4883. }
  4884. }
  4885. },
  4886. "required": ["method"],
  4887. "additionalProperties": false
  4888. }
  4889. }
  4890. }
  4891. },
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/provider/{providerID}/oauth/callback": {
  4901. "post": {
  4902. "tags": ["provider"],
  4903. "operationId": "provider.oauth.callback",
  4904. "parameters": [
  4905. {
  4906. "name": "providerID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string"
  4910. },
  4911. "required": true
  4912. },
  4913. {
  4914. "name": "directory",
  4915. "in": "query",
  4916. "schema": {
  4917. "type": "string"
  4918. },
  4919. "required": false
  4920. },
  4921. {
  4922. "name": "workspace",
  4923. "in": "query",
  4924. "schema": {
  4925. "type": "string"
  4926. },
  4927. "required": false
  4928. }
  4929. ],
  4930. "responses": {
  4931. "200": {
  4932. "description": "OAuth callback processed successfully",
  4933. "content": {
  4934. "application/json": {
  4935. "schema": {
  4936. "type": "boolean",
  4937. "description": "OAuth callback processed successfully"
  4938. }
  4939. }
  4940. }
  4941. },
  4942. "400": {
  4943. "description": "ProviderAuthError | InvalidRequestError",
  4944. "content": {
  4945. "application/json": {
  4946. "schema": {
  4947. "anyOf": [
  4948. {
  4949. "$ref": "#/components/schemas/ProviderAuthError1"
  4950. },
  4951. {
  4952. "$ref": "#/components/schemas/InvalidRequestError"
  4953. }
  4954. ]
  4955. }
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "description": "Handle the OAuth callback from a provider after user authorization.",
  4961. "summary": "Handle OAuth callback",
  4962. "requestBody": {
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "type": "object",
  4967. "properties": {
  4968. "method": {
  4969. "type": "number",
  4970. "description": "Auth method index"
  4971. },
  4972. "code": {
  4973. "type": "string"
  4974. }
  4975. },
  4976. "required": ["method"],
  4977. "additionalProperties": false
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "x-codeSamples": [
  4983. {
  4984. "lang": "js",
  4985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4986. }
  4987. ]
  4988. }
  4989. },
  4990. "/session": {
  4991. "get": {
  4992. "tags": ["session"],
  4993. "operationId": "session.list",
  4994. "parameters": [
  4995. {
  4996. "name": "directory",
  4997. "in": "query",
  4998. "schema": {
  4999. "type": "string"
  5000. },
  5001. "required": false
  5002. },
  5003. {
  5004. "name": "workspace",
  5005. "in": "query",
  5006. "schema": {
  5007. "type": "string"
  5008. },
  5009. "required": false
  5010. },
  5011. {
  5012. "name": "scope",
  5013. "in": "query",
  5014. "schema": {
  5015. "type": "string",
  5016. "enum": ["project"]
  5017. },
  5018. "required": false
  5019. },
  5020. {
  5021. "name": "path",
  5022. "in": "query",
  5023. "schema": {
  5024. "type": "string"
  5025. },
  5026. "required": false
  5027. },
  5028. {
  5029. "name": "roots",
  5030. "in": "query",
  5031. "schema": {
  5032. "anyOf": [
  5033. {
  5034. "type": "boolean"
  5035. },
  5036. {
  5037. "type": "string",
  5038. "enum": ["true", "false"]
  5039. }
  5040. ]
  5041. },
  5042. "required": false
  5043. },
  5044. {
  5045. "name": "start",
  5046. "in": "query",
  5047. "schema": {
  5048. "type": "number"
  5049. },
  5050. "required": false
  5051. },
  5052. {
  5053. "name": "search",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "limit",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "number"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "List of sessions",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "array",
  5076. "items": {
  5077. "$ref": "#/components/schemas/Session"
  5078. },
  5079. "description": "List of sessions"
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "400": {
  5085. "description": "Bad request",
  5086. "content": {
  5087. "application/json": {
  5088. "schema": {
  5089. "$ref": "#/components/schemas/BadRequestError"
  5090. }
  5091. }
  5092. }
  5093. }
  5094. },
  5095. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5096. "summary": "List sessions",
  5097. "x-codeSamples": [
  5098. {
  5099. "lang": "js",
  5100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5101. }
  5102. ]
  5103. },
  5104. "post": {
  5105. "tags": ["session"],
  5106. "operationId": "session.create",
  5107. "parameters": [
  5108. {
  5109. "name": "directory",
  5110. "in": "query",
  5111. "schema": {
  5112. "type": "string"
  5113. },
  5114. "required": false
  5115. },
  5116. {
  5117. "name": "workspace",
  5118. "in": "query",
  5119. "schema": {
  5120. "type": "string"
  5121. },
  5122. "required": false
  5123. }
  5124. ],
  5125. "responses": {
  5126. "200": {
  5127. "description": "Successfully created session",
  5128. "content": {
  5129. "application/json": {
  5130. "schema": {
  5131. "$ref": "#/components/schemas/Session"
  5132. }
  5133. }
  5134. }
  5135. },
  5136. "400": {
  5137. "description": "BadRequest | InvalidRequestError",
  5138. "content": {
  5139. "application/json": {
  5140. "schema": {
  5141. "anyOf": [
  5142. {
  5143. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5144. },
  5145. {
  5146. "$ref": "#/components/schemas/InvalidRequestError"
  5147. }
  5148. ]
  5149. }
  5150. }
  5151. }
  5152. }
  5153. },
  5154. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5155. "summary": "Create session",
  5156. "requestBody": {
  5157. "content": {
  5158. "application/json": {
  5159. "schema": {
  5160. "type": "object",
  5161. "properties": {
  5162. "parentID": {
  5163. "type": "string",
  5164. "pattern": "^ses"
  5165. },
  5166. "title": {
  5167. "type": "string"
  5168. },
  5169. "agent": {
  5170. "type": "string"
  5171. },
  5172. "model": {
  5173. "type": "object",
  5174. "properties": {
  5175. "id": {
  5176. "type": "string"
  5177. },
  5178. "providerID": {
  5179. "type": "string"
  5180. },
  5181. "variant": {
  5182. "type": "string"
  5183. }
  5184. },
  5185. "required": ["id", "providerID"],
  5186. "additionalProperties": false
  5187. },
  5188. "metadata": {
  5189. "type": "object"
  5190. },
  5191. "permission": {
  5192. "$ref": "#/components/schemas/PermissionRuleset"
  5193. },
  5194. "workspaceID": {
  5195. "type": "string",
  5196. "pattern": "^wrk"
  5197. }
  5198. },
  5199. "additionalProperties": false
  5200. }
  5201. }
  5202. }
  5203. },
  5204. "x-codeSamples": [
  5205. {
  5206. "lang": "js",
  5207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5208. }
  5209. ]
  5210. }
  5211. },
  5212. "/session/status": {
  5213. "get": {
  5214. "tags": ["session"],
  5215. "operationId": "session.status",
  5216. "parameters": [
  5217. {
  5218. "name": "directory",
  5219. "in": "query",
  5220. "schema": {
  5221. "type": "string"
  5222. },
  5223. "required": false
  5224. },
  5225. {
  5226. "name": "workspace",
  5227. "in": "query",
  5228. "schema": {
  5229. "type": "string"
  5230. },
  5231. "required": false
  5232. }
  5233. ],
  5234. "responses": {
  5235. "200": {
  5236. "description": "Get session status",
  5237. "content": {
  5238. "application/json": {
  5239. "schema": {
  5240. "type": "object",
  5241. "additionalProperties": {
  5242. "$ref": "#/components/schemas/SessionStatus"
  5243. },
  5244. "description": "Get session status"
  5245. }
  5246. }
  5247. }
  5248. },
  5249. "400": {
  5250. "description": "BadRequest | InvalidRequestError",
  5251. "content": {
  5252. "application/json": {
  5253. "schema": {
  5254. "anyOf": [
  5255. {
  5256. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5257. },
  5258. {
  5259. "$ref": "#/components/schemas/InvalidRequestError"
  5260. }
  5261. ]
  5262. }
  5263. }
  5264. }
  5265. }
  5266. },
  5267. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5268. "summary": "Get session status",
  5269. "x-codeSamples": [
  5270. {
  5271. "lang": "js",
  5272. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5273. }
  5274. ]
  5275. }
  5276. },
  5277. "/session/{sessionID}": {
  5278. "get": {
  5279. "tags": ["session"],
  5280. "operationId": "session.get",
  5281. "parameters": [
  5282. {
  5283. "name": "sessionID",
  5284. "in": "path",
  5285. "schema": {
  5286. "type": "string",
  5287. "pattern": "^ses"
  5288. },
  5289. "required": true
  5290. },
  5291. {
  5292. "name": "directory",
  5293. "in": "query",
  5294. "schema": {
  5295. "type": "string"
  5296. },
  5297. "required": false
  5298. },
  5299. {
  5300. "name": "workspace",
  5301. "in": "query",
  5302. "schema": {
  5303. "type": "string"
  5304. },
  5305. "required": false
  5306. }
  5307. ],
  5308. "responses": {
  5309. "200": {
  5310. "description": "Get session",
  5311. "content": {
  5312. "application/json": {
  5313. "schema": {
  5314. "$ref": "#/components/schemas/Session"
  5315. }
  5316. }
  5317. }
  5318. },
  5319. "400": {
  5320. "description": "BadRequest | InvalidRequestError",
  5321. "content": {
  5322. "application/json": {
  5323. "schema": {
  5324. "anyOf": [
  5325. {
  5326. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5327. },
  5328. {
  5329. "$ref": "#/components/schemas/InvalidRequestError"
  5330. }
  5331. ]
  5332. }
  5333. }
  5334. }
  5335. },
  5336. "404": {
  5337. "description": "NotFoundError",
  5338. "content": {
  5339. "application/json": {
  5340. "schema": {
  5341. "$ref": "#/components/schemas/NotFoundError"
  5342. }
  5343. }
  5344. }
  5345. }
  5346. },
  5347. "description": "Retrieve detailed information about a specific OpenCode session.",
  5348. "summary": "Get session",
  5349. "x-codeSamples": [
  5350. {
  5351. "lang": "js",
  5352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5353. }
  5354. ]
  5355. },
  5356. "delete": {
  5357. "tags": ["session"],
  5358. "operationId": "session.delete",
  5359. "parameters": [
  5360. {
  5361. "name": "sessionID",
  5362. "in": "path",
  5363. "schema": {
  5364. "type": "string",
  5365. "pattern": "^ses"
  5366. },
  5367. "required": true
  5368. },
  5369. {
  5370. "name": "directory",
  5371. "in": "query",
  5372. "schema": {
  5373. "type": "string"
  5374. },
  5375. "required": false
  5376. },
  5377. {
  5378. "name": "workspace",
  5379. "in": "query",
  5380. "schema": {
  5381. "type": "string"
  5382. },
  5383. "required": false
  5384. }
  5385. ],
  5386. "responses": {
  5387. "200": {
  5388. "description": "Successfully deleted session",
  5389. "content": {
  5390. "application/json": {
  5391. "schema": {
  5392. "type": "boolean",
  5393. "description": "Successfully deleted session"
  5394. }
  5395. }
  5396. }
  5397. },
  5398. "400": {
  5399. "description": "BadRequest | InvalidRequestError",
  5400. "content": {
  5401. "application/json": {
  5402. "schema": {
  5403. "anyOf": [
  5404. {
  5405. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5406. },
  5407. {
  5408. "$ref": "#/components/schemas/InvalidRequestError"
  5409. }
  5410. ]
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "404": {
  5416. "description": "NotFoundError",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/NotFoundError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5427. "summary": "Delete session",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "patch": {
  5436. "tags": ["session"],
  5437. "operationId": "session.update",
  5438. "parameters": [
  5439. {
  5440. "name": "sessionID",
  5441. "in": "path",
  5442. "schema": {
  5443. "type": "string",
  5444. "pattern": "^ses"
  5445. },
  5446. "required": true
  5447. },
  5448. {
  5449. "name": "directory",
  5450. "in": "query",
  5451. "schema": {
  5452. "type": "string"
  5453. },
  5454. "required": false
  5455. },
  5456. {
  5457. "name": "workspace",
  5458. "in": "query",
  5459. "schema": {
  5460. "type": "string"
  5461. },
  5462. "required": false
  5463. }
  5464. ],
  5465. "responses": {
  5466. "200": {
  5467. "description": "Successfully updated session",
  5468. "content": {
  5469. "application/json": {
  5470. "schema": {
  5471. "$ref": "#/components/schemas/Session"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "BadRequest | InvalidRequestError",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "anyOf": [
  5482. {
  5483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5484. },
  5485. {
  5486. "$ref": "#/components/schemas/InvalidRequestError"
  5487. }
  5488. ]
  5489. }
  5490. }
  5491. }
  5492. },
  5493. "404": {
  5494. "description": "NotFoundError",
  5495. "content": {
  5496. "application/json": {
  5497. "schema": {
  5498. "$ref": "#/components/schemas/NotFoundError"
  5499. }
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "description": "Update properties of an existing session, such as title or other metadata.",
  5505. "summary": "Update session",
  5506. "requestBody": {
  5507. "content": {
  5508. "application/json": {
  5509. "schema": {
  5510. "type": "object",
  5511. "properties": {
  5512. "title": {
  5513. "type": "string"
  5514. },
  5515. "metadata": {
  5516. "type": "object"
  5517. },
  5518. "permission": {
  5519. "$ref": "#/components/schemas/PermissionRuleset"
  5520. },
  5521. "time": {
  5522. "type": "object",
  5523. "properties": {
  5524. "archived": {
  5525. "type": "number"
  5526. }
  5527. },
  5528. "additionalProperties": false
  5529. }
  5530. },
  5531. "additionalProperties": false
  5532. }
  5533. }
  5534. }
  5535. },
  5536. "x-codeSamples": [
  5537. {
  5538. "lang": "js",
  5539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5540. }
  5541. ]
  5542. }
  5543. },
  5544. "/session/{sessionID}/children": {
  5545. "get": {
  5546. "tags": ["session"],
  5547. "operationId": "session.children",
  5548. "parameters": [
  5549. {
  5550. "name": "sessionID",
  5551. "in": "path",
  5552. "schema": {
  5553. "type": "string",
  5554. "pattern": "^ses"
  5555. },
  5556. "required": true
  5557. },
  5558. {
  5559. "name": "directory",
  5560. "in": "query",
  5561. "schema": {
  5562. "type": "string"
  5563. },
  5564. "required": false
  5565. },
  5566. {
  5567. "name": "workspace",
  5568. "in": "query",
  5569. "schema": {
  5570. "type": "string"
  5571. },
  5572. "required": false
  5573. }
  5574. ],
  5575. "responses": {
  5576. "200": {
  5577. "description": "List of children",
  5578. "content": {
  5579. "application/json": {
  5580. "schema": {
  5581. "type": "array",
  5582. "items": {
  5583. "$ref": "#/components/schemas/Session"
  5584. },
  5585. "description": "List of children"
  5586. }
  5587. }
  5588. }
  5589. },
  5590. "400": {
  5591. "description": "BadRequest | InvalidRequestError",
  5592. "content": {
  5593. "application/json": {
  5594. "schema": {
  5595. "anyOf": [
  5596. {
  5597. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5598. },
  5599. {
  5600. "$ref": "#/components/schemas/InvalidRequestError"
  5601. }
  5602. ]
  5603. }
  5604. }
  5605. }
  5606. },
  5607. "404": {
  5608. "description": "NotFoundError",
  5609. "content": {
  5610. "application/json": {
  5611. "schema": {
  5612. "$ref": "#/components/schemas/NotFoundError"
  5613. }
  5614. }
  5615. }
  5616. }
  5617. },
  5618. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5619. "summary": "Get session children",
  5620. "x-codeSamples": [
  5621. {
  5622. "lang": "js",
  5623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5624. }
  5625. ]
  5626. }
  5627. },
  5628. "/session/{sessionID}/todo": {
  5629. "get": {
  5630. "tags": ["session"],
  5631. "operationId": "session.todo",
  5632. "parameters": [
  5633. {
  5634. "name": "sessionID",
  5635. "in": "path",
  5636. "schema": {
  5637. "type": "string",
  5638. "pattern": "^ses"
  5639. },
  5640. "required": true
  5641. },
  5642. {
  5643. "name": "directory",
  5644. "in": "query",
  5645. "schema": {
  5646. "type": "string"
  5647. },
  5648. "required": false
  5649. },
  5650. {
  5651. "name": "workspace",
  5652. "in": "query",
  5653. "schema": {
  5654. "type": "string"
  5655. },
  5656. "required": false
  5657. }
  5658. ],
  5659. "responses": {
  5660. "200": {
  5661. "description": "Todo list",
  5662. "content": {
  5663. "application/json": {
  5664. "schema": {
  5665. "type": "array",
  5666. "items": {
  5667. "$ref": "#/components/schemas/Todo"
  5668. },
  5669. "description": "Todo list"
  5670. }
  5671. }
  5672. }
  5673. },
  5674. "400": {
  5675. "description": "BadRequest | InvalidRequestError",
  5676. "content": {
  5677. "application/json": {
  5678. "schema": {
  5679. "anyOf": [
  5680. {
  5681. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5682. },
  5683. {
  5684. "$ref": "#/components/schemas/InvalidRequestError"
  5685. }
  5686. ]
  5687. }
  5688. }
  5689. }
  5690. },
  5691. "404": {
  5692. "description": "NotFoundError",
  5693. "content": {
  5694. "application/json": {
  5695. "schema": {
  5696. "$ref": "#/components/schemas/NotFoundError"
  5697. }
  5698. }
  5699. }
  5700. }
  5701. },
  5702. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5703. "summary": "Get session todos",
  5704. "x-codeSamples": [
  5705. {
  5706. "lang": "js",
  5707. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5708. }
  5709. ]
  5710. }
  5711. },
  5712. "/session/{sessionID}/diff": {
  5713. "get": {
  5714. "tags": ["session"],
  5715. "operationId": "session.diff",
  5716. "parameters": [
  5717. {
  5718. "name": "sessionID",
  5719. "in": "path",
  5720. "schema": {
  5721. "type": "string",
  5722. "pattern": "^ses"
  5723. },
  5724. "required": true
  5725. },
  5726. {
  5727. "name": "directory",
  5728. "in": "query",
  5729. "schema": {
  5730. "type": "string"
  5731. },
  5732. "required": false
  5733. },
  5734. {
  5735. "name": "workspace",
  5736. "in": "query",
  5737. "schema": {
  5738. "type": "string"
  5739. },
  5740. "required": false
  5741. },
  5742. {
  5743. "name": "messageID",
  5744. "in": "query",
  5745. "schema": {
  5746. "type": "string",
  5747. "pattern": "^msg"
  5748. },
  5749. "required": false
  5750. }
  5751. ],
  5752. "responses": {
  5753. "200": {
  5754. "description": "Successfully retrieved diff",
  5755. "content": {
  5756. "application/json": {
  5757. "schema": {
  5758. "type": "array",
  5759. "items": {
  5760. "$ref": "#/components/schemas/SnapshotFileDiff"
  5761. },
  5762. "description": "Successfully retrieved diff"
  5763. }
  5764. }
  5765. }
  5766. },
  5767. "400": {
  5768. "description": "Bad request",
  5769. "content": {
  5770. "application/json": {
  5771. "schema": {
  5772. "$ref": "#/components/schemas/BadRequestError"
  5773. }
  5774. }
  5775. }
  5776. }
  5777. },
  5778. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5779. "summary": "Get message diff",
  5780. "x-codeSamples": [
  5781. {
  5782. "lang": "js",
  5783. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5784. }
  5785. ]
  5786. }
  5787. },
  5788. "/session/{sessionID}/message": {
  5789. "get": {
  5790. "tags": ["session"],
  5791. "operationId": "session.messages",
  5792. "parameters": [
  5793. {
  5794. "name": "sessionID",
  5795. "in": "path",
  5796. "schema": {
  5797. "type": "string",
  5798. "pattern": "^ses"
  5799. },
  5800. "required": true
  5801. },
  5802. {
  5803. "name": "directory",
  5804. "in": "query",
  5805. "schema": {
  5806. "type": "string"
  5807. },
  5808. "required": false
  5809. },
  5810. {
  5811. "name": "workspace",
  5812. "in": "query",
  5813. "schema": {
  5814. "type": "string"
  5815. },
  5816. "required": false
  5817. },
  5818. {
  5819. "name": "limit",
  5820. "in": "query",
  5821. "schema": {
  5822. "type": "integer",
  5823. "minimum": 0,
  5824. "maximum": 9007199254740991
  5825. },
  5826. "required": false
  5827. },
  5828. {
  5829. "name": "before",
  5830. "in": "query",
  5831. "schema": {
  5832. "type": "string"
  5833. },
  5834. "required": false
  5835. }
  5836. ],
  5837. "responses": {
  5838. "200": {
  5839. "description": "List of messages",
  5840. "content": {
  5841. "application/json": {
  5842. "schema": {
  5843. "type": "array",
  5844. "items": {
  5845. "type": "object",
  5846. "properties": {
  5847. "info": {
  5848. "$ref": "#/components/schemas/Message"
  5849. },
  5850. "parts": {
  5851. "type": "array",
  5852. "items": {
  5853. "$ref": "#/components/schemas/Part"
  5854. }
  5855. }
  5856. },
  5857. "required": ["info", "parts"],
  5858. "additionalProperties": false
  5859. },
  5860. "description": "List of messages"
  5861. }
  5862. }
  5863. }
  5864. },
  5865. "400": {
  5866. "description": "BadRequest | InvalidRequestError",
  5867. "content": {
  5868. "application/json": {
  5869. "schema": {
  5870. "anyOf": [
  5871. {
  5872. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5873. },
  5874. {
  5875. "$ref": "#/components/schemas/InvalidRequestError"
  5876. }
  5877. ]
  5878. }
  5879. }
  5880. }
  5881. },
  5882. "404": {
  5883. "description": "NotFoundError",
  5884. "content": {
  5885. "application/json": {
  5886. "schema": {
  5887. "$ref": "#/components/schemas/NotFoundError"
  5888. }
  5889. }
  5890. }
  5891. }
  5892. },
  5893. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5894. "summary": "Get session messages",
  5895. "x-codeSamples": [
  5896. {
  5897. "lang": "js",
  5898. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5899. }
  5900. ]
  5901. },
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.prompt",
  5905. "parameters": [
  5906. {
  5907. "name": "sessionID",
  5908. "in": "path",
  5909. "schema": {
  5910. "type": "string",
  5911. "pattern": "^ses"
  5912. },
  5913. "required": true
  5914. },
  5915. {
  5916. "name": "directory",
  5917. "in": "query",
  5918. "schema": {
  5919. "type": "string"
  5920. },
  5921. "required": false
  5922. },
  5923. {
  5924. "name": "workspace",
  5925. "in": "query",
  5926. "schema": {
  5927. "type": "string"
  5928. },
  5929. "required": false
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "description": "Created message",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "object",
  5939. "required": ["info", "parts"],
  5940. "properties": {
  5941. "info": {
  5942. "$ref": "#/components/schemas/AssistantMessage"
  5943. },
  5944. "parts": {
  5945. "type": "array",
  5946. "items": {
  5947. "$ref": "#/components/schemas/Part"
  5948. }
  5949. }
  5950. }
  5951. }
  5952. }
  5953. }
  5954. },
  5955. "400": {
  5956. "description": "BadRequest | InvalidRequestError",
  5957. "content": {
  5958. "application/json": {
  5959. "schema": {
  5960. "anyOf": [
  5961. {
  5962. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5963. },
  5964. {
  5965. "$ref": "#/components/schemas/InvalidRequestError"
  5966. }
  5967. ]
  5968. }
  5969. }
  5970. }
  5971. },
  5972. "404": {
  5973. "description": "NotFoundError",
  5974. "content": {
  5975. "application/json": {
  5976. "schema": {
  5977. "$ref": "#/components/schemas/NotFoundError"
  5978. }
  5979. }
  5980. }
  5981. }
  5982. },
  5983. "description": "Create and send a new message to a session, streaming the AI response.",
  5984. "summary": "Send message",
  5985. "requestBody": {
  5986. "content": {
  5987. "application/json": {
  5988. "schema": {
  5989. "type": "object",
  5990. "properties": {
  5991. "messageID": {
  5992. "type": "string",
  5993. "pattern": "^msg"
  5994. },
  5995. "model": {
  5996. "type": "object",
  5997. "properties": {
  5998. "providerID": {
  5999. "type": "string"
  6000. },
  6001. "modelID": {
  6002. "type": "string"
  6003. }
  6004. },
  6005. "required": ["providerID", "modelID"],
  6006. "additionalProperties": false
  6007. },
  6008. "agent": {
  6009. "type": "string"
  6010. },
  6011. "noReply": {
  6012. "type": "boolean"
  6013. },
  6014. "tools": {
  6015. "type": "object",
  6016. "additionalProperties": {
  6017. "type": "boolean"
  6018. }
  6019. },
  6020. "format": {
  6021. "$ref": "#/components/schemas/OutputFormat"
  6022. },
  6023. "system": {
  6024. "type": "string"
  6025. },
  6026. "variant": {
  6027. "type": "string"
  6028. },
  6029. "parts": {
  6030. "type": "array",
  6031. "items": {
  6032. "anyOf": [
  6033. {
  6034. "$ref": "#/components/schemas/TextPartInput"
  6035. },
  6036. {
  6037. "$ref": "#/components/schemas/FilePartInput"
  6038. },
  6039. {
  6040. "$ref": "#/components/schemas/AgentPartInput"
  6041. },
  6042. {
  6043. "$ref": "#/components/schemas/SubtaskPartInput"
  6044. }
  6045. ]
  6046. }
  6047. }
  6048. },
  6049. "required": ["parts"],
  6050. "additionalProperties": false
  6051. }
  6052. }
  6053. }
  6054. },
  6055. "x-codeSamples": [
  6056. {
  6057. "lang": "js",
  6058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6059. }
  6060. ]
  6061. }
  6062. },
  6063. "/session/{sessionID}/message/{messageID}": {
  6064. "get": {
  6065. "tags": ["session"],
  6066. "operationId": "session.message",
  6067. "parameters": [
  6068. {
  6069. "name": "sessionID",
  6070. "in": "path",
  6071. "schema": {
  6072. "type": "string",
  6073. "pattern": "^ses"
  6074. },
  6075. "required": true
  6076. },
  6077. {
  6078. "name": "messageID",
  6079. "in": "path",
  6080. "schema": {
  6081. "type": "string",
  6082. "pattern": "^msg"
  6083. },
  6084. "required": true
  6085. },
  6086. {
  6087. "name": "directory",
  6088. "in": "query",
  6089. "schema": {
  6090. "type": "string"
  6091. },
  6092. "required": false
  6093. },
  6094. {
  6095. "name": "workspace",
  6096. "in": "query",
  6097. "schema": {
  6098. "type": "string"
  6099. },
  6100. "required": false
  6101. }
  6102. ],
  6103. "responses": {
  6104. "200": {
  6105. "description": "Message",
  6106. "content": {
  6107. "application/json": {
  6108. "schema": {
  6109. "type": "object",
  6110. "properties": {
  6111. "info": {
  6112. "$ref": "#/components/schemas/Message"
  6113. },
  6114. "parts": {
  6115. "type": "array",
  6116. "items": {
  6117. "$ref": "#/components/schemas/Part"
  6118. }
  6119. }
  6120. },
  6121. "required": ["info", "parts"],
  6122. "additionalProperties": false,
  6123. "description": "Message"
  6124. }
  6125. }
  6126. }
  6127. },
  6128. "400": {
  6129. "description": "BadRequest | InvalidRequestError",
  6130. "content": {
  6131. "application/json": {
  6132. "schema": {
  6133. "anyOf": [
  6134. {
  6135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6136. },
  6137. {
  6138. "$ref": "#/components/schemas/InvalidRequestError"
  6139. }
  6140. ]
  6141. }
  6142. }
  6143. }
  6144. },
  6145. "404": {
  6146. "description": "NotFoundError",
  6147. "content": {
  6148. "application/json": {
  6149. "schema": {
  6150. "$ref": "#/components/schemas/NotFoundError"
  6151. }
  6152. }
  6153. }
  6154. }
  6155. },
  6156. "description": "Retrieve a specific message from a session by its message ID.",
  6157. "summary": "Get message",
  6158. "x-codeSamples": [
  6159. {
  6160. "lang": "js",
  6161. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6162. }
  6163. ]
  6164. },
  6165. "delete": {
  6166. "tags": ["session"],
  6167. "operationId": "session.deleteMessage",
  6168. "parameters": [
  6169. {
  6170. "name": "sessionID",
  6171. "in": "path",
  6172. "schema": {
  6173. "type": "string",
  6174. "pattern": "^ses"
  6175. },
  6176. "required": true
  6177. },
  6178. {
  6179. "name": "messageID",
  6180. "in": "path",
  6181. "schema": {
  6182. "type": "string",
  6183. "pattern": "^msg"
  6184. },
  6185. "required": true
  6186. },
  6187. {
  6188. "name": "directory",
  6189. "in": "query",
  6190. "schema": {
  6191. "type": "string"
  6192. },
  6193. "required": false
  6194. },
  6195. {
  6196. "name": "workspace",
  6197. "in": "query",
  6198. "schema": {
  6199. "type": "string"
  6200. },
  6201. "required": false
  6202. }
  6203. ],
  6204. "responses": {
  6205. "200": {
  6206. "description": "Successfully deleted message",
  6207. "content": {
  6208. "application/json": {
  6209. "schema": {
  6210. "type": "boolean",
  6211. "description": "Successfully deleted message"
  6212. }
  6213. }
  6214. }
  6215. },
  6216. "400": {
  6217. "description": "BadRequest | InvalidRequestError",
  6218. "content": {
  6219. "application/json": {
  6220. "schema": {
  6221. "anyOf": [
  6222. {
  6223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6224. },
  6225. {
  6226. "$ref": "#/components/schemas/InvalidRequestError"
  6227. }
  6228. ]
  6229. }
  6230. }
  6231. }
  6232. },
  6233. "404": {
  6234. "description": "NotFoundError",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "$ref": "#/components/schemas/NotFoundError"
  6239. }
  6240. }
  6241. }
  6242. },
  6243. "409": {
  6244. "description": "SessionBusyError",
  6245. "content": {
  6246. "application/json": {
  6247. "schema": {
  6248. "$ref": "#/components/schemas/SessionBusyError"
  6249. }
  6250. }
  6251. }
  6252. }
  6253. },
  6254. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6255. "summary": "Delete message",
  6256. "x-codeSamples": [
  6257. {
  6258. "lang": "js",
  6259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6260. }
  6261. ]
  6262. }
  6263. },
  6264. "/session/{sessionID}/fork": {
  6265. "post": {
  6266. "tags": ["session"],
  6267. "operationId": "session.fork",
  6268. "parameters": [
  6269. {
  6270. "name": "sessionID",
  6271. "in": "path",
  6272. "schema": {
  6273. "type": "string",
  6274. "pattern": "^ses"
  6275. },
  6276. "required": true
  6277. },
  6278. {
  6279. "name": "directory",
  6280. "in": "query",
  6281. "schema": {
  6282. "type": "string"
  6283. },
  6284. "required": false
  6285. },
  6286. {
  6287. "name": "workspace",
  6288. "in": "query",
  6289. "schema": {
  6290. "type": "string"
  6291. },
  6292. "required": false
  6293. }
  6294. ],
  6295. "responses": {
  6296. "200": {
  6297. "description": "200",
  6298. "content": {
  6299. "application/json": {
  6300. "schema": {
  6301. "$ref": "#/components/schemas/Session"
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "400": {
  6307. "description": "BadRequest | InvalidRequestError",
  6308. "content": {
  6309. "application/json": {
  6310. "schema": {
  6311. "anyOf": [
  6312. {
  6313. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6314. },
  6315. {
  6316. "$ref": "#/components/schemas/InvalidRequestError"
  6317. }
  6318. ]
  6319. }
  6320. }
  6321. }
  6322. },
  6323. "404": {
  6324. "description": "NotFoundError",
  6325. "content": {
  6326. "application/json": {
  6327. "schema": {
  6328. "$ref": "#/components/schemas/NotFoundError"
  6329. }
  6330. }
  6331. }
  6332. }
  6333. },
  6334. "description": "Create a new session by forking an existing session at a specific message point.",
  6335. "summary": "Fork session",
  6336. "requestBody": {
  6337. "content": {
  6338. "application/json": {
  6339. "schema": {
  6340. "type": "object",
  6341. "properties": {
  6342. "messageID": {
  6343. "type": "string",
  6344. "pattern": "^msg"
  6345. }
  6346. },
  6347. "additionalProperties": false
  6348. }
  6349. }
  6350. }
  6351. },
  6352. "x-codeSamples": [
  6353. {
  6354. "lang": "js",
  6355. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6356. }
  6357. ]
  6358. }
  6359. },
  6360. "/session/{sessionID}/abort": {
  6361. "post": {
  6362. "tags": ["session"],
  6363. "operationId": "session.abort",
  6364. "parameters": [
  6365. {
  6366. "name": "sessionID",
  6367. "in": "path",
  6368. "schema": {
  6369. "type": "string",
  6370. "pattern": "^ses"
  6371. },
  6372. "required": true
  6373. },
  6374. {
  6375. "name": "directory",
  6376. "in": "query",
  6377. "schema": {
  6378. "type": "string"
  6379. },
  6380. "required": false
  6381. },
  6382. {
  6383. "name": "workspace",
  6384. "in": "query",
  6385. "schema": {
  6386. "type": "string"
  6387. },
  6388. "required": false
  6389. }
  6390. ],
  6391. "responses": {
  6392. "200": {
  6393. "description": "Aborted session",
  6394. "content": {
  6395. "application/json": {
  6396. "schema": {
  6397. "type": "boolean",
  6398. "description": "Aborted session"
  6399. }
  6400. }
  6401. }
  6402. },
  6403. "400": {
  6404. "description": "BadRequest | InvalidRequestError",
  6405. "content": {
  6406. "application/json": {
  6407. "schema": {
  6408. "anyOf": [
  6409. {
  6410. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6411. },
  6412. {
  6413. "$ref": "#/components/schemas/InvalidRequestError"
  6414. }
  6415. ]
  6416. }
  6417. }
  6418. }
  6419. }
  6420. },
  6421. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6422. "summary": "Abort session",
  6423. "x-codeSamples": [
  6424. {
  6425. "lang": "js",
  6426. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6427. }
  6428. ]
  6429. }
  6430. },
  6431. "/session/{sessionID}/init": {
  6432. "post": {
  6433. "tags": ["session"],
  6434. "operationId": "session.init",
  6435. "parameters": [
  6436. {
  6437. "name": "sessionID",
  6438. "in": "path",
  6439. "schema": {
  6440. "type": "string",
  6441. "pattern": "^ses"
  6442. },
  6443. "required": true
  6444. },
  6445. {
  6446. "name": "directory",
  6447. "in": "query",
  6448. "schema": {
  6449. "type": "string"
  6450. },
  6451. "required": false
  6452. },
  6453. {
  6454. "name": "workspace",
  6455. "in": "query",
  6456. "schema": {
  6457. "type": "string"
  6458. },
  6459. "required": false
  6460. }
  6461. ],
  6462. "responses": {
  6463. "200": {
  6464. "description": "200",
  6465. "content": {
  6466. "application/json": {
  6467. "schema": {
  6468. "type": "boolean",
  6469. "description": "200"
  6470. }
  6471. }
  6472. }
  6473. },
  6474. "400": {
  6475. "description": "BadRequest | InvalidRequestError",
  6476. "content": {
  6477. "application/json": {
  6478. "schema": {
  6479. "anyOf": [
  6480. {
  6481. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6482. },
  6483. {
  6484. "$ref": "#/components/schemas/InvalidRequestError"
  6485. }
  6486. ]
  6487. }
  6488. }
  6489. }
  6490. },
  6491. "404": {
  6492. "description": "NotFoundError",
  6493. "content": {
  6494. "application/json": {
  6495. "schema": {
  6496. "$ref": "#/components/schemas/NotFoundError"
  6497. }
  6498. }
  6499. }
  6500. }
  6501. },
  6502. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6503. "summary": "Initialize session",
  6504. "requestBody": {
  6505. "content": {
  6506. "application/json": {
  6507. "schema": {
  6508. "type": "object",
  6509. "properties": {
  6510. "modelID": {
  6511. "type": "string"
  6512. },
  6513. "providerID": {
  6514. "type": "string"
  6515. },
  6516. "messageID": {
  6517. "type": "string",
  6518. "pattern": "^msg"
  6519. }
  6520. },
  6521. "required": ["modelID", "providerID", "messageID"],
  6522. "additionalProperties": false
  6523. }
  6524. }
  6525. }
  6526. },
  6527. "x-codeSamples": [
  6528. {
  6529. "lang": "js",
  6530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6531. }
  6532. ]
  6533. }
  6534. },
  6535. "/session/{sessionID}/share": {
  6536. "post": {
  6537. "tags": ["session"],
  6538. "operationId": "session.share",
  6539. "parameters": [
  6540. {
  6541. "name": "sessionID",
  6542. "in": "path",
  6543. "schema": {
  6544. "type": "string",
  6545. "pattern": "^ses"
  6546. },
  6547. "required": true
  6548. },
  6549. {
  6550. "name": "directory",
  6551. "in": "query",
  6552. "schema": {
  6553. "type": "string"
  6554. },
  6555. "required": false
  6556. },
  6557. {
  6558. "name": "workspace",
  6559. "in": "query",
  6560. "schema": {
  6561. "type": "string"
  6562. },
  6563. "required": false
  6564. }
  6565. ],
  6566. "responses": {
  6567. "200": {
  6568. "description": "Successfully shared session",
  6569. "content": {
  6570. "application/json": {
  6571. "schema": {
  6572. "$ref": "#/components/schemas/Session"
  6573. }
  6574. }
  6575. }
  6576. },
  6577. "400": {
  6578. "description": "Bad request",
  6579. "content": {
  6580. "application/json": {
  6581. "schema": {
  6582. "$ref": "#/components/schemas/BadRequestError"
  6583. }
  6584. }
  6585. }
  6586. },
  6587. "404": {
  6588. "description": "NotFoundError",
  6589. "content": {
  6590. "application/json": {
  6591. "schema": {
  6592. "$ref": "#/components/schemas/NotFoundError"
  6593. }
  6594. }
  6595. }
  6596. },
  6597. "500": {
  6598. "description": "InternalServerError",
  6599. "content": {
  6600. "application/json": {
  6601. "schema": {
  6602. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6603. }
  6604. }
  6605. }
  6606. }
  6607. },
  6608. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6609. "summary": "Share session",
  6610. "x-codeSamples": [
  6611. {
  6612. "lang": "js",
  6613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6614. }
  6615. ]
  6616. },
  6617. "delete": {
  6618. "tags": ["session"],
  6619. "operationId": "session.unshare",
  6620. "parameters": [
  6621. {
  6622. "name": "sessionID",
  6623. "in": "path",
  6624. "schema": {
  6625. "type": "string",
  6626. "pattern": "^ses"
  6627. },
  6628. "required": true
  6629. },
  6630. {
  6631. "name": "directory",
  6632. "in": "query",
  6633. "schema": {
  6634. "type": "string"
  6635. },
  6636. "required": false
  6637. },
  6638. {
  6639. "name": "workspace",
  6640. "in": "query",
  6641. "schema": {
  6642. "type": "string"
  6643. },
  6644. "required": false
  6645. }
  6646. ],
  6647. "responses": {
  6648. "200": {
  6649. "description": "Successfully unshared session",
  6650. "content": {
  6651. "application/json": {
  6652. "schema": {
  6653. "$ref": "#/components/schemas/Session"
  6654. }
  6655. }
  6656. }
  6657. },
  6658. "400": {
  6659. "description": "Bad request",
  6660. "content": {
  6661. "application/json": {
  6662. "schema": {
  6663. "$ref": "#/components/schemas/BadRequestError"
  6664. }
  6665. }
  6666. }
  6667. },
  6668. "404": {
  6669. "description": "NotFoundError",
  6670. "content": {
  6671. "application/json": {
  6672. "schema": {
  6673. "$ref": "#/components/schemas/NotFoundError"
  6674. }
  6675. }
  6676. }
  6677. },
  6678. "500": {
  6679. "description": "InternalServerError",
  6680. "content": {
  6681. "application/json": {
  6682. "schema": {
  6683. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6684. }
  6685. }
  6686. }
  6687. }
  6688. },
  6689. "description": "Remove the shareable link for a session, making it private again.",
  6690. "summary": "Unshare session",
  6691. "x-codeSamples": [
  6692. {
  6693. "lang": "js",
  6694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6695. }
  6696. ]
  6697. }
  6698. },
  6699. "/session/{sessionID}/summarize": {
  6700. "post": {
  6701. "tags": ["session"],
  6702. "operationId": "session.summarize",
  6703. "parameters": [
  6704. {
  6705. "name": "sessionID",
  6706. "in": "path",
  6707. "schema": {
  6708. "type": "string",
  6709. "pattern": "^ses"
  6710. },
  6711. "required": true
  6712. },
  6713. {
  6714. "name": "directory",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. },
  6721. {
  6722. "name": "workspace",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. }
  6729. ],
  6730. "responses": {
  6731. "200": {
  6732. "description": "Summarized session",
  6733. "content": {
  6734. "application/json": {
  6735. "schema": {
  6736. "type": "boolean",
  6737. "description": "Summarized session"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "400": {
  6743. "description": "BadRequest | InvalidRequestError",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "anyOf": [
  6748. {
  6749. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6750. },
  6751. {
  6752. "$ref": "#/components/schemas/InvalidRequestError"
  6753. }
  6754. ]
  6755. }
  6756. }
  6757. }
  6758. },
  6759. "404": {
  6760. "description": "NotFoundError",
  6761. "content": {
  6762. "application/json": {
  6763. "schema": {
  6764. "$ref": "#/components/schemas/NotFoundError"
  6765. }
  6766. }
  6767. }
  6768. }
  6769. },
  6770. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6771. "summary": "Summarize session",
  6772. "requestBody": {
  6773. "content": {
  6774. "application/json": {
  6775. "schema": {
  6776. "type": "object",
  6777. "properties": {
  6778. "providerID": {
  6779. "type": "string"
  6780. },
  6781. "modelID": {
  6782. "type": "string"
  6783. },
  6784. "auto": {
  6785. "type": "boolean"
  6786. }
  6787. },
  6788. "required": ["providerID", "modelID"],
  6789. "additionalProperties": false
  6790. }
  6791. }
  6792. }
  6793. },
  6794. "x-codeSamples": [
  6795. {
  6796. "lang": "js",
  6797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6798. }
  6799. ]
  6800. }
  6801. },
  6802. "/session/{sessionID}/prompt_async": {
  6803. "post": {
  6804. "tags": ["session"],
  6805. "operationId": "session.prompt_async",
  6806. "parameters": [
  6807. {
  6808. "name": "sessionID",
  6809. "in": "path",
  6810. "schema": {
  6811. "type": "string",
  6812. "pattern": "^ses"
  6813. },
  6814. "required": true
  6815. },
  6816. {
  6817. "name": "directory",
  6818. "in": "query",
  6819. "schema": {
  6820. "type": "string"
  6821. },
  6822. "required": false
  6823. },
  6824. {
  6825. "name": "workspace",
  6826. "in": "query",
  6827. "schema": {
  6828. "type": "string"
  6829. },
  6830. "required": false
  6831. }
  6832. ],
  6833. "responses": {
  6834. "204": {
  6835. "description": "Prompt accepted"
  6836. },
  6837. "400": {
  6838. "description": "BadRequest | InvalidRequestError",
  6839. "content": {
  6840. "application/json": {
  6841. "schema": {
  6842. "anyOf": [
  6843. {
  6844. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6845. },
  6846. {
  6847. "$ref": "#/components/schemas/InvalidRequestError"
  6848. }
  6849. ]
  6850. }
  6851. }
  6852. }
  6853. },
  6854. "404": {
  6855. "description": "NotFoundError",
  6856. "content": {
  6857. "application/json": {
  6858. "schema": {
  6859. "$ref": "#/components/schemas/NotFoundError"
  6860. }
  6861. }
  6862. }
  6863. }
  6864. },
  6865. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6866. "summary": "Send async message",
  6867. "requestBody": {
  6868. "content": {
  6869. "application/json": {
  6870. "schema": {
  6871. "type": "object",
  6872. "properties": {
  6873. "messageID": {
  6874. "type": "string",
  6875. "pattern": "^msg"
  6876. },
  6877. "model": {
  6878. "type": "object",
  6879. "properties": {
  6880. "providerID": {
  6881. "type": "string"
  6882. },
  6883. "modelID": {
  6884. "type": "string"
  6885. }
  6886. },
  6887. "required": ["providerID", "modelID"],
  6888. "additionalProperties": false
  6889. },
  6890. "agent": {
  6891. "type": "string"
  6892. },
  6893. "noReply": {
  6894. "type": "boolean"
  6895. },
  6896. "tools": {
  6897. "type": "object",
  6898. "additionalProperties": {
  6899. "type": "boolean"
  6900. }
  6901. },
  6902. "format": {
  6903. "$ref": "#/components/schemas/OutputFormat"
  6904. },
  6905. "system": {
  6906. "type": "string"
  6907. },
  6908. "variant": {
  6909. "type": "string"
  6910. },
  6911. "parts": {
  6912. "type": "array",
  6913. "items": {
  6914. "anyOf": [
  6915. {
  6916. "$ref": "#/components/schemas/TextPartInput"
  6917. },
  6918. {
  6919. "$ref": "#/components/schemas/FilePartInput"
  6920. },
  6921. {
  6922. "$ref": "#/components/schemas/AgentPartInput"
  6923. },
  6924. {
  6925. "$ref": "#/components/schemas/SubtaskPartInput"
  6926. }
  6927. ]
  6928. }
  6929. }
  6930. },
  6931. "required": ["parts"],
  6932. "additionalProperties": false
  6933. }
  6934. }
  6935. }
  6936. },
  6937. "x-codeSamples": [
  6938. {
  6939. "lang": "js",
  6940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6941. }
  6942. ]
  6943. }
  6944. },
  6945. "/session/{sessionID}/command": {
  6946. "post": {
  6947. "tags": ["session"],
  6948. "operationId": "session.command",
  6949. "parameters": [
  6950. {
  6951. "name": "sessionID",
  6952. "in": "path",
  6953. "schema": {
  6954. "type": "string",
  6955. "pattern": "^ses"
  6956. },
  6957. "required": true
  6958. },
  6959. {
  6960. "name": "directory",
  6961. "in": "query",
  6962. "schema": {
  6963. "type": "string"
  6964. },
  6965. "required": false
  6966. },
  6967. {
  6968. "name": "workspace",
  6969. "in": "query",
  6970. "schema": {
  6971. "type": "string"
  6972. },
  6973. "required": false
  6974. }
  6975. ],
  6976. "responses": {
  6977. "200": {
  6978. "description": "Created message",
  6979. "content": {
  6980. "application/json": {
  6981. "schema": {
  6982. "type": "object",
  6983. "required": ["info", "parts"],
  6984. "properties": {
  6985. "info": {
  6986. "$ref": "#/components/schemas/AssistantMessage"
  6987. },
  6988. "parts": {
  6989. "type": "array",
  6990. "items": {
  6991. "$ref": "#/components/schemas/Part"
  6992. }
  6993. }
  6994. }
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "400": {
  7000. "description": "BadRequest | InvalidRequestError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "anyOf": [
  7005. {
  7006. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7007. },
  7008. {
  7009. "$ref": "#/components/schemas/InvalidRequestError"
  7010. }
  7011. ]
  7012. }
  7013. }
  7014. }
  7015. },
  7016. "404": {
  7017. "description": "NotFoundError",
  7018. "content": {
  7019. "application/json": {
  7020. "schema": {
  7021. "$ref": "#/components/schemas/NotFoundError"
  7022. }
  7023. }
  7024. }
  7025. }
  7026. },
  7027. "description": "Send a new command to a session for execution by the AI assistant.",
  7028. "summary": "Send command",
  7029. "requestBody": {
  7030. "content": {
  7031. "application/json": {
  7032. "schema": {
  7033. "type": "object",
  7034. "properties": {
  7035. "messageID": {
  7036. "type": "string",
  7037. "pattern": "^msg"
  7038. },
  7039. "agent": {
  7040. "type": "string"
  7041. },
  7042. "model": {
  7043. "type": "string"
  7044. },
  7045. "arguments": {
  7046. "type": "string"
  7047. },
  7048. "command": {
  7049. "type": "string"
  7050. },
  7051. "variant": {
  7052. "type": "string"
  7053. },
  7054. "parts": {
  7055. "type": "array",
  7056. "items": {
  7057. "type": "object",
  7058. "properties": {
  7059. "id": {
  7060. "type": "string",
  7061. "pattern": "^prt"
  7062. },
  7063. "type": {
  7064. "type": "string",
  7065. "enum": ["file"]
  7066. },
  7067. "mime": {
  7068. "type": "string"
  7069. },
  7070. "filename": {
  7071. "type": "string"
  7072. },
  7073. "url": {
  7074. "type": "string"
  7075. },
  7076. "source": {
  7077. "$ref": "#/components/schemas/FilePartSource"
  7078. }
  7079. },
  7080. "required": ["type", "mime", "url"],
  7081. "additionalProperties": false
  7082. }
  7083. }
  7084. },
  7085. "required": ["arguments", "command"],
  7086. "additionalProperties": false
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "x-codeSamples": [
  7092. {
  7093. "lang": "js",
  7094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7095. }
  7096. ]
  7097. }
  7098. },
  7099. "/session/{sessionID}/shell": {
  7100. "post": {
  7101. "tags": ["session"],
  7102. "operationId": "session.shell",
  7103. "parameters": [
  7104. {
  7105. "name": "sessionID",
  7106. "in": "path",
  7107. "schema": {
  7108. "type": "string",
  7109. "pattern": "^ses"
  7110. },
  7111. "required": true
  7112. },
  7113. {
  7114. "name": "directory",
  7115. "in": "query",
  7116. "schema": {
  7117. "type": "string"
  7118. },
  7119. "required": false
  7120. },
  7121. {
  7122. "name": "workspace",
  7123. "in": "query",
  7124. "schema": {
  7125. "type": "string"
  7126. },
  7127. "required": false
  7128. }
  7129. ],
  7130. "responses": {
  7131. "200": {
  7132. "description": "Created message",
  7133. "content": {
  7134. "application/json": {
  7135. "schema": {
  7136. "type": "object",
  7137. "properties": {
  7138. "info": {
  7139. "$ref": "#/components/schemas/Message"
  7140. },
  7141. "parts": {
  7142. "type": "array",
  7143. "items": {
  7144. "$ref": "#/components/schemas/Part"
  7145. }
  7146. }
  7147. },
  7148. "required": ["info", "parts"],
  7149. "additionalProperties": false,
  7150. "description": "Created message"
  7151. }
  7152. }
  7153. }
  7154. },
  7155. "400": {
  7156. "description": "BadRequest | InvalidRequestError",
  7157. "content": {
  7158. "application/json": {
  7159. "schema": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/InvalidRequestError"
  7166. }
  7167. ]
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "404": {
  7173. "description": "NotFoundError",
  7174. "content": {
  7175. "application/json": {
  7176. "schema": {
  7177. "$ref": "#/components/schemas/NotFoundError"
  7178. }
  7179. }
  7180. }
  7181. },
  7182. "409": {
  7183. "description": "SessionBusyError",
  7184. "content": {
  7185. "application/json": {
  7186. "schema": {
  7187. "$ref": "#/components/schemas/SessionBusyError"
  7188. }
  7189. }
  7190. }
  7191. }
  7192. },
  7193. "description": "Execute a shell command within the session context and return the AI's response.",
  7194. "summary": "Run shell command",
  7195. "requestBody": {
  7196. "content": {
  7197. "application/json": {
  7198. "schema": {
  7199. "type": "object",
  7200. "properties": {
  7201. "messageID": {
  7202. "type": "string",
  7203. "pattern": "^msg"
  7204. },
  7205. "agent": {
  7206. "type": "string"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "command": {
  7222. "type": "string"
  7223. }
  7224. },
  7225. "required": ["agent", "command"],
  7226. "additionalProperties": false
  7227. }
  7228. }
  7229. }
  7230. },
  7231. "x-codeSamples": [
  7232. {
  7233. "lang": "js",
  7234. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7235. }
  7236. ]
  7237. }
  7238. },
  7239. "/session/{sessionID}/revert": {
  7240. "post": {
  7241. "tags": ["session"],
  7242. "operationId": "session.revert",
  7243. "parameters": [
  7244. {
  7245. "name": "sessionID",
  7246. "in": "path",
  7247. "schema": {
  7248. "type": "string",
  7249. "pattern": "^ses"
  7250. },
  7251. "required": true
  7252. },
  7253. {
  7254. "name": "directory",
  7255. "in": "query",
  7256. "schema": {
  7257. "type": "string"
  7258. },
  7259. "required": false
  7260. },
  7261. {
  7262. "name": "workspace",
  7263. "in": "query",
  7264. "schema": {
  7265. "type": "string"
  7266. },
  7267. "required": false
  7268. }
  7269. ],
  7270. "responses": {
  7271. "200": {
  7272. "description": "Updated session",
  7273. "content": {
  7274. "application/json": {
  7275. "schema": {
  7276. "$ref": "#/components/schemas/Session"
  7277. }
  7278. }
  7279. }
  7280. },
  7281. "400": {
  7282. "description": "BadRequest | InvalidRequestError",
  7283. "content": {
  7284. "application/json": {
  7285. "schema": {
  7286. "anyOf": [
  7287. {
  7288. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7289. },
  7290. {
  7291. "$ref": "#/components/schemas/InvalidRequestError"
  7292. }
  7293. ]
  7294. }
  7295. }
  7296. }
  7297. },
  7298. "404": {
  7299. "description": "NotFoundError",
  7300. "content": {
  7301. "application/json": {
  7302. "schema": {
  7303. "$ref": "#/components/schemas/NotFoundError"
  7304. }
  7305. }
  7306. }
  7307. },
  7308. "409": {
  7309. "description": "SessionBusyError",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "$ref": "#/components/schemas/SessionBusyError"
  7314. }
  7315. }
  7316. }
  7317. }
  7318. },
  7319. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7320. "summary": "Revert message",
  7321. "requestBody": {
  7322. "content": {
  7323. "application/json": {
  7324. "schema": {
  7325. "type": "object",
  7326. "properties": {
  7327. "messageID": {
  7328. "type": "string",
  7329. "pattern": "^msg"
  7330. },
  7331. "partID": {
  7332. "type": "string",
  7333. "pattern": "^prt"
  7334. }
  7335. },
  7336. "required": ["messageID"],
  7337. "additionalProperties": false
  7338. }
  7339. }
  7340. }
  7341. },
  7342. "x-codeSamples": [
  7343. {
  7344. "lang": "js",
  7345. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7346. }
  7347. ]
  7348. }
  7349. },
  7350. "/session/{sessionID}/unrevert": {
  7351. "post": {
  7352. "tags": ["session"],
  7353. "operationId": "session.unrevert",
  7354. "parameters": [
  7355. {
  7356. "name": "sessionID",
  7357. "in": "path",
  7358. "schema": {
  7359. "type": "string",
  7360. "pattern": "^ses"
  7361. },
  7362. "required": true
  7363. },
  7364. {
  7365. "name": "directory",
  7366. "in": "query",
  7367. "schema": {
  7368. "type": "string"
  7369. },
  7370. "required": false
  7371. },
  7372. {
  7373. "name": "workspace",
  7374. "in": "query",
  7375. "schema": {
  7376. "type": "string"
  7377. },
  7378. "required": false
  7379. }
  7380. ],
  7381. "responses": {
  7382. "200": {
  7383. "description": "Updated session",
  7384. "content": {
  7385. "application/json": {
  7386. "schema": {
  7387. "$ref": "#/components/schemas/Session"
  7388. }
  7389. }
  7390. }
  7391. },
  7392. "400": {
  7393. "description": "BadRequest | InvalidRequestError",
  7394. "content": {
  7395. "application/json": {
  7396. "schema": {
  7397. "anyOf": [
  7398. {
  7399. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7400. },
  7401. {
  7402. "$ref": "#/components/schemas/InvalidRequestError"
  7403. }
  7404. ]
  7405. }
  7406. }
  7407. }
  7408. },
  7409. "404": {
  7410. "description": "NotFoundError",
  7411. "content": {
  7412. "application/json": {
  7413. "schema": {
  7414. "$ref": "#/components/schemas/NotFoundError"
  7415. }
  7416. }
  7417. }
  7418. },
  7419. "409": {
  7420. "description": "SessionBusyError",
  7421. "content": {
  7422. "application/json": {
  7423. "schema": {
  7424. "$ref": "#/components/schemas/SessionBusyError"
  7425. }
  7426. }
  7427. }
  7428. }
  7429. },
  7430. "description": "Restore all previously reverted messages in a session.",
  7431. "summary": "Restore reverted messages",
  7432. "x-codeSamples": [
  7433. {
  7434. "lang": "js",
  7435. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7436. }
  7437. ]
  7438. }
  7439. },
  7440. "/session/{sessionID}/permissions/{permissionID}": {
  7441. "post": {
  7442. "tags": ["session"],
  7443. "operationId": "permission.respond",
  7444. "parameters": [
  7445. {
  7446. "name": "sessionID",
  7447. "in": "path",
  7448. "schema": {
  7449. "type": "string",
  7450. "pattern": "^ses"
  7451. },
  7452. "required": true
  7453. },
  7454. {
  7455. "name": "permissionID",
  7456. "in": "path",
  7457. "schema": {
  7458. "type": "string",
  7459. "pattern": "^per"
  7460. },
  7461. "required": true
  7462. },
  7463. {
  7464. "name": "directory",
  7465. "in": "query",
  7466. "schema": {
  7467. "type": "string"
  7468. },
  7469. "required": false
  7470. },
  7471. {
  7472. "name": "workspace",
  7473. "in": "query",
  7474. "schema": {
  7475. "type": "string"
  7476. },
  7477. "required": false
  7478. }
  7479. ],
  7480. "responses": {
  7481. "200": {
  7482. "description": "Permission processed successfully",
  7483. "content": {
  7484. "application/json": {
  7485. "schema": {
  7486. "type": "boolean",
  7487. "description": "Permission processed successfully"
  7488. }
  7489. }
  7490. }
  7491. },
  7492. "400": {
  7493. "description": "BadRequest | InvalidRequestError",
  7494. "content": {
  7495. "application/json": {
  7496. "schema": {
  7497. "anyOf": [
  7498. {
  7499. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7500. },
  7501. {
  7502. "$ref": "#/components/schemas/InvalidRequestError"
  7503. }
  7504. ]
  7505. }
  7506. }
  7507. }
  7508. },
  7509. "404": {
  7510. "description": "NotFoundError | PermissionNotFoundError",
  7511. "content": {
  7512. "application/json": {
  7513. "schema": {
  7514. "anyOf": [
  7515. {
  7516. "$ref": "#/components/schemas/NotFoundError"
  7517. },
  7518. {
  7519. "$ref": "#/components/schemas/PermissionNotFoundError"
  7520. }
  7521. ]
  7522. }
  7523. }
  7524. }
  7525. }
  7526. },
  7527. "description": "Approve or deny a permission request from the AI assistant.",
  7528. "summary": "Respond to permission",
  7529. "deprecated": true,
  7530. "requestBody": {
  7531. "content": {
  7532. "application/json": {
  7533. "schema": {
  7534. "type": "object",
  7535. "properties": {
  7536. "response": {
  7537. "type": "string",
  7538. "enum": ["once", "always", "reject"]
  7539. }
  7540. },
  7541. "required": ["response"],
  7542. "additionalProperties": false
  7543. }
  7544. }
  7545. }
  7546. },
  7547. "x-codeSamples": [
  7548. {
  7549. "lang": "js",
  7550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7551. }
  7552. ]
  7553. }
  7554. },
  7555. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7556. "delete": {
  7557. "tags": ["session"],
  7558. "operationId": "part.delete",
  7559. "parameters": [
  7560. {
  7561. "name": "sessionID",
  7562. "in": "path",
  7563. "schema": {
  7564. "type": "string",
  7565. "pattern": "^ses"
  7566. },
  7567. "required": true
  7568. },
  7569. {
  7570. "name": "messageID",
  7571. "in": "path",
  7572. "schema": {
  7573. "type": "string",
  7574. "pattern": "^msg"
  7575. },
  7576. "required": true
  7577. },
  7578. {
  7579. "name": "partID",
  7580. "in": "path",
  7581. "schema": {
  7582. "type": "string",
  7583. "pattern": "^prt"
  7584. },
  7585. "required": true
  7586. },
  7587. {
  7588. "name": "directory",
  7589. "in": "query",
  7590. "schema": {
  7591. "type": "string"
  7592. },
  7593. "required": false
  7594. },
  7595. {
  7596. "name": "workspace",
  7597. "in": "query",
  7598. "schema": {
  7599. "type": "string"
  7600. },
  7601. "required": false
  7602. }
  7603. ],
  7604. "responses": {
  7605. "200": {
  7606. "description": "Successfully deleted part",
  7607. "content": {
  7608. "application/json": {
  7609. "schema": {
  7610. "type": "boolean",
  7611. "description": "Successfully deleted part"
  7612. }
  7613. }
  7614. }
  7615. },
  7616. "400": {
  7617. "description": "BadRequest | InvalidRequestError",
  7618. "content": {
  7619. "application/json": {
  7620. "schema": {
  7621. "anyOf": [
  7622. {
  7623. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7624. },
  7625. {
  7626. "$ref": "#/components/schemas/InvalidRequestError"
  7627. }
  7628. ]
  7629. }
  7630. }
  7631. }
  7632. },
  7633. "404": {
  7634. "description": "NotFoundError",
  7635. "content": {
  7636. "application/json": {
  7637. "schema": {
  7638. "$ref": "#/components/schemas/NotFoundError"
  7639. }
  7640. }
  7641. }
  7642. }
  7643. },
  7644. "description": "Delete a part from a message.",
  7645. "x-codeSamples": [
  7646. {
  7647. "lang": "js",
  7648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7649. }
  7650. ]
  7651. },
  7652. "patch": {
  7653. "tags": ["session"],
  7654. "operationId": "part.update",
  7655. "parameters": [
  7656. {
  7657. "name": "sessionID",
  7658. "in": "path",
  7659. "schema": {
  7660. "type": "string",
  7661. "pattern": "^ses"
  7662. },
  7663. "required": true
  7664. },
  7665. {
  7666. "name": "messageID",
  7667. "in": "path",
  7668. "schema": {
  7669. "type": "string",
  7670. "pattern": "^msg"
  7671. },
  7672. "required": true
  7673. },
  7674. {
  7675. "name": "partID",
  7676. "in": "path",
  7677. "schema": {
  7678. "type": "string",
  7679. "pattern": "^prt"
  7680. },
  7681. "required": true
  7682. },
  7683. {
  7684. "name": "directory",
  7685. "in": "query",
  7686. "schema": {
  7687. "type": "string"
  7688. },
  7689. "required": false
  7690. },
  7691. {
  7692. "name": "workspace",
  7693. "in": "query",
  7694. "schema": {
  7695. "type": "string"
  7696. },
  7697. "required": false
  7698. }
  7699. ],
  7700. "responses": {
  7701. "200": {
  7702. "description": "Successfully updated part",
  7703. "content": {
  7704. "application/json": {
  7705. "schema": {
  7706. "$ref": "#/components/schemas/Part"
  7707. }
  7708. }
  7709. }
  7710. },
  7711. "400": {
  7712. "description": "BadRequest | InvalidRequestError",
  7713. "content": {
  7714. "application/json": {
  7715. "schema": {
  7716. "anyOf": [
  7717. {
  7718. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7719. },
  7720. {
  7721. "$ref": "#/components/schemas/InvalidRequestError"
  7722. }
  7723. ]
  7724. }
  7725. }
  7726. }
  7727. },
  7728. "404": {
  7729. "description": "NotFoundError",
  7730. "content": {
  7731. "application/json": {
  7732. "schema": {
  7733. "$ref": "#/components/schemas/NotFoundError"
  7734. }
  7735. }
  7736. }
  7737. }
  7738. },
  7739. "description": "Update a part in a message.",
  7740. "requestBody": {
  7741. "content": {
  7742. "application/json": {
  7743. "schema": {
  7744. "$ref": "#/components/schemas/Part"
  7745. }
  7746. }
  7747. }
  7748. },
  7749. "x-codeSamples": [
  7750. {
  7751. "lang": "js",
  7752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7753. }
  7754. ]
  7755. }
  7756. },
  7757. "/sync/start": {
  7758. "post": {
  7759. "tags": ["sync"],
  7760. "operationId": "sync.start",
  7761. "parameters": [
  7762. {
  7763. "name": "directory",
  7764. "in": "query",
  7765. "schema": {
  7766. "type": "string"
  7767. },
  7768. "required": false
  7769. },
  7770. {
  7771. "name": "workspace",
  7772. "in": "query",
  7773. "schema": {
  7774. "type": "string"
  7775. },
  7776. "required": false
  7777. }
  7778. ],
  7779. "responses": {
  7780. "200": {
  7781. "description": "Workspace sync started",
  7782. "content": {
  7783. "application/json": {
  7784. "schema": {
  7785. "type": "boolean",
  7786. "description": "Workspace sync started"
  7787. }
  7788. }
  7789. }
  7790. },
  7791. "400": {
  7792. "description": "Bad request",
  7793. "content": {
  7794. "application/json": {
  7795. "schema": {
  7796. "$ref": "#/components/schemas/BadRequestError"
  7797. }
  7798. }
  7799. }
  7800. }
  7801. },
  7802. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7803. "summary": "Start workspace sync",
  7804. "x-codeSamples": [
  7805. {
  7806. "lang": "js",
  7807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7808. }
  7809. ]
  7810. }
  7811. },
  7812. "/sync/replay": {
  7813. "post": {
  7814. "tags": ["sync"],
  7815. "operationId": "sync.replay",
  7816. "parameters": [
  7817. {
  7818. "name": "directory",
  7819. "in": "query",
  7820. "schema": {
  7821. "type": "string"
  7822. },
  7823. "required": false
  7824. },
  7825. {
  7826. "name": "workspace",
  7827. "in": "query",
  7828. "schema": {
  7829. "type": "string"
  7830. },
  7831. "required": false
  7832. }
  7833. ],
  7834. "responses": {
  7835. "200": {
  7836. "description": "Replayed sync events",
  7837. "content": {
  7838. "application/json": {
  7839. "schema": {
  7840. "type": "object",
  7841. "properties": {
  7842. "sessionID": {
  7843. "type": "string"
  7844. }
  7845. },
  7846. "required": ["sessionID"],
  7847. "additionalProperties": false,
  7848. "description": "Replayed sync events"
  7849. }
  7850. }
  7851. }
  7852. },
  7853. "400": {
  7854. "description": "BadRequest | InvalidRequestError",
  7855. "content": {
  7856. "application/json": {
  7857. "schema": {
  7858. "anyOf": [
  7859. {
  7860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7861. },
  7862. {
  7863. "$ref": "#/components/schemas/InvalidRequestError"
  7864. }
  7865. ]
  7866. }
  7867. }
  7868. }
  7869. }
  7870. },
  7871. "description": "Validate and replay a complete sync event history.",
  7872. "summary": "Replay sync events",
  7873. "requestBody": {
  7874. "content": {
  7875. "application/json": {
  7876. "schema": {
  7877. "type": "object",
  7878. "properties": {
  7879. "directory": {
  7880. "type": "string"
  7881. },
  7882. "events": {
  7883. "type": "array",
  7884. "minItems": 1,
  7885. "items": {
  7886. "type": "object",
  7887. "properties": {
  7888. "id": {
  7889. "type": "string"
  7890. },
  7891. "aggregateID": {
  7892. "type": "string"
  7893. },
  7894. "seq": {
  7895. "type": "integer",
  7896. "minimum": 0
  7897. },
  7898. "type": {
  7899. "type": "string"
  7900. },
  7901. "data": {
  7902. "type": "object"
  7903. }
  7904. },
  7905. "required": ["id", "aggregateID", "seq", "type", "data"],
  7906. "additionalProperties": false
  7907. }
  7908. }
  7909. },
  7910. "required": ["directory", "events"],
  7911. "additionalProperties": false
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "x-codeSamples": [
  7917. {
  7918. "lang": "js",
  7919. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7920. }
  7921. ]
  7922. }
  7923. },
  7924. "/sync/steal": {
  7925. "post": {
  7926. "tags": ["sync"],
  7927. "operationId": "sync.steal",
  7928. "parameters": [
  7929. {
  7930. "name": "directory",
  7931. "in": "query",
  7932. "schema": {
  7933. "type": "string"
  7934. },
  7935. "required": false
  7936. },
  7937. {
  7938. "name": "workspace",
  7939. "in": "query",
  7940. "schema": {
  7941. "type": "string"
  7942. },
  7943. "required": false
  7944. }
  7945. ],
  7946. "responses": {
  7947. "200": {
  7948. "description": "Session stolen into workspace",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "type": "object",
  7953. "properties": {
  7954. "sessionID": {
  7955. "type": "string",
  7956. "pattern": "^ses"
  7957. }
  7958. },
  7959. "required": ["sessionID"],
  7960. "additionalProperties": false,
  7961. "description": "Session stolen into workspace"
  7962. }
  7963. }
  7964. }
  7965. },
  7966. "400": {
  7967. "description": "BadRequest | InvalidRequestError",
  7968. "content": {
  7969. "application/json": {
  7970. "schema": {
  7971. "anyOf": [
  7972. {
  7973. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7974. },
  7975. {
  7976. "$ref": "#/components/schemas/InvalidRequestError"
  7977. }
  7978. ]
  7979. }
  7980. }
  7981. }
  7982. }
  7983. },
  7984. "description": "Update a session to belong to the current workspace through the sync event system.",
  7985. "summary": "Steal session into workspace",
  7986. "requestBody": {
  7987. "content": {
  7988. "application/json": {
  7989. "schema": {
  7990. "type": "object",
  7991. "properties": {
  7992. "sessionID": {
  7993. "type": "string",
  7994. "pattern": "^ses"
  7995. }
  7996. },
  7997. "required": ["sessionID"],
  7998. "additionalProperties": false
  7999. }
  8000. }
  8001. }
  8002. },
  8003. "x-codeSamples": [
  8004. {
  8005. "lang": "js",
  8006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8007. }
  8008. ]
  8009. }
  8010. },
  8011. "/sync/history": {
  8012. "post": {
  8013. "tags": ["sync"],
  8014. "operationId": "sync.history.list",
  8015. "parameters": [
  8016. {
  8017. "name": "directory",
  8018. "in": "query",
  8019. "schema": {
  8020. "type": "string"
  8021. },
  8022. "required": false
  8023. },
  8024. {
  8025. "name": "workspace",
  8026. "in": "query",
  8027. "schema": {
  8028. "type": "string"
  8029. },
  8030. "required": false
  8031. }
  8032. ],
  8033. "responses": {
  8034. "200": {
  8035. "description": "Sync events",
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "type": "array",
  8040. "items": {
  8041. "type": "object",
  8042. "properties": {
  8043. "id": {
  8044. "type": "string"
  8045. },
  8046. "aggregate_id": {
  8047. "type": "string"
  8048. },
  8049. "seq": {
  8050. "type": "integer",
  8051. "minimum": 0
  8052. },
  8053. "type": {
  8054. "type": "string"
  8055. },
  8056. "data": {
  8057. "type": "object"
  8058. }
  8059. },
  8060. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8061. "additionalProperties": false
  8062. },
  8063. "description": "Sync events"
  8064. }
  8065. }
  8066. }
  8067. },
  8068. "400": {
  8069. "description": "BadRequest | InvalidRequestError",
  8070. "content": {
  8071. "application/json": {
  8072. "schema": {
  8073. "anyOf": [
  8074. {
  8075. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8076. },
  8077. {
  8078. "$ref": "#/components/schemas/InvalidRequestError"
  8079. }
  8080. ]
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8087. "summary": "List sync events",
  8088. "requestBody": {
  8089. "content": {
  8090. "application/json": {
  8091. "schema": {
  8092. "type": "object",
  8093. "additionalProperties": {
  8094. "type": "integer",
  8095. "minimum": 0
  8096. }
  8097. }
  8098. }
  8099. }
  8100. },
  8101. "x-codeSamples": [
  8102. {
  8103. "lang": "js",
  8104. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8105. }
  8106. ]
  8107. }
  8108. },
  8109. "/api/session": {
  8110. "get": {
  8111. "tags": ["v2"],
  8112. "operationId": "v2.session.list",
  8113. "parameters": [
  8114. {
  8115. "name": "directory",
  8116. "in": "query",
  8117. "schema": {
  8118. "type": "string"
  8119. },
  8120. "required": false
  8121. },
  8122. {
  8123. "name": "workspace",
  8124. "in": "query",
  8125. "schema": {
  8126. "type": "string"
  8127. },
  8128. "required": false
  8129. },
  8130. {
  8131. "name": "limit",
  8132. "in": "query",
  8133. "schema": {
  8134. "type": "number"
  8135. },
  8136. "required": false
  8137. },
  8138. {
  8139. "name": "order",
  8140. "in": "query",
  8141. "schema": {
  8142. "type": "string",
  8143. "enum": ["asc", "desc"]
  8144. },
  8145. "required": false
  8146. },
  8147. {
  8148. "name": "path",
  8149. "in": "query",
  8150. "schema": {
  8151. "type": "string"
  8152. },
  8153. "required": false
  8154. },
  8155. {
  8156. "name": "roots",
  8157. "in": "query",
  8158. "schema": {
  8159. "anyOf": [
  8160. {
  8161. "type": "boolean"
  8162. },
  8163. {
  8164. "type": "string",
  8165. "enum": ["true", "false"]
  8166. }
  8167. ]
  8168. },
  8169. "required": false
  8170. },
  8171. {
  8172. "name": "start",
  8173. "in": "query",
  8174. "schema": {
  8175. "type": "number"
  8176. },
  8177. "required": false
  8178. },
  8179. {
  8180. "name": "search",
  8181. "in": "query",
  8182. "schema": {
  8183. "type": "string"
  8184. },
  8185. "required": false
  8186. },
  8187. {
  8188. "name": "cursor",
  8189. "in": "query",
  8190. "schema": {
  8191. "type": "string",
  8192. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8193. },
  8194. "required": false
  8195. }
  8196. ],
  8197. "security": [],
  8198. "responses": {
  8199. "200": {
  8200. "description": "V2SessionsResponse",
  8201. "content": {
  8202. "application/json": {
  8203. "schema": {
  8204. "$ref": "#/components/schemas/V2SessionsResponse"
  8205. }
  8206. }
  8207. }
  8208. },
  8209. "400": {
  8210. "description": "InvalidCursorError | InvalidRequestError",
  8211. "content": {
  8212. "application/json": {
  8213. "schema": {
  8214. "anyOf": [
  8215. {
  8216. "$ref": "#/components/schemas/InvalidCursorError"
  8217. },
  8218. {
  8219. "$ref": "#/components/schemas/InvalidRequestError"
  8220. },
  8221. {
  8222. "$ref": "#/components/schemas/InvalidRequestError"
  8223. }
  8224. ]
  8225. }
  8226. }
  8227. }
  8228. },
  8229. "401": {
  8230. "description": "UnauthorizedError",
  8231. "content": {
  8232. "application/json": {
  8233. "schema": {
  8234. "$ref": "#/components/schemas/UnauthorizedError"
  8235. }
  8236. }
  8237. }
  8238. }
  8239. },
  8240. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  8241. "summary": "List v2 sessions",
  8242. "x-codeSamples": [
  8243. {
  8244. "lang": "js",
  8245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8246. }
  8247. ]
  8248. }
  8249. },
  8250. "/api/session/{sessionID}/prompt": {
  8251. "post": {
  8252. "tags": ["v2"],
  8253. "operationId": "v2.session.prompt",
  8254. "parameters": [
  8255. {
  8256. "name": "sessionID",
  8257. "in": "path",
  8258. "schema": {
  8259. "type": "string",
  8260. "pattern": "^ses"
  8261. },
  8262. "required": true
  8263. },
  8264. {
  8265. "name": "directory",
  8266. "in": "query",
  8267. "schema": {
  8268. "type": "string"
  8269. },
  8270. "required": false
  8271. },
  8272. {
  8273. "name": "workspace",
  8274. "in": "query",
  8275. "schema": {
  8276. "type": "string"
  8277. },
  8278. "required": false
  8279. }
  8280. ],
  8281. "security": [],
  8282. "responses": {
  8283. "200": {
  8284. "description": "Session.Message",
  8285. "content": {
  8286. "application/json": {
  8287. "schema": {
  8288. "$ref": "#/components/schemas/SessionMessage"
  8289. }
  8290. }
  8291. }
  8292. },
  8293. "400": {
  8294. "description": "InvalidRequestError",
  8295. "content": {
  8296. "application/json": {
  8297. "schema": {
  8298. "$ref": "#/components/schemas/InvalidRequestError"
  8299. }
  8300. }
  8301. }
  8302. },
  8303. "401": {
  8304. "description": "UnauthorizedError",
  8305. "content": {
  8306. "application/json": {
  8307. "schema": {
  8308. "$ref": "#/components/schemas/UnauthorizedError"
  8309. }
  8310. }
  8311. }
  8312. },
  8313. "404": {
  8314. "description": "SessionNotFoundError",
  8315. "content": {
  8316. "application/json": {
  8317. "schema": {
  8318. "$ref": "#/components/schemas/SessionNotFoundError"
  8319. }
  8320. }
  8321. }
  8322. },
  8323. "503": {
  8324. "description": "ServiceUnavailableError",
  8325. "content": {
  8326. "application/json": {
  8327. "schema": {
  8328. "$ref": "#/components/schemas/ServiceUnavailableError"
  8329. }
  8330. }
  8331. }
  8332. }
  8333. },
  8334. "description": "Create a v2 session message and queue it for the agent loop.",
  8335. "summary": "Send v2 message",
  8336. "requestBody": {
  8337. "content": {
  8338. "application/json": {
  8339. "schema": {
  8340. "type": "object",
  8341. "properties": {
  8342. "prompt": {
  8343. "$ref": "#/components/schemas/Prompt"
  8344. },
  8345. "delivery": {
  8346. "$ref": "#/components/schemas/SessionDelivery"
  8347. }
  8348. },
  8349. "required": ["prompt"],
  8350. "additionalProperties": false
  8351. }
  8352. }
  8353. }
  8354. },
  8355. "x-codeSamples": [
  8356. {
  8357. "lang": "js",
  8358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8359. }
  8360. ]
  8361. }
  8362. },
  8363. "/api/session/{sessionID}/compact": {
  8364. "post": {
  8365. "tags": ["v2"],
  8366. "operationId": "v2.session.compact",
  8367. "parameters": [
  8368. {
  8369. "name": "sessionID",
  8370. "in": "path",
  8371. "schema": {
  8372. "type": "string",
  8373. "pattern": "^ses"
  8374. },
  8375. "required": true
  8376. },
  8377. {
  8378. "name": "directory",
  8379. "in": "query",
  8380. "schema": {
  8381. "type": "string"
  8382. },
  8383. "required": false
  8384. },
  8385. {
  8386. "name": "workspace",
  8387. "in": "query",
  8388. "schema": {
  8389. "type": "string"
  8390. },
  8391. "required": false
  8392. }
  8393. ],
  8394. "security": [],
  8395. "responses": {
  8396. "204": {
  8397. "description": "<No Content>"
  8398. },
  8399. "400": {
  8400. "description": "InvalidRequestError",
  8401. "content": {
  8402. "application/json": {
  8403. "schema": {
  8404. "$ref": "#/components/schemas/InvalidRequestError"
  8405. }
  8406. }
  8407. }
  8408. },
  8409. "401": {
  8410. "description": "UnauthorizedError",
  8411. "content": {
  8412. "application/json": {
  8413. "schema": {
  8414. "$ref": "#/components/schemas/UnauthorizedError"
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "404": {
  8420. "description": "SessionNotFoundError",
  8421. "content": {
  8422. "application/json": {
  8423. "schema": {
  8424. "$ref": "#/components/schemas/SessionNotFoundError"
  8425. }
  8426. }
  8427. }
  8428. },
  8429. "503": {
  8430. "description": "ServiceUnavailableError",
  8431. "content": {
  8432. "application/json": {
  8433. "schema": {
  8434. "$ref": "#/components/schemas/ServiceUnavailableError"
  8435. }
  8436. }
  8437. }
  8438. }
  8439. },
  8440. "description": "Compact a v2 session conversation.",
  8441. "summary": "Compact v2 session",
  8442. "x-codeSamples": [
  8443. {
  8444. "lang": "js",
  8445. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8446. }
  8447. ]
  8448. }
  8449. },
  8450. "/api/session/{sessionID}/wait": {
  8451. "post": {
  8452. "tags": ["v2"],
  8453. "operationId": "v2.session.wait",
  8454. "parameters": [
  8455. {
  8456. "name": "sessionID",
  8457. "in": "path",
  8458. "schema": {
  8459. "type": "string",
  8460. "pattern": "^ses"
  8461. },
  8462. "required": true
  8463. },
  8464. {
  8465. "name": "directory",
  8466. "in": "query",
  8467. "schema": {
  8468. "type": "string"
  8469. },
  8470. "required": false
  8471. },
  8472. {
  8473. "name": "workspace",
  8474. "in": "query",
  8475. "schema": {
  8476. "type": "string"
  8477. },
  8478. "required": false
  8479. }
  8480. ],
  8481. "security": [],
  8482. "responses": {
  8483. "204": {
  8484. "description": "<No Content>"
  8485. },
  8486. "400": {
  8487. "description": "InvalidRequestError",
  8488. "content": {
  8489. "application/json": {
  8490. "schema": {
  8491. "$ref": "#/components/schemas/InvalidRequestError"
  8492. }
  8493. }
  8494. }
  8495. },
  8496. "401": {
  8497. "description": "UnauthorizedError",
  8498. "content": {
  8499. "application/json": {
  8500. "schema": {
  8501. "$ref": "#/components/schemas/UnauthorizedError"
  8502. }
  8503. }
  8504. }
  8505. },
  8506. "404": {
  8507. "description": "SessionNotFoundError",
  8508. "content": {
  8509. "application/json": {
  8510. "schema": {
  8511. "$ref": "#/components/schemas/SessionNotFoundError"
  8512. }
  8513. }
  8514. }
  8515. },
  8516. "503": {
  8517. "description": "ServiceUnavailableError",
  8518. "content": {
  8519. "application/json": {
  8520. "schema": {
  8521. "$ref": "#/components/schemas/ServiceUnavailableError"
  8522. }
  8523. }
  8524. }
  8525. }
  8526. },
  8527. "description": "Wait for a v2 session agent loop to become idle.",
  8528. "summary": "Wait for v2 session",
  8529. "x-codeSamples": [
  8530. {
  8531. "lang": "js",
  8532. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8533. }
  8534. ]
  8535. }
  8536. },
  8537. "/api/session/{sessionID}/context": {
  8538. "get": {
  8539. "tags": ["v2"],
  8540. "operationId": "v2.session.context",
  8541. "parameters": [
  8542. {
  8543. "name": "sessionID",
  8544. "in": "path",
  8545. "schema": {
  8546. "type": "string",
  8547. "pattern": "^ses"
  8548. },
  8549. "required": true
  8550. },
  8551. {
  8552. "name": "directory",
  8553. "in": "query",
  8554. "schema": {
  8555. "type": "string"
  8556. },
  8557. "required": false
  8558. },
  8559. {
  8560. "name": "workspace",
  8561. "in": "query",
  8562. "schema": {
  8563. "type": "string"
  8564. },
  8565. "required": false
  8566. }
  8567. ],
  8568. "security": [],
  8569. "responses": {
  8570. "200": {
  8571. "description": "Success",
  8572. "content": {
  8573. "application/json": {
  8574. "schema": {
  8575. "type": "array",
  8576. "items": {
  8577. "$ref": "#/components/schemas/SessionMessage"
  8578. }
  8579. }
  8580. }
  8581. }
  8582. },
  8583. "400": {
  8584. "description": "InvalidRequestError",
  8585. "content": {
  8586. "application/json": {
  8587. "schema": {
  8588. "$ref": "#/components/schemas/InvalidRequestError"
  8589. }
  8590. }
  8591. }
  8592. },
  8593. "401": {
  8594. "description": "UnauthorizedError",
  8595. "content": {
  8596. "application/json": {
  8597. "schema": {
  8598. "$ref": "#/components/schemas/UnauthorizedError"
  8599. }
  8600. }
  8601. }
  8602. },
  8603. "404": {
  8604. "description": "SessionNotFoundError",
  8605. "content": {
  8606. "application/json": {
  8607. "schema": {
  8608. "$ref": "#/components/schemas/SessionNotFoundError"
  8609. }
  8610. }
  8611. }
  8612. },
  8613. "500": {
  8614. "description": "UnknownError",
  8615. "content": {
  8616. "application/json": {
  8617. "schema": {
  8618. "$ref": "#/components/schemas/UnknownError1"
  8619. }
  8620. }
  8621. }
  8622. }
  8623. },
  8624. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8625. "summary": "Get v2 session context",
  8626. "x-codeSamples": [
  8627. {
  8628. "lang": "js",
  8629. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8630. }
  8631. ]
  8632. }
  8633. },
  8634. "/api/session/{sessionID}/message": {
  8635. "get": {
  8636. "tags": ["v2 messages"],
  8637. "operationId": "v2.session.messages",
  8638. "parameters": [
  8639. {
  8640. "name": "sessionID",
  8641. "in": "path",
  8642. "schema": {
  8643. "type": "string",
  8644. "pattern": "^ses"
  8645. },
  8646. "required": true
  8647. },
  8648. {
  8649. "name": "directory",
  8650. "in": "query",
  8651. "schema": {
  8652. "type": "string"
  8653. },
  8654. "required": false
  8655. },
  8656. {
  8657. "name": "workspace",
  8658. "in": "query",
  8659. "schema": {
  8660. "type": "string"
  8661. },
  8662. "required": false
  8663. },
  8664. {
  8665. "name": "limit",
  8666. "in": "query",
  8667. "schema": {
  8668. "type": "number"
  8669. },
  8670. "required": false
  8671. },
  8672. {
  8673. "name": "order",
  8674. "in": "query",
  8675. "schema": {
  8676. "type": "string",
  8677. "enum": ["asc", "desc"]
  8678. },
  8679. "required": false
  8680. },
  8681. {
  8682. "name": "cursor",
  8683. "in": "query",
  8684. "schema": {
  8685. "type": "string",
  8686. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8687. },
  8688. "required": false
  8689. }
  8690. ],
  8691. "security": [],
  8692. "responses": {
  8693. "200": {
  8694. "description": "V2SessionMessagesResponse",
  8695. "content": {
  8696. "application/json": {
  8697. "schema": {
  8698. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8699. }
  8700. }
  8701. }
  8702. },
  8703. "400": {
  8704. "description": "InvalidCursorError | InvalidRequestError",
  8705. "content": {
  8706. "application/json": {
  8707. "schema": {
  8708. "anyOf": [
  8709. {
  8710. "$ref": "#/components/schemas/InvalidCursorError"
  8711. },
  8712. {
  8713. "$ref": "#/components/schemas/InvalidRequestError"
  8714. }
  8715. ]
  8716. }
  8717. }
  8718. }
  8719. },
  8720. "401": {
  8721. "description": "UnauthorizedError",
  8722. "content": {
  8723. "application/json": {
  8724. "schema": {
  8725. "$ref": "#/components/schemas/UnauthorizedError"
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "404": {
  8731. "description": "SessionNotFoundError",
  8732. "content": {
  8733. "application/json": {
  8734. "schema": {
  8735. "$ref": "#/components/schemas/SessionNotFoundError"
  8736. }
  8737. }
  8738. }
  8739. },
  8740. "500": {
  8741. "description": "UnknownError",
  8742. "content": {
  8743. "application/json": {
  8744. "schema": {
  8745. "$ref": "#/components/schemas/UnknownError1"
  8746. }
  8747. }
  8748. }
  8749. }
  8750. },
  8751. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  8752. "summary": "Get v2 session messages",
  8753. "x-codeSamples": [
  8754. {
  8755. "lang": "js",
  8756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8757. }
  8758. ]
  8759. }
  8760. },
  8761. "/api/model": {
  8762. "get": {
  8763. "tags": ["v2 models"],
  8764. "operationId": "v2.model.list",
  8765. "parameters": [
  8766. {
  8767. "name": "location",
  8768. "in": "query",
  8769. "schema": {
  8770. "type": "object",
  8771. "properties": {
  8772. "directory": {
  8773. "type": "string"
  8774. },
  8775. "workspace": {
  8776. "type": "string"
  8777. }
  8778. },
  8779. "additionalProperties": false
  8780. },
  8781. "required": false,
  8782. "style": "deepObject",
  8783. "explode": true
  8784. }
  8785. ],
  8786. "security": [],
  8787. "responses": {
  8788. "200": {
  8789. "description": "Success",
  8790. "content": {
  8791. "application/json": {
  8792. "schema": {
  8793. "type": "array",
  8794. "items": {
  8795. "$ref": "#/components/schemas/ModelV2Info"
  8796. }
  8797. }
  8798. }
  8799. }
  8800. },
  8801. "400": {
  8802. "description": "InvalidRequestError",
  8803. "content": {
  8804. "application/json": {
  8805. "schema": {
  8806. "$ref": "#/components/schemas/InvalidRequestError"
  8807. }
  8808. }
  8809. }
  8810. },
  8811. "401": {
  8812. "description": "UnauthorizedError",
  8813. "content": {
  8814. "application/json": {
  8815. "schema": {
  8816. "$ref": "#/components/schemas/UnauthorizedError"
  8817. }
  8818. }
  8819. }
  8820. },
  8821. "503": {
  8822. "description": "ServiceUnavailableError",
  8823. "content": {
  8824. "application/json": {
  8825. "schema": {
  8826. "$ref": "#/components/schemas/ServiceUnavailableError"
  8827. }
  8828. }
  8829. }
  8830. }
  8831. },
  8832. "description": "Retrieve available v2 models ordered by release date.",
  8833. "summary": "List v2 models",
  8834. "x-codeSamples": [
  8835. {
  8836. "lang": "js",
  8837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8838. }
  8839. ]
  8840. }
  8841. },
  8842. "/api/provider": {
  8843. "get": {
  8844. "tags": ["v2 providers"],
  8845. "operationId": "v2.provider.list",
  8846. "parameters": [
  8847. {
  8848. "name": "location",
  8849. "in": "query",
  8850. "schema": {
  8851. "type": "object",
  8852. "properties": {
  8853. "directory": {
  8854. "type": "string"
  8855. },
  8856. "workspace": {
  8857. "type": "string"
  8858. }
  8859. },
  8860. "additionalProperties": false
  8861. },
  8862. "required": false,
  8863. "style": "deepObject",
  8864. "explode": true
  8865. }
  8866. ],
  8867. "security": [],
  8868. "responses": {
  8869. "200": {
  8870. "description": "Success",
  8871. "content": {
  8872. "application/json": {
  8873. "schema": {
  8874. "type": "array",
  8875. "items": {
  8876. "$ref": "#/components/schemas/ProviderV2Info"
  8877. }
  8878. }
  8879. }
  8880. }
  8881. },
  8882. "400": {
  8883. "description": "InvalidRequestError",
  8884. "content": {
  8885. "application/json": {
  8886. "schema": {
  8887. "$ref": "#/components/schemas/InvalidRequestError"
  8888. }
  8889. }
  8890. }
  8891. },
  8892. "401": {
  8893. "description": "UnauthorizedError",
  8894. "content": {
  8895. "application/json": {
  8896. "schema": {
  8897. "$ref": "#/components/schemas/UnauthorizedError"
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "503": {
  8903. "description": "ServiceUnavailableError",
  8904. "content": {
  8905. "application/json": {
  8906. "schema": {
  8907. "$ref": "#/components/schemas/ServiceUnavailableError"
  8908. }
  8909. }
  8910. }
  8911. }
  8912. },
  8913. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8914. "summary": "List v2 providers",
  8915. "x-codeSamples": [
  8916. {
  8917. "lang": "js",
  8918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8919. }
  8920. ]
  8921. }
  8922. },
  8923. "/api/provider/{providerID}": {
  8924. "get": {
  8925. "tags": ["v2 providers"],
  8926. "operationId": "v2.provider.get",
  8927. "parameters": [
  8928. {
  8929. "name": "providerID",
  8930. "in": "path",
  8931. "schema": {
  8932. "type": "string"
  8933. },
  8934. "required": true
  8935. },
  8936. {
  8937. "name": "location",
  8938. "in": "query",
  8939. "schema": {
  8940. "type": "object",
  8941. "properties": {
  8942. "directory": {
  8943. "type": "string"
  8944. },
  8945. "workspace": {
  8946. "type": "string"
  8947. }
  8948. },
  8949. "additionalProperties": false
  8950. },
  8951. "required": false,
  8952. "style": "deepObject",
  8953. "explode": true
  8954. }
  8955. ],
  8956. "security": [],
  8957. "responses": {
  8958. "200": {
  8959. "description": "ProviderV2.Info",
  8960. "content": {
  8961. "application/json": {
  8962. "schema": {
  8963. "$ref": "#/components/schemas/ProviderV2Info"
  8964. }
  8965. }
  8966. }
  8967. },
  8968. "400": {
  8969. "description": "InvalidRequestError",
  8970. "content": {
  8971. "application/json": {
  8972. "schema": {
  8973. "$ref": "#/components/schemas/InvalidRequestError"
  8974. }
  8975. }
  8976. }
  8977. },
  8978. "401": {
  8979. "description": "UnauthorizedError",
  8980. "content": {
  8981. "application/json": {
  8982. "schema": {
  8983. "$ref": "#/components/schemas/UnauthorizedError"
  8984. }
  8985. }
  8986. }
  8987. },
  8988. "404": {
  8989. "description": "ProviderNotFoundError",
  8990. "content": {
  8991. "application/json": {
  8992. "schema": {
  8993. "$ref": "#/components/schemas/ProviderNotFoundError"
  8994. }
  8995. }
  8996. }
  8997. },
  8998. "503": {
  8999. "description": "ServiceUnavailableError",
  9000. "content": {
  9001. "application/json": {
  9002. "schema": {
  9003. "$ref": "#/components/schemas/ServiceUnavailableError"
  9004. }
  9005. }
  9006. }
  9007. }
  9008. },
  9009. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  9010. "summary": "Get v2 provider",
  9011. "x-codeSamples": [
  9012. {
  9013. "lang": "js",
  9014. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9015. }
  9016. ]
  9017. }
  9018. },
  9019. "/tui/append-prompt": {
  9020. "post": {
  9021. "tags": ["tui"],
  9022. "operationId": "tui.appendPrompt",
  9023. "parameters": [
  9024. {
  9025. "name": "directory",
  9026. "in": "query",
  9027. "schema": {
  9028. "type": "string"
  9029. },
  9030. "required": false
  9031. },
  9032. {
  9033. "name": "workspace",
  9034. "in": "query",
  9035. "schema": {
  9036. "type": "string"
  9037. },
  9038. "required": false
  9039. }
  9040. ],
  9041. "responses": {
  9042. "200": {
  9043. "description": "Prompt processed successfully",
  9044. "content": {
  9045. "application/json": {
  9046. "schema": {
  9047. "type": "boolean",
  9048. "description": "Prompt processed successfully"
  9049. }
  9050. }
  9051. }
  9052. },
  9053. "400": {
  9054. "description": "BadRequest | InvalidRequestError",
  9055. "content": {
  9056. "application/json": {
  9057. "schema": {
  9058. "anyOf": [
  9059. {
  9060. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9061. },
  9062. {
  9063. "$ref": "#/components/schemas/InvalidRequestError"
  9064. }
  9065. ]
  9066. }
  9067. }
  9068. }
  9069. }
  9070. },
  9071. "description": "Append prompt to the TUI.",
  9072. "summary": "Append TUI prompt",
  9073. "requestBody": {
  9074. "content": {
  9075. "application/json": {
  9076. "schema": {
  9077. "type": "object",
  9078. "properties": {
  9079. "text": {
  9080. "type": "string"
  9081. }
  9082. },
  9083. "required": ["text"],
  9084. "additionalProperties": false
  9085. }
  9086. }
  9087. }
  9088. },
  9089. "x-codeSamples": [
  9090. {
  9091. "lang": "js",
  9092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9093. }
  9094. ]
  9095. }
  9096. },
  9097. "/tui/open-help": {
  9098. "post": {
  9099. "tags": ["tui"],
  9100. "operationId": "tui.openHelp",
  9101. "parameters": [
  9102. {
  9103. "name": "directory",
  9104. "in": "query",
  9105. "schema": {
  9106. "type": "string"
  9107. },
  9108. "required": false
  9109. },
  9110. {
  9111. "name": "workspace",
  9112. "in": "query",
  9113. "schema": {
  9114. "type": "string"
  9115. },
  9116. "required": false
  9117. }
  9118. ],
  9119. "responses": {
  9120. "200": {
  9121. "description": "Help dialog opened successfully",
  9122. "content": {
  9123. "application/json": {
  9124. "schema": {
  9125. "type": "boolean",
  9126. "description": "Help dialog opened successfully"
  9127. }
  9128. }
  9129. }
  9130. },
  9131. "400": {
  9132. "description": "Bad request",
  9133. "content": {
  9134. "application/json": {
  9135. "schema": {
  9136. "$ref": "#/components/schemas/BadRequestError"
  9137. }
  9138. }
  9139. }
  9140. }
  9141. },
  9142. "description": "Open the help dialog in the TUI to display user assistance information.",
  9143. "summary": "Open help dialog",
  9144. "x-codeSamples": [
  9145. {
  9146. "lang": "js",
  9147. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9148. }
  9149. ]
  9150. }
  9151. },
  9152. "/tui/open-sessions": {
  9153. "post": {
  9154. "tags": ["tui"],
  9155. "operationId": "tui.openSessions",
  9156. "parameters": [
  9157. {
  9158. "name": "directory",
  9159. "in": "query",
  9160. "schema": {
  9161. "type": "string"
  9162. },
  9163. "required": false
  9164. },
  9165. {
  9166. "name": "workspace",
  9167. "in": "query",
  9168. "schema": {
  9169. "type": "string"
  9170. },
  9171. "required": false
  9172. }
  9173. ],
  9174. "responses": {
  9175. "200": {
  9176. "description": "Session dialog opened successfully",
  9177. "content": {
  9178. "application/json": {
  9179. "schema": {
  9180. "type": "boolean",
  9181. "description": "Session dialog opened successfully"
  9182. }
  9183. }
  9184. }
  9185. },
  9186. "400": {
  9187. "description": "Bad request",
  9188. "content": {
  9189. "application/json": {
  9190. "schema": {
  9191. "$ref": "#/components/schemas/BadRequestError"
  9192. }
  9193. }
  9194. }
  9195. }
  9196. },
  9197. "description": "Open the session dialog.",
  9198. "summary": "Open sessions dialog",
  9199. "x-codeSamples": [
  9200. {
  9201. "lang": "js",
  9202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9203. }
  9204. ]
  9205. }
  9206. },
  9207. "/tui/open-themes": {
  9208. "post": {
  9209. "tags": ["tui"],
  9210. "operationId": "tui.openThemes",
  9211. "parameters": [
  9212. {
  9213. "name": "directory",
  9214. "in": "query",
  9215. "schema": {
  9216. "type": "string"
  9217. },
  9218. "required": false
  9219. },
  9220. {
  9221. "name": "workspace",
  9222. "in": "query",
  9223. "schema": {
  9224. "type": "string"
  9225. },
  9226. "required": false
  9227. }
  9228. ],
  9229. "responses": {
  9230. "200": {
  9231. "description": "Theme dialog opened successfully",
  9232. "content": {
  9233. "application/json": {
  9234. "schema": {
  9235. "type": "boolean",
  9236. "description": "Theme dialog opened successfully"
  9237. }
  9238. }
  9239. }
  9240. },
  9241. "400": {
  9242. "description": "Bad request",
  9243. "content": {
  9244. "application/json": {
  9245. "schema": {
  9246. "$ref": "#/components/schemas/BadRequestError"
  9247. }
  9248. }
  9249. }
  9250. }
  9251. },
  9252. "description": "Open the theme dialog.",
  9253. "summary": "Open themes dialog",
  9254. "x-codeSamples": [
  9255. {
  9256. "lang": "js",
  9257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9258. }
  9259. ]
  9260. }
  9261. },
  9262. "/tui/open-models": {
  9263. "post": {
  9264. "tags": ["tui"],
  9265. "operationId": "tui.openModels",
  9266. "parameters": [
  9267. {
  9268. "name": "directory",
  9269. "in": "query",
  9270. "schema": {
  9271. "type": "string"
  9272. },
  9273. "required": false
  9274. },
  9275. {
  9276. "name": "workspace",
  9277. "in": "query",
  9278. "schema": {
  9279. "type": "string"
  9280. },
  9281. "required": false
  9282. }
  9283. ],
  9284. "responses": {
  9285. "200": {
  9286. "description": "Model dialog opened successfully",
  9287. "content": {
  9288. "application/json": {
  9289. "schema": {
  9290. "type": "boolean",
  9291. "description": "Model dialog opened successfully"
  9292. }
  9293. }
  9294. }
  9295. },
  9296. "400": {
  9297. "description": "Bad request",
  9298. "content": {
  9299. "application/json": {
  9300. "schema": {
  9301. "$ref": "#/components/schemas/BadRequestError"
  9302. }
  9303. }
  9304. }
  9305. }
  9306. },
  9307. "description": "Open the model dialog.",
  9308. "summary": "Open models dialog",
  9309. "x-codeSamples": [
  9310. {
  9311. "lang": "js",
  9312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9313. }
  9314. ]
  9315. }
  9316. },
  9317. "/tui/submit-prompt": {
  9318. "post": {
  9319. "tags": ["tui"],
  9320. "operationId": "tui.submitPrompt",
  9321. "parameters": [
  9322. {
  9323. "name": "directory",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. },
  9330. {
  9331. "name": "workspace",
  9332. "in": "query",
  9333. "schema": {
  9334. "type": "string"
  9335. },
  9336. "required": false
  9337. }
  9338. ],
  9339. "responses": {
  9340. "200": {
  9341. "description": "Prompt submitted successfully",
  9342. "content": {
  9343. "application/json": {
  9344. "schema": {
  9345. "type": "boolean",
  9346. "description": "Prompt submitted successfully"
  9347. }
  9348. }
  9349. }
  9350. },
  9351. "400": {
  9352. "description": "Bad request",
  9353. "content": {
  9354. "application/json": {
  9355. "schema": {
  9356. "$ref": "#/components/schemas/BadRequestError"
  9357. }
  9358. }
  9359. }
  9360. }
  9361. },
  9362. "description": "Submit the prompt.",
  9363. "summary": "Submit TUI prompt",
  9364. "x-codeSamples": [
  9365. {
  9366. "lang": "js",
  9367. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9368. }
  9369. ]
  9370. }
  9371. },
  9372. "/tui/clear-prompt": {
  9373. "post": {
  9374. "tags": ["tui"],
  9375. "operationId": "tui.clearPrompt",
  9376. "parameters": [
  9377. {
  9378. "name": "directory",
  9379. "in": "query",
  9380. "schema": {
  9381. "type": "string"
  9382. },
  9383. "required": false
  9384. },
  9385. {
  9386. "name": "workspace",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. }
  9393. ],
  9394. "responses": {
  9395. "200": {
  9396. "description": "Prompt cleared successfully",
  9397. "content": {
  9398. "application/json": {
  9399. "schema": {
  9400. "type": "boolean",
  9401. "description": "Prompt cleared successfully"
  9402. }
  9403. }
  9404. }
  9405. },
  9406. "400": {
  9407. "description": "Bad request",
  9408. "content": {
  9409. "application/json": {
  9410. "schema": {
  9411. "$ref": "#/components/schemas/BadRequestError"
  9412. }
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "description": "Clear the prompt.",
  9418. "summary": "Clear TUI prompt",
  9419. "x-codeSamples": [
  9420. {
  9421. "lang": "js",
  9422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9423. }
  9424. ]
  9425. }
  9426. },
  9427. "/tui/execute-command": {
  9428. "post": {
  9429. "tags": ["tui"],
  9430. "operationId": "tui.executeCommand",
  9431. "parameters": [
  9432. {
  9433. "name": "directory",
  9434. "in": "query",
  9435. "schema": {
  9436. "type": "string"
  9437. },
  9438. "required": false
  9439. },
  9440. {
  9441. "name": "workspace",
  9442. "in": "query",
  9443. "schema": {
  9444. "type": "string"
  9445. },
  9446. "required": false
  9447. }
  9448. ],
  9449. "responses": {
  9450. "200": {
  9451. "description": "Command executed successfully",
  9452. "content": {
  9453. "application/json": {
  9454. "schema": {
  9455. "type": "boolean",
  9456. "description": "Command executed successfully"
  9457. }
  9458. }
  9459. }
  9460. },
  9461. "400": {
  9462. "description": "BadRequest | InvalidRequestError",
  9463. "content": {
  9464. "application/json": {
  9465. "schema": {
  9466. "anyOf": [
  9467. {
  9468. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9469. },
  9470. {
  9471. "$ref": "#/components/schemas/InvalidRequestError"
  9472. }
  9473. ]
  9474. }
  9475. }
  9476. }
  9477. }
  9478. },
  9479. "description": "Execute a TUI command.",
  9480. "summary": "Execute TUI command",
  9481. "requestBody": {
  9482. "content": {
  9483. "application/json": {
  9484. "schema": {
  9485. "type": "object",
  9486. "properties": {
  9487. "command": {
  9488. "type": "string"
  9489. }
  9490. },
  9491. "required": ["command"],
  9492. "additionalProperties": false
  9493. }
  9494. }
  9495. }
  9496. },
  9497. "x-codeSamples": [
  9498. {
  9499. "lang": "js",
  9500. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9501. }
  9502. ]
  9503. }
  9504. },
  9505. "/tui/show-toast": {
  9506. "post": {
  9507. "tags": ["tui"],
  9508. "operationId": "tui.showToast",
  9509. "parameters": [
  9510. {
  9511. "name": "directory",
  9512. "in": "query",
  9513. "schema": {
  9514. "type": "string"
  9515. },
  9516. "required": false
  9517. },
  9518. {
  9519. "name": "workspace",
  9520. "in": "query",
  9521. "schema": {
  9522. "type": "string"
  9523. },
  9524. "required": false
  9525. }
  9526. ],
  9527. "responses": {
  9528. "200": {
  9529. "description": "Toast notification shown successfully",
  9530. "content": {
  9531. "application/json": {
  9532. "schema": {
  9533. "type": "boolean",
  9534. "description": "Toast notification shown successfully"
  9535. }
  9536. }
  9537. }
  9538. },
  9539. "400": {
  9540. "description": "Bad request",
  9541. "content": {
  9542. "application/json": {
  9543. "schema": {
  9544. "$ref": "#/components/schemas/BadRequestError"
  9545. }
  9546. }
  9547. }
  9548. }
  9549. },
  9550. "description": "Show a toast notification in the TUI.",
  9551. "summary": "Show TUI toast",
  9552. "requestBody": {
  9553. "content": {
  9554. "application/json": {
  9555. "schema": {
  9556. "type": "object",
  9557. "properties": {
  9558. "title": {
  9559. "type": "string"
  9560. },
  9561. "message": {
  9562. "type": "string"
  9563. },
  9564. "variant": {
  9565. "type": "string",
  9566. "enum": ["info", "success", "warning", "error"]
  9567. },
  9568. "duration": {
  9569. "type": "integer",
  9570. "exclusiveMinimum": 0
  9571. }
  9572. },
  9573. "required": ["message", "variant"],
  9574. "additionalProperties": false
  9575. }
  9576. }
  9577. }
  9578. },
  9579. "x-codeSamples": [
  9580. {
  9581. "lang": "js",
  9582. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9583. }
  9584. ]
  9585. }
  9586. },
  9587. "/tui/publish": {
  9588. "post": {
  9589. "tags": ["tui"],
  9590. "operationId": "tui.publish",
  9591. "parameters": [
  9592. {
  9593. "name": "directory",
  9594. "in": "query",
  9595. "schema": {
  9596. "type": "string"
  9597. },
  9598. "required": false
  9599. },
  9600. {
  9601. "name": "workspace",
  9602. "in": "query",
  9603. "schema": {
  9604. "type": "string"
  9605. },
  9606. "required": false
  9607. }
  9608. ],
  9609. "responses": {
  9610. "200": {
  9611. "description": "Event published successfully",
  9612. "content": {
  9613. "application/json": {
  9614. "schema": {
  9615. "type": "boolean",
  9616. "description": "Event published successfully"
  9617. }
  9618. }
  9619. }
  9620. },
  9621. "400": {
  9622. "description": "BadRequest | InvalidRequestError",
  9623. "content": {
  9624. "application/json": {
  9625. "schema": {
  9626. "anyOf": [
  9627. {
  9628. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9629. },
  9630. {
  9631. "$ref": "#/components/schemas/InvalidRequestError"
  9632. }
  9633. ]
  9634. }
  9635. }
  9636. }
  9637. }
  9638. },
  9639. "description": "Publish a TUI event.",
  9640. "summary": "Publish TUI event",
  9641. "requestBody": {
  9642. "content": {
  9643. "application/json": {
  9644. "schema": {
  9645. "anyOf": [
  9646. {
  9647. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9648. },
  9649. {
  9650. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9651. },
  9652. {
  9653. "$ref": "#/components/schemas/EventTuiToastShow"
  9654. },
  9655. {
  9656. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9657. }
  9658. ]
  9659. }
  9660. }
  9661. }
  9662. },
  9663. "x-codeSamples": [
  9664. {
  9665. "lang": "js",
  9666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9667. }
  9668. ]
  9669. }
  9670. },
  9671. "/tui/select-session": {
  9672. "post": {
  9673. "tags": ["tui"],
  9674. "operationId": "tui.selectSession",
  9675. "parameters": [
  9676. {
  9677. "name": "directory",
  9678. "in": "query",
  9679. "schema": {
  9680. "type": "string"
  9681. },
  9682. "required": false
  9683. },
  9684. {
  9685. "name": "workspace",
  9686. "in": "query",
  9687. "schema": {
  9688. "type": "string"
  9689. },
  9690. "required": false
  9691. }
  9692. ],
  9693. "responses": {
  9694. "200": {
  9695. "description": "Session selected successfully",
  9696. "content": {
  9697. "application/json": {
  9698. "schema": {
  9699. "type": "boolean",
  9700. "description": "Session selected successfully"
  9701. }
  9702. }
  9703. }
  9704. },
  9705. "400": {
  9706. "description": "BadRequest | InvalidRequestError",
  9707. "content": {
  9708. "application/json": {
  9709. "schema": {
  9710. "anyOf": [
  9711. {
  9712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9713. },
  9714. {
  9715. "$ref": "#/components/schemas/InvalidRequestError"
  9716. }
  9717. ]
  9718. }
  9719. }
  9720. }
  9721. },
  9722. "404": {
  9723. "description": "NotFoundError",
  9724. "content": {
  9725. "application/json": {
  9726. "schema": {
  9727. "$ref": "#/components/schemas/NotFoundError"
  9728. }
  9729. }
  9730. }
  9731. }
  9732. },
  9733. "description": "Navigate the TUI to display the specified session.",
  9734. "summary": "Select session",
  9735. "requestBody": {
  9736. "content": {
  9737. "application/json": {
  9738. "schema": {
  9739. "type": "object",
  9740. "properties": {
  9741. "sessionID": {
  9742. "type": "string",
  9743. "pattern": "^ses",
  9744. "description": "Session ID to navigate to"
  9745. }
  9746. },
  9747. "required": ["sessionID"],
  9748. "additionalProperties": false
  9749. }
  9750. }
  9751. }
  9752. },
  9753. "x-codeSamples": [
  9754. {
  9755. "lang": "js",
  9756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9757. }
  9758. ]
  9759. }
  9760. },
  9761. "/tui/control/next": {
  9762. "get": {
  9763. "tags": ["tui"],
  9764. "operationId": "tui.control.next",
  9765. "parameters": [
  9766. {
  9767. "name": "directory",
  9768. "in": "query",
  9769. "schema": {
  9770. "type": "string"
  9771. },
  9772. "required": false
  9773. },
  9774. {
  9775. "name": "workspace",
  9776. "in": "query",
  9777. "schema": {
  9778. "type": "string"
  9779. },
  9780. "required": false
  9781. }
  9782. ],
  9783. "responses": {
  9784. "200": {
  9785. "description": "Next TUI request",
  9786. "content": {
  9787. "application/json": {
  9788. "schema": {
  9789. "type": "object",
  9790. "properties": {
  9791. "path": {
  9792. "type": "string"
  9793. },
  9794. "body": {}
  9795. },
  9796. "required": ["path", "body"],
  9797. "additionalProperties": false,
  9798. "description": "Next TUI request"
  9799. }
  9800. }
  9801. }
  9802. },
  9803. "400": {
  9804. "description": "Bad request",
  9805. "content": {
  9806. "application/json": {
  9807. "schema": {
  9808. "$ref": "#/components/schemas/BadRequestError"
  9809. }
  9810. }
  9811. }
  9812. }
  9813. },
  9814. "description": "Retrieve the next TUI request from the queue for processing.",
  9815. "summary": "Get next TUI request",
  9816. "x-codeSamples": [
  9817. {
  9818. "lang": "js",
  9819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9820. }
  9821. ]
  9822. }
  9823. },
  9824. "/tui/control/response": {
  9825. "post": {
  9826. "tags": ["tui"],
  9827. "operationId": "tui.control.response",
  9828. "parameters": [
  9829. {
  9830. "name": "directory",
  9831. "in": "query",
  9832. "schema": {
  9833. "type": "string"
  9834. },
  9835. "required": false
  9836. },
  9837. {
  9838. "name": "workspace",
  9839. "in": "query",
  9840. "schema": {
  9841. "type": "string"
  9842. },
  9843. "required": false
  9844. }
  9845. ],
  9846. "responses": {
  9847. "200": {
  9848. "description": "Response submitted successfully",
  9849. "content": {
  9850. "application/json": {
  9851. "schema": {
  9852. "type": "boolean",
  9853. "description": "Response submitted successfully"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "400": {
  9859. "description": "Bad request",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/BadRequestError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9870. "summary": "Submit TUI response",
  9871. "requestBody": {
  9872. "content": {
  9873. "application/json": {
  9874. "schema": {}
  9875. }
  9876. }
  9877. },
  9878. "x-codeSamples": [
  9879. {
  9880. "lang": "js",
  9881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9882. }
  9883. ]
  9884. }
  9885. },
  9886. "/experimental/workspace/adapter": {
  9887. "get": {
  9888. "tags": ["workspace"],
  9889. "operationId": "experimental.workspace.adapter.list",
  9890. "parameters": [
  9891. {
  9892. "name": "directory",
  9893. "in": "query",
  9894. "schema": {
  9895. "type": "string"
  9896. },
  9897. "required": false
  9898. },
  9899. {
  9900. "name": "workspace",
  9901. "in": "query",
  9902. "schema": {
  9903. "type": "string"
  9904. },
  9905. "required": false
  9906. }
  9907. ],
  9908. "responses": {
  9909. "200": {
  9910. "description": "Workspace adapters",
  9911. "content": {
  9912. "application/json": {
  9913. "schema": {
  9914. "type": "array",
  9915. "items": {
  9916. "type": "object",
  9917. "properties": {
  9918. "type": {
  9919. "type": "string"
  9920. },
  9921. "name": {
  9922. "type": "string"
  9923. },
  9924. "description": {
  9925. "type": "string"
  9926. }
  9927. },
  9928. "required": ["type", "name", "description"],
  9929. "additionalProperties": false
  9930. },
  9931. "description": "Workspace adapters"
  9932. }
  9933. }
  9934. }
  9935. },
  9936. "400": {
  9937. "description": "Bad request",
  9938. "content": {
  9939. "application/json": {
  9940. "schema": {
  9941. "$ref": "#/components/schemas/BadRequestError"
  9942. }
  9943. }
  9944. }
  9945. }
  9946. },
  9947. "description": "List all available workspace adapters for the current project.",
  9948. "summary": "List workspace adapters",
  9949. "x-codeSamples": [
  9950. {
  9951. "lang": "js",
  9952. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9953. }
  9954. ]
  9955. }
  9956. },
  9957. "/experimental/workspace": {
  9958. "get": {
  9959. "tags": ["workspace"],
  9960. "operationId": "experimental.workspace.list",
  9961. "parameters": [
  9962. {
  9963. "name": "directory",
  9964. "in": "query",
  9965. "schema": {
  9966. "type": "string"
  9967. },
  9968. "required": false
  9969. },
  9970. {
  9971. "name": "workspace",
  9972. "in": "query",
  9973. "schema": {
  9974. "type": "string"
  9975. },
  9976. "required": false
  9977. }
  9978. ],
  9979. "responses": {
  9980. "200": {
  9981. "description": "Workspaces",
  9982. "content": {
  9983. "application/json": {
  9984. "schema": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/Workspace"
  9988. },
  9989. "description": "Workspaces"
  9990. }
  9991. }
  9992. }
  9993. },
  9994. "400": {
  9995. "description": "Bad request",
  9996. "content": {
  9997. "application/json": {
  9998. "schema": {
  9999. "$ref": "#/components/schemas/BadRequestError"
  10000. }
  10001. }
  10002. }
  10003. }
  10004. },
  10005. "description": "List all workspaces.",
  10006. "summary": "List workspaces",
  10007. "x-codeSamples": [
  10008. {
  10009. "lang": "js",
  10010. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10011. }
  10012. ]
  10013. },
  10014. "post": {
  10015. "tags": ["workspace"],
  10016. "operationId": "experimental.workspace.create",
  10017. "parameters": [
  10018. {
  10019. "name": "directory",
  10020. "in": "query",
  10021. "schema": {
  10022. "type": "string"
  10023. },
  10024. "required": false
  10025. },
  10026. {
  10027. "name": "workspace",
  10028. "in": "query",
  10029. "schema": {
  10030. "type": "string"
  10031. },
  10032. "required": false
  10033. }
  10034. ],
  10035. "responses": {
  10036. "200": {
  10037. "description": "Workspace created",
  10038. "content": {
  10039. "application/json": {
  10040. "schema": {
  10041. "$ref": "#/components/schemas/Workspace"
  10042. }
  10043. }
  10044. }
  10045. },
  10046. "400": {
  10047. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  10048. "content": {
  10049. "application/json": {
  10050. "schema": {
  10051. "anyOf": [
  10052. {
  10053. "$ref": "#/components/schemas/WorkspaceCreateError"
  10054. },
  10055. {
  10056. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10057. },
  10058. {
  10059. "$ref": "#/components/schemas/InvalidRequestError"
  10060. }
  10061. ]
  10062. }
  10063. }
  10064. }
  10065. }
  10066. },
  10067. "description": "Create a workspace for the current project.",
  10068. "summary": "Create workspace",
  10069. "requestBody": {
  10070. "content": {
  10071. "application/json": {
  10072. "schema": {
  10073. "type": "object",
  10074. "properties": {
  10075. "id": {
  10076. "type": "string",
  10077. "pattern": "^wrk"
  10078. },
  10079. "type": {
  10080. "type": "string"
  10081. },
  10082. "branch": {
  10083. "anyOf": [
  10084. {
  10085. "type": "string"
  10086. },
  10087. {
  10088. "type": "null"
  10089. }
  10090. ]
  10091. },
  10092. "extra": {
  10093. "anyOf": [
  10094. {},
  10095. {
  10096. "type": "null"
  10097. }
  10098. ]
  10099. }
  10100. },
  10101. "required": ["type"],
  10102. "additionalProperties": false
  10103. }
  10104. }
  10105. }
  10106. },
  10107. "x-codeSamples": [
  10108. {
  10109. "lang": "js",
  10110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10111. }
  10112. ]
  10113. }
  10114. },
  10115. "/experimental/workspace/sync-list": {
  10116. "post": {
  10117. "tags": ["workspace"],
  10118. "operationId": "experimental.workspace.syncList",
  10119. "parameters": [
  10120. {
  10121. "name": "directory",
  10122. "in": "query",
  10123. "schema": {
  10124. "type": "string"
  10125. },
  10126. "required": false
  10127. },
  10128. {
  10129. "name": "workspace",
  10130. "in": "query",
  10131. "schema": {
  10132. "type": "string"
  10133. },
  10134. "required": false
  10135. }
  10136. ],
  10137. "responses": {
  10138. "204": {
  10139. "description": "Workspace list synced"
  10140. },
  10141. "400": {
  10142. "description": "Bad request",
  10143. "content": {
  10144. "application/json": {
  10145. "schema": {
  10146. "$ref": "#/components/schemas/BadRequestError"
  10147. }
  10148. }
  10149. }
  10150. }
  10151. },
  10152. "description": "Register missing workspaces returned by workspace adapters.",
  10153. "summary": "Sync workspace list",
  10154. "x-codeSamples": [
  10155. {
  10156. "lang": "js",
  10157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10158. }
  10159. ]
  10160. }
  10161. },
  10162. "/experimental/workspace/status": {
  10163. "get": {
  10164. "tags": ["workspace"],
  10165. "operationId": "experimental.workspace.status",
  10166. "parameters": [
  10167. {
  10168. "name": "directory",
  10169. "in": "query",
  10170. "schema": {
  10171. "type": "string"
  10172. },
  10173. "required": false
  10174. },
  10175. {
  10176. "name": "workspace",
  10177. "in": "query",
  10178. "schema": {
  10179. "type": "string"
  10180. },
  10181. "required": false
  10182. }
  10183. ],
  10184. "responses": {
  10185. "200": {
  10186. "description": "Workspace status",
  10187. "content": {
  10188. "application/json": {
  10189. "schema": {
  10190. "type": "array",
  10191. "items": {
  10192. "type": "object",
  10193. "properties": {
  10194. "workspaceID": {
  10195. "type": "string",
  10196. "pattern": "^wrk"
  10197. },
  10198. "status": {
  10199. "type": "string",
  10200. "enum": ["connected", "connecting", "disconnected", "error"]
  10201. }
  10202. },
  10203. "required": ["workspaceID", "status"],
  10204. "additionalProperties": false
  10205. },
  10206. "description": "Workspace status"
  10207. }
  10208. }
  10209. }
  10210. },
  10211. "400": {
  10212. "description": "Bad request",
  10213. "content": {
  10214. "application/json": {
  10215. "schema": {
  10216. "$ref": "#/components/schemas/BadRequestError"
  10217. }
  10218. }
  10219. }
  10220. }
  10221. },
  10222. "description": "Get connection status for workspaces in the current project.",
  10223. "summary": "Workspace status",
  10224. "x-codeSamples": [
  10225. {
  10226. "lang": "js",
  10227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10228. }
  10229. ]
  10230. }
  10231. },
  10232. "/experimental/workspace/{id}": {
  10233. "delete": {
  10234. "tags": ["workspace"],
  10235. "operationId": "experimental.workspace.remove",
  10236. "parameters": [
  10237. {
  10238. "name": "id",
  10239. "in": "path",
  10240. "schema": {
  10241. "type": "string",
  10242. "pattern": "^wrk"
  10243. },
  10244. "required": true
  10245. },
  10246. {
  10247. "name": "directory",
  10248. "in": "query",
  10249. "schema": {
  10250. "type": "string"
  10251. },
  10252. "required": false
  10253. },
  10254. {
  10255. "name": "workspace",
  10256. "in": "query",
  10257. "schema": {
  10258. "type": "string"
  10259. },
  10260. "required": false
  10261. }
  10262. ],
  10263. "responses": {
  10264. "200": {
  10265. "description": "Workspace removed",
  10266. "content": {
  10267. "application/json": {
  10268. "schema": {
  10269. "$ref": "#/components/schemas/Workspace"
  10270. }
  10271. }
  10272. }
  10273. },
  10274. "400": {
  10275. "description": "BadRequest | InvalidRequestError",
  10276. "content": {
  10277. "application/json": {
  10278. "schema": {
  10279. "anyOf": [
  10280. {
  10281. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10282. },
  10283. {
  10284. "$ref": "#/components/schemas/InvalidRequestError"
  10285. }
  10286. ]
  10287. }
  10288. }
  10289. }
  10290. }
  10291. },
  10292. "description": "Remove an existing workspace.",
  10293. "summary": "Remove workspace",
  10294. "x-codeSamples": [
  10295. {
  10296. "lang": "js",
  10297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10298. }
  10299. ]
  10300. }
  10301. },
  10302. "/experimental/workspace/warp": {
  10303. "post": {
  10304. "tags": ["workspace"],
  10305. "operationId": "experimental.workspace.warp",
  10306. "parameters": [
  10307. {
  10308. "name": "directory",
  10309. "in": "query",
  10310. "schema": {
  10311. "type": "string"
  10312. },
  10313. "required": false
  10314. },
  10315. {
  10316. "name": "workspace",
  10317. "in": "query",
  10318. "schema": {
  10319. "type": "string"
  10320. },
  10321. "required": false
  10322. }
  10323. ],
  10324. "responses": {
  10325. "204": {
  10326. "description": "Session warped"
  10327. },
  10328. "400": {
  10329. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "anyOf": [
  10334. {
  10335. "$ref": "#/components/schemas/WorkspaceWarpError"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/VcsApplyError"
  10339. },
  10340. {
  10341. "$ref": "#/components/schemas/InvalidRequestError"
  10342. }
  10343. ]
  10344. }
  10345. }
  10346. }
  10347. },
  10348. "404": {
  10349. "description": "NotFoundError",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/NotFoundError"
  10354. }
  10355. }
  10356. }
  10357. }
  10358. },
  10359. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10360. "summary": "Warp session into workspace",
  10361. "requestBody": {
  10362. "content": {
  10363. "application/json": {
  10364. "schema": {
  10365. "type": "object",
  10366. "properties": {
  10367. "id": {
  10368. "anyOf": [
  10369. {
  10370. "type": "string",
  10371. "pattern": "^wrk"
  10372. },
  10373. {
  10374. "type": "null"
  10375. }
  10376. ]
  10377. },
  10378. "sessionID": {
  10379. "type": "string",
  10380. "pattern": "^ses"
  10381. },
  10382. "copyChanges": {
  10383. "type": "boolean"
  10384. }
  10385. },
  10386. "required": ["id", "sessionID"],
  10387. "additionalProperties": false
  10388. }
  10389. }
  10390. }
  10391. },
  10392. "x-codeSamples": [
  10393. {
  10394. "lang": "js",
  10395. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10396. }
  10397. ]
  10398. }
  10399. },
  10400. "/pty/{ptyID}/connect": {
  10401. "get": {
  10402. "tags": ["pty"],
  10403. "operationId": "pty.connect",
  10404. "parameters": [
  10405. {
  10406. "name": "ptyID",
  10407. "in": "path",
  10408. "schema": {
  10409. "type": "string",
  10410. "pattern": "^pty"
  10411. },
  10412. "required": true
  10413. },
  10414. {
  10415. "in": "query",
  10416. "name": "directory",
  10417. "schema": {
  10418. "type": "string"
  10419. }
  10420. },
  10421. {
  10422. "in": "query",
  10423. "name": "workspace",
  10424. "schema": {
  10425. "type": "string"
  10426. }
  10427. },
  10428. {
  10429. "in": "query",
  10430. "name": "cursor",
  10431. "schema": {
  10432. "type": "string"
  10433. }
  10434. },
  10435. {
  10436. "in": "query",
  10437. "name": "ticket",
  10438. "schema": {
  10439. "type": "string"
  10440. }
  10441. }
  10442. ],
  10443. "responses": {
  10444. "200": {
  10445. "description": "Connected session",
  10446. "content": {
  10447. "application/json": {
  10448. "schema": {
  10449. "type": "boolean",
  10450. "description": "Connected session"
  10451. }
  10452. }
  10453. }
  10454. },
  10455. "403": {
  10456. "description": "Forbidden",
  10457. "content": {
  10458. "application/json": {
  10459. "schema": {
  10460. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10461. }
  10462. }
  10463. }
  10464. },
  10465. "404": {
  10466. "description": "Not found",
  10467. "content": {
  10468. "application/json": {
  10469. "schema": {
  10470. "$ref": "#/components/schemas/NotFoundError"
  10471. }
  10472. }
  10473. }
  10474. }
  10475. },
  10476. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10477. "summary": "Connect to PTY session",
  10478. "x-codeSamples": [
  10479. {
  10480. "lang": "js",
  10481. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10482. }
  10483. ]
  10484. }
  10485. }
  10486. },
  10487. "components": {
  10488. "schemas": {
  10489. "Event": {
  10490. "anyOf": [
  10491. {
  10492. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10493. },
  10494. {
  10495. "$ref": "#/components/schemas/Event.tui.command.execute"
  10496. },
  10497. {
  10498. "$ref": "#/components/schemas/EventTuiToastShow1"
  10499. },
  10500. {
  10501. "$ref": "#/components/schemas/Event.tui.session.select"
  10502. },
  10503. {
  10504. "$ref": "#/components/schemas/EventServerConnected"
  10505. },
  10506. {
  10507. "$ref": "#/components/schemas/EventGlobalDisposed"
  10508. },
  10509. {
  10510. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10511. },
  10512. {
  10513. "$ref": "#/components/schemas/EventFileEdited"
  10514. },
  10515. {
  10516. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10517. },
  10518. {
  10519. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/EventLspUpdated"
  10523. },
  10524. {
  10525. "$ref": "#/components/schemas/EventMessagePartDelta"
  10526. },
  10527. {
  10528. "$ref": "#/components/schemas/EventPermissionAsked"
  10529. },
  10530. {
  10531. "$ref": "#/components/schemas/EventPermissionReplied"
  10532. },
  10533. {
  10534. "$ref": "#/components/schemas/EventSessionDiff"
  10535. },
  10536. {
  10537. "$ref": "#/components/schemas/EventSessionError"
  10538. },
  10539. {
  10540. "$ref": "#/components/schemas/EventQuestionAsked"
  10541. },
  10542. {
  10543. "$ref": "#/components/schemas/EventQuestionReplied"
  10544. },
  10545. {
  10546. "$ref": "#/components/schemas/EventQuestionRejected"
  10547. },
  10548. {
  10549. "$ref": "#/components/schemas/EventTodoUpdated"
  10550. },
  10551. {
  10552. "$ref": "#/components/schemas/EventSessionStatus"
  10553. },
  10554. {
  10555. "$ref": "#/components/schemas/EventSessionIdle"
  10556. },
  10557. {
  10558. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10559. },
  10560. {
  10561. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10562. },
  10563. {
  10564. "$ref": "#/components/schemas/EventCommandExecuted"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/EventProjectUpdated"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/EventSessionCompacted"
  10571. },
  10572. {
  10573. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10574. },
  10575. {
  10576. "$ref": "#/components/schemas/EventWorkspaceReady"
  10577. },
  10578. {
  10579. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10580. },
  10581. {
  10582. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10583. },
  10584. {
  10585. "$ref": "#/components/schemas/EventWorktreeReady"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/EventWorktreeFailed"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/EventPtyCreated"
  10592. },
  10593. {
  10594. "$ref": "#/components/schemas/EventPtyUpdated"
  10595. },
  10596. {
  10597. "$ref": "#/components/schemas/EventPtyExited"
  10598. },
  10599. {
  10600. "$ref": "#/components/schemas/EventPtyDeleted"
  10601. },
  10602. {
  10603. "$ref": "#/components/schemas/EventInstallationUpdated"
  10604. },
  10605. {
  10606. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10607. },
  10608. {
  10609. "$ref": "#/components/schemas/EventMessageUpdated"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/EventMessageRemoved"
  10613. },
  10614. {
  10615. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10616. },
  10617. {
  10618. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10619. },
  10620. {
  10621. "$ref": "#/components/schemas/EventSessionCreated"
  10622. },
  10623. {
  10624. "$ref": "#/components/schemas/EventSessionUpdated"
  10625. },
  10626. {
  10627. "$ref": "#/components/schemas/EventSessionDeleted"
  10628. },
  10629. {
  10630. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10631. },
  10632. {
  10633. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10634. },
  10635. {
  10636. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10637. },
  10638. {
  10639. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10640. },
  10641. {
  10642. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10643. },
  10644. {
  10645. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10646. },
  10647. {
  10648. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10649. },
  10650. {
  10651. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10652. },
  10653. {
  10654. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10655. },
  10656. {
  10657. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10658. },
  10659. {
  10660. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10661. },
  10662. {
  10663. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10664. },
  10665. {
  10666. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10667. },
  10668. {
  10669. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10676. },
  10677. {
  10678. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10682. },
  10683. {
  10684. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10685. },
  10686. {
  10687. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10691. },
  10692. {
  10693. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10694. },
  10695. {
  10696. "$ref": "#/components/schemas/EventSessionNextRetried"
  10697. },
  10698. {
  10699. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10700. },
  10701. {
  10702. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10703. },
  10704. {
  10705. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10706. },
  10707. {
  10708. "$ref": "#/components/schemas/EventPluginAdded"
  10709. },
  10710. {
  10711. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10712. },
  10713. {
  10714. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10715. },
  10716. {
  10717. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10718. },
  10719. {
  10720. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10721. },
  10722. {
  10723. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10724. },
  10725. {
  10726. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10727. },
  10728. {
  10729. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10730. },
  10731. {
  10732. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10733. },
  10734. {
  10735. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10736. },
  10737. {
  10738. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10739. },
  10740. {
  10741. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10742. },
  10743. {
  10744. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10745. },
  10746. {
  10747. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10754. },
  10755. {
  10756. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10760. },
  10761. {
  10762. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10763. },
  10764. {
  10765. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10766. },
  10767. {
  10768. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10769. },
  10770. {
  10771. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10772. },
  10773. {
  10774. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10775. },
  10776. {
  10777. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10778. },
  10779. {
  10780. "$ref": "#/components/schemas/EventSessionNextRetried"
  10781. },
  10782. {
  10783. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10784. },
  10785. {
  10786. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10787. },
  10788. {
  10789. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10790. },
  10791. {
  10792. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10793. },
  10794. {
  10795. "$ref": "#/components/schemas/EventAccountAdded"
  10796. },
  10797. {
  10798. "$ref": "#/components/schemas/EventAccountRemoved"
  10799. },
  10800. {
  10801. "$ref": "#/components/schemas/EventAccountSwitched"
  10802. }
  10803. ]
  10804. },
  10805. "OAuth": {
  10806. "type": "object",
  10807. "properties": {
  10808. "type": {
  10809. "type": "string",
  10810. "enum": ["oauth"]
  10811. },
  10812. "refresh": {
  10813. "type": "string"
  10814. },
  10815. "access": {
  10816. "type": "string"
  10817. },
  10818. "expires": {
  10819. "type": "integer",
  10820. "minimum": 0
  10821. },
  10822. "accountId": {
  10823. "type": "string"
  10824. },
  10825. "enterpriseUrl": {
  10826. "type": "string"
  10827. }
  10828. },
  10829. "required": ["type", "refresh", "access", "expires"],
  10830. "additionalProperties": false
  10831. },
  10832. "ApiAuth": {
  10833. "type": "object",
  10834. "properties": {
  10835. "type": {
  10836. "type": "string",
  10837. "enum": ["api"]
  10838. },
  10839. "key": {
  10840. "type": "string"
  10841. },
  10842. "metadata": {
  10843. "type": "object",
  10844. "additionalProperties": {
  10845. "type": "string"
  10846. }
  10847. }
  10848. },
  10849. "required": ["type", "key"],
  10850. "additionalProperties": false
  10851. },
  10852. "WellKnownAuth": {
  10853. "type": "object",
  10854. "properties": {
  10855. "type": {
  10856. "type": "string",
  10857. "enum": ["wellknown"]
  10858. },
  10859. "key": {
  10860. "type": "string"
  10861. },
  10862. "token": {
  10863. "type": "string"
  10864. }
  10865. },
  10866. "required": ["type", "key", "token"],
  10867. "additionalProperties": false
  10868. },
  10869. "Auth": {
  10870. "anyOf": [
  10871. {
  10872. "$ref": "#/components/schemas/OAuth"
  10873. },
  10874. {
  10875. "$ref": "#/components/schemas/ApiAuth"
  10876. },
  10877. {
  10878. "$ref": "#/components/schemas/WellKnownAuth"
  10879. }
  10880. ]
  10881. },
  10882. "effect_HttpApiError_BadRequest": {
  10883. "type": "object",
  10884. "properties": {
  10885. "_tag": {
  10886. "type": "string",
  10887. "enum": ["BadRequest"]
  10888. }
  10889. },
  10890. "required": ["_tag"],
  10891. "additionalProperties": false
  10892. },
  10893. "InvalidRequestError": {
  10894. "type": "object",
  10895. "properties": {
  10896. "_tag": {
  10897. "type": "string",
  10898. "enum": ["InvalidRequestError"]
  10899. },
  10900. "message": {
  10901. "type": "string"
  10902. },
  10903. "kind": {
  10904. "type": "string"
  10905. },
  10906. "field": {
  10907. "type": "string"
  10908. }
  10909. },
  10910. "required": ["_tag", "message"],
  10911. "additionalProperties": false
  10912. },
  10913. "Event.tui.prompt.append": {
  10914. "type": "object",
  10915. "properties": {
  10916. "id": {
  10917. "type": "string"
  10918. },
  10919. "type": {
  10920. "type": "string",
  10921. "enum": ["tui.prompt.append"]
  10922. },
  10923. "properties": {
  10924. "type": "object",
  10925. "properties": {
  10926. "text": {
  10927. "type": "string"
  10928. }
  10929. },
  10930. "required": ["text"],
  10931. "additionalProperties": false
  10932. }
  10933. },
  10934. "required": ["id", "type", "properties"],
  10935. "additionalProperties": false
  10936. },
  10937. "Event.tui.command.execute": {
  10938. "type": "object",
  10939. "properties": {
  10940. "id": {
  10941. "type": "string"
  10942. },
  10943. "type": {
  10944. "type": "string",
  10945. "enum": ["tui.command.execute"]
  10946. },
  10947. "properties": {
  10948. "type": "object",
  10949. "properties": {
  10950. "command": {
  10951. "anyOf": [
  10952. {
  10953. "type": "string",
  10954. "enum": [
  10955. "session.list",
  10956. "session.new",
  10957. "session.share",
  10958. "session.interrupt",
  10959. "session.compact",
  10960. "session.page.up",
  10961. "session.page.down",
  10962. "session.line.up",
  10963. "session.line.down",
  10964. "session.half.page.up",
  10965. "session.half.page.down",
  10966. "session.first",
  10967. "session.last",
  10968. "prompt.clear",
  10969. "prompt.submit",
  10970. "agent.cycle"
  10971. ]
  10972. },
  10973. {
  10974. "type": "string"
  10975. }
  10976. ]
  10977. }
  10978. },
  10979. "required": ["command"],
  10980. "additionalProperties": false
  10981. }
  10982. },
  10983. "required": ["id", "type", "properties"],
  10984. "additionalProperties": false
  10985. },
  10986. "Event.tui.toast.show": {
  10987. "type": "object",
  10988. "properties": {
  10989. "id": {
  10990. "type": "string"
  10991. },
  10992. "type": {
  10993. "type": "string",
  10994. "enum": ["tui.toast.show"]
  10995. },
  10996. "properties": {
  10997. "type": "object",
  10998. "properties": {
  10999. "title": {
  11000. "type": "string"
  11001. },
  11002. "message": {
  11003. "type": "string"
  11004. },
  11005. "variant": {
  11006. "type": "string",
  11007. "enum": ["info", "success", "warning", "error"]
  11008. },
  11009. "duration": {
  11010. "type": "integer",
  11011. "exclusiveMinimum": 0
  11012. }
  11013. },
  11014. "required": ["message", "variant"],
  11015. "additionalProperties": false
  11016. }
  11017. },
  11018. "required": ["id", "type", "properties"],
  11019. "additionalProperties": false
  11020. },
  11021. "Event.tui.session.select": {
  11022. "type": "object",
  11023. "properties": {
  11024. "id": {
  11025. "type": "string"
  11026. },
  11027. "type": {
  11028. "type": "string",
  11029. "enum": ["tui.session.select"]
  11030. },
  11031. "properties": {
  11032. "type": "object",
  11033. "properties": {
  11034. "sessionID": {
  11035. "type": "string",
  11036. "pattern": "^ses",
  11037. "description": "Session ID to navigate to"
  11038. }
  11039. },
  11040. "required": ["sessionID"],
  11041. "additionalProperties": false
  11042. }
  11043. },
  11044. "required": ["id", "type", "properties"],
  11045. "additionalProperties": false
  11046. },
  11047. "PermissionRequest": {
  11048. "type": "object",
  11049. "properties": {
  11050. "id": {
  11051. "type": "string",
  11052. "pattern": "^per"
  11053. },
  11054. "sessionID": {
  11055. "type": "string",
  11056. "pattern": "^ses"
  11057. },
  11058. "permission": {
  11059. "type": "string"
  11060. },
  11061. "patterns": {
  11062. "type": "array",
  11063. "items": {
  11064. "type": "string"
  11065. }
  11066. },
  11067. "metadata": {
  11068. "type": "object"
  11069. },
  11070. "always": {
  11071. "type": "array",
  11072. "items": {
  11073. "type": "string"
  11074. }
  11075. },
  11076. "tool": {
  11077. "type": "object",
  11078. "properties": {
  11079. "messageID": {
  11080. "type": "string",
  11081. "pattern": "^msg"
  11082. },
  11083. "callID": {
  11084. "type": "string"
  11085. }
  11086. },
  11087. "required": ["messageID", "callID"],
  11088. "additionalProperties": false
  11089. }
  11090. },
  11091. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  11092. "additionalProperties": false
  11093. },
  11094. "SnapshotFileDiff": {
  11095. "type": "object",
  11096. "properties": {
  11097. "file": {
  11098. "type": "string"
  11099. },
  11100. "patch": {
  11101. "type": "string"
  11102. },
  11103. "additions": {
  11104. "type": "number"
  11105. },
  11106. "deletions": {
  11107. "type": "number"
  11108. },
  11109. "status": {
  11110. "type": "string",
  11111. "enum": ["added", "deleted", "modified"]
  11112. }
  11113. },
  11114. "required": ["additions", "deletions"],
  11115. "additionalProperties": false
  11116. },
  11117. "ProviderAuthError": {
  11118. "type": "object",
  11119. "properties": {
  11120. "name": {
  11121. "type": "string",
  11122. "enum": ["ProviderAuthError"]
  11123. },
  11124. "data": {
  11125. "type": "object",
  11126. "properties": {
  11127. "providerID": {
  11128. "type": "string"
  11129. },
  11130. "message": {
  11131. "type": "string"
  11132. }
  11133. },
  11134. "required": ["providerID", "message"],
  11135. "additionalProperties": false
  11136. }
  11137. },
  11138. "required": ["name", "data"],
  11139. "additionalProperties": false
  11140. },
  11141. "UnknownError": {
  11142. "type": "object",
  11143. "properties": {
  11144. "name": {
  11145. "type": "string",
  11146. "enum": ["UnknownError"]
  11147. },
  11148. "data": {
  11149. "type": "object",
  11150. "properties": {
  11151. "message": {
  11152. "type": "string"
  11153. },
  11154. "ref": {
  11155. "type": "string"
  11156. }
  11157. },
  11158. "required": ["message"],
  11159. "additionalProperties": false
  11160. }
  11161. },
  11162. "required": ["name", "data"],
  11163. "additionalProperties": false
  11164. },
  11165. "MessageOutputLengthError": {
  11166. "type": "object",
  11167. "properties": {
  11168. "name": {
  11169. "type": "string",
  11170. "enum": ["MessageOutputLengthError"]
  11171. },
  11172. "data": {
  11173. "type": "object",
  11174. "properties": {}
  11175. }
  11176. },
  11177. "required": ["name", "data"],
  11178. "additionalProperties": false
  11179. },
  11180. "MessageAbortedError": {
  11181. "type": "object",
  11182. "properties": {
  11183. "name": {
  11184. "type": "string",
  11185. "enum": ["MessageAbortedError"]
  11186. },
  11187. "data": {
  11188. "type": "object",
  11189. "properties": {
  11190. "message": {
  11191. "type": "string"
  11192. }
  11193. },
  11194. "required": ["message"],
  11195. "additionalProperties": false
  11196. }
  11197. },
  11198. "required": ["name", "data"],
  11199. "additionalProperties": false
  11200. },
  11201. "StructuredOutputError": {
  11202. "type": "object",
  11203. "properties": {
  11204. "name": {
  11205. "type": "string",
  11206. "enum": ["StructuredOutputError"]
  11207. },
  11208. "data": {
  11209. "type": "object",
  11210. "properties": {
  11211. "message": {
  11212. "type": "string"
  11213. },
  11214. "retries": {
  11215. "type": "integer",
  11216. "minimum": 0
  11217. }
  11218. },
  11219. "required": ["message", "retries"],
  11220. "additionalProperties": false
  11221. }
  11222. },
  11223. "required": ["name", "data"],
  11224. "additionalProperties": false
  11225. },
  11226. "ContextOverflowError": {
  11227. "type": "object",
  11228. "properties": {
  11229. "name": {
  11230. "type": "string",
  11231. "enum": ["ContextOverflowError"]
  11232. },
  11233. "data": {
  11234. "type": "object",
  11235. "properties": {
  11236. "message": {
  11237. "type": "string"
  11238. },
  11239. "responseBody": {
  11240. "type": "string"
  11241. }
  11242. },
  11243. "required": ["message"],
  11244. "additionalProperties": false
  11245. }
  11246. },
  11247. "required": ["name", "data"],
  11248. "additionalProperties": false
  11249. },
  11250. "APIError": {
  11251. "type": "object",
  11252. "properties": {
  11253. "name": {
  11254. "type": "string",
  11255. "enum": ["APIError"]
  11256. },
  11257. "data": {
  11258. "type": "object",
  11259. "properties": {
  11260. "message": {
  11261. "type": "string"
  11262. },
  11263. "statusCode": {
  11264. "type": "integer",
  11265. "minimum": 0
  11266. },
  11267. "isRetryable": {
  11268. "type": "boolean"
  11269. },
  11270. "responseHeaders": {
  11271. "type": "object",
  11272. "additionalProperties": {
  11273. "type": "string"
  11274. }
  11275. },
  11276. "responseBody": {
  11277. "type": "string"
  11278. },
  11279. "metadata": {
  11280. "type": "object",
  11281. "additionalProperties": {
  11282. "type": "string"
  11283. }
  11284. }
  11285. },
  11286. "required": ["message", "isRetryable"],
  11287. "additionalProperties": false
  11288. }
  11289. },
  11290. "required": ["name", "data"],
  11291. "additionalProperties": false
  11292. },
  11293. "QuestionOption": {
  11294. "type": "object",
  11295. "properties": {
  11296. "label": {
  11297. "type": "string",
  11298. "description": "Display text (1-5 words, concise)"
  11299. },
  11300. "description": {
  11301. "type": "string",
  11302. "description": "Explanation of choice"
  11303. }
  11304. },
  11305. "required": ["label", "description"],
  11306. "additionalProperties": false
  11307. },
  11308. "QuestionInfo": {
  11309. "type": "object",
  11310. "properties": {
  11311. "question": {
  11312. "type": "string",
  11313. "description": "Complete question"
  11314. },
  11315. "header": {
  11316. "type": "string",
  11317. "description": "Very short label (max 30 chars)"
  11318. },
  11319. "options": {
  11320. "type": "array",
  11321. "items": {
  11322. "$ref": "#/components/schemas/QuestionOption"
  11323. },
  11324. "description": "Available choices"
  11325. },
  11326. "multiple": {
  11327. "type": "boolean"
  11328. },
  11329. "custom": {
  11330. "type": "boolean"
  11331. }
  11332. },
  11333. "required": ["question", "header", "options"],
  11334. "additionalProperties": false
  11335. },
  11336. "QuestionTool": {
  11337. "type": "object",
  11338. "properties": {
  11339. "messageID": {
  11340. "type": "string",
  11341. "pattern": "^msg"
  11342. },
  11343. "callID": {
  11344. "type": "string"
  11345. }
  11346. },
  11347. "required": ["messageID", "callID"],
  11348. "additionalProperties": false
  11349. },
  11350. "QuestionRequest": {
  11351. "type": "object",
  11352. "properties": {
  11353. "id": {
  11354. "type": "string",
  11355. "pattern": "^que"
  11356. },
  11357. "sessionID": {
  11358. "type": "string",
  11359. "pattern": "^ses"
  11360. },
  11361. "questions": {
  11362. "type": "array",
  11363. "items": {
  11364. "$ref": "#/components/schemas/QuestionInfo"
  11365. },
  11366. "description": "Questions to ask"
  11367. },
  11368. "tool": {
  11369. "$ref": "#/components/schemas/QuestionTool"
  11370. }
  11371. },
  11372. "required": ["id", "sessionID", "questions"],
  11373. "additionalProperties": false
  11374. },
  11375. "QuestionAnswer": {
  11376. "type": "array",
  11377. "items": {
  11378. "type": "string"
  11379. }
  11380. },
  11381. "QuestionReplied": {
  11382. "type": "object",
  11383. "properties": {
  11384. "sessionID": {
  11385. "type": "string",
  11386. "pattern": "^ses"
  11387. },
  11388. "requestID": {
  11389. "type": "string",
  11390. "pattern": "^que"
  11391. },
  11392. "answers": {
  11393. "type": "array",
  11394. "items": {
  11395. "$ref": "#/components/schemas/QuestionAnswer"
  11396. }
  11397. }
  11398. },
  11399. "required": ["sessionID", "requestID", "answers"],
  11400. "additionalProperties": false
  11401. },
  11402. "QuestionRejected": {
  11403. "type": "object",
  11404. "properties": {
  11405. "sessionID": {
  11406. "type": "string",
  11407. "pattern": "^ses"
  11408. },
  11409. "requestID": {
  11410. "type": "string",
  11411. "pattern": "^que"
  11412. }
  11413. },
  11414. "required": ["sessionID", "requestID"],
  11415. "additionalProperties": false
  11416. },
  11417. "Todo": {
  11418. "type": "object",
  11419. "properties": {
  11420. "content": {
  11421. "type": "string",
  11422. "description": "Brief description of the task"
  11423. },
  11424. "status": {
  11425. "type": "string",
  11426. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11427. },
  11428. "priority": {
  11429. "type": "string",
  11430. "description": "Priority level of the task: high, medium, low"
  11431. }
  11432. },
  11433. "required": ["content", "status", "priority"],
  11434. "additionalProperties": false
  11435. },
  11436. "SessionStatus": {
  11437. "anyOf": [
  11438. {
  11439. "type": "object",
  11440. "properties": {
  11441. "type": {
  11442. "type": "string",
  11443. "enum": ["idle"]
  11444. }
  11445. },
  11446. "required": ["type"],
  11447. "additionalProperties": false
  11448. },
  11449. {
  11450. "type": "object",
  11451. "properties": {
  11452. "type": {
  11453. "type": "string",
  11454. "enum": ["retry"]
  11455. },
  11456. "attempt": {
  11457. "type": "integer",
  11458. "minimum": 0
  11459. },
  11460. "message": {
  11461. "type": "string"
  11462. },
  11463. "action": {
  11464. "type": "object",
  11465. "properties": {
  11466. "reason": {
  11467. "type": "string"
  11468. },
  11469. "provider": {
  11470. "type": "string"
  11471. },
  11472. "title": {
  11473. "type": "string"
  11474. },
  11475. "message": {
  11476. "type": "string"
  11477. },
  11478. "label": {
  11479. "type": "string"
  11480. },
  11481. "link": {
  11482. "type": "string"
  11483. }
  11484. },
  11485. "required": ["reason", "provider", "title", "message", "label"],
  11486. "additionalProperties": false
  11487. },
  11488. "next": {
  11489. "type": "integer",
  11490. "minimum": 0
  11491. }
  11492. },
  11493. "required": ["type", "attempt", "message", "next"],
  11494. "additionalProperties": false
  11495. },
  11496. {
  11497. "type": "object",
  11498. "properties": {
  11499. "type": {
  11500. "type": "string",
  11501. "enum": ["busy"]
  11502. }
  11503. },
  11504. "required": ["type"],
  11505. "additionalProperties": false
  11506. }
  11507. ]
  11508. },
  11509. "Project": {
  11510. "type": "object",
  11511. "properties": {
  11512. "id": {
  11513. "type": "string"
  11514. },
  11515. "worktree": {
  11516. "type": "string"
  11517. },
  11518. "vcs": {
  11519. "type": "string",
  11520. "enum": ["git"]
  11521. },
  11522. "name": {
  11523. "type": "string"
  11524. },
  11525. "icon": {
  11526. "type": "object",
  11527. "properties": {
  11528. "url": {
  11529. "type": "string"
  11530. },
  11531. "override": {
  11532. "type": "string"
  11533. },
  11534. "color": {
  11535. "type": "string"
  11536. }
  11537. },
  11538. "additionalProperties": false
  11539. },
  11540. "commands": {
  11541. "type": "object",
  11542. "properties": {
  11543. "start": {
  11544. "type": "string",
  11545. "description": "Startup script to run when creating a new workspace (worktree)"
  11546. }
  11547. },
  11548. "additionalProperties": false
  11549. },
  11550. "time": {
  11551. "type": "object",
  11552. "properties": {
  11553. "created": {
  11554. "type": "integer",
  11555. "minimum": 0
  11556. },
  11557. "updated": {
  11558. "type": "integer",
  11559. "minimum": 0
  11560. },
  11561. "initialized": {
  11562. "type": "integer",
  11563. "minimum": 0
  11564. }
  11565. },
  11566. "required": ["created", "updated"],
  11567. "additionalProperties": false
  11568. },
  11569. "sandboxes": {
  11570. "type": "array",
  11571. "items": {
  11572. "type": "string"
  11573. }
  11574. }
  11575. },
  11576. "required": ["id", "worktree", "time", "sandboxes"],
  11577. "additionalProperties": false
  11578. },
  11579. "Pty": {
  11580. "type": "object",
  11581. "properties": {
  11582. "id": {
  11583. "type": "string",
  11584. "pattern": "^pty"
  11585. },
  11586. "title": {
  11587. "type": "string"
  11588. },
  11589. "command": {
  11590. "type": "string"
  11591. },
  11592. "args": {
  11593. "type": "array",
  11594. "items": {
  11595. "type": "string"
  11596. }
  11597. },
  11598. "cwd": {
  11599. "type": "string"
  11600. },
  11601. "status": {
  11602. "type": "string",
  11603. "enum": ["running", "exited"]
  11604. },
  11605. "pid": {
  11606. "type": "integer",
  11607. "minimum": 0
  11608. }
  11609. },
  11610. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11611. "additionalProperties": false
  11612. },
  11613. "OutputFormatText": {
  11614. "type": "object",
  11615. "properties": {
  11616. "type": {
  11617. "type": "string",
  11618. "enum": ["text"]
  11619. }
  11620. },
  11621. "required": ["type"],
  11622. "additionalProperties": false
  11623. },
  11624. "JSONSchema": {
  11625. "type": "object"
  11626. },
  11627. "OutputFormatJsonSchema": {
  11628. "type": "object",
  11629. "properties": {
  11630. "type": {
  11631. "type": "string",
  11632. "enum": ["json_schema"]
  11633. },
  11634. "schema": {
  11635. "$ref": "#/components/schemas/JSONSchema"
  11636. },
  11637. "retryCount": {
  11638. "type": "integer",
  11639. "minimum": 0
  11640. }
  11641. },
  11642. "required": ["type", "schema"],
  11643. "additionalProperties": false
  11644. },
  11645. "OutputFormat": {
  11646. "anyOf": [
  11647. {
  11648. "$ref": "#/components/schemas/OutputFormatText"
  11649. },
  11650. {
  11651. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11652. }
  11653. ]
  11654. },
  11655. "UserMessage": {
  11656. "type": "object",
  11657. "properties": {
  11658. "id": {
  11659. "type": "string",
  11660. "pattern": "^msg"
  11661. },
  11662. "sessionID": {
  11663. "type": "string",
  11664. "pattern": "^ses"
  11665. },
  11666. "role": {
  11667. "type": "string",
  11668. "enum": ["user"]
  11669. },
  11670. "time": {
  11671. "type": "object",
  11672. "properties": {
  11673. "created": {
  11674. "type": "integer",
  11675. "minimum": 0
  11676. }
  11677. },
  11678. "required": ["created"],
  11679. "additionalProperties": false
  11680. },
  11681. "format": {
  11682. "$ref": "#/components/schemas/OutputFormat"
  11683. },
  11684. "summary": {
  11685. "type": "object",
  11686. "properties": {
  11687. "title": {
  11688. "type": "string"
  11689. },
  11690. "body": {
  11691. "type": "string"
  11692. },
  11693. "diffs": {
  11694. "type": "array",
  11695. "items": {
  11696. "$ref": "#/components/schemas/SnapshotFileDiff"
  11697. }
  11698. }
  11699. },
  11700. "required": ["diffs"],
  11701. "additionalProperties": false
  11702. },
  11703. "agent": {
  11704. "type": "string"
  11705. },
  11706. "model": {
  11707. "type": "object",
  11708. "properties": {
  11709. "providerID": {
  11710. "type": "string"
  11711. },
  11712. "modelID": {
  11713. "type": "string"
  11714. },
  11715. "variant": {
  11716. "type": "string"
  11717. }
  11718. },
  11719. "required": ["providerID", "modelID"],
  11720. "additionalProperties": false
  11721. },
  11722. "system": {
  11723. "type": "string"
  11724. },
  11725. "tools": {
  11726. "type": "object",
  11727. "additionalProperties": {
  11728. "type": "boolean"
  11729. }
  11730. }
  11731. },
  11732. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11733. "additionalProperties": false
  11734. },
  11735. "AssistantMessage": {
  11736. "type": "object",
  11737. "properties": {
  11738. "id": {
  11739. "type": "string",
  11740. "pattern": "^msg"
  11741. },
  11742. "sessionID": {
  11743. "type": "string",
  11744. "pattern": "^ses"
  11745. },
  11746. "role": {
  11747. "type": "string",
  11748. "enum": ["assistant"]
  11749. },
  11750. "time": {
  11751. "type": "object",
  11752. "properties": {
  11753. "created": {
  11754. "type": "integer",
  11755. "minimum": 0
  11756. },
  11757. "completed": {
  11758. "type": "integer",
  11759. "minimum": 0
  11760. }
  11761. },
  11762. "required": ["created"],
  11763. "additionalProperties": false
  11764. },
  11765. "error": {
  11766. "anyOf": [
  11767. {
  11768. "$ref": "#/components/schemas/ProviderAuthError"
  11769. },
  11770. {
  11771. "$ref": "#/components/schemas/UnknownError"
  11772. },
  11773. {
  11774. "$ref": "#/components/schemas/MessageOutputLengthError"
  11775. },
  11776. {
  11777. "$ref": "#/components/schemas/MessageAbortedError"
  11778. },
  11779. {
  11780. "$ref": "#/components/schemas/StructuredOutputError"
  11781. },
  11782. {
  11783. "$ref": "#/components/schemas/ContextOverflowError"
  11784. },
  11785. {
  11786. "$ref": "#/components/schemas/APIError"
  11787. }
  11788. ]
  11789. },
  11790. "parentID": {
  11791. "type": "string",
  11792. "pattern": "^msg"
  11793. },
  11794. "modelID": {
  11795. "type": "string"
  11796. },
  11797. "providerID": {
  11798. "type": "string"
  11799. },
  11800. "mode": {
  11801. "type": "string"
  11802. },
  11803. "agent": {
  11804. "type": "string"
  11805. },
  11806. "path": {
  11807. "type": "object",
  11808. "properties": {
  11809. "cwd": {
  11810. "type": "string"
  11811. },
  11812. "root": {
  11813. "type": "string"
  11814. }
  11815. },
  11816. "required": ["cwd", "root"],
  11817. "additionalProperties": false
  11818. },
  11819. "summary": {
  11820. "type": "boolean"
  11821. },
  11822. "cost": {
  11823. "type": "number"
  11824. },
  11825. "tokens": {
  11826. "type": "object",
  11827. "properties": {
  11828. "total": {
  11829. "type": "number"
  11830. },
  11831. "input": {
  11832. "type": "number"
  11833. },
  11834. "output": {
  11835. "type": "number"
  11836. },
  11837. "reasoning": {
  11838. "type": "number"
  11839. },
  11840. "cache": {
  11841. "type": "object",
  11842. "properties": {
  11843. "read": {
  11844. "type": "number"
  11845. },
  11846. "write": {
  11847. "type": "number"
  11848. }
  11849. },
  11850. "required": ["read", "write"],
  11851. "additionalProperties": false
  11852. }
  11853. },
  11854. "required": ["input", "output", "reasoning", "cache"],
  11855. "additionalProperties": false
  11856. },
  11857. "structured": {},
  11858. "variant": {
  11859. "type": "string"
  11860. },
  11861. "finish": {
  11862. "type": "string"
  11863. }
  11864. },
  11865. "required": [
  11866. "id",
  11867. "sessionID",
  11868. "role",
  11869. "time",
  11870. "parentID",
  11871. "modelID",
  11872. "providerID",
  11873. "mode",
  11874. "agent",
  11875. "path",
  11876. "cost",
  11877. "tokens"
  11878. ],
  11879. "additionalProperties": false
  11880. },
  11881. "Message": {
  11882. "anyOf": [
  11883. {
  11884. "$ref": "#/components/schemas/UserMessage"
  11885. },
  11886. {
  11887. "$ref": "#/components/schemas/AssistantMessage"
  11888. }
  11889. ]
  11890. },
  11891. "TextPart": {
  11892. "type": "object",
  11893. "properties": {
  11894. "id": {
  11895. "type": "string",
  11896. "pattern": "^prt"
  11897. },
  11898. "sessionID": {
  11899. "type": "string",
  11900. "pattern": "^ses"
  11901. },
  11902. "messageID": {
  11903. "type": "string",
  11904. "pattern": "^msg"
  11905. },
  11906. "type": {
  11907. "type": "string",
  11908. "enum": ["text"]
  11909. },
  11910. "text": {
  11911. "type": "string"
  11912. },
  11913. "synthetic": {
  11914. "type": "boolean"
  11915. },
  11916. "ignored": {
  11917. "type": "boolean"
  11918. },
  11919. "time": {
  11920. "type": "object",
  11921. "properties": {
  11922. "start": {
  11923. "type": "integer",
  11924. "minimum": 0
  11925. },
  11926. "end": {
  11927. "type": "integer",
  11928. "minimum": 0
  11929. }
  11930. },
  11931. "required": ["start"],
  11932. "additionalProperties": false
  11933. },
  11934. "metadata": {
  11935. "type": "object"
  11936. }
  11937. },
  11938. "required": ["id", "sessionID", "messageID", "type", "text"],
  11939. "additionalProperties": false
  11940. },
  11941. "SubtaskPart": {
  11942. "type": "object",
  11943. "properties": {
  11944. "id": {
  11945. "type": "string",
  11946. "pattern": "^prt"
  11947. },
  11948. "sessionID": {
  11949. "type": "string",
  11950. "pattern": "^ses"
  11951. },
  11952. "messageID": {
  11953. "type": "string",
  11954. "pattern": "^msg"
  11955. },
  11956. "type": {
  11957. "type": "string",
  11958. "enum": ["subtask"]
  11959. },
  11960. "prompt": {
  11961. "type": "string"
  11962. },
  11963. "description": {
  11964. "type": "string"
  11965. },
  11966. "agent": {
  11967. "type": "string"
  11968. },
  11969. "model": {
  11970. "type": "object",
  11971. "properties": {
  11972. "providerID": {
  11973. "type": "string"
  11974. },
  11975. "modelID": {
  11976. "type": "string"
  11977. }
  11978. },
  11979. "required": ["providerID", "modelID"],
  11980. "additionalProperties": false
  11981. },
  11982. "command": {
  11983. "type": "string"
  11984. }
  11985. },
  11986. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11987. "additionalProperties": false
  11988. },
  11989. "ReasoningPart": {
  11990. "type": "object",
  11991. "properties": {
  11992. "id": {
  11993. "type": "string",
  11994. "pattern": "^prt"
  11995. },
  11996. "sessionID": {
  11997. "type": "string",
  11998. "pattern": "^ses"
  11999. },
  12000. "messageID": {
  12001. "type": "string",
  12002. "pattern": "^msg"
  12003. },
  12004. "type": {
  12005. "type": "string",
  12006. "enum": ["reasoning"]
  12007. },
  12008. "text": {
  12009. "type": "string"
  12010. },
  12011. "metadata": {
  12012. "type": "object"
  12013. },
  12014. "time": {
  12015. "type": "object",
  12016. "properties": {
  12017. "start": {
  12018. "type": "integer",
  12019. "minimum": 0
  12020. },
  12021. "end": {
  12022. "type": "integer",
  12023. "minimum": 0
  12024. }
  12025. },
  12026. "required": ["start"],
  12027. "additionalProperties": false
  12028. }
  12029. },
  12030. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  12031. "additionalProperties": false
  12032. },
  12033. "FilePartSourceText": {
  12034. "type": "object",
  12035. "properties": {
  12036. "value": {
  12037. "type": "string"
  12038. },
  12039. "start": {
  12040. "type": "number"
  12041. },
  12042. "end": {
  12043. "type": "number"
  12044. }
  12045. },
  12046. "required": ["value", "start", "end"],
  12047. "additionalProperties": false
  12048. },
  12049. "FileSource": {
  12050. "type": "object",
  12051. "properties": {
  12052. "text": {
  12053. "$ref": "#/components/schemas/FilePartSourceText"
  12054. },
  12055. "type": {
  12056. "type": "string",
  12057. "enum": ["file"]
  12058. },
  12059. "path": {
  12060. "type": "string"
  12061. }
  12062. },
  12063. "required": ["text", "type", "path"],
  12064. "additionalProperties": false
  12065. },
  12066. "Range": {
  12067. "type": "object",
  12068. "properties": {
  12069. "start": {
  12070. "type": "object",
  12071. "properties": {
  12072. "line": {
  12073. "type": "integer",
  12074. "minimum": 0
  12075. },
  12076. "character": {
  12077. "type": "integer",
  12078. "minimum": 0
  12079. }
  12080. },
  12081. "required": ["line", "character"],
  12082. "additionalProperties": false
  12083. },
  12084. "end": {
  12085. "type": "object",
  12086. "properties": {
  12087. "line": {
  12088. "type": "integer",
  12089. "minimum": 0
  12090. },
  12091. "character": {
  12092. "type": "integer",
  12093. "minimum": 0
  12094. }
  12095. },
  12096. "required": ["line", "character"],
  12097. "additionalProperties": false
  12098. }
  12099. },
  12100. "required": ["start", "end"],
  12101. "additionalProperties": false
  12102. },
  12103. "SymbolSource": {
  12104. "type": "object",
  12105. "properties": {
  12106. "text": {
  12107. "$ref": "#/components/schemas/FilePartSourceText"
  12108. },
  12109. "type": {
  12110. "type": "string",
  12111. "enum": ["symbol"]
  12112. },
  12113. "path": {
  12114. "type": "string"
  12115. },
  12116. "range": {
  12117. "$ref": "#/components/schemas/Range"
  12118. },
  12119. "name": {
  12120. "type": "string"
  12121. },
  12122. "kind": {
  12123. "type": "integer",
  12124. "minimum": 0
  12125. }
  12126. },
  12127. "required": ["text", "type", "path", "range", "name", "kind"],
  12128. "additionalProperties": false
  12129. },
  12130. "ResourceSource": {
  12131. "type": "object",
  12132. "properties": {
  12133. "text": {
  12134. "$ref": "#/components/schemas/FilePartSourceText"
  12135. },
  12136. "type": {
  12137. "type": "string",
  12138. "enum": ["resource"]
  12139. },
  12140. "clientName": {
  12141. "type": "string"
  12142. },
  12143. "uri": {
  12144. "type": "string"
  12145. }
  12146. },
  12147. "required": ["text", "type", "clientName", "uri"],
  12148. "additionalProperties": false
  12149. },
  12150. "FilePartSource": {
  12151. "anyOf": [
  12152. {
  12153. "$ref": "#/components/schemas/FileSource"
  12154. },
  12155. {
  12156. "$ref": "#/components/schemas/SymbolSource"
  12157. },
  12158. {
  12159. "$ref": "#/components/schemas/ResourceSource"
  12160. }
  12161. ]
  12162. },
  12163. "FilePart": {
  12164. "type": "object",
  12165. "properties": {
  12166. "id": {
  12167. "type": "string",
  12168. "pattern": "^prt"
  12169. },
  12170. "sessionID": {
  12171. "type": "string",
  12172. "pattern": "^ses"
  12173. },
  12174. "messageID": {
  12175. "type": "string",
  12176. "pattern": "^msg"
  12177. },
  12178. "type": {
  12179. "type": "string",
  12180. "enum": ["file"]
  12181. },
  12182. "mime": {
  12183. "type": "string"
  12184. },
  12185. "filename": {
  12186. "type": "string"
  12187. },
  12188. "url": {
  12189. "type": "string"
  12190. },
  12191. "source": {
  12192. "$ref": "#/components/schemas/FilePartSource"
  12193. }
  12194. },
  12195. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12196. "additionalProperties": false
  12197. },
  12198. "ToolStatePending": {
  12199. "type": "object",
  12200. "properties": {
  12201. "status": {
  12202. "type": "string",
  12203. "enum": ["pending"]
  12204. },
  12205. "input": {
  12206. "type": "object"
  12207. },
  12208. "raw": {
  12209. "type": "string"
  12210. }
  12211. },
  12212. "required": ["status", "input", "raw"],
  12213. "additionalProperties": false
  12214. },
  12215. "ToolStateRunning": {
  12216. "type": "object",
  12217. "properties": {
  12218. "status": {
  12219. "type": "string",
  12220. "enum": ["running"]
  12221. },
  12222. "input": {
  12223. "type": "object"
  12224. },
  12225. "title": {
  12226. "type": "string"
  12227. },
  12228. "metadata": {
  12229. "type": "object"
  12230. },
  12231. "time": {
  12232. "type": "object",
  12233. "properties": {
  12234. "start": {
  12235. "type": "integer",
  12236. "minimum": 0
  12237. }
  12238. },
  12239. "required": ["start"],
  12240. "additionalProperties": false
  12241. }
  12242. },
  12243. "required": ["status", "input", "time"],
  12244. "additionalProperties": false
  12245. },
  12246. "ToolStateCompleted": {
  12247. "type": "object",
  12248. "properties": {
  12249. "status": {
  12250. "type": "string",
  12251. "enum": ["completed"]
  12252. },
  12253. "input": {
  12254. "type": "object"
  12255. },
  12256. "output": {
  12257. "type": "string"
  12258. },
  12259. "title": {
  12260. "type": "string"
  12261. },
  12262. "metadata": {
  12263. "type": "object"
  12264. },
  12265. "time": {
  12266. "type": "object",
  12267. "properties": {
  12268. "start": {
  12269. "type": "integer",
  12270. "minimum": 0
  12271. },
  12272. "end": {
  12273. "type": "integer",
  12274. "minimum": 0
  12275. },
  12276. "compacted": {
  12277. "type": "integer",
  12278. "minimum": 0
  12279. }
  12280. },
  12281. "required": ["start", "end"],
  12282. "additionalProperties": false
  12283. },
  12284. "attachments": {
  12285. "type": "array",
  12286. "items": {
  12287. "$ref": "#/components/schemas/FilePart"
  12288. }
  12289. }
  12290. },
  12291. "required": ["status", "input", "output", "title", "metadata", "time"],
  12292. "additionalProperties": false
  12293. },
  12294. "ToolStateError": {
  12295. "type": "object",
  12296. "properties": {
  12297. "status": {
  12298. "type": "string",
  12299. "enum": ["error"]
  12300. },
  12301. "input": {
  12302. "type": "object"
  12303. },
  12304. "error": {
  12305. "type": "string"
  12306. },
  12307. "metadata": {
  12308. "type": "object"
  12309. },
  12310. "time": {
  12311. "type": "object",
  12312. "properties": {
  12313. "start": {
  12314. "type": "integer",
  12315. "minimum": 0
  12316. },
  12317. "end": {
  12318. "type": "integer",
  12319. "minimum": 0
  12320. }
  12321. },
  12322. "required": ["start", "end"],
  12323. "additionalProperties": false
  12324. }
  12325. },
  12326. "required": ["status", "input", "error", "time"],
  12327. "additionalProperties": false
  12328. },
  12329. "ToolState": {
  12330. "anyOf": [
  12331. {
  12332. "$ref": "#/components/schemas/ToolStatePending"
  12333. },
  12334. {
  12335. "$ref": "#/components/schemas/ToolStateRunning"
  12336. },
  12337. {
  12338. "$ref": "#/components/schemas/ToolStateCompleted"
  12339. },
  12340. {
  12341. "$ref": "#/components/schemas/ToolStateError"
  12342. }
  12343. ]
  12344. },
  12345. "ToolPart": {
  12346. "type": "object",
  12347. "properties": {
  12348. "id": {
  12349. "type": "string",
  12350. "pattern": "^prt"
  12351. },
  12352. "sessionID": {
  12353. "type": "string",
  12354. "pattern": "^ses"
  12355. },
  12356. "messageID": {
  12357. "type": "string",
  12358. "pattern": "^msg"
  12359. },
  12360. "type": {
  12361. "type": "string",
  12362. "enum": ["tool"]
  12363. },
  12364. "callID": {
  12365. "type": "string"
  12366. },
  12367. "tool": {
  12368. "type": "string"
  12369. },
  12370. "state": {
  12371. "$ref": "#/components/schemas/ToolState"
  12372. },
  12373. "metadata": {
  12374. "type": "object"
  12375. }
  12376. },
  12377. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12378. "additionalProperties": false
  12379. },
  12380. "StepStartPart": {
  12381. "type": "object",
  12382. "properties": {
  12383. "id": {
  12384. "type": "string",
  12385. "pattern": "^prt"
  12386. },
  12387. "sessionID": {
  12388. "type": "string",
  12389. "pattern": "^ses"
  12390. },
  12391. "messageID": {
  12392. "type": "string",
  12393. "pattern": "^msg"
  12394. },
  12395. "type": {
  12396. "type": "string",
  12397. "enum": ["step-start"]
  12398. },
  12399. "snapshot": {
  12400. "type": "string"
  12401. }
  12402. },
  12403. "required": ["id", "sessionID", "messageID", "type"],
  12404. "additionalProperties": false
  12405. },
  12406. "StepFinishPart": {
  12407. "type": "object",
  12408. "properties": {
  12409. "id": {
  12410. "type": "string",
  12411. "pattern": "^prt"
  12412. },
  12413. "sessionID": {
  12414. "type": "string",
  12415. "pattern": "^ses"
  12416. },
  12417. "messageID": {
  12418. "type": "string",
  12419. "pattern": "^msg"
  12420. },
  12421. "type": {
  12422. "type": "string",
  12423. "enum": ["step-finish"]
  12424. },
  12425. "reason": {
  12426. "type": "string"
  12427. },
  12428. "snapshot": {
  12429. "type": "string"
  12430. },
  12431. "cost": {
  12432. "type": "number"
  12433. },
  12434. "tokens": {
  12435. "type": "object",
  12436. "properties": {
  12437. "total": {
  12438. "type": "number"
  12439. },
  12440. "input": {
  12441. "type": "number"
  12442. },
  12443. "output": {
  12444. "type": "number"
  12445. },
  12446. "reasoning": {
  12447. "type": "number"
  12448. },
  12449. "cache": {
  12450. "type": "object",
  12451. "properties": {
  12452. "read": {
  12453. "type": "number"
  12454. },
  12455. "write": {
  12456. "type": "number"
  12457. }
  12458. },
  12459. "required": ["read", "write"],
  12460. "additionalProperties": false
  12461. }
  12462. },
  12463. "required": ["input", "output", "reasoning", "cache"],
  12464. "additionalProperties": false
  12465. }
  12466. },
  12467. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12468. "additionalProperties": false
  12469. },
  12470. "SnapshotPart": {
  12471. "type": "object",
  12472. "properties": {
  12473. "id": {
  12474. "type": "string",
  12475. "pattern": "^prt"
  12476. },
  12477. "sessionID": {
  12478. "type": "string",
  12479. "pattern": "^ses"
  12480. },
  12481. "messageID": {
  12482. "type": "string",
  12483. "pattern": "^msg"
  12484. },
  12485. "type": {
  12486. "type": "string",
  12487. "enum": ["snapshot"]
  12488. },
  12489. "snapshot": {
  12490. "type": "string"
  12491. }
  12492. },
  12493. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12494. "additionalProperties": false
  12495. },
  12496. "PatchPart": {
  12497. "type": "object",
  12498. "properties": {
  12499. "id": {
  12500. "type": "string",
  12501. "pattern": "^prt"
  12502. },
  12503. "sessionID": {
  12504. "type": "string",
  12505. "pattern": "^ses"
  12506. },
  12507. "messageID": {
  12508. "type": "string",
  12509. "pattern": "^msg"
  12510. },
  12511. "type": {
  12512. "type": "string",
  12513. "enum": ["patch"]
  12514. },
  12515. "hash": {
  12516. "type": "string"
  12517. },
  12518. "files": {
  12519. "type": "array",
  12520. "items": {
  12521. "type": "string"
  12522. }
  12523. }
  12524. },
  12525. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12526. "additionalProperties": false
  12527. },
  12528. "AgentPart": {
  12529. "type": "object",
  12530. "properties": {
  12531. "id": {
  12532. "type": "string",
  12533. "pattern": "^prt"
  12534. },
  12535. "sessionID": {
  12536. "type": "string",
  12537. "pattern": "^ses"
  12538. },
  12539. "messageID": {
  12540. "type": "string",
  12541. "pattern": "^msg"
  12542. },
  12543. "type": {
  12544. "type": "string",
  12545. "enum": ["agent"]
  12546. },
  12547. "name": {
  12548. "type": "string"
  12549. },
  12550. "source": {
  12551. "type": "object",
  12552. "properties": {
  12553. "value": {
  12554. "type": "string"
  12555. },
  12556. "start": {
  12557. "type": "integer",
  12558. "minimum": 0
  12559. },
  12560. "end": {
  12561. "type": "integer",
  12562. "minimum": 0
  12563. }
  12564. },
  12565. "required": ["value", "start", "end"],
  12566. "additionalProperties": false
  12567. }
  12568. },
  12569. "required": ["id", "sessionID", "messageID", "type", "name"],
  12570. "additionalProperties": false
  12571. },
  12572. "RetryPart": {
  12573. "type": "object",
  12574. "properties": {
  12575. "id": {
  12576. "type": "string",
  12577. "pattern": "^prt"
  12578. },
  12579. "sessionID": {
  12580. "type": "string",
  12581. "pattern": "^ses"
  12582. },
  12583. "messageID": {
  12584. "type": "string",
  12585. "pattern": "^msg"
  12586. },
  12587. "type": {
  12588. "type": "string",
  12589. "enum": ["retry"]
  12590. },
  12591. "attempt": {
  12592. "type": "integer",
  12593. "minimum": 0
  12594. },
  12595. "error": {
  12596. "$ref": "#/components/schemas/APIError"
  12597. },
  12598. "time": {
  12599. "type": "object",
  12600. "properties": {
  12601. "created": {
  12602. "type": "integer",
  12603. "minimum": 0
  12604. }
  12605. },
  12606. "required": ["created"],
  12607. "additionalProperties": false
  12608. }
  12609. },
  12610. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12611. "additionalProperties": false
  12612. },
  12613. "CompactionPart": {
  12614. "type": "object",
  12615. "properties": {
  12616. "id": {
  12617. "type": "string",
  12618. "pattern": "^prt"
  12619. },
  12620. "sessionID": {
  12621. "type": "string",
  12622. "pattern": "^ses"
  12623. },
  12624. "messageID": {
  12625. "type": "string",
  12626. "pattern": "^msg"
  12627. },
  12628. "type": {
  12629. "type": "string",
  12630. "enum": ["compaction"]
  12631. },
  12632. "auto": {
  12633. "type": "boolean"
  12634. },
  12635. "overflow": {
  12636. "type": "boolean"
  12637. },
  12638. "tail_start_id": {
  12639. "type": "string",
  12640. "pattern": "^msg"
  12641. }
  12642. },
  12643. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12644. "additionalProperties": false
  12645. },
  12646. "Part": {
  12647. "anyOf": [
  12648. {
  12649. "$ref": "#/components/schemas/TextPart"
  12650. },
  12651. {
  12652. "$ref": "#/components/schemas/SubtaskPart"
  12653. },
  12654. {
  12655. "$ref": "#/components/schemas/ReasoningPart"
  12656. },
  12657. {
  12658. "$ref": "#/components/schemas/FilePart"
  12659. },
  12660. {
  12661. "$ref": "#/components/schemas/ToolPart"
  12662. },
  12663. {
  12664. "$ref": "#/components/schemas/StepStartPart"
  12665. },
  12666. {
  12667. "$ref": "#/components/schemas/StepFinishPart"
  12668. },
  12669. {
  12670. "$ref": "#/components/schemas/SnapshotPart"
  12671. },
  12672. {
  12673. "$ref": "#/components/schemas/PatchPart"
  12674. },
  12675. {
  12676. "$ref": "#/components/schemas/AgentPart"
  12677. },
  12678. {
  12679. "$ref": "#/components/schemas/RetryPart"
  12680. },
  12681. {
  12682. "$ref": "#/components/schemas/CompactionPart"
  12683. }
  12684. ]
  12685. },
  12686. "PermissionAction": {
  12687. "type": "string",
  12688. "enum": ["allow", "deny", "ask"]
  12689. },
  12690. "PermissionRule": {
  12691. "type": "object",
  12692. "properties": {
  12693. "permission": {
  12694. "type": "string"
  12695. },
  12696. "pattern": {
  12697. "type": "string"
  12698. },
  12699. "action": {
  12700. "$ref": "#/components/schemas/PermissionAction"
  12701. }
  12702. },
  12703. "required": ["permission", "pattern", "action"],
  12704. "additionalProperties": false
  12705. },
  12706. "PermissionRuleset": {
  12707. "type": "array",
  12708. "items": {
  12709. "$ref": "#/components/schemas/PermissionRule"
  12710. }
  12711. },
  12712. "Session": {
  12713. "type": "object",
  12714. "properties": {
  12715. "id": {
  12716. "type": "string",
  12717. "pattern": "^ses"
  12718. },
  12719. "slug": {
  12720. "type": "string"
  12721. },
  12722. "projectID": {
  12723. "type": "string"
  12724. },
  12725. "workspaceID": {
  12726. "type": "string",
  12727. "pattern": "^wrk"
  12728. },
  12729. "directory": {
  12730. "type": "string"
  12731. },
  12732. "path": {
  12733. "type": "string"
  12734. },
  12735. "parentID": {
  12736. "type": "string",
  12737. "pattern": "^ses"
  12738. },
  12739. "summary": {
  12740. "type": "object",
  12741. "properties": {
  12742. "additions": {
  12743. "type": "number"
  12744. },
  12745. "deletions": {
  12746. "type": "number"
  12747. },
  12748. "files": {
  12749. "type": "number"
  12750. },
  12751. "diffs": {
  12752. "type": "array",
  12753. "items": {
  12754. "$ref": "#/components/schemas/SnapshotFileDiff"
  12755. }
  12756. }
  12757. },
  12758. "required": ["additions", "deletions", "files"],
  12759. "additionalProperties": false
  12760. },
  12761. "cost": {
  12762. "type": "number"
  12763. },
  12764. "tokens": {
  12765. "type": "object",
  12766. "properties": {
  12767. "input": {
  12768. "type": "number"
  12769. },
  12770. "output": {
  12771. "type": "number"
  12772. },
  12773. "reasoning": {
  12774. "type": "number"
  12775. },
  12776. "cache": {
  12777. "type": "object",
  12778. "properties": {
  12779. "read": {
  12780. "type": "number"
  12781. },
  12782. "write": {
  12783. "type": "number"
  12784. }
  12785. },
  12786. "required": ["read", "write"],
  12787. "additionalProperties": false
  12788. }
  12789. },
  12790. "required": ["input", "output", "reasoning", "cache"],
  12791. "additionalProperties": false
  12792. },
  12793. "share": {
  12794. "type": "object",
  12795. "properties": {
  12796. "url": {
  12797. "type": "string"
  12798. }
  12799. },
  12800. "required": ["url"],
  12801. "additionalProperties": false
  12802. },
  12803. "title": {
  12804. "type": "string"
  12805. },
  12806. "agent": {
  12807. "type": "string"
  12808. },
  12809. "model": {
  12810. "type": "object",
  12811. "properties": {
  12812. "id": {
  12813. "type": "string"
  12814. },
  12815. "providerID": {
  12816. "type": "string"
  12817. },
  12818. "variant": {
  12819. "type": "string"
  12820. }
  12821. },
  12822. "required": ["id", "providerID"],
  12823. "additionalProperties": false
  12824. },
  12825. "version": {
  12826. "type": "string"
  12827. },
  12828. "metadata": {
  12829. "type": "object"
  12830. },
  12831. "time": {
  12832. "type": "object",
  12833. "properties": {
  12834. "created": {
  12835. "type": "integer",
  12836. "minimum": 0
  12837. },
  12838. "updated": {
  12839. "type": "integer",
  12840. "minimum": 0
  12841. },
  12842. "compacting": {
  12843. "type": "integer",
  12844. "minimum": 0
  12845. },
  12846. "archived": {
  12847. "type": "number"
  12848. }
  12849. },
  12850. "required": ["created", "updated"],
  12851. "additionalProperties": false
  12852. },
  12853. "permission": {
  12854. "$ref": "#/components/schemas/PermissionRuleset"
  12855. },
  12856. "revert": {
  12857. "type": "object",
  12858. "properties": {
  12859. "messageID": {
  12860. "type": "string",
  12861. "pattern": "^msg"
  12862. },
  12863. "partID": {
  12864. "type": "string",
  12865. "pattern": "^prt"
  12866. },
  12867. "snapshot": {
  12868. "type": "string"
  12869. },
  12870. "diff": {
  12871. "type": "string"
  12872. }
  12873. },
  12874. "required": ["messageID"],
  12875. "additionalProperties": false
  12876. }
  12877. },
  12878. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12879. "additionalProperties": false
  12880. },
  12881. "Prompt": {
  12882. "type": "object",
  12883. "properties": {
  12884. "text": {
  12885. "type": "string"
  12886. },
  12887. "files": {
  12888. "type": "array",
  12889. "items": {
  12890. "$ref": "#/components/schemas/PromptFileAttachment"
  12891. }
  12892. },
  12893. "agents": {
  12894. "type": "array",
  12895. "items": {
  12896. "$ref": "#/components/schemas/PromptAgentAttachment"
  12897. }
  12898. },
  12899. "references": {
  12900. "type": "array",
  12901. "items": {
  12902. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12903. }
  12904. }
  12905. },
  12906. "required": ["text"],
  12907. "additionalProperties": false
  12908. },
  12909. "GlobalEvent": {
  12910. "type": "object",
  12911. "properties": {
  12912. "directory": {
  12913. "type": "string"
  12914. },
  12915. "project": {
  12916. "type": "string"
  12917. },
  12918. "workspace": {
  12919. "type": "string"
  12920. },
  12921. "payload": {
  12922. "anyOf": [
  12923. {
  12924. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12925. },
  12926. {
  12927. "$ref": "#/components/schemas/Event.tui.command.execute"
  12928. },
  12929. {
  12930. "$ref": "#/components/schemas/Event.tui.toast.show"
  12931. },
  12932. {
  12933. "$ref": "#/components/schemas/Event.tui.session.select"
  12934. },
  12935. {
  12936. "$ref": "#/components/schemas/EventServerConnected"
  12937. },
  12938. {
  12939. "$ref": "#/components/schemas/EventGlobalDisposed"
  12940. },
  12941. {
  12942. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12943. },
  12944. {
  12945. "$ref": "#/components/schemas/EventFileEdited"
  12946. },
  12947. {
  12948. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12949. },
  12950. {
  12951. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12952. },
  12953. {
  12954. "$ref": "#/components/schemas/EventLspUpdated"
  12955. },
  12956. {
  12957. "$ref": "#/components/schemas/EventMessagePartDelta"
  12958. },
  12959. {
  12960. "$ref": "#/components/schemas/EventPermissionAsked"
  12961. },
  12962. {
  12963. "$ref": "#/components/schemas/EventPermissionReplied"
  12964. },
  12965. {
  12966. "$ref": "#/components/schemas/EventSessionDiff"
  12967. },
  12968. {
  12969. "$ref": "#/components/schemas/EventSessionError"
  12970. },
  12971. {
  12972. "$ref": "#/components/schemas/EventQuestionAsked"
  12973. },
  12974. {
  12975. "$ref": "#/components/schemas/EventQuestionReplied"
  12976. },
  12977. {
  12978. "$ref": "#/components/schemas/EventQuestionRejected"
  12979. },
  12980. {
  12981. "$ref": "#/components/schemas/EventTodoUpdated"
  12982. },
  12983. {
  12984. "$ref": "#/components/schemas/EventSessionStatus"
  12985. },
  12986. {
  12987. "$ref": "#/components/schemas/EventSessionIdle"
  12988. },
  12989. {
  12990. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12991. },
  12992. {
  12993. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12994. },
  12995. {
  12996. "$ref": "#/components/schemas/EventCommandExecuted"
  12997. },
  12998. {
  12999. "$ref": "#/components/schemas/EventProjectUpdated"
  13000. },
  13001. {
  13002. "$ref": "#/components/schemas/EventSessionCompacted"
  13003. },
  13004. {
  13005. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  13006. },
  13007. {
  13008. "$ref": "#/components/schemas/EventWorkspaceReady"
  13009. },
  13010. {
  13011. "$ref": "#/components/schemas/EventWorkspaceFailed"
  13012. },
  13013. {
  13014. "$ref": "#/components/schemas/EventWorkspaceStatus"
  13015. },
  13016. {
  13017. "$ref": "#/components/schemas/EventWorktreeReady"
  13018. },
  13019. {
  13020. "$ref": "#/components/schemas/EventWorktreeFailed"
  13021. },
  13022. {
  13023. "$ref": "#/components/schemas/EventPtyCreated"
  13024. },
  13025. {
  13026. "$ref": "#/components/schemas/EventPtyUpdated"
  13027. },
  13028. {
  13029. "$ref": "#/components/schemas/EventPtyExited"
  13030. },
  13031. {
  13032. "$ref": "#/components/schemas/EventPtyDeleted"
  13033. },
  13034. {
  13035. "$ref": "#/components/schemas/EventInstallationUpdated"
  13036. },
  13037. {
  13038. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  13039. },
  13040. {
  13041. "$ref": "#/components/schemas/EventMessageUpdated"
  13042. },
  13043. {
  13044. "$ref": "#/components/schemas/EventMessageRemoved"
  13045. },
  13046. {
  13047. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13048. },
  13049. {
  13050. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13051. },
  13052. {
  13053. "$ref": "#/components/schemas/EventSessionCreated"
  13054. },
  13055. {
  13056. "$ref": "#/components/schemas/EventSessionUpdated"
  13057. },
  13058. {
  13059. "$ref": "#/components/schemas/EventSessionDeleted"
  13060. },
  13061. {
  13062. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13063. },
  13064. {
  13065. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13066. },
  13067. {
  13068. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13069. },
  13070. {
  13071. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13072. },
  13073. {
  13074. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13075. },
  13076. {
  13077. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13078. },
  13079. {
  13080. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13081. },
  13082. {
  13083. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13084. },
  13085. {
  13086. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13087. },
  13088. {
  13089. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13090. },
  13091. {
  13092. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13093. },
  13094. {
  13095. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13096. },
  13097. {
  13098. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13099. },
  13100. {
  13101. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13102. },
  13103. {
  13104. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13105. },
  13106. {
  13107. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13108. },
  13109. {
  13110. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13111. },
  13112. {
  13113. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13114. },
  13115. {
  13116. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13117. },
  13118. {
  13119. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13120. },
  13121. {
  13122. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13123. },
  13124. {
  13125. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13126. },
  13127. {
  13128. "$ref": "#/components/schemas/EventSessionNextRetried"
  13129. },
  13130. {
  13131. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13132. },
  13133. {
  13134. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13135. },
  13136. {
  13137. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13138. },
  13139. {
  13140. "$ref": "#/components/schemas/EventPluginAdded"
  13141. },
  13142. {
  13143. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13144. },
  13145. {
  13146. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13147. },
  13148. {
  13149. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13150. },
  13151. {
  13152. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13153. },
  13154. {
  13155. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13156. },
  13157. {
  13158. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13159. },
  13160. {
  13161. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13162. },
  13163. {
  13164. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13165. },
  13166. {
  13167. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13168. },
  13169. {
  13170. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13171. },
  13172. {
  13173. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13174. },
  13175. {
  13176. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13177. },
  13178. {
  13179. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13180. },
  13181. {
  13182. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13183. },
  13184. {
  13185. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13186. },
  13187. {
  13188. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13189. },
  13190. {
  13191. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13192. },
  13193. {
  13194. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13195. },
  13196. {
  13197. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13198. },
  13199. {
  13200. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13201. },
  13202. {
  13203. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13204. },
  13205. {
  13206. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13207. },
  13208. {
  13209. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13210. },
  13211. {
  13212. "$ref": "#/components/schemas/EventSessionNextRetried"
  13213. },
  13214. {
  13215. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13216. },
  13217. {
  13218. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13219. },
  13220. {
  13221. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13222. },
  13223. {
  13224. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13225. },
  13226. {
  13227. "$ref": "#/components/schemas/EventAccountAdded"
  13228. },
  13229. {
  13230. "$ref": "#/components/schemas/EventAccountRemoved"
  13231. },
  13232. {
  13233. "$ref": "#/components/schemas/EventAccountSwitched"
  13234. },
  13235. {
  13236. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13237. },
  13238. {
  13239. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13240. },
  13241. {
  13242. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13243. },
  13244. {
  13245. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13246. },
  13247. {
  13248. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13249. },
  13250. {
  13251. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13252. },
  13253. {
  13254. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13255. },
  13256. {
  13257. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13258. },
  13259. {
  13260. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13261. },
  13262. {
  13263. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13264. },
  13265. {
  13266. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13267. },
  13268. {
  13269. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13270. },
  13271. {
  13272. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13273. },
  13274. {
  13275. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13276. },
  13277. {
  13278. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13279. },
  13280. {
  13281. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13282. },
  13283. {
  13284. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13285. },
  13286. {
  13287. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13288. },
  13289. {
  13290. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13291. },
  13292. {
  13293. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13294. },
  13295. {
  13296. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13297. },
  13298. {
  13299. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13300. },
  13301. {
  13302. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13303. },
  13304. {
  13305. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13306. },
  13307. {
  13308. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13309. },
  13310. {
  13311. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13312. },
  13313. {
  13314. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13315. },
  13316. {
  13317. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13318. },
  13319. {
  13320. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13321. },
  13322. {
  13323. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13324. },
  13325. {
  13326. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13327. },
  13328. {
  13329. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13330. },
  13331. {
  13332. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13333. }
  13334. ]
  13335. }
  13336. },
  13337. "required": ["directory", "payload"],
  13338. "additionalProperties": false
  13339. },
  13340. "LogLevel": {
  13341. "type": "string",
  13342. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13343. "description": "Log level"
  13344. },
  13345. "ServerConfig": {
  13346. "type": "object",
  13347. "properties": {
  13348. "port": {
  13349. "type": "integer",
  13350. "exclusiveMinimum": 0
  13351. },
  13352. "hostname": {
  13353. "type": "string"
  13354. },
  13355. "mdns": {
  13356. "type": "boolean"
  13357. },
  13358. "mdnsDomain": {
  13359. "type": "string"
  13360. },
  13361. "cors": {
  13362. "type": "array",
  13363. "items": {
  13364. "type": "string"
  13365. }
  13366. }
  13367. },
  13368. "additionalProperties": false,
  13369. "description": "Server configuration for opencode serve and web commands"
  13370. },
  13371. "ReferenceConfigEntry": {
  13372. "anyOf": [
  13373. {
  13374. "type": "string"
  13375. },
  13376. {
  13377. "type": "object",
  13378. "properties": {
  13379. "repository": {
  13380. "type": "string",
  13381. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13382. },
  13383. "branch": {
  13384. "type": "string"
  13385. }
  13386. },
  13387. "required": ["repository"],
  13388. "additionalProperties": false
  13389. },
  13390. {
  13391. "type": "object",
  13392. "properties": {
  13393. "path": {
  13394. "type": "string",
  13395. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13396. }
  13397. },
  13398. "required": ["path"],
  13399. "additionalProperties": false
  13400. }
  13401. ]
  13402. },
  13403. "ReferenceConfig": {
  13404. "type": "object",
  13405. "additionalProperties": {
  13406. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13407. }
  13408. },
  13409. "PermissionActionConfig": {
  13410. "type": "string",
  13411. "enum": ["ask", "allow", "deny"]
  13412. },
  13413. "PermissionObjectConfig": {
  13414. "type": "object",
  13415. "additionalProperties": {
  13416. "$ref": "#/components/schemas/PermissionActionConfig"
  13417. }
  13418. },
  13419. "PermissionRuleConfig": {
  13420. "anyOf": [
  13421. {
  13422. "$ref": "#/components/schemas/PermissionActionConfig"
  13423. },
  13424. {
  13425. "$ref": "#/components/schemas/PermissionObjectConfig"
  13426. }
  13427. ]
  13428. },
  13429. "PermissionConfig": {
  13430. "anyOf": [
  13431. {
  13432. "$ref": "#/components/schemas/PermissionActionConfig"
  13433. },
  13434. {
  13435. "type": "object",
  13436. "properties": {
  13437. "read": {
  13438. "$ref": "#/components/schemas/PermissionRuleConfig"
  13439. },
  13440. "edit": {
  13441. "$ref": "#/components/schemas/PermissionRuleConfig"
  13442. },
  13443. "glob": {
  13444. "$ref": "#/components/schemas/PermissionRuleConfig"
  13445. },
  13446. "grep": {
  13447. "$ref": "#/components/schemas/PermissionRuleConfig"
  13448. },
  13449. "list": {
  13450. "$ref": "#/components/schemas/PermissionRuleConfig"
  13451. },
  13452. "bash": {
  13453. "$ref": "#/components/schemas/PermissionRuleConfig"
  13454. },
  13455. "task": {
  13456. "$ref": "#/components/schemas/PermissionRuleConfig"
  13457. },
  13458. "external_directory": {
  13459. "$ref": "#/components/schemas/PermissionRuleConfig"
  13460. },
  13461. "todowrite": {
  13462. "$ref": "#/components/schemas/PermissionActionConfig"
  13463. },
  13464. "question": {
  13465. "$ref": "#/components/schemas/PermissionActionConfig"
  13466. },
  13467. "webfetch": {
  13468. "$ref": "#/components/schemas/PermissionActionConfig"
  13469. },
  13470. "websearch": {
  13471. "$ref": "#/components/schemas/PermissionActionConfig"
  13472. },
  13473. "repo_clone": {
  13474. "$ref": "#/components/schemas/PermissionRuleConfig"
  13475. },
  13476. "repo_overview": {
  13477. "$ref": "#/components/schemas/PermissionRuleConfig"
  13478. },
  13479. "lsp": {
  13480. "$ref": "#/components/schemas/PermissionRuleConfig"
  13481. },
  13482. "doom_loop": {
  13483. "$ref": "#/components/schemas/PermissionActionConfig"
  13484. },
  13485. "skill": {
  13486. "$ref": "#/components/schemas/PermissionRuleConfig"
  13487. }
  13488. },
  13489. "additionalProperties": {
  13490. "$ref": "#/components/schemas/PermissionRuleConfig"
  13491. }
  13492. }
  13493. ]
  13494. },
  13495. "AgentConfig": {
  13496. "type": "object",
  13497. "properties": {
  13498. "model": {
  13499. "type": "string"
  13500. },
  13501. "variant": {
  13502. "type": "string"
  13503. },
  13504. "temperature": {
  13505. "type": "number"
  13506. },
  13507. "top_p": {
  13508. "type": "number"
  13509. },
  13510. "prompt": {
  13511. "type": "string"
  13512. },
  13513. "tools": {
  13514. "type": "object",
  13515. "additionalProperties": {
  13516. "type": "boolean"
  13517. }
  13518. },
  13519. "disable": {
  13520. "type": "boolean"
  13521. },
  13522. "description": {
  13523. "type": "string"
  13524. },
  13525. "mode": {
  13526. "type": "string",
  13527. "enum": ["subagent", "primary", "all"]
  13528. },
  13529. "hidden": {
  13530. "type": "boolean"
  13531. },
  13532. "options": {
  13533. "type": "object"
  13534. },
  13535. "color": {
  13536. "anyOf": [
  13537. {
  13538. "type": "string",
  13539. "pattern": "^#[0-9a-fA-F]{6}$"
  13540. },
  13541. {
  13542. "type": "string",
  13543. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13544. }
  13545. ],
  13546. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13547. },
  13548. "steps": {
  13549. "type": "integer",
  13550. "exclusiveMinimum": 0
  13551. },
  13552. "maxSteps": {
  13553. "type": "integer",
  13554. "exclusiveMinimum": 0
  13555. },
  13556. "permission": {
  13557. "$ref": "#/components/schemas/PermissionConfig"
  13558. }
  13559. },
  13560. "additionalProperties": {}
  13561. },
  13562. "ProviderConfig": {
  13563. "type": "object",
  13564. "properties": {
  13565. "api": {
  13566. "type": "string"
  13567. },
  13568. "name": {
  13569. "type": "string"
  13570. },
  13571. "env": {
  13572. "type": "array",
  13573. "items": {
  13574. "type": "string"
  13575. }
  13576. },
  13577. "id": {
  13578. "type": "string"
  13579. },
  13580. "npm": {
  13581. "type": "string"
  13582. },
  13583. "whitelist": {
  13584. "type": "array",
  13585. "items": {
  13586. "type": "string"
  13587. }
  13588. },
  13589. "blacklist": {
  13590. "type": "array",
  13591. "items": {
  13592. "type": "string"
  13593. }
  13594. },
  13595. "options": {
  13596. "type": "object",
  13597. "properties": {
  13598. "apiKey": {
  13599. "type": "string"
  13600. },
  13601. "baseURL": {
  13602. "type": "string"
  13603. },
  13604. "enterpriseUrl": {
  13605. "type": "string"
  13606. },
  13607. "setCacheKey": {
  13608. "type": "boolean"
  13609. },
  13610. "timeout": {
  13611. "anyOf": [
  13612. {
  13613. "type": "integer",
  13614. "exclusiveMinimum": 0
  13615. },
  13616. {
  13617. "type": "boolean",
  13618. "enum": [false]
  13619. }
  13620. ],
  13621. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  13622. },
  13623. "headerTimeout": {
  13624. "anyOf": [
  13625. {
  13626. "type": "integer",
  13627. "exclusiveMinimum": 0
  13628. },
  13629. {
  13630. "type": "boolean",
  13631. "enum": [false]
  13632. }
  13633. ],
  13634. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  13635. },
  13636. "chunkTimeout": {
  13637. "type": "integer",
  13638. "exclusiveMinimum": 0
  13639. }
  13640. },
  13641. "additionalProperties": {}
  13642. },
  13643. "models": {
  13644. "type": "object",
  13645. "additionalProperties": {
  13646. "type": "object",
  13647. "properties": {
  13648. "id": {
  13649. "type": "string"
  13650. },
  13651. "name": {
  13652. "type": "string"
  13653. },
  13654. "family": {
  13655. "type": "string"
  13656. },
  13657. "release_date": {
  13658. "type": "string"
  13659. },
  13660. "attachment": {
  13661. "type": "boolean"
  13662. },
  13663. "reasoning": {
  13664. "type": "boolean"
  13665. },
  13666. "temperature": {
  13667. "type": "boolean"
  13668. },
  13669. "tool_call": {
  13670. "type": "boolean"
  13671. },
  13672. "interleaved": {
  13673. "anyOf": [
  13674. {
  13675. "type": "boolean",
  13676. "enum": [true]
  13677. },
  13678. {
  13679. "type": "object",
  13680. "properties": {
  13681. "field": {
  13682. "type": "string",
  13683. "enum": ["reasoning_content", "reasoning_details"]
  13684. }
  13685. },
  13686. "required": ["field"],
  13687. "additionalProperties": false
  13688. }
  13689. ]
  13690. },
  13691. "cost": {
  13692. "type": "object",
  13693. "properties": {
  13694. "input": {
  13695. "type": "number"
  13696. },
  13697. "output": {
  13698. "type": "number"
  13699. },
  13700. "cache_read": {
  13701. "type": "number"
  13702. },
  13703. "cache_write": {
  13704. "type": "number"
  13705. },
  13706. "context_over_200k": {
  13707. "type": "object",
  13708. "properties": {
  13709. "input": {
  13710. "type": "number"
  13711. },
  13712. "output": {
  13713. "type": "number"
  13714. },
  13715. "cache_read": {
  13716. "type": "number"
  13717. },
  13718. "cache_write": {
  13719. "type": "number"
  13720. }
  13721. },
  13722. "required": ["input", "output"],
  13723. "additionalProperties": false
  13724. }
  13725. },
  13726. "required": ["input", "output"],
  13727. "additionalProperties": false
  13728. },
  13729. "limit": {
  13730. "type": "object",
  13731. "properties": {
  13732. "context": {
  13733. "type": "number"
  13734. },
  13735. "input": {
  13736. "type": "number"
  13737. },
  13738. "output": {
  13739. "type": "number"
  13740. }
  13741. },
  13742. "required": ["context", "output"],
  13743. "additionalProperties": false
  13744. },
  13745. "modalities": {
  13746. "type": "object",
  13747. "properties": {
  13748. "input": {
  13749. "type": "array",
  13750. "items": {
  13751. "type": "string",
  13752. "enum": ["text", "audio", "image", "video", "pdf"]
  13753. }
  13754. },
  13755. "output": {
  13756. "type": "array",
  13757. "items": {
  13758. "type": "string",
  13759. "enum": ["text", "audio", "image", "video", "pdf"]
  13760. }
  13761. }
  13762. },
  13763. "additionalProperties": false
  13764. },
  13765. "experimental": {
  13766. "type": "boolean"
  13767. },
  13768. "status": {
  13769. "type": "string",
  13770. "enum": ["alpha", "beta", "deprecated", "active"]
  13771. },
  13772. "provider": {
  13773. "type": "object",
  13774. "properties": {
  13775. "npm": {
  13776. "type": "string"
  13777. },
  13778. "api": {
  13779. "type": "string"
  13780. }
  13781. },
  13782. "additionalProperties": false
  13783. },
  13784. "options": {
  13785. "type": "object"
  13786. },
  13787. "headers": {
  13788. "type": "object",
  13789. "additionalProperties": {
  13790. "type": "string"
  13791. }
  13792. },
  13793. "variants": {
  13794. "type": "object",
  13795. "additionalProperties": {
  13796. "type": "object",
  13797. "properties": {
  13798. "disabled": {
  13799. "type": "boolean"
  13800. }
  13801. },
  13802. "additionalProperties": {}
  13803. },
  13804. "description": "Variant-specific configuration"
  13805. }
  13806. },
  13807. "additionalProperties": false
  13808. }
  13809. }
  13810. },
  13811. "additionalProperties": false
  13812. },
  13813. "McpLocalConfig": {
  13814. "type": "object",
  13815. "properties": {
  13816. "type": {
  13817. "type": "string",
  13818. "enum": ["local"],
  13819. "description": "Type of MCP server connection"
  13820. },
  13821. "command": {
  13822. "type": "array",
  13823. "items": {
  13824. "type": "string"
  13825. },
  13826. "description": "Command and arguments to run the MCP server"
  13827. },
  13828. "environment": {
  13829. "type": "object",
  13830. "additionalProperties": {
  13831. "type": "string"
  13832. }
  13833. },
  13834. "enabled": {
  13835. "type": "boolean"
  13836. },
  13837. "timeout": {
  13838. "type": "integer",
  13839. "exclusiveMinimum": 0
  13840. }
  13841. },
  13842. "required": ["type", "command"],
  13843. "additionalProperties": false
  13844. },
  13845. "McpOAuthConfig": {
  13846. "type": "object",
  13847. "properties": {
  13848. "clientId": {
  13849. "type": "string"
  13850. },
  13851. "clientSecret": {
  13852. "type": "string"
  13853. },
  13854. "scope": {
  13855. "type": "string"
  13856. },
  13857. "callbackPort": {
  13858. "type": "integer",
  13859. "minimum": 1,
  13860. "maximum": 65535
  13861. },
  13862. "redirectUri": {
  13863. "type": "string"
  13864. }
  13865. },
  13866. "additionalProperties": false
  13867. },
  13868. "McpRemoteConfig": {
  13869. "type": "object",
  13870. "properties": {
  13871. "type": {
  13872. "type": "string",
  13873. "enum": ["remote"],
  13874. "description": "Type of MCP server connection"
  13875. },
  13876. "url": {
  13877. "type": "string",
  13878. "description": "URL of the remote MCP server"
  13879. },
  13880. "enabled": {
  13881. "type": "boolean"
  13882. },
  13883. "headers": {
  13884. "type": "object",
  13885. "additionalProperties": {
  13886. "type": "string"
  13887. }
  13888. },
  13889. "oauth": {
  13890. "anyOf": [
  13891. {
  13892. "$ref": "#/components/schemas/McpOAuthConfig"
  13893. },
  13894. {
  13895. "type": "boolean",
  13896. "enum": [false]
  13897. }
  13898. ],
  13899. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13900. },
  13901. "timeout": {
  13902. "type": "integer",
  13903. "exclusiveMinimum": 0
  13904. }
  13905. },
  13906. "required": ["type", "url"],
  13907. "additionalProperties": false
  13908. },
  13909. "LayoutConfig": {
  13910. "type": "string",
  13911. "enum": ["auto", "stretch"],
  13912. "description": "@deprecated Always uses stretch layout."
  13913. },
  13914. "ImageAttachmentConfig": {
  13915. "type": "object",
  13916. "properties": {
  13917. "auto_resize": {
  13918. "type": "boolean"
  13919. },
  13920. "max_width": {
  13921. "type": "integer",
  13922. "exclusiveMinimum": 0
  13923. },
  13924. "max_height": {
  13925. "type": "integer",
  13926. "exclusiveMinimum": 0
  13927. },
  13928. "max_base64_bytes": {
  13929. "type": "integer",
  13930. "exclusiveMinimum": 0
  13931. }
  13932. },
  13933. "additionalProperties": false
  13934. },
  13935. "AttachmentConfig": {
  13936. "type": "object",
  13937. "properties": {
  13938. "image": {
  13939. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13940. }
  13941. },
  13942. "additionalProperties": false
  13943. },
  13944. "Config": {
  13945. "type": "object",
  13946. "properties": {
  13947. "$schema": {
  13948. "type": "string"
  13949. },
  13950. "shell": {
  13951. "type": "string"
  13952. },
  13953. "logLevel": {
  13954. "$ref": "#/components/schemas/LogLevel"
  13955. },
  13956. "server": {
  13957. "$ref": "#/components/schemas/ServerConfig"
  13958. },
  13959. "command": {
  13960. "type": "object",
  13961. "additionalProperties": {
  13962. "type": "object",
  13963. "properties": {
  13964. "template": {
  13965. "type": "string"
  13966. },
  13967. "description": {
  13968. "type": "string"
  13969. },
  13970. "agent": {
  13971. "type": "string"
  13972. },
  13973. "model": {
  13974. "type": "string"
  13975. },
  13976. "subtask": {
  13977. "type": "boolean"
  13978. }
  13979. },
  13980. "required": ["template"],
  13981. "additionalProperties": false
  13982. }
  13983. },
  13984. "skills": {
  13985. "type": "object",
  13986. "properties": {
  13987. "paths": {
  13988. "type": "array",
  13989. "items": {
  13990. "type": "string"
  13991. }
  13992. },
  13993. "urls": {
  13994. "type": "array",
  13995. "items": {
  13996. "type": "string"
  13997. }
  13998. }
  13999. },
  14000. "additionalProperties": false
  14001. },
  14002. "reference": {
  14003. "$ref": "#/components/schemas/ReferenceConfig"
  14004. },
  14005. "watcher": {
  14006. "type": "object",
  14007. "properties": {
  14008. "ignore": {
  14009. "type": "array",
  14010. "items": {
  14011. "type": "string"
  14012. }
  14013. }
  14014. },
  14015. "additionalProperties": false
  14016. },
  14017. "snapshot": {
  14018. "type": "boolean"
  14019. },
  14020. "plugin": {
  14021. "type": "array",
  14022. "items": {
  14023. "anyOf": [
  14024. {
  14025. "type": "string"
  14026. },
  14027. {
  14028. "type": "array",
  14029. "prefixItems": [
  14030. {
  14031. "type": "string"
  14032. },
  14033. {
  14034. "type": "object"
  14035. }
  14036. ],
  14037. "maxItems": 2,
  14038. "minItems": 2
  14039. }
  14040. ]
  14041. }
  14042. },
  14043. "share": {
  14044. "type": "string",
  14045. "enum": ["manual", "auto", "disabled"]
  14046. },
  14047. "autoshare": {
  14048. "type": "boolean"
  14049. },
  14050. "autoupdate": {
  14051. "anyOf": [
  14052. {
  14053. "type": "boolean"
  14054. },
  14055. {
  14056. "type": "string",
  14057. "enum": ["notify"]
  14058. }
  14059. ],
  14060. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  14061. },
  14062. "disabled_providers": {
  14063. "type": "array",
  14064. "items": {
  14065. "type": "string"
  14066. }
  14067. },
  14068. "enabled_providers": {
  14069. "type": "array",
  14070. "items": {
  14071. "type": "string"
  14072. }
  14073. },
  14074. "model": {
  14075. "type": "string"
  14076. },
  14077. "small_model": {
  14078. "type": "string"
  14079. },
  14080. "default_agent": {
  14081. "type": "string"
  14082. },
  14083. "username": {
  14084. "type": "string"
  14085. },
  14086. "mode": {
  14087. "type": "object",
  14088. "properties": {
  14089. "build": {
  14090. "$ref": "#/components/schemas/AgentConfig"
  14091. },
  14092. "plan": {
  14093. "$ref": "#/components/schemas/AgentConfig"
  14094. }
  14095. },
  14096. "additionalProperties": {
  14097. "$ref": "#/components/schemas/AgentConfig"
  14098. }
  14099. },
  14100. "agent": {
  14101. "type": "object",
  14102. "properties": {
  14103. "plan": {
  14104. "$ref": "#/components/schemas/AgentConfig"
  14105. },
  14106. "build": {
  14107. "$ref": "#/components/schemas/AgentConfig"
  14108. },
  14109. "general": {
  14110. "$ref": "#/components/schemas/AgentConfig"
  14111. },
  14112. "explore": {
  14113. "$ref": "#/components/schemas/AgentConfig"
  14114. },
  14115. "scout": {
  14116. "$ref": "#/components/schemas/AgentConfig"
  14117. },
  14118. "title": {
  14119. "$ref": "#/components/schemas/AgentConfig"
  14120. },
  14121. "summary": {
  14122. "$ref": "#/components/schemas/AgentConfig"
  14123. },
  14124. "compaction": {
  14125. "$ref": "#/components/schemas/AgentConfig"
  14126. }
  14127. },
  14128. "additionalProperties": {
  14129. "$ref": "#/components/schemas/AgentConfig"
  14130. }
  14131. },
  14132. "provider": {
  14133. "type": "object",
  14134. "additionalProperties": {
  14135. "$ref": "#/components/schemas/ProviderConfig"
  14136. }
  14137. },
  14138. "mcp": {
  14139. "type": "object",
  14140. "additionalProperties": {
  14141. "anyOf": [
  14142. {
  14143. "$ref": "#/components/schemas/McpLocalConfig"
  14144. },
  14145. {
  14146. "$ref": "#/components/schemas/McpRemoteConfig"
  14147. },
  14148. {
  14149. "type": "object",
  14150. "properties": {
  14151. "enabled": {
  14152. "type": "boolean"
  14153. }
  14154. },
  14155. "required": ["enabled"],
  14156. "additionalProperties": false
  14157. }
  14158. ]
  14159. }
  14160. },
  14161. "formatter": {
  14162. "anyOf": [
  14163. {
  14164. "type": "boolean"
  14165. },
  14166. {
  14167. "type": "object",
  14168. "additionalProperties": {
  14169. "type": "object",
  14170. "properties": {
  14171. "disabled": {
  14172. "type": "boolean"
  14173. },
  14174. "command": {
  14175. "type": "array",
  14176. "items": {
  14177. "type": "string"
  14178. }
  14179. },
  14180. "environment": {
  14181. "type": "object",
  14182. "additionalProperties": {
  14183. "type": "string"
  14184. }
  14185. },
  14186. "extensions": {
  14187. "type": "array",
  14188. "items": {
  14189. "type": "string"
  14190. }
  14191. }
  14192. },
  14193. "additionalProperties": false
  14194. }
  14195. }
  14196. ],
  14197. "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."
  14198. },
  14199. "lsp": {
  14200. "anyOf": [
  14201. {
  14202. "type": "boolean"
  14203. },
  14204. {
  14205. "type": "object",
  14206. "additionalProperties": {
  14207. "anyOf": [
  14208. {
  14209. "type": "object",
  14210. "properties": {
  14211. "disabled": {
  14212. "type": "boolean",
  14213. "enum": [true]
  14214. }
  14215. },
  14216. "required": ["disabled"],
  14217. "additionalProperties": false
  14218. },
  14219. {
  14220. "type": "object",
  14221. "properties": {
  14222. "command": {
  14223. "type": "array",
  14224. "items": {
  14225. "type": "string"
  14226. }
  14227. },
  14228. "extensions": {
  14229. "type": "array",
  14230. "items": {
  14231. "type": "string"
  14232. }
  14233. },
  14234. "disabled": {
  14235. "type": "boolean"
  14236. },
  14237. "env": {
  14238. "type": "object",
  14239. "additionalProperties": {
  14240. "type": "string"
  14241. }
  14242. },
  14243. "initialization": {
  14244. "type": "object"
  14245. }
  14246. },
  14247. "required": ["command"],
  14248. "additionalProperties": false
  14249. }
  14250. ]
  14251. }
  14252. }
  14253. ],
  14254. "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."
  14255. },
  14256. "instructions": {
  14257. "type": "array",
  14258. "items": {
  14259. "type": "string"
  14260. }
  14261. },
  14262. "layout": {
  14263. "$ref": "#/components/schemas/LayoutConfig"
  14264. },
  14265. "permission": {
  14266. "$ref": "#/components/schemas/PermissionConfig"
  14267. },
  14268. "tools": {
  14269. "type": "object",
  14270. "additionalProperties": {
  14271. "type": "boolean"
  14272. }
  14273. },
  14274. "attachment": {
  14275. "$ref": "#/components/schemas/AttachmentConfig"
  14276. },
  14277. "enterprise": {
  14278. "type": "object",
  14279. "properties": {
  14280. "url": {
  14281. "type": "string"
  14282. }
  14283. },
  14284. "additionalProperties": false
  14285. },
  14286. "tool_output": {
  14287. "type": "object",
  14288. "properties": {
  14289. "max_lines": {
  14290. "type": "integer",
  14291. "exclusiveMinimum": 0
  14292. },
  14293. "max_bytes": {
  14294. "type": "integer",
  14295. "exclusiveMinimum": 0
  14296. }
  14297. },
  14298. "additionalProperties": false
  14299. },
  14300. "compaction": {
  14301. "type": "object",
  14302. "properties": {
  14303. "auto": {
  14304. "type": "boolean"
  14305. },
  14306. "prune": {
  14307. "type": "boolean"
  14308. },
  14309. "tail_turns": {
  14310. "type": "integer",
  14311. "minimum": 0
  14312. },
  14313. "preserve_recent_tokens": {
  14314. "type": "integer",
  14315. "minimum": 0
  14316. },
  14317. "reserved": {
  14318. "type": "integer",
  14319. "minimum": 0
  14320. }
  14321. },
  14322. "additionalProperties": false
  14323. },
  14324. "experimental": {
  14325. "type": "object",
  14326. "properties": {
  14327. "disable_paste_summary": {
  14328. "type": "boolean"
  14329. },
  14330. "batch_tool": {
  14331. "type": "boolean"
  14332. },
  14333. "openTelemetry": {
  14334. "type": "boolean"
  14335. },
  14336. "primary_tools": {
  14337. "type": "array",
  14338. "items": {
  14339. "type": "string"
  14340. }
  14341. },
  14342. "continue_loop_on_deny": {
  14343. "type": "boolean"
  14344. },
  14345. "mcp_timeout": {
  14346. "type": "integer",
  14347. "exclusiveMinimum": 0
  14348. },
  14349. "policies": {
  14350. "type": "array",
  14351. "items": {
  14352. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  14353. }
  14354. }
  14355. },
  14356. "additionalProperties": false
  14357. }
  14358. },
  14359. "additionalProperties": false
  14360. },
  14361. "Model": {
  14362. "type": "object",
  14363. "properties": {
  14364. "id": {
  14365. "type": "string"
  14366. },
  14367. "providerID": {
  14368. "type": "string"
  14369. },
  14370. "api": {
  14371. "type": "object",
  14372. "properties": {
  14373. "id": {
  14374. "type": "string"
  14375. },
  14376. "url": {
  14377. "type": "string"
  14378. },
  14379. "npm": {
  14380. "type": "string"
  14381. }
  14382. },
  14383. "required": ["id", "url", "npm"],
  14384. "additionalProperties": false
  14385. },
  14386. "name": {
  14387. "type": "string"
  14388. },
  14389. "family": {
  14390. "type": "string"
  14391. },
  14392. "capabilities": {
  14393. "type": "object",
  14394. "properties": {
  14395. "temperature": {
  14396. "type": "boolean"
  14397. },
  14398. "reasoning": {
  14399. "type": "boolean"
  14400. },
  14401. "attachment": {
  14402. "type": "boolean"
  14403. },
  14404. "toolcall": {
  14405. "type": "boolean"
  14406. },
  14407. "input": {
  14408. "type": "object",
  14409. "properties": {
  14410. "text": {
  14411. "type": "boolean"
  14412. },
  14413. "audio": {
  14414. "type": "boolean"
  14415. },
  14416. "image": {
  14417. "type": "boolean"
  14418. },
  14419. "video": {
  14420. "type": "boolean"
  14421. },
  14422. "pdf": {
  14423. "type": "boolean"
  14424. }
  14425. },
  14426. "required": ["text", "audio", "image", "video", "pdf"],
  14427. "additionalProperties": false
  14428. },
  14429. "output": {
  14430. "type": "object",
  14431. "properties": {
  14432. "text": {
  14433. "type": "boolean"
  14434. },
  14435. "audio": {
  14436. "type": "boolean"
  14437. },
  14438. "image": {
  14439. "type": "boolean"
  14440. },
  14441. "video": {
  14442. "type": "boolean"
  14443. },
  14444. "pdf": {
  14445. "type": "boolean"
  14446. }
  14447. },
  14448. "required": ["text", "audio", "image", "video", "pdf"],
  14449. "additionalProperties": false
  14450. },
  14451. "interleaved": {
  14452. "anyOf": [
  14453. {
  14454. "type": "boolean"
  14455. },
  14456. {
  14457. "type": "object",
  14458. "properties": {
  14459. "field": {
  14460. "type": "string",
  14461. "enum": ["reasoning_content", "reasoning_details"]
  14462. }
  14463. },
  14464. "required": ["field"],
  14465. "additionalProperties": false
  14466. }
  14467. ]
  14468. }
  14469. },
  14470. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14471. "additionalProperties": false
  14472. },
  14473. "cost": {
  14474. "type": "object",
  14475. "properties": {
  14476. "input": {
  14477. "type": "number"
  14478. },
  14479. "output": {
  14480. "type": "number"
  14481. },
  14482. "cache": {
  14483. "type": "object",
  14484. "properties": {
  14485. "read": {
  14486. "type": "number"
  14487. },
  14488. "write": {
  14489. "type": "number"
  14490. }
  14491. },
  14492. "required": ["read", "write"],
  14493. "additionalProperties": false
  14494. },
  14495. "tiers": {
  14496. "type": "array",
  14497. "items": {
  14498. "type": "object",
  14499. "properties": {
  14500. "input": {
  14501. "type": "number"
  14502. },
  14503. "output": {
  14504. "type": "number"
  14505. },
  14506. "cache": {
  14507. "type": "object",
  14508. "properties": {
  14509. "read": {
  14510. "type": "number"
  14511. },
  14512. "write": {
  14513. "type": "number"
  14514. }
  14515. },
  14516. "required": ["read", "write"],
  14517. "additionalProperties": false
  14518. },
  14519. "tier": {
  14520. "type": "object",
  14521. "properties": {
  14522. "type": {
  14523. "type": "string",
  14524. "enum": ["context"]
  14525. },
  14526. "size": {
  14527. "type": "number"
  14528. }
  14529. },
  14530. "required": ["type", "size"],
  14531. "additionalProperties": false
  14532. }
  14533. },
  14534. "required": ["input", "output", "cache", "tier"],
  14535. "additionalProperties": false
  14536. }
  14537. },
  14538. "experimentalOver200K": {
  14539. "type": "object",
  14540. "properties": {
  14541. "input": {
  14542. "type": "number"
  14543. },
  14544. "output": {
  14545. "type": "number"
  14546. },
  14547. "cache": {
  14548. "type": "object",
  14549. "properties": {
  14550. "read": {
  14551. "type": "number"
  14552. },
  14553. "write": {
  14554. "type": "number"
  14555. }
  14556. },
  14557. "required": ["read", "write"],
  14558. "additionalProperties": false
  14559. }
  14560. },
  14561. "required": ["input", "output", "cache"],
  14562. "additionalProperties": false
  14563. }
  14564. },
  14565. "required": ["input", "output", "cache"],
  14566. "additionalProperties": false
  14567. },
  14568. "limit": {
  14569. "type": "object",
  14570. "properties": {
  14571. "context": {
  14572. "type": "number"
  14573. },
  14574. "input": {
  14575. "type": "number"
  14576. },
  14577. "output": {
  14578. "type": "number"
  14579. }
  14580. },
  14581. "required": ["context", "output"],
  14582. "additionalProperties": false
  14583. },
  14584. "status": {
  14585. "type": "string",
  14586. "enum": ["alpha", "beta", "deprecated", "active"]
  14587. },
  14588. "options": {
  14589. "type": "object"
  14590. },
  14591. "headers": {
  14592. "type": "object",
  14593. "additionalProperties": {
  14594. "type": "string"
  14595. }
  14596. },
  14597. "release_date": {
  14598. "type": "string"
  14599. },
  14600. "variants": {
  14601. "type": "object",
  14602. "additionalProperties": {
  14603. "type": "object"
  14604. }
  14605. }
  14606. },
  14607. "required": [
  14608. "id",
  14609. "providerID",
  14610. "api",
  14611. "name",
  14612. "capabilities",
  14613. "cost",
  14614. "limit",
  14615. "status",
  14616. "options",
  14617. "headers",
  14618. "release_date"
  14619. ],
  14620. "additionalProperties": false
  14621. },
  14622. "Provider": {
  14623. "type": "object",
  14624. "properties": {
  14625. "id": {
  14626. "type": "string"
  14627. },
  14628. "name": {
  14629. "type": "string"
  14630. },
  14631. "source": {
  14632. "type": "string",
  14633. "enum": ["env", "config", "custom", "api"]
  14634. },
  14635. "env": {
  14636. "type": "array",
  14637. "items": {
  14638. "type": "string"
  14639. }
  14640. },
  14641. "key": {
  14642. "type": "string"
  14643. },
  14644. "options": {
  14645. "type": "object"
  14646. },
  14647. "models": {
  14648. "type": "object",
  14649. "additionalProperties": {
  14650. "$ref": "#/components/schemas/Model"
  14651. }
  14652. }
  14653. },
  14654. "required": ["id", "name", "source", "env", "options", "models"],
  14655. "additionalProperties": false
  14656. },
  14657. "ConsoleState": {
  14658. "type": "object",
  14659. "properties": {
  14660. "consoleManagedProviders": {
  14661. "type": "array",
  14662. "items": {
  14663. "type": "string"
  14664. }
  14665. },
  14666. "activeOrgName": {
  14667. "type": "string"
  14668. },
  14669. "switchableOrgCount": {
  14670. "type": "integer",
  14671. "minimum": 0
  14672. }
  14673. },
  14674. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14675. "additionalProperties": false
  14676. },
  14677. "effect_HttpApiError_InternalServerError": {
  14678. "type": "object",
  14679. "properties": {
  14680. "_tag": {
  14681. "type": "string",
  14682. "enum": ["InternalServerError"]
  14683. }
  14684. },
  14685. "required": ["_tag"],
  14686. "additionalProperties": false
  14687. },
  14688. "ToolListItem": {
  14689. "type": "object",
  14690. "properties": {
  14691. "id": {
  14692. "type": "string"
  14693. },
  14694. "description": {
  14695. "type": "string"
  14696. },
  14697. "parameters": {}
  14698. },
  14699. "required": ["id", "description", "parameters"],
  14700. "additionalProperties": false
  14701. },
  14702. "ToolList": {
  14703. "type": "array",
  14704. "items": {
  14705. "$ref": "#/components/schemas/ToolListItem"
  14706. }
  14707. },
  14708. "ToolIDs": {
  14709. "type": "array",
  14710. "items": {
  14711. "type": "string"
  14712. }
  14713. },
  14714. "WorktreeError": {
  14715. "type": "object",
  14716. "properties": {
  14717. "name": {
  14718. "type": "string",
  14719. "enum": [
  14720. "WorktreeNotGitError",
  14721. "WorktreeNameGenerationFailedError",
  14722. "WorktreeCreateFailedError",
  14723. "WorktreeStartCommandFailedError",
  14724. "WorktreeRemoveFailedError",
  14725. "WorktreeResetFailedError",
  14726. "WorktreeListFailedError"
  14727. ]
  14728. },
  14729. "data": {
  14730. "type": "object",
  14731. "properties": {
  14732. "message": {
  14733. "type": "string"
  14734. }
  14735. },
  14736. "required": ["message"],
  14737. "additionalProperties": false
  14738. }
  14739. },
  14740. "required": ["name", "data"],
  14741. "additionalProperties": false
  14742. },
  14743. "WorktreeCreateInput": {
  14744. "type": "object",
  14745. "properties": {
  14746. "name": {
  14747. "type": "string"
  14748. },
  14749. "startCommand": {
  14750. "type": "string",
  14751. "description": "Additional startup script to run after the project's start command"
  14752. }
  14753. },
  14754. "additionalProperties": false
  14755. },
  14756. "Worktree": {
  14757. "type": "object",
  14758. "properties": {
  14759. "name": {
  14760. "type": "string"
  14761. },
  14762. "branch": {
  14763. "type": "string"
  14764. },
  14765. "directory": {
  14766. "type": "string"
  14767. }
  14768. },
  14769. "required": ["name", "directory"],
  14770. "additionalProperties": false
  14771. },
  14772. "WorktreeRemoveInput": {
  14773. "type": "object",
  14774. "properties": {
  14775. "directory": {
  14776. "type": "string"
  14777. }
  14778. },
  14779. "required": ["directory"],
  14780. "additionalProperties": false
  14781. },
  14782. "WorktreeResetInput": {
  14783. "type": "object",
  14784. "properties": {
  14785. "directory": {
  14786. "type": "string"
  14787. }
  14788. },
  14789. "required": ["directory"],
  14790. "additionalProperties": false
  14791. },
  14792. "ProjectSummary": {
  14793. "type": "object",
  14794. "properties": {
  14795. "id": {
  14796. "type": "string"
  14797. },
  14798. "name": {
  14799. "type": "string"
  14800. },
  14801. "worktree": {
  14802. "type": "string"
  14803. }
  14804. },
  14805. "required": ["id", "worktree"],
  14806. "additionalProperties": false
  14807. },
  14808. "GlobalSession": {
  14809. "type": "object",
  14810. "properties": {
  14811. "id": {
  14812. "type": "string",
  14813. "pattern": "^ses"
  14814. },
  14815. "slug": {
  14816. "type": "string"
  14817. },
  14818. "projectID": {
  14819. "type": "string"
  14820. },
  14821. "workspaceID": {
  14822. "type": "string",
  14823. "pattern": "^wrk"
  14824. },
  14825. "directory": {
  14826. "type": "string"
  14827. },
  14828. "path": {
  14829. "type": "string"
  14830. },
  14831. "parentID": {
  14832. "type": "string",
  14833. "pattern": "^ses"
  14834. },
  14835. "summary": {
  14836. "type": "object",
  14837. "properties": {
  14838. "additions": {
  14839. "type": "number"
  14840. },
  14841. "deletions": {
  14842. "type": "number"
  14843. },
  14844. "files": {
  14845. "type": "number"
  14846. },
  14847. "diffs": {
  14848. "type": "array",
  14849. "items": {
  14850. "$ref": "#/components/schemas/SnapshotFileDiff"
  14851. }
  14852. }
  14853. },
  14854. "required": ["additions", "deletions", "files"],
  14855. "additionalProperties": false
  14856. },
  14857. "cost": {
  14858. "type": "number"
  14859. },
  14860. "tokens": {
  14861. "type": "object",
  14862. "properties": {
  14863. "input": {
  14864. "type": "number"
  14865. },
  14866. "output": {
  14867. "type": "number"
  14868. },
  14869. "reasoning": {
  14870. "type": "number"
  14871. },
  14872. "cache": {
  14873. "type": "object",
  14874. "properties": {
  14875. "read": {
  14876. "type": "number"
  14877. },
  14878. "write": {
  14879. "type": "number"
  14880. }
  14881. },
  14882. "required": ["read", "write"],
  14883. "additionalProperties": false
  14884. }
  14885. },
  14886. "required": ["input", "output", "reasoning", "cache"],
  14887. "additionalProperties": false
  14888. },
  14889. "share": {
  14890. "type": "object",
  14891. "properties": {
  14892. "url": {
  14893. "type": "string"
  14894. }
  14895. },
  14896. "required": ["url"],
  14897. "additionalProperties": false
  14898. },
  14899. "title": {
  14900. "type": "string"
  14901. },
  14902. "agent": {
  14903. "type": "string"
  14904. },
  14905. "model": {
  14906. "type": "object",
  14907. "properties": {
  14908. "id": {
  14909. "type": "string"
  14910. },
  14911. "providerID": {
  14912. "type": "string"
  14913. },
  14914. "variant": {
  14915. "type": "string"
  14916. }
  14917. },
  14918. "required": ["id", "providerID"],
  14919. "additionalProperties": false
  14920. },
  14921. "version": {
  14922. "type": "string"
  14923. },
  14924. "metadata": {
  14925. "type": "object"
  14926. },
  14927. "time": {
  14928. "type": "object",
  14929. "properties": {
  14930. "created": {
  14931. "type": "integer",
  14932. "minimum": 0
  14933. },
  14934. "updated": {
  14935. "type": "integer",
  14936. "minimum": 0
  14937. },
  14938. "compacting": {
  14939. "type": "integer",
  14940. "minimum": 0
  14941. },
  14942. "archived": {
  14943. "type": "number"
  14944. }
  14945. },
  14946. "required": ["created", "updated"],
  14947. "additionalProperties": false
  14948. },
  14949. "permission": {
  14950. "$ref": "#/components/schemas/PermissionRuleset"
  14951. },
  14952. "revert": {
  14953. "type": "object",
  14954. "properties": {
  14955. "messageID": {
  14956. "type": "string",
  14957. "pattern": "^msg"
  14958. },
  14959. "partID": {
  14960. "type": "string",
  14961. "pattern": "^prt"
  14962. },
  14963. "snapshot": {
  14964. "type": "string"
  14965. },
  14966. "diff": {
  14967. "type": "string"
  14968. }
  14969. },
  14970. "required": ["messageID"],
  14971. "additionalProperties": false
  14972. },
  14973. "project": {
  14974. "anyOf": [
  14975. {
  14976. "$ref": "#/components/schemas/ProjectSummary"
  14977. },
  14978. {
  14979. "type": "null"
  14980. }
  14981. ]
  14982. }
  14983. },
  14984. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14985. "additionalProperties": false
  14986. },
  14987. "McpResource": {
  14988. "type": "object",
  14989. "properties": {
  14990. "name": {
  14991. "type": "string"
  14992. },
  14993. "uri": {
  14994. "type": "string"
  14995. },
  14996. "description": {
  14997. "type": "string"
  14998. },
  14999. "mimeType": {
  15000. "type": "string"
  15001. },
  15002. "client": {
  15003. "type": "string"
  15004. }
  15005. },
  15006. "required": ["name", "uri", "client"],
  15007. "additionalProperties": false
  15008. },
  15009. "Symbol": {
  15010. "type": "object",
  15011. "properties": {
  15012. "name": {
  15013. "type": "string"
  15014. },
  15015. "kind": {
  15016. "type": "integer",
  15017. "minimum": 0
  15018. },
  15019. "location": {
  15020. "type": "object",
  15021. "properties": {
  15022. "uri": {
  15023. "type": "string"
  15024. },
  15025. "range": {
  15026. "$ref": "#/components/schemas/Range"
  15027. }
  15028. },
  15029. "required": ["uri", "range"],
  15030. "additionalProperties": false
  15031. }
  15032. },
  15033. "required": ["name", "kind", "location"],
  15034. "additionalProperties": false
  15035. },
  15036. "FileNode": {
  15037. "type": "object",
  15038. "properties": {
  15039. "name": {
  15040. "type": "string"
  15041. },
  15042. "path": {
  15043. "type": "string"
  15044. },
  15045. "absolute": {
  15046. "type": "string"
  15047. },
  15048. "type": {
  15049. "type": "string",
  15050. "enum": ["file", "directory"]
  15051. },
  15052. "ignored": {
  15053. "type": "boolean"
  15054. }
  15055. },
  15056. "required": ["name", "path", "absolute", "type", "ignored"],
  15057. "additionalProperties": false
  15058. },
  15059. "FileContent": {
  15060. "type": "object",
  15061. "properties": {
  15062. "type": {
  15063. "type": "string",
  15064. "enum": ["text", "binary"]
  15065. },
  15066. "content": {
  15067. "type": "string"
  15068. },
  15069. "diff": {
  15070. "type": "string"
  15071. },
  15072. "patch": {
  15073. "type": "object",
  15074. "properties": {
  15075. "oldFileName": {
  15076. "type": "string"
  15077. },
  15078. "newFileName": {
  15079. "type": "string"
  15080. },
  15081. "oldHeader": {
  15082. "type": "string"
  15083. },
  15084. "newHeader": {
  15085. "type": "string"
  15086. },
  15087. "hunks": {
  15088. "type": "array",
  15089. "items": {
  15090. "type": "object",
  15091. "properties": {
  15092. "oldStart": {
  15093. "type": "integer",
  15094. "minimum": 0
  15095. },
  15096. "oldLines": {
  15097. "type": "integer",
  15098. "minimum": 0
  15099. },
  15100. "newStart": {
  15101. "type": "integer",
  15102. "minimum": 0
  15103. },
  15104. "newLines": {
  15105. "type": "integer",
  15106. "minimum": 0
  15107. },
  15108. "lines": {
  15109. "type": "array",
  15110. "items": {
  15111. "type": "string"
  15112. }
  15113. }
  15114. },
  15115. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  15116. "additionalProperties": false
  15117. }
  15118. },
  15119. "index": {
  15120. "type": "string"
  15121. }
  15122. },
  15123. "required": ["oldFileName", "newFileName", "hunks"],
  15124. "additionalProperties": false
  15125. },
  15126. "encoding": {
  15127. "type": "string",
  15128. "enum": ["base64"]
  15129. },
  15130. "mimeType": {
  15131. "type": "string"
  15132. }
  15133. },
  15134. "required": ["type", "content"],
  15135. "additionalProperties": false
  15136. },
  15137. "File": {
  15138. "type": "object",
  15139. "properties": {
  15140. "path": {
  15141. "type": "string"
  15142. },
  15143. "added": {
  15144. "type": "integer",
  15145. "minimum": 0
  15146. },
  15147. "removed": {
  15148. "type": "integer",
  15149. "minimum": 0
  15150. },
  15151. "status": {
  15152. "type": "string",
  15153. "enum": ["added", "deleted", "modified"]
  15154. }
  15155. },
  15156. "required": ["path", "added", "removed", "status"],
  15157. "additionalProperties": false
  15158. },
  15159. "Path": {
  15160. "type": "object",
  15161. "properties": {
  15162. "home": {
  15163. "type": "string"
  15164. },
  15165. "state": {
  15166. "type": "string"
  15167. },
  15168. "config": {
  15169. "type": "string"
  15170. },
  15171. "worktree": {
  15172. "type": "string"
  15173. },
  15174. "directory": {
  15175. "type": "string"
  15176. }
  15177. },
  15178. "required": ["home", "state", "config", "worktree", "directory"],
  15179. "additionalProperties": false
  15180. },
  15181. "VcsInfo": {
  15182. "type": "object",
  15183. "properties": {
  15184. "branch": {
  15185. "type": "string"
  15186. },
  15187. "default_branch": {
  15188. "type": "string"
  15189. }
  15190. },
  15191. "additionalProperties": false
  15192. },
  15193. "VcsFileStatus": {
  15194. "type": "object",
  15195. "properties": {
  15196. "file": {
  15197. "type": "string"
  15198. },
  15199. "additions": {
  15200. "type": "number"
  15201. },
  15202. "deletions": {
  15203. "type": "number"
  15204. },
  15205. "status": {
  15206. "type": "string",
  15207. "enum": ["added", "deleted", "modified"]
  15208. }
  15209. },
  15210. "required": ["file", "additions", "deletions", "status"],
  15211. "additionalProperties": false
  15212. },
  15213. "VcsFileDiff": {
  15214. "type": "object",
  15215. "properties": {
  15216. "file": {
  15217. "type": "string"
  15218. },
  15219. "patch": {
  15220. "type": "string"
  15221. },
  15222. "additions": {
  15223. "type": "number"
  15224. },
  15225. "deletions": {
  15226. "type": "number"
  15227. },
  15228. "status": {
  15229. "type": "string",
  15230. "enum": ["added", "deleted", "modified"]
  15231. }
  15232. },
  15233. "required": ["file", "additions", "deletions"],
  15234. "additionalProperties": false
  15235. },
  15236. "VcsApplyError": {
  15237. "type": "object",
  15238. "properties": {
  15239. "name": {
  15240. "type": "string",
  15241. "enum": ["VcsApplyError"]
  15242. },
  15243. "data": {
  15244. "type": "object",
  15245. "properties": {
  15246. "message": {
  15247. "type": "string"
  15248. },
  15249. "reason": {
  15250. "type": "string",
  15251. "enum": ["non-git", "not-clean"]
  15252. }
  15253. },
  15254. "required": ["message", "reason"],
  15255. "additionalProperties": false
  15256. }
  15257. },
  15258. "required": ["name", "data"],
  15259. "additionalProperties": false
  15260. },
  15261. "Command": {
  15262. "type": "object",
  15263. "properties": {
  15264. "name": {
  15265. "type": "string"
  15266. },
  15267. "description": {
  15268. "type": "string"
  15269. },
  15270. "agent": {
  15271. "type": "string"
  15272. },
  15273. "model": {
  15274. "type": "string"
  15275. },
  15276. "source": {
  15277. "type": "string",
  15278. "enum": ["command", "mcp", "skill"]
  15279. },
  15280. "template": {
  15281. "type": "string"
  15282. },
  15283. "subtask": {
  15284. "type": "boolean"
  15285. },
  15286. "hints": {
  15287. "type": "array",
  15288. "items": {
  15289. "type": "string"
  15290. }
  15291. }
  15292. },
  15293. "required": ["name", "template", "hints"],
  15294. "additionalProperties": false
  15295. },
  15296. "Agent": {
  15297. "type": "object",
  15298. "properties": {
  15299. "name": {
  15300. "type": "string"
  15301. },
  15302. "description": {
  15303. "type": "string"
  15304. },
  15305. "mode": {
  15306. "type": "string",
  15307. "enum": ["subagent", "primary", "all"]
  15308. },
  15309. "native": {
  15310. "type": "boolean"
  15311. },
  15312. "hidden": {
  15313. "type": "boolean"
  15314. },
  15315. "topP": {
  15316. "type": "number"
  15317. },
  15318. "temperature": {
  15319. "type": "number"
  15320. },
  15321. "color": {
  15322. "type": "string"
  15323. },
  15324. "permission": {
  15325. "$ref": "#/components/schemas/PermissionRuleset"
  15326. },
  15327. "model": {
  15328. "type": "object",
  15329. "properties": {
  15330. "modelID": {
  15331. "type": "string"
  15332. },
  15333. "providerID": {
  15334. "type": "string"
  15335. }
  15336. },
  15337. "required": ["modelID", "providerID"],
  15338. "additionalProperties": false
  15339. },
  15340. "variant": {
  15341. "type": "string"
  15342. },
  15343. "prompt": {
  15344. "type": "string"
  15345. },
  15346. "options": {
  15347. "type": "object"
  15348. },
  15349. "steps": {
  15350. "type": "number"
  15351. }
  15352. },
  15353. "required": ["name", "mode", "permission", "options"],
  15354. "additionalProperties": false
  15355. },
  15356. "LSPStatus": {
  15357. "type": "object",
  15358. "properties": {
  15359. "id": {
  15360. "type": "string"
  15361. },
  15362. "name": {
  15363. "type": "string"
  15364. },
  15365. "root": {
  15366. "type": "string"
  15367. },
  15368. "status": {
  15369. "type": "string",
  15370. "enum": ["connected", "error"]
  15371. }
  15372. },
  15373. "required": ["id", "name", "root", "status"],
  15374. "additionalProperties": false
  15375. },
  15376. "FormatterStatus": {
  15377. "type": "object",
  15378. "properties": {
  15379. "name": {
  15380. "type": "string"
  15381. },
  15382. "extensions": {
  15383. "type": "array",
  15384. "items": {
  15385. "type": "string"
  15386. }
  15387. },
  15388. "enabled": {
  15389. "type": "boolean"
  15390. }
  15391. },
  15392. "required": ["name", "extensions", "enabled"],
  15393. "additionalProperties": false
  15394. },
  15395. "MCPStatusConnected": {
  15396. "type": "object",
  15397. "properties": {
  15398. "status": {
  15399. "type": "string",
  15400. "enum": ["connected"]
  15401. }
  15402. },
  15403. "required": ["status"],
  15404. "additionalProperties": false
  15405. },
  15406. "MCPStatusDisabled": {
  15407. "type": "object",
  15408. "properties": {
  15409. "status": {
  15410. "type": "string",
  15411. "enum": ["disabled"]
  15412. }
  15413. },
  15414. "required": ["status"],
  15415. "additionalProperties": false
  15416. },
  15417. "MCPStatusFailed": {
  15418. "type": "object",
  15419. "properties": {
  15420. "status": {
  15421. "type": "string",
  15422. "enum": ["failed"]
  15423. },
  15424. "error": {
  15425. "type": "string"
  15426. }
  15427. },
  15428. "required": ["status", "error"],
  15429. "additionalProperties": false
  15430. },
  15431. "MCPStatusNeedsAuth": {
  15432. "type": "object",
  15433. "properties": {
  15434. "status": {
  15435. "type": "string",
  15436. "enum": ["needs_auth"]
  15437. }
  15438. },
  15439. "required": ["status"],
  15440. "additionalProperties": false
  15441. },
  15442. "MCPStatusNeedsClientRegistration": {
  15443. "type": "object",
  15444. "properties": {
  15445. "status": {
  15446. "type": "string",
  15447. "enum": ["needs_client_registration"]
  15448. },
  15449. "error": {
  15450. "type": "string"
  15451. }
  15452. },
  15453. "required": ["status", "error"],
  15454. "additionalProperties": false
  15455. },
  15456. "MCPStatus": {
  15457. "anyOf": [
  15458. {
  15459. "$ref": "#/components/schemas/MCPStatusConnected"
  15460. },
  15461. {
  15462. "$ref": "#/components/schemas/MCPStatusDisabled"
  15463. },
  15464. {
  15465. "$ref": "#/components/schemas/MCPStatusFailed"
  15466. },
  15467. {
  15468. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15469. },
  15470. {
  15471. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15472. }
  15473. ]
  15474. },
  15475. "McpUnsupportedOAuthError": {
  15476. "type": "object",
  15477. "properties": {
  15478. "error": {
  15479. "type": "string"
  15480. }
  15481. },
  15482. "required": ["error"],
  15483. "additionalProperties": false
  15484. },
  15485. "McpServerNotFoundError": {
  15486. "type": "object",
  15487. "properties": {
  15488. "_tag": {
  15489. "type": "string",
  15490. "enum": ["McpServerNotFoundError"]
  15491. },
  15492. "name": {
  15493. "type": "string"
  15494. },
  15495. "message": {
  15496. "type": "string"
  15497. }
  15498. },
  15499. "required": ["_tag", "name", "message"],
  15500. "additionalProperties": false
  15501. },
  15502. "ProjectNotFoundError": {
  15503. "type": "object",
  15504. "properties": {
  15505. "_tag": {
  15506. "type": "string",
  15507. "enum": ["ProjectNotFoundError"]
  15508. },
  15509. "projectID": {
  15510. "type": "string"
  15511. },
  15512. "message": {
  15513. "type": "string"
  15514. }
  15515. },
  15516. "required": ["_tag", "projectID", "message"],
  15517. "additionalProperties": false
  15518. },
  15519. "PtyNotFoundError": {
  15520. "type": "object",
  15521. "properties": {
  15522. "_tag": {
  15523. "type": "string",
  15524. "enum": ["PtyNotFoundError"]
  15525. },
  15526. "ptyID": {
  15527. "type": "string"
  15528. },
  15529. "message": {
  15530. "type": "string"
  15531. }
  15532. },
  15533. "required": ["_tag", "ptyID", "message"],
  15534. "additionalProperties": false
  15535. },
  15536. "PtyForbiddenError": {
  15537. "type": "object",
  15538. "properties": {
  15539. "_tag": {
  15540. "type": "string",
  15541. "enum": ["PtyForbiddenError"]
  15542. },
  15543. "message": {
  15544. "type": "string"
  15545. }
  15546. },
  15547. "required": ["_tag", "message"],
  15548. "additionalProperties": false
  15549. },
  15550. "QuestionNotFoundError": {
  15551. "type": "object",
  15552. "properties": {
  15553. "_tag": {
  15554. "type": "string",
  15555. "enum": ["QuestionNotFoundError"]
  15556. },
  15557. "requestID": {
  15558. "type": "string"
  15559. },
  15560. "message": {
  15561. "type": "string"
  15562. }
  15563. },
  15564. "required": ["_tag", "requestID", "message"],
  15565. "additionalProperties": false
  15566. },
  15567. "PermissionNotFoundError": {
  15568. "type": "object",
  15569. "properties": {
  15570. "_tag": {
  15571. "type": "string",
  15572. "enum": ["PermissionNotFoundError"]
  15573. },
  15574. "requestID": {
  15575. "type": "string"
  15576. },
  15577. "message": {
  15578. "type": "string"
  15579. }
  15580. },
  15581. "required": ["_tag", "requestID", "message"],
  15582. "additionalProperties": false
  15583. },
  15584. "ProviderAuthMethod": {
  15585. "type": "object",
  15586. "properties": {
  15587. "type": {
  15588. "type": "string",
  15589. "enum": ["oauth", "api"]
  15590. },
  15591. "label": {
  15592. "type": "string"
  15593. },
  15594. "prompts": {
  15595. "type": "array",
  15596. "items": {
  15597. "anyOf": [
  15598. {
  15599. "type": "object",
  15600. "properties": {
  15601. "type": {
  15602. "type": "string",
  15603. "enum": ["text"]
  15604. },
  15605. "key": {
  15606. "type": "string"
  15607. },
  15608. "message": {
  15609. "type": "string"
  15610. },
  15611. "placeholder": {
  15612. "type": "string"
  15613. },
  15614. "when": {
  15615. "type": "object",
  15616. "properties": {
  15617. "key": {
  15618. "type": "string"
  15619. },
  15620. "op": {
  15621. "type": "string",
  15622. "enum": ["eq", "neq"]
  15623. },
  15624. "value": {
  15625. "type": "string"
  15626. }
  15627. },
  15628. "required": ["key", "op", "value"],
  15629. "additionalProperties": false
  15630. }
  15631. },
  15632. "required": ["type", "key", "message"],
  15633. "additionalProperties": false
  15634. },
  15635. {
  15636. "type": "object",
  15637. "properties": {
  15638. "type": {
  15639. "type": "string",
  15640. "enum": ["select"]
  15641. },
  15642. "key": {
  15643. "type": "string"
  15644. },
  15645. "message": {
  15646. "type": "string"
  15647. },
  15648. "options": {
  15649. "type": "array",
  15650. "items": {
  15651. "type": "object",
  15652. "properties": {
  15653. "label": {
  15654. "type": "string"
  15655. },
  15656. "value": {
  15657. "type": "string"
  15658. },
  15659. "hint": {
  15660. "type": "string"
  15661. }
  15662. },
  15663. "required": ["label", "value"],
  15664. "additionalProperties": false
  15665. }
  15666. },
  15667. "when": {
  15668. "type": "object",
  15669. "properties": {
  15670. "key": {
  15671. "type": "string"
  15672. },
  15673. "op": {
  15674. "type": "string",
  15675. "enum": ["eq", "neq"]
  15676. },
  15677. "value": {
  15678. "type": "string"
  15679. }
  15680. },
  15681. "required": ["key", "op", "value"],
  15682. "additionalProperties": false
  15683. }
  15684. },
  15685. "required": ["type", "key", "message", "options"],
  15686. "additionalProperties": false
  15687. }
  15688. ]
  15689. }
  15690. }
  15691. },
  15692. "required": ["type", "label"],
  15693. "additionalProperties": false
  15694. },
  15695. "ProviderAuthAuthorization": {
  15696. "type": "object",
  15697. "properties": {
  15698. "url": {
  15699. "type": "string"
  15700. },
  15701. "method": {
  15702. "type": "string",
  15703. "enum": ["auto", "code"]
  15704. },
  15705. "instructions": {
  15706. "type": "string"
  15707. }
  15708. },
  15709. "required": ["url", "method", "instructions"],
  15710. "additionalProperties": false
  15711. },
  15712. "ProviderAuthError1": {
  15713. "type": "object",
  15714. "properties": {
  15715. "name": {
  15716. "type": "string",
  15717. "enum": [
  15718. "BadRequest",
  15719. "ProviderAuthOauthMissing",
  15720. "ProviderAuthOauthCodeMissing",
  15721. "ProviderAuthOauthCallbackFailed",
  15722. "ProviderAuthValidationFailed"
  15723. ]
  15724. },
  15725. "data": {
  15726. "type": "object",
  15727. "properties": {
  15728. "providerID": {
  15729. "type": "string"
  15730. },
  15731. "field": {
  15732. "type": "string"
  15733. },
  15734. "message": {
  15735. "type": "string"
  15736. },
  15737. "kind": {
  15738. "type": "string"
  15739. }
  15740. },
  15741. "additionalProperties": false
  15742. }
  15743. },
  15744. "required": ["name", "data"],
  15745. "additionalProperties": false
  15746. },
  15747. "NotFoundError": {
  15748. "type": "object",
  15749. "required": ["name", "data"],
  15750. "properties": {
  15751. "name": {
  15752. "type": "string",
  15753. "enum": ["NotFoundError"]
  15754. },
  15755. "data": {
  15756. "type": "object",
  15757. "required": ["message"],
  15758. "properties": {
  15759. "message": {
  15760. "type": "string"
  15761. }
  15762. }
  15763. }
  15764. }
  15765. },
  15766. "TextPartInput": {
  15767. "type": "object",
  15768. "properties": {
  15769. "id": {
  15770. "type": "string",
  15771. "pattern": "^prt"
  15772. },
  15773. "type": {
  15774. "type": "string",
  15775. "enum": ["text"]
  15776. },
  15777. "text": {
  15778. "type": "string"
  15779. },
  15780. "synthetic": {
  15781. "type": "boolean"
  15782. },
  15783. "ignored": {
  15784. "type": "boolean"
  15785. },
  15786. "time": {
  15787. "type": "object",
  15788. "properties": {
  15789. "start": {
  15790. "type": "integer",
  15791. "minimum": 0
  15792. },
  15793. "end": {
  15794. "type": "integer",
  15795. "minimum": 0
  15796. }
  15797. },
  15798. "required": ["start"],
  15799. "additionalProperties": false
  15800. },
  15801. "metadata": {
  15802. "type": "object"
  15803. }
  15804. },
  15805. "required": ["type", "text"],
  15806. "additionalProperties": false
  15807. },
  15808. "FilePartInput": {
  15809. "type": "object",
  15810. "properties": {
  15811. "id": {
  15812. "type": "string",
  15813. "pattern": "^prt"
  15814. },
  15815. "type": {
  15816. "type": "string",
  15817. "enum": ["file"]
  15818. },
  15819. "mime": {
  15820. "type": "string"
  15821. },
  15822. "filename": {
  15823. "type": "string"
  15824. },
  15825. "url": {
  15826. "type": "string"
  15827. },
  15828. "source": {
  15829. "$ref": "#/components/schemas/FilePartSource"
  15830. }
  15831. },
  15832. "required": ["type", "mime", "url"],
  15833. "additionalProperties": false
  15834. },
  15835. "AgentPartInput": {
  15836. "type": "object",
  15837. "properties": {
  15838. "id": {
  15839. "type": "string",
  15840. "pattern": "^prt"
  15841. },
  15842. "type": {
  15843. "type": "string",
  15844. "enum": ["agent"]
  15845. },
  15846. "name": {
  15847. "type": "string"
  15848. },
  15849. "source": {
  15850. "type": "object",
  15851. "properties": {
  15852. "value": {
  15853. "type": "string"
  15854. },
  15855. "start": {
  15856. "type": "integer",
  15857. "minimum": 0
  15858. },
  15859. "end": {
  15860. "type": "integer",
  15861. "minimum": 0
  15862. }
  15863. },
  15864. "required": ["value", "start", "end"],
  15865. "additionalProperties": false
  15866. }
  15867. },
  15868. "required": ["type", "name"],
  15869. "additionalProperties": false
  15870. },
  15871. "SubtaskPartInput": {
  15872. "type": "object",
  15873. "properties": {
  15874. "id": {
  15875. "type": "string",
  15876. "pattern": "^prt"
  15877. },
  15878. "type": {
  15879. "type": "string",
  15880. "enum": ["subtask"]
  15881. },
  15882. "prompt": {
  15883. "type": "string"
  15884. },
  15885. "description": {
  15886. "type": "string"
  15887. },
  15888. "agent": {
  15889. "type": "string"
  15890. },
  15891. "model": {
  15892. "type": "object",
  15893. "properties": {
  15894. "providerID": {
  15895. "type": "string"
  15896. },
  15897. "modelID": {
  15898. "type": "string"
  15899. }
  15900. },
  15901. "required": ["providerID", "modelID"],
  15902. "additionalProperties": false
  15903. },
  15904. "command": {
  15905. "type": "string"
  15906. }
  15907. },
  15908. "required": ["type", "prompt", "description", "agent"],
  15909. "additionalProperties": false
  15910. },
  15911. "SessionBusyError": {
  15912. "type": "object",
  15913. "properties": {
  15914. "_tag": {
  15915. "type": "string",
  15916. "enum": ["SessionBusyError"]
  15917. },
  15918. "sessionID": {
  15919. "type": "string"
  15920. },
  15921. "message": {
  15922. "type": "string"
  15923. }
  15924. },
  15925. "required": ["_tag", "sessionID", "message"],
  15926. "additionalProperties": false
  15927. },
  15928. "V2SessionsResponse": {
  15929. "type": "object",
  15930. "properties": {
  15931. "items": {
  15932. "type": "array",
  15933. "items": {
  15934. "$ref": "#/components/schemas/SessionInfo"
  15935. }
  15936. },
  15937. "cursor": {
  15938. "type": "object",
  15939. "properties": {
  15940. "previous": {
  15941. "type": "string"
  15942. },
  15943. "next": {
  15944. "type": "string"
  15945. }
  15946. },
  15947. "additionalProperties": false
  15948. }
  15949. },
  15950. "required": ["items", "cursor"],
  15951. "additionalProperties": false
  15952. },
  15953. "InvalidCursorError": {
  15954. "type": "object",
  15955. "properties": {
  15956. "_tag": {
  15957. "type": "string",
  15958. "enum": ["InvalidCursorError"]
  15959. },
  15960. "message": {
  15961. "type": "string"
  15962. }
  15963. },
  15964. "required": ["_tag", "message"],
  15965. "additionalProperties": false
  15966. },
  15967. "UnauthorizedError": {
  15968. "type": "object",
  15969. "properties": {
  15970. "_tag": {
  15971. "type": "string",
  15972. "enum": ["UnauthorizedError"]
  15973. },
  15974. "message": {
  15975. "type": "string"
  15976. }
  15977. },
  15978. "required": ["_tag", "message"],
  15979. "additionalProperties": false
  15980. },
  15981. "SessionNotFoundError": {
  15982. "type": "object",
  15983. "properties": {
  15984. "_tag": {
  15985. "type": "string",
  15986. "enum": ["SessionNotFoundError"]
  15987. },
  15988. "sessionID": {
  15989. "type": "string"
  15990. },
  15991. "message": {
  15992. "type": "string"
  15993. }
  15994. },
  15995. "required": ["_tag", "sessionID", "message"],
  15996. "additionalProperties": false
  15997. },
  15998. "ServiceUnavailableError": {
  15999. "type": "object",
  16000. "properties": {
  16001. "_tag": {
  16002. "type": "string",
  16003. "enum": ["ServiceUnavailableError"]
  16004. },
  16005. "message": {
  16006. "type": "string"
  16007. },
  16008. "service": {
  16009. "type": "string"
  16010. }
  16011. },
  16012. "required": ["_tag", "message"],
  16013. "additionalProperties": false
  16014. },
  16015. "UnknownError1": {
  16016. "type": "object",
  16017. "properties": {
  16018. "_tag": {
  16019. "type": "string",
  16020. "enum": ["UnknownError"]
  16021. },
  16022. "message": {
  16023. "type": "string"
  16024. },
  16025. "ref": {
  16026. "type": "string"
  16027. }
  16028. },
  16029. "required": ["_tag", "message"],
  16030. "additionalProperties": false
  16031. },
  16032. "V2SessionMessagesResponse": {
  16033. "type": "object",
  16034. "properties": {
  16035. "items": {
  16036. "type": "array",
  16037. "items": {
  16038. "$ref": "#/components/schemas/SessionMessage"
  16039. }
  16040. },
  16041. "cursor": {
  16042. "type": "object",
  16043. "properties": {
  16044. "previous": {
  16045. "type": "string"
  16046. },
  16047. "next": {
  16048. "type": "string"
  16049. }
  16050. },
  16051. "additionalProperties": false
  16052. }
  16053. },
  16054. "required": ["items", "cursor"],
  16055. "additionalProperties": false
  16056. },
  16057. "ProviderNotFoundError": {
  16058. "type": "object",
  16059. "properties": {
  16060. "_tag": {
  16061. "type": "string",
  16062. "enum": ["ProviderNotFoundError"]
  16063. },
  16064. "providerID": {
  16065. "type": "string"
  16066. },
  16067. "message": {
  16068. "type": "string"
  16069. }
  16070. },
  16071. "required": ["_tag", "providerID", "message"],
  16072. "additionalProperties": false
  16073. },
  16074. "EventTuiPromptAppend": {
  16075. "type": "object",
  16076. "properties": {
  16077. "type": {
  16078. "type": "string",
  16079. "enum": ["tui.prompt.append"]
  16080. },
  16081. "properties": {
  16082. "type": "object",
  16083. "properties": {
  16084. "text": {
  16085. "type": "string"
  16086. }
  16087. },
  16088. "required": ["text"],
  16089. "additionalProperties": false
  16090. }
  16091. },
  16092. "required": ["type", "properties"],
  16093. "additionalProperties": false
  16094. },
  16095. "EventTuiCommandExecute": {
  16096. "type": "object",
  16097. "properties": {
  16098. "type": {
  16099. "type": "string",
  16100. "enum": ["tui.command.execute"]
  16101. },
  16102. "properties": {
  16103. "type": "object",
  16104. "properties": {
  16105. "command": {
  16106. "anyOf": [
  16107. {
  16108. "type": "string",
  16109. "enum": [
  16110. "session.list",
  16111. "session.new",
  16112. "session.share",
  16113. "session.interrupt",
  16114. "session.compact",
  16115. "session.page.up",
  16116. "session.page.down",
  16117. "session.line.up",
  16118. "session.line.down",
  16119. "session.half.page.up",
  16120. "session.half.page.down",
  16121. "session.first",
  16122. "session.last",
  16123. "prompt.clear",
  16124. "prompt.submit",
  16125. "agent.cycle"
  16126. ]
  16127. },
  16128. {
  16129. "type": "string"
  16130. }
  16131. ]
  16132. }
  16133. },
  16134. "required": ["command"],
  16135. "additionalProperties": false
  16136. }
  16137. },
  16138. "required": ["type", "properties"],
  16139. "additionalProperties": false
  16140. },
  16141. "EventTuiToastShow": {
  16142. "type": "object",
  16143. "properties": {
  16144. "type": {
  16145. "type": "string",
  16146. "enum": ["tui.toast.show"]
  16147. },
  16148. "properties": {
  16149. "type": "object",
  16150. "properties": {
  16151. "title": {
  16152. "type": "string"
  16153. },
  16154. "message": {
  16155. "type": "string"
  16156. },
  16157. "variant": {
  16158. "type": "string",
  16159. "enum": ["info", "success", "warning", "error"]
  16160. },
  16161. "duration": {
  16162. "type": "integer",
  16163. "exclusiveMinimum": 0
  16164. }
  16165. },
  16166. "required": ["message", "variant"],
  16167. "additionalProperties": false
  16168. }
  16169. },
  16170. "required": ["type", "properties"],
  16171. "additionalProperties": false
  16172. },
  16173. "EventTuiSessionSelect": {
  16174. "type": "object",
  16175. "properties": {
  16176. "type": {
  16177. "type": "string",
  16178. "enum": ["tui.session.select"]
  16179. },
  16180. "properties": {
  16181. "type": "object",
  16182. "properties": {
  16183. "sessionID": {
  16184. "type": "string",
  16185. "pattern": "^ses",
  16186. "description": "Session ID to navigate to"
  16187. }
  16188. },
  16189. "required": ["sessionID"],
  16190. "additionalProperties": false
  16191. }
  16192. },
  16193. "required": ["type", "properties"],
  16194. "additionalProperties": false
  16195. },
  16196. "Workspace": {
  16197. "type": "object",
  16198. "properties": {
  16199. "id": {
  16200. "type": "string",
  16201. "pattern": "^wrk"
  16202. },
  16203. "type": {
  16204. "type": "string"
  16205. },
  16206. "name": {
  16207. "type": "string"
  16208. },
  16209. "branch": {
  16210. "anyOf": [
  16211. {
  16212. "type": "string"
  16213. },
  16214. {
  16215. "type": "null"
  16216. }
  16217. ]
  16218. },
  16219. "directory": {
  16220. "anyOf": [
  16221. {
  16222. "type": "string"
  16223. },
  16224. {
  16225. "type": "null"
  16226. }
  16227. ]
  16228. },
  16229. "extra": {
  16230. "anyOf": [
  16231. {},
  16232. {
  16233. "type": "null"
  16234. }
  16235. ]
  16236. },
  16237. "projectID": {
  16238. "type": "string"
  16239. },
  16240. "timeUsed": {
  16241. "anyOf": [
  16242. {
  16243. "type": "number"
  16244. },
  16245. {
  16246. "type": "string",
  16247. "enum": ["NaN"]
  16248. },
  16249. {
  16250. "type": "string",
  16251. "enum": ["Infinity"]
  16252. },
  16253. {
  16254. "type": "string",
  16255. "enum": ["-Infinity"]
  16256. },
  16257. {
  16258. "type": "string",
  16259. "enum": ["Infinity", "-Infinity", "NaN"]
  16260. }
  16261. ]
  16262. }
  16263. },
  16264. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16265. "additionalProperties": false
  16266. },
  16267. "WorkspaceCreateError": {
  16268. "type": "object",
  16269. "properties": {
  16270. "name": {
  16271. "type": "string",
  16272. "enum": ["WorkspaceCreateError"]
  16273. },
  16274. "data": {
  16275. "type": "object",
  16276. "properties": {
  16277. "message": {
  16278. "type": "string"
  16279. }
  16280. },
  16281. "required": ["message"],
  16282. "additionalProperties": false
  16283. }
  16284. },
  16285. "required": ["name", "data"],
  16286. "additionalProperties": false
  16287. },
  16288. "WorkspaceWarpError": {
  16289. "type": "object",
  16290. "properties": {
  16291. "name": {
  16292. "type": "string",
  16293. "enum": ["WorkspaceWarpError"]
  16294. },
  16295. "data": {
  16296. "type": "object",
  16297. "properties": {
  16298. "message": {
  16299. "type": "string"
  16300. }
  16301. },
  16302. "required": ["message"],
  16303. "additionalProperties": false
  16304. }
  16305. },
  16306. "required": ["name", "data"],
  16307. "additionalProperties": false
  16308. },
  16309. "effect_HttpApiError_Forbidden": {
  16310. "type": "object",
  16311. "properties": {
  16312. "_tag": {
  16313. "type": "string",
  16314. "enum": ["Forbidden"]
  16315. }
  16316. },
  16317. "required": ["_tag"],
  16318. "additionalProperties": false
  16319. },
  16320. "SyncEventMessageUpdated": {
  16321. "type": "object",
  16322. "properties": {
  16323. "type": {
  16324. "type": "string",
  16325. "enum": ["sync"]
  16326. },
  16327. "name": {
  16328. "type": "string",
  16329. "enum": ["message.updated.1"]
  16330. },
  16331. "id": {
  16332. "type": "string"
  16333. },
  16334. "seq": {
  16335. "type": "number"
  16336. },
  16337. "aggregateID": {
  16338. "type": "string",
  16339. "enum": ["sessionID"]
  16340. },
  16341. "data": {
  16342. "type": "object",
  16343. "properties": {
  16344. "sessionID": {
  16345. "type": "string",
  16346. "pattern": "^ses"
  16347. },
  16348. "info": {
  16349. "$ref": "#/components/schemas/Message"
  16350. }
  16351. },
  16352. "required": ["sessionID", "info"],
  16353. "additionalProperties": false
  16354. }
  16355. },
  16356. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16357. "additionalProperties": false
  16358. },
  16359. "SyncEventMessageRemoved": {
  16360. "type": "object",
  16361. "properties": {
  16362. "type": {
  16363. "type": "string",
  16364. "enum": ["sync"]
  16365. },
  16366. "name": {
  16367. "type": "string",
  16368. "enum": ["message.removed.1"]
  16369. },
  16370. "id": {
  16371. "type": "string"
  16372. },
  16373. "seq": {
  16374. "type": "number"
  16375. },
  16376. "aggregateID": {
  16377. "type": "string",
  16378. "enum": ["sessionID"]
  16379. },
  16380. "data": {
  16381. "type": "object",
  16382. "properties": {
  16383. "sessionID": {
  16384. "type": "string",
  16385. "pattern": "^ses"
  16386. },
  16387. "messageID": {
  16388. "type": "string",
  16389. "pattern": "^msg"
  16390. }
  16391. },
  16392. "required": ["sessionID", "messageID"],
  16393. "additionalProperties": false
  16394. }
  16395. },
  16396. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16397. "additionalProperties": false
  16398. },
  16399. "SyncEventMessagePartUpdated": {
  16400. "type": "object",
  16401. "properties": {
  16402. "type": {
  16403. "type": "string",
  16404. "enum": ["sync"]
  16405. },
  16406. "name": {
  16407. "type": "string",
  16408. "enum": ["message.part.updated.1"]
  16409. },
  16410. "id": {
  16411. "type": "string"
  16412. },
  16413. "seq": {
  16414. "type": "number"
  16415. },
  16416. "aggregateID": {
  16417. "type": "string",
  16418. "enum": ["sessionID"]
  16419. },
  16420. "data": {
  16421. "type": "object",
  16422. "properties": {
  16423. "sessionID": {
  16424. "type": "string",
  16425. "pattern": "^ses"
  16426. },
  16427. "part": {
  16428. "$ref": "#/components/schemas/Part"
  16429. },
  16430. "time": {
  16431. "type": "integer",
  16432. "minimum": 0
  16433. }
  16434. },
  16435. "required": ["sessionID", "part", "time"],
  16436. "additionalProperties": false
  16437. }
  16438. },
  16439. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16440. "additionalProperties": false
  16441. },
  16442. "SyncEventMessagePartRemoved": {
  16443. "type": "object",
  16444. "properties": {
  16445. "type": {
  16446. "type": "string",
  16447. "enum": ["sync"]
  16448. },
  16449. "name": {
  16450. "type": "string",
  16451. "enum": ["message.part.removed.1"]
  16452. },
  16453. "id": {
  16454. "type": "string"
  16455. },
  16456. "seq": {
  16457. "type": "number"
  16458. },
  16459. "aggregateID": {
  16460. "type": "string",
  16461. "enum": ["sessionID"]
  16462. },
  16463. "data": {
  16464. "type": "object",
  16465. "properties": {
  16466. "sessionID": {
  16467. "type": "string",
  16468. "pattern": "^ses"
  16469. },
  16470. "messageID": {
  16471. "type": "string",
  16472. "pattern": "^msg"
  16473. },
  16474. "partID": {
  16475. "type": "string",
  16476. "pattern": "^prt"
  16477. }
  16478. },
  16479. "required": ["sessionID", "messageID", "partID"],
  16480. "additionalProperties": false
  16481. }
  16482. },
  16483. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16484. "additionalProperties": false
  16485. },
  16486. "SyncEventSessionCreated": {
  16487. "type": "object",
  16488. "properties": {
  16489. "type": {
  16490. "type": "string",
  16491. "enum": ["sync"]
  16492. },
  16493. "name": {
  16494. "type": "string",
  16495. "enum": ["session.created.1"]
  16496. },
  16497. "id": {
  16498. "type": "string"
  16499. },
  16500. "seq": {
  16501. "type": "number"
  16502. },
  16503. "aggregateID": {
  16504. "type": "string",
  16505. "enum": ["sessionID"]
  16506. },
  16507. "data": {
  16508. "type": "object",
  16509. "properties": {
  16510. "sessionID": {
  16511. "type": "string",
  16512. "pattern": "^ses"
  16513. },
  16514. "info": {
  16515. "$ref": "#/components/schemas/Session"
  16516. }
  16517. },
  16518. "required": ["sessionID", "info"],
  16519. "additionalProperties": false
  16520. }
  16521. },
  16522. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16523. "additionalProperties": false
  16524. },
  16525. "SyncEventSessionUpdated": {
  16526. "type": "object",
  16527. "properties": {
  16528. "type": {
  16529. "type": "string",
  16530. "enum": ["sync"]
  16531. },
  16532. "name": {
  16533. "type": "string",
  16534. "enum": ["session.updated.1"]
  16535. },
  16536. "id": {
  16537. "type": "string"
  16538. },
  16539. "seq": {
  16540. "type": "number"
  16541. },
  16542. "aggregateID": {
  16543. "type": "string",
  16544. "enum": ["sessionID"]
  16545. },
  16546. "data": {
  16547. "type": "object",
  16548. "properties": {
  16549. "sessionID": {
  16550. "type": "string",
  16551. "pattern": "^ses"
  16552. },
  16553. "info": {
  16554. "type": "object",
  16555. "properties": {
  16556. "id": {
  16557. "anyOf": [
  16558. {
  16559. "type": "string",
  16560. "pattern": "^ses"
  16561. },
  16562. {
  16563. "type": "null"
  16564. }
  16565. ]
  16566. },
  16567. "slug": {
  16568. "anyOf": [
  16569. {
  16570. "type": "string"
  16571. },
  16572. {
  16573. "type": "null"
  16574. }
  16575. ]
  16576. },
  16577. "projectID": {
  16578. "anyOf": [
  16579. {
  16580. "type": "string"
  16581. },
  16582. {
  16583. "type": "null"
  16584. }
  16585. ]
  16586. },
  16587. "workspaceID": {
  16588. "anyOf": [
  16589. {
  16590. "type": "string",
  16591. "pattern": "^wrk"
  16592. },
  16593. {
  16594. "type": "null"
  16595. }
  16596. ]
  16597. },
  16598. "directory": {
  16599. "anyOf": [
  16600. {
  16601. "type": "string"
  16602. },
  16603. {
  16604. "type": "null"
  16605. }
  16606. ]
  16607. },
  16608. "path": {
  16609. "anyOf": [
  16610. {
  16611. "type": "string"
  16612. },
  16613. {
  16614. "type": "null"
  16615. }
  16616. ]
  16617. },
  16618. "parentID": {
  16619. "anyOf": [
  16620. {
  16621. "type": "string",
  16622. "pattern": "^ses"
  16623. },
  16624. {
  16625. "type": "null"
  16626. }
  16627. ]
  16628. },
  16629. "summary": {
  16630. "anyOf": [
  16631. {
  16632. "type": "object",
  16633. "properties": {
  16634. "additions": {
  16635. "type": "number"
  16636. },
  16637. "deletions": {
  16638. "type": "number"
  16639. },
  16640. "files": {
  16641. "type": "number"
  16642. },
  16643. "diffs": {
  16644. "type": "array",
  16645. "items": {
  16646. "$ref": "#/components/schemas/SnapshotFileDiff"
  16647. }
  16648. }
  16649. },
  16650. "required": ["additions", "deletions", "files"],
  16651. "additionalProperties": false
  16652. },
  16653. {
  16654. "type": "null"
  16655. }
  16656. ]
  16657. },
  16658. "cost": {
  16659. "anyOf": [
  16660. {
  16661. "type": "number"
  16662. },
  16663. {
  16664. "type": "null"
  16665. }
  16666. ]
  16667. },
  16668. "tokens": {
  16669. "anyOf": [
  16670. {
  16671. "type": "object",
  16672. "properties": {
  16673. "input": {
  16674. "type": "number"
  16675. },
  16676. "output": {
  16677. "type": "number"
  16678. },
  16679. "reasoning": {
  16680. "type": "number"
  16681. },
  16682. "cache": {
  16683. "type": "object",
  16684. "properties": {
  16685. "read": {
  16686. "type": "number"
  16687. },
  16688. "write": {
  16689. "type": "number"
  16690. }
  16691. },
  16692. "required": ["read", "write"],
  16693. "additionalProperties": false
  16694. }
  16695. },
  16696. "required": ["input", "output", "reasoning", "cache"],
  16697. "additionalProperties": false
  16698. },
  16699. {
  16700. "type": "null"
  16701. }
  16702. ]
  16703. },
  16704. "share": {
  16705. "type": "object",
  16706. "properties": {
  16707. "url": {
  16708. "anyOf": [
  16709. {
  16710. "type": "string"
  16711. },
  16712. {
  16713. "type": "null"
  16714. }
  16715. ]
  16716. }
  16717. },
  16718. "additionalProperties": false
  16719. },
  16720. "title": {
  16721. "anyOf": [
  16722. {
  16723. "type": "string"
  16724. },
  16725. {
  16726. "type": "null"
  16727. }
  16728. ]
  16729. },
  16730. "agent": {
  16731. "anyOf": [
  16732. {
  16733. "type": "string"
  16734. },
  16735. {
  16736. "type": "null"
  16737. }
  16738. ]
  16739. },
  16740. "model": {
  16741. "anyOf": [
  16742. {
  16743. "type": "object",
  16744. "properties": {
  16745. "id": {
  16746. "type": "string"
  16747. },
  16748. "providerID": {
  16749. "type": "string"
  16750. },
  16751. "variant": {
  16752. "type": "string"
  16753. }
  16754. },
  16755. "required": ["id", "providerID"],
  16756. "additionalProperties": false
  16757. },
  16758. {
  16759. "type": "null"
  16760. }
  16761. ]
  16762. },
  16763. "version": {
  16764. "anyOf": [
  16765. {
  16766. "type": "string"
  16767. },
  16768. {
  16769. "type": "null"
  16770. }
  16771. ]
  16772. },
  16773. "metadata": {
  16774. "anyOf": [
  16775. {
  16776. "type": "object"
  16777. },
  16778. {
  16779. "type": "null"
  16780. }
  16781. ]
  16782. },
  16783. "time": {
  16784. "type": "object",
  16785. "properties": {
  16786. "created": {
  16787. "anyOf": [
  16788. {
  16789. "type": "integer",
  16790. "minimum": 0
  16791. },
  16792. {
  16793. "type": "null"
  16794. }
  16795. ]
  16796. },
  16797. "updated": {
  16798. "anyOf": [
  16799. {
  16800. "type": "integer",
  16801. "minimum": 0
  16802. },
  16803. {
  16804. "type": "null"
  16805. }
  16806. ]
  16807. },
  16808. "compacting": {
  16809. "anyOf": [
  16810. {
  16811. "type": "integer",
  16812. "minimum": 0
  16813. },
  16814. {
  16815. "type": "null"
  16816. }
  16817. ]
  16818. },
  16819. "archived": {
  16820. "anyOf": [
  16821. {
  16822. "type": "number"
  16823. },
  16824. {
  16825. "type": "null"
  16826. }
  16827. ]
  16828. }
  16829. },
  16830. "additionalProperties": false
  16831. },
  16832. "permission": {
  16833. "anyOf": [
  16834. {
  16835. "$ref": "#/components/schemas/PermissionRuleset"
  16836. },
  16837. {
  16838. "type": "null"
  16839. }
  16840. ]
  16841. },
  16842. "revert": {
  16843. "anyOf": [
  16844. {
  16845. "type": "object",
  16846. "properties": {
  16847. "messageID": {
  16848. "type": "string",
  16849. "pattern": "^msg"
  16850. },
  16851. "partID": {
  16852. "type": "string",
  16853. "pattern": "^prt"
  16854. },
  16855. "snapshot": {
  16856. "type": "string"
  16857. },
  16858. "diff": {
  16859. "type": "string"
  16860. }
  16861. },
  16862. "required": ["messageID"],
  16863. "additionalProperties": false
  16864. },
  16865. {
  16866. "type": "null"
  16867. }
  16868. ]
  16869. }
  16870. },
  16871. "additionalProperties": false
  16872. }
  16873. },
  16874. "required": ["sessionID", "info"],
  16875. "additionalProperties": false
  16876. }
  16877. },
  16878. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16879. "additionalProperties": false
  16880. },
  16881. "SyncEventSessionDeleted": {
  16882. "type": "object",
  16883. "properties": {
  16884. "type": {
  16885. "type": "string",
  16886. "enum": ["sync"]
  16887. },
  16888. "name": {
  16889. "type": "string",
  16890. "enum": ["session.deleted.1"]
  16891. },
  16892. "id": {
  16893. "type": "string"
  16894. },
  16895. "seq": {
  16896. "type": "number"
  16897. },
  16898. "aggregateID": {
  16899. "type": "string",
  16900. "enum": ["sessionID"]
  16901. },
  16902. "data": {
  16903. "type": "object",
  16904. "properties": {
  16905. "sessionID": {
  16906. "type": "string",
  16907. "pattern": "^ses"
  16908. },
  16909. "info": {
  16910. "$ref": "#/components/schemas/Session"
  16911. }
  16912. },
  16913. "required": ["sessionID", "info"],
  16914. "additionalProperties": false
  16915. }
  16916. },
  16917. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16918. "additionalProperties": false
  16919. },
  16920. "SyncEventSessionNextAgentSwitched": {
  16921. "type": "object",
  16922. "properties": {
  16923. "type": {
  16924. "type": "string",
  16925. "enum": ["sync"]
  16926. },
  16927. "name": {
  16928. "type": "string",
  16929. "enum": ["session.next.agent.switched.1"]
  16930. },
  16931. "id": {
  16932. "type": "string"
  16933. },
  16934. "seq": {
  16935. "type": "number"
  16936. },
  16937. "aggregateID": {
  16938. "type": "string",
  16939. "enum": ["sessionID"]
  16940. },
  16941. "data": {
  16942. "type": "object",
  16943. "properties": {
  16944. "timestamp": {
  16945. "type": "number"
  16946. },
  16947. "sessionID": {
  16948. "type": "string",
  16949. "pattern": "^ses"
  16950. },
  16951. "agent": {
  16952. "type": "string"
  16953. }
  16954. },
  16955. "required": ["timestamp", "sessionID", "agent"],
  16956. "additionalProperties": false
  16957. }
  16958. },
  16959. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16960. "additionalProperties": false
  16961. },
  16962. "SyncEventSessionNextModelSwitched": {
  16963. "type": "object",
  16964. "properties": {
  16965. "type": {
  16966. "type": "string",
  16967. "enum": ["sync"]
  16968. },
  16969. "name": {
  16970. "type": "string",
  16971. "enum": ["session.next.model.switched.1"]
  16972. },
  16973. "id": {
  16974. "type": "string"
  16975. },
  16976. "seq": {
  16977. "type": "number"
  16978. },
  16979. "aggregateID": {
  16980. "type": "string",
  16981. "enum": ["sessionID"]
  16982. },
  16983. "data": {
  16984. "type": "object",
  16985. "properties": {
  16986. "timestamp": {
  16987. "type": "number"
  16988. },
  16989. "sessionID": {
  16990. "type": "string",
  16991. "pattern": "^ses"
  16992. },
  16993. "model": {
  16994. "type": "object",
  16995. "properties": {
  16996. "id": {
  16997. "type": "string"
  16998. },
  16999. "providerID": {
  17000. "type": "string"
  17001. },
  17002. "variant": {
  17003. "type": "string"
  17004. }
  17005. },
  17006. "required": ["id", "providerID"],
  17007. "additionalProperties": false
  17008. }
  17009. },
  17010. "required": ["timestamp", "sessionID", "model"],
  17011. "additionalProperties": false
  17012. }
  17013. },
  17014. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17015. "additionalProperties": false
  17016. },
  17017. "SyncEventSessionNextPrompted": {
  17018. "type": "object",
  17019. "properties": {
  17020. "type": {
  17021. "type": "string",
  17022. "enum": ["sync"]
  17023. },
  17024. "name": {
  17025. "type": "string",
  17026. "enum": ["session.next.prompted.1"]
  17027. },
  17028. "id": {
  17029. "type": "string"
  17030. },
  17031. "seq": {
  17032. "type": "number"
  17033. },
  17034. "aggregateID": {
  17035. "type": "string",
  17036. "enum": ["sessionID"]
  17037. },
  17038. "data": {
  17039. "type": "object",
  17040. "properties": {
  17041. "timestamp": {
  17042. "type": "number"
  17043. },
  17044. "sessionID": {
  17045. "type": "string",
  17046. "pattern": "^ses"
  17047. },
  17048. "prompt": {
  17049. "$ref": "#/components/schemas/Prompt"
  17050. }
  17051. },
  17052. "required": ["timestamp", "sessionID", "prompt"],
  17053. "additionalProperties": false
  17054. }
  17055. },
  17056. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17057. "additionalProperties": false
  17058. },
  17059. "SyncEventSessionNextSynthetic": {
  17060. "type": "object",
  17061. "properties": {
  17062. "type": {
  17063. "type": "string",
  17064. "enum": ["sync"]
  17065. },
  17066. "name": {
  17067. "type": "string",
  17068. "enum": ["session.next.synthetic.1"]
  17069. },
  17070. "id": {
  17071. "type": "string"
  17072. },
  17073. "seq": {
  17074. "type": "number"
  17075. },
  17076. "aggregateID": {
  17077. "type": "string",
  17078. "enum": ["sessionID"]
  17079. },
  17080. "data": {
  17081. "type": "object",
  17082. "properties": {
  17083. "timestamp": {
  17084. "type": "number"
  17085. },
  17086. "sessionID": {
  17087. "type": "string",
  17088. "pattern": "^ses"
  17089. },
  17090. "text": {
  17091. "type": "string"
  17092. }
  17093. },
  17094. "required": ["timestamp", "sessionID", "text"],
  17095. "additionalProperties": false
  17096. }
  17097. },
  17098. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17099. "additionalProperties": false
  17100. },
  17101. "SyncEventSessionNextShellStarted": {
  17102. "type": "object",
  17103. "properties": {
  17104. "type": {
  17105. "type": "string",
  17106. "enum": ["sync"]
  17107. },
  17108. "name": {
  17109. "type": "string",
  17110. "enum": ["session.next.shell.started.1"]
  17111. },
  17112. "id": {
  17113. "type": "string"
  17114. },
  17115. "seq": {
  17116. "type": "number"
  17117. },
  17118. "aggregateID": {
  17119. "type": "string",
  17120. "enum": ["sessionID"]
  17121. },
  17122. "data": {
  17123. "type": "object",
  17124. "properties": {
  17125. "timestamp": {
  17126. "type": "number"
  17127. },
  17128. "sessionID": {
  17129. "type": "string",
  17130. "pattern": "^ses"
  17131. },
  17132. "callID": {
  17133. "type": "string"
  17134. },
  17135. "command": {
  17136. "type": "string"
  17137. }
  17138. },
  17139. "required": ["timestamp", "sessionID", "callID", "command"],
  17140. "additionalProperties": false
  17141. }
  17142. },
  17143. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17144. "additionalProperties": false
  17145. },
  17146. "SyncEventSessionNextShellEnded": {
  17147. "type": "object",
  17148. "properties": {
  17149. "type": {
  17150. "type": "string",
  17151. "enum": ["sync"]
  17152. },
  17153. "name": {
  17154. "type": "string",
  17155. "enum": ["session.next.shell.ended.1"]
  17156. },
  17157. "id": {
  17158. "type": "string"
  17159. },
  17160. "seq": {
  17161. "type": "number"
  17162. },
  17163. "aggregateID": {
  17164. "type": "string",
  17165. "enum": ["sessionID"]
  17166. },
  17167. "data": {
  17168. "type": "object",
  17169. "properties": {
  17170. "timestamp": {
  17171. "type": "number"
  17172. },
  17173. "sessionID": {
  17174. "type": "string",
  17175. "pattern": "^ses"
  17176. },
  17177. "callID": {
  17178. "type": "string"
  17179. },
  17180. "output": {
  17181. "type": "string"
  17182. }
  17183. },
  17184. "required": ["timestamp", "sessionID", "callID", "output"],
  17185. "additionalProperties": false
  17186. }
  17187. },
  17188. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17189. "additionalProperties": false
  17190. },
  17191. "SyncEventSessionNextStepStarted": {
  17192. "type": "object",
  17193. "properties": {
  17194. "type": {
  17195. "type": "string",
  17196. "enum": ["sync"]
  17197. },
  17198. "name": {
  17199. "type": "string",
  17200. "enum": ["session.next.step.started.1"]
  17201. },
  17202. "id": {
  17203. "type": "string"
  17204. },
  17205. "seq": {
  17206. "type": "number"
  17207. },
  17208. "aggregateID": {
  17209. "type": "string",
  17210. "enum": ["sessionID"]
  17211. },
  17212. "data": {
  17213. "type": "object",
  17214. "properties": {
  17215. "timestamp": {
  17216. "type": "number"
  17217. },
  17218. "sessionID": {
  17219. "type": "string",
  17220. "pattern": "^ses"
  17221. },
  17222. "agent": {
  17223. "type": "string"
  17224. },
  17225. "model": {
  17226. "type": "object",
  17227. "properties": {
  17228. "id": {
  17229. "type": "string"
  17230. },
  17231. "providerID": {
  17232. "type": "string"
  17233. },
  17234. "variant": {
  17235. "type": "string"
  17236. }
  17237. },
  17238. "required": ["id", "providerID"],
  17239. "additionalProperties": false
  17240. },
  17241. "snapshot": {
  17242. "type": "string"
  17243. }
  17244. },
  17245. "required": ["timestamp", "sessionID", "agent", "model"],
  17246. "additionalProperties": false
  17247. }
  17248. },
  17249. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17250. "additionalProperties": false
  17251. },
  17252. "SyncEventSessionNextStepEnded": {
  17253. "type": "object",
  17254. "properties": {
  17255. "type": {
  17256. "type": "string",
  17257. "enum": ["sync"]
  17258. },
  17259. "name": {
  17260. "type": "string",
  17261. "enum": ["session.next.step.ended.1"]
  17262. },
  17263. "id": {
  17264. "type": "string"
  17265. },
  17266. "seq": {
  17267. "type": "number"
  17268. },
  17269. "aggregateID": {
  17270. "type": "string",
  17271. "enum": ["sessionID"]
  17272. },
  17273. "data": {
  17274. "type": "object",
  17275. "properties": {
  17276. "timestamp": {
  17277. "type": "number"
  17278. },
  17279. "sessionID": {
  17280. "type": "string",
  17281. "pattern": "^ses"
  17282. },
  17283. "finish": {
  17284. "type": "string"
  17285. },
  17286. "cost": {
  17287. "type": "number"
  17288. },
  17289. "tokens": {
  17290. "type": "object",
  17291. "properties": {
  17292. "input": {
  17293. "type": "number"
  17294. },
  17295. "output": {
  17296. "type": "number"
  17297. },
  17298. "reasoning": {
  17299. "type": "number"
  17300. },
  17301. "cache": {
  17302. "type": "object",
  17303. "properties": {
  17304. "read": {
  17305. "type": "number"
  17306. },
  17307. "write": {
  17308. "type": "number"
  17309. }
  17310. },
  17311. "required": ["read", "write"],
  17312. "additionalProperties": false
  17313. }
  17314. },
  17315. "required": ["input", "output", "reasoning", "cache"],
  17316. "additionalProperties": false
  17317. },
  17318. "snapshot": {
  17319. "type": "string"
  17320. }
  17321. },
  17322. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17323. "additionalProperties": false
  17324. }
  17325. },
  17326. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17327. "additionalProperties": false
  17328. },
  17329. "SyncEventSessionNextStepFailed": {
  17330. "type": "object",
  17331. "properties": {
  17332. "type": {
  17333. "type": "string",
  17334. "enum": ["sync"]
  17335. },
  17336. "name": {
  17337. "type": "string",
  17338. "enum": ["session.next.step.failed.1"]
  17339. },
  17340. "id": {
  17341. "type": "string"
  17342. },
  17343. "seq": {
  17344. "type": "number"
  17345. },
  17346. "aggregateID": {
  17347. "type": "string",
  17348. "enum": ["sessionID"]
  17349. },
  17350. "data": {
  17351. "type": "object",
  17352. "properties": {
  17353. "timestamp": {
  17354. "type": "number"
  17355. },
  17356. "sessionID": {
  17357. "type": "string",
  17358. "pattern": "^ses"
  17359. },
  17360. "error": {
  17361. "$ref": "#/components/schemas/SessionErrorUnknown"
  17362. }
  17363. },
  17364. "required": ["timestamp", "sessionID", "error"],
  17365. "additionalProperties": false
  17366. }
  17367. },
  17368. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17369. "additionalProperties": false
  17370. },
  17371. "SyncEventSessionNextTextStarted": {
  17372. "type": "object",
  17373. "properties": {
  17374. "type": {
  17375. "type": "string",
  17376. "enum": ["sync"]
  17377. },
  17378. "name": {
  17379. "type": "string",
  17380. "enum": ["session.next.text.started.1"]
  17381. },
  17382. "id": {
  17383. "type": "string"
  17384. },
  17385. "seq": {
  17386. "type": "number"
  17387. },
  17388. "aggregateID": {
  17389. "type": "string",
  17390. "enum": ["sessionID"]
  17391. },
  17392. "data": {
  17393. "type": "object",
  17394. "properties": {
  17395. "timestamp": {
  17396. "type": "number"
  17397. },
  17398. "sessionID": {
  17399. "type": "string",
  17400. "pattern": "^ses"
  17401. }
  17402. },
  17403. "required": ["timestamp", "sessionID"],
  17404. "additionalProperties": false
  17405. }
  17406. },
  17407. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17408. "additionalProperties": false
  17409. },
  17410. "SyncEventSessionNextTextDelta": {
  17411. "type": "object",
  17412. "properties": {
  17413. "type": {
  17414. "type": "string",
  17415. "enum": ["sync"]
  17416. },
  17417. "name": {
  17418. "type": "string",
  17419. "enum": ["session.next.text.delta.1"]
  17420. },
  17421. "id": {
  17422. "type": "string"
  17423. },
  17424. "seq": {
  17425. "type": "number"
  17426. },
  17427. "aggregateID": {
  17428. "type": "string",
  17429. "enum": ["sessionID"]
  17430. },
  17431. "data": {
  17432. "type": "object",
  17433. "properties": {
  17434. "timestamp": {
  17435. "type": "number"
  17436. },
  17437. "sessionID": {
  17438. "type": "string",
  17439. "pattern": "^ses"
  17440. },
  17441. "delta": {
  17442. "type": "string"
  17443. }
  17444. },
  17445. "required": ["timestamp", "sessionID", "delta"],
  17446. "additionalProperties": false
  17447. }
  17448. },
  17449. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17450. "additionalProperties": false
  17451. },
  17452. "SyncEventSessionNextTextEnded": {
  17453. "type": "object",
  17454. "properties": {
  17455. "type": {
  17456. "type": "string",
  17457. "enum": ["sync"]
  17458. },
  17459. "name": {
  17460. "type": "string",
  17461. "enum": ["session.next.text.ended.1"]
  17462. },
  17463. "id": {
  17464. "type": "string"
  17465. },
  17466. "seq": {
  17467. "type": "number"
  17468. },
  17469. "aggregateID": {
  17470. "type": "string",
  17471. "enum": ["sessionID"]
  17472. },
  17473. "data": {
  17474. "type": "object",
  17475. "properties": {
  17476. "timestamp": {
  17477. "type": "number"
  17478. },
  17479. "sessionID": {
  17480. "type": "string",
  17481. "pattern": "^ses"
  17482. },
  17483. "text": {
  17484. "type": "string"
  17485. }
  17486. },
  17487. "required": ["timestamp", "sessionID", "text"],
  17488. "additionalProperties": false
  17489. }
  17490. },
  17491. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17492. "additionalProperties": false
  17493. },
  17494. "SyncEventSessionNextReasoningStarted": {
  17495. "type": "object",
  17496. "properties": {
  17497. "type": {
  17498. "type": "string",
  17499. "enum": ["sync"]
  17500. },
  17501. "name": {
  17502. "type": "string",
  17503. "enum": ["session.next.reasoning.started.1"]
  17504. },
  17505. "id": {
  17506. "type": "string"
  17507. },
  17508. "seq": {
  17509. "type": "number"
  17510. },
  17511. "aggregateID": {
  17512. "type": "string",
  17513. "enum": ["sessionID"]
  17514. },
  17515. "data": {
  17516. "type": "object",
  17517. "properties": {
  17518. "timestamp": {
  17519. "type": "number"
  17520. },
  17521. "sessionID": {
  17522. "type": "string",
  17523. "pattern": "^ses"
  17524. },
  17525. "reasoningID": {
  17526. "type": "string"
  17527. }
  17528. },
  17529. "required": ["timestamp", "sessionID", "reasoningID"],
  17530. "additionalProperties": false
  17531. }
  17532. },
  17533. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17534. "additionalProperties": false
  17535. },
  17536. "SyncEventSessionNextReasoningDelta": {
  17537. "type": "object",
  17538. "properties": {
  17539. "type": {
  17540. "type": "string",
  17541. "enum": ["sync"]
  17542. },
  17543. "name": {
  17544. "type": "string",
  17545. "enum": ["session.next.reasoning.delta.1"]
  17546. },
  17547. "id": {
  17548. "type": "string"
  17549. },
  17550. "seq": {
  17551. "type": "number"
  17552. },
  17553. "aggregateID": {
  17554. "type": "string",
  17555. "enum": ["sessionID"]
  17556. },
  17557. "data": {
  17558. "type": "object",
  17559. "properties": {
  17560. "timestamp": {
  17561. "type": "number"
  17562. },
  17563. "sessionID": {
  17564. "type": "string",
  17565. "pattern": "^ses"
  17566. },
  17567. "reasoningID": {
  17568. "type": "string"
  17569. },
  17570. "delta": {
  17571. "type": "string"
  17572. }
  17573. },
  17574. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17575. "additionalProperties": false
  17576. }
  17577. },
  17578. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17579. "additionalProperties": false
  17580. },
  17581. "SyncEventSessionNextReasoningEnded": {
  17582. "type": "object",
  17583. "properties": {
  17584. "type": {
  17585. "type": "string",
  17586. "enum": ["sync"]
  17587. },
  17588. "name": {
  17589. "type": "string",
  17590. "enum": ["session.next.reasoning.ended.1"]
  17591. },
  17592. "id": {
  17593. "type": "string"
  17594. },
  17595. "seq": {
  17596. "type": "number"
  17597. },
  17598. "aggregateID": {
  17599. "type": "string",
  17600. "enum": ["sessionID"]
  17601. },
  17602. "data": {
  17603. "type": "object",
  17604. "properties": {
  17605. "timestamp": {
  17606. "type": "number"
  17607. },
  17608. "sessionID": {
  17609. "type": "string",
  17610. "pattern": "^ses"
  17611. },
  17612. "reasoningID": {
  17613. "type": "string"
  17614. },
  17615. "text": {
  17616. "type": "string"
  17617. }
  17618. },
  17619. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17620. "additionalProperties": false
  17621. }
  17622. },
  17623. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17624. "additionalProperties": false
  17625. },
  17626. "SyncEventSessionNextToolInputStarted": {
  17627. "type": "object",
  17628. "properties": {
  17629. "type": {
  17630. "type": "string",
  17631. "enum": ["sync"]
  17632. },
  17633. "name": {
  17634. "type": "string",
  17635. "enum": ["session.next.tool.input.started.1"]
  17636. },
  17637. "id": {
  17638. "type": "string"
  17639. },
  17640. "seq": {
  17641. "type": "number"
  17642. },
  17643. "aggregateID": {
  17644. "type": "string",
  17645. "enum": ["sessionID"]
  17646. },
  17647. "data": {
  17648. "type": "object",
  17649. "properties": {
  17650. "timestamp": {
  17651. "type": "number"
  17652. },
  17653. "sessionID": {
  17654. "type": "string",
  17655. "pattern": "^ses"
  17656. },
  17657. "callID": {
  17658. "type": "string"
  17659. },
  17660. "name": {
  17661. "type": "string"
  17662. }
  17663. },
  17664. "required": ["timestamp", "sessionID", "callID", "name"],
  17665. "additionalProperties": false
  17666. }
  17667. },
  17668. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17669. "additionalProperties": false
  17670. },
  17671. "SyncEventSessionNextToolInputDelta": {
  17672. "type": "object",
  17673. "properties": {
  17674. "type": {
  17675. "type": "string",
  17676. "enum": ["sync"]
  17677. },
  17678. "name": {
  17679. "type": "string",
  17680. "enum": ["session.next.tool.input.delta.1"]
  17681. },
  17682. "id": {
  17683. "type": "string"
  17684. },
  17685. "seq": {
  17686. "type": "number"
  17687. },
  17688. "aggregateID": {
  17689. "type": "string",
  17690. "enum": ["sessionID"]
  17691. },
  17692. "data": {
  17693. "type": "object",
  17694. "properties": {
  17695. "timestamp": {
  17696. "type": "number"
  17697. },
  17698. "sessionID": {
  17699. "type": "string",
  17700. "pattern": "^ses"
  17701. },
  17702. "callID": {
  17703. "type": "string"
  17704. },
  17705. "delta": {
  17706. "type": "string"
  17707. }
  17708. },
  17709. "required": ["timestamp", "sessionID", "callID", "delta"],
  17710. "additionalProperties": false
  17711. }
  17712. },
  17713. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17714. "additionalProperties": false
  17715. },
  17716. "SyncEventSessionNextToolInputEnded": {
  17717. "type": "object",
  17718. "properties": {
  17719. "type": {
  17720. "type": "string",
  17721. "enum": ["sync"]
  17722. },
  17723. "name": {
  17724. "type": "string",
  17725. "enum": ["session.next.tool.input.ended.1"]
  17726. },
  17727. "id": {
  17728. "type": "string"
  17729. },
  17730. "seq": {
  17731. "type": "number"
  17732. },
  17733. "aggregateID": {
  17734. "type": "string",
  17735. "enum": ["sessionID"]
  17736. },
  17737. "data": {
  17738. "type": "object",
  17739. "properties": {
  17740. "timestamp": {
  17741. "type": "number"
  17742. },
  17743. "sessionID": {
  17744. "type": "string",
  17745. "pattern": "^ses"
  17746. },
  17747. "callID": {
  17748. "type": "string"
  17749. },
  17750. "text": {
  17751. "type": "string"
  17752. }
  17753. },
  17754. "required": ["timestamp", "sessionID", "callID", "text"],
  17755. "additionalProperties": false
  17756. }
  17757. },
  17758. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17759. "additionalProperties": false
  17760. },
  17761. "SyncEventSessionNextToolCalled": {
  17762. "type": "object",
  17763. "properties": {
  17764. "type": {
  17765. "type": "string",
  17766. "enum": ["sync"]
  17767. },
  17768. "name": {
  17769. "type": "string",
  17770. "enum": ["session.next.tool.called.1"]
  17771. },
  17772. "id": {
  17773. "type": "string"
  17774. },
  17775. "seq": {
  17776. "type": "number"
  17777. },
  17778. "aggregateID": {
  17779. "type": "string",
  17780. "enum": ["sessionID"]
  17781. },
  17782. "data": {
  17783. "type": "object",
  17784. "properties": {
  17785. "timestamp": {
  17786. "type": "number"
  17787. },
  17788. "sessionID": {
  17789. "type": "string",
  17790. "pattern": "^ses"
  17791. },
  17792. "callID": {
  17793. "type": "string"
  17794. },
  17795. "tool": {
  17796. "type": "string"
  17797. },
  17798. "input": {
  17799. "type": "object"
  17800. },
  17801. "provider": {
  17802. "type": "object",
  17803. "properties": {
  17804. "executed": {
  17805. "type": "boolean"
  17806. },
  17807. "metadata": {
  17808. "type": "object"
  17809. }
  17810. },
  17811. "required": ["executed"],
  17812. "additionalProperties": false
  17813. }
  17814. },
  17815. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17816. "additionalProperties": false
  17817. }
  17818. },
  17819. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17820. "additionalProperties": false
  17821. },
  17822. "SyncEventSessionNextToolProgress": {
  17823. "type": "object",
  17824. "properties": {
  17825. "type": {
  17826. "type": "string",
  17827. "enum": ["sync"]
  17828. },
  17829. "name": {
  17830. "type": "string",
  17831. "enum": ["session.next.tool.progress.1"]
  17832. },
  17833. "id": {
  17834. "type": "string"
  17835. },
  17836. "seq": {
  17837. "type": "number"
  17838. },
  17839. "aggregateID": {
  17840. "type": "string",
  17841. "enum": ["sessionID"]
  17842. },
  17843. "data": {
  17844. "type": "object",
  17845. "properties": {
  17846. "timestamp": {
  17847. "type": "number"
  17848. },
  17849. "sessionID": {
  17850. "type": "string",
  17851. "pattern": "^ses"
  17852. },
  17853. "callID": {
  17854. "type": "string"
  17855. },
  17856. "structured": {
  17857. "type": "object"
  17858. },
  17859. "content": {
  17860. "type": "array",
  17861. "items": {
  17862. "anyOf": [
  17863. {
  17864. "$ref": "#/components/schemas/ToolTextContent"
  17865. },
  17866. {
  17867. "$ref": "#/components/schemas/ToolFileContent"
  17868. }
  17869. ]
  17870. }
  17871. }
  17872. },
  17873. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17874. "additionalProperties": false
  17875. }
  17876. },
  17877. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17878. "additionalProperties": false
  17879. },
  17880. "SyncEventSessionNextToolSuccess": {
  17881. "type": "object",
  17882. "properties": {
  17883. "type": {
  17884. "type": "string",
  17885. "enum": ["sync"]
  17886. },
  17887. "name": {
  17888. "type": "string",
  17889. "enum": ["session.next.tool.success.1"]
  17890. },
  17891. "id": {
  17892. "type": "string"
  17893. },
  17894. "seq": {
  17895. "type": "number"
  17896. },
  17897. "aggregateID": {
  17898. "type": "string",
  17899. "enum": ["sessionID"]
  17900. },
  17901. "data": {
  17902. "type": "object",
  17903. "properties": {
  17904. "timestamp": {
  17905. "type": "number"
  17906. },
  17907. "sessionID": {
  17908. "type": "string",
  17909. "pattern": "^ses"
  17910. },
  17911. "callID": {
  17912. "type": "string"
  17913. },
  17914. "structured": {
  17915. "type": "object"
  17916. },
  17917. "content": {
  17918. "type": "array",
  17919. "items": {
  17920. "anyOf": [
  17921. {
  17922. "$ref": "#/components/schemas/ToolTextContent"
  17923. },
  17924. {
  17925. "$ref": "#/components/schemas/ToolFileContent"
  17926. }
  17927. ]
  17928. }
  17929. },
  17930. "provider": {
  17931. "type": "object",
  17932. "properties": {
  17933. "executed": {
  17934. "type": "boolean"
  17935. },
  17936. "metadata": {
  17937. "type": "object"
  17938. }
  17939. },
  17940. "required": ["executed"],
  17941. "additionalProperties": false
  17942. }
  17943. },
  17944. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17945. "additionalProperties": false
  17946. }
  17947. },
  17948. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17949. "additionalProperties": false
  17950. },
  17951. "SyncEventSessionNextToolFailed": {
  17952. "type": "object",
  17953. "properties": {
  17954. "type": {
  17955. "type": "string",
  17956. "enum": ["sync"]
  17957. },
  17958. "name": {
  17959. "type": "string",
  17960. "enum": ["session.next.tool.failed.1"]
  17961. },
  17962. "id": {
  17963. "type": "string"
  17964. },
  17965. "seq": {
  17966. "type": "number"
  17967. },
  17968. "aggregateID": {
  17969. "type": "string",
  17970. "enum": ["sessionID"]
  17971. },
  17972. "data": {
  17973. "type": "object",
  17974. "properties": {
  17975. "timestamp": {
  17976. "type": "number"
  17977. },
  17978. "sessionID": {
  17979. "type": "string",
  17980. "pattern": "^ses"
  17981. },
  17982. "callID": {
  17983. "type": "string"
  17984. },
  17985. "error": {
  17986. "$ref": "#/components/schemas/SessionErrorUnknown"
  17987. },
  17988. "provider": {
  17989. "type": "object",
  17990. "properties": {
  17991. "executed": {
  17992. "type": "boolean"
  17993. },
  17994. "metadata": {
  17995. "type": "object"
  17996. }
  17997. },
  17998. "required": ["executed"],
  17999. "additionalProperties": false
  18000. }
  18001. },
  18002. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18003. "additionalProperties": false
  18004. }
  18005. },
  18006. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18007. "additionalProperties": false
  18008. },
  18009. "SyncEventSessionNextRetried": {
  18010. "type": "object",
  18011. "properties": {
  18012. "type": {
  18013. "type": "string",
  18014. "enum": ["sync"]
  18015. },
  18016. "name": {
  18017. "type": "string",
  18018. "enum": ["session.next.retried.1"]
  18019. },
  18020. "id": {
  18021. "type": "string"
  18022. },
  18023. "seq": {
  18024. "type": "number"
  18025. },
  18026. "aggregateID": {
  18027. "type": "string",
  18028. "enum": ["sessionID"]
  18029. },
  18030. "data": {
  18031. "type": "object",
  18032. "properties": {
  18033. "timestamp": {
  18034. "type": "number"
  18035. },
  18036. "sessionID": {
  18037. "type": "string",
  18038. "pattern": "^ses"
  18039. },
  18040. "attempt": {
  18041. "type": "number"
  18042. },
  18043. "error": {
  18044. "$ref": "#/components/schemas/SessionNextRetry_error"
  18045. }
  18046. },
  18047. "required": ["timestamp", "sessionID", "attempt", "error"],
  18048. "additionalProperties": false
  18049. }
  18050. },
  18051. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18052. "additionalProperties": false
  18053. },
  18054. "SyncEventSessionNextCompactionStarted": {
  18055. "type": "object",
  18056. "properties": {
  18057. "type": {
  18058. "type": "string",
  18059. "enum": ["sync"]
  18060. },
  18061. "name": {
  18062. "type": "string",
  18063. "enum": ["session.next.compaction.started.1"]
  18064. },
  18065. "id": {
  18066. "type": "string"
  18067. },
  18068. "seq": {
  18069. "type": "number"
  18070. },
  18071. "aggregateID": {
  18072. "type": "string",
  18073. "enum": ["sessionID"]
  18074. },
  18075. "data": {
  18076. "type": "object",
  18077. "properties": {
  18078. "timestamp": {
  18079. "type": "number"
  18080. },
  18081. "sessionID": {
  18082. "type": "string",
  18083. "pattern": "^ses"
  18084. },
  18085. "reason": {
  18086. "type": "string",
  18087. "enum": ["auto", "manual"]
  18088. }
  18089. },
  18090. "required": ["timestamp", "sessionID", "reason"],
  18091. "additionalProperties": false
  18092. }
  18093. },
  18094. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18095. "additionalProperties": false
  18096. },
  18097. "SyncEventSessionNextCompactionDelta": {
  18098. "type": "object",
  18099. "properties": {
  18100. "type": {
  18101. "type": "string",
  18102. "enum": ["sync"]
  18103. },
  18104. "name": {
  18105. "type": "string",
  18106. "enum": ["session.next.compaction.delta.1"]
  18107. },
  18108. "id": {
  18109. "type": "string"
  18110. },
  18111. "seq": {
  18112. "type": "number"
  18113. },
  18114. "aggregateID": {
  18115. "type": "string",
  18116. "enum": ["sessionID"]
  18117. },
  18118. "data": {
  18119. "type": "object",
  18120. "properties": {
  18121. "timestamp": {
  18122. "type": "number"
  18123. },
  18124. "sessionID": {
  18125. "type": "string",
  18126. "pattern": "^ses"
  18127. },
  18128. "text": {
  18129. "type": "string"
  18130. }
  18131. },
  18132. "required": ["timestamp", "sessionID", "text"],
  18133. "additionalProperties": false
  18134. }
  18135. },
  18136. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18137. "additionalProperties": false
  18138. },
  18139. "SyncEventSessionNextCompactionEnded": {
  18140. "type": "object",
  18141. "properties": {
  18142. "type": {
  18143. "type": "string",
  18144. "enum": ["sync"]
  18145. },
  18146. "name": {
  18147. "type": "string",
  18148. "enum": ["session.next.compaction.ended.1"]
  18149. },
  18150. "id": {
  18151. "type": "string"
  18152. },
  18153. "seq": {
  18154. "type": "number"
  18155. },
  18156. "aggregateID": {
  18157. "type": "string",
  18158. "enum": ["sessionID"]
  18159. },
  18160. "data": {
  18161. "type": "object",
  18162. "properties": {
  18163. "timestamp": {
  18164. "type": "number"
  18165. },
  18166. "sessionID": {
  18167. "type": "string",
  18168. "pattern": "^ses"
  18169. },
  18170. "text": {
  18171. "type": "string"
  18172. },
  18173. "include": {
  18174. "type": "string"
  18175. }
  18176. },
  18177. "required": ["timestamp", "sessionID", "text"],
  18178. "additionalProperties": false
  18179. }
  18180. },
  18181. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18182. "additionalProperties": false
  18183. },
  18184. "EventServerConnected": {
  18185. "type": "object",
  18186. "properties": {
  18187. "id": {
  18188. "type": "string"
  18189. },
  18190. "type": {
  18191. "type": "string",
  18192. "enum": ["server.connected"]
  18193. },
  18194. "properties": {
  18195. "type": "object",
  18196. "properties": {}
  18197. }
  18198. },
  18199. "required": ["id", "type", "properties"],
  18200. "additionalProperties": false
  18201. },
  18202. "EventGlobalDisposed": {
  18203. "type": "object",
  18204. "properties": {
  18205. "id": {
  18206. "type": "string"
  18207. },
  18208. "type": {
  18209. "type": "string",
  18210. "enum": ["global.disposed"]
  18211. },
  18212. "properties": {
  18213. "type": "object",
  18214. "properties": {}
  18215. }
  18216. },
  18217. "required": ["id", "type", "properties"],
  18218. "additionalProperties": false
  18219. },
  18220. "EventServerInstanceDisposed": {
  18221. "type": "object",
  18222. "properties": {
  18223. "id": {
  18224. "type": "string"
  18225. },
  18226. "type": {
  18227. "type": "string",
  18228. "enum": ["server.instance.disposed"]
  18229. },
  18230. "properties": {
  18231. "type": "object",
  18232. "properties": {
  18233. "directory": {
  18234. "type": "string"
  18235. }
  18236. },
  18237. "required": ["directory"],
  18238. "additionalProperties": false
  18239. }
  18240. },
  18241. "required": ["id", "type", "properties"],
  18242. "additionalProperties": false
  18243. },
  18244. "EventFileEdited": {
  18245. "type": "object",
  18246. "properties": {
  18247. "id": {
  18248. "type": "string"
  18249. },
  18250. "type": {
  18251. "type": "string",
  18252. "enum": ["file.edited"]
  18253. },
  18254. "properties": {
  18255. "type": "object",
  18256. "properties": {
  18257. "file": {
  18258. "type": "string"
  18259. }
  18260. },
  18261. "required": ["file"],
  18262. "additionalProperties": false
  18263. }
  18264. },
  18265. "required": ["id", "type", "properties"],
  18266. "additionalProperties": false
  18267. },
  18268. "EventFileWatcherUpdated": {
  18269. "type": "object",
  18270. "properties": {
  18271. "id": {
  18272. "type": "string"
  18273. },
  18274. "type": {
  18275. "type": "string",
  18276. "enum": ["file.watcher.updated"]
  18277. },
  18278. "properties": {
  18279. "type": "object",
  18280. "properties": {
  18281. "file": {
  18282. "type": "string"
  18283. },
  18284. "event": {
  18285. "type": "string",
  18286. "enum": ["add", "change", "unlink"]
  18287. }
  18288. },
  18289. "required": ["file", "event"],
  18290. "additionalProperties": false
  18291. }
  18292. },
  18293. "required": ["id", "type", "properties"],
  18294. "additionalProperties": false
  18295. },
  18296. "EventLspClientDiagnostics": {
  18297. "type": "object",
  18298. "properties": {
  18299. "id": {
  18300. "type": "string"
  18301. },
  18302. "type": {
  18303. "type": "string",
  18304. "enum": ["lsp.client.diagnostics"]
  18305. },
  18306. "properties": {
  18307. "type": "object",
  18308. "properties": {
  18309. "serverID": {
  18310. "type": "string"
  18311. },
  18312. "path": {
  18313. "type": "string"
  18314. }
  18315. },
  18316. "required": ["serverID", "path"],
  18317. "additionalProperties": false
  18318. }
  18319. },
  18320. "required": ["id", "type", "properties"],
  18321. "additionalProperties": false
  18322. },
  18323. "EventLspUpdated": {
  18324. "type": "object",
  18325. "properties": {
  18326. "id": {
  18327. "type": "string"
  18328. },
  18329. "type": {
  18330. "type": "string",
  18331. "enum": ["lsp.updated"]
  18332. },
  18333. "properties": {
  18334. "type": "object",
  18335. "properties": {}
  18336. }
  18337. },
  18338. "required": ["id", "type", "properties"],
  18339. "additionalProperties": false
  18340. },
  18341. "EventMessagePartDelta": {
  18342. "type": "object",
  18343. "properties": {
  18344. "id": {
  18345. "type": "string"
  18346. },
  18347. "type": {
  18348. "type": "string",
  18349. "enum": ["message.part.delta"]
  18350. },
  18351. "properties": {
  18352. "type": "object",
  18353. "properties": {
  18354. "sessionID": {
  18355. "type": "string",
  18356. "pattern": "^ses"
  18357. },
  18358. "messageID": {
  18359. "type": "string",
  18360. "pattern": "^msg"
  18361. },
  18362. "partID": {
  18363. "type": "string",
  18364. "pattern": "^prt"
  18365. },
  18366. "field": {
  18367. "type": "string"
  18368. },
  18369. "delta": {
  18370. "type": "string"
  18371. }
  18372. },
  18373. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18374. "additionalProperties": false
  18375. }
  18376. },
  18377. "required": ["id", "type", "properties"],
  18378. "additionalProperties": false
  18379. },
  18380. "EventPermissionAsked": {
  18381. "type": "object",
  18382. "properties": {
  18383. "id": {
  18384. "type": "string"
  18385. },
  18386. "type": {
  18387. "type": "string",
  18388. "enum": ["permission.asked"]
  18389. },
  18390. "properties": {
  18391. "$ref": "#/components/schemas/PermissionRequest"
  18392. }
  18393. },
  18394. "required": ["id", "type", "properties"],
  18395. "additionalProperties": false
  18396. },
  18397. "EventPermissionReplied": {
  18398. "type": "object",
  18399. "properties": {
  18400. "id": {
  18401. "type": "string"
  18402. },
  18403. "type": {
  18404. "type": "string",
  18405. "enum": ["permission.replied"]
  18406. },
  18407. "properties": {
  18408. "type": "object",
  18409. "properties": {
  18410. "sessionID": {
  18411. "type": "string",
  18412. "pattern": "^ses"
  18413. },
  18414. "requestID": {
  18415. "type": "string",
  18416. "pattern": "^per"
  18417. },
  18418. "reply": {
  18419. "type": "string",
  18420. "enum": ["once", "always", "reject"]
  18421. }
  18422. },
  18423. "required": ["sessionID", "requestID", "reply"],
  18424. "additionalProperties": false
  18425. }
  18426. },
  18427. "required": ["id", "type", "properties"],
  18428. "additionalProperties": false
  18429. },
  18430. "EventSessionDiff": {
  18431. "type": "object",
  18432. "properties": {
  18433. "id": {
  18434. "type": "string"
  18435. },
  18436. "type": {
  18437. "type": "string",
  18438. "enum": ["session.diff"]
  18439. },
  18440. "properties": {
  18441. "type": "object",
  18442. "properties": {
  18443. "sessionID": {
  18444. "type": "string",
  18445. "pattern": "^ses"
  18446. },
  18447. "diff": {
  18448. "type": "array",
  18449. "items": {
  18450. "$ref": "#/components/schemas/SnapshotFileDiff"
  18451. }
  18452. }
  18453. },
  18454. "required": ["sessionID", "diff"],
  18455. "additionalProperties": false
  18456. }
  18457. },
  18458. "required": ["id", "type", "properties"],
  18459. "additionalProperties": false
  18460. },
  18461. "EventSessionError": {
  18462. "type": "object",
  18463. "properties": {
  18464. "id": {
  18465. "type": "string"
  18466. },
  18467. "type": {
  18468. "type": "string",
  18469. "enum": ["session.error"]
  18470. },
  18471. "properties": {
  18472. "type": "object",
  18473. "properties": {
  18474. "sessionID": {
  18475. "type": "string",
  18476. "pattern": "^ses"
  18477. },
  18478. "error": {
  18479. "anyOf": [
  18480. {
  18481. "$ref": "#/components/schemas/ProviderAuthError"
  18482. },
  18483. {
  18484. "$ref": "#/components/schemas/UnknownError"
  18485. },
  18486. {
  18487. "$ref": "#/components/schemas/MessageOutputLengthError"
  18488. },
  18489. {
  18490. "$ref": "#/components/schemas/MessageAbortedError"
  18491. },
  18492. {
  18493. "$ref": "#/components/schemas/StructuredOutputError"
  18494. },
  18495. {
  18496. "$ref": "#/components/schemas/ContextOverflowError"
  18497. },
  18498. {
  18499. "$ref": "#/components/schemas/APIError"
  18500. }
  18501. ]
  18502. }
  18503. },
  18504. "additionalProperties": false
  18505. }
  18506. },
  18507. "required": ["id", "type", "properties"],
  18508. "additionalProperties": false
  18509. },
  18510. "EventQuestionAsked": {
  18511. "type": "object",
  18512. "properties": {
  18513. "id": {
  18514. "type": "string"
  18515. },
  18516. "type": {
  18517. "type": "string",
  18518. "enum": ["question.asked"]
  18519. },
  18520. "properties": {
  18521. "$ref": "#/components/schemas/QuestionRequest"
  18522. }
  18523. },
  18524. "required": ["id", "type", "properties"],
  18525. "additionalProperties": false
  18526. },
  18527. "EventQuestionReplied": {
  18528. "type": "object",
  18529. "properties": {
  18530. "id": {
  18531. "type": "string"
  18532. },
  18533. "type": {
  18534. "type": "string",
  18535. "enum": ["question.replied"]
  18536. },
  18537. "properties": {
  18538. "$ref": "#/components/schemas/QuestionReplied"
  18539. }
  18540. },
  18541. "required": ["id", "type", "properties"],
  18542. "additionalProperties": false
  18543. },
  18544. "EventQuestionRejected": {
  18545. "type": "object",
  18546. "properties": {
  18547. "id": {
  18548. "type": "string"
  18549. },
  18550. "type": {
  18551. "type": "string",
  18552. "enum": ["question.rejected"]
  18553. },
  18554. "properties": {
  18555. "$ref": "#/components/schemas/QuestionRejected"
  18556. }
  18557. },
  18558. "required": ["id", "type", "properties"],
  18559. "additionalProperties": false
  18560. },
  18561. "EventTodoUpdated": {
  18562. "type": "object",
  18563. "properties": {
  18564. "id": {
  18565. "type": "string"
  18566. },
  18567. "type": {
  18568. "type": "string",
  18569. "enum": ["todo.updated"]
  18570. },
  18571. "properties": {
  18572. "type": "object",
  18573. "properties": {
  18574. "sessionID": {
  18575. "type": "string",
  18576. "pattern": "^ses"
  18577. },
  18578. "todos": {
  18579. "type": "array",
  18580. "items": {
  18581. "$ref": "#/components/schemas/Todo"
  18582. }
  18583. }
  18584. },
  18585. "required": ["sessionID", "todos"],
  18586. "additionalProperties": false
  18587. }
  18588. },
  18589. "required": ["id", "type", "properties"],
  18590. "additionalProperties": false
  18591. },
  18592. "EventSessionStatus": {
  18593. "type": "object",
  18594. "properties": {
  18595. "id": {
  18596. "type": "string"
  18597. },
  18598. "type": {
  18599. "type": "string",
  18600. "enum": ["session.status"]
  18601. },
  18602. "properties": {
  18603. "type": "object",
  18604. "properties": {
  18605. "sessionID": {
  18606. "type": "string",
  18607. "pattern": "^ses"
  18608. },
  18609. "status": {
  18610. "$ref": "#/components/schemas/SessionStatus"
  18611. }
  18612. },
  18613. "required": ["sessionID", "status"],
  18614. "additionalProperties": false
  18615. }
  18616. },
  18617. "required": ["id", "type", "properties"],
  18618. "additionalProperties": false
  18619. },
  18620. "EventSessionIdle": {
  18621. "type": "object",
  18622. "properties": {
  18623. "id": {
  18624. "type": "string"
  18625. },
  18626. "type": {
  18627. "type": "string",
  18628. "enum": ["session.idle"]
  18629. },
  18630. "properties": {
  18631. "type": "object",
  18632. "properties": {
  18633. "sessionID": {
  18634. "type": "string",
  18635. "pattern": "^ses"
  18636. }
  18637. },
  18638. "required": ["sessionID"],
  18639. "additionalProperties": false
  18640. }
  18641. },
  18642. "required": ["id", "type", "properties"],
  18643. "additionalProperties": false
  18644. },
  18645. "EventMcpToolsChanged": {
  18646. "type": "object",
  18647. "properties": {
  18648. "id": {
  18649. "type": "string"
  18650. },
  18651. "type": {
  18652. "type": "string",
  18653. "enum": ["mcp.tools.changed"]
  18654. },
  18655. "properties": {
  18656. "type": "object",
  18657. "properties": {
  18658. "server": {
  18659. "type": "string"
  18660. }
  18661. },
  18662. "required": ["server"],
  18663. "additionalProperties": false
  18664. }
  18665. },
  18666. "required": ["id", "type", "properties"],
  18667. "additionalProperties": false
  18668. },
  18669. "EventMcpBrowserOpenFailed": {
  18670. "type": "object",
  18671. "properties": {
  18672. "id": {
  18673. "type": "string"
  18674. },
  18675. "type": {
  18676. "type": "string",
  18677. "enum": ["mcp.browser.open.failed"]
  18678. },
  18679. "properties": {
  18680. "type": "object",
  18681. "properties": {
  18682. "mcpName": {
  18683. "type": "string"
  18684. },
  18685. "url": {
  18686. "type": "string"
  18687. }
  18688. },
  18689. "required": ["mcpName", "url"],
  18690. "additionalProperties": false
  18691. }
  18692. },
  18693. "required": ["id", "type", "properties"],
  18694. "additionalProperties": false
  18695. },
  18696. "EventCommandExecuted": {
  18697. "type": "object",
  18698. "properties": {
  18699. "id": {
  18700. "type": "string"
  18701. },
  18702. "type": {
  18703. "type": "string",
  18704. "enum": ["command.executed"]
  18705. },
  18706. "properties": {
  18707. "type": "object",
  18708. "properties": {
  18709. "name": {
  18710. "type": "string"
  18711. },
  18712. "sessionID": {
  18713. "type": "string",
  18714. "pattern": "^ses"
  18715. },
  18716. "arguments": {
  18717. "type": "string"
  18718. },
  18719. "messageID": {
  18720. "type": "string",
  18721. "pattern": "^msg"
  18722. }
  18723. },
  18724. "required": ["name", "sessionID", "arguments", "messageID"],
  18725. "additionalProperties": false
  18726. }
  18727. },
  18728. "required": ["id", "type", "properties"],
  18729. "additionalProperties": false
  18730. },
  18731. "EventProjectUpdated": {
  18732. "type": "object",
  18733. "properties": {
  18734. "id": {
  18735. "type": "string"
  18736. },
  18737. "type": {
  18738. "type": "string",
  18739. "enum": ["project.updated"]
  18740. },
  18741. "properties": {
  18742. "$ref": "#/components/schemas/Project"
  18743. }
  18744. },
  18745. "required": ["id", "type", "properties"],
  18746. "additionalProperties": false
  18747. },
  18748. "EventSessionCompacted": {
  18749. "type": "object",
  18750. "properties": {
  18751. "id": {
  18752. "type": "string"
  18753. },
  18754. "type": {
  18755. "type": "string",
  18756. "enum": ["session.compacted"]
  18757. },
  18758. "properties": {
  18759. "type": "object",
  18760. "properties": {
  18761. "sessionID": {
  18762. "type": "string",
  18763. "pattern": "^ses"
  18764. }
  18765. },
  18766. "required": ["sessionID"],
  18767. "additionalProperties": false
  18768. }
  18769. },
  18770. "required": ["id", "type", "properties"],
  18771. "additionalProperties": false
  18772. },
  18773. "EventVcsBranchUpdated": {
  18774. "type": "object",
  18775. "properties": {
  18776. "id": {
  18777. "type": "string"
  18778. },
  18779. "type": {
  18780. "type": "string",
  18781. "enum": ["vcs.branch.updated"]
  18782. },
  18783. "properties": {
  18784. "type": "object",
  18785. "properties": {
  18786. "branch": {
  18787. "type": "string"
  18788. }
  18789. },
  18790. "additionalProperties": false
  18791. }
  18792. },
  18793. "required": ["id", "type", "properties"],
  18794. "additionalProperties": false
  18795. },
  18796. "EventWorkspaceReady": {
  18797. "type": "object",
  18798. "properties": {
  18799. "id": {
  18800. "type": "string"
  18801. },
  18802. "type": {
  18803. "type": "string",
  18804. "enum": ["workspace.ready"]
  18805. },
  18806. "properties": {
  18807. "type": "object",
  18808. "properties": {
  18809. "name": {
  18810. "type": "string"
  18811. }
  18812. },
  18813. "required": ["name"],
  18814. "additionalProperties": false
  18815. }
  18816. },
  18817. "required": ["id", "type", "properties"],
  18818. "additionalProperties": false
  18819. },
  18820. "EventWorkspaceFailed": {
  18821. "type": "object",
  18822. "properties": {
  18823. "id": {
  18824. "type": "string"
  18825. },
  18826. "type": {
  18827. "type": "string",
  18828. "enum": ["workspace.failed"]
  18829. },
  18830. "properties": {
  18831. "type": "object",
  18832. "properties": {
  18833. "message": {
  18834. "type": "string"
  18835. }
  18836. },
  18837. "required": ["message"],
  18838. "additionalProperties": false
  18839. }
  18840. },
  18841. "required": ["id", "type", "properties"],
  18842. "additionalProperties": false
  18843. },
  18844. "EventWorkspaceStatus": {
  18845. "type": "object",
  18846. "properties": {
  18847. "id": {
  18848. "type": "string"
  18849. },
  18850. "type": {
  18851. "type": "string",
  18852. "enum": ["workspace.status"]
  18853. },
  18854. "properties": {
  18855. "type": "object",
  18856. "properties": {
  18857. "workspaceID": {
  18858. "type": "string",
  18859. "pattern": "^wrk"
  18860. },
  18861. "status": {
  18862. "type": "string",
  18863. "enum": ["connected", "connecting", "disconnected", "error"]
  18864. }
  18865. },
  18866. "required": ["workspaceID", "status"],
  18867. "additionalProperties": false
  18868. }
  18869. },
  18870. "required": ["id", "type", "properties"],
  18871. "additionalProperties": false
  18872. },
  18873. "EventWorktreeReady": {
  18874. "type": "object",
  18875. "properties": {
  18876. "id": {
  18877. "type": "string"
  18878. },
  18879. "type": {
  18880. "type": "string",
  18881. "enum": ["worktree.ready"]
  18882. },
  18883. "properties": {
  18884. "type": "object",
  18885. "properties": {
  18886. "name": {
  18887. "type": "string"
  18888. },
  18889. "branch": {
  18890. "type": "string"
  18891. }
  18892. },
  18893. "required": ["name"],
  18894. "additionalProperties": false
  18895. }
  18896. },
  18897. "required": ["id", "type", "properties"],
  18898. "additionalProperties": false
  18899. },
  18900. "EventWorktreeFailed": {
  18901. "type": "object",
  18902. "properties": {
  18903. "id": {
  18904. "type": "string"
  18905. },
  18906. "type": {
  18907. "type": "string",
  18908. "enum": ["worktree.failed"]
  18909. },
  18910. "properties": {
  18911. "type": "object",
  18912. "properties": {
  18913. "message": {
  18914. "type": "string"
  18915. }
  18916. },
  18917. "required": ["message"],
  18918. "additionalProperties": false
  18919. }
  18920. },
  18921. "required": ["id", "type", "properties"],
  18922. "additionalProperties": false
  18923. },
  18924. "EventPtyCreated": {
  18925. "type": "object",
  18926. "properties": {
  18927. "id": {
  18928. "type": "string"
  18929. },
  18930. "type": {
  18931. "type": "string",
  18932. "enum": ["pty.created"]
  18933. },
  18934. "properties": {
  18935. "type": "object",
  18936. "properties": {
  18937. "info": {
  18938. "$ref": "#/components/schemas/Pty"
  18939. }
  18940. },
  18941. "required": ["info"],
  18942. "additionalProperties": false
  18943. }
  18944. },
  18945. "required": ["id", "type", "properties"],
  18946. "additionalProperties": false
  18947. },
  18948. "EventPtyUpdated": {
  18949. "type": "object",
  18950. "properties": {
  18951. "id": {
  18952. "type": "string"
  18953. },
  18954. "type": {
  18955. "type": "string",
  18956. "enum": ["pty.updated"]
  18957. },
  18958. "properties": {
  18959. "type": "object",
  18960. "properties": {
  18961. "info": {
  18962. "$ref": "#/components/schemas/Pty"
  18963. }
  18964. },
  18965. "required": ["info"],
  18966. "additionalProperties": false
  18967. }
  18968. },
  18969. "required": ["id", "type", "properties"],
  18970. "additionalProperties": false
  18971. },
  18972. "EventPtyExited": {
  18973. "type": "object",
  18974. "properties": {
  18975. "id": {
  18976. "type": "string"
  18977. },
  18978. "type": {
  18979. "type": "string",
  18980. "enum": ["pty.exited"]
  18981. },
  18982. "properties": {
  18983. "type": "object",
  18984. "properties": {
  18985. "id": {
  18986. "type": "string",
  18987. "pattern": "^pty"
  18988. },
  18989. "exitCode": {
  18990. "type": "integer",
  18991. "minimum": 0
  18992. }
  18993. },
  18994. "required": ["id", "exitCode"],
  18995. "additionalProperties": false
  18996. }
  18997. },
  18998. "required": ["id", "type", "properties"],
  18999. "additionalProperties": false
  19000. },
  19001. "EventPtyDeleted": {
  19002. "type": "object",
  19003. "properties": {
  19004. "id": {
  19005. "type": "string"
  19006. },
  19007. "type": {
  19008. "type": "string",
  19009. "enum": ["pty.deleted"]
  19010. },
  19011. "properties": {
  19012. "type": "object",
  19013. "properties": {
  19014. "id": {
  19015. "type": "string",
  19016. "pattern": "^pty"
  19017. }
  19018. },
  19019. "required": ["id"],
  19020. "additionalProperties": false
  19021. }
  19022. },
  19023. "required": ["id", "type", "properties"],
  19024. "additionalProperties": false
  19025. },
  19026. "EventInstallationUpdated": {
  19027. "type": "object",
  19028. "properties": {
  19029. "id": {
  19030. "type": "string"
  19031. },
  19032. "type": {
  19033. "type": "string",
  19034. "enum": ["installation.updated"]
  19035. },
  19036. "properties": {
  19037. "type": "object",
  19038. "properties": {
  19039. "version": {
  19040. "type": "string"
  19041. }
  19042. },
  19043. "required": ["version"],
  19044. "additionalProperties": false
  19045. }
  19046. },
  19047. "required": ["id", "type", "properties"],
  19048. "additionalProperties": false
  19049. },
  19050. "EventInstallationUpdate-available": {
  19051. "type": "object",
  19052. "properties": {
  19053. "id": {
  19054. "type": "string"
  19055. },
  19056. "type": {
  19057. "type": "string",
  19058. "enum": ["installation.update-available"]
  19059. },
  19060. "properties": {
  19061. "type": "object",
  19062. "properties": {
  19063. "version": {
  19064. "type": "string"
  19065. }
  19066. },
  19067. "required": ["version"],
  19068. "additionalProperties": false
  19069. }
  19070. },
  19071. "required": ["id", "type", "properties"],
  19072. "additionalProperties": false
  19073. },
  19074. "EventMessageUpdated": {
  19075. "type": "object",
  19076. "properties": {
  19077. "id": {
  19078. "type": "string"
  19079. },
  19080. "type": {
  19081. "type": "string",
  19082. "enum": ["message.updated"]
  19083. },
  19084. "properties": {
  19085. "type": "object",
  19086. "properties": {
  19087. "sessionID": {
  19088. "type": "string",
  19089. "pattern": "^ses"
  19090. },
  19091. "info": {
  19092. "$ref": "#/components/schemas/Message"
  19093. }
  19094. },
  19095. "required": ["sessionID", "info"],
  19096. "additionalProperties": false
  19097. }
  19098. },
  19099. "required": ["id", "type", "properties"],
  19100. "additionalProperties": false
  19101. },
  19102. "EventMessageRemoved": {
  19103. "type": "object",
  19104. "properties": {
  19105. "id": {
  19106. "type": "string"
  19107. },
  19108. "type": {
  19109. "type": "string",
  19110. "enum": ["message.removed"]
  19111. },
  19112. "properties": {
  19113. "type": "object",
  19114. "properties": {
  19115. "sessionID": {
  19116. "type": "string",
  19117. "pattern": "^ses"
  19118. },
  19119. "messageID": {
  19120. "type": "string",
  19121. "pattern": "^msg"
  19122. }
  19123. },
  19124. "required": ["sessionID", "messageID"],
  19125. "additionalProperties": false
  19126. }
  19127. },
  19128. "required": ["id", "type", "properties"],
  19129. "additionalProperties": false
  19130. },
  19131. "EventMessagePartUpdated": {
  19132. "type": "object",
  19133. "properties": {
  19134. "id": {
  19135. "type": "string"
  19136. },
  19137. "type": {
  19138. "type": "string",
  19139. "enum": ["message.part.updated"]
  19140. },
  19141. "properties": {
  19142. "type": "object",
  19143. "properties": {
  19144. "sessionID": {
  19145. "type": "string",
  19146. "pattern": "^ses"
  19147. },
  19148. "part": {
  19149. "$ref": "#/components/schemas/Part"
  19150. },
  19151. "time": {
  19152. "type": "integer",
  19153. "minimum": 0
  19154. }
  19155. },
  19156. "required": ["sessionID", "part", "time"],
  19157. "additionalProperties": false
  19158. }
  19159. },
  19160. "required": ["id", "type", "properties"],
  19161. "additionalProperties": false
  19162. },
  19163. "EventMessagePartRemoved": {
  19164. "type": "object",
  19165. "properties": {
  19166. "id": {
  19167. "type": "string"
  19168. },
  19169. "type": {
  19170. "type": "string",
  19171. "enum": ["message.part.removed"]
  19172. },
  19173. "properties": {
  19174. "type": "object",
  19175. "properties": {
  19176. "sessionID": {
  19177. "type": "string",
  19178. "pattern": "^ses"
  19179. },
  19180. "messageID": {
  19181. "type": "string",
  19182. "pattern": "^msg"
  19183. },
  19184. "partID": {
  19185. "type": "string",
  19186. "pattern": "^prt"
  19187. }
  19188. },
  19189. "required": ["sessionID", "messageID", "partID"],
  19190. "additionalProperties": false
  19191. }
  19192. },
  19193. "required": ["id", "type", "properties"],
  19194. "additionalProperties": false
  19195. },
  19196. "EventSessionCreated": {
  19197. "type": "object",
  19198. "properties": {
  19199. "id": {
  19200. "type": "string"
  19201. },
  19202. "type": {
  19203. "type": "string",
  19204. "enum": ["session.created"]
  19205. },
  19206. "properties": {
  19207. "type": "object",
  19208. "properties": {
  19209. "sessionID": {
  19210. "type": "string",
  19211. "pattern": "^ses"
  19212. },
  19213. "info": {
  19214. "$ref": "#/components/schemas/Session"
  19215. }
  19216. },
  19217. "required": ["sessionID", "info"],
  19218. "additionalProperties": false
  19219. }
  19220. },
  19221. "required": ["id", "type", "properties"],
  19222. "additionalProperties": false
  19223. },
  19224. "EventSessionUpdated": {
  19225. "type": "object",
  19226. "properties": {
  19227. "id": {
  19228. "type": "string"
  19229. },
  19230. "type": {
  19231. "type": "string",
  19232. "enum": ["session.updated"]
  19233. },
  19234. "properties": {
  19235. "type": "object",
  19236. "properties": {
  19237. "sessionID": {
  19238. "type": "string",
  19239. "pattern": "^ses"
  19240. },
  19241. "info": {
  19242. "$ref": "#/components/schemas/Session"
  19243. }
  19244. },
  19245. "required": ["sessionID", "info"],
  19246. "additionalProperties": false
  19247. }
  19248. },
  19249. "required": ["id", "type", "properties"],
  19250. "additionalProperties": false
  19251. },
  19252. "EventSessionDeleted": {
  19253. "type": "object",
  19254. "properties": {
  19255. "id": {
  19256. "type": "string"
  19257. },
  19258. "type": {
  19259. "type": "string",
  19260. "enum": ["session.deleted"]
  19261. },
  19262. "properties": {
  19263. "type": "object",
  19264. "properties": {
  19265. "sessionID": {
  19266. "type": "string",
  19267. "pattern": "^ses"
  19268. },
  19269. "info": {
  19270. "$ref": "#/components/schemas/Session"
  19271. }
  19272. },
  19273. "required": ["sessionID", "info"],
  19274. "additionalProperties": false
  19275. }
  19276. },
  19277. "required": ["id", "type", "properties"],
  19278. "additionalProperties": false
  19279. },
  19280. "EventSessionNextAgentSwitched": {
  19281. "type": "object",
  19282. "properties": {
  19283. "id": {
  19284. "type": "string"
  19285. },
  19286. "type": {
  19287. "type": "string",
  19288. "enum": ["session.next.agent.switched"]
  19289. },
  19290. "properties": {
  19291. "type": "object",
  19292. "properties": {
  19293. "timestamp": {
  19294. "type": "number"
  19295. },
  19296. "sessionID": {
  19297. "type": "string",
  19298. "pattern": "^ses"
  19299. },
  19300. "agent": {
  19301. "type": "string"
  19302. }
  19303. },
  19304. "required": ["timestamp", "sessionID", "agent"],
  19305. "additionalProperties": false
  19306. }
  19307. },
  19308. "required": ["id", "type", "properties"],
  19309. "additionalProperties": false
  19310. },
  19311. "EventSessionNextModelSwitched": {
  19312. "type": "object",
  19313. "properties": {
  19314. "id": {
  19315. "type": "string"
  19316. },
  19317. "type": {
  19318. "type": "string",
  19319. "enum": ["session.next.model.switched"]
  19320. },
  19321. "properties": {
  19322. "type": "object",
  19323. "properties": {
  19324. "timestamp": {
  19325. "type": "number"
  19326. },
  19327. "sessionID": {
  19328. "type": "string",
  19329. "pattern": "^ses"
  19330. },
  19331. "model": {
  19332. "type": "object",
  19333. "properties": {
  19334. "id": {
  19335. "type": "string"
  19336. },
  19337. "providerID": {
  19338. "type": "string"
  19339. },
  19340. "variant": {
  19341. "type": "string"
  19342. }
  19343. },
  19344. "required": ["id", "providerID"],
  19345. "additionalProperties": false
  19346. }
  19347. },
  19348. "required": ["timestamp", "sessionID", "model"],
  19349. "additionalProperties": false
  19350. }
  19351. },
  19352. "required": ["id", "type", "properties"],
  19353. "additionalProperties": false
  19354. },
  19355. "PromptSource": {
  19356. "type": "object",
  19357. "properties": {
  19358. "start": {
  19359. "type": "number"
  19360. },
  19361. "end": {
  19362. "type": "number"
  19363. },
  19364. "text": {
  19365. "type": "string"
  19366. }
  19367. },
  19368. "required": ["start", "end", "text"],
  19369. "additionalProperties": false
  19370. },
  19371. "PromptFileAttachment": {
  19372. "type": "object",
  19373. "properties": {
  19374. "uri": {
  19375. "type": "string"
  19376. },
  19377. "mime": {
  19378. "type": "string"
  19379. },
  19380. "name": {
  19381. "type": "string"
  19382. },
  19383. "description": {
  19384. "type": "string"
  19385. },
  19386. "source": {
  19387. "$ref": "#/components/schemas/PromptSource"
  19388. }
  19389. },
  19390. "required": ["uri", "mime"],
  19391. "additionalProperties": false
  19392. },
  19393. "PromptAgentAttachment": {
  19394. "type": "object",
  19395. "properties": {
  19396. "name": {
  19397. "type": "string"
  19398. },
  19399. "source": {
  19400. "$ref": "#/components/schemas/PromptSource"
  19401. }
  19402. },
  19403. "required": ["name"],
  19404. "additionalProperties": false
  19405. },
  19406. "PromptReferenceAttachment": {
  19407. "type": "object",
  19408. "properties": {
  19409. "name": {
  19410. "type": "string"
  19411. },
  19412. "kind": {
  19413. "type": "string",
  19414. "enum": ["local", "git", "invalid"]
  19415. },
  19416. "uri": {
  19417. "type": "string"
  19418. },
  19419. "repository": {
  19420. "type": "string"
  19421. },
  19422. "branch": {
  19423. "type": "string"
  19424. },
  19425. "target": {
  19426. "type": "string"
  19427. },
  19428. "targetUri": {
  19429. "type": "string"
  19430. },
  19431. "problem": {
  19432. "type": "string"
  19433. },
  19434. "source": {
  19435. "$ref": "#/components/schemas/PromptSource"
  19436. }
  19437. },
  19438. "required": ["name", "kind"],
  19439. "additionalProperties": false
  19440. },
  19441. "EventSessionNextPrompted": {
  19442. "type": "object",
  19443. "properties": {
  19444. "id": {
  19445. "type": "string"
  19446. },
  19447. "type": {
  19448. "type": "string",
  19449. "enum": ["session.next.prompted"]
  19450. },
  19451. "properties": {
  19452. "type": "object",
  19453. "properties": {
  19454. "timestamp": {
  19455. "type": "number"
  19456. },
  19457. "sessionID": {
  19458. "type": "string",
  19459. "pattern": "^ses"
  19460. },
  19461. "prompt": {
  19462. "$ref": "#/components/schemas/Prompt"
  19463. }
  19464. },
  19465. "required": ["timestamp", "sessionID", "prompt"],
  19466. "additionalProperties": false
  19467. }
  19468. },
  19469. "required": ["id", "type", "properties"],
  19470. "additionalProperties": false
  19471. },
  19472. "EventSessionNextSynthetic": {
  19473. "type": "object",
  19474. "properties": {
  19475. "id": {
  19476. "type": "string"
  19477. },
  19478. "type": {
  19479. "type": "string",
  19480. "enum": ["session.next.synthetic"]
  19481. },
  19482. "properties": {
  19483. "type": "object",
  19484. "properties": {
  19485. "timestamp": {
  19486. "type": "number"
  19487. },
  19488. "sessionID": {
  19489. "type": "string",
  19490. "pattern": "^ses"
  19491. },
  19492. "text": {
  19493. "type": "string"
  19494. }
  19495. },
  19496. "required": ["timestamp", "sessionID", "text"],
  19497. "additionalProperties": false
  19498. }
  19499. },
  19500. "required": ["id", "type", "properties"],
  19501. "additionalProperties": false
  19502. },
  19503. "EventSessionNextShellStarted": {
  19504. "type": "object",
  19505. "properties": {
  19506. "id": {
  19507. "type": "string"
  19508. },
  19509. "type": {
  19510. "type": "string",
  19511. "enum": ["session.next.shell.started"]
  19512. },
  19513. "properties": {
  19514. "type": "object",
  19515. "properties": {
  19516. "timestamp": {
  19517. "type": "number"
  19518. },
  19519. "sessionID": {
  19520. "type": "string",
  19521. "pattern": "^ses"
  19522. },
  19523. "callID": {
  19524. "type": "string"
  19525. },
  19526. "command": {
  19527. "type": "string"
  19528. }
  19529. },
  19530. "required": ["timestamp", "sessionID", "callID", "command"],
  19531. "additionalProperties": false
  19532. }
  19533. },
  19534. "required": ["id", "type", "properties"],
  19535. "additionalProperties": false
  19536. },
  19537. "EventSessionNextShellEnded": {
  19538. "type": "object",
  19539. "properties": {
  19540. "id": {
  19541. "type": "string"
  19542. },
  19543. "type": {
  19544. "type": "string",
  19545. "enum": ["session.next.shell.ended"]
  19546. },
  19547. "properties": {
  19548. "type": "object",
  19549. "properties": {
  19550. "timestamp": {
  19551. "type": "number"
  19552. },
  19553. "sessionID": {
  19554. "type": "string",
  19555. "pattern": "^ses"
  19556. },
  19557. "callID": {
  19558. "type": "string"
  19559. },
  19560. "output": {
  19561. "type": "string"
  19562. }
  19563. },
  19564. "required": ["timestamp", "sessionID", "callID", "output"],
  19565. "additionalProperties": false
  19566. }
  19567. },
  19568. "required": ["id", "type", "properties"],
  19569. "additionalProperties": false
  19570. },
  19571. "EventSessionNextStepStarted": {
  19572. "type": "object",
  19573. "properties": {
  19574. "id": {
  19575. "type": "string"
  19576. },
  19577. "type": {
  19578. "type": "string",
  19579. "enum": ["session.next.step.started"]
  19580. },
  19581. "properties": {
  19582. "type": "object",
  19583. "properties": {
  19584. "timestamp": {
  19585. "type": "number"
  19586. },
  19587. "sessionID": {
  19588. "type": "string",
  19589. "pattern": "^ses"
  19590. },
  19591. "agent": {
  19592. "type": "string"
  19593. },
  19594. "model": {
  19595. "type": "object",
  19596. "properties": {
  19597. "id": {
  19598. "type": "string"
  19599. },
  19600. "providerID": {
  19601. "type": "string"
  19602. },
  19603. "variant": {
  19604. "type": "string"
  19605. }
  19606. },
  19607. "required": ["id", "providerID"],
  19608. "additionalProperties": false
  19609. },
  19610. "snapshot": {
  19611. "type": "string"
  19612. }
  19613. },
  19614. "required": ["timestamp", "sessionID", "agent", "model"],
  19615. "additionalProperties": false
  19616. }
  19617. },
  19618. "required": ["id", "type", "properties"],
  19619. "additionalProperties": false
  19620. },
  19621. "EventSessionNextStepEnded": {
  19622. "type": "object",
  19623. "properties": {
  19624. "id": {
  19625. "type": "string"
  19626. },
  19627. "type": {
  19628. "type": "string",
  19629. "enum": ["session.next.step.ended"]
  19630. },
  19631. "properties": {
  19632. "type": "object",
  19633. "properties": {
  19634. "timestamp": {
  19635. "type": "number"
  19636. },
  19637. "sessionID": {
  19638. "type": "string",
  19639. "pattern": "^ses"
  19640. },
  19641. "finish": {
  19642. "type": "string"
  19643. },
  19644. "cost": {
  19645. "type": "number"
  19646. },
  19647. "tokens": {
  19648. "type": "object",
  19649. "properties": {
  19650. "input": {
  19651. "type": "number"
  19652. },
  19653. "output": {
  19654. "type": "number"
  19655. },
  19656. "reasoning": {
  19657. "type": "number"
  19658. },
  19659. "cache": {
  19660. "type": "object",
  19661. "properties": {
  19662. "read": {
  19663. "type": "number"
  19664. },
  19665. "write": {
  19666. "type": "number"
  19667. }
  19668. },
  19669. "required": ["read", "write"],
  19670. "additionalProperties": false
  19671. }
  19672. },
  19673. "required": ["input", "output", "reasoning", "cache"],
  19674. "additionalProperties": false
  19675. },
  19676. "snapshot": {
  19677. "type": "string"
  19678. }
  19679. },
  19680. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19681. "additionalProperties": false
  19682. }
  19683. },
  19684. "required": ["id", "type", "properties"],
  19685. "additionalProperties": false
  19686. },
  19687. "SessionErrorUnknown": {
  19688. "type": "object",
  19689. "properties": {
  19690. "type": {
  19691. "type": "string",
  19692. "enum": ["unknown"]
  19693. },
  19694. "message": {
  19695. "type": "string"
  19696. }
  19697. },
  19698. "required": ["type", "message"],
  19699. "additionalProperties": false
  19700. },
  19701. "EventSessionNextStepFailed": {
  19702. "type": "object",
  19703. "properties": {
  19704. "id": {
  19705. "type": "string"
  19706. },
  19707. "type": {
  19708. "type": "string",
  19709. "enum": ["session.next.step.failed"]
  19710. },
  19711. "properties": {
  19712. "type": "object",
  19713. "properties": {
  19714. "timestamp": {
  19715. "type": "number"
  19716. },
  19717. "sessionID": {
  19718. "type": "string",
  19719. "pattern": "^ses"
  19720. },
  19721. "error": {
  19722. "$ref": "#/components/schemas/SessionErrorUnknown"
  19723. }
  19724. },
  19725. "required": ["timestamp", "sessionID", "error"],
  19726. "additionalProperties": false
  19727. }
  19728. },
  19729. "required": ["id", "type", "properties"],
  19730. "additionalProperties": false
  19731. },
  19732. "EventSessionNextTextStarted": {
  19733. "type": "object",
  19734. "properties": {
  19735. "id": {
  19736. "type": "string"
  19737. },
  19738. "type": {
  19739. "type": "string",
  19740. "enum": ["session.next.text.started"]
  19741. },
  19742. "properties": {
  19743. "type": "object",
  19744. "properties": {
  19745. "timestamp": {
  19746. "type": "number"
  19747. },
  19748. "sessionID": {
  19749. "type": "string",
  19750. "pattern": "^ses"
  19751. }
  19752. },
  19753. "required": ["timestamp", "sessionID"],
  19754. "additionalProperties": false
  19755. }
  19756. },
  19757. "required": ["id", "type", "properties"],
  19758. "additionalProperties": false
  19759. },
  19760. "EventSessionNextTextDelta": {
  19761. "type": "object",
  19762. "properties": {
  19763. "id": {
  19764. "type": "string"
  19765. },
  19766. "type": {
  19767. "type": "string",
  19768. "enum": ["session.next.text.delta"]
  19769. },
  19770. "properties": {
  19771. "type": "object",
  19772. "properties": {
  19773. "timestamp": {
  19774. "type": "number"
  19775. },
  19776. "sessionID": {
  19777. "type": "string",
  19778. "pattern": "^ses"
  19779. },
  19780. "delta": {
  19781. "type": "string"
  19782. }
  19783. },
  19784. "required": ["timestamp", "sessionID", "delta"],
  19785. "additionalProperties": false
  19786. }
  19787. },
  19788. "required": ["id", "type", "properties"],
  19789. "additionalProperties": false
  19790. },
  19791. "EventSessionNextTextEnded": {
  19792. "type": "object",
  19793. "properties": {
  19794. "id": {
  19795. "type": "string"
  19796. },
  19797. "type": {
  19798. "type": "string",
  19799. "enum": ["session.next.text.ended"]
  19800. },
  19801. "properties": {
  19802. "type": "object",
  19803. "properties": {
  19804. "timestamp": {
  19805. "type": "number"
  19806. },
  19807. "sessionID": {
  19808. "type": "string",
  19809. "pattern": "^ses"
  19810. },
  19811. "text": {
  19812. "type": "string"
  19813. }
  19814. },
  19815. "required": ["timestamp", "sessionID", "text"],
  19816. "additionalProperties": false
  19817. }
  19818. },
  19819. "required": ["id", "type", "properties"],
  19820. "additionalProperties": false
  19821. },
  19822. "EventSessionNextReasoningStarted": {
  19823. "type": "object",
  19824. "properties": {
  19825. "id": {
  19826. "type": "string"
  19827. },
  19828. "type": {
  19829. "type": "string",
  19830. "enum": ["session.next.reasoning.started"]
  19831. },
  19832. "properties": {
  19833. "type": "object",
  19834. "properties": {
  19835. "timestamp": {
  19836. "type": "number"
  19837. },
  19838. "sessionID": {
  19839. "type": "string",
  19840. "pattern": "^ses"
  19841. },
  19842. "reasoningID": {
  19843. "type": "string"
  19844. }
  19845. },
  19846. "required": ["timestamp", "sessionID", "reasoningID"],
  19847. "additionalProperties": false
  19848. }
  19849. },
  19850. "required": ["id", "type", "properties"],
  19851. "additionalProperties": false
  19852. },
  19853. "EventSessionNextReasoningDelta": {
  19854. "type": "object",
  19855. "properties": {
  19856. "id": {
  19857. "type": "string"
  19858. },
  19859. "type": {
  19860. "type": "string",
  19861. "enum": ["session.next.reasoning.delta"]
  19862. },
  19863. "properties": {
  19864. "type": "object",
  19865. "properties": {
  19866. "timestamp": {
  19867. "type": "number"
  19868. },
  19869. "sessionID": {
  19870. "type": "string",
  19871. "pattern": "^ses"
  19872. },
  19873. "reasoningID": {
  19874. "type": "string"
  19875. },
  19876. "delta": {
  19877. "type": "string"
  19878. }
  19879. },
  19880. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19881. "additionalProperties": false
  19882. }
  19883. },
  19884. "required": ["id", "type", "properties"],
  19885. "additionalProperties": false
  19886. },
  19887. "EventSessionNextReasoningEnded": {
  19888. "type": "object",
  19889. "properties": {
  19890. "id": {
  19891. "type": "string"
  19892. },
  19893. "type": {
  19894. "type": "string",
  19895. "enum": ["session.next.reasoning.ended"]
  19896. },
  19897. "properties": {
  19898. "type": "object",
  19899. "properties": {
  19900. "timestamp": {
  19901. "type": "number"
  19902. },
  19903. "sessionID": {
  19904. "type": "string",
  19905. "pattern": "^ses"
  19906. },
  19907. "reasoningID": {
  19908. "type": "string"
  19909. },
  19910. "text": {
  19911. "type": "string"
  19912. }
  19913. },
  19914. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19915. "additionalProperties": false
  19916. }
  19917. },
  19918. "required": ["id", "type", "properties"],
  19919. "additionalProperties": false
  19920. },
  19921. "EventSessionNextToolInputStarted": {
  19922. "type": "object",
  19923. "properties": {
  19924. "id": {
  19925. "type": "string"
  19926. },
  19927. "type": {
  19928. "type": "string",
  19929. "enum": ["session.next.tool.input.started"]
  19930. },
  19931. "properties": {
  19932. "type": "object",
  19933. "properties": {
  19934. "timestamp": {
  19935. "type": "number"
  19936. },
  19937. "sessionID": {
  19938. "type": "string",
  19939. "pattern": "^ses"
  19940. },
  19941. "callID": {
  19942. "type": "string"
  19943. },
  19944. "name": {
  19945. "type": "string"
  19946. }
  19947. },
  19948. "required": ["timestamp", "sessionID", "callID", "name"],
  19949. "additionalProperties": false
  19950. }
  19951. },
  19952. "required": ["id", "type", "properties"],
  19953. "additionalProperties": false
  19954. },
  19955. "EventSessionNextToolInputDelta": {
  19956. "type": "object",
  19957. "properties": {
  19958. "id": {
  19959. "type": "string"
  19960. },
  19961. "type": {
  19962. "type": "string",
  19963. "enum": ["session.next.tool.input.delta"]
  19964. },
  19965. "properties": {
  19966. "type": "object",
  19967. "properties": {
  19968. "timestamp": {
  19969. "type": "number"
  19970. },
  19971. "sessionID": {
  19972. "type": "string",
  19973. "pattern": "^ses"
  19974. },
  19975. "callID": {
  19976. "type": "string"
  19977. },
  19978. "delta": {
  19979. "type": "string"
  19980. }
  19981. },
  19982. "required": ["timestamp", "sessionID", "callID", "delta"],
  19983. "additionalProperties": false
  19984. }
  19985. },
  19986. "required": ["id", "type", "properties"],
  19987. "additionalProperties": false
  19988. },
  19989. "EventSessionNextToolInputEnded": {
  19990. "type": "object",
  19991. "properties": {
  19992. "id": {
  19993. "type": "string"
  19994. },
  19995. "type": {
  19996. "type": "string",
  19997. "enum": ["session.next.tool.input.ended"]
  19998. },
  19999. "properties": {
  20000. "type": "object",
  20001. "properties": {
  20002. "timestamp": {
  20003. "type": "number"
  20004. },
  20005. "sessionID": {
  20006. "type": "string",
  20007. "pattern": "^ses"
  20008. },
  20009. "callID": {
  20010. "type": "string"
  20011. },
  20012. "text": {
  20013. "type": "string"
  20014. }
  20015. },
  20016. "required": ["timestamp", "sessionID", "callID", "text"],
  20017. "additionalProperties": false
  20018. }
  20019. },
  20020. "required": ["id", "type", "properties"],
  20021. "additionalProperties": false
  20022. },
  20023. "EventSessionNextToolCalled": {
  20024. "type": "object",
  20025. "properties": {
  20026. "id": {
  20027. "type": "string"
  20028. },
  20029. "type": {
  20030. "type": "string",
  20031. "enum": ["session.next.tool.called"]
  20032. },
  20033. "properties": {
  20034. "type": "object",
  20035. "properties": {
  20036. "timestamp": {
  20037. "type": "number"
  20038. },
  20039. "sessionID": {
  20040. "type": "string",
  20041. "pattern": "^ses"
  20042. },
  20043. "callID": {
  20044. "type": "string"
  20045. },
  20046. "tool": {
  20047. "type": "string"
  20048. },
  20049. "input": {
  20050. "type": "object"
  20051. },
  20052. "provider": {
  20053. "type": "object",
  20054. "properties": {
  20055. "executed": {
  20056. "type": "boolean"
  20057. },
  20058. "metadata": {
  20059. "type": "object"
  20060. }
  20061. },
  20062. "required": ["executed"],
  20063. "additionalProperties": false
  20064. }
  20065. },
  20066. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  20067. "additionalProperties": false
  20068. }
  20069. },
  20070. "required": ["id", "type", "properties"],
  20071. "additionalProperties": false
  20072. },
  20073. "ToolTextContent": {
  20074. "type": "object",
  20075. "properties": {
  20076. "type": {
  20077. "type": "string",
  20078. "enum": ["text"]
  20079. },
  20080. "text": {
  20081. "type": "string"
  20082. }
  20083. },
  20084. "required": ["type", "text"],
  20085. "additionalProperties": false
  20086. },
  20087. "ToolFileContent": {
  20088. "type": "object",
  20089. "properties": {
  20090. "type": {
  20091. "type": "string",
  20092. "enum": ["file"]
  20093. },
  20094. "uri": {
  20095. "type": "string"
  20096. },
  20097. "mime": {
  20098. "type": "string"
  20099. },
  20100. "name": {
  20101. "type": "string"
  20102. }
  20103. },
  20104. "required": ["type", "uri", "mime"],
  20105. "additionalProperties": false
  20106. },
  20107. "EventSessionNextToolProgress": {
  20108. "type": "object",
  20109. "properties": {
  20110. "id": {
  20111. "type": "string"
  20112. },
  20113. "type": {
  20114. "type": "string",
  20115. "enum": ["session.next.tool.progress"]
  20116. },
  20117. "properties": {
  20118. "type": "object",
  20119. "properties": {
  20120. "timestamp": {
  20121. "type": "number"
  20122. },
  20123. "sessionID": {
  20124. "type": "string",
  20125. "pattern": "^ses"
  20126. },
  20127. "callID": {
  20128. "type": "string"
  20129. },
  20130. "structured": {
  20131. "type": "object"
  20132. },
  20133. "content": {
  20134. "type": "array",
  20135. "items": {
  20136. "anyOf": [
  20137. {
  20138. "$ref": "#/components/schemas/ToolTextContent"
  20139. },
  20140. {
  20141. "$ref": "#/components/schemas/ToolFileContent"
  20142. }
  20143. ]
  20144. }
  20145. }
  20146. },
  20147. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20148. "additionalProperties": false
  20149. }
  20150. },
  20151. "required": ["id", "type", "properties"],
  20152. "additionalProperties": false
  20153. },
  20154. "EventSessionNextToolSuccess": {
  20155. "type": "object",
  20156. "properties": {
  20157. "id": {
  20158. "type": "string"
  20159. },
  20160. "type": {
  20161. "type": "string",
  20162. "enum": ["session.next.tool.success"]
  20163. },
  20164. "properties": {
  20165. "type": "object",
  20166. "properties": {
  20167. "timestamp": {
  20168. "type": "number"
  20169. },
  20170. "sessionID": {
  20171. "type": "string",
  20172. "pattern": "^ses"
  20173. },
  20174. "callID": {
  20175. "type": "string"
  20176. },
  20177. "structured": {
  20178. "type": "object"
  20179. },
  20180. "content": {
  20181. "type": "array",
  20182. "items": {
  20183. "anyOf": [
  20184. {
  20185. "$ref": "#/components/schemas/ToolTextContent"
  20186. },
  20187. {
  20188. "$ref": "#/components/schemas/ToolFileContent"
  20189. }
  20190. ]
  20191. }
  20192. },
  20193. "provider": {
  20194. "type": "object",
  20195. "properties": {
  20196. "executed": {
  20197. "type": "boolean"
  20198. },
  20199. "metadata": {
  20200. "type": "object"
  20201. }
  20202. },
  20203. "required": ["executed"],
  20204. "additionalProperties": false
  20205. }
  20206. },
  20207. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20208. "additionalProperties": false
  20209. }
  20210. },
  20211. "required": ["id", "type", "properties"],
  20212. "additionalProperties": false
  20213. },
  20214. "EventSessionNextToolFailed": {
  20215. "type": "object",
  20216. "properties": {
  20217. "id": {
  20218. "type": "string"
  20219. },
  20220. "type": {
  20221. "type": "string",
  20222. "enum": ["session.next.tool.failed"]
  20223. },
  20224. "properties": {
  20225. "type": "object",
  20226. "properties": {
  20227. "timestamp": {
  20228. "type": "number"
  20229. },
  20230. "sessionID": {
  20231. "type": "string",
  20232. "pattern": "^ses"
  20233. },
  20234. "callID": {
  20235. "type": "string"
  20236. },
  20237. "error": {
  20238. "$ref": "#/components/schemas/SessionErrorUnknown"
  20239. },
  20240. "provider": {
  20241. "type": "object",
  20242. "properties": {
  20243. "executed": {
  20244. "type": "boolean"
  20245. },
  20246. "metadata": {
  20247. "type": "object"
  20248. }
  20249. },
  20250. "required": ["executed"],
  20251. "additionalProperties": false
  20252. }
  20253. },
  20254. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20255. "additionalProperties": false
  20256. }
  20257. },
  20258. "required": ["id", "type", "properties"],
  20259. "additionalProperties": false
  20260. },
  20261. "SessionNextRetry_error": {
  20262. "type": "object",
  20263. "properties": {
  20264. "message": {
  20265. "type": "string"
  20266. },
  20267. "statusCode": {
  20268. "type": "number"
  20269. },
  20270. "isRetryable": {
  20271. "type": "boolean"
  20272. },
  20273. "responseHeaders": {
  20274. "type": "object",
  20275. "additionalProperties": {
  20276. "type": "string"
  20277. }
  20278. },
  20279. "responseBody": {
  20280. "type": "string"
  20281. },
  20282. "metadata": {
  20283. "type": "object",
  20284. "additionalProperties": {
  20285. "type": "string"
  20286. }
  20287. }
  20288. },
  20289. "required": ["message", "isRetryable"],
  20290. "additionalProperties": false
  20291. },
  20292. "EventSessionNextRetried": {
  20293. "type": "object",
  20294. "properties": {
  20295. "id": {
  20296. "type": "string"
  20297. },
  20298. "type": {
  20299. "type": "string",
  20300. "enum": ["session.next.retried"]
  20301. },
  20302. "properties": {
  20303. "type": "object",
  20304. "properties": {
  20305. "timestamp": {
  20306. "type": "number"
  20307. },
  20308. "sessionID": {
  20309. "type": "string",
  20310. "pattern": "^ses"
  20311. },
  20312. "attempt": {
  20313. "type": "number"
  20314. },
  20315. "error": {
  20316. "$ref": "#/components/schemas/SessionNextRetry_error"
  20317. }
  20318. },
  20319. "required": ["timestamp", "sessionID", "attempt", "error"],
  20320. "additionalProperties": false
  20321. }
  20322. },
  20323. "required": ["id", "type", "properties"],
  20324. "additionalProperties": false
  20325. },
  20326. "EventSessionNextCompactionStarted": {
  20327. "type": "object",
  20328. "properties": {
  20329. "id": {
  20330. "type": "string"
  20331. },
  20332. "type": {
  20333. "type": "string",
  20334. "enum": ["session.next.compaction.started"]
  20335. },
  20336. "properties": {
  20337. "type": "object",
  20338. "properties": {
  20339. "timestamp": {
  20340. "type": "number"
  20341. },
  20342. "sessionID": {
  20343. "type": "string",
  20344. "pattern": "^ses"
  20345. },
  20346. "reason": {
  20347. "type": "string",
  20348. "enum": ["auto", "manual"]
  20349. }
  20350. },
  20351. "required": ["timestamp", "sessionID", "reason"],
  20352. "additionalProperties": false
  20353. }
  20354. },
  20355. "required": ["id", "type", "properties"],
  20356. "additionalProperties": false
  20357. },
  20358. "EventSessionNextCompactionDelta": {
  20359. "type": "object",
  20360. "properties": {
  20361. "id": {
  20362. "type": "string"
  20363. },
  20364. "type": {
  20365. "type": "string",
  20366. "enum": ["session.next.compaction.delta"]
  20367. },
  20368. "properties": {
  20369. "type": "object",
  20370. "properties": {
  20371. "timestamp": {
  20372. "type": "number"
  20373. },
  20374. "sessionID": {
  20375. "type": "string",
  20376. "pattern": "^ses"
  20377. },
  20378. "text": {
  20379. "type": "string"
  20380. }
  20381. },
  20382. "required": ["timestamp", "sessionID", "text"],
  20383. "additionalProperties": false
  20384. }
  20385. },
  20386. "required": ["id", "type", "properties"],
  20387. "additionalProperties": false
  20388. },
  20389. "EventSessionNextCompactionEnded": {
  20390. "type": "object",
  20391. "properties": {
  20392. "id": {
  20393. "type": "string"
  20394. },
  20395. "type": {
  20396. "type": "string",
  20397. "enum": ["session.next.compaction.ended"]
  20398. },
  20399. "properties": {
  20400. "type": "object",
  20401. "properties": {
  20402. "timestamp": {
  20403. "type": "number"
  20404. },
  20405. "sessionID": {
  20406. "type": "string",
  20407. "pattern": "^ses"
  20408. },
  20409. "text": {
  20410. "type": "string"
  20411. },
  20412. "include": {
  20413. "type": "string"
  20414. }
  20415. },
  20416. "required": ["timestamp", "sessionID", "text"],
  20417. "additionalProperties": false
  20418. }
  20419. },
  20420. "required": ["id", "type", "properties"],
  20421. "additionalProperties": false
  20422. },
  20423. "EventPluginAdded": {
  20424. "type": "object",
  20425. "properties": {
  20426. "id": {
  20427. "type": "string"
  20428. },
  20429. "type": {
  20430. "type": "string",
  20431. "enum": ["plugin.added"]
  20432. },
  20433. "properties": {
  20434. "type": "object",
  20435. "properties": {
  20436. "id": {
  20437. "type": "string"
  20438. }
  20439. },
  20440. "required": ["id"],
  20441. "additionalProperties": false
  20442. }
  20443. },
  20444. "required": ["id", "type", "properties"],
  20445. "additionalProperties": false
  20446. },
  20447. "ModelV2Info": {
  20448. "type": "object",
  20449. "properties": {
  20450. "id": {
  20451. "type": "string"
  20452. },
  20453. "apiID": {
  20454. "type": "string"
  20455. },
  20456. "providerID": {
  20457. "type": "string"
  20458. },
  20459. "family": {
  20460. "type": "string"
  20461. },
  20462. "name": {
  20463. "type": "string"
  20464. },
  20465. "endpoint": {
  20466. "anyOf": [
  20467. {
  20468. "type": "object",
  20469. "properties": {
  20470. "type": {
  20471. "type": "string",
  20472. "enum": ["unknown"]
  20473. }
  20474. },
  20475. "required": ["type"],
  20476. "additionalProperties": false
  20477. },
  20478. {
  20479. "type": "object",
  20480. "properties": {
  20481. "type": {
  20482. "type": "string",
  20483. "enum": ["openai/responses"]
  20484. },
  20485. "url": {
  20486. "type": "string"
  20487. },
  20488. "websocket": {
  20489. "type": "boolean"
  20490. }
  20491. },
  20492. "required": ["type", "url"],
  20493. "additionalProperties": false
  20494. },
  20495. {
  20496. "type": "object",
  20497. "properties": {
  20498. "type": {
  20499. "type": "string",
  20500. "enum": ["openai/completions"]
  20501. },
  20502. "url": {
  20503. "type": "string"
  20504. },
  20505. "reasoning": {
  20506. "anyOf": [
  20507. {
  20508. "type": "object",
  20509. "properties": {
  20510. "type": {
  20511. "type": "string",
  20512. "enum": ["reasoning_content"]
  20513. }
  20514. },
  20515. "required": ["type"],
  20516. "additionalProperties": false
  20517. },
  20518. {
  20519. "type": "object",
  20520. "properties": {
  20521. "type": {
  20522. "type": "string",
  20523. "enum": ["reasoning_details"]
  20524. }
  20525. },
  20526. "required": ["type"],
  20527. "additionalProperties": false
  20528. }
  20529. ]
  20530. }
  20531. },
  20532. "required": ["type", "url"],
  20533. "additionalProperties": false
  20534. },
  20535. {
  20536. "type": "object",
  20537. "properties": {
  20538. "type": {
  20539. "type": "string",
  20540. "enum": ["anthropic/messages"]
  20541. },
  20542. "url": {
  20543. "type": "string"
  20544. }
  20545. },
  20546. "required": ["type", "url"],
  20547. "additionalProperties": false
  20548. },
  20549. {
  20550. "type": "object",
  20551. "properties": {
  20552. "type": {
  20553. "type": "string",
  20554. "enum": ["aisdk"]
  20555. },
  20556. "package": {
  20557. "type": "string"
  20558. },
  20559. "url": {
  20560. "type": "string"
  20561. }
  20562. },
  20563. "required": ["type", "package"],
  20564. "additionalProperties": false
  20565. }
  20566. ]
  20567. },
  20568. "capabilities": {
  20569. "type": "object",
  20570. "properties": {
  20571. "tools": {
  20572. "type": "boolean"
  20573. },
  20574. "input": {
  20575. "type": "array",
  20576. "items": {
  20577. "type": "string"
  20578. }
  20579. },
  20580. "output": {
  20581. "type": "array",
  20582. "items": {
  20583. "type": "string"
  20584. }
  20585. }
  20586. },
  20587. "required": ["tools", "input", "output"],
  20588. "additionalProperties": false
  20589. },
  20590. "options": {
  20591. "type": "object",
  20592. "properties": {
  20593. "headers": {
  20594. "type": "object",
  20595. "additionalProperties": {
  20596. "type": "string"
  20597. }
  20598. },
  20599. "body": {
  20600. "type": "object"
  20601. },
  20602. "aisdk": {
  20603. "type": "object",
  20604. "properties": {
  20605. "provider": {
  20606. "type": "object"
  20607. },
  20608. "request": {
  20609. "type": "object"
  20610. }
  20611. },
  20612. "required": ["provider", "request"],
  20613. "additionalProperties": false
  20614. },
  20615. "variant": {
  20616. "type": "string"
  20617. }
  20618. },
  20619. "required": ["headers", "body", "aisdk"],
  20620. "additionalProperties": false
  20621. },
  20622. "variants": {
  20623. "type": "array",
  20624. "items": {
  20625. "type": "object",
  20626. "properties": {
  20627. "id": {
  20628. "type": "string"
  20629. },
  20630. "headers": {
  20631. "type": "object",
  20632. "additionalProperties": {
  20633. "type": "string"
  20634. }
  20635. },
  20636. "body": {
  20637. "type": "object"
  20638. },
  20639. "aisdk": {
  20640. "type": "object",
  20641. "properties": {
  20642. "provider": {
  20643. "type": "object"
  20644. },
  20645. "request": {
  20646. "type": "object"
  20647. }
  20648. },
  20649. "required": ["provider", "request"],
  20650. "additionalProperties": false
  20651. }
  20652. },
  20653. "required": ["id", "headers", "body", "aisdk"],
  20654. "additionalProperties": false
  20655. }
  20656. },
  20657. "time": {
  20658. "type": "object",
  20659. "properties": {
  20660. "released": {
  20661. "anyOf": [
  20662. {
  20663. "type": "number"
  20664. },
  20665. {
  20666. "type": "string",
  20667. "enum": ["NaN"]
  20668. },
  20669. {
  20670. "type": "string",
  20671. "enum": ["Infinity"]
  20672. },
  20673. {
  20674. "type": "string",
  20675. "enum": ["-Infinity"]
  20676. },
  20677. {
  20678. "type": "string",
  20679. "enum": ["Infinity", "-Infinity", "NaN"]
  20680. }
  20681. ]
  20682. }
  20683. },
  20684. "required": ["released"],
  20685. "additionalProperties": false
  20686. },
  20687. "cost": {
  20688. "type": "array",
  20689. "items": {
  20690. "type": "object",
  20691. "properties": {
  20692. "tier": {
  20693. "type": "object",
  20694. "properties": {
  20695. "type": {
  20696. "type": "string",
  20697. "enum": ["context"]
  20698. },
  20699. "size": {
  20700. "type": "integer"
  20701. }
  20702. },
  20703. "required": ["type", "size"],
  20704. "additionalProperties": false
  20705. },
  20706. "input": {
  20707. "type": "number"
  20708. },
  20709. "output": {
  20710. "type": "number"
  20711. },
  20712. "cache": {
  20713. "type": "object",
  20714. "properties": {
  20715. "read": {
  20716. "type": "number"
  20717. },
  20718. "write": {
  20719. "type": "number"
  20720. }
  20721. },
  20722. "required": ["read", "write"],
  20723. "additionalProperties": false
  20724. }
  20725. },
  20726. "required": ["input", "output", "cache"],
  20727. "additionalProperties": false
  20728. }
  20729. },
  20730. "status": {
  20731. "type": "string",
  20732. "enum": ["alpha", "beta", "deprecated", "active"]
  20733. },
  20734. "enabled": {
  20735. "type": "boolean"
  20736. },
  20737. "limit": {
  20738. "type": "object",
  20739. "properties": {
  20740. "context": {
  20741. "type": "integer"
  20742. },
  20743. "input": {
  20744. "type": "integer"
  20745. },
  20746. "output": {
  20747. "type": "integer"
  20748. }
  20749. },
  20750. "required": ["context", "output"],
  20751. "additionalProperties": false
  20752. }
  20753. },
  20754. "required": [
  20755. "id",
  20756. "apiID",
  20757. "providerID",
  20758. "name",
  20759. "endpoint",
  20760. "capabilities",
  20761. "options",
  20762. "variants",
  20763. "time",
  20764. "cost",
  20765. "status",
  20766. "enabled",
  20767. "limit"
  20768. ],
  20769. "additionalProperties": false
  20770. },
  20771. "EventCatalogModelUpdated": {
  20772. "type": "object",
  20773. "properties": {
  20774. "id": {
  20775. "type": "string"
  20776. },
  20777. "type": {
  20778. "type": "string",
  20779. "enum": ["catalog.model.updated"]
  20780. },
  20781. "properties": {
  20782. "type": "object",
  20783. "properties": {
  20784. "model": {
  20785. "$ref": "#/components/schemas/ModelV2Info"
  20786. }
  20787. },
  20788. "required": ["model"],
  20789. "additionalProperties": false
  20790. }
  20791. },
  20792. "required": ["id", "type", "properties"],
  20793. "additionalProperties": false
  20794. },
  20795. "EventModels-devRefreshed": {
  20796. "type": "object",
  20797. "properties": {
  20798. "id": {
  20799. "type": "string"
  20800. },
  20801. "type": {
  20802. "type": "string",
  20803. "enum": ["models-dev.refreshed"]
  20804. },
  20805. "properties": {
  20806. "type": "object",
  20807. "properties": {}
  20808. }
  20809. },
  20810. "required": ["id", "type", "properties"],
  20811. "additionalProperties": false
  20812. },
  20813. "AccountV2OAuthCredential": {
  20814. "type": "object",
  20815. "properties": {
  20816. "type": {
  20817. "type": "string",
  20818. "enum": ["oauth"]
  20819. },
  20820. "refresh": {
  20821. "type": "string"
  20822. },
  20823. "access": {
  20824. "type": "string"
  20825. },
  20826. "expires": {
  20827. "type": "integer",
  20828. "minimum": 0
  20829. }
  20830. },
  20831. "required": ["type", "refresh", "access", "expires"],
  20832. "additionalProperties": false
  20833. },
  20834. "AccountV2ApiKeyCredential": {
  20835. "type": "object",
  20836. "properties": {
  20837. "type": {
  20838. "type": "string",
  20839. "enum": ["api"]
  20840. },
  20841. "key": {
  20842. "type": "string"
  20843. },
  20844. "metadata": {
  20845. "type": "object",
  20846. "additionalProperties": {
  20847. "type": "string"
  20848. }
  20849. }
  20850. },
  20851. "required": ["type", "key"],
  20852. "additionalProperties": false
  20853. },
  20854. "AccountV2Credential": {
  20855. "anyOf": [
  20856. {
  20857. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20858. },
  20859. {
  20860. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20861. }
  20862. ]
  20863. },
  20864. "AccountV2Info": {
  20865. "type": "object",
  20866. "properties": {
  20867. "id": {
  20868. "type": "string"
  20869. },
  20870. "serviceID": {
  20871. "type": "string"
  20872. },
  20873. "description": {
  20874. "type": "string"
  20875. },
  20876. "credential": {
  20877. "$ref": "#/components/schemas/AccountV2Credential"
  20878. }
  20879. },
  20880. "required": ["id", "serviceID", "description", "credential"],
  20881. "additionalProperties": false
  20882. },
  20883. "EventAccountAdded": {
  20884. "type": "object",
  20885. "properties": {
  20886. "id": {
  20887. "type": "string"
  20888. },
  20889. "type": {
  20890. "type": "string",
  20891. "enum": ["account.added"]
  20892. },
  20893. "properties": {
  20894. "type": "object",
  20895. "properties": {
  20896. "account": {
  20897. "$ref": "#/components/schemas/AccountV2Info"
  20898. }
  20899. },
  20900. "required": ["account"],
  20901. "additionalProperties": false
  20902. }
  20903. },
  20904. "required": ["id", "type", "properties"],
  20905. "additionalProperties": false
  20906. },
  20907. "EventAccountRemoved": {
  20908. "type": "object",
  20909. "properties": {
  20910. "id": {
  20911. "type": "string"
  20912. },
  20913. "type": {
  20914. "type": "string",
  20915. "enum": ["account.removed"]
  20916. },
  20917. "properties": {
  20918. "type": "object",
  20919. "properties": {
  20920. "account": {
  20921. "$ref": "#/components/schemas/AccountV2Info"
  20922. }
  20923. },
  20924. "required": ["account"],
  20925. "additionalProperties": false
  20926. }
  20927. },
  20928. "required": ["id", "type", "properties"],
  20929. "additionalProperties": false
  20930. },
  20931. "EventAccountSwitched": {
  20932. "type": "object",
  20933. "properties": {
  20934. "id": {
  20935. "type": "string"
  20936. },
  20937. "type": {
  20938. "type": "string",
  20939. "enum": ["account.switched"]
  20940. },
  20941. "properties": {
  20942. "type": "object",
  20943. "properties": {
  20944. "serviceID": {
  20945. "type": "string"
  20946. },
  20947. "from": {
  20948. "type": "string"
  20949. },
  20950. "to": {
  20951. "type": "string"
  20952. }
  20953. },
  20954. "required": ["serviceID"],
  20955. "additionalProperties": false
  20956. }
  20957. },
  20958. "required": ["id", "type", "properties"],
  20959. "additionalProperties": false
  20960. },
  20961. "PolicyEffect": {
  20962. "type": "string",
  20963. "enum": ["allow", "deny"]
  20964. },
  20965. "ConfigV2ExperimentalPolicy": {
  20966. "type": "object",
  20967. "properties": {
  20968. "action": {
  20969. "type": "string",
  20970. "enum": ["provider.use"]
  20971. },
  20972. "effect": {
  20973. "$ref": "#/components/schemas/PolicyEffect"
  20974. },
  20975. "resource": {
  20976. "type": "string"
  20977. }
  20978. },
  20979. "required": ["action", "effect", "resource"],
  20980. "additionalProperties": false
  20981. },
  20982. "SessionInfo": {
  20983. "type": "object",
  20984. "properties": {
  20985. "id": {
  20986. "type": "string",
  20987. "pattern": "^ses"
  20988. },
  20989. "parentID": {
  20990. "type": "string",
  20991. "pattern": "^ses"
  20992. },
  20993. "projectID": {
  20994. "type": "string"
  20995. },
  20996. "workspaceID": {
  20997. "type": "string",
  20998. "pattern": "^wrk"
  20999. },
  21000. "path": {
  21001. "type": "string"
  21002. },
  21003. "agent": {
  21004. "type": "string"
  21005. },
  21006. "model": {
  21007. "type": "object",
  21008. "properties": {
  21009. "id": {
  21010. "type": "string"
  21011. },
  21012. "providerID": {
  21013. "type": "string"
  21014. },
  21015. "variant": {
  21016. "type": "string"
  21017. }
  21018. },
  21019. "required": ["id", "providerID"],
  21020. "additionalProperties": false
  21021. },
  21022. "cost": {
  21023. "type": "number"
  21024. },
  21025. "tokens": {
  21026. "type": "object",
  21027. "properties": {
  21028. "input": {
  21029. "type": "number"
  21030. },
  21031. "output": {
  21032. "type": "number"
  21033. },
  21034. "reasoning": {
  21035. "type": "number"
  21036. },
  21037. "cache": {
  21038. "type": "object",
  21039. "properties": {
  21040. "read": {
  21041. "type": "number"
  21042. },
  21043. "write": {
  21044. "type": "number"
  21045. }
  21046. },
  21047. "required": ["read", "write"],
  21048. "additionalProperties": false
  21049. }
  21050. },
  21051. "required": ["input", "output", "reasoning", "cache"],
  21052. "additionalProperties": false
  21053. },
  21054. "time": {
  21055. "type": "object",
  21056. "properties": {
  21057. "created": {
  21058. "type": "number"
  21059. },
  21060. "updated": {
  21061. "type": "number"
  21062. },
  21063. "archived": {
  21064. "type": "number"
  21065. }
  21066. },
  21067. "required": ["created", "updated"],
  21068. "additionalProperties": false
  21069. },
  21070. "title": {
  21071. "type": "string"
  21072. }
  21073. },
  21074. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  21075. "additionalProperties": false
  21076. },
  21077. "SessionDelivery": {
  21078. "type": "string",
  21079. "enum": ["immediate", "deferred"]
  21080. },
  21081. "SessionMessageAgentSwitched": {
  21082. "type": "object",
  21083. "properties": {
  21084. "id": {
  21085. "type": "string"
  21086. },
  21087. "metadata": {
  21088. "type": "object"
  21089. },
  21090. "time": {
  21091. "type": "object",
  21092. "properties": {
  21093. "created": {
  21094. "type": "number"
  21095. }
  21096. },
  21097. "required": ["created"],
  21098. "additionalProperties": false
  21099. },
  21100. "type": {
  21101. "type": "string",
  21102. "enum": ["agent-switched"]
  21103. },
  21104. "agent": {
  21105. "type": "string"
  21106. }
  21107. },
  21108. "required": ["id", "time", "type", "agent"],
  21109. "additionalProperties": false
  21110. },
  21111. "SessionMessageModelSwitched": {
  21112. "type": "object",
  21113. "properties": {
  21114. "id": {
  21115. "type": "string"
  21116. },
  21117. "metadata": {
  21118. "type": "object"
  21119. },
  21120. "time": {
  21121. "type": "object",
  21122. "properties": {
  21123. "created": {
  21124. "type": "number"
  21125. }
  21126. },
  21127. "required": ["created"],
  21128. "additionalProperties": false
  21129. },
  21130. "type": {
  21131. "type": "string",
  21132. "enum": ["model-switched"]
  21133. },
  21134. "model": {
  21135. "type": "object",
  21136. "properties": {
  21137. "id": {
  21138. "type": "string"
  21139. },
  21140. "providerID": {
  21141. "type": "string"
  21142. },
  21143. "variant": {
  21144. "type": "string"
  21145. }
  21146. },
  21147. "required": ["id", "providerID"],
  21148. "additionalProperties": false
  21149. }
  21150. },
  21151. "required": ["id", "time", "type", "model"],
  21152. "additionalProperties": false
  21153. },
  21154. "SessionMessageUser": {
  21155. "type": "object",
  21156. "properties": {
  21157. "id": {
  21158. "type": "string"
  21159. },
  21160. "metadata": {
  21161. "type": "object"
  21162. },
  21163. "time": {
  21164. "type": "object",
  21165. "properties": {
  21166. "created": {
  21167. "type": "number"
  21168. }
  21169. },
  21170. "required": ["created"],
  21171. "additionalProperties": false
  21172. },
  21173. "text": {
  21174. "type": "string"
  21175. },
  21176. "files": {
  21177. "type": "array",
  21178. "items": {
  21179. "$ref": "#/components/schemas/PromptFileAttachment"
  21180. }
  21181. },
  21182. "agents": {
  21183. "type": "array",
  21184. "items": {
  21185. "$ref": "#/components/schemas/PromptAgentAttachment"
  21186. }
  21187. },
  21188. "references": {
  21189. "type": "array",
  21190. "items": {
  21191. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21192. }
  21193. },
  21194. "type": {
  21195. "type": "string",
  21196. "enum": ["user"]
  21197. }
  21198. },
  21199. "required": ["id", "time", "text", "type"],
  21200. "additionalProperties": false
  21201. },
  21202. "SessionMessageSynthetic": {
  21203. "type": "object",
  21204. "properties": {
  21205. "id": {
  21206. "type": "string"
  21207. },
  21208. "metadata": {
  21209. "type": "object"
  21210. },
  21211. "time": {
  21212. "type": "object",
  21213. "properties": {
  21214. "created": {
  21215. "type": "number"
  21216. }
  21217. },
  21218. "required": ["created"],
  21219. "additionalProperties": false
  21220. },
  21221. "sessionID": {
  21222. "type": "string",
  21223. "pattern": "^ses"
  21224. },
  21225. "text": {
  21226. "type": "string"
  21227. },
  21228. "type": {
  21229. "type": "string",
  21230. "enum": ["synthetic"]
  21231. }
  21232. },
  21233. "required": ["id", "time", "sessionID", "text", "type"],
  21234. "additionalProperties": false
  21235. },
  21236. "SessionMessageShell": {
  21237. "type": "object",
  21238. "properties": {
  21239. "id": {
  21240. "type": "string"
  21241. },
  21242. "metadata": {
  21243. "type": "object"
  21244. },
  21245. "time": {
  21246. "type": "object",
  21247. "properties": {
  21248. "created": {
  21249. "type": "number"
  21250. },
  21251. "completed": {
  21252. "type": "number"
  21253. }
  21254. },
  21255. "required": ["created"],
  21256. "additionalProperties": false
  21257. },
  21258. "type": {
  21259. "type": "string",
  21260. "enum": ["shell"]
  21261. },
  21262. "callID": {
  21263. "type": "string"
  21264. },
  21265. "command": {
  21266. "type": "string"
  21267. },
  21268. "output": {
  21269. "type": "string"
  21270. }
  21271. },
  21272. "required": ["id", "time", "type", "callID", "command", "output"],
  21273. "additionalProperties": false
  21274. },
  21275. "SessionMessageAssistantText": {
  21276. "type": "object",
  21277. "properties": {
  21278. "type": {
  21279. "type": "string",
  21280. "enum": ["text"]
  21281. },
  21282. "text": {
  21283. "type": "string"
  21284. }
  21285. },
  21286. "required": ["type", "text"],
  21287. "additionalProperties": false
  21288. },
  21289. "SessionMessageAssistantReasoning": {
  21290. "type": "object",
  21291. "properties": {
  21292. "type": {
  21293. "type": "string",
  21294. "enum": ["reasoning"]
  21295. },
  21296. "id": {
  21297. "type": "string"
  21298. },
  21299. "text": {
  21300. "type": "string"
  21301. }
  21302. },
  21303. "required": ["type", "id", "text"],
  21304. "additionalProperties": false
  21305. },
  21306. "SessionMessageToolStatePending": {
  21307. "type": "object",
  21308. "properties": {
  21309. "status": {
  21310. "type": "string",
  21311. "enum": ["pending"]
  21312. },
  21313. "input": {
  21314. "type": "string"
  21315. }
  21316. },
  21317. "required": ["status", "input"],
  21318. "additionalProperties": false
  21319. },
  21320. "SessionMessageToolStateRunning": {
  21321. "type": "object",
  21322. "properties": {
  21323. "status": {
  21324. "type": "string",
  21325. "enum": ["running"]
  21326. },
  21327. "input": {
  21328. "type": "object"
  21329. },
  21330. "structured": {
  21331. "type": "object"
  21332. },
  21333. "content": {
  21334. "type": "array",
  21335. "items": {
  21336. "anyOf": [
  21337. {
  21338. "$ref": "#/components/schemas/ToolTextContent"
  21339. },
  21340. {
  21341. "$ref": "#/components/schemas/ToolFileContent"
  21342. }
  21343. ]
  21344. }
  21345. }
  21346. },
  21347. "required": ["status", "input", "structured", "content"],
  21348. "additionalProperties": false
  21349. },
  21350. "SessionMessageToolStateCompleted": {
  21351. "type": "object",
  21352. "properties": {
  21353. "status": {
  21354. "type": "string",
  21355. "enum": ["completed"]
  21356. },
  21357. "input": {
  21358. "type": "object"
  21359. },
  21360. "attachments": {
  21361. "type": "array",
  21362. "items": {
  21363. "$ref": "#/components/schemas/PromptFileAttachment"
  21364. }
  21365. },
  21366. "content": {
  21367. "type": "array",
  21368. "items": {
  21369. "anyOf": [
  21370. {
  21371. "$ref": "#/components/schemas/ToolTextContent"
  21372. },
  21373. {
  21374. "$ref": "#/components/schemas/ToolFileContent"
  21375. }
  21376. ]
  21377. }
  21378. },
  21379. "structured": {
  21380. "type": "object"
  21381. }
  21382. },
  21383. "required": ["status", "input", "content", "structured"],
  21384. "additionalProperties": false
  21385. },
  21386. "SessionMessageToolStateError": {
  21387. "type": "object",
  21388. "properties": {
  21389. "status": {
  21390. "type": "string",
  21391. "enum": ["error"]
  21392. },
  21393. "input": {
  21394. "type": "object"
  21395. },
  21396. "content": {
  21397. "type": "array",
  21398. "items": {
  21399. "anyOf": [
  21400. {
  21401. "$ref": "#/components/schemas/ToolTextContent"
  21402. },
  21403. {
  21404. "$ref": "#/components/schemas/ToolFileContent"
  21405. }
  21406. ]
  21407. }
  21408. },
  21409. "structured": {
  21410. "type": "object"
  21411. },
  21412. "error": {
  21413. "$ref": "#/components/schemas/SessionErrorUnknown"
  21414. }
  21415. },
  21416. "required": ["status", "input", "content", "structured", "error"],
  21417. "additionalProperties": false
  21418. },
  21419. "SessionMessageAssistantTool": {
  21420. "type": "object",
  21421. "properties": {
  21422. "type": {
  21423. "type": "string",
  21424. "enum": ["tool"]
  21425. },
  21426. "id": {
  21427. "type": "string"
  21428. },
  21429. "name": {
  21430. "type": "string"
  21431. },
  21432. "provider": {
  21433. "type": "object",
  21434. "properties": {
  21435. "executed": {
  21436. "type": "boolean"
  21437. },
  21438. "metadata": {
  21439. "type": "object"
  21440. }
  21441. },
  21442. "required": ["executed"],
  21443. "additionalProperties": false
  21444. },
  21445. "state": {
  21446. "anyOf": [
  21447. {
  21448. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21449. },
  21450. {
  21451. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21452. },
  21453. {
  21454. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21455. },
  21456. {
  21457. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21458. }
  21459. ]
  21460. },
  21461. "time": {
  21462. "type": "object",
  21463. "properties": {
  21464. "created": {
  21465. "type": "number"
  21466. },
  21467. "ran": {
  21468. "type": "number"
  21469. },
  21470. "completed": {
  21471. "type": "number"
  21472. },
  21473. "pruned": {
  21474. "type": "number"
  21475. }
  21476. },
  21477. "required": ["created"],
  21478. "additionalProperties": false
  21479. }
  21480. },
  21481. "required": ["type", "id", "name", "state", "time"],
  21482. "additionalProperties": false
  21483. },
  21484. "SessionMessageAssistant": {
  21485. "type": "object",
  21486. "properties": {
  21487. "id": {
  21488. "type": "string"
  21489. },
  21490. "metadata": {
  21491. "type": "object"
  21492. },
  21493. "time": {
  21494. "type": "object",
  21495. "properties": {
  21496. "created": {
  21497. "type": "number"
  21498. },
  21499. "completed": {
  21500. "type": "number"
  21501. }
  21502. },
  21503. "required": ["created"],
  21504. "additionalProperties": false
  21505. },
  21506. "type": {
  21507. "type": "string",
  21508. "enum": ["assistant"]
  21509. },
  21510. "agent": {
  21511. "type": "string"
  21512. },
  21513. "model": {
  21514. "type": "object",
  21515. "properties": {
  21516. "id": {
  21517. "type": "string"
  21518. },
  21519. "providerID": {
  21520. "type": "string"
  21521. },
  21522. "variant": {
  21523. "type": "string"
  21524. }
  21525. },
  21526. "required": ["id", "providerID"],
  21527. "additionalProperties": false
  21528. },
  21529. "content": {
  21530. "type": "array",
  21531. "items": {
  21532. "anyOf": [
  21533. {
  21534. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21535. },
  21536. {
  21537. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21538. },
  21539. {
  21540. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21541. }
  21542. ]
  21543. }
  21544. },
  21545. "snapshot": {
  21546. "type": "object",
  21547. "properties": {
  21548. "start": {
  21549. "type": "string"
  21550. },
  21551. "end": {
  21552. "type": "string"
  21553. }
  21554. },
  21555. "additionalProperties": false
  21556. },
  21557. "finish": {
  21558. "type": "string"
  21559. },
  21560. "cost": {
  21561. "type": "number"
  21562. },
  21563. "tokens": {
  21564. "type": "object",
  21565. "properties": {
  21566. "input": {
  21567. "type": "number"
  21568. },
  21569. "output": {
  21570. "type": "number"
  21571. },
  21572. "reasoning": {
  21573. "type": "number"
  21574. },
  21575. "cache": {
  21576. "type": "object",
  21577. "properties": {
  21578. "read": {
  21579. "type": "number"
  21580. },
  21581. "write": {
  21582. "type": "number"
  21583. }
  21584. },
  21585. "required": ["read", "write"],
  21586. "additionalProperties": false
  21587. }
  21588. },
  21589. "required": ["input", "output", "reasoning", "cache"],
  21590. "additionalProperties": false
  21591. },
  21592. "error": {
  21593. "$ref": "#/components/schemas/SessionErrorUnknown"
  21594. }
  21595. },
  21596. "required": ["id", "time", "type", "agent", "model", "content"],
  21597. "additionalProperties": false
  21598. },
  21599. "SessionMessageCompaction": {
  21600. "type": "object",
  21601. "properties": {
  21602. "type": {
  21603. "type": "string",
  21604. "enum": ["compaction"]
  21605. },
  21606. "reason": {
  21607. "type": "string",
  21608. "enum": ["auto", "manual"]
  21609. },
  21610. "summary": {
  21611. "type": "string"
  21612. },
  21613. "include": {
  21614. "type": "string"
  21615. },
  21616. "id": {
  21617. "type": "string"
  21618. },
  21619. "metadata": {
  21620. "type": "object"
  21621. },
  21622. "time": {
  21623. "type": "object",
  21624. "properties": {
  21625. "created": {
  21626. "type": "number"
  21627. }
  21628. },
  21629. "required": ["created"],
  21630. "additionalProperties": false
  21631. }
  21632. },
  21633. "required": ["type", "reason", "summary", "id", "time"],
  21634. "additionalProperties": false
  21635. },
  21636. "SessionMessage": {
  21637. "anyOf": [
  21638. {
  21639. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21640. },
  21641. {
  21642. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21643. },
  21644. {
  21645. "$ref": "#/components/schemas/SessionMessageUser"
  21646. },
  21647. {
  21648. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21649. },
  21650. {
  21651. "$ref": "#/components/schemas/SessionMessageShell"
  21652. },
  21653. {
  21654. "$ref": "#/components/schemas/SessionMessageAssistant"
  21655. },
  21656. {
  21657. "$ref": "#/components/schemas/SessionMessageCompaction"
  21658. }
  21659. ]
  21660. },
  21661. "ProviderV2Info": {
  21662. "type": "object",
  21663. "properties": {
  21664. "id": {
  21665. "type": "string"
  21666. },
  21667. "name": {
  21668. "type": "string"
  21669. },
  21670. "enabled": {
  21671. "anyOf": [
  21672. {
  21673. "type": "boolean",
  21674. "enum": [false]
  21675. },
  21676. {
  21677. "type": "object",
  21678. "properties": {
  21679. "via": {
  21680. "type": "string",
  21681. "enum": ["env"]
  21682. },
  21683. "name": {
  21684. "type": "string"
  21685. }
  21686. },
  21687. "required": ["via", "name"],
  21688. "additionalProperties": false
  21689. },
  21690. {
  21691. "type": "object",
  21692. "properties": {
  21693. "via": {
  21694. "type": "string",
  21695. "enum": ["account"]
  21696. },
  21697. "service": {
  21698. "type": "string"
  21699. }
  21700. },
  21701. "required": ["via", "service"],
  21702. "additionalProperties": false
  21703. },
  21704. {
  21705. "type": "object",
  21706. "properties": {
  21707. "via": {
  21708. "type": "string",
  21709. "enum": ["custom"]
  21710. },
  21711. "data": {
  21712. "type": "object"
  21713. }
  21714. },
  21715. "required": ["via", "data"],
  21716. "additionalProperties": false
  21717. }
  21718. ]
  21719. },
  21720. "env": {
  21721. "type": "array",
  21722. "items": {
  21723. "type": "string"
  21724. }
  21725. },
  21726. "endpoint": {
  21727. "anyOf": [
  21728. {
  21729. "type": "object",
  21730. "properties": {
  21731. "type": {
  21732. "type": "string",
  21733. "enum": ["unknown"]
  21734. }
  21735. },
  21736. "required": ["type"],
  21737. "additionalProperties": false
  21738. },
  21739. {
  21740. "type": "object",
  21741. "properties": {
  21742. "type": {
  21743. "type": "string",
  21744. "enum": ["openai/responses"]
  21745. },
  21746. "url": {
  21747. "type": "string"
  21748. },
  21749. "websocket": {
  21750. "type": "boolean"
  21751. }
  21752. },
  21753. "required": ["type", "url"],
  21754. "additionalProperties": false
  21755. },
  21756. {
  21757. "type": "object",
  21758. "properties": {
  21759. "type": {
  21760. "type": "string",
  21761. "enum": ["openai/completions"]
  21762. },
  21763. "url": {
  21764. "type": "string"
  21765. },
  21766. "reasoning": {
  21767. "anyOf": [
  21768. {
  21769. "type": "object",
  21770. "properties": {
  21771. "type": {
  21772. "type": "string",
  21773. "enum": ["reasoning_content"]
  21774. }
  21775. },
  21776. "required": ["type"],
  21777. "additionalProperties": false
  21778. },
  21779. {
  21780. "type": "object",
  21781. "properties": {
  21782. "type": {
  21783. "type": "string",
  21784. "enum": ["reasoning_details"]
  21785. }
  21786. },
  21787. "required": ["type"],
  21788. "additionalProperties": false
  21789. }
  21790. ]
  21791. }
  21792. },
  21793. "required": ["type", "url"],
  21794. "additionalProperties": false
  21795. },
  21796. {
  21797. "type": "object",
  21798. "properties": {
  21799. "type": {
  21800. "type": "string",
  21801. "enum": ["anthropic/messages"]
  21802. },
  21803. "url": {
  21804. "type": "string"
  21805. }
  21806. },
  21807. "required": ["type", "url"],
  21808. "additionalProperties": false
  21809. },
  21810. {
  21811. "type": "object",
  21812. "properties": {
  21813. "type": {
  21814. "type": "string",
  21815. "enum": ["aisdk"]
  21816. },
  21817. "package": {
  21818. "type": "string"
  21819. },
  21820. "url": {
  21821. "type": "string"
  21822. }
  21823. },
  21824. "required": ["type", "package"],
  21825. "additionalProperties": false
  21826. }
  21827. ]
  21828. },
  21829. "options": {
  21830. "type": "object",
  21831. "properties": {
  21832. "headers": {
  21833. "type": "object",
  21834. "additionalProperties": {
  21835. "type": "string"
  21836. }
  21837. },
  21838. "body": {
  21839. "type": "object"
  21840. },
  21841. "aisdk": {
  21842. "type": "object",
  21843. "properties": {
  21844. "provider": {
  21845. "type": "object"
  21846. },
  21847. "request": {
  21848. "type": "object"
  21849. }
  21850. },
  21851. "required": ["provider", "request"],
  21852. "additionalProperties": false
  21853. }
  21854. },
  21855. "required": ["headers", "body", "aisdk"],
  21856. "additionalProperties": false
  21857. }
  21858. },
  21859. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21860. "additionalProperties": false
  21861. },
  21862. "EventTuiToastShow1": {
  21863. "type": "object",
  21864. "properties": {
  21865. "id": {
  21866. "type": "string"
  21867. },
  21868. "type": {
  21869. "type": "string",
  21870. "enum": ["tui.toast.show"]
  21871. },
  21872. "properties": {
  21873. "type": "object",
  21874. "properties": {
  21875. "title": {
  21876. "type": "string"
  21877. },
  21878. "message": {
  21879. "type": "string"
  21880. },
  21881. "variant": {
  21882. "type": "string",
  21883. "enum": ["info", "success", "warning", "error"]
  21884. },
  21885. "duration": {
  21886. "type": "integer",
  21887. "exclusiveMinimum": 0
  21888. }
  21889. },
  21890. "required": ["message", "variant"],
  21891. "additionalProperties": false
  21892. }
  21893. },
  21894. "required": ["id", "type", "properties"],
  21895. "additionalProperties": false
  21896. },
  21897. "ModelV2Info1": {
  21898. "type": "object",
  21899. "properties": {
  21900. "id": {
  21901. "type": "string"
  21902. },
  21903. "apiID": {
  21904. "type": "string"
  21905. },
  21906. "providerID": {
  21907. "type": "string"
  21908. },
  21909. "family": {
  21910. "type": "string"
  21911. },
  21912. "name": {
  21913. "type": "string"
  21914. },
  21915. "endpoint": {
  21916. "anyOf": [
  21917. {
  21918. "type": "object",
  21919. "properties": {
  21920. "type": {
  21921. "type": "string",
  21922. "enum": ["unknown"]
  21923. }
  21924. },
  21925. "required": ["type"],
  21926. "additionalProperties": false
  21927. },
  21928. {
  21929. "type": "object",
  21930. "properties": {
  21931. "type": {
  21932. "type": "string",
  21933. "enum": ["openai/responses"]
  21934. },
  21935. "url": {
  21936. "type": "string"
  21937. },
  21938. "websocket": {
  21939. "type": "boolean"
  21940. }
  21941. },
  21942. "required": ["type", "url"],
  21943. "additionalProperties": false
  21944. },
  21945. {
  21946. "type": "object",
  21947. "properties": {
  21948. "type": {
  21949. "type": "string",
  21950. "enum": ["openai/completions"]
  21951. },
  21952. "url": {
  21953. "type": "string"
  21954. },
  21955. "reasoning": {
  21956. "anyOf": [
  21957. {
  21958. "type": "object",
  21959. "properties": {
  21960. "type": {
  21961. "type": "string",
  21962. "enum": ["reasoning_content"]
  21963. }
  21964. },
  21965. "required": ["type"],
  21966. "additionalProperties": false
  21967. },
  21968. {
  21969. "type": "object",
  21970. "properties": {
  21971. "type": {
  21972. "type": "string",
  21973. "enum": ["reasoning_details"]
  21974. }
  21975. },
  21976. "required": ["type"],
  21977. "additionalProperties": false
  21978. }
  21979. ]
  21980. }
  21981. },
  21982. "required": ["type", "url"],
  21983. "additionalProperties": false
  21984. },
  21985. {
  21986. "type": "object",
  21987. "properties": {
  21988. "type": {
  21989. "type": "string",
  21990. "enum": ["anthropic/messages"]
  21991. },
  21992. "url": {
  21993. "type": "string"
  21994. }
  21995. },
  21996. "required": ["type", "url"],
  21997. "additionalProperties": false
  21998. },
  21999. {
  22000. "type": "object",
  22001. "properties": {
  22002. "type": {
  22003. "type": "string",
  22004. "enum": ["aisdk"]
  22005. },
  22006. "package": {
  22007. "type": "string"
  22008. },
  22009. "url": {
  22010. "type": "string"
  22011. }
  22012. },
  22013. "required": ["type", "package"],
  22014. "additionalProperties": false
  22015. }
  22016. ]
  22017. },
  22018. "capabilities": {
  22019. "type": "object",
  22020. "properties": {
  22021. "tools": {
  22022. "type": "boolean"
  22023. },
  22024. "input": {
  22025. "type": "array",
  22026. "items": {
  22027. "type": "string"
  22028. }
  22029. },
  22030. "output": {
  22031. "type": "array",
  22032. "items": {
  22033. "type": "string"
  22034. }
  22035. }
  22036. },
  22037. "required": ["tools", "input", "output"],
  22038. "additionalProperties": false
  22039. },
  22040. "options": {
  22041. "type": "object",
  22042. "properties": {
  22043. "headers": {
  22044. "type": "object",
  22045. "additionalProperties": {
  22046. "type": "string"
  22047. }
  22048. },
  22049. "body": {
  22050. "type": "object"
  22051. },
  22052. "aisdk": {
  22053. "type": "object",
  22054. "properties": {
  22055. "provider": {
  22056. "type": "object"
  22057. },
  22058. "request": {
  22059. "type": "object"
  22060. }
  22061. },
  22062. "required": ["provider", "request"],
  22063. "additionalProperties": false
  22064. },
  22065. "variant": {
  22066. "type": "string"
  22067. }
  22068. },
  22069. "required": ["headers", "body", "aisdk"],
  22070. "additionalProperties": false
  22071. },
  22072. "variants": {
  22073. "type": "array",
  22074. "items": {
  22075. "type": "object",
  22076. "properties": {
  22077. "id": {
  22078. "type": "string"
  22079. },
  22080. "headers": {
  22081. "type": "object",
  22082. "additionalProperties": {
  22083. "type": "string"
  22084. }
  22085. },
  22086. "body": {
  22087. "type": "object"
  22088. },
  22089. "aisdk": {
  22090. "type": "object",
  22091. "properties": {
  22092. "provider": {
  22093. "type": "object"
  22094. },
  22095. "request": {
  22096. "type": "object"
  22097. }
  22098. },
  22099. "required": ["provider", "request"],
  22100. "additionalProperties": false
  22101. }
  22102. },
  22103. "required": ["id", "headers", "body", "aisdk"],
  22104. "additionalProperties": false
  22105. }
  22106. },
  22107. "time": {
  22108. "type": "object",
  22109. "properties": {
  22110. "released": {
  22111. "anyOf": [
  22112. {
  22113. "type": "number"
  22114. },
  22115. {
  22116. "type": "string",
  22117. "enum": ["NaN"]
  22118. },
  22119. {
  22120. "type": "string",
  22121. "enum": ["Infinity"]
  22122. },
  22123. {
  22124. "type": "string",
  22125. "enum": ["-Infinity"]
  22126. }
  22127. ]
  22128. }
  22129. },
  22130. "required": ["released"],
  22131. "additionalProperties": false
  22132. },
  22133. "cost": {
  22134. "type": "array",
  22135. "items": {
  22136. "type": "object",
  22137. "properties": {
  22138. "tier": {
  22139. "type": "object",
  22140. "properties": {
  22141. "type": {
  22142. "type": "string",
  22143. "enum": ["context"]
  22144. },
  22145. "size": {
  22146. "type": "integer"
  22147. }
  22148. },
  22149. "required": ["type", "size"],
  22150. "additionalProperties": false
  22151. },
  22152. "input": {
  22153. "type": "number"
  22154. },
  22155. "output": {
  22156. "type": "number"
  22157. },
  22158. "cache": {
  22159. "type": "object",
  22160. "properties": {
  22161. "read": {
  22162. "type": "number"
  22163. },
  22164. "write": {
  22165. "type": "number"
  22166. }
  22167. },
  22168. "required": ["read", "write"],
  22169. "additionalProperties": false
  22170. }
  22171. },
  22172. "required": ["input", "output", "cache"],
  22173. "additionalProperties": false
  22174. }
  22175. },
  22176. "status": {
  22177. "type": "string",
  22178. "enum": ["alpha", "beta", "deprecated", "active"]
  22179. },
  22180. "enabled": {
  22181. "type": "boolean"
  22182. },
  22183. "limit": {
  22184. "type": "object",
  22185. "properties": {
  22186. "context": {
  22187. "type": "integer"
  22188. },
  22189. "input": {
  22190. "type": "integer"
  22191. },
  22192. "output": {
  22193. "type": "integer"
  22194. }
  22195. },
  22196. "required": ["context", "output"],
  22197. "additionalProperties": false
  22198. }
  22199. },
  22200. "required": [
  22201. "id",
  22202. "apiID",
  22203. "providerID",
  22204. "name",
  22205. "endpoint",
  22206. "capabilities",
  22207. "options",
  22208. "variants",
  22209. "time",
  22210. "cost",
  22211. "status",
  22212. "enabled",
  22213. "limit"
  22214. ],
  22215. "additionalProperties": false
  22216. },
  22217. "BadRequestError": {
  22218. "type": "object",
  22219. "required": ["name", "data"],
  22220. "properties": {
  22221. "name": {
  22222. "type": "string",
  22223. "enum": ["BadRequest"]
  22224. },
  22225. "data": {
  22226. "type": "object",
  22227. "required": ["message"],
  22228. "properties": {
  22229. "message": {
  22230. "type": "string"
  22231. },
  22232. "kind": {
  22233. "type": "string",
  22234. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  22235. }
  22236. }
  22237. }
  22238. }
  22239. }
  22240. }
  22241. },
  22242. "security": [],
  22243. "tags": [
  22244. {
  22245. "name": "control",
  22246. "description": "Control plane routes."
  22247. },
  22248. {
  22249. "name": "global",
  22250. "description": "Global server routes."
  22251. },
  22252. {
  22253. "name": "event",
  22254. "description": "Instance event stream route."
  22255. },
  22256. {
  22257. "name": "config",
  22258. "description": "Experimental HttpApi config routes."
  22259. },
  22260. {
  22261. "name": "experimental",
  22262. "description": "Experimental HttpApi read-only routes."
  22263. },
  22264. {
  22265. "name": "file",
  22266. "description": "Experimental HttpApi file routes."
  22267. },
  22268. {
  22269. "name": "instance",
  22270. "description": "Experimental HttpApi instance read routes."
  22271. },
  22272. {
  22273. "name": "mcp",
  22274. "description": "Experimental HttpApi MCP routes."
  22275. },
  22276. {
  22277. "name": "project",
  22278. "description": "Experimental HttpApi project routes."
  22279. },
  22280. {
  22281. "name": "pty",
  22282. "description": "Experimental HttpApi PTY routes."
  22283. },
  22284. {
  22285. "name": "question",
  22286. "description": "Question routes."
  22287. },
  22288. {
  22289. "name": "permission",
  22290. "description": "Experimental HttpApi permission routes."
  22291. },
  22292. {
  22293. "name": "provider",
  22294. "description": "Experimental HttpApi provider routes."
  22295. },
  22296. {
  22297. "name": "session",
  22298. "description": "Experimental HttpApi session routes."
  22299. },
  22300. {
  22301. "name": "sync",
  22302. "description": "Experimental HttpApi sync routes."
  22303. },
  22304. {
  22305. "name": "v2",
  22306. "description": "Experimental v2 routes."
  22307. },
  22308. {
  22309. "name": "v2 messages",
  22310. "description": "Experimental v2 message routes."
  22311. },
  22312. {
  22313. "name": "v2 models",
  22314. "description": "Experimental v2 model routes."
  22315. },
  22316. {
  22317. "name": "v2 providers",
  22318. "description": "Experimental v2 provider routes."
  22319. },
  22320. {
  22321. "name": "tui",
  22322. "description": "Experimental HttpApi TUI routes."
  22323. },
  22324. {
  22325. "name": "workspace",
  22326. "description": "Experimental HttpApi workspace routes."
  22327. },
  22328. {
  22329. "name": "pty",
  22330. "description": "PTY websocket route."
  22331. }
  22332. ]
  22333. }