openapi.json 599 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852
  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. "responses": {
  2294. "200": {
  2295. "description": "VCS diff",
  2296. "content": {
  2297. "application/json": {
  2298. "schema": {
  2299. "type": "array",
  2300. "items": {
  2301. "$ref": "#/components/schemas/VcsFileDiff"
  2302. },
  2303. "description": "VCS diff"
  2304. }
  2305. }
  2306. }
  2307. },
  2308. "400": {
  2309. "description": "Bad request",
  2310. "content": {
  2311. "application/json": {
  2312. "schema": {
  2313. "$ref": "#/components/schemas/BadRequestError"
  2314. }
  2315. }
  2316. }
  2317. }
  2318. },
  2319. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2320. "summary": "Get VCS diff",
  2321. "x-codeSamples": [
  2322. {
  2323. "lang": "js",
  2324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2325. }
  2326. ]
  2327. }
  2328. },
  2329. "/vcs/diff/raw": {
  2330. "get": {
  2331. "tags": ["instance"],
  2332. "operationId": "vcs.diff.raw",
  2333. "parameters": [
  2334. {
  2335. "name": "directory",
  2336. "in": "query",
  2337. "schema": {
  2338. "type": "string"
  2339. },
  2340. "required": false
  2341. },
  2342. {
  2343. "name": "workspace",
  2344. "in": "query",
  2345. "schema": {
  2346. "type": "string"
  2347. },
  2348. "required": false
  2349. }
  2350. ],
  2351. "responses": {
  2352. "200": {
  2353. "description": "Raw VCS diff",
  2354. "content": {
  2355. "text/x-diff; charset=utf-8": {
  2356. "schema": {
  2357. "type": "string"
  2358. }
  2359. }
  2360. }
  2361. },
  2362. "400": {
  2363. "description": "Bad request",
  2364. "content": {
  2365. "application/json": {
  2366. "schema": {
  2367. "$ref": "#/components/schemas/BadRequestError"
  2368. }
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "description": "Retrieve a raw patch for current uncommitted changes.",
  2374. "summary": "Get raw VCS diff",
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/vcs/apply": {
  2384. "post": {
  2385. "tags": ["instance"],
  2386. "operationId": "vcs.apply",
  2387. "parameters": [
  2388. {
  2389. "name": "directory",
  2390. "in": "query",
  2391. "schema": {
  2392. "type": "string"
  2393. },
  2394. "required": false
  2395. },
  2396. {
  2397. "name": "workspace",
  2398. "in": "query",
  2399. "schema": {
  2400. "type": "string"
  2401. },
  2402. "required": false
  2403. }
  2404. ],
  2405. "responses": {
  2406. "200": {
  2407. "description": "VCS patch applied",
  2408. "content": {
  2409. "application/json": {
  2410. "schema": {
  2411. "type": "object",
  2412. "properties": {
  2413. "applied": {
  2414. "type": "boolean"
  2415. }
  2416. },
  2417. "required": ["applied"],
  2418. "additionalProperties": false,
  2419. "description": "VCS patch applied"
  2420. }
  2421. }
  2422. }
  2423. },
  2424. "400": {
  2425. "description": "VcsApplyError | InvalidRequestError",
  2426. "content": {
  2427. "application/json": {
  2428. "schema": {
  2429. "anyOf": [
  2430. {
  2431. "$ref": "#/components/schemas/VcsApplyError"
  2432. },
  2433. {
  2434. "$ref": "#/components/schemas/InvalidRequestError"
  2435. }
  2436. ]
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Apply a raw patch to the current working tree.",
  2443. "summary": "Apply VCS patch",
  2444. "requestBody": {
  2445. "content": {
  2446. "application/json": {
  2447. "schema": {
  2448. "type": "object",
  2449. "properties": {
  2450. "patch": {
  2451. "type": "string"
  2452. }
  2453. },
  2454. "required": ["patch"],
  2455. "additionalProperties": false
  2456. }
  2457. }
  2458. }
  2459. },
  2460. "x-codeSamples": [
  2461. {
  2462. "lang": "js",
  2463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2464. }
  2465. ]
  2466. }
  2467. },
  2468. "/command": {
  2469. "get": {
  2470. "tags": ["instance"],
  2471. "operationId": "command.list",
  2472. "parameters": [
  2473. {
  2474. "name": "directory",
  2475. "in": "query",
  2476. "schema": {
  2477. "type": "string"
  2478. },
  2479. "required": false
  2480. },
  2481. {
  2482. "name": "workspace",
  2483. "in": "query",
  2484. "schema": {
  2485. "type": "string"
  2486. },
  2487. "required": false
  2488. }
  2489. ],
  2490. "responses": {
  2491. "200": {
  2492. "description": "List of commands",
  2493. "content": {
  2494. "application/json": {
  2495. "schema": {
  2496. "type": "array",
  2497. "items": {
  2498. "$ref": "#/components/schemas/Command"
  2499. },
  2500. "description": "List of commands"
  2501. }
  2502. }
  2503. }
  2504. },
  2505. "400": {
  2506. "description": "Bad request",
  2507. "content": {
  2508. "application/json": {
  2509. "schema": {
  2510. "$ref": "#/components/schemas/BadRequestError"
  2511. }
  2512. }
  2513. }
  2514. }
  2515. },
  2516. "description": "Get a list of all available commands in the OpenCode system.",
  2517. "summary": "List commands",
  2518. "x-codeSamples": [
  2519. {
  2520. "lang": "js",
  2521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2522. }
  2523. ]
  2524. }
  2525. },
  2526. "/agent": {
  2527. "get": {
  2528. "tags": ["instance"],
  2529. "operationId": "app.agents",
  2530. "parameters": [
  2531. {
  2532. "name": "directory",
  2533. "in": "query",
  2534. "schema": {
  2535. "type": "string"
  2536. },
  2537. "required": false
  2538. },
  2539. {
  2540. "name": "workspace",
  2541. "in": "query",
  2542. "schema": {
  2543. "type": "string"
  2544. },
  2545. "required": false
  2546. }
  2547. ],
  2548. "responses": {
  2549. "200": {
  2550. "description": "List of agents",
  2551. "content": {
  2552. "application/json": {
  2553. "schema": {
  2554. "type": "array",
  2555. "items": {
  2556. "$ref": "#/components/schemas/Agent"
  2557. },
  2558. "description": "List of agents"
  2559. }
  2560. }
  2561. }
  2562. },
  2563. "400": {
  2564. "description": "Bad request",
  2565. "content": {
  2566. "application/json": {
  2567. "schema": {
  2568. "$ref": "#/components/schemas/BadRequestError"
  2569. }
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "description": "Get a list of all available AI agents in the OpenCode system.",
  2575. "summary": "List agents",
  2576. "x-codeSamples": [
  2577. {
  2578. "lang": "js",
  2579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2580. }
  2581. ]
  2582. }
  2583. },
  2584. "/skill": {
  2585. "get": {
  2586. "tags": ["instance"],
  2587. "operationId": "app.skills",
  2588. "parameters": [
  2589. {
  2590. "name": "directory",
  2591. "in": "query",
  2592. "schema": {
  2593. "type": "string"
  2594. },
  2595. "required": false
  2596. },
  2597. {
  2598. "name": "workspace",
  2599. "in": "query",
  2600. "schema": {
  2601. "type": "string"
  2602. },
  2603. "required": false
  2604. }
  2605. ],
  2606. "responses": {
  2607. "200": {
  2608. "description": "List of skills",
  2609. "content": {
  2610. "application/json": {
  2611. "schema": {
  2612. "type": "array",
  2613. "items": {
  2614. "type": "object",
  2615. "properties": {
  2616. "name": {
  2617. "type": "string"
  2618. },
  2619. "description": {
  2620. "type": "string"
  2621. },
  2622. "location": {
  2623. "type": "string"
  2624. },
  2625. "content": {
  2626. "type": "string"
  2627. }
  2628. },
  2629. "required": ["name", "location", "content"],
  2630. "additionalProperties": false
  2631. },
  2632. "description": "List of skills"
  2633. }
  2634. }
  2635. }
  2636. },
  2637. "400": {
  2638. "description": "Bad request",
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "$ref": "#/components/schemas/BadRequestError"
  2643. }
  2644. }
  2645. }
  2646. }
  2647. },
  2648. "description": "Get a list of all available skills in the OpenCode system.",
  2649. "summary": "List skills",
  2650. "x-codeSamples": [
  2651. {
  2652. "lang": "js",
  2653. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2654. }
  2655. ]
  2656. }
  2657. },
  2658. "/lsp": {
  2659. "get": {
  2660. "tags": ["instance"],
  2661. "operationId": "lsp.status",
  2662. "parameters": [
  2663. {
  2664. "name": "directory",
  2665. "in": "query",
  2666. "schema": {
  2667. "type": "string"
  2668. },
  2669. "required": false
  2670. },
  2671. {
  2672. "name": "workspace",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. }
  2679. ],
  2680. "responses": {
  2681. "200": {
  2682. "description": "LSP server status",
  2683. "content": {
  2684. "application/json": {
  2685. "schema": {
  2686. "type": "array",
  2687. "items": {
  2688. "$ref": "#/components/schemas/LSPStatus"
  2689. },
  2690. "description": "LSP server status"
  2691. }
  2692. }
  2693. }
  2694. },
  2695. "400": {
  2696. "description": "Bad request",
  2697. "content": {
  2698. "application/json": {
  2699. "schema": {
  2700. "$ref": "#/components/schemas/BadRequestError"
  2701. }
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "description": "Get LSP server status",
  2707. "summary": "Get LSP status",
  2708. "x-codeSamples": [
  2709. {
  2710. "lang": "js",
  2711. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2712. }
  2713. ]
  2714. }
  2715. },
  2716. "/formatter": {
  2717. "get": {
  2718. "tags": ["instance"],
  2719. "operationId": "formatter.status",
  2720. "parameters": [
  2721. {
  2722. "name": "directory",
  2723. "in": "query",
  2724. "schema": {
  2725. "type": "string"
  2726. },
  2727. "required": false
  2728. },
  2729. {
  2730. "name": "workspace",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. }
  2737. ],
  2738. "responses": {
  2739. "200": {
  2740. "description": "Formatter status",
  2741. "content": {
  2742. "application/json": {
  2743. "schema": {
  2744. "type": "array",
  2745. "items": {
  2746. "$ref": "#/components/schemas/FormatterStatus"
  2747. },
  2748. "description": "Formatter status"
  2749. }
  2750. }
  2751. }
  2752. },
  2753. "400": {
  2754. "description": "Bad request",
  2755. "content": {
  2756. "application/json": {
  2757. "schema": {
  2758. "$ref": "#/components/schemas/BadRequestError"
  2759. }
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "description": "Get formatter status",
  2765. "summary": "Get formatter status",
  2766. "x-codeSamples": [
  2767. {
  2768. "lang": "js",
  2769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2770. }
  2771. ]
  2772. }
  2773. },
  2774. "/mcp": {
  2775. "get": {
  2776. "tags": ["mcp"],
  2777. "operationId": "mcp.status",
  2778. "parameters": [
  2779. {
  2780. "name": "directory",
  2781. "in": "query",
  2782. "schema": {
  2783. "type": "string"
  2784. },
  2785. "required": false
  2786. },
  2787. {
  2788. "name": "workspace",
  2789. "in": "query",
  2790. "schema": {
  2791. "type": "string"
  2792. },
  2793. "required": false
  2794. }
  2795. ],
  2796. "responses": {
  2797. "200": {
  2798. "description": "MCP server status",
  2799. "content": {
  2800. "application/json": {
  2801. "schema": {
  2802. "type": "object",
  2803. "additionalProperties": {
  2804. "$ref": "#/components/schemas/MCPStatus"
  2805. },
  2806. "description": "MCP server status"
  2807. }
  2808. }
  2809. }
  2810. },
  2811. "400": {
  2812. "description": "Bad request",
  2813. "content": {
  2814. "application/json": {
  2815. "schema": {
  2816. "$ref": "#/components/schemas/BadRequestError"
  2817. }
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2823. "summary": "Get MCP status",
  2824. "x-codeSamples": [
  2825. {
  2826. "lang": "js",
  2827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2828. }
  2829. ]
  2830. },
  2831. "post": {
  2832. "tags": ["mcp"],
  2833. "operationId": "mcp.add",
  2834. "parameters": [
  2835. {
  2836. "name": "directory",
  2837. "in": "query",
  2838. "schema": {
  2839. "type": "string"
  2840. },
  2841. "required": false
  2842. },
  2843. {
  2844. "name": "workspace",
  2845. "in": "query",
  2846. "schema": {
  2847. "type": "string"
  2848. },
  2849. "required": false
  2850. }
  2851. ],
  2852. "responses": {
  2853. "200": {
  2854. "description": "MCP server added successfully",
  2855. "content": {
  2856. "application/json": {
  2857. "schema": {
  2858. "type": "object",
  2859. "additionalProperties": {
  2860. "$ref": "#/components/schemas/MCPStatus"
  2861. },
  2862. "description": "MCP server added successfully"
  2863. }
  2864. }
  2865. }
  2866. },
  2867. "400": {
  2868. "description": "BadRequest | InvalidRequestError",
  2869. "content": {
  2870. "application/json": {
  2871. "schema": {
  2872. "anyOf": [
  2873. {
  2874. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2875. },
  2876. {
  2877. "$ref": "#/components/schemas/InvalidRequestError"
  2878. }
  2879. ]
  2880. }
  2881. }
  2882. }
  2883. }
  2884. },
  2885. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2886. "summary": "Add MCP server",
  2887. "requestBody": {
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "object",
  2892. "properties": {
  2893. "name": {
  2894. "type": "string"
  2895. },
  2896. "config": {
  2897. "anyOf": [
  2898. {
  2899. "$ref": "#/components/schemas/McpLocalConfig"
  2900. },
  2901. {
  2902. "$ref": "#/components/schemas/McpRemoteConfig"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "required": ["name", "config"],
  2908. "additionalProperties": false
  2909. }
  2910. }
  2911. }
  2912. },
  2913. "x-codeSamples": [
  2914. {
  2915. "lang": "js",
  2916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2917. }
  2918. ]
  2919. }
  2920. },
  2921. "/mcp/{name}/auth": {
  2922. "post": {
  2923. "tags": ["mcp"],
  2924. "operationId": "mcp.auth.start",
  2925. "parameters": [
  2926. {
  2927. "name": "name",
  2928. "in": "path",
  2929. "schema": {
  2930. "type": "string"
  2931. },
  2932. "required": true
  2933. },
  2934. {
  2935. "name": "directory",
  2936. "in": "query",
  2937. "schema": {
  2938. "type": "string"
  2939. },
  2940. "required": false
  2941. },
  2942. {
  2943. "name": "workspace",
  2944. "in": "query",
  2945. "schema": {
  2946. "type": "string"
  2947. },
  2948. "required": false
  2949. }
  2950. ],
  2951. "responses": {
  2952. "200": {
  2953. "description": "OAuth flow started",
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "authorizationUrl": {
  2960. "type": "string"
  2961. },
  2962. "oauthState": {
  2963. "type": "string"
  2964. }
  2965. },
  2966. "required": ["authorizationUrl", "oauthState"],
  2967. "additionalProperties": false,
  2968. "description": "OAuth flow started"
  2969. }
  2970. }
  2971. }
  2972. },
  2973. "400": {
  2974. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2975. "content": {
  2976. "application/json": {
  2977. "schema": {
  2978. "anyOf": [
  2979. {
  2980. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2981. },
  2982. {
  2983. "$ref": "#/components/schemas/InvalidRequestError"
  2984. }
  2985. ]
  2986. }
  2987. }
  2988. }
  2989. },
  2990. "404": {
  2991. "description": "Not found",
  2992. "content": {
  2993. "application/json": {
  2994. "schema": {
  2995. "$ref": "#/components/schemas/NotFoundError"
  2996. }
  2997. }
  2998. }
  2999. }
  3000. },
  3001. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3002. "summary": "Start MCP OAuth",
  3003. "x-codeSamples": [
  3004. {
  3005. "lang": "js",
  3006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3007. }
  3008. ]
  3009. },
  3010. "delete": {
  3011. "tags": ["mcp"],
  3012. "operationId": "mcp.auth.remove",
  3013. "parameters": [
  3014. {
  3015. "name": "name",
  3016. "in": "path",
  3017. "schema": {
  3018. "type": "string"
  3019. },
  3020. "required": true
  3021. },
  3022. {
  3023. "name": "directory",
  3024. "in": "query",
  3025. "schema": {
  3026. "type": "string"
  3027. },
  3028. "required": false
  3029. },
  3030. {
  3031. "name": "workspace",
  3032. "in": "query",
  3033. "schema": {
  3034. "type": "string"
  3035. },
  3036. "required": false
  3037. }
  3038. ],
  3039. "responses": {
  3040. "200": {
  3041. "description": "OAuth credentials removed",
  3042. "content": {
  3043. "application/json": {
  3044. "schema": {
  3045. "type": "object",
  3046. "properties": {
  3047. "success": {
  3048. "type": "boolean",
  3049. "enum": [true]
  3050. }
  3051. },
  3052. "required": ["success"],
  3053. "additionalProperties": false,
  3054. "description": "OAuth credentials removed"
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "400": {
  3060. "description": "Bad request",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/BadRequestError"
  3065. }
  3066. }
  3067. }
  3068. },
  3069. "404": {
  3070. "description": "Not found",
  3071. "content": {
  3072. "application/json": {
  3073. "schema": {
  3074. "$ref": "#/components/schemas/NotFoundError"
  3075. }
  3076. }
  3077. }
  3078. }
  3079. },
  3080. "description": "Remove OAuth credentials for an MCP server.",
  3081. "summary": "Remove MCP OAuth",
  3082. "x-codeSamples": [
  3083. {
  3084. "lang": "js",
  3085. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3086. }
  3087. ]
  3088. }
  3089. },
  3090. "/mcp/{name}/auth/callback": {
  3091. "post": {
  3092. "tags": ["mcp"],
  3093. "operationId": "mcp.auth.callback",
  3094. "parameters": [
  3095. {
  3096. "name": "name",
  3097. "in": "path",
  3098. "schema": {
  3099. "type": "string"
  3100. },
  3101. "required": true
  3102. },
  3103. {
  3104. "name": "directory",
  3105. "in": "query",
  3106. "schema": {
  3107. "type": "string"
  3108. },
  3109. "required": false
  3110. },
  3111. {
  3112. "name": "workspace",
  3113. "in": "query",
  3114. "schema": {
  3115. "type": "string"
  3116. },
  3117. "required": false
  3118. }
  3119. ],
  3120. "responses": {
  3121. "200": {
  3122. "description": "OAuth authentication completed",
  3123. "content": {
  3124. "application/json": {
  3125. "schema": {
  3126. "$ref": "#/components/schemas/MCPStatus"
  3127. }
  3128. }
  3129. }
  3130. },
  3131. "400": {
  3132. "description": "BadRequest | InvalidRequestError",
  3133. "content": {
  3134. "application/json": {
  3135. "schema": {
  3136. "anyOf": [
  3137. {
  3138. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3139. },
  3140. {
  3141. "$ref": "#/components/schemas/InvalidRequestError"
  3142. }
  3143. ]
  3144. }
  3145. }
  3146. }
  3147. },
  3148. "404": {
  3149. "description": "Not found",
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "$ref": "#/components/schemas/NotFoundError"
  3154. }
  3155. }
  3156. }
  3157. }
  3158. },
  3159. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3160. "summary": "Complete MCP OAuth",
  3161. "requestBody": {
  3162. "content": {
  3163. "application/json": {
  3164. "schema": {
  3165. "type": "object",
  3166. "properties": {
  3167. "code": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "required": ["code"],
  3172. "additionalProperties": false
  3173. }
  3174. }
  3175. }
  3176. },
  3177. "x-codeSamples": [
  3178. {
  3179. "lang": "js",
  3180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3181. }
  3182. ]
  3183. }
  3184. },
  3185. "/mcp/{name}/auth/authenticate": {
  3186. "post": {
  3187. "tags": ["mcp"],
  3188. "operationId": "mcp.auth.authenticate",
  3189. "parameters": [
  3190. {
  3191. "name": "name",
  3192. "in": "path",
  3193. "schema": {
  3194. "type": "string"
  3195. },
  3196. "required": true
  3197. },
  3198. {
  3199. "name": "directory",
  3200. "in": "query",
  3201. "schema": {
  3202. "type": "string"
  3203. },
  3204. "required": false
  3205. },
  3206. {
  3207. "name": "workspace",
  3208. "in": "query",
  3209. "schema": {
  3210. "type": "string"
  3211. },
  3212. "required": false
  3213. }
  3214. ],
  3215. "responses": {
  3216. "200": {
  3217. "description": "OAuth authentication completed",
  3218. "content": {
  3219. "application/json": {
  3220. "schema": {
  3221. "$ref": "#/components/schemas/MCPStatus"
  3222. }
  3223. }
  3224. }
  3225. },
  3226. "400": {
  3227. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3228. "content": {
  3229. "application/json": {
  3230. "schema": {
  3231. "anyOf": [
  3232. {
  3233. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3234. },
  3235. {
  3236. "$ref": "#/components/schemas/InvalidRequestError"
  3237. }
  3238. ]
  3239. }
  3240. }
  3241. }
  3242. },
  3243. "404": {
  3244. "description": "Not found",
  3245. "content": {
  3246. "application/json": {
  3247. "schema": {
  3248. "$ref": "#/components/schemas/NotFoundError"
  3249. }
  3250. }
  3251. }
  3252. }
  3253. },
  3254. "description": "Start OAuth flow and wait for callback (opens browser).",
  3255. "summary": "Authenticate MCP OAuth",
  3256. "x-codeSamples": [
  3257. {
  3258. "lang": "js",
  3259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3260. }
  3261. ]
  3262. }
  3263. },
  3264. "/mcp/{name}/connect": {
  3265. "post": {
  3266. "tags": ["mcp"],
  3267. "operationId": "mcp.connect",
  3268. "parameters": [
  3269. {
  3270. "name": "name",
  3271. "in": "path",
  3272. "schema": {
  3273. "type": "string"
  3274. },
  3275. "required": true
  3276. },
  3277. {
  3278. "name": "directory",
  3279. "in": "query",
  3280. "schema": {
  3281. "type": "string"
  3282. },
  3283. "required": false
  3284. },
  3285. {
  3286. "name": "workspace",
  3287. "in": "query",
  3288. "schema": {
  3289. "type": "string"
  3290. },
  3291. "required": false
  3292. }
  3293. ],
  3294. "responses": {
  3295. "200": {
  3296. "description": "MCP server connected successfully",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "type": "boolean",
  3301. "description": "MCP server connected successfully"
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "400": {
  3307. "description": "Bad request",
  3308. "content": {
  3309. "application/json": {
  3310. "schema": {
  3311. "$ref": "#/components/schemas/BadRequestError"
  3312. }
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "description": "Connect an MCP server.",
  3318. "x-codeSamples": [
  3319. {
  3320. "lang": "js",
  3321. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3322. }
  3323. ]
  3324. }
  3325. },
  3326. "/mcp/{name}/disconnect": {
  3327. "post": {
  3328. "tags": ["mcp"],
  3329. "operationId": "mcp.disconnect",
  3330. "parameters": [
  3331. {
  3332. "name": "name",
  3333. "in": "path",
  3334. "schema": {
  3335. "type": "string"
  3336. },
  3337. "required": true
  3338. },
  3339. {
  3340. "name": "directory",
  3341. "in": "query",
  3342. "schema": {
  3343. "type": "string"
  3344. },
  3345. "required": false
  3346. },
  3347. {
  3348. "name": "workspace",
  3349. "in": "query",
  3350. "schema": {
  3351. "type": "string"
  3352. },
  3353. "required": false
  3354. }
  3355. ],
  3356. "responses": {
  3357. "200": {
  3358. "description": "MCP server disconnected successfully",
  3359. "content": {
  3360. "application/json": {
  3361. "schema": {
  3362. "type": "boolean",
  3363. "description": "MCP server disconnected successfully"
  3364. }
  3365. }
  3366. }
  3367. },
  3368. "400": {
  3369. "description": "Bad request",
  3370. "content": {
  3371. "application/json": {
  3372. "schema": {
  3373. "$ref": "#/components/schemas/BadRequestError"
  3374. }
  3375. }
  3376. }
  3377. }
  3378. },
  3379. "description": "Disconnect an MCP server.",
  3380. "x-codeSamples": [
  3381. {
  3382. "lang": "js",
  3383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3384. }
  3385. ]
  3386. }
  3387. },
  3388. "/project": {
  3389. "get": {
  3390. "tags": ["project"],
  3391. "operationId": "project.list",
  3392. "parameters": [
  3393. {
  3394. "name": "directory",
  3395. "in": "query",
  3396. "schema": {
  3397. "type": "string"
  3398. },
  3399. "required": false
  3400. },
  3401. {
  3402. "name": "workspace",
  3403. "in": "query",
  3404. "schema": {
  3405. "type": "string"
  3406. },
  3407. "required": false
  3408. }
  3409. ],
  3410. "responses": {
  3411. "200": {
  3412. "description": "List of projects",
  3413. "content": {
  3414. "application/json": {
  3415. "schema": {
  3416. "type": "array",
  3417. "items": {
  3418. "$ref": "#/components/schemas/Project"
  3419. },
  3420. "description": "List of projects"
  3421. }
  3422. }
  3423. }
  3424. },
  3425. "400": {
  3426. "description": "Bad request",
  3427. "content": {
  3428. "application/json": {
  3429. "schema": {
  3430. "$ref": "#/components/schemas/BadRequestError"
  3431. }
  3432. }
  3433. }
  3434. }
  3435. },
  3436. "description": "Get a list of projects that have been opened with OpenCode.",
  3437. "summary": "List all projects",
  3438. "x-codeSamples": [
  3439. {
  3440. "lang": "js",
  3441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3442. }
  3443. ]
  3444. }
  3445. },
  3446. "/project/current": {
  3447. "get": {
  3448. "tags": ["project"],
  3449. "operationId": "project.current",
  3450. "parameters": [
  3451. {
  3452. "name": "directory",
  3453. "in": "query",
  3454. "schema": {
  3455. "type": "string"
  3456. },
  3457. "required": false
  3458. },
  3459. {
  3460. "name": "workspace",
  3461. "in": "query",
  3462. "schema": {
  3463. "type": "string"
  3464. },
  3465. "required": false
  3466. }
  3467. ],
  3468. "responses": {
  3469. "200": {
  3470. "description": "Current project information",
  3471. "content": {
  3472. "application/json": {
  3473. "schema": {
  3474. "$ref": "#/components/schemas/Project"
  3475. }
  3476. }
  3477. }
  3478. },
  3479. "400": {
  3480. "description": "Bad request",
  3481. "content": {
  3482. "application/json": {
  3483. "schema": {
  3484. "$ref": "#/components/schemas/BadRequestError"
  3485. }
  3486. }
  3487. }
  3488. }
  3489. },
  3490. "description": "Retrieve the currently active project that OpenCode is working with.",
  3491. "summary": "Get current project",
  3492. "x-codeSamples": [
  3493. {
  3494. "lang": "js",
  3495. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3496. }
  3497. ]
  3498. }
  3499. },
  3500. "/project/git/init": {
  3501. "post": {
  3502. "tags": ["project"],
  3503. "operationId": "project.initGit",
  3504. "parameters": [
  3505. {
  3506. "name": "directory",
  3507. "in": "query",
  3508. "schema": {
  3509. "type": "string"
  3510. },
  3511. "required": false
  3512. },
  3513. {
  3514. "name": "workspace",
  3515. "in": "query",
  3516. "schema": {
  3517. "type": "string"
  3518. },
  3519. "required": false
  3520. }
  3521. ],
  3522. "responses": {
  3523. "200": {
  3524. "description": "Project information after git initialization",
  3525. "content": {
  3526. "application/json": {
  3527. "schema": {
  3528. "$ref": "#/components/schemas/Project"
  3529. }
  3530. }
  3531. }
  3532. },
  3533. "400": {
  3534. "description": "Bad request",
  3535. "content": {
  3536. "application/json": {
  3537. "schema": {
  3538. "$ref": "#/components/schemas/BadRequestError"
  3539. }
  3540. }
  3541. }
  3542. }
  3543. },
  3544. "description": "Create a git repository for the current project and return the refreshed project info.",
  3545. "summary": "Initialize git repository",
  3546. "x-codeSamples": [
  3547. {
  3548. "lang": "js",
  3549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3550. }
  3551. ]
  3552. }
  3553. },
  3554. "/project/{projectID}": {
  3555. "patch": {
  3556. "tags": ["project"],
  3557. "operationId": "project.update",
  3558. "parameters": [
  3559. {
  3560. "name": "projectID",
  3561. "in": "path",
  3562. "schema": {
  3563. "type": "string"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Updated project information",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/Project"
  3591. }
  3592. }
  3593. }
  3594. },
  3595. "400": {
  3596. "description": "BadRequest | InvalidRequestError",
  3597. "content": {
  3598. "application/json": {
  3599. "schema": {
  3600. "anyOf": [
  3601. {
  3602. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3603. },
  3604. {
  3605. "$ref": "#/components/schemas/InvalidRequestError"
  3606. }
  3607. ]
  3608. }
  3609. }
  3610. }
  3611. },
  3612. "404": {
  3613. "description": "Not found",
  3614. "content": {
  3615. "application/json": {
  3616. "schema": {
  3617. "$ref": "#/components/schemas/NotFoundError"
  3618. }
  3619. }
  3620. }
  3621. }
  3622. },
  3623. "description": "Update project properties such as name, icon, and commands.",
  3624. "summary": "Update project",
  3625. "requestBody": {
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "type": "object",
  3630. "properties": {
  3631. "name": {
  3632. "type": "string"
  3633. },
  3634. "icon": {
  3635. "type": "object",
  3636. "properties": {
  3637. "url": {
  3638. "type": "string"
  3639. },
  3640. "override": {
  3641. "type": "string"
  3642. },
  3643. "color": {
  3644. "type": "string"
  3645. }
  3646. },
  3647. "additionalProperties": false
  3648. },
  3649. "commands": {
  3650. "type": "object",
  3651. "properties": {
  3652. "start": {
  3653. "type": "string",
  3654. "description": "Startup script to run when creating a new workspace (worktree)"
  3655. }
  3656. },
  3657. "additionalProperties": false
  3658. }
  3659. },
  3660. "additionalProperties": false
  3661. }
  3662. }
  3663. }
  3664. },
  3665. "x-codeSamples": [
  3666. {
  3667. "lang": "js",
  3668. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3669. }
  3670. ]
  3671. }
  3672. },
  3673. "/pty/shells": {
  3674. "get": {
  3675. "tags": ["pty"],
  3676. "operationId": "pty.shells",
  3677. "parameters": [
  3678. {
  3679. "name": "directory",
  3680. "in": "query",
  3681. "schema": {
  3682. "type": "string"
  3683. },
  3684. "required": false
  3685. },
  3686. {
  3687. "name": "workspace",
  3688. "in": "query",
  3689. "schema": {
  3690. "type": "string"
  3691. },
  3692. "required": false
  3693. }
  3694. ],
  3695. "responses": {
  3696. "200": {
  3697. "description": "List of shells",
  3698. "content": {
  3699. "application/json": {
  3700. "schema": {
  3701. "type": "array",
  3702. "items": {
  3703. "type": "object",
  3704. "properties": {
  3705. "path": {
  3706. "type": "string"
  3707. },
  3708. "name": {
  3709. "type": "string"
  3710. },
  3711. "acceptable": {
  3712. "type": "boolean"
  3713. }
  3714. },
  3715. "required": ["path", "name", "acceptable"],
  3716. "additionalProperties": false
  3717. },
  3718. "description": "List of shells"
  3719. }
  3720. }
  3721. }
  3722. },
  3723. "400": {
  3724. "description": "Bad request",
  3725. "content": {
  3726. "application/json": {
  3727. "schema": {
  3728. "$ref": "#/components/schemas/BadRequestError"
  3729. }
  3730. }
  3731. }
  3732. }
  3733. },
  3734. "description": "Get a list of available shells on the system.",
  3735. "summary": "List available shells",
  3736. "x-codeSamples": [
  3737. {
  3738. "lang": "js",
  3739. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3740. }
  3741. ]
  3742. }
  3743. },
  3744. "/pty": {
  3745. "get": {
  3746. "tags": ["pty"],
  3747. "operationId": "pty.list",
  3748. "parameters": [
  3749. {
  3750. "name": "directory",
  3751. "in": "query",
  3752. "schema": {
  3753. "type": "string"
  3754. },
  3755. "required": false
  3756. },
  3757. {
  3758. "name": "workspace",
  3759. "in": "query",
  3760. "schema": {
  3761. "type": "string"
  3762. },
  3763. "required": false
  3764. }
  3765. ],
  3766. "responses": {
  3767. "200": {
  3768. "description": "List of sessions",
  3769. "content": {
  3770. "application/json": {
  3771. "schema": {
  3772. "type": "array",
  3773. "items": {
  3774. "$ref": "#/components/schemas/Pty"
  3775. },
  3776. "description": "List of sessions"
  3777. }
  3778. }
  3779. }
  3780. },
  3781. "400": {
  3782. "description": "Bad request",
  3783. "content": {
  3784. "application/json": {
  3785. "schema": {
  3786. "$ref": "#/components/schemas/BadRequestError"
  3787. }
  3788. }
  3789. }
  3790. }
  3791. },
  3792. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3793. "summary": "List PTY sessions",
  3794. "x-codeSamples": [
  3795. {
  3796. "lang": "js",
  3797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3798. }
  3799. ]
  3800. },
  3801. "post": {
  3802. "tags": ["pty"],
  3803. "operationId": "pty.create",
  3804. "parameters": [
  3805. {
  3806. "name": "directory",
  3807. "in": "query",
  3808. "schema": {
  3809. "type": "string"
  3810. },
  3811. "required": false
  3812. },
  3813. {
  3814. "name": "workspace",
  3815. "in": "query",
  3816. "schema": {
  3817. "type": "string"
  3818. },
  3819. "required": false
  3820. }
  3821. ],
  3822. "responses": {
  3823. "200": {
  3824. "description": "Created session",
  3825. "content": {
  3826. "application/json": {
  3827. "schema": {
  3828. "$ref": "#/components/schemas/Pty"
  3829. }
  3830. }
  3831. }
  3832. },
  3833. "400": {
  3834. "description": "BadRequest | InvalidRequestError",
  3835. "content": {
  3836. "application/json": {
  3837. "schema": {
  3838. "anyOf": [
  3839. {
  3840. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3841. },
  3842. {
  3843. "$ref": "#/components/schemas/InvalidRequestError"
  3844. }
  3845. ]
  3846. }
  3847. }
  3848. }
  3849. }
  3850. },
  3851. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3852. "summary": "Create PTY session",
  3853. "requestBody": {
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "type": "object",
  3858. "properties": {
  3859. "command": {
  3860. "type": "string"
  3861. },
  3862. "args": {
  3863. "type": "array",
  3864. "items": {
  3865. "type": "string"
  3866. }
  3867. },
  3868. "cwd": {
  3869. "type": "string"
  3870. },
  3871. "title": {
  3872. "type": "string"
  3873. },
  3874. "env": {
  3875. "type": "object",
  3876. "additionalProperties": {
  3877. "type": "string"
  3878. }
  3879. }
  3880. },
  3881. "additionalProperties": false
  3882. }
  3883. }
  3884. }
  3885. },
  3886. "x-codeSamples": [
  3887. {
  3888. "lang": "js",
  3889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3890. }
  3891. ]
  3892. }
  3893. },
  3894. "/pty/{ptyID}": {
  3895. "get": {
  3896. "tags": ["pty"],
  3897. "operationId": "pty.get",
  3898. "parameters": [
  3899. {
  3900. "name": "ptyID",
  3901. "in": "path",
  3902. "schema": {
  3903. "type": "string",
  3904. "pattern": "^pty"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "directory",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. },
  3916. {
  3917. "name": "workspace",
  3918. "in": "query",
  3919. "schema": {
  3920. "type": "string"
  3921. },
  3922. "required": false
  3923. }
  3924. ],
  3925. "responses": {
  3926. "200": {
  3927. "description": "Session info",
  3928. "content": {
  3929. "application/json": {
  3930. "schema": {
  3931. "$ref": "#/components/schemas/Pty"
  3932. }
  3933. }
  3934. }
  3935. },
  3936. "400": {
  3937. "description": "Bad request",
  3938. "content": {
  3939. "application/json": {
  3940. "schema": {
  3941. "$ref": "#/components/schemas/BadRequestError"
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "404": {
  3947. "description": "NotFoundError",
  3948. "content": {
  3949. "application/json": {
  3950. "schema": {
  3951. "$ref": "#/components/schemas/NotFoundError"
  3952. }
  3953. }
  3954. }
  3955. }
  3956. },
  3957. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3958. "summary": "Get PTY session",
  3959. "x-codeSamples": [
  3960. {
  3961. "lang": "js",
  3962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3963. }
  3964. ]
  3965. },
  3966. "put": {
  3967. "tags": ["pty"],
  3968. "operationId": "pty.update",
  3969. "parameters": [
  3970. {
  3971. "name": "ptyID",
  3972. "in": "path",
  3973. "schema": {
  3974. "type": "string",
  3975. "pattern": "^pty"
  3976. },
  3977. "required": true
  3978. },
  3979. {
  3980. "name": "directory",
  3981. "in": "query",
  3982. "schema": {
  3983. "type": "string"
  3984. },
  3985. "required": false
  3986. },
  3987. {
  3988. "name": "workspace",
  3989. "in": "query",
  3990. "schema": {
  3991. "type": "string"
  3992. },
  3993. "required": false
  3994. }
  3995. ],
  3996. "responses": {
  3997. "200": {
  3998. "description": "Updated session",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/Pty"
  4003. }
  4004. }
  4005. }
  4006. },
  4007. "400": {
  4008. "description": "BadRequest | InvalidRequestError",
  4009. "content": {
  4010. "application/json": {
  4011. "schema": {
  4012. "anyOf": [
  4013. {
  4014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4015. },
  4016. {
  4017. "$ref": "#/components/schemas/InvalidRequestError"
  4018. }
  4019. ]
  4020. }
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4026. "summary": "Update PTY session",
  4027. "requestBody": {
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "type": "object",
  4032. "properties": {
  4033. "title": {
  4034. "type": "string"
  4035. },
  4036. "size": {
  4037. "type": "object",
  4038. "properties": {
  4039. "rows": {
  4040. "type": "integer",
  4041. "exclusiveMinimum": 0
  4042. },
  4043. "cols": {
  4044. "type": "integer",
  4045. "exclusiveMinimum": 0
  4046. }
  4047. },
  4048. "required": ["rows", "cols"],
  4049. "additionalProperties": false
  4050. }
  4051. },
  4052. "additionalProperties": false
  4053. }
  4054. }
  4055. }
  4056. },
  4057. "x-codeSamples": [
  4058. {
  4059. "lang": "js",
  4060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4061. }
  4062. ]
  4063. },
  4064. "delete": {
  4065. "tags": ["pty"],
  4066. "operationId": "pty.remove",
  4067. "parameters": [
  4068. {
  4069. "name": "ptyID",
  4070. "in": "path",
  4071. "schema": {
  4072. "type": "string",
  4073. "pattern": "^pty"
  4074. },
  4075. "required": true
  4076. },
  4077. {
  4078. "name": "directory",
  4079. "in": "query",
  4080. "schema": {
  4081. "type": "string"
  4082. },
  4083. "required": false
  4084. },
  4085. {
  4086. "name": "workspace",
  4087. "in": "query",
  4088. "schema": {
  4089. "type": "string"
  4090. },
  4091. "required": false
  4092. }
  4093. ],
  4094. "responses": {
  4095. "200": {
  4096. "description": "Session removed",
  4097. "content": {
  4098. "application/json": {
  4099. "schema": {
  4100. "type": "boolean",
  4101. "description": "Session removed"
  4102. }
  4103. }
  4104. }
  4105. },
  4106. "400": {
  4107. "description": "Bad request",
  4108. "content": {
  4109. "application/json": {
  4110. "schema": {
  4111. "$ref": "#/components/schemas/BadRequestError"
  4112. }
  4113. }
  4114. }
  4115. },
  4116. "404": {
  4117. "description": "NotFoundError",
  4118. "content": {
  4119. "application/json": {
  4120. "schema": {
  4121. "$ref": "#/components/schemas/NotFoundError"
  4122. }
  4123. }
  4124. }
  4125. }
  4126. },
  4127. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4128. "summary": "Remove PTY session",
  4129. "x-codeSamples": [
  4130. {
  4131. "lang": "js",
  4132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4133. }
  4134. ]
  4135. }
  4136. },
  4137. "/pty/{ptyID}/connect-token": {
  4138. "post": {
  4139. "tags": ["pty"],
  4140. "operationId": "pty.connectToken",
  4141. "parameters": [
  4142. {
  4143. "name": "ptyID",
  4144. "in": "path",
  4145. "schema": {
  4146. "type": "string",
  4147. "pattern": "^pty"
  4148. },
  4149. "required": true
  4150. },
  4151. {
  4152. "name": "directory",
  4153. "in": "query",
  4154. "schema": {
  4155. "type": "string"
  4156. },
  4157. "required": false
  4158. },
  4159. {
  4160. "name": "workspace",
  4161. "in": "query",
  4162. "schema": {
  4163. "type": "string"
  4164. },
  4165. "required": false
  4166. }
  4167. ],
  4168. "responses": {
  4169. "200": {
  4170. "description": "WebSocket connect token",
  4171. "content": {
  4172. "application/json": {
  4173. "schema": {
  4174. "type": "object",
  4175. "properties": {
  4176. "ticket": {
  4177. "type": "string"
  4178. },
  4179. "expires_in": {
  4180. "type": "integer",
  4181. "exclusiveMinimum": 0
  4182. }
  4183. },
  4184. "required": ["ticket", "expires_in"],
  4185. "additionalProperties": false,
  4186. "description": "WebSocket connect token"
  4187. }
  4188. }
  4189. }
  4190. },
  4191. "400": {
  4192. "description": "Bad request",
  4193. "content": {
  4194. "application/json": {
  4195. "schema": {
  4196. "$ref": "#/components/schemas/BadRequestError"
  4197. }
  4198. }
  4199. }
  4200. },
  4201. "403": {
  4202. "description": "Forbidden",
  4203. "content": {
  4204. "application/json": {
  4205. "schema": {
  4206. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "404": {
  4212. "description": "NotFoundError",
  4213. "content": {
  4214. "application/json": {
  4215. "schema": {
  4216. "$ref": "#/components/schemas/NotFoundError"
  4217. }
  4218. }
  4219. }
  4220. }
  4221. },
  4222. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4223. "summary": "Create PTY WebSocket token",
  4224. "x-codeSamples": [
  4225. {
  4226. "lang": "js",
  4227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4228. }
  4229. ]
  4230. }
  4231. },
  4232. "/question": {
  4233. "get": {
  4234. "tags": ["question"],
  4235. "operationId": "question.list",
  4236. "parameters": [
  4237. {
  4238. "name": "directory",
  4239. "in": "query",
  4240. "schema": {
  4241. "type": "string"
  4242. },
  4243. "required": false
  4244. },
  4245. {
  4246. "name": "workspace",
  4247. "in": "query",
  4248. "schema": {
  4249. "type": "string"
  4250. },
  4251. "required": false
  4252. }
  4253. ],
  4254. "responses": {
  4255. "200": {
  4256. "description": "List of pending questions",
  4257. "content": {
  4258. "application/json": {
  4259. "schema": {
  4260. "type": "array",
  4261. "items": {
  4262. "$ref": "#/components/schemas/QuestionRequest"
  4263. },
  4264. "description": "List of pending questions"
  4265. }
  4266. }
  4267. }
  4268. },
  4269. "400": {
  4270. "description": "Bad request",
  4271. "content": {
  4272. "application/json": {
  4273. "schema": {
  4274. "$ref": "#/components/schemas/BadRequestError"
  4275. }
  4276. }
  4277. }
  4278. }
  4279. },
  4280. "description": "Get all pending question requests across all sessions.",
  4281. "summary": "List pending questions",
  4282. "x-codeSamples": [
  4283. {
  4284. "lang": "js",
  4285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4286. }
  4287. ]
  4288. }
  4289. },
  4290. "/question/{requestID}/reply": {
  4291. "post": {
  4292. "tags": ["question"],
  4293. "operationId": "question.reply",
  4294. "parameters": [
  4295. {
  4296. "name": "requestID",
  4297. "in": "path",
  4298. "schema": {
  4299. "type": "string",
  4300. "pattern": "^que"
  4301. },
  4302. "required": true
  4303. },
  4304. {
  4305. "name": "directory",
  4306. "in": "query",
  4307. "schema": {
  4308. "type": "string"
  4309. },
  4310. "required": false
  4311. },
  4312. {
  4313. "name": "workspace",
  4314. "in": "query",
  4315. "schema": {
  4316. "type": "string"
  4317. },
  4318. "required": false
  4319. }
  4320. ],
  4321. "responses": {
  4322. "200": {
  4323. "description": "Question answered successfully",
  4324. "content": {
  4325. "application/json": {
  4326. "schema": {
  4327. "type": "boolean",
  4328. "description": "Question answered successfully"
  4329. }
  4330. }
  4331. }
  4332. },
  4333. "400": {
  4334. "description": "BadRequest | InvalidRequestError",
  4335. "content": {
  4336. "application/json": {
  4337. "schema": {
  4338. "anyOf": [
  4339. {
  4340. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4341. },
  4342. {
  4343. "$ref": "#/components/schemas/InvalidRequestError"
  4344. }
  4345. ]
  4346. }
  4347. }
  4348. }
  4349. },
  4350. "404": {
  4351. "description": "Not found",
  4352. "content": {
  4353. "application/json": {
  4354. "schema": {
  4355. "$ref": "#/components/schemas/NotFoundError"
  4356. }
  4357. }
  4358. }
  4359. }
  4360. },
  4361. "description": "Provide answers to a question request from the AI assistant.",
  4362. "summary": "Reply to question request",
  4363. "requestBody": {
  4364. "content": {
  4365. "application/json": {
  4366. "schema": {
  4367. "type": "object",
  4368. "properties": {
  4369. "answers": {
  4370. "type": "array",
  4371. "items": {
  4372. "$ref": "#/components/schemas/QuestionAnswer"
  4373. },
  4374. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4375. }
  4376. },
  4377. "required": ["answers"],
  4378. "additionalProperties": false
  4379. }
  4380. }
  4381. }
  4382. },
  4383. "x-codeSamples": [
  4384. {
  4385. "lang": "js",
  4386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4387. }
  4388. ]
  4389. }
  4390. },
  4391. "/question/{requestID}/reject": {
  4392. "post": {
  4393. "tags": ["question"],
  4394. "operationId": "question.reject",
  4395. "parameters": [
  4396. {
  4397. "name": "requestID",
  4398. "in": "path",
  4399. "schema": {
  4400. "type": "string",
  4401. "pattern": "^que"
  4402. },
  4403. "required": true
  4404. },
  4405. {
  4406. "name": "directory",
  4407. "in": "query",
  4408. "schema": {
  4409. "type": "string"
  4410. },
  4411. "required": false
  4412. },
  4413. {
  4414. "name": "workspace",
  4415. "in": "query",
  4416. "schema": {
  4417. "type": "string"
  4418. },
  4419. "required": false
  4420. }
  4421. ],
  4422. "responses": {
  4423. "200": {
  4424. "description": "Question rejected successfully",
  4425. "content": {
  4426. "application/json": {
  4427. "schema": {
  4428. "type": "boolean",
  4429. "description": "Question rejected successfully"
  4430. }
  4431. }
  4432. }
  4433. },
  4434. "400": {
  4435. "description": "BadRequest | InvalidRequestError",
  4436. "content": {
  4437. "application/json": {
  4438. "schema": {
  4439. "anyOf": [
  4440. {
  4441. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4442. },
  4443. {
  4444. "$ref": "#/components/schemas/InvalidRequestError"
  4445. }
  4446. ]
  4447. }
  4448. }
  4449. }
  4450. },
  4451. "404": {
  4452. "description": "Not found",
  4453. "content": {
  4454. "application/json": {
  4455. "schema": {
  4456. "$ref": "#/components/schemas/NotFoundError"
  4457. }
  4458. }
  4459. }
  4460. }
  4461. },
  4462. "description": "Reject a question request from the AI assistant.",
  4463. "summary": "Reject question request",
  4464. "x-codeSamples": [
  4465. {
  4466. "lang": "js",
  4467. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4468. }
  4469. ]
  4470. }
  4471. },
  4472. "/permission": {
  4473. "get": {
  4474. "tags": ["permission"],
  4475. "operationId": "permission.list",
  4476. "parameters": [
  4477. {
  4478. "name": "directory",
  4479. "in": "query",
  4480. "schema": {
  4481. "type": "string"
  4482. },
  4483. "required": false
  4484. },
  4485. {
  4486. "name": "workspace",
  4487. "in": "query",
  4488. "schema": {
  4489. "type": "string"
  4490. },
  4491. "required": false
  4492. }
  4493. ],
  4494. "responses": {
  4495. "200": {
  4496. "description": "List of pending permissions",
  4497. "content": {
  4498. "application/json": {
  4499. "schema": {
  4500. "type": "array",
  4501. "items": {
  4502. "$ref": "#/components/schemas/PermissionRequest"
  4503. },
  4504. "description": "List of pending permissions"
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "400": {
  4510. "description": "Bad request",
  4511. "content": {
  4512. "application/json": {
  4513. "schema": {
  4514. "$ref": "#/components/schemas/BadRequestError"
  4515. }
  4516. }
  4517. }
  4518. }
  4519. },
  4520. "description": "Get all pending permission requests across all sessions.",
  4521. "summary": "List pending permissions",
  4522. "x-codeSamples": [
  4523. {
  4524. "lang": "js",
  4525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4526. }
  4527. ]
  4528. }
  4529. },
  4530. "/permission/{requestID}/reply": {
  4531. "post": {
  4532. "tags": ["permission"],
  4533. "operationId": "permission.reply",
  4534. "parameters": [
  4535. {
  4536. "name": "requestID",
  4537. "in": "path",
  4538. "schema": {
  4539. "type": "string",
  4540. "pattern": "^per"
  4541. },
  4542. "required": true
  4543. },
  4544. {
  4545. "name": "directory",
  4546. "in": "query",
  4547. "schema": {
  4548. "type": "string"
  4549. },
  4550. "required": false
  4551. },
  4552. {
  4553. "name": "workspace",
  4554. "in": "query",
  4555. "schema": {
  4556. "type": "string"
  4557. },
  4558. "required": false
  4559. }
  4560. ],
  4561. "responses": {
  4562. "200": {
  4563. "description": "Permission processed successfully",
  4564. "content": {
  4565. "application/json": {
  4566. "schema": {
  4567. "type": "boolean",
  4568. "description": "Permission processed successfully"
  4569. }
  4570. }
  4571. }
  4572. },
  4573. "400": {
  4574. "description": "BadRequest | InvalidRequestError",
  4575. "content": {
  4576. "application/json": {
  4577. "schema": {
  4578. "anyOf": [
  4579. {
  4580. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4581. },
  4582. {
  4583. "$ref": "#/components/schemas/InvalidRequestError"
  4584. }
  4585. ]
  4586. }
  4587. }
  4588. }
  4589. },
  4590. "404": {
  4591. "description": "Not found",
  4592. "content": {
  4593. "application/json": {
  4594. "schema": {
  4595. "$ref": "#/components/schemas/NotFoundError"
  4596. }
  4597. }
  4598. }
  4599. }
  4600. },
  4601. "description": "Approve or deny a permission request from the AI assistant.",
  4602. "summary": "Respond to permission request",
  4603. "requestBody": {
  4604. "content": {
  4605. "application/json": {
  4606. "schema": {
  4607. "type": "object",
  4608. "properties": {
  4609. "reply": {
  4610. "type": "string",
  4611. "enum": ["once", "always", "reject"]
  4612. },
  4613. "message": {
  4614. "type": "string"
  4615. }
  4616. },
  4617. "required": ["reply"],
  4618. "additionalProperties": false
  4619. }
  4620. }
  4621. }
  4622. },
  4623. "x-codeSamples": [
  4624. {
  4625. "lang": "js",
  4626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4627. }
  4628. ]
  4629. }
  4630. },
  4631. "/provider": {
  4632. "get": {
  4633. "tags": ["provider"],
  4634. "operationId": "provider.list",
  4635. "parameters": [
  4636. {
  4637. "name": "directory",
  4638. "in": "query",
  4639. "schema": {
  4640. "type": "string"
  4641. },
  4642. "required": false
  4643. },
  4644. {
  4645. "name": "workspace",
  4646. "in": "query",
  4647. "schema": {
  4648. "type": "string"
  4649. },
  4650. "required": false
  4651. }
  4652. ],
  4653. "responses": {
  4654. "200": {
  4655. "description": "List of providers",
  4656. "content": {
  4657. "application/json": {
  4658. "schema": {
  4659. "type": "object",
  4660. "properties": {
  4661. "all": {
  4662. "type": "array",
  4663. "items": {
  4664. "$ref": "#/components/schemas/Provider"
  4665. }
  4666. },
  4667. "default": {
  4668. "type": "object",
  4669. "additionalProperties": {
  4670. "type": "string"
  4671. }
  4672. },
  4673. "connected": {
  4674. "type": "array",
  4675. "items": {
  4676. "type": "string"
  4677. }
  4678. }
  4679. },
  4680. "required": ["all", "default", "connected"],
  4681. "additionalProperties": false,
  4682. "description": "List of providers"
  4683. }
  4684. }
  4685. }
  4686. },
  4687. "400": {
  4688. "description": "Bad request",
  4689. "content": {
  4690. "application/json": {
  4691. "schema": {
  4692. "$ref": "#/components/schemas/BadRequestError"
  4693. }
  4694. }
  4695. }
  4696. }
  4697. },
  4698. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4699. "summary": "List providers",
  4700. "x-codeSamples": [
  4701. {
  4702. "lang": "js",
  4703. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4704. }
  4705. ]
  4706. }
  4707. },
  4708. "/provider/auth": {
  4709. "get": {
  4710. "tags": ["provider"],
  4711. "operationId": "provider.auth",
  4712. "parameters": [
  4713. {
  4714. "name": "directory",
  4715. "in": "query",
  4716. "schema": {
  4717. "type": "string"
  4718. },
  4719. "required": false
  4720. },
  4721. {
  4722. "name": "workspace",
  4723. "in": "query",
  4724. "schema": {
  4725. "type": "string"
  4726. },
  4727. "required": false
  4728. }
  4729. ],
  4730. "responses": {
  4731. "200": {
  4732. "description": "Provider auth methods",
  4733. "content": {
  4734. "application/json": {
  4735. "schema": {
  4736. "type": "object",
  4737. "additionalProperties": {
  4738. "type": "array",
  4739. "items": {
  4740. "$ref": "#/components/schemas/ProviderAuthMethod"
  4741. }
  4742. },
  4743. "description": "Provider auth methods"
  4744. }
  4745. }
  4746. }
  4747. },
  4748. "400": {
  4749. "description": "Bad request",
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "$ref": "#/components/schemas/BadRequestError"
  4754. }
  4755. }
  4756. }
  4757. }
  4758. },
  4759. "description": "Retrieve available authentication methods for all AI providers.",
  4760. "summary": "Get provider auth methods",
  4761. "x-codeSamples": [
  4762. {
  4763. "lang": "js",
  4764. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4765. }
  4766. ]
  4767. }
  4768. },
  4769. "/provider/{providerID}/oauth/authorize": {
  4770. "post": {
  4771. "tags": ["provider"],
  4772. "operationId": "provider.oauth.authorize",
  4773. "parameters": [
  4774. {
  4775. "name": "providerID",
  4776. "in": "path",
  4777. "schema": {
  4778. "type": "string"
  4779. },
  4780. "required": true
  4781. },
  4782. {
  4783. "name": "directory",
  4784. "in": "query",
  4785. "schema": {
  4786. "type": "string"
  4787. },
  4788. "required": false
  4789. },
  4790. {
  4791. "name": "workspace",
  4792. "in": "query",
  4793. "schema": {
  4794. "type": "string"
  4795. },
  4796. "required": false
  4797. }
  4798. ],
  4799. "responses": {
  4800. "200": {
  4801. "description": "Authorization URL and method",
  4802. "content": {
  4803. "application/json": {
  4804. "schema": {
  4805. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4806. }
  4807. }
  4808. }
  4809. },
  4810. "400": {
  4811. "description": "ProviderAuthError | InvalidRequestError",
  4812. "content": {
  4813. "application/json": {
  4814. "schema": {
  4815. "anyOf": [
  4816. {
  4817. "$ref": "#/components/schemas/ProviderAuthError1"
  4818. },
  4819. {
  4820. "$ref": "#/components/schemas/InvalidRequestError"
  4821. }
  4822. ]
  4823. }
  4824. }
  4825. }
  4826. }
  4827. },
  4828. "description": "Start the OAuth authorization flow for a provider.",
  4829. "summary": "Start OAuth authorization",
  4830. "requestBody": {
  4831. "content": {
  4832. "application/json": {
  4833. "schema": {
  4834. "type": "object",
  4835. "properties": {
  4836. "method": {
  4837. "type": "number",
  4838. "description": "Auth method index"
  4839. },
  4840. "inputs": {
  4841. "type": "object",
  4842. "additionalProperties": {
  4843. "type": "string"
  4844. }
  4845. }
  4846. },
  4847. "required": ["method"],
  4848. "additionalProperties": false
  4849. }
  4850. }
  4851. }
  4852. },
  4853. "x-codeSamples": [
  4854. {
  4855. "lang": "js",
  4856. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4857. }
  4858. ]
  4859. }
  4860. },
  4861. "/provider/{providerID}/oauth/callback": {
  4862. "post": {
  4863. "tags": ["provider"],
  4864. "operationId": "provider.oauth.callback",
  4865. "parameters": [
  4866. {
  4867. "name": "providerID",
  4868. "in": "path",
  4869. "schema": {
  4870. "type": "string"
  4871. },
  4872. "required": true
  4873. },
  4874. {
  4875. "name": "directory",
  4876. "in": "query",
  4877. "schema": {
  4878. "type": "string"
  4879. },
  4880. "required": false
  4881. },
  4882. {
  4883. "name": "workspace",
  4884. "in": "query",
  4885. "schema": {
  4886. "type": "string"
  4887. },
  4888. "required": false
  4889. }
  4890. ],
  4891. "responses": {
  4892. "200": {
  4893. "description": "OAuth callback processed successfully",
  4894. "content": {
  4895. "application/json": {
  4896. "schema": {
  4897. "type": "boolean",
  4898. "description": "OAuth callback processed successfully"
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "400": {
  4904. "description": "ProviderAuthError | InvalidRequestError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "anyOf": [
  4909. {
  4910. "$ref": "#/components/schemas/ProviderAuthError1"
  4911. },
  4912. {
  4913. "$ref": "#/components/schemas/InvalidRequestError"
  4914. }
  4915. ]
  4916. }
  4917. }
  4918. }
  4919. }
  4920. },
  4921. "description": "Handle the OAuth callback from a provider after user authorization.",
  4922. "summary": "Handle OAuth callback",
  4923. "requestBody": {
  4924. "content": {
  4925. "application/json": {
  4926. "schema": {
  4927. "type": "object",
  4928. "properties": {
  4929. "method": {
  4930. "type": "number",
  4931. "description": "Auth method index"
  4932. },
  4933. "code": {
  4934. "type": "string"
  4935. }
  4936. },
  4937. "required": ["method"],
  4938. "additionalProperties": false
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "x-codeSamples": [
  4944. {
  4945. "lang": "js",
  4946. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4947. }
  4948. ]
  4949. }
  4950. },
  4951. "/session": {
  4952. "get": {
  4953. "tags": ["session"],
  4954. "operationId": "session.list",
  4955. "parameters": [
  4956. {
  4957. "name": "directory",
  4958. "in": "query",
  4959. "schema": {
  4960. "type": "string"
  4961. },
  4962. "required": false
  4963. },
  4964. {
  4965. "name": "workspace",
  4966. "in": "query",
  4967. "schema": {
  4968. "type": "string"
  4969. },
  4970. "required": false
  4971. },
  4972. {
  4973. "name": "scope",
  4974. "in": "query",
  4975. "schema": {
  4976. "type": "string",
  4977. "enum": ["project"]
  4978. },
  4979. "required": false
  4980. },
  4981. {
  4982. "name": "path",
  4983. "in": "query",
  4984. "schema": {
  4985. "type": "string"
  4986. },
  4987. "required": false
  4988. },
  4989. {
  4990. "name": "roots",
  4991. "in": "query",
  4992. "schema": {
  4993. "anyOf": [
  4994. {
  4995. "type": "boolean"
  4996. },
  4997. {
  4998. "type": "string",
  4999. "enum": ["true", "false"]
  5000. }
  5001. ]
  5002. },
  5003. "required": false
  5004. },
  5005. {
  5006. "name": "start",
  5007. "in": "query",
  5008. "schema": {
  5009. "type": "number"
  5010. },
  5011. "required": false
  5012. },
  5013. {
  5014. "name": "search",
  5015. "in": "query",
  5016. "schema": {
  5017. "type": "string"
  5018. },
  5019. "required": false
  5020. },
  5021. {
  5022. "name": "limit",
  5023. "in": "query",
  5024. "schema": {
  5025. "type": "number"
  5026. },
  5027. "required": false
  5028. }
  5029. ],
  5030. "responses": {
  5031. "200": {
  5032. "description": "List of sessions",
  5033. "content": {
  5034. "application/json": {
  5035. "schema": {
  5036. "type": "array",
  5037. "items": {
  5038. "$ref": "#/components/schemas/Session"
  5039. },
  5040. "description": "List of sessions"
  5041. }
  5042. }
  5043. }
  5044. },
  5045. "400": {
  5046. "description": "Bad request",
  5047. "content": {
  5048. "application/json": {
  5049. "schema": {
  5050. "$ref": "#/components/schemas/BadRequestError"
  5051. }
  5052. }
  5053. }
  5054. }
  5055. },
  5056. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5057. "summary": "List sessions",
  5058. "x-codeSamples": [
  5059. {
  5060. "lang": "js",
  5061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5062. }
  5063. ]
  5064. },
  5065. "post": {
  5066. "tags": ["session"],
  5067. "operationId": "session.create",
  5068. "parameters": [
  5069. {
  5070. "name": "directory",
  5071. "in": "query",
  5072. "schema": {
  5073. "type": "string"
  5074. },
  5075. "required": false
  5076. },
  5077. {
  5078. "name": "workspace",
  5079. "in": "query",
  5080. "schema": {
  5081. "type": "string"
  5082. },
  5083. "required": false
  5084. }
  5085. ],
  5086. "responses": {
  5087. "200": {
  5088. "description": "Successfully created session",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/Session"
  5093. }
  5094. }
  5095. }
  5096. },
  5097. "400": {
  5098. "description": "BadRequest | InvalidRequestError",
  5099. "content": {
  5100. "application/json": {
  5101. "schema": {
  5102. "anyOf": [
  5103. {
  5104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5105. },
  5106. {
  5107. "$ref": "#/components/schemas/InvalidRequestError"
  5108. }
  5109. ]
  5110. }
  5111. }
  5112. }
  5113. }
  5114. },
  5115. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5116. "summary": "Create session",
  5117. "requestBody": {
  5118. "content": {
  5119. "application/json": {
  5120. "schema": {
  5121. "type": "object",
  5122. "properties": {
  5123. "parentID": {
  5124. "type": "string",
  5125. "pattern": "^ses"
  5126. },
  5127. "title": {
  5128. "type": "string"
  5129. },
  5130. "agent": {
  5131. "type": "string"
  5132. },
  5133. "model": {
  5134. "type": "object",
  5135. "properties": {
  5136. "id": {
  5137. "type": "string"
  5138. },
  5139. "providerID": {
  5140. "type": "string"
  5141. },
  5142. "variant": {
  5143. "type": "string"
  5144. }
  5145. },
  5146. "required": ["id", "providerID"],
  5147. "additionalProperties": false
  5148. },
  5149. "permission": {
  5150. "$ref": "#/components/schemas/PermissionRuleset"
  5151. },
  5152. "workspaceID": {
  5153. "type": "string",
  5154. "pattern": "^wrk"
  5155. }
  5156. },
  5157. "additionalProperties": false
  5158. }
  5159. }
  5160. }
  5161. },
  5162. "x-codeSamples": [
  5163. {
  5164. "lang": "js",
  5165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5166. }
  5167. ]
  5168. }
  5169. },
  5170. "/session/status": {
  5171. "get": {
  5172. "tags": ["session"],
  5173. "operationId": "session.status",
  5174. "parameters": [
  5175. {
  5176. "name": "directory",
  5177. "in": "query",
  5178. "schema": {
  5179. "type": "string"
  5180. },
  5181. "required": false
  5182. },
  5183. {
  5184. "name": "workspace",
  5185. "in": "query",
  5186. "schema": {
  5187. "type": "string"
  5188. },
  5189. "required": false
  5190. }
  5191. ],
  5192. "responses": {
  5193. "200": {
  5194. "description": "Get session status",
  5195. "content": {
  5196. "application/json": {
  5197. "schema": {
  5198. "type": "object",
  5199. "additionalProperties": {
  5200. "$ref": "#/components/schemas/SessionStatus"
  5201. },
  5202. "description": "Get session status"
  5203. }
  5204. }
  5205. }
  5206. },
  5207. "400": {
  5208. "description": "BadRequest | InvalidRequestError",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "anyOf": [
  5213. {
  5214. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5215. },
  5216. {
  5217. "$ref": "#/components/schemas/InvalidRequestError"
  5218. }
  5219. ]
  5220. }
  5221. }
  5222. }
  5223. }
  5224. },
  5225. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5226. "summary": "Get session status",
  5227. "x-codeSamples": [
  5228. {
  5229. "lang": "js",
  5230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5231. }
  5232. ]
  5233. }
  5234. },
  5235. "/session/{sessionID}": {
  5236. "get": {
  5237. "tags": ["session"],
  5238. "operationId": "session.get",
  5239. "parameters": [
  5240. {
  5241. "name": "sessionID",
  5242. "in": "path",
  5243. "schema": {
  5244. "type": "string",
  5245. "pattern": "^ses"
  5246. },
  5247. "required": true
  5248. },
  5249. {
  5250. "name": "directory",
  5251. "in": "query",
  5252. "schema": {
  5253. "type": "string"
  5254. },
  5255. "required": false
  5256. },
  5257. {
  5258. "name": "workspace",
  5259. "in": "query",
  5260. "schema": {
  5261. "type": "string"
  5262. },
  5263. "required": false
  5264. }
  5265. ],
  5266. "responses": {
  5267. "200": {
  5268. "description": "Get session",
  5269. "content": {
  5270. "application/json": {
  5271. "schema": {
  5272. "$ref": "#/components/schemas/Session"
  5273. }
  5274. }
  5275. }
  5276. },
  5277. "400": {
  5278. "description": "BadRequest | InvalidRequestError",
  5279. "content": {
  5280. "application/json": {
  5281. "schema": {
  5282. "anyOf": [
  5283. {
  5284. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5285. },
  5286. {
  5287. "$ref": "#/components/schemas/InvalidRequestError"
  5288. }
  5289. ]
  5290. }
  5291. }
  5292. }
  5293. },
  5294. "404": {
  5295. "description": "NotFoundError",
  5296. "content": {
  5297. "application/json": {
  5298. "schema": {
  5299. "$ref": "#/components/schemas/NotFoundError"
  5300. }
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "description": "Retrieve detailed information about a specific OpenCode session.",
  5306. "summary": "Get session",
  5307. "x-codeSamples": [
  5308. {
  5309. "lang": "js",
  5310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5311. }
  5312. ]
  5313. },
  5314. "delete": {
  5315. "tags": ["session"],
  5316. "operationId": "session.delete",
  5317. "parameters": [
  5318. {
  5319. "name": "sessionID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string",
  5323. "pattern": "^ses"
  5324. },
  5325. "required": true
  5326. },
  5327. {
  5328. "name": "directory",
  5329. "in": "query",
  5330. "schema": {
  5331. "type": "string"
  5332. },
  5333. "required": false
  5334. },
  5335. {
  5336. "name": "workspace",
  5337. "in": "query",
  5338. "schema": {
  5339. "type": "string"
  5340. },
  5341. "required": false
  5342. }
  5343. ],
  5344. "responses": {
  5345. "200": {
  5346. "description": "Successfully deleted session",
  5347. "content": {
  5348. "application/json": {
  5349. "schema": {
  5350. "type": "boolean",
  5351. "description": "Successfully deleted session"
  5352. }
  5353. }
  5354. }
  5355. },
  5356. "400": {
  5357. "description": "BadRequest | InvalidRequestError",
  5358. "content": {
  5359. "application/json": {
  5360. "schema": {
  5361. "anyOf": [
  5362. {
  5363. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5364. },
  5365. {
  5366. "$ref": "#/components/schemas/InvalidRequestError"
  5367. }
  5368. ]
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "404": {
  5374. "description": "NotFoundError",
  5375. "content": {
  5376. "application/json": {
  5377. "schema": {
  5378. "$ref": "#/components/schemas/NotFoundError"
  5379. }
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5385. "summary": "Delete session",
  5386. "x-codeSamples": [
  5387. {
  5388. "lang": "js",
  5389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5390. }
  5391. ]
  5392. },
  5393. "patch": {
  5394. "tags": ["session"],
  5395. "operationId": "session.update",
  5396. "parameters": [
  5397. {
  5398. "name": "sessionID",
  5399. "in": "path",
  5400. "schema": {
  5401. "type": "string",
  5402. "pattern": "^ses"
  5403. },
  5404. "required": true
  5405. },
  5406. {
  5407. "name": "directory",
  5408. "in": "query",
  5409. "schema": {
  5410. "type": "string"
  5411. },
  5412. "required": false
  5413. },
  5414. {
  5415. "name": "workspace",
  5416. "in": "query",
  5417. "schema": {
  5418. "type": "string"
  5419. },
  5420. "required": false
  5421. }
  5422. ],
  5423. "responses": {
  5424. "200": {
  5425. "description": "Successfully updated session",
  5426. "content": {
  5427. "application/json": {
  5428. "schema": {
  5429. "$ref": "#/components/schemas/Session"
  5430. }
  5431. }
  5432. }
  5433. },
  5434. "400": {
  5435. "description": "BadRequest | InvalidRequestError",
  5436. "content": {
  5437. "application/json": {
  5438. "schema": {
  5439. "anyOf": [
  5440. {
  5441. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5442. },
  5443. {
  5444. "$ref": "#/components/schemas/InvalidRequestError"
  5445. }
  5446. ]
  5447. }
  5448. }
  5449. }
  5450. },
  5451. "404": {
  5452. "description": "NotFoundError",
  5453. "content": {
  5454. "application/json": {
  5455. "schema": {
  5456. "$ref": "#/components/schemas/NotFoundError"
  5457. }
  5458. }
  5459. }
  5460. }
  5461. },
  5462. "description": "Update properties of an existing session, such as title or other metadata.",
  5463. "summary": "Update session",
  5464. "requestBody": {
  5465. "content": {
  5466. "application/json": {
  5467. "schema": {
  5468. "type": "object",
  5469. "properties": {
  5470. "title": {
  5471. "type": "string"
  5472. },
  5473. "permission": {
  5474. "$ref": "#/components/schemas/PermissionRuleset"
  5475. },
  5476. "time": {
  5477. "type": "object",
  5478. "properties": {
  5479. "archived": {
  5480. "type": "number"
  5481. }
  5482. },
  5483. "additionalProperties": false
  5484. }
  5485. },
  5486. "additionalProperties": false
  5487. }
  5488. }
  5489. }
  5490. },
  5491. "x-codeSamples": [
  5492. {
  5493. "lang": "js",
  5494. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5495. }
  5496. ]
  5497. }
  5498. },
  5499. "/session/{sessionID}/children": {
  5500. "get": {
  5501. "tags": ["session"],
  5502. "operationId": "session.children",
  5503. "parameters": [
  5504. {
  5505. "name": "sessionID",
  5506. "in": "path",
  5507. "schema": {
  5508. "type": "string",
  5509. "pattern": "^ses"
  5510. },
  5511. "required": true
  5512. },
  5513. {
  5514. "name": "directory",
  5515. "in": "query",
  5516. "schema": {
  5517. "type": "string"
  5518. },
  5519. "required": false
  5520. },
  5521. {
  5522. "name": "workspace",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. }
  5529. ],
  5530. "responses": {
  5531. "200": {
  5532. "description": "List of children",
  5533. "content": {
  5534. "application/json": {
  5535. "schema": {
  5536. "type": "array",
  5537. "items": {
  5538. "$ref": "#/components/schemas/Session"
  5539. },
  5540. "description": "List of children"
  5541. }
  5542. }
  5543. }
  5544. },
  5545. "400": {
  5546. "description": "BadRequest | InvalidRequestError",
  5547. "content": {
  5548. "application/json": {
  5549. "schema": {
  5550. "anyOf": [
  5551. {
  5552. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5553. },
  5554. {
  5555. "$ref": "#/components/schemas/InvalidRequestError"
  5556. }
  5557. ]
  5558. }
  5559. }
  5560. }
  5561. },
  5562. "404": {
  5563. "description": "NotFoundError",
  5564. "content": {
  5565. "application/json": {
  5566. "schema": {
  5567. "$ref": "#/components/schemas/NotFoundError"
  5568. }
  5569. }
  5570. }
  5571. }
  5572. },
  5573. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5574. "summary": "Get session children",
  5575. "x-codeSamples": [
  5576. {
  5577. "lang": "js",
  5578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5579. }
  5580. ]
  5581. }
  5582. },
  5583. "/session/{sessionID}/todo": {
  5584. "get": {
  5585. "tags": ["session"],
  5586. "operationId": "session.todo",
  5587. "parameters": [
  5588. {
  5589. "name": "sessionID",
  5590. "in": "path",
  5591. "schema": {
  5592. "type": "string",
  5593. "pattern": "^ses"
  5594. },
  5595. "required": true
  5596. },
  5597. {
  5598. "name": "directory",
  5599. "in": "query",
  5600. "schema": {
  5601. "type": "string"
  5602. },
  5603. "required": false
  5604. },
  5605. {
  5606. "name": "workspace",
  5607. "in": "query",
  5608. "schema": {
  5609. "type": "string"
  5610. },
  5611. "required": false
  5612. }
  5613. ],
  5614. "responses": {
  5615. "200": {
  5616. "description": "Todo list",
  5617. "content": {
  5618. "application/json": {
  5619. "schema": {
  5620. "type": "array",
  5621. "items": {
  5622. "$ref": "#/components/schemas/Todo"
  5623. },
  5624. "description": "Todo list"
  5625. }
  5626. }
  5627. }
  5628. },
  5629. "400": {
  5630. "description": "BadRequest | InvalidRequestError",
  5631. "content": {
  5632. "application/json": {
  5633. "schema": {
  5634. "anyOf": [
  5635. {
  5636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5637. },
  5638. {
  5639. "$ref": "#/components/schemas/InvalidRequestError"
  5640. }
  5641. ]
  5642. }
  5643. }
  5644. }
  5645. },
  5646. "404": {
  5647. "description": "NotFoundError",
  5648. "content": {
  5649. "application/json": {
  5650. "schema": {
  5651. "$ref": "#/components/schemas/NotFoundError"
  5652. }
  5653. }
  5654. }
  5655. }
  5656. },
  5657. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5658. "summary": "Get session todos",
  5659. "x-codeSamples": [
  5660. {
  5661. "lang": "js",
  5662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5663. }
  5664. ]
  5665. }
  5666. },
  5667. "/session/{sessionID}/diff": {
  5668. "get": {
  5669. "tags": ["session"],
  5670. "operationId": "session.diff",
  5671. "parameters": [
  5672. {
  5673. "name": "sessionID",
  5674. "in": "path",
  5675. "schema": {
  5676. "type": "string",
  5677. "pattern": "^ses"
  5678. },
  5679. "required": true
  5680. },
  5681. {
  5682. "name": "directory",
  5683. "in": "query",
  5684. "schema": {
  5685. "type": "string"
  5686. },
  5687. "required": false
  5688. },
  5689. {
  5690. "name": "workspace",
  5691. "in": "query",
  5692. "schema": {
  5693. "type": "string"
  5694. },
  5695. "required": false
  5696. },
  5697. {
  5698. "name": "messageID",
  5699. "in": "query",
  5700. "schema": {
  5701. "type": "string",
  5702. "pattern": "^msg"
  5703. },
  5704. "required": false
  5705. }
  5706. ],
  5707. "responses": {
  5708. "200": {
  5709. "description": "Successfully retrieved diff",
  5710. "content": {
  5711. "application/json": {
  5712. "schema": {
  5713. "type": "array",
  5714. "items": {
  5715. "$ref": "#/components/schemas/SnapshotFileDiff"
  5716. },
  5717. "description": "Successfully retrieved diff"
  5718. }
  5719. }
  5720. }
  5721. },
  5722. "400": {
  5723. "description": "Bad request",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/BadRequestError"
  5728. }
  5729. }
  5730. }
  5731. }
  5732. },
  5733. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5734. "summary": "Get message diff",
  5735. "x-codeSamples": [
  5736. {
  5737. "lang": "js",
  5738. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5739. }
  5740. ]
  5741. }
  5742. },
  5743. "/session/{sessionID}/message": {
  5744. "get": {
  5745. "tags": ["session"],
  5746. "operationId": "session.messages",
  5747. "parameters": [
  5748. {
  5749. "name": "sessionID",
  5750. "in": "path",
  5751. "schema": {
  5752. "type": "string",
  5753. "pattern": "^ses"
  5754. },
  5755. "required": true
  5756. },
  5757. {
  5758. "name": "directory",
  5759. "in": "query",
  5760. "schema": {
  5761. "type": "string"
  5762. },
  5763. "required": false
  5764. },
  5765. {
  5766. "name": "workspace",
  5767. "in": "query",
  5768. "schema": {
  5769. "type": "string"
  5770. },
  5771. "required": false
  5772. },
  5773. {
  5774. "name": "limit",
  5775. "in": "query",
  5776. "schema": {
  5777. "type": "integer",
  5778. "minimum": 0,
  5779. "maximum": 9007199254740991
  5780. },
  5781. "required": false
  5782. },
  5783. {
  5784. "name": "before",
  5785. "in": "query",
  5786. "schema": {
  5787. "type": "string"
  5788. },
  5789. "required": false
  5790. }
  5791. ],
  5792. "responses": {
  5793. "200": {
  5794. "description": "List of messages",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "type": "array",
  5799. "items": {
  5800. "type": "object",
  5801. "properties": {
  5802. "info": {
  5803. "$ref": "#/components/schemas/Message"
  5804. },
  5805. "parts": {
  5806. "type": "array",
  5807. "items": {
  5808. "$ref": "#/components/schemas/Part"
  5809. }
  5810. }
  5811. },
  5812. "required": ["info", "parts"],
  5813. "additionalProperties": false
  5814. },
  5815. "description": "List of messages"
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "400": {
  5821. "description": "BadRequest | InvalidRequestError",
  5822. "content": {
  5823. "application/json": {
  5824. "schema": {
  5825. "anyOf": [
  5826. {
  5827. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5828. },
  5829. {
  5830. "$ref": "#/components/schemas/InvalidRequestError"
  5831. }
  5832. ]
  5833. }
  5834. }
  5835. }
  5836. },
  5837. "404": {
  5838. "description": "NotFoundError",
  5839. "content": {
  5840. "application/json": {
  5841. "schema": {
  5842. "$ref": "#/components/schemas/NotFoundError"
  5843. }
  5844. }
  5845. }
  5846. }
  5847. },
  5848. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5849. "summary": "Get session messages",
  5850. "x-codeSamples": [
  5851. {
  5852. "lang": "js",
  5853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5854. }
  5855. ]
  5856. },
  5857. "post": {
  5858. "tags": ["session"],
  5859. "operationId": "session.prompt",
  5860. "parameters": [
  5861. {
  5862. "name": "sessionID",
  5863. "in": "path",
  5864. "schema": {
  5865. "type": "string",
  5866. "pattern": "^ses"
  5867. },
  5868. "required": true
  5869. },
  5870. {
  5871. "name": "directory",
  5872. "in": "query",
  5873. "schema": {
  5874. "type": "string"
  5875. },
  5876. "required": false
  5877. },
  5878. {
  5879. "name": "workspace",
  5880. "in": "query",
  5881. "schema": {
  5882. "type": "string"
  5883. },
  5884. "required": false
  5885. }
  5886. ],
  5887. "responses": {
  5888. "200": {
  5889. "description": "Created message",
  5890. "content": {
  5891. "application/json": {
  5892. "schema": {
  5893. "type": "object",
  5894. "required": ["info", "parts"],
  5895. "properties": {
  5896. "info": {
  5897. "$ref": "#/components/schemas/AssistantMessage"
  5898. },
  5899. "parts": {
  5900. "type": "array",
  5901. "items": {
  5902. "$ref": "#/components/schemas/Part"
  5903. }
  5904. }
  5905. }
  5906. }
  5907. }
  5908. }
  5909. },
  5910. "400": {
  5911. "description": "BadRequest | InvalidRequestError",
  5912. "content": {
  5913. "application/json": {
  5914. "schema": {
  5915. "anyOf": [
  5916. {
  5917. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5918. },
  5919. {
  5920. "$ref": "#/components/schemas/InvalidRequestError"
  5921. }
  5922. ]
  5923. }
  5924. }
  5925. }
  5926. },
  5927. "404": {
  5928. "description": "NotFoundError",
  5929. "content": {
  5930. "application/json": {
  5931. "schema": {
  5932. "$ref": "#/components/schemas/NotFoundError"
  5933. }
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "description": "Create and send a new message to a session, streaming the AI response.",
  5939. "summary": "Send message",
  5940. "requestBody": {
  5941. "content": {
  5942. "application/json": {
  5943. "schema": {
  5944. "type": "object",
  5945. "properties": {
  5946. "messageID": {
  5947. "type": "string",
  5948. "pattern": "^msg"
  5949. },
  5950. "model": {
  5951. "type": "object",
  5952. "properties": {
  5953. "providerID": {
  5954. "type": "string"
  5955. },
  5956. "modelID": {
  5957. "type": "string"
  5958. }
  5959. },
  5960. "required": ["providerID", "modelID"],
  5961. "additionalProperties": false
  5962. },
  5963. "agent": {
  5964. "type": "string"
  5965. },
  5966. "noReply": {
  5967. "type": "boolean"
  5968. },
  5969. "tools": {
  5970. "type": "object",
  5971. "additionalProperties": {
  5972. "type": "boolean"
  5973. }
  5974. },
  5975. "format": {
  5976. "$ref": "#/components/schemas/OutputFormat"
  5977. },
  5978. "system": {
  5979. "type": "string"
  5980. },
  5981. "variant": {
  5982. "type": "string"
  5983. },
  5984. "parts": {
  5985. "type": "array",
  5986. "items": {
  5987. "anyOf": [
  5988. {
  5989. "$ref": "#/components/schemas/TextPartInput"
  5990. },
  5991. {
  5992. "$ref": "#/components/schemas/FilePartInput"
  5993. },
  5994. {
  5995. "$ref": "#/components/schemas/AgentPartInput"
  5996. },
  5997. {
  5998. "$ref": "#/components/schemas/SubtaskPartInput"
  5999. }
  6000. ]
  6001. }
  6002. }
  6003. },
  6004. "required": ["parts"],
  6005. "additionalProperties": false
  6006. }
  6007. }
  6008. }
  6009. },
  6010. "x-codeSamples": [
  6011. {
  6012. "lang": "js",
  6013. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6014. }
  6015. ]
  6016. }
  6017. },
  6018. "/session/{sessionID}/message/{messageID}": {
  6019. "get": {
  6020. "tags": ["session"],
  6021. "operationId": "session.message",
  6022. "parameters": [
  6023. {
  6024. "name": "sessionID",
  6025. "in": "path",
  6026. "schema": {
  6027. "type": "string",
  6028. "pattern": "^ses"
  6029. },
  6030. "required": true
  6031. },
  6032. {
  6033. "name": "messageID",
  6034. "in": "path",
  6035. "schema": {
  6036. "type": "string",
  6037. "pattern": "^msg"
  6038. },
  6039. "required": true
  6040. },
  6041. {
  6042. "name": "directory",
  6043. "in": "query",
  6044. "schema": {
  6045. "type": "string"
  6046. },
  6047. "required": false
  6048. },
  6049. {
  6050. "name": "workspace",
  6051. "in": "query",
  6052. "schema": {
  6053. "type": "string"
  6054. },
  6055. "required": false
  6056. }
  6057. ],
  6058. "responses": {
  6059. "200": {
  6060. "description": "Message",
  6061. "content": {
  6062. "application/json": {
  6063. "schema": {
  6064. "type": "object",
  6065. "properties": {
  6066. "info": {
  6067. "$ref": "#/components/schemas/Message"
  6068. },
  6069. "parts": {
  6070. "type": "array",
  6071. "items": {
  6072. "$ref": "#/components/schemas/Part"
  6073. }
  6074. }
  6075. },
  6076. "required": ["info", "parts"],
  6077. "additionalProperties": false,
  6078. "description": "Message"
  6079. }
  6080. }
  6081. }
  6082. },
  6083. "400": {
  6084. "description": "BadRequest | InvalidRequestError",
  6085. "content": {
  6086. "application/json": {
  6087. "schema": {
  6088. "anyOf": [
  6089. {
  6090. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6091. },
  6092. {
  6093. "$ref": "#/components/schemas/InvalidRequestError"
  6094. }
  6095. ]
  6096. }
  6097. }
  6098. }
  6099. },
  6100. "404": {
  6101. "description": "NotFoundError",
  6102. "content": {
  6103. "application/json": {
  6104. "schema": {
  6105. "$ref": "#/components/schemas/NotFoundError"
  6106. }
  6107. }
  6108. }
  6109. }
  6110. },
  6111. "description": "Retrieve a specific message from a session by its message ID.",
  6112. "summary": "Get message",
  6113. "x-codeSamples": [
  6114. {
  6115. "lang": "js",
  6116. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6117. }
  6118. ]
  6119. },
  6120. "delete": {
  6121. "tags": ["session"],
  6122. "operationId": "session.deleteMessage",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "messageID",
  6135. "in": "path",
  6136. "schema": {
  6137. "type": "string",
  6138. "pattern": "^msg"
  6139. },
  6140. "required": true
  6141. },
  6142. {
  6143. "name": "directory",
  6144. "in": "query",
  6145. "schema": {
  6146. "type": "string"
  6147. },
  6148. "required": false
  6149. },
  6150. {
  6151. "name": "workspace",
  6152. "in": "query",
  6153. "schema": {
  6154. "type": "string"
  6155. },
  6156. "required": false
  6157. }
  6158. ],
  6159. "responses": {
  6160. "200": {
  6161. "description": "Successfully deleted message",
  6162. "content": {
  6163. "application/json": {
  6164. "schema": {
  6165. "type": "boolean",
  6166. "description": "Successfully deleted message"
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "400": {
  6172. "description": "BadRequest | InvalidRequestError",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "anyOf": [
  6177. {
  6178. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6179. },
  6180. {
  6181. "$ref": "#/components/schemas/InvalidRequestError"
  6182. }
  6183. ]
  6184. }
  6185. }
  6186. }
  6187. },
  6188. "404": {
  6189. "description": "NotFoundError",
  6190. "content": {
  6191. "application/json": {
  6192. "schema": {
  6193. "$ref": "#/components/schemas/NotFoundError"
  6194. }
  6195. }
  6196. }
  6197. }
  6198. },
  6199. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6200. "summary": "Delete message",
  6201. "x-codeSamples": [
  6202. {
  6203. "lang": "js",
  6204. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6205. }
  6206. ]
  6207. }
  6208. },
  6209. "/session/{sessionID}/fork": {
  6210. "post": {
  6211. "tags": ["session"],
  6212. "operationId": "session.fork",
  6213. "parameters": [
  6214. {
  6215. "name": "sessionID",
  6216. "in": "path",
  6217. "schema": {
  6218. "type": "string",
  6219. "pattern": "^ses"
  6220. },
  6221. "required": true
  6222. },
  6223. {
  6224. "name": "directory",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "workspace",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "string"
  6236. },
  6237. "required": false
  6238. }
  6239. ],
  6240. "responses": {
  6241. "200": {
  6242. "description": "200",
  6243. "content": {
  6244. "application/json": {
  6245. "schema": {
  6246. "$ref": "#/components/schemas/Session"
  6247. }
  6248. }
  6249. }
  6250. },
  6251. "400": {
  6252. "description": "BadRequest | InvalidRequestError",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "anyOf": [
  6257. {
  6258. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6259. },
  6260. {
  6261. "$ref": "#/components/schemas/InvalidRequestError"
  6262. }
  6263. ]
  6264. }
  6265. }
  6266. }
  6267. },
  6268. "404": {
  6269. "description": "NotFoundError",
  6270. "content": {
  6271. "application/json": {
  6272. "schema": {
  6273. "$ref": "#/components/schemas/NotFoundError"
  6274. }
  6275. }
  6276. }
  6277. }
  6278. },
  6279. "description": "Create a new session by forking an existing session at a specific message point.",
  6280. "summary": "Fork session",
  6281. "requestBody": {
  6282. "content": {
  6283. "application/json": {
  6284. "schema": {
  6285. "type": "object",
  6286. "properties": {
  6287. "messageID": {
  6288. "type": "string",
  6289. "pattern": "^msg"
  6290. }
  6291. },
  6292. "additionalProperties": false
  6293. }
  6294. }
  6295. }
  6296. },
  6297. "x-codeSamples": [
  6298. {
  6299. "lang": "js",
  6300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6301. }
  6302. ]
  6303. }
  6304. },
  6305. "/session/{sessionID}/abort": {
  6306. "post": {
  6307. "tags": ["session"],
  6308. "operationId": "session.abort",
  6309. "parameters": [
  6310. {
  6311. "name": "sessionID",
  6312. "in": "path",
  6313. "schema": {
  6314. "type": "string",
  6315. "pattern": "^ses"
  6316. },
  6317. "required": true
  6318. },
  6319. {
  6320. "name": "directory",
  6321. "in": "query",
  6322. "schema": {
  6323. "type": "string"
  6324. },
  6325. "required": false
  6326. },
  6327. {
  6328. "name": "workspace",
  6329. "in": "query",
  6330. "schema": {
  6331. "type": "string"
  6332. },
  6333. "required": false
  6334. }
  6335. ],
  6336. "responses": {
  6337. "200": {
  6338. "description": "Aborted session",
  6339. "content": {
  6340. "application/json": {
  6341. "schema": {
  6342. "type": "boolean",
  6343. "description": "Aborted session"
  6344. }
  6345. }
  6346. }
  6347. },
  6348. "400": {
  6349. "description": "BadRequest | InvalidRequestError",
  6350. "content": {
  6351. "application/json": {
  6352. "schema": {
  6353. "anyOf": [
  6354. {
  6355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6356. },
  6357. {
  6358. "$ref": "#/components/schemas/InvalidRequestError"
  6359. }
  6360. ]
  6361. }
  6362. }
  6363. }
  6364. }
  6365. },
  6366. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6367. "summary": "Abort session",
  6368. "x-codeSamples": [
  6369. {
  6370. "lang": "js",
  6371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6372. }
  6373. ]
  6374. }
  6375. },
  6376. "/session/{sessionID}/init": {
  6377. "post": {
  6378. "tags": ["session"],
  6379. "operationId": "session.init",
  6380. "parameters": [
  6381. {
  6382. "name": "sessionID",
  6383. "in": "path",
  6384. "schema": {
  6385. "type": "string",
  6386. "pattern": "^ses"
  6387. },
  6388. "required": true
  6389. },
  6390. {
  6391. "name": "directory",
  6392. "in": "query",
  6393. "schema": {
  6394. "type": "string"
  6395. },
  6396. "required": false
  6397. },
  6398. {
  6399. "name": "workspace",
  6400. "in": "query",
  6401. "schema": {
  6402. "type": "string"
  6403. },
  6404. "required": false
  6405. }
  6406. ],
  6407. "responses": {
  6408. "200": {
  6409. "description": "200",
  6410. "content": {
  6411. "application/json": {
  6412. "schema": {
  6413. "type": "boolean",
  6414. "description": "200"
  6415. }
  6416. }
  6417. }
  6418. },
  6419. "400": {
  6420. "description": "BadRequest | InvalidRequestError",
  6421. "content": {
  6422. "application/json": {
  6423. "schema": {
  6424. "anyOf": [
  6425. {
  6426. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6427. },
  6428. {
  6429. "$ref": "#/components/schemas/InvalidRequestError"
  6430. }
  6431. ]
  6432. }
  6433. }
  6434. }
  6435. },
  6436. "404": {
  6437. "description": "NotFoundError",
  6438. "content": {
  6439. "application/json": {
  6440. "schema": {
  6441. "$ref": "#/components/schemas/NotFoundError"
  6442. }
  6443. }
  6444. }
  6445. }
  6446. },
  6447. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6448. "summary": "Initialize session",
  6449. "requestBody": {
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "type": "object",
  6454. "properties": {
  6455. "modelID": {
  6456. "type": "string"
  6457. },
  6458. "providerID": {
  6459. "type": "string"
  6460. },
  6461. "messageID": {
  6462. "type": "string",
  6463. "pattern": "^msg"
  6464. }
  6465. },
  6466. "required": ["modelID", "providerID", "messageID"],
  6467. "additionalProperties": false
  6468. }
  6469. }
  6470. }
  6471. },
  6472. "x-codeSamples": [
  6473. {
  6474. "lang": "js",
  6475. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6476. }
  6477. ]
  6478. }
  6479. },
  6480. "/session/{sessionID}/share": {
  6481. "post": {
  6482. "tags": ["session"],
  6483. "operationId": "session.share",
  6484. "parameters": [
  6485. {
  6486. "name": "sessionID",
  6487. "in": "path",
  6488. "schema": {
  6489. "type": "string",
  6490. "pattern": "^ses"
  6491. },
  6492. "required": true
  6493. },
  6494. {
  6495. "name": "directory",
  6496. "in": "query",
  6497. "schema": {
  6498. "type": "string"
  6499. },
  6500. "required": false
  6501. },
  6502. {
  6503. "name": "workspace",
  6504. "in": "query",
  6505. "schema": {
  6506. "type": "string"
  6507. },
  6508. "required": false
  6509. }
  6510. ],
  6511. "responses": {
  6512. "200": {
  6513. "description": "Successfully shared session",
  6514. "content": {
  6515. "application/json": {
  6516. "schema": {
  6517. "$ref": "#/components/schemas/Session"
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "400": {
  6523. "description": "Bad request",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "$ref": "#/components/schemas/BadRequestError"
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "404": {
  6533. "description": "NotFoundError",
  6534. "content": {
  6535. "application/json": {
  6536. "schema": {
  6537. "$ref": "#/components/schemas/NotFoundError"
  6538. }
  6539. }
  6540. }
  6541. },
  6542. "500": {
  6543. "description": "InternalServerError",
  6544. "content": {
  6545. "application/json": {
  6546. "schema": {
  6547. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6548. }
  6549. }
  6550. }
  6551. }
  6552. },
  6553. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6554. "summary": "Share session",
  6555. "x-codeSamples": [
  6556. {
  6557. "lang": "js",
  6558. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6559. }
  6560. ]
  6561. },
  6562. "delete": {
  6563. "tags": ["session"],
  6564. "operationId": "session.unshare",
  6565. "parameters": [
  6566. {
  6567. "name": "sessionID",
  6568. "in": "path",
  6569. "schema": {
  6570. "type": "string",
  6571. "pattern": "^ses"
  6572. },
  6573. "required": true
  6574. },
  6575. {
  6576. "name": "directory",
  6577. "in": "query",
  6578. "schema": {
  6579. "type": "string"
  6580. },
  6581. "required": false
  6582. },
  6583. {
  6584. "name": "workspace",
  6585. "in": "query",
  6586. "schema": {
  6587. "type": "string"
  6588. },
  6589. "required": false
  6590. }
  6591. ],
  6592. "responses": {
  6593. "200": {
  6594. "description": "Successfully unshared session",
  6595. "content": {
  6596. "application/json": {
  6597. "schema": {
  6598. "$ref": "#/components/schemas/Session"
  6599. }
  6600. }
  6601. }
  6602. },
  6603. "400": {
  6604. "description": "Bad request",
  6605. "content": {
  6606. "application/json": {
  6607. "schema": {
  6608. "$ref": "#/components/schemas/BadRequestError"
  6609. }
  6610. }
  6611. }
  6612. },
  6613. "404": {
  6614. "description": "NotFoundError",
  6615. "content": {
  6616. "application/json": {
  6617. "schema": {
  6618. "$ref": "#/components/schemas/NotFoundError"
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "500": {
  6624. "description": "InternalServerError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Remove the shareable link for a session, making it private again.",
  6635. "summary": "Unshare session",
  6636. "x-codeSamples": [
  6637. {
  6638. "lang": "js",
  6639. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6640. }
  6641. ]
  6642. }
  6643. },
  6644. "/session/{sessionID}/summarize": {
  6645. "post": {
  6646. "tags": ["session"],
  6647. "operationId": "session.summarize",
  6648. "parameters": [
  6649. {
  6650. "name": "sessionID",
  6651. "in": "path",
  6652. "schema": {
  6653. "type": "string",
  6654. "pattern": "^ses"
  6655. },
  6656. "required": true
  6657. },
  6658. {
  6659. "name": "directory",
  6660. "in": "query",
  6661. "schema": {
  6662. "type": "string"
  6663. },
  6664. "required": false
  6665. },
  6666. {
  6667. "name": "workspace",
  6668. "in": "query",
  6669. "schema": {
  6670. "type": "string"
  6671. },
  6672. "required": false
  6673. }
  6674. ],
  6675. "responses": {
  6676. "200": {
  6677. "description": "Summarized session",
  6678. "content": {
  6679. "application/json": {
  6680. "schema": {
  6681. "type": "boolean",
  6682. "description": "Summarized session"
  6683. }
  6684. }
  6685. }
  6686. },
  6687. "400": {
  6688. "description": "BadRequest | InvalidRequestError",
  6689. "content": {
  6690. "application/json": {
  6691. "schema": {
  6692. "anyOf": [
  6693. {
  6694. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6695. },
  6696. {
  6697. "$ref": "#/components/schemas/InvalidRequestError"
  6698. }
  6699. ]
  6700. }
  6701. }
  6702. }
  6703. },
  6704. "404": {
  6705. "description": "NotFoundError",
  6706. "content": {
  6707. "application/json": {
  6708. "schema": {
  6709. "$ref": "#/components/schemas/NotFoundError"
  6710. }
  6711. }
  6712. }
  6713. }
  6714. },
  6715. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6716. "summary": "Summarize session",
  6717. "requestBody": {
  6718. "content": {
  6719. "application/json": {
  6720. "schema": {
  6721. "type": "object",
  6722. "properties": {
  6723. "providerID": {
  6724. "type": "string"
  6725. },
  6726. "modelID": {
  6727. "type": "string"
  6728. },
  6729. "auto": {
  6730. "type": "boolean"
  6731. }
  6732. },
  6733. "required": ["providerID", "modelID"],
  6734. "additionalProperties": false
  6735. }
  6736. }
  6737. }
  6738. },
  6739. "x-codeSamples": [
  6740. {
  6741. "lang": "js",
  6742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6743. }
  6744. ]
  6745. }
  6746. },
  6747. "/session/{sessionID}/prompt_async": {
  6748. "post": {
  6749. "tags": ["session"],
  6750. "operationId": "session.prompt_async",
  6751. "parameters": [
  6752. {
  6753. "name": "sessionID",
  6754. "in": "path",
  6755. "schema": {
  6756. "type": "string",
  6757. "pattern": "^ses"
  6758. },
  6759. "required": true
  6760. },
  6761. {
  6762. "name": "directory",
  6763. "in": "query",
  6764. "schema": {
  6765. "type": "string"
  6766. },
  6767. "required": false
  6768. },
  6769. {
  6770. "name": "workspace",
  6771. "in": "query",
  6772. "schema": {
  6773. "type": "string"
  6774. },
  6775. "required": false
  6776. }
  6777. ],
  6778. "responses": {
  6779. "204": {
  6780. "description": "Prompt accepted"
  6781. },
  6782. "400": {
  6783. "description": "BadRequest | InvalidRequestError",
  6784. "content": {
  6785. "application/json": {
  6786. "schema": {
  6787. "anyOf": [
  6788. {
  6789. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6790. },
  6791. {
  6792. "$ref": "#/components/schemas/InvalidRequestError"
  6793. }
  6794. ]
  6795. }
  6796. }
  6797. }
  6798. },
  6799. "404": {
  6800. "description": "NotFoundError",
  6801. "content": {
  6802. "application/json": {
  6803. "schema": {
  6804. "$ref": "#/components/schemas/NotFoundError"
  6805. }
  6806. }
  6807. }
  6808. }
  6809. },
  6810. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6811. "summary": "Send async message",
  6812. "requestBody": {
  6813. "content": {
  6814. "application/json": {
  6815. "schema": {
  6816. "type": "object",
  6817. "properties": {
  6818. "messageID": {
  6819. "type": "string",
  6820. "pattern": "^msg"
  6821. },
  6822. "model": {
  6823. "type": "object",
  6824. "properties": {
  6825. "providerID": {
  6826. "type": "string"
  6827. },
  6828. "modelID": {
  6829. "type": "string"
  6830. }
  6831. },
  6832. "required": ["providerID", "modelID"],
  6833. "additionalProperties": false
  6834. },
  6835. "agent": {
  6836. "type": "string"
  6837. },
  6838. "noReply": {
  6839. "type": "boolean"
  6840. },
  6841. "tools": {
  6842. "type": "object",
  6843. "additionalProperties": {
  6844. "type": "boolean"
  6845. }
  6846. },
  6847. "format": {
  6848. "$ref": "#/components/schemas/OutputFormat"
  6849. },
  6850. "system": {
  6851. "type": "string"
  6852. },
  6853. "variant": {
  6854. "type": "string"
  6855. },
  6856. "parts": {
  6857. "type": "array",
  6858. "items": {
  6859. "anyOf": [
  6860. {
  6861. "$ref": "#/components/schemas/TextPartInput"
  6862. },
  6863. {
  6864. "$ref": "#/components/schemas/FilePartInput"
  6865. },
  6866. {
  6867. "$ref": "#/components/schemas/AgentPartInput"
  6868. },
  6869. {
  6870. "$ref": "#/components/schemas/SubtaskPartInput"
  6871. }
  6872. ]
  6873. }
  6874. }
  6875. },
  6876. "required": ["parts"],
  6877. "additionalProperties": false
  6878. }
  6879. }
  6880. }
  6881. },
  6882. "x-codeSamples": [
  6883. {
  6884. "lang": "js",
  6885. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6886. }
  6887. ]
  6888. }
  6889. },
  6890. "/session/{sessionID}/command": {
  6891. "post": {
  6892. "tags": ["session"],
  6893. "operationId": "session.command",
  6894. "parameters": [
  6895. {
  6896. "name": "sessionID",
  6897. "in": "path",
  6898. "schema": {
  6899. "type": "string",
  6900. "pattern": "^ses"
  6901. },
  6902. "required": true
  6903. },
  6904. {
  6905. "name": "directory",
  6906. "in": "query",
  6907. "schema": {
  6908. "type": "string"
  6909. },
  6910. "required": false
  6911. },
  6912. {
  6913. "name": "workspace",
  6914. "in": "query",
  6915. "schema": {
  6916. "type": "string"
  6917. },
  6918. "required": false
  6919. }
  6920. ],
  6921. "responses": {
  6922. "200": {
  6923. "description": "Created message",
  6924. "content": {
  6925. "application/json": {
  6926. "schema": {
  6927. "type": "object",
  6928. "required": ["info", "parts"],
  6929. "properties": {
  6930. "info": {
  6931. "$ref": "#/components/schemas/AssistantMessage"
  6932. },
  6933. "parts": {
  6934. "type": "array",
  6935. "items": {
  6936. "$ref": "#/components/schemas/Part"
  6937. }
  6938. }
  6939. }
  6940. }
  6941. }
  6942. }
  6943. },
  6944. "400": {
  6945. "description": "BadRequest | InvalidRequestError",
  6946. "content": {
  6947. "application/json": {
  6948. "schema": {
  6949. "anyOf": [
  6950. {
  6951. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6952. },
  6953. {
  6954. "$ref": "#/components/schemas/InvalidRequestError"
  6955. }
  6956. ]
  6957. }
  6958. }
  6959. }
  6960. },
  6961. "404": {
  6962. "description": "NotFoundError",
  6963. "content": {
  6964. "application/json": {
  6965. "schema": {
  6966. "$ref": "#/components/schemas/NotFoundError"
  6967. }
  6968. }
  6969. }
  6970. }
  6971. },
  6972. "description": "Send a new command to a session for execution by the AI assistant.",
  6973. "summary": "Send command",
  6974. "requestBody": {
  6975. "content": {
  6976. "application/json": {
  6977. "schema": {
  6978. "type": "object",
  6979. "properties": {
  6980. "messageID": {
  6981. "type": "string",
  6982. "pattern": "^msg"
  6983. },
  6984. "agent": {
  6985. "type": "string"
  6986. },
  6987. "model": {
  6988. "type": "string"
  6989. },
  6990. "arguments": {
  6991. "type": "string"
  6992. },
  6993. "command": {
  6994. "type": "string"
  6995. },
  6996. "variant": {
  6997. "type": "string"
  6998. },
  6999. "parts": {
  7000. "type": "array",
  7001. "items": {
  7002. "type": "object",
  7003. "properties": {
  7004. "id": {
  7005. "type": "string",
  7006. "pattern": "^prt"
  7007. },
  7008. "type": {
  7009. "type": "string",
  7010. "enum": ["file"]
  7011. },
  7012. "mime": {
  7013. "type": "string"
  7014. },
  7015. "filename": {
  7016. "type": "string"
  7017. },
  7018. "url": {
  7019. "type": "string"
  7020. },
  7021. "source": {
  7022. "$ref": "#/components/schemas/FilePartSource"
  7023. }
  7024. },
  7025. "required": ["type", "mime", "url"],
  7026. "additionalProperties": false
  7027. }
  7028. }
  7029. },
  7030. "required": ["arguments", "command"],
  7031. "additionalProperties": false
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "x-codeSamples": [
  7037. {
  7038. "lang": "js",
  7039. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7040. }
  7041. ]
  7042. }
  7043. },
  7044. "/session/{sessionID}/shell": {
  7045. "post": {
  7046. "tags": ["session"],
  7047. "operationId": "session.shell",
  7048. "parameters": [
  7049. {
  7050. "name": "sessionID",
  7051. "in": "path",
  7052. "schema": {
  7053. "type": "string",
  7054. "pattern": "^ses"
  7055. },
  7056. "required": true
  7057. },
  7058. {
  7059. "name": "directory",
  7060. "in": "query",
  7061. "schema": {
  7062. "type": "string"
  7063. },
  7064. "required": false
  7065. },
  7066. {
  7067. "name": "workspace",
  7068. "in": "query",
  7069. "schema": {
  7070. "type": "string"
  7071. },
  7072. "required": false
  7073. }
  7074. ],
  7075. "responses": {
  7076. "200": {
  7077. "description": "Created message",
  7078. "content": {
  7079. "application/json": {
  7080. "schema": {
  7081. "type": "object",
  7082. "properties": {
  7083. "info": {
  7084. "$ref": "#/components/schemas/Message"
  7085. },
  7086. "parts": {
  7087. "type": "array",
  7088. "items": {
  7089. "$ref": "#/components/schemas/Part"
  7090. }
  7091. }
  7092. },
  7093. "required": ["info", "parts"],
  7094. "additionalProperties": false,
  7095. "description": "Created message"
  7096. }
  7097. }
  7098. }
  7099. },
  7100. "400": {
  7101. "description": "BadRequest | InvalidRequestError",
  7102. "content": {
  7103. "application/json": {
  7104. "schema": {
  7105. "anyOf": [
  7106. {
  7107. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7108. },
  7109. {
  7110. "$ref": "#/components/schemas/InvalidRequestError"
  7111. }
  7112. ]
  7113. }
  7114. }
  7115. }
  7116. },
  7117. "404": {
  7118. "description": "NotFoundError",
  7119. "content": {
  7120. "application/json": {
  7121. "schema": {
  7122. "$ref": "#/components/schemas/NotFoundError"
  7123. }
  7124. }
  7125. }
  7126. }
  7127. },
  7128. "description": "Execute a shell command within the session context and return the AI's response.",
  7129. "summary": "Run shell command",
  7130. "requestBody": {
  7131. "content": {
  7132. "application/json": {
  7133. "schema": {
  7134. "type": "object",
  7135. "properties": {
  7136. "messageID": {
  7137. "type": "string",
  7138. "pattern": "^msg"
  7139. },
  7140. "agent": {
  7141. "type": "string"
  7142. },
  7143. "model": {
  7144. "type": "object",
  7145. "properties": {
  7146. "providerID": {
  7147. "type": "string"
  7148. },
  7149. "modelID": {
  7150. "type": "string"
  7151. }
  7152. },
  7153. "required": ["providerID", "modelID"],
  7154. "additionalProperties": false
  7155. },
  7156. "command": {
  7157. "type": "string"
  7158. }
  7159. },
  7160. "required": ["agent", "command"],
  7161. "additionalProperties": false
  7162. }
  7163. }
  7164. }
  7165. },
  7166. "x-codeSamples": [
  7167. {
  7168. "lang": "js",
  7169. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7170. }
  7171. ]
  7172. }
  7173. },
  7174. "/session/{sessionID}/revert": {
  7175. "post": {
  7176. "tags": ["session"],
  7177. "operationId": "session.revert",
  7178. "parameters": [
  7179. {
  7180. "name": "sessionID",
  7181. "in": "path",
  7182. "schema": {
  7183. "type": "string",
  7184. "pattern": "^ses"
  7185. },
  7186. "required": true
  7187. },
  7188. {
  7189. "name": "directory",
  7190. "in": "query",
  7191. "schema": {
  7192. "type": "string"
  7193. },
  7194. "required": false
  7195. },
  7196. {
  7197. "name": "workspace",
  7198. "in": "query",
  7199. "schema": {
  7200. "type": "string"
  7201. },
  7202. "required": false
  7203. }
  7204. ],
  7205. "responses": {
  7206. "200": {
  7207. "description": "Updated session",
  7208. "content": {
  7209. "application/json": {
  7210. "schema": {
  7211. "$ref": "#/components/schemas/Session"
  7212. }
  7213. }
  7214. }
  7215. },
  7216. "400": {
  7217. "description": "BadRequest | InvalidRequestError",
  7218. "content": {
  7219. "application/json": {
  7220. "schema": {
  7221. "anyOf": [
  7222. {
  7223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7224. },
  7225. {
  7226. "$ref": "#/components/schemas/InvalidRequestError"
  7227. }
  7228. ]
  7229. }
  7230. }
  7231. }
  7232. },
  7233. "404": {
  7234. "description": "NotFoundError",
  7235. "content": {
  7236. "application/json": {
  7237. "schema": {
  7238. "$ref": "#/components/schemas/NotFoundError"
  7239. }
  7240. }
  7241. }
  7242. }
  7243. },
  7244. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7245. "summary": "Revert message",
  7246. "requestBody": {
  7247. "content": {
  7248. "application/json": {
  7249. "schema": {
  7250. "type": "object",
  7251. "properties": {
  7252. "messageID": {
  7253. "type": "string",
  7254. "pattern": "^msg"
  7255. },
  7256. "partID": {
  7257. "type": "string",
  7258. "pattern": "^prt"
  7259. }
  7260. },
  7261. "required": ["messageID"],
  7262. "additionalProperties": false
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "x-codeSamples": [
  7268. {
  7269. "lang": "js",
  7270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7271. }
  7272. ]
  7273. }
  7274. },
  7275. "/session/{sessionID}/unrevert": {
  7276. "post": {
  7277. "tags": ["session"],
  7278. "operationId": "session.unrevert",
  7279. "parameters": [
  7280. {
  7281. "name": "sessionID",
  7282. "in": "path",
  7283. "schema": {
  7284. "type": "string",
  7285. "pattern": "^ses"
  7286. },
  7287. "required": true
  7288. },
  7289. {
  7290. "name": "directory",
  7291. "in": "query",
  7292. "schema": {
  7293. "type": "string"
  7294. },
  7295. "required": false
  7296. },
  7297. {
  7298. "name": "workspace",
  7299. "in": "query",
  7300. "schema": {
  7301. "type": "string"
  7302. },
  7303. "required": false
  7304. }
  7305. ],
  7306. "responses": {
  7307. "200": {
  7308. "description": "Updated session",
  7309. "content": {
  7310. "application/json": {
  7311. "schema": {
  7312. "$ref": "#/components/schemas/Session"
  7313. }
  7314. }
  7315. }
  7316. },
  7317. "400": {
  7318. "description": "BadRequest | InvalidRequestError",
  7319. "content": {
  7320. "application/json": {
  7321. "schema": {
  7322. "anyOf": [
  7323. {
  7324. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7325. },
  7326. {
  7327. "$ref": "#/components/schemas/InvalidRequestError"
  7328. }
  7329. ]
  7330. }
  7331. }
  7332. }
  7333. },
  7334. "404": {
  7335. "description": "NotFoundError",
  7336. "content": {
  7337. "application/json": {
  7338. "schema": {
  7339. "$ref": "#/components/schemas/NotFoundError"
  7340. }
  7341. }
  7342. }
  7343. }
  7344. },
  7345. "description": "Restore all previously reverted messages in a session.",
  7346. "summary": "Restore reverted messages",
  7347. "x-codeSamples": [
  7348. {
  7349. "lang": "js",
  7350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7351. }
  7352. ]
  7353. }
  7354. },
  7355. "/session/{sessionID}/permissions/{permissionID}": {
  7356. "post": {
  7357. "tags": ["session"],
  7358. "operationId": "permission.respond",
  7359. "parameters": [
  7360. {
  7361. "name": "sessionID",
  7362. "in": "path",
  7363. "schema": {
  7364. "type": "string",
  7365. "pattern": "^ses"
  7366. },
  7367. "required": true
  7368. },
  7369. {
  7370. "name": "permissionID",
  7371. "in": "path",
  7372. "schema": {
  7373. "type": "string",
  7374. "pattern": "^per"
  7375. },
  7376. "required": true
  7377. },
  7378. {
  7379. "name": "directory",
  7380. "in": "query",
  7381. "schema": {
  7382. "type": "string"
  7383. },
  7384. "required": false
  7385. },
  7386. {
  7387. "name": "workspace",
  7388. "in": "query",
  7389. "schema": {
  7390. "type": "string"
  7391. },
  7392. "required": false
  7393. }
  7394. ],
  7395. "responses": {
  7396. "200": {
  7397. "description": "Permission processed successfully",
  7398. "content": {
  7399. "application/json": {
  7400. "schema": {
  7401. "type": "boolean",
  7402. "description": "Permission processed successfully"
  7403. }
  7404. }
  7405. }
  7406. },
  7407. "400": {
  7408. "description": "BadRequest | InvalidRequestError",
  7409. "content": {
  7410. "application/json": {
  7411. "schema": {
  7412. "anyOf": [
  7413. {
  7414. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7415. },
  7416. {
  7417. "$ref": "#/components/schemas/InvalidRequestError"
  7418. }
  7419. ]
  7420. }
  7421. }
  7422. }
  7423. },
  7424. "404": {
  7425. "description": "NotFoundError",
  7426. "content": {
  7427. "application/json": {
  7428. "schema": {
  7429. "$ref": "#/components/schemas/NotFoundError"
  7430. }
  7431. }
  7432. }
  7433. }
  7434. },
  7435. "description": "Approve or deny a permission request from the AI assistant.",
  7436. "summary": "Respond to permission",
  7437. "deprecated": true,
  7438. "requestBody": {
  7439. "content": {
  7440. "application/json": {
  7441. "schema": {
  7442. "type": "object",
  7443. "properties": {
  7444. "response": {
  7445. "type": "string",
  7446. "enum": ["once", "always", "reject"]
  7447. }
  7448. },
  7449. "required": ["response"],
  7450. "additionalProperties": false
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "x-codeSamples": [
  7456. {
  7457. "lang": "js",
  7458. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7459. }
  7460. ]
  7461. }
  7462. },
  7463. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7464. "delete": {
  7465. "tags": ["session"],
  7466. "operationId": "part.delete",
  7467. "parameters": [
  7468. {
  7469. "name": "sessionID",
  7470. "in": "path",
  7471. "schema": {
  7472. "type": "string",
  7473. "pattern": "^ses"
  7474. },
  7475. "required": true
  7476. },
  7477. {
  7478. "name": "messageID",
  7479. "in": "path",
  7480. "schema": {
  7481. "type": "string",
  7482. "pattern": "^msg"
  7483. },
  7484. "required": true
  7485. },
  7486. {
  7487. "name": "partID",
  7488. "in": "path",
  7489. "schema": {
  7490. "type": "string",
  7491. "pattern": "^prt"
  7492. },
  7493. "required": true
  7494. },
  7495. {
  7496. "name": "directory",
  7497. "in": "query",
  7498. "schema": {
  7499. "type": "string"
  7500. },
  7501. "required": false
  7502. },
  7503. {
  7504. "name": "workspace",
  7505. "in": "query",
  7506. "schema": {
  7507. "type": "string"
  7508. },
  7509. "required": false
  7510. }
  7511. ],
  7512. "responses": {
  7513. "200": {
  7514. "description": "Successfully deleted part",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "type": "boolean",
  7519. "description": "Successfully deleted part"
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "400": {
  7525. "description": "BadRequest | InvalidRequestError",
  7526. "content": {
  7527. "application/json": {
  7528. "schema": {
  7529. "anyOf": [
  7530. {
  7531. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7532. },
  7533. {
  7534. "$ref": "#/components/schemas/InvalidRequestError"
  7535. }
  7536. ]
  7537. }
  7538. }
  7539. }
  7540. },
  7541. "404": {
  7542. "description": "NotFoundError",
  7543. "content": {
  7544. "application/json": {
  7545. "schema": {
  7546. "$ref": "#/components/schemas/NotFoundError"
  7547. }
  7548. }
  7549. }
  7550. }
  7551. },
  7552. "description": "Delete a part from a message.",
  7553. "x-codeSamples": [
  7554. {
  7555. "lang": "js",
  7556. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7557. }
  7558. ]
  7559. },
  7560. "patch": {
  7561. "tags": ["session"],
  7562. "operationId": "part.update",
  7563. "parameters": [
  7564. {
  7565. "name": "sessionID",
  7566. "in": "path",
  7567. "schema": {
  7568. "type": "string",
  7569. "pattern": "^ses"
  7570. },
  7571. "required": true
  7572. },
  7573. {
  7574. "name": "messageID",
  7575. "in": "path",
  7576. "schema": {
  7577. "type": "string",
  7578. "pattern": "^msg"
  7579. },
  7580. "required": true
  7581. },
  7582. {
  7583. "name": "partID",
  7584. "in": "path",
  7585. "schema": {
  7586. "type": "string",
  7587. "pattern": "^prt"
  7588. },
  7589. "required": true
  7590. },
  7591. {
  7592. "name": "directory",
  7593. "in": "query",
  7594. "schema": {
  7595. "type": "string"
  7596. },
  7597. "required": false
  7598. },
  7599. {
  7600. "name": "workspace",
  7601. "in": "query",
  7602. "schema": {
  7603. "type": "string"
  7604. },
  7605. "required": false
  7606. }
  7607. ],
  7608. "responses": {
  7609. "200": {
  7610. "description": "Successfully updated part",
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "$ref": "#/components/schemas/Part"
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "400": {
  7620. "description": "BadRequest | InvalidRequestError",
  7621. "content": {
  7622. "application/json": {
  7623. "schema": {
  7624. "anyOf": [
  7625. {
  7626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7627. },
  7628. {
  7629. "$ref": "#/components/schemas/InvalidRequestError"
  7630. }
  7631. ]
  7632. }
  7633. }
  7634. }
  7635. },
  7636. "404": {
  7637. "description": "NotFoundError",
  7638. "content": {
  7639. "application/json": {
  7640. "schema": {
  7641. "$ref": "#/components/schemas/NotFoundError"
  7642. }
  7643. }
  7644. }
  7645. }
  7646. },
  7647. "description": "Update a part in a message.",
  7648. "requestBody": {
  7649. "content": {
  7650. "application/json": {
  7651. "schema": {
  7652. "$ref": "#/components/schemas/Part"
  7653. }
  7654. }
  7655. }
  7656. },
  7657. "x-codeSamples": [
  7658. {
  7659. "lang": "js",
  7660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7661. }
  7662. ]
  7663. }
  7664. },
  7665. "/sync/start": {
  7666. "post": {
  7667. "tags": ["sync"],
  7668. "operationId": "sync.start",
  7669. "parameters": [
  7670. {
  7671. "name": "directory",
  7672. "in": "query",
  7673. "schema": {
  7674. "type": "string"
  7675. },
  7676. "required": false
  7677. },
  7678. {
  7679. "name": "workspace",
  7680. "in": "query",
  7681. "schema": {
  7682. "type": "string"
  7683. },
  7684. "required": false
  7685. }
  7686. ],
  7687. "responses": {
  7688. "200": {
  7689. "description": "Workspace sync started",
  7690. "content": {
  7691. "application/json": {
  7692. "schema": {
  7693. "type": "boolean",
  7694. "description": "Workspace sync started"
  7695. }
  7696. }
  7697. }
  7698. },
  7699. "400": {
  7700. "description": "Bad request",
  7701. "content": {
  7702. "application/json": {
  7703. "schema": {
  7704. "$ref": "#/components/schemas/BadRequestError"
  7705. }
  7706. }
  7707. }
  7708. }
  7709. },
  7710. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7711. "summary": "Start workspace sync",
  7712. "x-codeSamples": [
  7713. {
  7714. "lang": "js",
  7715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7716. }
  7717. ]
  7718. }
  7719. },
  7720. "/sync/replay": {
  7721. "post": {
  7722. "tags": ["sync"],
  7723. "operationId": "sync.replay",
  7724. "parameters": [
  7725. {
  7726. "name": "directory",
  7727. "in": "query",
  7728. "schema": {
  7729. "type": "string"
  7730. },
  7731. "required": false
  7732. },
  7733. {
  7734. "name": "workspace",
  7735. "in": "query",
  7736. "schema": {
  7737. "type": "string"
  7738. },
  7739. "required": false
  7740. }
  7741. ],
  7742. "responses": {
  7743. "200": {
  7744. "description": "Replayed sync events",
  7745. "content": {
  7746. "application/json": {
  7747. "schema": {
  7748. "type": "object",
  7749. "properties": {
  7750. "sessionID": {
  7751. "type": "string"
  7752. }
  7753. },
  7754. "required": ["sessionID"],
  7755. "additionalProperties": false,
  7756. "description": "Replayed sync events"
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "400": {
  7762. "description": "BadRequest | InvalidRequestError",
  7763. "content": {
  7764. "application/json": {
  7765. "schema": {
  7766. "anyOf": [
  7767. {
  7768. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7769. },
  7770. {
  7771. "$ref": "#/components/schemas/InvalidRequestError"
  7772. }
  7773. ]
  7774. }
  7775. }
  7776. }
  7777. }
  7778. },
  7779. "description": "Validate and replay a complete sync event history.",
  7780. "summary": "Replay sync events",
  7781. "requestBody": {
  7782. "content": {
  7783. "application/json": {
  7784. "schema": {
  7785. "type": "object",
  7786. "properties": {
  7787. "directory": {
  7788. "type": "string"
  7789. },
  7790. "events": {
  7791. "type": "array",
  7792. "minItems": 1,
  7793. "items": {
  7794. "type": "object",
  7795. "properties": {
  7796. "id": {
  7797. "type": "string"
  7798. },
  7799. "aggregateID": {
  7800. "type": "string"
  7801. },
  7802. "seq": {
  7803. "type": "integer",
  7804. "minimum": 0
  7805. },
  7806. "type": {
  7807. "type": "string"
  7808. },
  7809. "data": {
  7810. "type": "object"
  7811. }
  7812. },
  7813. "required": ["id", "aggregateID", "seq", "type", "data"],
  7814. "additionalProperties": false
  7815. }
  7816. }
  7817. },
  7818. "required": ["directory", "events"],
  7819. "additionalProperties": false
  7820. }
  7821. }
  7822. }
  7823. },
  7824. "x-codeSamples": [
  7825. {
  7826. "lang": "js",
  7827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7828. }
  7829. ]
  7830. }
  7831. },
  7832. "/sync/steal": {
  7833. "post": {
  7834. "tags": ["sync"],
  7835. "operationId": "sync.steal",
  7836. "parameters": [
  7837. {
  7838. "name": "directory",
  7839. "in": "query",
  7840. "schema": {
  7841. "type": "string"
  7842. },
  7843. "required": false
  7844. },
  7845. {
  7846. "name": "workspace",
  7847. "in": "query",
  7848. "schema": {
  7849. "type": "string"
  7850. },
  7851. "required": false
  7852. }
  7853. ],
  7854. "responses": {
  7855. "200": {
  7856. "description": "Session stolen into workspace",
  7857. "content": {
  7858. "application/json": {
  7859. "schema": {
  7860. "type": "object",
  7861. "properties": {
  7862. "sessionID": {
  7863. "type": "string",
  7864. "pattern": "^ses"
  7865. }
  7866. },
  7867. "required": ["sessionID"],
  7868. "additionalProperties": false,
  7869. "description": "Session stolen into workspace"
  7870. }
  7871. }
  7872. }
  7873. },
  7874. "400": {
  7875. "description": "BadRequest | InvalidRequestError",
  7876. "content": {
  7877. "application/json": {
  7878. "schema": {
  7879. "anyOf": [
  7880. {
  7881. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7882. },
  7883. {
  7884. "$ref": "#/components/schemas/InvalidRequestError"
  7885. }
  7886. ]
  7887. }
  7888. }
  7889. }
  7890. }
  7891. },
  7892. "description": "Update a session to belong to the current workspace through the sync event system.",
  7893. "summary": "Steal session into workspace",
  7894. "requestBody": {
  7895. "content": {
  7896. "application/json": {
  7897. "schema": {
  7898. "type": "object",
  7899. "properties": {
  7900. "sessionID": {
  7901. "type": "string",
  7902. "pattern": "^ses"
  7903. }
  7904. },
  7905. "required": ["sessionID"],
  7906. "additionalProperties": false
  7907. }
  7908. }
  7909. }
  7910. },
  7911. "x-codeSamples": [
  7912. {
  7913. "lang": "js",
  7914. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7915. }
  7916. ]
  7917. }
  7918. },
  7919. "/sync/history": {
  7920. "post": {
  7921. "tags": ["sync"],
  7922. "operationId": "sync.history.list",
  7923. "parameters": [
  7924. {
  7925. "name": "directory",
  7926. "in": "query",
  7927. "schema": {
  7928. "type": "string"
  7929. },
  7930. "required": false
  7931. },
  7932. {
  7933. "name": "workspace",
  7934. "in": "query",
  7935. "schema": {
  7936. "type": "string"
  7937. },
  7938. "required": false
  7939. }
  7940. ],
  7941. "responses": {
  7942. "200": {
  7943. "description": "Sync events",
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "array",
  7948. "items": {
  7949. "type": "object",
  7950. "properties": {
  7951. "id": {
  7952. "type": "string"
  7953. },
  7954. "aggregate_id": {
  7955. "type": "string"
  7956. },
  7957. "seq": {
  7958. "type": "integer",
  7959. "minimum": 0
  7960. },
  7961. "type": {
  7962. "type": "string"
  7963. },
  7964. "data": {
  7965. "type": "object"
  7966. }
  7967. },
  7968. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7969. "additionalProperties": false
  7970. },
  7971. "description": "Sync events"
  7972. }
  7973. }
  7974. }
  7975. },
  7976. "400": {
  7977. "description": "BadRequest | InvalidRequestError",
  7978. "content": {
  7979. "application/json": {
  7980. "schema": {
  7981. "anyOf": [
  7982. {
  7983. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7984. },
  7985. {
  7986. "$ref": "#/components/schemas/InvalidRequestError"
  7987. }
  7988. ]
  7989. }
  7990. }
  7991. }
  7992. }
  7993. },
  7994. "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.",
  7995. "summary": "List sync events",
  7996. "requestBody": {
  7997. "content": {
  7998. "application/json": {
  7999. "schema": {
  8000. "type": "object",
  8001. "additionalProperties": {
  8002. "type": "integer",
  8003. "minimum": 0
  8004. }
  8005. }
  8006. }
  8007. }
  8008. },
  8009. "x-codeSamples": [
  8010. {
  8011. "lang": "js",
  8012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8013. }
  8014. ]
  8015. }
  8016. },
  8017. "/api/session": {
  8018. "get": {
  8019. "tags": ["v2"],
  8020. "operationId": "v2.session.list",
  8021. "parameters": [
  8022. {
  8023. "name": "directory",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. },
  8030. {
  8031. "name": "workspace",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "limit",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "number"
  8043. },
  8044. "required": false
  8045. },
  8046. {
  8047. "name": "order",
  8048. "in": "query",
  8049. "schema": {
  8050. "type": "string",
  8051. "enum": ["asc", "desc"]
  8052. },
  8053. "required": false
  8054. },
  8055. {
  8056. "name": "path",
  8057. "in": "query",
  8058. "schema": {
  8059. "type": "string"
  8060. },
  8061. "required": false
  8062. },
  8063. {
  8064. "name": "roots",
  8065. "in": "query",
  8066. "schema": {
  8067. "anyOf": [
  8068. {
  8069. "type": "boolean"
  8070. },
  8071. {
  8072. "type": "string",
  8073. "enum": ["true", "false"]
  8074. }
  8075. ]
  8076. },
  8077. "required": false
  8078. },
  8079. {
  8080. "name": "start",
  8081. "in": "query",
  8082. "schema": {
  8083. "type": "number"
  8084. },
  8085. "required": false
  8086. },
  8087. {
  8088. "name": "search",
  8089. "in": "query",
  8090. "schema": {
  8091. "type": "string"
  8092. },
  8093. "required": false
  8094. },
  8095. {
  8096. "name": "cursor",
  8097. "in": "query",
  8098. "schema": {
  8099. "type": "string",
  8100. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8101. },
  8102. "required": false
  8103. }
  8104. ],
  8105. "security": [],
  8106. "responses": {
  8107. "200": {
  8108. "description": "V2SessionsResponse",
  8109. "content": {
  8110. "application/json": {
  8111. "schema": {
  8112. "$ref": "#/components/schemas/V2SessionsResponse"
  8113. }
  8114. }
  8115. }
  8116. },
  8117. "400": {
  8118. "description": "InvalidCursorError | InvalidRequestError",
  8119. "content": {
  8120. "application/json": {
  8121. "schema": {
  8122. "anyOf": [
  8123. {
  8124. "$ref": "#/components/schemas/InvalidCursorError"
  8125. },
  8126. {
  8127. "$ref": "#/components/schemas/InvalidRequestError"
  8128. },
  8129. {
  8130. "$ref": "#/components/schemas/InvalidRequestError"
  8131. }
  8132. ]
  8133. }
  8134. }
  8135. }
  8136. },
  8137. "401": {
  8138. "description": "UnauthorizedError",
  8139. "content": {
  8140. "application/json": {
  8141. "schema": {
  8142. "$ref": "#/components/schemas/UnauthorizedError"
  8143. }
  8144. }
  8145. }
  8146. }
  8147. },
  8148. "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.",
  8149. "summary": "List v2 sessions",
  8150. "x-codeSamples": [
  8151. {
  8152. "lang": "js",
  8153. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8154. }
  8155. ]
  8156. }
  8157. },
  8158. "/api/session/{sessionID}/prompt": {
  8159. "post": {
  8160. "tags": ["v2"],
  8161. "operationId": "v2.session.prompt",
  8162. "parameters": [
  8163. {
  8164. "name": "sessionID",
  8165. "in": "path",
  8166. "schema": {
  8167. "type": "string",
  8168. "pattern": "^ses"
  8169. },
  8170. "required": true
  8171. },
  8172. {
  8173. "name": "directory",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string"
  8177. },
  8178. "required": false
  8179. },
  8180. {
  8181. "name": "workspace",
  8182. "in": "query",
  8183. "schema": {
  8184. "type": "string"
  8185. },
  8186. "required": false
  8187. }
  8188. ],
  8189. "security": [],
  8190. "responses": {
  8191. "200": {
  8192. "description": "Session.Message",
  8193. "content": {
  8194. "application/json": {
  8195. "schema": {
  8196. "$ref": "#/components/schemas/SessionMessage"
  8197. }
  8198. }
  8199. }
  8200. },
  8201. "400": {
  8202. "description": "InvalidRequestError",
  8203. "content": {
  8204. "application/json": {
  8205. "schema": {
  8206. "$ref": "#/components/schemas/InvalidRequestError"
  8207. }
  8208. }
  8209. }
  8210. },
  8211. "401": {
  8212. "description": "UnauthorizedError",
  8213. "content": {
  8214. "application/json": {
  8215. "schema": {
  8216. "$ref": "#/components/schemas/UnauthorizedError"
  8217. }
  8218. }
  8219. }
  8220. }
  8221. },
  8222. "description": "Create a v2 session message and queue it for the agent loop.",
  8223. "summary": "Send v2 message",
  8224. "requestBody": {
  8225. "content": {
  8226. "application/json": {
  8227. "schema": {
  8228. "type": "object",
  8229. "properties": {
  8230. "prompt": {
  8231. "$ref": "#/components/schemas/Prompt"
  8232. },
  8233. "delivery": {
  8234. "$ref": "#/components/schemas/SessionDelivery"
  8235. }
  8236. },
  8237. "required": ["prompt"],
  8238. "additionalProperties": false
  8239. }
  8240. }
  8241. }
  8242. },
  8243. "x-codeSamples": [
  8244. {
  8245. "lang": "js",
  8246. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8247. }
  8248. ]
  8249. }
  8250. },
  8251. "/api/session/{sessionID}/compact": {
  8252. "post": {
  8253. "tags": ["v2"],
  8254. "operationId": "v2.session.compact",
  8255. "parameters": [
  8256. {
  8257. "name": "sessionID",
  8258. "in": "path",
  8259. "schema": {
  8260. "type": "string",
  8261. "pattern": "^ses"
  8262. },
  8263. "required": true
  8264. },
  8265. {
  8266. "name": "directory",
  8267. "in": "query",
  8268. "schema": {
  8269. "type": "string"
  8270. },
  8271. "required": false
  8272. },
  8273. {
  8274. "name": "workspace",
  8275. "in": "query",
  8276. "schema": {
  8277. "type": "string"
  8278. },
  8279. "required": false
  8280. }
  8281. ],
  8282. "security": [],
  8283. "responses": {
  8284. "204": {
  8285. "description": "<No Content>"
  8286. },
  8287. "400": {
  8288. "description": "InvalidRequestError",
  8289. "content": {
  8290. "application/json": {
  8291. "schema": {
  8292. "$ref": "#/components/schemas/InvalidRequestError"
  8293. }
  8294. }
  8295. }
  8296. },
  8297. "401": {
  8298. "description": "UnauthorizedError",
  8299. "content": {
  8300. "application/json": {
  8301. "schema": {
  8302. "$ref": "#/components/schemas/UnauthorizedError"
  8303. }
  8304. }
  8305. }
  8306. }
  8307. },
  8308. "description": "Compact a v2 session conversation.",
  8309. "summary": "Compact v2 session",
  8310. "x-codeSamples": [
  8311. {
  8312. "lang": "js",
  8313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8314. }
  8315. ]
  8316. }
  8317. },
  8318. "/api/session/{sessionID}/wait": {
  8319. "post": {
  8320. "tags": ["v2"],
  8321. "operationId": "v2.session.wait",
  8322. "parameters": [
  8323. {
  8324. "name": "sessionID",
  8325. "in": "path",
  8326. "schema": {
  8327. "type": "string",
  8328. "pattern": "^ses"
  8329. },
  8330. "required": true
  8331. },
  8332. {
  8333. "name": "directory",
  8334. "in": "query",
  8335. "schema": {
  8336. "type": "string"
  8337. },
  8338. "required": false
  8339. },
  8340. {
  8341. "name": "workspace",
  8342. "in": "query",
  8343. "schema": {
  8344. "type": "string"
  8345. },
  8346. "required": false
  8347. }
  8348. ],
  8349. "security": [],
  8350. "responses": {
  8351. "204": {
  8352. "description": "<No Content>"
  8353. },
  8354. "400": {
  8355. "description": "InvalidRequestError",
  8356. "content": {
  8357. "application/json": {
  8358. "schema": {
  8359. "$ref": "#/components/schemas/InvalidRequestError"
  8360. }
  8361. }
  8362. }
  8363. },
  8364. "401": {
  8365. "description": "UnauthorizedError",
  8366. "content": {
  8367. "application/json": {
  8368. "schema": {
  8369. "$ref": "#/components/schemas/UnauthorizedError"
  8370. }
  8371. }
  8372. }
  8373. }
  8374. },
  8375. "description": "Wait for a v2 session agent loop to become idle.",
  8376. "summary": "Wait for v2 session",
  8377. "x-codeSamples": [
  8378. {
  8379. "lang": "js",
  8380. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8381. }
  8382. ]
  8383. }
  8384. },
  8385. "/api/session/{sessionID}/context": {
  8386. "get": {
  8387. "tags": ["v2"],
  8388. "operationId": "v2.session.context",
  8389. "parameters": [
  8390. {
  8391. "name": "sessionID",
  8392. "in": "path",
  8393. "schema": {
  8394. "type": "string",
  8395. "pattern": "^ses"
  8396. },
  8397. "required": true
  8398. },
  8399. {
  8400. "name": "directory",
  8401. "in": "query",
  8402. "schema": {
  8403. "type": "string"
  8404. },
  8405. "required": false
  8406. },
  8407. {
  8408. "name": "workspace",
  8409. "in": "query",
  8410. "schema": {
  8411. "type": "string"
  8412. },
  8413. "required": false
  8414. }
  8415. ],
  8416. "security": [],
  8417. "responses": {
  8418. "200": {
  8419. "description": "Success",
  8420. "content": {
  8421. "application/json": {
  8422. "schema": {
  8423. "type": "array",
  8424. "items": {
  8425. "$ref": "#/components/schemas/SessionMessage"
  8426. }
  8427. }
  8428. }
  8429. }
  8430. },
  8431. "400": {
  8432. "description": "InvalidRequestError",
  8433. "content": {
  8434. "application/json": {
  8435. "schema": {
  8436. "$ref": "#/components/schemas/InvalidRequestError"
  8437. }
  8438. }
  8439. }
  8440. },
  8441. "401": {
  8442. "description": "UnauthorizedError",
  8443. "content": {
  8444. "application/json": {
  8445. "schema": {
  8446. "$ref": "#/components/schemas/UnauthorizedError"
  8447. }
  8448. }
  8449. }
  8450. }
  8451. },
  8452. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8453. "summary": "Get v2 session context",
  8454. "x-codeSamples": [
  8455. {
  8456. "lang": "js",
  8457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8458. }
  8459. ]
  8460. }
  8461. },
  8462. "/api/session/{sessionID}/message": {
  8463. "get": {
  8464. "tags": ["v2 messages"],
  8465. "operationId": "v2.session.messages",
  8466. "parameters": [
  8467. {
  8468. "name": "sessionID",
  8469. "in": "path",
  8470. "schema": {
  8471. "type": "string",
  8472. "pattern": "^ses"
  8473. },
  8474. "required": true
  8475. },
  8476. {
  8477. "name": "directory",
  8478. "in": "query",
  8479. "schema": {
  8480. "type": "string"
  8481. },
  8482. "required": false
  8483. },
  8484. {
  8485. "name": "workspace",
  8486. "in": "query",
  8487. "schema": {
  8488. "type": "string"
  8489. },
  8490. "required": false
  8491. },
  8492. {
  8493. "name": "limit",
  8494. "in": "query",
  8495. "schema": {
  8496. "type": "number"
  8497. },
  8498. "required": false
  8499. },
  8500. {
  8501. "name": "order",
  8502. "in": "query",
  8503. "schema": {
  8504. "type": "string",
  8505. "enum": ["asc", "desc"]
  8506. },
  8507. "required": false
  8508. },
  8509. {
  8510. "name": "cursor",
  8511. "in": "query",
  8512. "schema": {
  8513. "type": "string",
  8514. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8515. },
  8516. "required": false
  8517. }
  8518. ],
  8519. "security": [],
  8520. "responses": {
  8521. "200": {
  8522. "description": "V2SessionMessagesResponse",
  8523. "content": {
  8524. "application/json": {
  8525. "schema": {
  8526. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8527. }
  8528. }
  8529. }
  8530. },
  8531. "400": {
  8532. "description": "InvalidCursorError | InvalidRequestError",
  8533. "content": {
  8534. "application/json": {
  8535. "schema": {
  8536. "anyOf": [
  8537. {
  8538. "$ref": "#/components/schemas/InvalidCursorError"
  8539. },
  8540. {
  8541. "$ref": "#/components/schemas/InvalidRequestError"
  8542. }
  8543. ]
  8544. }
  8545. }
  8546. }
  8547. },
  8548. "401": {
  8549. "description": "UnauthorizedError",
  8550. "content": {
  8551. "application/json": {
  8552. "schema": {
  8553. "$ref": "#/components/schemas/UnauthorizedError"
  8554. }
  8555. }
  8556. }
  8557. }
  8558. },
  8559. "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.",
  8560. "summary": "Get v2 session messages",
  8561. "x-codeSamples": [
  8562. {
  8563. "lang": "js",
  8564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8565. }
  8566. ]
  8567. }
  8568. },
  8569. "/api/model": {
  8570. "get": {
  8571. "tags": ["v2 models"],
  8572. "operationId": "v2.model.list",
  8573. "parameters": [
  8574. {
  8575. "name": "location",
  8576. "in": "query",
  8577. "schema": {
  8578. "type": "object",
  8579. "properties": {
  8580. "directory": {
  8581. "type": "string"
  8582. },
  8583. "workspace": {
  8584. "type": "string"
  8585. }
  8586. },
  8587. "additionalProperties": false
  8588. },
  8589. "required": false,
  8590. "style": "deepObject",
  8591. "explode": true
  8592. }
  8593. ],
  8594. "security": [],
  8595. "responses": {
  8596. "200": {
  8597. "description": "Success",
  8598. "content": {
  8599. "application/json": {
  8600. "schema": {
  8601. "type": "array",
  8602. "items": {
  8603. "$ref": "#/components/schemas/ModelV2Info"
  8604. }
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "400": {
  8610. "description": "InvalidRequestError",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "$ref": "#/components/schemas/InvalidRequestError"
  8615. }
  8616. }
  8617. }
  8618. },
  8619. "401": {
  8620. "description": "UnauthorizedError",
  8621. "content": {
  8622. "application/json": {
  8623. "schema": {
  8624. "$ref": "#/components/schemas/UnauthorizedError"
  8625. }
  8626. }
  8627. }
  8628. },
  8629. "503": {
  8630. "description": "ServiceUnavailableError",
  8631. "content": {
  8632. "application/json": {
  8633. "schema": {
  8634. "$ref": "#/components/schemas/ServiceUnavailableError"
  8635. }
  8636. }
  8637. }
  8638. }
  8639. },
  8640. "description": "Retrieve available v2 models ordered by release date.",
  8641. "summary": "List v2 models",
  8642. "x-codeSamples": [
  8643. {
  8644. "lang": "js",
  8645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8646. }
  8647. ]
  8648. }
  8649. },
  8650. "/api/provider": {
  8651. "get": {
  8652. "tags": ["v2 providers"],
  8653. "operationId": "v2.provider.list",
  8654. "parameters": [
  8655. {
  8656. "name": "location",
  8657. "in": "query",
  8658. "schema": {
  8659. "type": "object",
  8660. "properties": {
  8661. "directory": {
  8662. "type": "string"
  8663. },
  8664. "workspace": {
  8665. "type": "string"
  8666. }
  8667. },
  8668. "additionalProperties": false
  8669. },
  8670. "required": false,
  8671. "style": "deepObject",
  8672. "explode": true
  8673. }
  8674. ],
  8675. "security": [],
  8676. "responses": {
  8677. "200": {
  8678. "description": "Success",
  8679. "content": {
  8680. "application/json": {
  8681. "schema": {
  8682. "type": "array",
  8683. "items": {
  8684. "$ref": "#/components/schemas/ProviderV2Info"
  8685. }
  8686. }
  8687. }
  8688. }
  8689. },
  8690. "400": {
  8691. "description": "InvalidRequestError",
  8692. "content": {
  8693. "application/json": {
  8694. "schema": {
  8695. "$ref": "#/components/schemas/InvalidRequestError"
  8696. }
  8697. }
  8698. }
  8699. },
  8700. "401": {
  8701. "description": "UnauthorizedError",
  8702. "content": {
  8703. "application/json": {
  8704. "schema": {
  8705. "$ref": "#/components/schemas/UnauthorizedError"
  8706. }
  8707. }
  8708. }
  8709. },
  8710. "503": {
  8711. "description": "ServiceUnavailableError",
  8712. "content": {
  8713. "application/json": {
  8714. "schema": {
  8715. "$ref": "#/components/schemas/ServiceUnavailableError"
  8716. }
  8717. }
  8718. }
  8719. }
  8720. },
  8721. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8722. "summary": "List v2 providers",
  8723. "x-codeSamples": [
  8724. {
  8725. "lang": "js",
  8726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8727. }
  8728. ]
  8729. }
  8730. },
  8731. "/api/provider/{providerID}": {
  8732. "get": {
  8733. "tags": ["v2 providers"],
  8734. "operationId": "v2.provider.get",
  8735. "parameters": [
  8736. {
  8737. "name": "providerID",
  8738. "in": "path",
  8739. "schema": {
  8740. "type": "string"
  8741. },
  8742. "required": true
  8743. },
  8744. {
  8745. "name": "location",
  8746. "in": "query",
  8747. "schema": {
  8748. "type": "object",
  8749. "properties": {
  8750. "directory": {
  8751. "type": "string"
  8752. },
  8753. "workspace": {
  8754. "type": "string"
  8755. }
  8756. },
  8757. "additionalProperties": false
  8758. },
  8759. "required": false,
  8760. "style": "deepObject",
  8761. "explode": true
  8762. }
  8763. ],
  8764. "security": [],
  8765. "responses": {
  8766. "200": {
  8767. "description": "ProviderV2.Info",
  8768. "content": {
  8769. "application/json": {
  8770. "schema": {
  8771. "$ref": "#/components/schemas/ProviderV2Info"
  8772. }
  8773. }
  8774. }
  8775. },
  8776. "400": {
  8777. "description": "InvalidRequestError",
  8778. "content": {
  8779. "application/json": {
  8780. "schema": {
  8781. "$ref": "#/components/schemas/InvalidRequestError"
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "401": {
  8787. "description": "UnauthorizedError",
  8788. "content": {
  8789. "application/json": {
  8790. "schema": {
  8791. "$ref": "#/components/schemas/UnauthorizedError"
  8792. }
  8793. }
  8794. }
  8795. },
  8796. "404": {
  8797. "description": "ProviderNotFoundError",
  8798. "content": {
  8799. "application/json": {
  8800. "schema": {
  8801. "$ref": "#/components/schemas/ProviderNotFoundError"
  8802. }
  8803. }
  8804. }
  8805. },
  8806. "503": {
  8807. "description": "ServiceUnavailableError",
  8808. "content": {
  8809. "application/json": {
  8810. "schema": {
  8811. "$ref": "#/components/schemas/ServiceUnavailableError"
  8812. }
  8813. }
  8814. }
  8815. }
  8816. },
  8817. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8818. "summary": "Get v2 provider",
  8819. "x-codeSamples": [
  8820. {
  8821. "lang": "js",
  8822. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  8823. }
  8824. ]
  8825. }
  8826. },
  8827. "/tui/append-prompt": {
  8828. "post": {
  8829. "tags": ["tui"],
  8830. "operationId": "tui.appendPrompt",
  8831. "parameters": [
  8832. {
  8833. "name": "directory",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "string"
  8837. },
  8838. "required": false
  8839. },
  8840. {
  8841. "name": "workspace",
  8842. "in": "query",
  8843. "schema": {
  8844. "type": "string"
  8845. },
  8846. "required": false
  8847. }
  8848. ],
  8849. "responses": {
  8850. "200": {
  8851. "description": "Prompt processed successfully",
  8852. "content": {
  8853. "application/json": {
  8854. "schema": {
  8855. "type": "boolean",
  8856. "description": "Prompt processed successfully"
  8857. }
  8858. }
  8859. }
  8860. },
  8861. "400": {
  8862. "description": "BadRequest | InvalidRequestError",
  8863. "content": {
  8864. "application/json": {
  8865. "schema": {
  8866. "anyOf": [
  8867. {
  8868. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8869. },
  8870. {
  8871. "$ref": "#/components/schemas/InvalidRequestError"
  8872. }
  8873. ]
  8874. }
  8875. }
  8876. }
  8877. }
  8878. },
  8879. "description": "Append prompt to the TUI.",
  8880. "summary": "Append TUI prompt",
  8881. "requestBody": {
  8882. "content": {
  8883. "application/json": {
  8884. "schema": {
  8885. "type": "object",
  8886. "properties": {
  8887. "text": {
  8888. "type": "string"
  8889. }
  8890. },
  8891. "required": ["text"],
  8892. "additionalProperties": false
  8893. }
  8894. }
  8895. }
  8896. },
  8897. "x-codeSamples": [
  8898. {
  8899. "lang": "js",
  8900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8901. }
  8902. ]
  8903. }
  8904. },
  8905. "/tui/open-help": {
  8906. "post": {
  8907. "tags": ["tui"],
  8908. "operationId": "tui.openHelp",
  8909. "parameters": [
  8910. {
  8911. "name": "directory",
  8912. "in": "query",
  8913. "schema": {
  8914. "type": "string"
  8915. },
  8916. "required": false
  8917. },
  8918. {
  8919. "name": "workspace",
  8920. "in": "query",
  8921. "schema": {
  8922. "type": "string"
  8923. },
  8924. "required": false
  8925. }
  8926. ],
  8927. "responses": {
  8928. "200": {
  8929. "description": "Help dialog opened successfully",
  8930. "content": {
  8931. "application/json": {
  8932. "schema": {
  8933. "type": "boolean",
  8934. "description": "Help dialog opened successfully"
  8935. }
  8936. }
  8937. }
  8938. },
  8939. "400": {
  8940. "description": "Bad request",
  8941. "content": {
  8942. "application/json": {
  8943. "schema": {
  8944. "$ref": "#/components/schemas/BadRequestError"
  8945. }
  8946. }
  8947. }
  8948. }
  8949. },
  8950. "description": "Open the help dialog in the TUI to display user assistance information.",
  8951. "summary": "Open help dialog",
  8952. "x-codeSamples": [
  8953. {
  8954. "lang": "js",
  8955. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8956. }
  8957. ]
  8958. }
  8959. },
  8960. "/tui/open-sessions": {
  8961. "post": {
  8962. "tags": ["tui"],
  8963. "operationId": "tui.openSessions",
  8964. "parameters": [
  8965. {
  8966. "name": "directory",
  8967. "in": "query",
  8968. "schema": {
  8969. "type": "string"
  8970. },
  8971. "required": false
  8972. },
  8973. {
  8974. "name": "workspace",
  8975. "in": "query",
  8976. "schema": {
  8977. "type": "string"
  8978. },
  8979. "required": false
  8980. }
  8981. ],
  8982. "responses": {
  8983. "200": {
  8984. "description": "Session dialog opened successfully",
  8985. "content": {
  8986. "application/json": {
  8987. "schema": {
  8988. "type": "boolean",
  8989. "description": "Session dialog opened successfully"
  8990. }
  8991. }
  8992. }
  8993. },
  8994. "400": {
  8995. "description": "Bad request",
  8996. "content": {
  8997. "application/json": {
  8998. "schema": {
  8999. "$ref": "#/components/schemas/BadRequestError"
  9000. }
  9001. }
  9002. }
  9003. }
  9004. },
  9005. "description": "Open the session dialog.",
  9006. "summary": "Open sessions dialog",
  9007. "x-codeSamples": [
  9008. {
  9009. "lang": "js",
  9010. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9011. }
  9012. ]
  9013. }
  9014. },
  9015. "/tui/open-themes": {
  9016. "post": {
  9017. "tags": ["tui"],
  9018. "operationId": "tui.openThemes",
  9019. "parameters": [
  9020. {
  9021. "name": "directory",
  9022. "in": "query",
  9023. "schema": {
  9024. "type": "string"
  9025. },
  9026. "required": false
  9027. },
  9028. {
  9029. "name": "workspace",
  9030. "in": "query",
  9031. "schema": {
  9032. "type": "string"
  9033. },
  9034. "required": false
  9035. }
  9036. ],
  9037. "responses": {
  9038. "200": {
  9039. "description": "Theme dialog opened successfully",
  9040. "content": {
  9041. "application/json": {
  9042. "schema": {
  9043. "type": "boolean",
  9044. "description": "Theme dialog opened successfully"
  9045. }
  9046. }
  9047. }
  9048. },
  9049. "400": {
  9050. "description": "Bad request",
  9051. "content": {
  9052. "application/json": {
  9053. "schema": {
  9054. "$ref": "#/components/schemas/BadRequestError"
  9055. }
  9056. }
  9057. }
  9058. }
  9059. },
  9060. "description": "Open the theme dialog.",
  9061. "summary": "Open themes dialog",
  9062. "x-codeSamples": [
  9063. {
  9064. "lang": "js",
  9065. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9066. }
  9067. ]
  9068. }
  9069. },
  9070. "/tui/open-models": {
  9071. "post": {
  9072. "tags": ["tui"],
  9073. "operationId": "tui.openModels",
  9074. "parameters": [
  9075. {
  9076. "name": "directory",
  9077. "in": "query",
  9078. "schema": {
  9079. "type": "string"
  9080. },
  9081. "required": false
  9082. },
  9083. {
  9084. "name": "workspace",
  9085. "in": "query",
  9086. "schema": {
  9087. "type": "string"
  9088. },
  9089. "required": false
  9090. }
  9091. ],
  9092. "responses": {
  9093. "200": {
  9094. "description": "Model dialog opened successfully",
  9095. "content": {
  9096. "application/json": {
  9097. "schema": {
  9098. "type": "boolean",
  9099. "description": "Model dialog opened successfully"
  9100. }
  9101. }
  9102. }
  9103. },
  9104. "400": {
  9105. "description": "Bad request",
  9106. "content": {
  9107. "application/json": {
  9108. "schema": {
  9109. "$ref": "#/components/schemas/BadRequestError"
  9110. }
  9111. }
  9112. }
  9113. }
  9114. },
  9115. "description": "Open the model dialog.",
  9116. "summary": "Open models dialog",
  9117. "x-codeSamples": [
  9118. {
  9119. "lang": "js",
  9120. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9121. }
  9122. ]
  9123. }
  9124. },
  9125. "/tui/submit-prompt": {
  9126. "post": {
  9127. "tags": ["tui"],
  9128. "operationId": "tui.submitPrompt",
  9129. "parameters": [
  9130. {
  9131. "name": "directory",
  9132. "in": "query",
  9133. "schema": {
  9134. "type": "string"
  9135. },
  9136. "required": false
  9137. },
  9138. {
  9139. "name": "workspace",
  9140. "in": "query",
  9141. "schema": {
  9142. "type": "string"
  9143. },
  9144. "required": false
  9145. }
  9146. ],
  9147. "responses": {
  9148. "200": {
  9149. "description": "Prompt submitted successfully",
  9150. "content": {
  9151. "application/json": {
  9152. "schema": {
  9153. "type": "boolean",
  9154. "description": "Prompt submitted successfully"
  9155. }
  9156. }
  9157. }
  9158. },
  9159. "400": {
  9160. "description": "Bad request",
  9161. "content": {
  9162. "application/json": {
  9163. "schema": {
  9164. "$ref": "#/components/schemas/BadRequestError"
  9165. }
  9166. }
  9167. }
  9168. }
  9169. },
  9170. "description": "Submit the prompt.",
  9171. "summary": "Submit TUI prompt",
  9172. "x-codeSamples": [
  9173. {
  9174. "lang": "js",
  9175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9176. }
  9177. ]
  9178. }
  9179. },
  9180. "/tui/clear-prompt": {
  9181. "post": {
  9182. "tags": ["tui"],
  9183. "operationId": "tui.clearPrompt",
  9184. "parameters": [
  9185. {
  9186. "name": "directory",
  9187. "in": "query",
  9188. "schema": {
  9189. "type": "string"
  9190. },
  9191. "required": false
  9192. },
  9193. {
  9194. "name": "workspace",
  9195. "in": "query",
  9196. "schema": {
  9197. "type": "string"
  9198. },
  9199. "required": false
  9200. }
  9201. ],
  9202. "responses": {
  9203. "200": {
  9204. "description": "Prompt cleared successfully",
  9205. "content": {
  9206. "application/json": {
  9207. "schema": {
  9208. "type": "boolean",
  9209. "description": "Prompt cleared successfully"
  9210. }
  9211. }
  9212. }
  9213. },
  9214. "400": {
  9215. "description": "Bad request",
  9216. "content": {
  9217. "application/json": {
  9218. "schema": {
  9219. "$ref": "#/components/schemas/BadRequestError"
  9220. }
  9221. }
  9222. }
  9223. }
  9224. },
  9225. "description": "Clear the prompt.",
  9226. "summary": "Clear TUI prompt",
  9227. "x-codeSamples": [
  9228. {
  9229. "lang": "js",
  9230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9231. }
  9232. ]
  9233. }
  9234. },
  9235. "/tui/execute-command": {
  9236. "post": {
  9237. "tags": ["tui"],
  9238. "operationId": "tui.executeCommand",
  9239. "parameters": [
  9240. {
  9241. "name": "directory",
  9242. "in": "query",
  9243. "schema": {
  9244. "type": "string"
  9245. },
  9246. "required": false
  9247. },
  9248. {
  9249. "name": "workspace",
  9250. "in": "query",
  9251. "schema": {
  9252. "type": "string"
  9253. },
  9254. "required": false
  9255. }
  9256. ],
  9257. "responses": {
  9258. "200": {
  9259. "description": "Command executed successfully",
  9260. "content": {
  9261. "application/json": {
  9262. "schema": {
  9263. "type": "boolean",
  9264. "description": "Command executed successfully"
  9265. }
  9266. }
  9267. }
  9268. },
  9269. "400": {
  9270. "description": "BadRequest | InvalidRequestError",
  9271. "content": {
  9272. "application/json": {
  9273. "schema": {
  9274. "anyOf": [
  9275. {
  9276. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9277. },
  9278. {
  9279. "$ref": "#/components/schemas/InvalidRequestError"
  9280. }
  9281. ]
  9282. }
  9283. }
  9284. }
  9285. }
  9286. },
  9287. "description": "Execute a TUI command.",
  9288. "summary": "Execute TUI command",
  9289. "requestBody": {
  9290. "content": {
  9291. "application/json": {
  9292. "schema": {
  9293. "type": "object",
  9294. "properties": {
  9295. "command": {
  9296. "type": "string"
  9297. }
  9298. },
  9299. "required": ["command"],
  9300. "additionalProperties": false
  9301. }
  9302. }
  9303. }
  9304. },
  9305. "x-codeSamples": [
  9306. {
  9307. "lang": "js",
  9308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9309. }
  9310. ]
  9311. }
  9312. },
  9313. "/tui/show-toast": {
  9314. "post": {
  9315. "tags": ["tui"],
  9316. "operationId": "tui.showToast",
  9317. "parameters": [
  9318. {
  9319. "name": "directory",
  9320. "in": "query",
  9321. "schema": {
  9322. "type": "string"
  9323. },
  9324. "required": false
  9325. },
  9326. {
  9327. "name": "workspace",
  9328. "in": "query",
  9329. "schema": {
  9330. "type": "string"
  9331. },
  9332. "required": false
  9333. }
  9334. ],
  9335. "responses": {
  9336. "200": {
  9337. "description": "Toast notification shown successfully",
  9338. "content": {
  9339. "application/json": {
  9340. "schema": {
  9341. "type": "boolean",
  9342. "description": "Toast notification shown successfully"
  9343. }
  9344. }
  9345. }
  9346. },
  9347. "400": {
  9348. "description": "Bad request",
  9349. "content": {
  9350. "application/json": {
  9351. "schema": {
  9352. "$ref": "#/components/schemas/BadRequestError"
  9353. }
  9354. }
  9355. }
  9356. }
  9357. },
  9358. "description": "Show a toast notification in the TUI.",
  9359. "summary": "Show TUI toast",
  9360. "requestBody": {
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "type": "object",
  9365. "properties": {
  9366. "title": {
  9367. "type": "string"
  9368. },
  9369. "message": {
  9370. "type": "string"
  9371. },
  9372. "variant": {
  9373. "type": "string",
  9374. "enum": ["info", "success", "warning", "error"]
  9375. },
  9376. "duration": {
  9377. "type": "integer",
  9378. "exclusiveMinimum": 0
  9379. }
  9380. },
  9381. "required": ["message", "variant"],
  9382. "additionalProperties": false
  9383. }
  9384. }
  9385. }
  9386. },
  9387. "x-codeSamples": [
  9388. {
  9389. "lang": "js",
  9390. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9391. }
  9392. ]
  9393. }
  9394. },
  9395. "/tui/publish": {
  9396. "post": {
  9397. "tags": ["tui"],
  9398. "operationId": "tui.publish",
  9399. "parameters": [
  9400. {
  9401. "name": "directory",
  9402. "in": "query",
  9403. "schema": {
  9404. "type": "string"
  9405. },
  9406. "required": false
  9407. },
  9408. {
  9409. "name": "workspace",
  9410. "in": "query",
  9411. "schema": {
  9412. "type": "string"
  9413. },
  9414. "required": false
  9415. }
  9416. ],
  9417. "responses": {
  9418. "200": {
  9419. "description": "Event published successfully",
  9420. "content": {
  9421. "application/json": {
  9422. "schema": {
  9423. "type": "boolean",
  9424. "description": "Event published successfully"
  9425. }
  9426. }
  9427. }
  9428. },
  9429. "400": {
  9430. "description": "BadRequest | InvalidRequestError",
  9431. "content": {
  9432. "application/json": {
  9433. "schema": {
  9434. "anyOf": [
  9435. {
  9436. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9437. },
  9438. {
  9439. "$ref": "#/components/schemas/InvalidRequestError"
  9440. }
  9441. ]
  9442. }
  9443. }
  9444. }
  9445. }
  9446. },
  9447. "description": "Publish a TUI event.",
  9448. "summary": "Publish TUI event",
  9449. "requestBody": {
  9450. "content": {
  9451. "application/json": {
  9452. "schema": {
  9453. "anyOf": [
  9454. {
  9455. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9456. },
  9457. {
  9458. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9459. },
  9460. {
  9461. "$ref": "#/components/schemas/EventTuiToastShow"
  9462. },
  9463. {
  9464. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9465. }
  9466. ]
  9467. }
  9468. }
  9469. }
  9470. },
  9471. "x-codeSamples": [
  9472. {
  9473. "lang": "js",
  9474. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9475. }
  9476. ]
  9477. }
  9478. },
  9479. "/tui/select-session": {
  9480. "post": {
  9481. "tags": ["tui"],
  9482. "operationId": "tui.selectSession",
  9483. "parameters": [
  9484. {
  9485. "name": "directory",
  9486. "in": "query",
  9487. "schema": {
  9488. "type": "string"
  9489. },
  9490. "required": false
  9491. },
  9492. {
  9493. "name": "workspace",
  9494. "in": "query",
  9495. "schema": {
  9496. "type": "string"
  9497. },
  9498. "required": false
  9499. }
  9500. ],
  9501. "responses": {
  9502. "200": {
  9503. "description": "Session selected successfully",
  9504. "content": {
  9505. "application/json": {
  9506. "schema": {
  9507. "type": "boolean",
  9508. "description": "Session selected successfully"
  9509. }
  9510. }
  9511. }
  9512. },
  9513. "400": {
  9514. "description": "BadRequest | InvalidRequestError",
  9515. "content": {
  9516. "application/json": {
  9517. "schema": {
  9518. "anyOf": [
  9519. {
  9520. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9521. },
  9522. {
  9523. "$ref": "#/components/schemas/InvalidRequestError"
  9524. }
  9525. ]
  9526. }
  9527. }
  9528. }
  9529. },
  9530. "404": {
  9531. "description": "NotFoundError",
  9532. "content": {
  9533. "application/json": {
  9534. "schema": {
  9535. "$ref": "#/components/schemas/NotFoundError"
  9536. }
  9537. }
  9538. }
  9539. }
  9540. },
  9541. "description": "Navigate the TUI to display the specified session.",
  9542. "summary": "Select session",
  9543. "requestBody": {
  9544. "content": {
  9545. "application/json": {
  9546. "schema": {
  9547. "type": "object",
  9548. "properties": {
  9549. "sessionID": {
  9550. "type": "string",
  9551. "pattern": "^ses",
  9552. "description": "Session ID to navigate to"
  9553. }
  9554. },
  9555. "required": ["sessionID"],
  9556. "additionalProperties": false
  9557. }
  9558. }
  9559. }
  9560. },
  9561. "x-codeSamples": [
  9562. {
  9563. "lang": "js",
  9564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9565. }
  9566. ]
  9567. }
  9568. },
  9569. "/tui/control/next": {
  9570. "get": {
  9571. "tags": ["tui"],
  9572. "operationId": "tui.control.next",
  9573. "parameters": [
  9574. {
  9575. "name": "directory",
  9576. "in": "query",
  9577. "schema": {
  9578. "type": "string"
  9579. },
  9580. "required": false
  9581. },
  9582. {
  9583. "name": "workspace",
  9584. "in": "query",
  9585. "schema": {
  9586. "type": "string"
  9587. },
  9588. "required": false
  9589. }
  9590. ],
  9591. "responses": {
  9592. "200": {
  9593. "description": "Next TUI request",
  9594. "content": {
  9595. "application/json": {
  9596. "schema": {
  9597. "type": "object",
  9598. "properties": {
  9599. "path": {
  9600. "type": "string"
  9601. },
  9602. "body": {}
  9603. },
  9604. "required": ["path", "body"],
  9605. "additionalProperties": false,
  9606. "description": "Next TUI request"
  9607. }
  9608. }
  9609. }
  9610. },
  9611. "400": {
  9612. "description": "Bad request",
  9613. "content": {
  9614. "application/json": {
  9615. "schema": {
  9616. "$ref": "#/components/schemas/BadRequestError"
  9617. }
  9618. }
  9619. }
  9620. }
  9621. },
  9622. "description": "Retrieve the next TUI request from the queue for processing.",
  9623. "summary": "Get next TUI request",
  9624. "x-codeSamples": [
  9625. {
  9626. "lang": "js",
  9627. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9628. }
  9629. ]
  9630. }
  9631. },
  9632. "/tui/control/response": {
  9633. "post": {
  9634. "tags": ["tui"],
  9635. "operationId": "tui.control.response",
  9636. "parameters": [
  9637. {
  9638. "name": "directory",
  9639. "in": "query",
  9640. "schema": {
  9641. "type": "string"
  9642. },
  9643. "required": false
  9644. },
  9645. {
  9646. "name": "workspace",
  9647. "in": "query",
  9648. "schema": {
  9649. "type": "string"
  9650. },
  9651. "required": false
  9652. }
  9653. ],
  9654. "responses": {
  9655. "200": {
  9656. "description": "Response submitted successfully",
  9657. "content": {
  9658. "application/json": {
  9659. "schema": {
  9660. "type": "boolean",
  9661. "description": "Response submitted successfully"
  9662. }
  9663. }
  9664. }
  9665. },
  9666. "400": {
  9667. "description": "Bad request",
  9668. "content": {
  9669. "application/json": {
  9670. "schema": {
  9671. "$ref": "#/components/schemas/BadRequestError"
  9672. }
  9673. }
  9674. }
  9675. }
  9676. },
  9677. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9678. "summary": "Submit TUI response",
  9679. "requestBody": {
  9680. "content": {
  9681. "application/json": {
  9682. "schema": {}
  9683. }
  9684. }
  9685. },
  9686. "x-codeSamples": [
  9687. {
  9688. "lang": "js",
  9689. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9690. }
  9691. ]
  9692. }
  9693. },
  9694. "/experimental/workspace/adapter": {
  9695. "get": {
  9696. "tags": ["workspace"],
  9697. "operationId": "experimental.workspace.adapter.list",
  9698. "parameters": [
  9699. {
  9700. "name": "directory",
  9701. "in": "query",
  9702. "schema": {
  9703. "type": "string"
  9704. },
  9705. "required": false
  9706. },
  9707. {
  9708. "name": "workspace",
  9709. "in": "query",
  9710. "schema": {
  9711. "type": "string"
  9712. },
  9713. "required": false
  9714. }
  9715. ],
  9716. "responses": {
  9717. "200": {
  9718. "description": "Workspace adapters",
  9719. "content": {
  9720. "application/json": {
  9721. "schema": {
  9722. "type": "array",
  9723. "items": {
  9724. "type": "object",
  9725. "properties": {
  9726. "type": {
  9727. "type": "string"
  9728. },
  9729. "name": {
  9730. "type": "string"
  9731. },
  9732. "description": {
  9733. "type": "string"
  9734. }
  9735. },
  9736. "required": ["type", "name", "description"],
  9737. "additionalProperties": false
  9738. },
  9739. "description": "Workspace adapters"
  9740. }
  9741. }
  9742. }
  9743. },
  9744. "400": {
  9745. "description": "Bad request",
  9746. "content": {
  9747. "application/json": {
  9748. "schema": {
  9749. "$ref": "#/components/schemas/BadRequestError"
  9750. }
  9751. }
  9752. }
  9753. }
  9754. },
  9755. "description": "List all available workspace adapters for the current project.",
  9756. "summary": "List workspace adapters",
  9757. "x-codeSamples": [
  9758. {
  9759. "lang": "js",
  9760. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9761. }
  9762. ]
  9763. }
  9764. },
  9765. "/experimental/workspace": {
  9766. "get": {
  9767. "tags": ["workspace"],
  9768. "operationId": "experimental.workspace.list",
  9769. "parameters": [
  9770. {
  9771. "name": "directory",
  9772. "in": "query",
  9773. "schema": {
  9774. "type": "string"
  9775. },
  9776. "required": false
  9777. },
  9778. {
  9779. "name": "workspace",
  9780. "in": "query",
  9781. "schema": {
  9782. "type": "string"
  9783. },
  9784. "required": false
  9785. }
  9786. ],
  9787. "responses": {
  9788. "200": {
  9789. "description": "Workspaces",
  9790. "content": {
  9791. "application/json": {
  9792. "schema": {
  9793. "type": "array",
  9794. "items": {
  9795. "$ref": "#/components/schemas/Workspace"
  9796. },
  9797. "description": "Workspaces"
  9798. }
  9799. }
  9800. }
  9801. },
  9802. "400": {
  9803. "description": "Bad request",
  9804. "content": {
  9805. "application/json": {
  9806. "schema": {
  9807. "$ref": "#/components/schemas/BadRequestError"
  9808. }
  9809. }
  9810. }
  9811. }
  9812. },
  9813. "description": "List all workspaces.",
  9814. "summary": "List workspaces",
  9815. "x-codeSamples": [
  9816. {
  9817. "lang": "js",
  9818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9819. }
  9820. ]
  9821. },
  9822. "post": {
  9823. "tags": ["workspace"],
  9824. "operationId": "experimental.workspace.create",
  9825. "parameters": [
  9826. {
  9827. "name": "directory",
  9828. "in": "query",
  9829. "schema": {
  9830. "type": "string"
  9831. },
  9832. "required": false
  9833. },
  9834. {
  9835. "name": "workspace",
  9836. "in": "query",
  9837. "schema": {
  9838. "type": "string"
  9839. },
  9840. "required": false
  9841. }
  9842. ],
  9843. "responses": {
  9844. "200": {
  9845. "description": "Workspace created",
  9846. "content": {
  9847. "application/json": {
  9848. "schema": {
  9849. "$ref": "#/components/schemas/Workspace"
  9850. }
  9851. }
  9852. }
  9853. },
  9854. "400": {
  9855. "description": "BadRequest | InvalidRequestError",
  9856. "content": {
  9857. "application/json": {
  9858. "schema": {
  9859. "anyOf": [
  9860. {
  9861. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9862. },
  9863. {
  9864. "$ref": "#/components/schemas/InvalidRequestError"
  9865. }
  9866. ]
  9867. }
  9868. }
  9869. }
  9870. }
  9871. },
  9872. "description": "Create a workspace for the current project.",
  9873. "summary": "Create workspace",
  9874. "requestBody": {
  9875. "content": {
  9876. "application/json": {
  9877. "schema": {
  9878. "type": "object",
  9879. "properties": {
  9880. "id": {
  9881. "type": "string",
  9882. "pattern": "^wrk"
  9883. },
  9884. "type": {
  9885. "type": "string"
  9886. },
  9887. "branch": {
  9888. "anyOf": [
  9889. {
  9890. "type": "string"
  9891. },
  9892. {
  9893. "type": "null"
  9894. }
  9895. ]
  9896. },
  9897. "extra": {
  9898. "anyOf": [
  9899. {},
  9900. {
  9901. "type": "null"
  9902. }
  9903. ]
  9904. }
  9905. },
  9906. "required": ["type"],
  9907. "additionalProperties": false
  9908. }
  9909. }
  9910. }
  9911. },
  9912. "x-codeSamples": [
  9913. {
  9914. "lang": "js",
  9915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9916. }
  9917. ]
  9918. }
  9919. },
  9920. "/experimental/workspace/sync-list": {
  9921. "post": {
  9922. "tags": ["workspace"],
  9923. "operationId": "experimental.workspace.syncList",
  9924. "parameters": [
  9925. {
  9926. "name": "directory",
  9927. "in": "query",
  9928. "schema": {
  9929. "type": "string"
  9930. },
  9931. "required": false
  9932. },
  9933. {
  9934. "name": "workspace",
  9935. "in": "query",
  9936. "schema": {
  9937. "type": "string"
  9938. },
  9939. "required": false
  9940. }
  9941. ],
  9942. "responses": {
  9943. "204": {
  9944. "description": "Workspace list synced"
  9945. },
  9946. "400": {
  9947. "description": "Bad request",
  9948. "content": {
  9949. "application/json": {
  9950. "schema": {
  9951. "$ref": "#/components/schemas/BadRequestError"
  9952. }
  9953. }
  9954. }
  9955. }
  9956. },
  9957. "description": "Register missing workspaces returned by workspace adapters.",
  9958. "summary": "Sync workspace list",
  9959. "x-codeSamples": [
  9960. {
  9961. "lang": "js",
  9962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9963. }
  9964. ]
  9965. }
  9966. },
  9967. "/experimental/workspace/status": {
  9968. "get": {
  9969. "tags": ["workspace"],
  9970. "operationId": "experimental.workspace.status",
  9971. "parameters": [
  9972. {
  9973. "name": "directory",
  9974. "in": "query",
  9975. "schema": {
  9976. "type": "string"
  9977. },
  9978. "required": false
  9979. },
  9980. {
  9981. "name": "workspace",
  9982. "in": "query",
  9983. "schema": {
  9984. "type": "string"
  9985. },
  9986. "required": false
  9987. }
  9988. ],
  9989. "responses": {
  9990. "200": {
  9991. "description": "Workspace status",
  9992. "content": {
  9993. "application/json": {
  9994. "schema": {
  9995. "type": "array",
  9996. "items": {
  9997. "type": "object",
  9998. "properties": {
  9999. "workspaceID": {
  10000. "type": "string",
  10001. "pattern": "^wrk"
  10002. },
  10003. "status": {
  10004. "type": "string",
  10005. "enum": ["connected", "connecting", "disconnected", "error"]
  10006. }
  10007. },
  10008. "required": ["workspaceID", "status"],
  10009. "additionalProperties": false
  10010. },
  10011. "description": "Workspace status"
  10012. }
  10013. }
  10014. }
  10015. },
  10016. "400": {
  10017. "description": "Bad request",
  10018. "content": {
  10019. "application/json": {
  10020. "schema": {
  10021. "$ref": "#/components/schemas/BadRequestError"
  10022. }
  10023. }
  10024. }
  10025. }
  10026. },
  10027. "description": "Get connection status for workspaces in the current project.",
  10028. "summary": "Workspace status",
  10029. "x-codeSamples": [
  10030. {
  10031. "lang": "js",
  10032. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10033. }
  10034. ]
  10035. }
  10036. },
  10037. "/experimental/workspace/{id}": {
  10038. "delete": {
  10039. "tags": ["workspace"],
  10040. "operationId": "experimental.workspace.remove",
  10041. "parameters": [
  10042. {
  10043. "name": "id",
  10044. "in": "path",
  10045. "schema": {
  10046. "type": "string",
  10047. "pattern": "^wrk"
  10048. },
  10049. "required": true
  10050. },
  10051. {
  10052. "name": "directory",
  10053. "in": "query",
  10054. "schema": {
  10055. "type": "string"
  10056. },
  10057. "required": false
  10058. },
  10059. {
  10060. "name": "workspace",
  10061. "in": "query",
  10062. "schema": {
  10063. "type": "string"
  10064. },
  10065. "required": false
  10066. }
  10067. ],
  10068. "responses": {
  10069. "200": {
  10070. "description": "Workspace removed",
  10071. "content": {
  10072. "application/json": {
  10073. "schema": {
  10074. "$ref": "#/components/schemas/Workspace"
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "400": {
  10080. "description": "BadRequest | InvalidRequestError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "anyOf": [
  10085. {
  10086. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10087. },
  10088. {
  10089. "$ref": "#/components/schemas/InvalidRequestError"
  10090. }
  10091. ]
  10092. }
  10093. }
  10094. }
  10095. }
  10096. },
  10097. "description": "Remove an existing workspace.",
  10098. "summary": "Remove workspace",
  10099. "x-codeSamples": [
  10100. {
  10101. "lang": "js",
  10102. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10103. }
  10104. ]
  10105. }
  10106. },
  10107. "/experimental/workspace/warp": {
  10108. "post": {
  10109. "tags": ["workspace"],
  10110. "operationId": "experimental.workspace.warp",
  10111. "parameters": [
  10112. {
  10113. "name": "directory",
  10114. "in": "query",
  10115. "schema": {
  10116. "type": "string"
  10117. },
  10118. "required": false
  10119. },
  10120. {
  10121. "name": "workspace",
  10122. "in": "query",
  10123. "schema": {
  10124. "type": "string"
  10125. },
  10126. "required": false
  10127. }
  10128. ],
  10129. "responses": {
  10130. "204": {
  10131. "description": "Session warped"
  10132. },
  10133. "400": {
  10134. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "anyOf": [
  10139. {
  10140. "$ref": "#/components/schemas/WorkspaceWarpError"
  10141. },
  10142. {
  10143. "$ref": "#/components/schemas/VcsApplyError"
  10144. },
  10145. {
  10146. "$ref": "#/components/schemas/InvalidRequestError"
  10147. }
  10148. ]
  10149. }
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10155. "summary": "Warp session into workspace",
  10156. "requestBody": {
  10157. "content": {
  10158. "application/json": {
  10159. "schema": {
  10160. "type": "object",
  10161. "properties": {
  10162. "id": {
  10163. "anyOf": [
  10164. {
  10165. "type": "string",
  10166. "pattern": "^wrk"
  10167. },
  10168. {
  10169. "type": "null"
  10170. }
  10171. ]
  10172. },
  10173. "sessionID": {
  10174. "type": "string",
  10175. "pattern": "^ses"
  10176. },
  10177. "copyChanges": {
  10178. "type": "boolean"
  10179. }
  10180. },
  10181. "required": ["id", "sessionID"],
  10182. "additionalProperties": false
  10183. }
  10184. }
  10185. }
  10186. },
  10187. "x-codeSamples": [
  10188. {
  10189. "lang": "js",
  10190. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10191. }
  10192. ]
  10193. }
  10194. },
  10195. "/pty/{ptyID}/connect": {
  10196. "get": {
  10197. "tags": ["pty"],
  10198. "operationId": "pty.connect",
  10199. "parameters": [
  10200. {
  10201. "name": "ptyID",
  10202. "in": "path",
  10203. "schema": {
  10204. "type": "string",
  10205. "pattern": "^pty"
  10206. },
  10207. "required": true
  10208. },
  10209. {
  10210. "name": "directory",
  10211. "in": "query",
  10212. "schema": {
  10213. "type": "string"
  10214. },
  10215. "required": false
  10216. },
  10217. {
  10218. "name": "workspace",
  10219. "in": "query",
  10220. "schema": {
  10221. "type": "string"
  10222. },
  10223. "required": false
  10224. }
  10225. ],
  10226. "responses": {
  10227. "200": {
  10228. "description": "Connected session",
  10229. "content": {
  10230. "application/json": {
  10231. "schema": {
  10232. "type": "boolean",
  10233. "description": "Connected session"
  10234. }
  10235. }
  10236. }
  10237. },
  10238. "403": {
  10239. "description": "Forbidden",
  10240. "content": {
  10241. "application/json": {
  10242. "schema": {
  10243. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10244. }
  10245. }
  10246. }
  10247. },
  10248. "404": {
  10249. "description": "Not found",
  10250. "content": {
  10251. "application/json": {
  10252. "schema": {
  10253. "$ref": "#/components/schemas/NotFoundError"
  10254. }
  10255. }
  10256. }
  10257. }
  10258. },
  10259. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10260. "summary": "Connect to PTY session",
  10261. "x-codeSamples": [
  10262. {
  10263. "lang": "js",
  10264. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10265. }
  10266. ]
  10267. }
  10268. }
  10269. },
  10270. "components": {
  10271. "schemas": {
  10272. "Event": {
  10273. "anyOf": [
  10274. {
  10275. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10276. },
  10277. {
  10278. "$ref": "#/components/schemas/Event.tui.command.execute"
  10279. },
  10280. {
  10281. "$ref": "#/components/schemas/EventTuiToastShow1"
  10282. },
  10283. {
  10284. "$ref": "#/components/schemas/Event.tui.session.select"
  10285. },
  10286. {
  10287. "$ref": "#/components/schemas/EventServerConnected"
  10288. },
  10289. {
  10290. "$ref": "#/components/schemas/EventGlobalDisposed"
  10291. },
  10292. {
  10293. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10294. },
  10295. {
  10296. "$ref": "#/components/schemas/EventFileEdited"
  10297. },
  10298. {
  10299. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10300. },
  10301. {
  10302. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10303. },
  10304. {
  10305. "$ref": "#/components/schemas/EventLspUpdated"
  10306. },
  10307. {
  10308. "$ref": "#/components/schemas/EventMessagePartDelta"
  10309. },
  10310. {
  10311. "$ref": "#/components/schemas/EventPermissionAsked"
  10312. },
  10313. {
  10314. "$ref": "#/components/schemas/EventPermissionReplied"
  10315. },
  10316. {
  10317. "$ref": "#/components/schemas/EventSessionDiff"
  10318. },
  10319. {
  10320. "$ref": "#/components/schemas/EventSessionError"
  10321. },
  10322. {
  10323. "$ref": "#/components/schemas/EventQuestionAsked"
  10324. },
  10325. {
  10326. "$ref": "#/components/schemas/EventQuestionReplied"
  10327. },
  10328. {
  10329. "$ref": "#/components/schemas/EventQuestionRejected"
  10330. },
  10331. {
  10332. "$ref": "#/components/schemas/EventTodoUpdated"
  10333. },
  10334. {
  10335. "$ref": "#/components/schemas/EventSessionStatus"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/EventSessionIdle"
  10339. },
  10340. {
  10341. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10342. },
  10343. {
  10344. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10345. },
  10346. {
  10347. "$ref": "#/components/schemas/EventCommandExecuted"
  10348. },
  10349. {
  10350. "$ref": "#/components/schemas/EventProjectUpdated"
  10351. },
  10352. {
  10353. "$ref": "#/components/schemas/EventSessionCompacted"
  10354. },
  10355. {
  10356. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10357. },
  10358. {
  10359. "$ref": "#/components/schemas/EventWorkspaceReady"
  10360. },
  10361. {
  10362. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10363. },
  10364. {
  10365. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10366. },
  10367. {
  10368. "$ref": "#/components/schemas/EventWorktreeReady"
  10369. },
  10370. {
  10371. "$ref": "#/components/schemas/EventWorktreeFailed"
  10372. },
  10373. {
  10374. "$ref": "#/components/schemas/EventPtyCreated"
  10375. },
  10376. {
  10377. "$ref": "#/components/schemas/EventPtyUpdated"
  10378. },
  10379. {
  10380. "$ref": "#/components/schemas/EventPtyExited"
  10381. },
  10382. {
  10383. "$ref": "#/components/schemas/EventPtyDeleted"
  10384. },
  10385. {
  10386. "$ref": "#/components/schemas/EventInstallationUpdated"
  10387. },
  10388. {
  10389. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10390. },
  10391. {
  10392. "$ref": "#/components/schemas/EventMessageUpdated"
  10393. },
  10394. {
  10395. "$ref": "#/components/schemas/EventMessageRemoved"
  10396. },
  10397. {
  10398. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10399. },
  10400. {
  10401. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10402. },
  10403. {
  10404. "$ref": "#/components/schemas/EventSessionCreated"
  10405. },
  10406. {
  10407. "$ref": "#/components/schemas/EventSessionUpdated"
  10408. },
  10409. {
  10410. "$ref": "#/components/schemas/EventSessionDeleted"
  10411. },
  10412. {
  10413. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10414. },
  10415. {
  10416. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10417. },
  10418. {
  10419. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10420. },
  10421. {
  10422. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10423. },
  10424. {
  10425. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10426. },
  10427. {
  10428. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10429. },
  10430. {
  10431. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10432. },
  10433. {
  10434. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10435. },
  10436. {
  10437. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10438. },
  10439. {
  10440. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10441. },
  10442. {
  10443. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10444. },
  10445. {
  10446. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10447. },
  10448. {
  10449. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10450. },
  10451. {
  10452. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10453. },
  10454. {
  10455. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10456. },
  10457. {
  10458. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10459. },
  10460. {
  10461. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10462. },
  10463. {
  10464. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10465. },
  10466. {
  10467. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10468. },
  10469. {
  10470. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10471. },
  10472. {
  10473. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10474. },
  10475. {
  10476. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10477. },
  10478. {
  10479. "$ref": "#/components/schemas/EventSessionNextRetried"
  10480. },
  10481. {
  10482. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10483. },
  10484. {
  10485. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10486. },
  10487. {
  10488. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10489. },
  10490. {
  10491. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10492. },
  10493. {
  10494. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10495. },
  10496. {
  10497. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10498. },
  10499. {
  10500. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10501. },
  10502. {
  10503. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10504. },
  10505. {
  10506. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10507. },
  10508. {
  10509. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10510. },
  10511. {
  10512. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10513. },
  10514. {
  10515. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10516. },
  10517. {
  10518. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10519. },
  10520. {
  10521. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10522. },
  10523. {
  10524. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10525. },
  10526. {
  10527. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10528. },
  10529. {
  10530. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10531. },
  10532. {
  10533. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10534. },
  10535. {
  10536. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10537. },
  10538. {
  10539. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10540. },
  10541. {
  10542. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10543. },
  10544. {
  10545. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10546. },
  10547. {
  10548. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10549. },
  10550. {
  10551. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10552. },
  10553. {
  10554. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10555. },
  10556. {
  10557. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10558. },
  10559. {
  10560. "$ref": "#/components/schemas/EventSessionNextRetried"
  10561. },
  10562. {
  10563. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10564. },
  10565. {
  10566. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10567. },
  10568. {
  10569. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10570. },
  10571. {
  10572. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10573. },
  10574. {
  10575. "$ref": "#/components/schemas/EventAccountAdded"
  10576. },
  10577. {
  10578. "$ref": "#/components/schemas/EventAccountRemoved"
  10579. },
  10580. {
  10581. "$ref": "#/components/schemas/EventAccountSwitched"
  10582. }
  10583. ]
  10584. },
  10585. "OAuth": {
  10586. "type": "object",
  10587. "properties": {
  10588. "type": {
  10589. "type": "string",
  10590. "enum": ["oauth"]
  10591. },
  10592. "refresh": {
  10593. "type": "string"
  10594. },
  10595. "access": {
  10596. "type": "string"
  10597. },
  10598. "expires": {
  10599. "type": "integer",
  10600. "minimum": 0
  10601. },
  10602. "accountId": {
  10603. "type": "string"
  10604. },
  10605. "enterpriseUrl": {
  10606. "type": "string"
  10607. }
  10608. },
  10609. "required": ["type", "refresh", "access", "expires"],
  10610. "additionalProperties": false
  10611. },
  10612. "ApiAuth": {
  10613. "type": "object",
  10614. "properties": {
  10615. "type": {
  10616. "type": "string",
  10617. "enum": ["api"]
  10618. },
  10619. "key": {
  10620. "type": "string"
  10621. },
  10622. "metadata": {
  10623. "type": "object",
  10624. "additionalProperties": {
  10625. "type": "string"
  10626. }
  10627. }
  10628. },
  10629. "required": ["type", "key"],
  10630. "additionalProperties": false
  10631. },
  10632. "WellKnownAuth": {
  10633. "type": "object",
  10634. "properties": {
  10635. "type": {
  10636. "type": "string",
  10637. "enum": ["wellknown"]
  10638. },
  10639. "key": {
  10640. "type": "string"
  10641. },
  10642. "token": {
  10643. "type": "string"
  10644. }
  10645. },
  10646. "required": ["type", "key", "token"],
  10647. "additionalProperties": false
  10648. },
  10649. "Auth": {
  10650. "anyOf": [
  10651. {
  10652. "$ref": "#/components/schemas/OAuth"
  10653. },
  10654. {
  10655. "$ref": "#/components/schemas/ApiAuth"
  10656. },
  10657. {
  10658. "$ref": "#/components/schemas/WellKnownAuth"
  10659. }
  10660. ]
  10661. },
  10662. "effect_HttpApiError_BadRequest": {
  10663. "type": "object",
  10664. "properties": {
  10665. "_tag": {
  10666. "type": "string",
  10667. "enum": ["BadRequest"]
  10668. }
  10669. },
  10670. "required": ["_tag"],
  10671. "additionalProperties": false
  10672. },
  10673. "InvalidRequestError": {
  10674. "type": "object",
  10675. "properties": {
  10676. "_tag": {
  10677. "type": "string",
  10678. "enum": ["InvalidRequestError"]
  10679. },
  10680. "message": {
  10681. "type": "string"
  10682. },
  10683. "kind": {
  10684. "type": "string"
  10685. },
  10686. "field": {
  10687. "type": "string"
  10688. }
  10689. },
  10690. "required": ["_tag", "message"],
  10691. "additionalProperties": false
  10692. },
  10693. "Event.tui.prompt.append": {
  10694. "type": "object",
  10695. "properties": {
  10696. "id": {
  10697. "type": "string"
  10698. },
  10699. "type": {
  10700. "type": "string",
  10701. "enum": ["tui.prompt.append"]
  10702. },
  10703. "properties": {
  10704. "type": "object",
  10705. "properties": {
  10706. "text": {
  10707. "type": "string"
  10708. }
  10709. },
  10710. "required": ["text"],
  10711. "additionalProperties": false
  10712. }
  10713. },
  10714. "required": ["id", "type", "properties"],
  10715. "additionalProperties": false
  10716. },
  10717. "Event.tui.command.execute": {
  10718. "type": "object",
  10719. "properties": {
  10720. "id": {
  10721. "type": "string"
  10722. },
  10723. "type": {
  10724. "type": "string",
  10725. "enum": ["tui.command.execute"]
  10726. },
  10727. "properties": {
  10728. "type": "object",
  10729. "properties": {
  10730. "command": {
  10731. "anyOf": [
  10732. {
  10733. "type": "string",
  10734. "enum": [
  10735. "session.list",
  10736. "session.new",
  10737. "session.share",
  10738. "session.interrupt",
  10739. "session.compact",
  10740. "session.page.up",
  10741. "session.page.down",
  10742. "session.line.up",
  10743. "session.line.down",
  10744. "session.half.page.up",
  10745. "session.half.page.down",
  10746. "session.first",
  10747. "session.last",
  10748. "prompt.clear",
  10749. "prompt.submit",
  10750. "agent.cycle"
  10751. ]
  10752. },
  10753. {
  10754. "type": "string"
  10755. }
  10756. ]
  10757. }
  10758. },
  10759. "required": ["command"],
  10760. "additionalProperties": false
  10761. }
  10762. },
  10763. "required": ["id", "type", "properties"],
  10764. "additionalProperties": false
  10765. },
  10766. "Event.tui.toast.show": {
  10767. "type": "object",
  10768. "properties": {
  10769. "id": {
  10770. "type": "string"
  10771. },
  10772. "type": {
  10773. "type": "string",
  10774. "enum": ["tui.toast.show"]
  10775. },
  10776. "properties": {
  10777. "type": "object",
  10778. "properties": {
  10779. "title": {
  10780. "type": "string"
  10781. },
  10782. "message": {
  10783. "type": "string"
  10784. },
  10785. "variant": {
  10786. "type": "string",
  10787. "enum": ["info", "success", "warning", "error"]
  10788. },
  10789. "duration": {
  10790. "type": "integer",
  10791. "exclusiveMinimum": 0
  10792. }
  10793. },
  10794. "required": ["message", "variant"],
  10795. "additionalProperties": false
  10796. }
  10797. },
  10798. "required": ["id", "type", "properties"],
  10799. "additionalProperties": false
  10800. },
  10801. "Event.tui.session.select": {
  10802. "type": "object",
  10803. "properties": {
  10804. "id": {
  10805. "type": "string"
  10806. },
  10807. "type": {
  10808. "type": "string",
  10809. "enum": ["tui.session.select"]
  10810. },
  10811. "properties": {
  10812. "type": "object",
  10813. "properties": {
  10814. "sessionID": {
  10815. "type": "string",
  10816. "pattern": "^ses",
  10817. "description": "Session ID to navigate to"
  10818. }
  10819. },
  10820. "required": ["sessionID"],
  10821. "additionalProperties": false
  10822. }
  10823. },
  10824. "required": ["id", "type", "properties"],
  10825. "additionalProperties": false
  10826. },
  10827. "PermissionRequest": {
  10828. "type": "object",
  10829. "properties": {
  10830. "id": {
  10831. "type": "string",
  10832. "pattern": "^per"
  10833. },
  10834. "sessionID": {
  10835. "type": "string",
  10836. "pattern": "^ses"
  10837. },
  10838. "permission": {
  10839. "type": "string"
  10840. },
  10841. "patterns": {
  10842. "type": "array",
  10843. "items": {
  10844. "type": "string"
  10845. }
  10846. },
  10847. "metadata": {
  10848. "type": "object"
  10849. },
  10850. "always": {
  10851. "type": "array",
  10852. "items": {
  10853. "type": "string"
  10854. }
  10855. },
  10856. "tool": {
  10857. "type": "object",
  10858. "properties": {
  10859. "messageID": {
  10860. "type": "string",
  10861. "pattern": "^msg"
  10862. },
  10863. "callID": {
  10864. "type": "string"
  10865. }
  10866. },
  10867. "required": ["messageID", "callID"],
  10868. "additionalProperties": false
  10869. }
  10870. },
  10871. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  10872. "additionalProperties": false
  10873. },
  10874. "SnapshotFileDiff": {
  10875. "type": "object",
  10876. "properties": {
  10877. "file": {
  10878. "type": "string"
  10879. },
  10880. "patch": {
  10881. "type": "string"
  10882. },
  10883. "additions": {
  10884. "type": "number"
  10885. },
  10886. "deletions": {
  10887. "type": "number"
  10888. },
  10889. "status": {
  10890. "type": "string",
  10891. "enum": ["added", "deleted", "modified"]
  10892. }
  10893. },
  10894. "required": ["additions", "deletions"],
  10895. "additionalProperties": false
  10896. },
  10897. "ProviderAuthError": {
  10898. "type": "object",
  10899. "properties": {
  10900. "name": {
  10901. "type": "string",
  10902. "enum": ["ProviderAuthError"]
  10903. },
  10904. "data": {
  10905. "type": "object",
  10906. "properties": {
  10907. "providerID": {
  10908. "type": "string"
  10909. },
  10910. "message": {
  10911. "type": "string"
  10912. }
  10913. },
  10914. "required": ["providerID", "message"],
  10915. "additionalProperties": false
  10916. }
  10917. },
  10918. "required": ["name", "data"],
  10919. "additionalProperties": false
  10920. },
  10921. "UnknownError": {
  10922. "type": "object",
  10923. "properties": {
  10924. "name": {
  10925. "type": "string",
  10926. "enum": ["UnknownError"]
  10927. },
  10928. "data": {
  10929. "type": "object",
  10930. "properties": {
  10931. "message": {
  10932. "type": "string"
  10933. }
  10934. },
  10935. "required": ["message"],
  10936. "additionalProperties": false
  10937. }
  10938. },
  10939. "required": ["name", "data"],
  10940. "additionalProperties": false
  10941. },
  10942. "MessageOutputLengthError": {
  10943. "type": "object",
  10944. "properties": {
  10945. "name": {
  10946. "type": "string",
  10947. "enum": ["MessageOutputLengthError"]
  10948. },
  10949. "data": {
  10950. "type": "object",
  10951. "properties": {}
  10952. }
  10953. },
  10954. "required": ["name", "data"],
  10955. "additionalProperties": false
  10956. },
  10957. "MessageAbortedError": {
  10958. "type": "object",
  10959. "properties": {
  10960. "name": {
  10961. "type": "string",
  10962. "enum": ["MessageAbortedError"]
  10963. },
  10964. "data": {
  10965. "type": "object",
  10966. "properties": {
  10967. "message": {
  10968. "type": "string"
  10969. }
  10970. },
  10971. "required": ["message"],
  10972. "additionalProperties": false
  10973. }
  10974. },
  10975. "required": ["name", "data"],
  10976. "additionalProperties": false
  10977. },
  10978. "StructuredOutputError": {
  10979. "type": "object",
  10980. "properties": {
  10981. "name": {
  10982. "type": "string",
  10983. "enum": ["StructuredOutputError"]
  10984. },
  10985. "data": {
  10986. "type": "object",
  10987. "properties": {
  10988. "message": {
  10989. "type": "string"
  10990. },
  10991. "retries": {
  10992. "type": "integer",
  10993. "minimum": 0
  10994. }
  10995. },
  10996. "required": ["message", "retries"],
  10997. "additionalProperties": false
  10998. }
  10999. },
  11000. "required": ["name", "data"],
  11001. "additionalProperties": false
  11002. },
  11003. "ContextOverflowError": {
  11004. "type": "object",
  11005. "properties": {
  11006. "name": {
  11007. "type": "string",
  11008. "enum": ["ContextOverflowError"]
  11009. },
  11010. "data": {
  11011. "type": "object",
  11012. "properties": {
  11013. "message": {
  11014. "type": "string"
  11015. },
  11016. "responseBody": {
  11017. "type": "string"
  11018. }
  11019. },
  11020. "required": ["message"],
  11021. "additionalProperties": false
  11022. }
  11023. },
  11024. "required": ["name", "data"],
  11025. "additionalProperties": false
  11026. },
  11027. "APIError": {
  11028. "type": "object",
  11029. "properties": {
  11030. "name": {
  11031. "type": "string",
  11032. "enum": ["APIError"]
  11033. },
  11034. "data": {
  11035. "type": "object",
  11036. "properties": {
  11037. "message": {
  11038. "type": "string"
  11039. },
  11040. "statusCode": {
  11041. "type": "integer",
  11042. "minimum": 0
  11043. },
  11044. "isRetryable": {
  11045. "type": "boolean"
  11046. },
  11047. "responseHeaders": {
  11048. "type": "object",
  11049. "additionalProperties": {
  11050. "type": "string"
  11051. }
  11052. },
  11053. "responseBody": {
  11054. "type": "string"
  11055. },
  11056. "metadata": {
  11057. "type": "object",
  11058. "additionalProperties": {
  11059. "type": "string"
  11060. }
  11061. }
  11062. },
  11063. "required": ["message", "isRetryable"],
  11064. "additionalProperties": false
  11065. }
  11066. },
  11067. "required": ["name", "data"],
  11068. "additionalProperties": false
  11069. },
  11070. "QuestionOption": {
  11071. "type": "object",
  11072. "properties": {
  11073. "label": {
  11074. "type": "string",
  11075. "description": "Display text (1-5 words, concise)"
  11076. },
  11077. "description": {
  11078. "type": "string",
  11079. "description": "Explanation of choice"
  11080. }
  11081. },
  11082. "required": ["label", "description"],
  11083. "additionalProperties": false
  11084. },
  11085. "QuestionInfo": {
  11086. "type": "object",
  11087. "properties": {
  11088. "question": {
  11089. "type": "string",
  11090. "description": "Complete question"
  11091. },
  11092. "header": {
  11093. "type": "string",
  11094. "description": "Very short label (max 30 chars)"
  11095. },
  11096. "options": {
  11097. "type": "array",
  11098. "items": {
  11099. "$ref": "#/components/schemas/QuestionOption"
  11100. },
  11101. "description": "Available choices"
  11102. },
  11103. "multiple": {
  11104. "type": "boolean"
  11105. },
  11106. "custom": {
  11107. "type": "boolean"
  11108. }
  11109. },
  11110. "required": ["question", "header", "options"],
  11111. "additionalProperties": false
  11112. },
  11113. "QuestionTool": {
  11114. "type": "object",
  11115. "properties": {
  11116. "messageID": {
  11117. "type": "string",
  11118. "pattern": "^msg"
  11119. },
  11120. "callID": {
  11121. "type": "string"
  11122. }
  11123. },
  11124. "required": ["messageID", "callID"],
  11125. "additionalProperties": false
  11126. },
  11127. "QuestionRequest": {
  11128. "type": "object",
  11129. "properties": {
  11130. "id": {
  11131. "type": "string",
  11132. "pattern": "^que"
  11133. },
  11134. "sessionID": {
  11135. "type": "string",
  11136. "pattern": "^ses"
  11137. },
  11138. "questions": {
  11139. "type": "array",
  11140. "items": {
  11141. "$ref": "#/components/schemas/QuestionInfo"
  11142. },
  11143. "description": "Questions to ask"
  11144. },
  11145. "tool": {
  11146. "$ref": "#/components/schemas/QuestionTool"
  11147. }
  11148. },
  11149. "required": ["id", "sessionID", "questions"],
  11150. "additionalProperties": false
  11151. },
  11152. "QuestionAnswer": {
  11153. "type": "array",
  11154. "items": {
  11155. "type": "string"
  11156. }
  11157. },
  11158. "QuestionReplied": {
  11159. "type": "object",
  11160. "properties": {
  11161. "sessionID": {
  11162. "type": "string",
  11163. "pattern": "^ses"
  11164. },
  11165. "requestID": {
  11166. "type": "string",
  11167. "pattern": "^que"
  11168. },
  11169. "answers": {
  11170. "type": "array",
  11171. "items": {
  11172. "$ref": "#/components/schemas/QuestionAnswer"
  11173. }
  11174. }
  11175. },
  11176. "required": ["sessionID", "requestID", "answers"],
  11177. "additionalProperties": false
  11178. },
  11179. "QuestionRejected": {
  11180. "type": "object",
  11181. "properties": {
  11182. "sessionID": {
  11183. "type": "string",
  11184. "pattern": "^ses"
  11185. },
  11186. "requestID": {
  11187. "type": "string",
  11188. "pattern": "^que"
  11189. }
  11190. },
  11191. "required": ["sessionID", "requestID"],
  11192. "additionalProperties": false
  11193. },
  11194. "Todo": {
  11195. "type": "object",
  11196. "properties": {
  11197. "content": {
  11198. "type": "string",
  11199. "description": "Brief description of the task"
  11200. },
  11201. "status": {
  11202. "type": "string",
  11203. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11204. },
  11205. "priority": {
  11206. "type": "string",
  11207. "description": "Priority level of the task: high, medium, low"
  11208. }
  11209. },
  11210. "required": ["content", "status", "priority"],
  11211. "additionalProperties": false
  11212. },
  11213. "SessionStatus": {
  11214. "anyOf": [
  11215. {
  11216. "type": "object",
  11217. "properties": {
  11218. "type": {
  11219. "type": "string",
  11220. "enum": ["idle"]
  11221. }
  11222. },
  11223. "required": ["type"],
  11224. "additionalProperties": false
  11225. },
  11226. {
  11227. "type": "object",
  11228. "properties": {
  11229. "type": {
  11230. "type": "string",
  11231. "enum": ["retry"]
  11232. },
  11233. "attempt": {
  11234. "type": "integer",
  11235. "minimum": 0
  11236. },
  11237. "message": {
  11238. "type": "string"
  11239. },
  11240. "action": {
  11241. "type": "object",
  11242. "properties": {
  11243. "reason": {
  11244. "type": "string"
  11245. },
  11246. "provider": {
  11247. "type": "string"
  11248. },
  11249. "title": {
  11250. "type": "string"
  11251. },
  11252. "message": {
  11253. "type": "string"
  11254. },
  11255. "label": {
  11256. "type": "string"
  11257. },
  11258. "link": {
  11259. "type": "string"
  11260. }
  11261. },
  11262. "required": ["reason", "provider", "title", "message", "label"],
  11263. "additionalProperties": false
  11264. },
  11265. "next": {
  11266. "type": "integer",
  11267. "minimum": 0
  11268. }
  11269. },
  11270. "required": ["type", "attempt", "message", "next"],
  11271. "additionalProperties": false
  11272. },
  11273. {
  11274. "type": "object",
  11275. "properties": {
  11276. "type": {
  11277. "type": "string",
  11278. "enum": ["busy"]
  11279. }
  11280. },
  11281. "required": ["type"],
  11282. "additionalProperties": false
  11283. }
  11284. ]
  11285. },
  11286. "Project": {
  11287. "type": "object",
  11288. "properties": {
  11289. "id": {
  11290. "type": "string"
  11291. },
  11292. "worktree": {
  11293. "type": "string"
  11294. },
  11295. "vcs": {
  11296. "type": "string",
  11297. "enum": ["git"]
  11298. },
  11299. "name": {
  11300. "type": "string"
  11301. },
  11302. "icon": {
  11303. "type": "object",
  11304. "properties": {
  11305. "url": {
  11306. "type": "string"
  11307. },
  11308. "override": {
  11309. "type": "string"
  11310. },
  11311. "color": {
  11312. "type": "string"
  11313. }
  11314. },
  11315. "additionalProperties": false
  11316. },
  11317. "commands": {
  11318. "type": "object",
  11319. "properties": {
  11320. "start": {
  11321. "type": "string",
  11322. "description": "Startup script to run when creating a new workspace (worktree)"
  11323. }
  11324. },
  11325. "additionalProperties": false
  11326. },
  11327. "time": {
  11328. "type": "object",
  11329. "properties": {
  11330. "created": {
  11331. "type": "integer",
  11332. "minimum": 0
  11333. },
  11334. "updated": {
  11335. "type": "integer",
  11336. "minimum": 0
  11337. },
  11338. "initialized": {
  11339. "type": "integer",
  11340. "minimum": 0
  11341. }
  11342. },
  11343. "required": ["created", "updated"],
  11344. "additionalProperties": false
  11345. },
  11346. "sandboxes": {
  11347. "type": "array",
  11348. "items": {
  11349. "type": "string"
  11350. }
  11351. }
  11352. },
  11353. "required": ["id", "worktree", "time", "sandboxes"],
  11354. "additionalProperties": false
  11355. },
  11356. "Pty": {
  11357. "type": "object",
  11358. "properties": {
  11359. "id": {
  11360. "type": "string",
  11361. "pattern": "^pty"
  11362. },
  11363. "title": {
  11364. "type": "string"
  11365. },
  11366. "command": {
  11367. "type": "string"
  11368. },
  11369. "args": {
  11370. "type": "array",
  11371. "items": {
  11372. "type": "string"
  11373. }
  11374. },
  11375. "cwd": {
  11376. "type": "string"
  11377. },
  11378. "status": {
  11379. "type": "string",
  11380. "enum": ["running", "exited"]
  11381. },
  11382. "pid": {
  11383. "type": "integer",
  11384. "exclusiveMinimum": 0
  11385. }
  11386. },
  11387. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11388. "additionalProperties": false
  11389. },
  11390. "OutputFormatText": {
  11391. "type": "object",
  11392. "properties": {
  11393. "type": {
  11394. "type": "string",
  11395. "enum": ["text"]
  11396. }
  11397. },
  11398. "required": ["type"],
  11399. "additionalProperties": false
  11400. },
  11401. "JSONSchema": {
  11402. "type": "object"
  11403. },
  11404. "OutputFormatJsonSchema": {
  11405. "type": "object",
  11406. "properties": {
  11407. "type": {
  11408. "type": "string",
  11409. "enum": ["json_schema"]
  11410. },
  11411. "schema": {
  11412. "$ref": "#/components/schemas/JSONSchema"
  11413. },
  11414. "retryCount": {
  11415. "type": "integer",
  11416. "minimum": 0
  11417. }
  11418. },
  11419. "required": ["type", "schema"],
  11420. "additionalProperties": false
  11421. },
  11422. "OutputFormat": {
  11423. "anyOf": [
  11424. {
  11425. "$ref": "#/components/schemas/OutputFormatText"
  11426. },
  11427. {
  11428. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11429. }
  11430. ]
  11431. },
  11432. "UserMessage": {
  11433. "type": "object",
  11434. "properties": {
  11435. "id": {
  11436. "type": "string",
  11437. "pattern": "^msg"
  11438. },
  11439. "sessionID": {
  11440. "type": "string",
  11441. "pattern": "^ses"
  11442. },
  11443. "role": {
  11444. "type": "string",
  11445. "enum": ["user"]
  11446. },
  11447. "time": {
  11448. "type": "object",
  11449. "properties": {
  11450. "created": {
  11451. "type": "integer",
  11452. "minimum": 0
  11453. }
  11454. },
  11455. "required": ["created"],
  11456. "additionalProperties": false
  11457. },
  11458. "format": {
  11459. "$ref": "#/components/schemas/OutputFormat"
  11460. },
  11461. "summary": {
  11462. "type": "object",
  11463. "properties": {
  11464. "title": {
  11465. "type": "string"
  11466. },
  11467. "body": {
  11468. "type": "string"
  11469. },
  11470. "diffs": {
  11471. "type": "array",
  11472. "items": {
  11473. "$ref": "#/components/schemas/SnapshotFileDiff"
  11474. }
  11475. }
  11476. },
  11477. "required": ["diffs"],
  11478. "additionalProperties": false
  11479. },
  11480. "agent": {
  11481. "type": "string"
  11482. },
  11483. "model": {
  11484. "type": "object",
  11485. "properties": {
  11486. "providerID": {
  11487. "type": "string"
  11488. },
  11489. "modelID": {
  11490. "type": "string"
  11491. },
  11492. "variant": {
  11493. "type": "string"
  11494. }
  11495. },
  11496. "required": ["providerID", "modelID"],
  11497. "additionalProperties": false
  11498. },
  11499. "system": {
  11500. "type": "string"
  11501. },
  11502. "tools": {
  11503. "type": "object",
  11504. "additionalProperties": {
  11505. "type": "boolean"
  11506. }
  11507. }
  11508. },
  11509. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11510. "additionalProperties": false
  11511. },
  11512. "AssistantMessage": {
  11513. "type": "object",
  11514. "properties": {
  11515. "id": {
  11516. "type": "string",
  11517. "pattern": "^msg"
  11518. },
  11519. "sessionID": {
  11520. "type": "string",
  11521. "pattern": "^ses"
  11522. },
  11523. "role": {
  11524. "type": "string",
  11525. "enum": ["assistant"]
  11526. },
  11527. "time": {
  11528. "type": "object",
  11529. "properties": {
  11530. "created": {
  11531. "type": "integer",
  11532. "minimum": 0
  11533. },
  11534. "completed": {
  11535. "type": "integer",
  11536. "minimum": 0
  11537. }
  11538. },
  11539. "required": ["created"],
  11540. "additionalProperties": false
  11541. },
  11542. "error": {
  11543. "anyOf": [
  11544. {
  11545. "$ref": "#/components/schemas/ProviderAuthError"
  11546. },
  11547. {
  11548. "$ref": "#/components/schemas/UnknownError"
  11549. },
  11550. {
  11551. "$ref": "#/components/schemas/MessageOutputLengthError"
  11552. },
  11553. {
  11554. "$ref": "#/components/schemas/MessageAbortedError"
  11555. },
  11556. {
  11557. "$ref": "#/components/schemas/StructuredOutputError"
  11558. },
  11559. {
  11560. "$ref": "#/components/schemas/ContextOverflowError"
  11561. },
  11562. {
  11563. "$ref": "#/components/schemas/APIError"
  11564. }
  11565. ]
  11566. },
  11567. "parentID": {
  11568. "type": "string",
  11569. "pattern": "^msg"
  11570. },
  11571. "modelID": {
  11572. "type": "string"
  11573. },
  11574. "providerID": {
  11575. "type": "string"
  11576. },
  11577. "mode": {
  11578. "type": "string"
  11579. },
  11580. "agent": {
  11581. "type": "string"
  11582. },
  11583. "path": {
  11584. "type": "object",
  11585. "properties": {
  11586. "cwd": {
  11587. "type": "string"
  11588. },
  11589. "root": {
  11590. "type": "string"
  11591. }
  11592. },
  11593. "required": ["cwd", "root"],
  11594. "additionalProperties": false
  11595. },
  11596. "summary": {
  11597. "type": "boolean"
  11598. },
  11599. "cost": {
  11600. "type": "number"
  11601. },
  11602. "tokens": {
  11603. "type": "object",
  11604. "properties": {
  11605. "total": {
  11606. "type": "number"
  11607. },
  11608. "input": {
  11609. "type": "number"
  11610. },
  11611. "output": {
  11612. "type": "number"
  11613. },
  11614. "reasoning": {
  11615. "type": "number"
  11616. },
  11617. "cache": {
  11618. "type": "object",
  11619. "properties": {
  11620. "read": {
  11621. "type": "number"
  11622. },
  11623. "write": {
  11624. "type": "number"
  11625. }
  11626. },
  11627. "required": ["read", "write"],
  11628. "additionalProperties": false
  11629. }
  11630. },
  11631. "required": ["input", "output", "reasoning", "cache"],
  11632. "additionalProperties": false
  11633. },
  11634. "structured": {},
  11635. "variant": {
  11636. "type": "string"
  11637. },
  11638. "finish": {
  11639. "type": "string"
  11640. }
  11641. },
  11642. "required": [
  11643. "id",
  11644. "sessionID",
  11645. "role",
  11646. "time",
  11647. "parentID",
  11648. "modelID",
  11649. "providerID",
  11650. "mode",
  11651. "agent",
  11652. "path",
  11653. "cost",
  11654. "tokens"
  11655. ],
  11656. "additionalProperties": false
  11657. },
  11658. "Message": {
  11659. "anyOf": [
  11660. {
  11661. "$ref": "#/components/schemas/UserMessage"
  11662. },
  11663. {
  11664. "$ref": "#/components/schemas/AssistantMessage"
  11665. }
  11666. ]
  11667. },
  11668. "TextPart": {
  11669. "type": "object",
  11670. "properties": {
  11671. "id": {
  11672. "type": "string",
  11673. "pattern": "^prt"
  11674. },
  11675. "sessionID": {
  11676. "type": "string",
  11677. "pattern": "^ses"
  11678. },
  11679. "messageID": {
  11680. "type": "string",
  11681. "pattern": "^msg"
  11682. },
  11683. "type": {
  11684. "type": "string",
  11685. "enum": ["text"]
  11686. },
  11687. "text": {
  11688. "type": "string"
  11689. },
  11690. "synthetic": {
  11691. "type": "boolean"
  11692. },
  11693. "ignored": {
  11694. "type": "boolean"
  11695. },
  11696. "time": {
  11697. "type": "object",
  11698. "properties": {
  11699. "start": {
  11700. "type": "integer",
  11701. "minimum": 0
  11702. },
  11703. "end": {
  11704. "type": "integer",
  11705. "minimum": 0
  11706. }
  11707. },
  11708. "required": ["start"],
  11709. "additionalProperties": false
  11710. },
  11711. "metadata": {
  11712. "type": "object"
  11713. }
  11714. },
  11715. "required": ["id", "sessionID", "messageID", "type", "text"],
  11716. "additionalProperties": false
  11717. },
  11718. "SubtaskPart": {
  11719. "type": "object",
  11720. "properties": {
  11721. "id": {
  11722. "type": "string",
  11723. "pattern": "^prt"
  11724. },
  11725. "sessionID": {
  11726. "type": "string",
  11727. "pattern": "^ses"
  11728. },
  11729. "messageID": {
  11730. "type": "string",
  11731. "pattern": "^msg"
  11732. },
  11733. "type": {
  11734. "type": "string",
  11735. "enum": ["subtask"]
  11736. },
  11737. "prompt": {
  11738. "type": "string"
  11739. },
  11740. "description": {
  11741. "type": "string"
  11742. },
  11743. "agent": {
  11744. "type": "string"
  11745. },
  11746. "model": {
  11747. "type": "object",
  11748. "properties": {
  11749. "providerID": {
  11750. "type": "string"
  11751. },
  11752. "modelID": {
  11753. "type": "string"
  11754. }
  11755. },
  11756. "required": ["providerID", "modelID"],
  11757. "additionalProperties": false
  11758. },
  11759. "command": {
  11760. "type": "string"
  11761. }
  11762. },
  11763. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11764. "additionalProperties": false
  11765. },
  11766. "ReasoningPart": {
  11767. "type": "object",
  11768. "properties": {
  11769. "id": {
  11770. "type": "string",
  11771. "pattern": "^prt"
  11772. },
  11773. "sessionID": {
  11774. "type": "string",
  11775. "pattern": "^ses"
  11776. },
  11777. "messageID": {
  11778. "type": "string",
  11779. "pattern": "^msg"
  11780. },
  11781. "type": {
  11782. "type": "string",
  11783. "enum": ["reasoning"]
  11784. },
  11785. "text": {
  11786. "type": "string"
  11787. },
  11788. "metadata": {
  11789. "type": "object"
  11790. },
  11791. "time": {
  11792. "type": "object",
  11793. "properties": {
  11794. "start": {
  11795. "type": "integer",
  11796. "minimum": 0
  11797. },
  11798. "end": {
  11799. "type": "integer",
  11800. "minimum": 0
  11801. }
  11802. },
  11803. "required": ["start"],
  11804. "additionalProperties": false
  11805. }
  11806. },
  11807. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11808. "additionalProperties": false
  11809. },
  11810. "FilePartSourceText": {
  11811. "type": "object",
  11812. "properties": {
  11813. "value": {
  11814. "type": "string"
  11815. },
  11816. "start": {
  11817. "type": "number"
  11818. },
  11819. "end": {
  11820. "type": "number"
  11821. }
  11822. },
  11823. "required": ["value", "start", "end"],
  11824. "additionalProperties": false
  11825. },
  11826. "FileSource": {
  11827. "type": "object",
  11828. "properties": {
  11829. "text": {
  11830. "$ref": "#/components/schemas/FilePartSourceText"
  11831. },
  11832. "type": {
  11833. "type": "string",
  11834. "enum": ["file"]
  11835. },
  11836. "path": {
  11837. "type": "string"
  11838. }
  11839. },
  11840. "required": ["text", "type", "path"],
  11841. "additionalProperties": false
  11842. },
  11843. "Range": {
  11844. "type": "object",
  11845. "properties": {
  11846. "start": {
  11847. "type": "object",
  11848. "properties": {
  11849. "line": {
  11850. "type": "integer",
  11851. "minimum": 0
  11852. },
  11853. "character": {
  11854. "type": "integer",
  11855. "minimum": 0
  11856. }
  11857. },
  11858. "required": ["line", "character"],
  11859. "additionalProperties": false
  11860. },
  11861. "end": {
  11862. "type": "object",
  11863. "properties": {
  11864. "line": {
  11865. "type": "integer",
  11866. "minimum": 0
  11867. },
  11868. "character": {
  11869. "type": "integer",
  11870. "minimum": 0
  11871. }
  11872. },
  11873. "required": ["line", "character"],
  11874. "additionalProperties": false
  11875. }
  11876. },
  11877. "required": ["start", "end"],
  11878. "additionalProperties": false
  11879. },
  11880. "SymbolSource": {
  11881. "type": "object",
  11882. "properties": {
  11883. "text": {
  11884. "$ref": "#/components/schemas/FilePartSourceText"
  11885. },
  11886. "type": {
  11887. "type": "string",
  11888. "enum": ["symbol"]
  11889. },
  11890. "path": {
  11891. "type": "string"
  11892. },
  11893. "range": {
  11894. "$ref": "#/components/schemas/Range"
  11895. },
  11896. "name": {
  11897. "type": "string"
  11898. },
  11899. "kind": {
  11900. "type": "integer",
  11901. "minimum": 0
  11902. }
  11903. },
  11904. "required": ["text", "type", "path", "range", "name", "kind"],
  11905. "additionalProperties": false
  11906. },
  11907. "ResourceSource": {
  11908. "type": "object",
  11909. "properties": {
  11910. "text": {
  11911. "$ref": "#/components/schemas/FilePartSourceText"
  11912. },
  11913. "type": {
  11914. "type": "string",
  11915. "enum": ["resource"]
  11916. },
  11917. "clientName": {
  11918. "type": "string"
  11919. },
  11920. "uri": {
  11921. "type": "string"
  11922. }
  11923. },
  11924. "required": ["text", "type", "clientName", "uri"],
  11925. "additionalProperties": false
  11926. },
  11927. "FilePartSource": {
  11928. "anyOf": [
  11929. {
  11930. "$ref": "#/components/schemas/FileSource"
  11931. },
  11932. {
  11933. "$ref": "#/components/schemas/SymbolSource"
  11934. },
  11935. {
  11936. "$ref": "#/components/schemas/ResourceSource"
  11937. }
  11938. ]
  11939. },
  11940. "FilePart": {
  11941. "type": "object",
  11942. "properties": {
  11943. "id": {
  11944. "type": "string",
  11945. "pattern": "^prt"
  11946. },
  11947. "sessionID": {
  11948. "type": "string",
  11949. "pattern": "^ses"
  11950. },
  11951. "messageID": {
  11952. "type": "string",
  11953. "pattern": "^msg"
  11954. },
  11955. "type": {
  11956. "type": "string",
  11957. "enum": ["file"]
  11958. },
  11959. "mime": {
  11960. "type": "string"
  11961. },
  11962. "filename": {
  11963. "type": "string"
  11964. },
  11965. "url": {
  11966. "type": "string"
  11967. },
  11968. "source": {
  11969. "$ref": "#/components/schemas/FilePartSource"
  11970. }
  11971. },
  11972. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  11973. "additionalProperties": false
  11974. },
  11975. "ToolStatePending": {
  11976. "type": "object",
  11977. "properties": {
  11978. "status": {
  11979. "type": "string",
  11980. "enum": ["pending"]
  11981. },
  11982. "input": {
  11983. "type": "object"
  11984. },
  11985. "raw": {
  11986. "type": "string"
  11987. }
  11988. },
  11989. "required": ["status", "input", "raw"],
  11990. "additionalProperties": false
  11991. },
  11992. "ToolStateRunning": {
  11993. "type": "object",
  11994. "properties": {
  11995. "status": {
  11996. "type": "string",
  11997. "enum": ["running"]
  11998. },
  11999. "input": {
  12000. "type": "object"
  12001. },
  12002. "title": {
  12003. "type": "string"
  12004. },
  12005. "metadata": {
  12006. "type": "object"
  12007. },
  12008. "time": {
  12009. "type": "object",
  12010. "properties": {
  12011. "start": {
  12012. "type": "integer",
  12013. "minimum": 0
  12014. }
  12015. },
  12016. "required": ["start"],
  12017. "additionalProperties": false
  12018. }
  12019. },
  12020. "required": ["status", "input", "time"],
  12021. "additionalProperties": false
  12022. },
  12023. "ToolStateCompleted": {
  12024. "type": "object",
  12025. "properties": {
  12026. "status": {
  12027. "type": "string",
  12028. "enum": ["completed"]
  12029. },
  12030. "input": {
  12031. "type": "object"
  12032. },
  12033. "output": {
  12034. "type": "string"
  12035. },
  12036. "title": {
  12037. "type": "string"
  12038. },
  12039. "metadata": {
  12040. "type": "object"
  12041. },
  12042. "time": {
  12043. "type": "object",
  12044. "properties": {
  12045. "start": {
  12046. "type": "integer",
  12047. "minimum": 0
  12048. },
  12049. "end": {
  12050. "type": "integer",
  12051. "minimum": 0
  12052. },
  12053. "compacted": {
  12054. "type": "integer",
  12055. "minimum": 0
  12056. }
  12057. },
  12058. "required": ["start", "end"],
  12059. "additionalProperties": false
  12060. },
  12061. "attachments": {
  12062. "type": "array",
  12063. "items": {
  12064. "$ref": "#/components/schemas/FilePart"
  12065. }
  12066. }
  12067. },
  12068. "required": ["status", "input", "output", "title", "metadata", "time"],
  12069. "additionalProperties": false
  12070. },
  12071. "ToolStateError": {
  12072. "type": "object",
  12073. "properties": {
  12074. "status": {
  12075. "type": "string",
  12076. "enum": ["error"]
  12077. },
  12078. "input": {
  12079. "type": "object"
  12080. },
  12081. "error": {
  12082. "type": "string"
  12083. },
  12084. "metadata": {
  12085. "type": "object"
  12086. },
  12087. "time": {
  12088. "type": "object",
  12089. "properties": {
  12090. "start": {
  12091. "type": "integer",
  12092. "minimum": 0
  12093. },
  12094. "end": {
  12095. "type": "integer",
  12096. "minimum": 0
  12097. }
  12098. },
  12099. "required": ["start", "end"],
  12100. "additionalProperties": false
  12101. }
  12102. },
  12103. "required": ["status", "input", "error", "time"],
  12104. "additionalProperties": false
  12105. },
  12106. "ToolState": {
  12107. "anyOf": [
  12108. {
  12109. "$ref": "#/components/schemas/ToolStatePending"
  12110. },
  12111. {
  12112. "$ref": "#/components/schemas/ToolStateRunning"
  12113. },
  12114. {
  12115. "$ref": "#/components/schemas/ToolStateCompleted"
  12116. },
  12117. {
  12118. "$ref": "#/components/schemas/ToolStateError"
  12119. }
  12120. ]
  12121. },
  12122. "ToolPart": {
  12123. "type": "object",
  12124. "properties": {
  12125. "id": {
  12126. "type": "string",
  12127. "pattern": "^prt"
  12128. },
  12129. "sessionID": {
  12130. "type": "string",
  12131. "pattern": "^ses"
  12132. },
  12133. "messageID": {
  12134. "type": "string",
  12135. "pattern": "^msg"
  12136. },
  12137. "type": {
  12138. "type": "string",
  12139. "enum": ["tool"]
  12140. },
  12141. "callID": {
  12142. "type": "string"
  12143. },
  12144. "tool": {
  12145. "type": "string"
  12146. },
  12147. "state": {
  12148. "$ref": "#/components/schemas/ToolState"
  12149. },
  12150. "metadata": {
  12151. "type": "object"
  12152. }
  12153. },
  12154. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12155. "additionalProperties": false
  12156. },
  12157. "StepStartPart": {
  12158. "type": "object",
  12159. "properties": {
  12160. "id": {
  12161. "type": "string",
  12162. "pattern": "^prt"
  12163. },
  12164. "sessionID": {
  12165. "type": "string",
  12166. "pattern": "^ses"
  12167. },
  12168. "messageID": {
  12169. "type": "string",
  12170. "pattern": "^msg"
  12171. },
  12172. "type": {
  12173. "type": "string",
  12174. "enum": ["step-start"]
  12175. },
  12176. "snapshot": {
  12177. "type": "string"
  12178. }
  12179. },
  12180. "required": ["id", "sessionID", "messageID", "type"],
  12181. "additionalProperties": false
  12182. },
  12183. "StepFinishPart": {
  12184. "type": "object",
  12185. "properties": {
  12186. "id": {
  12187. "type": "string",
  12188. "pattern": "^prt"
  12189. },
  12190. "sessionID": {
  12191. "type": "string",
  12192. "pattern": "^ses"
  12193. },
  12194. "messageID": {
  12195. "type": "string",
  12196. "pattern": "^msg"
  12197. },
  12198. "type": {
  12199. "type": "string",
  12200. "enum": ["step-finish"]
  12201. },
  12202. "reason": {
  12203. "type": "string"
  12204. },
  12205. "snapshot": {
  12206. "type": "string"
  12207. },
  12208. "cost": {
  12209. "type": "number"
  12210. },
  12211. "tokens": {
  12212. "type": "object",
  12213. "properties": {
  12214. "total": {
  12215. "type": "number"
  12216. },
  12217. "input": {
  12218. "type": "number"
  12219. },
  12220. "output": {
  12221. "type": "number"
  12222. },
  12223. "reasoning": {
  12224. "type": "number"
  12225. },
  12226. "cache": {
  12227. "type": "object",
  12228. "properties": {
  12229. "read": {
  12230. "type": "number"
  12231. },
  12232. "write": {
  12233. "type": "number"
  12234. }
  12235. },
  12236. "required": ["read", "write"],
  12237. "additionalProperties": false
  12238. }
  12239. },
  12240. "required": ["input", "output", "reasoning", "cache"],
  12241. "additionalProperties": false
  12242. }
  12243. },
  12244. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12245. "additionalProperties": false
  12246. },
  12247. "SnapshotPart": {
  12248. "type": "object",
  12249. "properties": {
  12250. "id": {
  12251. "type": "string",
  12252. "pattern": "^prt"
  12253. },
  12254. "sessionID": {
  12255. "type": "string",
  12256. "pattern": "^ses"
  12257. },
  12258. "messageID": {
  12259. "type": "string",
  12260. "pattern": "^msg"
  12261. },
  12262. "type": {
  12263. "type": "string",
  12264. "enum": ["snapshot"]
  12265. },
  12266. "snapshot": {
  12267. "type": "string"
  12268. }
  12269. },
  12270. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12271. "additionalProperties": false
  12272. },
  12273. "PatchPart": {
  12274. "type": "object",
  12275. "properties": {
  12276. "id": {
  12277. "type": "string",
  12278. "pattern": "^prt"
  12279. },
  12280. "sessionID": {
  12281. "type": "string",
  12282. "pattern": "^ses"
  12283. },
  12284. "messageID": {
  12285. "type": "string",
  12286. "pattern": "^msg"
  12287. },
  12288. "type": {
  12289. "type": "string",
  12290. "enum": ["patch"]
  12291. },
  12292. "hash": {
  12293. "type": "string"
  12294. },
  12295. "files": {
  12296. "type": "array",
  12297. "items": {
  12298. "type": "string"
  12299. }
  12300. }
  12301. },
  12302. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12303. "additionalProperties": false
  12304. },
  12305. "AgentPart": {
  12306. "type": "object",
  12307. "properties": {
  12308. "id": {
  12309. "type": "string",
  12310. "pattern": "^prt"
  12311. },
  12312. "sessionID": {
  12313. "type": "string",
  12314. "pattern": "^ses"
  12315. },
  12316. "messageID": {
  12317. "type": "string",
  12318. "pattern": "^msg"
  12319. },
  12320. "type": {
  12321. "type": "string",
  12322. "enum": ["agent"]
  12323. },
  12324. "name": {
  12325. "type": "string"
  12326. },
  12327. "source": {
  12328. "type": "object",
  12329. "properties": {
  12330. "value": {
  12331. "type": "string"
  12332. },
  12333. "start": {
  12334. "type": "integer",
  12335. "minimum": 0
  12336. },
  12337. "end": {
  12338. "type": "integer",
  12339. "minimum": 0
  12340. }
  12341. },
  12342. "required": ["value", "start", "end"],
  12343. "additionalProperties": false
  12344. }
  12345. },
  12346. "required": ["id", "sessionID", "messageID", "type", "name"],
  12347. "additionalProperties": false
  12348. },
  12349. "RetryPart": {
  12350. "type": "object",
  12351. "properties": {
  12352. "id": {
  12353. "type": "string",
  12354. "pattern": "^prt"
  12355. },
  12356. "sessionID": {
  12357. "type": "string",
  12358. "pattern": "^ses"
  12359. },
  12360. "messageID": {
  12361. "type": "string",
  12362. "pattern": "^msg"
  12363. },
  12364. "type": {
  12365. "type": "string",
  12366. "enum": ["retry"]
  12367. },
  12368. "attempt": {
  12369. "type": "integer",
  12370. "minimum": 0
  12371. },
  12372. "error": {
  12373. "$ref": "#/components/schemas/APIError"
  12374. },
  12375. "time": {
  12376. "type": "object",
  12377. "properties": {
  12378. "created": {
  12379. "type": "integer",
  12380. "minimum": 0
  12381. }
  12382. },
  12383. "required": ["created"],
  12384. "additionalProperties": false
  12385. }
  12386. },
  12387. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12388. "additionalProperties": false
  12389. },
  12390. "CompactionPart": {
  12391. "type": "object",
  12392. "properties": {
  12393. "id": {
  12394. "type": "string",
  12395. "pattern": "^prt"
  12396. },
  12397. "sessionID": {
  12398. "type": "string",
  12399. "pattern": "^ses"
  12400. },
  12401. "messageID": {
  12402. "type": "string",
  12403. "pattern": "^msg"
  12404. },
  12405. "type": {
  12406. "type": "string",
  12407. "enum": ["compaction"]
  12408. },
  12409. "auto": {
  12410. "type": "boolean"
  12411. },
  12412. "overflow": {
  12413. "type": "boolean"
  12414. },
  12415. "tail_start_id": {
  12416. "type": "string",
  12417. "pattern": "^msg"
  12418. }
  12419. },
  12420. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12421. "additionalProperties": false
  12422. },
  12423. "Part": {
  12424. "anyOf": [
  12425. {
  12426. "$ref": "#/components/schemas/TextPart"
  12427. },
  12428. {
  12429. "$ref": "#/components/schemas/SubtaskPart"
  12430. },
  12431. {
  12432. "$ref": "#/components/schemas/ReasoningPart"
  12433. },
  12434. {
  12435. "$ref": "#/components/schemas/FilePart"
  12436. },
  12437. {
  12438. "$ref": "#/components/schemas/ToolPart"
  12439. },
  12440. {
  12441. "$ref": "#/components/schemas/StepStartPart"
  12442. },
  12443. {
  12444. "$ref": "#/components/schemas/StepFinishPart"
  12445. },
  12446. {
  12447. "$ref": "#/components/schemas/SnapshotPart"
  12448. },
  12449. {
  12450. "$ref": "#/components/schemas/PatchPart"
  12451. },
  12452. {
  12453. "$ref": "#/components/schemas/AgentPart"
  12454. },
  12455. {
  12456. "$ref": "#/components/schemas/RetryPart"
  12457. },
  12458. {
  12459. "$ref": "#/components/schemas/CompactionPart"
  12460. }
  12461. ]
  12462. },
  12463. "PermissionAction": {
  12464. "type": "string",
  12465. "enum": ["allow", "deny", "ask"]
  12466. },
  12467. "PermissionRule": {
  12468. "type": "object",
  12469. "properties": {
  12470. "permission": {
  12471. "type": "string"
  12472. },
  12473. "pattern": {
  12474. "type": "string"
  12475. },
  12476. "action": {
  12477. "$ref": "#/components/schemas/PermissionAction"
  12478. }
  12479. },
  12480. "required": ["permission", "pattern", "action"],
  12481. "additionalProperties": false
  12482. },
  12483. "PermissionRuleset": {
  12484. "type": "array",
  12485. "items": {
  12486. "$ref": "#/components/schemas/PermissionRule"
  12487. }
  12488. },
  12489. "Session": {
  12490. "type": "object",
  12491. "properties": {
  12492. "id": {
  12493. "type": "string",
  12494. "pattern": "^ses"
  12495. },
  12496. "slug": {
  12497. "type": "string"
  12498. },
  12499. "projectID": {
  12500. "type": "string"
  12501. },
  12502. "workspaceID": {
  12503. "type": "string",
  12504. "pattern": "^wrk"
  12505. },
  12506. "directory": {
  12507. "type": "string"
  12508. },
  12509. "path": {
  12510. "type": "string"
  12511. },
  12512. "parentID": {
  12513. "type": "string",
  12514. "pattern": "^ses"
  12515. },
  12516. "summary": {
  12517. "type": "object",
  12518. "properties": {
  12519. "additions": {
  12520. "type": "number"
  12521. },
  12522. "deletions": {
  12523. "type": "number"
  12524. },
  12525. "files": {
  12526. "type": "number"
  12527. },
  12528. "diffs": {
  12529. "type": "array",
  12530. "items": {
  12531. "$ref": "#/components/schemas/SnapshotFileDiff"
  12532. }
  12533. }
  12534. },
  12535. "required": ["additions", "deletions", "files"],
  12536. "additionalProperties": false
  12537. },
  12538. "cost": {
  12539. "type": "number"
  12540. },
  12541. "tokens": {
  12542. "type": "object",
  12543. "properties": {
  12544. "input": {
  12545. "type": "number"
  12546. },
  12547. "output": {
  12548. "type": "number"
  12549. },
  12550. "reasoning": {
  12551. "type": "number"
  12552. },
  12553. "cache": {
  12554. "type": "object",
  12555. "properties": {
  12556. "read": {
  12557. "type": "number"
  12558. },
  12559. "write": {
  12560. "type": "number"
  12561. }
  12562. },
  12563. "required": ["read", "write"],
  12564. "additionalProperties": false
  12565. }
  12566. },
  12567. "required": ["input", "output", "reasoning", "cache"],
  12568. "additionalProperties": false
  12569. },
  12570. "share": {
  12571. "type": "object",
  12572. "properties": {
  12573. "url": {
  12574. "type": "string"
  12575. }
  12576. },
  12577. "required": ["url"],
  12578. "additionalProperties": false
  12579. },
  12580. "title": {
  12581. "type": "string"
  12582. },
  12583. "agent": {
  12584. "type": "string"
  12585. },
  12586. "model": {
  12587. "type": "object",
  12588. "properties": {
  12589. "id": {
  12590. "type": "string"
  12591. },
  12592. "providerID": {
  12593. "type": "string"
  12594. },
  12595. "variant": {
  12596. "type": "string"
  12597. }
  12598. },
  12599. "required": ["id", "providerID"],
  12600. "additionalProperties": false
  12601. },
  12602. "version": {
  12603. "type": "string"
  12604. },
  12605. "time": {
  12606. "type": "object",
  12607. "properties": {
  12608. "created": {
  12609. "type": "integer",
  12610. "minimum": 0
  12611. },
  12612. "updated": {
  12613. "type": "integer",
  12614. "minimum": 0
  12615. },
  12616. "compacting": {
  12617. "type": "integer",
  12618. "minimum": 0
  12619. },
  12620. "archived": {
  12621. "type": "number"
  12622. }
  12623. },
  12624. "required": ["created", "updated"],
  12625. "additionalProperties": false
  12626. },
  12627. "permission": {
  12628. "$ref": "#/components/schemas/PermissionRuleset"
  12629. },
  12630. "revert": {
  12631. "type": "object",
  12632. "properties": {
  12633. "messageID": {
  12634. "type": "string",
  12635. "pattern": "^msg"
  12636. },
  12637. "partID": {
  12638. "type": "string",
  12639. "pattern": "^prt"
  12640. },
  12641. "snapshot": {
  12642. "type": "string"
  12643. },
  12644. "diff": {
  12645. "type": "string"
  12646. }
  12647. },
  12648. "required": ["messageID"],
  12649. "additionalProperties": false
  12650. }
  12651. },
  12652. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12653. "additionalProperties": false
  12654. },
  12655. "Prompt": {
  12656. "type": "object",
  12657. "properties": {
  12658. "text": {
  12659. "type": "string"
  12660. },
  12661. "files": {
  12662. "type": "array",
  12663. "items": {
  12664. "$ref": "#/components/schemas/PromptFileAttachment"
  12665. }
  12666. },
  12667. "agents": {
  12668. "type": "array",
  12669. "items": {
  12670. "$ref": "#/components/schemas/PromptAgentAttachment"
  12671. }
  12672. },
  12673. "references": {
  12674. "type": "array",
  12675. "items": {
  12676. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12677. }
  12678. }
  12679. },
  12680. "required": ["text"],
  12681. "additionalProperties": false
  12682. },
  12683. "GlobalEvent": {
  12684. "type": "object",
  12685. "properties": {
  12686. "directory": {
  12687. "type": "string"
  12688. },
  12689. "project": {
  12690. "type": "string"
  12691. },
  12692. "workspace": {
  12693. "type": "string"
  12694. },
  12695. "payload": {
  12696. "anyOf": [
  12697. {
  12698. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12699. },
  12700. {
  12701. "$ref": "#/components/schemas/Event.tui.command.execute"
  12702. },
  12703. {
  12704. "$ref": "#/components/schemas/Event.tui.toast.show"
  12705. },
  12706. {
  12707. "$ref": "#/components/schemas/Event.tui.session.select"
  12708. },
  12709. {
  12710. "$ref": "#/components/schemas/EventServerConnected"
  12711. },
  12712. {
  12713. "$ref": "#/components/schemas/EventGlobalDisposed"
  12714. },
  12715. {
  12716. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12717. },
  12718. {
  12719. "$ref": "#/components/schemas/EventFileEdited"
  12720. },
  12721. {
  12722. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12723. },
  12724. {
  12725. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12726. },
  12727. {
  12728. "$ref": "#/components/schemas/EventLspUpdated"
  12729. },
  12730. {
  12731. "$ref": "#/components/schemas/EventMessagePartDelta"
  12732. },
  12733. {
  12734. "$ref": "#/components/schemas/EventPermissionAsked"
  12735. },
  12736. {
  12737. "$ref": "#/components/schemas/EventPermissionReplied"
  12738. },
  12739. {
  12740. "$ref": "#/components/schemas/EventSessionDiff"
  12741. },
  12742. {
  12743. "$ref": "#/components/schemas/EventSessionError"
  12744. },
  12745. {
  12746. "$ref": "#/components/schemas/EventQuestionAsked"
  12747. },
  12748. {
  12749. "$ref": "#/components/schemas/EventQuestionReplied"
  12750. },
  12751. {
  12752. "$ref": "#/components/schemas/EventQuestionRejected"
  12753. },
  12754. {
  12755. "$ref": "#/components/schemas/EventTodoUpdated"
  12756. },
  12757. {
  12758. "$ref": "#/components/schemas/EventSessionStatus"
  12759. },
  12760. {
  12761. "$ref": "#/components/schemas/EventSessionIdle"
  12762. },
  12763. {
  12764. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12765. },
  12766. {
  12767. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12768. },
  12769. {
  12770. "$ref": "#/components/schemas/EventCommandExecuted"
  12771. },
  12772. {
  12773. "$ref": "#/components/schemas/EventProjectUpdated"
  12774. },
  12775. {
  12776. "$ref": "#/components/schemas/EventSessionCompacted"
  12777. },
  12778. {
  12779. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12780. },
  12781. {
  12782. "$ref": "#/components/schemas/EventWorkspaceReady"
  12783. },
  12784. {
  12785. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12786. },
  12787. {
  12788. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12789. },
  12790. {
  12791. "$ref": "#/components/schemas/EventWorktreeReady"
  12792. },
  12793. {
  12794. "$ref": "#/components/schemas/EventWorktreeFailed"
  12795. },
  12796. {
  12797. "$ref": "#/components/schemas/EventPtyCreated"
  12798. },
  12799. {
  12800. "$ref": "#/components/schemas/EventPtyUpdated"
  12801. },
  12802. {
  12803. "$ref": "#/components/schemas/EventPtyExited"
  12804. },
  12805. {
  12806. "$ref": "#/components/schemas/EventPtyDeleted"
  12807. },
  12808. {
  12809. "$ref": "#/components/schemas/EventInstallationUpdated"
  12810. },
  12811. {
  12812. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12813. },
  12814. {
  12815. "$ref": "#/components/schemas/EventMessageUpdated"
  12816. },
  12817. {
  12818. "$ref": "#/components/schemas/EventMessageRemoved"
  12819. },
  12820. {
  12821. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12822. },
  12823. {
  12824. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12825. },
  12826. {
  12827. "$ref": "#/components/schemas/EventSessionCreated"
  12828. },
  12829. {
  12830. "$ref": "#/components/schemas/EventSessionUpdated"
  12831. },
  12832. {
  12833. "$ref": "#/components/schemas/EventSessionDeleted"
  12834. },
  12835. {
  12836. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12837. },
  12838. {
  12839. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12840. },
  12841. {
  12842. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12843. },
  12844. {
  12845. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12846. },
  12847. {
  12848. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12849. },
  12850. {
  12851. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12852. },
  12853. {
  12854. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12855. },
  12856. {
  12857. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12858. },
  12859. {
  12860. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12861. },
  12862. {
  12863. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12864. },
  12865. {
  12866. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12867. },
  12868. {
  12869. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12870. },
  12871. {
  12872. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12873. },
  12874. {
  12875. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12876. },
  12877. {
  12878. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12879. },
  12880. {
  12881. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12882. },
  12883. {
  12884. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12885. },
  12886. {
  12887. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12888. },
  12889. {
  12890. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12891. },
  12892. {
  12893. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12894. },
  12895. {
  12896. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12897. },
  12898. {
  12899. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12900. },
  12901. {
  12902. "$ref": "#/components/schemas/EventSessionNextRetried"
  12903. },
  12904. {
  12905. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12906. },
  12907. {
  12908. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12909. },
  12910. {
  12911. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12912. },
  12913. {
  12914. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12915. },
  12916. {
  12917. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12918. },
  12919. {
  12920. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12921. },
  12922. {
  12923. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12924. },
  12925. {
  12926. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12927. },
  12928. {
  12929. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12930. },
  12931. {
  12932. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12933. },
  12934. {
  12935. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12936. },
  12937. {
  12938. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12939. },
  12940. {
  12941. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12942. },
  12943. {
  12944. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12945. },
  12946. {
  12947. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12948. },
  12949. {
  12950. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12951. },
  12952. {
  12953. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12954. },
  12955. {
  12956. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12957. },
  12958. {
  12959. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12960. },
  12961. {
  12962. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12963. },
  12964. {
  12965. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12966. },
  12967. {
  12968. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12969. },
  12970. {
  12971. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12972. },
  12973. {
  12974. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12975. },
  12976. {
  12977. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12978. },
  12979. {
  12980. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12981. },
  12982. {
  12983. "$ref": "#/components/schemas/EventSessionNextRetried"
  12984. },
  12985. {
  12986. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12987. },
  12988. {
  12989. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12990. },
  12991. {
  12992. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12993. },
  12994. {
  12995. "$ref": "#/components/schemas/EventModels-devRefreshed"
  12996. },
  12997. {
  12998. "$ref": "#/components/schemas/EventAccountAdded"
  12999. },
  13000. {
  13001. "$ref": "#/components/schemas/EventAccountRemoved"
  13002. },
  13003. {
  13004. "$ref": "#/components/schemas/EventAccountSwitched"
  13005. },
  13006. {
  13007. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13008. },
  13009. {
  13010. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13011. },
  13012. {
  13013. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13014. },
  13015. {
  13016. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13017. },
  13018. {
  13019. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13020. },
  13021. {
  13022. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13023. },
  13024. {
  13025. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13026. },
  13027. {
  13028. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13029. },
  13030. {
  13031. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13032. },
  13033. {
  13034. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13035. },
  13036. {
  13037. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13038. },
  13039. {
  13040. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13041. },
  13042. {
  13043. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13044. },
  13045. {
  13046. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13047. },
  13048. {
  13049. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13050. },
  13051. {
  13052. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13053. },
  13054. {
  13055. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13056. },
  13057. {
  13058. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13059. },
  13060. {
  13061. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13062. },
  13063. {
  13064. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13065. },
  13066. {
  13067. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13068. },
  13069. {
  13070. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13071. },
  13072. {
  13073. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13074. },
  13075. {
  13076. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13077. },
  13078. {
  13079. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13080. },
  13081. {
  13082. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13083. },
  13084. {
  13085. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13086. },
  13087. {
  13088. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13089. },
  13090. {
  13091. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13092. },
  13093. {
  13094. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13095. },
  13096. {
  13097. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13098. },
  13099. {
  13100. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13101. },
  13102. {
  13103. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13104. }
  13105. ]
  13106. }
  13107. },
  13108. "required": ["directory", "payload"],
  13109. "additionalProperties": false
  13110. },
  13111. "LogLevel": {
  13112. "type": "string",
  13113. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13114. "description": "Log level"
  13115. },
  13116. "ServerConfig": {
  13117. "type": "object",
  13118. "properties": {
  13119. "port": {
  13120. "type": "integer",
  13121. "exclusiveMinimum": 0
  13122. },
  13123. "hostname": {
  13124. "type": "string"
  13125. },
  13126. "mdns": {
  13127. "type": "boolean"
  13128. },
  13129. "mdnsDomain": {
  13130. "type": "string"
  13131. },
  13132. "cors": {
  13133. "type": "array",
  13134. "items": {
  13135. "type": "string"
  13136. }
  13137. }
  13138. },
  13139. "additionalProperties": false,
  13140. "description": "Server configuration for opencode serve and web commands"
  13141. },
  13142. "ReferenceConfigEntry": {
  13143. "anyOf": [
  13144. {
  13145. "type": "string"
  13146. },
  13147. {
  13148. "type": "object",
  13149. "properties": {
  13150. "repository": {
  13151. "type": "string",
  13152. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13153. },
  13154. "branch": {
  13155. "type": "string"
  13156. }
  13157. },
  13158. "required": ["repository"],
  13159. "additionalProperties": false
  13160. },
  13161. {
  13162. "type": "object",
  13163. "properties": {
  13164. "path": {
  13165. "type": "string",
  13166. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13167. }
  13168. },
  13169. "required": ["path"],
  13170. "additionalProperties": false
  13171. }
  13172. ]
  13173. },
  13174. "ReferenceConfig": {
  13175. "type": "object",
  13176. "additionalProperties": {
  13177. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13178. }
  13179. },
  13180. "PermissionActionConfig": {
  13181. "type": "string",
  13182. "enum": ["ask", "allow", "deny"]
  13183. },
  13184. "PermissionObjectConfig": {
  13185. "type": "object",
  13186. "additionalProperties": {
  13187. "$ref": "#/components/schemas/PermissionActionConfig"
  13188. }
  13189. },
  13190. "PermissionRuleConfig": {
  13191. "anyOf": [
  13192. {
  13193. "$ref": "#/components/schemas/PermissionActionConfig"
  13194. },
  13195. {
  13196. "$ref": "#/components/schemas/PermissionObjectConfig"
  13197. }
  13198. ]
  13199. },
  13200. "PermissionConfig": {
  13201. "anyOf": [
  13202. {
  13203. "$ref": "#/components/schemas/PermissionActionConfig"
  13204. },
  13205. {
  13206. "type": "object",
  13207. "properties": {
  13208. "read": {
  13209. "$ref": "#/components/schemas/PermissionRuleConfig"
  13210. },
  13211. "edit": {
  13212. "$ref": "#/components/schemas/PermissionRuleConfig"
  13213. },
  13214. "glob": {
  13215. "$ref": "#/components/schemas/PermissionRuleConfig"
  13216. },
  13217. "grep": {
  13218. "$ref": "#/components/schemas/PermissionRuleConfig"
  13219. },
  13220. "list": {
  13221. "$ref": "#/components/schemas/PermissionRuleConfig"
  13222. },
  13223. "bash": {
  13224. "$ref": "#/components/schemas/PermissionRuleConfig"
  13225. },
  13226. "task": {
  13227. "$ref": "#/components/schemas/PermissionRuleConfig"
  13228. },
  13229. "external_directory": {
  13230. "$ref": "#/components/schemas/PermissionRuleConfig"
  13231. },
  13232. "todowrite": {
  13233. "$ref": "#/components/schemas/PermissionActionConfig"
  13234. },
  13235. "question": {
  13236. "$ref": "#/components/schemas/PermissionActionConfig"
  13237. },
  13238. "webfetch": {
  13239. "$ref": "#/components/schemas/PermissionActionConfig"
  13240. },
  13241. "websearch": {
  13242. "$ref": "#/components/schemas/PermissionActionConfig"
  13243. },
  13244. "repo_clone": {
  13245. "$ref": "#/components/schemas/PermissionRuleConfig"
  13246. },
  13247. "repo_overview": {
  13248. "$ref": "#/components/schemas/PermissionRuleConfig"
  13249. },
  13250. "lsp": {
  13251. "$ref": "#/components/schemas/PermissionRuleConfig"
  13252. },
  13253. "doom_loop": {
  13254. "$ref": "#/components/schemas/PermissionActionConfig"
  13255. },
  13256. "skill": {
  13257. "$ref": "#/components/schemas/PermissionRuleConfig"
  13258. }
  13259. },
  13260. "additionalProperties": {
  13261. "$ref": "#/components/schemas/PermissionRuleConfig"
  13262. }
  13263. }
  13264. ]
  13265. },
  13266. "AgentConfig": {
  13267. "type": "object",
  13268. "properties": {
  13269. "model": {
  13270. "type": "string"
  13271. },
  13272. "variant": {
  13273. "type": "string"
  13274. },
  13275. "temperature": {
  13276. "type": "number"
  13277. },
  13278. "top_p": {
  13279. "type": "number"
  13280. },
  13281. "prompt": {
  13282. "type": "string"
  13283. },
  13284. "tools": {
  13285. "type": "object",
  13286. "additionalProperties": {
  13287. "type": "boolean"
  13288. }
  13289. },
  13290. "disable": {
  13291. "type": "boolean"
  13292. },
  13293. "description": {
  13294. "type": "string"
  13295. },
  13296. "mode": {
  13297. "type": "string",
  13298. "enum": ["subagent", "primary", "all"]
  13299. },
  13300. "hidden": {
  13301. "type": "boolean"
  13302. },
  13303. "options": {
  13304. "type": "object"
  13305. },
  13306. "color": {
  13307. "anyOf": [
  13308. {
  13309. "type": "string",
  13310. "pattern": "^#[0-9a-fA-F]{6}$"
  13311. },
  13312. {
  13313. "type": "string",
  13314. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13315. }
  13316. ],
  13317. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13318. },
  13319. "steps": {
  13320. "type": "integer",
  13321. "exclusiveMinimum": 0
  13322. },
  13323. "maxSteps": {
  13324. "type": "integer",
  13325. "exclusiveMinimum": 0
  13326. },
  13327. "permission": {
  13328. "$ref": "#/components/schemas/PermissionConfig"
  13329. }
  13330. },
  13331. "additionalProperties": {}
  13332. },
  13333. "ProviderConfig": {
  13334. "type": "object",
  13335. "properties": {
  13336. "api": {
  13337. "type": "string"
  13338. },
  13339. "name": {
  13340. "type": "string"
  13341. },
  13342. "env": {
  13343. "type": "array",
  13344. "items": {
  13345. "type": "string"
  13346. }
  13347. },
  13348. "id": {
  13349. "type": "string"
  13350. },
  13351. "npm": {
  13352. "type": "string"
  13353. },
  13354. "whitelist": {
  13355. "type": "array",
  13356. "items": {
  13357. "type": "string"
  13358. }
  13359. },
  13360. "blacklist": {
  13361. "type": "array",
  13362. "items": {
  13363. "type": "string"
  13364. }
  13365. },
  13366. "options": {
  13367. "type": "object",
  13368. "properties": {
  13369. "apiKey": {
  13370. "type": "string"
  13371. },
  13372. "baseURL": {
  13373. "type": "string"
  13374. },
  13375. "enterpriseUrl": {
  13376. "type": "string"
  13377. },
  13378. "setCacheKey": {
  13379. "type": "boolean"
  13380. },
  13381. "timeout": {
  13382. "anyOf": [
  13383. {
  13384. "type": "integer",
  13385. "exclusiveMinimum": 0
  13386. },
  13387. {
  13388. "type": "boolean",
  13389. "enum": [false]
  13390. }
  13391. ],
  13392. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13393. },
  13394. "chunkTimeout": {
  13395. "type": "integer",
  13396. "exclusiveMinimum": 0
  13397. }
  13398. },
  13399. "additionalProperties": {}
  13400. },
  13401. "models": {
  13402. "type": "object",
  13403. "additionalProperties": {
  13404. "type": "object",
  13405. "properties": {
  13406. "id": {
  13407. "type": "string"
  13408. },
  13409. "name": {
  13410. "type": "string"
  13411. },
  13412. "family": {
  13413. "type": "string"
  13414. },
  13415. "release_date": {
  13416. "type": "string"
  13417. },
  13418. "attachment": {
  13419. "type": "boolean"
  13420. },
  13421. "reasoning": {
  13422. "type": "boolean"
  13423. },
  13424. "temperature": {
  13425. "type": "boolean"
  13426. },
  13427. "tool_call": {
  13428. "type": "boolean"
  13429. },
  13430. "interleaved": {
  13431. "anyOf": [
  13432. {
  13433. "type": "boolean",
  13434. "enum": [true]
  13435. },
  13436. {
  13437. "type": "object",
  13438. "properties": {
  13439. "field": {
  13440. "type": "string",
  13441. "enum": ["reasoning_content", "reasoning_details"]
  13442. }
  13443. },
  13444. "required": ["field"],
  13445. "additionalProperties": false
  13446. }
  13447. ]
  13448. },
  13449. "cost": {
  13450. "type": "object",
  13451. "properties": {
  13452. "input": {
  13453. "type": "number"
  13454. },
  13455. "output": {
  13456. "type": "number"
  13457. },
  13458. "cache_read": {
  13459. "type": "number"
  13460. },
  13461. "cache_write": {
  13462. "type": "number"
  13463. },
  13464. "context_over_200k": {
  13465. "type": "object",
  13466. "properties": {
  13467. "input": {
  13468. "type": "number"
  13469. },
  13470. "output": {
  13471. "type": "number"
  13472. },
  13473. "cache_read": {
  13474. "type": "number"
  13475. },
  13476. "cache_write": {
  13477. "type": "number"
  13478. }
  13479. },
  13480. "required": ["input", "output"],
  13481. "additionalProperties": false
  13482. }
  13483. },
  13484. "required": ["input", "output"],
  13485. "additionalProperties": false
  13486. },
  13487. "limit": {
  13488. "type": "object",
  13489. "properties": {
  13490. "context": {
  13491. "type": "number"
  13492. },
  13493. "input": {
  13494. "type": "number"
  13495. },
  13496. "output": {
  13497. "type": "number"
  13498. }
  13499. },
  13500. "required": ["context", "output"],
  13501. "additionalProperties": false
  13502. },
  13503. "modalities": {
  13504. "type": "object",
  13505. "properties": {
  13506. "input": {
  13507. "type": "array",
  13508. "items": {
  13509. "type": "string",
  13510. "enum": ["text", "audio", "image", "video", "pdf"]
  13511. }
  13512. },
  13513. "output": {
  13514. "type": "array",
  13515. "items": {
  13516. "type": "string",
  13517. "enum": ["text", "audio", "image", "video", "pdf"]
  13518. }
  13519. }
  13520. },
  13521. "required": ["input", "output"],
  13522. "additionalProperties": false
  13523. },
  13524. "experimental": {
  13525. "type": "boolean"
  13526. },
  13527. "status": {
  13528. "type": "string",
  13529. "enum": ["alpha", "beta", "deprecated", "active"]
  13530. },
  13531. "provider": {
  13532. "type": "object",
  13533. "properties": {
  13534. "npm": {
  13535. "type": "string"
  13536. },
  13537. "api": {
  13538. "type": "string"
  13539. }
  13540. },
  13541. "additionalProperties": false
  13542. },
  13543. "options": {
  13544. "type": "object"
  13545. },
  13546. "headers": {
  13547. "type": "object",
  13548. "additionalProperties": {
  13549. "type": "string"
  13550. }
  13551. },
  13552. "variants": {
  13553. "type": "object",
  13554. "additionalProperties": {
  13555. "type": "object",
  13556. "properties": {
  13557. "disabled": {
  13558. "type": "boolean"
  13559. }
  13560. },
  13561. "additionalProperties": {}
  13562. },
  13563. "description": "Variant-specific configuration"
  13564. }
  13565. },
  13566. "additionalProperties": false
  13567. }
  13568. }
  13569. },
  13570. "additionalProperties": false
  13571. },
  13572. "McpLocalConfig": {
  13573. "type": "object",
  13574. "properties": {
  13575. "type": {
  13576. "type": "string",
  13577. "enum": ["local"],
  13578. "description": "Type of MCP server connection"
  13579. },
  13580. "command": {
  13581. "type": "array",
  13582. "items": {
  13583. "type": "string"
  13584. },
  13585. "description": "Command and arguments to run the MCP server"
  13586. },
  13587. "environment": {
  13588. "type": "object",
  13589. "additionalProperties": {
  13590. "type": "string"
  13591. }
  13592. },
  13593. "enabled": {
  13594. "type": "boolean"
  13595. },
  13596. "timeout": {
  13597. "type": "integer",
  13598. "exclusiveMinimum": 0
  13599. }
  13600. },
  13601. "required": ["type", "command"],
  13602. "additionalProperties": false
  13603. },
  13604. "McpOAuthConfig": {
  13605. "type": "object",
  13606. "properties": {
  13607. "clientId": {
  13608. "type": "string"
  13609. },
  13610. "clientSecret": {
  13611. "type": "string"
  13612. },
  13613. "scope": {
  13614. "type": "string"
  13615. },
  13616. "redirectUri": {
  13617. "type": "string"
  13618. }
  13619. },
  13620. "additionalProperties": false
  13621. },
  13622. "McpRemoteConfig": {
  13623. "type": "object",
  13624. "properties": {
  13625. "type": {
  13626. "type": "string",
  13627. "enum": ["remote"],
  13628. "description": "Type of MCP server connection"
  13629. },
  13630. "url": {
  13631. "type": "string",
  13632. "description": "URL of the remote MCP server"
  13633. },
  13634. "enabled": {
  13635. "type": "boolean"
  13636. },
  13637. "headers": {
  13638. "type": "object",
  13639. "additionalProperties": {
  13640. "type": "string"
  13641. }
  13642. },
  13643. "oauth": {
  13644. "anyOf": [
  13645. {
  13646. "$ref": "#/components/schemas/McpOAuthConfig"
  13647. },
  13648. {
  13649. "type": "boolean",
  13650. "enum": [false]
  13651. }
  13652. ],
  13653. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13654. },
  13655. "timeout": {
  13656. "type": "integer",
  13657. "exclusiveMinimum": 0
  13658. }
  13659. },
  13660. "required": ["type", "url"],
  13661. "additionalProperties": false
  13662. },
  13663. "LayoutConfig": {
  13664. "type": "string",
  13665. "enum": ["auto", "stretch"],
  13666. "description": "@deprecated Always uses stretch layout."
  13667. },
  13668. "ImageAttachmentConfig": {
  13669. "type": "object",
  13670. "properties": {
  13671. "auto_resize": {
  13672. "type": "boolean"
  13673. },
  13674. "max_width": {
  13675. "type": "integer",
  13676. "exclusiveMinimum": 0
  13677. },
  13678. "max_height": {
  13679. "type": "integer",
  13680. "exclusiveMinimum": 0
  13681. },
  13682. "max_base64_bytes": {
  13683. "type": "integer",
  13684. "exclusiveMinimum": 0
  13685. }
  13686. },
  13687. "additionalProperties": false
  13688. },
  13689. "AttachmentConfig": {
  13690. "type": "object",
  13691. "properties": {
  13692. "image": {
  13693. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13694. }
  13695. },
  13696. "additionalProperties": false
  13697. },
  13698. "Config": {
  13699. "type": "object",
  13700. "properties": {
  13701. "$schema": {
  13702. "type": "string"
  13703. },
  13704. "shell": {
  13705. "type": "string"
  13706. },
  13707. "logLevel": {
  13708. "$ref": "#/components/schemas/LogLevel"
  13709. },
  13710. "server": {
  13711. "$ref": "#/components/schemas/ServerConfig"
  13712. },
  13713. "command": {
  13714. "type": "object",
  13715. "additionalProperties": {
  13716. "type": "object",
  13717. "properties": {
  13718. "template": {
  13719. "type": "string"
  13720. },
  13721. "description": {
  13722. "type": "string"
  13723. },
  13724. "agent": {
  13725. "type": "string"
  13726. },
  13727. "model": {
  13728. "type": "string"
  13729. },
  13730. "subtask": {
  13731. "type": "boolean"
  13732. }
  13733. },
  13734. "required": ["template"],
  13735. "additionalProperties": false
  13736. }
  13737. },
  13738. "skills": {
  13739. "type": "object",
  13740. "properties": {
  13741. "paths": {
  13742. "type": "array",
  13743. "items": {
  13744. "type": "string"
  13745. }
  13746. },
  13747. "urls": {
  13748. "type": "array",
  13749. "items": {
  13750. "type": "string"
  13751. }
  13752. }
  13753. },
  13754. "additionalProperties": false
  13755. },
  13756. "reference": {
  13757. "$ref": "#/components/schemas/ReferenceConfig"
  13758. },
  13759. "watcher": {
  13760. "type": "object",
  13761. "properties": {
  13762. "ignore": {
  13763. "type": "array",
  13764. "items": {
  13765. "type": "string"
  13766. }
  13767. }
  13768. },
  13769. "additionalProperties": false
  13770. },
  13771. "snapshot": {
  13772. "type": "boolean"
  13773. },
  13774. "plugin": {
  13775. "type": "array",
  13776. "items": {
  13777. "anyOf": [
  13778. {
  13779. "type": "string"
  13780. },
  13781. {
  13782. "type": "array",
  13783. "prefixItems": [
  13784. {
  13785. "type": "string"
  13786. },
  13787. {
  13788. "type": "object"
  13789. }
  13790. ],
  13791. "maxItems": 2,
  13792. "minItems": 2
  13793. }
  13794. ]
  13795. }
  13796. },
  13797. "share": {
  13798. "type": "string",
  13799. "enum": ["manual", "auto", "disabled"]
  13800. },
  13801. "autoshare": {
  13802. "type": "boolean"
  13803. },
  13804. "autoupdate": {
  13805. "anyOf": [
  13806. {
  13807. "type": "boolean"
  13808. },
  13809. {
  13810. "type": "string",
  13811. "enum": ["notify"]
  13812. }
  13813. ],
  13814. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  13815. },
  13816. "disabled_providers": {
  13817. "type": "array",
  13818. "items": {
  13819. "type": "string"
  13820. }
  13821. },
  13822. "enabled_providers": {
  13823. "type": "array",
  13824. "items": {
  13825. "type": "string"
  13826. }
  13827. },
  13828. "model": {
  13829. "type": "string"
  13830. },
  13831. "small_model": {
  13832. "type": "string"
  13833. },
  13834. "default_agent": {
  13835. "type": "string"
  13836. },
  13837. "username": {
  13838. "type": "string"
  13839. },
  13840. "mode": {
  13841. "type": "object",
  13842. "properties": {
  13843. "build": {
  13844. "$ref": "#/components/schemas/AgentConfig"
  13845. },
  13846. "plan": {
  13847. "$ref": "#/components/schemas/AgentConfig"
  13848. }
  13849. },
  13850. "additionalProperties": {
  13851. "$ref": "#/components/schemas/AgentConfig"
  13852. }
  13853. },
  13854. "agent": {
  13855. "type": "object",
  13856. "properties": {
  13857. "plan": {
  13858. "$ref": "#/components/schemas/AgentConfig"
  13859. },
  13860. "build": {
  13861. "$ref": "#/components/schemas/AgentConfig"
  13862. },
  13863. "general": {
  13864. "$ref": "#/components/schemas/AgentConfig"
  13865. },
  13866. "explore": {
  13867. "$ref": "#/components/schemas/AgentConfig"
  13868. },
  13869. "scout": {
  13870. "$ref": "#/components/schemas/AgentConfig"
  13871. },
  13872. "title": {
  13873. "$ref": "#/components/schemas/AgentConfig"
  13874. },
  13875. "summary": {
  13876. "$ref": "#/components/schemas/AgentConfig"
  13877. },
  13878. "compaction": {
  13879. "$ref": "#/components/schemas/AgentConfig"
  13880. }
  13881. },
  13882. "additionalProperties": {
  13883. "$ref": "#/components/schemas/AgentConfig"
  13884. }
  13885. },
  13886. "provider": {
  13887. "type": "object",
  13888. "additionalProperties": {
  13889. "$ref": "#/components/schemas/ProviderConfig"
  13890. }
  13891. },
  13892. "mcp": {
  13893. "type": "object",
  13894. "additionalProperties": {
  13895. "anyOf": [
  13896. {
  13897. "$ref": "#/components/schemas/McpLocalConfig"
  13898. },
  13899. {
  13900. "$ref": "#/components/schemas/McpRemoteConfig"
  13901. },
  13902. {
  13903. "type": "object",
  13904. "properties": {
  13905. "enabled": {
  13906. "type": "boolean"
  13907. }
  13908. },
  13909. "required": ["enabled"],
  13910. "additionalProperties": false
  13911. }
  13912. ]
  13913. }
  13914. },
  13915. "formatter": {
  13916. "anyOf": [
  13917. {
  13918. "type": "boolean"
  13919. },
  13920. {
  13921. "type": "object",
  13922. "additionalProperties": {
  13923. "type": "object",
  13924. "properties": {
  13925. "disabled": {
  13926. "type": "boolean"
  13927. },
  13928. "command": {
  13929. "type": "array",
  13930. "items": {
  13931. "type": "string"
  13932. }
  13933. },
  13934. "environment": {
  13935. "type": "object",
  13936. "additionalProperties": {
  13937. "type": "string"
  13938. }
  13939. },
  13940. "extensions": {
  13941. "type": "array",
  13942. "items": {
  13943. "type": "string"
  13944. }
  13945. }
  13946. },
  13947. "additionalProperties": false
  13948. }
  13949. }
  13950. ],
  13951. "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."
  13952. },
  13953. "lsp": {
  13954. "anyOf": [
  13955. {
  13956. "type": "boolean"
  13957. },
  13958. {
  13959. "type": "object",
  13960. "additionalProperties": {
  13961. "anyOf": [
  13962. {
  13963. "type": "object",
  13964. "properties": {
  13965. "disabled": {
  13966. "type": "boolean",
  13967. "enum": [true]
  13968. }
  13969. },
  13970. "required": ["disabled"],
  13971. "additionalProperties": false
  13972. },
  13973. {
  13974. "type": "object",
  13975. "properties": {
  13976. "command": {
  13977. "type": "array",
  13978. "items": {
  13979. "type": "string"
  13980. }
  13981. },
  13982. "extensions": {
  13983. "type": "array",
  13984. "items": {
  13985. "type": "string"
  13986. }
  13987. },
  13988. "disabled": {
  13989. "type": "boolean"
  13990. },
  13991. "env": {
  13992. "type": "object",
  13993. "additionalProperties": {
  13994. "type": "string"
  13995. }
  13996. },
  13997. "initialization": {
  13998. "type": "object"
  13999. }
  14000. },
  14001. "required": ["command"],
  14002. "additionalProperties": false
  14003. }
  14004. ]
  14005. }
  14006. }
  14007. ],
  14008. "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."
  14009. },
  14010. "instructions": {
  14011. "type": "array",
  14012. "items": {
  14013. "type": "string"
  14014. }
  14015. },
  14016. "layout": {
  14017. "$ref": "#/components/schemas/LayoutConfig"
  14018. },
  14019. "permission": {
  14020. "$ref": "#/components/schemas/PermissionConfig"
  14021. },
  14022. "tools": {
  14023. "type": "object",
  14024. "additionalProperties": {
  14025. "type": "boolean"
  14026. }
  14027. },
  14028. "attachment": {
  14029. "$ref": "#/components/schemas/AttachmentConfig"
  14030. },
  14031. "enterprise": {
  14032. "type": "object",
  14033. "properties": {
  14034. "url": {
  14035. "type": "string"
  14036. }
  14037. },
  14038. "additionalProperties": false
  14039. },
  14040. "tool_output": {
  14041. "type": "object",
  14042. "properties": {
  14043. "max_lines": {
  14044. "type": "integer",
  14045. "exclusiveMinimum": 0
  14046. },
  14047. "max_bytes": {
  14048. "type": "integer",
  14049. "exclusiveMinimum": 0
  14050. }
  14051. },
  14052. "additionalProperties": false
  14053. },
  14054. "compaction": {
  14055. "type": "object",
  14056. "properties": {
  14057. "auto": {
  14058. "type": "boolean"
  14059. },
  14060. "prune": {
  14061. "type": "boolean"
  14062. },
  14063. "tail_turns": {
  14064. "type": "integer",
  14065. "minimum": 0
  14066. },
  14067. "preserve_recent_tokens": {
  14068. "type": "integer",
  14069. "minimum": 0
  14070. },
  14071. "reserved": {
  14072. "type": "integer",
  14073. "minimum": 0
  14074. }
  14075. },
  14076. "additionalProperties": false
  14077. },
  14078. "experimental": {
  14079. "type": "object",
  14080. "properties": {
  14081. "disable_paste_summary": {
  14082. "type": "boolean"
  14083. },
  14084. "batch_tool": {
  14085. "type": "boolean"
  14086. },
  14087. "openTelemetry": {
  14088. "type": "boolean"
  14089. },
  14090. "primary_tools": {
  14091. "type": "array",
  14092. "items": {
  14093. "type": "string"
  14094. }
  14095. },
  14096. "continue_loop_on_deny": {
  14097. "type": "boolean"
  14098. },
  14099. "mcp_timeout": {
  14100. "type": "integer",
  14101. "exclusiveMinimum": 0
  14102. }
  14103. },
  14104. "additionalProperties": false
  14105. }
  14106. },
  14107. "additionalProperties": false
  14108. },
  14109. "Model": {
  14110. "type": "object",
  14111. "properties": {
  14112. "id": {
  14113. "type": "string"
  14114. },
  14115. "providerID": {
  14116. "type": "string"
  14117. },
  14118. "api": {
  14119. "type": "object",
  14120. "properties": {
  14121. "id": {
  14122. "type": "string"
  14123. },
  14124. "url": {
  14125. "type": "string"
  14126. },
  14127. "npm": {
  14128. "type": "string"
  14129. }
  14130. },
  14131. "required": ["id", "url", "npm"],
  14132. "additionalProperties": false
  14133. },
  14134. "name": {
  14135. "type": "string"
  14136. },
  14137. "family": {
  14138. "type": "string"
  14139. },
  14140. "capabilities": {
  14141. "type": "object",
  14142. "properties": {
  14143. "temperature": {
  14144. "type": "boolean"
  14145. },
  14146. "reasoning": {
  14147. "type": "boolean"
  14148. },
  14149. "attachment": {
  14150. "type": "boolean"
  14151. },
  14152. "toolcall": {
  14153. "type": "boolean"
  14154. },
  14155. "input": {
  14156. "type": "object",
  14157. "properties": {
  14158. "text": {
  14159. "type": "boolean"
  14160. },
  14161. "audio": {
  14162. "type": "boolean"
  14163. },
  14164. "image": {
  14165. "type": "boolean"
  14166. },
  14167. "video": {
  14168. "type": "boolean"
  14169. },
  14170. "pdf": {
  14171. "type": "boolean"
  14172. }
  14173. },
  14174. "required": ["text", "audio", "image", "video", "pdf"],
  14175. "additionalProperties": false
  14176. },
  14177. "output": {
  14178. "type": "object",
  14179. "properties": {
  14180. "text": {
  14181. "type": "boolean"
  14182. },
  14183. "audio": {
  14184. "type": "boolean"
  14185. },
  14186. "image": {
  14187. "type": "boolean"
  14188. },
  14189. "video": {
  14190. "type": "boolean"
  14191. },
  14192. "pdf": {
  14193. "type": "boolean"
  14194. }
  14195. },
  14196. "required": ["text", "audio", "image", "video", "pdf"],
  14197. "additionalProperties": false
  14198. },
  14199. "interleaved": {
  14200. "anyOf": [
  14201. {
  14202. "type": "boolean"
  14203. },
  14204. {
  14205. "type": "object",
  14206. "properties": {
  14207. "field": {
  14208. "type": "string",
  14209. "enum": ["reasoning_content", "reasoning_details"]
  14210. }
  14211. },
  14212. "required": ["field"],
  14213. "additionalProperties": false
  14214. }
  14215. ]
  14216. }
  14217. },
  14218. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14219. "additionalProperties": false
  14220. },
  14221. "cost": {
  14222. "type": "object",
  14223. "properties": {
  14224. "input": {
  14225. "type": "number"
  14226. },
  14227. "output": {
  14228. "type": "number"
  14229. },
  14230. "cache": {
  14231. "type": "object",
  14232. "properties": {
  14233. "read": {
  14234. "type": "number"
  14235. },
  14236. "write": {
  14237. "type": "number"
  14238. }
  14239. },
  14240. "required": ["read", "write"],
  14241. "additionalProperties": false
  14242. },
  14243. "tiers": {
  14244. "type": "array",
  14245. "items": {
  14246. "type": "object",
  14247. "properties": {
  14248. "input": {
  14249. "type": "number"
  14250. },
  14251. "output": {
  14252. "type": "number"
  14253. },
  14254. "cache": {
  14255. "type": "object",
  14256. "properties": {
  14257. "read": {
  14258. "type": "number"
  14259. },
  14260. "write": {
  14261. "type": "number"
  14262. }
  14263. },
  14264. "required": ["read", "write"],
  14265. "additionalProperties": false
  14266. },
  14267. "tier": {
  14268. "type": "object",
  14269. "properties": {
  14270. "type": {
  14271. "type": "string",
  14272. "enum": ["context"]
  14273. },
  14274. "size": {
  14275. "type": "number"
  14276. }
  14277. },
  14278. "required": ["type", "size"],
  14279. "additionalProperties": false
  14280. }
  14281. },
  14282. "required": ["input", "output", "cache", "tier"],
  14283. "additionalProperties": false
  14284. }
  14285. },
  14286. "experimentalOver200K": {
  14287. "type": "object",
  14288. "properties": {
  14289. "input": {
  14290. "type": "number"
  14291. },
  14292. "output": {
  14293. "type": "number"
  14294. },
  14295. "cache": {
  14296. "type": "object",
  14297. "properties": {
  14298. "read": {
  14299. "type": "number"
  14300. },
  14301. "write": {
  14302. "type": "number"
  14303. }
  14304. },
  14305. "required": ["read", "write"],
  14306. "additionalProperties": false
  14307. }
  14308. },
  14309. "required": ["input", "output", "cache"],
  14310. "additionalProperties": false
  14311. }
  14312. },
  14313. "required": ["input", "output", "cache"],
  14314. "additionalProperties": false
  14315. },
  14316. "limit": {
  14317. "type": "object",
  14318. "properties": {
  14319. "context": {
  14320. "type": "number"
  14321. },
  14322. "input": {
  14323. "type": "number"
  14324. },
  14325. "output": {
  14326. "type": "number"
  14327. }
  14328. },
  14329. "required": ["context", "output"],
  14330. "additionalProperties": false
  14331. },
  14332. "status": {
  14333. "type": "string",
  14334. "enum": ["alpha", "beta", "deprecated", "active"]
  14335. },
  14336. "options": {
  14337. "type": "object"
  14338. },
  14339. "headers": {
  14340. "type": "object",
  14341. "additionalProperties": {
  14342. "type": "string"
  14343. }
  14344. },
  14345. "release_date": {
  14346. "type": "string"
  14347. },
  14348. "variants": {
  14349. "type": "object",
  14350. "additionalProperties": {
  14351. "type": "object"
  14352. }
  14353. }
  14354. },
  14355. "required": [
  14356. "id",
  14357. "providerID",
  14358. "api",
  14359. "name",
  14360. "capabilities",
  14361. "cost",
  14362. "limit",
  14363. "status",
  14364. "options",
  14365. "headers",
  14366. "release_date"
  14367. ],
  14368. "additionalProperties": false
  14369. },
  14370. "Provider": {
  14371. "type": "object",
  14372. "properties": {
  14373. "id": {
  14374. "type": "string"
  14375. },
  14376. "name": {
  14377. "type": "string"
  14378. },
  14379. "source": {
  14380. "type": "string",
  14381. "enum": ["env", "config", "custom", "api"]
  14382. },
  14383. "env": {
  14384. "type": "array",
  14385. "items": {
  14386. "type": "string"
  14387. }
  14388. },
  14389. "key": {
  14390. "type": "string"
  14391. },
  14392. "options": {
  14393. "type": "object"
  14394. },
  14395. "models": {
  14396. "type": "object",
  14397. "additionalProperties": {
  14398. "$ref": "#/components/schemas/Model"
  14399. }
  14400. }
  14401. },
  14402. "required": ["id", "name", "source", "env", "options", "models"],
  14403. "additionalProperties": false
  14404. },
  14405. "ConsoleState": {
  14406. "type": "object",
  14407. "properties": {
  14408. "consoleManagedProviders": {
  14409. "type": "array",
  14410. "items": {
  14411. "type": "string"
  14412. }
  14413. },
  14414. "activeOrgName": {
  14415. "type": "string"
  14416. },
  14417. "switchableOrgCount": {
  14418. "type": "integer",
  14419. "minimum": 0
  14420. }
  14421. },
  14422. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14423. "additionalProperties": false
  14424. },
  14425. "effect_HttpApiError_InternalServerError": {
  14426. "type": "object",
  14427. "properties": {
  14428. "_tag": {
  14429. "type": "string",
  14430. "enum": ["InternalServerError"]
  14431. }
  14432. },
  14433. "required": ["_tag"],
  14434. "additionalProperties": false
  14435. },
  14436. "ToolListItem": {
  14437. "type": "object",
  14438. "properties": {
  14439. "id": {
  14440. "type": "string"
  14441. },
  14442. "description": {
  14443. "type": "string"
  14444. },
  14445. "parameters": {}
  14446. },
  14447. "required": ["id", "description", "parameters"],
  14448. "additionalProperties": false
  14449. },
  14450. "ToolList": {
  14451. "type": "array",
  14452. "items": {
  14453. "$ref": "#/components/schemas/ToolListItem"
  14454. }
  14455. },
  14456. "ToolIDs": {
  14457. "type": "array",
  14458. "items": {
  14459. "type": "string"
  14460. }
  14461. },
  14462. "WorktreeError": {
  14463. "type": "object",
  14464. "properties": {
  14465. "name": {
  14466. "type": "string",
  14467. "enum": [
  14468. "WorktreeNotGitError",
  14469. "WorktreeNameGenerationFailedError",
  14470. "WorktreeCreateFailedError",
  14471. "WorktreeStartCommandFailedError",
  14472. "WorktreeRemoveFailedError",
  14473. "WorktreeResetFailedError",
  14474. "WorktreeListFailedError"
  14475. ]
  14476. },
  14477. "data": {
  14478. "type": "object",
  14479. "properties": {
  14480. "message": {
  14481. "type": "string"
  14482. }
  14483. },
  14484. "required": ["message"],
  14485. "additionalProperties": false
  14486. }
  14487. },
  14488. "required": ["name", "data"],
  14489. "additionalProperties": false
  14490. },
  14491. "WorktreeCreateInput": {
  14492. "type": "object",
  14493. "properties": {
  14494. "name": {
  14495. "type": "string"
  14496. },
  14497. "startCommand": {
  14498. "type": "string",
  14499. "description": "Additional startup script to run after the project's start command"
  14500. }
  14501. },
  14502. "additionalProperties": false
  14503. },
  14504. "Worktree": {
  14505. "type": "object",
  14506. "properties": {
  14507. "name": {
  14508. "type": "string"
  14509. },
  14510. "branch": {
  14511. "type": "string"
  14512. },
  14513. "directory": {
  14514. "type": "string"
  14515. }
  14516. },
  14517. "required": ["name", "directory"],
  14518. "additionalProperties": false
  14519. },
  14520. "WorktreeRemoveInput": {
  14521. "type": "object",
  14522. "properties": {
  14523. "directory": {
  14524. "type": "string"
  14525. }
  14526. },
  14527. "required": ["directory"],
  14528. "additionalProperties": false
  14529. },
  14530. "WorktreeResetInput": {
  14531. "type": "object",
  14532. "properties": {
  14533. "directory": {
  14534. "type": "string"
  14535. }
  14536. },
  14537. "required": ["directory"],
  14538. "additionalProperties": false
  14539. },
  14540. "ProjectSummary": {
  14541. "type": "object",
  14542. "properties": {
  14543. "id": {
  14544. "type": "string"
  14545. },
  14546. "name": {
  14547. "type": "string"
  14548. },
  14549. "worktree": {
  14550. "type": "string"
  14551. }
  14552. },
  14553. "required": ["id", "worktree"],
  14554. "additionalProperties": false
  14555. },
  14556. "GlobalSession": {
  14557. "type": "object",
  14558. "properties": {
  14559. "id": {
  14560. "type": "string",
  14561. "pattern": "^ses"
  14562. },
  14563. "slug": {
  14564. "type": "string"
  14565. },
  14566. "projectID": {
  14567. "type": "string"
  14568. },
  14569. "workspaceID": {
  14570. "type": "string",
  14571. "pattern": "^wrk"
  14572. },
  14573. "directory": {
  14574. "type": "string"
  14575. },
  14576. "path": {
  14577. "type": "string"
  14578. },
  14579. "parentID": {
  14580. "type": "string",
  14581. "pattern": "^ses"
  14582. },
  14583. "summary": {
  14584. "type": "object",
  14585. "properties": {
  14586. "additions": {
  14587. "type": "number"
  14588. },
  14589. "deletions": {
  14590. "type": "number"
  14591. },
  14592. "files": {
  14593. "type": "number"
  14594. },
  14595. "diffs": {
  14596. "type": "array",
  14597. "items": {
  14598. "$ref": "#/components/schemas/SnapshotFileDiff"
  14599. }
  14600. }
  14601. },
  14602. "required": ["additions", "deletions", "files"],
  14603. "additionalProperties": false
  14604. },
  14605. "cost": {
  14606. "type": "number"
  14607. },
  14608. "tokens": {
  14609. "type": "object",
  14610. "properties": {
  14611. "input": {
  14612. "type": "number"
  14613. },
  14614. "output": {
  14615. "type": "number"
  14616. },
  14617. "reasoning": {
  14618. "type": "number"
  14619. },
  14620. "cache": {
  14621. "type": "object",
  14622. "properties": {
  14623. "read": {
  14624. "type": "number"
  14625. },
  14626. "write": {
  14627. "type": "number"
  14628. }
  14629. },
  14630. "required": ["read", "write"],
  14631. "additionalProperties": false
  14632. }
  14633. },
  14634. "required": ["input", "output", "reasoning", "cache"],
  14635. "additionalProperties": false
  14636. },
  14637. "share": {
  14638. "type": "object",
  14639. "properties": {
  14640. "url": {
  14641. "type": "string"
  14642. }
  14643. },
  14644. "required": ["url"],
  14645. "additionalProperties": false
  14646. },
  14647. "title": {
  14648. "type": "string"
  14649. },
  14650. "agent": {
  14651. "type": "string"
  14652. },
  14653. "model": {
  14654. "type": "object",
  14655. "properties": {
  14656. "id": {
  14657. "type": "string"
  14658. },
  14659. "providerID": {
  14660. "type": "string"
  14661. },
  14662. "variant": {
  14663. "type": "string"
  14664. }
  14665. },
  14666. "required": ["id", "providerID"],
  14667. "additionalProperties": false
  14668. },
  14669. "version": {
  14670. "type": "string"
  14671. },
  14672. "time": {
  14673. "type": "object",
  14674. "properties": {
  14675. "created": {
  14676. "type": "integer",
  14677. "minimum": 0
  14678. },
  14679. "updated": {
  14680. "type": "integer",
  14681. "minimum": 0
  14682. },
  14683. "compacting": {
  14684. "type": "integer",
  14685. "minimum": 0
  14686. },
  14687. "archived": {
  14688. "type": "number"
  14689. }
  14690. },
  14691. "required": ["created", "updated"],
  14692. "additionalProperties": false
  14693. },
  14694. "permission": {
  14695. "$ref": "#/components/schemas/PermissionRuleset"
  14696. },
  14697. "revert": {
  14698. "type": "object",
  14699. "properties": {
  14700. "messageID": {
  14701. "type": "string",
  14702. "pattern": "^msg"
  14703. },
  14704. "partID": {
  14705. "type": "string",
  14706. "pattern": "^prt"
  14707. },
  14708. "snapshot": {
  14709. "type": "string"
  14710. },
  14711. "diff": {
  14712. "type": "string"
  14713. }
  14714. },
  14715. "required": ["messageID"],
  14716. "additionalProperties": false
  14717. },
  14718. "project": {
  14719. "anyOf": [
  14720. {
  14721. "$ref": "#/components/schemas/ProjectSummary"
  14722. },
  14723. {
  14724. "type": "null"
  14725. }
  14726. ]
  14727. }
  14728. },
  14729. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14730. "additionalProperties": false
  14731. },
  14732. "McpResource": {
  14733. "type": "object",
  14734. "properties": {
  14735. "name": {
  14736. "type": "string"
  14737. },
  14738. "uri": {
  14739. "type": "string"
  14740. },
  14741. "description": {
  14742. "type": "string"
  14743. },
  14744. "mimeType": {
  14745. "type": "string"
  14746. },
  14747. "client": {
  14748. "type": "string"
  14749. }
  14750. },
  14751. "required": ["name", "uri", "client"],
  14752. "additionalProperties": false
  14753. },
  14754. "Symbol": {
  14755. "type": "object",
  14756. "properties": {
  14757. "name": {
  14758. "type": "string"
  14759. },
  14760. "kind": {
  14761. "type": "integer",
  14762. "minimum": 0
  14763. },
  14764. "location": {
  14765. "type": "object",
  14766. "properties": {
  14767. "uri": {
  14768. "type": "string"
  14769. },
  14770. "range": {
  14771. "$ref": "#/components/schemas/Range"
  14772. }
  14773. },
  14774. "required": ["uri", "range"],
  14775. "additionalProperties": false
  14776. }
  14777. },
  14778. "required": ["name", "kind", "location"],
  14779. "additionalProperties": false
  14780. },
  14781. "FileNode": {
  14782. "type": "object",
  14783. "properties": {
  14784. "name": {
  14785. "type": "string"
  14786. },
  14787. "path": {
  14788. "type": "string"
  14789. },
  14790. "absolute": {
  14791. "type": "string"
  14792. },
  14793. "type": {
  14794. "type": "string",
  14795. "enum": ["file", "directory"]
  14796. },
  14797. "ignored": {
  14798. "type": "boolean"
  14799. }
  14800. },
  14801. "required": ["name", "path", "absolute", "type", "ignored"],
  14802. "additionalProperties": false
  14803. },
  14804. "FileContent": {
  14805. "type": "object",
  14806. "properties": {
  14807. "type": {
  14808. "type": "string",
  14809. "enum": ["text", "binary"]
  14810. },
  14811. "content": {
  14812. "type": "string"
  14813. },
  14814. "diff": {
  14815. "type": "string"
  14816. },
  14817. "patch": {
  14818. "type": "object",
  14819. "properties": {
  14820. "oldFileName": {
  14821. "type": "string"
  14822. },
  14823. "newFileName": {
  14824. "type": "string"
  14825. },
  14826. "oldHeader": {
  14827. "type": "string"
  14828. },
  14829. "newHeader": {
  14830. "type": "string"
  14831. },
  14832. "hunks": {
  14833. "type": "array",
  14834. "items": {
  14835. "type": "object",
  14836. "properties": {
  14837. "oldStart": {
  14838. "type": "integer",
  14839. "minimum": 0
  14840. },
  14841. "oldLines": {
  14842. "type": "integer",
  14843. "minimum": 0
  14844. },
  14845. "newStart": {
  14846. "type": "integer",
  14847. "minimum": 0
  14848. },
  14849. "newLines": {
  14850. "type": "integer",
  14851. "minimum": 0
  14852. },
  14853. "lines": {
  14854. "type": "array",
  14855. "items": {
  14856. "type": "string"
  14857. }
  14858. }
  14859. },
  14860. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  14861. "additionalProperties": false
  14862. }
  14863. },
  14864. "index": {
  14865. "type": "string"
  14866. }
  14867. },
  14868. "required": ["oldFileName", "newFileName", "hunks"],
  14869. "additionalProperties": false
  14870. },
  14871. "encoding": {
  14872. "type": "string",
  14873. "enum": ["base64"]
  14874. },
  14875. "mimeType": {
  14876. "type": "string"
  14877. }
  14878. },
  14879. "required": ["type", "content"],
  14880. "additionalProperties": false
  14881. },
  14882. "File": {
  14883. "type": "object",
  14884. "properties": {
  14885. "path": {
  14886. "type": "string"
  14887. },
  14888. "added": {
  14889. "type": "integer",
  14890. "minimum": 0
  14891. },
  14892. "removed": {
  14893. "type": "integer",
  14894. "minimum": 0
  14895. },
  14896. "status": {
  14897. "type": "string",
  14898. "enum": ["added", "deleted", "modified"]
  14899. }
  14900. },
  14901. "required": ["path", "added", "removed", "status"],
  14902. "additionalProperties": false
  14903. },
  14904. "Path": {
  14905. "type": "object",
  14906. "properties": {
  14907. "home": {
  14908. "type": "string"
  14909. },
  14910. "state": {
  14911. "type": "string"
  14912. },
  14913. "config": {
  14914. "type": "string"
  14915. },
  14916. "worktree": {
  14917. "type": "string"
  14918. },
  14919. "directory": {
  14920. "type": "string"
  14921. }
  14922. },
  14923. "required": ["home", "state", "config", "worktree", "directory"],
  14924. "additionalProperties": false
  14925. },
  14926. "VcsInfo": {
  14927. "type": "object",
  14928. "properties": {
  14929. "branch": {
  14930. "type": "string"
  14931. },
  14932. "default_branch": {
  14933. "type": "string"
  14934. }
  14935. },
  14936. "additionalProperties": false
  14937. },
  14938. "VcsFileStatus": {
  14939. "type": "object",
  14940. "properties": {
  14941. "file": {
  14942. "type": "string"
  14943. },
  14944. "additions": {
  14945. "type": "number"
  14946. },
  14947. "deletions": {
  14948. "type": "number"
  14949. },
  14950. "status": {
  14951. "type": "string",
  14952. "enum": ["added", "deleted", "modified"]
  14953. }
  14954. },
  14955. "required": ["file", "additions", "deletions", "status"],
  14956. "additionalProperties": false
  14957. },
  14958. "VcsFileDiff": {
  14959. "type": "object",
  14960. "properties": {
  14961. "file": {
  14962. "type": "string"
  14963. },
  14964. "patch": {
  14965. "type": "string"
  14966. },
  14967. "additions": {
  14968. "type": "number"
  14969. },
  14970. "deletions": {
  14971. "type": "number"
  14972. },
  14973. "status": {
  14974. "type": "string",
  14975. "enum": ["added", "deleted", "modified"]
  14976. }
  14977. },
  14978. "required": ["file", "additions", "deletions"],
  14979. "additionalProperties": false
  14980. },
  14981. "VcsApplyError": {
  14982. "type": "object",
  14983. "properties": {
  14984. "name": {
  14985. "type": "string",
  14986. "enum": ["VcsApplyError"]
  14987. },
  14988. "data": {
  14989. "type": "object",
  14990. "properties": {
  14991. "message": {
  14992. "type": "string"
  14993. },
  14994. "reason": {
  14995. "type": "string",
  14996. "enum": ["non-git", "not-clean"]
  14997. }
  14998. },
  14999. "required": ["message", "reason"],
  15000. "additionalProperties": false
  15001. }
  15002. },
  15003. "required": ["name", "data"],
  15004. "additionalProperties": false
  15005. },
  15006. "Command": {
  15007. "type": "object",
  15008. "properties": {
  15009. "name": {
  15010. "type": "string"
  15011. },
  15012. "description": {
  15013. "type": "string"
  15014. },
  15015. "agent": {
  15016. "type": "string"
  15017. },
  15018. "model": {
  15019. "type": "string"
  15020. },
  15021. "source": {
  15022. "type": "string",
  15023. "enum": ["command", "mcp", "skill"]
  15024. },
  15025. "template": {
  15026. "type": "string"
  15027. },
  15028. "subtask": {
  15029. "type": "boolean"
  15030. },
  15031. "hints": {
  15032. "type": "array",
  15033. "items": {
  15034. "type": "string"
  15035. }
  15036. }
  15037. },
  15038. "required": ["name", "template", "hints"],
  15039. "additionalProperties": false
  15040. },
  15041. "Agent": {
  15042. "type": "object",
  15043. "properties": {
  15044. "name": {
  15045. "type": "string"
  15046. },
  15047. "description": {
  15048. "type": "string"
  15049. },
  15050. "mode": {
  15051. "type": "string",
  15052. "enum": ["subagent", "primary", "all"]
  15053. },
  15054. "native": {
  15055. "type": "boolean"
  15056. },
  15057. "hidden": {
  15058. "type": "boolean"
  15059. },
  15060. "topP": {
  15061. "type": "number"
  15062. },
  15063. "temperature": {
  15064. "type": "number"
  15065. },
  15066. "color": {
  15067. "type": "string"
  15068. },
  15069. "permission": {
  15070. "$ref": "#/components/schemas/PermissionRuleset"
  15071. },
  15072. "model": {
  15073. "type": "object",
  15074. "properties": {
  15075. "modelID": {
  15076. "type": "string"
  15077. },
  15078. "providerID": {
  15079. "type": "string"
  15080. }
  15081. },
  15082. "required": ["modelID", "providerID"],
  15083. "additionalProperties": false
  15084. },
  15085. "variant": {
  15086. "type": "string"
  15087. },
  15088. "prompt": {
  15089. "type": "string"
  15090. },
  15091. "options": {
  15092. "type": "object"
  15093. },
  15094. "steps": {
  15095. "type": "number"
  15096. }
  15097. },
  15098. "required": ["name", "mode", "permission", "options"],
  15099. "additionalProperties": false
  15100. },
  15101. "LSPStatus": {
  15102. "type": "object",
  15103. "properties": {
  15104. "id": {
  15105. "type": "string"
  15106. },
  15107. "name": {
  15108. "type": "string"
  15109. },
  15110. "root": {
  15111. "type": "string"
  15112. },
  15113. "status": {
  15114. "type": "string",
  15115. "enum": ["connected", "error"]
  15116. }
  15117. },
  15118. "required": ["id", "name", "root", "status"],
  15119. "additionalProperties": false
  15120. },
  15121. "FormatterStatus": {
  15122. "type": "object",
  15123. "properties": {
  15124. "name": {
  15125. "type": "string"
  15126. },
  15127. "extensions": {
  15128. "type": "array",
  15129. "items": {
  15130. "type": "string"
  15131. }
  15132. },
  15133. "enabled": {
  15134. "type": "boolean"
  15135. }
  15136. },
  15137. "required": ["name", "extensions", "enabled"],
  15138. "additionalProperties": false
  15139. },
  15140. "MCPStatusConnected": {
  15141. "type": "object",
  15142. "properties": {
  15143. "status": {
  15144. "type": "string",
  15145. "enum": ["connected"]
  15146. }
  15147. },
  15148. "required": ["status"],
  15149. "additionalProperties": false
  15150. },
  15151. "MCPStatusDisabled": {
  15152. "type": "object",
  15153. "properties": {
  15154. "status": {
  15155. "type": "string",
  15156. "enum": ["disabled"]
  15157. }
  15158. },
  15159. "required": ["status"],
  15160. "additionalProperties": false
  15161. },
  15162. "MCPStatusFailed": {
  15163. "type": "object",
  15164. "properties": {
  15165. "status": {
  15166. "type": "string",
  15167. "enum": ["failed"]
  15168. },
  15169. "error": {
  15170. "type": "string"
  15171. }
  15172. },
  15173. "required": ["status", "error"],
  15174. "additionalProperties": false
  15175. },
  15176. "MCPStatusNeedsAuth": {
  15177. "type": "object",
  15178. "properties": {
  15179. "status": {
  15180. "type": "string",
  15181. "enum": ["needs_auth"]
  15182. }
  15183. },
  15184. "required": ["status"],
  15185. "additionalProperties": false
  15186. },
  15187. "MCPStatusNeedsClientRegistration": {
  15188. "type": "object",
  15189. "properties": {
  15190. "status": {
  15191. "type": "string",
  15192. "enum": ["needs_client_registration"]
  15193. },
  15194. "error": {
  15195. "type": "string"
  15196. }
  15197. },
  15198. "required": ["status", "error"],
  15199. "additionalProperties": false
  15200. },
  15201. "MCPStatus": {
  15202. "anyOf": [
  15203. {
  15204. "$ref": "#/components/schemas/MCPStatusConnected"
  15205. },
  15206. {
  15207. "$ref": "#/components/schemas/MCPStatusDisabled"
  15208. },
  15209. {
  15210. "$ref": "#/components/schemas/MCPStatusFailed"
  15211. },
  15212. {
  15213. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15214. },
  15215. {
  15216. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15217. }
  15218. ]
  15219. },
  15220. "McpUnsupportedOAuthError": {
  15221. "type": "object",
  15222. "properties": {
  15223. "error": {
  15224. "type": "string"
  15225. }
  15226. },
  15227. "required": ["error"],
  15228. "additionalProperties": false
  15229. },
  15230. "NotFoundError": {
  15231. "type": "object",
  15232. "required": ["name", "data"],
  15233. "properties": {
  15234. "name": {
  15235. "type": "string",
  15236. "enum": ["NotFoundError"]
  15237. },
  15238. "data": {
  15239. "type": "object",
  15240. "required": ["message"],
  15241. "properties": {
  15242. "message": {
  15243. "type": "string"
  15244. }
  15245. }
  15246. }
  15247. }
  15248. },
  15249. "effect_HttpApiError_Forbidden": {
  15250. "type": "object",
  15251. "properties": {
  15252. "_tag": {
  15253. "type": "string",
  15254. "enum": ["Forbidden"]
  15255. }
  15256. },
  15257. "required": ["_tag"],
  15258. "additionalProperties": false
  15259. },
  15260. "ProviderAuthMethod": {
  15261. "type": "object",
  15262. "properties": {
  15263. "type": {
  15264. "type": "string",
  15265. "enum": ["oauth", "api"]
  15266. },
  15267. "label": {
  15268. "type": "string"
  15269. },
  15270. "prompts": {
  15271. "type": "array",
  15272. "items": {
  15273. "anyOf": [
  15274. {
  15275. "type": "object",
  15276. "properties": {
  15277. "type": {
  15278. "type": "string",
  15279. "enum": ["text"]
  15280. },
  15281. "key": {
  15282. "type": "string"
  15283. },
  15284. "message": {
  15285. "type": "string"
  15286. },
  15287. "placeholder": {
  15288. "type": "string"
  15289. },
  15290. "when": {
  15291. "type": "object",
  15292. "properties": {
  15293. "key": {
  15294. "type": "string"
  15295. },
  15296. "op": {
  15297. "type": "string",
  15298. "enum": ["eq", "neq"]
  15299. },
  15300. "value": {
  15301. "type": "string"
  15302. }
  15303. },
  15304. "required": ["key", "op", "value"],
  15305. "additionalProperties": false
  15306. }
  15307. },
  15308. "required": ["type", "key", "message"],
  15309. "additionalProperties": false
  15310. },
  15311. {
  15312. "type": "object",
  15313. "properties": {
  15314. "type": {
  15315. "type": "string",
  15316. "enum": ["select"]
  15317. },
  15318. "key": {
  15319. "type": "string"
  15320. },
  15321. "message": {
  15322. "type": "string"
  15323. },
  15324. "options": {
  15325. "type": "array",
  15326. "items": {
  15327. "type": "object",
  15328. "properties": {
  15329. "label": {
  15330. "type": "string"
  15331. },
  15332. "value": {
  15333. "type": "string"
  15334. },
  15335. "hint": {
  15336. "type": "string"
  15337. }
  15338. },
  15339. "required": ["label", "value"],
  15340. "additionalProperties": false
  15341. }
  15342. },
  15343. "when": {
  15344. "type": "object",
  15345. "properties": {
  15346. "key": {
  15347. "type": "string"
  15348. },
  15349. "op": {
  15350. "type": "string",
  15351. "enum": ["eq", "neq"]
  15352. },
  15353. "value": {
  15354. "type": "string"
  15355. }
  15356. },
  15357. "required": ["key", "op", "value"],
  15358. "additionalProperties": false
  15359. }
  15360. },
  15361. "required": ["type", "key", "message", "options"],
  15362. "additionalProperties": false
  15363. }
  15364. ]
  15365. }
  15366. }
  15367. },
  15368. "required": ["type", "label"],
  15369. "additionalProperties": false
  15370. },
  15371. "ProviderAuthAuthorization": {
  15372. "type": "object",
  15373. "properties": {
  15374. "url": {
  15375. "type": "string"
  15376. },
  15377. "method": {
  15378. "type": "string",
  15379. "enum": ["auto", "code"]
  15380. },
  15381. "instructions": {
  15382. "type": "string"
  15383. }
  15384. },
  15385. "required": ["url", "method", "instructions"],
  15386. "additionalProperties": false
  15387. },
  15388. "ProviderAuthError1": {
  15389. "type": "object",
  15390. "properties": {
  15391. "name": {
  15392. "type": "string",
  15393. "enum": [
  15394. "BadRequest",
  15395. "ProviderAuthOauthMissing",
  15396. "ProviderAuthOauthCodeMissing",
  15397. "ProviderAuthOauthCallbackFailed",
  15398. "ProviderAuthValidationFailed"
  15399. ]
  15400. },
  15401. "data": {
  15402. "type": "object",
  15403. "properties": {
  15404. "providerID": {
  15405. "type": "string"
  15406. },
  15407. "field": {
  15408. "type": "string"
  15409. },
  15410. "message": {
  15411. "type": "string"
  15412. },
  15413. "kind": {
  15414. "type": "string"
  15415. }
  15416. },
  15417. "additionalProperties": false
  15418. }
  15419. },
  15420. "required": ["name", "data"],
  15421. "additionalProperties": false
  15422. },
  15423. "TextPartInput": {
  15424. "type": "object",
  15425. "properties": {
  15426. "id": {
  15427. "type": "string",
  15428. "pattern": "^prt"
  15429. },
  15430. "type": {
  15431. "type": "string",
  15432. "enum": ["text"]
  15433. },
  15434. "text": {
  15435. "type": "string"
  15436. },
  15437. "synthetic": {
  15438. "type": "boolean"
  15439. },
  15440. "ignored": {
  15441. "type": "boolean"
  15442. },
  15443. "time": {
  15444. "type": "object",
  15445. "properties": {
  15446. "start": {
  15447. "type": "integer",
  15448. "minimum": 0
  15449. },
  15450. "end": {
  15451. "type": "integer",
  15452. "minimum": 0
  15453. }
  15454. },
  15455. "required": ["start"],
  15456. "additionalProperties": false
  15457. },
  15458. "metadata": {
  15459. "type": "object"
  15460. }
  15461. },
  15462. "required": ["type", "text"],
  15463. "additionalProperties": false
  15464. },
  15465. "FilePartInput": {
  15466. "type": "object",
  15467. "properties": {
  15468. "id": {
  15469. "type": "string",
  15470. "pattern": "^prt"
  15471. },
  15472. "type": {
  15473. "type": "string",
  15474. "enum": ["file"]
  15475. },
  15476. "mime": {
  15477. "type": "string"
  15478. },
  15479. "filename": {
  15480. "type": "string"
  15481. },
  15482. "url": {
  15483. "type": "string"
  15484. },
  15485. "source": {
  15486. "$ref": "#/components/schemas/FilePartSource"
  15487. }
  15488. },
  15489. "required": ["type", "mime", "url"],
  15490. "additionalProperties": false
  15491. },
  15492. "AgentPartInput": {
  15493. "type": "object",
  15494. "properties": {
  15495. "id": {
  15496. "type": "string",
  15497. "pattern": "^prt"
  15498. },
  15499. "type": {
  15500. "type": "string",
  15501. "enum": ["agent"]
  15502. },
  15503. "name": {
  15504. "type": "string"
  15505. },
  15506. "source": {
  15507. "type": "object",
  15508. "properties": {
  15509. "value": {
  15510. "type": "string"
  15511. },
  15512. "start": {
  15513. "type": "integer",
  15514. "minimum": 0
  15515. },
  15516. "end": {
  15517. "type": "integer",
  15518. "minimum": 0
  15519. }
  15520. },
  15521. "required": ["value", "start", "end"],
  15522. "additionalProperties": false
  15523. }
  15524. },
  15525. "required": ["type", "name"],
  15526. "additionalProperties": false
  15527. },
  15528. "SubtaskPartInput": {
  15529. "type": "object",
  15530. "properties": {
  15531. "id": {
  15532. "type": "string",
  15533. "pattern": "^prt"
  15534. },
  15535. "type": {
  15536. "type": "string",
  15537. "enum": ["subtask"]
  15538. },
  15539. "prompt": {
  15540. "type": "string"
  15541. },
  15542. "description": {
  15543. "type": "string"
  15544. },
  15545. "agent": {
  15546. "type": "string"
  15547. },
  15548. "model": {
  15549. "type": "object",
  15550. "properties": {
  15551. "providerID": {
  15552. "type": "string"
  15553. },
  15554. "modelID": {
  15555. "type": "string"
  15556. }
  15557. },
  15558. "required": ["providerID", "modelID"],
  15559. "additionalProperties": false
  15560. },
  15561. "command": {
  15562. "type": "string"
  15563. }
  15564. },
  15565. "required": ["type", "prompt", "description", "agent"],
  15566. "additionalProperties": false
  15567. },
  15568. "V2SessionsResponse": {
  15569. "type": "object",
  15570. "properties": {
  15571. "items": {
  15572. "type": "array",
  15573. "items": {
  15574. "$ref": "#/components/schemas/SessionInfo"
  15575. }
  15576. },
  15577. "cursor": {
  15578. "type": "object",
  15579. "properties": {
  15580. "previous": {
  15581. "type": "string"
  15582. },
  15583. "next": {
  15584. "type": "string"
  15585. }
  15586. },
  15587. "additionalProperties": false
  15588. }
  15589. },
  15590. "required": ["items", "cursor"],
  15591. "additionalProperties": false
  15592. },
  15593. "InvalidCursorError": {
  15594. "type": "object",
  15595. "properties": {
  15596. "_tag": {
  15597. "type": "string",
  15598. "enum": ["InvalidCursorError"]
  15599. },
  15600. "message": {
  15601. "type": "string"
  15602. }
  15603. },
  15604. "required": ["_tag", "message"],
  15605. "additionalProperties": false
  15606. },
  15607. "UnauthorizedError": {
  15608. "type": "object",
  15609. "properties": {
  15610. "_tag": {
  15611. "type": "string",
  15612. "enum": ["UnauthorizedError"]
  15613. },
  15614. "message": {
  15615. "type": "string"
  15616. }
  15617. },
  15618. "required": ["_tag", "message"],
  15619. "additionalProperties": false
  15620. },
  15621. "V2SessionMessagesResponse": {
  15622. "type": "object",
  15623. "properties": {
  15624. "items": {
  15625. "type": "array",
  15626. "items": {
  15627. "$ref": "#/components/schemas/SessionMessage"
  15628. }
  15629. },
  15630. "cursor": {
  15631. "type": "object",
  15632. "properties": {
  15633. "previous": {
  15634. "type": "string"
  15635. },
  15636. "next": {
  15637. "type": "string"
  15638. }
  15639. },
  15640. "additionalProperties": false
  15641. }
  15642. },
  15643. "required": ["items", "cursor"],
  15644. "additionalProperties": false
  15645. },
  15646. "ServiceUnavailableError": {
  15647. "type": "object",
  15648. "properties": {
  15649. "_tag": {
  15650. "type": "string",
  15651. "enum": ["ServiceUnavailableError"]
  15652. },
  15653. "message": {
  15654. "type": "string"
  15655. },
  15656. "service": {
  15657. "type": "string"
  15658. }
  15659. },
  15660. "required": ["_tag", "message"],
  15661. "additionalProperties": false
  15662. },
  15663. "ProviderNotFoundError": {
  15664. "type": "object",
  15665. "properties": {
  15666. "_tag": {
  15667. "type": "string",
  15668. "enum": ["ProviderNotFoundError"]
  15669. },
  15670. "providerID": {
  15671. "type": "string"
  15672. },
  15673. "message": {
  15674. "type": "string"
  15675. }
  15676. },
  15677. "required": ["_tag", "providerID", "message"],
  15678. "additionalProperties": false
  15679. },
  15680. "EventTuiPromptAppend": {
  15681. "type": "object",
  15682. "properties": {
  15683. "type": {
  15684. "type": "string",
  15685. "enum": ["tui.prompt.append"]
  15686. },
  15687. "properties": {
  15688. "type": "object",
  15689. "properties": {
  15690. "text": {
  15691. "type": "string"
  15692. }
  15693. },
  15694. "required": ["text"],
  15695. "additionalProperties": false
  15696. }
  15697. },
  15698. "required": ["type", "properties"],
  15699. "additionalProperties": false
  15700. },
  15701. "EventTuiCommandExecute": {
  15702. "type": "object",
  15703. "properties": {
  15704. "type": {
  15705. "type": "string",
  15706. "enum": ["tui.command.execute"]
  15707. },
  15708. "properties": {
  15709. "type": "object",
  15710. "properties": {
  15711. "command": {
  15712. "anyOf": [
  15713. {
  15714. "type": "string",
  15715. "enum": [
  15716. "session.list",
  15717. "session.new",
  15718. "session.share",
  15719. "session.interrupt",
  15720. "session.compact",
  15721. "session.page.up",
  15722. "session.page.down",
  15723. "session.line.up",
  15724. "session.line.down",
  15725. "session.half.page.up",
  15726. "session.half.page.down",
  15727. "session.first",
  15728. "session.last",
  15729. "prompt.clear",
  15730. "prompt.submit",
  15731. "agent.cycle"
  15732. ]
  15733. },
  15734. {
  15735. "type": "string"
  15736. }
  15737. ]
  15738. }
  15739. },
  15740. "required": ["command"],
  15741. "additionalProperties": false
  15742. }
  15743. },
  15744. "required": ["type", "properties"],
  15745. "additionalProperties": false
  15746. },
  15747. "EventTuiToastShow": {
  15748. "type": "object",
  15749. "properties": {
  15750. "type": {
  15751. "type": "string",
  15752. "enum": ["tui.toast.show"]
  15753. },
  15754. "properties": {
  15755. "type": "object",
  15756. "properties": {
  15757. "title": {
  15758. "type": "string"
  15759. },
  15760. "message": {
  15761. "type": "string"
  15762. },
  15763. "variant": {
  15764. "type": "string",
  15765. "enum": ["info", "success", "warning", "error"]
  15766. },
  15767. "duration": {
  15768. "type": "integer",
  15769. "exclusiveMinimum": 0
  15770. }
  15771. },
  15772. "required": ["message", "variant"],
  15773. "additionalProperties": false
  15774. }
  15775. },
  15776. "required": ["type", "properties"],
  15777. "additionalProperties": false
  15778. },
  15779. "EventTuiSessionSelect": {
  15780. "type": "object",
  15781. "properties": {
  15782. "type": {
  15783. "type": "string",
  15784. "enum": ["tui.session.select"]
  15785. },
  15786. "properties": {
  15787. "type": "object",
  15788. "properties": {
  15789. "sessionID": {
  15790. "type": "string",
  15791. "pattern": "^ses",
  15792. "description": "Session ID to navigate to"
  15793. }
  15794. },
  15795. "required": ["sessionID"],
  15796. "additionalProperties": false
  15797. }
  15798. },
  15799. "required": ["type", "properties"],
  15800. "additionalProperties": false
  15801. },
  15802. "Workspace": {
  15803. "type": "object",
  15804. "properties": {
  15805. "id": {
  15806. "type": "string",
  15807. "pattern": "^wrk"
  15808. },
  15809. "type": {
  15810. "type": "string"
  15811. },
  15812. "name": {
  15813. "type": "string"
  15814. },
  15815. "branch": {
  15816. "anyOf": [
  15817. {
  15818. "type": "string"
  15819. },
  15820. {
  15821. "type": "null"
  15822. }
  15823. ]
  15824. },
  15825. "directory": {
  15826. "anyOf": [
  15827. {
  15828. "type": "string"
  15829. },
  15830. {
  15831. "type": "null"
  15832. }
  15833. ]
  15834. },
  15835. "extra": {
  15836. "anyOf": [
  15837. {},
  15838. {
  15839. "type": "null"
  15840. }
  15841. ]
  15842. },
  15843. "projectID": {
  15844. "type": "string"
  15845. },
  15846. "timeUsed": {
  15847. "anyOf": [
  15848. {
  15849. "type": "number"
  15850. },
  15851. {
  15852. "type": "string",
  15853. "enum": ["NaN"]
  15854. },
  15855. {
  15856. "type": "string",
  15857. "enum": ["Infinity"]
  15858. },
  15859. {
  15860. "type": "string",
  15861. "enum": ["-Infinity"]
  15862. },
  15863. {
  15864. "type": "string",
  15865. "enum": ["Infinity", "-Infinity", "NaN"]
  15866. }
  15867. ]
  15868. }
  15869. },
  15870. "required": ["id", "type", "name", "projectID", "timeUsed"],
  15871. "additionalProperties": false
  15872. },
  15873. "WorkspaceWarpError": {
  15874. "type": "object",
  15875. "properties": {
  15876. "name": {
  15877. "type": "string",
  15878. "enum": ["WorkspaceWarpError"]
  15879. },
  15880. "data": {
  15881. "type": "object",
  15882. "properties": {
  15883. "message": {
  15884. "type": "string"
  15885. }
  15886. },
  15887. "required": ["message"],
  15888. "additionalProperties": false
  15889. }
  15890. },
  15891. "required": ["name", "data"],
  15892. "additionalProperties": false
  15893. },
  15894. "SyncEventMessageUpdated": {
  15895. "type": "object",
  15896. "properties": {
  15897. "type": {
  15898. "type": "string",
  15899. "enum": ["sync"]
  15900. },
  15901. "name": {
  15902. "type": "string",
  15903. "enum": ["message.updated.1"]
  15904. },
  15905. "id": {
  15906. "type": "string"
  15907. },
  15908. "seq": {
  15909. "type": "number"
  15910. },
  15911. "aggregateID": {
  15912. "type": "string",
  15913. "enum": ["sessionID"]
  15914. },
  15915. "data": {
  15916. "type": "object",
  15917. "properties": {
  15918. "sessionID": {
  15919. "type": "string",
  15920. "pattern": "^ses"
  15921. },
  15922. "info": {
  15923. "$ref": "#/components/schemas/Message"
  15924. }
  15925. },
  15926. "required": ["sessionID", "info"],
  15927. "additionalProperties": false
  15928. }
  15929. },
  15930. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15931. "additionalProperties": false
  15932. },
  15933. "SyncEventMessageRemoved": {
  15934. "type": "object",
  15935. "properties": {
  15936. "type": {
  15937. "type": "string",
  15938. "enum": ["sync"]
  15939. },
  15940. "name": {
  15941. "type": "string",
  15942. "enum": ["message.removed.1"]
  15943. },
  15944. "id": {
  15945. "type": "string"
  15946. },
  15947. "seq": {
  15948. "type": "number"
  15949. },
  15950. "aggregateID": {
  15951. "type": "string",
  15952. "enum": ["sessionID"]
  15953. },
  15954. "data": {
  15955. "type": "object",
  15956. "properties": {
  15957. "sessionID": {
  15958. "type": "string",
  15959. "pattern": "^ses"
  15960. },
  15961. "messageID": {
  15962. "type": "string",
  15963. "pattern": "^msg"
  15964. }
  15965. },
  15966. "required": ["sessionID", "messageID"],
  15967. "additionalProperties": false
  15968. }
  15969. },
  15970. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15971. "additionalProperties": false
  15972. },
  15973. "SyncEventMessagePartUpdated": {
  15974. "type": "object",
  15975. "properties": {
  15976. "type": {
  15977. "type": "string",
  15978. "enum": ["sync"]
  15979. },
  15980. "name": {
  15981. "type": "string",
  15982. "enum": ["message.part.updated.1"]
  15983. },
  15984. "id": {
  15985. "type": "string"
  15986. },
  15987. "seq": {
  15988. "type": "number"
  15989. },
  15990. "aggregateID": {
  15991. "type": "string",
  15992. "enum": ["sessionID"]
  15993. },
  15994. "data": {
  15995. "type": "object",
  15996. "properties": {
  15997. "sessionID": {
  15998. "type": "string",
  15999. "pattern": "^ses"
  16000. },
  16001. "part": {
  16002. "$ref": "#/components/schemas/Part"
  16003. },
  16004. "time": {
  16005. "type": "integer",
  16006. "minimum": 0
  16007. }
  16008. },
  16009. "required": ["sessionID", "part", "time"],
  16010. "additionalProperties": false
  16011. }
  16012. },
  16013. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16014. "additionalProperties": false
  16015. },
  16016. "SyncEventMessagePartRemoved": {
  16017. "type": "object",
  16018. "properties": {
  16019. "type": {
  16020. "type": "string",
  16021. "enum": ["sync"]
  16022. },
  16023. "name": {
  16024. "type": "string",
  16025. "enum": ["message.part.removed.1"]
  16026. },
  16027. "id": {
  16028. "type": "string"
  16029. },
  16030. "seq": {
  16031. "type": "number"
  16032. },
  16033. "aggregateID": {
  16034. "type": "string",
  16035. "enum": ["sessionID"]
  16036. },
  16037. "data": {
  16038. "type": "object",
  16039. "properties": {
  16040. "sessionID": {
  16041. "type": "string",
  16042. "pattern": "^ses"
  16043. },
  16044. "messageID": {
  16045. "type": "string",
  16046. "pattern": "^msg"
  16047. },
  16048. "partID": {
  16049. "type": "string",
  16050. "pattern": "^prt"
  16051. }
  16052. },
  16053. "required": ["sessionID", "messageID", "partID"],
  16054. "additionalProperties": false
  16055. }
  16056. },
  16057. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16058. "additionalProperties": false
  16059. },
  16060. "SyncEventSessionCreated": {
  16061. "type": "object",
  16062. "properties": {
  16063. "type": {
  16064. "type": "string",
  16065. "enum": ["sync"]
  16066. },
  16067. "name": {
  16068. "type": "string",
  16069. "enum": ["session.created.1"]
  16070. },
  16071. "id": {
  16072. "type": "string"
  16073. },
  16074. "seq": {
  16075. "type": "number"
  16076. },
  16077. "aggregateID": {
  16078. "type": "string",
  16079. "enum": ["sessionID"]
  16080. },
  16081. "data": {
  16082. "type": "object",
  16083. "properties": {
  16084. "sessionID": {
  16085. "type": "string",
  16086. "pattern": "^ses"
  16087. },
  16088. "info": {
  16089. "$ref": "#/components/schemas/Session"
  16090. }
  16091. },
  16092. "required": ["sessionID", "info"],
  16093. "additionalProperties": false
  16094. }
  16095. },
  16096. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16097. "additionalProperties": false
  16098. },
  16099. "SyncEventSessionUpdated": {
  16100. "type": "object",
  16101. "properties": {
  16102. "type": {
  16103. "type": "string",
  16104. "enum": ["sync"]
  16105. },
  16106. "name": {
  16107. "type": "string",
  16108. "enum": ["session.updated.1"]
  16109. },
  16110. "id": {
  16111. "type": "string"
  16112. },
  16113. "seq": {
  16114. "type": "number"
  16115. },
  16116. "aggregateID": {
  16117. "type": "string",
  16118. "enum": ["sessionID"]
  16119. },
  16120. "data": {
  16121. "type": "object",
  16122. "properties": {
  16123. "sessionID": {
  16124. "type": "string",
  16125. "pattern": "^ses"
  16126. },
  16127. "info": {
  16128. "type": "object",
  16129. "properties": {
  16130. "id": {
  16131. "anyOf": [
  16132. {
  16133. "type": "string",
  16134. "pattern": "^ses"
  16135. },
  16136. {
  16137. "type": "null"
  16138. }
  16139. ]
  16140. },
  16141. "slug": {
  16142. "anyOf": [
  16143. {
  16144. "type": "string"
  16145. },
  16146. {
  16147. "type": "null"
  16148. }
  16149. ]
  16150. },
  16151. "projectID": {
  16152. "anyOf": [
  16153. {
  16154. "type": "string"
  16155. },
  16156. {
  16157. "type": "null"
  16158. }
  16159. ]
  16160. },
  16161. "workspaceID": {
  16162. "anyOf": [
  16163. {
  16164. "type": "string",
  16165. "pattern": "^wrk"
  16166. },
  16167. {
  16168. "type": "null"
  16169. }
  16170. ]
  16171. },
  16172. "directory": {
  16173. "anyOf": [
  16174. {
  16175. "type": "string"
  16176. },
  16177. {
  16178. "type": "null"
  16179. }
  16180. ]
  16181. },
  16182. "path": {
  16183. "anyOf": [
  16184. {
  16185. "type": "string"
  16186. },
  16187. {
  16188. "type": "null"
  16189. }
  16190. ]
  16191. },
  16192. "parentID": {
  16193. "anyOf": [
  16194. {
  16195. "type": "string",
  16196. "pattern": "^ses"
  16197. },
  16198. {
  16199. "type": "null"
  16200. }
  16201. ]
  16202. },
  16203. "summary": {
  16204. "anyOf": [
  16205. {
  16206. "type": "object",
  16207. "properties": {
  16208. "additions": {
  16209. "type": "number"
  16210. },
  16211. "deletions": {
  16212. "type": "number"
  16213. },
  16214. "files": {
  16215. "type": "number"
  16216. },
  16217. "diffs": {
  16218. "type": "array",
  16219. "items": {
  16220. "$ref": "#/components/schemas/SnapshotFileDiff"
  16221. }
  16222. }
  16223. },
  16224. "required": ["additions", "deletions", "files"],
  16225. "additionalProperties": false
  16226. },
  16227. {
  16228. "type": "null"
  16229. }
  16230. ]
  16231. },
  16232. "cost": {
  16233. "anyOf": [
  16234. {
  16235. "type": "number"
  16236. },
  16237. {
  16238. "type": "null"
  16239. }
  16240. ]
  16241. },
  16242. "tokens": {
  16243. "anyOf": [
  16244. {
  16245. "type": "object",
  16246. "properties": {
  16247. "input": {
  16248. "type": "number"
  16249. },
  16250. "output": {
  16251. "type": "number"
  16252. },
  16253. "reasoning": {
  16254. "type": "number"
  16255. },
  16256. "cache": {
  16257. "type": "object",
  16258. "properties": {
  16259. "read": {
  16260. "type": "number"
  16261. },
  16262. "write": {
  16263. "type": "number"
  16264. }
  16265. },
  16266. "required": ["read", "write"],
  16267. "additionalProperties": false
  16268. }
  16269. },
  16270. "required": ["input", "output", "reasoning", "cache"],
  16271. "additionalProperties": false
  16272. },
  16273. {
  16274. "type": "null"
  16275. }
  16276. ]
  16277. },
  16278. "share": {
  16279. "type": "object",
  16280. "properties": {
  16281. "url": {
  16282. "anyOf": [
  16283. {
  16284. "type": "string"
  16285. },
  16286. {
  16287. "type": "null"
  16288. }
  16289. ]
  16290. }
  16291. },
  16292. "additionalProperties": false
  16293. },
  16294. "title": {
  16295. "anyOf": [
  16296. {
  16297. "type": "string"
  16298. },
  16299. {
  16300. "type": "null"
  16301. }
  16302. ]
  16303. },
  16304. "agent": {
  16305. "anyOf": [
  16306. {
  16307. "type": "string"
  16308. },
  16309. {
  16310. "type": "null"
  16311. }
  16312. ]
  16313. },
  16314. "model": {
  16315. "anyOf": [
  16316. {
  16317. "type": "object",
  16318. "properties": {
  16319. "id": {
  16320. "type": "string"
  16321. },
  16322. "providerID": {
  16323. "type": "string"
  16324. },
  16325. "variant": {
  16326. "type": "string"
  16327. }
  16328. },
  16329. "required": ["id", "providerID"],
  16330. "additionalProperties": false
  16331. },
  16332. {
  16333. "type": "null"
  16334. }
  16335. ]
  16336. },
  16337. "version": {
  16338. "anyOf": [
  16339. {
  16340. "type": "string"
  16341. },
  16342. {
  16343. "type": "null"
  16344. }
  16345. ]
  16346. },
  16347. "time": {
  16348. "type": "object",
  16349. "properties": {
  16350. "created": {
  16351. "anyOf": [
  16352. {
  16353. "type": "integer",
  16354. "minimum": 0
  16355. },
  16356. {
  16357. "type": "null"
  16358. }
  16359. ]
  16360. },
  16361. "updated": {
  16362. "anyOf": [
  16363. {
  16364. "type": "integer",
  16365. "minimum": 0
  16366. },
  16367. {
  16368. "type": "null"
  16369. }
  16370. ]
  16371. },
  16372. "compacting": {
  16373. "anyOf": [
  16374. {
  16375. "type": "integer",
  16376. "minimum": 0
  16377. },
  16378. {
  16379. "type": "null"
  16380. }
  16381. ]
  16382. },
  16383. "archived": {
  16384. "anyOf": [
  16385. {
  16386. "type": "number"
  16387. },
  16388. {
  16389. "type": "null"
  16390. }
  16391. ]
  16392. }
  16393. },
  16394. "additionalProperties": false
  16395. },
  16396. "permission": {
  16397. "anyOf": [
  16398. {
  16399. "$ref": "#/components/schemas/PermissionRuleset"
  16400. },
  16401. {
  16402. "type": "null"
  16403. }
  16404. ]
  16405. },
  16406. "revert": {
  16407. "anyOf": [
  16408. {
  16409. "type": "object",
  16410. "properties": {
  16411. "messageID": {
  16412. "type": "string",
  16413. "pattern": "^msg"
  16414. },
  16415. "partID": {
  16416. "type": "string",
  16417. "pattern": "^prt"
  16418. },
  16419. "snapshot": {
  16420. "type": "string"
  16421. },
  16422. "diff": {
  16423. "type": "string"
  16424. }
  16425. },
  16426. "required": ["messageID"],
  16427. "additionalProperties": false
  16428. },
  16429. {
  16430. "type": "null"
  16431. }
  16432. ]
  16433. }
  16434. },
  16435. "additionalProperties": false
  16436. }
  16437. },
  16438. "required": ["sessionID", "info"],
  16439. "additionalProperties": false
  16440. }
  16441. },
  16442. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16443. "additionalProperties": false
  16444. },
  16445. "SyncEventSessionDeleted": {
  16446. "type": "object",
  16447. "properties": {
  16448. "type": {
  16449. "type": "string",
  16450. "enum": ["sync"]
  16451. },
  16452. "name": {
  16453. "type": "string",
  16454. "enum": ["session.deleted.1"]
  16455. },
  16456. "id": {
  16457. "type": "string"
  16458. },
  16459. "seq": {
  16460. "type": "number"
  16461. },
  16462. "aggregateID": {
  16463. "type": "string",
  16464. "enum": ["sessionID"]
  16465. },
  16466. "data": {
  16467. "type": "object",
  16468. "properties": {
  16469. "sessionID": {
  16470. "type": "string",
  16471. "pattern": "^ses"
  16472. },
  16473. "info": {
  16474. "$ref": "#/components/schemas/Session"
  16475. }
  16476. },
  16477. "required": ["sessionID", "info"],
  16478. "additionalProperties": false
  16479. }
  16480. },
  16481. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16482. "additionalProperties": false
  16483. },
  16484. "SyncEventSessionNextAgentSwitched": {
  16485. "type": "object",
  16486. "properties": {
  16487. "type": {
  16488. "type": "string",
  16489. "enum": ["sync"]
  16490. },
  16491. "name": {
  16492. "type": "string",
  16493. "enum": ["session.next.agent.switched.1"]
  16494. },
  16495. "id": {
  16496. "type": "string"
  16497. },
  16498. "seq": {
  16499. "type": "number"
  16500. },
  16501. "aggregateID": {
  16502. "type": "string",
  16503. "enum": ["sessionID"]
  16504. },
  16505. "data": {
  16506. "type": "object",
  16507. "properties": {
  16508. "timestamp": {
  16509. "type": "number"
  16510. },
  16511. "sessionID": {
  16512. "type": "string",
  16513. "pattern": "^ses"
  16514. },
  16515. "agent": {
  16516. "type": "string"
  16517. }
  16518. },
  16519. "required": ["timestamp", "sessionID", "agent"],
  16520. "additionalProperties": false
  16521. }
  16522. },
  16523. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16524. "additionalProperties": false
  16525. },
  16526. "SyncEventSessionNextModelSwitched": {
  16527. "type": "object",
  16528. "properties": {
  16529. "type": {
  16530. "type": "string",
  16531. "enum": ["sync"]
  16532. },
  16533. "name": {
  16534. "type": "string",
  16535. "enum": ["session.next.model.switched.1"]
  16536. },
  16537. "id": {
  16538. "type": "string"
  16539. },
  16540. "seq": {
  16541. "type": "number"
  16542. },
  16543. "aggregateID": {
  16544. "type": "string",
  16545. "enum": ["sessionID"]
  16546. },
  16547. "data": {
  16548. "type": "object",
  16549. "properties": {
  16550. "timestamp": {
  16551. "type": "number"
  16552. },
  16553. "sessionID": {
  16554. "type": "string",
  16555. "pattern": "^ses"
  16556. },
  16557. "model": {
  16558. "type": "object",
  16559. "properties": {
  16560. "id": {
  16561. "type": "string"
  16562. },
  16563. "providerID": {
  16564. "type": "string"
  16565. },
  16566. "variant": {
  16567. "type": "string"
  16568. }
  16569. },
  16570. "required": ["id", "providerID", "variant"],
  16571. "additionalProperties": false
  16572. }
  16573. },
  16574. "required": ["timestamp", "sessionID", "model"],
  16575. "additionalProperties": false
  16576. }
  16577. },
  16578. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16579. "additionalProperties": false
  16580. },
  16581. "SyncEventSessionNextPrompted": {
  16582. "type": "object",
  16583. "properties": {
  16584. "type": {
  16585. "type": "string",
  16586. "enum": ["sync"]
  16587. },
  16588. "name": {
  16589. "type": "string",
  16590. "enum": ["session.next.prompted.1"]
  16591. },
  16592. "id": {
  16593. "type": "string"
  16594. },
  16595. "seq": {
  16596. "type": "number"
  16597. },
  16598. "aggregateID": {
  16599. "type": "string",
  16600. "enum": ["sessionID"]
  16601. },
  16602. "data": {
  16603. "type": "object",
  16604. "properties": {
  16605. "timestamp": {
  16606. "type": "number"
  16607. },
  16608. "sessionID": {
  16609. "type": "string",
  16610. "pattern": "^ses"
  16611. },
  16612. "prompt": {
  16613. "$ref": "#/components/schemas/Prompt"
  16614. }
  16615. },
  16616. "required": ["timestamp", "sessionID", "prompt"],
  16617. "additionalProperties": false
  16618. }
  16619. },
  16620. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16621. "additionalProperties": false
  16622. },
  16623. "SyncEventSessionNextSynthetic": {
  16624. "type": "object",
  16625. "properties": {
  16626. "type": {
  16627. "type": "string",
  16628. "enum": ["sync"]
  16629. },
  16630. "name": {
  16631. "type": "string",
  16632. "enum": ["session.next.synthetic.1"]
  16633. },
  16634. "id": {
  16635. "type": "string"
  16636. },
  16637. "seq": {
  16638. "type": "number"
  16639. },
  16640. "aggregateID": {
  16641. "type": "string",
  16642. "enum": ["sessionID"]
  16643. },
  16644. "data": {
  16645. "type": "object",
  16646. "properties": {
  16647. "timestamp": {
  16648. "type": "number"
  16649. },
  16650. "sessionID": {
  16651. "type": "string",
  16652. "pattern": "^ses"
  16653. },
  16654. "text": {
  16655. "type": "string"
  16656. }
  16657. },
  16658. "required": ["timestamp", "sessionID", "text"],
  16659. "additionalProperties": false
  16660. }
  16661. },
  16662. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16663. "additionalProperties": false
  16664. },
  16665. "SyncEventSessionNextShellStarted": {
  16666. "type": "object",
  16667. "properties": {
  16668. "type": {
  16669. "type": "string",
  16670. "enum": ["sync"]
  16671. },
  16672. "name": {
  16673. "type": "string",
  16674. "enum": ["session.next.shell.started.1"]
  16675. },
  16676. "id": {
  16677. "type": "string"
  16678. },
  16679. "seq": {
  16680. "type": "number"
  16681. },
  16682. "aggregateID": {
  16683. "type": "string",
  16684. "enum": ["sessionID"]
  16685. },
  16686. "data": {
  16687. "type": "object",
  16688. "properties": {
  16689. "timestamp": {
  16690. "type": "number"
  16691. },
  16692. "sessionID": {
  16693. "type": "string",
  16694. "pattern": "^ses"
  16695. },
  16696. "callID": {
  16697. "type": "string"
  16698. },
  16699. "command": {
  16700. "type": "string"
  16701. }
  16702. },
  16703. "required": ["timestamp", "sessionID", "callID", "command"],
  16704. "additionalProperties": false
  16705. }
  16706. },
  16707. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16708. "additionalProperties": false
  16709. },
  16710. "SyncEventSessionNextShellEnded": {
  16711. "type": "object",
  16712. "properties": {
  16713. "type": {
  16714. "type": "string",
  16715. "enum": ["sync"]
  16716. },
  16717. "name": {
  16718. "type": "string",
  16719. "enum": ["session.next.shell.ended.1"]
  16720. },
  16721. "id": {
  16722. "type": "string"
  16723. },
  16724. "seq": {
  16725. "type": "number"
  16726. },
  16727. "aggregateID": {
  16728. "type": "string",
  16729. "enum": ["sessionID"]
  16730. },
  16731. "data": {
  16732. "type": "object",
  16733. "properties": {
  16734. "timestamp": {
  16735. "type": "number"
  16736. },
  16737. "sessionID": {
  16738. "type": "string",
  16739. "pattern": "^ses"
  16740. },
  16741. "callID": {
  16742. "type": "string"
  16743. },
  16744. "output": {
  16745. "type": "string"
  16746. }
  16747. },
  16748. "required": ["timestamp", "sessionID", "callID", "output"],
  16749. "additionalProperties": false
  16750. }
  16751. },
  16752. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16753. "additionalProperties": false
  16754. },
  16755. "SyncEventSessionNextStepStarted": {
  16756. "type": "object",
  16757. "properties": {
  16758. "type": {
  16759. "type": "string",
  16760. "enum": ["sync"]
  16761. },
  16762. "name": {
  16763. "type": "string",
  16764. "enum": ["session.next.step.started.1"]
  16765. },
  16766. "id": {
  16767. "type": "string"
  16768. },
  16769. "seq": {
  16770. "type": "number"
  16771. },
  16772. "aggregateID": {
  16773. "type": "string",
  16774. "enum": ["sessionID"]
  16775. },
  16776. "data": {
  16777. "type": "object",
  16778. "properties": {
  16779. "timestamp": {
  16780. "type": "number"
  16781. },
  16782. "sessionID": {
  16783. "type": "string",
  16784. "pattern": "^ses"
  16785. },
  16786. "agent": {
  16787. "type": "string"
  16788. },
  16789. "model": {
  16790. "type": "object",
  16791. "properties": {
  16792. "id": {
  16793. "type": "string"
  16794. },
  16795. "providerID": {
  16796. "type": "string"
  16797. },
  16798. "variant": {
  16799. "type": "string"
  16800. }
  16801. },
  16802. "required": ["id", "providerID", "variant"],
  16803. "additionalProperties": false
  16804. },
  16805. "snapshot": {
  16806. "type": "string"
  16807. }
  16808. },
  16809. "required": ["timestamp", "sessionID", "agent", "model"],
  16810. "additionalProperties": false
  16811. }
  16812. },
  16813. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16814. "additionalProperties": false
  16815. },
  16816. "SyncEventSessionNextStepEnded": {
  16817. "type": "object",
  16818. "properties": {
  16819. "type": {
  16820. "type": "string",
  16821. "enum": ["sync"]
  16822. },
  16823. "name": {
  16824. "type": "string",
  16825. "enum": ["session.next.step.ended.1"]
  16826. },
  16827. "id": {
  16828. "type": "string"
  16829. },
  16830. "seq": {
  16831. "type": "number"
  16832. },
  16833. "aggregateID": {
  16834. "type": "string",
  16835. "enum": ["sessionID"]
  16836. },
  16837. "data": {
  16838. "type": "object",
  16839. "properties": {
  16840. "timestamp": {
  16841. "type": "number"
  16842. },
  16843. "sessionID": {
  16844. "type": "string",
  16845. "pattern": "^ses"
  16846. },
  16847. "finish": {
  16848. "type": "string"
  16849. },
  16850. "cost": {
  16851. "type": "number"
  16852. },
  16853. "tokens": {
  16854. "type": "object",
  16855. "properties": {
  16856. "input": {
  16857. "type": "number"
  16858. },
  16859. "output": {
  16860. "type": "number"
  16861. },
  16862. "reasoning": {
  16863. "type": "number"
  16864. },
  16865. "cache": {
  16866. "type": "object",
  16867. "properties": {
  16868. "read": {
  16869. "type": "number"
  16870. },
  16871. "write": {
  16872. "type": "number"
  16873. }
  16874. },
  16875. "required": ["read", "write"],
  16876. "additionalProperties": false
  16877. }
  16878. },
  16879. "required": ["input", "output", "reasoning", "cache"],
  16880. "additionalProperties": false
  16881. },
  16882. "snapshot": {
  16883. "type": "string"
  16884. }
  16885. },
  16886. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  16887. "additionalProperties": false
  16888. }
  16889. },
  16890. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16891. "additionalProperties": false
  16892. },
  16893. "SyncEventSessionNextStepFailed": {
  16894. "type": "object",
  16895. "properties": {
  16896. "type": {
  16897. "type": "string",
  16898. "enum": ["sync"]
  16899. },
  16900. "name": {
  16901. "type": "string",
  16902. "enum": ["session.next.step.failed.1"]
  16903. },
  16904. "id": {
  16905. "type": "string"
  16906. },
  16907. "seq": {
  16908. "type": "number"
  16909. },
  16910. "aggregateID": {
  16911. "type": "string",
  16912. "enum": ["sessionID"]
  16913. },
  16914. "data": {
  16915. "type": "object",
  16916. "properties": {
  16917. "timestamp": {
  16918. "type": "number"
  16919. },
  16920. "sessionID": {
  16921. "type": "string",
  16922. "pattern": "^ses"
  16923. },
  16924. "error": {
  16925. "$ref": "#/components/schemas/SessionErrorUnknown"
  16926. }
  16927. },
  16928. "required": ["timestamp", "sessionID", "error"],
  16929. "additionalProperties": false
  16930. }
  16931. },
  16932. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16933. "additionalProperties": false
  16934. },
  16935. "SyncEventSessionNextTextStarted": {
  16936. "type": "object",
  16937. "properties": {
  16938. "type": {
  16939. "type": "string",
  16940. "enum": ["sync"]
  16941. },
  16942. "name": {
  16943. "type": "string",
  16944. "enum": ["session.next.text.started.1"]
  16945. },
  16946. "id": {
  16947. "type": "string"
  16948. },
  16949. "seq": {
  16950. "type": "number"
  16951. },
  16952. "aggregateID": {
  16953. "type": "string",
  16954. "enum": ["sessionID"]
  16955. },
  16956. "data": {
  16957. "type": "object",
  16958. "properties": {
  16959. "timestamp": {
  16960. "type": "number"
  16961. },
  16962. "sessionID": {
  16963. "type": "string",
  16964. "pattern": "^ses"
  16965. }
  16966. },
  16967. "required": ["timestamp", "sessionID"],
  16968. "additionalProperties": false
  16969. }
  16970. },
  16971. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16972. "additionalProperties": false
  16973. },
  16974. "SyncEventSessionNextTextDelta": {
  16975. "type": "object",
  16976. "properties": {
  16977. "type": {
  16978. "type": "string",
  16979. "enum": ["sync"]
  16980. },
  16981. "name": {
  16982. "type": "string",
  16983. "enum": ["session.next.text.delta.1"]
  16984. },
  16985. "id": {
  16986. "type": "string"
  16987. },
  16988. "seq": {
  16989. "type": "number"
  16990. },
  16991. "aggregateID": {
  16992. "type": "string",
  16993. "enum": ["sessionID"]
  16994. },
  16995. "data": {
  16996. "type": "object",
  16997. "properties": {
  16998. "timestamp": {
  16999. "type": "number"
  17000. },
  17001. "sessionID": {
  17002. "type": "string",
  17003. "pattern": "^ses"
  17004. },
  17005. "delta": {
  17006. "type": "string"
  17007. }
  17008. },
  17009. "required": ["timestamp", "sessionID", "delta"],
  17010. "additionalProperties": false
  17011. }
  17012. },
  17013. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17014. "additionalProperties": false
  17015. },
  17016. "SyncEventSessionNextTextEnded": {
  17017. "type": "object",
  17018. "properties": {
  17019. "type": {
  17020. "type": "string",
  17021. "enum": ["sync"]
  17022. },
  17023. "name": {
  17024. "type": "string",
  17025. "enum": ["session.next.text.ended.1"]
  17026. },
  17027. "id": {
  17028. "type": "string"
  17029. },
  17030. "seq": {
  17031. "type": "number"
  17032. },
  17033. "aggregateID": {
  17034. "type": "string",
  17035. "enum": ["sessionID"]
  17036. },
  17037. "data": {
  17038. "type": "object",
  17039. "properties": {
  17040. "timestamp": {
  17041. "type": "number"
  17042. },
  17043. "sessionID": {
  17044. "type": "string",
  17045. "pattern": "^ses"
  17046. },
  17047. "text": {
  17048. "type": "string"
  17049. }
  17050. },
  17051. "required": ["timestamp", "sessionID", "text"],
  17052. "additionalProperties": false
  17053. }
  17054. },
  17055. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17056. "additionalProperties": false
  17057. },
  17058. "SyncEventSessionNextReasoningStarted": {
  17059. "type": "object",
  17060. "properties": {
  17061. "type": {
  17062. "type": "string",
  17063. "enum": ["sync"]
  17064. },
  17065. "name": {
  17066. "type": "string",
  17067. "enum": ["session.next.reasoning.started.1"]
  17068. },
  17069. "id": {
  17070. "type": "string"
  17071. },
  17072. "seq": {
  17073. "type": "number"
  17074. },
  17075. "aggregateID": {
  17076. "type": "string",
  17077. "enum": ["sessionID"]
  17078. },
  17079. "data": {
  17080. "type": "object",
  17081. "properties": {
  17082. "timestamp": {
  17083. "type": "number"
  17084. },
  17085. "sessionID": {
  17086. "type": "string",
  17087. "pattern": "^ses"
  17088. },
  17089. "reasoningID": {
  17090. "type": "string"
  17091. }
  17092. },
  17093. "required": ["timestamp", "sessionID", "reasoningID"],
  17094. "additionalProperties": false
  17095. }
  17096. },
  17097. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17098. "additionalProperties": false
  17099. },
  17100. "SyncEventSessionNextReasoningDelta": {
  17101. "type": "object",
  17102. "properties": {
  17103. "type": {
  17104. "type": "string",
  17105. "enum": ["sync"]
  17106. },
  17107. "name": {
  17108. "type": "string",
  17109. "enum": ["session.next.reasoning.delta.1"]
  17110. },
  17111. "id": {
  17112. "type": "string"
  17113. },
  17114. "seq": {
  17115. "type": "number"
  17116. },
  17117. "aggregateID": {
  17118. "type": "string",
  17119. "enum": ["sessionID"]
  17120. },
  17121. "data": {
  17122. "type": "object",
  17123. "properties": {
  17124. "timestamp": {
  17125. "type": "number"
  17126. },
  17127. "sessionID": {
  17128. "type": "string",
  17129. "pattern": "^ses"
  17130. },
  17131. "reasoningID": {
  17132. "type": "string"
  17133. },
  17134. "delta": {
  17135. "type": "string"
  17136. }
  17137. },
  17138. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17139. "additionalProperties": false
  17140. }
  17141. },
  17142. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17143. "additionalProperties": false
  17144. },
  17145. "SyncEventSessionNextReasoningEnded": {
  17146. "type": "object",
  17147. "properties": {
  17148. "type": {
  17149. "type": "string",
  17150. "enum": ["sync"]
  17151. },
  17152. "name": {
  17153. "type": "string",
  17154. "enum": ["session.next.reasoning.ended.1"]
  17155. },
  17156. "id": {
  17157. "type": "string"
  17158. },
  17159. "seq": {
  17160. "type": "number"
  17161. },
  17162. "aggregateID": {
  17163. "type": "string",
  17164. "enum": ["sessionID"]
  17165. },
  17166. "data": {
  17167. "type": "object",
  17168. "properties": {
  17169. "timestamp": {
  17170. "type": "number"
  17171. },
  17172. "sessionID": {
  17173. "type": "string",
  17174. "pattern": "^ses"
  17175. },
  17176. "reasoningID": {
  17177. "type": "string"
  17178. },
  17179. "text": {
  17180. "type": "string"
  17181. }
  17182. },
  17183. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17184. "additionalProperties": false
  17185. }
  17186. },
  17187. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17188. "additionalProperties": false
  17189. },
  17190. "SyncEventSessionNextToolInputStarted": {
  17191. "type": "object",
  17192. "properties": {
  17193. "type": {
  17194. "type": "string",
  17195. "enum": ["sync"]
  17196. },
  17197. "name": {
  17198. "type": "string",
  17199. "enum": ["session.next.tool.input.started.1"]
  17200. },
  17201. "id": {
  17202. "type": "string"
  17203. },
  17204. "seq": {
  17205. "type": "number"
  17206. },
  17207. "aggregateID": {
  17208. "type": "string",
  17209. "enum": ["sessionID"]
  17210. },
  17211. "data": {
  17212. "type": "object",
  17213. "properties": {
  17214. "timestamp": {
  17215. "type": "number"
  17216. },
  17217. "sessionID": {
  17218. "type": "string",
  17219. "pattern": "^ses"
  17220. },
  17221. "callID": {
  17222. "type": "string"
  17223. },
  17224. "name": {
  17225. "type": "string"
  17226. }
  17227. },
  17228. "required": ["timestamp", "sessionID", "callID", "name"],
  17229. "additionalProperties": false
  17230. }
  17231. },
  17232. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17233. "additionalProperties": false
  17234. },
  17235. "SyncEventSessionNextToolInputDelta": {
  17236. "type": "object",
  17237. "properties": {
  17238. "type": {
  17239. "type": "string",
  17240. "enum": ["sync"]
  17241. },
  17242. "name": {
  17243. "type": "string",
  17244. "enum": ["session.next.tool.input.delta.1"]
  17245. },
  17246. "id": {
  17247. "type": "string"
  17248. },
  17249. "seq": {
  17250. "type": "number"
  17251. },
  17252. "aggregateID": {
  17253. "type": "string",
  17254. "enum": ["sessionID"]
  17255. },
  17256. "data": {
  17257. "type": "object",
  17258. "properties": {
  17259. "timestamp": {
  17260. "type": "number"
  17261. },
  17262. "sessionID": {
  17263. "type": "string",
  17264. "pattern": "^ses"
  17265. },
  17266. "callID": {
  17267. "type": "string"
  17268. },
  17269. "delta": {
  17270. "type": "string"
  17271. }
  17272. },
  17273. "required": ["timestamp", "sessionID", "callID", "delta"],
  17274. "additionalProperties": false
  17275. }
  17276. },
  17277. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17278. "additionalProperties": false
  17279. },
  17280. "SyncEventSessionNextToolInputEnded": {
  17281. "type": "object",
  17282. "properties": {
  17283. "type": {
  17284. "type": "string",
  17285. "enum": ["sync"]
  17286. },
  17287. "name": {
  17288. "type": "string",
  17289. "enum": ["session.next.tool.input.ended.1"]
  17290. },
  17291. "id": {
  17292. "type": "string"
  17293. },
  17294. "seq": {
  17295. "type": "number"
  17296. },
  17297. "aggregateID": {
  17298. "type": "string",
  17299. "enum": ["sessionID"]
  17300. },
  17301. "data": {
  17302. "type": "object",
  17303. "properties": {
  17304. "timestamp": {
  17305. "type": "number"
  17306. },
  17307. "sessionID": {
  17308. "type": "string",
  17309. "pattern": "^ses"
  17310. },
  17311. "callID": {
  17312. "type": "string"
  17313. },
  17314. "text": {
  17315. "type": "string"
  17316. }
  17317. },
  17318. "required": ["timestamp", "sessionID", "callID", "text"],
  17319. "additionalProperties": false
  17320. }
  17321. },
  17322. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17323. "additionalProperties": false
  17324. },
  17325. "SyncEventSessionNextToolCalled": {
  17326. "type": "object",
  17327. "properties": {
  17328. "type": {
  17329. "type": "string",
  17330. "enum": ["sync"]
  17331. },
  17332. "name": {
  17333. "type": "string",
  17334. "enum": ["session.next.tool.called.1"]
  17335. },
  17336. "id": {
  17337. "type": "string"
  17338. },
  17339. "seq": {
  17340. "type": "number"
  17341. },
  17342. "aggregateID": {
  17343. "type": "string",
  17344. "enum": ["sessionID"]
  17345. },
  17346. "data": {
  17347. "type": "object",
  17348. "properties": {
  17349. "timestamp": {
  17350. "type": "number"
  17351. },
  17352. "sessionID": {
  17353. "type": "string",
  17354. "pattern": "^ses"
  17355. },
  17356. "callID": {
  17357. "type": "string"
  17358. },
  17359. "tool": {
  17360. "type": "string"
  17361. },
  17362. "input": {
  17363. "type": "object"
  17364. },
  17365. "provider": {
  17366. "type": "object",
  17367. "properties": {
  17368. "executed": {
  17369. "type": "boolean"
  17370. },
  17371. "metadata": {
  17372. "type": "object"
  17373. }
  17374. },
  17375. "required": ["executed"],
  17376. "additionalProperties": false
  17377. }
  17378. },
  17379. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17380. "additionalProperties": false
  17381. }
  17382. },
  17383. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17384. "additionalProperties": false
  17385. },
  17386. "SyncEventSessionNextToolProgress": {
  17387. "type": "object",
  17388. "properties": {
  17389. "type": {
  17390. "type": "string",
  17391. "enum": ["sync"]
  17392. },
  17393. "name": {
  17394. "type": "string",
  17395. "enum": ["session.next.tool.progress.1"]
  17396. },
  17397. "id": {
  17398. "type": "string"
  17399. },
  17400. "seq": {
  17401. "type": "number"
  17402. },
  17403. "aggregateID": {
  17404. "type": "string",
  17405. "enum": ["sessionID"]
  17406. },
  17407. "data": {
  17408. "type": "object",
  17409. "properties": {
  17410. "timestamp": {
  17411. "type": "number"
  17412. },
  17413. "sessionID": {
  17414. "type": "string",
  17415. "pattern": "^ses"
  17416. },
  17417. "callID": {
  17418. "type": "string"
  17419. },
  17420. "structured": {
  17421. "type": "object"
  17422. },
  17423. "content": {
  17424. "type": "array",
  17425. "items": {
  17426. "anyOf": [
  17427. {
  17428. "$ref": "#/components/schemas/ToolTextContent"
  17429. },
  17430. {
  17431. "$ref": "#/components/schemas/ToolFileContent"
  17432. }
  17433. ]
  17434. }
  17435. }
  17436. },
  17437. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17438. "additionalProperties": false
  17439. }
  17440. },
  17441. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17442. "additionalProperties": false
  17443. },
  17444. "SyncEventSessionNextToolSuccess": {
  17445. "type": "object",
  17446. "properties": {
  17447. "type": {
  17448. "type": "string",
  17449. "enum": ["sync"]
  17450. },
  17451. "name": {
  17452. "type": "string",
  17453. "enum": ["session.next.tool.success.1"]
  17454. },
  17455. "id": {
  17456. "type": "string"
  17457. },
  17458. "seq": {
  17459. "type": "number"
  17460. },
  17461. "aggregateID": {
  17462. "type": "string",
  17463. "enum": ["sessionID"]
  17464. },
  17465. "data": {
  17466. "type": "object",
  17467. "properties": {
  17468. "timestamp": {
  17469. "type": "number"
  17470. },
  17471. "sessionID": {
  17472. "type": "string",
  17473. "pattern": "^ses"
  17474. },
  17475. "callID": {
  17476. "type": "string"
  17477. },
  17478. "structured": {
  17479. "type": "object"
  17480. },
  17481. "content": {
  17482. "type": "array",
  17483. "items": {
  17484. "anyOf": [
  17485. {
  17486. "$ref": "#/components/schemas/ToolTextContent"
  17487. },
  17488. {
  17489. "$ref": "#/components/schemas/ToolFileContent"
  17490. }
  17491. ]
  17492. }
  17493. },
  17494. "provider": {
  17495. "type": "object",
  17496. "properties": {
  17497. "executed": {
  17498. "type": "boolean"
  17499. },
  17500. "metadata": {
  17501. "type": "object"
  17502. }
  17503. },
  17504. "required": ["executed"],
  17505. "additionalProperties": false
  17506. }
  17507. },
  17508. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17509. "additionalProperties": false
  17510. }
  17511. },
  17512. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17513. "additionalProperties": false
  17514. },
  17515. "SyncEventSessionNextToolFailed": {
  17516. "type": "object",
  17517. "properties": {
  17518. "type": {
  17519. "type": "string",
  17520. "enum": ["sync"]
  17521. },
  17522. "name": {
  17523. "type": "string",
  17524. "enum": ["session.next.tool.failed.1"]
  17525. },
  17526. "id": {
  17527. "type": "string"
  17528. },
  17529. "seq": {
  17530. "type": "number"
  17531. },
  17532. "aggregateID": {
  17533. "type": "string",
  17534. "enum": ["sessionID"]
  17535. },
  17536. "data": {
  17537. "type": "object",
  17538. "properties": {
  17539. "timestamp": {
  17540. "type": "number"
  17541. },
  17542. "sessionID": {
  17543. "type": "string",
  17544. "pattern": "^ses"
  17545. },
  17546. "callID": {
  17547. "type": "string"
  17548. },
  17549. "error": {
  17550. "$ref": "#/components/schemas/SessionErrorUnknown"
  17551. },
  17552. "provider": {
  17553. "type": "object",
  17554. "properties": {
  17555. "executed": {
  17556. "type": "boolean"
  17557. },
  17558. "metadata": {
  17559. "type": "object"
  17560. }
  17561. },
  17562. "required": ["executed"],
  17563. "additionalProperties": false
  17564. }
  17565. },
  17566. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17567. "additionalProperties": false
  17568. }
  17569. },
  17570. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17571. "additionalProperties": false
  17572. },
  17573. "SyncEventSessionNextRetried": {
  17574. "type": "object",
  17575. "properties": {
  17576. "type": {
  17577. "type": "string",
  17578. "enum": ["sync"]
  17579. },
  17580. "name": {
  17581. "type": "string",
  17582. "enum": ["session.next.retried.1"]
  17583. },
  17584. "id": {
  17585. "type": "string"
  17586. },
  17587. "seq": {
  17588. "type": "number"
  17589. },
  17590. "aggregateID": {
  17591. "type": "string",
  17592. "enum": ["sessionID"]
  17593. },
  17594. "data": {
  17595. "type": "object",
  17596. "properties": {
  17597. "timestamp": {
  17598. "type": "number"
  17599. },
  17600. "sessionID": {
  17601. "type": "string",
  17602. "pattern": "^ses"
  17603. },
  17604. "attempt": {
  17605. "type": "number"
  17606. },
  17607. "error": {
  17608. "$ref": "#/components/schemas/SessionNextRetry_error"
  17609. }
  17610. },
  17611. "required": ["timestamp", "sessionID", "attempt", "error"],
  17612. "additionalProperties": false
  17613. }
  17614. },
  17615. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17616. "additionalProperties": false
  17617. },
  17618. "SyncEventSessionNextCompactionStarted": {
  17619. "type": "object",
  17620. "properties": {
  17621. "type": {
  17622. "type": "string",
  17623. "enum": ["sync"]
  17624. },
  17625. "name": {
  17626. "type": "string",
  17627. "enum": ["session.next.compaction.started.1"]
  17628. },
  17629. "id": {
  17630. "type": "string"
  17631. },
  17632. "seq": {
  17633. "type": "number"
  17634. },
  17635. "aggregateID": {
  17636. "type": "string",
  17637. "enum": ["sessionID"]
  17638. },
  17639. "data": {
  17640. "type": "object",
  17641. "properties": {
  17642. "timestamp": {
  17643. "type": "number"
  17644. },
  17645. "sessionID": {
  17646. "type": "string",
  17647. "pattern": "^ses"
  17648. },
  17649. "reason": {
  17650. "type": "string",
  17651. "enum": ["auto", "manual"]
  17652. }
  17653. },
  17654. "required": ["timestamp", "sessionID", "reason"],
  17655. "additionalProperties": false
  17656. }
  17657. },
  17658. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17659. "additionalProperties": false
  17660. },
  17661. "SyncEventSessionNextCompactionDelta": {
  17662. "type": "object",
  17663. "properties": {
  17664. "type": {
  17665. "type": "string",
  17666. "enum": ["sync"]
  17667. },
  17668. "name": {
  17669. "type": "string",
  17670. "enum": ["session.next.compaction.delta.1"]
  17671. },
  17672. "id": {
  17673. "type": "string"
  17674. },
  17675. "seq": {
  17676. "type": "number"
  17677. },
  17678. "aggregateID": {
  17679. "type": "string",
  17680. "enum": ["sessionID"]
  17681. },
  17682. "data": {
  17683. "type": "object",
  17684. "properties": {
  17685. "timestamp": {
  17686. "type": "number"
  17687. },
  17688. "sessionID": {
  17689. "type": "string",
  17690. "pattern": "^ses"
  17691. },
  17692. "text": {
  17693. "type": "string"
  17694. }
  17695. },
  17696. "required": ["timestamp", "sessionID", "text"],
  17697. "additionalProperties": false
  17698. }
  17699. },
  17700. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17701. "additionalProperties": false
  17702. },
  17703. "SyncEventSessionNextCompactionEnded": {
  17704. "type": "object",
  17705. "properties": {
  17706. "type": {
  17707. "type": "string",
  17708. "enum": ["sync"]
  17709. },
  17710. "name": {
  17711. "type": "string",
  17712. "enum": ["session.next.compaction.ended.1"]
  17713. },
  17714. "id": {
  17715. "type": "string"
  17716. },
  17717. "seq": {
  17718. "type": "number"
  17719. },
  17720. "aggregateID": {
  17721. "type": "string",
  17722. "enum": ["sessionID"]
  17723. },
  17724. "data": {
  17725. "type": "object",
  17726. "properties": {
  17727. "timestamp": {
  17728. "type": "number"
  17729. },
  17730. "sessionID": {
  17731. "type": "string",
  17732. "pattern": "^ses"
  17733. },
  17734. "text": {
  17735. "type": "string"
  17736. },
  17737. "include": {
  17738. "type": "string"
  17739. }
  17740. },
  17741. "required": ["timestamp", "sessionID", "text"],
  17742. "additionalProperties": false
  17743. }
  17744. },
  17745. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17746. "additionalProperties": false
  17747. },
  17748. "EventServerConnected": {
  17749. "type": "object",
  17750. "properties": {
  17751. "id": {
  17752. "type": "string"
  17753. },
  17754. "type": {
  17755. "type": "string",
  17756. "enum": ["server.connected"]
  17757. },
  17758. "properties": {
  17759. "type": "object",
  17760. "properties": {}
  17761. }
  17762. },
  17763. "required": ["id", "type", "properties"],
  17764. "additionalProperties": false
  17765. },
  17766. "EventGlobalDisposed": {
  17767. "type": "object",
  17768. "properties": {
  17769. "id": {
  17770. "type": "string"
  17771. },
  17772. "type": {
  17773. "type": "string",
  17774. "enum": ["global.disposed"]
  17775. },
  17776. "properties": {
  17777. "type": "object",
  17778. "properties": {}
  17779. }
  17780. },
  17781. "required": ["id", "type", "properties"],
  17782. "additionalProperties": false
  17783. },
  17784. "EventServerInstanceDisposed": {
  17785. "type": "object",
  17786. "properties": {
  17787. "id": {
  17788. "type": "string"
  17789. },
  17790. "type": {
  17791. "type": "string",
  17792. "enum": ["server.instance.disposed"]
  17793. },
  17794. "properties": {
  17795. "type": "object",
  17796. "properties": {
  17797. "directory": {
  17798. "type": "string"
  17799. }
  17800. },
  17801. "required": ["directory"],
  17802. "additionalProperties": false
  17803. }
  17804. },
  17805. "required": ["id", "type", "properties"],
  17806. "additionalProperties": false
  17807. },
  17808. "EventFileEdited": {
  17809. "type": "object",
  17810. "properties": {
  17811. "id": {
  17812. "type": "string"
  17813. },
  17814. "type": {
  17815. "type": "string",
  17816. "enum": ["file.edited"]
  17817. },
  17818. "properties": {
  17819. "type": "object",
  17820. "properties": {
  17821. "file": {
  17822. "type": "string"
  17823. }
  17824. },
  17825. "required": ["file"],
  17826. "additionalProperties": false
  17827. }
  17828. },
  17829. "required": ["id", "type", "properties"],
  17830. "additionalProperties": false
  17831. },
  17832. "EventFileWatcherUpdated": {
  17833. "type": "object",
  17834. "properties": {
  17835. "id": {
  17836. "type": "string"
  17837. },
  17838. "type": {
  17839. "type": "string",
  17840. "enum": ["file.watcher.updated"]
  17841. },
  17842. "properties": {
  17843. "type": "object",
  17844. "properties": {
  17845. "file": {
  17846. "type": "string"
  17847. },
  17848. "event": {
  17849. "type": "string",
  17850. "enum": ["add", "change", "unlink"]
  17851. }
  17852. },
  17853. "required": ["file", "event"],
  17854. "additionalProperties": false
  17855. }
  17856. },
  17857. "required": ["id", "type", "properties"],
  17858. "additionalProperties": false
  17859. },
  17860. "EventLspClientDiagnostics": {
  17861. "type": "object",
  17862. "properties": {
  17863. "id": {
  17864. "type": "string"
  17865. },
  17866. "type": {
  17867. "type": "string",
  17868. "enum": ["lsp.client.diagnostics"]
  17869. },
  17870. "properties": {
  17871. "type": "object",
  17872. "properties": {
  17873. "serverID": {
  17874. "type": "string"
  17875. },
  17876. "path": {
  17877. "type": "string"
  17878. }
  17879. },
  17880. "required": ["serverID", "path"],
  17881. "additionalProperties": false
  17882. }
  17883. },
  17884. "required": ["id", "type", "properties"],
  17885. "additionalProperties": false
  17886. },
  17887. "EventLspUpdated": {
  17888. "type": "object",
  17889. "properties": {
  17890. "id": {
  17891. "type": "string"
  17892. },
  17893. "type": {
  17894. "type": "string",
  17895. "enum": ["lsp.updated"]
  17896. },
  17897. "properties": {
  17898. "type": "object",
  17899. "properties": {}
  17900. }
  17901. },
  17902. "required": ["id", "type", "properties"],
  17903. "additionalProperties": false
  17904. },
  17905. "EventMessagePartDelta": {
  17906. "type": "object",
  17907. "properties": {
  17908. "id": {
  17909. "type": "string"
  17910. },
  17911. "type": {
  17912. "type": "string",
  17913. "enum": ["message.part.delta"]
  17914. },
  17915. "properties": {
  17916. "type": "object",
  17917. "properties": {
  17918. "sessionID": {
  17919. "type": "string",
  17920. "pattern": "^ses"
  17921. },
  17922. "messageID": {
  17923. "type": "string",
  17924. "pattern": "^msg"
  17925. },
  17926. "partID": {
  17927. "type": "string",
  17928. "pattern": "^prt"
  17929. },
  17930. "field": {
  17931. "type": "string"
  17932. },
  17933. "delta": {
  17934. "type": "string"
  17935. }
  17936. },
  17937. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  17938. "additionalProperties": false
  17939. }
  17940. },
  17941. "required": ["id", "type", "properties"],
  17942. "additionalProperties": false
  17943. },
  17944. "EventPermissionAsked": {
  17945. "type": "object",
  17946. "properties": {
  17947. "id": {
  17948. "type": "string"
  17949. },
  17950. "type": {
  17951. "type": "string",
  17952. "enum": ["permission.asked"]
  17953. },
  17954. "properties": {
  17955. "$ref": "#/components/schemas/PermissionRequest"
  17956. }
  17957. },
  17958. "required": ["id", "type", "properties"],
  17959. "additionalProperties": false
  17960. },
  17961. "EventPermissionReplied": {
  17962. "type": "object",
  17963. "properties": {
  17964. "id": {
  17965. "type": "string"
  17966. },
  17967. "type": {
  17968. "type": "string",
  17969. "enum": ["permission.replied"]
  17970. },
  17971. "properties": {
  17972. "type": "object",
  17973. "properties": {
  17974. "sessionID": {
  17975. "type": "string",
  17976. "pattern": "^ses"
  17977. },
  17978. "requestID": {
  17979. "type": "string",
  17980. "pattern": "^per"
  17981. },
  17982. "reply": {
  17983. "type": "string",
  17984. "enum": ["once", "always", "reject"]
  17985. }
  17986. },
  17987. "required": ["sessionID", "requestID", "reply"],
  17988. "additionalProperties": false
  17989. }
  17990. },
  17991. "required": ["id", "type", "properties"],
  17992. "additionalProperties": false
  17993. },
  17994. "EventSessionDiff": {
  17995. "type": "object",
  17996. "properties": {
  17997. "id": {
  17998. "type": "string"
  17999. },
  18000. "type": {
  18001. "type": "string",
  18002. "enum": ["session.diff"]
  18003. },
  18004. "properties": {
  18005. "type": "object",
  18006. "properties": {
  18007. "sessionID": {
  18008. "type": "string",
  18009. "pattern": "^ses"
  18010. },
  18011. "diff": {
  18012. "type": "array",
  18013. "items": {
  18014. "$ref": "#/components/schemas/SnapshotFileDiff"
  18015. }
  18016. }
  18017. },
  18018. "required": ["sessionID", "diff"],
  18019. "additionalProperties": false
  18020. }
  18021. },
  18022. "required": ["id", "type", "properties"],
  18023. "additionalProperties": false
  18024. },
  18025. "EventSessionError": {
  18026. "type": "object",
  18027. "properties": {
  18028. "id": {
  18029. "type": "string"
  18030. },
  18031. "type": {
  18032. "type": "string",
  18033. "enum": ["session.error"]
  18034. },
  18035. "properties": {
  18036. "type": "object",
  18037. "properties": {
  18038. "sessionID": {
  18039. "type": "string",
  18040. "pattern": "^ses"
  18041. },
  18042. "error": {
  18043. "anyOf": [
  18044. {
  18045. "$ref": "#/components/schemas/ProviderAuthError"
  18046. },
  18047. {
  18048. "$ref": "#/components/schemas/UnknownError"
  18049. },
  18050. {
  18051. "$ref": "#/components/schemas/MessageOutputLengthError"
  18052. },
  18053. {
  18054. "$ref": "#/components/schemas/MessageAbortedError"
  18055. },
  18056. {
  18057. "$ref": "#/components/schemas/StructuredOutputError"
  18058. },
  18059. {
  18060. "$ref": "#/components/schemas/ContextOverflowError"
  18061. },
  18062. {
  18063. "$ref": "#/components/schemas/APIError"
  18064. }
  18065. ]
  18066. }
  18067. },
  18068. "additionalProperties": false
  18069. }
  18070. },
  18071. "required": ["id", "type", "properties"],
  18072. "additionalProperties": false
  18073. },
  18074. "EventQuestionAsked": {
  18075. "type": "object",
  18076. "properties": {
  18077. "id": {
  18078. "type": "string"
  18079. },
  18080. "type": {
  18081. "type": "string",
  18082. "enum": ["question.asked"]
  18083. },
  18084. "properties": {
  18085. "$ref": "#/components/schemas/QuestionRequest"
  18086. }
  18087. },
  18088. "required": ["id", "type", "properties"],
  18089. "additionalProperties": false
  18090. },
  18091. "EventQuestionReplied": {
  18092. "type": "object",
  18093. "properties": {
  18094. "id": {
  18095. "type": "string"
  18096. },
  18097. "type": {
  18098. "type": "string",
  18099. "enum": ["question.replied"]
  18100. },
  18101. "properties": {
  18102. "$ref": "#/components/schemas/QuestionReplied"
  18103. }
  18104. },
  18105. "required": ["id", "type", "properties"],
  18106. "additionalProperties": false
  18107. },
  18108. "EventQuestionRejected": {
  18109. "type": "object",
  18110. "properties": {
  18111. "id": {
  18112. "type": "string"
  18113. },
  18114. "type": {
  18115. "type": "string",
  18116. "enum": ["question.rejected"]
  18117. },
  18118. "properties": {
  18119. "$ref": "#/components/schemas/QuestionRejected"
  18120. }
  18121. },
  18122. "required": ["id", "type", "properties"],
  18123. "additionalProperties": false
  18124. },
  18125. "EventTodoUpdated": {
  18126. "type": "object",
  18127. "properties": {
  18128. "id": {
  18129. "type": "string"
  18130. },
  18131. "type": {
  18132. "type": "string",
  18133. "enum": ["todo.updated"]
  18134. },
  18135. "properties": {
  18136. "type": "object",
  18137. "properties": {
  18138. "sessionID": {
  18139. "type": "string",
  18140. "pattern": "^ses"
  18141. },
  18142. "todos": {
  18143. "type": "array",
  18144. "items": {
  18145. "$ref": "#/components/schemas/Todo"
  18146. }
  18147. }
  18148. },
  18149. "required": ["sessionID", "todos"],
  18150. "additionalProperties": false
  18151. }
  18152. },
  18153. "required": ["id", "type", "properties"],
  18154. "additionalProperties": false
  18155. },
  18156. "EventSessionStatus": {
  18157. "type": "object",
  18158. "properties": {
  18159. "id": {
  18160. "type": "string"
  18161. },
  18162. "type": {
  18163. "type": "string",
  18164. "enum": ["session.status"]
  18165. },
  18166. "properties": {
  18167. "type": "object",
  18168. "properties": {
  18169. "sessionID": {
  18170. "type": "string",
  18171. "pattern": "^ses"
  18172. },
  18173. "status": {
  18174. "$ref": "#/components/schemas/SessionStatus"
  18175. }
  18176. },
  18177. "required": ["sessionID", "status"],
  18178. "additionalProperties": false
  18179. }
  18180. },
  18181. "required": ["id", "type", "properties"],
  18182. "additionalProperties": false
  18183. },
  18184. "EventSessionIdle": {
  18185. "type": "object",
  18186. "properties": {
  18187. "id": {
  18188. "type": "string"
  18189. },
  18190. "type": {
  18191. "type": "string",
  18192. "enum": ["session.idle"]
  18193. },
  18194. "properties": {
  18195. "type": "object",
  18196. "properties": {
  18197. "sessionID": {
  18198. "type": "string",
  18199. "pattern": "^ses"
  18200. }
  18201. },
  18202. "required": ["sessionID"],
  18203. "additionalProperties": false
  18204. }
  18205. },
  18206. "required": ["id", "type", "properties"],
  18207. "additionalProperties": false
  18208. },
  18209. "EventMcpToolsChanged": {
  18210. "type": "object",
  18211. "properties": {
  18212. "id": {
  18213. "type": "string"
  18214. },
  18215. "type": {
  18216. "type": "string",
  18217. "enum": ["mcp.tools.changed"]
  18218. },
  18219. "properties": {
  18220. "type": "object",
  18221. "properties": {
  18222. "server": {
  18223. "type": "string"
  18224. }
  18225. },
  18226. "required": ["server"],
  18227. "additionalProperties": false
  18228. }
  18229. },
  18230. "required": ["id", "type", "properties"],
  18231. "additionalProperties": false
  18232. },
  18233. "EventMcpBrowserOpenFailed": {
  18234. "type": "object",
  18235. "properties": {
  18236. "id": {
  18237. "type": "string"
  18238. },
  18239. "type": {
  18240. "type": "string",
  18241. "enum": ["mcp.browser.open.failed"]
  18242. },
  18243. "properties": {
  18244. "type": "object",
  18245. "properties": {
  18246. "mcpName": {
  18247. "type": "string"
  18248. },
  18249. "url": {
  18250. "type": "string"
  18251. }
  18252. },
  18253. "required": ["mcpName", "url"],
  18254. "additionalProperties": false
  18255. }
  18256. },
  18257. "required": ["id", "type", "properties"],
  18258. "additionalProperties": false
  18259. },
  18260. "EventCommandExecuted": {
  18261. "type": "object",
  18262. "properties": {
  18263. "id": {
  18264. "type": "string"
  18265. },
  18266. "type": {
  18267. "type": "string",
  18268. "enum": ["command.executed"]
  18269. },
  18270. "properties": {
  18271. "type": "object",
  18272. "properties": {
  18273. "name": {
  18274. "type": "string"
  18275. },
  18276. "sessionID": {
  18277. "type": "string",
  18278. "pattern": "^ses"
  18279. },
  18280. "arguments": {
  18281. "type": "string"
  18282. },
  18283. "messageID": {
  18284. "type": "string",
  18285. "pattern": "^msg"
  18286. }
  18287. },
  18288. "required": ["name", "sessionID", "arguments", "messageID"],
  18289. "additionalProperties": false
  18290. }
  18291. },
  18292. "required": ["id", "type", "properties"],
  18293. "additionalProperties": false
  18294. },
  18295. "EventProjectUpdated": {
  18296. "type": "object",
  18297. "properties": {
  18298. "id": {
  18299. "type": "string"
  18300. },
  18301. "type": {
  18302. "type": "string",
  18303. "enum": ["project.updated"]
  18304. },
  18305. "properties": {
  18306. "$ref": "#/components/schemas/Project"
  18307. }
  18308. },
  18309. "required": ["id", "type", "properties"],
  18310. "additionalProperties": false
  18311. },
  18312. "EventSessionCompacted": {
  18313. "type": "object",
  18314. "properties": {
  18315. "id": {
  18316. "type": "string"
  18317. },
  18318. "type": {
  18319. "type": "string",
  18320. "enum": ["session.compacted"]
  18321. },
  18322. "properties": {
  18323. "type": "object",
  18324. "properties": {
  18325. "sessionID": {
  18326. "type": "string",
  18327. "pattern": "^ses"
  18328. }
  18329. },
  18330. "required": ["sessionID"],
  18331. "additionalProperties": false
  18332. }
  18333. },
  18334. "required": ["id", "type", "properties"],
  18335. "additionalProperties": false
  18336. },
  18337. "EventVcsBranchUpdated": {
  18338. "type": "object",
  18339. "properties": {
  18340. "id": {
  18341. "type": "string"
  18342. },
  18343. "type": {
  18344. "type": "string",
  18345. "enum": ["vcs.branch.updated"]
  18346. },
  18347. "properties": {
  18348. "type": "object",
  18349. "properties": {
  18350. "branch": {
  18351. "type": "string"
  18352. }
  18353. },
  18354. "additionalProperties": false
  18355. }
  18356. },
  18357. "required": ["id", "type", "properties"],
  18358. "additionalProperties": false
  18359. },
  18360. "EventWorkspaceReady": {
  18361. "type": "object",
  18362. "properties": {
  18363. "id": {
  18364. "type": "string"
  18365. },
  18366. "type": {
  18367. "type": "string",
  18368. "enum": ["workspace.ready"]
  18369. },
  18370. "properties": {
  18371. "type": "object",
  18372. "properties": {
  18373. "name": {
  18374. "type": "string"
  18375. }
  18376. },
  18377. "required": ["name"],
  18378. "additionalProperties": false
  18379. }
  18380. },
  18381. "required": ["id", "type", "properties"],
  18382. "additionalProperties": false
  18383. },
  18384. "EventWorkspaceFailed": {
  18385. "type": "object",
  18386. "properties": {
  18387. "id": {
  18388. "type": "string"
  18389. },
  18390. "type": {
  18391. "type": "string",
  18392. "enum": ["workspace.failed"]
  18393. },
  18394. "properties": {
  18395. "type": "object",
  18396. "properties": {
  18397. "message": {
  18398. "type": "string"
  18399. }
  18400. },
  18401. "required": ["message"],
  18402. "additionalProperties": false
  18403. }
  18404. },
  18405. "required": ["id", "type", "properties"],
  18406. "additionalProperties": false
  18407. },
  18408. "EventWorkspaceStatus": {
  18409. "type": "object",
  18410. "properties": {
  18411. "id": {
  18412. "type": "string"
  18413. },
  18414. "type": {
  18415. "type": "string",
  18416. "enum": ["workspace.status"]
  18417. },
  18418. "properties": {
  18419. "type": "object",
  18420. "properties": {
  18421. "workspaceID": {
  18422. "type": "string",
  18423. "pattern": "^wrk"
  18424. },
  18425. "status": {
  18426. "type": "string",
  18427. "enum": ["connected", "connecting", "disconnected", "error"]
  18428. }
  18429. },
  18430. "required": ["workspaceID", "status"],
  18431. "additionalProperties": false
  18432. }
  18433. },
  18434. "required": ["id", "type", "properties"],
  18435. "additionalProperties": false
  18436. },
  18437. "EventWorktreeReady": {
  18438. "type": "object",
  18439. "properties": {
  18440. "id": {
  18441. "type": "string"
  18442. },
  18443. "type": {
  18444. "type": "string",
  18445. "enum": ["worktree.ready"]
  18446. },
  18447. "properties": {
  18448. "type": "object",
  18449. "properties": {
  18450. "name": {
  18451. "type": "string"
  18452. },
  18453. "branch": {
  18454. "type": "string"
  18455. }
  18456. },
  18457. "required": ["name"],
  18458. "additionalProperties": false
  18459. }
  18460. },
  18461. "required": ["id", "type", "properties"],
  18462. "additionalProperties": false
  18463. },
  18464. "EventWorktreeFailed": {
  18465. "type": "object",
  18466. "properties": {
  18467. "id": {
  18468. "type": "string"
  18469. },
  18470. "type": {
  18471. "type": "string",
  18472. "enum": ["worktree.failed"]
  18473. },
  18474. "properties": {
  18475. "type": "object",
  18476. "properties": {
  18477. "message": {
  18478. "type": "string"
  18479. }
  18480. },
  18481. "required": ["message"],
  18482. "additionalProperties": false
  18483. }
  18484. },
  18485. "required": ["id", "type", "properties"],
  18486. "additionalProperties": false
  18487. },
  18488. "EventPtyCreated": {
  18489. "type": "object",
  18490. "properties": {
  18491. "id": {
  18492. "type": "string"
  18493. },
  18494. "type": {
  18495. "type": "string",
  18496. "enum": ["pty.created"]
  18497. },
  18498. "properties": {
  18499. "type": "object",
  18500. "properties": {
  18501. "info": {
  18502. "$ref": "#/components/schemas/Pty"
  18503. }
  18504. },
  18505. "required": ["info"],
  18506. "additionalProperties": false
  18507. }
  18508. },
  18509. "required": ["id", "type", "properties"],
  18510. "additionalProperties": false
  18511. },
  18512. "EventPtyUpdated": {
  18513. "type": "object",
  18514. "properties": {
  18515. "id": {
  18516. "type": "string"
  18517. },
  18518. "type": {
  18519. "type": "string",
  18520. "enum": ["pty.updated"]
  18521. },
  18522. "properties": {
  18523. "type": "object",
  18524. "properties": {
  18525. "info": {
  18526. "$ref": "#/components/schemas/Pty"
  18527. }
  18528. },
  18529. "required": ["info"],
  18530. "additionalProperties": false
  18531. }
  18532. },
  18533. "required": ["id", "type", "properties"],
  18534. "additionalProperties": false
  18535. },
  18536. "EventPtyExited": {
  18537. "type": "object",
  18538. "properties": {
  18539. "id": {
  18540. "type": "string"
  18541. },
  18542. "type": {
  18543. "type": "string",
  18544. "enum": ["pty.exited"]
  18545. },
  18546. "properties": {
  18547. "type": "object",
  18548. "properties": {
  18549. "id": {
  18550. "type": "string",
  18551. "pattern": "^pty"
  18552. },
  18553. "exitCode": {
  18554. "type": "integer",
  18555. "minimum": 0
  18556. }
  18557. },
  18558. "required": ["id", "exitCode"],
  18559. "additionalProperties": false
  18560. }
  18561. },
  18562. "required": ["id", "type", "properties"],
  18563. "additionalProperties": false
  18564. },
  18565. "EventPtyDeleted": {
  18566. "type": "object",
  18567. "properties": {
  18568. "id": {
  18569. "type": "string"
  18570. },
  18571. "type": {
  18572. "type": "string",
  18573. "enum": ["pty.deleted"]
  18574. },
  18575. "properties": {
  18576. "type": "object",
  18577. "properties": {
  18578. "id": {
  18579. "type": "string",
  18580. "pattern": "^pty"
  18581. }
  18582. },
  18583. "required": ["id"],
  18584. "additionalProperties": false
  18585. }
  18586. },
  18587. "required": ["id", "type", "properties"],
  18588. "additionalProperties": false
  18589. },
  18590. "EventInstallationUpdated": {
  18591. "type": "object",
  18592. "properties": {
  18593. "id": {
  18594. "type": "string"
  18595. },
  18596. "type": {
  18597. "type": "string",
  18598. "enum": ["installation.updated"]
  18599. },
  18600. "properties": {
  18601. "type": "object",
  18602. "properties": {
  18603. "version": {
  18604. "type": "string"
  18605. }
  18606. },
  18607. "required": ["version"],
  18608. "additionalProperties": false
  18609. }
  18610. },
  18611. "required": ["id", "type", "properties"],
  18612. "additionalProperties": false
  18613. },
  18614. "EventInstallationUpdate-available": {
  18615. "type": "object",
  18616. "properties": {
  18617. "id": {
  18618. "type": "string"
  18619. },
  18620. "type": {
  18621. "type": "string",
  18622. "enum": ["installation.update-available"]
  18623. },
  18624. "properties": {
  18625. "type": "object",
  18626. "properties": {
  18627. "version": {
  18628. "type": "string"
  18629. }
  18630. },
  18631. "required": ["version"],
  18632. "additionalProperties": false
  18633. }
  18634. },
  18635. "required": ["id", "type", "properties"],
  18636. "additionalProperties": false
  18637. },
  18638. "EventMessageUpdated": {
  18639. "type": "object",
  18640. "properties": {
  18641. "id": {
  18642. "type": "string"
  18643. },
  18644. "type": {
  18645. "type": "string",
  18646. "enum": ["message.updated"]
  18647. },
  18648. "properties": {
  18649. "type": "object",
  18650. "properties": {
  18651. "sessionID": {
  18652. "type": "string",
  18653. "pattern": "^ses"
  18654. },
  18655. "info": {
  18656. "$ref": "#/components/schemas/Message"
  18657. }
  18658. },
  18659. "required": ["sessionID", "info"],
  18660. "additionalProperties": false
  18661. }
  18662. },
  18663. "required": ["id", "type", "properties"],
  18664. "additionalProperties": false
  18665. },
  18666. "EventMessageRemoved": {
  18667. "type": "object",
  18668. "properties": {
  18669. "id": {
  18670. "type": "string"
  18671. },
  18672. "type": {
  18673. "type": "string",
  18674. "enum": ["message.removed"]
  18675. },
  18676. "properties": {
  18677. "type": "object",
  18678. "properties": {
  18679. "sessionID": {
  18680. "type": "string",
  18681. "pattern": "^ses"
  18682. },
  18683. "messageID": {
  18684. "type": "string",
  18685. "pattern": "^msg"
  18686. }
  18687. },
  18688. "required": ["sessionID", "messageID"],
  18689. "additionalProperties": false
  18690. }
  18691. },
  18692. "required": ["id", "type", "properties"],
  18693. "additionalProperties": false
  18694. },
  18695. "EventMessagePartUpdated": {
  18696. "type": "object",
  18697. "properties": {
  18698. "id": {
  18699. "type": "string"
  18700. },
  18701. "type": {
  18702. "type": "string",
  18703. "enum": ["message.part.updated"]
  18704. },
  18705. "properties": {
  18706. "type": "object",
  18707. "properties": {
  18708. "sessionID": {
  18709. "type": "string",
  18710. "pattern": "^ses"
  18711. },
  18712. "part": {
  18713. "$ref": "#/components/schemas/Part"
  18714. },
  18715. "time": {
  18716. "type": "integer",
  18717. "minimum": 0
  18718. }
  18719. },
  18720. "required": ["sessionID", "part", "time"],
  18721. "additionalProperties": false
  18722. }
  18723. },
  18724. "required": ["id", "type", "properties"],
  18725. "additionalProperties": false
  18726. },
  18727. "EventMessagePartRemoved": {
  18728. "type": "object",
  18729. "properties": {
  18730. "id": {
  18731. "type": "string"
  18732. },
  18733. "type": {
  18734. "type": "string",
  18735. "enum": ["message.part.removed"]
  18736. },
  18737. "properties": {
  18738. "type": "object",
  18739. "properties": {
  18740. "sessionID": {
  18741. "type": "string",
  18742. "pattern": "^ses"
  18743. },
  18744. "messageID": {
  18745. "type": "string",
  18746. "pattern": "^msg"
  18747. },
  18748. "partID": {
  18749. "type": "string",
  18750. "pattern": "^prt"
  18751. }
  18752. },
  18753. "required": ["sessionID", "messageID", "partID"],
  18754. "additionalProperties": false
  18755. }
  18756. },
  18757. "required": ["id", "type", "properties"],
  18758. "additionalProperties": false
  18759. },
  18760. "EventSessionCreated": {
  18761. "type": "object",
  18762. "properties": {
  18763. "id": {
  18764. "type": "string"
  18765. },
  18766. "type": {
  18767. "type": "string",
  18768. "enum": ["session.created"]
  18769. },
  18770. "properties": {
  18771. "type": "object",
  18772. "properties": {
  18773. "sessionID": {
  18774. "type": "string",
  18775. "pattern": "^ses"
  18776. },
  18777. "info": {
  18778. "$ref": "#/components/schemas/Session"
  18779. }
  18780. },
  18781. "required": ["sessionID", "info"],
  18782. "additionalProperties": false
  18783. }
  18784. },
  18785. "required": ["id", "type", "properties"],
  18786. "additionalProperties": false
  18787. },
  18788. "EventSessionUpdated": {
  18789. "type": "object",
  18790. "properties": {
  18791. "id": {
  18792. "type": "string"
  18793. },
  18794. "type": {
  18795. "type": "string",
  18796. "enum": ["session.updated"]
  18797. },
  18798. "properties": {
  18799. "type": "object",
  18800. "properties": {
  18801. "sessionID": {
  18802. "type": "string",
  18803. "pattern": "^ses"
  18804. },
  18805. "info": {
  18806. "$ref": "#/components/schemas/Session"
  18807. }
  18808. },
  18809. "required": ["sessionID", "info"],
  18810. "additionalProperties": false
  18811. }
  18812. },
  18813. "required": ["id", "type", "properties"],
  18814. "additionalProperties": false
  18815. },
  18816. "EventSessionDeleted": {
  18817. "type": "object",
  18818. "properties": {
  18819. "id": {
  18820. "type": "string"
  18821. },
  18822. "type": {
  18823. "type": "string",
  18824. "enum": ["session.deleted"]
  18825. },
  18826. "properties": {
  18827. "type": "object",
  18828. "properties": {
  18829. "sessionID": {
  18830. "type": "string",
  18831. "pattern": "^ses"
  18832. },
  18833. "info": {
  18834. "$ref": "#/components/schemas/Session"
  18835. }
  18836. },
  18837. "required": ["sessionID", "info"],
  18838. "additionalProperties": false
  18839. }
  18840. },
  18841. "required": ["id", "type", "properties"],
  18842. "additionalProperties": false
  18843. },
  18844. "EventSessionNextAgentSwitched": {
  18845. "type": "object",
  18846. "properties": {
  18847. "id": {
  18848. "type": "string"
  18849. },
  18850. "type": {
  18851. "type": "string",
  18852. "enum": ["session.next.agent.switched"]
  18853. },
  18854. "properties": {
  18855. "type": "object",
  18856. "properties": {
  18857. "timestamp": {
  18858. "type": "number"
  18859. },
  18860. "sessionID": {
  18861. "type": "string",
  18862. "pattern": "^ses"
  18863. },
  18864. "agent": {
  18865. "type": "string"
  18866. }
  18867. },
  18868. "required": ["timestamp", "sessionID", "agent"],
  18869. "additionalProperties": false
  18870. }
  18871. },
  18872. "required": ["id", "type", "properties"],
  18873. "additionalProperties": false
  18874. },
  18875. "EventSessionNextModelSwitched": {
  18876. "type": "object",
  18877. "properties": {
  18878. "id": {
  18879. "type": "string"
  18880. },
  18881. "type": {
  18882. "type": "string",
  18883. "enum": ["session.next.model.switched"]
  18884. },
  18885. "properties": {
  18886. "type": "object",
  18887. "properties": {
  18888. "timestamp": {
  18889. "type": "number"
  18890. },
  18891. "sessionID": {
  18892. "type": "string",
  18893. "pattern": "^ses"
  18894. },
  18895. "model": {
  18896. "type": "object",
  18897. "properties": {
  18898. "id": {
  18899. "type": "string"
  18900. },
  18901. "providerID": {
  18902. "type": "string"
  18903. },
  18904. "variant": {
  18905. "type": "string"
  18906. }
  18907. },
  18908. "required": ["id", "providerID", "variant"],
  18909. "additionalProperties": false
  18910. }
  18911. },
  18912. "required": ["timestamp", "sessionID", "model"],
  18913. "additionalProperties": false
  18914. }
  18915. },
  18916. "required": ["id", "type", "properties"],
  18917. "additionalProperties": false
  18918. },
  18919. "PromptSource": {
  18920. "type": "object",
  18921. "properties": {
  18922. "start": {
  18923. "type": "number"
  18924. },
  18925. "end": {
  18926. "type": "number"
  18927. },
  18928. "text": {
  18929. "type": "string"
  18930. }
  18931. },
  18932. "required": ["start", "end", "text"],
  18933. "additionalProperties": false
  18934. },
  18935. "PromptFileAttachment": {
  18936. "type": "object",
  18937. "properties": {
  18938. "uri": {
  18939. "type": "string"
  18940. },
  18941. "mime": {
  18942. "type": "string"
  18943. },
  18944. "name": {
  18945. "type": "string"
  18946. },
  18947. "description": {
  18948. "type": "string"
  18949. },
  18950. "source": {
  18951. "$ref": "#/components/schemas/PromptSource"
  18952. }
  18953. },
  18954. "required": ["uri", "mime"],
  18955. "additionalProperties": false
  18956. },
  18957. "PromptAgentAttachment": {
  18958. "type": "object",
  18959. "properties": {
  18960. "name": {
  18961. "type": "string"
  18962. },
  18963. "source": {
  18964. "$ref": "#/components/schemas/PromptSource"
  18965. }
  18966. },
  18967. "required": ["name"],
  18968. "additionalProperties": false
  18969. },
  18970. "PromptReferenceAttachment": {
  18971. "type": "object",
  18972. "properties": {
  18973. "name": {
  18974. "type": "string"
  18975. },
  18976. "kind": {
  18977. "type": "string",
  18978. "enum": ["local", "git", "invalid"]
  18979. },
  18980. "uri": {
  18981. "type": "string"
  18982. },
  18983. "repository": {
  18984. "type": "string"
  18985. },
  18986. "branch": {
  18987. "type": "string"
  18988. },
  18989. "target": {
  18990. "type": "string"
  18991. },
  18992. "targetUri": {
  18993. "type": "string"
  18994. },
  18995. "problem": {
  18996. "type": "string"
  18997. },
  18998. "source": {
  18999. "$ref": "#/components/schemas/PromptSource"
  19000. }
  19001. },
  19002. "required": ["name", "kind"],
  19003. "additionalProperties": false
  19004. },
  19005. "EventSessionNextPrompted": {
  19006. "type": "object",
  19007. "properties": {
  19008. "id": {
  19009. "type": "string"
  19010. },
  19011. "type": {
  19012. "type": "string",
  19013. "enum": ["session.next.prompted"]
  19014. },
  19015. "properties": {
  19016. "type": "object",
  19017. "properties": {
  19018. "timestamp": {
  19019. "type": "number"
  19020. },
  19021. "sessionID": {
  19022. "type": "string",
  19023. "pattern": "^ses"
  19024. },
  19025. "prompt": {
  19026. "$ref": "#/components/schemas/Prompt"
  19027. }
  19028. },
  19029. "required": ["timestamp", "sessionID", "prompt"],
  19030. "additionalProperties": false
  19031. }
  19032. },
  19033. "required": ["id", "type", "properties"],
  19034. "additionalProperties": false
  19035. },
  19036. "EventSessionNextSynthetic": {
  19037. "type": "object",
  19038. "properties": {
  19039. "id": {
  19040. "type": "string"
  19041. },
  19042. "type": {
  19043. "type": "string",
  19044. "enum": ["session.next.synthetic"]
  19045. },
  19046. "properties": {
  19047. "type": "object",
  19048. "properties": {
  19049. "timestamp": {
  19050. "type": "number"
  19051. },
  19052. "sessionID": {
  19053. "type": "string",
  19054. "pattern": "^ses"
  19055. },
  19056. "text": {
  19057. "type": "string"
  19058. }
  19059. },
  19060. "required": ["timestamp", "sessionID", "text"],
  19061. "additionalProperties": false
  19062. }
  19063. },
  19064. "required": ["id", "type", "properties"],
  19065. "additionalProperties": false
  19066. },
  19067. "EventSessionNextShellStarted": {
  19068. "type": "object",
  19069. "properties": {
  19070. "id": {
  19071. "type": "string"
  19072. },
  19073. "type": {
  19074. "type": "string",
  19075. "enum": ["session.next.shell.started"]
  19076. },
  19077. "properties": {
  19078. "type": "object",
  19079. "properties": {
  19080. "timestamp": {
  19081. "type": "number"
  19082. },
  19083. "sessionID": {
  19084. "type": "string",
  19085. "pattern": "^ses"
  19086. },
  19087. "callID": {
  19088. "type": "string"
  19089. },
  19090. "command": {
  19091. "type": "string"
  19092. }
  19093. },
  19094. "required": ["timestamp", "sessionID", "callID", "command"],
  19095. "additionalProperties": false
  19096. }
  19097. },
  19098. "required": ["id", "type", "properties"],
  19099. "additionalProperties": false
  19100. },
  19101. "EventSessionNextShellEnded": {
  19102. "type": "object",
  19103. "properties": {
  19104. "id": {
  19105. "type": "string"
  19106. },
  19107. "type": {
  19108. "type": "string",
  19109. "enum": ["session.next.shell.ended"]
  19110. },
  19111. "properties": {
  19112. "type": "object",
  19113. "properties": {
  19114. "timestamp": {
  19115. "type": "number"
  19116. },
  19117. "sessionID": {
  19118. "type": "string",
  19119. "pattern": "^ses"
  19120. },
  19121. "callID": {
  19122. "type": "string"
  19123. },
  19124. "output": {
  19125. "type": "string"
  19126. }
  19127. },
  19128. "required": ["timestamp", "sessionID", "callID", "output"],
  19129. "additionalProperties": false
  19130. }
  19131. },
  19132. "required": ["id", "type", "properties"],
  19133. "additionalProperties": false
  19134. },
  19135. "EventSessionNextStepStarted": {
  19136. "type": "object",
  19137. "properties": {
  19138. "id": {
  19139. "type": "string"
  19140. },
  19141. "type": {
  19142. "type": "string",
  19143. "enum": ["session.next.step.started"]
  19144. },
  19145. "properties": {
  19146. "type": "object",
  19147. "properties": {
  19148. "timestamp": {
  19149. "type": "number"
  19150. },
  19151. "sessionID": {
  19152. "type": "string",
  19153. "pattern": "^ses"
  19154. },
  19155. "agent": {
  19156. "type": "string"
  19157. },
  19158. "model": {
  19159. "type": "object",
  19160. "properties": {
  19161. "id": {
  19162. "type": "string"
  19163. },
  19164. "providerID": {
  19165. "type": "string"
  19166. },
  19167. "variant": {
  19168. "type": "string"
  19169. }
  19170. },
  19171. "required": ["id", "providerID", "variant"],
  19172. "additionalProperties": false
  19173. },
  19174. "snapshot": {
  19175. "type": "string"
  19176. }
  19177. },
  19178. "required": ["timestamp", "sessionID", "agent", "model"],
  19179. "additionalProperties": false
  19180. }
  19181. },
  19182. "required": ["id", "type", "properties"],
  19183. "additionalProperties": false
  19184. },
  19185. "EventSessionNextStepEnded": {
  19186. "type": "object",
  19187. "properties": {
  19188. "id": {
  19189. "type": "string"
  19190. },
  19191. "type": {
  19192. "type": "string",
  19193. "enum": ["session.next.step.ended"]
  19194. },
  19195. "properties": {
  19196. "type": "object",
  19197. "properties": {
  19198. "timestamp": {
  19199. "type": "number"
  19200. },
  19201. "sessionID": {
  19202. "type": "string",
  19203. "pattern": "^ses"
  19204. },
  19205. "finish": {
  19206. "type": "string"
  19207. },
  19208. "cost": {
  19209. "type": "number"
  19210. },
  19211. "tokens": {
  19212. "type": "object",
  19213. "properties": {
  19214. "input": {
  19215. "type": "number"
  19216. },
  19217. "output": {
  19218. "type": "number"
  19219. },
  19220. "reasoning": {
  19221. "type": "number"
  19222. },
  19223. "cache": {
  19224. "type": "object",
  19225. "properties": {
  19226. "read": {
  19227. "type": "number"
  19228. },
  19229. "write": {
  19230. "type": "number"
  19231. }
  19232. },
  19233. "required": ["read", "write"],
  19234. "additionalProperties": false
  19235. }
  19236. },
  19237. "required": ["input", "output", "reasoning", "cache"],
  19238. "additionalProperties": false
  19239. },
  19240. "snapshot": {
  19241. "type": "string"
  19242. }
  19243. },
  19244. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19245. "additionalProperties": false
  19246. }
  19247. },
  19248. "required": ["id", "type", "properties"],
  19249. "additionalProperties": false
  19250. },
  19251. "SessionErrorUnknown": {
  19252. "type": "object",
  19253. "properties": {
  19254. "type": {
  19255. "type": "string",
  19256. "enum": ["unknown"]
  19257. },
  19258. "message": {
  19259. "type": "string"
  19260. }
  19261. },
  19262. "required": ["type", "message"],
  19263. "additionalProperties": false
  19264. },
  19265. "EventSessionNextStepFailed": {
  19266. "type": "object",
  19267. "properties": {
  19268. "id": {
  19269. "type": "string"
  19270. },
  19271. "type": {
  19272. "type": "string",
  19273. "enum": ["session.next.step.failed"]
  19274. },
  19275. "properties": {
  19276. "type": "object",
  19277. "properties": {
  19278. "timestamp": {
  19279. "type": "number"
  19280. },
  19281. "sessionID": {
  19282. "type": "string",
  19283. "pattern": "^ses"
  19284. },
  19285. "error": {
  19286. "$ref": "#/components/schemas/SessionErrorUnknown"
  19287. }
  19288. },
  19289. "required": ["timestamp", "sessionID", "error"],
  19290. "additionalProperties": false
  19291. }
  19292. },
  19293. "required": ["id", "type", "properties"],
  19294. "additionalProperties": false
  19295. },
  19296. "EventSessionNextTextStarted": {
  19297. "type": "object",
  19298. "properties": {
  19299. "id": {
  19300. "type": "string"
  19301. },
  19302. "type": {
  19303. "type": "string",
  19304. "enum": ["session.next.text.started"]
  19305. },
  19306. "properties": {
  19307. "type": "object",
  19308. "properties": {
  19309. "timestamp": {
  19310. "type": "number"
  19311. },
  19312. "sessionID": {
  19313. "type": "string",
  19314. "pattern": "^ses"
  19315. }
  19316. },
  19317. "required": ["timestamp", "sessionID"],
  19318. "additionalProperties": false
  19319. }
  19320. },
  19321. "required": ["id", "type", "properties"],
  19322. "additionalProperties": false
  19323. },
  19324. "EventSessionNextTextDelta": {
  19325. "type": "object",
  19326. "properties": {
  19327. "id": {
  19328. "type": "string"
  19329. },
  19330. "type": {
  19331. "type": "string",
  19332. "enum": ["session.next.text.delta"]
  19333. },
  19334. "properties": {
  19335. "type": "object",
  19336. "properties": {
  19337. "timestamp": {
  19338. "type": "number"
  19339. },
  19340. "sessionID": {
  19341. "type": "string",
  19342. "pattern": "^ses"
  19343. },
  19344. "delta": {
  19345. "type": "string"
  19346. }
  19347. },
  19348. "required": ["timestamp", "sessionID", "delta"],
  19349. "additionalProperties": false
  19350. }
  19351. },
  19352. "required": ["id", "type", "properties"],
  19353. "additionalProperties": false
  19354. },
  19355. "EventSessionNextTextEnded": {
  19356. "type": "object",
  19357. "properties": {
  19358. "id": {
  19359. "type": "string"
  19360. },
  19361. "type": {
  19362. "type": "string",
  19363. "enum": ["session.next.text.ended"]
  19364. },
  19365. "properties": {
  19366. "type": "object",
  19367. "properties": {
  19368. "timestamp": {
  19369. "type": "number"
  19370. },
  19371. "sessionID": {
  19372. "type": "string",
  19373. "pattern": "^ses"
  19374. },
  19375. "text": {
  19376. "type": "string"
  19377. }
  19378. },
  19379. "required": ["timestamp", "sessionID", "text"],
  19380. "additionalProperties": false
  19381. }
  19382. },
  19383. "required": ["id", "type", "properties"],
  19384. "additionalProperties": false
  19385. },
  19386. "EventSessionNextReasoningStarted": {
  19387. "type": "object",
  19388. "properties": {
  19389. "id": {
  19390. "type": "string"
  19391. },
  19392. "type": {
  19393. "type": "string",
  19394. "enum": ["session.next.reasoning.started"]
  19395. },
  19396. "properties": {
  19397. "type": "object",
  19398. "properties": {
  19399. "timestamp": {
  19400. "type": "number"
  19401. },
  19402. "sessionID": {
  19403. "type": "string",
  19404. "pattern": "^ses"
  19405. },
  19406. "reasoningID": {
  19407. "type": "string"
  19408. }
  19409. },
  19410. "required": ["timestamp", "sessionID", "reasoningID"],
  19411. "additionalProperties": false
  19412. }
  19413. },
  19414. "required": ["id", "type", "properties"],
  19415. "additionalProperties": false
  19416. },
  19417. "EventSessionNextReasoningDelta": {
  19418. "type": "object",
  19419. "properties": {
  19420. "id": {
  19421. "type": "string"
  19422. },
  19423. "type": {
  19424. "type": "string",
  19425. "enum": ["session.next.reasoning.delta"]
  19426. },
  19427. "properties": {
  19428. "type": "object",
  19429. "properties": {
  19430. "timestamp": {
  19431. "type": "number"
  19432. },
  19433. "sessionID": {
  19434. "type": "string",
  19435. "pattern": "^ses"
  19436. },
  19437. "reasoningID": {
  19438. "type": "string"
  19439. },
  19440. "delta": {
  19441. "type": "string"
  19442. }
  19443. },
  19444. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19445. "additionalProperties": false
  19446. }
  19447. },
  19448. "required": ["id", "type", "properties"],
  19449. "additionalProperties": false
  19450. },
  19451. "EventSessionNextReasoningEnded": {
  19452. "type": "object",
  19453. "properties": {
  19454. "id": {
  19455. "type": "string"
  19456. },
  19457. "type": {
  19458. "type": "string",
  19459. "enum": ["session.next.reasoning.ended"]
  19460. },
  19461. "properties": {
  19462. "type": "object",
  19463. "properties": {
  19464. "timestamp": {
  19465. "type": "number"
  19466. },
  19467. "sessionID": {
  19468. "type": "string",
  19469. "pattern": "^ses"
  19470. },
  19471. "reasoningID": {
  19472. "type": "string"
  19473. },
  19474. "text": {
  19475. "type": "string"
  19476. }
  19477. },
  19478. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19479. "additionalProperties": false
  19480. }
  19481. },
  19482. "required": ["id", "type", "properties"],
  19483. "additionalProperties": false
  19484. },
  19485. "EventSessionNextToolInputStarted": {
  19486. "type": "object",
  19487. "properties": {
  19488. "id": {
  19489. "type": "string"
  19490. },
  19491. "type": {
  19492. "type": "string",
  19493. "enum": ["session.next.tool.input.started"]
  19494. },
  19495. "properties": {
  19496. "type": "object",
  19497. "properties": {
  19498. "timestamp": {
  19499. "type": "number"
  19500. },
  19501. "sessionID": {
  19502. "type": "string",
  19503. "pattern": "^ses"
  19504. },
  19505. "callID": {
  19506. "type": "string"
  19507. },
  19508. "name": {
  19509. "type": "string"
  19510. }
  19511. },
  19512. "required": ["timestamp", "sessionID", "callID", "name"],
  19513. "additionalProperties": false
  19514. }
  19515. },
  19516. "required": ["id", "type", "properties"],
  19517. "additionalProperties": false
  19518. },
  19519. "EventSessionNextToolInputDelta": {
  19520. "type": "object",
  19521. "properties": {
  19522. "id": {
  19523. "type": "string"
  19524. },
  19525. "type": {
  19526. "type": "string",
  19527. "enum": ["session.next.tool.input.delta"]
  19528. },
  19529. "properties": {
  19530. "type": "object",
  19531. "properties": {
  19532. "timestamp": {
  19533. "type": "number"
  19534. },
  19535. "sessionID": {
  19536. "type": "string",
  19537. "pattern": "^ses"
  19538. },
  19539. "callID": {
  19540. "type": "string"
  19541. },
  19542. "delta": {
  19543. "type": "string"
  19544. }
  19545. },
  19546. "required": ["timestamp", "sessionID", "callID", "delta"],
  19547. "additionalProperties": false
  19548. }
  19549. },
  19550. "required": ["id", "type", "properties"],
  19551. "additionalProperties": false
  19552. },
  19553. "EventSessionNextToolInputEnded": {
  19554. "type": "object",
  19555. "properties": {
  19556. "id": {
  19557. "type": "string"
  19558. },
  19559. "type": {
  19560. "type": "string",
  19561. "enum": ["session.next.tool.input.ended"]
  19562. },
  19563. "properties": {
  19564. "type": "object",
  19565. "properties": {
  19566. "timestamp": {
  19567. "type": "number"
  19568. },
  19569. "sessionID": {
  19570. "type": "string",
  19571. "pattern": "^ses"
  19572. },
  19573. "callID": {
  19574. "type": "string"
  19575. },
  19576. "text": {
  19577. "type": "string"
  19578. }
  19579. },
  19580. "required": ["timestamp", "sessionID", "callID", "text"],
  19581. "additionalProperties": false
  19582. }
  19583. },
  19584. "required": ["id", "type", "properties"],
  19585. "additionalProperties": false
  19586. },
  19587. "EventSessionNextToolCalled": {
  19588. "type": "object",
  19589. "properties": {
  19590. "id": {
  19591. "type": "string"
  19592. },
  19593. "type": {
  19594. "type": "string",
  19595. "enum": ["session.next.tool.called"]
  19596. },
  19597. "properties": {
  19598. "type": "object",
  19599. "properties": {
  19600. "timestamp": {
  19601. "type": "number"
  19602. },
  19603. "sessionID": {
  19604. "type": "string",
  19605. "pattern": "^ses"
  19606. },
  19607. "callID": {
  19608. "type": "string"
  19609. },
  19610. "tool": {
  19611. "type": "string"
  19612. },
  19613. "input": {
  19614. "type": "object"
  19615. },
  19616. "provider": {
  19617. "type": "object",
  19618. "properties": {
  19619. "executed": {
  19620. "type": "boolean"
  19621. },
  19622. "metadata": {
  19623. "type": "object"
  19624. }
  19625. },
  19626. "required": ["executed"],
  19627. "additionalProperties": false
  19628. }
  19629. },
  19630. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19631. "additionalProperties": false
  19632. }
  19633. },
  19634. "required": ["id", "type", "properties"],
  19635. "additionalProperties": false
  19636. },
  19637. "ToolTextContent": {
  19638. "type": "object",
  19639. "properties": {
  19640. "type": {
  19641. "type": "string",
  19642. "enum": ["text"]
  19643. },
  19644. "text": {
  19645. "type": "string"
  19646. }
  19647. },
  19648. "required": ["type", "text"],
  19649. "additionalProperties": false
  19650. },
  19651. "ToolFileContent": {
  19652. "type": "object",
  19653. "properties": {
  19654. "type": {
  19655. "type": "string",
  19656. "enum": ["file"]
  19657. },
  19658. "uri": {
  19659. "type": "string"
  19660. },
  19661. "mime": {
  19662. "type": "string"
  19663. },
  19664. "name": {
  19665. "type": "string"
  19666. }
  19667. },
  19668. "required": ["type", "uri", "mime"],
  19669. "additionalProperties": false
  19670. },
  19671. "EventSessionNextToolProgress": {
  19672. "type": "object",
  19673. "properties": {
  19674. "id": {
  19675. "type": "string"
  19676. },
  19677. "type": {
  19678. "type": "string",
  19679. "enum": ["session.next.tool.progress"]
  19680. },
  19681. "properties": {
  19682. "type": "object",
  19683. "properties": {
  19684. "timestamp": {
  19685. "type": "number"
  19686. },
  19687. "sessionID": {
  19688. "type": "string",
  19689. "pattern": "^ses"
  19690. },
  19691. "callID": {
  19692. "type": "string"
  19693. },
  19694. "structured": {
  19695. "type": "object"
  19696. },
  19697. "content": {
  19698. "type": "array",
  19699. "items": {
  19700. "anyOf": [
  19701. {
  19702. "$ref": "#/components/schemas/ToolTextContent"
  19703. },
  19704. {
  19705. "$ref": "#/components/schemas/ToolFileContent"
  19706. }
  19707. ]
  19708. }
  19709. }
  19710. },
  19711. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  19712. "additionalProperties": false
  19713. }
  19714. },
  19715. "required": ["id", "type", "properties"],
  19716. "additionalProperties": false
  19717. },
  19718. "EventSessionNextToolSuccess": {
  19719. "type": "object",
  19720. "properties": {
  19721. "id": {
  19722. "type": "string"
  19723. },
  19724. "type": {
  19725. "type": "string",
  19726. "enum": ["session.next.tool.success"]
  19727. },
  19728. "properties": {
  19729. "type": "object",
  19730. "properties": {
  19731. "timestamp": {
  19732. "type": "number"
  19733. },
  19734. "sessionID": {
  19735. "type": "string",
  19736. "pattern": "^ses"
  19737. },
  19738. "callID": {
  19739. "type": "string"
  19740. },
  19741. "structured": {
  19742. "type": "object"
  19743. },
  19744. "content": {
  19745. "type": "array",
  19746. "items": {
  19747. "anyOf": [
  19748. {
  19749. "$ref": "#/components/schemas/ToolTextContent"
  19750. },
  19751. {
  19752. "$ref": "#/components/schemas/ToolFileContent"
  19753. }
  19754. ]
  19755. }
  19756. },
  19757. "provider": {
  19758. "type": "object",
  19759. "properties": {
  19760. "executed": {
  19761. "type": "boolean"
  19762. },
  19763. "metadata": {
  19764. "type": "object"
  19765. }
  19766. },
  19767. "required": ["executed"],
  19768. "additionalProperties": false
  19769. }
  19770. },
  19771. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  19772. "additionalProperties": false
  19773. }
  19774. },
  19775. "required": ["id", "type", "properties"],
  19776. "additionalProperties": false
  19777. },
  19778. "EventSessionNextToolFailed": {
  19779. "type": "object",
  19780. "properties": {
  19781. "id": {
  19782. "type": "string"
  19783. },
  19784. "type": {
  19785. "type": "string",
  19786. "enum": ["session.next.tool.failed"]
  19787. },
  19788. "properties": {
  19789. "type": "object",
  19790. "properties": {
  19791. "timestamp": {
  19792. "type": "number"
  19793. },
  19794. "sessionID": {
  19795. "type": "string",
  19796. "pattern": "^ses"
  19797. },
  19798. "callID": {
  19799. "type": "string"
  19800. },
  19801. "error": {
  19802. "$ref": "#/components/schemas/SessionErrorUnknown"
  19803. },
  19804. "provider": {
  19805. "type": "object",
  19806. "properties": {
  19807. "executed": {
  19808. "type": "boolean"
  19809. },
  19810. "metadata": {
  19811. "type": "object"
  19812. }
  19813. },
  19814. "required": ["executed"],
  19815. "additionalProperties": false
  19816. }
  19817. },
  19818. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  19819. "additionalProperties": false
  19820. }
  19821. },
  19822. "required": ["id", "type", "properties"],
  19823. "additionalProperties": false
  19824. },
  19825. "SessionNextRetry_error": {
  19826. "type": "object",
  19827. "properties": {
  19828. "message": {
  19829. "type": "string"
  19830. },
  19831. "statusCode": {
  19832. "type": "number"
  19833. },
  19834. "isRetryable": {
  19835. "type": "boolean"
  19836. },
  19837. "responseHeaders": {
  19838. "type": "object",
  19839. "additionalProperties": {
  19840. "type": "string"
  19841. }
  19842. },
  19843. "responseBody": {
  19844. "type": "string"
  19845. },
  19846. "metadata": {
  19847. "type": "object",
  19848. "additionalProperties": {
  19849. "type": "string"
  19850. }
  19851. }
  19852. },
  19853. "required": ["message", "isRetryable"],
  19854. "additionalProperties": false
  19855. },
  19856. "EventSessionNextRetried": {
  19857. "type": "object",
  19858. "properties": {
  19859. "id": {
  19860. "type": "string"
  19861. },
  19862. "type": {
  19863. "type": "string",
  19864. "enum": ["session.next.retried"]
  19865. },
  19866. "properties": {
  19867. "type": "object",
  19868. "properties": {
  19869. "timestamp": {
  19870. "type": "number"
  19871. },
  19872. "sessionID": {
  19873. "type": "string",
  19874. "pattern": "^ses"
  19875. },
  19876. "attempt": {
  19877. "type": "number"
  19878. },
  19879. "error": {
  19880. "$ref": "#/components/schemas/SessionNextRetry_error"
  19881. }
  19882. },
  19883. "required": ["timestamp", "sessionID", "attempt", "error"],
  19884. "additionalProperties": false
  19885. }
  19886. },
  19887. "required": ["id", "type", "properties"],
  19888. "additionalProperties": false
  19889. },
  19890. "EventSessionNextCompactionStarted": {
  19891. "type": "object",
  19892. "properties": {
  19893. "id": {
  19894. "type": "string"
  19895. },
  19896. "type": {
  19897. "type": "string",
  19898. "enum": ["session.next.compaction.started"]
  19899. },
  19900. "properties": {
  19901. "type": "object",
  19902. "properties": {
  19903. "timestamp": {
  19904. "type": "number"
  19905. },
  19906. "sessionID": {
  19907. "type": "string",
  19908. "pattern": "^ses"
  19909. },
  19910. "reason": {
  19911. "type": "string",
  19912. "enum": ["auto", "manual"]
  19913. }
  19914. },
  19915. "required": ["timestamp", "sessionID", "reason"],
  19916. "additionalProperties": false
  19917. }
  19918. },
  19919. "required": ["id", "type", "properties"],
  19920. "additionalProperties": false
  19921. },
  19922. "EventSessionNextCompactionDelta": {
  19923. "type": "object",
  19924. "properties": {
  19925. "id": {
  19926. "type": "string"
  19927. },
  19928. "type": {
  19929. "type": "string",
  19930. "enum": ["session.next.compaction.delta"]
  19931. },
  19932. "properties": {
  19933. "type": "object",
  19934. "properties": {
  19935. "timestamp": {
  19936. "type": "number"
  19937. },
  19938. "sessionID": {
  19939. "type": "string",
  19940. "pattern": "^ses"
  19941. },
  19942. "text": {
  19943. "type": "string"
  19944. }
  19945. },
  19946. "required": ["timestamp", "sessionID", "text"],
  19947. "additionalProperties": false
  19948. }
  19949. },
  19950. "required": ["id", "type", "properties"],
  19951. "additionalProperties": false
  19952. },
  19953. "EventSessionNextCompactionEnded": {
  19954. "type": "object",
  19955. "properties": {
  19956. "id": {
  19957. "type": "string"
  19958. },
  19959. "type": {
  19960. "type": "string",
  19961. "enum": ["session.next.compaction.ended"]
  19962. },
  19963. "properties": {
  19964. "type": "object",
  19965. "properties": {
  19966. "timestamp": {
  19967. "type": "number"
  19968. },
  19969. "sessionID": {
  19970. "type": "string",
  19971. "pattern": "^ses"
  19972. },
  19973. "text": {
  19974. "type": "string"
  19975. },
  19976. "include": {
  19977. "type": "string"
  19978. }
  19979. },
  19980. "required": ["timestamp", "sessionID", "text"],
  19981. "additionalProperties": false
  19982. }
  19983. },
  19984. "required": ["id", "type", "properties"],
  19985. "additionalProperties": false
  19986. },
  19987. "ModelV2Info": {
  19988. "type": "object",
  19989. "properties": {
  19990. "id": {
  19991. "type": "string"
  19992. },
  19993. "apiID": {
  19994. "type": "string"
  19995. },
  19996. "providerID": {
  19997. "type": "string"
  19998. },
  19999. "family": {
  20000. "type": "string"
  20001. },
  20002. "name": {
  20003. "type": "string"
  20004. },
  20005. "endpoint": {
  20006. "anyOf": [
  20007. {
  20008. "type": "object",
  20009. "properties": {
  20010. "type": {
  20011. "type": "string",
  20012. "enum": ["unknown"]
  20013. }
  20014. },
  20015. "required": ["type"],
  20016. "additionalProperties": false
  20017. },
  20018. {
  20019. "type": "object",
  20020. "properties": {
  20021. "type": {
  20022. "type": "string",
  20023. "enum": ["openai/responses"]
  20024. },
  20025. "url": {
  20026. "type": "string"
  20027. },
  20028. "websocket": {
  20029. "type": "boolean"
  20030. }
  20031. },
  20032. "required": ["type", "url"],
  20033. "additionalProperties": false
  20034. },
  20035. {
  20036. "type": "object",
  20037. "properties": {
  20038. "type": {
  20039. "type": "string",
  20040. "enum": ["openai/completions"]
  20041. },
  20042. "url": {
  20043. "type": "string"
  20044. },
  20045. "reasoning": {
  20046. "anyOf": [
  20047. {
  20048. "type": "object",
  20049. "properties": {
  20050. "type": {
  20051. "type": "string",
  20052. "enum": ["reasoning_content"]
  20053. }
  20054. },
  20055. "required": ["type"],
  20056. "additionalProperties": false
  20057. },
  20058. {
  20059. "type": "object",
  20060. "properties": {
  20061. "type": {
  20062. "type": "string",
  20063. "enum": ["reasoning_details"]
  20064. }
  20065. },
  20066. "required": ["type"],
  20067. "additionalProperties": false
  20068. }
  20069. ]
  20070. }
  20071. },
  20072. "required": ["type", "url"],
  20073. "additionalProperties": false
  20074. },
  20075. {
  20076. "type": "object",
  20077. "properties": {
  20078. "type": {
  20079. "type": "string",
  20080. "enum": ["anthropic/messages"]
  20081. },
  20082. "url": {
  20083. "type": "string"
  20084. }
  20085. },
  20086. "required": ["type", "url"],
  20087. "additionalProperties": false
  20088. },
  20089. {
  20090. "type": "object",
  20091. "properties": {
  20092. "type": {
  20093. "type": "string",
  20094. "enum": ["aisdk"]
  20095. },
  20096. "package": {
  20097. "type": "string"
  20098. },
  20099. "url": {
  20100. "type": "string"
  20101. }
  20102. },
  20103. "required": ["type", "package"],
  20104. "additionalProperties": false
  20105. }
  20106. ]
  20107. },
  20108. "capabilities": {
  20109. "type": "object",
  20110. "properties": {
  20111. "tools": {
  20112. "type": "boolean"
  20113. },
  20114. "input": {
  20115. "type": "array",
  20116. "items": {
  20117. "type": "string"
  20118. }
  20119. },
  20120. "output": {
  20121. "type": "array",
  20122. "items": {
  20123. "type": "string"
  20124. }
  20125. }
  20126. },
  20127. "required": ["tools", "input", "output"],
  20128. "additionalProperties": false
  20129. },
  20130. "options": {
  20131. "type": "object",
  20132. "properties": {
  20133. "headers": {
  20134. "type": "object",
  20135. "additionalProperties": {
  20136. "type": "string"
  20137. }
  20138. },
  20139. "body": {
  20140. "type": "object"
  20141. },
  20142. "aisdk": {
  20143. "type": "object",
  20144. "properties": {
  20145. "provider": {
  20146. "type": "object"
  20147. },
  20148. "request": {
  20149. "type": "object"
  20150. }
  20151. },
  20152. "required": ["provider", "request"],
  20153. "additionalProperties": false
  20154. },
  20155. "variant": {
  20156. "type": "string"
  20157. }
  20158. },
  20159. "required": ["headers", "body", "aisdk"],
  20160. "additionalProperties": false
  20161. },
  20162. "variants": {
  20163. "type": "array",
  20164. "items": {
  20165. "type": "object",
  20166. "properties": {
  20167. "id": {
  20168. "type": "string"
  20169. },
  20170. "headers": {
  20171. "type": "object",
  20172. "additionalProperties": {
  20173. "type": "string"
  20174. }
  20175. },
  20176. "body": {
  20177. "type": "object"
  20178. },
  20179. "aisdk": {
  20180. "type": "object",
  20181. "properties": {
  20182. "provider": {
  20183. "type": "object"
  20184. },
  20185. "request": {
  20186. "type": "object"
  20187. }
  20188. },
  20189. "required": ["provider", "request"],
  20190. "additionalProperties": false
  20191. }
  20192. },
  20193. "required": ["id", "headers", "body", "aisdk"],
  20194. "additionalProperties": false
  20195. }
  20196. },
  20197. "time": {
  20198. "type": "object",
  20199. "properties": {
  20200. "released": {
  20201. "anyOf": [
  20202. {
  20203. "type": "number"
  20204. },
  20205. {
  20206. "type": "string",
  20207. "enum": ["NaN"]
  20208. },
  20209. {
  20210. "type": "string",
  20211. "enum": ["Infinity"]
  20212. },
  20213. {
  20214. "type": "string",
  20215. "enum": ["-Infinity"]
  20216. },
  20217. {
  20218. "type": "string",
  20219. "enum": ["Infinity", "-Infinity", "NaN"]
  20220. }
  20221. ]
  20222. }
  20223. },
  20224. "required": ["released"],
  20225. "additionalProperties": false
  20226. },
  20227. "cost": {
  20228. "type": "array",
  20229. "items": {
  20230. "type": "object",
  20231. "properties": {
  20232. "tier": {
  20233. "type": "object",
  20234. "properties": {
  20235. "type": {
  20236. "type": "string",
  20237. "enum": ["context"]
  20238. },
  20239. "size": {
  20240. "type": "integer"
  20241. }
  20242. },
  20243. "required": ["type", "size"],
  20244. "additionalProperties": false
  20245. },
  20246. "input": {
  20247. "type": "number"
  20248. },
  20249. "output": {
  20250. "type": "number"
  20251. },
  20252. "cache": {
  20253. "type": "object",
  20254. "properties": {
  20255. "read": {
  20256. "type": "number"
  20257. },
  20258. "write": {
  20259. "type": "number"
  20260. }
  20261. },
  20262. "required": ["read", "write"],
  20263. "additionalProperties": false
  20264. }
  20265. },
  20266. "required": ["input", "output", "cache"],
  20267. "additionalProperties": false
  20268. }
  20269. },
  20270. "status": {
  20271. "type": "string",
  20272. "enum": ["alpha", "beta", "deprecated", "active"]
  20273. },
  20274. "enabled": {
  20275. "type": "boolean"
  20276. },
  20277. "limit": {
  20278. "type": "object",
  20279. "properties": {
  20280. "context": {
  20281. "type": "integer"
  20282. },
  20283. "input": {
  20284. "type": "integer"
  20285. },
  20286. "output": {
  20287. "type": "integer"
  20288. }
  20289. },
  20290. "required": ["context", "output"],
  20291. "additionalProperties": false
  20292. }
  20293. },
  20294. "required": [
  20295. "id",
  20296. "apiID",
  20297. "providerID",
  20298. "name",
  20299. "endpoint",
  20300. "capabilities",
  20301. "options",
  20302. "variants",
  20303. "time",
  20304. "cost",
  20305. "status",
  20306. "enabled",
  20307. "limit"
  20308. ],
  20309. "additionalProperties": false
  20310. },
  20311. "EventCatalogModelUpdated": {
  20312. "type": "object",
  20313. "properties": {
  20314. "id": {
  20315. "type": "string"
  20316. },
  20317. "type": {
  20318. "type": "string",
  20319. "enum": ["catalog.model.updated"]
  20320. },
  20321. "properties": {
  20322. "type": "object",
  20323. "properties": {
  20324. "model": {
  20325. "$ref": "#/components/schemas/ModelV2Info"
  20326. }
  20327. },
  20328. "required": ["model"],
  20329. "additionalProperties": false
  20330. }
  20331. },
  20332. "required": ["id", "type", "properties"],
  20333. "additionalProperties": false
  20334. },
  20335. "EventModels-devRefreshed": {
  20336. "type": "object",
  20337. "properties": {
  20338. "id": {
  20339. "type": "string"
  20340. },
  20341. "type": {
  20342. "type": "string",
  20343. "enum": ["models-dev.refreshed"]
  20344. },
  20345. "properties": {
  20346. "type": "object",
  20347. "properties": {}
  20348. }
  20349. },
  20350. "required": ["id", "type", "properties"],
  20351. "additionalProperties": false
  20352. },
  20353. "AccountV2OAuthCredential": {
  20354. "type": "object",
  20355. "properties": {
  20356. "type": {
  20357. "type": "string",
  20358. "enum": ["oauth"]
  20359. },
  20360. "refresh": {
  20361. "type": "string"
  20362. },
  20363. "access": {
  20364. "type": "string"
  20365. },
  20366. "expires": {
  20367. "type": "integer",
  20368. "minimum": 0
  20369. }
  20370. },
  20371. "required": ["type", "refresh", "access", "expires"],
  20372. "additionalProperties": false
  20373. },
  20374. "AccountV2ApiKeyCredential": {
  20375. "type": "object",
  20376. "properties": {
  20377. "type": {
  20378. "type": "string",
  20379. "enum": ["api"]
  20380. },
  20381. "key": {
  20382. "type": "string"
  20383. },
  20384. "metadata": {
  20385. "type": "object",
  20386. "additionalProperties": {
  20387. "type": "string"
  20388. }
  20389. }
  20390. },
  20391. "required": ["type", "key"],
  20392. "additionalProperties": false
  20393. },
  20394. "AccountV2Credential": {
  20395. "anyOf": [
  20396. {
  20397. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20398. },
  20399. {
  20400. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20401. }
  20402. ]
  20403. },
  20404. "AccountV2Info": {
  20405. "type": "object",
  20406. "properties": {
  20407. "id": {
  20408. "type": "string"
  20409. },
  20410. "serviceID": {
  20411. "type": "string"
  20412. },
  20413. "description": {
  20414. "type": "string"
  20415. },
  20416. "credential": {
  20417. "$ref": "#/components/schemas/AccountV2Credential"
  20418. }
  20419. },
  20420. "required": ["id", "serviceID", "description", "credential"],
  20421. "additionalProperties": false
  20422. },
  20423. "EventAccountAdded": {
  20424. "type": "object",
  20425. "properties": {
  20426. "id": {
  20427. "type": "string"
  20428. },
  20429. "type": {
  20430. "type": "string",
  20431. "enum": ["account.added"]
  20432. },
  20433. "properties": {
  20434. "type": "object",
  20435. "properties": {
  20436. "account": {
  20437. "$ref": "#/components/schemas/AccountV2Info"
  20438. }
  20439. },
  20440. "required": ["account"],
  20441. "additionalProperties": false
  20442. }
  20443. },
  20444. "required": ["id", "type", "properties"],
  20445. "additionalProperties": false
  20446. },
  20447. "EventAccountRemoved": {
  20448. "type": "object",
  20449. "properties": {
  20450. "id": {
  20451. "type": "string"
  20452. },
  20453. "type": {
  20454. "type": "string",
  20455. "enum": ["account.removed"]
  20456. },
  20457. "properties": {
  20458. "type": "object",
  20459. "properties": {
  20460. "account": {
  20461. "$ref": "#/components/schemas/AccountV2Info"
  20462. }
  20463. },
  20464. "required": ["account"],
  20465. "additionalProperties": false
  20466. }
  20467. },
  20468. "required": ["id", "type", "properties"],
  20469. "additionalProperties": false
  20470. },
  20471. "EventAccountSwitched": {
  20472. "type": "object",
  20473. "properties": {
  20474. "id": {
  20475. "type": "string"
  20476. },
  20477. "type": {
  20478. "type": "string",
  20479. "enum": ["account.switched"]
  20480. },
  20481. "properties": {
  20482. "type": "object",
  20483. "properties": {
  20484. "serviceID": {
  20485. "type": "string"
  20486. },
  20487. "from": {
  20488. "type": "string"
  20489. },
  20490. "to": {
  20491. "type": "string"
  20492. }
  20493. },
  20494. "required": ["serviceID"],
  20495. "additionalProperties": false
  20496. }
  20497. },
  20498. "required": ["id", "type", "properties"],
  20499. "additionalProperties": false
  20500. },
  20501. "SessionInfo": {
  20502. "type": "object",
  20503. "properties": {
  20504. "id": {
  20505. "type": "string",
  20506. "pattern": "^ses"
  20507. },
  20508. "parentID": {
  20509. "type": "string",
  20510. "pattern": "^ses"
  20511. },
  20512. "projectID": {
  20513. "type": "string"
  20514. },
  20515. "workspaceID": {
  20516. "type": "string",
  20517. "pattern": "^wrk"
  20518. },
  20519. "path": {
  20520. "type": "string"
  20521. },
  20522. "agent": {
  20523. "type": "string"
  20524. },
  20525. "model": {
  20526. "type": "object",
  20527. "properties": {
  20528. "id": {
  20529. "type": "string"
  20530. },
  20531. "providerID": {
  20532. "type": "string"
  20533. },
  20534. "variant": {
  20535. "type": "string"
  20536. }
  20537. },
  20538. "required": ["id", "providerID", "variant"],
  20539. "additionalProperties": false
  20540. },
  20541. "cost": {
  20542. "type": "number"
  20543. },
  20544. "tokens": {
  20545. "type": "object",
  20546. "properties": {
  20547. "input": {
  20548. "type": "number"
  20549. },
  20550. "output": {
  20551. "type": "number"
  20552. },
  20553. "reasoning": {
  20554. "type": "number"
  20555. },
  20556. "cache": {
  20557. "type": "object",
  20558. "properties": {
  20559. "read": {
  20560. "type": "number"
  20561. },
  20562. "write": {
  20563. "type": "number"
  20564. }
  20565. },
  20566. "required": ["read", "write"],
  20567. "additionalProperties": false
  20568. }
  20569. },
  20570. "required": ["input", "output", "reasoning", "cache"],
  20571. "additionalProperties": false
  20572. },
  20573. "time": {
  20574. "type": "object",
  20575. "properties": {
  20576. "created": {
  20577. "type": "number"
  20578. },
  20579. "updated": {
  20580. "type": "number"
  20581. },
  20582. "archived": {
  20583. "type": "number"
  20584. }
  20585. },
  20586. "required": ["created", "updated"],
  20587. "additionalProperties": false
  20588. },
  20589. "title": {
  20590. "type": "string"
  20591. }
  20592. },
  20593. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20594. "additionalProperties": false
  20595. },
  20596. "SessionDelivery": {
  20597. "type": "string",
  20598. "enum": ["immediate", "deferred"]
  20599. },
  20600. "SessionMessageAgentSwitched": {
  20601. "type": "object",
  20602. "properties": {
  20603. "id": {
  20604. "type": "string"
  20605. },
  20606. "metadata": {
  20607. "type": "object"
  20608. },
  20609. "time": {
  20610. "type": "object",
  20611. "properties": {
  20612. "created": {
  20613. "type": "number"
  20614. }
  20615. },
  20616. "required": ["created"],
  20617. "additionalProperties": false
  20618. },
  20619. "type": {
  20620. "type": "string",
  20621. "enum": ["agent-switched"]
  20622. },
  20623. "agent": {
  20624. "type": "string"
  20625. }
  20626. },
  20627. "required": ["id", "time", "type", "agent"],
  20628. "additionalProperties": false
  20629. },
  20630. "SessionMessageModelSwitched": {
  20631. "type": "object",
  20632. "properties": {
  20633. "id": {
  20634. "type": "string"
  20635. },
  20636. "metadata": {
  20637. "type": "object"
  20638. },
  20639. "time": {
  20640. "type": "object",
  20641. "properties": {
  20642. "created": {
  20643. "type": "number"
  20644. }
  20645. },
  20646. "required": ["created"],
  20647. "additionalProperties": false
  20648. },
  20649. "type": {
  20650. "type": "string",
  20651. "enum": ["model-switched"]
  20652. },
  20653. "model": {
  20654. "type": "object",
  20655. "properties": {
  20656. "id": {
  20657. "type": "string"
  20658. },
  20659. "providerID": {
  20660. "type": "string"
  20661. },
  20662. "variant": {
  20663. "type": "string"
  20664. }
  20665. },
  20666. "required": ["id", "providerID", "variant"],
  20667. "additionalProperties": false
  20668. }
  20669. },
  20670. "required": ["id", "time", "type", "model"],
  20671. "additionalProperties": false
  20672. },
  20673. "SessionMessageUser": {
  20674. "type": "object",
  20675. "properties": {
  20676. "id": {
  20677. "type": "string"
  20678. },
  20679. "metadata": {
  20680. "type": "object"
  20681. },
  20682. "time": {
  20683. "type": "object",
  20684. "properties": {
  20685. "created": {
  20686. "type": "number"
  20687. }
  20688. },
  20689. "required": ["created"],
  20690. "additionalProperties": false
  20691. },
  20692. "text": {
  20693. "type": "string"
  20694. },
  20695. "files": {
  20696. "type": "array",
  20697. "items": {
  20698. "$ref": "#/components/schemas/PromptFileAttachment"
  20699. }
  20700. },
  20701. "agents": {
  20702. "type": "array",
  20703. "items": {
  20704. "$ref": "#/components/schemas/PromptAgentAttachment"
  20705. }
  20706. },
  20707. "references": {
  20708. "type": "array",
  20709. "items": {
  20710. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20711. }
  20712. },
  20713. "type": {
  20714. "type": "string",
  20715. "enum": ["user"]
  20716. }
  20717. },
  20718. "required": ["id", "time", "text", "type"],
  20719. "additionalProperties": false
  20720. },
  20721. "SessionMessageSynthetic": {
  20722. "type": "object",
  20723. "properties": {
  20724. "id": {
  20725. "type": "string"
  20726. },
  20727. "metadata": {
  20728. "type": "object"
  20729. },
  20730. "time": {
  20731. "type": "object",
  20732. "properties": {
  20733. "created": {
  20734. "type": "number"
  20735. }
  20736. },
  20737. "required": ["created"],
  20738. "additionalProperties": false
  20739. },
  20740. "sessionID": {
  20741. "type": "string",
  20742. "pattern": "^ses"
  20743. },
  20744. "text": {
  20745. "type": "string"
  20746. },
  20747. "type": {
  20748. "type": "string",
  20749. "enum": ["synthetic"]
  20750. }
  20751. },
  20752. "required": ["id", "time", "sessionID", "text", "type"],
  20753. "additionalProperties": false
  20754. },
  20755. "SessionMessageShell": {
  20756. "type": "object",
  20757. "properties": {
  20758. "id": {
  20759. "type": "string"
  20760. },
  20761. "metadata": {
  20762. "type": "object"
  20763. },
  20764. "time": {
  20765. "type": "object",
  20766. "properties": {
  20767. "created": {
  20768. "type": "number"
  20769. },
  20770. "completed": {
  20771. "type": "number"
  20772. }
  20773. },
  20774. "required": ["created"],
  20775. "additionalProperties": false
  20776. },
  20777. "type": {
  20778. "type": "string",
  20779. "enum": ["shell"]
  20780. },
  20781. "callID": {
  20782. "type": "string"
  20783. },
  20784. "command": {
  20785. "type": "string"
  20786. },
  20787. "output": {
  20788. "type": "string"
  20789. }
  20790. },
  20791. "required": ["id", "time", "type", "callID", "command", "output"],
  20792. "additionalProperties": false
  20793. },
  20794. "SessionMessageAssistantText": {
  20795. "type": "object",
  20796. "properties": {
  20797. "type": {
  20798. "type": "string",
  20799. "enum": ["text"]
  20800. },
  20801. "text": {
  20802. "type": "string"
  20803. }
  20804. },
  20805. "required": ["type", "text"],
  20806. "additionalProperties": false
  20807. },
  20808. "SessionMessageAssistantReasoning": {
  20809. "type": "object",
  20810. "properties": {
  20811. "type": {
  20812. "type": "string",
  20813. "enum": ["reasoning"]
  20814. },
  20815. "id": {
  20816. "type": "string"
  20817. },
  20818. "text": {
  20819. "type": "string"
  20820. }
  20821. },
  20822. "required": ["type", "id", "text"],
  20823. "additionalProperties": false
  20824. },
  20825. "SessionMessageToolStatePending": {
  20826. "type": "object",
  20827. "properties": {
  20828. "status": {
  20829. "type": "string",
  20830. "enum": ["pending"]
  20831. },
  20832. "input": {
  20833. "type": "string"
  20834. }
  20835. },
  20836. "required": ["status", "input"],
  20837. "additionalProperties": false
  20838. },
  20839. "SessionMessageToolStateRunning": {
  20840. "type": "object",
  20841. "properties": {
  20842. "status": {
  20843. "type": "string",
  20844. "enum": ["running"]
  20845. },
  20846. "input": {
  20847. "type": "object"
  20848. },
  20849. "structured": {
  20850. "type": "object"
  20851. },
  20852. "content": {
  20853. "type": "array",
  20854. "items": {
  20855. "anyOf": [
  20856. {
  20857. "$ref": "#/components/schemas/ToolTextContent"
  20858. },
  20859. {
  20860. "$ref": "#/components/schemas/ToolFileContent"
  20861. }
  20862. ]
  20863. }
  20864. }
  20865. },
  20866. "required": ["status", "input", "structured", "content"],
  20867. "additionalProperties": false
  20868. },
  20869. "SessionMessageToolStateCompleted": {
  20870. "type": "object",
  20871. "properties": {
  20872. "status": {
  20873. "type": "string",
  20874. "enum": ["completed"]
  20875. },
  20876. "input": {
  20877. "type": "object"
  20878. },
  20879. "attachments": {
  20880. "type": "array",
  20881. "items": {
  20882. "$ref": "#/components/schemas/PromptFileAttachment"
  20883. }
  20884. },
  20885. "content": {
  20886. "type": "array",
  20887. "items": {
  20888. "anyOf": [
  20889. {
  20890. "$ref": "#/components/schemas/ToolTextContent"
  20891. },
  20892. {
  20893. "$ref": "#/components/schemas/ToolFileContent"
  20894. }
  20895. ]
  20896. }
  20897. },
  20898. "structured": {
  20899. "type": "object"
  20900. }
  20901. },
  20902. "required": ["status", "input", "content", "structured"],
  20903. "additionalProperties": false
  20904. },
  20905. "SessionMessageToolStateError": {
  20906. "type": "object",
  20907. "properties": {
  20908. "status": {
  20909. "type": "string",
  20910. "enum": ["error"]
  20911. },
  20912. "input": {
  20913. "type": "object"
  20914. },
  20915. "content": {
  20916. "type": "array",
  20917. "items": {
  20918. "anyOf": [
  20919. {
  20920. "$ref": "#/components/schemas/ToolTextContent"
  20921. },
  20922. {
  20923. "$ref": "#/components/schemas/ToolFileContent"
  20924. }
  20925. ]
  20926. }
  20927. },
  20928. "structured": {
  20929. "type": "object"
  20930. },
  20931. "error": {
  20932. "$ref": "#/components/schemas/SessionErrorUnknown"
  20933. }
  20934. },
  20935. "required": ["status", "input", "content", "structured", "error"],
  20936. "additionalProperties": false
  20937. },
  20938. "SessionMessageAssistantTool": {
  20939. "type": "object",
  20940. "properties": {
  20941. "type": {
  20942. "type": "string",
  20943. "enum": ["tool"]
  20944. },
  20945. "id": {
  20946. "type": "string"
  20947. },
  20948. "name": {
  20949. "type": "string"
  20950. },
  20951. "provider": {
  20952. "type": "object",
  20953. "properties": {
  20954. "executed": {
  20955. "type": "boolean"
  20956. },
  20957. "metadata": {
  20958. "type": "object"
  20959. }
  20960. },
  20961. "required": ["executed"],
  20962. "additionalProperties": false
  20963. },
  20964. "state": {
  20965. "anyOf": [
  20966. {
  20967. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  20968. },
  20969. {
  20970. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  20971. },
  20972. {
  20973. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  20974. },
  20975. {
  20976. "$ref": "#/components/schemas/SessionMessageToolStateError"
  20977. }
  20978. ]
  20979. },
  20980. "time": {
  20981. "type": "object",
  20982. "properties": {
  20983. "created": {
  20984. "type": "number"
  20985. },
  20986. "ran": {
  20987. "type": "number"
  20988. },
  20989. "completed": {
  20990. "type": "number"
  20991. },
  20992. "pruned": {
  20993. "type": "number"
  20994. }
  20995. },
  20996. "required": ["created"],
  20997. "additionalProperties": false
  20998. }
  20999. },
  21000. "required": ["type", "id", "name", "state", "time"],
  21001. "additionalProperties": false
  21002. },
  21003. "SessionMessageAssistant": {
  21004. "type": "object",
  21005. "properties": {
  21006. "id": {
  21007. "type": "string"
  21008. },
  21009. "metadata": {
  21010. "type": "object"
  21011. },
  21012. "time": {
  21013. "type": "object",
  21014. "properties": {
  21015. "created": {
  21016. "type": "number"
  21017. },
  21018. "completed": {
  21019. "type": "number"
  21020. }
  21021. },
  21022. "required": ["created"],
  21023. "additionalProperties": false
  21024. },
  21025. "type": {
  21026. "type": "string",
  21027. "enum": ["assistant"]
  21028. },
  21029. "agent": {
  21030. "type": "string"
  21031. },
  21032. "model": {
  21033. "type": "object",
  21034. "properties": {
  21035. "id": {
  21036. "type": "string"
  21037. },
  21038. "providerID": {
  21039. "type": "string"
  21040. },
  21041. "variant": {
  21042. "type": "string"
  21043. }
  21044. },
  21045. "required": ["id", "providerID", "variant"],
  21046. "additionalProperties": false
  21047. },
  21048. "content": {
  21049. "type": "array",
  21050. "items": {
  21051. "anyOf": [
  21052. {
  21053. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21054. },
  21055. {
  21056. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21057. },
  21058. {
  21059. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21060. }
  21061. ]
  21062. }
  21063. },
  21064. "snapshot": {
  21065. "type": "object",
  21066. "properties": {
  21067. "start": {
  21068. "type": "string"
  21069. },
  21070. "end": {
  21071. "type": "string"
  21072. }
  21073. },
  21074. "additionalProperties": false
  21075. },
  21076. "finish": {
  21077. "type": "string"
  21078. },
  21079. "cost": {
  21080. "type": "number"
  21081. },
  21082. "tokens": {
  21083. "type": "object",
  21084. "properties": {
  21085. "input": {
  21086. "type": "number"
  21087. },
  21088. "output": {
  21089. "type": "number"
  21090. },
  21091. "reasoning": {
  21092. "type": "number"
  21093. },
  21094. "cache": {
  21095. "type": "object",
  21096. "properties": {
  21097. "read": {
  21098. "type": "number"
  21099. },
  21100. "write": {
  21101. "type": "number"
  21102. }
  21103. },
  21104. "required": ["read", "write"],
  21105. "additionalProperties": false
  21106. }
  21107. },
  21108. "required": ["input", "output", "reasoning", "cache"],
  21109. "additionalProperties": false
  21110. },
  21111. "error": {
  21112. "$ref": "#/components/schemas/SessionErrorUnknown"
  21113. }
  21114. },
  21115. "required": ["id", "time", "type", "agent", "model", "content"],
  21116. "additionalProperties": false
  21117. },
  21118. "SessionMessageCompaction": {
  21119. "type": "object",
  21120. "properties": {
  21121. "type": {
  21122. "type": "string",
  21123. "enum": ["compaction"]
  21124. },
  21125. "reason": {
  21126. "type": "string",
  21127. "enum": ["auto", "manual"]
  21128. },
  21129. "summary": {
  21130. "type": "string"
  21131. },
  21132. "include": {
  21133. "type": "string"
  21134. },
  21135. "id": {
  21136. "type": "string"
  21137. },
  21138. "metadata": {
  21139. "type": "object"
  21140. },
  21141. "time": {
  21142. "type": "object",
  21143. "properties": {
  21144. "created": {
  21145. "type": "number"
  21146. }
  21147. },
  21148. "required": ["created"],
  21149. "additionalProperties": false
  21150. }
  21151. },
  21152. "required": ["type", "reason", "summary", "id", "time"],
  21153. "additionalProperties": false
  21154. },
  21155. "SessionMessage": {
  21156. "anyOf": [
  21157. {
  21158. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21159. },
  21160. {
  21161. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21162. },
  21163. {
  21164. "$ref": "#/components/schemas/SessionMessageUser"
  21165. },
  21166. {
  21167. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21168. },
  21169. {
  21170. "$ref": "#/components/schemas/SessionMessageShell"
  21171. },
  21172. {
  21173. "$ref": "#/components/schemas/SessionMessageAssistant"
  21174. },
  21175. {
  21176. "$ref": "#/components/schemas/SessionMessageCompaction"
  21177. }
  21178. ]
  21179. },
  21180. "ProviderV2Info": {
  21181. "type": "object",
  21182. "properties": {
  21183. "id": {
  21184. "type": "string"
  21185. },
  21186. "name": {
  21187. "type": "string"
  21188. },
  21189. "enabled": {
  21190. "anyOf": [
  21191. {
  21192. "type": "boolean",
  21193. "enum": [false]
  21194. },
  21195. {
  21196. "type": "object",
  21197. "properties": {
  21198. "via": {
  21199. "type": "string",
  21200. "enum": ["env"]
  21201. },
  21202. "name": {
  21203. "type": "string"
  21204. }
  21205. },
  21206. "required": ["via", "name"],
  21207. "additionalProperties": false
  21208. },
  21209. {
  21210. "type": "object",
  21211. "properties": {
  21212. "via": {
  21213. "type": "string",
  21214. "enum": ["account"]
  21215. },
  21216. "service": {
  21217. "type": "string"
  21218. }
  21219. },
  21220. "required": ["via", "service"],
  21221. "additionalProperties": false
  21222. },
  21223. {
  21224. "type": "object",
  21225. "properties": {
  21226. "via": {
  21227. "type": "string",
  21228. "enum": ["custom"]
  21229. },
  21230. "data": {
  21231. "type": "object"
  21232. }
  21233. },
  21234. "required": ["via", "data"],
  21235. "additionalProperties": false
  21236. }
  21237. ]
  21238. },
  21239. "env": {
  21240. "type": "array",
  21241. "items": {
  21242. "type": "string"
  21243. }
  21244. },
  21245. "endpoint": {
  21246. "anyOf": [
  21247. {
  21248. "type": "object",
  21249. "properties": {
  21250. "type": {
  21251. "type": "string",
  21252. "enum": ["unknown"]
  21253. }
  21254. },
  21255. "required": ["type"],
  21256. "additionalProperties": false
  21257. },
  21258. {
  21259. "type": "object",
  21260. "properties": {
  21261. "type": {
  21262. "type": "string",
  21263. "enum": ["openai/responses"]
  21264. },
  21265. "url": {
  21266. "type": "string"
  21267. },
  21268. "websocket": {
  21269. "type": "boolean"
  21270. }
  21271. },
  21272. "required": ["type", "url"],
  21273. "additionalProperties": false
  21274. },
  21275. {
  21276. "type": "object",
  21277. "properties": {
  21278. "type": {
  21279. "type": "string",
  21280. "enum": ["openai/completions"]
  21281. },
  21282. "url": {
  21283. "type": "string"
  21284. },
  21285. "reasoning": {
  21286. "anyOf": [
  21287. {
  21288. "type": "object",
  21289. "properties": {
  21290. "type": {
  21291. "type": "string",
  21292. "enum": ["reasoning_content"]
  21293. }
  21294. },
  21295. "required": ["type"],
  21296. "additionalProperties": false
  21297. },
  21298. {
  21299. "type": "object",
  21300. "properties": {
  21301. "type": {
  21302. "type": "string",
  21303. "enum": ["reasoning_details"]
  21304. }
  21305. },
  21306. "required": ["type"],
  21307. "additionalProperties": false
  21308. }
  21309. ]
  21310. }
  21311. },
  21312. "required": ["type", "url"],
  21313. "additionalProperties": false
  21314. },
  21315. {
  21316. "type": "object",
  21317. "properties": {
  21318. "type": {
  21319. "type": "string",
  21320. "enum": ["anthropic/messages"]
  21321. },
  21322. "url": {
  21323. "type": "string"
  21324. }
  21325. },
  21326. "required": ["type", "url"],
  21327. "additionalProperties": false
  21328. },
  21329. {
  21330. "type": "object",
  21331. "properties": {
  21332. "type": {
  21333. "type": "string",
  21334. "enum": ["aisdk"]
  21335. },
  21336. "package": {
  21337. "type": "string"
  21338. },
  21339. "url": {
  21340. "type": "string"
  21341. }
  21342. },
  21343. "required": ["type", "package"],
  21344. "additionalProperties": false
  21345. }
  21346. ]
  21347. },
  21348. "options": {
  21349. "type": "object",
  21350. "properties": {
  21351. "headers": {
  21352. "type": "object",
  21353. "additionalProperties": {
  21354. "type": "string"
  21355. }
  21356. },
  21357. "body": {
  21358. "type": "object"
  21359. },
  21360. "aisdk": {
  21361. "type": "object",
  21362. "properties": {
  21363. "provider": {
  21364. "type": "object"
  21365. },
  21366. "request": {
  21367. "type": "object"
  21368. }
  21369. },
  21370. "required": ["provider", "request"],
  21371. "additionalProperties": false
  21372. }
  21373. },
  21374. "required": ["headers", "body", "aisdk"],
  21375. "additionalProperties": false
  21376. }
  21377. },
  21378. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21379. "additionalProperties": false
  21380. },
  21381. "EventTuiToastShow1": {
  21382. "type": "object",
  21383. "properties": {
  21384. "id": {
  21385. "type": "string"
  21386. },
  21387. "type": {
  21388. "type": "string",
  21389. "enum": ["tui.toast.show"]
  21390. },
  21391. "properties": {
  21392. "type": "object",
  21393. "properties": {
  21394. "title": {
  21395. "type": "string"
  21396. },
  21397. "message": {
  21398. "type": "string"
  21399. },
  21400. "variant": {
  21401. "type": "string",
  21402. "enum": ["info", "success", "warning", "error"]
  21403. },
  21404. "duration": {
  21405. "type": "integer",
  21406. "exclusiveMinimum": 0
  21407. }
  21408. },
  21409. "required": ["message", "variant"],
  21410. "additionalProperties": false
  21411. }
  21412. },
  21413. "required": ["id", "type", "properties"],
  21414. "additionalProperties": false
  21415. },
  21416. "ModelV2Info1": {
  21417. "type": "object",
  21418. "properties": {
  21419. "id": {
  21420. "type": "string"
  21421. },
  21422. "apiID": {
  21423. "type": "string"
  21424. },
  21425. "providerID": {
  21426. "type": "string"
  21427. },
  21428. "family": {
  21429. "type": "string"
  21430. },
  21431. "name": {
  21432. "type": "string"
  21433. },
  21434. "endpoint": {
  21435. "anyOf": [
  21436. {
  21437. "type": "object",
  21438. "properties": {
  21439. "type": {
  21440. "type": "string",
  21441. "enum": ["unknown"]
  21442. }
  21443. },
  21444. "required": ["type"],
  21445. "additionalProperties": false
  21446. },
  21447. {
  21448. "type": "object",
  21449. "properties": {
  21450. "type": {
  21451. "type": "string",
  21452. "enum": ["openai/responses"]
  21453. },
  21454. "url": {
  21455. "type": "string"
  21456. },
  21457. "websocket": {
  21458. "type": "boolean"
  21459. }
  21460. },
  21461. "required": ["type", "url"],
  21462. "additionalProperties": false
  21463. },
  21464. {
  21465. "type": "object",
  21466. "properties": {
  21467. "type": {
  21468. "type": "string",
  21469. "enum": ["openai/completions"]
  21470. },
  21471. "url": {
  21472. "type": "string"
  21473. },
  21474. "reasoning": {
  21475. "anyOf": [
  21476. {
  21477. "type": "object",
  21478. "properties": {
  21479. "type": {
  21480. "type": "string",
  21481. "enum": ["reasoning_content"]
  21482. }
  21483. },
  21484. "required": ["type"],
  21485. "additionalProperties": false
  21486. },
  21487. {
  21488. "type": "object",
  21489. "properties": {
  21490. "type": {
  21491. "type": "string",
  21492. "enum": ["reasoning_details"]
  21493. }
  21494. },
  21495. "required": ["type"],
  21496. "additionalProperties": false
  21497. }
  21498. ]
  21499. }
  21500. },
  21501. "required": ["type", "url"],
  21502. "additionalProperties": false
  21503. },
  21504. {
  21505. "type": "object",
  21506. "properties": {
  21507. "type": {
  21508. "type": "string",
  21509. "enum": ["anthropic/messages"]
  21510. },
  21511. "url": {
  21512. "type": "string"
  21513. }
  21514. },
  21515. "required": ["type", "url"],
  21516. "additionalProperties": false
  21517. },
  21518. {
  21519. "type": "object",
  21520. "properties": {
  21521. "type": {
  21522. "type": "string",
  21523. "enum": ["aisdk"]
  21524. },
  21525. "package": {
  21526. "type": "string"
  21527. },
  21528. "url": {
  21529. "type": "string"
  21530. }
  21531. },
  21532. "required": ["type", "package"],
  21533. "additionalProperties": false
  21534. }
  21535. ]
  21536. },
  21537. "capabilities": {
  21538. "type": "object",
  21539. "properties": {
  21540. "tools": {
  21541. "type": "boolean"
  21542. },
  21543. "input": {
  21544. "type": "array",
  21545. "items": {
  21546. "type": "string"
  21547. }
  21548. },
  21549. "output": {
  21550. "type": "array",
  21551. "items": {
  21552. "type": "string"
  21553. }
  21554. }
  21555. },
  21556. "required": ["tools", "input", "output"],
  21557. "additionalProperties": false
  21558. },
  21559. "options": {
  21560. "type": "object",
  21561. "properties": {
  21562. "headers": {
  21563. "type": "object",
  21564. "additionalProperties": {
  21565. "type": "string"
  21566. }
  21567. },
  21568. "body": {
  21569. "type": "object"
  21570. },
  21571. "aisdk": {
  21572. "type": "object",
  21573. "properties": {
  21574. "provider": {
  21575. "type": "object"
  21576. },
  21577. "request": {
  21578. "type": "object"
  21579. }
  21580. },
  21581. "required": ["provider", "request"],
  21582. "additionalProperties": false
  21583. },
  21584. "variant": {
  21585. "type": "string"
  21586. }
  21587. },
  21588. "required": ["headers", "body", "aisdk"],
  21589. "additionalProperties": false
  21590. },
  21591. "variants": {
  21592. "type": "array",
  21593. "items": {
  21594. "type": "object",
  21595. "properties": {
  21596. "id": {
  21597. "type": "string"
  21598. },
  21599. "headers": {
  21600. "type": "object",
  21601. "additionalProperties": {
  21602. "type": "string"
  21603. }
  21604. },
  21605. "body": {
  21606. "type": "object"
  21607. },
  21608. "aisdk": {
  21609. "type": "object",
  21610. "properties": {
  21611. "provider": {
  21612. "type": "object"
  21613. },
  21614. "request": {
  21615. "type": "object"
  21616. }
  21617. },
  21618. "required": ["provider", "request"],
  21619. "additionalProperties": false
  21620. }
  21621. },
  21622. "required": ["id", "headers", "body", "aisdk"],
  21623. "additionalProperties": false
  21624. }
  21625. },
  21626. "time": {
  21627. "type": "object",
  21628. "properties": {
  21629. "released": {
  21630. "anyOf": [
  21631. {
  21632. "type": "number"
  21633. },
  21634. {
  21635. "type": "string",
  21636. "enum": ["NaN"]
  21637. },
  21638. {
  21639. "type": "string",
  21640. "enum": ["Infinity"]
  21641. },
  21642. {
  21643. "type": "string",
  21644. "enum": ["-Infinity"]
  21645. }
  21646. ]
  21647. }
  21648. },
  21649. "required": ["released"],
  21650. "additionalProperties": false
  21651. },
  21652. "cost": {
  21653. "type": "array",
  21654. "items": {
  21655. "type": "object",
  21656. "properties": {
  21657. "tier": {
  21658. "type": "object",
  21659. "properties": {
  21660. "type": {
  21661. "type": "string",
  21662. "enum": ["context"]
  21663. },
  21664. "size": {
  21665. "type": "integer"
  21666. }
  21667. },
  21668. "required": ["type", "size"],
  21669. "additionalProperties": false
  21670. },
  21671. "input": {
  21672. "type": "number"
  21673. },
  21674. "output": {
  21675. "type": "number"
  21676. },
  21677. "cache": {
  21678. "type": "object",
  21679. "properties": {
  21680. "read": {
  21681. "type": "number"
  21682. },
  21683. "write": {
  21684. "type": "number"
  21685. }
  21686. },
  21687. "required": ["read", "write"],
  21688. "additionalProperties": false
  21689. }
  21690. },
  21691. "required": ["input", "output", "cache"],
  21692. "additionalProperties": false
  21693. }
  21694. },
  21695. "status": {
  21696. "type": "string",
  21697. "enum": ["alpha", "beta", "deprecated", "active"]
  21698. },
  21699. "enabled": {
  21700. "type": "boolean"
  21701. },
  21702. "limit": {
  21703. "type": "object",
  21704. "properties": {
  21705. "context": {
  21706. "type": "integer"
  21707. },
  21708. "input": {
  21709. "type": "integer"
  21710. },
  21711. "output": {
  21712. "type": "integer"
  21713. }
  21714. },
  21715. "required": ["context", "output"],
  21716. "additionalProperties": false
  21717. }
  21718. },
  21719. "required": [
  21720. "id",
  21721. "apiID",
  21722. "providerID",
  21723. "name",
  21724. "endpoint",
  21725. "capabilities",
  21726. "options",
  21727. "variants",
  21728. "time",
  21729. "cost",
  21730. "status",
  21731. "enabled",
  21732. "limit"
  21733. ],
  21734. "additionalProperties": false
  21735. },
  21736. "BadRequestError": {
  21737. "type": "object",
  21738. "required": ["name", "data"],
  21739. "properties": {
  21740. "name": {
  21741. "type": "string",
  21742. "enum": ["BadRequest"]
  21743. },
  21744. "data": {
  21745. "type": "object",
  21746. "required": ["message"],
  21747. "properties": {
  21748. "message": {
  21749. "type": "string"
  21750. },
  21751. "kind": {
  21752. "type": "string",
  21753. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  21754. }
  21755. }
  21756. }
  21757. }
  21758. }
  21759. }
  21760. },
  21761. "security": [],
  21762. "tags": [
  21763. {
  21764. "name": "control",
  21765. "description": "Control plane routes."
  21766. },
  21767. {
  21768. "name": "global",
  21769. "description": "Global server routes."
  21770. },
  21771. {
  21772. "name": "event",
  21773. "description": "Instance event stream route."
  21774. },
  21775. {
  21776. "name": "config",
  21777. "description": "Experimental HttpApi config routes."
  21778. },
  21779. {
  21780. "name": "experimental",
  21781. "description": "Experimental HttpApi read-only routes."
  21782. },
  21783. {
  21784. "name": "file",
  21785. "description": "Experimental HttpApi file routes."
  21786. },
  21787. {
  21788. "name": "instance",
  21789. "description": "Experimental HttpApi instance read routes."
  21790. },
  21791. {
  21792. "name": "mcp",
  21793. "description": "Experimental HttpApi MCP routes."
  21794. },
  21795. {
  21796. "name": "project",
  21797. "description": "Experimental HttpApi project routes."
  21798. },
  21799. {
  21800. "name": "pty",
  21801. "description": "Experimental HttpApi PTY routes."
  21802. },
  21803. {
  21804. "name": "question",
  21805. "description": "Question routes."
  21806. },
  21807. {
  21808. "name": "permission",
  21809. "description": "Experimental HttpApi permission routes."
  21810. },
  21811. {
  21812. "name": "provider",
  21813. "description": "Experimental HttpApi provider routes."
  21814. },
  21815. {
  21816. "name": "session",
  21817. "description": "Experimental HttpApi session routes."
  21818. },
  21819. {
  21820. "name": "sync",
  21821. "description": "Experimental HttpApi sync routes."
  21822. },
  21823. {
  21824. "name": "v2",
  21825. "description": "Experimental v2 routes."
  21826. },
  21827. {
  21828. "name": "v2 messages",
  21829. "description": "Experimental v2 message routes."
  21830. },
  21831. {
  21832. "name": "v2 models",
  21833. "description": "Experimental v2 model routes."
  21834. },
  21835. {
  21836. "name": "v2 providers",
  21837. "description": "Experimental v2 provider routes."
  21838. },
  21839. {
  21840. "name": "tui",
  21841. "description": "Experimental HttpApi TUI routes."
  21842. },
  21843. {
  21844. "name": "workspace",
  21845. "description": "Experimental HttpApi workspace routes."
  21846. },
  21847. {
  21848. "name": "pty",
  21849. "description": "PTY websocket route."
  21850. }
  21851. ]
  21852. }