openapi.json 599 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843
  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/SyncEventMessageUpdated"
  12999. },
  13000. {
  13001. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13002. },
  13003. {
  13004. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13005. },
  13006. {
  13007. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13008. },
  13009. {
  13010. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13011. },
  13012. {
  13013. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13014. },
  13015. {
  13016. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13017. },
  13018. {
  13019. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13020. },
  13021. {
  13022. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13023. },
  13024. {
  13025. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13026. },
  13027. {
  13028. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13029. },
  13030. {
  13031. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13032. },
  13033. {
  13034. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13035. },
  13036. {
  13037. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13038. },
  13039. {
  13040. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13041. },
  13042. {
  13043. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13044. },
  13045. {
  13046. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13047. },
  13048. {
  13049. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13050. },
  13051. {
  13052. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13053. },
  13054. {
  13055. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13056. },
  13057. {
  13058. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13059. },
  13060. {
  13061. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13062. },
  13063. {
  13064. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13065. },
  13066. {
  13067. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13068. },
  13069. {
  13070. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13071. },
  13072. {
  13073. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13074. },
  13075. {
  13076. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13077. },
  13078. {
  13079. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13080. },
  13081. {
  13082. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13083. },
  13084. {
  13085. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13086. },
  13087. {
  13088. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13089. },
  13090. {
  13091. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13092. },
  13093. {
  13094. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13095. }
  13096. ]
  13097. }
  13098. },
  13099. "required": ["directory", "payload"],
  13100. "additionalProperties": false
  13101. },
  13102. "LogLevel": {
  13103. "type": "string",
  13104. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13105. "description": "Log level"
  13106. },
  13107. "ServerConfig": {
  13108. "type": "object",
  13109. "properties": {
  13110. "port": {
  13111. "type": "integer",
  13112. "exclusiveMinimum": 0
  13113. },
  13114. "hostname": {
  13115. "type": "string"
  13116. },
  13117. "mdns": {
  13118. "type": "boolean"
  13119. },
  13120. "mdnsDomain": {
  13121. "type": "string"
  13122. },
  13123. "cors": {
  13124. "type": "array",
  13125. "items": {
  13126. "type": "string"
  13127. }
  13128. }
  13129. },
  13130. "additionalProperties": false,
  13131. "description": "Server configuration for opencode serve and web commands"
  13132. },
  13133. "ReferenceConfigEntry": {
  13134. "anyOf": [
  13135. {
  13136. "type": "string"
  13137. },
  13138. {
  13139. "type": "object",
  13140. "properties": {
  13141. "repository": {
  13142. "type": "string",
  13143. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13144. },
  13145. "branch": {
  13146. "type": "string"
  13147. }
  13148. },
  13149. "required": ["repository"],
  13150. "additionalProperties": false
  13151. },
  13152. {
  13153. "type": "object",
  13154. "properties": {
  13155. "path": {
  13156. "type": "string",
  13157. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13158. }
  13159. },
  13160. "required": ["path"],
  13161. "additionalProperties": false
  13162. }
  13163. ]
  13164. },
  13165. "ReferenceConfig": {
  13166. "type": "object",
  13167. "additionalProperties": {
  13168. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13169. }
  13170. },
  13171. "PermissionActionConfig": {
  13172. "type": "string",
  13173. "enum": ["ask", "allow", "deny"]
  13174. },
  13175. "PermissionObjectConfig": {
  13176. "type": "object",
  13177. "additionalProperties": {
  13178. "$ref": "#/components/schemas/PermissionActionConfig"
  13179. }
  13180. },
  13181. "PermissionRuleConfig": {
  13182. "anyOf": [
  13183. {
  13184. "$ref": "#/components/schemas/PermissionActionConfig"
  13185. },
  13186. {
  13187. "$ref": "#/components/schemas/PermissionObjectConfig"
  13188. }
  13189. ]
  13190. },
  13191. "PermissionConfig": {
  13192. "anyOf": [
  13193. {
  13194. "$ref": "#/components/schemas/PermissionActionConfig"
  13195. },
  13196. {
  13197. "type": "object",
  13198. "properties": {
  13199. "read": {
  13200. "$ref": "#/components/schemas/PermissionRuleConfig"
  13201. },
  13202. "edit": {
  13203. "$ref": "#/components/schemas/PermissionRuleConfig"
  13204. },
  13205. "glob": {
  13206. "$ref": "#/components/schemas/PermissionRuleConfig"
  13207. },
  13208. "grep": {
  13209. "$ref": "#/components/schemas/PermissionRuleConfig"
  13210. },
  13211. "list": {
  13212. "$ref": "#/components/schemas/PermissionRuleConfig"
  13213. },
  13214. "bash": {
  13215. "$ref": "#/components/schemas/PermissionRuleConfig"
  13216. },
  13217. "task": {
  13218. "$ref": "#/components/schemas/PermissionRuleConfig"
  13219. },
  13220. "external_directory": {
  13221. "$ref": "#/components/schemas/PermissionRuleConfig"
  13222. },
  13223. "todowrite": {
  13224. "$ref": "#/components/schemas/PermissionActionConfig"
  13225. },
  13226. "question": {
  13227. "$ref": "#/components/schemas/PermissionActionConfig"
  13228. },
  13229. "webfetch": {
  13230. "$ref": "#/components/schemas/PermissionActionConfig"
  13231. },
  13232. "websearch": {
  13233. "$ref": "#/components/schemas/PermissionActionConfig"
  13234. },
  13235. "repo_clone": {
  13236. "$ref": "#/components/schemas/PermissionRuleConfig"
  13237. },
  13238. "repo_overview": {
  13239. "$ref": "#/components/schemas/PermissionRuleConfig"
  13240. },
  13241. "lsp": {
  13242. "$ref": "#/components/schemas/PermissionRuleConfig"
  13243. },
  13244. "doom_loop": {
  13245. "$ref": "#/components/schemas/PermissionActionConfig"
  13246. },
  13247. "skill": {
  13248. "$ref": "#/components/schemas/PermissionRuleConfig"
  13249. }
  13250. },
  13251. "additionalProperties": {
  13252. "$ref": "#/components/schemas/PermissionRuleConfig"
  13253. }
  13254. }
  13255. ]
  13256. },
  13257. "AgentConfig": {
  13258. "type": "object",
  13259. "properties": {
  13260. "model": {
  13261. "type": "string"
  13262. },
  13263. "variant": {
  13264. "type": "string"
  13265. },
  13266. "temperature": {
  13267. "type": "number"
  13268. },
  13269. "top_p": {
  13270. "type": "number"
  13271. },
  13272. "prompt": {
  13273. "type": "string"
  13274. },
  13275. "tools": {
  13276. "type": "object",
  13277. "additionalProperties": {
  13278. "type": "boolean"
  13279. }
  13280. },
  13281. "disable": {
  13282. "type": "boolean"
  13283. },
  13284. "description": {
  13285. "type": "string"
  13286. },
  13287. "mode": {
  13288. "type": "string",
  13289. "enum": ["subagent", "primary", "all"]
  13290. },
  13291. "hidden": {
  13292. "type": "boolean"
  13293. },
  13294. "options": {
  13295. "type": "object"
  13296. },
  13297. "color": {
  13298. "anyOf": [
  13299. {
  13300. "type": "string",
  13301. "pattern": "^#[0-9a-fA-F]{6}$"
  13302. },
  13303. {
  13304. "type": "string",
  13305. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13306. }
  13307. ],
  13308. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13309. },
  13310. "steps": {
  13311. "type": "integer",
  13312. "exclusiveMinimum": 0
  13313. },
  13314. "maxSteps": {
  13315. "type": "integer",
  13316. "exclusiveMinimum": 0
  13317. },
  13318. "permission": {
  13319. "$ref": "#/components/schemas/PermissionConfig"
  13320. }
  13321. },
  13322. "additionalProperties": {}
  13323. },
  13324. "ProviderConfig": {
  13325. "type": "object",
  13326. "properties": {
  13327. "api": {
  13328. "type": "string"
  13329. },
  13330. "name": {
  13331. "type": "string"
  13332. },
  13333. "env": {
  13334. "type": "array",
  13335. "items": {
  13336. "type": "string"
  13337. }
  13338. },
  13339. "id": {
  13340. "type": "string"
  13341. },
  13342. "npm": {
  13343. "type": "string"
  13344. },
  13345. "whitelist": {
  13346. "type": "array",
  13347. "items": {
  13348. "type": "string"
  13349. }
  13350. },
  13351. "blacklist": {
  13352. "type": "array",
  13353. "items": {
  13354. "type": "string"
  13355. }
  13356. },
  13357. "options": {
  13358. "type": "object",
  13359. "properties": {
  13360. "apiKey": {
  13361. "type": "string"
  13362. },
  13363. "baseURL": {
  13364. "type": "string"
  13365. },
  13366. "enterpriseUrl": {
  13367. "type": "string"
  13368. },
  13369. "setCacheKey": {
  13370. "type": "boolean"
  13371. },
  13372. "timeout": {
  13373. "anyOf": [
  13374. {
  13375. "type": "integer",
  13376. "exclusiveMinimum": 0
  13377. },
  13378. {
  13379. "type": "boolean",
  13380. "enum": [false]
  13381. }
  13382. ],
  13383. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13384. },
  13385. "chunkTimeout": {
  13386. "type": "integer",
  13387. "exclusiveMinimum": 0
  13388. }
  13389. },
  13390. "additionalProperties": {}
  13391. },
  13392. "models": {
  13393. "type": "object",
  13394. "additionalProperties": {
  13395. "type": "object",
  13396. "properties": {
  13397. "id": {
  13398. "type": "string"
  13399. },
  13400. "name": {
  13401. "type": "string"
  13402. },
  13403. "family": {
  13404. "type": "string"
  13405. },
  13406. "release_date": {
  13407. "type": "string"
  13408. },
  13409. "attachment": {
  13410. "type": "boolean"
  13411. },
  13412. "reasoning": {
  13413. "type": "boolean"
  13414. },
  13415. "temperature": {
  13416. "type": "boolean"
  13417. },
  13418. "tool_call": {
  13419. "type": "boolean"
  13420. },
  13421. "interleaved": {
  13422. "anyOf": [
  13423. {
  13424. "type": "boolean",
  13425. "enum": [true]
  13426. },
  13427. {
  13428. "type": "object",
  13429. "properties": {
  13430. "field": {
  13431. "type": "string",
  13432. "enum": ["reasoning_content", "reasoning_details"]
  13433. }
  13434. },
  13435. "required": ["field"],
  13436. "additionalProperties": false
  13437. }
  13438. ]
  13439. },
  13440. "cost": {
  13441. "type": "object",
  13442. "properties": {
  13443. "input": {
  13444. "type": "number"
  13445. },
  13446. "output": {
  13447. "type": "number"
  13448. },
  13449. "cache_read": {
  13450. "type": "number"
  13451. },
  13452. "cache_write": {
  13453. "type": "number"
  13454. },
  13455. "context_over_200k": {
  13456. "type": "object",
  13457. "properties": {
  13458. "input": {
  13459. "type": "number"
  13460. },
  13461. "output": {
  13462. "type": "number"
  13463. },
  13464. "cache_read": {
  13465. "type": "number"
  13466. },
  13467. "cache_write": {
  13468. "type": "number"
  13469. }
  13470. },
  13471. "required": ["input", "output"],
  13472. "additionalProperties": false
  13473. }
  13474. },
  13475. "required": ["input", "output"],
  13476. "additionalProperties": false
  13477. },
  13478. "limit": {
  13479. "type": "object",
  13480. "properties": {
  13481. "context": {
  13482. "type": "number"
  13483. },
  13484. "input": {
  13485. "type": "number"
  13486. },
  13487. "output": {
  13488. "type": "number"
  13489. }
  13490. },
  13491. "required": ["context", "output"],
  13492. "additionalProperties": false
  13493. },
  13494. "modalities": {
  13495. "type": "object",
  13496. "properties": {
  13497. "input": {
  13498. "type": "array",
  13499. "items": {
  13500. "type": "string",
  13501. "enum": ["text", "audio", "image", "video", "pdf"]
  13502. }
  13503. },
  13504. "output": {
  13505. "type": "array",
  13506. "items": {
  13507. "type": "string",
  13508. "enum": ["text", "audio", "image", "video", "pdf"]
  13509. }
  13510. }
  13511. },
  13512. "required": ["input", "output"],
  13513. "additionalProperties": false
  13514. },
  13515. "experimental": {
  13516. "type": "boolean"
  13517. },
  13518. "status": {
  13519. "type": "string",
  13520. "enum": ["alpha", "beta", "deprecated", "active"]
  13521. },
  13522. "provider": {
  13523. "type": "object",
  13524. "properties": {
  13525. "npm": {
  13526. "type": "string"
  13527. },
  13528. "api": {
  13529. "type": "string"
  13530. }
  13531. },
  13532. "additionalProperties": false
  13533. },
  13534. "options": {
  13535. "type": "object"
  13536. },
  13537. "headers": {
  13538. "type": "object",
  13539. "additionalProperties": {
  13540. "type": "string"
  13541. }
  13542. },
  13543. "variants": {
  13544. "type": "object",
  13545. "additionalProperties": {
  13546. "type": "object",
  13547. "properties": {
  13548. "disabled": {
  13549. "type": "boolean"
  13550. }
  13551. },
  13552. "additionalProperties": {}
  13553. },
  13554. "description": "Variant-specific configuration"
  13555. }
  13556. },
  13557. "additionalProperties": false
  13558. }
  13559. }
  13560. },
  13561. "additionalProperties": false
  13562. },
  13563. "McpLocalConfig": {
  13564. "type": "object",
  13565. "properties": {
  13566. "type": {
  13567. "type": "string",
  13568. "enum": ["local"],
  13569. "description": "Type of MCP server connection"
  13570. },
  13571. "command": {
  13572. "type": "array",
  13573. "items": {
  13574. "type": "string"
  13575. },
  13576. "description": "Command and arguments to run the MCP server"
  13577. },
  13578. "environment": {
  13579. "type": "object",
  13580. "additionalProperties": {
  13581. "type": "string"
  13582. }
  13583. },
  13584. "enabled": {
  13585. "type": "boolean"
  13586. },
  13587. "timeout": {
  13588. "type": "integer",
  13589. "exclusiveMinimum": 0
  13590. }
  13591. },
  13592. "required": ["type", "command"],
  13593. "additionalProperties": false
  13594. },
  13595. "McpOAuthConfig": {
  13596. "type": "object",
  13597. "properties": {
  13598. "clientId": {
  13599. "type": "string"
  13600. },
  13601. "clientSecret": {
  13602. "type": "string"
  13603. },
  13604. "scope": {
  13605. "type": "string"
  13606. },
  13607. "redirectUri": {
  13608. "type": "string"
  13609. }
  13610. },
  13611. "additionalProperties": false
  13612. },
  13613. "McpRemoteConfig": {
  13614. "type": "object",
  13615. "properties": {
  13616. "type": {
  13617. "type": "string",
  13618. "enum": ["remote"],
  13619. "description": "Type of MCP server connection"
  13620. },
  13621. "url": {
  13622. "type": "string",
  13623. "description": "URL of the remote MCP server"
  13624. },
  13625. "enabled": {
  13626. "type": "boolean"
  13627. },
  13628. "headers": {
  13629. "type": "object",
  13630. "additionalProperties": {
  13631. "type": "string"
  13632. }
  13633. },
  13634. "oauth": {
  13635. "anyOf": [
  13636. {
  13637. "$ref": "#/components/schemas/McpOAuthConfig"
  13638. },
  13639. {
  13640. "type": "boolean",
  13641. "enum": [false]
  13642. }
  13643. ],
  13644. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13645. },
  13646. "timeout": {
  13647. "type": "integer",
  13648. "exclusiveMinimum": 0
  13649. }
  13650. },
  13651. "required": ["type", "url"],
  13652. "additionalProperties": false
  13653. },
  13654. "LayoutConfig": {
  13655. "type": "string",
  13656. "enum": ["auto", "stretch"],
  13657. "description": "@deprecated Always uses stretch layout."
  13658. },
  13659. "ImageAttachmentConfig": {
  13660. "type": "object",
  13661. "properties": {
  13662. "auto_resize": {
  13663. "type": "boolean"
  13664. },
  13665. "max_width": {
  13666. "type": "integer",
  13667. "exclusiveMinimum": 0
  13668. },
  13669. "max_height": {
  13670. "type": "integer",
  13671. "exclusiveMinimum": 0
  13672. },
  13673. "max_base64_bytes": {
  13674. "type": "integer",
  13675. "exclusiveMinimum": 0
  13676. }
  13677. },
  13678. "additionalProperties": false
  13679. },
  13680. "AttachmentConfig": {
  13681. "type": "object",
  13682. "properties": {
  13683. "image": {
  13684. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13685. }
  13686. },
  13687. "additionalProperties": false
  13688. },
  13689. "Config": {
  13690. "type": "object",
  13691. "properties": {
  13692. "$schema": {
  13693. "type": "string"
  13694. },
  13695. "shell": {
  13696. "type": "string"
  13697. },
  13698. "logLevel": {
  13699. "$ref": "#/components/schemas/LogLevel"
  13700. },
  13701. "server": {
  13702. "$ref": "#/components/schemas/ServerConfig"
  13703. },
  13704. "command": {
  13705. "type": "object",
  13706. "additionalProperties": {
  13707. "type": "object",
  13708. "properties": {
  13709. "template": {
  13710. "type": "string"
  13711. },
  13712. "description": {
  13713. "type": "string"
  13714. },
  13715. "agent": {
  13716. "type": "string"
  13717. },
  13718. "model": {
  13719. "type": "string"
  13720. },
  13721. "subtask": {
  13722. "type": "boolean"
  13723. }
  13724. },
  13725. "required": ["template"],
  13726. "additionalProperties": false
  13727. }
  13728. },
  13729. "skills": {
  13730. "type": "object",
  13731. "properties": {
  13732. "paths": {
  13733. "type": "array",
  13734. "items": {
  13735. "type": "string"
  13736. }
  13737. },
  13738. "urls": {
  13739. "type": "array",
  13740. "items": {
  13741. "type": "string"
  13742. }
  13743. }
  13744. },
  13745. "additionalProperties": false
  13746. },
  13747. "reference": {
  13748. "$ref": "#/components/schemas/ReferenceConfig"
  13749. },
  13750. "watcher": {
  13751. "type": "object",
  13752. "properties": {
  13753. "ignore": {
  13754. "type": "array",
  13755. "items": {
  13756. "type": "string"
  13757. }
  13758. }
  13759. },
  13760. "additionalProperties": false
  13761. },
  13762. "snapshot": {
  13763. "type": "boolean"
  13764. },
  13765. "plugin": {
  13766. "type": "array",
  13767. "items": {
  13768. "anyOf": [
  13769. {
  13770. "type": "string"
  13771. },
  13772. {
  13773. "type": "array",
  13774. "prefixItems": [
  13775. {
  13776. "type": "string"
  13777. },
  13778. {
  13779. "type": "object"
  13780. }
  13781. ],
  13782. "maxItems": 2,
  13783. "minItems": 2
  13784. }
  13785. ]
  13786. }
  13787. },
  13788. "share": {
  13789. "type": "string",
  13790. "enum": ["manual", "auto", "disabled"]
  13791. },
  13792. "autoshare": {
  13793. "type": "boolean"
  13794. },
  13795. "autoupdate": {
  13796. "anyOf": [
  13797. {
  13798. "type": "boolean"
  13799. },
  13800. {
  13801. "type": "string",
  13802. "enum": ["notify"]
  13803. }
  13804. ],
  13805. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  13806. },
  13807. "disabled_providers": {
  13808. "type": "array",
  13809. "items": {
  13810. "type": "string"
  13811. }
  13812. },
  13813. "enabled_providers": {
  13814. "type": "array",
  13815. "items": {
  13816. "type": "string"
  13817. }
  13818. },
  13819. "model": {
  13820. "type": "string"
  13821. },
  13822. "small_model": {
  13823. "type": "string"
  13824. },
  13825. "default_agent": {
  13826. "type": "string"
  13827. },
  13828. "username": {
  13829. "type": "string"
  13830. },
  13831. "mode": {
  13832. "type": "object",
  13833. "properties": {
  13834. "build": {
  13835. "$ref": "#/components/schemas/AgentConfig"
  13836. },
  13837. "plan": {
  13838. "$ref": "#/components/schemas/AgentConfig"
  13839. }
  13840. },
  13841. "additionalProperties": {
  13842. "$ref": "#/components/schemas/AgentConfig"
  13843. }
  13844. },
  13845. "agent": {
  13846. "type": "object",
  13847. "properties": {
  13848. "plan": {
  13849. "$ref": "#/components/schemas/AgentConfig"
  13850. },
  13851. "build": {
  13852. "$ref": "#/components/schemas/AgentConfig"
  13853. },
  13854. "general": {
  13855. "$ref": "#/components/schemas/AgentConfig"
  13856. },
  13857. "explore": {
  13858. "$ref": "#/components/schemas/AgentConfig"
  13859. },
  13860. "scout": {
  13861. "$ref": "#/components/schemas/AgentConfig"
  13862. },
  13863. "title": {
  13864. "$ref": "#/components/schemas/AgentConfig"
  13865. },
  13866. "summary": {
  13867. "$ref": "#/components/schemas/AgentConfig"
  13868. },
  13869. "compaction": {
  13870. "$ref": "#/components/schemas/AgentConfig"
  13871. }
  13872. },
  13873. "additionalProperties": {
  13874. "$ref": "#/components/schemas/AgentConfig"
  13875. }
  13876. },
  13877. "provider": {
  13878. "type": "object",
  13879. "additionalProperties": {
  13880. "$ref": "#/components/schemas/ProviderConfig"
  13881. }
  13882. },
  13883. "mcp": {
  13884. "type": "object",
  13885. "additionalProperties": {
  13886. "anyOf": [
  13887. {
  13888. "$ref": "#/components/schemas/McpLocalConfig"
  13889. },
  13890. {
  13891. "$ref": "#/components/schemas/McpRemoteConfig"
  13892. },
  13893. {
  13894. "type": "object",
  13895. "properties": {
  13896. "enabled": {
  13897. "type": "boolean"
  13898. }
  13899. },
  13900. "required": ["enabled"],
  13901. "additionalProperties": false
  13902. }
  13903. ]
  13904. }
  13905. },
  13906. "formatter": {
  13907. "anyOf": [
  13908. {
  13909. "type": "boolean"
  13910. },
  13911. {
  13912. "type": "object",
  13913. "additionalProperties": {
  13914. "type": "object",
  13915. "properties": {
  13916. "disabled": {
  13917. "type": "boolean"
  13918. },
  13919. "command": {
  13920. "type": "array",
  13921. "items": {
  13922. "type": "string"
  13923. }
  13924. },
  13925. "environment": {
  13926. "type": "object",
  13927. "additionalProperties": {
  13928. "type": "string"
  13929. }
  13930. },
  13931. "extensions": {
  13932. "type": "array",
  13933. "items": {
  13934. "type": "string"
  13935. }
  13936. }
  13937. },
  13938. "additionalProperties": false
  13939. }
  13940. }
  13941. ],
  13942. "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."
  13943. },
  13944. "lsp": {
  13945. "anyOf": [
  13946. {
  13947. "type": "boolean"
  13948. },
  13949. {
  13950. "type": "object",
  13951. "additionalProperties": {
  13952. "anyOf": [
  13953. {
  13954. "type": "object",
  13955. "properties": {
  13956. "disabled": {
  13957. "type": "boolean",
  13958. "enum": [true]
  13959. }
  13960. },
  13961. "required": ["disabled"],
  13962. "additionalProperties": false
  13963. },
  13964. {
  13965. "type": "object",
  13966. "properties": {
  13967. "command": {
  13968. "type": "array",
  13969. "items": {
  13970. "type": "string"
  13971. }
  13972. },
  13973. "extensions": {
  13974. "type": "array",
  13975. "items": {
  13976. "type": "string"
  13977. }
  13978. },
  13979. "disabled": {
  13980. "type": "boolean"
  13981. },
  13982. "env": {
  13983. "type": "object",
  13984. "additionalProperties": {
  13985. "type": "string"
  13986. }
  13987. },
  13988. "initialization": {
  13989. "type": "object"
  13990. }
  13991. },
  13992. "required": ["command"],
  13993. "additionalProperties": false
  13994. }
  13995. ]
  13996. }
  13997. }
  13998. ],
  13999. "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."
  14000. },
  14001. "instructions": {
  14002. "type": "array",
  14003. "items": {
  14004. "type": "string"
  14005. }
  14006. },
  14007. "layout": {
  14008. "$ref": "#/components/schemas/LayoutConfig"
  14009. },
  14010. "permission": {
  14011. "$ref": "#/components/schemas/PermissionConfig"
  14012. },
  14013. "tools": {
  14014. "type": "object",
  14015. "additionalProperties": {
  14016. "type": "boolean"
  14017. }
  14018. },
  14019. "attachment": {
  14020. "$ref": "#/components/schemas/AttachmentConfig"
  14021. },
  14022. "enterprise": {
  14023. "type": "object",
  14024. "properties": {
  14025. "url": {
  14026. "type": "string"
  14027. }
  14028. },
  14029. "additionalProperties": false
  14030. },
  14031. "tool_output": {
  14032. "type": "object",
  14033. "properties": {
  14034. "max_lines": {
  14035. "type": "integer",
  14036. "exclusiveMinimum": 0
  14037. },
  14038. "max_bytes": {
  14039. "type": "integer",
  14040. "exclusiveMinimum": 0
  14041. }
  14042. },
  14043. "additionalProperties": false
  14044. },
  14045. "compaction": {
  14046. "type": "object",
  14047. "properties": {
  14048. "auto": {
  14049. "type": "boolean"
  14050. },
  14051. "prune": {
  14052. "type": "boolean"
  14053. },
  14054. "tail_turns": {
  14055. "type": "integer",
  14056. "minimum": 0
  14057. },
  14058. "preserve_recent_tokens": {
  14059. "type": "integer",
  14060. "minimum": 0
  14061. },
  14062. "reserved": {
  14063. "type": "integer",
  14064. "minimum": 0
  14065. }
  14066. },
  14067. "additionalProperties": false
  14068. },
  14069. "experimental": {
  14070. "type": "object",
  14071. "properties": {
  14072. "disable_paste_summary": {
  14073. "type": "boolean"
  14074. },
  14075. "batch_tool": {
  14076. "type": "boolean"
  14077. },
  14078. "openTelemetry": {
  14079. "type": "boolean"
  14080. },
  14081. "primary_tools": {
  14082. "type": "array",
  14083. "items": {
  14084. "type": "string"
  14085. }
  14086. },
  14087. "continue_loop_on_deny": {
  14088. "type": "boolean"
  14089. },
  14090. "mcp_timeout": {
  14091. "type": "integer",
  14092. "exclusiveMinimum": 0
  14093. }
  14094. },
  14095. "additionalProperties": false
  14096. }
  14097. },
  14098. "additionalProperties": false
  14099. },
  14100. "Model": {
  14101. "type": "object",
  14102. "properties": {
  14103. "id": {
  14104. "type": "string"
  14105. },
  14106. "providerID": {
  14107. "type": "string"
  14108. },
  14109. "api": {
  14110. "type": "object",
  14111. "properties": {
  14112. "id": {
  14113. "type": "string"
  14114. },
  14115. "url": {
  14116. "type": "string"
  14117. },
  14118. "npm": {
  14119. "type": "string"
  14120. }
  14121. },
  14122. "required": ["id", "url", "npm"],
  14123. "additionalProperties": false
  14124. },
  14125. "name": {
  14126. "type": "string"
  14127. },
  14128. "family": {
  14129. "type": "string"
  14130. },
  14131. "capabilities": {
  14132. "type": "object",
  14133. "properties": {
  14134. "temperature": {
  14135. "type": "boolean"
  14136. },
  14137. "reasoning": {
  14138. "type": "boolean"
  14139. },
  14140. "attachment": {
  14141. "type": "boolean"
  14142. },
  14143. "toolcall": {
  14144. "type": "boolean"
  14145. },
  14146. "input": {
  14147. "type": "object",
  14148. "properties": {
  14149. "text": {
  14150. "type": "boolean"
  14151. },
  14152. "audio": {
  14153. "type": "boolean"
  14154. },
  14155. "image": {
  14156. "type": "boolean"
  14157. },
  14158. "video": {
  14159. "type": "boolean"
  14160. },
  14161. "pdf": {
  14162. "type": "boolean"
  14163. }
  14164. },
  14165. "required": ["text", "audio", "image", "video", "pdf"],
  14166. "additionalProperties": false
  14167. },
  14168. "output": {
  14169. "type": "object",
  14170. "properties": {
  14171. "text": {
  14172. "type": "boolean"
  14173. },
  14174. "audio": {
  14175. "type": "boolean"
  14176. },
  14177. "image": {
  14178. "type": "boolean"
  14179. },
  14180. "video": {
  14181. "type": "boolean"
  14182. },
  14183. "pdf": {
  14184. "type": "boolean"
  14185. }
  14186. },
  14187. "required": ["text", "audio", "image", "video", "pdf"],
  14188. "additionalProperties": false
  14189. },
  14190. "interleaved": {
  14191. "anyOf": [
  14192. {
  14193. "type": "boolean"
  14194. },
  14195. {
  14196. "type": "object",
  14197. "properties": {
  14198. "field": {
  14199. "type": "string",
  14200. "enum": ["reasoning_content", "reasoning_details"]
  14201. }
  14202. },
  14203. "required": ["field"],
  14204. "additionalProperties": false
  14205. }
  14206. ]
  14207. }
  14208. },
  14209. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14210. "additionalProperties": false
  14211. },
  14212. "cost": {
  14213. "type": "object",
  14214. "properties": {
  14215. "input": {
  14216. "type": "number"
  14217. },
  14218. "output": {
  14219. "type": "number"
  14220. },
  14221. "cache": {
  14222. "type": "object",
  14223. "properties": {
  14224. "read": {
  14225. "type": "number"
  14226. },
  14227. "write": {
  14228. "type": "number"
  14229. }
  14230. },
  14231. "required": ["read", "write"],
  14232. "additionalProperties": false
  14233. },
  14234. "tiers": {
  14235. "type": "array",
  14236. "items": {
  14237. "type": "object",
  14238. "properties": {
  14239. "input": {
  14240. "type": "number"
  14241. },
  14242. "output": {
  14243. "type": "number"
  14244. },
  14245. "cache": {
  14246. "type": "object",
  14247. "properties": {
  14248. "read": {
  14249. "type": "number"
  14250. },
  14251. "write": {
  14252. "type": "number"
  14253. }
  14254. },
  14255. "required": ["read", "write"],
  14256. "additionalProperties": false
  14257. },
  14258. "tier": {
  14259. "type": "object",
  14260. "properties": {
  14261. "type": {
  14262. "type": "string",
  14263. "enum": ["context"]
  14264. },
  14265. "size": {
  14266. "type": "number"
  14267. }
  14268. },
  14269. "required": ["type", "size"],
  14270. "additionalProperties": false
  14271. }
  14272. },
  14273. "required": ["input", "output", "cache", "tier"],
  14274. "additionalProperties": false
  14275. }
  14276. },
  14277. "experimentalOver200K": {
  14278. "type": "object",
  14279. "properties": {
  14280. "input": {
  14281. "type": "number"
  14282. },
  14283. "output": {
  14284. "type": "number"
  14285. },
  14286. "cache": {
  14287. "type": "object",
  14288. "properties": {
  14289. "read": {
  14290. "type": "number"
  14291. },
  14292. "write": {
  14293. "type": "number"
  14294. }
  14295. },
  14296. "required": ["read", "write"],
  14297. "additionalProperties": false
  14298. }
  14299. },
  14300. "required": ["input", "output", "cache"],
  14301. "additionalProperties": false
  14302. }
  14303. },
  14304. "required": ["input", "output", "cache"],
  14305. "additionalProperties": false
  14306. },
  14307. "limit": {
  14308. "type": "object",
  14309. "properties": {
  14310. "context": {
  14311. "type": "number"
  14312. },
  14313. "input": {
  14314. "type": "number"
  14315. },
  14316. "output": {
  14317. "type": "number"
  14318. }
  14319. },
  14320. "required": ["context", "output"],
  14321. "additionalProperties": false
  14322. },
  14323. "status": {
  14324. "type": "string",
  14325. "enum": ["alpha", "beta", "deprecated", "active"]
  14326. },
  14327. "options": {
  14328. "type": "object"
  14329. },
  14330. "headers": {
  14331. "type": "object",
  14332. "additionalProperties": {
  14333. "type": "string"
  14334. }
  14335. },
  14336. "release_date": {
  14337. "type": "string"
  14338. },
  14339. "variants": {
  14340. "type": "object",
  14341. "additionalProperties": {
  14342. "type": "object"
  14343. }
  14344. }
  14345. },
  14346. "required": [
  14347. "id",
  14348. "providerID",
  14349. "api",
  14350. "name",
  14351. "capabilities",
  14352. "cost",
  14353. "limit",
  14354. "status",
  14355. "options",
  14356. "headers",
  14357. "release_date"
  14358. ],
  14359. "additionalProperties": false
  14360. },
  14361. "Provider": {
  14362. "type": "object",
  14363. "properties": {
  14364. "id": {
  14365. "type": "string"
  14366. },
  14367. "name": {
  14368. "type": "string"
  14369. },
  14370. "source": {
  14371. "type": "string",
  14372. "enum": ["env", "config", "custom", "api"]
  14373. },
  14374. "env": {
  14375. "type": "array",
  14376. "items": {
  14377. "type": "string"
  14378. }
  14379. },
  14380. "key": {
  14381. "type": "string"
  14382. },
  14383. "options": {
  14384. "type": "object"
  14385. },
  14386. "models": {
  14387. "type": "object",
  14388. "additionalProperties": {
  14389. "$ref": "#/components/schemas/Model"
  14390. }
  14391. }
  14392. },
  14393. "required": ["id", "name", "source", "env", "options", "models"],
  14394. "additionalProperties": false
  14395. },
  14396. "ConsoleState": {
  14397. "type": "object",
  14398. "properties": {
  14399. "consoleManagedProviders": {
  14400. "type": "array",
  14401. "items": {
  14402. "type": "string"
  14403. }
  14404. },
  14405. "activeOrgName": {
  14406. "type": "string"
  14407. },
  14408. "switchableOrgCount": {
  14409. "type": "integer",
  14410. "minimum": 0
  14411. }
  14412. },
  14413. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14414. "additionalProperties": false
  14415. },
  14416. "effect_HttpApiError_InternalServerError": {
  14417. "type": "object",
  14418. "properties": {
  14419. "_tag": {
  14420. "type": "string",
  14421. "enum": ["InternalServerError"]
  14422. }
  14423. },
  14424. "required": ["_tag"],
  14425. "additionalProperties": false
  14426. },
  14427. "ToolListItem": {
  14428. "type": "object",
  14429. "properties": {
  14430. "id": {
  14431. "type": "string"
  14432. },
  14433. "description": {
  14434. "type": "string"
  14435. },
  14436. "parameters": {}
  14437. },
  14438. "required": ["id", "description", "parameters"],
  14439. "additionalProperties": false
  14440. },
  14441. "ToolList": {
  14442. "type": "array",
  14443. "items": {
  14444. "$ref": "#/components/schemas/ToolListItem"
  14445. }
  14446. },
  14447. "ToolIDs": {
  14448. "type": "array",
  14449. "items": {
  14450. "type": "string"
  14451. }
  14452. },
  14453. "WorktreeError": {
  14454. "type": "object",
  14455. "properties": {
  14456. "name": {
  14457. "type": "string",
  14458. "enum": [
  14459. "WorktreeNotGitError",
  14460. "WorktreeNameGenerationFailedError",
  14461. "WorktreeCreateFailedError",
  14462. "WorktreeStartCommandFailedError",
  14463. "WorktreeRemoveFailedError",
  14464. "WorktreeResetFailedError",
  14465. "WorktreeListFailedError"
  14466. ]
  14467. },
  14468. "data": {
  14469. "type": "object",
  14470. "properties": {
  14471. "message": {
  14472. "type": "string"
  14473. }
  14474. },
  14475. "required": ["message"],
  14476. "additionalProperties": false
  14477. }
  14478. },
  14479. "required": ["name", "data"],
  14480. "additionalProperties": false
  14481. },
  14482. "WorktreeCreateInput": {
  14483. "type": "object",
  14484. "properties": {
  14485. "name": {
  14486. "type": "string"
  14487. },
  14488. "startCommand": {
  14489. "type": "string",
  14490. "description": "Additional startup script to run after the project's start command"
  14491. }
  14492. },
  14493. "additionalProperties": false
  14494. },
  14495. "Worktree": {
  14496. "type": "object",
  14497. "properties": {
  14498. "name": {
  14499. "type": "string"
  14500. },
  14501. "branch": {
  14502. "type": "string"
  14503. },
  14504. "directory": {
  14505. "type": "string"
  14506. }
  14507. },
  14508. "required": ["name", "directory"],
  14509. "additionalProperties": false
  14510. },
  14511. "WorktreeRemoveInput": {
  14512. "type": "object",
  14513. "properties": {
  14514. "directory": {
  14515. "type": "string"
  14516. }
  14517. },
  14518. "required": ["directory"],
  14519. "additionalProperties": false
  14520. },
  14521. "WorktreeResetInput": {
  14522. "type": "object",
  14523. "properties": {
  14524. "directory": {
  14525. "type": "string"
  14526. }
  14527. },
  14528. "required": ["directory"],
  14529. "additionalProperties": false
  14530. },
  14531. "ProjectSummary": {
  14532. "type": "object",
  14533. "properties": {
  14534. "id": {
  14535. "type": "string"
  14536. },
  14537. "name": {
  14538. "type": "string"
  14539. },
  14540. "worktree": {
  14541. "type": "string"
  14542. }
  14543. },
  14544. "required": ["id", "worktree"],
  14545. "additionalProperties": false
  14546. },
  14547. "GlobalSession": {
  14548. "type": "object",
  14549. "properties": {
  14550. "id": {
  14551. "type": "string",
  14552. "pattern": "^ses"
  14553. },
  14554. "slug": {
  14555. "type": "string"
  14556. },
  14557. "projectID": {
  14558. "type": "string"
  14559. },
  14560. "workspaceID": {
  14561. "type": "string",
  14562. "pattern": "^wrk"
  14563. },
  14564. "directory": {
  14565. "type": "string"
  14566. },
  14567. "path": {
  14568. "type": "string"
  14569. },
  14570. "parentID": {
  14571. "type": "string",
  14572. "pattern": "^ses"
  14573. },
  14574. "summary": {
  14575. "type": "object",
  14576. "properties": {
  14577. "additions": {
  14578. "type": "number"
  14579. },
  14580. "deletions": {
  14581. "type": "number"
  14582. },
  14583. "files": {
  14584. "type": "number"
  14585. },
  14586. "diffs": {
  14587. "type": "array",
  14588. "items": {
  14589. "$ref": "#/components/schemas/SnapshotFileDiff"
  14590. }
  14591. }
  14592. },
  14593. "required": ["additions", "deletions", "files"],
  14594. "additionalProperties": false
  14595. },
  14596. "cost": {
  14597. "type": "number"
  14598. },
  14599. "tokens": {
  14600. "type": "object",
  14601. "properties": {
  14602. "input": {
  14603. "type": "number"
  14604. },
  14605. "output": {
  14606. "type": "number"
  14607. },
  14608. "reasoning": {
  14609. "type": "number"
  14610. },
  14611. "cache": {
  14612. "type": "object",
  14613. "properties": {
  14614. "read": {
  14615. "type": "number"
  14616. },
  14617. "write": {
  14618. "type": "number"
  14619. }
  14620. },
  14621. "required": ["read", "write"],
  14622. "additionalProperties": false
  14623. }
  14624. },
  14625. "required": ["input", "output", "reasoning", "cache"],
  14626. "additionalProperties": false
  14627. },
  14628. "share": {
  14629. "type": "object",
  14630. "properties": {
  14631. "url": {
  14632. "type": "string"
  14633. }
  14634. },
  14635. "required": ["url"],
  14636. "additionalProperties": false
  14637. },
  14638. "title": {
  14639. "type": "string"
  14640. },
  14641. "agent": {
  14642. "type": "string"
  14643. },
  14644. "model": {
  14645. "type": "object",
  14646. "properties": {
  14647. "id": {
  14648. "type": "string"
  14649. },
  14650. "providerID": {
  14651. "type": "string"
  14652. },
  14653. "variant": {
  14654. "type": "string"
  14655. }
  14656. },
  14657. "required": ["id", "providerID"],
  14658. "additionalProperties": false
  14659. },
  14660. "version": {
  14661. "type": "string"
  14662. },
  14663. "time": {
  14664. "type": "object",
  14665. "properties": {
  14666. "created": {
  14667. "type": "integer",
  14668. "minimum": 0
  14669. },
  14670. "updated": {
  14671. "type": "integer",
  14672. "minimum": 0
  14673. },
  14674. "compacting": {
  14675. "type": "integer",
  14676. "minimum": 0
  14677. },
  14678. "archived": {
  14679. "type": "number"
  14680. }
  14681. },
  14682. "required": ["created", "updated"],
  14683. "additionalProperties": false
  14684. },
  14685. "permission": {
  14686. "$ref": "#/components/schemas/PermissionRuleset"
  14687. },
  14688. "revert": {
  14689. "type": "object",
  14690. "properties": {
  14691. "messageID": {
  14692. "type": "string",
  14693. "pattern": "^msg"
  14694. },
  14695. "partID": {
  14696. "type": "string",
  14697. "pattern": "^prt"
  14698. },
  14699. "snapshot": {
  14700. "type": "string"
  14701. },
  14702. "diff": {
  14703. "type": "string"
  14704. }
  14705. },
  14706. "required": ["messageID"],
  14707. "additionalProperties": false
  14708. },
  14709. "project": {
  14710. "anyOf": [
  14711. {
  14712. "$ref": "#/components/schemas/ProjectSummary"
  14713. },
  14714. {
  14715. "type": "null"
  14716. }
  14717. ]
  14718. }
  14719. },
  14720. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14721. "additionalProperties": false
  14722. },
  14723. "McpResource": {
  14724. "type": "object",
  14725. "properties": {
  14726. "name": {
  14727. "type": "string"
  14728. },
  14729. "uri": {
  14730. "type": "string"
  14731. },
  14732. "description": {
  14733. "type": "string"
  14734. },
  14735. "mimeType": {
  14736. "type": "string"
  14737. },
  14738. "client": {
  14739. "type": "string"
  14740. }
  14741. },
  14742. "required": ["name", "uri", "client"],
  14743. "additionalProperties": false
  14744. },
  14745. "Symbol": {
  14746. "type": "object",
  14747. "properties": {
  14748. "name": {
  14749. "type": "string"
  14750. },
  14751. "kind": {
  14752. "type": "integer",
  14753. "minimum": 0
  14754. },
  14755. "location": {
  14756. "type": "object",
  14757. "properties": {
  14758. "uri": {
  14759. "type": "string"
  14760. },
  14761. "range": {
  14762. "$ref": "#/components/schemas/Range"
  14763. }
  14764. },
  14765. "required": ["uri", "range"],
  14766. "additionalProperties": false
  14767. }
  14768. },
  14769. "required": ["name", "kind", "location"],
  14770. "additionalProperties": false
  14771. },
  14772. "FileNode": {
  14773. "type": "object",
  14774. "properties": {
  14775. "name": {
  14776. "type": "string"
  14777. },
  14778. "path": {
  14779. "type": "string"
  14780. },
  14781. "absolute": {
  14782. "type": "string"
  14783. },
  14784. "type": {
  14785. "type": "string",
  14786. "enum": ["file", "directory"]
  14787. },
  14788. "ignored": {
  14789. "type": "boolean"
  14790. }
  14791. },
  14792. "required": ["name", "path", "absolute", "type", "ignored"],
  14793. "additionalProperties": false
  14794. },
  14795. "FileContent": {
  14796. "type": "object",
  14797. "properties": {
  14798. "type": {
  14799. "type": "string",
  14800. "enum": ["text", "binary"]
  14801. },
  14802. "content": {
  14803. "type": "string"
  14804. },
  14805. "diff": {
  14806. "type": "string"
  14807. },
  14808. "patch": {
  14809. "type": "object",
  14810. "properties": {
  14811. "oldFileName": {
  14812. "type": "string"
  14813. },
  14814. "newFileName": {
  14815. "type": "string"
  14816. },
  14817. "oldHeader": {
  14818. "type": "string"
  14819. },
  14820. "newHeader": {
  14821. "type": "string"
  14822. },
  14823. "hunks": {
  14824. "type": "array",
  14825. "items": {
  14826. "type": "object",
  14827. "properties": {
  14828. "oldStart": {
  14829. "type": "integer",
  14830. "minimum": 0
  14831. },
  14832. "oldLines": {
  14833. "type": "integer",
  14834. "minimum": 0
  14835. },
  14836. "newStart": {
  14837. "type": "integer",
  14838. "minimum": 0
  14839. },
  14840. "newLines": {
  14841. "type": "integer",
  14842. "minimum": 0
  14843. },
  14844. "lines": {
  14845. "type": "array",
  14846. "items": {
  14847. "type": "string"
  14848. }
  14849. }
  14850. },
  14851. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  14852. "additionalProperties": false
  14853. }
  14854. },
  14855. "index": {
  14856. "type": "string"
  14857. }
  14858. },
  14859. "required": ["oldFileName", "newFileName", "hunks"],
  14860. "additionalProperties": false
  14861. },
  14862. "encoding": {
  14863. "type": "string",
  14864. "enum": ["base64"]
  14865. },
  14866. "mimeType": {
  14867. "type": "string"
  14868. }
  14869. },
  14870. "required": ["type", "content"],
  14871. "additionalProperties": false
  14872. },
  14873. "File": {
  14874. "type": "object",
  14875. "properties": {
  14876. "path": {
  14877. "type": "string"
  14878. },
  14879. "added": {
  14880. "type": "integer",
  14881. "minimum": 0
  14882. },
  14883. "removed": {
  14884. "type": "integer",
  14885. "minimum": 0
  14886. },
  14887. "status": {
  14888. "type": "string",
  14889. "enum": ["added", "deleted", "modified"]
  14890. }
  14891. },
  14892. "required": ["path", "added", "removed", "status"],
  14893. "additionalProperties": false
  14894. },
  14895. "Path": {
  14896. "type": "object",
  14897. "properties": {
  14898. "home": {
  14899. "type": "string"
  14900. },
  14901. "state": {
  14902. "type": "string"
  14903. },
  14904. "config": {
  14905. "type": "string"
  14906. },
  14907. "worktree": {
  14908. "type": "string"
  14909. },
  14910. "directory": {
  14911. "type": "string"
  14912. }
  14913. },
  14914. "required": ["home", "state", "config", "worktree", "directory"],
  14915. "additionalProperties": false
  14916. },
  14917. "VcsInfo": {
  14918. "type": "object",
  14919. "properties": {
  14920. "branch": {
  14921. "type": "string"
  14922. },
  14923. "default_branch": {
  14924. "type": "string"
  14925. }
  14926. },
  14927. "additionalProperties": false
  14928. },
  14929. "VcsFileStatus": {
  14930. "type": "object",
  14931. "properties": {
  14932. "file": {
  14933. "type": "string"
  14934. },
  14935. "additions": {
  14936. "type": "number"
  14937. },
  14938. "deletions": {
  14939. "type": "number"
  14940. },
  14941. "status": {
  14942. "type": "string",
  14943. "enum": ["added", "deleted", "modified"]
  14944. }
  14945. },
  14946. "required": ["file", "additions", "deletions", "status"],
  14947. "additionalProperties": false
  14948. },
  14949. "VcsFileDiff": {
  14950. "type": "object",
  14951. "properties": {
  14952. "file": {
  14953. "type": "string"
  14954. },
  14955. "patch": {
  14956. "type": "string"
  14957. },
  14958. "additions": {
  14959. "type": "number"
  14960. },
  14961. "deletions": {
  14962. "type": "number"
  14963. },
  14964. "status": {
  14965. "type": "string",
  14966. "enum": ["added", "deleted", "modified"]
  14967. }
  14968. },
  14969. "required": ["file", "additions", "deletions"],
  14970. "additionalProperties": false
  14971. },
  14972. "VcsApplyError": {
  14973. "type": "object",
  14974. "properties": {
  14975. "name": {
  14976. "type": "string",
  14977. "enum": ["VcsApplyError"]
  14978. },
  14979. "data": {
  14980. "type": "object",
  14981. "properties": {
  14982. "message": {
  14983. "type": "string"
  14984. },
  14985. "reason": {
  14986. "type": "string",
  14987. "enum": ["non-git", "not-clean"]
  14988. }
  14989. },
  14990. "required": ["message", "reason"],
  14991. "additionalProperties": false
  14992. }
  14993. },
  14994. "required": ["name", "data"],
  14995. "additionalProperties": false
  14996. },
  14997. "Command": {
  14998. "type": "object",
  14999. "properties": {
  15000. "name": {
  15001. "type": "string"
  15002. },
  15003. "description": {
  15004. "type": "string"
  15005. },
  15006. "agent": {
  15007. "type": "string"
  15008. },
  15009. "model": {
  15010. "type": "string"
  15011. },
  15012. "source": {
  15013. "type": "string",
  15014. "enum": ["command", "mcp", "skill"]
  15015. },
  15016. "template": {
  15017. "type": "string"
  15018. },
  15019. "subtask": {
  15020. "type": "boolean"
  15021. },
  15022. "hints": {
  15023. "type": "array",
  15024. "items": {
  15025. "type": "string"
  15026. }
  15027. }
  15028. },
  15029. "required": ["name", "template", "hints"],
  15030. "additionalProperties": false
  15031. },
  15032. "Agent": {
  15033. "type": "object",
  15034. "properties": {
  15035. "name": {
  15036. "type": "string"
  15037. },
  15038. "description": {
  15039. "type": "string"
  15040. },
  15041. "mode": {
  15042. "type": "string",
  15043. "enum": ["subagent", "primary", "all"]
  15044. },
  15045. "native": {
  15046. "type": "boolean"
  15047. },
  15048. "hidden": {
  15049. "type": "boolean"
  15050. },
  15051. "topP": {
  15052. "type": "number"
  15053. },
  15054. "temperature": {
  15055. "type": "number"
  15056. },
  15057. "color": {
  15058. "type": "string"
  15059. },
  15060. "permission": {
  15061. "$ref": "#/components/schemas/PermissionRuleset"
  15062. },
  15063. "model": {
  15064. "type": "object",
  15065. "properties": {
  15066. "modelID": {
  15067. "type": "string"
  15068. },
  15069. "providerID": {
  15070. "type": "string"
  15071. }
  15072. },
  15073. "required": ["modelID", "providerID"],
  15074. "additionalProperties": false
  15075. },
  15076. "variant": {
  15077. "type": "string"
  15078. },
  15079. "prompt": {
  15080. "type": "string"
  15081. },
  15082. "options": {
  15083. "type": "object"
  15084. },
  15085. "steps": {
  15086. "type": "number"
  15087. }
  15088. },
  15089. "required": ["name", "mode", "permission", "options"],
  15090. "additionalProperties": false
  15091. },
  15092. "LSPStatus": {
  15093. "type": "object",
  15094. "properties": {
  15095. "id": {
  15096. "type": "string"
  15097. },
  15098. "name": {
  15099. "type": "string"
  15100. },
  15101. "root": {
  15102. "type": "string"
  15103. },
  15104. "status": {
  15105. "type": "string",
  15106. "enum": ["connected", "error"]
  15107. }
  15108. },
  15109. "required": ["id", "name", "root", "status"],
  15110. "additionalProperties": false
  15111. },
  15112. "FormatterStatus": {
  15113. "type": "object",
  15114. "properties": {
  15115. "name": {
  15116. "type": "string"
  15117. },
  15118. "extensions": {
  15119. "type": "array",
  15120. "items": {
  15121. "type": "string"
  15122. }
  15123. },
  15124. "enabled": {
  15125. "type": "boolean"
  15126. }
  15127. },
  15128. "required": ["name", "extensions", "enabled"],
  15129. "additionalProperties": false
  15130. },
  15131. "MCPStatusConnected": {
  15132. "type": "object",
  15133. "properties": {
  15134. "status": {
  15135. "type": "string",
  15136. "enum": ["connected"]
  15137. }
  15138. },
  15139. "required": ["status"],
  15140. "additionalProperties": false
  15141. },
  15142. "MCPStatusDisabled": {
  15143. "type": "object",
  15144. "properties": {
  15145. "status": {
  15146. "type": "string",
  15147. "enum": ["disabled"]
  15148. }
  15149. },
  15150. "required": ["status"],
  15151. "additionalProperties": false
  15152. },
  15153. "MCPStatusFailed": {
  15154. "type": "object",
  15155. "properties": {
  15156. "status": {
  15157. "type": "string",
  15158. "enum": ["failed"]
  15159. },
  15160. "error": {
  15161. "type": "string"
  15162. }
  15163. },
  15164. "required": ["status", "error"],
  15165. "additionalProperties": false
  15166. },
  15167. "MCPStatusNeedsAuth": {
  15168. "type": "object",
  15169. "properties": {
  15170. "status": {
  15171. "type": "string",
  15172. "enum": ["needs_auth"]
  15173. }
  15174. },
  15175. "required": ["status"],
  15176. "additionalProperties": false
  15177. },
  15178. "MCPStatusNeedsClientRegistration": {
  15179. "type": "object",
  15180. "properties": {
  15181. "status": {
  15182. "type": "string",
  15183. "enum": ["needs_client_registration"]
  15184. },
  15185. "error": {
  15186. "type": "string"
  15187. }
  15188. },
  15189. "required": ["status", "error"],
  15190. "additionalProperties": false
  15191. },
  15192. "MCPStatus": {
  15193. "anyOf": [
  15194. {
  15195. "$ref": "#/components/schemas/MCPStatusConnected"
  15196. },
  15197. {
  15198. "$ref": "#/components/schemas/MCPStatusDisabled"
  15199. },
  15200. {
  15201. "$ref": "#/components/schemas/MCPStatusFailed"
  15202. },
  15203. {
  15204. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15205. },
  15206. {
  15207. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15208. }
  15209. ]
  15210. },
  15211. "McpUnsupportedOAuthError": {
  15212. "type": "object",
  15213. "properties": {
  15214. "error": {
  15215. "type": "string"
  15216. }
  15217. },
  15218. "required": ["error"],
  15219. "additionalProperties": false
  15220. },
  15221. "NotFoundError": {
  15222. "type": "object",
  15223. "required": ["name", "data"],
  15224. "properties": {
  15225. "name": {
  15226. "type": "string",
  15227. "enum": ["NotFoundError"]
  15228. },
  15229. "data": {
  15230. "type": "object",
  15231. "required": ["message"],
  15232. "properties": {
  15233. "message": {
  15234. "type": "string"
  15235. }
  15236. }
  15237. }
  15238. }
  15239. },
  15240. "effect_HttpApiError_Forbidden": {
  15241. "type": "object",
  15242. "properties": {
  15243. "_tag": {
  15244. "type": "string",
  15245. "enum": ["Forbidden"]
  15246. }
  15247. },
  15248. "required": ["_tag"],
  15249. "additionalProperties": false
  15250. },
  15251. "ProviderAuthMethod": {
  15252. "type": "object",
  15253. "properties": {
  15254. "type": {
  15255. "type": "string",
  15256. "enum": ["oauth", "api"]
  15257. },
  15258. "label": {
  15259. "type": "string"
  15260. },
  15261. "prompts": {
  15262. "type": "array",
  15263. "items": {
  15264. "anyOf": [
  15265. {
  15266. "type": "object",
  15267. "properties": {
  15268. "type": {
  15269. "type": "string",
  15270. "enum": ["text"]
  15271. },
  15272. "key": {
  15273. "type": "string"
  15274. },
  15275. "message": {
  15276. "type": "string"
  15277. },
  15278. "placeholder": {
  15279. "type": "string"
  15280. },
  15281. "when": {
  15282. "type": "object",
  15283. "properties": {
  15284. "key": {
  15285. "type": "string"
  15286. },
  15287. "op": {
  15288. "type": "string",
  15289. "enum": ["eq", "neq"]
  15290. },
  15291. "value": {
  15292. "type": "string"
  15293. }
  15294. },
  15295. "required": ["key", "op", "value"],
  15296. "additionalProperties": false
  15297. }
  15298. },
  15299. "required": ["type", "key", "message"],
  15300. "additionalProperties": false
  15301. },
  15302. {
  15303. "type": "object",
  15304. "properties": {
  15305. "type": {
  15306. "type": "string",
  15307. "enum": ["select"]
  15308. },
  15309. "key": {
  15310. "type": "string"
  15311. },
  15312. "message": {
  15313. "type": "string"
  15314. },
  15315. "options": {
  15316. "type": "array",
  15317. "items": {
  15318. "type": "object",
  15319. "properties": {
  15320. "label": {
  15321. "type": "string"
  15322. },
  15323. "value": {
  15324. "type": "string"
  15325. },
  15326. "hint": {
  15327. "type": "string"
  15328. }
  15329. },
  15330. "required": ["label", "value"],
  15331. "additionalProperties": false
  15332. }
  15333. },
  15334. "when": {
  15335. "type": "object",
  15336. "properties": {
  15337. "key": {
  15338. "type": "string"
  15339. },
  15340. "op": {
  15341. "type": "string",
  15342. "enum": ["eq", "neq"]
  15343. },
  15344. "value": {
  15345. "type": "string"
  15346. }
  15347. },
  15348. "required": ["key", "op", "value"],
  15349. "additionalProperties": false
  15350. }
  15351. },
  15352. "required": ["type", "key", "message", "options"],
  15353. "additionalProperties": false
  15354. }
  15355. ]
  15356. }
  15357. }
  15358. },
  15359. "required": ["type", "label"],
  15360. "additionalProperties": false
  15361. },
  15362. "ProviderAuthAuthorization": {
  15363. "type": "object",
  15364. "properties": {
  15365. "url": {
  15366. "type": "string"
  15367. },
  15368. "method": {
  15369. "type": "string",
  15370. "enum": ["auto", "code"]
  15371. },
  15372. "instructions": {
  15373. "type": "string"
  15374. }
  15375. },
  15376. "required": ["url", "method", "instructions"],
  15377. "additionalProperties": false
  15378. },
  15379. "ProviderAuthError1": {
  15380. "type": "object",
  15381. "properties": {
  15382. "name": {
  15383. "type": "string",
  15384. "enum": [
  15385. "BadRequest",
  15386. "ProviderAuthOauthMissing",
  15387. "ProviderAuthOauthCodeMissing",
  15388. "ProviderAuthOauthCallbackFailed",
  15389. "ProviderAuthValidationFailed"
  15390. ]
  15391. },
  15392. "data": {
  15393. "type": "object",
  15394. "properties": {
  15395. "providerID": {
  15396. "type": "string"
  15397. },
  15398. "field": {
  15399. "type": "string"
  15400. },
  15401. "message": {
  15402. "type": "string"
  15403. },
  15404. "kind": {
  15405. "type": "string"
  15406. }
  15407. },
  15408. "additionalProperties": false
  15409. }
  15410. },
  15411. "required": ["name", "data"],
  15412. "additionalProperties": false
  15413. },
  15414. "TextPartInput": {
  15415. "type": "object",
  15416. "properties": {
  15417. "id": {
  15418. "type": "string",
  15419. "pattern": "^prt"
  15420. },
  15421. "type": {
  15422. "type": "string",
  15423. "enum": ["text"]
  15424. },
  15425. "text": {
  15426. "type": "string"
  15427. },
  15428. "synthetic": {
  15429. "type": "boolean"
  15430. },
  15431. "ignored": {
  15432. "type": "boolean"
  15433. },
  15434. "time": {
  15435. "type": "object",
  15436. "properties": {
  15437. "start": {
  15438. "type": "integer",
  15439. "minimum": 0
  15440. },
  15441. "end": {
  15442. "type": "integer",
  15443. "minimum": 0
  15444. }
  15445. },
  15446. "required": ["start"],
  15447. "additionalProperties": false
  15448. },
  15449. "metadata": {
  15450. "type": "object"
  15451. }
  15452. },
  15453. "required": ["type", "text"],
  15454. "additionalProperties": false
  15455. },
  15456. "FilePartInput": {
  15457. "type": "object",
  15458. "properties": {
  15459. "id": {
  15460. "type": "string",
  15461. "pattern": "^prt"
  15462. },
  15463. "type": {
  15464. "type": "string",
  15465. "enum": ["file"]
  15466. },
  15467. "mime": {
  15468. "type": "string"
  15469. },
  15470. "filename": {
  15471. "type": "string"
  15472. },
  15473. "url": {
  15474. "type": "string"
  15475. },
  15476. "source": {
  15477. "$ref": "#/components/schemas/FilePartSource"
  15478. }
  15479. },
  15480. "required": ["type", "mime", "url"],
  15481. "additionalProperties": false
  15482. },
  15483. "AgentPartInput": {
  15484. "type": "object",
  15485. "properties": {
  15486. "id": {
  15487. "type": "string",
  15488. "pattern": "^prt"
  15489. },
  15490. "type": {
  15491. "type": "string",
  15492. "enum": ["agent"]
  15493. },
  15494. "name": {
  15495. "type": "string"
  15496. },
  15497. "source": {
  15498. "type": "object",
  15499. "properties": {
  15500. "value": {
  15501. "type": "string"
  15502. },
  15503. "start": {
  15504. "type": "integer",
  15505. "minimum": 0
  15506. },
  15507. "end": {
  15508. "type": "integer",
  15509. "minimum": 0
  15510. }
  15511. },
  15512. "required": ["value", "start", "end"],
  15513. "additionalProperties": false
  15514. }
  15515. },
  15516. "required": ["type", "name"],
  15517. "additionalProperties": false
  15518. },
  15519. "SubtaskPartInput": {
  15520. "type": "object",
  15521. "properties": {
  15522. "id": {
  15523. "type": "string",
  15524. "pattern": "^prt"
  15525. },
  15526. "type": {
  15527. "type": "string",
  15528. "enum": ["subtask"]
  15529. },
  15530. "prompt": {
  15531. "type": "string"
  15532. },
  15533. "description": {
  15534. "type": "string"
  15535. },
  15536. "agent": {
  15537. "type": "string"
  15538. },
  15539. "model": {
  15540. "type": "object",
  15541. "properties": {
  15542. "providerID": {
  15543. "type": "string"
  15544. },
  15545. "modelID": {
  15546. "type": "string"
  15547. }
  15548. },
  15549. "required": ["providerID", "modelID"],
  15550. "additionalProperties": false
  15551. },
  15552. "command": {
  15553. "type": "string"
  15554. }
  15555. },
  15556. "required": ["type", "prompt", "description", "agent"],
  15557. "additionalProperties": false
  15558. },
  15559. "V2SessionsResponse": {
  15560. "type": "object",
  15561. "properties": {
  15562. "items": {
  15563. "type": "array",
  15564. "items": {
  15565. "$ref": "#/components/schemas/SessionInfo"
  15566. }
  15567. },
  15568. "cursor": {
  15569. "type": "object",
  15570. "properties": {
  15571. "previous": {
  15572. "type": "string"
  15573. },
  15574. "next": {
  15575. "type": "string"
  15576. }
  15577. },
  15578. "additionalProperties": false
  15579. }
  15580. },
  15581. "required": ["items", "cursor"],
  15582. "additionalProperties": false
  15583. },
  15584. "InvalidCursorError": {
  15585. "type": "object",
  15586. "properties": {
  15587. "_tag": {
  15588. "type": "string",
  15589. "enum": ["InvalidCursorError"]
  15590. },
  15591. "message": {
  15592. "type": "string"
  15593. }
  15594. },
  15595. "required": ["_tag", "message"],
  15596. "additionalProperties": false
  15597. },
  15598. "UnauthorizedError": {
  15599. "type": "object",
  15600. "properties": {
  15601. "_tag": {
  15602. "type": "string",
  15603. "enum": ["UnauthorizedError"]
  15604. },
  15605. "message": {
  15606. "type": "string"
  15607. }
  15608. },
  15609. "required": ["_tag", "message"],
  15610. "additionalProperties": false
  15611. },
  15612. "V2SessionMessagesResponse": {
  15613. "type": "object",
  15614. "properties": {
  15615. "items": {
  15616. "type": "array",
  15617. "items": {
  15618. "$ref": "#/components/schemas/SessionMessage"
  15619. }
  15620. },
  15621. "cursor": {
  15622. "type": "object",
  15623. "properties": {
  15624. "previous": {
  15625. "type": "string"
  15626. },
  15627. "next": {
  15628. "type": "string"
  15629. }
  15630. },
  15631. "additionalProperties": false
  15632. }
  15633. },
  15634. "required": ["items", "cursor"],
  15635. "additionalProperties": false
  15636. },
  15637. "ServiceUnavailableError": {
  15638. "type": "object",
  15639. "properties": {
  15640. "_tag": {
  15641. "type": "string",
  15642. "enum": ["ServiceUnavailableError"]
  15643. },
  15644. "message": {
  15645. "type": "string"
  15646. },
  15647. "service": {
  15648. "type": "string"
  15649. }
  15650. },
  15651. "required": ["_tag", "message"],
  15652. "additionalProperties": false
  15653. },
  15654. "ProviderNotFoundError": {
  15655. "type": "object",
  15656. "properties": {
  15657. "_tag": {
  15658. "type": "string",
  15659. "enum": ["ProviderNotFoundError"]
  15660. },
  15661. "providerID": {
  15662. "type": "string"
  15663. },
  15664. "message": {
  15665. "type": "string"
  15666. }
  15667. },
  15668. "required": ["_tag", "providerID", "message"],
  15669. "additionalProperties": false
  15670. },
  15671. "EventTuiPromptAppend": {
  15672. "type": "object",
  15673. "properties": {
  15674. "type": {
  15675. "type": "string",
  15676. "enum": ["tui.prompt.append"]
  15677. },
  15678. "properties": {
  15679. "type": "object",
  15680. "properties": {
  15681. "text": {
  15682. "type": "string"
  15683. }
  15684. },
  15685. "required": ["text"],
  15686. "additionalProperties": false
  15687. }
  15688. },
  15689. "required": ["type", "properties"],
  15690. "additionalProperties": false
  15691. },
  15692. "EventTuiCommandExecute": {
  15693. "type": "object",
  15694. "properties": {
  15695. "type": {
  15696. "type": "string",
  15697. "enum": ["tui.command.execute"]
  15698. },
  15699. "properties": {
  15700. "type": "object",
  15701. "properties": {
  15702. "command": {
  15703. "anyOf": [
  15704. {
  15705. "type": "string",
  15706. "enum": [
  15707. "session.list",
  15708. "session.new",
  15709. "session.share",
  15710. "session.interrupt",
  15711. "session.compact",
  15712. "session.page.up",
  15713. "session.page.down",
  15714. "session.line.up",
  15715. "session.line.down",
  15716. "session.half.page.up",
  15717. "session.half.page.down",
  15718. "session.first",
  15719. "session.last",
  15720. "prompt.clear",
  15721. "prompt.submit",
  15722. "agent.cycle"
  15723. ]
  15724. },
  15725. {
  15726. "type": "string"
  15727. }
  15728. ]
  15729. }
  15730. },
  15731. "required": ["command"],
  15732. "additionalProperties": false
  15733. }
  15734. },
  15735. "required": ["type", "properties"],
  15736. "additionalProperties": false
  15737. },
  15738. "EventTuiToastShow": {
  15739. "type": "object",
  15740. "properties": {
  15741. "type": {
  15742. "type": "string",
  15743. "enum": ["tui.toast.show"]
  15744. },
  15745. "properties": {
  15746. "type": "object",
  15747. "properties": {
  15748. "title": {
  15749. "type": "string"
  15750. },
  15751. "message": {
  15752. "type": "string"
  15753. },
  15754. "variant": {
  15755. "type": "string",
  15756. "enum": ["info", "success", "warning", "error"]
  15757. },
  15758. "duration": {
  15759. "type": "integer",
  15760. "exclusiveMinimum": 0
  15761. }
  15762. },
  15763. "required": ["message", "variant"],
  15764. "additionalProperties": false
  15765. }
  15766. },
  15767. "required": ["type", "properties"],
  15768. "additionalProperties": false
  15769. },
  15770. "EventTuiSessionSelect": {
  15771. "type": "object",
  15772. "properties": {
  15773. "type": {
  15774. "type": "string",
  15775. "enum": ["tui.session.select"]
  15776. },
  15777. "properties": {
  15778. "type": "object",
  15779. "properties": {
  15780. "sessionID": {
  15781. "type": "string",
  15782. "pattern": "^ses",
  15783. "description": "Session ID to navigate to"
  15784. }
  15785. },
  15786. "required": ["sessionID"],
  15787. "additionalProperties": false
  15788. }
  15789. },
  15790. "required": ["type", "properties"],
  15791. "additionalProperties": false
  15792. },
  15793. "Workspace": {
  15794. "type": "object",
  15795. "properties": {
  15796. "id": {
  15797. "type": "string",
  15798. "pattern": "^wrk"
  15799. },
  15800. "type": {
  15801. "type": "string"
  15802. },
  15803. "name": {
  15804. "type": "string"
  15805. },
  15806. "branch": {
  15807. "anyOf": [
  15808. {
  15809. "type": "string"
  15810. },
  15811. {
  15812. "type": "null"
  15813. }
  15814. ]
  15815. },
  15816. "directory": {
  15817. "anyOf": [
  15818. {
  15819. "type": "string"
  15820. },
  15821. {
  15822. "type": "null"
  15823. }
  15824. ]
  15825. },
  15826. "extra": {
  15827. "anyOf": [
  15828. {},
  15829. {
  15830. "type": "null"
  15831. }
  15832. ]
  15833. },
  15834. "projectID": {
  15835. "type": "string"
  15836. },
  15837. "timeUsed": {
  15838. "anyOf": [
  15839. {
  15840. "type": "number"
  15841. },
  15842. {
  15843. "type": "string",
  15844. "enum": ["NaN"]
  15845. },
  15846. {
  15847. "type": "string",
  15848. "enum": ["Infinity"]
  15849. },
  15850. {
  15851. "type": "string",
  15852. "enum": ["-Infinity"]
  15853. },
  15854. {
  15855. "type": "string",
  15856. "enum": ["Infinity", "-Infinity", "NaN"]
  15857. }
  15858. ]
  15859. }
  15860. },
  15861. "required": ["id", "type", "name", "projectID", "timeUsed"],
  15862. "additionalProperties": false
  15863. },
  15864. "WorkspaceWarpError": {
  15865. "type": "object",
  15866. "properties": {
  15867. "name": {
  15868. "type": "string",
  15869. "enum": ["WorkspaceWarpError"]
  15870. },
  15871. "data": {
  15872. "type": "object",
  15873. "properties": {
  15874. "message": {
  15875. "type": "string"
  15876. }
  15877. },
  15878. "required": ["message"],
  15879. "additionalProperties": false
  15880. }
  15881. },
  15882. "required": ["name", "data"],
  15883. "additionalProperties": false
  15884. },
  15885. "SyncEventMessageUpdated": {
  15886. "type": "object",
  15887. "properties": {
  15888. "type": {
  15889. "type": "string",
  15890. "enum": ["sync"]
  15891. },
  15892. "name": {
  15893. "type": "string",
  15894. "enum": ["message.updated.1"]
  15895. },
  15896. "id": {
  15897. "type": "string"
  15898. },
  15899. "seq": {
  15900. "type": "number"
  15901. },
  15902. "aggregateID": {
  15903. "type": "string",
  15904. "enum": ["sessionID"]
  15905. },
  15906. "data": {
  15907. "type": "object",
  15908. "properties": {
  15909. "sessionID": {
  15910. "type": "string",
  15911. "pattern": "^ses"
  15912. },
  15913. "info": {
  15914. "$ref": "#/components/schemas/Message"
  15915. }
  15916. },
  15917. "required": ["sessionID", "info"],
  15918. "additionalProperties": false
  15919. }
  15920. },
  15921. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15922. "additionalProperties": false
  15923. },
  15924. "SyncEventMessageRemoved": {
  15925. "type": "object",
  15926. "properties": {
  15927. "type": {
  15928. "type": "string",
  15929. "enum": ["sync"]
  15930. },
  15931. "name": {
  15932. "type": "string",
  15933. "enum": ["message.removed.1"]
  15934. },
  15935. "id": {
  15936. "type": "string"
  15937. },
  15938. "seq": {
  15939. "type": "number"
  15940. },
  15941. "aggregateID": {
  15942. "type": "string",
  15943. "enum": ["sessionID"]
  15944. },
  15945. "data": {
  15946. "type": "object",
  15947. "properties": {
  15948. "sessionID": {
  15949. "type": "string",
  15950. "pattern": "^ses"
  15951. },
  15952. "messageID": {
  15953. "type": "string",
  15954. "pattern": "^msg"
  15955. }
  15956. },
  15957. "required": ["sessionID", "messageID"],
  15958. "additionalProperties": false
  15959. }
  15960. },
  15961. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15962. "additionalProperties": false
  15963. },
  15964. "SyncEventMessagePartUpdated": {
  15965. "type": "object",
  15966. "properties": {
  15967. "type": {
  15968. "type": "string",
  15969. "enum": ["sync"]
  15970. },
  15971. "name": {
  15972. "type": "string",
  15973. "enum": ["message.part.updated.1"]
  15974. },
  15975. "id": {
  15976. "type": "string"
  15977. },
  15978. "seq": {
  15979. "type": "number"
  15980. },
  15981. "aggregateID": {
  15982. "type": "string",
  15983. "enum": ["sessionID"]
  15984. },
  15985. "data": {
  15986. "type": "object",
  15987. "properties": {
  15988. "sessionID": {
  15989. "type": "string",
  15990. "pattern": "^ses"
  15991. },
  15992. "part": {
  15993. "$ref": "#/components/schemas/Part"
  15994. },
  15995. "time": {
  15996. "type": "integer",
  15997. "minimum": 0
  15998. }
  15999. },
  16000. "required": ["sessionID", "part", "time"],
  16001. "additionalProperties": false
  16002. }
  16003. },
  16004. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16005. "additionalProperties": false
  16006. },
  16007. "SyncEventMessagePartRemoved": {
  16008. "type": "object",
  16009. "properties": {
  16010. "type": {
  16011. "type": "string",
  16012. "enum": ["sync"]
  16013. },
  16014. "name": {
  16015. "type": "string",
  16016. "enum": ["message.part.removed.1"]
  16017. },
  16018. "id": {
  16019. "type": "string"
  16020. },
  16021. "seq": {
  16022. "type": "number"
  16023. },
  16024. "aggregateID": {
  16025. "type": "string",
  16026. "enum": ["sessionID"]
  16027. },
  16028. "data": {
  16029. "type": "object",
  16030. "properties": {
  16031. "sessionID": {
  16032. "type": "string",
  16033. "pattern": "^ses"
  16034. },
  16035. "messageID": {
  16036. "type": "string",
  16037. "pattern": "^msg"
  16038. },
  16039. "partID": {
  16040. "type": "string",
  16041. "pattern": "^prt"
  16042. }
  16043. },
  16044. "required": ["sessionID", "messageID", "partID"],
  16045. "additionalProperties": false
  16046. }
  16047. },
  16048. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16049. "additionalProperties": false
  16050. },
  16051. "SyncEventSessionCreated": {
  16052. "type": "object",
  16053. "properties": {
  16054. "type": {
  16055. "type": "string",
  16056. "enum": ["sync"]
  16057. },
  16058. "name": {
  16059. "type": "string",
  16060. "enum": ["session.created.1"]
  16061. },
  16062. "id": {
  16063. "type": "string"
  16064. },
  16065. "seq": {
  16066. "type": "number"
  16067. },
  16068. "aggregateID": {
  16069. "type": "string",
  16070. "enum": ["sessionID"]
  16071. },
  16072. "data": {
  16073. "type": "object",
  16074. "properties": {
  16075. "sessionID": {
  16076. "type": "string",
  16077. "pattern": "^ses"
  16078. },
  16079. "info": {
  16080. "$ref": "#/components/schemas/Session"
  16081. }
  16082. },
  16083. "required": ["sessionID", "info"],
  16084. "additionalProperties": false
  16085. }
  16086. },
  16087. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16088. "additionalProperties": false
  16089. },
  16090. "SyncEventSessionUpdated": {
  16091. "type": "object",
  16092. "properties": {
  16093. "type": {
  16094. "type": "string",
  16095. "enum": ["sync"]
  16096. },
  16097. "name": {
  16098. "type": "string",
  16099. "enum": ["session.updated.1"]
  16100. },
  16101. "id": {
  16102. "type": "string"
  16103. },
  16104. "seq": {
  16105. "type": "number"
  16106. },
  16107. "aggregateID": {
  16108. "type": "string",
  16109. "enum": ["sessionID"]
  16110. },
  16111. "data": {
  16112. "type": "object",
  16113. "properties": {
  16114. "sessionID": {
  16115. "type": "string",
  16116. "pattern": "^ses"
  16117. },
  16118. "info": {
  16119. "type": "object",
  16120. "properties": {
  16121. "id": {
  16122. "anyOf": [
  16123. {
  16124. "type": "string",
  16125. "pattern": "^ses"
  16126. },
  16127. {
  16128. "type": "null"
  16129. }
  16130. ]
  16131. },
  16132. "slug": {
  16133. "anyOf": [
  16134. {
  16135. "type": "string"
  16136. },
  16137. {
  16138. "type": "null"
  16139. }
  16140. ]
  16141. },
  16142. "projectID": {
  16143. "anyOf": [
  16144. {
  16145. "type": "string"
  16146. },
  16147. {
  16148. "type": "null"
  16149. }
  16150. ]
  16151. },
  16152. "workspaceID": {
  16153. "anyOf": [
  16154. {
  16155. "type": "string",
  16156. "pattern": "^wrk"
  16157. },
  16158. {
  16159. "type": "null"
  16160. }
  16161. ]
  16162. },
  16163. "directory": {
  16164. "anyOf": [
  16165. {
  16166. "type": "string"
  16167. },
  16168. {
  16169. "type": "null"
  16170. }
  16171. ]
  16172. },
  16173. "path": {
  16174. "anyOf": [
  16175. {
  16176. "type": "string"
  16177. },
  16178. {
  16179. "type": "null"
  16180. }
  16181. ]
  16182. },
  16183. "parentID": {
  16184. "anyOf": [
  16185. {
  16186. "type": "string",
  16187. "pattern": "^ses"
  16188. },
  16189. {
  16190. "type": "null"
  16191. }
  16192. ]
  16193. },
  16194. "summary": {
  16195. "anyOf": [
  16196. {
  16197. "type": "object",
  16198. "properties": {
  16199. "additions": {
  16200. "type": "number"
  16201. },
  16202. "deletions": {
  16203. "type": "number"
  16204. },
  16205. "files": {
  16206. "type": "number"
  16207. },
  16208. "diffs": {
  16209. "type": "array",
  16210. "items": {
  16211. "$ref": "#/components/schemas/SnapshotFileDiff"
  16212. }
  16213. }
  16214. },
  16215. "required": ["additions", "deletions", "files"],
  16216. "additionalProperties": false
  16217. },
  16218. {
  16219. "type": "null"
  16220. }
  16221. ]
  16222. },
  16223. "cost": {
  16224. "anyOf": [
  16225. {
  16226. "type": "number"
  16227. },
  16228. {
  16229. "type": "null"
  16230. }
  16231. ]
  16232. },
  16233. "tokens": {
  16234. "anyOf": [
  16235. {
  16236. "type": "object",
  16237. "properties": {
  16238. "input": {
  16239. "type": "number"
  16240. },
  16241. "output": {
  16242. "type": "number"
  16243. },
  16244. "reasoning": {
  16245. "type": "number"
  16246. },
  16247. "cache": {
  16248. "type": "object",
  16249. "properties": {
  16250. "read": {
  16251. "type": "number"
  16252. },
  16253. "write": {
  16254. "type": "number"
  16255. }
  16256. },
  16257. "required": ["read", "write"],
  16258. "additionalProperties": false
  16259. }
  16260. },
  16261. "required": ["input", "output", "reasoning", "cache"],
  16262. "additionalProperties": false
  16263. },
  16264. {
  16265. "type": "null"
  16266. }
  16267. ]
  16268. },
  16269. "share": {
  16270. "type": "object",
  16271. "properties": {
  16272. "url": {
  16273. "anyOf": [
  16274. {
  16275. "type": "string"
  16276. },
  16277. {
  16278. "type": "null"
  16279. }
  16280. ]
  16281. }
  16282. },
  16283. "additionalProperties": false
  16284. },
  16285. "title": {
  16286. "anyOf": [
  16287. {
  16288. "type": "string"
  16289. },
  16290. {
  16291. "type": "null"
  16292. }
  16293. ]
  16294. },
  16295. "agent": {
  16296. "anyOf": [
  16297. {
  16298. "type": "string"
  16299. },
  16300. {
  16301. "type": "null"
  16302. }
  16303. ]
  16304. },
  16305. "model": {
  16306. "anyOf": [
  16307. {
  16308. "type": "object",
  16309. "properties": {
  16310. "id": {
  16311. "type": "string"
  16312. },
  16313. "providerID": {
  16314. "type": "string"
  16315. },
  16316. "variant": {
  16317. "type": "string"
  16318. }
  16319. },
  16320. "required": ["id", "providerID"],
  16321. "additionalProperties": false
  16322. },
  16323. {
  16324. "type": "null"
  16325. }
  16326. ]
  16327. },
  16328. "version": {
  16329. "anyOf": [
  16330. {
  16331. "type": "string"
  16332. },
  16333. {
  16334. "type": "null"
  16335. }
  16336. ]
  16337. },
  16338. "time": {
  16339. "type": "object",
  16340. "properties": {
  16341. "created": {
  16342. "anyOf": [
  16343. {
  16344. "type": "integer",
  16345. "minimum": 0
  16346. },
  16347. {
  16348. "type": "null"
  16349. }
  16350. ]
  16351. },
  16352. "updated": {
  16353. "anyOf": [
  16354. {
  16355. "type": "integer",
  16356. "minimum": 0
  16357. },
  16358. {
  16359. "type": "null"
  16360. }
  16361. ]
  16362. },
  16363. "compacting": {
  16364. "anyOf": [
  16365. {
  16366. "type": "integer",
  16367. "minimum": 0
  16368. },
  16369. {
  16370. "type": "null"
  16371. }
  16372. ]
  16373. },
  16374. "archived": {
  16375. "anyOf": [
  16376. {
  16377. "type": "number"
  16378. },
  16379. {
  16380. "type": "null"
  16381. }
  16382. ]
  16383. }
  16384. },
  16385. "additionalProperties": false
  16386. },
  16387. "permission": {
  16388. "anyOf": [
  16389. {
  16390. "$ref": "#/components/schemas/PermissionRuleset"
  16391. },
  16392. {
  16393. "type": "null"
  16394. }
  16395. ]
  16396. },
  16397. "revert": {
  16398. "anyOf": [
  16399. {
  16400. "type": "object",
  16401. "properties": {
  16402. "messageID": {
  16403. "type": "string",
  16404. "pattern": "^msg"
  16405. },
  16406. "partID": {
  16407. "type": "string",
  16408. "pattern": "^prt"
  16409. },
  16410. "snapshot": {
  16411. "type": "string"
  16412. },
  16413. "diff": {
  16414. "type": "string"
  16415. }
  16416. },
  16417. "required": ["messageID"],
  16418. "additionalProperties": false
  16419. },
  16420. {
  16421. "type": "null"
  16422. }
  16423. ]
  16424. }
  16425. },
  16426. "additionalProperties": false
  16427. }
  16428. },
  16429. "required": ["sessionID", "info"],
  16430. "additionalProperties": false
  16431. }
  16432. },
  16433. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16434. "additionalProperties": false
  16435. },
  16436. "SyncEventSessionDeleted": {
  16437. "type": "object",
  16438. "properties": {
  16439. "type": {
  16440. "type": "string",
  16441. "enum": ["sync"]
  16442. },
  16443. "name": {
  16444. "type": "string",
  16445. "enum": ["session.deleted.1"]
  16446. },
  16447. "id": {
  16448. "type": "string"
  16449. },
  16450. "seq": {
  16451. "type": "number"
  16452. },
  16453. "aggregateID": {
  16454. "type": "string",
  16455. "enum": ["sessionID"]
  16456. },
  16457. "data": {
  16458. "type": "object",
  16459. "properties": {
  16460. "sessionID": {
  16461. "type": "string",
  16462. "pattern": "^ses"
  16463. },
  16464. "info": {
  16465. "$ref": "#/components/schemas/Session"
  16466. }
  16467. },
  16468. "required": ["sessionID", "info"],
  16469. "additionalProperties": false
  16470. }
  16471. },
  16472. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16473. "additionalProperties": false
  16474. },
  16475. "SyncEventSessionNextAgentSwitched": {
  16476. "type": "object",
  16477. "properties": {
  16478. "type": {
  16479. "type": "string",
  16480. "enum": ["sync"]
  16481. },
  16482. "name": {
  16483. "type": "string",
  16484. "enum": ["session.next.agent.switched.1"]
  16485. },
  16486. "id": {
  16487. "type": "string"
  16488. },
  16489. "seq": {
  16490. "type": "number"
  16491. },
  16492. "aggregateID": {
  16493. "type": "string",
  16494. "enum": ["sessionID"]
  16495. },
  16496. "data": {
  16497. "type": "object",
  16498. "properties": {
  16499. "timestamp": {
  16500. "type": "number"
  16501. },
  16502. "sessionID": {
  16503. "type": "string",
  16504. "pattern": "^ses"
  16505. },
  16506. "agent": {
  16507. "type": "string"
  16508. }
  16509. },
  16510. "required": ["timestamp", "sessionID", "agent"],
  16511. "additionalProperties": false
  16512. }
  16513. },
  16514. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16515. "additionalProperties": false
  16516. },
  16517. "SyncEventSessionNextModelSwitched": {
  16518. "type": "object",
  16519. "properties": {
  16520. "type": {
  16521. "type": "string",
  16522. "enum": ["sync"]
  16523. },
  16524. "name": {
  16525. "type": "string",
  16526. "enum": ["session.next.model.switched.1"]
  16527. },
  16528. "id": {
  16529. "type": "string"
  16530. },
  16531. "seq": {
  16532. "type": "number"
  16533. },
  16534. "aggregateID": {
  16535. "type": "string",
  16536. "enum": ["sessionID"]
  16537. },
  16538. "data": {
  16539. "type": "object",
  16540. "properties": {
  16541. "timestamp": {
  16542. "type": "number"
  16543. },
  16544. "sessionID": {
  16545. "type": "string",
  16546. "pattern": "^ses"
  16547. },
  16548. "model": {
  16549. "type": "object",
  16550. "properties": {
  16551. "id": {
  16552. "type": "string"
  16553. },
  16554. "providerID": {
  16555. "type": "string"
  16556. },
  16557. "variant": {
  16558. "type": "string"
  16559. }
  16560. },
  16561. "required": ["id", "providerID", "variant"],
  16562. "additionalProperties": false
  16563. }
  16564. },
  16565. "required": ["timestamp", "sessionID", "model"],
  16566. "additionalProperties": false
  16567. }
  16568. },
  16569. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16570. "additionalProperties": false
  16571. },
  16572. "SyncEventSessionNextPrompted": {
  16573. "type": "object",
  16574. "properties": {
  16575. "type": {
  16576. "type": "string",
  16577. "enum": ["sync"]
  16578. },
  16579. "name": {
  16580. "type": "string",
  16581. "enum": ["session.next.prompted.1"]
  16582. },
  16583. "id": {
  16584. "type": "string"
  16585. },
  16586. "seq": {
  16587. "type": "number"
  16588. },
  16589. "aggregateID": {
  16590. "type": "string",
  16591. "enum": ["sessionID"]
  16592. },
  16593. "data": {
  16594. "type": "object",
  16595. "properties": {
  16596. "timestamp": {
  16597. "type": "number"
  16598. },
  16599. "sessionID": {
  16600. "type": "string",
  16601. "pattern": "^ses"
  16602. },
  16603. "prompt": {
  16604. "$ref": "#/components/schemas/Prompt"
  16605. }
  16606. },
  16607. "required": ["timestamp", "sessionID", "prompt"],
  16608. "additionalProperties": false
  16609. }
  16610. },
  16611. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16612. "additionalProperties": false
  16613. },
  16614. "SyncEventSessionNextSynthetic": {
  16615. "type": "object",
  16616. "properties": {
  16617. "type": {
  16618. "type": "string",
  16619. "enum": ["sync"]
  16620. },
  16621. "name": {
  16622. "type": "string",
  16623. "enum": ["session.next.synthetic.1"]
  16624. },
  16625. "id": {
  16626. "type": "string"
  16627. },
  16628. "seq": {
  16629. "type": "number"
  16630. },
  16631. "aggregateID": {
  16632. "type": "string",
  16633. "enum": ["sessionID"]
  16634. },
  16635. "data": {
  16636. "type": "object",
  16637. "properties": {
  16638. "timestamp": {
  16639. "type": "number"
  16640. },
  16641. "sessionID": {
  16642. "type": "string",
  16643. "pattern": "^ses"
  16644. },
  16645. "text": {
  16646. "type": "string"
  16647. }
  16648. },
  16649. "required": ["timestamp", "sessionID", "text"],
  16650. "additionalProperties": false
  16651. }
  16652. },
  16653. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16654. "additionalProperties": false
  16655. },
  16656. "SyncEventSessionNextShellStarted": {
  16657. "type": "object",
  16658. "properties": {
  16659. "type": {
  16660. "type": "string",
  16661. "enum": ["sync"]
  16662. },
  16663. "name": {
  16664. "type": "string",
  16665. "enum": ["session.next.shell.started.1"]
  16666. },
  16667. "id": {
  16668. "type": "string"
  16669. },
  16670. "seq": {
  16671. "type": "number"
  16672. },
  16673. "aggregateID": {
  16674. "type": "string",
  16675. "enum": ["sessionID"]
  16676. },
  16677. "data": {
  16678. "type": "object",
  16679. "properties": {
  16680. "timestamp": {
  16681. "type": "number"
  16682. },
  16683. "sessionID": {
  16684. "type": "string",
  16685. "pattern": "^ses"
  16686. },
  16687. "callID": {
  16688. "type": "string"
  16689. },
  16690. "command": {
  16691. "type": "string"
  16692. }
  16693. },
  16694. "required": ["timestamp", "sessionID", "callID", "command"],
  16695. "additionalProperties": false
  16696. }
  16697. },
  16698. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16699. "additionalProperties": false
  16700. },
  16701. "SyncEventSessionNextShellEnded": {
  16702. "type": "object",
  16703. "properties": {
  16704. "type": {
  16705. "type": "string",
  16706. "enum": ["sync"]
  16707. },
  16708. "name": {
  16709. "type": "string",
  16710. "enum": ["session.next.shell.ended.1"]
  16711. },
  16712. "id": {
  16713. "type": "string"
  16714. },
  16715. "seq": {
  16716. "type": "number"
  16717. },
  16718. "aggregateID": {
  16719. "type": "string",
  16720. "enum": ["sessionID"]
  16721. },
  16722. "data": {
  16723. "type": "object",
  16724. "properties": {
  16725. "timestamp": {
  16726. "type": "number"
  16727. },
  16728. "sessionID": {
  16729. "type": "string",
  16730. "pattern": "^ses"
  16731. },
  16732. "callID": {
  16733. "type": "string"
  16734. },
  16735. "output": {
  16736. "type": "string"
  16737. }
  16738. },
  16739. "required": ["timestamp", "sessionID", "callID", "output"],
  16740. "additionalProperties": false
  16741. }
  16742. },
  16743. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16744. "additionalProperties": false
  16745. },
  16746. "SyncEventSessionNextStepStarted": {
  16747. "type": "object",
  16748. "properties": {
  16749. "type": {
  16750. "type": "string",
  16751. "enum": ["sync"]
  16752. },
  16753. "name": {
  16754. "type": "string",
  16755. "enum": ["session.next.step.started.1"]
  16756. },
  16757. "id": {
  16758. "type": "string"
  16759. },
  16760. "seq": {
  16761. "type": "number"
  16762. },
  16763. "aggregateID": {
  16764. "type": "string",
  16765. "enum": ["sessionID"]
  16766. },
  16767. "data": {
  16768. "type": "object",
  16769. "properties": {
  16770. "timestamp": {
  16771. "type": "number"
  16772. },
  16773. "sessionID": {
  16774. "type": "string",
  16775. "pattern": "^ses"
  16776. },
  16777. "agent": {
  16778. "type": "string"
  16779. },
  16780. "model": {
  16781. "type": "object",
  16782. "properties": {
  16783. "id": {
  16784. "type": "string"
  16785. },
  16786. "providerID": {
  16787. "type": "string"
  16788. },
  16789. "variant": {
  16790. "type": "string"
  16791. }
  16792. },
  16793. "required": ["id", "providerID", "variant"],
  16794. "additionalProperties": false
  16795. },
  16796. "snapshot": {
  16797. "type": "string"
  16798. }
  16799. },
  16800. "required": ["timestamp", "sessionID", "agent", "model"],
  16801. "additionalProperties": false
  16802. }
  16803. },
  16804. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16805. "additionalProperties": false
  16806. },
  16807. "SyncEventSessionNextStepEnded": {
  16808. "type": "object",
  16809. "properties": {
  16810. "type": {
  16811. "type": "string",
  16812. "enum": ["sync"]
  16813. },
  16814. "name": {
  16815. "type": "string",
  16816. "enum": ["session.next.step.ended.1"]
  16817. },
  16818. "id": {
  16819. "type": "string"
  16820. },
  16821. "seq": {
  16822. "type": "number"
  16823. },
  16824. "aggregateID": {
  16825. "type": "string",
  16826. "enum": ["sessionID"]
  16827. },
  16828. "data": {
  16829. "type": "object",
  16830. "properties": {
  16831. "timestamp": {
  16832. "type": "number"
  16833. },
  16834. "sessionID": {
  16835. "type": "string",
  16836. "pattern": "^ses"
  16837. },
  16838. "finish": {
  16839. "type": "string"
  16840. },
  16841. "cost": {
  16842. "type": "number"
  16843. },
  16844. "tokens": {
  16845. "type": "object",
  16846. "properties": {
  16847. "input": {
  16848. "type": "number"
  16849. },
  16850. "output": {
  16851. "type": "number"
  16852. },
  16853. "reasoning": {
  16854. "type": "number"
  16855. },
  16856. "cache": {
  16857. "type": "object",
  16858. "properties": {
  16859. "read": {
  16860. "type": "number"
  16861. },
  16862. "write": {
  16863. "type": "number"
  16864. }
  16865. },
  16866. "required": ["read", "write"],
  16867. "additionalProperties": false
  16868. }
  16869. },
  16870. "required": ["input", "output", "reasoning", "cache"],
  16871. "additionalProperties": false
  16872. },
  16873. "snapshot": {
  16874. "type": "string"
  16875. }
  16876. },
  16877. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  16878. "additionalProperties": false
  16879. }
  16880. },
  16881. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16882. "additionalProperties": false
  16883. },
  16884. "SyncEventSessionNextStepFailed": {
  16885. "type": "object",
  16886. "properties": {
  16887. "type": {
  16888. "type": "string",
  16889. "enum": ["sync"]
  16890. },
  16891. "name": {
  16892. "type": "string",
  16893. "enum": ["session.next.step.failed.1"]
  16894. },
  16895. "id": {
  16896. "type": "string"
  16897. },
  16898. "seq": {
  16899. "type": "number"
  16900. },
  16901. "aggregateID": {
  16902. "type": "string",
  16903. "enum": ["sessionID"]
  16904. },
  16905. "data": {
  16906. "type": "object",
  16907. "properties": {
  16908. "timestamp": {
  16909. "type": "number"
  16910. },
  16911. "sessionID": {
  16912. "type": "string",
  16913. "pattern": "^ses"
  16914. },
  16915. "error": {
  16916. "$ref": "#/components/schemas/SessionErrorUnknown"
  16917. }
  16918. },
  16919. "required": ["timestamp", "sessionID", "error"],
  16920. "additionalProperties": false
  16921. }
  16922. },
  16923. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16924. "additionalProperties": false
  16925. },
  16926. "SyncEventSessionNextTextStarted": {
  16927. "type": "object",
  16928. "properties": {
  16929. "type": {
  16930. "type": "string",
  16931. "enum": ["sync"]
  16932. },
  16933. "name": {
  16934. "type": "string",
  16935. "enum": ["session.next.text.started.1"]
  16936. },
  16937. "id": {
  16938. "type": "string"
  16939. },
  16940. "seq": {
  16941. "type": "number"
  16942. },
  16943. "aggregateID": {
  16944. "type": "string",
  16945. "enum": ["sessionID"]
  16946. },
  16947. "data": {
  16948. "type": "object",
  16949. "properties": {
  16950. "timestamp": {
  16951. "type": "number"
  16952. },
  16953. "sessionID": {
  16954. "type": "string",
  16955. "pattern": "^ses"
  16956. }
  16957. },
  16958. "required": ["timestamp", "sessionID"],
  16959. "additionalProperties": false
  16960. }
  16961. },
  16962. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16963. "additionalProperties": false
  16964. },
  16965. "SyncEventSessionNextTextDelta": {
  16966. "type": "object",
  16967. "properties": {
  16968. "type": {
  16969. "type": "string",
  16970. "enum": ["sync"]
  16971. },
  16972. "name": {
  16973. "type": "string",
  16974. "enum": ["session.next.text.delta.1"]
  16975. },
  16976. "id": {
  16977. "type": "string"
  16978. },
  16979. "seq": {
  16980. "type": "number"
  16981. },
  16982. "aggregateID": {
  16983. "type": "string",
  16984. "enum": ["sessionID"]
  16985. },
  16986. "data": {
  16987. "type": "object",
  16988. "properties": {
  16989. "timestamp": {
  16990. "type": "number"
  16991. },
  16992. "sessionID": {
  16993. "type": "string",
  16994. "pattern": "^ses"
  16995. },
  16996. "delta": {
  16997. "type": "string"
  16998. }
  16999. },
  17000. "required": ["timestamp", "sessionID", "delta"],
  17001. "additionalProperties": false
  17002. }
  17003. },
  17004. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17005. "additionalProperties": false
  17006. },
  17007. "SyncEventSessionNextTextEnded": {
  17008. "type": "object",
  17009. "properties": {
  17010. "type": {
  17011. "type": "string",
  17012. "enum": ["sync"]
  17013. },
  17014. "name": {
  17015. "type": "string",
  17016. "enum": ["session.next.text.ended.1"]
  17017. },
  17018. "id": {
  17019. "type": "string"
  17020. },
  17021. "seq": {
  17022. "type": "number"
  17023. },
  17024. "aggregateID": {
  17025. "type": "string",
  17026. "enum": ["sessionID"]
  17027. },
  17028. "data": {
  17029. "type": "object",
  17030. "properties": {
  17031. "timestamp": {
  17032. "type": "number"
  17033. },
  17034. "sessionID": {
  17035. "type": "string",
  17036. "pattern": "^ses"
  17037. },
  17038. "text": {
  17039. "type": "string"
  17040. }
  17041. },
  17042. "required": ["timestamp", "sessionID", "text"],
  17043. "additionalProperties": false
  17044. }
  17045. },
  17046. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17047. "additionalProperties": false
  17048. },
  17049. "SyncEventSessionNextReasoningStarted": {
  17050. "type": "object",
  17051. "properties": {
  17052. "type": {
  17053. "type": "string",
  17054. "enum": ["sync"]
  17055. },
  17056. "name": {
  17057. "type": "string",
  17058. "enum": ["session.next.reasoning.started.1"]
  17059. },
  17060. "id": {
  17061. "type": "string"
  17062. },
  17063. "seq": {
  17064. "type": "number"
  17065. },
  17066. "aggregateID": {
  17067. "type": "string",
  17068. "enum": ["sessionID"]
  17069. },
  17070. "data": {
  17071. "type": "object",
  17072. "properties": {
  17073. "timestamp": {
  17074. "type": "number"
  17075. },
  17076. "sessionID": {
  17077. "type": "string",
  17078. "pattern": "^ses"
  17079. },
  17080. "reasoningID": {
  17081. "type": "string"
  17082. }
  17083. },
  17084. "required": ["timestamp", "sessionID", "reasoningID"],
  17085. "additionalProperties": false
  17086. }
  17087. },
  17088. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17089. "additionalProperties": false
  17090. },
  17091. "SyncEventSessionNextReasoningDelta": {
  17092. "type": "object",
  17093. "properties": {
  17094. "type": {
  17095. "type": "string",
  17096. "enum": ["sync"]
  17097. },
  17098. "name": {
  17099. "type": "string",
  17100. "enum": ["session.next.reasoning.delta.1"]
  17101. },
  17102. "id": {
  17103. "type": "string"
  17104. },
  17105. "seq": {
  17106. "type": "number"
  17107. },
  17108. "aggregateID": {
  17109. "type": "string",
  17110. "enum": ["sessionID"]
  17111. },
  17112. "data": {
  17113. "type": "object",
  17114. "properties": {
  17115. "timestamp": {
  17116. "type": "number"
  17117. },
  17118. "sessionID": {
  17119. "type": "string",
  17120. "pattern": "^ses"
  17121. },
  17122. "reasoningID": {
  17123. "type": "string"
  17124. },
  17125. "delta": {
  17126. "type": "string"
  17127. }
  17128. },
  17129. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17130. "additionalProperties": false
  17131. }
  17132. },
  17133. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17134. "additionalProperties": false
  17135. },
  17136. "SyncEventSessionNextReasoningEnded": {
  17137. "type": "object",
  17138. "properties": {
  17139. "type": {
  17140. "type": "string",
  17141. "enum": ["sync"]
  17142. },
  17143. "name": {
  17144. "type": "string",
  17145. "enum": ["session.next.reasoning.ended.1"]
  17146. },
  17147. "id": {
  17148. "type": "string"
  17149. },
  17150. "seq": {
  17151. "type": "number"
  17152. },
  17153. "aggregateID": {
  17154. "type": "string",
  17155. "enum": ["sessionID"]
  17156. },
  17157. "data": {
  17158. "type": "object",
  17159. "properties": {
  17160. "timestamp": {
  17161. "type": "number"
  17162. },
  17163. "sessionID": {
  17164. "type": "string",
  17165. "pattern": "^ses"
  17166. },
  17167. "reasoningID": {
  17168. "type": "string"
  17169. },
  17170. "text": {
  17171. "type": "string"
  17172. }
  17173. },
  17174. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17175. "additionalProperties": false
  17176. }
  17177. },
  17178. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17179. "additionalProperties": false
  17180. },
  17181. "SyncEventSessionNextToolInputStarted": {
  17182. "type": "object",
  17183. "properties": {
  17184. "type": {
  17185. "type": "string",
  17186. "enum": ["sync"]
  17187. },
  17188. "name": {
  17189. "type": "string",
  17190. "enum": ["session.next.tool.input.started.1"]
  17191. },
  17192. "id": {
  17193. "type": "string"
  17194. },
  17195. "seq": {
  17196. "type": "number"
  17197. },
  17198. "aggregateID": {
  17199. "type": "string",
  17200. "enum": ["sessionID"]
  17201. },
  17202. "data": {
  17203. "type": "object",
  17204. "properties": {
  17205. "timestamp": {
  17206. "type": "number"
  17207. },
  17208. "sessionID": {
  17209. "type": "string",
  17210. "pattern": "^ses"
  17211. },
  17212. "callID": {
  17213. "type": "string"
  17214. },
  17215. "name": {
  17216. "type": "string"
  17217. }
  17218. },
  17219. "required": ["timestamp", "sessionID", "callID", "name"],
  17220. "additionalProperties": false
  17221. }
  17222. },
  17223. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17224. "additionalProperties": false
  17225. },
  17226. "SyncEventSessionNextToolInputDelta": {
  17227. "type": "object",
  17228. "properties": {
  17229. "type": {
  17230. "type": "string",
  17231. "enum": ["sync"]
  17232. },
  17233. "name": {
  17234. "type": "string",
  17235. "enum": ["session.next.tool.input.delta.1"]
  17236. },
  17237. "id": {
  17238. "type": "string"
  17239. },
  17240. "seq": {
  17241. "type": "number"
  17242. },
  17243. "aggregateID": {
  17244. "type": "string",
  17245. "enum": ["sessionID"]
  17246. },
  17247. "data": {
  17248. "type": "object",
  17249. "properties": {
  17250. "timestamp": {
  17251. "type": "number"
  17252. },
  17253. "sessionID": {
  17254. "type": "string",
  17255. "pattern": "^ses"
  17256. },
  17257. "callID": {
  17258. "type": "string"
  17259. },
  17260. "delta": {
  17261. "type": "string"
  17262. }
  17263. },
  17264. "required": ["timestamp", "sessionID", "callID", "delta"],
  17265. "additionalProperties": false
  17266. }
  17267. },
  17268. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17269. "additionalProperties": false
  17270. },
  17271. "SyncEventSessionNextToolInputEnded": {
  17272. "type": "object",
  17273. "properties": {
  17274. "type": {
  17275. "type": "string",
  17276. "enum": ["sync"]
  17277. },
  17278. "name": {
  17279. "type": "string",
  17280. "enum": ["session.next.tool.input.ended.1"]
  17281. },
  17282. "id": {
  17283. "type": "string"
  17284. },
  17285. "seq": {
  17286. "type": "number"
  17287. },
  17288. "aggregateID": {
  17289. "type": "string",
  17290. "enum": ["sessionID"]
  17291. },
  17292. "data": {
  17293. "type": "object",
  17294. "properties": {
  17295. "timestamp": {
  17296. "type": "number"
  17297. },
  17298. "sessionID": {
  17299. "type": "string",
  17300. "pattern": "^ses"
  17301. },
  17302. "callID": {
  17303. "type": "string"
  17304. },
  17305. "text": {
  17306. "type": "string"
  17307. }
  17308. },
  17309. "required": ["timestamp", "sessionID", "callID", "text"],
  17310. "additionalProperties": false
  17311. }
  17312. },
  17313. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17314. "additionalProperties": false
  17315. },
  17316. "SyncEventSessionNextToolCalled": {
  17317. "type": "object",
  17318. "properties": {
  17319. "type": {
  17320. "type": "string",
  17321. "enum": ["sync"]
  17322. },
  17323. "name": {
  17324. "type": "string",
  17325. "enum": ["session.next.tool.called.1"]
  17326. },
  17327. "id": {
  17328. "type": "string"
  17329. },
  17330. "seq": {
  17331. "type": "number"
  17332. },
  17333. "aggregateID": {
  17334. "type": "string",
  17335. "enum": ["sessionID"]
  17336. },
  17337. "data": {
  17338. "type": "object",
  17339. "properties": {
  17340. "timestamp": {
  17341. "type": "number"
  17342. },
  17343. "sessionID": {
  17344. "type": "string",
  17345. "pattern": "^ses"
  17346. },
  17347. "callID": {
  17348. "type": "string"
  17349. },
  17350. "tool": {
  17351. "type": "string"
  17352. },
  17353. "input": {
  17354. "type": "object"
  17355. },
  17356. "provider": {
  17357. "type": "object",
  17358. "properties": {
  17359. "executed": {
  17360. "type": "boolean"
  17361. },
  17362. "metadata": {
  17363. "type": "object"
  17364. }
  17365. },
  17366. "required": ["executed"],
  17367. "additionalProperties": false
  17368. }
  17369. },
  17370. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17371. "additionalProperties": false
  17372. }
  17373. },
  17374. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17375. "additionalProperties": false
  17376. },
  17377. "SyncEventSessionNextToolProgress": {
  17378. "type": "object",
  17379. "properties": {
  17380. "type": {
  17381. "type": "string",
  17382. "enum": ["sync"]
  17383. },
  17384. "name": {
  17385. "type": "string",
  17386. "enum": ["session.next.tool.progress.1"]
  17387. },
  17388. "id": {
  17389. "type": "string"
  17390. },
  17391. "seq": {
  17392. "type": "number"
  17393. },
  17394. "aggregateID": {
  17395. "type": "string",
  17396. "enum": ["sessionID"]
  17397. },
  17398. "data": {
  17399. "type": "object",
  17400. "properties": {
  17401. "timestamp": {
  17402. "type": "number"
  17403. },
  17404. "sessionID": {
  17405. "type": "string",
  17406. "pattern": "^ses"
  17407. },
  17408. "callID": {
  17409. "type": "string"
  17410. },
  17411. "structured": {
  17412. "type": "object"
  17413. },
  17414. "content": {
  17415. "type": "array",
  17416. "items": {
  17417. "anyOf": [
  17418. {
  17419. "$ref": "#/components/schemas/ToolTextContent"
  17420. },
  17421. {
  17422. "$ref": "#/components/schemas/ToolFileContent"
  17423. }
  17424. ]
  17425. }
  17426. }
  17427. },
  17428. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17429. "additionalProperties": false
  17430. }
  17431. },
  17432. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17433. "additionalProperties": false
  17434. },
  17435. "SyncEventSessionNextToolSuccess": {
  17436. "type": "object",
  17437. "properties": {
  17438. "type": {
  17439. "type": "string",
  17440. "enum": ["sync"]
  17441. },
  17442. "name": {
  17443. "type": "string",
  17444. "enum": ["session.next.tool.success.1"]
  17445. },
  17446. "id": {
  17447. "type": "string"
  17448. },
  17449. "seq": {
  17450. "type": "number"
  17451. },
  17452. "aggregateID": {
  17453. "type": "string",
  17454. "enum": ["sessionID"]
  17455. },
  17456. "data": {
  17457. "type": "object",
  17458. "properties": {
  17459. "timestamp": {
  17460. "type": "number"
  17461. },
  17462. "sessionID": {
  17463. "type": "string",
  17464. "pattern": "^ses"
  17465. },
  17466. "callID": {
  17467. "type": "string"
  17468. },
  17469. "structured": {
  17470. "type": "object"
  17471. },
  17472. "content": {
  17473. "type": "array",
  17474. "items": {
  17475. "anyOf": [
  17476. {
  17477. "$ref": "#/components/schemas/ToolTextContent"
  17478. },
  17479. {
  17480. "$ref": "#/components/schemas/ToolFileContent"
  17481. }
  17482. ]
  17483. }
  17484. },
  17485. "provider": {
  17486. "type": "object",
  17487. "properties": {
  17488. "executed": {
  17489. "type": "boolean"
  17490. },
  17491. "metadata": {
  17492. "type": "object"
  17493. }
  17494. },
  17495. "required": ["executed"],
  17496. "additionalProperties": false
  17497. }
  17498. },
  17499. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17500. "additionalProperties": false
  17501. }
  17502. },
  17503. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17504. "additionalProperties": false
  17505. },
  17506. "SyncEventSessionNextToolFailed": {
  17507. "type": "object",
  17508. "properties": {
  17509. "type": {
  17510. "type": "string",
  17511. "enum": ["sync"]
  17512. },
  17513. "name": {
  17514. "type": "string",
  17515. "enum": ["session.next.tool.failed.1"]
  17516. },
  17517. "id": {
  17518. "type": "string"
  17519. },
  17520. "seq": {
  17521. "type": "number"
  17522. },
  17523. "aggregateID": {
  17524. "type": "string",
  17525. "enum": ["sessionID"]
  17526. },
  17527. "data": {
  17528. "type": "object",
  17529. "properties": {
  17530. "timestamp": {
  17531. "type": "number"
  17532. },
  17533. "sessionID": {
  17534. "type": "string",
  17535. "pattern": "^ses"
  17536. },
  17537. "callID": {
  17538. "type": "string"
  17539. },
  17540. "error": {
  17541. "$ref": "#/components/schemas/SessionErrorUnknown"
  17542. },
  17543. "provider": {
  17544. "type": "object",
  17545. "properties": {
  17546. "executed": {
  17547. "type": "boolean"
  17548. },
  17549. "metadata": {
  17550. "type": "object"
  17551. }
  17552. },
  17553. "required": ["executed"],
  17554. "additionalProperties": false
  17555. }
  17556. },
  17557. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17558. "additionalProperties": false
  17559. }
  17560. },
  17561. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17562. "additionalProperties": false
  17563. },
  17564. "SyncEventSessionNextRetried": {
  17565. "type": "object",
  17566. "properties": {
  17567. "type": {
  17568. "type": "string",
  17569. "enum": ["sync"]
  17570. },
  17571. "name": {
  17572. "type": "string",
  17573. "enum": ["session.next.retried.1"]
  17574. },
  17575. "id": {
  17576. "type": "string"
  17577. },
  17578. "seq": {
  17579. "type": "number"
  17580. },
  17581. "aggregateID": {
  17582. "type": "string",
  17583. "enum": ["sessionID"]
  17584. },
  17585. "data": {
  17586. "type": "object",
  17587. "properties": {
  17588. "timestamp": {
  17589. "type": "number"
  17590. },
  17591. "sessionID": {
  17592. "type": "string",
  17593. "pattern": "^ses"
  17594. },
  17595. "attempt": {
  17596. "type": "number"
  17597. },
  17598. "error": {
  17599. "$ref": "#/components/schemas/SessionNextRetry_error"
  17600. }
  17601. },
  17602. "required": ["timestamp", "sessionID", "attempt", "error"],
  17603. "additionalProperties": false
  17604. }
  17605. },
  17606. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17607. "additionalProperties": false
  17608. },
  17609. "SyncEventSessionNextCompactionStarted": {
  17610. "type": "object",
  17611. "properties": {
  17612. "type": {
  17613. "type": "string",
  17614. "enum": ["sync"]
  17615. },
  17616. "name": {
  17617. "type": "string",
  17618. "enum": ["session.next.compaction.started.1"]
  17619. },
  17620. "id": {
  17621. "type": "string"
  17622. },
  17623. "seq": {
  17624. "type": "number"
  17625. },
  17626. "aggregateID": {
  17627. "type": "string",
  17628. "enum": ["sessionID"]
  17629. },
  17630. "data": {
  17631. "type": "object",
  17632. "properties": {
  17633. "timestamp": {
  17634. "type": "number"
  17635. },
  17636. "sessionID": {
  17637. "type": "string",
  17638. "pattern": "^ses"
  17639. },
  17640. "reason": {
  17641. "type": "string",
  17642. "enum": ["auto", "manual"]
  17643. }
  17644. },
  17645. "required": ["timestamp", "sessionID", "reason"],
  17646. "additionalProperties": false
  17647. }
  17648. },
  17649. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17650. "additionalProperties": false
  17651. },
  17652. "SyncEventSessionNextCompactionDelta": {
  17653. "type": "object",
  17654. "properties": {
  17655. "type": {
  17656. "type": "string",
  17657. "enum": ["sync"]
  17658. },
  17659. "name": {
  17660. "type": "string",
  17661. "enum": ["session.next.compaction.delta.1"]
  17662. },
  17663. "id": {
  17664. "type": "string"
  17665. },
  17666. "seq": {
  17667. "type": "number"
  17668. },
  17669. "aggregateID": {
  17670. "type": "string",
  17671. "enum": ["sessionID"]
  17672. },
  17673. "data": {
  17674. "type": "object",
  17675. "properties": {
  17676. "timestamp": {
  17677. "type": "number"
  17678. },
  17679. "sessionID": {
  17680. "type": "string",
  17681. "pattern": "^ses"
  17682. },
  17683. "text": {
  17684. "type": "string"
  17685. }
  17686. },
  17687. "required": ["timestamp", "sessionID", "text"],
  17688. "additionalProperties": false
  17689. }
  17690. },
  17691. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17692. "additionalProperties": false
  17693. },
  17694. "SyncEventSessionNextCompactionEnded": {
  17695. "type": "object",
  17696. "properties": {
  17697. "type": {
  17698. "type": "string",
  17699. "enum": ["sync"]
  17700. },
  17701. "name": {
  17702. "type": "string",
  17703. "enum": ["session.next.compaction.ended.1"]
  17704. },
  17705. "id": {
  17706. "type": "string"
  17707. },
  17708. "seq": {
  17709. "type": "number"
  17710. },
  17711. "aggregateID": {
  17712. "type": "string",
  17713. "enum": ["sessionID"]
  17714. },
  17715. "data": {
  17716. "type": "object",
  17717. "properties": {
  17718. "timestamp": {
  17719. "type": "number"
  17720. },
  17721. "sessionID": {
  17722. "type": "string",
  17723. "pattern": "^ses"
  17724. },
  17725. "text": {
  17726. "type": "string"
  17727. },
  17728. "include": {
  17729. "type": "string"
  17730. }
  17731. },
  17732. "required": ["timestamp", "sessionID", "text"],
  17733. "additionalProperties": false
  17734. }
  17735. },
  17736. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17737. "additionalProperties": false
  17738. },
  17739. "EventServerConnected": {
  17740. "type": "object",
  17741. "properties": {
  17742. "id": {
  17743. "type": "string"
  17744. },
  17745. "type": {
  17746. "type": "string",
  17747. "enum": ["server.connected"]
  17748. },
  17749. "properties": {
  17750. "type": "object",
  17751. "properties": {}
  17752. }
  17753. },
  17754. "required": ["id", "type", "properties"],
  17755. "additionalProperties": false
  17756. },
  17757. "EventGlobalDisposed": {
  17758. "type": "object",
  17759. "properties": {
  17760. "id": {
  17761. "type": "string"
  17762. },
  17763. "type": {
  17764. "type": "string",
  17765. "enum": ["global.disposed"]
  17766. },
  17767. "properties": {
  17768. "type": "object",
  17769. "properties": {}
  17770. }
  17771. },
  17772. "required": ["id", "type", "properties"],
  17773. "additionalProperties": false
  17774. },
  17775. "EventServerInstanceDisposed": {
  17776. "type": "object",
  17777. "properties": {
  17778. "id": {
  17779. "type": "string"
  17780. },
  17781. "type": {
  17782. "type": "string",
  17783. "enum": ["server.instance.disposed"]
  17784. },
  17785. "properties": {
  17786. "type": "object",
  17787. "properties": {
  17788. "directory": {
  17789. "type": "string"
  17790. }
  17791. },
  17792. "required": ["directory"],
  17793. "additionalProperties": false
  17794. }
  17795. },
  17796. "required": ["id", "type", "properties"],
  17797. "additionalProperties": false
  17798. },
  17799. "EventFileEdited": {
  17800. "type": "object",
  17801. "properties": {
  17802. "id": {
  17803. "type": "string"
  17804. },
  17805. "type": {
  17806. "type": "string",
  17807. "enum": ["file.edited"]
  17808. },
  17809. "properties": {
  17810. "type": "object",
  17811. "properties": {
  17812. "file": {
  17813. "type": "string"
  17814. }
  17815. },
  17816. "required": ["file"],
  17817. "additionalProperties": false
  17818. }
  17819. },
  17820. "required": ["id", "type", "properties"],
  17821. "additionalProperties": false
  17822. },
  17823. "EventFileWatcherUpdated": {
  17824. "type": "object",
  17825. "properties": {
  17826. "id": {
  17827. "type": "string"
  17828. },
  17829. "type": {
  17830. "type": "string",
  17831. "enum": ["file.watcher.updated"]
  17832. },
  17833. "properties": {
  17834. "type": "object",
  17835. "properties": {
  17836. "file": {
  17837. "type": "string"
  17838. },
  17839. "event": {
  17840. "type": "string",
  17841. "enum": ["add", "change", "unlink"]
  17842. }
  17843. },
  17844. "required": ["file", "event"],
  17845. "additionalProperties": false
  17846. }
  17847. },
  17848. "required": ["id", "type", "properties"],
  17849. "additionalProperties": false
  17850. },
  17851. "EventLspClientDiagnostics": {
  17852. "type": "object",
  17853. "properties": {
  17854. "id": {
  17855. "type": "string"
  17856. },
  17857. "type": {
  17858. "type": "string",
  17859. "enum": ["lsp.client.diagnostics"]
  17860. },
  17861. "properties": {
  17862. "type": "object",
  17863. "properties": {
  17864. "serverID": {
  17865. "type": "string"
  17866. },
  17867. "path": {
  17868. "type": "string"
  17869. }
  17870. },
  17871. "required": ["serverID", "path"],
  17872. "additionalProperties": false
  17873. }
  17874. },
  17875. "required": ["id", "type", "properties"],
  17876. "additionalProperties": false
  17877. },
  17878. "EventLspUpdated": {
  17879. "type": "object",
  17880. "properties": {
  17881. "id": {
  17882. "type": "string"
  17883. },
  17884. "type": {
  17885. "type": "string",
  17886. "enum": ["lsp.updated"]
  17887. },
  17888. "properties": {
  17889. "type": "object",
  17890. "properties": {}
  17891. }
  17892. },
  17893. "required": ["id", "type", "properties"],
  17894. "additionalProperties": false
  17895. },
  17896. "EventMessagePartDelta": {
  17897. "type": "object",
  17898. "properties": {
  17899. "id": {
  17900. "type": "string"
  17901. },
  17902. "type": {
  17903. "type": "string",
  17904. "enum": ["message.part.delta"]
  17905. },
  17906. "properties": {
  17907. "type": "object",
  17908. "properties": {
  17909. "sessionID": {
  17910. "type": "string",
  17911. "pattern": "^ses"
  17912. },
  17913. "messageID": {
  17914. "type": "string",
  17915. "pattern": "^msg"
  17916. },
  17917. "partID": {
  17918. "type": "string",
  17919. "pattern": "^prt"
  17920. },
  17921. "field": {
  17922. "type": "string"
  17923. },
  17924. "delta": {
  17925. "type": "string"
  17926. }
  17927. },
  17928. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  17929. "additionalProperties": false
  17930. }
  17931. },
  17932. "required": ["id", "type", "properties"],
  17933. "additionalProperties": false
  17934. },
  17935. "EventPermissionAsked": {
  17936. "type": "object",
  17937. "properties": {
  17938. "id": {
  17939. "type": "string"
  17940. },
  17941. "type": {
  17942. "type": "string",
  17943. "enum": ["permission.asked"]
  17944. },
  17945. "properties": {
  17946. "$ref": "#/components/schemas/PermissionRequest"
  17947. }
  17948. },
  17949. "required": ["id", "type", "properties"],
  17950. "additionalProperties": false
  17951. },
  17952. "EventPermissionReplied": {
  17953. "type": "object",
  17954. "properties": {
  17955. "id": {
  17956. "type": "string"
  17957. },
  17958. "type": {
  17959. "type": "string",
  17960. "enum": ["permission.replied"]
  17961. },
  17962. "properties": {
  17963. "type": "object",
  17964. "properties": {
  17965. "sessionID": {
  17966. "type": "string",
  17967. "pattern": "^ses"
  17968. },
  17969. "requestID": {
  17970. "type": "string",
  17971. "pattern": "^per"
  17972. },
  17973. "reply": {
  17974. "type": "string",
  17975. "enum": ["once", "always", "reject"]
  17976. }
  17977. },
  17978. "required": ["sessionID", "requestID", "reply"],
  17979. "additionalProperties": false
  17980. }
  17981. },
  17982. "required": ["id", "type", "properties"],
  17983. "additionalProperties": false
  17984. },
  17985. "EventSessionDiff": {
  17986. "type": "object",
  17987. "properties": {
  17988. "id": {
  17989. "type": "string"
  17990. },
  17991. "type": {
  17992. "type": "string",
  17993. "enum": ["session.diff"]
  17994. },
  17995. "properties": {
  17996. "type": "object",
  17997. "properties": {
  17998. "sessionID": {
  17999. "type": "string",
  18000. "pattern": "^ses"
  18001. },
  18002. "diff": {
  18003. "type": "array",
  18004. "items": {
  18005. "$ref": "#/components/schemas/SnapshotFileDiff"
  18006. }
  18007. }
  18008. },
  18009. "required": ["sessionID", "diff"],
  18010. "additionalProperties": false
  18011. }
  18012. },
  18013. "required": ["id", "type", "properties"],
  18014. "additionalProperties": false
  18015. },
  18016. "EventSessionError": {
  18017. "type": "object",
  18018. "properties": {
  18019. "id": {
  18020. "type": "string"
  18021. },
  18022. "type": {
  18023. "type": "string",
  18024. "enum": ["session.error"]
  18025. },
  18026. "properties": {
  18027. "type": "object",
  18028. "properties": {
  18029. "sessionID": {
  18030. "type": "string",
  18031. "pattern": "^ses"
  18032. },
  18033. "error": {
  18034. "anyOf": [
  18035. {
  18036. "$ref": "#/components/schemas/ProviderAuthError"
  18037. },
  18038. {
  18039. "$ref": "#/components/schemas/UnknownError"
  18040. },
  18041. {
  18042. "$ref": "#/components/schemas/MessageOutputLengthError"
  18043. },
  18044. {
  18045. "$ref": "#/components/schemas/MessageAbortedError"
  18046. },
  18047. {
  18048. "$ref": "#/components/schemas/StructuredOutputError"
  18049. },
  18050. {
  18051. "$ref": "#/components/schemas/ContextOverflowError"
  18052. },
  18053. {
  18054. "$ref": "#/components/schemas/APIError"
  18055. }
  18056. ]
  18057. }
  18058. },
  18059. "additionalProperties": false
  18060. }
  18061. },
  18062. "required": ["id", "type", "properties"],
  18063. "additionalProperties": false
  18064. },
  18065. "EventQuestionAsked": {
  18066. "type": "object",
  18067. "properties": {
  18068. "id": {
  18069. "type": "string"
  18070. },
  18071. "type": {
  18072. "type": "string",
  18073. "enum": ["question.asked"]
  18074. },
  18075. "properties": {
  18076. "$ref": "#/components/schemas/QuestionRequest"
  18077. }
  18078. },
  18079. "required": ["id", "type", "properties"],
  18080. "additionalProperties": false
  18081. },
  18082. "EventQuestionReplied": {
  18083. "type": "object",
  18084. "properties": {
  18085. "id": {
  18086. "type": "string"
  18087. },
  18088. "type": {
  18089. "type": "string",
  18090. "enum": ["question.replied"]
  18091. },
  18092. "properties": {
  18093. "$ref": "#/components/schemas/QuestionReplied"
  18094. }
  18095. },
  18096. "required": ["id", "type", "properties"],
  18097. "additionalProperties": false
  18098. },
  18099. "EventQuestionRejected": {
  18100. "type": "object",
  18101. "properties": {
  18102. "id": {
  18103. "type": "string"
  18104. },
  18105. "type": {
  18106. "type": "string",
  18107. "enum": ["question.rejected"]
  18108. },
  18109. "properties": {
  18110. "$ref": "#/components/schemas/QuestionRejected"
  18111. }
  18112. },
  18113. "required": ["id", "type", "properties"],
  18114. "additionalProperties": false
  18115. },
  18116. "EventTodoUpdated": {
  18117. "type": "object",
  18118. "properties": {
  18119. "id": {
  18120. "type": "string"
  18121. },
  18122. "type": {
  18123. "type": "string",
  18124. "enum": ["todo.updated"]
  18125. },
  18126. "properties": {
  18127. "type": "object",
  18128. "properties": {
  18129. "sessionID": {
  18130. "type": "string",
  18131. "pattern": "^ses"
  18132. },
  18133. "todos": {
  18134. "type": "array",
  18135. "items": {
  18136. "$ref": "#/components/schemas/Todo"
  18137. }
  18138. }
  18139. },
  18140. "required": ["sessionID", "todos"],
  18141. "additionalProperties": false
  18142. }
  18143. },
  18144. "required": ["id", "type", "properties"],
  18145. "additionalProperties": false
  18146. },
  18147. "EventSessionStatus": {
  18148. "type": "object",
  18149. "properties": {
  18150. "id": {
  18151. "type": "string"
  18152. },
  18153. "type": {
  18154. "type": "string",
  18155. "enum": ["session.status"]
  18156. },
  18157. "properties": {
  18158. "type": "object",
  18159. "properties": {
  18160. "sessionID": {
  18161. "type": "string",
  18162. "pattern": "^ses"
  18163. },
  18164. "status": {
  18165. "$ref": "#/components/schemas/SessionStatus"
  18166. }
  18167. },
  18168. "required": ["sessionID", "status"],
  18169. "additionalProperties": false
  18170. }
  18171. },
  18172. "required": ["id", "type", "properties"],
  18173. "additionalProperties": false
  18174. },
  18175. "EventSessionIdle": {
  18176. "type": "object",
  18177. "properties": {
  18178. "id": {
  18179. "type": "string"
  18180. },
  18181. "type": {
  18182. "type": "string",
  18183. "enum": ["session.idle"]
  18184. },
  18185. "properties": {
  18186. "type": "object",
  18187. "properties": {
  18188. "sessionID": {
  18189. "type": "string",
  18190. "pattern": "^ses"
  18191. }
  18192. },
  18193. "required": ["sessionID"],
  18194. "additionalProperties": false
  18195. }
  18196. },
  18197. "required": ["id", "type", "properties"],
  18198. "additionalProperties": false
  18199. },
  18200. "EventMcpToolsChanged": {
  18201. "type": "object",
  18202. "properties": {
  18203. "id": {
  18204. "type": "string"
  18205. },
  18206. "type": {
  18207. "type": "string",
  18208. "enum": ["mcp.tools.changed"]
  18209. },
  18210. "properties": {
  18211. "type": "object",
  18212. "properties": {
  18213. "server": {
  18214. "type": "string"
  18215. }
  18216. },
  18217. "required": ["server"],
  18218. "additionalProperties": false
  18219. }
  18220. },
  18221. "required": ["id", "type", "properties"],
  18222. "additionalProperties": false
  18223. },
  18224. "EventMcpBrowserOpenFailed": {
  18225. "type": "object",
  18226. "properties": {
  18227. "id": {
  18228. "type": "string"
  18229. },
  18230. "type": {
  18231. "type": "string",
  18232. "enum": ["mcp.browser.open.failed"]
  18233. },
  18234. "properties": {
  18235. "type": "object",
  18236. "properties": {
  18237. "mcpName": {
  18238. "type": "string"
  18239. },
  18240. "url": {
  18241. "type": "string"
  18242. }
  18243. },
  18244. "required": ["mcpName", "url"],
  18245. "additionalProperties": false
  18246. }
  18247. },
  18248. "required": ["id", "type", "properties"],
  18249. "additionalProperties": false
  18250. },
  18251. "EventCommandExecuted": {
  18252. "type": "object",
  18253. "properties": {
  18254. "id": {
  18255. "type": "string"
  18256. },
  18257. "type": {
  18258. "type": "string",
  18259. "enum": ["command.executed"]
  18260. },
  18261. "properties": {
  18262. "type": "object",
  18263. "properties": {
  18264. "name": {
  18265. "type": "string"
  18266. },
  18267. "sessionID": {
  18268. "type": "string",
  18269. "pattern": "^ses"
  18270. },
  18271. "arguments": {
  18272. "type": "string"
  18273. },
  18274. "messageID": {
  18275. "type": "string",
  18276. "pattern": "^msg"
  18277. }
  18278. },
  18279. "required": ["name", "sessionID", "arguments", "messageID"],
  18280. "additionalProperties": false
  18281. }
  18282. },
  18283. "required": ["id", "type", "properties"],
  18284. "additionalProperties": false
  18285. },
  18286. "EventProjectUpdated": {
  18287. "type": "object",
  18288. "properties": {
  18289. "id": {
  18290. "type": "string"
  18291. },
  18292. "type": {
  18293. "type": "string",
  18294. "enum": ["project.updated"]
  18295. },
  18296. "properties": {
  18297. "$ref": "#/components/schemas/Project"
  18298. }
  18299. },
  18300. "required": ["id", "type", "properties"],
  18301. "additionalProperties": false
  18302. },
  18303. "EventSessionCompacted": {
  18304. "type": "object",
  18305. "properties": {
  18306. "id": {
  18307. "type": "string"
  18308. },
  18309. "type": {
  18310. "type": "string",
  18311. "enum": ["session.compacted"]
  18312. },
  18313. "properties": {
  18314. "type": "object",
  18315. "properties": {
  18316. "sessionID": {
  18317. "type": "string",
  18318. "pattern": "^ses"
  18319. }
  18320. },
  18321. "required": ["sessionID"],
  18322. "additionalProperties": false
  18323. }
  18324. },
  18325. "required": ["id", "type", "properties"],
  18326. "additionalProperties": false
  18327. },
  18328. "EventVcsBranchUpdated": {
  18329. "type": "object",
  18330. "properties": {
  18331. "id": {
  18332. "type": "string"
  18333. },
  18334. "type": {
  18335. "type": "string",
  18336. "enum": ["vcs.branch.updated"]
  18337. },
  18338. "properties": {
  18339. "type": "object",
  18340. "properties": {
  18341. "branch": {
  18342. "type": "string"
  18343. }
  18344. },
  18345. "additionalProperties": false
  18346. }
  18347. },
  18348. "required": ["id", "type", "properties"],
  18349. "additionalProperties": false
  18350. },
  18351. "EventWorkspaceReady": {
  18352. "type": "object",
  18353. "properties": {
  18354. "id": {
  18355. "type": "string"
  18356. },
  18357. "type": {
  18358. "type": "string",
  18359. "enum": ["workspace.ready"]
  18360. },
  18361. "properties": {
  18362. "type": "object",
  18363. "properties": {
  18364. "name": {
  18365. "type": "string"
  18366. }
  18367. },
  18368. "required": ["name"],
  18369. "additionalProperties": false
  18370. }
  18371. },
  18372. "required": ["id", "type", "properties"],
  18373. "additionalProperties": false
  18374. },
  18375. "EventWorkspaceFailed": {
  18376. "type": "object",
  18377. "properties": {
  18378. "id": {
  18379. "type": "string"
  18380. },
  18381. "type": {
  18382. "type": "string",
  18383. "enum": ["workspace.failed"]
  18384. },
  18385. "properties": {
  18386. "type": "object",
  18387. "properties": {
  18388. "message": {
  18389. "type": "string"
  18390. }
  18391. },
  18392. "required": ["message"],
  18393. "additionalProperties": false
  18394. }
  18395. },
  18396. "required": ["id", "type", "properties"],
  18397. "additionalProperties": false
  18398. },
  18399. "EventWorkspaceStatus": {
  18400. "type": "object",
  18401. "properties": {
  18402. "id": {
  18403. "type": "string"
  18404. },
  18405. "type": {
  18406. "type": "string",
  18407. "enum": ["workspace.status"]
  18408. },
  18409. "properties": {
  18410. "type": "object",
  18411. "properties": {
  18412. "workspaceID": {
  18413. "type": "string",
  18414. "pattern": "^wrk"
  18415. },
  18416. "status": {
  18417. "type": "string",
  18418. "enum": ["connected", "connecting", "disconnected", "error"]
  18419. }
  18420. },
  18421. "required": ["workspaceID", "status"],
  18422. "additionalProperties": false
  18423. }
  18424. },
  18425. "required": ["id", "type", "properties"],
  18426. "additionalProperties": false
  18427. },
  18428. "EventWorktreeReady": {
  18429. "type": "object",
  18430. "properties": {
  18431. "id": {
  18432. "type": "string"
  18433. },
  18434. "type": {
  18435. "type": "string",
  18436. "enum": ["worktree.ready"]
  18437. },
  18438. "properties": {
  18439. "type": "object",
  18440. "properties": {
  18441. "name": {
  18442. "type": "string"
  18443. },
  18444. "branch": {
  18445. "type": "string"
  18446. }
  18447. },
  18448. "required": ["name"],
  18449. "additionalProperties": false
  18450. }
  18451. },
  18452. "required": ["id", "type", "properties"],
  18453. "additionalProperties": false
  18454. },
  18455. "EventWorktreeFailed": {
  18456. "type": "object",
  18457. "properties": {
  18458. "id": {
  18459. "type": "string"
  18460. },
  18461. "type": {
  18462. "type": "string",
  18463. "enum": ["worktree.failed"]
  18464. },
  18465. "properties": {
  18466. "type": "object",
  18467. "properties": {
  18468. "message": {
  18469. "type": "string"
  18470. }
  18471. },
  18472. "required": ["message"],
  18473. "additionalProperties": false
  18474. }
  18475. },
  18476. "required": ["id", "type", "properties"],
  18477. "additionalProperties": false
  18478. },
  18479. "EventPtyCreated": {
  18480. "type": "object",
  18481. "properties": {
  18482. "id": {
  18483. "type": "string"
  18484. },
  18485. "type": {
  18486. "type": "string",
  18487. "enum": ["pty.created"]
  18488. },
  18489. "properties": {
  18490. "type": "object",
  18491. "properties": {
  18492. "info": {
  18493. "$ref": "#/components/schemas/Pty"
  18494. }
  18495. },
  18496. "required": ["info"],
  18497. "additionalProperties": false
  18498. }
  18499. },
  18500. "required": ["id", "type", "properties"],
  18501. "additionalProperties": false
  18502. },
  18503. "EventPtyUpdated": {
  18504. "type": "object",
  18505. "properties": {
  18506. "id": {
  18507. "type": "string"
  18508. },
  18509. "type": {
  18510. "type": "string",
  18511. "enum": ["pty.updated"]
  18512. },
  18513. "properties": {
  18514. "type": "object",
  18515. "properties": {
  18516. "info": {
  18517. "$ref": "#/components/schemas/Pty"
  18518. }
  18519. },
  18520. "required": ["info"],
  18521. "additionalProperties": false
  18522. }
  18523. },
  18524. "required": ["id", "type", "properties"],
  18525. "additionalProperties": false
  18526. },
  18527. "EventPtyExited": {
  18528. "type": "object",
  18529. "properties": {
  18530. "id": {
  18531. "type": "string"
  18532. },
  18533. "type": {
  18534. "type": "string",
  18535. "enum": ["pty.exited"]
  18536. },
  18537. "properties": {
  18538. "type": "object",
  18539. "properties": {
  18540. "id": {
  18541. "type": "string",
  18542. "pattern": "^pty"
  18543. },
  18544. "exitCode": {
  18545. "type": "integer",
  18546. "minimum": 0
  18547. }
  18548. },
  18549. "required": ["id", "exitCode"],
  18550. "additionalProperties": false
  18551. }
  18552. },
  18553. "required": ["id", "type", "properties"],
  18554. "additionalProperties": false
  18555. },
  18556. "EventPtyDeleted": {
  18557. "type": "object",
  18558. "properties": {
  18559. "id": {
  18560. "type": "string"
  18561. },
  18562. "type": {
  18563. "type": "string",
  18564. "enum": ["pty.deleted"]
  18565. },
  18566. "properties": {
  18567. "type": "object",
  18568. "properties": {
  18569. "id": {
  18570. "type": "string",
  18571. "pattern": "^pty"
  18572. }
  18573. },
  18574. "required": ["id"],
  18575. "additionalProperties": false
  18576. }
  18577. },
  18578. "required": ["id", "type", "properties"],
  18579. "additionalProperties": false
  18580. },
  18581. "EventInstallationUpdated": {
  18582. "type": "object",
  18583. "properties": {
  18584. "id": {
  18585. "type": "string"
  18586. },
  18587. "type": {
  18588. "type": "string",
  18589. "enum": ["installation.updated"]
  18590. },
  18591. "properties": {
  18592. "type": "object",
  18593. "properties": {
  18594. "version": {
  18595. "type": "string"
  18596. }
  18597. },
  18598. "required": ["version"],
  18599. "additionalProperties": false
  18600. }
  18601. },
  18602. "required": ["id", "type", "properties"],
  18603. "additionalProperties": false
  18604. },
  18605. "EventInstallationUpdate-available": {
  18606. "type": "object",
  18607. "properties": {
  18608. "id": {
  18609. "type": "string"
  18610. },
  18611. "type": {
  18612. "type": "string",
  18613. "enum": ["installation.update-available"]
  18614. },
  18615. "properties": {
  18616. "type": "object",
  18617. "properties": {
  18618. "version": {
  18619. "type": "string"
  18620. }
  18621. },
  18622. "required": ["version"],
  18623. "additionalProperties": false
  18624. }
  18625. },
  18626. "required": ["id", "type", "properties"],
  18627. "additionalProperties": false
  18628. },
  18629. "EventMessageUpdated": {
  18630. "type": "object",
  18631. "properties": {
  18632. "id": {
  18633. "type": "string"
  18634. },
  18635. "type": {
  18636. "type": "string",
  18637. "enum": ["message.updated"]
  18638. },
  18639. "properties": {
  18640. "type": "object",
  18641. "properties": {
  18642. "sessionID": {
  18643. "type": "string",
  18644. "pattern": "^ses"
  18645. },
  18646. "info": {
  18647. "$ref": "#/components/schemas/Message"
  18648. }
  18649. },
  18650. "required": ["sessionID", "info"],
  18651. "additionalProperties": false
  18652. }
  18653. },
  18654. "required": ["id", "type", "properties"],
  18655. "additionalProperties": false
  18656. },
  18657. "EventMessageRemoved": {
  18658. "type": "object",
  18659. "properties": {
  18660. "id": {
  18661. "type": "string"
  18662. },
  18663. "type": {
  18664. "type": "string",
  18665. "enum": ["message.removed"]
  18666. },
  18667. "properties": {
  18668. "type": "object",
  18669. "properties": {
  18670. "sessionID": {
  18671. "type": "string",
  18672. "pattern": "^ses"
  18673. },
  18674. "messageID": {
  18675. "type": "string",
  18676. "pattern": "^msg"
  18677. }
  18678. },
  18679. "required": ["sessionID", "messageID"],
  18680. "additionalProperties": false
  18681. }
  18682. },
  18683. "required": ["id", "type", "properties"],
  18684. "additionalProperties": false
  18685. },
  18686. "EventMessagePartUpdated": {
  18687. "type": "object",
  18688. "properties": {
  18689. "id": {
  18690. "type": "string"
  18691. },
  18692. "type": {
  18693. "type": "string",
  18694. "enum": ["message.part.updated"]
  18695. },
  18696. "properties": {
  18697. "type": "object",
  18698. "properties": {
  18699. "sessionID": {
  18700. "type": "string",
  18701. "pattern": "^ses"
  18702. },
  18703. "part": {
  18704. "$ref": "#/components/schemas/Part"
  18705. },
  18706. "time": {
  18707. "type": "integer",
  18708. "minimum": 0
  18709. }
  18710. },
  18711. "required": ["sessionID", "part", "time"],
  18712. "additionalProperties": false
  18713. }
  18714. },
  18715. "required": ["id", "type", "properties"],
  18716. "additionalProperties": false
  18717. },
  18718. "EventMessagePartRemoved": {
  18719. "type": "object",
  18720. "properties": {
  18721. "id": {
  18722. "type": "string"
  18723. },
  18724. "type": {
  18725. "type": "string",
  18726. "enum": ["message.part.removed"]
  18727. },
  18728. "properties": {
  18729. "type": "object",
  18730. "properties": {
  18731. "sessionID": {
  18732. "type": "string",
  18733. "pattern": "^ses"
  18734. },
  18735. "messageID": {
  18736. "type": "string",
  18737. "pattern": "^msg"
  18738. },
  18739. "partID": {
  18740. "type": "string",
  18741. "pattern": "^prt"
  18742. }
  18743. },
  18744. "required": ["sessionID", "messageID", "partID"],
  18745. "additionalProperties": false
  18746. }
  18747. },
  18748. "required": ["id", "type", "properties"],
  18749. "additionalProperties": false
  18750. },
  18751. "EventSessionCreated": {
  18752. "type": "object",
  18753. "properties": {
  18754. "id": {
  18755. "type": "string"
  18756. },
  18757. "type": {
  18758. "type": "string",
  18759. "enum": ["session.created"]
  18760. },
  18761. "properties": {
  18762. "type": "object",
  18763. "properties": {
  18764. "sessionID": {
  18765. "type": "string",
  18766. "pattern": "^ses"
  18767. },
  18768. "info": {
  18769. "$ref": "#/components/schemas/Session"
  18770. }
  18771. },
  18772. "required": ["sessionID", "info"],
  18773. "additionalProperties": false
  18774. }
  18775. },
  18776. "required": ["id", "type", "properties"],
  18777. "additionalProperties": false
  18778. },
  18779. "EventSessionUpdated": {
  18780. "type": "object",
  18781. "properties": {
  18782. "id": {
  18783. "type": "string"
  18784. },
  18785. "type": {
  18786. "type": "string",
  18787. "enum": ["session.updated"]
  18788. },
  18789. "properties": {
  18790. "type": "object",
  18791. "properties": {
  18792. "sessionID": {
  18793. "type": "string",
  18794. "pattern": "^ses"
  18795. },
  18796. "info": {
  18797. "$ref": "#/components/schemas/Session"
  18798. }
  18799. },
  18800. "required": ["sessionID", "info"],
  18801. "additionalProperties": false
  18802. }
  18803. },
  18804. "required": ["id", "type", "properties"],
  18805. "additionalProperties": false
  18806. },
  18807. "EventSessionDeleted": {
  18808. "type": "object",
  18809. "properties": {
  18810. "id": {
  18811. "type": "string"
  18812. },
  18813. "type": {
  18814. "type": "string",
  18815. "enum": ["session.deleted"]
  18816. },
  18817. "properties": {
  18818. "type": "object",
  18819. "properties": {
  18820. "sessionID": {
  18821. "type": "string",
  18822. "pattern": "^ses"
  18823. },
  18824. "info": {
  18825. "$ref": "#/components/schemas/Session"
  18826. }
  18827. },
  18828. "required": ["sessionID", "info"],
  18829. "additionalProperties": false
  18830. }
  18831. },
  18832. "required": ["id", "type", "properties"],
  18833. "additionalProperties": false
  18834. },
  18835. "EventSessionNextAgentSwitched": {
  18836. "type": "object",
  18837. "properties": {
  18838. "id": {
  18839. "type": "string"
  18840. },
  18841. "type": {
  18842. "type": "string",
  18843. "enum": ["session.next.agent.switched"]
  18844. },
  18845. "properties": {
  18846. "type": "object",
  18847. "properties": {
  18848. "timestamp": {
  18849. "type": "number"
  18850. },
  18851. "sessionID": {
  18852. "type": "string",
  18853. "pattern": "^ses"
  18854. },
  18855. "agent": {
  18856. "type": "string"
  18857. }
  18858. },
  18859. "required": ["timestamp", "sessionID", "agent"],
  18860. "additionalProperties": false
  18861. }
  18862. },
  18863. "required": ["id", "type", "properties"],
  18864. "additionalProperties": false
  18865. },
  18866. "EventSessionNextModelSwitched": {
  18867. "type": "object",
  18868. "properties": {
  18869. "id": {
  18870. "type": "string"
  18871. },
  18872. "type": {
  18873. "type": "string",
  18874. "enum": ["session.next.model.switched"]
  18875. },
  18876. "properties": {
  18877. "type": "object",
  18878. "properties": {
  18879. "timestamp": {
  18880. "type": "number"
  18881. },
  18882. "sessionID": {
  18883. "type": "string",
  18884. "pattern": "^ses"
  18885. },
  18886. "model": {
  18887. "type": "object",
  18888. "properties": {
  18889. "id": {
  18890. "type": "string"
  18891. },
  18892. "providerID": {
  18893. "type": "string"
  18894. },
  18895. "variant": {
  18896. "type": "string"
  18897. }
  18898. },
  18899. "required": ["id", "providerID", "variant"],
  18900. "additionalProperties": false
  18901. }
  18902. },
  18903. "required": ["timestamp", "sessionID", "model"],
  18904. "additionalProperties": false
  18905. }
  18906. },
  18907. "required": ["id", "type", "properties"],
  18908. "additionalProperties": false
  18909. },
  18910. "PromptSource": {
  18911. "type": "object",
  18912. "properties": {
  18913. "start": {
  18914. "type": "number"
  18915. },
  18916. "end": {
  18917. "type": "number"
  18918. },
  18919. "text": {
  18920. "type": "string"
  18921. }
  18922. },
  18923. "required": ["start", "end", "text"],
  18924. "additionalProperties": false
  18925. },
  18926. "PromptFileAttachment": {
  18927. "type": "object",
  18928. "properties": {
  18929. "uri": {
  18930. "type": "string"
  18931. },
  18932. "mime": {
  18933. "type": "string"
  18934. },
  18935. "name": {
  18936. "type": "string"
  18937. },
  18938. "description": {
  18939. "type": "string"
  18940. },
  18941. "source": {
  18942. "$ref": "#/components/schemas/PromptSource"
  18943. }
  18944. },
  18945. "required": ["uri", "mime"],
  18946. "additionalProperties": false
  18947. },
  18948. "PromptAgentAttachment": {
  18949. "type": "object",
  18950. "properties": {
  18951. "name": {
  18952. "type": "string"
  18953. },
  18954. "source": {
  18955. "$ref": "#/components/schemas/PromptSource"
  18956. }
  18957. },
  18958. "required": ["name"],
  18959. "additionalProperties": false
  18960. },
  18961. "PromptReferenceAttachment": {
  18962. "type": "object",
  18963. "properties": {
  18964. "name": {
  18965. "type": "string"
  18966. },
  18967. "kind": {
  18968. "type": "string",
  18969. "enum": ["local", "git", "invalid"]
  18970. },
  18971. "uri": {
  18972. "type": "string"
  18973. },
  18974. "repository": {
  18975. "type": "string"
  18976. },
  18977. "branch": {
  18978. "type": "string"
  18979. },
  18980. "target": {
  18981. "type": "string"
  18982. },
  18983. "targetUri": {
  18984. "type": "string"
  18985. },
  18986. "problem": {
  18987. "type": "string"
  18988. },
  18989. "source": {
  18990. "$ref": "#/components/schemas/PromptSource"
  18991. }
  18992. },
  18993. "required": ["name", "kind"],
  18994. "additionalProperties": false
  18995. },
  18996. "EventSessionNextPrompted": {
  18997. "type": "object",
  18998. "properties": {
  18999. "id": {
  19000. "type": "string"
  19001. },
  19002. "type": {
  19003. "type": "string",
  19004. "enum": ["session.next.prompted"]
  19005. },
  19006. "properties": {
  19007. "type": "object",
  19008. "properties": {
  19009. "timestamp": {
  19010. "type": "number"
  19011. },
  19012. "sessionID": {
  19013. "type": "string",
  19014. "pattern": "^ses"
  19015. },
  19016. "prompt": {
  19017. "$ref": "#/components/schemas/Prompt"
  19018. }
  19019. },
  19020. "required": ["timestamp", "sessionID", "prompt"],
  19021. "additionalProperties": false
  19022. }
  19023. },
  19024. "required": ["id", "type", "properties"],
  19025. "additionalProperties": false
  19026. },
  19027. "EventSessionNextSynthetic": {
  19028. "type": "object",
  19029. "properties": {
  19030. "id": {
  19031. "type": "string"
  19032. },
  19033. "type": {
  19034. "type": "string",
  19035. "enum": ["session.next.synthetic"]
  19036. },
  19037. "properties": {
  19038. "type": "object",
  19039. "properties": {
  19040. "timestamp": {
  19041. "type": "number"
  19042. },
  19043. "sessionID": {
  19044. "type": "string",
  19045. "pattern": "^ses"
  19046. },
  19047. "text": {
  19048. "type": "string"
  19049. }
  19050. },
  19051. "required": ["timestamp", "sessionID", "text"],
  19052. "additionalProperties": false
  19053. }
  19054. },
  19055. "required": ["id", "type", "properties"],
  19056. "additionalProperties": false
  19057. },
  19058. "EventSessionNextShellStarted": {
  19059. "type": "object",
  19060. "properties": {
  19061. "id": {
  19062. "type": "string"
  19063. },
  19064. "type": {
  19065. "type": "string",
  19066. "enum": ["session.next.shell.started"]
  19067. },
  19068. "properties": {
  19069. "type": "object",
  19070. "properties": {
  19071. "timestamp": {
  19072. "type": "number"
  19073. },
  19074. "sessionID": {
  19075. "type": "string",
  19076. "pattern": "^ses"
  19077. },
  19078. "callID": {
  19079. "type": "string"
  19080. },
  19081. "command": {
  19082. "type": "string"
  19083. }
  19084. },
  19085. "required": ["timestamp", "sessionID", "callID", "command"],
  19086. "additionalProperties": false
  19087. }
  19088. },
  19089. "required": ["id", "type", "properties"],
  19090. "additionalProperties": false
  19091. },
  19092. "EventSessionNextShellEnded": {
  19093. "type": "object",
  19094. "properties": {
  19095. "id": {
  19096. "type": "string"
  19097. },
  19098. "type": {
  19099. "type": "string",
  19100. "enum": ["session.next.shell.ended"]
  19101. },
  19102. "properties": {
  19103. "type": "object",
  19104. "properties": {
  19105. "timestamp": {
  19106. "type": "number"
  19107. },
  19108. "sessionID": {
  19109. "type": "string",
  19110. "pattern": "^ses"
  19111. },
  19112. "callID": {
  19113. "type": "string"
  19114. },
  19115. "output": {
  19116. "type": "string"
  19117. }
  19118. },
  19119. "required": ["timestamp", "sessionID", "callID", "output"],
  19120. "additionalProperties": false
  19121. }
  19122. },
  19123. "required": ["id", "type", "properties"],
  19124. "additionalProperties": false
  19125. },
  19126. "EventSessionNextStepStarted": {
  19127. "type": "object",
  19128. "properties": {
  19129. "id": {
  19130. "type": "string"
  19131. },
  19132. "type": {
  19133. "type": "string",
  19134. "enum": ["session.next.step.started"]
  19135. },
  19136. "properties": {
  19137. "type": "object",
  19138. "properties": {
  19139. "timestamp": {
  19140. "type": "number"
  19141. },
  19142. "sessionID": {
  19143. "type": "string",
  19144. "pattern": "^ses"
  19145. },
  19146. "agent": {
  19147. "type": "string"
  19148. },
  19149. "model": {
  19150. "type": "object",
  19151. "properties": {
  19152. "id": {
  19153. "type": "string"
  19154. },
  19155. "providerID": {
  19156. "type": "string"
  19157. },
  19158. "variant": {
  19159. "type": "string"
  19160. }
  19161. },
  19162. "required": ["id", "providerID", "variant"],
  19163. "additionalProperties": false
  19164. },
  19165. "snapshot": {
  19166. "type": "string"
  19167. }
  19168. },
  19169. "required": ["timestamp", "sessionID", "agent", "model"],
  19170. "additionalProperties": false
  19171. }
  19172. },
  19173. "required": ["id", "type", "properties"],
  19174. "additionalProperties": false
  19175. },
  19176. "EventSessionNextStepEnded": {
  19177. "type": "object",
  19178. "properties": {
  19179. "id": {
  19180. "type": "string"
  19181. },
  19182. "type": {
  19183. "type": "string",
  19184. "enum": ["session.next.step.ended"]
  19185. },
  19186. "properties": {
  19187. "type": "object",
  19188. "properties": {
  19189. "timestamp": {
  19190. "type": "number"
  19191. },
  19192. "sessionID": {
  19193. "type": "string",
  19194. "pattern": "^ses"
  19195. },
  19196. "finish": {
  19197. "type": "string"
  19198. },
  19199. "cost": {
  19200. "type": "number"
  19201. },
  19202. "tokens": {
  19203. "type": "object",
  19204. "properties": {
  19205. "input": {
  19206. "type": "number"
  19207. },
  19208. "output": {
  19209. "type": "number"
  19210. },
  19211. "reasoning": {
  19212. "type": "number"
  19213. },
  19214. "cache": {
  19215. "type": "object",
  19216. "properties": {
  19217. "read": {
  19218. "type": "number"
  19219. },
  19220. "write": {
  19221. "type": "number"
  19222. }
  19223. },
  19224. "required": ["read", "write"],
  19225. "additionalProperties": false
  19226. }
  19227. },
  19228. "required": ["input", "output", "reasoning", "cache"],
  19229. "additionalProperties": false
  19230. },
  19231. "snapshot": {
  19232. "type": "string"
  19233. }
  19234. },
  19235. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19236. "additionalProperties": false
  19237. }
  19238. },
  19239. "required": ["id", "type", "properties"],
  19240. "additionalProperties": false
  19241. },
  19242. "SessionErrorUnknown": {
  19243. "type": "object",
  19244. "properties": {
  19245. "type": {
  19246. "type": "string",
  19247. "enum": ["unknown"]
  19248. },
  19249. "message": {
  19250. "type": "string"
  19251. }
  19252. },
  19253. "required": ["type", "message"],
  19254. "additionalProperties": false
  19255. },
  19256. "EventSessionNextStepFailed": {
  19257. "type": "object",
  19258. "properties": {
  19259. "id": {
  19260. "type": "string"
  19261. },
  19262. "type": {
  19263. "type": "string",
  19264. "enum": ["session.next.step.failed"]
  19265. },
  19266. "properties": {
  19267. "type": "object",
  19268. "properties": {
  19269. "timestamp": {
  19270. "type": "number"
  19271. },
  19272. "sessionID": {
  19273. "type": "string",
  19274. "pattern": "^ses"
  19275. },
  19276. "error": {
  19277. "$ref": "#/components/schemas/SessionErrorUnknown"
  19278. }
  19279. },
  19280. "required": ["timestamp", "sessionID", "error"],
  19281. "additionalProperties": false
  19282. }
  19283. },
  19284. "required": ["id", "type", "properties"],
  19285. "additionalProperties": false
  19286. },
  19287. "EventSessionNextTextStarted": {
  19288. "type": "object",
  19289. "properties": {
  19290. "id": {
  19291. "type": "string"
  19292. },
  19293. "type": {
  19294. "type": "string",
  19295. "enum": ["session.next.text.started"]
  19296. },
  19297. "properties": {
  19298. "type": "object",
  19299. "properties": {
  19300. "timestamp": {
  19301. "type": "number"
  19302. },
  19303. "sessionID": {
  19304. "type": "string",
  19305. "pattern": "^ses"
  19306. }
  19307. },
  19308. "required": ["timestamp", "sessionID"],
  19309. "additionalProperties": false
  19310. }
  19311. },
  19312. "required": ["id", "type", "properties"],
  19313. "additionalProperties": false
  19314. },
  19315. "EventSessionNextTextDelta": {
  19316. "type": "object",
  19317. "properties": {
  19318. "id": {
  19319. "type": "string"
  19320. },
  19321. "type": {
  19322. "type": "string",
  19323. "enum": ["session.next.text.delta"]
  19324. },
  19325. "properties": {
  19326. "type": "object",
  19327. "properties": {
  19328. "timestamp": {
  19329. "type": "number"
  19330. },
  19331. "sessionID": {
  19332. "type": "string",
  19333. "pattern": "^ses"
  19334. },
  19335. "delta": {
  19336. "type": "string"
  19337. }
  19338. },
  19339. "required": ["timestamp", "sessionID", "delta"],
  19340. "additionalProperties": false
  19341. }
  19342. },
  19343. "required": ["id", "type", "properties"],
  19344. "additionalProperties": false
  19345. },
  19346. "EventSessionNextTextEnded": {
  19347. "type": "object",
  19348. "properties": {
  19349. "id": {
  19350. "type": "string"
  19351. },
  19352. "type": {
  19353. "type": "string",
  19354. "enum": ["session.next.text.ended"]
  19355. },
  19356. "properties": {
  19357. "type": "object",
  19358. "properties": {
  19359. "timestamp": {
  19360. "type": "number"
  19361. },
  19362. "sessionID": {
  19363. "type": "string",
  19364. "pattern": "^ses"
  19365. },
  19366. "text": {
  19367. "type": "string"
  19368. }
  19369. },
  19370. "required": ["timestamp", "sessionID", "text"],
  19371. "additionalProperties": false
  19372. }
  19373. },
  19374. "required": ["id", "type", "properties"],
  19375. "additionalProperties": false
  19376. },
  19377. "EventSessionNextReasoningStarted": {
  19378. "type": "object",
  19379. "properties": {
  19380. "id": {
  19381. "type": "string"
  19382. },
  19383. "type": {
  19384. "type": "string",
  19385. "enum": ["session.next.reasoning.started"]
  19386. },
  19387. "properties": {
  19388. "type": "object",
  19389. "properties": {
  19390. "timestamp": {
  19391. "type": "number"
  19392. },
  19393. "sessionID": {
  19394. "type": "string",
  19395. "pattern": "^ses"
  19396. },
  19397. "reasoningID": {
  19398. "type": "string"
  19399. }
  19400. },
  19401. "required": ["timestamp", "sessionID", "reasoningID"],
  19402. "additionalProperties": false
  19403. }
  19404. },
  19405. "required": ["id", "type", "properties"],
  19406. "additionalProperties": false
  19407. },
  19408. "EventSessionNextReasoningDelta": {
  19409. "type": "object",
  19410. "properties": {
  19411. "id": {
  19412. "type": "string"
  19413. },
  19414. "type": {
  19415. "type": "string",
  19416. "enum": ["session.next.reasoning.delta"]
  19417. },
  19418. "properties": {
  19419. "type": "object",
  19420. "properties": {
  19421. "timestamp": {
  19422. "type": "number"
  19423. },
  19424. "sessionID": {
  19425. "type": "string",
  19426. "pattern": "^ses"
  19427. },
  19428. "reasoningID": {
  19429. "type": "string"
  19430. },
  19431. "delta": {
  19432. "type": "string"
  19433. }
  19434. },
  19435. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19436. "additionalProperties": false
  19437. }
  19438. },
  19439. "required": ["id", "type", "properties"],
  19440. "additionalProperties": false
  19441. },
  19442. "EventSessionNextReasoningEnded": {
  19443. "type": "object",
  19444. "properties": {
  19445. "id": {
  19446. "type": "string"
  19447. },
  19448. "type": {
  19449. "type": "string",
  19450. "enum": ["session.next.reasoning.ended"]
  19451. },
  19452. "properties": {
  19453. "type": "object",
  19454. "properties": {
  19455. "timestamp": {
  19456. "type": "number"
  19457. },
  19458. "sessionID": {
  19459. "type": "string",
  19460. "pattern": "^ses"
  19461. },
  19462. "reasoningID": {
  19463. "type": "string"
  19464. },
  19465. "text": {
  19466. "type": "string"
  19467. }
  19468. },
  19469. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19470. "additionalProperties": false
  19471. }
  19472. },
  19473. "required": ["id", "type", "properties"],
  19474. "additionalProperties": false
  19475. },
  19476. "EventSessionNextToolInputStarted": {
  19477. "type": "object",
  19478. "properties": {
  19479. "id": {
  19480. "type": "string"
  19481. },
  19482. "type": {
  19483. "type": "string",
  19484. "enum": ["session.next.tool.input.started"]
  19485. },
  19486. "properties": {
  19487. "type": "object",
  19488. "properties": {
  19489. "timestamp": {
  19490. "type": "number"
  19491. },
  19492. "sessionID": {
  19493. "type": "string",
  19494. "pattern": "^ses"
  19495. },
  19496. "callID": {
  19497. "type": "string"
  19498. },
  19499. "name": {
  19500. "type": "string"
  19501. }
  19502. },
  19503. "required": ["timestamp", "sessionID", "callID", "name"],
  19504. "additionalProperties": false
  19505. }
  19506. },
  19507. "required": ["id", "type", "properties"],
  19508. "additionalProperties": false
  19509. },
  19510. "EventSessionNextToolInputDelta": {
  19511. "type": "object",
  19512. "properties": {
  19513. "id": {
  19514. "type": "string"
  19515. },
  19516. "type": {
  19517. "type": "string",
  19518. "enum": ["session.next.tool.input.delta"]
  19519. },
  19520. "properties": {
  19521. "type": "object",
  19522. "properties": {
  19523. "timestamp": {
  19524. "type": "number"
  19525. },
  19526. "sessionID": {
  19527. "type": "string",
  19528. "pattern": "^ses"
  19529. },
  19530. "callID": {
  19531. "type": "string"
  19532. },
  19533. "delta": {
  19534. "type": "string"
  19535. }
  19536. },
  19537. "required": ["timestamp", "sessionID", "callID", "delta"],
  19538. "additionalProperties": false
  19539. }
  19540. },
  19541. "required": ["id", "type", "properties"],
  19542. "additionalProperties": false
  19543. },
  19544. "EventSessionNextToolInputEnded": {
  19545. "type": "object",
  19546. "properties": {
  19547. "id": {
  19548. "type": "string"
  19549. },
  19550. "type": {
  19551. "type": "string",
  19552. "enum": ["session.next.tool.input.ended"]
  19553. },
  19554. "properties": {
  19555. "type": "object",
  19556. "properties": {
  19557. "timestamp": {
  19558. "type": "number"
  19559. },
  19560. "sessionID": {
  19561. "type": "string",
  19562. "pattern": "^ses"
  19563. },
  19564. "callID": {
  19565. "type": "string"
  19566. },
  19567. "text": {
  19568. "type": "string"
  19569. }
  19570. },
  19571. "required": ["timestamp", "sessionID", "callID", "text"],
  19572. "additionalProperties": false
  19573. }
  19574. },
  19575. "required": ["id", "type", "properties"],
  19576. "additionalProperties": false
  19577. },
  19578. "EventSessionNextToolCalled": {
  19579. "type": "object",
  19580. "properties": {
  19581. "id": {
  19582. "type": "string"
  19583. },
  19584. "type": {
  19585. "type": "string",
  19586. "enum": ["session.next.tool.called"]
  19587. },
  19588. "properties": {
  19589. "type": "object",
  19590. "properties": {
  19591. "timestamp": {
  19592. "type": "number"
  19593. },
  19594. "sessionID": {
  19595. "type": "string",
  19596. "pattern": "^ses"
  19597. },
  19598. "callID": {
  19599. "type": "string"
  19600. },
  19601. "tool": {
  19602. "type": "string"
  19603. },
  19604. "input": {
  19605. "type": "object"
  19606. },
  19607. "provider": {
  19608. "type": "object",
  19609. "properties": {
  19610. "executed": {
  19611. "type": "boolean"
  19612. },
  19613. "metadata": {
  19614. "type": "object"
  19615. }
  19616. },
  19617. "required": ["executed"],
  19618. "additionalProperties": false
  19619. }
  19620. },
  19621. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19622. "additionalProperties": false
  19623. }
  19624. },
  19625. "required": ["id", "type", "properties"],
  19626. "additionalProperties": false
  19627. },
  19628. "ToolTextContent": {
  19629. "type": "object",
  19630. "properties": {
  19631. "type": {
  19632. "type": "string",
  19633. "enum": ["text"]
  19634. },
  19635. "text": {
  19636. "type": "string"
  19637. }
  19638. },
  19639. "required": ["type", "text"],
  19640. "additionalProperties": false
  19641. },
  19642. "ToolFileContent": {
  19643. "type": "object",
  19644. "properties": {
  19645. "type": {
  19646. "type": "string",
  19647. "enum": ["file"]
  19648. },
  19649. "uri": {
  19650. "type": "string"
  19651. },
  19652. "mime": {
  19653. "type": "string"
  19654. },
  19655. "name": {
  19656. "type": "string"
  19657. }
  19658. },
  19659. "required": ["type", "uri", "mime"],
  19660. "additionalProperties": false
  19661. },
  19662. "EventSessionNextToolProgress": {
  19663. "type": "object",
  19664. "properties": {
  19665. "id": {
  19666. "type": "string"
  19667. },
  19668. "type": {
  19669. "type": "string",
  19670. "enum": ["session.next.tool.progress"]
  19671. },
  19672. "properties": {
  19673. "type": "object",
  19674. "properties": {
  19675. "timestamp": {
  19676. "type": "number"
  19677. },
  19678. "sessionID": {
  19679. "type": "string",
  19680. "pattern": "^ses"
  19681. },
  19682. "callID": {
  19683. "type": "string"
  19684. },
  19685. "structured": {
  19686. "type": "object"
  19687. },
  19688. "content": {
  19689. "type": "array",
  19690. "items": {
  19691. "anyOf": [
  19692. {
  19693. "$ref": "#/components/schemas/ToolTextContent"
  19694. },
  19695. {
  19696. "$ref": "#/components/schemas/ToolFileContent"
  19697. }
  19698. ]
  19699. }
  19700. }
  19701. },
  19702. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  19703. "additionalProperties": false
  19704. }
  19705. },
  19706. "required": ["id", "type", "properties"],
  19707. "additionalProperties": false
  19708. },
  19709. "EventSessionNextToolSuccess": {
  19710. "type": "object",
  19711. "properties": {
  19712. "id": {
  19713. "type": "string"
  19714. },
  19715. "type": {
  19716. "type": "string",
  19717. "enum": ["session.next.tool.success"]
  19718. },
  19719. "properties": {
  19720. "type": "object",
  19721. "properties": {
  19722. "timestamp": {
  19723. "type": "number"
  19724. },
  19725. "sessionID": {
  19726. "type": "string",
  19727. "pattern": "^ses"
  19728. },
  19729. "callID": {
  19730. "type": "string"
  19731. },
  19732. "structured": {
  19733. "type": "object"
  19734. },
  19735. "content": {
  19736. "type": "array",
  19737. "items": {
  19738. "anyOf": [
  19739. {
  19740. "$ref": "#/components/schemas/ToolTextContent"
  19741. },
  19742. {
  19743. "$ref": "#/components/schemas/ToolFileContent"
  19744. }
  19745. ]
  19746. }
  19747. },
  19748. "provider": {
  19749. "type": "object",
  19750. "properties": {
  19751. "executed": {
  19752. "type": "boolean"
  19753. },
  19754. "metadata": {
  19755. "type": "object"
  19756. }
  19757. },
  19758. "required": ["executed"],
  19759. "additionalProperties": false
  19760. }
  19761. },
  19762. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  19763. "additionalProperties": false
  19764. }
  19765. },
  19766. "required": ["id", "type", "properties"],
  19767. "additionalProperties": false
  19768. },
  19769. "EventSessionNextToolFailed": {
  19770. "type": "object",
  19771. "properties": {
  19772. "id": {
  19773. "type": "string"
  19774. },
  19775. "type": {
  19776. "type": "string",
  19777. "enum": ["session.next.tool.failed"]
  19778. },
  19779. "properties": {
  19780. "type": "object",
  19781. "properties": {
  19782. "timestamp": {
  19783. "type": "number"
  19784. },
  19785. "sessionID": {
  19786. "type": "string",
  19787. "pattern": "^ses"
  19788. },
  19789. "callID": {
  19790. "type": "string"
  19791. },
  19792. "error": {
  19793. "$ref": "#/components/schemas/SessionErrorUnknown"
  19794. },
  19795. "provider": {
  19796. "type": "object",
  19797. "properties": {
  19798. "executed": {
  19799. "type": "boolean"
  19800. },
  19801. "metadata": {
  19802. "type": "object"
  19803. }
  19804. },
  19805. "required": ["executed"],
  19806. "additionalProperties": false
  19807. }
  19808. },
  19809. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  19810. "additionalProperties": false
  19811. }
  19812. },
  19813. "required": ["id", "type", "properties"],
  19814. "additionalProperties": false
  19815. },
  19816. "SessionNextRetry_error": {
  19817. "type": "object",
  19818. "properties": {
  19819. "message": {
  19820. "type": "string"
  19821. },
  19822. "statusCode": {
  19823. "type": "number"
  19824. },
  19825. "isRetryable": {
  19826. "type": "boolean"
  19827. },
  19828. "responseHeaders": {
  19829. "type": "object",
  19830. "additionalProperties": {
  19831. "type": "string"
  19832. }
  19833. },
  19834. "responseBody": {
  19835. "type": "string"
  19836. },
  19837. "metadata": {
  19838. "type": "object",
  19839. "additionalProperties": {
  19840. "type": "string"
  19841. }
  19842. }
  19843. },
  19844. "required": ["message", "isRetryable"],
  19845. "additionalProperties": false
  19846. },
  19847. "EventSessionNextRetried": {
  19848. "type": "object",
  19849. "properties": {
  19850. "id": {
  19851. "type": "string"
  19852. },
  19853. "type": {
  19854. "type": "string",
  19855. "enum": ["session.next.retried"]
  19856. },
  19857. "properties": {
  19858. "type": "object",
  19859. "properties": {
  19860. "timestamp": {
  19861. "type": "number"
  19862. },
  19863. "sessionID": {
  19864. "type": "string",
  19865. "pattern": "^ses"
  19866. },
  19867. "attempt": {
  19868. "type": "number"
  19869. },
  19870. "error": {
  19871. "$ref": "#/components/schemas/SessionNextRetry_error"
  19872. }
  19873. },
  19874. "required": ["timestamp", "sessionID", "attempt", "error"],
  19875. "additionalProperties": false
  19876. }
  19877. },
  19878. "required": ["id", "type", "properties"],
  19879. "additionalProperties": false
  19880. },
  19881. "EventSessionNextCompactionStarted": {
  19882. "type": "object",
  19883. "properties": {
  19884. "id": {
  19885. "type": "string"
  19886. },
  19887. "type": {
  19888. "type": "string",
  19889. "enum": ["session.next.compaction.started"]
  19890. },
  19891. "properties": {
  19892. "type": "object",
  19893. "properties": {
  19894. "timestamp": {
  19895. "type": "number"
  19896. },
  19897. "sessionID": {
  19898. "type": "string",
  19899. "pattern": "^ses"
  19900. },
  19901. "reason": {
  19902. "type": "string",
  19903. "enum": ["auto", "manual"]
  19904. }
  19905. },
  19906. "required": ["timestamp", "sessionID", "reason"],
  19907. "additionalProperties": false
  19908. }
  19909. },
  19910. "required": ["id", "type", "properties"],
  19911. "additionalProperties": false
  19912. },
  19913. "EventSessionNextCompactionDelta": {
  19914. "type": "object",
  19915. "properties": {
  19916. "id": {
  19917. "type": "string"
  19918. },
  19919. "type": {
  19920. "type": "string",
  19921. "enum": ["session.next.compaction.delta"]
  19922. },
  19923. "properties": {
  19924. "type": "object",
  19925. "properties": {
  19926. "timestamp": {
  19927. "type": "number"
  19928. },
  19929. "sessionID": {
  19930. "type": "string",
  19931. "pattern": "^ses"
  19932. },
  19933. "text": {
  19934. "type": "string"
  19935. }
  19936. },
  19937. "required": ["timestamp", "sessionID", "text"],
  19938. "additionalProperties": false
  19939. }
  19940. },
  19941. "required": ["id", "type", "properties"],
  19942. "additionalProperties": false
  19943. },
  19944. "EventSessionNextCompactionEnded": {
  19945. "type": "object",
  19946. "properties": {
  19947. "id": {
  19948. "type": "string"
  19949. },
  19950. "type": {
  19951. "type": "string",
  19952. "enum": ["session.next.compaction.ended"]
  19953. },
  19954. "properties": {
  19955. "type": "object",
  19956. "properties": {
  19957. "timestamp": {
  19958. "type": "number"
  19959. },
  19960. "sessionID": {
  19961. "type": "string",
  19962. "pattern": "^ses"
  19963. },
  19964. "text": {
  19965. "type": "string"
  19966. },
  19967. "include": {
  19968. "type": "string"
  19969. }
  19970. },
  19971. "required": ["timestamp", "sessionID", "text"],
  19972. "additionalProperties": false
  19973. }
  19974. },
  19975. "required": ["id", "type", "properties"],
  19976. "additionalProperties": false
  19977. },
  19978. "ModelV2Info": {
  19979. "type": "object",
  19980. "properties": {
  19981. "id": {
  19982. "type": "string"
  19983. },
  19984. "apiID": {
  19985. "type": "string"
  19986. },
  19987. "providerID": {
  19988. "type": "string"
  19989. },
  19990. "family": {
  19991. "type": "string"
  19992. },
  19993. "name": {
  19994. "type": "string"
  19995. },
  19996. "endpoint": {
  19997. "anyOf": [
  19998. {
  19999. "type": "object",
  20000. "properties": {
  20001. "type": {
  20002. "type": "string",
  20003. "enum": ["unknown"]
  20004. }
  20005. },
  20006. "required": ["type"],
  20007. "additionalProperties": false
  20008. },
  20009. {
  20010. "type": "object",
  20011. "properties": {
  20012. "type": {
  20013. "type": "string",
  20014. "enum": ["openai/responses"]
  20015. },
  20016. "url": {
  20017. "type": "string"
  20018. },
  20019. "websocket": {
  20020. "type": "boolean"
  20021. }
  20022. },
  20023. "required": ["type", "url"],
  20024. "additionalProperties": false
  20025. },
  20026. {
  20027. "type": "object",
  20028. "properties": {
  20029. "type": {
  20030. "type": "string",
  20031. "enum": ["openai/completions"]
  20032. },
  20033. "url": {
  20034. "type": "string"
  20035. },
  20036. "reasoning": {
  20037. "anyOf": [
  20038. {
  20039. "type": "object",
  20040. "properties": {
  20041. "type": {
  20042. "type": "string",
  20043. "enum": ["reasoning_content"]
  20044. }
  20045. },
  20046. "required": ["type"],
  20047. "additionalProperties": false
  20048. },
  20049. {
  20050. "type": "object",
  20051. "properties": {
  20052. "type": {
  20053. "type": "string",
  20054. "enum": ["reasoning_details"]
  20055. }
  20056. },
  20057. "required": ["type"],
  20058. "additionalProperties": false
  20059. }
  20060. ]
  20061. }
  20062. },
  20063. "required": ["type", "url"],
  20064. "additionalProperties": false
  20065. },
  20066. {
  20067. "type": "object",
  20068. "properties": {
  20069. "type": {
  20070. "type": "string",
  20071. "enum": ["anthropic/messages"]
  20072. },
  20073. "url": {
  20074. "type": "string"
  20075. }
  20076. },
  20077. "required": ["type", "url"],
  20078. "additionalProperties": false
  20079. },
  20080. {
  20081. "type": "object",
  20082. "properties": {
  20083. "type": {
  20084. "type": "string",
  20085. "enum": ["aisdk"]
  20086. },
  20087. "package": {
  20088. "type": "string"
  20089. },
  20090. "url": {
  20091. "type": "string"
  20092. }
  20093. },
  20094. "required": ["type", "package"],
  20095. "additionalProperties": false
  20096. }
  20097. ]
  20098. },
  20099. "capabilities": {
  20100. "type": "object",
  20101. "properties": {
  20102. "tools": {
  20103. "type": "boolean"
  20104. },
  20105. "input": {
  20106. "type": "array",
  20107. "items": {
  20108. "type": "string"
  20109. }
  20110. },
  20111. "output": {
  20112. "type": "array",
  20113. "items": {
  20114. "type": "string"
  20115. }
  20116. }
  20117. },
  20118. "required": ["tools", "input", "output"],
  20119. "additionalProperties": false
  20120. },
  20121. "options": {
  20122. "type": "object",
  20123. "properties": {
  20124. "headers": {
  20125. "type": "object",
  20126. "additionalProperties": {
  20127. "type": "string"
  20128. }
  20129. },
  20130. "body": {
  20131. "type": "object"
  20132. },
  20133. "aisdk": {
  20134. "type": "object",
  20135. "properties": {
  20136. "provider": {
  20137. "type": "object"
  20138. },
  20139. "request": {
  20140. "type": "object"
  20141. }
  20142. },
  20143. "required": ["provider", "request"],
  20144. "additionalProperties": false
  20145. },
  20146. "variant": {
  20147. "type": "string"
  20148. }
  20149. },
  20150. "required": ["headers", "body", "aisdk"],
  20151. "additionalProperties": false
  20152. },
  20153. "variants": {
  20154. "type": "array",
  20155. "items": {
  20156. "type": "object",
  20157. "properties": {
  20158. "id": {
  20159. "type": "string"
  20160. },
  20161. "headers": {
  20162. "type": "object",
  20163. "additionalProperties": {
  20164. "type": "string"
  20165. }
  20166. },
  20167. "body": {
  20168. "type": "object"
  20169. },
  20170. "aisdk": {
  20171. "type": "object",
  20172. "properties": {
  20173. "provider": {
  20174. "type": "object"
  20175. },
  20176. "request": {
  20177. "type": "object"
  20178. }
  20179. },
  20180. "required": ["provider", "request"],
  20181. "additionalProperties": false
  20182. }
  20183. },
  20184. "required": ["id", "headers", "body", "aisdk"],
  20185. "additionalProperties": false
  20186. }
  20187. },
  20188. "time": {
  20189. "type": "object",
  20190. "properties": {
  20191. "released": {
  20192. "anyOf": [
  20193. {
  20194. "type": "number"
  20195. },
  20196. {
  20197. "type": "string",
  20198. "enum": ["NaN"]
  20199. },
  20200. {
  20201. "type": "string",
  20202. "enum": ["Infinity"]
  20203. },
  20204. {
  20205. "type": "string",
  20206. "enum": ["-Infinity"]
  20207. },
  20208. {
  20209. "type": "string",
  20210. "enum": ["Infinity", "-Infinity", "NaN"]
  20211. }
  20212. ]
  20213. }
  20214. },
  20215. "required": ["released"],
  20216. "additionalProperties": false
  20217. },
  20218. "cost": {
  20219. "type": "array",
  20220. "items": {
  20221. "type": "object",
  20222. "properties": {
  20223. "tier": {
  20224. "type": "object",
  20225. "properties": {
  20226. "type": {
  20227. "type": "string",
  20228. "enum": ["context"]
  20229. },
  20230. "size": {
  20231. "type": "integer"
  20232. }
  20233. },
  20234. "required": ["type", "size"],
  20235. "additionalProperties": false
  20236. },
  20237. "input": {
  20238. "type": "number"
  20239. },
  20240. "output": {
  20241. "type": "number"
  20242. },
  20243. "cache": {
  20244. "type": "object",
  20245. "properties": {
  20246. "read": {
  20247. "type": "number"
  20248. },
  20249. "write": {
  20250. "type": "number"
  20251. }
  20252. },
  20253. "required": ["read", "write"],
  20254. "additionalProperties": false
  20255. }
  20256. },
  20257. "required": ["input", "output", "cache"],
  20258. "additionalProperties": false
  20259. }
  20260. },
  20261. "status": {
  20262. "type": "string",
  20263. "enum": ["alpha", "beta", "deprecated", "active"]
  20264. },
  20265. "enabled": {
  20266. "type": "boolean"
  20267. },
  20268. "limit": {
  20269. "type": "object",
  20270. "properties": {
  20271. "context": {
  20272. "type": "integer"
  20273. },
  20274. "input": {
  20275. "type": "integer"
  20276. },
  20277. "output": {
  20278. "type": "integer"
  20279. }
  20280. },
  20281. "required": ["context", "output"],
  20282. "additionalProperties": false
  20283. }
  20284. },
  20285. "required": [
  20286. "id",
  20287. "apiID",
  20288. "providerID",
  20289. "name",
  20290. "endpoint",
  20291. "capabilities",
  20292. "options",
  20293. "variants",
  20294. "time",
  20295. "cost",
  20296. "status",
  20297. "enabled",
  20298. "limit"
  20299. ],
  20300. "additionalProperties": false
  20301. },
  20302. "EventCatalogModelUpdated": {
  20303. "type": "object",
  20304. "properties": {
  20305. "id": {
  20306. "type": "string"
  20307. },
  20308. "type": {
  20309. "type": "string",
  20310. "enum": ["catalog.model.updated"]
  20311. },
  20312. "properties": {
  20313. "type": "object",
  20314. "properties": {
  20315. "model": {
  20316. "$ref": "#/components/schemas/ModelV2Info"
  20317. }
  20318. },
  20319. "required": ["model"],
  20320. "additionalProperties": false
  20321. }
  20322. },
  20323. "required": ["id", "type", "properties"],
  20324. "additionalProperties": false
  20325. },
  20326. "EventModels-devRefreshed": {
  20327. "type": "object",
  20328. "properties": {
  20329. "id": {
  20330. "type": "string"
  20331. },
  20332. "type": {
  20333. "type": "string",
  20334. "enum": ["models-dev.refreshed"]
  20335. },
  20336. "properties": {
  20337. "type": "object",
  20338. "properties": {}
  20339. }
  20340. },
  20341. "required": ["id", "type", "properties"],
  20342. "additionalProperties": false
  20343. },
  20344. "SessionInfo": {
  20345. "type": "object",
  20346. "properties": {
  20347. "id": {
  20348. "type": "string",
  20349. "pattern": "^ses"
  20350. },
  20351. "parentID": {
  20352. "type": "string",
  20353. "pattern": "^ses"
  20354. },
  20355. "projectID": {
  20356. "type": "string"
  20357. },
  20358. "workspaceID": {
  20359. "type": "string",
  20360. "pattern": "^wrk"
  20361. },
  20362. "path": {
  20363. "type": "string"
  20364. },
  20365. "agent": {
  20366. "type": "string"
  20367. },
  20368. "model": {
  20369. "type": "object",
  20370. "properties": {
  20371. "id": {
  20372. "type": "string"
  20373. },
  20374. "providerID": {
  20375. "type": "string"
  20376. },
  20377. "variant": {
  20378. "type": "string"
  20379. }
  20380. },
  20381. "required": ["id", "providerID", "variant"],
  20382. "additionalProperties": false
  20383. },
  20384. "cost": {
  20385. "type": "number"
  20386. },
  20387. "tokens": {
  20388. "type": "object",
  20389. "properties": {
  20390. "input": {
  20391. "type": "number"
  20392. },
  20393. "output": {
  20394. "type": "number"
  20395. },
  20396. "reasoning": {
  20397. "type": "number"
  20398. },
  20399. "cache": {
  20400. "type": "object",
  20401. "properties": {
  20402. "read": {
  20403. "type": "number"
  20404. },
  20405. "write": {
  20406. "type": "number"
  20407. }
  20408. },
  20409. "required": ["read", "write"],
  20410. "additionalProperties": false
  20411. }
  20412. },
  20413. "required": ["input", "output", "reasoning", "cache"],
  20414. "additionalProperties": false
  20415. },
  20416. "time": {
  20417. "type": "object",
  20418. "properties": {
  20419. "created": {
  20420. "type": "number"
  20421. },
  20422. "updated": {
  20423. "type": "number"
  20424. },
  20425. "archived": {
  20426. "type": "number"
  20427. }
  20428. },
  20429. "required": ["created", "updated"],
  20430. "additionalProperties": false
  20431. },
  20432. "title": {
  20433. "type": "string"
  20434. }
  20435. },
  20436. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20437. "additionalProperties": false
  20438. },
  20439. "SessionDelivery": {
  20440. "type": "string",
  20441. "enum": ["immediate", "deferred"]
  20442. },
  20443. "SessionMessageAgentSwitched": {
  20444. "type": "object",
  20445. "properties": {
  20446. "id": {
  20447. "type": "string"
  20448. },
  20449. "metadata": {
  20450. "type": "object"
  20451. },
  20452. "time": {
  20453. "type": "object",
  20454. "properties": {
  20455. "created": {
  20456. "type": "number"
  20457. }
  20458. },
  20459. "required": ["created"],
  20460. "additionalProperties": false
  20461. },
  20462. "type": {
  20463. "type": "string",
  20464. "enum": ["agent-switched"]
  20465. },
  20466. "agent": {
  20467. "type": "string"
  20468. }
  20469. },
  20470. "required": ["id", "time", "type", "agent"],
  20471. "additionalProperties": false
  20472. },
  20473. "SessionMessageModelSwitched": {
  20474. "type": "object",
  20475. "properties": {
  20476. "id": {
  20477. "type": "string"
  20478. },
  20479. "metadata": {
  20480. "type": "object"
  20481. },
  20482. "time": {
  20483. "type": "object",
  20484. "properties": {
  20485. "created": {
  20486. "type": "number"
  20487. }
  20488. },
  20489. "required": ["created"],
  20490. "additionalProperties": false
  20491. },
  20492. "type": {
  20493. "type": "string",
  20494. "enum": ["model-switched"]
  20495. },
  20496. "model": {
  20497. "type": "object",
  20498. "properties": {
  20499. "id": {
  20500. "type": "string"
  20501. },
  20502. "providerID": {
  20503. "type": "string"
  20504. },
  20505. "variant": {
  20506. "type": "string"
  20507. }
  20508. },
  20509. "required": ["id", "providerID", "variant"],
  20510. "additionalProperties": false
  20511. }
  20512. },
  20513. "required": ["id", "time", "type", "model"],
  20514. "additionalProperties": false
  20515. },
  20516. "SessionMessageUser": {
  20517. "type": "object",
  20518. "properties": {
  20519. "id": {
  20520. "type": "string"
  20521. },
  20522. "metadata": {
  20523. "type": "object"
  20524. },
  20525. "time": {
  20526. "type": "object",
  20527. "properties": {
  20528. "created": {
  20529. "type": "number"
  20530. }
  20531. },
  20532. "required": ["created"],
  20533. "additionalProperties": false
  20534. },
  20535. "text": {
  20536. "type": "string"
  20537. },
  20538. "files": {
  20539. "type": "array",
  20540. "items": {
  20541. "$ref": "#/components/schemas/PromptFileAttachment"
  20542. }
  20543. },
  20544. "agents": {
  20545. "type": "array",
  20546. "items": {
  20547. "$ref": "#/components/schemas/PromptAgentAttachment"
  20548. }
  20549. },
  20550. "references": {
  20551. "type": "array",
  20552. "items": {
  20553. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20554. }
  20555. },
  20556. "type": {
  20557. "type": "string",
  20558. "enum": ["user"]
  20559. }
  20560. },
  20561. "required": ["id", "time", "text", "type"],
  20562. "additionalProperties": false
  20563. },
  20564. "SessionMessageSynthetic": {
  20565. "type": "object",
  20566. "properties": {
  20567. "id": {
  20568. "type": "string"
  20569. },
  20570. "metadata": {
  20571. "type": "object"
  20572. },
  20573. "time": {
  20574. "type": "object",
  20575. "properties": {
  20576. "created": {
  20577. "type": "number"
  20578. }
  20579. },
  20580. "required": ["created"],
  20581. "additionalProperties": false
  20582. },
  20583. "sessionID": {
  20584. "type": "string",
  20585. "pattern": "^ses"
  20586. },
  20587. "text": {
  20588. "type": "string"
  20589. },
  20590. "type": {
  20591. "type": "string",
  20592. "enum": ["synthetic"]
  20593. }
  20594. },
  20595. "required": ["id", "time", "sessionID", "text", "type"],
  20596. "additionalProperties": false
  20597. },
  20598. "SessionMessageShell": {
  20599. "type": "object",
  20600. "properties": {
  20601. "id": {
  20602. "type": "string"
  20603. },
  20604. "metadata": {
  20605. "type": "object"
  20606. },
  20607. "time": {
  20608. "type": "object",
  20609. "properties": {
  20610. "created": {
  20611. "type": "number"
  20612. },
  20613. "completed": {
  20614. "type": "number"
  20615. }
  20616. },
  20617. "required": ["created"],
  20618. "additionalProperties": false
  20619. },
  20620. "type": {
  20621. "type": "string",
  20622. "enum": ["shell"]
  20623. },
  20624. "callID": {
  20625. "type": "string"
  20626. },
  20627. "command": {
  20628. "type": "string"
  20629. },
  20630. "output": {
  20631. "type": "string"
  20632. }
  20633. },
  20634. "required": ["id", "time", "type", "callID", "command", "output"],
  20635. "additionalProperties": false
  20636. },
  20637. "SessionMessageAssistantText": {
  20638. "type": "object",
  20639. "properties": {
  20640. "type": {
  20641. "type": "string",
  20642. "enum": ["text"]
  20643. },
  20644. "text": {
  20645. "type": "string"
  20646. }
  20647. },
  20648. "required": ["type", "text"],
  20649. "additionalProperties": false
  20650. },
  20651. "SessionMessageAssistantReasoning": {
  20652. "type": "object",
  20653. "properties": {
  20654. "type": {
  20655. "type": "string",
  20656. "enum": ["reasoning"]
  20657. },
  20658. "id": {
  20659. "type": "string"
  20660. },
  20661. "text": {
  20662. "type": "string"
  20663. }
  20664. },
  20665. "required": ["type", "id", "text"],
  20666. "additionalProperties": false
  20667. },
  20668. "SessionMessageToolStatePending": {
  20669. "type": "object",
  20670. "properties": {
  20671. "status": {
  20672. "type": "string",
  20673. "enum": ["pending"]
  20674. },
  20675. "input": {
  20676. "type": "string"
  20677. }
  20678. },
  20679. "required": ["status", "input"],
  20680. "additionalProperties": false
  20681. },
  20682. "SessionMessageToolStateRunning": {
  20683. "type": "object",
  20684. "properties": {
  20685. "status": {
  20686. "type": "string",
  20687. "enum": ["running"]
  20688. },
  20689. "input": {
  20690. "type": "object"
  20691. },
  20692. "structured": {
  20693. "type": "object"
  20694. },
  20695. "content": {
  20696. "type": "array",
  20697. "items": {
  20698. "anyOf": [
  20699. {
  20700. "$ref": "#/components/schemas/ToolTextContent"
  20701. },
  20702. {
  20703. "$ref": "#/components/schemas/ToolFileContent"
  20704. }
  20705. ]
  20706. }
  20707. }
  20708. },
  20709. "required": ["status", "input", "structured", "content"],
  20710. "additionalProperties": false
  20711. },
  20712. "SessionMessageToolStateCompleted": {
  20713. "type": "object",
  20714. "properties": {
  20715. "status": {
  20716. "type": "string",
  20717. "enum": ["completed"]
  20718. },
  20719. "input": {
  20720. "type": "object"
  20721. },
  20722. "attachments": {
  20723. "type": "array",
  20724. "items": {
  20725. "$ref": "#/components/schemas/PromptFileAttachment"
  20726. }
  20727. },
  20728. "content": {
  20729. "type": "array",
  20730. "items": {
  20731. "anyOf": [
  20732. {
  20733. "$ref": "#/components/schemas/ToolTextContent"
  20734. },
  20735. {
  20736. "$ref": "#/components/schemas/ToolFileContent"
  20737. }
  20738. ]
  20739. }
  20740. },
  20741. "structured": {
  20742. "type": "object"
  20743. }
  20744. },
  20745. "required": ["status", "input", "content", "structured"],
  20746. "additionalProperties": false
  20747. },
  20748. "SessionMessageToolStateError": {
  20749. "type": "object",
  20750. "properties": {
  20751. "status": {
  20752. "type": "string",
  20753. "enum": ["error"]
  20754. },
  20755. "input": {
  20756. "type": "object"
  20757. },
  20758. "content": {
  20759. "type": "array",
  20760. "items": {
  20761. "anyOf": [
  20762. {
  20763. "$ref": "#/components/schemas/ToolTextContent"
  20764. },
  20765. {
  20766. "$ref": "#/components/schemas/ToolFileContent"
  20767. }
  20768. ]
  20769. }
  20770. },
  20771. "structured": {
  20772. "type": "object"
  20773. },
  20774. "error": {
  20775. "$ref": "#/components/schemas/SessionErrorUnknown"
  20776. }
  20777. },
  20778. "required": ["status", "input", "content", "structured", "error"],
  20779. "additionalProperties": false
  20780. },
  20781. "SessionMessageAssistantTool": {
  20782. "type": "object",
  20783. "properties": {
  20784. "type": {
  20785. "type": "string",
  20786. "enum": ["tool"]
  20787. },
  20788. "id": {
  20789. "type": "string"
  20790. },
  20791. "name": {
  20792. "type": "string"
  20793. },
  20794. "provider": {
  20795. "type": "object",
  20796. "properties": {
  20797. "executed": {
  20798. "type": "boolean"
  20799. },
  20800. "metadata": {
  20801. "type": "object"
  20802. }
  20803. },
  20804. "required": ["executed"],
  20805. "additionalProperties": false
  20806. },
  20807. "state": {
  20808. "anyOf": [
  20809. {
  20810. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  20811. },
  20812. {
  20813. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  20814. },
  20815. {
  20816. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  20817. },
  20818. {
  20819. "$ref": "#/components/schemas/SessionMessageToolStateError"
  20820. }
  20821. ]
  20822. },
  20823. "time": {
  20824. "type": "object",
  20825. "properties": {
  20826. "created": {
  20827. "type": "number"
  20828. },
  20829. "ran": {
  20830. "type": "number"
  20831. },
  20832. "completed": {
  20833. "type": "number"
  20834. },
  20835. "pruned": {
  20836. "type": "number"
  20837. }
  20838. },
  20839. "required": ["created"],
  20840. "additionalProperties": false
  20841. }
  20842. },
  20843. "required": ["type", "id", "name", "state", "time"],
  20844. "additionalProperties": false
  20845. },
  20846. "SessionMessageAssistant": {
  20847. "type": "object",
  20848. "properties": {
  20849. "id": {
  20850. "type": "string"
  20851. },
  20852. "metadata": {
  20853. "type": "object"
  20854. },
  20855. "time": {
  20856. "type": "object",
  20857. "properties": {
  20858. "created": {
  20859. "type": "number"
  20860. },
  20861. "completed": {
  20862. "type": "number"
  20863. }
  20864. },
  20865. "required": ["created"],
  20866. "additionalProperties": false
  20867. },
  20868. "type": {
  20869. "type": "string",
  20870. "enum": ["assistant"]
  20871. },
  20872. "agent": {
  20873. "type": "string"
  20874. },
  20875. "model": {
  20876. "type": "object",
  20877. "properties": {
  20878. "id": {
  20879. "type": "string"
  20880. },
  20881. "providerID": {
  20882. "type": "string"
  20883. },
  20884. "variant": {
  20885. "type": "string"
  20886. }
  20887. },
  20888. "required": ["id", "providerID", "variant"],
  20889. "additionalProperties": false
  20890. },
  20891. "content": {
  20892. "type": "array",
  20893. "items": {
  20894. "anyOf": [
  20895. {
  20896. "$ref": "#/components/schemas/SessionMessageAssistantText"
  20897. },
  20898. {
  20899. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  20900. },
  20901. {
  20902. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  20903. }
  20904. ]
  20905. }
  20906. },
  20907. "snapshot": {
  20908. "type": "object",
  20909. "properties": {
  20910. "start": {
  20911. "type": "string"
  20912. },
  20913. "end": {
  20914. "type": "string"
  20915. }
  20916. },
  20917. "additionalProperties": false
  20918. },
  20919. "finish": {
  20920. "type": "string"
  20921. },
  20922. "cost": {
  20923. "type": "number"
  20924. },
  20925. "tokens": {
  20926. "type": "object",
  20927. "properties": {
  20928. "input": {
  20929. "type": "number"
  20930. },
  20931. "output": {
  20932. "type": "number"
  20933. },
  20934. "reasoning": {
  20935. "type": "number"
  20936. },
  20937. "cache": {
  20938. "type": "object",
  20939. "properties": {
  20940. "read": {
  20941. "type": "number"
  20942. },
  20943. "write": {
  20944. "type": "number"
  20945. }
  20946. },
  20947. "required": ["read", "write"],
  20948. "additionalProperties": false
  20949. }
  20950. },
  20951. "required": ["input", "output", "reasoning", "cache"],
  20952. "additionalProperties": false
  20953. },
  20954. "error": {
  20955. "$ref": "#/components/schemas/SessionErrorUnknown"
  20956. }
  20957. },
  20958. "required": ["id", "time", "type", "agent", "model", "content"],
  20959. "additionalProperties": false
  20960. },
  20961. "SessionMessageCompaction": {
  20962. "type": "object",
  20963. "properties": {
  20964. "type": {
  20965. "type": "string",
  20966. "enum": ["compaction"]
  20967. },
  20968. "reason": {
  20969. "type": "string",
  20970. "enum": ["auto", "manual"]
  20971. },
  20972. "summary": {
  20973. "type": "string"
  20974. },
  20975. "include": {
  20976. "type": "string"
  20977. },
  20978. "id": {
  20979. "type": "string"
  20980. },
  20981. "metadata": {
  20982. "type": "object"
  20983. },
  20984. "time": {
  20985. "type": "object",
  20986. "properties": {
  20987. "created": {
  20988. "type": "number"
  20989. }
  20990. },
  20991. "required": ["created"],
  20992. "additionalProperties": false
  20993. }
  20994. },
  20995. "required": ["type", "reason", "summary", "id", "time"],
  20996. "additionalProperties": false
  20997. },
  20998. "SessionMessage": {
  20999. "anyOf": [
  21000. {
  21001. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21002. },
  21003. {
  21004. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21005. },
  21006. {
  21007. "$ref": "#/components/schemas/SessionMessageUser"
  21008. },
  21009. {
  21010. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21011. },
  21012. {
  21013. "$ref": "#/components/schemas/SessionMessageShell"
  21014. },
  21015. {
  21016. "$ref": "#/components/schemas/SessionMessageAssistant"
  21017. },
  21018. {
  21019. "$ref": "#/components/schemas/SessionMessageCompaction"
  21020. }
  21021. ]
  21022. },
  21023. "ProviderV2Info": {
  21024. "type": "object",
  21025. "properties": {
  21026. "id": {
  21027. "type": "string"
  21028. },
  21029. "name": {
  21030. "type": "string"
  21031. },
  21032. "enabled": {
  21033. "anyOf": [
  21034. {
  21035. "type": "boolean",
  21036. "enum": [false]
  21037. },
  21038. {
  21039. "type": "object",
  21040. "properties": {
  21041. "via": {
  21042. "type": "string",
  21043. "enum": ["env"]
  21044. },
  21045. "name": {
  21046. "type": "string"
  21047. }
  21048. },
  21049. "required": ["via", "name"],
  21050. "additionalProperties": false
  21051. },
  21052. {
  21053. "type": "object",
  21054. "properties": {
  21055. "via": {
  21056. "type": "string",
  21057. "enum": ["account"]
  21058. },
  21059. "service": {
  21060. "type": "string"
  21061. }
  21062. },
  21063. "required": ["via", "service"],
  21064. "additionalProperties": false
  21065. },
  21066. {
  21067. "type": "object",
  21068. "properties": {
  21069. "via": {
  21070. "type": "string",
  21071. "enum": ["custom"]
  21072. },
  21073. "data": {
  21074. "type": "object"
  21075. }
  21076. },
  21077. "required": ["via", "data"],
  21078. "additionalProperties": false
  21079. }
  21080. ]
  21081. },
  21082. "env": {
  21083. "type": "array",
  21084. "items": {
  21085. "type": "string"
  21086. }
  21087. },
  21088. "endpoint": {
  21089. "anyOf": [
  21090. {
  21091. "type": "object",
  21092. "properties": {
  21093. "type": {
  21094. "type": "string",
  21095. "enum": ["unknown"]
  21096. }
  21097. },
  21098. "required": ["type"],
  21099. "additionalProperties": false
  21100. },
  21101. {
  21102. "type": "object",
  21103. "properties": {
  21104. "type": {
  21105. "type": "string",
  21106. "enum": ["openai/responses"]
  21107. },
  21108. "url": {
  21109. "type": "string"
  21110. },
  21111. "websocket": {
  21112. "type": "boolean"
  21113. }
  21114. },
  21115. "required": ["type", "url"],
  21116. "additionalProperties": false
  21117. },
  21118. {
  21119. "type": "object",
  21120. "properties": {
  21121. "type": {
  21122. "type": "string",
  21123. "enum": ["openai/completions"]
  21124. },
  21125. "url": {
  21126. "type": "string"
  21127. },
  21128. "reasoning": {
  21129. "anyOf": [
  21130. {
  21131. "type": "object",
  21132. "properties": {
  21133. "type": {
  21134. "type": "string",
  21135. "enum": ["reasoning_content"]
  21136. }
  21137. },
  21138. "required": ["type"],
  21139. "additionalProperties": false
  21140. },
  21141. {
  21142. "type": "object",
  21143. "properties": {
  21144. "type": {
  21145. "type": "string",
  21146. "enum": ["reasoning_details"]
  21147. }
  21148. },
  21149. "required": ["type"],
  21150. "additionalProperties": false
  21151. }
  21152. ]
  21153. }
  21154. },
  21155. "required": ["type", "url"],
  21156. "additionalProperties": false
  21157. },
  21158. {
  21159. "type": "object",
  21160. "properties": {
  21161. "type": {
  21162. "type": "string",
  21163. "enum": ["anthropic/messages"]
  21164. },
  21165. "url": {
  21166. "type": "string"
  21167. }
  21168. },
  21169. "required": ["type", "url"],
  21170. "additionalProperties": false
  21171. },
  21172. {
  21173. "type": "object",
  21174. "properties": {
  21175. "type": {
  21176. "type": "string",
  21177. "enum": ["aisdk"]
  21178. },
  21179. "package": {
  21180. "type": "string"
  21181. },
  21182. "url": {
  21183. "type": "string"
  21184. }
  21185. },
  21186. "required": ["type", "package"],
  21187. "additionalProperties": false
  21188. }
  21189. ]
  21190. },
  21191. "options": {
  21192. "type": "object",
  21193. "properties": {
  21194. "headers": {
  21195. "type": "object",
  21196. "additionalProperties": {
  21197. "type": "string"
  21198. }
  21199. },
  21200. "body": {
  21201. "type": "object"
  21202. },
  21203. "aisdk": {
  21204. "type": "object",
  21205. "properties": {
  21206. "provider": {
  21207. "type": "object"
  21208. },
  21209. "request": {
  21210. "type": "object"
  21211. }
  21212. },
  21213. "required": ["provider", "request"],
  21214. "additionalProperties": false
  21215. }
  21216. },
  21217. "required": ["headers", "body", "aisdk"],
  21218. "additionalProperties": false
  21219. }
  21220. },
  21221. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21222. "additionalProperties": false
  21223. },
  21224. "EventTuiToastShow1": {
  21225. "type": "object",
  21226. "properties": {
  21227. "id": {
  21228. "type": "string"
  21229. },
  21230. "type": {
  21231. "type": "string",
  21232. "enum": ["tui.toast.show"]
  21233. },
  21234. "properties": {
  21235. "type": "object",
  21236. "properties": {
  21237. "title": {
  21238. "type": "string"
  21239. },
  21240. "message": {
  21241. "type": "string"
  21242. },
  21243. "variant": {
  21244. "type": "string",
  21245. "enum": ["info", "success", "warning", "error"]
  21246. },
  21247. "duration": {
  21248. "type": "integer",
  21249. "exclusiveMinimum": 0
  21250. }
  21251. },
  21252. "required": ["message", "variant"],
  21253. "additionalProperties": false
  21254. }
  21255. },
  21256. "required": ["id", "type", "properties"],
  21257. "additionalProperties": false
  21258. },
  21259. "ModelV2Info1": {
  21260. "type": "object",
  21261. "properties": {
  21262. "id": {
  21263. "type": "string"
  21264. },
  21265. "apiID": {
  21266. "type": "string"
  21267. },
  21268. "providerID": {
  21269. "type": "string"
  21270. },
  21271. "family": {
  21272. "type": "string"
  21273. },
  21274. "name": {
  21275. "type": "string"
  21276. },
  21277. "endpoint": {
  21278. "anyOf": [
  21279. {
  21280. "type": "object",
  21281. "properties": {
  21282. "type": {
  21283. "type": "string",
  21284. "enum": ["unknown"]
  21285. }
  21286. },
  21287. "required": ["type"],
  21288. "additionalProperties": false
  21289. },
  21290. {
  21291. "type": "object",
  21292. "properties": {
  21293. "type": {
  21294. "type": "string",
  21295. "enum": ["openai/responses"]
  21296. },
  21297. "url": {
  21298. "type": "string"
  21299. },
  21300. "websocket": {
  21301. "type": "boolean"
  21302. }
  21303. },
  21304. "required": ["type", "url"],
  21305. "additionalProperties": false
  21306. },
  21307. {
  21308. "type": "object",
  21309. "properties": {
  21310. "type": {
  21311. "type": "string",
  21312. "enum": ["openai/completions"]
  21313. },
  21314. "url": {
  21315. "type": "string"
  21316. },
  21317. "reasoning": {
  21318. "anyOf": [
  21319. {
  21320. "type": "object",
  21321. "properties": {
  21322. "type": {
  21323. "type": "string",
  21324. "enum": ["reasoning_content"]
  21325. }
  21326. },
  21327. "required": ["type"],
  21328. "additionalProperties": false
  21329. },
  21330. {
  21331. "type": "object",
  21332. "properties": {
  21333. "type": {
  21334. "type": "string",
  21335. "enum": ["reasoning_details"]
  21336. }
  21337. },
  21338. "required": ["type"],
  21339. "additionalProperties": false
  21340. }
  21341. ]
  21342. }
  21343. },
  21344. "required": ["type", "url"],
  21345. "additionalProperties": false
  21346. },
  21347. {
  21348. "type": "object",
  21349. "properties": {
  21350. "type": {
  21351. "type": "string",
  21352. "enum": ["anthropic/messages"]
  21353. },
  21354. "url": {
  21355. "type": "string"
  21356. }
  21357. },
  21358. "required": ["type", "url"],
  21359. "additionalProperties": false
  21360. },
  21361. {
  21362. "type": "object",
  21363. "properties": {
  21364. "type": {
  21365. "type": "string",
  21366. "enum": ["aisdk"]
  21367. },
  21368. "package": {
  21369. "type": "string"
  21370. },
  21371. "url": {
  21372. "type": "string"
  21373. }
  21374. },
  21375. "required": ["type", "package"],
  21376. "additionalProperties": false
  21377. }
  21378. ]
  21379. },
  21380. "capabilities": {
  21381. "type": "object",
  21382. "properties": {
  21383. "tools": {
  21384. "type": "boolean"
  21385. },
  21386. "input": {
  21387. "type": "array",
  21388. "items": {
  21389. "type": "string"
  21390. }
  21391. },
  21392. "output": {
  21393. "type": "array",
  21394. "items": {
  21395. "type": "string"
  21396. }
  21397. }
  21398. },
  21399. "required": ["tools", "input", "output"],
  21400. "additionalProperties": false
  21401. },
  21402. "options": {
  21403. "type": "object",
  21404. "properties": {
  21405. "headers": {
  21406. "type": "object",
  21407. "additionalProperties": {
  21408. "type": "string"
  21409. }
  21410. },
  21411. "body": {
  21412. "type": "object"
  21413. },
  21414. "aisdk": {
  21415. "type": "object",
  21416. "properties": {
  21417. "provider": {
  21418. "type": "object"
  21419. },
  21420. "request": {
  21421. "type": "object"
  21422. }
  21423. },
  21424. "required": ["provider", "request"],
  21425. "additionalProperties": false
  21426. },
  21427. "variant": {
  21428. "type": "string"
  21429. }
  21430. },
  21431. "required": ["headers", "body", "aisdk"],
  21432. "additionalProperties": false
  21433. },
  21434. "variants": {
  21435. "type": "array",
  21436. "items": {
  21437. "type": "object",
  21438. "properties": {
  21439. "id": {
  21440. "type": "string"
  21441. },
  21442. "headers": {
  21443. "type": "object",
  21444. "additionalProperties": {
  21445. "type": "string"
  21446. }
  21447. },
  21448. "body": {
  21449. "type": "object"
  21450. },
  21451. "aisdk": {
  21452. "type": "object",
  21453. "properties": {
  21454. "provider": {
  21455. "type": "object"
  21456. },
  21457. "request": {
  21458. "type": "object"
  21459. }
  21460. },
  21461. "required": ["provider", "request"],
  21462. "additionalProperties": false
  21463. }
  21464. },
  21465. "required": ["id", "headers", "body", "aisdk"],
  21466. "additionalProperties": false
  21467. }
  21468. },
  21469. "time": {
  21470. "type": "object",
  21471. "properties": {
  21472. "released": {
  21473. "anyOf": [
  21474. {
  21475. "type": "number"
  21476. },
  21477. {
  21478. "type": "string",
  21479. "enum": ["NaN"]
  21480. },
  21481. {
  21482. "type": "string",
  21483. "enum": ["Infinity"]
  21484. },
  21485. {
  21486. "type": "string",
  21487. "enum": ["-Infinity"]
  21488. }
  21489. ]
  21490. }
  21491. },
  21492. "required": ["released"],
  21493. "additionalProperties": false
  21494. },
  21495. "cost": {
  21496. "type": "array",
  21497. "items": {
  21498. "type": "object",
  21499. "properties": {
  21500. "tier": {
  21501. "type": "object",
  21502. "properties": {
  21503. "type": {
  21504. "type": "string",
  21505. "enum": ["context"]
  21506. },
  21507. "size": {
  21508. "type": "integer"
  21509. }
  21510. },
  21511. "required": ["type", "size"],
  21512. "additionalProperties": false
  21513. },
  21514. "input": {
  21515. "type": "number"
  21516. },
  21517. "output": {
  21518. "type": "number"
  21519. },
  21520. "cache": {
  21521. "type": "object",
  21522. "properties": {
  21523. "read": {
  21524. "type": "number"
  21525. },
  21526. "write": {
  21527. "type": "number"
  21528. }
  21529. },
  21530. "required": ["read", "write"],
  21531. "additionalProperties": false
  21532. }
  21533. },
  21534. "required": ["input", "output", "cache"],
  21535. "additionalProperties": false
  21536. }
  21537. },
  21538. "status": {
  21539. "type": "string",
  21540. "enum": ["alpha", "beta", "deprecated", "active"]
  21541. },
  21542. "enabled": {
  21543. "type": "boolean"
  21544. },
  21545. "limit": {
  21546. "type": "object",
  21547. "properties": {
  21548. "context": {
  21549. "type": "integer"
  21550. },
  21551. "input": {
  21552. "type": "integer"
  21553. },
  21554. "output": {
  21555. "type": "integer"
  21556. }
  21557. },
  21558. "required": ["context", "output"],
  21559. "additionalProperties": false
  21560. }
  21561. },
  21562. "required": [
  21563. "id",
  21564. "apiID",
  21565. "providerID",
  21566. "name",
  21567. "endpoint",
  21568. "capabilities",
  21569. "options",
  21570. "variants",
  21571. "time",
  21572. "cost",
  21573. "status",
  21574. "enabled",
  21575. "limit"
  21576. ],
  21577. "additionalProperties": false
  21578. },
  21579. "AccountV2OAuthCredential": {
  21580. "type": "object",
  21581. "properties": {
  21582. "type": {
  21583. "type": "string",
  21584. "enum": ["oauth"]
  21585. },
  21586. "refresh": {
  21587. "type": "string"
  21588. },
  21589. "access": {
  21590. "type": "string"
  21591. },
  21592. "expires": {
  21593. "type": "integer",
  21594. "minimum": 0
  21595. }
  21596. },
  21597. "required": ["type", "refresh", "access", "expires"],
  21598. "additionalProperties": false
  21599. },
  21600. "AccountV2ApiKeyCredential": {
  21601. "type": "object",
  21602. "properties": {
  21603. "type": {
  21604. "type": "string",
  21605. "enum": ["api"]
  21606. },
  21607. "key": {
  21608. "type": "string"
  21609. },
  21610. "metadata": {
  21611. "type": "object",
  21612. "additionalProperties": {
  21613. "type": "string"
  21614. }
  21615. }
  21616. },
  21617. "required": ["type", "key"],
  21618. "additionalProperties": false
  21619. },
  21620. "AccountV2Credential": {
  21621. "anyOf": [
  21622. {
  21623. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  21624. },
  21625. {
  21626. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  21627. }
  21628. ]
  21629. },
  21630. "AccountV2Info": {
  21631. "type": "object",
  21632. "properties": {
  21633. "id": {
  21634. "type": "string"
  21635. },
  21636. "serviceID": {
  21637. "type": "string"
  21638. },
  21639. "description": {
  21640. "type": "string"
  21641. },
  21642. "credential": {
  21643. "$ref": "#/components/schemas/AccountV2Credential"
  21644. }
  21645. },
  21646. "required": ["id", "serviceID", "description", "credential"],
  21647. "additionalProperties": false
  21648. },
  21649. "EventAccountAdded": {
  21650. "type": "object",
  21651. "properties": {
  21652. "id": {
  21653. "type": "string"
  21654. },
  21655. "type": {
  21656. "type": "string",
  21657. "enum": ["account.added"]
  21658. },
  21659. "properties": {
  21660. "type": "object",
  21661. "properties": {
  21662. "account": {
  21663. "$ref": "#/components/schemas/AccountV2Info"
  21664. }
  21665. },
  21666. "required": ["account"],
  21667. "additionalProperties": false
  21668. }
  21669. },
  21670. "required": ["id", "type", "properties"],
  21671. "additionalProperties": false
  21672. },
  21673. "EventAccountRemoved": {
  21674. "type": "object",
  21675. "properties": {
  21676. "id": {
  21677. "type": "string"
  21678. },
  21679. "type": {
  21680. "type": "string",
  21681. "enum": ["account.removed"]
  21682. },
  21683. "properties": {
  21684. "type": "object",
  21685. "properties": {
  21686. "account": {
  21687. "$ref": "#/components/schemas/AccountV2Info"
  21688. }
  21689. },
  21690. "required": ["account"],
  21691. "additionalProperties": false
  21692. }
  21693. },
  21694. "required": ["id", "type", "properties"],
  21695. "additionalProperties": false
  21696. },
  21697. "EventAccountSwitched": {
  21698. "type": "object",
  21699. "properties": {
  21700. "id": {
  21701. "type": "string"
  21702. },
  21703. "type": {
  21704. "type": "string",
  21705. "enum": ["account.switched"]
  21706. },
  21707. "properties": {
  21708. "type": "object",
  21709. "properties": {
  21710. "serviceID": {
  21711. "type": "string"
  21712. },
  21713. "from": {
  21714. "type": "string"
  21715. },
  21716. "to": {
  21717. "type": "string"
  21718. }
  21719. },
  21720. "required": ["serviceID"],
  21721. "additionalProperties": false
  21722. }
  21723. },
  21724. "required": ["id", "type", "properties"],
  21725. "additionalProperties": false
  21726. },
  21727. "BadRequestError": {
  21728. "type": "object",
  21729. "required": ["name", "data"],
  21730. "properties": {
  21731. "name": {
  21732. "type": "string",
  21733. "enum": ["BadRequest"]
  21734. },
  21735. "data": {
  21736. "type": "object",
  21737. "required": ["message"],
  21738. "properties": {
  21739. "message": {
  21740. "type": "string"
  21741. },
  21742. "kind": {
  21743. "type": "string",
  21744. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  21745. }
  21746. }
  21747. }
  21748. }
  21749. }
  21750. }
  21751. },
  21752. "security": [],
  21753. "tags": [
  21754. {
  21755. "name": "control",
  21756. "description": "Control plane routes."
  21757. },
  21758. {
  21759. "name": "global",
  21760. "description": "Global server routes."
  21761. },
  21762. {
  21763. "name": "event",
  21764. "description": "Instance event stream route."
  21765. },
  21766. {
  21767. "name": "config",
  21768. "description": "Experimental HttpApi config routes."
  21769. },
  21770. {
  21771. "name": "experimental",
  21772. "description": "Experimental HttpApi read-only routes."
  21773. },
  21774. {
  21775. "name": "file",
  21776. "description": "Experimental HttpApi file routes."
  21777. },
  21778. {
  21779. "name": "instance",
  21780. "description": "Experimental HttpApi instance read routes."
  21781. },
  21782. {
  21783. "name": "mcp",
  21784. "description": "Experimental HttpApi MCP routes."
  21785. },
  21786. {
  21787. "name": "project",
  21788. "description": "Experimental HttpApi project routes."
  21789. },
  21790. {
  21791. "name": "pty",
  21792. "description": "Experimental HttpApi PTY routes."
  21793. },
  21794. {
  21795. "name": "question",
  21796. "description": "Question routes."
  21797. },
  21798. {
  21799. "name": "permission",
  21800. "description": "Experimental HttpApi permission routes."
  21801. },
  21802. {
  21803. "name": "provider",
  21804. "description": "Experimental HttpApi provider routes."
  21805. },
  21806. {
  21807. "name": "session",
  21808. "description": "Experimental HttpApi session routes."
  21809. },
  21810. {
  21811. "name": "sync",
  21812. "description": "Experimental HttpApi sync routes."
  21813. },
  21814. {
  21815. "name": "v2",
  21816. "description": "Experimental v2 routes."
  21817. },
  21818. {
  21819. "name": "v2 messages",
  21820. "description": "Experimental v2 message routes."
  21821. },
  21822. {
  21823. "name": "v2 models",
  21824. "description": "Experimental v2 model routes."
  21825. },
  21826. {
  21827. "name": "v2 providers",
  21828. "description": "Experimental v2 provider routes."
  21829. },
  21830. {
  21831. "name": "tui",
  21832. "description": "Experimental HttpApi TUI routes."
  21833. },
  21834. {
  21835. "name": "workspace",
  21836. "description": "Experimental HttpApi workspace routes."
  21837. },
  21838. {
  21839. "name": "pty",
  21840. "description": "PTY websocket route."
  21841. }
  21842. ]
  21843. }