openapi.json 610 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. },
  2292. {
  2293. "name": "context",
  2294. "in": "query",
  2295. "schema": {
  2296. "type": "integer",
  2297. "minimum": 0
  2298. },
  2299. "required": false
  2300. }
  2301. ],
  2302. "responses": {
  2303. "200": {
  2304. "description": "VCS diff",
  2305. "content": {
  2306. "application/json": {
  2307. "schema": {
  2308. "type": "array",
  2309. "items": {
  2310. "$ref": "#/components/schemas/VcsFileDiff"
  2311. },
  2312. "description": "VCS diff"
  2313. }
  2314. }
  2315. }
  2316. },
  2317. "400": {
  2318. "description": "Bad request",
  2319. "content": {
  2320. "application/json": {
  2321. "schema": {
  2322. "$ref": "#/components/schemas/BadRequestError"
  2323. }
  2324. }
  2325. }
  2326. }
  2327. },
  2328. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2329. "summary": "Get VCS diff",
  2330. "x-codeSamples": [
  2331. {
  2332. "lang": "js",
  2333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2334. }
  2335. ]
  2336. }
  2337. },
  2338. "/vcs/diff/raw": {
  2339. "get": {
  2340. "tags": ["instance"],
  2341. "operationId": "vcs.diff.raw",
  2342. "parameters": [
  2343. {
  2344. "name": "directory",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string"
  2348. },
  2349. "required": false
  2350. },
  2351. {
  2352. "name": "workspace",
  2353. "in": "query",
  2354. "schema": {
  2355. "type": "string"
  2356. },
  2357. "required": false
  2358. }
  2359. ],
  2360. "responses": {
  2361. "200": {
  2362. "description": "Raw VCS diff",
  2363. "content": {
  2364. "text/x-diff; charset=utf-8": {
  2365. "schema": {
  2366. "type": "string"
  2367. }
  2368. }
  2369. }
  2370. },
  2371. "400": {
  2372. "description": "Bad request",
  2373. "content": {
  2374. "application/json": {
  2375. "schema": {
  2376. "$ref": "#/components/schemas/BadRequestError"
  2377. }
  2378. }
  2379. }
  2380. }
  2381. },
  2382. "description": "Retrieve a raw patch for current uncommitted changes.",
  2383. "summary": "Get raw VCS diff",
  2384. "x-codeSamples": [
  2385. {
  2386. "lang": "js",
  2387. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2388. }
  2389. ]
  2390. }
  2391. },
  2392. "/vcs/apply": {
  2393. "post": {
  2394. "tags": ["instance"],
  2395. "operationId": "vcs.apply",
  2396. "parameters": [
  2397. {
  2398. "name": "directory",
  2399. "in": "query",
  2400. "schema": {
  2401. "type": "string"
  2402. },
  2403. "required": false
  2404. },
  2405. {
  2406. "name": "workspace",
  2407. "in": "query",
  2408. "schema": {
  2409. "type": "string"
  2410. },
  2411. "required": false
  2412. }
  2413. ],
  2414. "responses": {
  2415. "200": {
  2416. "description": "VCS patch applied",
  2417. "content": {
  2418. "application/json": {
  2419. "schema": {
  2420. "type": "object",
  2421. "properties": {
  2422. "applied": {
  2423. "type": "boolean"
  2424. }
  2425. },
  2426. "required": ["applied"],
  2427. "additionalProperties": false,
  2428. "description": "VCS patch applied"
  2429. }
  2430. }
  2431. }
  2432. },
  2433. "400": {
  2434. "description": "VcsApplyError | InvalidRequestError",
  2435. "content": {
  2436. "application/json": {
  2437. "schema": {
  2438. "anyOf": [
  2439. {
  2440. "$ref": "#/components/schemas/VcsApplyError"
  2441. },
  2442. {
  2443. "$ref": "#/components/schemas/InvalidRequestError"
  2444. }
  2445. ]
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Apply a raw patch to the current working tree.",
  2452. "summary": "Apply VCS patch",
  2453. "requestBody": {
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "properties": {
  2459. "patch": {
  2460. "type": "string"
  2461. }
  2462. },
  2463. "required": ["patch"],
  2464. "additionalProperties": false
  2465. }
  2466. }
  2467. }
  2468. },
  2469. "x-codeSamples": [
  2470. {
  2471. "lang": "js",
  2472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2473. }
  2474. ]
  2475. }
  2476. },
  2477. "/command": {
  2478. "get": {
  2479. "tags": ["instance"],
  2480. "operationId": "command.list",
  2481. "parameters": [
  2482. {
  2483. "name": "directory",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. },
  2490. {
  2491. "name": "workspace",
  2492. "in": "query",
  2493. "schema": {
  2494. "type": "string"
  2495. },
  2496. "required": false
  2497. }
  2498. ],
  2499. "responses": {
  2500. "200": {
  2501. "description": "List of commands",
  2502. "content": {
  2503. "application/json": {
  2504. "schema": {
  2505. "type": "array",
  2506. "items": {
  2507. "$ref": "#/components/schemas/Command"
  2508. },
  2509. "description": "List of commands"
  2510. }
  2511. }
  2512. }
  2513. },
  2514. "400": {
  2515. "description": "Bad request",
  2516. "content": {
  2517. "application/json": {
  2518. "schema": {
  2519. "$ref": "#/components/schemas/BadRequestError"
  2520. }
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "description": "Get a list of all available commands in the OpenCode system.",
  2526. "summary": "List commands",
  2527. "x-codeSamples": [
  2528. {
  2529. "lang": "js",
  2530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2531. }
  2532. ]
  2533. }
  2534. },
  2535. "/agent": {
  2536. "get": {
  2537. "tags": ["instance"],
  2538. "operationId": "app.agents",
  2539. "parameters": [
  2540. {
  2541. "name": "directory",
  2542. "in": "query",
  2543. "schema": {
  2544. "type": "string"
  2545. },
  2546. "required": false
  2547. },
  2548. {
  2549. "name": "workspace",
  2550. "in": "query",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": false
  2555. }
  2556. ],
  2557. "responses": {
  2558. "200": {
  2559. "description": "List of agents",
  2560. "content": {
  2561. "application/json": {
  2562. "schema": {
  2563. "type": "array",
  2564. "items": {
  2565. "$ref": "#/components/schemas/Agent"
  2566. },
  2567. "description": "List of agents"
  2568. }
  2569. }
  2570. }
  2571. },
  2572. "400": {
  2573. "description": "Bad request",
  2574. "content": {
  2575. "application/json": {
  2576. "schema": {
  2577. "$ref": "#/components/schemas/BadRequestError"
  2578. }
  2579. }
  2580. }
  2581. }
  2582. },
  2583. "description": "Get a list of all available AI agents in the OpenCode system.",
  2584. "summary": "List agents",
  2585. "x-codeSamples": [
  2586. {
  2587. "lang": "js",
  2588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2589. }
  2590. ]
  2591. }
  2592. },
  2593. "/skill": {
  2594. "get": {
  2595. "tags": ["instance"],
  2596. "operationId": "app.skills",
  2597. "parameters": [
  2598. {
  2599. "name": "directory",
  2600. "in": "query",
  2601. "schema": {
  2602. "type": "string"
  2603. },
  2604. "required": false
  2605. },
  2606. {
  2607. "name": "workspace",
  2608. "in": "query",
  2609. "schema": {
  2610. "type": "string"
  2611. },
  2612. "required": false
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "description": "List of skills",
  2618. "content": {
  2619. "application/json": {
  2620. "schema": {
  2621. "type": "array",
  2622. "items": {
  2623. "type": "object",
  2624. "properties": {
  2625. "name": {
  2626. "type": "string"
  2627. },
  2628. "description": {
  2629. "type": "string"
  2630. },
  2631. "location": {
  2632. "type": "string"
  2633. },
  2634. "content": {
  2635. "type": "string"
  2636. }
  2637. },
  2638. "required": ["name", "location", "content"],
  2639. "additionalProperties": false
  2640. },
  2641. "description": "List of skills"
  2642. }
  2643. }
  2644. }
  2645. },
  2646. "400": {
  2647. "description": "Bad request",
  2648. "content": {
  2649. "application/json": {
  2650. "schema": {
  2651. "$ref": "#/components/schemas/BadRequestError"
  2652. }
  2653. }
  2654. }
  2655. }
  2656. },
  2657. "description": "Get a list of all available skills in the OpenCode system.",
  2658. "summary": "List skills",
  2659. "x-codeSamples": [
  2660. {
  2661. "lang": "js",
  2662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2663. }
  2664. ]
  2665. }
  2666. },
  2667. "/lsp": {
  2668. "get": {
  2669. "tags": ["instance"],
  2670. "operationId": "lsp.status",
  2671. "parameters": [
  2672. {
  2673. "name": "directory",
  2674. "in": "query",
  2675. "schema": {
  2676. "type": "string"
  2677. },
  2678. "required": false
  2679. },
  2680. {
  2681. "name": "workspace",
  2682. "in": "query",
  2683. "schema": {
  2684. "type": "string"
  2685. },
  2686. "required": false
  2687. }
  2688. ],
  2689. "responses": {
  2690. "200": {
  2691. "description": "LSP server status",
  2692. "content": {
  2693. "application/json": {
  2694. "schema": {
  2695. "type": "array",
  2696. "items": {
  2697. "$ref": "#/components/schemas/LSPStatus"
  2698. },
  2699. "description": "LSP server status"
  2700. }
  2701. }
  2702. }
  2703. },
  2704. "400": {
  2705. "description": "Bad request",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "$ref": "#/components/schemas/BadRequestError"
  2710. }
  2711. }
  2712. }
  2713. }
  2714. },
  2715. "description": "Get LSP server status",
  2716. "summary": "Get LSP status",
  2717. "x-codeSamples": [
  2718. {
  2719. "lang": "js",
  2720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2721. }
  2722. ]
  2723. }
  2724. },
  2725. "/formatter": {
  2726. "get": {
  2727. "tags": ["instance"],
  2728. "operationId": "formatter.status",
  2729. "parameters": [
  2730. {
  2731. "name": "directory",
  2732. "in": "query",
  2733. "schema": {
  2734. "type": "string"
  2735. },
  2736. "required": false
  2737. },
  2738. {
  2739. "name": "workspace",
  2740. "in": "query",
  2741. "schema": {
  2742. "type": "string"
  2743. },
  2744. "required": false
  2745. }
  2746. ],
  2747. "responses": {
  2748. "200": {
  2749. "description": "Formatter status",
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "array",
  2754. "items": {
  2755. "$ref": "#/components/schemas/FormatterStatus"
  2756. },
  2757. "description": "Formatter status"
  2758. }
  2759. }
  2760. }
  2761. },
  2762. "400": {
  2763. "description": "Bad request",
  2764. "content": {
  2765. "application/json": {
  2766. "schema": {
  2767. "$ref": "#/components/schemas/BadRequestError"
  2768. }
  2769. }
  2770. }
  2771. }
  2772. },
  2773. "description": "Get formatter status",
  2774. "summary": "Get formatter status",
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp": {
  2784. "get": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.status",
  2787. "parameters": [
  2788. {
  2789. "name": "directory",
  2790. "in": "query",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": false
  2795. },
  2796. {
  2797. "name": "workspace",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. }
  2804. ],
  2805. "responses": {
  2806. "200": {
  2807. "description": "MCP server status",
  2808. "content": {
  2809. "application/json": {
  2810. "schema": {
  2811. "type": "object",
  2812. "additionalProperties": {
  2813. "$ref": "#/components/schemas/MCPStatus"
  2814. },
  2815. "description": "MCP server status"
  2816. }
  2817. }
  2818. }
  2819. },
  2820. "400": {
  2821. "description": "Bad request",
  2822. "content": {
  2823. "application/json": {
  2824. "schema": {
  2825. "$ref": "#/components/schemas/BadRequestError"
  2826. }
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2832. "summary": "Get MCP status",
  2833. "x-codeSamples": [
  2834. {
  2835. "lang": "js",
  2836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2837. }
  2838. ]
  2839. },
  2840. "post": {
  2841. "tags": ["mcp"],
  2842. "operationId": "mcp.add",
  2843. "parameters": [
  2844. {
  2845. "name": "directory",
  2846. "in": "query",
  2847. "schema": {
  2848. "type": "string"
  2849. },
  2850. "required": false
  2851. },
  2852. {
  2853. "name": "workspace",
  2854. "in": "query",
  2855. "schema": {
  2856. "type": "string"
  2857. },
  2858. "required": false
  2859. }
  2860. ],
  2861. "responses": {
  2862. "200": {
  2863. "description": "MCP server added successfully",
  2864. "content": {
  2865. "application/json": {
  2866. "schema": {
  2867. "type": "object",
  2868. "additionalProperties": {
  2869. "$ref": "#/components/schemas/MCPStatus"
  2870. },
  2871. "description": "MCP server added successfully"
  2872. }
  2873. }
  2874. }
  2875. },
  2876. "400": {
  2877. "description": "BadRequest | InvalidRequestError",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "anyOf": [
  2882. {
  2883. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2884. },
  2885. {
  2886. "$ref": "#/components/schemas/InvalidRequestError"
  2887. }
  2888. ]
  2889. }
  2890. }
  2891. }
  2892. }
  2893. },
  2894. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2895. "summary": "Add MCP server",
  2896. "requestBody": {
  2897. "content": {
  2898. "application/json": {
  2899. "schema": {
  2900. "type": "object",
  2901. "properties": {
  2902. "name": {
  2903. "type": "string"
  2904. },
  2905. "config": {
  2906. "anyOf": [
  2907. {
  2908. "$ref": "#/components/schemas/McpLocalConfig"
  2909. },
  2910. {
  2911. "$ref": "#/components/schemas/McpRemoteConfig"
  2912. }
  2913. ]
  2914. }
  2915. },
  2916. "required": ["name", "config"],
  2917. "additionalProperties": false
  2918. }
  2919. }
  2920. }
  2921. },
  2922. "x-codeSamples": [
  2923. {
  2924. "lang": "js",
  2925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2926. }
  2927. ]
  2928. }
  2929. },
  2930. "/mcp/{name}/auth": {
  2931. "post": {
  2932. "tags": ["mcp"],
  2933. "operationId": "mcp.auth.start",
  2934. "parameters": [
  2935. {
  2936. "name": "name",
  2937. "in": "path",
  2938. "schema": {
  2939. "type": "string"
  2940. },
  2941. "required": true
  2942. },
  2943. {
  2944. "name": "directory",
  2945. "in": "query",
  2946. "schema": {
  2947. "type": "string"
  2948. },
  2949. "required": false
  2950. },
  2951. {
  2952. "name": "workspace",
  2953. "in": "query",
  2954. "schema": {
  2955. "type": "string"
  2956. },
  2957. "required": false
  2958. }
  2959. ],
  2960. "responses": {
  2961. "200": {
  2962. "description": "OAuth flow started",
  2963. "content": {
  2964. "application/json": {
  2965. "schema": {
  2966. "type": "object",
  2967. "properties": {
  2968. "authorizationUrl": {
  2969. "type": "string"
  2970. },
  2971. "oauthState": {
  2972. "type": "string"
  2973. }
  2974. },
  2975. "required": ["authorizationUrl", "oauthState"],
  2976. "additionalProperties": false,
  2977. "description": "OAuth flow started"
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "400": {
  2983. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "anyOf": [
  2988. {
  2989. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2990. },
  2991. {
  2992. "$ref": "#/components/schemas/InvalidRequestError"
  2993. }
  2994. ]
  2995. }
  2996. }
  2997. }
  2998. },
  2999. "404": {
  3000. "description": "McpServerNotFoundError",
  3001. "content": {
  3002. "application/json": {
  3003. "schema": {
  3004. "$ref": "#/components/schemas/McpServerNotFoundError"
  3005. }
  3006. }
  3007. }
  3008. }
  3009. },
  3010. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3011. "summary": "Start MCP OAuth",
  3012. "x-codeSamples": [
  3013. {
  3014. "lang": "js",
  3015. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3016. }
  3017. ]
  3018. },
  3019. "delete": {
  3020. "tags": ["mcp"],
  3021. "operationId": "mcp.auth.remove",
  3022. "parameters": [
  3023. {
  3024. "name": "name",
  3025. "in": "path",
  3026. "schema": {
  3027. "type": "string"
  3028. },
  3029. "required": true
  3030. },
  3031. {
  3032. "name": "directory",
  3033. "in": "query",
  3034. "schema": {
  3035. "type": "string"
  3036. },
  3037. "required": false
  3038. },
  3039. {
  3040. "name": "workspace",
  3041. "in": "query",
  3042. "schema": {
  3043. "type": "string"
  3044. },
  3045. "required": false
  3046. }
  3047. ],
  3048. "responses": {
  3049. "200": {
  3050. "description": "OAuth credentials removed",
  3051. "content": {
  3052. "application/json": {
  3053. "schema": {
  3054. "type": "object",
  3055. "properties": {
  3056. "success": {
  3057. "type": "boolean",
  3058. "enum": [true]
  3059. }
  3060. },
  3061. "required": ["success"],
  3062. "additionalProperties": false,
  3063. "description": "OAuth credentials removed"
  3064. }
  3065. }
  3066. }
  3067. },
  3068. "400": {
  3069. "description": "Bad request",
  3070. "content": {
  3071. "application/json": {
  3072. "schema": {
  3073. "$ref": "#/components/schemas/BadRequestError"
  3074. }
  3075. }
  3076. }
  3077. },
  3078. "404": {
  3079. "description": "McpServerNotFoundError",
  3080. "content": {
  3081. "application/json": {
  3082. "schema": {
  3083. "$ref": "#/components/schemas/McpServerNotFoundError"
  3084. }
  3085. }
  3086. }
  3087. }
  3088. },
  3089. "description": "Remove OAuth credentials for an MCP server.",
  3090. "summary": "Remove MCP OAuth",
  3091. "x-codeSamples": [
  3092. {
  3093. "lang": "js",
  3094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3095. }
  3096. ]
  3097. }
  3098. },
  3099. "/mcp/{name}/auth/callback": {
  3100. "post": {
  3101. "tags": ["mcp"],
  3102. "operationId": "mcp.auth.callback",
  3103. "parameters": [
  3104. {
  3105. "name": "name",
  3106. "in": "path",
  3107. "schema": {
  3108. "type": "string"
  3109. },
  3110. "required": true
  3111. },
  3112. {
  3113. "name": "directory",
  3114. "in": "query",
  3115. "schema": {
  3116. "type": "string"
  3117. },
  3118. "required": false
  3119. },
  3120. {
  3121. "name": "workspace",
  3122. "in": "query",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": false
  3127. }
  3128. ],
  3129. "responses": {
  3130. "200": {
  3131. "description": "OAuth authentication completed",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/MCPStatus"
  3136. }
  3137. }
  3138. }
  3139. },
  3140. "400": {
  3141. "description": "BadRequest | InvalidRequestError",
  3142. "content": {
  3143. "application/json": {
  3144. "schema": {
  3145. "anyOf": [
  3146. {
  3147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3148. },
  3149. {
  3150. "$ref": "#/components/schemas/InvalidRequestError"
  3151. }
  3152. ]
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "404": {
  3158. "description": "McpServerNotFoundError",
  3159. "content": {
  3160. "application/json": {
  3161. "schema": {
  3162. "$ref": "#/components/schemas/McpServerNotFoundError"
  3163. }
  3164. }
  3165. }
  3166. }
  3167. },
  3168. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3169. "summary": "Complete MCP OAuth",
  3170. "requestBody": {
  3171. "content": {
  3172. "application/json": {
  3173. "schema": {
  3174. "type": "object",
  3175. "properties": {
  3176. "code": {
  3177. "type": "string"
  3178. }
  3179. },
  3180. "required": ["code"],
  3181. "additionalProperties": false
  3182. }
  3183. }
  3184. }
  3185. },
  3186. "x-codeSamples": [
  3187. {
  3188. "lang": "js",
  3189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3190. }
  3191. ]
  3192. }
  3193. },
  3194. "/mcp/{name}/auth/authenticate": {
  3195. "post": {
  3196. "tags": ["mcp"],
  3197. "operationId": "mcp.auth.authenticate",
  3198. "parameters": [
  3199. {
  3200. "name": "name",
  3201. "in": "path",
  3202. "schema": {
  3203. "type": "string"
  3204. },
  3205. "required": true
  3206. },
  3207. {
  3208. "name": "directory",
  3209. "in": "query",
  3210. "schema": {
  3211. "type": "string"
  3212. },
  3213. "required": false
  3214. },
  3215. {
  3216. "name": "workspace",
  3217. "in": "query",
  3218. "schema": {
  3219. "type": "string"
  3220. },
  3221. "required": false
  3222. }
  3223. ],
  3224. "responses": {
  3225. "200": {
  3226. "description": "OAuth authentication completed",
  3227. "content": {
  3228. "application/json": {
  3229. "schema": {
  3230. "$ref": "#/components/schemas/MCPStatus"
  3231. }
  3232. }
  3233. }
  3234. },
  3235. "400": {
  3236. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3237. "content": {
  3238. "application/json": {
  3239. "schema": {
  3240. "anyOf": [
  3241. {
  3242. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3243. },
  3244. {
  3245. "$ref": "#/components/schemas/InvalidRequestError"
  3246. }
  3247. ]
  3248. }
  3249. }
  3250. }
  3251. },
  3252. "404": {
  3253. "description": "McpServerNotFoundError",
  3254. "content": {
  3255. "application/json": {
  3256. "schema": {
  3257. "$ref": "#/components/schemas/McpServerNotFoundError"
  3258. }
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "description": "Start OAuth flow and wait for callback (opens browser).",
  3264. "summary": "Authenticate MCP OAuth",
  3265. "x-codeSamples": [
  3266. {
  3267. "lang": "js",
  3268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3269. }
  3270. ]
  3271. }
  3272. },
  3273. "/mcp/{name}/connect": {
  3274. "post": {
  3275. "tags": ["mcp"],
  3276. "operationId": "mcp.connect",
  3277. "parameters": [
  3278. {
  3279. "name": "name",
  3280. "in": "path",
  3281. "schema": {
  3282. "type": "string"
  3283. },
  3284. "required": true
  3285. },
  3286. {
  3287. "name": "directory",
  3288. "in": "query",
  3289. "schema": {
  3290. "type": "string"
  3291. },
  3292. "required": false
  3293. },
  3294. {
  3295. "name": "workspace",
  3296. "in": "query",
  3297. "schema": {
  3298. "type": "string"
  3299. },
  3300. "required": false
  3301. }
  3302. ],
  3303. "responses": {
  3304. "200": {
  3305. "description": "MCP server connected successfully",
  3306. "content": {
  3307. "application/json": {
  3308. "schema": {
  3309. "type": "boolean",
  3310. "description": "MCP server connected successfully"
  3311. }
  3312. }
  3313. }
  3314. },
  3315. "400": {
  3316. "description": "Bad request",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/BadRequestError"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "404": {
  3326. "description": "McpServerNotFoundError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "$ref": "#/components/schemas/McpServerNotFoundError"
  3331. }
  3332. }
  3333. }
  3334. }
  3335. },
  3336. "description": "Connect an MCP server.",
  3337. "x-codeSamples": [
  3338. {
  3339. "lang": "js",
  3340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3341. }
  3342. ]
  3343. }
  3344. },
  3345. "/mcp/{name}/disconnect": {
  3346. "post": {
  3347. "tags": ["mcp"],
  3348. "operationId": "mcp.disconnect",
  3349. "parameters": [
  3350. {
  3351. "name": "name",
  3352. "in": "path",
  3353. "schema": {
  3354. "type": "string"
  3355. },
  3356. "required": true
  3357. },
  3358. {
  3359. "name": "directory",
  3360. "in": "query",
  3361. "schema": {
  3362. "type": "string"
  3363. },
  3364. "required": false
  3365. },
  3366. {
  3367. "name": "workspace",
  3368. "in": "query",
  3369. "schema": {
  3370. "type": "string"
  3371. },
  3372. "required": false
  3373. }
  3374. ],
  3375. "responses": {
  3376. "200": {
  3377. "description": "MCP server disconnected successfully",
  3378. "content": {
  3379. "application/json": {
  3380. "schema": {
  3381. "type": "boolean",
  3382. "description": "MCP server disconnected successfully"
  3383. }
  3384. }
  3385. }
  3386. },
  3387. "400": {
  3388. "description": "Bad request",
  3389. "content": {
  3390. "application/json": {
  3391. "schema": {
  3392. "$ref": "#/components/schemas/BadRequestError"
  3393. }
  3394. }
  3395. }
  3396. },
  3397. "404": {
  3398. "description": "McpServerNotFoundError",
  3399. "content": {
  3400. "application/json": {
  3401. "schema": {
  3402. "$ref": "#/components/schemas/McpServerNotFoundError"
  3403. }
  3404. }
  3405. }
  3406. }
  3407. },
  3408. "description": "Disconnect an MCP server.",
  3409. "x-codeSamples": [
  3410. {
  3411. "lang": "js",
  3412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3413. }
  3414. ]
  3415. }
  3416. },
  3417. "/project": {
  3418. "get": {
  3419. "tags": ["project"],
  3420. "operationId": "project.list",
  3421. "parameters": [
  3422. {
  3423. "name": "directory",
  3424. "in": "query",
  3425. "schema": {
  3426. "type": "string"
  3427. },
  3428. "required": false
  3429. },
  3430. {
  3431. "name": "workspace",
  3432. "in": "query",
  3433. "schema": {
  3434. "type": "string"
  3435. },
  3436. "required": false
  3437. }
  3438. ],
  3439. "responses": {
  3440. "200": {
  3441. "description": "List of projects",
  3442. "content": {
  3443. "application/json": {
  3444. "schema": {
  3445. "type": "array",
  3446. "items": {
  3447. "$ref": "#/components/schemas/Project"
  3448. },
  3449. "description": "List of projects"
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "400": {
  3455. "description": "Bad request",
  3456. "content": {
  3457. "application/json": {
  3458. "schema": {
  3459. "$ref": "#/components/schemas/BadRequestError"
  3460. }
  3461. }
  3462. }
  3463. }
  3464. },
  3465. "description": "Get a list of projects that have been opened with OpenCode.",
  3466. "summary": "List all projects",
  3467. "x-codeSamples": [
  3468. {
  3469. "lang": "js",
  3470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3471. }
  3472. ]
  3473. }
  3474. },
  3475. "/project/current": {
  3476. "get": {
  3477. "tags": ["project"],
  3478. "operationId": "project.current",
  3479. "parameters": [
  3480. {
  3481. "name": "directory",
  3482. "in": "query",
  3483. "schema": {
  3484. "type": "string"
  3485. },
  3486. "required": false
  3487. },
  3488. {
  3489. "name": "workspace",
  3490. "in": "query",
  3491. "schema": {
  3492. "type": "string"
  3493. },
  3494. "required": false
  3495. }
  3496. ],
  3497. "responses": {
  3498. "200": {
  3499. "description": "Current project information",
  3500. "content": {
  3501. "application/json": {
  3502. "schema": {
  3503. "$ref": "#/components/schemas/Project"
  3504. }
  3505. }
  3506. }
  3507. },
  3508. "400": {
  3509. "description": "Bad request",
  3510. "content": {
  3511. "application/json": {
  3512. "schema": {
  3513. "$ref": "#/components/schemas/BadRequestError"
  3514. }
  3515. }
  3516. }
  3517. }
  3518. },
  3519. "description": "Retrieve the currently active project that OpenCode is working with.",
  3520. "summary": "Get current project",
  3521. "x-codeSamples": [
  3522. {
  3523. "lang": "js",
  3524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3525. }
  3526. ]
  3527. }
  3528. },
  3529. "/project/git/init": {
  3530. "post": {
  3531. "tags": ["project"],
  3532. "operationId": "project.initGit",
  3533. "parameters": [
  3534. {
  3535. "name": "directory",
  3536. "in": "query",
  3537. "schema": {
  3538. "type": "string"
  3539. },
  3540. "required": false
  3541. },
  3542. {
  3543. "name": "workspace",
  3544. "in": "query",
  3545. "schema": {
  3546. "type": "string"
  3547. },
  3548. "required": false
  3549. }
  3550. ],
  3551. "responses": {
  3552. "200": {
  3553. "description": "Project information after git initialization",
  3554. "content": {
  3555. "application/json": {
  3556. "schema": {
  3557. "$ref": "#/components/schemas/Project"
  3558. }
  3559. }
  3560. }
  3561. },
  3562. "400": {
  3563. "description": "Bad request",
  3564. "content": {
  3565. "application/json": {
  3566. "schema": {
  3567. "$ref": "#/components/schemas/BadRequestError"
  3568. }
  3569. }
  3570. }
  3571. }
  3572. },
  3573. "description": "Create a git repository for the current project and return the refreshed project info.",
  3574. "summary": "Initialize git repository",
  3575. "x-codeSamples": [
  3576. {
  3577. "lang": "js",
  3578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3579. }
  3580. ]
  3581. }
  3582. },
  3583. "/project/{projectID}": {
  3584. "patch": {
  3585. "tags": ["project"],
  3586. "operationId": "project.update",
  3587. "parameters": [
  3588. {
  3589. "name": "projectID",
  3590. "in": "path",
  3591. "schema": {
  3592. "type": "string"
  3593. },
  3594. "required": true
  3595. },
  3596. {
  3597. "name": "directory",
  3598. "in": "query",
  3599. "schema": {
  3600. "type": "string"
  3601. },
  3602. "required": false
  3603. },
  3604. {
  3605. "name": "workspace",
  3606. "in": "query",
  3607. "schema": {
  3608. "type": "string"
  3609. },
  3610. "required": false
  3611. }
  3612. ],
  3613. "responses": {
  3614. "200": {
  3615. "description": "Updated project information",
  3616. "content": {
  3617. "application/json": {
  3618. "schema": {
  3619. "$ref": "#/components/schemas/Project"
  3620. }
  3621. }
  3622. }
  3623. },
  3624. "400": {
  3625. "description": "BadRequest | InvalidRequestError",
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "anyOf": [
  3630. {
  3631. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3632. },
  3633. {
  3634. "$ref": "#/components/schemas/InvalidRequestError"
  3635. }
  3636. ]
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "404": {
  3642. "description": "ProjectNotFoundError",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/ProjectNotFoundError"
  3647. }
  3648. }
  3649. }
  3650. }
  3651. },
  3652. "description": "Update project properties such as name, icon, and commands.",
  3653. "summary": "Update project",
  3654. "requestBody": {
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "type": "object",
  3659. "properties": {
  3660. "name": {
  3661. "type": "string"
  3662. },
  3663. "icon": {
  3664. "type": "object",
  3665. "properties": {
  3666. "url": {
  3667. "type": "string"
  3668. },
  3669. "override": {
  3670. "type": "string"
  3671. },
  3672. "color": {
  3673. "type": "string"
  3674. }
  3675. },
  3676. "additionalProperties": false
  3677. },
  3678. "commands": {
  3679. "type": "object",
  3680. "properties": {
  3681. "start": {
  3682. "type": "string",
  3683. "description": "Startup script to run when creating a new workspace (worktree)"
  3684. }
  3685. },
  3686. "additionalProperties": false
  3687. }
  3688. },
  3689. "additionalProperties": false
  3690. }
  3691. }
  3692. }
  3693. },
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/pty/shells": {
  3703. "get": {
  3704. "tags": ["pty"],
  3705. "operationId": "pty.shells",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of shells",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "type": "object",
  3733. "properties": {
  3734. "path": {
  3735. "type": "string"
  3736. },
  3737. "name": {
  3738. "type": "string"
  3739. },
  3740. "acceptable": {
  3741. "type": "boolean"
  3742. }
  3743. },
  3744. "required": ["path", "name", "acceptable"],
  3745. "additionalProperties": false
  3746. },
  3747. "description": "List of shells"
  3748. }
  3749. }
  3750. }
  3751. },
  3752. "400": {
  3753. "description": "Bad request",
  3754. "content": {
  3755. "application/json": {
  3756. "schema": {
  3757. "$ref": "#/components/schemas/BadRequestError"
  3758. }
  3759. }
  3760. }
  3761. }
  3762. },
  3763. "description": "Get a list of available shells on the system.",
  3764. "summary": "List available shells",
  3765. "x-codeSamples": [
  3766. {
  3767. "lang": "js",
  3768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3769. }
  3770. ]
  3771. }
  3772. },
  3773. "/pty": {
  3774. "get": {
  3775. "tags": ["pty"],
  3776. "operationId": "pty.list",
  3777. "parameters": [
  3778. {
  3779. "name": "directory",
  3780. "in": "query",
  3781. "schema": {
  3782. "type": "string"
  3783. },
  3784. "required": false
  3785. },
  3786. {
  3787. "name": "workspace",
  3788. "in": "query",
  3789. "schema": {
  3790. "type": "string"
  3791. },
  3792. "required": false
  3793. }
  3794. ],
  3795. "responses": {
  3796. "200": {
  3797. "description": "List of sessions",
  3798. "content": {
  3799. "application/json": {
  3800. "schema": {
  3801. "type": "array",
  3802. "items": {
  3803. "$ref": "#/components/schemas/Pty"
  3804. },
  3805. "description": "List of sessions"
  3806. }
  3807. }
  3808. }
  3809. },
  3810. "400": {
  3811. "description": "Bad request",
  3812. "content": {
  3813. "application/json": {
  3814. "schema": {
  3815. "$ref": "#/components/schemas/BadRequestError"
  3816. }
  3817. }
  3818. }
  3819. }
  3820. },
  3821. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3822. "summary": "List PTY sessions",
  3823. "x-codeSamples": [
  3824. {
  3825. "lang": "js",
  3826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3827. }
  3828. ]
  3829. },
  3830. "post": {
  3831. "tags": ["pty"],
  3832. "operationId": "pty.create",
  3833. "parameters": [
  3834. {
  3835. "name": "directory",
  3836. "in": "query",
  3837. "schema": {
  3838. "type": "string"
  3839. },
  3840. "required": false
  3841. },
  3842. {
  3843. "name": "workspace",
  3844. "in": "query",
  3845. "schema": {
  3846. "type": "string"
  3847. },
  3848. "required": false
  3849. }
  3850. ],
  3851. "responses": {
  3852. "200": {
  3853. "description": "Created session",
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "$ref": "#/components/schemas/Pty"
  3858. }
  3859. }
  3860. }
  3861. },
  3862. "400": {
  3863. "description": "BadRequest | InvalidRequestError",
  3864. "content": {
  3865. "application/json": {
  3866. "schema": {
  3867. "anyOf": [
  3868. {
  3869. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3870. },
  3871. {
  3872. "$ref": "#/components/schemas/InvalidRequestError"
  3873. }
  3874. ]
  3875. }
  3876. }
  3877. }
  3878. }
  3879. },
  3880. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3881. "summary": "Create PTY session",
  3882. "requestBody": {
  3883. "content": {
  3884. "application/json": {
  3885. "schema": {
  3886. "type": "object",
  3887. "properties": {
  3888. "command": {
  3889. "type": "string"
  3890. },
  3891. "args": {
  3892. "type": "array",
  3893. "items": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "cwd": {
  3898. "type": "string"
  3899. },
  3900. "title": {
  3901. "type": "string"
  3902. },
  3903. "env": {
  3904. "type": "object",
  3905. "additionalProperties": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. },
  3910. "additionalProperties": false
  3911. }
  3912. }
  3913. }
  3914. },
  3915. "x-codeSamples": [
  3916. {
  3917. "lang": "js",
  3918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3919. }
  3920. ]
  3921. }
  3922. },
  3923. "/pty/{ptyID}": {
  3924. "get": {
  3925. "tags": ["pty"],
  3926. "operationId": "pty.get",
  3927. "parameters": [
  3928. {
  3929. "name": "ptyID",
  3930. "in": "path",
  3931. "schema": {
  3932. "type": "string",
  3933. "pattern": "^pty"
  3934. },
  3935. "required": true
  3936. },
  3937. {
  3938. "name": "directory",
  3939. "in": "query",
  3940. "schema": {
  3941. "type": "string"
  3942. },
  3943. "required": false
  3944. },
  3945. {
  3946. "name": "workspace",
  3947. "in": "query",
  3948. "schema": {
  3949. "type": "string"
  3950. },
  3951. "required": false
  3952. }
  3953. ],
  3954. "responses": {
  3955. "200": {
  3956. "description": "Session info",
  3957. "content": {
  3958. "application/json": {
  3959. "schema": {
  3960. "$ref": "#/components/schemas/Pty"
  3961. }
  3962. }
  3963. }
  3964. },
  3965. "400": {
  3966. "description": "Bad request",
  3967. "content": {
  3968. "application/json": {
  3969. "schema": {
  3970. "$ref": "#/components/schemas/BadRequestError"
  3971. }
  3972. }
  3973. }
  3974. },
  3975. "404": {
  3976. "description": "PtyNotFoundError",
  3977. "content": {
  3978. "application/json": {
  3979. "schema": {
  3980. "$ref": "#/components/schemas/PtyNotFoundError"
  3981. }
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3987. "summary": "Get PTY session",
  3988. "x-codeSamples": [
  3989. {
  3990. "lang": "js",
  3991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3992. }
  3993. ]
  3994. },
  3995. "put": {
  3996. "tags": ["pty"],
  3997. "operationId": "pty.update",
  3998. "parameters": [
  3999. {
  4000. "name": "ptyID",
  4001. "in": "path",
  4002. "schema": {
  4003. "type": "string",
  4004. "pattern": "^pty"
  4005. },
  4006. "required": true
  4007. },
  4008. {
  4009. "name": "directory",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. },
  4016. {
  4017. "name": "workspace",
  4018. "in": "query",
  4019. "schema": {
  4020. "type": "string"
  4021. },
  4022. "required": false
  4023. }
  4024. ],
  4025. "responses": {
  4026. "200": {
  4027. "description": "Updated session",
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "$ref": "#/components/schemas/Pty"
  4032. }
  4033. }
  4034. }
  4035. },
  4036. "400": {
  4037. "description": "BadRequest | InvalidRequestError",
  4038. "content": {
  4039. "application/json": {
  4040. "schema": {
  4041. "anyOf": [
  4042. {
  4043. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4044. },
  4045. {
  4046. "$ref": "#/components/schemas/InvalidRequestError"
  4047. }
  4048. ]
  4049. }
  4050. }
  4051. }
  4052. },
  4053. "404": {
  4054. "description": "PtyNotFoundError",
  4055. "content": {
  4056. "application/json": {
  4057. "schema": {
  4058. "$ref": "#/components/schemas/PtyNotFoundError"
  4059. }
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4065. "summary": "Update PTY session",
  4066. "requestBody": {
  4067. "content": {
  4068. "application/json": {
  4069. "schema": {
  4070. "type": "object",
  4071. "properties": {
  4072. "title": {
  4073. "type": "string"
  4074. },
  4075. "size": {
  4076. "type": "object",
  4077. "properties": {
  4078. "rows": {
  4079. "type": "integer",
  4080. "exclusiveMinimum": 0
  4081. },
  4082. "cols": {
  4083. "type": "integer",
  4084. "exclusiveMinimum": 0
  4085. }
  4086. },
  4087. "required": ["rows", "cols"],
  4088. "additionalProperties": false
  4089. }
  4090. },
  4091. "additionalProperties": false
  4092. }
  4093. }
  4094. }
  4095. },
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4100. }
  4101. ]
  4102. },
  4103. "delete": {
  4104. "tags": ["pty"],
  4105. "operationId": "pty.remove",
  4106. "parameters": [
  4107. {
  4108. "name": "ptyID",
  4109. "in": "path",
  4110. "schema": {
  4111. "type": "string",
  4112. "pattern": "^pty"
  4113. },
  4114. "required": true
  4115. },
  4116. {
  4117. "name": "directory",
  4118. "in": "query",
  4119. "schema": {
  4120. "type": "string"
  4121. },
  4122. "required": false
  4123. },
  4124. {
  4125. "name": "workspace",
  4126. "in": "query",
  4127. "schema": {
  4128. "type": "string"
  4129. },
  4130. "required": false
  4131. }
  4132. ],
  4133. "responses": {
  4134. "200": {
  4135. "description": "Session removed",
  4136. "content": {
  4137. "application/json": {
  4138. "schema": {
  4139. "type": "boolean",
  4140. "description": "Session removed"
  4141. }
  4142. }
  4143. }
  4144. },
  4145. "400": {
  4146. "description": "Bad request",
  4147. "content": {
  4148. "application/json": {
  4149. "schema": {
  4150. "$ref": "#/components/schemas/BadRequestError"
  4151. }
  4152. }
  4153. }
  4154. },
  4155. "404": {
  4156. "description": "PtyNotFoundError",
  4157. "content": {
  4158. "application/json": {
  4159. "schema": {
  4160. "$ref": "#/components/schemas/PtyNotFoundError"
  4161. }
  4162. }
  4163. }
  4164. }
  4165. },
  4166. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4167. "summary": "Remove PTY session",
  4168. "x-codeSamples": [
  4169. {
  4170. "lang": "js",
  4171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4172. }
  4173. ]
  4174. }
  4175. },
  4176. "/pty/{ptyID}/connect-token": {
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.connectToken",
  4180. "parameters": [
  4181. {
  4182. "name": "ptyID",
  4183. "in": "path",
  4184. "schema": {
  4185. "type": "string",
  4186. "pattern": "^pty"
  4187. },
  4188. "required": true
  4189. },
  4190. {
  4191. "name": "directory",
  4192. "in": "query",
  4193. "schema": {
  4194. "type": "string"
  4195. },
  4196. "required": false
  4197. },
  4198. {
  4199. "name": "workspace",
  4200. "in": "query",
  4201. "schema": {
  4202. "type": "string"
  4203. },
  4204. "required": false
  4205. }
  4206. ],
  4207. "responses": {
  4208. "200": {
  4209. "description": "WebSocket connect token",
  4210. "content": {
  4211. "application/json": {
  4212. "schema": {
  4213. "type": "object",
  4214. "properties": {
  4215. "ticket": {
  4216. "type": "string"
  4217. },
  4218. "expires_in": {
  4219. "type": "integer",
  4220. "exclusiveMinimum": 0
  4221. }
  4222. },
  4223. "required": ["ticket", "expires_in"],
  4224. "additionalProperties": false,
  4225. "description": "WebSocket connect token"
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "400": {
  4231. "description": "Bad request",
  4232. "content": {
  4233. "application/json": {
  4234. "schema": {
  4235. "$ref": "#/components/schemas/BadRequestError"
  4236. }
  4237. }
  4238. }
  4239. },
  4240. "403": {
  4241. "description": "PtyForbiddenError",
  4242. "content": {
  4243. "application/json": {
  4244. "schema": {
  4245. "$ref": "#/components/schemas/PtyForbiddenError"
  4246. }
  4247. }
  4248. }
  4249. },
  4250. "404": {
  4251. "description": "PtyNotFoundError",
  4252. "content": {
  4253. "application/json": {
  4254. "schema": {
  4255. "$ref": "#/components/schemas/PtyNotFoundError"
  4256. }
  4257. }
  4258. }
  4259. }
  4260. },
  4261. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4262. "summary": "Create PTY WebSocket token",
  4263. "x-codeSamples": [
  4264. {
  4265. "lang": "js",
  4266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4267. }
  4268. ]
  4269. }
  4270. },
  4271. "/question": {
  4272. "get": {
  4273. "tags": ["question"],
  4274. "operationId": "question.list",
  4275. "parameters": [
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "List of pending questions",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "array",
  4300. "items": {
  4301. "$ref": "#/components/schemas/QuestionRequest"
  4302. },
  4303. "description": "List of pending questions"
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "400": {
  4309. "description": "Bad request",
  4310. "content": {
  4311. "application/json": {
  4312. "schema": {
  4313. "$ref": "#/components/schemas/BadRequestError"
  4314. }
  4315. }
  4316. }
  4317. }
  4318. },
  4319. "description": "Get all pending question requests across all sessions.",
  4320. "summary": "List pending questions",
  4321. "x-codeSamples": [
  4322. {
  4323. "lang": "js",
  4324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4325. }
  4326. ]
  4327. }
  4328. },
  4329. "/question/{requestID}/reply": {
  4330. "post": {
  4331. "tags": ["question"],
  4332. "operationId": "question.reply",
  4333. "parameters": [
  4334. {
  4335. "name": "requestID",
  4336. "in": "path",
  4337. "schema": {
  4338. "type": "string",
  4339. "pattern": "^que"
  4340. },
  4341. "required": true
  4342. },
  4343. {
  4344. "name": "directory",
  4345. "in": "query",
  4346. "schema": {
  4347. "type": "string"
  4348. },
  4349. "required": false
  4350. },
  4351. {
  4352. "name": "workspace",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. }
  4359. ],
  4360. "responses": {
  4361. "200": {
  4362. "description": "Question answered successfully",
  4363. "content": {
  4364. "application/json": {
  4365. "schema": {
  4366. "type": "boolean",
  4367. "description": "Question answered successfully"
  4368. }
  4369. }
  4370. }
  4371. },
  4372. "400": {
  4373. "description": "BadRequest | InvalidRequestError",
  4374. "content": {
  4375. "application/json": {
  4376. "schema": {
  4377. "anyOf": [
  4378. {
  4379. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4380. },
  4381. {
  4382. "$ref": "#/components/schemas/InvalidRequestError"
  4383. }
  4384. ]
  4385. }
  4386. }
  4387. }
  4388. },
  4389. "404": {
  4390. "description": "QuestionNotFoundError",
  4391. "content": {
  4392. "application/json": {
  4393. "schema": {
  4394. "$ref": "#/components/schemas/QuestionNotFoundError"
  4395. }
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "description": "Provide answers to a question request from the AI assistant.",
  4401. "summary": "Reply to question request",
  4402. "requestBody": {
  4403. "content": {
  4404. "application/json": {
  4405. "schema": {
  4406. "type": "object",
  4407. "properties": {
  4408. "answers": {
  4409. "type": "array",
  4410. "items": {
  4411. "$ref": "#/components/schemas/QuestionAnswer"
  4412. },
  4413. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4414. }
  4415. },
  4416. "required": ["answers"],
  4417. "additionalProperties": false
  4418. }
  4419. }
  4420. }
  4421. },
  4422. "x-codeSamples": [
  4423. {
  4424. "lang": "js",
  4425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4426. }
  4427. ]
  4428. }
  4429. },
  4430. "/question/{requestID}/reject": {
  4431. "post": {
  4432. "tags": ["question"],
  4433. "operationId": "question.reject",
  4434. "parameters": [
  4435. {
  4436. "name": "requestID",
  4437. "in": "path",
  4438. "schema": {
  4439. "type": "string",
  4440. "pattern": "^que"
  4441. },
  4442. "required": true
  4443. },
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Question rejected successfully",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "type": "boolean",
  4468. "description": "Question rejected successfully"
  4469. }
  4470. }
  4471. }
  4472. },
  4473. "400": {
  4474. "description": "BadRequest | InvalidRequestError",
  4475. "content": {
  4476. "application/json": {
  4477. "schema": {
  4478. "anyOf": [
  4479. {
  4480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4481. },
  4482. {
  4483. "$ref": "#/components/schemas/InvalidRequestError"
  4484. }
  4485. ]
  4486. }
  4487. }
  4488. }
  4489. },
  4490. "404": {
  4491. "description": "QuestionNotFoundError",
  4492. "content": {
  4493. "application/json": {
  4494. "schema": {
  4495. "$ref": "#/components/schemas/QuestionNotFoundError"
  4496. }
  4497. }
  4498. }
  4499. }
  4500. },
  4501. "description": "Reject a question request from the AI assistant.",
  4502. "summary": "Reject question request",
  4503. "x-codeSamples": [
  4504. {
  4505. "lang": "js",
  4506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4507. }
  4508. ]
  4509. }
  4510. },
  4511. "/permission": {
  4512. "get": {
  4513. "tags": ["permission"],
  4514. "operationId": "permission.list",
  4515. "parameters": [
  4516. {
  4517. "name": "directory",
  4518. "in": "query",
  4519. "schema": {
  4520. "type": "string"
  4521. },
  4522. "required": false
  4523. },
  4524. {
  4525. "name": "workspace",
  4526. "in": "query",
  4527. "schema": {
  4528. "type": "string"
  4529. },
  4530. "required": false
  4531. }
  4532. ],
  4533. "responses": {
  4534. "200": {
  4535. "description": "List of pending permissions",
  4536. "content": {
  4537. "application/json": {
  4538. "schema": {
  4539. "type": "array",
  4540. "items": {
  4541. "$ref": "#/components/schemas/PermissionRequest"
  4542. },
  4543. "description": "List of pending permissions"
  4544. }
  4545. }
  4546. }
  4547. },
  4548. "400": {
  4549. "description": "Bad request",
  4550. "content": {
  4551. "application/json": {
  4552. "schema": {
  4553. "$ref": "#/components/schemas/BadRequestError"
  4554. }
  4555. }
  4556. }
  4557. }
  4558. },
  4559. "description": "Get all pending permission requests across all sessions.",
  4560. "summary": "List pending permissions",
  4561. "x-codeSamples": [
  4562. {
  4563. "lang": "js",
  4564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4565. }
  4566. ]
  4567. }
  4568. },
  4569. "/permission/{requestID}/reply": {
  4570. "post": {
  4571. "tags": ["permission"],
  4572. "operationId": "permission.reply",
  4573. "parameters": [
  4574. {
  4575. "name": "requestID",
  4576. "in": "path",
  4577. "schema": {
  4578. "type": "string",
  4579. "pattern": "^per"
  4580. },
  4581. "required": true
  4582. },
  4583. {
  4584. "name": "directory",
  4585. "in": "query",
  4586. "schema": {
  4587. "type": "string"
  4588. },
  4589. "required": false
  4590. },
  4591. {
  4592. "name": "workspace",
  4593. "in": "query",
  4594. "schema": {
  4595. "type": "string"
  4596. },
  4597. "required": false
  4598. }
  4599. ],
  4600. "responses": {
  4601. "200": {
  4602. "description": "Permission processed successfully",
  4603. "content": {
  4604. "application/json": {
  4605. "schema": {
  4606. "type": "boolean",
  4607. "description": "Permission processed successfully"
  4608. }
  4609. }
  4610. }
  4611. },
  4612. "400": {
  4613. "description": "BadRequest | InvalidRequestError",
  4614. "content": {
  4615. "application/json": {
  4616. "schema": {
  4617. "anyOf": [
  4618. {
  4619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4620. },
  4621. {
  4622. "$ref": "#/components/schemas/InvalidRequestError"
  4623. }
  4624. ]
  4625. }
  4626. }
  4627. }
  4628. },
  4629. "404": {
  4630. "description": "PermissionNotFoundError",
  4631. "content": {
  4632. "application/json": {
  4633. "schema": {
  4634. "$ref": "#/components/schemas/PermissionNotFoundError"
  4635. }
  4636. }
  4637. }
  4638. }
  4639. },
  4640. "description": "Approve or deny a permission request from the AI assistant.",
  4641. "summary": "Respond to permission request",
  4642. "requestBody": {
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "object",
  4647. "properties": {
  4648. "reply": {
  4649. "type": "string",
  4650. "enum": ["once", "always", "reject"]
  4651. },
  4652. "message": {
  4653. "type": "string"
  4654. }
  4655. },
  4656. "required": ["reply"],
  4657. "additionalProperties": false
  4658. }
  4659. }
  4660. }
  4661. },
  4662. "x-codeSamples": [
  4663. {
  4664. "lang": "js",
  4665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4666. }
  4667. ]
  4668. }
  4669. },
  4670. "/provider": {
  4671. "get": {
  4672. "tags": ["provider"],
  4673. "operationId": "provider.list",
  4674. "parameters": [
  4675. {
  4676. "name": "directory",
  4677. "in": "query",
  4678. "schema": {
  4679. "type": "string"
  4680. },
  4681. "required": false
  4682. },
  4683. {
  4684. "name": "workspace",
  4685. "in": "query",
  4686. "schema": {
  4687. "type": "string"
  4688. },
  4689. "required": false
  4690. }
  4691. ],
  4692. "responses": {
  4693. "200": {
  4694. "description": "List of providers",
  4695. "content": {
  4696. "application/json": {
  4697. "schema": {
  4698. "type": "object",
  4699. "properties": {
  4700. "all": {
  4701. "type": "array",
  4702. "items": {
  4703. "$ref": "#/components/schemas/Provider"
  4704. }
  4705. },
  4706. "default": {
  4707. "type": "object",
  4708. "additionalProperties": {
  4709. "type": "string"
  4710. }
  4711. },
  4712. "connected": {
  4713. "type": "array",
  4714. "items": {
  4715. "type": "string"
  4716. }
  4717. }
  4718. },
  4719. "required": ["all", "default", "connected"],
  4720. "additionalProperties": false,
  4721. "description": "List of providers"
  4722. }
  4723. }
  4724. }
  4725. },
  4726. "400": {
  4727. "description": "Bad request",
  4728. "content": {
  4729. "application/json": {
  4730. "schema": {
  4731. "$ref": "#/components/schemas/BadRequestError"
  4732. }
  4733. }
  4734. }
  4735. }
  4736. },
  4737. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4738. "summary": "List providers",
  4739. "x-codeSamples": [
  4740. {
  4741. "lang": "js",
  4742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4743. }
  4744. ]
  4745. }
  4746. },
  4747. "/provider/auth": {
  4748. "get": {
  4749. "tags": ["provider"],
  4750. "operationId": "provider.auth",
  4751. "parameters": [
  4752. {
  4753. "name": "directory",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. },
  4760. {
  4761. "name": "workspace",
  4762. "in": "query",
  4763. "schema": {
  4764. "type": "string"
  4765. },
  4766. "required": false
  4767. }
  4768. ],
  4769. "responses": {
  4770. "200": {
  4771. "description": "Provider auth methods",
  4772. "content": {
  4773. "application/json": {
  4774. "schema": {
  4775. "type": "object",
  4776. "additionalProperties": {
  4777. "type": "array",
  4778. "items": {
  4779. "$ref": "#/components/schemas/ProviderAuthMethod"
  4780. }
  4781. },
  4782. "description": "Provider auth methods"
  4783. }
  4784. }
  4785. }
  4786. },
  4787. "400": {
  4788. "description": "Bad request",
  4789. "content": {
  4790. "application/json": {
  4791. "schema": {
  4792. "$ref": "#/components/schemas/BadRequestError"
  4793. }
  4794. }
  4795. }
  4796. }
  4797. },
  4798. "description": "Retrieve available authentication methods for all AI providers.",
  4799. "summary": "Get provider auth methods",
  4800. "x-codeSamples": [
  4801. {
  4802. "lang": "js",
  4803. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4804. }
  4805. ]
  4806. }
  4807. },
  4808. "/provider/{providerID}/oauth/authorize": {
  4809. "post": {
  4810. "tags": ["provider"],
  4811. "operationId": "provider.oauth.authorize",
  4812. "parameters": [
  4813. {
  4814. "name": "providerID",
  4815. "in": "path",
  4816. "schema": {
  4817. "type": "string"
  4818. },
  4819. "required": true
  4820. },
  4821. {
  4822. "name": "directory",
  4823. "in": "query",
  4824. "schema": {
  4825. "type": "string"
  4826. },
  4827. "required": false
  4828. },
  4829. {
  4830. "name": "workspace",
  4831. "in": "query",
  4832. "schema": {
  4833. "type": "string"
  4834. },
  4835. "required": false
  4836. }
  4837. ],
  4838. "responses": {
  4839. "200": {
  4840. "description": "Authorization URL and method",
  4841. "content": {
  4842. "application/json": {
  4843. "schema": {
  4844. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4845. }
  4846. }
  4847. }
  4848. },
  4849. "400": {
  4850. "description": "ProviderAuthError | InvalidRequestError",
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "anyOf": [
  4855. {
  4856. "$ref": "#/components/schemas/ProviderAuthError1"
  4857. },
  4858. {
  4859. "$ref": "#/components/schemas/InvalidRequestError"
  4860. }
  4861. ]
  4862. }
  4863. }
  4864. }
  4865. }
  4866. },
  4867. "description": "Start the OAuth authorization flow for a provider.",
  4868. "summary": "Start OAuth authorization",
  4869. "requestBody": {
  4870. "content": {
  4871. "application/json": {
  4872. "schema": {
  4873. "type": "object",
  4874. "properties": {
  4875. "method": {
  4876. "type": "number",
  4877. "description": "Auth method index"
  4878. },
  4879. "inputs": {
  4880. "type": "object",
  4881. "additionalProperties": {
  4882. "type": "string"
  4883. }
  4884. }
  4885. },
  4886. "required": ["method"],
  4887. "additionalProperties": false
  4888. }
  4889. }
  4890. }
  4891. },
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/provider/{providerID}/oauth/callback": {
  4901. "post": {
  4902. "tags": ["provider"],
  4903. "operationId": "provider.oauth.callback",
  4904. "parameters": [
  4905. {
  4906. "name": "providerID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string"
  4910. },
  4911. "required": true
  4912. },
  4913. {
  4914. "name": "directory",
  4915. "in": "query",
  4916. "schema": {
  4917. "type": "string"
  4918. },
  4919. "required": false
  4920. },
  4921. {
  4922. "name": "workspace",
  4923. "in": "query",
  4924. "schema": {
  4925. "type": "string"
  4926. },
  4927. "required": false
  4928. }
  4929. ],
  4930. "responses": {
  4931. "200": {
  4932. "description": "OAuth callback processed successfully",
  4933. "content": {
  4934. "application/json": {
  4935. "schema": {
  4936. "type": "boolean",
  4937. "description": "OAuth callback processed successfully"
  4938. }
  4939. }
  4940. }
  4941. },
  4942. "400": {
  4943. "description": "ProviderAuthError | InvalidRequestError",
  4944. "content": {
  4945. "application/json": {
  4946. "schema": {
  4947. "anyOf": [
  4948. {
  4949. "$ref": "#/components/schemas/ProviderAuthError1"
  4950. },
  4951. {
  4952. "$ref": "#/components/schemas/InvalidRequestError"
  4953. }
  4954. ]
  4955. }
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "description": "Handle the OAuth callback from a provider after user authorization.",
  4961. "summary": "Handle OAuth callback",
  4962. "requestBody": {
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "type": "object",
  4967. "properties": {
  4968. "method": {
  4969. "type": "number",
  4970. "description": "Auth method index"
  4971. },
  4972. "code": {
  4973. "type": "string"
  4974. }
  4975. },
  4976. "required": ["method"],
  4977. "additionalProperties": false
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "x-codeSamples": [
  4983. {
  4984. "lang": "js",
  4985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4986. }
  4987. ]
  4988. }
  4989. },
  4990. "/session": {
  4991. "get": {
  4992. "tags": ["session"],
  4993. "operationId": "session.list",
  4994. "parameters": [
  4995. {
  4996. "name": "directory",
  4997. "in": "query",
  4998. "schema": {
  4999. "type": "string"
  5000. },
  5001. "required": false
  5002. },
  5003. {
  5004. "name": "workspace",
  5005. "in": "query",
  5006. "schema": {
  5007. "type": "string"
  5008. },
  5009. "required": false
  5010. },
  5011. {
  5012. "name": "scope",
  5013. "in": "query",
  5014. "schema": {
  5015. "type": "string",
  5016. "enum": ["project"]
  5017. },
  5018. "required": false
  5019. },
  5020. {
  5021. "name": "path",
  5022. "in": "query",
  5023. "schema": {
  5024. "type": "string"
  5025. },
  5026. "required": false
  5027. },
  5028. {
  5029. "name": "roots",
  5030. "in": "query",
  5031. "schema": {
  5032. "anyOf": [
  5033. {
  5034. "type": "boolean"
  5035. },
  5036. {
  5037. "type": "string",
  5038. "enum": ["true", "false"]
  5039. }
  5040. ]
  5041. },
  5042. "required": false
  5043. },
  5044. {
  5045. "name": "start",
  5046. "in": "query",
  5047. "schema": {
  5048. "type": "number"
  5049. },
  5050. "required": false
  5051. },
  5052. {
  5053. "name": "search",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "limit",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "number"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "List of sessions",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "array",
  5076. "items": {
  5077. "$ref": "#/components/schemas/Session"
  5078. },
  5079. "description": "List of sessions"
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "400": {
  5085. "description": "Bad request",
  5086. "content": {
  5087. "application/json": {
  5088. "schema": {
  5089. "$ref": "#/components/schemas/BadRequestError"
  5090. }
  5091. }
  5092. }
  5093. }
  5094. },
  5095. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5096. "summary": "List sessions",
  5097. "x-codeSamples": [
  5098. {
  5099. "lang": "js",
  5100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5101. }
  5102. ]
  5103. },
  5104. "post": {
  5105. "tags": ["session"],
  5106. "operationId": "session.create",
  5107. "parameters": [
  5108. {
  5109. "name": "directory",
  5110. "in": "query",
  5111. "schema": {
  5112. "type": "string"
  5113. },
  5114. "required": false
  5115. },
  5116. {
  5117. "name": "workspace",
  5118. "in": "query",
  5119. "schema": {
  5120. "type": "string"
  5121. },
  5122. "required": false
  5123. }
  5124. ],
  5125. "responses": {
  5126. "200": {
  5127. "description": "Successfully created session",
  5128. "content": {
  5129. "application/json": {
  5130. "schema": {
  5131. "$ref": "#/components/schemas/Session"
  5132. }
  5133. }
  5134. }
  5135. },
  5136. "400": {
  5137. "description": "BadRequest | InvalidRequestError",
  5138. "content": {
  5139. "application/json": {
  5140. "schema": {
  5141. "anyOf": [
  5142. {
  5143. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5144. },
  5145. {
  5146. "$ref": "#/components/schemas/InvalidRequestError"
  5147. }
  5148. ]
  5149. }
  5150. }
  5151. }
  5152. }
  5153. },
  5154. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5155. "summary": "Create session",
  5156. "requestBody": {
  5157. "content": {
  5158. "application/json": {
  5159. "schema": {
  5160. "type": "object",
  5161. "properties": {
  5162. "parentID": {
  5163. "type": "string",
  5164. "pattern": "^ses"
  5165. },
  5166. "title": {
  5167. "type": "string"
  5168. },
  5169. "agent": {
  5170. "type": "string"
  5171. },
  5172. "model": {
  5173. "type": "object",
  5174. "properties": {
  5175. "id": {
  5176. "type": "string"
  5177. },
  5178. "providerID": {
  5179. "type": "string"
  5180. },
  5181. "variant": {
  5182. "type": "string"
  5183. }
  5184. },
  5185. "required": ["id", "providerID"],
  5186. "additionalProperties": false
  5187. },
  5188. "permission": {
  5189. "$ref": "#/components/schemas/PermissionRuleset"
  5190. },
  5191. "workspaceID": {
  5192. "type": "string",
  5193. "pattern": "^wrk"
  5194. }
  5195. },
  5196. "additionalProperties": false
  5197. }
  5198. }
  5199. }
  5200. },
  5201. "x-codeSamples": [
  5202. {
  5203. "lang": "js",
  5204. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5205. }
  5206. ]
  5207. }
  5208. },
  5209. "/session/status": {
  5210. "get": {
  5211. "tags": ["session"],
  5212. "operationId": "session.status",
  5213. "parameters": [
  5214. {
  5215. "name": "directory",
  5216. "in": "query",
  5217. "schema": {
  5218. "type": "string"
  5219. },
  5220. "required": false
  5221. },
  5222. {
  5223. "name": "workspace",
  5224. "in": "query",
  5225. "schema": {
  5226. "type": "string"
  5227. },
  5228. "required": false
  5229. }
  5230. ],
  5231. "responses": {
  5232. "200": {
  5233. "description": "Get session status",
  5234. "content": {
  5235. "application/json": {
  5236. "schema": {
  5237. "type": "object",
  5238. "additionalProperties": {
  5239. "$ref": "#/components/schemas/SessionStatus"
  5240. },
  5241. "description": "Get session status"
  5242. }
  5243. }
  5244. }
  5245. },
  5246. "400": {
  5247. "description": "BadRequest | InvalidRequestError",
  5248. "content": {
  5249. "application/json": {
  5250. "schema": {
  5251. "anyOf": [
  5252. {
  5253. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5254. },
  5255. {
  5256. "$ref": "#/components/schemas/InvalidRequestError"
  5257. }
  5258. ]
  5259. }
  5260. }
  5261. }
  5262. }
  5263. },
  5264. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5265. "summary": "Get session status",
  5266. "x-codeSamples": [
  5267. {
  5268. "lang": "js",
  5269. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5270. }
  5271. ]
  5272. }
  5273. },
  5274. "/session/{sessionID}": {
  5275. "get": {
  5276. "tags": ["session"],
  5277. "operationId": "session.get",
  5278. "parameters": [
  5279. {
  5280. "name": "sessionID",
  5281. "in": "path",
  5282. "schema": {
  5283. "type": "string",
  5284. "pattern": "^ses"
  5285. },
  5286. "required": true
  5287. },
  5288. {
  5289. "name": "directory",
  5290. "in": "query",
  5291. "schema": {
  5292. "type": "string"
  5293. },
  5294. "required": false
  5295. },
  5296. {
  5297. "name": "workspace",
  5298. "in": "query",
  5299. "schema": {
  5300. "type": "string"
  5301. },
  5302. "required": false
  5303. }
  5304. ],
  5305. "responses": {
  5306. "200": {
  5307. "description": "Get session",
  5308. "content": {
  5309. "application/json": {
  5310. "schema": {
  5311. "$ref": "#/components/schemas/Session"
  5312. }
  5313. }
  5314. }
  5315. },
  5316. "400": {
  5317. "description": "BadRequest | InvalidRequestError",
  5318. "content": {
  5319. "application/json": {
  5320. "schema": {
  5321. "anyOf": [
  5322. {
  5323. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5324. },
  5325. {
  5326. "$ref": "#/components/schemas/InvalidRequestError"
  5327. }
  5328. ]
  5329. }
  5330. }
  5331. }
  5332. },
  5333. "404": {
  5334. "description": "NotFoundError",
  5335. "content": {
  5336. "application/json": {
  5337. "schema": {
  5338. "$ref": "#/components/schemas/NotFoundError"
  5339. }
  5340. }
  5341. }
  5342. }
  5343. },
  5344. "description": "Retrieve detailed information about a specific OpenCode session.",
  5345. "summary": "Get session",
  5346. "x-codeSamples": [
  5347. {
  5348. "lang": "js",
  5349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5350. }
  5351. ]
  5352. },
  5353. "delete": {
  5354. "tags": ["session"],
  5355. "operationId": "session.delete",
  5356. "parameters": [
  5357. {
  5358. "name": "sessionID",
  5359. "in": "path",
  5360. "schema": {
  5361. "type": "string",
  5362. "pattern": "^ses"
  5363. },
  5364. "required": true
  5365. },
  5366. {
  5367. "name": "directory",
  5368. "in": "query",
  5369. "schema": {
  5370. "type": "string"
  5371. },
  5372. "required": false
  5373. },
  5374. {
  5375. "name": "workspace",
  5376. "in": "query",
  5377. "schema": {
  5378. "type": "string"
  5379. },
  5380. "required": false
  5381. }
  5382. ],
  5383. "responses": {
  5384. "200": {
  5385. "description": "Successfully deleted session",
  5386. "content": {
  5387. "application/json": {
  5388. "schema": {
  5389. "type": "boolean",
  5390. "description": "Successfully deleted session"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "400": {
  5396. "description": "BadRequest | InvalidRequestError",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "anyOf": [
  5401. {
  5402. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5403. },
  5404. {
  5405. "$ref": "#/components/schemas/InvalidRequestError"
  5406. }
  5407. ]
  5408. }
  5409. }
  5410. }
  5411. },
  5412. "404": {
  5413. "description": "NotFoundError",
  5414. "content": {
  5415. "application/json": {
  5416. "schema": {
  5417. "$ref": "#/components/schemas/NotFoundError"
  5418. }
  5419. }
  5420. }
  5421. }
  5422. },
  5423. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5424. "summary": "Delete session",
  5425. "x-codeSamples": [
  5426. {
  5427. "lang": "js",
  5428. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5429. }
  5430. ]
  5431. },
  5432. "patch": {
  5433. "tags": ["session"],
  5434. "operationId": "session.update",
  5435. "parameters": [
  5436. {
  5437. "name": "sessionID",
  5438. "in": "path",
  5439. "schema": {
  5440. "type": "string",
  5441. "pattern": "^ses"
  5442. },
  5443. "required": true
  5444. },
  5445. {
  5446. "name": "directory",
  5447. "in": "query",
  5448. "schema": {
  5449. "type": "string"
  5450. },
  5451. "required": false
  5452. },
  5453. {
  5454. "name": "workspace",
  5455. "in": "query",
  5456. "schema": {
  5457. "type": "string"
  5458. },
  5459. "required": false
  5460. }
  5461. ],
  5462. "responses": {
  5463. "200": {
  5464. "description": "Successfully updated session",
  5465. "content": {
  5466. "application/json": {
  5467. "schema": {
  5468. "$ref": "#/components/schemas/Session"
  5469. }
  5470. }
  5471. }
  5472. },
  5473. "400": {
  5474. "description": "BadRequest | InvalidRequestError",
  5475. "content": {
  5476. "application/json": {
  5477. "schema": {
  5478. "anyOf": [
  5479. {
  5480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5481. },
  5482. {
  5483. "$ref": "#/components/schemas/InvalidRequestError"
  5484. }
  5485. ]
  5486. }
  5487. }
  5488. }
  5489. },
  5490. "404": {
  5491. "description": "NotFoundError",
  5492. "content": {
  5493. "application/json": {
  5494. "schema": {
  5495. "$ref": "#/components/schemas/NotFoundError"
  5496. }
  5497. }
  5498. }
  5499. }
  5500. },
  5501. "description": "Update properties of an existing session, such as title or other metadata.",
  5502. "summary": "Update session",
  5503. "requestBody": {
  5504. "content": {
  5505. "application/json": {
  5506. "schema": {
  5507. "type": "object",
  5508. "properties": {
  5509. "title": {
  5510. "type": "string"
  5511. },
  5512. "permission": {
  5513. "$ref": "#/components/schemas/PermissionRuleset"
  5514. },
  5515. "time": {
  5516. "type": "object",
  5517. "properties": {
  5518. "archived": {
  5519. "type": "number"
  5520. }
  5521. },
  5522. "additionalProperties": false
  5523. }
  5524. },
  5525. "additionalProperties": false
  5526. }
  5527. }
  5528. }
  5529. },
  5530. "x-codeSamples": [
  5531. {
  5532. "lang": "js",
  5533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5534. }
  5535. ]
  5536. }
  5537. },
  5538. "/session/{sessionID}/children": {
  5539. "get": {
  5540. "tags": ["session"],
  5541. "operationId": "session.children",
  5542. "parameters": [
  5543. {
  5544. "name": "sessionID",
  5545. "in": "path",
  5546. "schema": {
  5547. "type": "string",
  5548. "pattern": "^ses"
  5549. },
  5550. "required": true
  5551. },
  5552. {
  5553. "name": "directory",
  5554. "in": "query",
  5555. "schema": {
  5556. "type": "string"
  5557. },
  5558. "required": false
  5559. },
  5560. {
  5561. "name": "workspace",
  5562. "in": "query",
  5563. "schema": {
  5564. "type": "string"
  5565. },
  5566. "required": false
  5567. }
  5568. ],
  5569. "responses": {
  5570. "200": {
  5571. "description": "List of children",
  5572. "content": {
  5573. "application/json": {
  5574. "schema": {
  5575. "type": "array",
  5576. "items": {
  5577. "$ref": "#/components/schemas/Session"
  5578. },
  5579. "description": "List of children"
  5580. }
  5581. }
  5582. }
  5583. },
  5584. "400": {
  5585. "description": "BadRequest | InvalidRequestError",
  5586. "content": {
  5587. "application/json": {
  5588. "schema": {
  5589. "anyOf": [
  5590. {
  5591. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5592. },
  5593. {
  5594. "$ref": "#/components/schemas/InvalidRequestError"
  5595. }
  5596. ]
  5597. }
  5598. }
  5599. }
  5600. },
  5601. "404": {
  5602. "description": "NotFoundError",
  5603. "content": {
  5604. "application/json": {
  5605. "schema": {
  5606. "$ref": "#/components/schemas/NotFoundError"
  5607. }
  5608. }
  5609. }
  5610. }
  5611. },
  5612. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5613. "summary": "Get session children",
  5614. "x-codeSamples": [
  5615. {
  5616. "lang": "js",
  5617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5618. }
  5619. ]
  5620. }
  5621. },
  5622. "/session/{sessionID}/todo": {
  5623. "get": {
  5624. "tags": ["session"],
  5625. "operationId": "session.todo",
  5626. "parameters": [
  5627. {
  5628. "name": "sessionID",
  5629. "in": "path",
  5630. "schema": {
  5631. "type": "string",
  5632. "pattern": "^ses"
  5633. },
  5634. "required": true
  5635. },
  5636. {
  5637. "name": "directory",
  5638. "in": "query",
  5639. "schema": {
  5640. "type": "string"
  5641. },
  5642. "required": false
  5643. },
  5644. {
  5645. "name": "workspace",
  5646. "in": "query",
  5647. "schema": {
  5648. "type": "string"
  5649. },
  5650. "required": false
  5651. }
  5652. ],
  5653. "responses": {
  5654. "200": {
  5655. "description": "Todo list",
  5656. "content": {
  5657. "application/json": {
  5658. "schema": {
  5659. "type": "array",
  5660. "items": {
  5661. "$ref": "#/components/schemas/Todo"
  5662. },
  5663. "description": "Todo list"
  5664. }
  5665. }
  5666. }
  5667. },
  5668. "400": {
  5669. "description": "BadRequest | InvalidRequestError",
  5670. "content": {
  5671. "application/json": {
  5672. "schema": {
  5673. "anyOf": [
  5674. {
  5675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5676. },
  5677. {
  5678. "$ref": "#/components/schemas/InvalidRequestError"
  5679. }
  5680. ]
  5681. }
  5682. }
  5683. }
  5684. },
  5685. "404": {
  5686. "description": "NotFoundError",
  5687. "content": {
  5688. "application/json": {
  5689. "schema": {
  5690. "$ref": "#/components/schemas/NotFoundError"
  5691. }
  5692. }
  5693. }
  5694. }
  5695. },
  5696. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5697. "summary": "Get session todos",
  5698. "x-codeSamples": [
  5699. {
  5700. "lang": "js",
  5701. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5702. }
  5703. ]
  5704. }
  5705. },
  5706. "/session/{sessionID}/diff": {
  5707. "get": {
  5708. "tags": ["session"],
  5709. "operationId": "session.diff",
  5710. "parameters": [
  5711. {
  5712. "name": "sessionID",
  5713. "in": "path",
  5714. "schema": {
  5715. "type": "string",
  5716. "pattern": "^ses"
  5717. },
  5718. "required": true
  5719. },
  5720. {
  5721. "name": "directory",
  5722. "in": "query",
  5723. "schema": {
  5724. "type": "string"
  5725. },
  5726. "required": false
  5727. },
  5728. {
  5729. "name": "workspace",
  5730. "in": "query",
  5731. "schema": {
  5732. "type": "string"
  5733. },
  5734. "required": false
  5735. },
  5736. {
  5737. "name": "messageID",
  5738. "in": "query",
  5739. "schema": {
  5740. "type": "string",
  5741. "pattern": "^msg"
  5742. },
  5743. "required": false
  5744. }
  5745. ],
  5746. "responses": {
  5747. "200": {
  5748. "description": "Successfully retrieved diff",
  5749. "content": {
  5750. "application/json": {
  5751. "schema": {
  5752. "type": "array",
  5753. "items": {
  5754. "$ref": "#/components/schemas/SnapshotFileDiff"
  5755. },
  5756. "description": "Successfully retrieved diff"
  5757. }
  5758. }
  5759. }
  5760. },
  5761. "400": {
  5762. "description": "Bad request",
  5763. "content": {
  5764. "application/json": {
  5765. "schema": {
  5766. "$ref": "#/components/schemas/BadRequestError"
  5767. }
  5768. }
  5769. }
  5770. }
  5771. },
  5772. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5773. "summary": "Get message diff",
  5774. "x-codeSamples": [
  5775. {
  5776. "lang": "js",
  5777. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5778. }
  5779. ]
  5780. }
  5781. },
  5782. "/session/{sessionID}/message": {
  5783. "get": {
  5784. "tags": ["session"],
  5785. "operationId": "session.messages",
  5786. "parameters": [
  5787. {
  5788. "name": "sessionID",
  5789. "in": "path",
  5790. "schema": {
  5791. "type": "string",
  5792. "pattern": "^ses"
  5793. },
  5794. "required": true
  5795. },
  5796. {
  5797. "name": "directory",
  5798. "in": "query",
  5799. "schema": {
  5800. "type": "string"
  5801. },
  5802. "required": false
  5803. },
  5804. {
  5805. "name": "workspace",
  5806. "in": "query",
  5807. "schema": {
  5808. "type": "string"
  5809. },
  5810. "required": false
  5811. },
  5812. {
  5813. "name": "limit",
  5814. "in": "query",
  5815. "schema": {
  5816. "type": "integer",
  5817. "minimum": 0,
  5818. "maximum": 9007199254740991
  5819. },
  5820. "required": false
  5821. },
  5822. {
  5823. "name": "before",
  5824. "in": "query",
  5825. "schema": {
  5826. "type": "string"
  5827. },
  5828. "required": false
  5829. }
  5830. ],
  5831. "responses": {
  5832. "200": {
  5833. "description": "List of messages",
  5834. "content": {
  5835. "application/json": {
  5836. "schema": {
  5837. "type": "array",
  5838. "items": {
  5839. "type": "object",
  5840. "properties": {
  5841. "info": {
  5842. "$ref": "#/components/schemas/Message"
  5843. },
  5844. "parts": {
  5845. "type": "array",
  5846. "items": {
  5847. "$ref": "#/components/schemas/Part"
  5848. }
  5849. }
  5850. },
  5851. "required": ["info", "parts"],
  5852. "additionalProperties": false
  5853. },
  5854. "description": "List of messages"
  5855. }
  5856. }
  5857. }
  5858. },
  5859. "400": {
  5860. "description": "BadRequest | InvalidRequestError",
  5861. "content": {
  5862. "application/json": {
  5863. "schema": {
  5864. "anyOf": [
  5865. {
  5866. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5867. },
  5868. {
  5869. "$ref": "#/components/schemas/InvalidRequestError"
  5870. }
  5871. ]
  5872. }
  5873. }
  5874. }
  5875. },
  5876. "404": {
  5877. "description": "NotFoundError",
  5878. "content": {
  5879. "application/json": {
  5880. "schema": {
  5881. "$ref": "#/components/schemas/NotFoundError"
  5882. }
  5883. }
  5884. }
  5885. }
  5886. },
  5887. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5888. "summary": "Get session messages",
  5889. "x-codeSamples": [
  5890. {
  5891. "lang": "js",
  5892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5893. }
  5894. ]
  5895. },
  5896. "post": {
  5897. "tags": ["session"],
  5898. "operationId": "session.prompt",
  5899. "parameters": [
  5900. {
  5901. "name": "sessionID",
  5902. "in": "path",
  5903. "schema": {
  5904. "type": "string",
  5905. "pattern": "^ses"
  5906. },
  5907. "required": true
  5908. },
  5909. {
  5910. "name": "directory",
  5911. "in": "query",
  5912. "schema": {
  5913. "type": "string"
  5914. },
  5915. "required": false
  5916. },
  5917. {
  5918. "name": "workspace",
  5919. "in": "query",
  5920. "schema": {
  5921. "type": "string"
  5922. },
  5923. "required": false
  5924. }
  5925. ],
  5926. "responses": {
  5927. "200": {
  5928. "description": "Created message",
  5929. "content": {
  5930. "application/json": {
  5931. "schema": {
  5932. "type": "object",
  5933. "required": ["info", "parts"],
  5934. "properties": {
  5935. "info": {
  5936. "$ref": "#/components/schemas/AssistantMessage"
  5937. },
  5938. "parts": {
  5939. "type": "array",
  5940. "items": {
  5941. "$ref": "#/components/schemas/Part"
  5942. }
  5943. }
  5944. }
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "400": {
  5950. "description": "BadRequest | InvalidRequestError",
  5951. "content": {
  5952. "application/json": {
  5953. "schema": {
  5954. "anyOf": [
  5955. {
  5956. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5957. },
  5958. {
  5959. "$ref": "#/components/schemas/InvalidRequestError"
  5960. }
  5961. ]
  5962. }
  5963. }
  5964. }
  5965. },
  5966. "404": {
  5967. "description": "NotFoundError",
  5968. "content": {
  5969. "application/json": {
  5970. "schema": {
  5971. "$ref": "#/components/schemas/NotFoundError"
  5972. }
  5973. }
  5974. }
  5975. }
  5976. },
  5977. "description": "Create and send a new message to a session, streaming the AI response.",
  5978. "summary": "Send message",
  5979. "requestBody": {
  5980. "content": {
  5981. "application/json": {
  5982. "schema": {
  5983. "type": "object",
  5984. "properties": {
  5985. "messageID": {
  5986. "type": "string",
  5987. "pattern": "^msg"
  5988. },
  5989. "model": {
  5990. "type": "object",
  5991. "properties": {
  5992. "providerID": {
  5993. "type": "string"
  5994. },
  5995. "modelID": {
  5996. "type": "string"
  5997. }
  5998. },
  5999. "required": ["providerID", "modelID"],
  6000. "additionalProperties": false
  6001. },
  6002. "agent": {
  6003. "type": "string"
  6004. },
  6005. "noReply": {
  6006. "type": "boolean"
  6007. },
  6008. "tools": {
  6009. "type": "object",
  6010. "additionalProperties": {
  6011. "type": "boolean"
  6012. }
  6013. },
  6014. "format": {
  6015. "$ref": "#/components/schemas/OutputFormat"
  6016. },
  6017. "system": {
  6018. "type": "string"
  6019. },
  6020. "variant": {
  6021. "type": "string"
  6022. },
  6023. "parts": {
  6024. "type": "array",
  6025. "items": {
  6026. "anyOf": [
  6027. {
  6028. "$ref": "#/components/schemas/TextPartInput"
  6029. },
  6030. {
  6031. "$ref": "#/components/schemas/FilePartInput"
  6032. },
  6033. {
  6034. "$ref": "#/components/schemas/AgentPartInput"
  6035. },
  6036. {
  6037. "$ref": "#/components/schemas/SubtaskPartInput"
  6038. }
  6039. ]
  6040. }
  6041. }
  6042. },
  6043. "required": ["parts"],
  6044. "additionalProperties": false
  6045. }
  6046. }
  6047. }
  6048. },
  6049. "x-codeSamples": [
  6050. {
  6051. "lang": "js",
  6052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6053. }
  6054. ]
  6055. }
  6056. },
  6057. "/session/{sessionID}/message/{messageID}": {
  6058. "get": {
  6059. "tags": ["session"],
  6060. "operationId": "session.message",
  6061. "parameters": [
  6062. {
  6063. "name": "sessionID",
  6064. "in": "path",
  6065. "schema": {
  6066. "type": "string",
  6067. "pattern": "^ses"
  6068. },
  6069. "required": true
  6070. },
  6071. {
  6072. "name": "messageID",
  6073. "in": "path",
  6074. "schema": {
  6075. "type": "string",
  6076. "pattern": "^msg"
  6077. },
  6078. "required": true
  6079. },
  6080. {
  6081. "name": "directory",
  6082. "in": "query",
  6083. "schema": {
  6084. "type": "string"
  6085. },
  6086. "required": false
  6087. },
  6088. {
  6089. "name": "workspace",
  6090. "in": "query",
  6091. "schema": {
  6092. "type": "string"
  6093. },
  6094. "required": false
  6095. }
  6096. ],
  6097. "responses": {
  6098. "200": {
  6099. "description": "Message",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "type": "object",
  6104. "properties": {
  6105. "info": {
  6106. "$ref": "#/components/schemas/Message"
  6107. },
  6108. "parts": {
  6109. "type": "array",
  6110. "items": {
  6111. "$ref": "#/components/schemas/Part"
  6112. }
  6113. }
  6114. },
  6115. "required": ["info", "parts"],
  6116. "additionalProperties": false,
  6117. "description": "Message"
  6118. }
  6119. }
  6120. }
  6121. },
  6122. "400": {
  6123. "description": "BadRequest | InvalidRequestError",
  6124. "content": {
  6125. "application/json": {
  6126. "schema": {
  6127. "anyOf": [
  6128. {
  6129. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6130. },
  6131. {
  6132. "$ref": "#/components/schemas/InvalidRequestError"
  6133. }
  6134. ]
  6135. }
  6136. }
  6137. }
  6138. },
  6139. "404": {
  6140. "description": "NotFoundError",
  6141. "content": {
  6142. "application/json": {
  6143. "schema": {
  6144. "$ref": "#/components/schemas/NotFoundError"
  6145. }
  6146. }
  6147. }
  6148. }
  6149. },
  6150. "description": "Retrieve a specific message from a session by its message ID.",
  6151. "summary": "Get message",
  6152. "x-codeSamples": [
  6153. {
  6154. "lang": "js",
  6155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6156. }
  6157. ]
  6158. },
  6159. "delete": {
  6160. "tags": ["session"],
  6161. "operationId": "session.deleteMessage",
  6162. "parameters": [
  6163. {
  6164. "name": "sessionID",
  6165. "in": "path",
  6166. "schema": {
  6167. "type": "string",
  6168. "pattern": "^ses"
  6169. },
  6170. "required": true
  6171. },
  6172. {
  6173. "name": "messageID",
  6174. "in": "path",
  6175. "schema": {
  6176. "type": "string",
  6177. "pattern": "^msg"
  6178. },
  6179. "required": true
  6180. },
  6181. {
  6182. "name": "directory",
  6183. "in": "query",
  6184. "schema": {
  6185. "type": "string"
  6186. },
  6187. "required": false
  6188. },
  6189. {
  6190. "name": "workspace",
  6191. "in": "query",
  6192. "schema": {
  6193. "type": "string"
  6194. },
  6195. "required": false
  6196. }
  6197. ],
  6198. "responses": {
  6199. "200": {
  6200. "description": "Successfully deleted message",
  6201. "content": {
  6202. "application/json": {
  6203. "schema": {
  6204. "type": "boolean",
  6205. "description": "Successfully deleted message"
  6206. }
  6207. }
  6208. }
  6209. },
  6210. "400": {
  6211. "description": "BadRequest | InvalidRequestError",
  6212. "content": {
  6213. "application/json": {
  6214. "schema": {
  6215. "anyOf": [
  6216. {
  6217. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6218. },
  6219. {
  6220. "$ref": "#/components/schemas/InvalidRequestError"
  6221. }
  6222. ]
  6223. }
  6224. }
  6225. }
  6226. },
  6227. "404": {
  6228. "description": "NotFoundError",
  6229. "content": {
  6230. "application/json": {
  6231. "schema": {
  6232. "$ref": "#/components/schemas/NotFoundError"
  6233. }
  6234. }
  6235. }
  6236. },
  6237. "409": {
  6238. "description": "SessionBusyError",
  6239. "content": {
  6240. "application/json": {
  6241. "schema": {
  6242. "$ref": "#/components/schemas/SessionBusyError"
  6243. }
  6244. }
  6245. }
  6246. }
  6247. },
  6248. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6249. "summary": "Delete message",
  6250. "x-codeSamples": [
  6251. {
  6252. "lang": "js",
  6253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6254. }
  6255. ]
  6256. }
  6257. },
  6258. "/session/{sessionID}/fork": {
  6259. "post": {
  6260. "tags": ["session"],
  6261. "operationId": "session.fork",
  6262. "parameters": [
  6263. {
  6264. "name": "sessionID",
  6265. "in": "path",
  6266. "schema": {
  6267. "type": "string",
  6268. "pattern": "^ses"
  6269. },
  6270. "required": true
  6271. },
  6272. {
  6273. "name": "directory",
  6274. "in": "query",
  6275. "schema": {
  6276. "type": "string"
  6277. },
  6278. "required": false
  6279. },
  6280. {
  6281. "name": "workspace",
  6282. "in": "query",
  6283. "schema": {
  6284. "type": "string"
  6285. },
  6286. "required": false
  6287. }
  6288. ],
  6289. "responses": {
  6290. "200": {
  6291. "description": "200",
  6292. "content": {
  6293. "application/json": {
  6294. "schema": {
  6295. "$ref": "#/components/schemas/Session"
  6296. }
  6297. }
  6298. }
  6299. },
  6300. "400": {
  6301. "description": "BadRequest | InvalidRequestError",
  6302. "content": {
  6303. "application/json": {
  6304. "schema": {
  6305. "anyOf": [
  6306. {
  6307. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6308. },
  6309. {
  6310. "$ref": "#/components/schemas/InvalidRequestError"
  6311. }
  6312. ]
  6313. }
  6314. }
  6315. }
  6316. },
  6317. "404": {
  6318. "description": "NotFoundError",
  6319. "content": {
  6320. "application/json": {
  6321. "schema": {
  6322. "$ref": "#/components/schemas/NotFoundError"
  6323. }
  6324. }
  6325. }
  6326. }
  6327. },
  6328. "description": "Create a new session by forking an existing session at a specific message point.",
  6329. "summary": "Fork session",
  6330. "requestBody": {
  6331. "content": {
  6332. "application/json": {
  6333. "schema": {
  6334. "type": "object",
  6335. "properties": {
  6336. "messageID": {
  6337. "type": "string",
  6338. "pattern": "^msg"
  6339. }
  6340. },
  6341. "additionalProperties": false
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "x-codeSamples": [
  6347. {
  6348. "lang": "js",
  6349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6350. }
  6351. ]
  6352. }
  6353. },
  6354. "/session/{sessionID}/abort": {
  6355. "post": {
  6356. "tags": ["session"],
  6357. "operationId": "session.abort",
  6358. "parameters": [
  6359. {
  6360. "name": "sessionID",
  6361. "in": "path",
  6362. "schema": {
  6363. "type": "string",
  6364. "pattern": "^ses"
  6365. },
  6366. "required": true
  6367. },
  6368. {
  6369. "name": "directory",
  6370. "in": "query",
  6371. "schema": {
  6372. "type": "string"
  6373. },
  6374. "required": false
  6375. },
  6376. {
  6377. "name": "workspace",
  6378. "in": "query",
  6379. "schema": {
  6380. "type": "string"
  6381. },
  6382. "required": false
  6383. }
  6384. ],
  6385. "responses": {
  6386. "200": {
  6387. "description": "Aborted session",
  6388. "content": {
  6389. "application/json": {
  6390. "schema": {
  6391. "type": "boolean",
  6392. "description": "Aborted session"
  6393. }
  6394. }
  6395. }
  6396. },
  6397. "400": {
  6398. "description": "BadRequest | InvalidRequestError",
  6399. "content": {
  6400. "application/json": {
  6401. "schema": {
  6402. "anyOf": [
  6403. {
  6404. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6405. },
  6406. {
  6407. "$ref": "#/components/schemas/InvalidRequestError"
  6408. }
  6409. ]
  6410. }
  6411. }
  6412. }
  6413. }
  6414. },
  6415. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6416. "summary": "Abort session",
  6417. "x-codeSamples": [
  6418. {
  6419. "lang": "js",
  6420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6421. }
  6422. ]
  6423. }
  6424. },
  6425. "/session/{sessionID}/init": {
  6426. "post": {
  6427. "tags": ["session"],
  6428. "operationId": "session.init",
  6429. "parameters": [
  6430. {
  6431. "name": "sessionID",
  6432. "in": "path",
  6433. "schema": {
  6434. "type": "string",
  6435. "pattern": "^ses"
  6436. },
  6437. "required": true
  6438. },
  6439. {
  6440. "name": "directory",
  6441. "in": "query",
  6442. "schema": {
  6443. "type": "string"
  6444. },
  6445. "required": false
  6446. },
  6447. {
  6448. "name": "workspace",
  6449. "in": "query",
  6450. "schema": {
  6451. "type": "string"
  6452. },
  6453. "required": false
  6454. }
  6455. ],
  6456. "responses": {
  6457. "200": {
  6458. "description": "200",
  6459. "content": {
  6460. "application/json": {
  6461. "schema": {
  6462. "type": "boolean",
  6463. "description": "200"
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "400": {
  6469. "description": "BadRequest | InvalidRequestError",
  6470. "content": {
  6471. "application/json": {
  6472. "schema": {
  6473. "anyOf": [
  6474. {
  6475. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6476. },
  6477. {
  6478. "$ref": "#/components/schemas/InvalidRequestError"
  6479. }
  6480. ]
  6481. }
  6482. }
  6483. }
  6484. },
  6485. "404": {
  6486. "description": "NotFoundError",
  6487. "content": {
  6488. "application/json": {
  6489. "schema": {
  6490. "$ref": "#/components/schemas/NotFoundError"
  6491. }
  6492. }
  6493. }
  6494. }
  6495. },
  6496. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6497. "summary": "Initialize session",
  6498. "requestBody": {
  6499. "content": {
  6500. "application/json": {
  6501. "schema": {
  6502. "type": "object",
  6503. "properties": {
  6504. "modelID": {
  6505. "type": "string"
  6506. },
  6507. "providerID": {
  6508. "type": "string"
  6509. },
  6510. "messageID": {
  6511. "type": "string",
  6512. "pattern": "^msg"
  6513. }
  6514. },
  6515. "required": ["modelID", "providerID", "messageID"],
  6516. "additionalProperties": false
  6517. }
  6518. }
  6519. }
  6520. },
  6521. "x-codeSamples": [
  6522. {
  6523. "lang": "js",
  6524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6525. }
  6526. ]
  6527. }
  6528. },
  6529. "/session/{sessionID}/share": {
  6530. "post": {
  6531. "tags": ["session"],
  6532. "operationId": "session.share",
  6533. "parameters": [
  6534. {
  6535. "name": "sessionID",
  6536. "in": "path",
  6537. "schema": {
  6538. "type": "string",
  6539. "pattern": "^ses"
  6540. },
  6541. "required": true
  6542. },
  6543. {
  6544. "name": "directory",
  6545. "in": "query",
  6546. "schema": {
  6547. "type": "string"
  6548. },
  6549. "required": false
  6550. },
  6551. {
  6552. "name": "workspace",
  6553. "in": "query",
  6554. "schema": {
  6555. "type": "string"
  6556. },
  6557. "required": false
  6558. }
  6559. ],
  6560. "responses": {
  6561. "200": {
  6562. "description": "Successfully shared session",
  6563. "content": {
  6564. "application/json": {
  6565. "schema": {
  6566. "$ref": "#/components/schemas/Session"
  6567. }
  6568. }
  6569. }
  6570. },
  6571. "400": {
  6572. "description": "Bad request",
  6573. "content": {
  6574. "application/json": {
  6575. "schema": {
  6576. "$ref": "#/components/schemas/BadRequestError"
  6577. }
  6578. }
  6579. }
  6580. },
  6581. "404": {
  6582. "description": "NotFoundError",
  6583. "content": {
  6584. "application/json": {
  6585. "schema": {
  6586. "$ref": "#/components/schemas/NotFoundError"
  6587. }
  6588. }
  6589. }
  6590. },
  6591. "500": {
  6592. "description": "InternalServerError",
  6593. "content": {
  6594. "application/json": {
  6595. "schema": {
  6596. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6597. }
  6598. }
  6599. }
  6600. }
  6601. },
  6602. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6603. "summary": "Share session",
  6604. "x-codeSamples": [
  6605. {
  6606. "lang": "js",
  6607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6608. }
  6609. ]
  6610. },
  6611. "delete": {
  6612. "tags": ["session"],
  6613. "operationId": "session.unshare",
  6614. "parameters": [
  6615. {
  6616. "name": "sessionID",
  6617. "in": "path",
  6618. "schema": {
  6619. "type": "string",
  6620. "pattern": "^ses"
  6621. },
  6622. "required": true
  6623. },
  6624. {
  6625. "name": "directory",
  6626. "in": "query",
  6627. "schema": {
  6628. "type": "string"
  6629. },
  6630. "required": false
  6631. },
  6632. {
  6633. "name": "workspace",
  6634. "in": "query",
  6635. "schema": {
  6636. "type": "string"
  6637. },
  6638. "required": false
  6639. }
  6640. ],
  6641. "responses": {
  6642. "200": {
  6643. "description": "Successfully unshared session",
  6644. "content": {
  6645. "application/json": {
  6646. "schema": {
  6647. "$ref": "#/components/schemas/Session"
  6648. }
  6649. }
  6650. }
  6651. },
  6652. "400": {
  6653. "description": "Bad request",
  6654. "content": {
  6655. "application/json": {
  6656. "schema": {
  6657. "$ref": "#/components/schemas/BadRequestError"
  6658. }
  6659. }
  6660. }
  6661. },
  6662. "404": {
  6663. "description": "NotFoundError",
  6664. "content": {
  6665. "application/json": {
  6666. "schema": {
  6667. "$ref": "#/components/schemas/NotFoundError"
  6668. }
  6669. }
  6670. }
  6671. },
  6672. "500": {
  6673. "description": "InternalServerError",
  6674. "content": {
  6675. "application/json": {
  6676. "schema": {
  6677. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6678. }
  6679. }
  6680. }
  6681. }
  6682. },
  6683. "description": "Remove the shareable link for a session, making it private again.",
  6684. "summary": "Unshare session",
  6685. "x-codeSamples": [
  6686. {
  6687. "lang": "js",
  6688. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6689. }
  6690. ]
  6691. }
  6692. },
  6693. "/session/{sessionID}/summarize": {
  6694. "post": {
  6695. "tags": ["session"],
  6696. "operationId": "session.summarize",
  6697. "parameters": [
  6698. {
  6699. "name": "sessionID",
  6700. "in": "path",
  6701. "schema": {
  6702. "type": "string",
  6703. "pattern": "^ses"
  6704. },
  6705. "required": true
  6706. },
  6707. {
  6708. "name": "directory",
  6709. "in": "query",
  6710. "schema": {
  6711. "type": "string"
  6712. },
  6713. "required": false
  6714. },
  6715. {
  6716. "name": "workspace",
  6717. "in": "query",
  6718. "schema": {
  6719. "type": "string"
  6720. },
  6721. "required": false
  6722. }
  6723. ],
  6724. "responses": {
  6725. "200": {
  6726. "description": "Summarized session",
  6727. "content": {
  6728. "application/json": {
  6729. "schema": {
  6730. "type": "boolean",
  6731. "description": "Summarized session"
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "400": {
  6737. "description": "BadRequest | InvalidRequestError",
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "anyOf": [
  6742. {
  6743. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6744. },
  6745. {
  6746. "$ref": "#/components/schemas/InvalidRequestError"
  6747. }
  6748. ]
  6749. }
  6750. }
  6751. }
  6752. },
  6753. "404": {
  6754. "description": "NotFoundError",
  6755. "content": {
  6756. "application/json": {
  6757. "schema": {
  6758. "$ref": "#/components/schemas/NotFoundError"
  6759. }
  6760. }
  6761. }
  6762. }
  6763. },
  6764. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6765. "summary": "Summarize session",
  6766. "requestBody": {
  6767. "content": {
  6768. "application/json": {
  6769. "schema": {
  6770. "type": "object",
  6771. "properties": {
  6772. "providerID": {
  6773. "type": "string"
  6774. },
  6775. "modelID": {
  6776. "type": "string"
  6777. },
  6778. "auto": {
  6779. "type": "boolean"
  6780. }
  6781. },
  6782. "required": ["providerID", "modelID"],
  6783. "additionalProperties": false
  6784. }
  6785. }
  6786. }
  6787. },
  6788. "x-codeSamples": [
  6789. {
  6790. "lang": "js",
  6791. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6792. }
  6793. ]
  6794. }
  6795. },
  6796. "/session/{sessionID}/prompt_async": {
  6797. "post": {
  6798. "tags": ["session"],
  6799. "operationId": "session.prompt_async",
  6800. "parameters": [
  6801. {
  6802. "name": "sessionID",
  6803. "in": "path",
  6804. "schema": {
  6805. "type": "string",
  6806. "pattern": "^ses"
  6807. },
  6808. "required": true
  6809. },
  6810. {
  6811. "name": "directory",
  6812. "in": "query",
  6813. "schema": {
  6814. "type": "string"
  6815. },
  6816. "required": false
  6817. },
  6818. {
  6819. "name": "workspace",
  6820. "in": "query",
  6821. "schema": {
  6822. "type": "string"
  6823. },
  6824. "required": false
  6825. }
  6826. ],
  6827. "responses": {
  6828. "204": {
  6829. "description": "Prompt accepted"
  6830. },
  6831. "400": {
  6832. "description": "BadRequest | InvalidRequestError",
  6833. "content": {
  6834. "application/json": {
  6835. "schema": {
  6836. "anyOf": [
  6837. {
  6838. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6839. },
  6840. {
  6841. "$ref": "#/components/schemas/InvalidRequestError"
  6842. }
  6843. ]
  6844. }
  6845. }
  6846. }
  6847. },
  6848. "404": {
  6849. "description": "NotFoundError",
  6850. "content": {
  6851. "application/json": {
  6852. "schema": {
  6853. "$ref": "#/components/schemas/NotFoundError"
  6854. }
  6855. }
  6856. }
  6857. }
  6858. },
  6859. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6860. "summary": "Send async message",
  6861. "requestBody": {
  6862. "content": {
  6863. "application/json": {
  6864. "schema": {
  6865. "type": "object",
  6866. "properties": {
  6867. "messageID": {
  6868. "type": "string",
  6869. "pattern": "^msg"
  6870. },
  6871. "model": {
  6872. "type": "object",
  6873. "properties": {
  6874. "providerID": {
  6875. "type": "string"
  6876. },
  6877. "modelID": {
  6878. "type": "string"
  6879. }
  6880. },
  6881. "required": ["providerID", "modelID"],
  6882. "additionalProperties": false
  6883. },
  6884. "agent": {
  6885. "type": "string"
  6886. },
  6887. "noReply": {
  6888. "type": "boolean"
  6889. },
  6890. "tools": {
  6891. "type": "object",
  6892. "additionalProperties": {
  6893. "type": "boolean"
  6894. }
  6895. },
  6896. "format": {
  6897. "$ref": "#/components/schemas/OutputFormat"
  6898. },
  6899. "system": {
  6900. "type": "string"
  6901. },
  6902. "variant": {
  6903. "type": "string"
  6904. },
  6905. "parts": {
  6906. "type": "array",
  6907. "items": {
  6908. "anyOf": [
  6909. {
  6910. "$ref": "#/components/schemas/TextPartInput"
  6911. },
  6912. {
  6913. "$ref": "#/components/schemas/FilePartInput"
  6914. },
  6915. {
  6916. "$ref": "#/components/schemas/AgentPartInput"
  6917. },
  6918. {
  6919. "$ref": "#/components/schemas/SubtaskPartInput"
  6920. }
  6921. ]
  6922. }
  6923. }
  6924. },
  6925. "required": ["parts"],
  6926. "additionalProperties": false
  6927. }
  6928. }
  6929. }
  6930. },
  6931. "x-codeSamples": [
  6932. {
  6933. "lang": "js",
  6934. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6935. }
  6936. ]
  6937. }
  6938. },
  6939. "/session/{sessionID}/command": {
  6940. "post": {
  6941. "tags": ["session"],
  6942. "operationId": "session.command",
  6943. "parameters": [
  6944. {
  6945. "name": "sessionID",
  6946. "in": "path",
  6947. "schema": {
  6948. "type": "string",
  6949. "pattern": "^ses"
  6950. },
  6951. "required": true
  6952. },
  6953. {
  6954. "name": "directory",
  6955. "in": "query",
  6956. "schema": {
  6957. "type": "string"
  6958. },
  6959. "required": false
  6960. },
  6961. {
  6962. "name": "workspace",
  6963. "in": "query",
  6964. "schema": {
  6965. "type": "string"
  6966. },
  6967. "required": false
  6968. }
  6969. ],
  6970. "responses": {
  6971. "200": {
  6972. "description": "Created message",
  6973. "content": {
  6974. "application/json": {
  6975. "schema": {
  6976. "type": "object",
  6977. "required": ["info", "parts"],
  6978. "properties": {
  6979. "info": {
  6980. "$ref": "#/components/schemas/AssistantMessage"
  6981. },
  6982. "parts": {
  6983. "type": "array",
  6984. "items": {
  6985. "$ref": "#/components/schemas/Part"
  6986. }
  6987. }
  6988. }
  6989. }
  6990. }
  6991. }
  6992. },
  6993. "400": {
  6994. "description": "BadRequest | InvalidRequestError",
  6995. "content": {
  6996. "application/json": {
  6997. "schema": {
  6998. "anyOf": [
  6999. {
  7000. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7001. },
  7002. {
  7003. "$ref": "#/components/schemas/InvalidRequestError"
  7004. }
  7005. ]
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "404": {
  7011. "description": "NotFoundError",
  7012. "content": {
  7013. "application/json": {
  7014. "schema": {
  7015. "$ref": "#/components/schemas/NotFoundError"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. },
  7021. "description": "Send a new command to a session for execution by the AI assistant.",
  7022. "summary": "Send command",
  7023. "requestBody": {
  7024. "content": {
  7025. "application/json": {
  7026. "schema": {
  7027. "type": "object",
  7028. "properties": {
  7029. "messageID": {
  7030. "type": "string",
  7031. "pattern": "^msg"
  7032. },
  7033. "agent": {
  7034. "type": "string"
  7035. },
  7036. "model": {
  7037. "type": "string"
  7038. },
  7039. "arguments": {
  7040. "type": "string"
  7041. },
  7042. "command": {
  7043. "type": "string"
  7044. },
  7045. "variant": {
  7046. "type": "string"
  7047. },
  7048. "parts": {
  7049. "type": "array",
  7050. "items": {
  7051. "type": "object",
  7052. "properties": {
  7053. "id": {
  7054. "type": "string",
  7055. "pattern": "^prt"
  7056. },
  7057. "type": {
  7058. "type": "string",
  7059. "enum": ["file"]
  7060. },
  7061. "mime": {
  7062. "type": "string"
  7063. },
  7064. "filename": {
  7065. "type": "string"
  7066. },
  7067. "url": {
  7068. "type": "string"
  7069. },
  7070. "source": {
  7071. "$ref": "#/components/schemas/FilePartSource"
  7072. }
  7073. },
  7074. "required": ["type", "mime", "url"],
  7075. "additionalProperties": false
  7076. }
  7077. }
  7078. },
  7079. "required": ["arguments", "command"],
  7080. "additionalProperties": false
  7081. }
  7082. }
  7083. }
  7084. },
  7085. "x-codeSamples": [
  7086. {
  7087. "lang": "js",
  7088. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7089. }
  7090. ]
  7091. }
  7092. },
  7093. "/session/{sessionID}/shell": {
  7094. "post": {
  7095. "tags": ["session"],
  7096. "operationId": "session.shell",
  7097. "parameters": [
  7098. {
  7099. "name": "sessionID",
  7100. "in": "path",
  7101. "schema": {
  7102. "type": "string",
  7103. "pattern": "^ses"
  7104. },
  7105. "required": true
  7106. },
  7107. {
  7108. "name": "directory",
  7109. "in": "query",
  7110. "schema": {
  7111. "type": "string"
  7112. },
  7113. "required": false
  7114. },
  7115. {
  7116. "name": "workspace",
  7117. "in": "query",
  7118. "schema": {
  7119. "type": "string"
  7120. },
  7121. "required": false
  7122. }
  7123. ],
  7124. "responses": {
  7125. "200": {
  7126. "description": "Created message",
  7127. "content": {
  7128. "application/json": {
  7129. "schema": {
  7130. "type": "object",
  7131. "properties": {
  7132. "info": {
  7133. "$ref": "#/components/schemas/Message"
  7134. },
  7135. "parts": {
  7136. "type": "array",
  7137. "items": {
  7138. "$ref": "#/components/schemas/Part"
  7139. }
  7140. }
  7141. },
  7142. "required": ["info", "parts"],
  7143. "additionalProperties": false,
  7144. "description": "Created message"
  7145. }
  7146. }
  7147. }
  7148. },
  7149. "400": {
  7150. "description": "BadRequest | InvalidRequestError",
  7151. "content": {
  7152. "application/json": {
  7153. "schema": {
  7154. "anyOf": [
  7155. {
  7156. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7157. },
  7158. {
  7159. "$ref": "#/components/schemas/InvalidRequestError"
  7160. }
  7161. ]
  7162. }
  7163. }
  7164. }
  7165. },
  7166. "404": {
  7167. "description": "NotFoundError",
  7168. "content": {
  7169. "application/json": {
  7170. "schema": {
  7171. "$ref": "#/components/schemas/NotFoundError"
  7172. }
  7173. }
  7174. }
  7175. },
  7176. "409": {
  7177. "description": "SessionBusyError",
  7178. "content": {
  7179. "application/json": {
  7180. "schema": {
  7181. "$ref": "#/components/schemas/SessionBusyError"
  7182. }
  7183. }
  7184. }
  7185. }
  7186. },
  7187. "description": "Execute a shell command within the session context and return the AI's response.",
  7188. "summary": "Run shell command",
  7189. "requestBody": {
  7190. "content": {
  7191. "application/json": {
  7192. "schema": {
  7193. "type": "object",
  7194. "properties": {
  7195. "messageID": {
  7196. "type": "string",
  7197. "pattern": "^msg"
  7198. },
  7199. "agent": {
  7200. "type": "string"
  7201. },
  7202. "model": {
  7203. "type": "object",
  7204. "properties": {
  7205. "providerID": {
  7206. "type": "string"
  7207. },
  7208. "modelID": {
  7209. "type": "string"
  7210. }
  7211. },
  7212. "required": ["providerID", "modelID"],
  7213. "additionalProperties": false
  7214. },
  7215. "command": {
  7216. "type": "string"
  7217. }
  7218. },
  7219. "required": ["agent", "command"],
  7220. "additionalProperties": false
  7221. }
  7222. }
  7223. }
  7224. },
  7225. "x-codeSamples": [
  7226. {
  7227. "lang": "js",
  7228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7229. }
  7230. ]
  7231. }
  7232. },
  7233. "/session/{sessionID}/revert": {
  7234. "post": {
  7235. "tags": ["session"],
  7236. "operationId": "session.revert",
  7237. "parameters": [
  7238. {
  7239. "name": "sessionID",
  7240. "in": "path",
  7241. "schema": {
  7242. "type": "string",
  7243. "pattern": "^ses"
  7244. },
  7245. "required": true
  7246. },
  7247. {
  7248. "name": "directory",
  7249. "in": "query",
  7250. "schema": {
  7251. "type": "string"
  7252. },
  7253. "required": false
  7254. },
  7255. {
  7256. "name": "workspace",
  7257. "in": "query",
  7258. "schema": {
  7259. "type": "string"
  7260. },
  7261. "required": false
  7262. }
  7263. ],
  7264. "responses": {
  7265. "200": {
  7266. "description": "Updated session",
  7267. "content": {
  7268. "application/json": {
  7269. "schema": {
  7270. "$ref": "#/components/schemas/Session"
  7271. }
  7272. }
  7273. }
  7274. },
  7275. "400": {
  7276. "description": "BadRequest | InvalidRequestError",
  7277. "content": {
  7278. "application/json": {
  7279. "schema": {
  7280. "anyOf": [
  7281. {
  7282. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7283. },
  7284. {
  7285. "$ref": "#/components/schemas/InvalidRequestError"
  7286. }
  7287. ]
  7288. }
  7289. }
  7290. }
  7291. },
  7292. "404": {
  7293. "description": "NotFoundError",
  7294. "content": {
  7295. "application/json": {
  7296. "schema": {
  7297. "$ref": "#/components/schemas/NotFoundError"
  7298. }
  7299. }
  7300. }
  7301. },
  7302. "409": {
  7303. "description": "SessionBusyError",
  7304. "content": {
  7305. "application/json": {
  7306. "schema": {
  7307. "$ref": "#/components/schemas/SessionBusyError"
  7308. }
  7309. }
  7310. }
  7311. }
  7312. },
  7313. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7314. "summary": "Revert message",
  7315. "requestBody": {
  7316. "content": {
  7317. "application/json": {
  7318. "schema": {
  7319. "type": "object",
  7320. "properties": {
  7321. "messageID": {
  7322. "type": "string",
  7323. "pattern": "^msg"
  7324. },
  7325. "partID": {
  7326. "type": "string",
  7327. "pattern": "^prt"
  7328. }
  7329. },
  7330. "required": ["messageID"],
  7331. "additionalProperties": false
  7332. }
  7333. }
  7334. }
  7335. },
  7336. "x-codeSamples": [
  7337. {
  7338. "lang": "js",
  7339. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7340. }
  7341. ]
  7342. }
  7343. },
  7344. "/session/{sessionID}/unrevert": {
  7345. "post": {
  7346. "tags": ["session"],
  7347. "operationId": "session.unrevert",
  7348. "parameters": [
  7349. {
  7350. "name": "sessionID",
  7351. "in": "path",
  7352. "schema": {
  7353. "type": "string",
  7354. "pattern": "^ses"
  7355. },
  7356. "required": true
  7357. },
  7358. {
  7359. "name": "directory",
  7360. "in": "query",
  7361. "schema": {
  7362. "type": "string"
  7363. },
  7364. "required": false
  7365. },
  7366. {
  7367. "name": "workspace",
  7368. "in": "query",
  7369. "schema": {
  7370. "type": "string"
  7371. },
  7372. "required": false
  7373. }
  7374. ],
  7375. "responses": {
  7376. "200": {
  7377. "description": "Updated session",
  7378. "content": {
  7379. "application/json": {
  7380. "schema": {
  7381. "$ref": "#/components/schemas/Session"
  7382. }
  7383. }
  7384. }
  7385. },
  7386. "400": {
  7387. "description": "BadRequest | InvalidRequestError",
  7388. "content": {
  7389. "application/json": {
  7390. "schema": {
  7391. "anyOf": [
  7392. {
  7393. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7394. },
  7395. {
  7396. "$ref": "#/components/schemas/InvalidRequestError"
  7397. }
  7398. ]
  7399. }
  7400. }
  7401. }
  7402. },
  7403. "404": {
  7404. "description": "NotFoundError",
  7405. "content": {
  7406. "application/json": {
  7407. "schema": {
  7408. "$ref": "#/components/schemas/NotFoundError"
  7409. }
  7410. }
  7411. }
  7412. },
  7413. "409": {
  7414. "description": "SessionBusyError",
  7415. "content": {
  7416. "application/json": {
  7417. "schema": {
  7418. "$ref": "#/components/schemas/SessionBusyError"
  7419. }
  7420. }
  7421. }
  7422. }
  7423. },
  7424. "description": "Restore all previously reverted messages in a session.",
  7425. "summary": "Restore reverted messages",
  7426. "x-codeSamples": [
  7427. {
  7428. "lang": "js",
  7429. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7430. }
  7431. ]
  7432. }
  7433. },
  7434. "/session/{sessionID}/permissions/{permissionID}": {
  7435. "post": {
  7436. "tags": ["session"],
  7437. "operationId": "permission.respond",
  7438. "parameters": [
  7439. {
  7440. "name": "sessionID",
  7441. "in": "path",
  7442. "schema": {
  7443. "type": "string",
  7444. "pattern": "^ses"
  7445. },
  7446. "required": true
  7447. },
  7448. {
  7449. "name": "permissionID",
  7450. "in": "path",
  7451. "schema": {
  7452. "type": "string",
  7453. "pattern": "^per"
  7454. },
  7455. "required": true
  7456. },
  7457. {
  7458. "name": "directory",
  7459. "in": "query",
  7460. "schema": {
  7461. "type": "string"
  7462. },
  7463. "required": false
  7464. },
  7465. {
  7466. "name": "workspace",
  7467. "in": "query",
  7468. "schema": {
  7469. "type": "string"
  7470. },
  7471. "required": false
  7472. }
  7473. ],
  7474. "responses": {
  7475. "200": {
  7476. "description": "Permission processed successfully",
  7477. "content": {
  7478. "application/json": {
  7479. "schema": {
  7480. "type": "boolean",
  7481. "description": "Permission processed successfully"
  7482. }
  7483. }
  7484. }
  7485. },
  7486. "400": {
  7487. "description": "BadRequest | InvalidRequestError",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "anyOf": [
  7492. {
  7493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7494. },
  7495. {
  7496. "$ref": "#/components/schemas/InvalidRequestError"
  7497. }
  7498. ]
  7499. }
  7500. }
  7501. }
  7502. },
  7503. "404": {
  7504. "description": "NotFoundError | PermissionNotFoundError",
  7505. "content": {
  7506. "application/json": {
  7507. "schema": {
  7508. "anyOf": [
  7509. {
  7510. "$ref": "#/components/schemas/NotFoundError"
  7511. },
  7512. {
  7513. "$ref": "#/components/schemas/PermissionNotFoundError"
  7514. }
  7515. ]
  7516. }
  7517. }
  7518. }
  7519. }
  7520. },
  7521. "description": "Approve or deny a permission request from the AI assistant.",
  7522. "summary": "Respond to permission",
  7523. "deprecated": true,
  7524. "requestBody": {
  7525. "content": {
  7526. "application/json": {
  7527. "schema": {
  7528. "type": "object",
  7529. "properties": {
  7530. "response": {
  7531. "type": "string",
  7532. "enum": ["once", "always", "reject"]
  7533. }
  7534. },
  7535. "required": ["response"],
  7536. "additionalProperties": false
  7537. }
  7538. }
  7539. }
  7540. },
  7541. "x-codeSamples": [
  7542. {
  7543. "lang": "js",
  7544. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7545. }
  7546. ]
  7547. }
  7548. },
  7549. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7550. "delete": {
  7551. "tags": ["session"],
  7552. "operationId": "part.delete",
  7553. "parameters": [
  7554. {
  7555. "name": "sessionID",
  7556. "in": "path",
  7557. "schema": {
  7558. "type": "string",
  7559. "pattern": "^ses"
  7560. },
  7561. "required": true
  7562. },
  7563. {
  7564. "name": "messageID",
  7565. "in": "path",
  7566. "schema": {
  7567. "type": "string",
  7568. "pattern": "^msg"
  7569. },
  7570. "required": true
  7571. },
  7572. {
  7573. "name": "partID",
  7574. "in": "path",
  7575. "schema": {
  7576. "type": "string",
  7577. "pattern": "^prt"
  7578. },
  7579. "required": true
  7580. },
  7581. {
  7582. "name": "directory",
  7583. "in": "query",
  7584. "schema": {
  7585. "type": "string"
  7586. },
  7587. "required": false
  7588. },
  7589. {
  7590. "name": "workspace",
  7591. "in": "query",
  7592. "schema": {
  7593. "type": "string"
  7594. },
  7595. "required": false
  7596. }
  7597. ],
  7598. "responses": {
  7599. "200": {
  7600. "description": "Successfully deleted part",
  7601. "content": {
  7602. "application/json": {
  7603. "schema": {
  7604. "type": "boolean",
  7605. "description": "Successfully deleted part"
  7606. }
  7607. }
  7608. }
  7609. },
  7610. "400": {
  7611. "description": "BadRequest | InvalidRequestError",
  7612. "content": {
  7613. "application/json": {
  7614. "schema": {
  7615. "anyOf": [
  7616. {
  7617. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7618. },
  7619. {
  7620. "$ref": "#/components/schemas/InvalidRequestError"
  7621. }
  7622. ]
  7623. }
  7624. }
  7625. }
  7626. },
  7627. "404": {
  7628. "description": "NotFoundError",
  7629. "content": {
  7630. "application/json": {
  7631. "schema": {
  7632. "$ref": "#/components/schemas/NotFoundError"
  7633. }
  7634. }
  7635. }
  7636. }
  7637. },
  7638. "description": "Delete a part from a message.",
  7639. "x-codeSamples": [
  7640. {
  7641. "lang": "js",
  7642. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7643. }
  7644. ]
  7645. },
  7646. "patch": {
  7647. "tags": ["session"],
  7648. "operationId": "part.update",
  7649. "parameters": [
  7650. {
  7651. "name": "sessionID",
  7652. "in": "path",
  7653. "schema": {
  7654. "type": "string",
  7655. "pattern": "^ses"
  7656. },
  7657. "required": true
  7658. },
  7659. {
  7660. "name": "messageID",
  7661. "in": "path",
  7662. "schema": {
  7663. "type": "string",
  7664. "pattern": "^msg"
  7665. },
  7666. "required": true
  7667. },
  7668. {
  7669. "name": "partID",
  7670. "in": "path",
  7671. "schema": {
  7672. "type": "string",
  7673. "pattern": "^prt"
  7674. },
  7675. "required": true
  7676. },
  7677. {
  7678. "name": "directory",
  7679. "in": "query",
  7680. "schema": {
  7681. "type": "string"
  7682. },
  7683. "required": false
  7684. },
  7685. {
  7686. "name": "workspace",
  7687. "in": "query",
  7688. "schema": {
  7689. "type": "string"
  7690. },
  7691. "required": false
  7692. }
  7693. ],
  7694. "responses": {
  7695. "200": {
  7696. "description": "Successfully updated part",
  7697. "content": {
  7698. "application/json": {
  7699. "schema": {
  7700. "$ref": "#/components/schemas/Part"
  7701. }
  7702. }
  7703. }
  7704. },
  7705. "400": {
  7706. "description": "BadRequest | InvalidRequestError",
  7707. "content": {
  7708. "application/json": {
  7709. "schema": {
  7710. "anyOf": [
  7711. {
  7712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7713. },
  7714. {
  7715. "$ref": "#/components/schemas/InvalidRequestError"
  7716. }
  7717. ]
  7718. }
  7719. }
  7720. }
  7721. },
  7722. "404": {
  7723. "description": "NotFoundError",
  7724. "content": {
  7725. "application/json": {
  7726. "schema": {
  7727. "$ref": "#/components/schemas/NotFoundError"
  7728. }
  7729. }
  7730. }
  7731. }
  7732. },
  7733. "description": "Update a part in a message.",
  7734. "requestBody": {
  7735. "content": {
  7736. "application/json": {
  7737. "schema": {
  7738. "$ref": "#/components/schemas/Part"
  7739. }
  7740. }
  7741. }
  7742. },
  7743. "x-codeSamples": [
  7744. {
  7745. "lang": "js",
  7746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7747. }
  7748. ]
  7749. }
  7750. },
  7751. "/sync/start": {
  7752. "post": {
  7753. "tags": ["sync"],
  7754. "operationId": "sync.start",
  7755. "parameters": [
  7756. {
  7757. "name": "directory",
  7758. "in": "query",
  7759. "schema": {
  7760. "type": "string"
  7761. },
  7762. "required": false
  7763. },
  7764. {
  7765. "name": "workspace",
  7766. "in": "query",
  7767. "schema": {
  7768. "type": "string"
  7769. },
  7770. "required": false
  7771. }
  7772. ],
  7773. "responses": {
  7774. "200": {
  7775. "description": "Workspace sync started",
  7776. "content": {
  7777. "application/json": {
  7778. "schema": {
  7779. "type": "boolean",
  7780. "description": "Workspace sync started"
  7781. }
  7782. }
  7783. }
  7784. },
  7785. "400": {
  7786. "description": "Bad request",
  7787. "content": {
  7788. "application/json": {
  7789. "schema": {
  7790. "$ref": "#/components/schemas/BadRequestError"
  7791. }
  7792. }
  7793. }
  7794. }
  7795. },
  7796. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7797. "summary": "Start workspace sync",
  7798. "x-codeSamples": [
  7799. {
  7800. "lang": "js",
  7801. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7802. }
  7803. ]
  7804. }
  7805. },
  7806. "/sync/replay": {
  7807. "post": {
  7808. "tags": ["sync"],
  7809. "operationId": "sync.replay",
  7810. "parameters": [
  7811. {
  7812. "name": "directory",
  7813. "in": "query",
  7814. "schema": {
  7815. "type": "string"
  7816. },
  7817. "required": false
  7818. },
  7819. {
  7820. "name": "workspace",
  7821. "in": "query",
  7822. "schema": {
  7823. "type": "string"
  7824. },
  7825. "required": false
  7826. }
  7827. ],
  7828. "responses": {
  7829. "200": {
  7830. "description": "Replayed sync events",
  7831. "content": {
  7832. "application/json": {
  7833. "schema": {
  7834. "type": "object",
  7835. "properties": {
  7836. "sessionID": {
  7837. "type": "string"
  7838. }
  7839. },
  7840. "required": ["sessionID"],
  7841. "additionalProperties": false,
  7842. "description": "Replayed sync events"
  7843. }
  7844. }
  7845. }
  7846. },
  7847. "400": {
  7848. "description": "BadRequest | InvalidRequestError",
  7849. "content": {
  7850. "application/json": {
  7851. "schema": {
  7852. "anyOf": [
  7853. {
  7854. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7855. },
  7856. {
  7857. "$ref": "#/components/schemas/InvalidRequestError"
  7858. }
  7859. ]
  7860. }
  7861. }
  7862. }
  7863. }
  7864. },
  7865. "description": "Validate and replay a complete sync event history.",
  7866. "summary": "Replay sync events",
  7867. "requestBody": {
  7868. "content": {
  7869. "application/json": {
  7870. "schema": {
  7871. "type": "object",
  7872. "properties": {
  7873. "directory": {
  7874. "type": "string"
  7875. },
  7876. "events": {
  7877. "type": "array",
  7878. "minItems": 1,
  7879. "items": {
  7880. "type": "object",
  7881. "properties": {
  7882. "id": {
  7883. "type": "string"
  7884. },
  7885. "aggregateID": {
  7886. "type": "string"
  7887. },
  7888. "seq": {
  7889. "type": "integer",
  7890. "minimum": 0
  7891. },
  7892. "type": {
  7893. "type": "string"
  7894. },
  7895. "data": {
  7896. "type": "object"
  7897. }
  7898. },
  7899. "required": ["id", "aggregateID", "seq", "type", "data"],
  7900. "additionalProperties": false
  7901. }
  7902. }
  7903. },
  7904. "required": ["directory", "events"],
  7905. "additionalProperties": false
  7906. }
  7907. }
  7908. }
  7909. },
  7910. "x-codeSamples": [
  7911. {
  7912. "lang": "js",
  7913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7914. }
  7915. ]
  7916. }
  7917. },
  7918. "/sync/steal": {
  7919. "post": {
  7920. "tags": ["sync"],
  7921. "operationId": "sync.steal",
  7922. "parameters": [
  7923. {
  7924. "name": "directory",
  7925. "in": "query",
  7926. "schema": {
  7927. "type": "string"
  7928. },
  7929. "required": false
  7930. },
  7931. {
  7932. "name": "workspace",
  7933. "in": "query",
  7934. "schema": {
  7935. "type": "string"
  7936. },
  7937. "required": false
  7938. }
  7939. ],
  7940. "responses": {
  7941. "200": {
  7942. "description": "Session stolen into workspace",
  7943. "content": {
  7944. "application/json": {
  7945. "schema": {
  7946. "type": "object",
  7947. "properties": {
  7948. "sessionID": {
  7949. "type": "string",
  7950. "pattern": "^ses"
  7951. }
  7952. },
  7953. "required": ["sessionID"],
  7954. "additionalProperties": false,
  7955. "description": "Session stolen into workspace"
  7956. }
  7957. }
  7958. }
  7959. },
  7960. "400": {
  7961. "description": "BadRequest | InvalidRequestError",
  7962. "content": {
  7963. "application/json": {
  7964. "schema": {
  7965. "anyOf": [
  7966. {
  7967. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7968. },
  7969. {
  7970. "$ref": "#/components/schemas/InvalidRequestError"
  7971. }
  7972. ]
  7973. }
  7974. }
  7975. }
  7976. }
  7977. },
  7978. "description": "Update a session to belong to the current workspace through the sync event system.",
  7979. "summary": "Steal session into workspace",
  7980. "requestBody": {
  7981. "content": {
  7982. "application/json": {
  7983. "schema": {
  7984. "type": "object",
  7985. "properties": {
  7986. "sessionID": {
  7987. "type": "string",
  7988. "pattern": "^ses"
  7989. }
  7990. },
  7991. "required": ["sessionID"],
  7992. "additionalProperties": false
  7993. }
  7994. }
  7995. }
  7996. },
  7997. "x-codeSamples": [
  7998. {
  7999. "lang": "js",
  8000. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8001. }
  8002. ]
  8003. }
  8004. },
  8005. "/sync/history": {
  8006. "post": {
  8007. "tags": ["sync"],
  8008. "operationId": "sync.history.list",
  8009. "parameters": [
  8010. {
  8011. "name": "directory",
  8012. "in": "query",
  8013. "schema": {
  8014. "type": "string"
  8015. },
  8016. "required": false
  8017. },
  8018. {
  8019. "name": "workspace",
  8020. "in": "query",
  8021. "schema": {
  8022. "type": "string"
  8023. },
  8024. "required": false
  8025. }
  8026. ],
  8027. "responses": {
  8028. "200": {
  8029. "description": "Sync events",
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "type": "array",
  8034. "items": {
  8035. "type": "object",
  8036. "properties": {
  8037. "id": {
  8038. "type": "string"
  8039. },
  8040. "aggregate_id": {
  8041. "type": "string"
  8042. },
  8043. "seq": {
  8044. "type": "integer",
  8045. "minimum": 0
  8046. },
  8047. "type": {
  8048. "type": "string"
  8049. },
  8050. "data": {
  8051. "type": "object"
  8052. }
  8053. },
  8054. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8055. "additionalProperties": false
  8056. },
  8057. "description": "Sync events"
  8058. }
  8059. }
  8060. }
  8061. },
  8062. "400": {
  8063. "description": "BadRequest | InvalidRequestError",
  8064. "content": {
  8065. "application/json": {
  8066. "schema": {
  8067. "anyOf": [
  8068. {
  8069. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8070. },
  8071. {
  8072. "$ref": "#/components/schemas/InvalidRequestError"
  8073. }
  8074. ]
  8075. }
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "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.",
  8081. "summary": "List sync events",
  8082. "requestBody": {
  8083. "content": {
  8084. "application/json": {
  8085. "schema": {
  8086. "type": "object",
  8087. "additionalProperties": {
  8088. "type": "integer",
  8089. "minimum": 0
  8090. }
  8091. }
  8092. }
  8093. }
  8094. },
  8095. "x-codeSamples": [
  8096. {
  8097. "lang": "js",
  8098. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8099. }
  8100. ]
  8101. }
  8102. },
  8103. "/api/session": {
  8104. "get": {
  8105. "tags": ["v2"],
  8106. "operationId": "v2.session.list",
  8107. "parameters": [
  8108. {
  8109. "name": "directory",
  8110. "in": "query",
  8111. "schema": {
  8112. "type": "string"
  8113. },
  8114. "required": false
  8115. },
  8116. {
  8117. "name": "workspace",
  8118. "in": "query",
  8119. "schema": {
  8120. "type": "string"
  8121. },
  8122. "required": false
  8123. },
  8124. {
  8125. "name": "limit",
  8126. "in": "query",
  8127. "schema": {
  8128. "type": "number"
  8129. },
  8130. "required": false
  8131. },
  8132. {
  8133. "name": "order",
  8134. "in": "query",
  8135. "schema": {
  8136. "type": "string",
  8137. "enum": ["asc", "desc"]
  8138. },
  8139. "required": false
  8140. },
  8141. {
  8142. "name": "path",
  8143. "in": "query",
  8144. "schema": {
  8145. "type": "string"
  8146. },
  8147. "required": false
  8148. },
  8149. {
  8150. "name": "roots",
  8151. "in": "query",
  8152. "schema": {
  8153. "anyOf": [
  8154. {
  8155. "type": "boolean"
  8156. },
  8157. {
  8158. "type": "string",
  8159. "enum": ["true", "false"]
  8160. }
  8161. ]
  8162. },
  8163. "required": false
  8164. },
  8165. {
  8166. "name": "start",
  8167. "in": "query",
  8168. "schema": {
  8169. "type": "number"
  8170. },
  8171. "required": false
  8172. },
  8173. {
  8174. "name": "search",
  8175. "in": "query",
  8176. "schema": {
  8177. "type": "string"
  8178. },
  8179. "required": false
  8180. },
  8181. {
  8182. "name": "cursor",
  8183. "in": "query",
  8184. "schema": {
  8185. "type": "string",
  8186. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8187. },
  8188. "required": false
  8189. }
  8190. ],
  8191. "security": [],
  8192. "responses": {
  8193. "200": {
  8194. "description": "V2SessionsResponse",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "$ref": "#/components/schemas/V2SessionsResponse"
  8199. }
  8200. }
  8201. }
  8202. },
  8203. "400": {
  8204. "description": "InvalidCursorError | InvalidRequestError",
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "anyOf": [
  8209. {
  8210. "$ref": "#/components/schemas/InvalidCursorError"
  8211. },
  8212. {
  8213. "$ref": "#/components/schemas/InvalidRequestError"
  8214. },
  8215. {
  8216. "$ref": "#/components/schemas/InvalidRequestError"
  8217. }
  8218. ]
  8219. }
  8220. }
  8221. }
  8222. },
  8223. "401": {
  8224. "description": "UnauthorizedError",
  8225. "content": {
  8226. "application/json": {
  8227. "schema": {
  8228. "$ref": "#/components/schemas/UnauthorizedError"
  8229. }
  8230. }
  8231. }
  8232. }
  8233. },
  8234. "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.",
  8235. "summary": "List v2 sessions",
  8236. "x-codeSamples": [
  8237. {
  8238. "lang": "js",
  8239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8240. }
  8241. ]
  8242. }
  8243. },
  8244. "/api/session/{sessionID}/prompt": {
  8245. "post": {
  8246. "tags": ["v2"],
  8247. "operationId": "v2.session.prompt",
  8248. "parameters": [
  8249. {
  8250. "name": "sessionID",
  8251. "in": "path",
  8252. "schema": {
  8253. "type": "string",
  8254. "pattern": "^ses"
  8255. },
  8256. "required": true
  8257. },
  8258. {
  8259. "name": "directory",
  8260. "in": "query",
  8261. "schema": {
  8262. "type": "string"
  8263. },
  8264. "required": false
  8265. },
  8266. {
  8267. "name": "workspace",
  8268. "in": "query",
  8269. "schema": {
  8270. "type": "string"
  8271. },
  8272. "required": false
  8273. }
  8274. ],
  8275. "security": [],
  8276. "responses": {
  8277. "200": {
  8278. "description": "Session.Message",
  8279. "content": {
  8280. "application/json": {
  8281. "schema": {
  8282. "$ref": "#/components/schemas/SessionMessage"
  8283. }
  8284. }
  8285. }
  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. "404": {
  8308. "description": "SessionNotFoundError",
  8309. "content": {
  8310. "application/json": {
  8311. "schema": {
  8312. "$ref": "#/components/schemas/SessionNotFoundError"
  8313. }
  8314. }
  8315. }
  8316. },
  8317. "503": {
  8318. "description": "ServiceUnavailableError",
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "$ref": "#/components/schemas/ServiceUnavailableError"
  8323. }
  8324. }
  8325. }
  8326. }
  8327. },
  8328. "description": "Create a v2 session message and queue it for the agent loop.",
  8329. "summary": "Send v2 message",
  8330. "requestBody": {
  8331. "content": {
  8332. "application/json": {
  8333. "schema": {
  8334. "type": "object",
  8335. "properties": {
  8336. "prompt": {
  8337. "$ref": "#/components/schemas/Prompt"
  8338. },
  8339. "delivery": {
  8340. "$ref": "#/components/schemas/SessionDelivery"
  8341. }
  8342. },
  8343. "required": ["prompt"],
  8344. "additionalProperties": false
  8345. }
  8346. }
  8347. }
  8348. },
  8349. "x-codeSamples": [
  8350. {
  8351. "lang": "js",
  8352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8353. }
  8354. ]
  8355. }
  8356. },
  8357. "/api/session/{sessionID}/compact": {
  8358. "post": {
  8359. "tags": ["v2"],
  8360. "operationId": "v2.session.compact",
  8361. "parameters": [
  8362. {
  8363. "name": "sessionID",
  8364. "in": "path",
  8365. "schema": {
  8366. "type": "string",
  8367. "pattern": "^ses"
  8368. },
  8369. "required": true
  8370. },
  8371. {
  8372. "name": "directory",
  8373. "in": "query",
  8374. "schema": {
  8375. "type": "string"
  8376. },
  8377. "required": false
  8378. },
  8379. {
  8380. "name": "workspace",
  8381. "in": "query",
  8382. "schema": {
  8383. "type": "string"
  8384. },
  8385. "required": false
  8386. }
  8387. ],
  8388. "security": [],
  8389. "responses": {
  8390. "204": {
  8391. "description": "<No Content>"
  8392. },
  8393. "400": {
  8394. "description": "InvalidRequestError",
  8395. "content": {
  8396. "application/json": {
  8397. "schema": {
  8398. "$ref": "#/components/schemas/InvalidRequestError"
  8399. }
  8400. }
  8401. }
  8402. },
  8403. "401": {
  8404. "description": "UnauthorizedError",
  8405. "content": {
  8406. "application/json": {
  8407. "schema": {
  8408. "$ref": "#/components/schemas/UnauthorizedError"
  8409. }
  8410. }
  8411. }
  8412. },
  8413. "404": {
  8414. "description": "SessionNotFoundError",
  8415. "content": {
  8416. "application/json": {
  8417. "schema": {
  8418. "$ref": "#/components/schemas/SessionNotFoundError"
  8419. }
  8420. }
  8421. }
  8422. },
  8423. "503": {
  8424. "description": "ServiceUnavailableError",
  8425. "content": {
  8426. "application/json": {
  8427. "schema": {
  8428. "$ref": "#/components/schemas/ServiceUnavailableError"
  8429. }
  8430. }
  8431. }
  8432. }
  8433. },
  8434. "description": "Compact a v2 session conversation.",
  8435. "summary": "Compact v2 session",
  8436. "x-codeSamples": [
  8437. {
  8438. "lang": "js",
  8439. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8440. }
  8441. ]
  8442. }
  8443. },
  8444. "/api/session/{sessionID}/wait": {
  8445. "post": {
  8446. "tags": ["v2"],
  8447. "operationId": "v2.session.wait",
  8448. "parameters": [
  8449. {
  8450. "name": "sessionID",
  8451. "in": "path",
  8452. "schema": {
  8453. "type": "string",
  8454. "pattern": "^ses"
  8455. },
  8456. "required": true
  8457. },
  8458. {
  8459. "name": "directory",
  8460. "in": "query",
  8461. "schema": {
  8462. "type": "string"
  8463. },
  8464. "required": false
  8465. },
  8466. {
  8467. "name": "workspace",
  8468. "in": "query",
  8469. "schema": {
  8470. "type": "string"
  8471. },
  8472. "required": false
  8473. }
  8474. ],
  8475. "security": [],
  8476. "responses": {
  8477. "204": {
  8478. "description": "<No Content>"
  8479. },
  8480. "400": {
  8481. "description": "InvalidRequestError",
  8482. "content": {
  8483. "application/json": {
  8484. "schema": {
  8485. "$ref": "#/components/schemas/InvalidRequestError"
  8486. }
  8487. }
  8488. }
  8489. },
  8490. "401": {
  8491. "description": "UnauthorizedError",
  8492. "content": {
  8493. "application/json": {
  8494. "schema": {
  8495. "$ref": "#/components/schemas/UnauthorizedError"
  8496. }
  8497. }
  8498. }
  8499. },
  8500. "404": {
  8501. "description": "SessionNotFoundError",
  8502. "content": {
  8503. "application/json": {
  8504. "schema": {
  8505. "$ref": "#/components/schemas/SessionNotFoundError"
  8506. }
  8507. }
  8508. }
  8509. },
  8510. "503": {
  8511. "description": "ServiceUnavailableError",
  8512. "content": {
  8513. "application/json": {
  8514. "schema": {
  8515. "$ref": "#/components/schemas/ServiceUnavailableError"
  8516. }
  8517. }
  8518. }
  8519. }
  8520. },
  8521. "description": "Wait for a v2 session agent loop to become idle.",
  8522. "summary": "Wait for v2 session",
  8523. "x-codeSamples": [
  8524. {
  8525. "lang": "js",
  8526. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8527. }
  8528. ]
  8529. }
  8530. },
  8531. "/api/session/{sessionID}/context": {
  8532. "get": {
  8533. "tags": ["v2"],
  8534. "operationId": "v2.session.context",
  8535. "parameters": [
  8536. {
  8537. "name": "sessionID",
  8538. "in": "path",
  8539. "schema": {
  8540. "type": "string",
  8541. "pattern": "^ses"
  8542. },
  8543. "required": true
  8544. },
  8545. {
  8546. "name": "directory",
  8547. "in": "query",
  8548. "schema": {
  8549. "type": "string"
  8550. },
  8551. "required": false
  8552. },
  8553. {
  8554. "name": "workspace",
  8555. "in": "query",
  8556. "schema": {
  8557. "type": "string"
  8558. },
  8559. "required": false
  8560. }
  8561. ],
  8562. "security": [],
  8563. "responses": {
  8564. "200": {
  8565. "description": "Success",
  8566. "content": {
  8567. "application/json": {
  8568. "schema": {
  8569. "type": "array",
  8570. "items": {
  8571. "$ref": "#/components/schemas/SessionMessage"
  8572. }
  8573. }
  8574. }
  8575. }
  8576. },
  8577. "400": {
  8578. "description": "InvalidRequestError",
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "$ref": "#/components/schemas/InvalidRequestError"
  8583. }
  8584. }
  8585. }
  8586. },
  8587. "401": {
  8588. "description": "UnauthorizedError",
  8589. "content": {
  8590. "application/json": {
  8591. "schema": {
  8592. "$ref": "#/components/schemas/UnauthorizedError"
  8593. }
  8594. }
  8595. }
  8596. },
  8597. "404": {
  8598. "description": "SessionNotFoundError",
  8599. "content": {
  8600. "application/json": {
  8601. "schema": {
  8602. "$ref": "#/components/schemas/SessionNotFoundError"
  8603. }
  8604. }
  8605. }
  8606. },
  8607. "500": {
  8608. "description": "UnknownError",
  8609. "content": {
  8610. "application/json": {
  8611. "schema": {
  8612. "$ref": "#/components/schemas/UnknownError1"
  8613. }
  8614. }
  8615. }
  8616. }
  8617. },
  8618. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8619. "summary": "Get v2 session context",
  8620. "x-codeSamples": [
  8621. {
  8622. "lang": "js",
  8623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8624. }
  8625. ]
  8626. }
  8627. },
  8628. "/api/session/{sessionID}/message": {
  8629. "get": {
  8630. "tags": ["v2 messages"],
  8631. "operationId": "v2.session.messages",
  8632. "parameters": [
  8633. {
  8634. "name": "sessionID",
  8635. "in": "path",
  8636. "schema": {
  8637. "type": "string",
  8638. "pattern": "^ses"
  8639. },
  8640. "required": true
  8641. },
  8642. {
  8643. "name": "directory",
  8644. "in": "query",
  8645. "schema": {
  8646. "type": "string"
  8647. },
  8648. "required": false
  8649. },
  8650. {
  8651. "name": "workspace",
  8652. "in": "query",
  8653. "schema": {
  8654. "type": "string"
  8655. },
  8656. "required": false
  8657. },
  8658. {
  8659. "name": "limit",
  8660. "in": "query",
  8661. "schema": {
  8662. "type": "number"
  8663. },
  8664. "required": false
  8665. },
  8666. {
  8667. "name": "order",
  8668. "in": "query",
  8669. "schema": {
  8670. "type": "string",
  8671. "enum": ["asc", "desc"]
  8672. },
  8673. "required": false
  8674. },
  8675. {
  8676. "name": "cursor",
  8677. "in": "query",
  8678. "schema": {
  8679. "type": "string",
  8680. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8681. },
  8682. "required": false
  8683. }
  8684. ],
  8685. "security": [],
  8686. "responses": {
  8687. "200": {
  8688. "description": "V2SessionMessagesResponse",
  8689. "content": {
  8690. "application/json": {
  8691. "schema": {
  8692. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8693. }
  8694. }
  8695. }
  8696. },
  8697. "400": {
  8698. "description": "InvalidCursorError | InvalidRequestError",
  8699. "content": {
  8700. "application/json": {
  8701. "schema": {
  8702. "anyOf": [
  8703. {
  8704. "$ref": "#/components/schemas/InvalidCursorError"
  8705. },
  8706. {
  8707. "$ref": "#/components/schemas/InvalidRequestError"
  8708. }
  8709. ]
  8710. }
  8711. }
  8712. }
  8713. },
  8714. "401": {
  8715. "description": "UnauthorizedError",
  8716. "content": {
  8717. "application/json": {
  8718. "schema": {
  8719. "$ref": "#/components/schemas/UnauthorizedError"
  8720. }
  8721. }
  8722. }
  8723. },
  8724. "404": {
  8725. "description": "SessionNotFoundError",
  8726. "content": {
  8727. "application/json": {
  8728. "schema": {
  8729. "$ref": "#/components/schemas/SessionNotFoundError"
  8730. }
  8731. }
  8732. }
  8733. },
  8734. "500": {
  8735. "description": "UnknownError",
  8736. "content": {
  8737. "application/json": {
  8738. "schema": {
  8739. "$ref": "#/components/schemas/UnknownError1"
  8740. }
  8741. }
  8742. }
  8743. }
  8744. },
  8745. "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.",
  8746. "summary": "Get v2 session messages",
  8747. "x-codeSamples": [
  8748. {
  8749. "lang": "js",
  8750. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8751. }
  8752. ]
  8753. }
  8754. },
  8755. "/api/model": {
  8756. "get": {
  8757. "tags": ["v2 models"],
  8758. "operationId": "v2.model.list",
  8759. "parameters": [
  8760. {
  8761. "name": "location",
  8762. "in": "query",
  8763. "schema": {
  8764. "type": "object",
  8765. "properties": {
  8766. "directory": {
  8767. "type": "string"
  8768. },
  8769. "workspace": {
  8770. "type": "string"
  8771. }
  8772. },
  8773. "additionalProperties": false
  8774. },
  8775. "required": false,
  8776. "style": "deepObject",
  8777. "explode": true
  8778. }
  8779. ],
  8780. "security": [],
  8781. "responses": {
  8782. "200": {
  8783. "description": "Success",
  8784. "content": {
  8785. "application/json": {
  8786. "schema": {
  8787. "type": "array",
  8788. "items": {
  8789. "$ref": "#/components/schemas/ModelV2Info"
  8790. }
  8791. }
  8792. }
  8793. }
  8794. },
  8795. "400": {
  8796. "description": "InvalidRequestError",
  8797. "content": {
  8798. "application/json": {
  8799. "schema": {
  8800. "$ref": "#/components/schemas/InvalidRequestError"
  8801. }
  8802. }
  8803. }
  8804. },
  8805. "401": {
  8806. "description": "UnauthorizedError",
  8807. "content": {
  8808. "application/json": {
  8809. "schema": {
  8810. "$ref": "#/components/schemas/UnauthorizedError"
  8811. }
  8812. }
  8813. }
  8814. },
  8815. "503": {
  8816. "description": "ServiceUnavailableError",
  8817. "content": {
  8818. "application/json": {
  8819. "schema": {
  8820. "$ref": "#/components/schemas/ServiceUnavailableError"
  8821. }
  8822. }
  8823. }
  8824. }
  8825. },
  8826. "description": "Retrieve available v2 models ordered by release date.",
  8827. "summary": "List v2 models",
  8828. "x-codeSamples": [
  8829. {
  8830. "lang": "js",
  8831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8832. }
  8833. ]
  8834. }
  8835. },
  8836. "/api/provider": {
  8837. "get": {
  8838. "tags": ["v2 providers"],
  8839. "operationId": "v2.provider.list",
  8840. "parameters": [
  8841. {
  8842. "name": "location",
  8843. "in": "query",
  8844. "schema": {
  8845. "type": "object",
  8846. "properties": {
  8847. "directory": {
  8848. "type": "string"
  8849. },
  8850. "workspace": {
  8851. "type": "string"
  8852. }
  8853. },
  8854. "additionalProperties": false
  8855. },
  8856. "required": false,
  8857. "style": "deepObject",
  8858. "explode": true
  8859. }
  8860. ],
  8861. "security": [],
  8862. "responses": {
  8863. "200": {
  8864. "description": "Success",
  8865. "content": {
  8866. "application/json": {
  8867. "schema": {
  8868. "type": "array",
  8869. "items": {
  8870. "$ref": "#/components/schemas/ProviderV2Info"
  8871. }
  8872. }
  8873. }
  8874. }
  8875. },
  8876. "400": {
  8877. "description": "InvalidRequestError",
  8878. "content": {
  8879. "application/json": {
  8880. "schema": {
  8881. "$ref": "#/components/schemas/InvalidRequestError"
  8882. }
  8883. }
  8884. }
  8885. },
  8886. "401": {
  8887. "description": "UnauthorizedError",
  8888. "content": {
  8889. "application/json": {
  8890. "schema": {
  8891. "$ref": "#/components/schemas/UnauthorizedError"
  8892. }
  8893. }
  8894. }
  8895. },
  8896. "503": {
  8897. "description": "ServiceUnavailableError",
  8898. "content": {
  8899. "application/json": {
  8900. "schema": {
  8901. "$ref": "#/components/schemas/ServiceUnavailableError"
  8902. }
  8903. }
  8904. }
  8905. }
  8906. },
  8907. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8908. "summary": "List v2 providers",
  8909. "x-codeSamples": [
  8910. {
  8911. "lang": "js",
  8912. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8913. }
  8914. ]
  8915. }
  8916. },
  8917. "/api/provider/{providerID}": {
  8918. "get": {
  8919. "tags": ["v2 providers"],
  8920. "operationId": "v2.provider.get",
  8921. "parameters": [
  8922. {
  8923. "name": "providerID",
  8924. "in": "path",
  8925. "schema": {
  8926. "type": "string"
  8927. },
  8928. "required": true
  8929. },
  8930. {
  8931. "name": "location",
  8932. "in": "query",
  8933. "schema": {
  8934. "type": "object",
  8935. "properties": {
  8936. "directory": {
  8937. "type": "string"
  8938. },
  8939. "workspace": {
  8940. "type": "string"
  8941. }
  8942. },
  8943. "additionalProperties": false
  8944. },
  8945. "required": false,
  8946. "style": "deepObject",
  8947. "explode": true
  8948. }
  8949. ],
  8950. "security": [],
  8951. "responses": {
  8952. "200": {
  8953. "description": "ProviderV2.Info",
  8954. "content": {
  8955. "application/json": {
  8956. "schema": {
  8957. "$ref": "#/components/schemas/ProviderV2Info"
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "400": {
  8963. "description": "InvalidRequestError",
  8964. "content": {
  8965. "application/json": {
  8966. "schema": {
  8967. "$ref": "#/components/schemas/InvalidRequestError"
  8968. }
  8969. }
  8970. }
  8971. },
  8972. "401": {
  8973. "description": "UnauthorizedError",
  8974. "content": {
  8975. "application/json": {
  8976. "schema": {
  8977. "$ref": "#/components/schemas/UnauthorizedError"
  8978. }
  8979. }
  8980. }
  8981. },
  8982. "404": {
  8983. "description": "ProviderNotFoundError",
  8984. "content": {
  8985. "application/json": {
  8986. "schema": {
  8987. "$ref": "#/components/schemas/ProviderNotFoundError"
  8988. }
  8989. }
  8990. }
  8991. },
  8992. "503": {
  8993. "description": "ServiceUnavailableError",
  8994. "content": {
  8995. "application/json": {
  8996. "schema": {
  8997. "$ref": "#/components/schemas/ServiceUnavailableError"
  8998. }
  8999. }
  9000. }
  9001. }
  9002. },
  9003. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  9004. "summary": "Get v2 provider",
  9005. "x-codeSamples": [
  9006. {
  9007. "lang": "js",
  9008. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9009. }
  9010. ]
  9011. }
  9012. },
  9013. "/tui/append-prompt": {
  9014. "post": {
  9015. "tags": ["tui"],
  9016. "operationId": "tui.appendPrompt",
  9017. "parameters": [
  9018. {
  9019. "name": "directory",
  9020. "in": "query",
  9021. "schema": {
  9022. "type": "string"
  9023. },
  9024. "required": false
  9025. },
  9026. {
  9027. "name": "workspace",
  9028. "in": "query",
  9029. "schema": {
  9030. "type": "string"
  9031. },
  9032. "required": false
  9033. }
  9034. ],
  9035. "responses": {
  9036. "200": {
  9037. "description": "Prompt processed successfully",
  9038. "content": {
  9039. "application/json": {
  9040. "schema": {
  9041. "type": "boolean",
  9042. "description": "Prompt processed successfully"
  9043. }
  9044. }
  9045. }
  9046. },
  9047. "400": {
  9048. "description": "BadRequest | InvalidRequestError",
  9049. "content": {
  9050. "application/json": {
  9051. "schema": {
  9052. "anyOf": [
  9053. {
  9054. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9055. },
  9056. {
  9057. "$ref": "#/components/schemas/InvalidRequestError"
  9058. }
  9059. ]
  9060. }
  9061. }
  9062. }
  9063. }
  9064. },
  9065. "description": "Append prompt to the TUI.",
  9066. "summary": "Append TUI prompt",
  9067. "requestBody": {
  9068. "content": {
  9069. "application/json": {
  9070. "schema": {
  9071. "type": "object",
  9072. "properties": {
  9073. "text": {
  9074. "type": "string"
  9075. }
  9076. },
  9077. "required": ["text"],
  9078. "additionalProperties": false
  9079. }
  9080. }
  9081. }
  9082. },
  9083. "x-codeSamples": [
  9084. {
  9085. "lang": "js",
  9086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9087. }
  9088. ]
  9089. }
  9090. },
  9091. "/tui/open-help": {
  9092. "post": {
  9093. "tags": ["tui"],
  9094. "operationId": "tui.openHelp",
  9095. "parameters": [
  9096. {
  9097. "name": "directory",
  9098. "in": "query",
  9099. "schema": {
  9100. "type": "string"
  9101. },
  9102. "required": false
  9103. },
  9104. {
  9105. "name": "workspace",
  9106. "in": "query",
  9107. "schema": {
  9108. "type": "string"
  9109. },
  9110. "required": false
  9111. }
  9112. ],
  9113. "responses": {
  9114. "200": {
  9115. "description": "Help dialog opened successfully",
  9116. "content": {
  9117. "application/json": {
  9118. "schema": {
  9119. "type": "boolean",
  9120. "description": "Help dialog opened successfully"
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "400": {
  9126. "description": "Bad request",
  9127. "content": {
  9128. "application/json": {
  9129. "schema": {
  9130. "$ref": "#/components/schemas/BadRequestError"
  9131. }
  9132. }
  9133. }
  9134. }
  9135. },
  9136. "description": "Open the help dialog in the TUI to display user assistance information.",
  9137. "summary": "Open help dialog",
  9138. "x-codeSamples": [
  9139. {
  9140. "lang": "js",
  9141. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9142. }
  9143. ]
  9144. }
  9145. },
  9146. "/tui/open-sessions": {
  9147. "post": {
  9148. "tags": ["tui"],
  9149. "operationId": "tui.openSessions",
  9150. "parameters": [
  9151. {
  9152. "name": "directory",
  9153. "in": "query",
  9154. "schema": {
  9155. "type": "string"
  9156. },
  9157. "required": false
  9158. },
  9159. {
  9160. "name": "workspace",
  9161. "in": "query",
  9162. "schema": {
  9163. "type": "string"
  9164. },
  9165. "required": false
  9166. }
  9167. ],
  9168. "responses": {
  9169. "200": {
  9170. "description": "Session dialog opened successfully",
  9171. "content": {
  9172. "application/json": {
  9173. "schema": {
  9174. "type": "boolean",
  9175. "description": "Session dialog opened successfully"
  9176. }
  9177. }
  9178. }
  9179. },
  9180. "400": {
  9181. "description": "Bad request",
  9182. "content": {
  9183. "application/json": {
  9184. "schema": {
  9185. "$ref": "#/components/schemas/BadRequestError"
  9186. }
  9187. }
  9188. }
  9189. }
  9190. },
  9191. "description": "Open the session dialog.",
  9192. "summary": "Open sessions dialog",
  9193. "x-codeSamples": [
  9194. {
  9195. "lang": "js",
  9196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9197. }
  9198. ]
  9199. }
  9200. },
  9201. "/tui/open-themes": {
  9202. "post": {
  9203. "tags": ["tui"],
  9204. "operationId": "tui.openThemes",
  9205. "parameters": [
  9206. {
  9207. "name": "directory",
  9208. "in": "query",
  9209. "schema": {
  9210. "type": "string"
  9211. },
  9212. "required": false
  9213. },
  9214. {
  9215. "name": "workspace",
  9216. "in": "query",
  9217. "schema": {
  9218. "type": "string"
  9219. },
  9220. "required": false
  9221. }
  9222. ],
  9223. "responses": {
  9224. "200": {
  9225. "description": "Theme dialog opened successfully",
  9226. "content": {
  9227. "application/json": {
  9228. "schema": {
  9229. "type": "boolean",
  9230. "description": "Theme dialog opened successfully"
  9231. }
  9232. }
  9233. }
  9234. },
  9235. "400": {
  9236. "description": "Bad request",
  9237. "content": {
  9238. "application/json": {
  9239. "schema": {
  9240. "$ref": "#/components/schemas/BadRequestError"
  9241. }
  9242. }
  9243. }
  9244. }
  9245. },
  9246. "description": "Open the theme dialog.",
  9247. "summary": "Open themes dialog",
  9248. "x-codeSamples": [
  9249. {
  9250. "lang": "js",
  9251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9252. }
  9253. ]
  9254. }
  9255. },
  9256. "/tui/open-models": {
  9257. "post": {
  9258. "tags": ["tui"],
  9259. "operationId": "tui.openModels",
  9260. "parameters": [
  9261. {
  9262. "name": "directory",
  9263. "in": "query",
  9264. "schema": {
  9265. "type": "string"
  9266. },
  9267. "required": false
  9268. },
  9269. {
  9270. "name": "workspace",
  9271. "in": "query",
  9272. "schema": {
  9273. "type": "string"
  9274. },
  9275. "required": false
  9276. }
  9277. ],
  9278. "responses": {
  9279. "200": {
  9280. "description": "Model dialog opened successfully",
  9281. "content": {
  9282. "application/json": {
  9283. "schema": {
  9284. "type": "boolean",
  9285. "description": "Model dialog opened successfully"
  9286. }
  9287. }
  9288. }
  9289. },
  9290. "400": {
  9291. "description": "Bad request",
  9292. "content": {
  9293. "application/json": {
  9294. "schema": {
  9295. "$ref": "#/components/schemas/BadRequestError"
  9296. }
  9297. }
  9298. }
  9299. }
  9300. },
  9301. "description": "Open the model dialog.",
  9302. "summary": "Open models dialog",
  9303. "x-codeSamples": [
  9304. {
  9305. "lang": "js",
  9306. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9307. }
  9308. ]
  9309. }
  9310. },
  9311. "/tui/submit-prompt": {
  9312. "post": {
  9313. "tags": ["tui"],
  9314. "operationId": "tui.submitPrompt",
  9315. "parameters": [
  9316. {
  9317. "name": "directory",
  9318. "in": "query",
  9319. "schema": {
  9320. "type": "string"
  9321. },
  9322. "required": false
  9323. },
  9324. {
  9325. "name": "workspace",
  9326. "in": "query",
  9327. "schema": {
  9328. "type": "string"
  9329. },
  9330. "required": false
  9331. }
  9332. ],
  9333. "responses": {
  9334. "200": {
  9335. "description": "Prompt submitted successfully",
  9336. "content": {
  9337. "application/json": {
  9338. "schema": {
  9339. "type": "boolean",
  9340. "description": "Prompt submitted successfully"
  9341. }
  9342. }
  9343. }
  9344. },
  9345. "400": {
  9346. "description": "Bad request",
  9347. "content": {
  9348. "application/json": {
  9349. "schema": {
  9350. "$ref": "#/components/schemas/BadRequestError"
  9351. }
  9352. }
  9353. }
  9354. }
  9355. },
  9356. "description": "Submit the prompt.",
  9357. "summary": "Submit TUI prompt",
  9358. "x-codeSamples": [
  9359. {
  9360. "lang": "js",
  9361. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9362. }
  9363. ]
  9364. }
  9365. },
  9366. "/tui/clear-prompt": {
  9367. "post": {
  9368. "tags": ["tui"],
  9369. "operationId": "tui.clearPrompt",
  9370. "parameters": [
  9371. {
  9372. "name": "directory",
  9373. "in": "query",
  9374. "schema": {
  9375. "type": "string"
  9376. },
  9377. "required": false
  9378. },
  9379. {
  9380. "name": "workspace",
  9381. "in": "query",
  9382. "schema": {
  9383. "type": "string"
  9384. },
  9385. "required": false
  9386. }
  9387. ],
  9388. "responses": {
  9389. "200": {
  9390. "description": "Prompt cleared successfully",
  9391. "content": {
  9392. "application/json": {
  9393. "schema": {
  9394. "type": "boolean",
  9395. "description": "Prompt cleared successfully"
  9396. }
  9397. }
  9398. }
  9399. },
  9400. "400": {
  9401. "description": "Bad request",
  9402. "content": {
  9403. "application/json": {
  9404. "schema": {
  9405. "$ref": "#/components/schemas/BadRequestError"
  9406. }
  9407. }
  9408. }
  9409. }
  9410. },
  9411. "description": "Clear the prompt.",
  9412. "summary": "Clear TUI prompt",
  9413. "x-codeSamples": [
  9414. {
  9415. "lang": "js",
  9416. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9417. }
  9418. ]
  9419. }
  9420. },
  9421. "/tui/execute-command": {
  9422. "post": {
  9423. "tags": ["tui"],
  9424. "operationId": "tui.executeCommand",
  9425. "parameters": [
  9426. {
  9427. "name": "directory",
  9428. "in": "query",
  9429. "schema": {
  9430. "type": "string"
  9431. },
  9432. "required": false
  9433. },
  9434. {
  9435. "name": "workspace",
  9436. "in": "query",
  9437. "schema": {
  9438. "type": "string"
  9439. },
  9440. "required": false
  9441. }
  9442. ],
  9443. "responses": {
  9444. "200": {
  9445. "description": "Command executed successfully",
  9446. "content": {
  9447. "application/json": {
  9448. "schema": {
  9449. "type": "boolean",
  9450. "description": "Command executed successfully"
  9451. }
  9452. }
  9453. }
  9454. },
  9455. "400": {
  9456. "description": "BadRequest | InvalidRequestError",
  9457. "content": {
  9458. "application/json": {
  9459. "schema": {
  9460. "anyOf": [
  9461. {
  9462. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9463. },
  9464. {
  9465. "$ref": "#/components/schemas/InvalidRequestError"
  9466. }
  9467. ]
  9468. }
  9469. }
  9470. }
  9471. }
  9472. },
  9473. "description": "Execute a TUI command.",
  9474. "summary": "Execute TUI command",
  9475. "requestBody": {
  9476. "content": {
  9477. "application/json": {
  9478. "schema": {
  9479. "type": "object",
  9480. "properties": {
  9481. "command": {
  9482. "type": "string"
  9483. }
  9484. },
  9485. "required": ["command"],
  9486. "additionalProperties": false
  9487. }
  9488. }
  9489. }
  9490. },
  9491. "x-codeSamples": [
  9492. {
  9493. "lang": "js",
  9494. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9495. }
  9496. ]
  9497. }
  9498. },
  9499. "/tui/show-toast": {
  9500. "post": {
  9501. "tags": ["tui"],
  9502. "operationId": "tui.showToast",
  9503. "parameters": [
  9504. {
  9505. "name": "directory",
  9506. "in": "query",
  9507. "schema": {
  9508. "type": "string"
  9509. },
  9510. "required": false
  9511. },
  9512. {
  9513. "name": "workspace",
  9514. "in": "query",
  9515. "schema": {
  9516. "type": "string"
  9517. },
  9518. "required": false
  9519. }
  9520. ],
  9521. "responses": {
  9522. "200": {
  9523. "description": "Toast notification shown successfully",
  9524. "content": {
  9525. "application/json": {
  9526. "schema": {
  9527. "type": "boolean",
  9528. "description": "Toast notification shown successfully"
  9529. }
  9530. }
  9531. }
  9532. },
  9533. "400": {
  9534. "description": "Bad request",
  9535. "content": {
  9536. "application/json": {
  9537. "schema": {
  9538. "$ref": "#/components/schemas/BadRequestError"
  9539. }
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "description": "Show a toast notification in the TUI.",
  9545. "summary": "Show TUI toast",
  9546. "requestBody": {
  9547. "content": {
  9548. "application/json": {
  9549. "schema": {
  9550. "type": "object",
  9551. "properties": {
  9552. "title": {
  9553. "type": "string"
  9554. },
  9555. "message": {
  9556. "type": "string"
  9557. },
  9558. "variant": {
  9559. "type": "string",
  9560. "enum": ["info", "success", "warning", "error"]
  9561. },
  9562. "duration": {
  9563. "type": "integer",
  9564. "exclusiveMinimum": 0
  9565. }
  9566. },
  9567. "required": ["message", "variant"],
  9568. "additionalProperties": false
  9569. }
  9570. }
  9571. }
  9572. },
  9573. "x-codeSamples": [
  9574. {
  9575. "lang": "js",
  9576. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9577. }
  9578. ]
  9579. }
  9580. },
  9581. "/tui/publish": {
  9582. "post": {
  9583. "tags": ["tui"],
  9584. "operationId": "tui.publish",
  9585. "parameters": [
  9586. {
  9587. "name": "directory",
  9588. "in": "query",
  9589. "schema": {
  9590. "type": "string"
  9591. },
  9592. "required": false
  9593. },
  9594. {
  9595. "name": "workspace",
  9596. "in": "query",
  9597. "schema": {
  9598. "type": "string"
  9599. },
  9600. "required": false
  9601. }
  9602. ],
  9603. "responses": {
  9604. "200": {
  9605. "description": "Event published successfully",
  9606. "content": {
  9607. "application/json": {
  9608. "schema": {
  9609. "type": "boolean",
  9610. "description": "Event published successfully"
  9611. }
  9612. }
  9613. }
  9614. },
  9615. "400": {
  9616. "description": "BadRequest | InvalidRequestError",
  9617. "content": {
  9618. "application/json": {
  9619. "schema": {
  9620. "anyOf": [
  9621. {
  9622. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9623. },
  9624. {
  9625. "$ref": "#/components/schemas/InvalidRequestError"
  9626. }
  9627. ]
  9628. }
  9629. }
  9630. }
  9631. }
  9632. },
  9633. "description": "Publish a TUI event.",
  9634. "summary": "Publish TUI event",
  9635. "requestBody": {
  9636. "content": {
  9637. "application/json": {
  9638. "schema": {
  9639. "anyOf": [
  9640. {
  9641. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9642. },
  9643. {
  9644. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9645. },
  9646. {
  9647. "$ref": "#/components/schemas/EventTuiToastShow"
  9648. },
  9649. {
  9650. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9651. }
  9652. ]
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "x-codeSamples": [
  9658. {
  9659. "lang": "js",
  9660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9661. }
  9662. ]
  9663. }
  9664. },
  9665. "/tui/select-session": {
  9666. "post": {
  9667. "tags": ["tui"],
  9668. "operationId": "tui.selectSession",
  9669. "parameters": [
  9670. {
  9671. "name": "directory",
  9672. "in": "query",
  9673. "schema": {
  9674. "type": "string"
  9675. },
  9676. "required": false
  9677. },
  9678. {
  9679. "name": "workspace",
  9680. "in": "query",
  9681. "schema": {
  9682. "type": "string"
  9683. },
  9684. "required": false
  9685. }
  9686. ],
  9687. "responses": {
  9688. "200": {
  9689. "description": "Session selected successfully",
  9690. "content": {
  9691. "application/json": {
  9692. "schema": {
  9693. "type": "boolean",
  9694. "description": "Session selected successfully"
  9695. }
  9696. }
  9697. }
  9698. },
  9699. "400": {
  9700. "description": "BadRequest | InvalidRequestError",
  9701. "content": {
  9702. "application/json": {
  9703. "schema": {
  9704. "anyOf": [
  9705. {
  9706. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9707. },
  9708. {
  9709. "$ref": "#/components/schemas/InvalidRequestError"
  9710. }
  9711. ]
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "404": {
  9717. "description": "NotFoundError",
  9718. "content": {
  9719. "application/json": {
  9720. "schema": {
  9721. "$ref": "#/components/schemas/NotFoundError"
  9722. }
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "description": "Navigate the TUI to display the specified session.",
  9728. "summary": "Select session",
  9729. "requestBody": {
  9730. "content": {
  9731. "application/json": {
  9732. "schema": {
  9733. "type": "object",
  9734. "properties": {
  9735. "sessionID": {
  9736. "type": "string",
  9737. "pattern": "^ses",
  9738. "description": "Session ID to navigate to"
  9739. }
  9740. },
  9741. "required": ["sessionID"],
  9742. "additionalProperties": false
  9743. }
  9744. }
  9745. }
  9746. },
  9747. "x-codeSamples": [
  9748. {
  9749. "lang": "js",
  9750. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9751. }
  9752. ]
  9753. }
  9754. },
  9755. "/tui/control/next": {
  9756. "get": {
  9757. "tags": ["tui"],
  9758. "operationId": "tui.control.next",
  9759. "parameters": [
  9760. {
  9761. "name": "directory",
  9762. "in": "query",
  9763. "schema": {
  9764. "type": "string"
  9765. },
  9766. "required": false
  9767. },
  9768. {
  9769. "name": "workspace",
  9770. "in": "query",
  9771. "schema": {
  9772. "type": "string"
  9773. },
  9774. "required": false
  9775. }
  9776. ],
  9777. "responses": {
  9778. "200": {
  9779. "description": "Next TUI request",
  9780. "content": {
  9781. "application/json": {
  9782. "schema": {
  9783. "type": "object",
  9784. "properties": {
  9785. "path": {
  9786. "type": "string"
  9787. },
  9788. "body": {}
  9789. },
  9790. "required": ["path", "body"],
  9791. "additionalProperties": false,
  9792. "description": "Next TUI request"
  9793. }
  9794. }
  9795. }
  9796. },
  9797. "400": {
  9798. "description": "Bad request",
  9799. "content": {
  9800. "application/json": {
  9801. "schema": {
  9802. "$ref": "#/components/schemas/BadRequestError"
  9803. }
  9804. }
  9805. }
  9806. }
  9807. },
  9808. "description": "Retrieve the next TUI request from the queue for processing.",
  9809. "summary": "Get next TUI request",
  9810. "x-codeSamples": [
  9811. {
  9812. "lang": "js",
  9813. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9814. }
  9815. ]
  9816. }
  9817. },
  9818. "/tui/control/response": {
  9819. "post": {
  9820. "tags": ["tui"],
  9821. "operationId": "tui.control.response",
  9822. "parameters": [
  9823. {
  9824. "name": "directory",
  9825. "in": "query",
  9826. "schema": {
  9827. "type": "string"
  9828. },
  9829. "required": false
  9830. },
  9831. {
  9832. "name": "workspace",
  9833. "in": "query",
  9834. "schema": {
  9835. "type": "string"
  9836. },
  9837. "required": false
  9838. }
  9839. ],
  9840. "responses": {
  9841. "200": {
  9842. "description": "Response submitted successfully",
  9843. "content": {
  9844. "application/json": {
  9845. "schema": {
  9846. "type": "boolean",
  9847. "description": "Response submitted successfully"
  9848. }
  9849. }
  9850. }
  9851. },
  9852. "400": {
  9853. "description": "Bad request",
  9854. "content": {
  9855. "application/json": {
  9856. "schema": {
  9857. "$ref": "#/components/schemas/BadRequestError"
  9858. }
  9859. }
  9860. }
  9861. }
  9862. },
  9863. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9864. "summary": "Submit TUI response",
  9865. "requestBody": {
  9866. "content": {
  9867. "application/json": {
  9868. "schema": {}
  9869. }
  9870. }
  9871. },
  9872. "x-codeSamples": [
  9873. {
  9874. "lang": "js",
  9875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9876. }
  9877. ]
  9878. }
  9879. },
  9880. "/experimental/workspace/adapter": {
  9881. "get": {
  9882. "tags": ["workspace"],
  9883. "operationId": "experimental.workspace.adapter.list",
  9884. "parameters": [
  9885. {
  9886. "name": "directory",
  9887. "in": "query",
  9888. "schema": {
  9889. "type": "string"
  9890. },
  9891. "required": false
  9892. },
  9893. {
  9894. "name": "workspace",
  9895. "in": "query",
  9896. "schema": {
  9897. "type": "string"
  9898. },
  9899. "required": false
  9900. }
  9901. ],
  9902. "responses": {
  9903. "200": {
  9904. "description": "Workspace adapters",
  9905. "content": {
  9906. "application/json": {
  9907. "schema": {
  9908. "type": "array",
  9909. "items": {
  9910. "type": "object",
  9911. "properties": {
  9912. "type": {
  9913. "type": "string"
  9914. },
  9915. "name": {
  9916. "type": "string"
  9917. },
  9918. "description": {
  9919. "type": "string"
  9920. }
  9921. },
  9922. "required": ["type", "name", "description"],
  9923. "additionalProperties": false
  9924. },
  9925. "description": "Workspace adapters"
  9926. }
  9927. }
  9928. }
  9929. },
  9930. "400": {
  9931. "description": "Bad request",
  9932. "content": {
  9933. "application/json": {
  9934. "schema": {
  9935. "$ref": "#/components/schemas/BadRequestError"
  9936. }
  9937. }
  9938. }
  9939. }
  9940. },
  9941. "description": "List all available workspace adapters for the current project.",
  9942. "summary": "List workspace adapters",
  9943. "x-codeSamples": [
  9944. {
  9945. "lang": "js",
  9946. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9947. }
  9948. ]
  9949. }
  9950. },
  9951. "/experimental/workspace": {
  9952. "get": {
  9953. "tags": ["workspace"],
  9954. "operationId": "experimental.workspace.list",
  9955. "parameters": [
  9956. {
  9957. "name": "directory",
  9958. "in": "query",
  9959. "schema": {
  9960. "type": "string"
  9961. },
  9962. "required": false
  9963. },
  9964. {
  9965. "name": "workspace",
  9966. "in": "query",
  9967. "schema": {
  9968. "type": "string"
  9969. },
  9970. "required": false
  9971. }
  9972. ],
  9973. "responses": {
  9974. "200": {
  9975. "description": "Workspaces",
  9976. "content": {
  9977. "application/json": {
  9978. "schema": {
  9979. "type": "array",
  9980. "items": {
  9981. "$ref": "#/components/schemas/Workspace"
  9982. },
  9983. "description": "Workspaces"
  9984. }
  9985. }
  9986. }
  9987. },
  9988. "400": {
  9989. "description": "Bad request",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "$ref": "#/components/schemas/BadRequestError"
  9994. }
  9995. }
  9996. }
  9997. }
  9998. },
  9999. "description": "List all workspaces.",
  10000. "summary": "List workspaces",
  10001. "x-codeSamples": [
  10002. {
  10003. "lang": "js",
  10004. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10005. }
  10006. ]
  10007. },
  10008. "post": {
  10009. "tags": ["workspace"],
  10010. "operationId": "experimental.workspace.create",
  10011. "parameters": [
  10012. {
  10013. "name": "directory",
  10014. "in": "query",
  10015. "schema": {
  10016. "type": "string"
  10017. },
  10018. "required": false
  10019. },
  10020. {
  10021. "name": "workspace",
  10022. "in": "query",
  10023. "schema": {
  10024. "type": "string"
  10025. },
  10026. "required": false
  10027. }
  10028. ],
  10029. "responses": {
  10030. "200": {
  10031. "description": "Workspace created",
  10032. "content": {
  10033. "application/json": {
  10034. "schema": {
  10035. "$ref": "#/components/schemas/Workspace"
  10036. }
  10037. }
  10038. }
  10039. },
  10040. "400": {
  10041. "description": "BadRequest | InvalidRequestError",
  10042. "content": {
  10043. "application/json": {
  10044. "schema": {
  10045. "anyOf": [
  10046. {
  10047. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10048. },
  10049. {
  10050. "$ref": "#/components/schemas/InvalidRequestError"
  10051. }
  10052. ]
  10053. }
  10054. }
  10055. }
  10056. }
  10057. },
  10058. "description": "Create a workspace for the current project.",
  10059. "summary": "Create workspace",
  10060. "requestBody": {
  10061. "content": {
  10062. "application/json": {
  10063. "schema": {
  10064. "type": "object",
  10065. "properties": {
  10066. "id": {
  10067. "type": "string",
  10068. "pattern": "^wrk"
  10069. },
  10070. "type": {
  10071. "type": "string"
  10072. },
  10073. "branch": {
  10074. "anyOf": [
  10075. {
  10076. "type": "string"
  10077. },
  10078. {
  10079. "type": "null"
  10080. }
  10081. ]
  10082. },
  10083. "extra": {
  10084. "anyOf": [
  10085. {},
  10086. {
  10087. "type": "null"
  10088. }
  10089. ]
  10090. }
  10091. },
  10092. "required": ["type"],
  10093. "additionalProperties": false
  10094. }
  10095. }
  10096. }
  10097. },
  10098. "x-codeSamples": [
  10099. {
  10100. "lang": "js",
  10101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10102. }
  10103. ]
  10104. }
  10105. },
  10106. "/experimental/workspace/sync-list": {
  10107. "post": {
  10108. "tags": ["workspace"],
  10109. "operationId": "experimental.workspace.syncList",
  10110. "parameters": [
  10111. {
  10112. "name": "directory",
  10113. "in": "query",
  10114. "schema": {
  10115. "type": "string"
  10116. },
  10117. "required": false
  10118. },
  10119. {
  10120. "name": "workspace",
  10121. "in": "query",
  10122. "schema": {
  10123. "type": "string"
  10124. },
  10125. "required": false
  10126. }
  10127. ],
  10128. "responses": {
  10129. "204": {
  10130. "description": "Workspace list synced"
  10131. },
  10132. "400": {
  10133. "description": "Bad request",
  10134. "content": {
  10135. "application/json": {
  10136. "schema": {
  10137. "$ref": "#/components/schemas/BadRequestError"
  10138. }
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "description": "Register missing workspaces returned by workspace adapters.",
  10144. "summary": "Sync workspace list",
  10145. "x-codeSamples": [
  10146. {
  10147. "lang": "js",
  10148. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10149. }
  10150. ]
  10151. }
  10152. },
  10153. "/experimental/workspace/status": {
  10154. "get": {
  10155. "tags": ["workspace"],
  10156. "operationId": "experimental.workspace.status",
  10157. "parameters": [
  10158. {
  10159. "name": "directory",
  10160. "in": "query",
  10161. "schema": {
  10162. "type": "string"
  10163. },
  10164. "required": false
  10165. },
  10166. {
  10167. "name": "workspace",
  10168. "in": "query",
  10169. "schema": {
  10170. "type": "string"
  10171. },
  10172. "required": false
  10173. }
  10174. ],
  10175. "responses": {
  10176. "200": {
  10177. "description": "Workspace status",
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "type": "array",
  10182. "items": {
  10183. "type": "object",
  10184. "properties": {
  10185. "workspaceID": {
  10186. "type": "string",
  10187. "pattern": "^wrk"
  10188. },
  10189. "status": {
  10190. "type": "string",
  10191. "enum": ["connected", "connecting", "disconnected", "error"]
  10192. }
  10193. },
  10194. "required": ["workspaceID", "status"],
  10195. "additionalProperties": false
  10196. },
  10197. "description": "Workspace status"
  10198. }
  10199. }
  10200. }
  10201. },
  10202. "400": {
  10203. "description": "Bad request",
  10204. "content": {
  10205. "application/json": {
  10206. "schema": {
  10207. "$ref": "#/components/schemas/BadRequestError"
  10208. }
  10209. }
  10210. }
  10211. }
  10212. },
  10213. "description": "Get connection status for workspaces in the current project.",
  10214. "summary": "Workspace status",
  10215. "x-codeSamples": [
  10216. {
  10217. "lang": "js",
  10218. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10219. }
  10220. ]
  10221. }
  10222. },
  10223. "/experimental/workspace/{id}": {
  10224. "delete": {
  10225. "tags": ["workspace"],
  10226. "operationId": "experimental.workspace.remove",
  10227. "parameters": [
  10228. {
  10229. "name": "id",
  10230. "in": "path",
  10231. "schema": {
  10232. "type": "string",
  10233. "pattern": "^wrk"
  10234. },
  10235. "required": true
  10236. },
  10237. {
  10238. "name": "directory",
  10239. "in": "query",
  10240. "schema": {
  10241. "type": "string"
  10242. },
  10243. "required": false
  10244. },
  10245. {
  10246. "name": "workspace",
  10247. "in": "query",
  10248. "schema": {
  10249. "type": "string"
  10250. },
  10251. "required": false
  10252. }
  10253. ],
  10254. "responses": {
  10255. "200": {
  10256. "description": "Workspace removed",
  10257. "content": {
  10258. "application/json": {
  10259. "schema": {
  10260. "$ref": "#/components/schemas/Workspace"
  10261. }
  10262. }
  10263. }
  10264. },
  10265. "400": {
  10266. "description": "BadRequest | InvalidRequestError",
  10267. "content": {
  10268. "application/json": {
  10269. "schema": {
  10270. "anyOf": [
  10271. {
  10272. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10273. },
  10274. {
  10275. "$ref": "#/components/schemas/InvalidRequestError"
  10276. }
  10277. ]
  10278. }
  10279. }
  10280. }
  10281. }
  10282. },
  10283. "description": "Remove an existing workspace.",
  10284. "summary": "Remove workspace",
  10285. "x-codeSamples": [
  10286. {
  10287. "lang": "js",
  10288. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10289. }
  10290. ]
  10291. }
  10292. },
  10293. "/experimental/workspace/warp": {
  10294. "post": {
  10295. "tags": ["workspace"],
  10296. "operationId": "experimental.workspace.warp",
  10297. "parameters": [
  10298. {
  10299. "name": "directory",
  10300. "in": "query",
  10301. "schema": {
  10302. "type": "string"
  10303. },
  10304. "required": false
  10305. },
  10306. {
  10307. "name": "workspace",
  10308. "in": "query",
  10309. "schema": {
  10310. "type": "string"
  10311. },
  10312. "required": false
  10313. }
  10314. ],
  10315. "responses": {
  10316. "204": {
  10317. "description": "Session warped"
  10318. },
  10319. "400": {
  10320. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10321. "content": {
  10322. "application/json": {
  10323. "schema": {
  10324. "anyOf": [
  10325. {
  10326. "$ref": "#/components/schemas/WorkspaceWarpError"
  10327. },
  10328. {
  10329. "$ref": "#/components/schemas/VcsApplyError"
  10330. },
  10331. {
  10332. "$ref": "#/components/schemas/InvalidRequestError"
  10333. }
  10334. ]
  10335. }
  10336. }
  10337. }
  10338. },
  10339. "404": {
  10340. "description": "NotFoundError",
  10341. "content": {
  10342. "application/json": {
  10343. "schema": {
  10344. "$ref": "#/components/schemas/NotFoundError"
  10345. }
  10346. }
  10347. }
  10348. }
  10349. },
  10350. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10351. "summary": "Warp session into workspace",
  10352. "requestBody": {
  10353. "content": {
  10354. "application/json": {
  10355. "schema": {
  10356. "type": "object",
  10357. "properties": {
  10358. "id": {
  10359. "anyOf": [
  10360. {
  10361. "type": "string",
  10362. "pattern": "^wrk"
  10363. },
  10364. {
  10365. "type": "null"
  10366. }
  10367. ]
  10368. },
  10369. "sessionID": {
  10370. "type": "string",
  10371. "pattern": "^ses"
  10372. },
  10373. "copyChanges": {
  10374. "type": "boolean"
  10375. }
  10376. },
  10377. "required": ["id", "sessionID"],
  10378. "additionalProperties": false
  10379. }
  10380. }
  10381. }
  10382. },
  10383. "x-codeSamples": [
  10384. {
  10385. "lang": "js",
  10386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10387. }
  10388. ]
  10389. }
  10390. },
  10391. "/pty/{ptyID}/connect": {
  10392. "get": {
  10393. "tags": ["pty"],
  10394. "operationId": "pty.connect",
  10395. "parameters": [
  10396. {
  10397. "name": "ptyID",
  10398. "in": "path",
  10399. "schema": {
  10400. "type": "string",
  10401. "pattern": "^pty"
  10402. },
  10403. "required": true
  10404. },
  10405. {
  10406. "in": "query",
  10407. "name": "directory",
  10408. "schema": {
  10409. "type": "string"
  10410. }
  10411. },
  10412. {
  10413. "in": "query",
  10414. "name": "workspace",
  10415. "schema": {
  10416. "type": "string"
  10417. }
  10418. },
  10419. {
  10420. "in": "query",
  10421. "name": "cursor",
  10422. "schema": {
  10423. "type": "string"
  10424. }
  10425. },
  10426. {
  10427. "in": "query",
  10428. "name": "ticket",
  10429. "schema": {
  10430. "type": "string"
  10431. }
  10432. }
  10433. ],
  10434. "responses": {
  10435. "200": {
  10436. "description": "Connected session",
  10437. "content": {
  10438. "application/json": {
  10439. "schema": {
  10440. "type": "boolean",
  10441. "description": "Connected session"
  10442. }
  10443. }
  10444. }
  10445. },
  10446. "403": {
  10447. "description": "Forbidden",
  10448. "content": {
  10449. "application/json": {
  10450. "schema": {
  10451. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10452. }
  10453. }
  10454. }
  10455. },
  10456. "404": {
  10457. "description": "Not found",
  10458. "content": {
  10459. "application/json": {
  10460. "schema": {
  10461. "$ref": "#/components/schemas/NotFoundError"
  10462. }
  10463. }
  10464. }
  10465. }
  10466. },
  10467. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10468. "summary": "Connect to PTY session",
  10469. "x-codeSamples": [
  10470. {
  10471. "lang": "js",
  10472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10473. }
  10474. ]
  10475. }
  10476. }
  10477. },
  10478. "components": {
  10479. "schemas": {
  10480. "Event": {
  10481. "anyOf": [
  10482. {
  10483. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10484. },
  10485. {
  10486. "$ref": "#/components/schemas/Event.tui.command.execute"
  10487. },
  10488. {
  10489. "$ref": "#/components/schemas/EventTuiToastShow1"
  10490. },
  10491. {
  10492. "$ref": "#/components/schemas/Event.tui.session.select"
  10493. },
  10494. {
  10495. "$ref": "#/components/schemas/EventServerConnected"
  10496. },
  10497. {
  10498. "$ref": "#/components/schemas/EventGlobalDisposed"
  10499. },
  10500. {
  10501. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10502. },
  10503. {
  10504. "$ref": "#/components/schemas/EventFileEdited"
  10505. },
  10506. {
  10507. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10508. },
  10509. {
  10510. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10511. },
  10512. {
  10513. "$ref": "#/components/schemas/EventLspUpdated"
  10514. },
  10515. {
  10516. "$ref": "#/components/schemas/EventMessagePartDelta"
  10517. },
  10518. {
  10519. "$ref": "#/components/schemas/EventPermissionAsked"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/EventPermissionReplied"
  10523. },
  10524. {
  10525. "$ref": "#/components/schemas/EventSessionDiff"
  10526. },
  10527. {
  10528. "$ref": "#/components/schemas/EventSessionError"
  10529. },
  10530. {
  10531. "$ref": "#/components/schemas/EventQuestionAsked"
  10532. },
  10533. {
  10534. "$ref": "#/components/schemas/EventQuestionReplied"
  10535. },
  10536. {
  10537. "$ref": "#/components/schemas/EventQuestionRejected"
  10538. },
  10539. {
  10540. "$ref": "#/components/schemas/EventTodoUpdated"
  10541. },
  10542. {
  10543. "$ref": "#/components/schemas/EventSessionStatus"
  10544. },
  10545. {
  10546. "$ref": "#/components/schemas/EventSessionIdle"
  10547. },
  10548. {
  10549. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10550. },
  10551. {
  10552. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10553. },
  10554. {
  10555. "$ref": "#/components/schemas/EventCommandExecuted"
  10556. },
  10557. {
  10558. "$ref": "#/components/schemas/EventProjectUpdated"
  10559. },
  10560. {
  10561. "$ref": "#/components/schemas/EventSessionCompacted"
  10562. },
  10563. {
  10564. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/EventWorkspaceReady"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10571. },
  10572. {
  10573. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10574. },
  10575. {
  10576. "$ref": "#/components/schemas/EventWorktreeReady"
  10577. },
  10578. {
  10579. "$ref": "#/components/schemas/EventWorktreeFailed"
  10580. },
  10581. {
  10582. "$ref": "#/components/schemas/EventPtyCreated"
  10583. },
  10584. {
  10585. "$ref": "#/components/schemas/EventPtyUpdated"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/EventPtyExited"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/EventPtyDeleted"
  10592. },
  10593. {
  10594. "$ref": "#/components/schemas/EventInstallationUpdated"
  10595. },
  10596. {
  10597. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10598. },
  10599. {
  10600. "$ref": "#/components/schemas/EventMessageUpdated"
  10601. },
  10602. {
  10603. "$ref": "#/components/schemas/EventMessageRemoved"
  10604. },
  10605. {
  10606. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10607. },
  10608. {
  10609. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/EventSessionCreated"
  10613. },
  10614. {
  10615. "$ref": "#/components/schemas/EventSessionUpdated"
  10616. },
  10617. {
  10618. "$ref": "#/components/schemas/EventSessionDeleted"
  10619. },
  10620. {
  10621. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10622. },
  10623. {
  10624. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10625. },
  10626. {
  10627. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10628. },
  10629. {
  10630. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10631. },
  10632. {
  10633. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10634. },
  10635. {
  10636. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10637. },
  10638. {
  10639. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10640. },
  10641. {
  10642. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10643. },
  10644. {
  10645. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10646. },
  10647. {
  10648. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10649. },
  10650. {
  10651. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10652. },
  10653. {
  10654. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10655. },
  10656. {
  10657. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10658. },
  10659. {
  10660. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10661. },
  10662. {
  10663. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10664. },
  10665. {
  10666. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10667. },
  10668. {
  10669. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10676. },
  10677. {
  10678. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10682. },
  10683. {
  10684. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10685. },
  10686. {
  10687. "$ref": "#/components/schemas/EventSessionNextRetried"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10691. },
  10692. {
  10693. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10694. },
  10695. {
  10696. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10697. },
  10698. {
  10699. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10700. },
  10701. {
  10702. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10703. },
  10704. {
  10705. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10706. },
  10707. {
  10708. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10709. },
  10710. {
  10711. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10712. },
  10713. {
  10714. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10715. },
  10716. {
  10717. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10718. },
  10719. {
  10720. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10721. },
  10722. {
  10723. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10724. },
  10725. {
  10726. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10727. },
  10728. {
  10729. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10730. },
  10731. {
  10732. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10733. },
  10734. {
  10735. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10736. },
  10737. {
  10738. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10739. },
  10740. {
  10741. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10742. },
  10743. {
  10744. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10745. },
  10746. {
  10747. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10754. },
  10755. {
  10756. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10760. },
  10761. {
  10762. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10763. },
  10764. {
  10765. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10766. },
  10767. {
  10768. "$ref": "#/components/schemas/EventSessionNextRetried"
  10769. },
  10770. {
  10771. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10772. },
  10773. {
  10774. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10775. },
  10776. {
  10777. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10778. },
  10779. {
  10780. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10781. },
  10782. {
  10783. "$ref": "#/components/schemas/EventAccountAdded"
  10784. },
  10785. {
  10786. "$ref": "#/components/schemas/EventAccountRemoved"
  10787. },
  10788. {
  10789. "$ref": "#/components/schemas/EventAccountSwitched"
  10790. }
  10791. ]
  10792. },
  10793. "OAuth": {
  10794. "type": "object",
  10795. "properties": {
  10796. "type": {
  10797. "type": "string",
  10798. "enum": ["oauth"]
  10799. },
  10800. "refresh": {
  10801. "type": "string"
  10802. },
  10803. "access": {
  10804. "type": "string"
  10805. },
  10806. "expires": {
  10807. "type": "integer",
  10808. "minimum": 0
  10809. },
  10810. "accountId": {
  10811. "type": "string"
  10812. },
  10813. "enterpriseUrl": {
  10814. "type": "string"
  10815. }
  10816. },
  10817. "required": ["type", "refresh", "access", "expires"],
  10818. "additionalProperties": false
  10819. },
  10820. "ApiAuth": {
  10821. "type": "object",
  10822. "properties": {
  10823. "type": {
  10824. "type": "string",
  10825. "enum": ["api"]
  10826. },
  10827. "key": {
  10828. "type": "string"
  10829. },
  10830. "metadata": {
  10831. "type": "object",
  10832. "additionalProperties": {
  10833. "type": "string"
  10834. }
  10835. }
  10836. },
  10837. "required": ["type", "key"],
  10838. "additionalProperties": false
  10839. },
  10840. "WellKnownAuth": {
  10841. "type": "object",
  10842. "properties": {
  10843. "type": {
  10844. "type": "string",
  10845. "enum": ["wellknown"]
  10846. },
  10847. "key": {
  10848. "type": "string"
  10849. },
  10850. "token": {
  10851. "type": "string"
  10852. }
  10853. },
  10854. "required": ["type", "key", "token"],
  10855. "additionalProperties": false
  10856. },
  10857. "Auth": {
  10858. "anyOf": [
  10859. {
  10860. "$ref": "#/components/schemas/OAuth"
  10861. },
  10862. {
  10863. "$ref": "#/components/schemas/ApiAuth"
  10864. },
  10865. {
  10866. "$ref": "#/components/schemas/WellKnownAuth"
  10867. }
  10868. ]
  10869. },
  10870. "effect_HttpApiError_BadRequest": {
  10871. "type": "object",
  10872. "properties": {
  10873. "_tag": {
  10874. "type": "string",
  10875. "enum": ["BadRequest"]
  10876. }
  10877. },
  10878. "required": ["_tag"],
  10879. "additionalProperties": false
  10880. },
  10881. "InvalidRequestError": {
  10882. "type": "object",
  10883. "properties": {
  10884. "_tag": {
  10885. "type": "string",
  10886. "enum": ["InvalidRequestError"]
  10887. },
  10888. "message": {
  10889. "type": "string"
  10890. },
  10891. "kind": {
  10892. "type": "string"
  10893. },
  10894. "field": {
  10895. "type": "string"
  10896. }
  10897. },
  10898. "required": ["_tag", "message"],
  10899. "additionalProperties": false
  10900. },
  10901. "Event.tui.prompt.append": {
  10902. "type": "object",
  10903. "properties": {
  10904. "id": {
  10905. "type": "string"
  10906. },
  10907. "type": {
  10908. "type": "string",
  10909. "enum": ["tui.prompt.append"]
  10910. },
  10911. "properties": {
  10912. "type": "object",
  10913. "properties": {
  10914. "text": {
  10915. "type": "string"
  10916. }
  10917. },
  10918. "required": ["text"],
  10919. "additionalProperties": false
  10920. }
  10921. },
  10922. "required": ["id", "type", "properties"],
  10923. "additionalProperties": false
  10924. },
  10925. "Event.tui.command.execute": {
  10926. "type": "object",
  10927. "properties": {
  10928. "id": {
  10929. "type": "string"
  10930. },
  10931. "type": {
  10932. "type": "string",
  10933. "enum": ["tui.command.execute"]
  10934. },
  10935. "properties": {
  10936. "type": "object",
  10937. "properties": {
  10938. "command": {
  10939. "anyOf": [
  10940. {
  10941. "type": "string",
  10942. "enum": [
  10943. "session.list",
  10944. "session.new",
  10945. "session.share",
  10946. "session.interrupt",
  10947. "session.compact",
  10948. "session.page.up",
  10949. "session.page.down",
  10950. "session.line.up",
  10951. "session.line.down",
  10952. "session.half.page.up",
  10953. "session.half.page.down",
  10954. "session.first",
  10955. "session.last",
  10956. "prompt.clear",
  10957. "prompt.submit",
  10958. "agent.cycle"
  10959. ]
  10960. },
  10961. {
  10962. "type": "string"
  10963. }
  10964. ]
  10965. }
  10966. },
  10967. "required": ["command"],
  10968. "additionalProperties": false
  10969. }
  10970. },
  10971. "required": ["id", "type", "properties"],
  10972. "additionalProperties": false
  10973. },
  10974. "Event.tui.toast.show": {
  10975. "type": "object",
  10976. "properties": {
  10977. "id": {
  10978. "type": "string"
  10979. },
  10980. "type": {
  10981. "type": "string",
  10982. "enum": ["tui.toast.show"]
  10983. },
  10984. "properties": {
  10985. "type": "object",
  10986. "properties": {
  10987. "title": {
  10988. "type": "string"
  10989. },
  10990. "message": {
  10991. "type": "string"
  10992. },
  10993. "variant": {
  10994. "type": "string",
  10995. "enum": ["info", "success", "warning", "error"]
  10996. },
  10997. "duration": {
  10998. "type": "integer",
  10999. "exclusiveMinimum": 0
  11000. }
  11001. },
  11002. "required": ["message", "variant"],
  11003. "additionalProperties": false
  11004. }
  11005. },
  11006. "required": ["id", "type", "properties"],
  11007. "additionalProperties": false
  11008. },
  11009. "Event.tui.session.select": {
  11010. "type": "object",
  11011. "properties": {
  11012. "id": {
  11013. "type": "string"
  11014. },
  11015. "type": {
  11016. "type": "string",
  11017. "enum": ["tui.session.select"]
  11018. },
  11019. "properties": {
  11020. "type": "object",
  11021. "properties": {
  11022. "sessionID": {
  11023. "type": "string",
  11024. "pattern": "^ses",
  11025. "description": "Session ID to navigate to"
  11026. }
  11027. },
  11028. "required": ["sessionID"],
  11029. "additionalProperties": false
  11030. }
  11031. },
  11032. "required": ["id", "type", "properties"],
  11033. "additionalProperties": false
  11034. },
  11035. "PermissionRequest": {
  11036. "type": "object",
  11037. "properties": {
  11038. "id": {
  11039. "type": "string",
  11040. "pattern": "^per"
  11041. },
  11042. "sessionID": {
  11043. "type": "string",
  11044. "pattern": "^ses"
  11045. },
  11046. "permission": {
  11047. "type": "string"
  11048. },
  11049. "patterns": {
  11050. "type": "array",
  11051. "items": {
  11052. "type": "string"
  11053. }
  11054. },
  11055. "metadata": {
  11056. "type": "object"
  11057. },
  11058. "always": {
  11059. "type": "array",
  11060. "items": {
  11061. "type": "string"
  11062. }
  11063. },
  11064. "tool": {
  11065. "type": "object",
  11066. "properties": {
  11067. "messageID": {
  11068. "type": "string",
  11069. "pattern": "^msg"
  11070. },
  11071. "callID": {
  11072. "type": "string"
  11073. }
  11074. },
  11075. "required": ["messageID", "callID"],
  11076. "additionalProperties": false
  11077. }
  11078. },
  11079. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  11080. "additionalProperties": false
  11081. },
  11082. "SnapshotFileDiff": {
  11083. "type": "object",
  11084. "properties": {
  11085. "file": {
  11086. "type": "string"
  11087. },
  11088. "patch": {
  11089. "type": "string"
  11090. },
  11091. "additions": {
  11092. "type": "number"
  11093. },
  11094. "deletions": {
  11095. "type": "number"
  11096. },
  11097. "status": {
  11098. "type": "string",
  11099. "enum": ["added", "deleted", "modified"]
  11100. }
  11101. },
  11102. "required": ["additions", "deletions"],
  11103. "additionalProperties": false
  11104. },
  11105. "ProviderAuthError": {
  11106. "type": "object",
  11107. "properties": {
  11108. "name": {
  11109. "type": "string",
  11110. "enum": ["ProviderAuthError"]
  11111. },
  11112. "data": {
  11113. "type": "object",
  11114. "properties": {
  11115. "providerID": {
  11116. "type": "string"
  11117. },
  11118. "message": {
  11119. "type": "string"
  11120. }
  11121. },
  11122. "required": ["providerID", "message"],
  11123. "additionalProperties": false
  11124. }
  11125. },
  11126. "required": ["name", "data"],
  11127. "additionalProperties": false
  11128. },
  11129. "UnknownError": {
  11130. "type": "object",
  11131. "properties": {
  11132. "name": {
  11133. "type": "string",
  11134. "enum": ["UnknownError"]
  11135. },
  11136. "data": {
  11137. "type": "object",
  11138. "properties": {
  11139. "message": {
  11140. "type": "string"
  11141. },
  11142. "ref": {
  11143. "type": "string"
  11144. }
  11145. },
  11146. "required": ["message"],
  11147. "additionalProperties": false
  11148. }
  11149. },
  11150. "required": ["name", "data"],
  11151. "additionalProperties": false
  11152. },
  11153. "MessageOutputLengthError": {
  11154. "type": "object",
  11155. "properties": {
  11156. "name": {
  11157. "type": "string",
  11158. "enum": ["MessageOutputLengthError"]
  11159. },
  11160. "data": {
  11161. "type": "object",
  11162. "properties": {}
  11163. }
  11164. },
  11165. "required": ["name", "data"],
  11166. "additionalProperties": false
  11167. },
  11168. "MessageAbortedError": {
  11169. "type": "object",
  11170. "properties": {
  11171. "name": {
  11172. "type": "string",
  11173. "enum": ["MessageAbortedError"]
  11174. },
  11175. "data": {
  11176. "type": "object",
  11177. "properties": {
  11178. "message": {
  11179. "type": "string"
  11180. }
  11181. },
  11182. "required": ["message"],
  11183. "additionalProperties": false
  11184. }
  11185. },
  11186. "required": ["name", "data"],
  11187. "additionalProperties": false
  11188. },
  11189. "StructuredOutputError": {
  11190. "type": "object",
  11191. "properties": {
  11192. "name": {
  11193. "type": "string",
  11194. "enum": ["StructuredOutputError"]
  11195. },
  11196. "data": {
  11197. "type": "object",
  11198. "properties": {
  11199. "message": {
  11200. "type": "string"
  11201. },
  11202. "retries": {
  11203. "type": "integer",
  11204. "minimum": 0
  11205. }
  11206. },
  11207. "required": ["message", "retries"],
  11208. "additionalProperties": false
  11209. }
  11210. },
  11211. "required": ["name", "data"],
  11212. "additionalProperties": false
  11213. },
  11214. "ContextOverflowError": {
  11215. "type": "object",
  11216. "properties": {
  11217. "name": {
  11218. "type": "string",
  11219. "enum": ["ContextOverflowError"]
  11220. },
  11221. "data": {
  11222. "type": "object",
  11223. "properties": {
  11224. "message": {
  11225. "type": "string"
  11226. },
  11227. "responseBody": {
  11228. "type": "string"
  11229. }
  11230. },
  11231. "required": ["message"],
  11232. "additionalProperties": false
  11233. }
  11234. },
  11235. "required": ["name", "data"],
  11236. "additionalProperties": false
  11237. },
  11238. "APIError": {
  11239. "type": "object",
  11240. "properties": {
  11241. "name": {
  11242. "type": "string",
  11243. "enum": ["APIError"]
  11244. },
  11245. "data": {
  11246. "type": "object",
  11247. "properties": {
  11248. "message": {
  11249. "type": "string"
  11250. },
  11251. "statusCode": {
  11252. "type": "integer",
  11253. "minimum": 0
  11254. },
  11255. "isRetryable": {
  11256. "type": "boolean"
  11257. },
  11258. "responseHeaders": {
  11259. "type": "object",
  11260. "additionalProperties": {
  11261. "type": "string"
  11262. }
  11263. },
  11264. "responseBody": {
  11265. "type": "string"
  11266. },
  11267. "metadata": {
  11268. "type": "object",
  11269. "additionalProperties": {
  11270. "type": "string"
  11271. }
  11272. }
  11273. },
  11274. "required": ["message", "isRetryable"],
  11275. "additionalProperties": false
  11276. }
  11277. },
  11278. "required": ["name", "data"],
  11279. "additionalProperties": false
  11280. },
  11281. "QuestionOption": {
  11282. "type": "object",
  11283. "properties": {
  11284. "label": {
  11285. "type": "string",
  11286. "description": "Display text (1-5 words, concise)"
  11287. },
  11288. "description": {
  11289. "type": "string",
  11290. "description": "Explanation of choice"
  11291. }
  11292. },
  11293. "required": ["label", "description"],
  11294. "additionalProperties": false
  11295. },
  11296. "QuestionInfo": {
  11297. "type": "object",
  11298. "properties": {
  11299. "question": {
  11300. "type": "string",
  11301. "description": "Complete question"
  11302. },
  11303. "header": {
  11304. "type": "string",
  11305. "description": "Very short label (max 30 chars)"
  11306. },
  11307. "options": {
  11308. "type": "array",
  11309. "items": {
  11310. "$ref": "#/components/schemas/QuestionOption"
  11311. },
  11312. "description": "Available choices"
  11313. },
  11314. "multiple": {
  11315. "type": "boolean"
  11316. },
  11317. "custom": {
  11318. "type": "boolean"
  11319. }
  11320. },
  11321. "required": ["question", "header", "options"],
  11322. "additionalProperties": false
  11323. },
  11324. "QuestionTool": {
  11325. "type": "object",
  11326. "properties": {
  11327. "messageID": {
  11328. "type": "string",
  11329. "pattern": "^msg"
  11330. },
  11331. "callID": {
  11332. "type": "string"
  11333. }
  11334. },
  11335. "required": ["messageID", "callID"],
  11336. "additionalProperties": false
  11337. },
  11338. "QuestionRequest": {
  11339. "type": "object",
  11340. "properties": {
  11341. "id": {
  11342. "type": "string",
  11343. "pattern": "^que"
  11344. },
  11345. "sessionID": {
  11346. "type": "string",
  11347. "pattern": "^ses"
  11348. },
  11349. "questions": {
  11350. "type": "array",
  11351. "items": {
  11352. "$ref": "#/components/schemas/QuestionInfo"
  11353. },
  11354. "description": "Questions to ask"
  11355. },
  11356. "tool": {
  11357. "$ref": "#/components/schemas/QuestionTool"
  11358. }
  11359. },
  11360. "required": ["id", "sessionID", "questions"],
  11361. "additionalProperties": false
  11362. },
  11363. "QuestionAnswer": {
  11364. "type": "array",
  11365. "items": {
  11366. "type": "string"
  11367. }
  11368. },
  11369. "QuestionReplied": {
  11370. "type": "object",
  11371. "properties": {
  11372. "sessionID": {
  11373. "type": "string",
  11374. "pattern": "^ses"
  11375. },
  11376. "requestID": {
  11377. "type": "string",
  11378. "pattern": "^que"
  11379. },
  11380. "answers": {
  11381. "type": "array",
  11382. "items": {
  11383. "$ref": "#/components/schemas/QuestionAnswer"
  11384. }
  11385. }
  11386. },
  11387. "required": ["sessionID", "requestID", "answers"],
  11388. "additionalProperties": false
  11389. },
  11390. "QuestionRejected": {
  11391. "type": "object",
  11392. "properties": {
  11393. "sessionID": {
  11394. "type": "string",
  11395. "pattern": "^ses"
  11396. },
  11397. "requestID": {
  11398. "type": "string",
  11399. "pattern": "^que"
  11400. }
  11401. },
  11402. "required": ["sessionID", "requestID"],
  11403. "additionalProperties": false
  11404. },
  11405. "Todo": {
  11406. "type": "object",
  11407. "properties": {
  11408. "content": {
  11409. "type": "string",
  11410. "description": "Brief description of the task"
  11411. },
  11412. "status": {
  11413. "type": "string",
  11414. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11415. },
  11416. "priority": {
  11417. "type": "string",
  11418. "description": "Priority level of the task: high, medium, low"
  11419. }
  11420. },
  11421. "required": ["content", "status", "priority"],
  11422. "additionalProperties": false
  11423. },
  11424. "SessionStatus": {
  11425. "anyOf": [
  11426. {
  11427. "type": "object",
  11428. "properties": {
  11429. "type": {
  11430. "type": "string",
  11431. "enum": ["idle"]
  11432. }
  11433. },
  11434. "required": ["type"],
  11435. "additionalProperties": false
  11436. },
  11437. {
  11438. "type": "object",
  11439. "properties": {
  11440. "type": {
  11441. "type": "string",
  11442. "enum": ["retry"]
  11443. },
  11444. "attempt": {
  11445. "type": "integer",
  11446. "minimum": 0
  11447. },
  11448. "message": {
  11449. "type": "string"
  11450. },
  11451. "action": {
  11452. "type": "object",
  11453. "properties": {
  11454. "reason": {
  11455. "type": "string"
  11456. },
  11457. "provider": {
  11458. "type": "string"
  11459. },
  11460. "title": {
  11461. "type": "string"
  11462. },
  11463. "message": {
  11464. "type": "string"
  11465. },
  11466. "label": {
  11467. "type": "string"
  11468. },
  11469. "link": {
  11470. "type": "string"
  11471. }
  11472. },
  11473. "required": ["reason", "provider", "title", "message", "label"],
  11474. "additionalProperties": false
  11475. },
  11476. "next": {
  11477. "type": "integer",
  11478. "minimum": 0
  11479. }
  11480. },
  11481. "required": ["type", "attempt", "message", "next"],
  11482. "additionalProperties": false
  11483. },
  11484. {
  11485. "type": "object",
  11486. "properties": {
  11487. "type": {
  11488. "type": "string",
  11489. "enum": ["busy"]
  11490. }
  11491. },
  11492. "required": ["type"],
  11493. "additionalProperties": false
  11494. }
  11495. ]
  11496. },
  11497. "Project": {
  11498. "type": "object",
  11499. "properties": {
  11500. "id": {
  11501. "type": "string"
  11502. },
  11503. "worktree": {
  11504. "type": "string"
  11505. },
  11506. "vcs": {
  11507. "type": "string",
  11508. "enum": ["git"]
  11509. },
  11510. "name": {
  11511. "type": "string"
  11512. },
  11513. "icon": {
  11514. "type": "object",
  11515. "properties": {
  11516. "url": {
  11517. "type": "string"
  11518. },
  11519. "override": {
  11520. "type": "string"
  11521. },
  11522. "color": {
  11523. "type": "string"
  11524. }
  11525. },
  11526. "additionalProperties": false
  11527. },
  11528. "commands": {
  11529. "type": "object",
  11530. "properties": {
  11531. "start": {
  11532. "type": "string",
  11533. "description": "Startup script to run when creating a new workspace (worktree)"
  11534. }
  11535. },
  11536. "additionalProperties": false
  11537. },
  11538. "time": {
  11539. "type": "object",
  11540. "properties": {
  11541. "created": {
  11542. "type": "integer",
  11543. "minimum": 0
  11544. },
  11545. "updated": {
  11546. "type": "integer",
  11547. "minimum": 0
  11548. },
  11549. "initialized": {
  11550. "type": "integer",
  11551. "minimum": 0
  11552. }
  11553. },
  11554. "required": ["created", "updated"],
  11555. "additionalProperties": false
  11556. },
  11557. "sandboxes": {
  11558. "type": "array",
  11559. "items": {
  11560. "type": "string"
  11561. }
  11562. }
  11563. },
  11564. "required": ["id", "worktree", "time", "sandboxes"],
  11565. "additionalProperties": false
  11566. },
  11567. "Pty": {
  11568. "type": "object",
  11569. "properties": {
  11570. "id": {
  11571. "type": "string",
  11572. "pattern": "^pty"
  11573. },
  11574. "title": {
  11575. "type": "string"
  11576. },
  11577. "command": {
  11578. "type": "string"
  11579. },
  11580. "args": {
  11581. "type": "array",
  11582. "items": {
  11583. "type": "string"
  11584. }
  11585. },
  11586. "cwd": {
  11587. "type": "string"
  11588. },
  11589. "status": {
  11590. "type": "string",
  11591. "enum": ["running", "exited"]
  11592. },
  11593. "pid": {
  11594. "type": "integer",
  11595. "minimum": 0
  11596. }
  11597. },
  11598. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11599. "additionalProperties": false
  11600. },
  11601. "OutputFormatText": {
  11602. "type": "object",
  11603. "properties": {
  11604. "type": {
  11605. "type": "string",
  11606. "enum": ["text"]
  11607. }
  11608. },
  11609. "required": ["type"],
  11610. "additionalProperties": false
  11611. },
  11612. "JSONSchema": {
  11613. "type": "object"
  11614. },
  11615. "OutputFormatJsonSchema": {
  11616. "type": "object",
  11617. "properties": {
  11618. "type": {
  11619. "type": "string",
  11620. "enum": ["json_schema"]
  11621. },
  11622. "schema": {
  11623. "$ref": "#/components/schemas/JSONSchema"
  11624. },
  11625. "retryCount": {
  11626. "type": "integer",
  11627. "minimum": 0
  11628. }
  11629. },
  11630. "required": ["type", "schema"],
  11631. "additionalProperties": false
  11632. },
  11633. "OutputFormat": {
  11634. "anyOf": [
  11635. {
  11636. "$ref": "#/components/schemas/OutputFormatText"
  11637. },
  11638. {
  11639. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11640. }
  11641. ]
  11642. },
  11643. "UserMessage": {
  11644. "type": "object",
  11645. "properties": {
  11646. "id": {
  11647. "type": "string",
  11648. "pattern": "^msg"
  11649. },
  11650. "sessionID": {
  11651. "type": "string",
  11652. "pattern": "^ses"
  11653. },
  11654. "role": {
  11655. "type": "string",
  11656. "enum": ["user"]
  11657. },
  11658. "time": {
  11659. "type": "object",
  11660. "properties": {
  11661. "created": {
  11662. "type": "integer",
  11663. "minimum": 0
  11664. }
  11665. },
  11666. "required": ["created"],
  11667. "additionalProperties": false
  11668. },
  11669. "format": {
  11670. "$ref": "#/components/schemas/OutputFormat"
  11671. },
  11672. "summary": {
  11673. "type": "object",
  11674. "properties": {
  11675. "title": {
  11676. "type": "string"
  11677. },
  11678. "body": {
  11679. "type": "string"
  11680. },
  11681. "diffs": {
  11682. "type": "array",
  11683. "items": {
  11684. "$ref": "#/components/schemas/SnapshotFileDiff"
  11685. }
  11686. }
  11687. },
  11688. "required": ["diffs"],
  11689. "additionalProperties": false
  11690. },
  11691. "agent": {
  11692. "type": "string"
  11693. },
  11694. "model": {
  11695. "type": "object",
  11696. "properties": {
  11697. "providerID": {
  11698. "type": "string"
  11699. },
  11700. "modelID": {
  11701. "type": "string"
  11702. },
  11703. "variant": {
  11704. "type": "string"
  11705. }
  11706. },
  11707. "required": ["providerID", "modelID"],
  11708. "additionalProperties": false
  11709. },
  11710. "system": {
  11711. "type": "string"
  11712. },
  11713. "tools": {
  11714. "type": "object",
  11715. "additionalProperties": {
  11716. "type": "boolean"
  11717. }
  11718. }
  11719. },
  11720. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11721. "additionalProperties": false
  11722. },
  11723. "AssistantMessage": {
  11724. "type": "object",
  11725. "properties": {
  11726. "id": {
  11727. "type": "string",
  11728. "pattern": "^msg"
  11729. },
  11730. "sessionID": {
  11731. "type": "string",
  11732. "pattern": "^ses"
  11733. },
  11734. "role": {
  11735. "type": "string",
  11736. "enum": ["assistant"]
  11737. },
  11738. "time": {
  11739. "type": "object",
  11740. "properties": {
  11741. "created": {
  11742. "type": "integer",
  11743. "minimum": 0
  11744. },
  11745. "completed": {
  11746. "type": "integer",
  11747. "minimum": 0
  11748. }
  11749. },
  11750. "required": ["created"],
  11751. "additionalProperties": false
  11752. },
  11753. "error": {
  11754. "anyOf": [
  11755. {
  11756. "$ref": "#/components/schemas/ProviderAuthError"
  11757. },
  11758. {
  11759. "$ref": "#/components/schemas/UnknownError"
  11760. },
  11761. {
  11762. "$ref": "#/components/schemas/MessageOutputLengthError"
  11763. },
  11764. {
  11765. "$ref": "#/components/schemas/MessageAbortedError"
  11766. },
  11767. {
  11768. "$ref": "#/components/schemas/StructuredOutputError"
  11769. },
  11770. {
  11771. "$ref": "#/components/schemas/ContextOverflowError"
  11772. },
  11773. {
  11774. "$ref": "#/components/schemas/APIError"
  11775. }
  11776. ]
  11777. },
  11778. "parentID": {
  11779. "type": "string",
  11780. "pattern": "^msg"
  11781. },
  11782. "modelID": {
  11783. "type": "string"
  11784. },
  11785. "providerID": {
  11786. "type": "string"
  11787. },
  11788. "mode": {
  11789. "type": "string"
  11790. },
  11791. "agent": {
  11792. "type": "string"
  11793. },
  11794. "path": {
  11795. "type": "object",
  11796. "properties": {
  11797. "cwd": {
  11798. "type": "string"
  11799. },
  11800. "root": {
  11801. "type": "string"
  11802. }
  11803. },
  11804. "required": ["cwd", "root"],
  11805. "additionalProperties": false
  11806. },
  11807. "summary": {
  11808. "type": "boolean"
  11809. },
  11810. "cost": {
  11811. "type": "number"
  11812. },
  11813. "tokens": {
  11814. "type": "object",
  11815. "properties": {
  11816. "total": {
  11817. "type": "number"
  11818. },
  11819. "input": {
  11820. "type": "number"
  11821. },
  11822. "output": {
  11823. "type": "number"
  11824. },
  11825. "reasoning": {
  11826. "type": "number"
  11827. },
  11828. "cache": {
  11829. "type": "object",
  11830. "properties": {
  11831. "read": {
  11832. "type": "number"
  11833. },
  11834. "write": {
  11835. "type": "number"
  11836. }
  11837. },
  11838. "required": ["read", "write"],
  11839. "additionalProperties": false
  11840. }
  11841. },
  11842. "required": ["input", "output", "reasoning", "cache"],
  11843. "additionalProperties": false
  11844. },
  11845. "structured": {},
  11846. "variant": {
  11847. "type": "string"
  11848. },
  11849. "finish": {
  11850. "type": "string"
  11851. }
  11852. },
  11853. "required": [
  11854. "id",
  11855. "sessionID",
  11856. "role",
  11857. "time",
  11858. "parentID",
  11859. "modelID",
  11860. "providerID",
  11861. "mode",
  11862. "agent",
  11863. "path",
  11864. "cost",
  11865. "tokens"
  11866. ],
  11867. "additionalProperties": false
  11868. },
  11869. "Message": {
  11870. "anyOf": [
  11871. {
  11872. "$ref": "#/components/schemas/UserMessage"
  11873. },
  11874. {
  11875. "$ref": "#/components/schemas/AssistantMessage"
  11876. }
  11877. ]
  11878. },
  11879. "TextPart": {
  11880. "type": "object",
  11881. "properties": {
  11882. "id": {
  11883. "type": "string",
  11884. "pattern": "^prt"
  11885. },
  11886. "sessionID": {
  11887. "type": "string",
  11888. "pattern": "^ses"
  11889. },
  11890. "messageID": {
  11891. "type": "string",
  11892. "pattern": "^msg"
  11893. },
  11894. "type": {
  11895. "type": "string",
  11896. "enum": ["text"]
  11897. },
  11898. "text": {
  11899. "type": "string"
  11900. },
  11901. "synthetic": {
  11902. "type": "boolean"
  11903. },
  11904. "ignored": {
  11905. "type": "boolean"
  11906. },
  11907. "time": {
  11908. "type": "object",
  11909. "properties": {
  11910. "start": {
  11911. "type": "integer",
  11912. "minimum": 0
  11913. },
  11914. "end": {
  11915. "type": "integer",
  11916. "minimum": 0
  11917. }
  11918. },
  11919. "required": ["start"],
  11920. "additionalProperties": false
  11921. },
  11922. "metadata": {
  11923. "type": "object"
  11924. }
  11925. },
  11926. "required": ["id", "sessionID", "messageID", "type", "text"],
  11927. "additionalProperties": false
  11928. },
  11929. "SubtaskPart": {
  11930. "type": "object",
  11931. "properties": {
  11932. "id": {
  11933. "type": "string",
  11934. "pattern": "^prt"
  11935. },
  11936. "sessionID": {
  11937. "type": "string",
  11938. "pattern": "^ses"
  11939. },
  11940. "messageID": {
  11941. "type": "string",
  11942. "pattern": "^msg"
  11943. },
  11944. "type": {
  11945. "type": "string",
  11946. "enum": ["subtask"]
  11947. },
  11948. "prompt": {
  11949. "type": "string"
  11950. },
  11951. "description": {
  11952. "type": "string"
  11953. },
  11954. "agent": {
  11955. "type": "string"
  11956. },
  11957. "model": {
  11958. "type": "object",
  11959. "properties": {
  11960. "providerID": {
  11961. "type": "string"
  11962. },
  11963. "modelID": {
  11964. "type": "string"
  11965. }
  11966. },
  11967. "required": ["providerID", "modelID"],
  11968. "additionalProperties": false
  11969. },
  11970. "command": {
  11971. "type": "string"
  11972. }
  11973. },
  11974. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11975. "additionalProperties": false
  11976. },
  11977. "ReasoningPart": {
  11978. "type": "object",
  11979. "properties": {
  11980. "id": {
  11981. "type": "string",
  11982. "pattern": "^prt"
  11983. },
  11984. "sessionID": {
  11985. "type": "string",
  11986. "pattern": "^ses"
  11987. },
  11988. "messageID": {
  11989. "type": "string",
  11990. "pattern": "^msg"
  11991. },
  11992. "type": {
  11993. "type": "string",
  11994. "enum": ["reasoning"]
  11995. },
  11996. "text": {
  11997. "type": "string"
  11998. },
  11999. "metadata": {
  12000. "type": "object"
  12001. },
  12002. "time": {
  12003. "type": "object",
  12004. "properties": {
  12005. "start": {
  12006. "type": "integer",
  12007. "minimum": 0
  12008. },
  12009. "end": {
  12010. "type": "integer",
  12011. "minimum": 0
  12012. }
  12013. },
  12014. "required": ["start"],
  12015. "additionalProperties": false
  12016. }
  12017. },
  12018. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  12019. "additionalProperties": false
  12020. },
  12021. "FilePartSourceText": {
  12022. "type": "object",
  12023. "properties": {
  12024. "value": {
  12025. "type": "string"
  12026. },
  12027. "start": {
  12028. "type": "number"
  12029. },
  12030. "end": {
  12031. "type": "number"
  12032. }
  12033. },
  12034. "required": ["value", "start", "end"],
  12035. "additionalProperties": false
  12036. },
  12037. "FileSource": {
  12038. "type": "object",
  12039. "properties": {
  12040. "text": {
  12041. "$ref": "#/components/schemas/FilePartSourceText"
  12042. },
  12043. "type": {
  12044. "type": "string",
  12045. "enum": ["file"]
  12046. },
  12047. "path": {
  12048. "type": "string"
  12049. }
  12050. },
  12051. "required": ["text", "type", "path"],
  12052. "additionalProperties": false
  12053. },
  12054. "Range": {
  12055. "type": "object",
  12056. "properties": {
  12057. "start": {
  12058. "type": "object",
  12059. "properties": {
  12060. "line": {
  12061. "type": "integer",
  12062. "minimum": 0
  12063. },
  12064. "character": {
  12065. "type": "integer",
  12066. "minimum": 0
  12067. }
  12068. },
  12069. "required": ["line", "character"],
  12070. "additionalProperties": false
  12071. },
  12072. "end": {
  12073. "type": "object",
  12074. "properties": {
  12075. "line": {
  12076. "type": "integer",
  12077. "minimum": 0
  12078. },
  12079. "character": {
  12080. "type": "integer",
  12081. "minimum": 0
  12082. }
  12083. },
  12084. "required": ["line", "character"],
  12085. "additionalProperties": false
  12086. }
  12087. },
  12088. "required": ["start", "end"],
  12089. "additionalProperties": false
  12090. },
  12091. "SymbolSource": {
  12092. "type": "object",
  12093. "properties": {
  12094. "text": {
  12095. "$ref": "#/components/schemas/FilePartSourceText"
  12096. },
  12097. "type": {
  12098. "type": "string",
  12099. "enum": ["symbol"]
  12100. },
  12101. "path": {
  12102. "type": "string"
  12103. },
  12104. "range": {
  12105. "$ref": "#/components/schemas/Range"
  12106. },
  12107. "name": {
  12108. "type": "string"
  12109. },
  12110. "kind": {
  12111. "type": "integer",
  12112. "minimum": 0
  12113. }
  12114. },
  12115. "required": ["text", "type", "path", "range", "name", "kind"],
  12116. "additionalProperties": false
  12117. },
  12118. "ResourceSource": {
  12119. "type": "object",
  12120. "properties": {
  12121. "text": {
  12122. "$ref": "#/components/schemas/FilePartSourceText"
  12123. },
  12124. "type": {
  12125. "type": "string",
  12126. "enum": ["resource"]
  12127. },
  12128. "clientName": {
  12129. "type": "string"
  12130. },
  12131. "uri": {
  12132. "type": "string"
  12133. }
  12134. },
  12135. "required": ["text", "type", "clientName", "uri"],
  12136. "additionalProperties": false
  12137. },
  12138. "FilePartSource": {
  12139. "anyOf": [
  12140. {
  12141. "$ref": "#/components/schemas/FileSource"
  12142. },
  12143. {
  12144. "$ref": "#/components/schemas/SymbolSource"
  12145. },
  12146. {
  12147. "$ref": "#/components/schemas/ResourceSource"
  12148. }
  12149. ]
  12150. },
  12151. "FilePart": {
  12152. "type": "object",
  12153. "properties": {
  12154. "id": {
  12155. "type": "string",
  12156. "pattern": "^prt"
  12157. },
  12158. "sessionID": {
  12159. "type": "string",
  12160. "pattern": "^ses"
  12161. },
  12162. "messageID": {
  12163. "type": "string",
  12164. "pattern": "^msg"
  12165. },
  12166. "type": {
  12167. "type": "string",
  12168. "enum": ["file"]
  12169. },
  12170. "mime": {
  12171. "type": "string"
  12172. },
  12173. "filename": {
  12174. "type": "string"
  12175. },
  12176. "url": {
  12177. "type": "string"
  12178. },
  12179. "source": {
  12180. "$ref": "#/components/schemas/FilePartSource"
  12181. }
  12182. },
  12183. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12184. "additionalProperties": false
  12185. },
  12186. "ToolStatePending": {
  12187. "type": "object",
  12188. "properties": {
  12189. "status": {
  12190. "type": "string",
  12191. "enum": ["pending"]
  12192. },
  12193. "input": {
  12194. "type": "object"
  12195. },
  12196. "raw": {
  12197. "type": "string"
  12198. }
  12199. },
  12200. "required": ["status", "input", "raw"],
  12201. "additionalProperties": false
  12202. },
  12203. "ToolStateRunning": {
  12204. "type": "object",
  12205. "properties": {
  12206. "status": {
  12207. "type": "string",
  12208. "enum": ["running"]
  12209. },
  12210. "input": {
  12211. "type": "object"
  12212. },
  12213. "title": {
  12214. "type": "string"
  12215. },
  12216. "metadata": {
  12217. "type": "object"
  12218. },
  12219. "time": {
  12220. "type": "object",
  12221. "properties": {
  12222. "start": {
  12223. "type": "integer",
  12224. "minimum": 0
  12225. }
  12226. },
  12227. "required": ["start"],
  12228. "additionalProperties": false
  12229. }
  12230. },
  12231. "required": ["status", "input", "time"],
  12232. "additionalProperties": false
  12233. },
  12234. "ToolStateCompleted": {
  12235. "type": "object",
  12236. "properties": {
  12237. "status": {
  12238. "type": "string",
  12239. "enum": ["completed"]
  12240. },
  12241. "input": {
  12242. "type": "object"
  12243. },
  12244. "output": {
  12245. "type": "string"
  12246. },
  12247. "title": {
  12248. "type": "string"
  12249. },
  12250. "metadata": {
  12251. "type": "object"
  12252. },
  12253. "time": {
  12254. "type": "object",
  12255. "properties": {
  12256. "start": {
  12257. "type": "integer",
  12258. "minimum": 0
  12259. },
  12260. "end": {
  12261. "type": "integer",
  12262. "minimum": 0
  12263. },
  12264. "compacted": {
  12265. "type": "integer",
  12266. "minimum": 0
  12267. }
  12268. },
  12269. "required": ["start", "end"],
  12270. "additionalProperties": false
  12271. },
  12272. "attachments": {
  12273. "type": "array",
  12274. "items": {
  12275. "$ref": "#/components/schemas/FilePart"
  12276. }
  12277. }
  12278. },
  12279. "required": ["status", "input", "output", "title", "metadata", "time"],
  12280. "additionalProperties": false
  12281. },
  12282. "ToolStateError": {
  12283. "type": "object",
  12284. "properties": {
  12285. "status": {
  12286. "type": "string",
  12287. "enum": ["error"]
  12288. },
  12289. "input": {
  12290. "type": "object"
  12291. },
  12292. "error": {
  12293. "type": "string"
  12294. },
  12295. "metadata": {
  12296. "type": "object"
  12297. },
  12298. "time": {
  12299. "type": "object",
  12300. "properties": {
  12301. "start": {
  12302. "type": "integer",
  12303. "minimum": 0
  12304. },
  12305. "end": {
  12306. "type": "integer",
  12307. "minimum": 0
  12308. }
  12309. },
  12310. "required": ["start", "end"],
  12311. "additionalProperties": false
  12312. }
  12313. },
  12314. "required": ["status", "input", "error", "time"],
  12315. "additionalProperties": false
  12316. },
  12317. "ToolState": {
  12318. "anyOf": [
  12319. {
  12320. "$ref": "#/components/schemas/ToolStatePending"
  12321. },
  12322. {
  12323. "$ref": "#/components/schemas/ToolStateRunning"
  12324. },
  12325. {
  12326. "$ref": "#/components/schemas/ToolStateCompleted"
  12327. },
  12328. {
  12329. "$ref": "#/components/schemas/ToolStateError"
  12330. }
  12331. ]
  12332. },
  12333. "ToolPart": {
  12334. "type": "object",
  12335. "properties": {
  12336. "id": {
  12337. "type": "string",
  12338. "pattern": "^prt"
  12339. },
  12340. "sessionID": {
  12341. "type": "string",
  12342. "pattern": "^ses"
  12343. },
  12344. "messageID": {
  12345. "type": "string",
  12346. "pattern": "^msg"
  12347. },
  12348. "type": {
  12349. "type": "string",
  12350. "enum": ["tool"]
  12351. },
  12352. "callID": {
  12353. "type": "string"
  12354. },
  12355. "tool": {
  12356. "type": "string"
  12357. },
  12358. "state": {
  12359. "$ref": "#/components/schemas/ToolState"
  12360. },
  12361. "metadata": {
  12362. "type": "object"
  12363. }
  12364. },
  12365. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12366. "additionalProperties": false
  12367. },
  12368. "StepStartPart": {
  12369. "type": "object",
  12370. "properties": {
  12371. "id": {
  12372. "type": "string",
  12373. "pattern": "^prt"
  12374. },
  12375. "sessionID": {
  12376. "type": "string",
  12377. "pattern": "^ses"
  12378. },
  12379. "messageID": {
  12380. "type": "string",
  12381. "pattern": "^msg"
  12382. },
  12383. "type": {
  12384. "type": "string",
  12385. "enum": ["step-start"]
  12386. },
  12387. "snapshot": {
  12388. "type": "string"
  12389. }
  12390. },
  12391. "required": ["id", "sessionID", "messageID", "type"],
  12392. "additionalProperties": false
  12393. },
  12394. "StepFinishPart": {
  12395. "type": "object",
  12396. "properties": {
  12397. "id": {
  12398. "type": "string",
  12399. "pattern": "^prt"
  12400. },
  12401. "sessionID": {
  12402. "type": "string",
  12403. "pattern": "^ses"
  12404. },
  12405. "messageID": {
  12406. "type": "string",
  12407. "pattern": "^msg"
  12408. },
  12409. "type": {
  12410. "type": "string",
  12411. "enum": ["step-finish"]
  12412. },
  12413. "reason": {
  12414. "type": "string"
  12415. },
  12416. "snapshot": {
  12417. "type": "string"
  12418. },
  12419. "cost": {
  12420. "type": "number"
  12421. },
  12422. "tokens": {
  12423. "type": "object",
  12424. "properties": {
  12425. "total": {
  12426. "type": "number"
  12427. },
  12428. "input": {
  12429. "type": "number"
  12430. },
  12431. "output": {
  12432. "type": "number"
  12433. },
  12434. "reasoning": {
  12435. "type": "number"
  12436. },
  12437. "cache": {
  12438. "type": "object",
  12439. "properties": {
  12440. "read": {
  12441. "type": "number"
  12442. },
  12443. "write": {
  12444. "type": "number"
  12445. }
  12446. },
  12447. "required": ["read", "write"],
  12448. "additionalProperties": false
  12449. }
  12450. },
  12451. "required": ["input", "output", "reasoning", "cache"],
  12452. "additionalProperties": false
  12453. }
  12454. },
  12455. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12456. "additionalProperties": false
  12457. },
  12458. "SnapshotPart": {
  12459. "type": "object",
  12460. "properties": {
  12461. "id": {
  12462. "type": "string",
  12463. "pattern": "^prt"
  12464. },
  12465. "sessionID": {
  12466. "type": "string",
  12467. "pattern": "^ses"
  12468. },
  12469. "messageID": {
  12470. "type": "string",
  12471. "pattern": "^msg"
  12472. },
  12473. "type": {
  12474. "type": "string",
  12475. "enum": ["snapshot"]
  12476. },
  12477. "snapshot": {
  12478. "type": "string"
  12479. }
  12480. },
  12481. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12482. "additionalProperties": false
  12483. },
  12484. "PatchPart": {
  12485. "type": "object",
  12486. "properties": {
  12487. "id": {
  12488. "type": "string",
  12489. "pattern": "^prt"
  12490. },
  12491. "sessionID": {
  12492. "type": "string",
  12493. "pattern": "^ses"
  12494. },
  12495. "messageID": {
  12496. "type": "string",
  12497. "pattern": "^msg"
  12498. },
  12499. "type": {
  12500. "type": "string",
  12501. "enum": ["patch"]
  12502. },
  12503. "hash": {
  12504. "type": "string"
  12505. },
  12506. "files": {
  12507. "type": "array",
  12508. "items": {
  12509. "type": "string"
  12510. }
  12511. }
  12512. },
  12513. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12514. "additionalProperties": false
  12515. },
  12516. "AgentPart": {
  12517. "type": "object",
  12518. "properties": {
  12519. "id": {
  12520. "type": "string",
  12521. "pattern": "^prt"
  12522. },
  12523. "sessionID": {
  12524. "type": "string",
  12525. "pattern": "^ses"
  12526. },
  12527. "messageID": {
  12528. "type": "string",
  12529. "pattern": "^msg"
  12530. },
  12531. "type": {
  12532. "type": "string",
  12533. "enum": ["agent"]
  12534. },
  12535. "name": {
  12536. "type": "string"
  12537. },
  12538. "source": {
  12539. "type": "object",
  12540. "properties": {
  12541. "value": {
  12542. "type": "string"
  12543. },
  12544. "start": {
  12545. "type": "integer",
  12546. "minimum": 0
  12547. },
  12548. "end": {
  12549. "type": "integer",
  12550. "minimum": 0
  12551. }
  12552. },
  12553. "required": ["value", "start", "end"],
  12554. "additionalProperties": false
  12555. }
  12556. },
  12557. "required": ["id", "sessionID", "messageID", "type", "name"],
  12558. "additionalProperties": false
  12559. },
  12560. "RetryPart": {
  12561. "type": "object",
  12562. "properties": {
  12563. "id": {
  12564. "type": "string",
  12565. "pattern": "^prt"
  12566. },
  12567. "sessionID": {
  12568. "type": "string",
  12569. "pattern": "^ses"
  12570. },
  12571. "messageID": {
  12572. "type": "string",
  12573. "pattern": "^msg"
  12574. },
  12575. "type": {
  12576. "type": "string",
  12577. "enum": ["retry"]
  12578. },
  12579. "attempt": {
  12580. "type": "integer",
  12581. "minimum": 0
  12582. },
  12583. "error": {
  12584. "$ref": "#/components/schemas/APIError"
  12585. },
  12586. "time": {
  12587. "type": "object",
  12588. "properties": {
  12589. "created": {
  12590. "type": "integer",
  12591. "minimum": 0
  12592. }
  12593. },
  12594. "required": ["created"],
  12595. "additionalProperties": false
  12596. }
  12597. },
  12598. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12599. "additionalProperties": false
  12600. },
  12601. "CompactionPart": {
  12602. "type": "object",
  12603. "properties": {
  12604. "id": {
  12605. "type": "string",
  12606. "pattern": "^prt"
  12607. },
  12608. "sessionID": {
  12609. "type": "string",
  12610. "pattern": "^ses"
  12611. },
  12612. "messageID": {
  12613. "type": "string",
  12614. "pattern": "^msg"
  12615. },
  12616. "type": {
  12617. "type": "string",
  12618. "enum": ["compaction"]
  12619. },
  12620. "auto": {
  12621. "type": "boolean"
  12622. },
  12623. "overflow": {
  12624. "type": "boolean"
  12625. },
  12626. "tail_start_id": {
  12627. "type": "string",
  12628. "pattern": "^msg"
  12629. }
  12630. },
  12631. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12632. "additionalProperties": false
  12633. },
  12634. "Part": {
  12635. "anyOf": [
  12636. {
  12637. "$ref": "#/components/schemas/TextPart"
  12638. },
  12639. {
  12640. "$ref": "#/components/schemas/SubtaskPart"
  12641. },
  12642. {
  12643. "$ref": "#/components/schemas/ReasoningPart"
  12644. },
  12645. {
  12646. "$ref": "#/components/schemas/FilePart"
  12647. },
  12648. {
  12649. "$ref": "#/components/schemas/ToolPart"
  12650. },
  12651. {
  12652. "$ref": "#/components/schemas/StepStartPart"
  12653. },
  12654. {
  12655. "$ref": "#/components/schemas/StepFinishPart"
  12656. },
  12657. {
  12658. "$ref": "#/components/schemas/SnapshotPart"
  12659. },
  12660. {
  12661. "$ref": "#/components/schemas/PatchPart"
  12662. },
  12663. {
  12664. "$ref": "#/components/schemas/AgentPart"
  12665. },
  12666. {
  12667. "$ref": "#/components/schemas/RetryPart"
  12668. },
  12669. {
  12670. "$ref": "#/components/schemas/CompactionPart"
  12671. }
  12672. ]
  12673. },
  12674. "PermissionAction": {
  12675. "type": "string",
  12676. "enum": ["allow", "deny", "ask"]
  12677. },
  12678. "PermissionRule": {
  12679. "type": "object",
  12680. "properties": {
  12681. "permission": {
  12682. "type": "string"
  12683. },
  12684. "pattern": {
  12685. "type": "string"
  12686. },
  12687. "action": {
  12688. "$ref": "#/components/schemas/PermissionAction"
  12689. }
  12690. },
  12691. "required": ["permission", "pattern", "action"],
  12692. "additionalProperties": false
  12693. },
  12694. "PermissionRuleset": {
  12695. "type": "array",
  12696. "items": {
  12697. "$ref": "#/components/schemas/PermissionRule"
  12698. }
  12699. },
  12700. "Session": {
  12701. "type": "object",
  12702. "properties": {
  12703. "id": {
  12704. "type": "string",
  12705. "pattern": "^ses"
  12706. },
  12707. "slug": {
  12708. "type": "string"
  12709. },
  12710. "projectID": {
  12711. "type": "string"
  12712. },
  12713. "workspaceID": {
  12714. "type": "string",
  12715. "pattern": "^wrk"
  12716. },
  12717. "directory": {
  12718. "type": "string"
  12719. },
  12720. "path": {
  12721. "type": "string"
  12722. },
  12723. "parentID": {
  12724. "type": "string",
  12725. "pattern": "^ses"
  12726. },
  12727. "summary": {
  12728. "type": "object",
  12729. "properties": {
  12730. "additions": {
  12731. "type": "number"
  12732. },
  12733. "deletions": {
  12734. "type": "number"
  12735. },
  12736. "files": {
  12737. "type": "number"
  12738. },
  12739. "diffs": {
  12740. "type": "array",
  12741. "items": {
  12742. "$ref": "#/components/schemas/SnapshotFileDiff"
  12743. }
  12744. }
  12745. },
  12746. "required": ["additions", "deletions", "files"],
  12747. "additionalProperties": false
  12748. },
  12749. "cost": {
  12750. "type": "number"
  12751. },
  12752. "tokens": {
  12753. "type": "object",
  12754. "properties": {
  12755. "input": {
  12756. "type": "number"
  12757. },
  12758. "output": {
  12759. "type": "number"
  12760. },
  12761. "reasoning": {
  12762. "type": "number"
  12763. },
  12764. "cache": {
  12765. "type": "object",
  12766. "properties": {
  12767. "read": {
  12768. "type": "number"
  12769. },
  12770. "write": {
  12771. "type": "number"
  12772. }
  12773. },
  12774. "required": ["read", "write"],
  12775. "additionalProperties": false
  12776. }
  12777. },
  12778. "required": ["input", "output", "reasoning", "cache"],
  12779. "additionalProperties": false
  12780. },
  12781. "share": {
  12782. "type": "object",
  12783. "properties": {
  12784. "url": {
  12785. "type": "string"
  12786. }
  12787. },
  12788. "required": ["url"],
  12789. "additionalProperties": false
  12790. },
  12791. "title": {
  12792. "type": "string"
  12793. },
  12794. "agent": {
  12795. "type": "string"
  12796. },
  12797. "model": {
  12798. "type": "object",
  12799. "properties": {
  12800. "id": {
  12801. "type": "string"
  12802. },
  12803. "providerID": {
  12804. "type": "string"
  12805. },
  12806. "variant": {
  12807. "type": "string"
  12808. }
  12809. },
  12810. "required": ["id", "providerID"],
  12811. "additionalProperties": false
  12812. },
  12813. "version": {
  12814. "type": "string"
  12815. },
  12816. "time": {
  12817. "type": "object",
  12818. "properties": {
  12819. "created": {
  12820. "type": "integer",
  12821. "minimum": 0
  12822. },
  12823. "updated": {
  12824. "type": "integer",
  12825. "minimum": 0
  12826. },
  12827. "compacting": {
  12828. "type": "integer",
  12829. "minimum": 0
  12830. },
  12831. "archived": {
  12832. "type": "number"
  12833. }
  12834. },
  12835. "required": ["created", "updated"],
  12836. "additionalProperties": false
  12837. },
  12838. "permission": {
  12839. "$ref": "#/components/schemas/PermissionRuleset"
  12840. },
  12841. "revert": {
  12842. "type": "object",
  12843. "properties": {
  12844. "messageID": {
  12845. "type": "string",
  12846. "pattern": "^msg"
  12847. },
  12848. "partID": {
  12849. "type": "string",
  12850. "pattern": "^prt"
  12851. },
  12852. "snapshot": {
  12853. "type": "string"
  12854. },
  12855. "diff": {
  12856. "type": "string"
  12857. }
  12858. },
  12859. "required": ["messageID"],
  12860. "additionalProperties": false
  12861. }
  12862. },
  12863. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12864. "additionalProperties": false
  12865. },
  12866. "Prompt": {
  12867. "type": "object",
  12868. "properties": {
  12869. "text": {
  12870. "type": "string"
  12871. },
  12872. "files": {
  12873. "type": "array",
  12874. "items": {
  12875. "$ref": "#/components/schemas/PromptFileAttachment"
  12876. }
  12877. },
  12878. "agents": {
  12879. "type": "array",
  12880. "items": {
  12881. "$ref": "#/components/schemas/PromptAgentAttachment"
  12882. }
  12883. },
  12884. "references": {
  12885. "type": "array",
  12886. "items": {
  12887. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12888. }
  12889. }
  12890. },
  12891. "required": ["text"],
  12892. "additionalProperties": false
  12893. },
  12894. "GlobalEvent": {
  12895. "type": "object",
  12896. "properties": {
  12897. "directory": {
  12898. "type": "string"
  12899. },
  12900. "project": {
  12901. "type": "string"
  12902. },
  12903. "workspace": {
  12904. "type": "string"
  12905. },
  12906. "payload": {
  12907. "anyOf": [
  12908. {
  12909. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12910. },
  12911. {
  12912. "$ref": "#/components/schemas/Event.tui.command.execute"
  12913. },
  12914. {
  12915. "$ref": "#/components/schemas/Event.tui.toast.show"
  12916. },
  12917. {
  12918. "$ref": "#/components/schemas/Event.tui.session.select"
  12919. },
  12920. {
  12921. "$ref": "#/components/schemas/EventServerConnected"
  12922. },
  12923. {
  12924. "$ref": "#/components/schemas/EventGlobalDisposed"
  12925. },
  12926. {
  12927. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12928. },
  12929. {
  12930. "$ref": "#/components/schemas/EventFileEdited"
  12931. },
  12932. {
  12933. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12934. },
  12935. {
  12936. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12937. },
  12938. {
  12939. "$ref": "#/components/schemas/EventLspUpdated"
  12940. },
  12941. {
  12942. "$ref": "#/components/schemas/EventMessagePartDelta"
  12943. },
  12944. {
  12945. "$ref": "#/components/schemas/EventPermissionAsked"
  12946. },
  12947. {
  12948. "$ref": "#/components/schemas/EventPermissionReplied"
  12949. },
  12950. {
  12951. "$ref": "#/components/schemas/EventSessionDiff"
  12952. },
  12953. {
  12954. "$ref": "#/components/schemas/EventSessionError"
  12955. },
  12956. {
  12957. "$ref": "#/components/schemas/EventQuestionAsked"
  12958. },
  12959. {
  12960. "$ref": "#/components/schemas/EventQuestionReplied"
  12961. },
  12962. {
  12963. "$ref": "#/components/schemas/EventQuestionRejected"
  12964. },
  12965. {
  12966. "$ref": "#/components/schemas/EventTodoUpdated"
  12967. },
  12968. {
  12969. "$ref": "#/components/schemas/EventSessionStatus"
  12970. },
  12971. {
  12972. "$ref": "#/components/schemas/EventSessionIdle"
  12973. },
  12974. {
  12975. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12976. },
  12977. {
  12978. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12979. },
  12980. {
  12981. "$ref": "#/components/schemas/EventCommandExecuted"
  12982. },
  12983. {
  12984. "$ref": "#/components/schemas/EventProjectUpdated"
  12985. },
  12986. {
  12987. "$ref": "#/components/schemas/EventSessionCompacted"
  12988. },
  12989. {
  12990. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12991. },
  12992. {
  12993. "$ref": "#/components/schemas/EventWorkspaceReady"
  12994. },
  12995. {
  12996. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12997. },
  12998. {
  12999. "$ref": "#/components/schemas/EventWorkspaceStatus"
  13000. },
  13001. {
  13002. "$ref": "#/components/schemas/EventWorktreeReady"
  13003. },
  13004. {
  13005. "$ref": "#/components/schemas/EventWorktreeFailed"
  13006. },
  13007. {
  13008. "$ref": "#/components/schemas/EventPtyCreated"
  13009. },
  13010. {
  13011. "$ref": "#/components/schemas/EventPtyUpdated"
  13012. },
  13013. {
  13014. "$ref": "#/components/schemas/EventPtyExited"
  13015. },
  13016. {
  13017. "$ref": "#/components/schemas/EventPtyDeleted"
  13018. },
  13019. {
  13020. "$ref": "#/components/schemas/EventInstallationUpdated"
  13021. },
  13022. {
  13023. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  13024. },
  13025. {
  13026. "$ref": "#/components/schemas/EventMessageUpdated"
  13027. },
  13028. {
  13029. "$ref": "#/components/schemas/EventMessageRemoved"
  13030. },
  13031. {
  13032. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13033. },
  13034. {
  13035. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13036. },
  13037. {
  13038. "$ref": "#/components/schemas/EventSessionCreated"
  13039. },
  13040. {
  13041. "$ref": "#/components/schemas/EventSessionUpdated"
  13042. },
  13043. {
  13044. "$ref": "#/components/schemas/EventSessionDeleted"
  13045. },
  13046. {
  13047. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13048. },
  13049. {
  13050. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13051. },
  13052. {
  13053. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13054. },
  13055. {
  13056. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13057. },
  13058. {
  13059. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13060. },
  13061. {
  13062. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13063. },
  13064. {
  13065. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13066. },
  13067. {
  13068. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13069. },
  13070. {
  13071. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13072. },
  13073. {
  13074. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13075. },
  13076. {
  13077. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13078. },
  13079. {
  13080. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13081. },
  13082. {
  13083. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13084. },
  13085. {
  13086. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13087. },
  13088. {
  13089. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13090. },
  13091. {
  13092. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13093. },
  13094. {
  13095. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13096. },
  13097. {
  13098. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13099. },
  13100. {
  13101. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13102. },
  13103. {
  13104. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13105. },
  13106. {
  13107. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13108. },
  13109. {
  13110. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13111. },
  13112. {
  13113. "$ref": "#/components/schemas/EventSessionNextRetried"
  13114. },
  13115. {
  13116. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13117. },
  13118. {
  13119. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13120. },
  13121. {
  13122. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13123. },
  13124. {
  13125. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13126. },
  13127. {
  13128. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13129. },
  13130. {
  13131. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13132. },
  13133. {
  13134. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13135. },
  13136. {
  13137. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13138. },
  13139. {
  13140. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13141. },
  13142. {
  13143. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13144. },
  13145. {
  13146. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13147. },
  13148. {
  13149. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13150. },
  13151. {
  13152. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13153. },
  13154. {
  13155. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13156. },
  13157. {
  13158. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13159. },
  13160. {
  13161. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13162. },
  13163. {
  13164. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13165. },
  13166. {
  13167. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13168. },
  13169. {
  13170. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13171. },
  13172. {
  13173. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13174. },
  13175. {
  13176. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13177. },
  13178. {
  13179. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13180. },
  13181. {
  13182. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13183. },
  13184. {
  13185. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13186. },
  13187. {
  13188. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13189. },
  13190. {
  13191. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13192. },
  13193. {
  13194. "$ref": "#/components/schemas/EventSessionNextRetried"
  13195. },
  13196. {
  13197. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13198. },
  13199. {
  13200. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13201. },
  13202. {
  13203. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13204. },
  13205. {
  13206. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13207. },
  13208. {
  13209. "$ref": "#/components/schemas/EventAccountAdded"
  13210. },
  13211. {
  13212. "$ref": "#/components/schemas/EventAccountRemoved"
  13213. },
  13214. {
  13215. "$ref": "#/components/schemas/EventAccountSwitched"
  13216. },
  13217. {
  13218. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13219. },
  13220. {
  13221. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13222. },
  13223. {
  13224. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13225. },
  13226. {
  13227. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13228. },
  13229. {
  13230. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13231. },
  13232. {
  13233. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13234. },
  13235. {
  13236. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13237. },
  13238. {
  13239. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13240. },
  13241. {
  13242. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13243. },
  13244. {
  13245. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13246. },
  13247. {
  13248. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13249. },
  13250. {
  13251. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13252. },
  13253. {
  13254. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13255. },
  13256. {
  13257. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13258. },
  13259. {
  13260. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13261. },
  13262. {
  13263. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13264. },
  13265. {
  13266. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13267. },
  13268. {
  13269. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13270. },
  13271. {
  13272. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13273. },
  13274. {
  13275. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13276. },
  13277. {
  13278. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13279. },
  13280. {
  13281. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13282. },
  13283. {
  13284. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13285. },
  13286. {
  13287. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13288. },
  13289. {
  13290. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13291. },
  13292. {
  13293. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13294. },
  13295. {
  13296. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13297. },
  13298. {
  13299. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13300. },
  13301. {
  13302. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13303. },
  13304. {
  13305. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13306. },
  13307. {
  13308. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13309. },
  13310. {
  13311. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13312. },
  13313. {
  13314. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13315. }
  13316. ]
  13317. }
  13318. },
  13319. "required": ["directory", "payload"],
  13320. "additionalProperties": false
  13321. },
  13322. "LogLevel": {
  13323. "type": "string",
  13324. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13325. "description": "Log level"
  13326. },
  13327. "ServerConfig": {
  13328. "type": "object",
  13329. "properties": {
  13330. "port": {
  13331. "type": "integer",
  13332. "exclusiveMinimum": 0
  13333. },
  13334. "hostname": {
  13335. "type": "string"
  13336. },
  13337. "mdns": {
  13338. "type": "boolean"
  13339. },
  13340. "mdnsDomain": {
  13341. "type": "string"
  13342. },
  13343. "cors": {
  13344. "type": "array",
  13345. "items": {
  13346. "type": "string"
  13347. }
  13348. }
  13349. },
  13350. "additionalProperties": false,
  13351. "description": "Server configuration for opencode serve and web commands"
  13352. },
  13353. "ReferenceConfigEntry": {
  13354. "anyOf": [
  13355. {
  13356. "type": "string"
  13357. },
  13358. {
  13359. "type": "object",
  13360. "properties": {
  13361. "repository": {
  13362. "type": "string",
  13363. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13364. },
  13365. "branch": {
  13366. "type": "string"
  13367. }
  13368. },
  13369. "required": ["repository"],
  13370. "additionalProperties": false
  13371. },
  13372. {
  13373. "type": "object",
  13374. "properties": {
  13375. "path": {
  13376. "type": "string",
  13377. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13378. }
  13379. },
  13380. "required": ["path"],
  13381. "additionalProperties": false
  13382. }
  13383. ]
  13384. },
  13385. "ReferenceConfig": {
  13386. "type": "object",
  13387. "additionalProperties": {
  13388. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13389. }
  13390. },
  13391. "PermissionActionConfig": {
  13392. "type": "string",
  13393. "enum": ["ask", "allow", "deny"]
  13394. },
  13395. "PermissionObjectConfig": {
  13396. "type": "object",
  13397. "additionalProperties": {
  13398. "$ref": "#/components/schemas/PermissionActionConfig"
  13399. }
  13400. },
  13401. "PermissionRuleConfig": {
  13402. "anyOf": [
  13403. {
  13404. "$ref": "#/components/schemas/PermissionActionConfig"
  13405. },
  13406. {
  13407. "$ref": "#/components/schemas/PermissionObjectConfig"
  13408. }
  13409. ]
  13410. },
  13411. "PermissionConfig": {
  13412. "anyOf": [
  13413. {
  13414. "$ref": "#/components/schemas/PermissionActionConfig"
  13415. },
  13416. {
  13417. "type": "object",
  13418. "properties": {
  13419. "read": {
  13420. "$ref": "#/components/schemas/PermissionRuleConfig"
  13421. },
  13422. "edit": {
  13423. "$ref": "#/components/schemas/PermissionRuleConfig"
  13424. },
  13425. "glob": {
  13426. "$ref": "#/components/schemas/PermissionRuleConfig"
  13427. },
  13428. "grep": {
  13429. "$ref": "#/components/schemas/PermissionRuleConfig"
  13430. },
  13431. "list": {
  13432. "$ref": "#/components/schemas/PermissionRuleConfig"
  13433. },
  13434. "bash": {
  13435. "$ref": "#/components/schemas/PermissionRuleConfig"
  13436. },
  13437. "task": {
  13438. "$ref": "#/components/schemas/PermissionRuleConfig"
  13439. },
  13440. "external_directory": {
  13441. "$ref": "#/components/schemas/PermissionRuleConfig"
  13442. },
  13443. "todowrite": {
  13444. "$ref": "#/components/schemas/PermissionActionConfig"
  13445. },
  13446. "question": {
  13447. "$ref": "#/components/schemas/PermissionActionConfig"
  13448. },
  13449. "webfetch": {
  13450. "$ref": "#/components/schemas/PermissionActionConfig"
  13451. },
  13452. "websearch": {
  13453. "$ref": "#/components/schemas/PermissionActionConfig"
  13454. },
  13455. "repo_clone": {
  13456. "$ref": "#/components/schemas/PermissionRuleConfig"
  13457. },
  13458. "repo_overview": {
  13459. "$ref": "#/components/schemas/PermissionRuleConfig"
  13460. },
  13461. "lsp": {
  13462. "$ref": "#/components/schemas/PermissionRuleConfig"
  13463. },
  13464. "doom_loop": {
  13465. "$ref": "#/components/schemas/PermissionActionConfig"
  13466. },
  13467. "skill": {
  13468. "$ref": "#/components/schemas/PermissionRuleConfig"
  13469. }
  13470. },
  13471. "additionalProperties": {
  13472. "$ref": "#/components/schemas/PermissionRuleConfig"
  13473. }
  13474. }
  13475. ]
  13476. },
  13477. "AgentConfig": {
  13478. "type": "object",
  13479. "properties": {
  13480. "model": {
  13481. "type": "string"
  13482. },
  13483. "variant": {
  13484. "type": "string"
  13485. },
  13486. "temperature": {
  13487. "type": "number"
  13488. },
  13489. "top_p": {
  13490. "type": "number"
  13491. },
  13492. "prompt": {
  13493. "type": "string"
  13494. },
  13495. "tools": {
  13496. "type": "object",
  13497. "additionalProperties": {
  13498. "type": "boolean"
  13499. }
  13500. },
  13501. "disable": {
  13502. "type": "boolean"
  13503. },
  13504. "description": {
  13505. "type": "string"
  13506. },
  13507. "mode": {
  13508. "type": "string",
  13509. "enum": ["subagent", "primary", "all"]
  13510. },
  13511. "hidden": {
  13512. "type": "boolean"
  13513. },
  13514. "options": {
  13515. "type": "object"
  13516. },
  13517. "color": {
  13518. "anyOf": [
  13519. {
  13520. "type": "string",
  13521. "pattern": "^#[0-9a-fA-F]{6}$"
  13522. },
  13523. {
  13524. "type": "string",
  13525. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13526. }
  13527. ],
  13528. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13529. },
  13530. "steps": {
  13531. "type": "integer",
  13532. "exclusiveMinimum": 0
  13533. },
  13534. "maxSteps": {
  13535. "type": "integer",
  13536. "exclusiveMinimum": 0
  13537. },
  13538. "permission": {
  13539. "$ref": "#/components/schemas/PermissionConfig"
  13540. }
  13541. },
  13542. "additionalProperties": {}
  13543. },
  13544. "ProviderConfig": {
  13545. "type": "object",
  13546. "properties": {
  13547. "api": {
  13548. "type": "string"
  13549. },
  13550. "name": {
  13551. "type": "string"
  13552. },
  13553. "env": {
  13554. "type": "array",
  13555. "items": {
  13556. "type": "string"
  13557. }
  13558. },
  13559. "id": {
  13560. "type": "string"
  13561. },
  13562. "npm": {
  13563. "type": "string"
  13564. },
  13565. "whitelist": {
  13566. "type": "array",
  13567. "items": {
  13568. "type": "string"
  13569. }
  13570. },
  13571. "blacklist": {
  13572. "type": "array",
  13573. "items": {
  13574. "type": "string"
  13575. }
  13576. },
  13577. "options": {
  13578. "type": "object",
  13579. "properties": {
  13580. "apiKey": {
  13581. "type": "string"
  13582. },
  13583. "baseURL": {
  13584. "type": "string"
  13585. },
  13586. "enterpriseUrl": {
  13587. "type": "string"
  13588. },
  13589. "setCacheKey": {
  13590. "type": "boolean"
  13591. },
  13592. "timeout": {
  13593. "anyOf": [
  13594. {
  13595. "type": "integer",
  13596. "exclusiveMinimum": 0
  13597. },
  13598. {
  13599. "type": "boolean",
  13600. "enum": [false]
  13601. }
  13602. ],
  13603. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  13604. },
  13605. "headerTimeout": {
  13606. "anyOf": [
  13607. {
  13608. "type": "integer",
  13609. "exclusiveMinimum": 0
  13610. },
  13611. {
  13612. "type": "boolean",
  13613. "enum": [false]
  13614. }
  13615. ],
  13616. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  13617. },
  13618. "chunkTimeout": {
  13619. "type": "integer",
  13620. "exclusiveMinimum": 0
  13621. }
  13622. },
  13623. "additionalProperties": {}
  13624. },
  13625. "models": {
  13626. "type": "object",
  13627. "additionalProperties": {
  13628. "type": "object",
  13629. "properties": {
  13630. "id": {
  13631. "type": "string"
  13632. },
  13633. "name": {
  13634. "type": "string"
  13635. },
  13636. "family": {
  13637. "type": "string"
  13638. },
  13639. "release_date": {
  13640. "type": "string"
  13641. },
  13642. "attachment": {
  13643. "type": "boolean"
  13644. },
  13645. "reasoning": {
  13646. "type": "boolean"
  13647. },
  13648. "temperature": {
  13649. "type": "boolean"
  13650. },
  13651. "tool_call": {
  13652. "type": "boolean"
  13653. },
  13654. "interleaved": {
  13655. "anyOf": [
  13656. {
  13657. "type": "boolean",
  13658. "enum": [true]
  13659. },
  13660. {
  13661. "type": "object",
  13662. "properties": {
  13663. "field": {
  13664. "type": "string",
  13665. "enum": ["reasoning_content", "reasoning_details"]
  13666. }
  13667. },
  13668. "required": ["field"],
  13669. "additionalProperties": false
  13670. }
  13671. ]
  13672. },
  13673. "cost": {
  13674. "type": "object",
  13675. "properties": {
  13676. "input": {
  13677. "type": "number"
  13678. },
  13679. "output": {
  13680. "type": "number"
  13681. },
  13682. "cache_read": {
  13683. "type": "number"
  13684. },
  13685. "cache_write": {
  13686. "type": "number"
  13687. },
  13688. "context_over_200k": {
  13689. "type": "object",
  13690. "properties": {
  13691. "input": {
  13692. "type": "number"
  13693. },
  13694. "output": {
  13695. "type": "number"
  13696. },
  13697. "cache_read": {
  13698. "type": "number"
  13699. },
  13700. "cache_write": {
  13701. "type": "number"
  13702. }
  13703. },
  13704. "required": ["input", "output"],
  13705. "additionalProperties": false
  13706. }
  13707. },
  13708. "required": ["input", "output"],
  13709. "additionalProperties": false
  13710. },
  13711. "limit": {
  13712. "type": "object",
  13713. "properties": {
  13714. "context": {
  13715. "type": "number"
  13716. },
  13717. "input": {
  13718. "type": "number"
  13719. },
  13720. "output": {
  13721. "type": "number"
  13722. }
  13723. },
  13724. "required": ["context", "output"],
  13725. "additionalProperties": false
  13726. },
  13727. "modalities": {
  13728. "type": "object",
  13729. "properties": {
  13730. "input": {
  13731. "type": "array",
  13732. "items": {
  13733. "type": "string",
  13734. "enum": ["text", "audio", "image", "video", "pdf"]
  13735. }
  13736. },
  13737. "output": {
  13738. "type": "array",
  13739. "items": {
  13740. "type": "string",
  13741. "enum": ["text", "audio", "image", "video", "pdf"]
  13742. }
  13743. }
  13744. },
  13745. "additionalProperties": false
  13746. },
  13747. "experimental": {
  13748. "type": "boolean"
  13749. },
  13750. "status": {
  13751. "type": "string",
  13752. "enum": ["alpha", "beta", "deprecated", "active"]
  13753. },
  13754. "provider": {
  13755. "type": "object",
  13756. "properties": {
  13757. "npm": {
  13758. "type": "string"
  13759. },
  13760. "api": {
  13761. "type": "string"
  13762. }
  13763. },
  13764. "additionalProperties": false
  13765. },
  13766. "options": {
  13767. "type": "object"
  13768. },
  13769. "headers": {
  13770. "type": "object",
  13771. "additionalProperties": {
  13772. "type": "string"
  13773. }
  13774. },
  13775. "variants": {
  13776. "type": "object",
  13777. "additionalProperties": {
  13778. "type": "object",
  13779. "properties": {
  13780. "disabled": {
  13781. "type": "boolean"
  13782. }
  13783. },
  13784. "additionalProperties": {}
  13785. },
  13786. "description": "Variant-specific configuration"
  13787. }
  13788. },
  13789. "additionalProperties": false
  13790. }
  13791. }
  13792. },
  13793. "additionalProperties": false
  13794. },
  13795. "McpLocalConfig": {
  13796. "type": "object",
  13797. "properties": {
  13798. "type": {
  13799. "type": "string",
  13800. "enum": ["local"],
  13801. "description": "Type of MCP server connection"
  13802. },
  13803. "command": {
  13804. "type": "array",
  13805. "items": {
  13806. "type": "string"
  13807. },
  13808. "description": "Command and arguments to run the MCP server"
  13809. },
  13810. "environment": {
  13811. "type": "object",
  13812. "additionalProperties": {
  13813. "type": "string"
  13814. }
  13815. },
  13816. "enabled": {
  13817. "type": "boolean"
  13818. },
  13819. "timeout": {
  13820. "type": "integer",
  13821. "exclusiveMinimum": 0
  13822. }
  13823. },
  13824. "required": ["type", "command"],
  13825. "additionalProperties": false
  13826. },
  13827. "McpOAuthConfig": {
  13828. "type": "object",
  13829. "properties": {
  13830. "clientId": {
  13831. "type": "string"
  13832. },
  13833. "clientSecret": {
  13834. "type": "string"
  13835. },
  13836. "scope": {
  13837. "type": "string"
  13838. },
  13839. "callbackPort": {
  13840. "type": "integer",
  13841. "minimum": 1,
  13842. "maximum": 65535
  13843. },
  13844. "redirectUri": {
  13845. "type": "string"
  13846. }
  13847. },
  13848. "additionalProperties": false
  13849. },
  13850. "McpRemoteConfig": {
  13851. "type": "object",
  13852. "properties": {
  13853. "type": {
  13854. "type": "string",
  13855. "enum": ["remote"],
  13856. "description": "Type of MCP server connection"
  13857. },
  13858. "url": {
  13859. "type": "string",
  13860. "description": "URL of the remote MCP server"
  13861. },
  13862. "enabled": {
  13863. "type": "boolean"
  13864. },
  13865. "headers": {
  13866. "type": "object",
  13867. "additionalProperties": {
  13868. "type": "string"
  13869. }
  13870. },
  13871. "oauth": {
  13872. "anyOf": [
  13873. {
  13874. "$ref": "#/components/schemas/McpOAuthConfig"
  13875. },
  13876. {
  13877. "type": "boolean",
  13878. "enum": [false]
  13879. }
  13880. ],
  13881. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13882. },
  13883. "timeout": {
  13884. "type": "integer",
  13885. "exclusiveMinimum": 0
  13886. }
  13887. },
  13888. "required": ["type", "url"],
  13889. "additionalProperties": false
  13890. },
  13891. "LayoutConfig": {
  13892. "type": "string",
  13893. "enum": ["auto", "stretch"],
  13894. "description": "@deprecated Always uses stretch layout."
  13895. },
  13896. "ImageAttachmentConfig": {
  13897. "type": "object",
  13898. "properties": {
  13899. "auto_resize": {
  13900. "type": "boolean"
  13901. },
  13902. "max_width": {
  13903. "type": "integer",
  13904. "exclusiveMinimum": 0
  13905. },
  13906. "max_height": {
  13907. "type": "integer",
  13908. "exclusiveMinimum": 0
  13909. },
  13910. "max_base64_bytes": {
  13911. "type": "integer",
  13912. "exclusiveMinimum": 0
  13913. }
  13914. },
  13915. "additionalProperties": false
  13916. },
  13917. "AttachmentConfig": {
  13918. "type": "object",
  13919. "properties": {
  13920. "image": {
  13921. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13922. }
  13923. },
  13924. "additionalProperties": false
  13925. },
  13926. "Config": {
  13927. "type": "object",
  13928. "properties": {
  13929. "$schema": {
  13930. "type": "string"
  13931. },
  13932. "shell": {
  13933. "type": "string"
  13934. },
  13935. "logLevel": {
  13936. "$ref": "#/components/schemas/LogLevel"
  13937. },
  13938. "server": {
  13939. "$ref": "#/components/schemas/ServerConfig"
  13940. },
  13941. "command": {
  13942. "type": "object",
  13943. "additionalProperties": {
  13944. "type": "object",
  13945. "properties": {
  13946. "template": {
  13947. "type": "string"
  13948. },
  13949. "description": {
  13950. "type": "string"
  13951. },
  13952. "agent": {
  13953. "type": "string"
  13954. },
  13955. "model": {
  13956. "type": "string"
  13957. },
  13958. "subtask": {
  13959. "type": "boolean"
  13960. }
  13961. },
  13962. "required": ["template"],
  13963. "additionalProperties": false
  13964. }
  13965. },
  13966. "skills": {
  13967. "type": "object",
  13968. "properties": {
  13969. "paths": {
  13970. "type": "array",
  13971. "items": {
  13972. "type": "string"
  13973. }
  13974. },
  13975. "urls": {
  13976. "type": "array",
  13977. "items": {
  13978. "type": "string"
  13979. }
  13980. }
  13981. },
  13982. "additionalProperties": false
  13983. },
  13984. "reference": {
  13985. "$ref": "#/components/schemas/ReferenceConfig"
  13986. },
  13987. "watcher": {
  13988. "type": "object",
  13989. "properties": {
  13990. "ignore": {
  13991. "type": "array",
  13992. "items": {
  13993. "type": "string"
  13994. }
  13995. }
  13996. },
  13997. "additionalProperties": false
  13998. },
  13999. "snapshot": {
  14000. "type": "boolean"
  14001. },
  14002. "plugin": {
  14003. "type": "array",
  14004. "items": {
  14005. "anyOf": [
  14006. {
  14007. "type": "string"
  14008. },
  14009. {
  14010. "type": "array",
  14011. "prefixItems": [
  14012. {
  14013. "type": "string"
  14014. },
  14015. {
  14016. "type": "object"
  14017. }
  14018. ],
  14019. "maxItems": 2,
  14020. "minItems": 2
  14021. }
  14022. ]
  14023. }
  14024. },
  14025. "share": {
  14026. "type": "string",
  14027. "enum": ["manual", "auto", "disabled"]
  14028. },
  14029. "autoshare": {
  14030. "type": "boolean"
  14031. },
  14032. "autoupdate": {
  14033. "anyOf": [
  14034. {
  14035. "type": "boolean"
  14036. },
  14037. {
  14038. "type": "string",
  14039. "enum": ["notify"]
  14040. }
  14041. ],
  14042. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  14043. },
  14044. "disabled_providers": {
  14045. "type": "array",
  14046. "items": {
  14047. "type": "string"
  14048. }
  14049. },
  14050. "enabled_providers": {
  14051. "type": "array",
  14052. "items": {
  14053. "type": "string"
  14054. }
  14055. },
  14056. "model": {
  14057. "type": "string"
  14058. },
  14059. "small_model": {
  14060. "type": "string"
  14061. },
  14062. "default_agent": {
  14063. "type": "string"
  14064. },
  14065. "username": {
  14066. "type": "string"
  14067. },
  14068. "mode": {
  14069. "type": "object",
  14070. "properties": {
  14071. "build": {
  14072. "$ref": "#/components/schemas/AgentConfig"
  14073. },
  14074. "plan": {
  14075. "$ref": "#/components/schemas/AgentConfig"
  14076. }
  14077. },
  14078. "additionalProperties": {
  14079. "$ref": "#/components/schemas/AgentConfig"
  14080. }
  14081. },
  14082. "agent": {
  14083. "type": "object",
  14084. "properties": {
  14085. "plan": {
  14086. "$ref": "#/components/schemas/AgentConfig"
  14087. },
  14088. "build": {
  14089. "$ref": "#/components/schemas/AgentConfig"
  14090. },
  14091. "general": {
  14092. "$ref": "#/components/schemas/AgentConfig"
  14093. },
  14094. "explore": {
  14095. "$ref": "#/components/schemas/AgentConfig"
  14096. },
  14097. "scout": {
  14098. "$ref": "#/components/schemas/AgentConfig"
  14099. },
  14100. "title": {
  14101. "$ref": "#/components/schemas/AgentConfig"
  14102. },
  14103. "summary": {
  14104. "$ref": "#/components/schemas/AgentConfig"
  14105. },
  14106. "compaction": {
  14107. "$ref": "#/components/schemas/AgentConfig"
  14108. }
  14109. },
  14110. "additionalProperties": {
  14111. "$ref": "#/components/schemas/AgentConfig"
  14112. }
  14113. },
  14114. "provider": {
  14115. "type": "object",
  14116. "additionalProperties": {
  14117. "$ref": "#/components/schemas/ProviderConfig"
  14118. }
  14119. },
  14120. "mcp": {
  14121. "type": "object",
  14122. "additionalProperties": {
  14123. "anyOf": [
  14124. {
  14125. "$ref": "#/components/schemas/McpLocalConfig"
  14126. },
  14127. {
  14128. "$ref": "#/components/schemas/McpRemoteConfig"
  14129. },
  14130. {
  14131. "type": "object",
  14132. "properties": {
  14133. "enabled": {
  14134. "type": "boolean"
  14135. }
  14136. },
  14137. "required": ["enabled"],
  14138. "additionalProperties": false
  14139. }
  14140. ]
  14141. }
  14142. },
  14143. "formatter": {
  14144. "anyOf": [
  14145. {
  14146. "type": "boolean"
  14147. },
  14148. {
  14149. "type": "object",
  14150. "additionalProperties": {
  14151. "type": "object",
  14152. "properties": {
  14153. "disabled": {
  14154. "type": "boolean"
  14155. },
  14156. "command": {
  14157. "type": "array",
  14158. "items": {
  14159. "type": "string"
  14160. }
  14161. },
  14162. "environment": {
  14163. "type": "object",
  14164. "additionalProperties": {
  14165. "type": "string"
  14166. }
  14167. },
  14168. "extensions": {
  14169. "type": "array",
  14170. "items": {
  14171. "type": "string"
  14172. }
  14173. }
  14174. },
  14175. "additionalProperties": false
  14176. }
  14177. }
  14178. ],
  14179. "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."
  14180. },
  14181. "lsp": {
  14182. "anyOf": [
  14183. {
  14184. "type": "boolean"
  14185. },
  14186. {
  14187. "type": "object",
  14188. "additionalProperties": {
  14189. "anyOf": [
  14190. {
  14191. "type": "object",
  14192. "properties": {
  14193. "disabled": {
  14194. "type": "boolean",
  14195. "enum": [true]
  14196. }
  14197. },
  14198. "required": ["disabled"],
  14199. "additionalProperties": false
  14200. },
  14201. {
  14202. "type": "object",
  14203. "properties": {
  14204. "command": {
  14205. "type": "array",
  14206. "items": {
  14207. "type": "string"
  14208. }
  14209. },
  14210. "extensions": {
  14211. "type": "array",
  14212. "items": {
  14213. "type": "string"
  14214. }
  14215. },
  14216. "disabled": {
  14217. "type": "boolean"
  14218. },
  14219. "env": {
  14220. "type": "object",
  14221. "additionalProperties": {
  14222. "type": "string"
  14223. }
  14224. },
  14225. "initialization": {
  14226. "type": "object"
  14227. }
  14228. },
  14229. "required": ["command"],
  14230. "additionalProperties": false
  14231. }
  14232. ]
  14233. }
  14234. }
  14235. ],
  14236. "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."
  14237. },
  14238. "instructions": {
  14239. "type": "array",
  14240. "items": {
  14241. "type": "string"
  14242. }
  14243. },
  14244. "layout": {
  14245. "$ref": "#/components/schemas/LayoutConfig"
  14246. },
  14247. "permission": {
  14248. "$ref": "#/components/schemas/PermissionConfig"
  14249. },
  14250. "tools": {
  14251. "type": "object",
  14252. "additionalProperties": {
  14253. "type": "boolean"
  14254. }
  14255. },
  14256. "attachment": {
  14257. "$ref": "#/components/schemas/AttachmentConfig"
  14258. },
  14259. "enterprise": {
  14260. "type": "object",
  14261. "properties": {
  14262. "url": {
  14263. "type": "string"
  14264. }
  14265. },
  14266. "additionalProperties": false
  14267. },
  14268. "tool_output": {
  14269. "type": "object",
  14270. "properties": {
  14271. "max_lines": {
  14272. "type": "integer",
  14273. "exclusiveMinimum": 0
  14274. },
  14275. "max_bytes": {
  14276. "type": "integer",
  14277. "exclusiveMinimum": 0
  14278. }
  14279. },
  14280. "additionalProperties": false
  14281. },
  14282. "compaction": {
  14283. "type": "object",
  14284. "properties": {
  14285. "auto": {
  14286. "type": "boolean"
  14287. },
  14288. "prune": {
  14289. "type": "boolean"
  14290. },
  14291. "tail_turns": {
  14292. "type": "integer",
  14293. "minimum": 0
  14294. },
  14295. "preserve_recent_tokens": {
  14296. "type": "integer",
  14297. "minimum": 0
  14298. },
  14299. "reserved": {
  14300. "type": "integer",
  14301. "minimum": 0
  14302. }
  14303. },
  14304. "additionalProperties": false
  14305. },
  14306. "experimental": {
  14307. "type": "object",
  14308. "properties": {
  14309. "disable_paste_summary": {
  14310. "type": "boolean"
  14311. },
  14312. "batch_tool": {
  14313. "type": "boolean"
  14314. },
  14315. "openTelemetry": {
  14316. "type": "boolean"
  14317. },
  14318. "primary_tools": {
  14319. "type": "array",
  14320. "items": {
  14321. "type": "string"
  14322. }
  14323. },
  14324. "continue_loop_on_deny": {
  14325. "type": "boolean"
  14326. },
  14327. "mcp_timeout": {
  14328. "type": "integer",
  14329. "exclusiveMinimum": 0
  14330. }
  14331. },
  14332. "additionalProperties": false
  14333. }
  14334. },
  14335. "additionalProperties": false
  14336. },
  14337. "Model": {
  14338. "type": "object",
  14339. "properties": {
  14340. "id": {
  14341. "type": "string"
  14342. },
  14343. "providerID": {
  14344. "type": "string"
  14345. },
  14346. "api": {
  14347. "type": "object",
  14348. "properties": {
  14349. "id": {
  14350. "type": "string"
  14351. },
  14352. "url": {
  14353. "type": "string"
  14354. },
  14355. "npm": {
  14356. "type": "string"
  14357. }
  14358. },
  14359. "required": ["id", "url", "npm"],
  14360. "additionalProperties": false
  14361. },
  14362. "name": {
  14363. "type": "string"
  14364. },
  14365. "family": {
  14366. "type": "string"
  14367. },
  14368. "capabilities": {
  14369. "type": "object",
  14370. "properties": {
  14371. "temperature": {
  14372. "type": "boolean"
  14373. },
  14374. "reasoning": {
  14375. "type": "boolean"
  14376. },
  14377. "attachment": {
  14378. "type": "boolean"
  14379. },
  14380. "toolcall": {
  14381. "type": "boolean"
  14382. },
  14383. "input": {
  14384. "type": "object",
  14385. "properties": {
  14386. "text": {
  14387. "type": "boolean"
  14388. },
  14389. "audio": {
  14390. "type": "boolean"
  14391. },
  14392. "image": {
  14393. "type": "boolean"
  14394. },
  14395. "video": {
  14396. "type": "boolean"
  14397. },
  14398. "pdf": {
  14399. "type": "boolean"
  14400. }
  14401. },
  14402. "required": ["text", "audio", "image", "video", "pdf"],
  14403. "additionalProperties": false
  14404. },
  14405. "output": {
  14406. "type": "object",
  14407. "properties": {
  14408. "text": {
  14409. "type": "boolean"
  14410. },
  14411. "audio": {
  14412. "type": "boolean"
  14413. },
  14414. "image": {
  14415. "type": "boolean"
  14416. },
  14417. "video": {
  14418. "type": "boolean"
  14419. },
  14420. "pdf": {
  14421. "type": "boolean"
  14422. }
  14423. },
  14424. "required": ["text", "audio", "image", "video", "pdf"],
  14425. "additionalProperties": false
  14426. },
  14427. "interleaved": {
  14428. "anyOf": [
  14429. {
  14430. "type": "boolean"
  14431. },
  14432. {
  14433. "type": "object",
  14434. "properties": {
  14435. "field": {
  14436. "type": "string",
  14437. "enum": ["reasoning_content", "reasoning_details"]
  14438. }
  14439. },
  14440. "required": ["field"],
  14441. "additionalProperties": false
  14442. }
  14443. ]
  14444. }
  14445. },
  14446. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14447. "additionalProperties": false
  14448. },
  14449. "cost": {
  14450. "type": "object",
  14451. "properties": {
  14452. "input": {
  14453. "type": "number"
  14454. },
  14455. "output": {
  14456. "type": "number"
  14457. },
  14458. "cache": {
  14459. "type": "object",
  14460. "properties": {
  14461. "read": {
  14462. "type": "number"
  14463. },
  14464. "write": {
  14465. "type": "number"
  14466. }
  14467. },
  14468. "required": ["read", "write"],
  14469. "additionalProperties": false
  14470. },
  14471. "tiers": {
  14472. "type": "array",
  14473. "items": {
  14474. "type": "object",
  14475. "properties": {
  14476. "input": {
  14477. "type": "number"
  14478. },
  14479. "output": {
  14480. "type": "number"
  14481. },
  14482. "cache": {
  14483. "type": "object",
  14484. "properties": {
  14485. "read": {
  14486. "type": "number"
  14487. },
  14488. "write": {
  14489. "type": "number"
  14490. }
  14491. },
  14492. "required": ["read", "write"],
  14493. "additionalProperties": false
  14494. },
  14495. "tier": {
  14496. "type": "object",
  14497. "properties": {
  14498. "type": {
  14499. "type": "string",
  14500. "enum": ["context"]
  14501. },
  14502. "size": {
  14503. "type": "number"
  14504. }
  14505. },
  14506. "required": ["type", "size"],
  14507. "additionalProperties": false
  14508. }
  14509. },
  14510. "required": ["input", "output", "cache", "tier"],
  14511. "additionalProperties": false
  14512. }
  14513. },
  14514. "experimentalOver200K": {
  14515. "type": "object",
  14516. "properties": {
  14517. "input": {
  14518. "type": "number"
  14519. },
  14520. "output": {
  14521. "type": "number"
  14522. },
  14523. "cache": {
  14524. "type": "object",
  14525. "properties": {
  14526. "read": {
  14527. "type": "number"
  14528. },
  14529. "write": {
  14530. "type": "number"
  14531. }
  14532. },
  14533. "required": ["read", "write"],
  14534. "additionalProperties": false
  14535. }
  14536. },
  14537. "required": ["input", "output", "cache"],
  14538. "additionalProperties": false
  14539. }
  14540. },
  14541. "required": ["input", "output", "cache"],
  14542. "additionalProperties": false
  14543. },
  14544. "limit": {
  14545. "type": "object",
  14546. "properties": {
  14547. "context": {
  14548. "type": "number"
  14549. },
  14550. "input": {
  14551. "type": "number"
  14552. },
  14553. "output": {
  14554. "type": "number"
  14555. }
  14556. },
  14557. "required": ["context", "output"],
  14558. "additionalProperties": false
  14559. },
  14560. "status": {
  14561. "type": "string",
  14562. "enum": ["alpha", "beta", "deprecated", "active"]
  14563. },
  14564. "options": {
  14565. "type": "object"
  14566. },
  14567. "headers": {
  14568. "type": "object",
  14569. "additionalProperties": {
  14570. "type": "string"
  14571. }
  14572. },
  14573. "release_date": {
  14574. "type": "string"
  14575. },
  14576. "variants": {
  14577. "type": "object",
  14578. "additionalProperties": {
  14579. "type": "object"
  14580. }
  14581. }
  14582. },
  14583. "required": [
  14584. "id",
  14585. "providerID",
  14586. "api",
  14587. "name",
  14588. "capabilities",
  14589. "cost",
  14590. "limit",
  14591. "status",
  14592. "options",
  14593. "headers",
  14594. "release_date"
  14595. ],
  14596. "additionalProperties": false
  14597. },
  14598. "Provider": {
  14599. "type": "object",
  14600. "properties": {
  14601. "id": {
  14602. "type": "string"
  14603. },
  14604. "name": {
  14605. "type": "string"
  14606. },
  14607. "source": {
  14608. "type": "string",
  14609. "enum": ["env", "config", "custom", "api"]
  14610. },
  14611. "env": {
  14612. "type": "array",
  14613. "items": {
  14614. "type": "string"
  14615. }
  14616. },
  14617. "key": {
  14618. "type": "string"
  14619. },
  14620. "options": {
  14621. "type": "object"
  14622. },
  14623. "models": {
  14624. "type": "object",
  14625. "additionalProperties": {
  14626. "$ref": "#/components/schemas/Model"
  14627. }
  14628. }
  14629. },
  14630. "required": ["id", "name", "source", "env", "options", "models"],
  14631. "additionalProperties": false
  14632. },
  14633. "ConsoleState": {
  14634. "type": "object",
  14635. "properties": {
  14636. "consoleManagedProviders": {
  14637. "type": "array",
  14638. "items": {
  14639. "type": "string"
  14640. }
  14641. },
  14642. "activeOrgName": {
  14643. "type": "string"
  14644. },
  14645. "switchableOrgCount": {
  14646. "type": "integer",
  14647. "minimum": 0
  14648. }
  14649. },
  14650. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14651. "additionalProperties": false
  14652. },
  14653. "effect_HttpApiError_InternalServerError": {
  14654. "type": "object",
  14655. "properties": {
  14656. "_tag": {
  14657. "type": "string",
  14658. "enum": ["InternalServerError"]
  14659. }
  14660. },
  14661. "required": ["_tag"],
  14662. "additionalProperties": false
  14663. },
  14664. "ToolListItem": {
  14665. "type": "object",
  14666. "properties": {
  14667. "id": {
  14668. "type": "string"
  14669. },
  14670. "description": {
  14671. "type": "string"
  14672. },
  14673. "parameters": {}
  14674. },
  14675. "required": ["id", "description", "parameters"],
  14676. "additionalProperties": false
  14677. },
  14678. "ToolList": {
  14679. "type": "array",
  14680. "items": {
  14681. "$ref": "#/components/schemas/ToolListItem"
  14682. }
  14683. },
  14684. "ToolIDs": {
  14685. "type": "array",
  14686. "items": {
  14687. "type": "string"
  14688. }
  14689. },
  14690. "WorktreeError": {
  14691. "type": "object",
  14692. "properties": {
  14693. "name": {
  14694. "type": "string",
  14695. "enum": [
  14696. "WorktreeNotGitError",
  14697. "WorktreeNameGenerationFailedError",
  14698. "WorktreeCreateFailedError",
  14699. "WorktreeStartCommandFailedError",
  14700. "WorktreeRemoveFailedError",
  14701. "WorktreeResetFailedError",
  14702. "WorktreeListFailedError"
  14703. ]
  14704. },
  14705. "data": {
  14706. "type": "object",
  14707. "properties": {
  14708. "message": {
  14709. "type": "string"
  14710. }
  14711. },
  14712. "required": ["message"],
  14713. "additionalProperties": false
  14714. }
  14715. },
  14716. "required": ["name", "data"],
  14717. "additionalProperties": false
  14718. },
  14719. "WorktreeCreateInput": {
  14720. "type": "object",
  14721. "properties": {
  14722. "name": {
  14723. "type": "string"
  14724. },
  14725. "startCommand": {
  14726. "type": "string",
  14727. "description": "Additional startup script to run after the project's start command"
  14728. }
  14729. },
  14730. "additionalProperties": false
  14731. },
  14732. "Worktree": {
  14733. "type": "object",
  14734. "properties": {
  14735. "name": {
  14736. "type": "string"
  14737. },
  14738. "branch": {
  14739. "type": "string"
  14740. },
  14741. "directory": {
  14742. "type": "string"
  14743. }
  14744. },
  14745. "required": ["name", "directory"],
  14746. "additionalProperties": false
  14747. },
  14748. "WorktreeRemoveInput": {
  14749. "type": "object",
  14750. "properties": {
  14751. "directory": {
  14752. "type": "string"
  14753. }
  14754. },
  14755. "required": ["directory"],
  14756. "additionalProperties": false
  14757. },
  14758. "WorktreeResetInput": {
  14759. "type": "object",
  14760. "properties": {
  14761. "directory": {
  14762. "type": "string"
  14763. }
  14764. },
  14765. "required": ["directory"],
  14766. "additionalProperties": false
  14767. },
  14768. "ProjectSummary": {
  14769. "type": "object",
  14770. "properties": {
  14771. "id": {
  14772. "type": "string"
  14773. },
  14774. "name": {
  14775. "type": "string"
  14776. },
  14777. "worktree": {
  14778. "type": "string"
  14779. }
  14780. },
  14781. "required": ["id", "worktree"],
  14782. "additionalProperties": false
  14783. },
  14784. "GlobalSession": {
  14785. "type": "object",
  14786. "properties": {
  14787. "id": {
  14788. "type": "string",
  14789. "pattern": "^ses"
  14790. },
  14791. "slug": {
  14792. "type": "string"
  14793. },
  14794. "projectID": {
  14795. "type": "string"
  14796. },
  14797. "workspaceID": {
  14798. "type": "string",
  14799. "pattern": "^wrk"
  14800. },
  14801. "directory": {
  14802. "type": "string"
  14803. },
  14804. "path": {
  14805. "type": "string"
  14806. },
  14807. "parentID": {
  14808. "type": "string",
  14809. "pattern": "^ses"
  14810. },
  14811. "summary": {
  14812. "type": "object",
  14813. "properties": {
  14814. "additions": {
  14815. "type": "number"
  14816. },
  14817. "deletions": {
  14818. "type": "number"
  14819. },
  14820. "files": {
  14821. "type": "number"
  14822. },
  14823. "diffs": {
  14824. "type": "array",
  14825. "items": {
  14826. "$ref": "#/components/schemas/SnapshotFileDiff"
  14827. }
  14828. }
  14829. },
  14830. "required": ["additions", "deletions", "files"],
  14831. "additionalProperties": false
  14832. },
  14833. "cost": {
  14834. "type": "number"
  14835. },
  14836. "tokens": {
  14837. "type": "object",
  14838. "properties": {
  14839. "input": {
  14840. "type": "number"
  14841. },
  14842. "output": {
  14843. "type": "number"
  14844. },
  14845. "reasoning": {
  14846. "type": "number"
  14847. },
  14848. "cache": {
  14849. "type": "object",
  14850. "properties": {
  14851. "read": {
  14852. "type": "number"
  14853. },
  14854. "write": {
  14855. "type": "number"
  14856. }
  14857. },
  14858. "required": ["read", "write"],
  14859. "additionalProperties": false
  14860. }
  14861. },
  14862. "required": ["input", "output", "reasoning", "cache"],
  14863. "additionalProperties": false
  14864. },
  14865. "share": {
  14866. "type": "object",
  14867. "properties": {
  14868. "url": {
  14869. "type": "string"
  14870. }
  14871. },
  14872. "required": ["url"],
  14873. "additionalProperties": false
  14874. },
  14875. "title": {
  14876. "type": "string"
  14877. },
  14878. "agent": {
  14879. "type": "string"
  14880. },
  14881. "model": {
  14882. "type": "object",
  14883. "properties": {
  14884. "id": {
  14885. "type": "string"
  14886. },
  14887. "providerID": {
  14888. "type": "string"
  14889. },
  14890. "variant": {
  14891. "type": "string"
  14892. }
  14893. },
  14894. "required": ["id", "providerID"],
  14895. "additionalProperties": false
  14896. },
  14897. "version": {
  14898. "type": "string"
  14899. },
  14900. "time": {
  14901. "type": "object",
  14902. "properties": {
  14903. "created": {
  14904. "type": "integer",
  14905. "minimum": 0
  14906. },
  14907. "updated": {
  14908. "type": "integer",
  14909. "minimum": 0
  14910. },
  14911. "compacting": {
  14912. "type": "integer",
  14913. "minimum": 0
  14914. },
  14915. "archived": {
  14916. "type": "number"
  14917. }
  14918. },
  14919. "required": ["created", "updated"],
  14920. "additionalProperties": false
  14921. },
  14922. "permission": {
  14923. "$ref": "#/components/schemas/PermissionRuleset"
  14924. },
  14925. "revert": {
  14926. "type": "object",
  14927. "properties": {
  14928. "messageID": {
  14929. "type": "string",
  14930. "pattern": "^msg"
  14931. },
  14932. "partID": {
  14933. "type": "string",
  14934. "pattern": "^prt"
  14935. },
  14936. "snapshot": {
  14937. "type": "string"
  14938. },
  14939. "diff": {
  14940. "type": "string"
  14941. }
  14942. },
  14943. "required": ["messageID"],
  14944. "additionalProperties": false
  14945. },
  14946. "project": {
  14947. "anyOf": [
  14948. {
  14949. "$ref": "#/components/schemas/ProjectSummary"
  14950. },
  14951. {
  14952. "type": "null"
  14953. }
  14954. ]
  14955. }
  14956. },
  14957. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14958. "additionalProperties": false
  14959. },
  14960. "McpResource": {
  14961. "type": "object",
  14962. "properties": {
  14963. "name": {
  14964. "type": "string"
  14965. },
  14966. "uri": {
  14967. "type": "string"
  14968. },
  14969. "description": {
  14970. "type": "string"
  14971. },
  14972. "mimeType": {
  14973. "type": "string"
  14974. },
  14975. "client": {
  14976. "type": "string"
  14977. }
  14978. },
  14979. "required": ["name", "uri", "client"],
  14980. "additionalProperties": false
  14981. },
  14982. "Symbol": {
  14983. "type": "object",
  14984. "properties": {
  14985. "name": {
  14986. "type": "string"
  14987. },
  14988. "kind": {
  14989. "type": "integer",
  14990. "minimum": 0
  14991. },
  14992. "location": {
  14993. "type": "object",
  14994. "properties": {
  14995. "uri": {
  14996. "type": "string"
  14997. },
  14998. "range": {
  14999. "$ref": "#/components/schemas/Range"
  15000. }
  15001. },
  15002. "required": ["uri", "range"],
  15003. "additionalProperties": false
  15004. }
  15005. },
  15006. "required": ["name", "kind", "location"],
  15007. "additionalProperties": false
  15008. },
  15009. "FileNode": {
  15010. "type": "object",
  15011. "properties": {
  15012. "name": {
  15013. "type": "string"
  15014. },
  15015. "path": {
  15016. "type": "string"
  15017. },
  15018. "absolute": {
  15019. "type": "string"
  15020. },
  15021. "type": {
  15022. "type": "string",
  15023. "enum": ["file", "directory"]
  15024. },
  15025. "ignored": {
  15026. "type": "boolean"
  15027. }
  15028. },
  15029. "required": ["name", "path", "absolute", "type", "ignored"],
  15030. "additionalProperties": false
  15031. },
  15032. "FileContent": {
  15033. "type": "object",
  15034. "properties": {
  15035. "type": {
  15036. "type": "string",
  15037. "enum": ["text", "binary"]
  15038. },
  15039. "content": {
  15040. "type": "string"
  15041. },
  15042. "diff": {
  15043. "type": "string"
  15044. },
  15045. "patch": {
  15046. "type": "object",
  15047. "properties": {
  15048. "oldFileName": {
  15049. "type": "string"
  15050. },
  15051. "newFileName": {
  15052. "type": "string"
  15053. },
  15054. "oldHeader": {
  15055. "type": "string"
  15056. },
  15057. "newHeader": {
  15058. "type": "string"
  15059. },
  15060. "hunks": {
  15061. "type": "array",
  15062. "items": {
  15063. "type": "object",
  15064. "properties": {
  15065. "oldStart": {
  15066. "type": "integer",
  15067. "minimum": 0
  15068. },
  15069. "oldLines": {
  15070. "type": "integer",
  15071. "minimum": 0
  15072. },
  15073. "newStart": {
  15074. "type": "integer",
  15075. "minimum": 0
  15076. },
  15077. "newLines": {
  15078. "type": "integer",
  15079. "minimum": 0
  15080. },
  15081. "lines": {
  15082. "type": "array",
  15083. "items": {
  15084. "type": "string"
  15085. }
  15086. }
  15087. },
  15088. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  15089. "additionalProperties": false
  15090. }
  15091. },
  15092. "index": {
  15093. "type": "string"
  15094. }
  15095. },
  15096. "required": ["oldFileName", "newFileName", "hunks"],
  15097. "additionalProperties": false
  15098. },
  15099. "encoding": {
  15100. "type": "string",
  15101. "enum": ["base64"]
  15102. },
  15103. "mimeType": {
  15104. "type": "string"
  15105. }
  15106. },
  15107. "required": ["type", "content"],
  15108. "additionalProperties": false
  15109. },
  15110. "File": {
  15111. "type": "object",
  15112. "properties": {
  15113. "path": {
  15114. "type": "string"
  15115. },
  15116. "added": {
  15117. "type": "integer",
  15118. "minimum": 0
  15119. },
  15120. "removed": {
  15121. "type": "integer",
  15122. "minimum": 0
  15123. },
  15124. "status": {
  15125. "type": "string",
  15126. "enum": ["added", "deleted", "modified"]
  15127. }
  15128. },
  15129. "required": ["path", "added", "removed", "status"],
  15130. "additionalProperties": false
  15131. },
  15132. "Path": {
  15133. "type": "object",
  15134. "properties": {
  15135. "home": {
  15136. "type": "string"
  15137. },
  15138. "state": {
  15139. "type": "string"
  15140. },
  15141. "config": {
  15142. "type": "string"
  15143. },
  15144. "worktree": {
  15145. "type": "string"
  15146. },
  15147. "directory": {
  15148. "type": "string"
  15149. }
  15150. },
  15151. "required": ["home", "state", "config", "worktree", "directory"],
  15152. "additionalProperties": false
  15153. },
  15154. "VcsInfo": {
  15155. "type": "object",
  15156. "properties": {
  15157. "branch": {
  15158. "type": "string"
  15159. },
  15160. "default_branch": {
  15161. "type": "string"
  15162. }
  15163. },
  15164. "additionalProperties": false
  15165. },
  15166. "VcsFileStatus": {
  15167. "type": "object",
  15168. "properties": {
  15169. "file": {
  15170. "type": "string"
  15171. },
  15172. "additions": {
  15173. "type": "number"
  15174. },
  15175. "deletions": {
  15176. "type": "number"
  15177. },
  15178. "status": {
  15179. "type": "string",
  15180. "enum": ["added", "deleted", "modified"]
  15181. }
  15182. },
  15183. "required": ["file", "additions", "deletions", "status"],
  15184. "additionalProperties": false
  15185. },
  15186. "VcsFileDiff": {
  15187. "type": "object",
  15188. "properties": {
  15189. "file": {
  15190. "type": "string"
  15191. },
  15192. "patch": {
  15193. "type": "string"
  15194. },
  15195. "additions": {
  15196. "type": "number"
  15197. },
  15198. "deletions": {
  15199. "type": "number"
  15200. },
  15201. "status": {
  15202. "type": "string",
  15203. "enum": ["added", "deleted", "modified"]
  15204. }
  15205. },
  15206. "required": ["file", "additions", "deletions"],
  15207. "additionalProperties": false
  15208. },
  15209. "VcsApplyError": {
  15210. "type": "object",
  15211. "properties": {
  15212. "name": {
  15213. "type": "string",
  15214. "enum": ["VcsApplyError"]
  15215. },
  15216. "data": {
  15217. "type": "object",
  15218. "properties": {
  15219. "message": {
  15220. "type": "string"
  15221. },
  15222. "reason": {
  15223. "type": "string",
  15224. "enum": ["non-git", "not-clean"]
  15225. }
  15226. },
  15227. "required": ["message", "reason"],
  15228. "additionalProperties": false
  15229. }
  15230. },
  15231. "required": ["name", "data"],
  15232. "additionalProperties": false
  15233. },
  15234. "Command": {
  15235. "type": "object",
  15236. "properties": {
  15237. "name": {
  15238. "type": "string"
  15239. },
  15240. "description": {
  15241. "type": "string"
  15242. },
  15243. "agent": {
  15244. "type": "string"
  15245. },
  15246. "model": {
  15247. "type": "string"
  15248. },
  15249. "source": {
  15250. "type": "string",
  15251. "enum": ["command", "mcp", "skill"]
  15252. },
  15253. "template": {
  15254. "type": "string"
  15255. },
  15256. "subtask": {
  15257. "type": "boolean"
  15258. },
  15259. "hints": {
  15260. "type": "array",
  15261. "items": {
  15262. "type": "string"
  15263. }
  15264. }
  15265. },
  15266. "required": ["name", "template", "hints"],
  15267. "additionalProperties": false
  15268. },
  15269. "Agent": {
  15270. "type": "object",
  15271. "properties": {
  15272. "name": {
  15273. "type": "string"
  15274. },
  15275. "description": {
  15276. "type": "string"
  15277. },
  15278. "mode": {
  15279. "type": "string",
  15280. "enum": ["subagent", "primary", "all"]
  15281. },
  15282. "native": {
  15283. "type": "boolean"
  15284. },
  15285. "hidden": {
  15286. "type": "boolean"
  15287. },
  15288. "topP": {
  15289. "type": "number"
  15290. },
  15291. "temperature": {
  15292. "type": "number"
  15293. },
  15294. "color": {
  15295. "type": "string"
  15296. },
  15297. "permission": {
  15298. "$ref": "#/components/schemas/PermissionRuleset"
  15299. },
  15300. "model": {
  15301. "type": "object",
  15302. "properties": {
  15303. "modelID": {
  15304. "type": "string"
  15305. },
  15306. "providerID": {
  15307. "type": "string"
  15308. }
  15309. },
  15310. "required": ["modelID", "providerID"],
  15311. "additionalProperties": false
  15312. },
  15313. "variant": {
  15314. "type": "string"
  15315. },
  15316. "prompt": {
  15317. "type": "string"
  15318. },
  15319. "options": {
  15320. "type": "object"
  15321. },
  15322. "steps": {
  15323. "type": "number"
  15324. }
  15325. },
  15326. "required": ["name", "mode", "permission", "options"],
  15327. "additionalProperties": false
  15328. },
  15329. "LSPStatus": {
  15330. "type": "object",
  15331. "properties": {
  15332. "id": {
  15333. "type": "string"
  15334. },
  15335. "name": {
  15336. "type": "string"
  15337. },
  15338. "root": {
  15339. "type": "string"
  15340. },
  15341. "status": {
  15342. "type": "string",
  15343. "enum": ["connected", "error"]
  15344. }
  15345. },
  15346. "required": ["id", "name", "root", "status"],
  15347. "additionalProperties": false
  15348. },
  15349. "FormatterStatus": {
  15350. "type": "object",
  15351. "properties": {
  15352. "name": {
  15353. "type": "string"
  15354. },
  15355. "extensions": {
  15356. "type": "array",
  15357. "items": {
  15358. "type": "string"
  15359. }
  15360. },
  15361. "enabled": {
  15362. "type": "boolean"
  15363. }
  15364. },
  15365. "required": ["name", "extensions", "enabled"],
  15366. "additionalProperties": false
  15367. },
  15368. "MCPStatusConnected": {
  15369. "type": "object",
  15370. "properties": {
  15371. "status": {
  15372. "type": "string",
  15373. "enum": ["connected"]
  15374. }
  15375. },
  15376. "required": ["status"],
  15377. "additionalProperties": false
  15378. },
  15379. "MCPStatusDisabled": {
  15380. "type": "object",
  15381. "properties": {
  15382. "status": {
  15383. "type": "string",
  15384. "enum": ["disabled"]
  15385. }
  15386. },
  15387. "required": ["status"],
  15388. "additionalProperties": false
  15389. },
  15390. "MCPStatusFailed": {
  15391. "type": "object",
  15392. "properties": {
  15393. "status": {
  15394. "type": "string",
  15395. "enum": ["failed"]
  15396. },
  15397. "error": {
  15398. "type": "string"
  15399. }
  15400. },
  15401. "required": ["status", "error"],
  15402. "additionalProperties": false
  15403. },
  15404. "MCPStatusNeedsAuth": {
  15405. "type": "object",
  15406. "properties": {
  15407. "status": {
  15408. "type": "string",
  15409. "enum": ["needs_auth"]
  15410. }
  15411. },
  15412. "required": ["status"],
  15413. "additionalProperties": false
  15414. },
  15415. "MCPStatusNeedsClientRegistration": {
  15416. "type": "object",
  15417. "properties": {
  15418. "status": {
  15419. "type": "string",
  15420. "enum": ["needs_client_registration"]
  15421. },
  15422. "error": {
  15423. "type": "string"
  15424. }
  15425. },
  15426. "required": ["status", "error"],
  15427. "additionalProperties": false
  15428. },
  15429. "MCPStatus": {
  15430. "anyOf": [
  15431. {
  15432. "$ref": "#/components/schemas/MCPStatusConnected"
  15433. },
  15434. {
  15435. "$ref": "#/components/schemas/MCPStatusDisabled"
  15436. },
  15437. {
  15438. "$ref": "#/components/schemas/MCPStatusFailed"
  15439. },
  15440. {
  15441. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15442. },
  15443. {
  15444. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15445. }
  15446. ]
  15447. },
  15448. "McpUnsupportedOAuthError": {
  15449. "type": "object",
  15450. "properties": {
  15451. "error": {
  15452. "type": "string"
  15453. }
  15454. },
  15455. "required": ["error"],
  15456. "additionalProperties": false
  15457. },
  15458. "McpServerNotFoundError": {
  15459. "type": "object",
  15460. "properties": {
  15461. "_tag": {
  15462. "type": "string",
  15463. "enum": ["McpServerNotFoundError"]
  15464. },
  15465. "name": {
  15466. "type": "string"
  15467. },
  15468. "message": {
  15469. "type": "string"
  15470. }
  15471. },
  15472. "required": ["_tag", "name", "message"],
  15473. "additionalProperties": false
  15474. },
  15475. "ProjectNotFoundError": {
  15476. "type": "object",
  15477. "properties": {
  15478. "_tag": {
  15479. "type": "string",
  15480. "enum": ["ProjectNotFoundError"]
  15481. },
  15482. "projectID": {
  15483. "type": "string"
  15484. },
  15485. "message": {
  15486. "type": "string"
  15487. }
  15488. },
  15489. "required": ["_tag", "projectID", "message"],
  15490. "additionalProperties": false
  15491. },
  15492. "PtyNotFoundError": {
  15493. "type": "object",
  15494. "properties": {
  15495. "_tag": {
  15496. "type": "string",
  15497. "enum": ["PtyNotFoundError"]
  15498. },
  15499. "ptyID": {
  15500. "type": "string"
  15501. },
  15502. "message": {
  15503. "type": "string"
  15504. }
  15505. },
  15506. "required": ["_tag", "ptyID", "message"],
  15507. "additionalProperties": false
  15508. },
  15509. "PtyForbiddenError": {
  15510. "type": "object",
  15511. "properties": {
  15512. "_tag": {
  15513. "type": "string",
  15514. "enum": ["PtyForbiddenError"]
  15515. },
  15516. "message": {
  15517. "type": "string"
  15518. }
  15519. },
  15520. "required": ["_tag", "message"],
  15521. "additionalProperties": false
  15522. },
  15523. "QuestionNotFoundError": {
  15524. "type": "object",
  15525. "properties": {
  15526. "_tag": {
  15527. "type": "string",
  15528. "enum": ["QuestionNotFoundError"]
  15529. },
  15530. "requestID": {
  15531. "type": "string"
  15532. },
  15533. "message": {
  15534. "type": "string"
  15535. }
  15536. },
  15537. "required": ["_tag", "requestID", "message"],
  15538. "additionalProperties": false
  15539. },
  15540. "PermissionNotFoundError": {
  15541. "type": "object",
  15542. "properties": {
  15543. "_tag": {
  15544. "type": "string",
  15545. "enum": ["PermissionNotFoundError"]
  15546. },
  15547. "requestID": {
  15548. "type": "string"
  15549. },
  15550. "message": {
  15551. "type": "string"
  15552. }
  15553. },
  15554. "required": ["_tag", "requestID", "message"],
  15555. "additionalProperties": false
  15556. },
  15557. "ProviderAuthMethod": {
  15558. "type": "object",
  15559. "properties": {
  15560. "type": {
  15561. "type": "string",
  15562. "enum": ["oauth", "api"]
  15563. },
  15564. "label": {
  15565. "type": "string"
  15566. },
  15567. "prompts": {
  15568. "type": "array",
  15569. "items": {
  15570. "anyOf": [
  15571. {
  15572. "type": "object",
  15573. "properties": {
  15574. "type": {
  15575. "type": "string",
  15576. "enum": ["text"]
  15577. },
  15578. "key": {
  15579. "type": "string"
  15580. },
  15581. "message": {
  15582. "type": "string"
  15583. },
  15584. "placeholder": {
  15585. "type": "string"
  15586. },
  15587. "when": {
  15588. "type": "object",
  15589. "properties": {
  15590. "key": {
  15591. "type": "string"
  15592. },
  15593. "op": {
  15594. "type": "string",
  15595. "enum": ["eq", "neq"]
  15596. },
  15597. "value": {
  15598. "type": "string"
  15599. }
  15600. },
  15601. "required": ["key", "op", "value"],
  15602. "additionalProperties": false
  15603. }
  15604. },
  15605. "required": ["type", "key", "message"],
  15606. "additionalProperties": false
  15607. },
  15608. {
  15609. "type": "object",
  15610. "properties": {
  15611. "type": {
  15612. "type": "string",
  15613. "enum": ["select"]
  15614. },
  15615. "key": {
  15616. "type": "string"
  15617. },
  15618. "message": {
  15619. "type": "string"
  15620. },
  15621. "options": {
  15622. "type": "array",
  15623. "items": {
  15624. "type": "object",
  15625. "properties": {
  15626. "label": {
  15627. "type": "string"
  15628. },
  15629. "value": {
  15630. "type": "string"
  15631. },
  15632. "hint": {
  15633. "type": "string"
  15634. }
  15635. },
  15636. "required": ["label", "value"],
  15637. "additionalProperties": false
  15638. }
  15639. },
  15640. "when": {
  15641. "type": "object",
  15642. "properties": {
  15643. "key": {
  15644. "type": "string"
  15645. },
  15646. "op": {
  15647. "type": "string",
  15648. "enum": ["eq", "neq"]
  15649. },
  15650. "value": {
  15651. "type": "string"
  15652. }
  15653. },
  15654. "required": ["key", "op", "value"],
  15655. "additionalProperties": false
  15656. }
  15657. },
  15658. "required": ["type", "key", "message", "options"],
  15659. "additionalProperties": false
  15660. }
  15661. ]
  15662. }
  15663. }
  15664. },
  15665. "required": ["type", "label"],
  15666. "additionalProperties": false
  15667. },
  15668. "ProviderAuthAuthorization": {
  15669. "type": "object",
  15670. "properties": {
  15671. "url": {
  15672. "type": "string"
  15673. },
  15674. "method": {
  15675. "type": "string",
  15676. "enum": ["auto", "code"]
  15677. },
  15678. "instructions": {
  15679. "type": "string"
  15680. }
  15681. },
  15682. "required": ["url", "method", "instructions"],
  15683. "additionalProperties": false
  15684. },
  15685. "ProviderAuthError1": {
  15686. "type": "object",
  15687. "properties": {
  15688. "name": {
  15689. "type": "string",
  15690. "enum": [
  15691. "BadRequest",
  15692. "ProviderAuthOauthMissing",
  15693. "ProviderAuthOauthCodeMissing",
  15694. "ProviderAuthOauthCallbackFailed",
  15695. "ProviderAuthValidationFailed"
  15696. ]
  15697. },
  15698. "data": {
  15699. "type": "object",
  15700. "properties": {
  15701. "providerID": {
  15702. "type": "string"
  15703. },
  15704. "field": {
  15705. "type": "string"
  15706. },
  15707. "message": {
  15708. "type": "string"
  15709. },
  15710. "kind": {
  15711. "type": "string"
  15712. }
  15713. },
  15714. "additionalProperties": false
  15715. }
  15716. },
  15717. "required": ["name", "data"],
  15718. "additionalProperties": false
  15719. },
  15720. "NotFoundError": {
  15721. "type": "object",
  15722. "required": ["name", "data"],
  15723. "properties": {
  15724. "name": {
  15725. "type": "string",
  15726. "enum": ["NotFoundError"]
  15727. },
  15728. "data": {
  15729. "type": "object",
  15730. "required": ["message"],
  15731. "properties": {
  15732. "message": {
  15733. "type": "string"
  15734. }
  15735. }
  15736. }
  15737. }
  15738. },
  15739. "TextPartInput": {
  15740. "type": "object",
  15741. "properties": {
  15742. "id": {
  15743. "type": "string",
  15744. "pattern": "^prt"
  15745. },
  15746. "type": {
  15747. "type": "string",
  15748. "enum": ["text"]
  15749. },
  15750. "text": {
  15751. "type": "string"
  15752. },
  15753. "synthetic": {
  15754. "type": "boolean"
  15755. },
  15756. "ignored": {
  15757. "type": "boolean"
  15758. },
  15759. "time": {
  15760. "type": "object",
  15761. "properties": {
  15762. "start": {
  15763. "type": "integer",
  15764. "minimum": 0
  15765. },
  15766. "end": {
  15767. "type": "integer",
  15768. "minimum": 0
  15769. }
  15770. },
  15771. "required": ["start"],
  15772. "additionalProperties": false
  15773. },
  15774. "metadata": {
  15775. "type": "object"
  15776. }
  15777. },
  15778. "required": ["type", "text"],
  15779. "additionalProperties": false
  15780. },
  15781. "FilePartInput": {
  15782. "type": "object",
  15783. "properties": {
  15784. "id": {
  15785. "type": "string",
  15786. "pattern": "^prt"
  15787. },
  15788. "type": {
  15789. "type": "string",
  15790. "enum": ["file"]
  15791. },
  15792. "mime": {
  15793. "type": "string"
  15794. },
  15795. "filename": {
  15796. "type": "string"
  15797. },
  15798. "url": {
  15799. "type": "string"
  15800. },
  15801. "source": {
  15802. "$ref": "#/components/schemas/FilePartSource"
  15803. }
  15804. },
  15805. "required": ["type", "mime", "url"],
  15806. "additionalProperties": false
  15807. },
  15808. "AgentPartInput": {
  15809. "type": "object",
  15810. "properties": {
  15811. "id": {
  15812. "type": "string",
  15813. "pattern": "^prt"
  15814. },
  15815. "type": {
  15816. "type": "string",
  15817. "enum": ["agent"]
  15818. },
  15819. "name": {
  15820. "type": "string"
  15821. },
  15822. "source": {
  15823. "type": "object",
  15824. "properties": {
  15825. "value": {
  15826. "type": "string"
  15827. },
  15828. "start": {
  15829. "type": "integer",
  15830. "minimum": 0
  15831. },
  15832. "end": {
  15833. "type": "integer",
  15834. "minimum": 0
  15835. }
  15836. },
  15837. "required": ["value", "start", "end"],
  15838. "additionalProperties": false
  15839. }
  15840. },
  15841. "required": ["type", "name"],
  15842. "additionalProperties": false
  15843. },
  15844. "SubtaskPartInput": {
  15845. "type": "object",
  15846. "properties": {
  15847. "id": {
  15848. "type": "string",
  15849. "pattern": "^prt"
  15850. },
  15851. "type": {
  15852. "type": "string",
  15853. "enum": ["subtask"]
  15854. },
  15855. "prompt": {
  15856. "type": "string"
  15857. },
  15858. "description": {
  15859. "type": "string"
  15860. },
  15861. "agent": {
  15862. "type": "string"
  15863. },
  15864. "model": {
  15865. "type": "object",
  15866. "properties": {
  15867. "providerID": {
  15868. "type": "string"
  15869. },
  15870. "modelID": {
  15871. "type": "string"
  15872. }
  15873. },
  15874. "required": ["providerID", "modelID"],
  15875. "additionalProperties": false
  15876. },
  15877. "command": {
  15878. "type": "string"
  15879. }
  15880. },
  15881. "required": ["type", "prompt", "description", "agent"],
  15882. "additionalProperties": false
  15883. },
  15884. "SessionBusyError": {
  15885. "type": "object",
  15886. "properties": {
  15887. "_tag": {
  15888. "type": "string",
  15889. "enum": ["SessionBusyError"]
  15890. },
  15891. "sessionID": {
  15892. "type": "string"
  15893. },
  15894. "message": {
  15895. "type": "string"
  15896. }
  15897. },
  15898. "required": ["_tag", "sessionID", "message"],
  15899. "additionalProperties": false
  15900. },
  15901. "V2SessionsResponse": {
  15902. "type": "object",
  15903. "properties": {
  15904. "items": {
  15905. "type": "array",
  15906. "items": {
  15907. "$ref": "#/components/schemas/SessionInfo"
  15908. }
  15909. },
  15910. "cursor": {
  15911. "type": "object",
  15912. "properties": {
  15913. "previous": {
  15914. "type": "string"
  15915. },
  15916. "next": {
  15917. "type": "string"
  15918. }
  15919. },
  15920. "additionalProperties": false
  15921. }
  15922. },
  15923. "required": ["items", "cursor"],
  15924. "additionalProperties": false
  15925. },
  15926. "InvalidCursorError": {
  15927. "type": "object",
  15928. "properties": {
  15929. "_tag": {
  15930. "type": "string",
  15931. "enum": ["InvalidCursorError"]
  15932. },
  15933. "message": {
  15934. "type": "string"
  15935. }
  15936. },
  15937. "required": ["_tag", "message"],
  15938. "additionalProperties": false
  15939. },
  15940. "UnauthorizedError": {
  15941. "type": "object",
  15942. "properties": {
  15943. "_tag": {
  15944. "type": "string",
  15945. "enum": ["UnauthorizedError"]
  15946. },
  15947. "message": {
  15948. "type": "string"
  15949. }
  15950. },
  15951. "required": ["_tag", "message"],
  15952. "additionalProperties": false
  15953. },
  15954. "SessionNotFoundError": {
  15955. "type": "object",
  15956. "properties": {
  15957. "_tag": {
  15958. "type": "string",
  15959. "enum": ["SessionNotFoundError"]
  15960. },
  15961. "sessionID": {
  15962. "type": "string"
  15963. },
  15964. "message": {
  15965. "type": "string"
  15966. }
  15967. },
  15968. "required": ["_tag", "sessionID", "message"],
  15969. "additionalProperties": false
  15970. },
  15971. "ServiceUnavailableError": {
  15972. "type": "object",
  15973. "properties": {
  15974. "_tag": {
  15975. "type": "string",
  15976. "enum": ["ServiceUnavailableError"]
  15977. },
  15978. "message": {
  15979. "type": "string"
  15980. },
  15981. "service": {
  15982. "type": "string"
  15983. }
  15984. },
  15985. "required": ["_tag", "message"],
  15986. "additionalProperties": false
  15987. },
  15988. "UnknownError1": {
  15989. "type": "object",
  15990. "properties": {
  15991. "_tag": {
  15992. "type": "string",
  15993. "enum": ["UnknownError"]
  15994. },
  15995. "message": {
  15996. "type": "string"
  15997. },
  15998. "ref": {
  15999. "type": "string"
  16000. }
  16001. },
  16002. "required": ["_tag", "message"],
  16003. "additionalProperties": false
  16004. },
  16005. "V2SessionMessagesResponse": {
  16006. "type": "object",
  16007. "properties": {
  16008. "items": {
  16009. "type": "array",
  16010. "items": {
  16011. "$ref": "#/components/schemas/SessionMessage"
  16012. }
  16013. },
  16014. "cursor": {
  16015. "type": "object",
  16016. "properties": {
  16017. "previous": {
  16018. "type": "string"
  16019. },
  16020. "next": {
  16021. "type": "string"
  16022. }
  16023. },
  16024. "additionalProperties": false
  16025. }
  16026. },
  16027. "required": ["items", "cursor"],
  16028. "additionalProperties": false
  16029. },
  16030. "ProviderNotFoundError": {
  16031. "type": "object",
  16032. "properties": {
  16033. "_tag": {
  16034. "type": "string",
  16035. "enum": ["ProviderNotFoundError"]
  16036. },
  16037. "providerID": {
  16038. "type": "string"
  16039. },
  16040. "message": {
  16041. "type": "string"
  16042. }
  16043. },
  16044. "required": ["_tag", "providerID", "message"],
  16045. "additionalProperties": false
  16046. },
  16047. "EventTuiPromptAppend": {
  16048. "type": "object",
  16049. "properties": {
  16050. "type": {
  16051. "type": "string",
  16052. "enum": ["tui.prompt.append"]
  16053. },
  16054. "properties": {
  16055. "type": "object",
  16056. "properties": {
  16057. "text": {
  16058. "type": "string"
  16059. }
  16060. },
  16061. "required": ["text"],
  16062. "additionalProperties": false
  16063. }
  16064. },
  16065. "required": ["type", "properties"],
  16066. "additionalProperties": false
  16067. },
  16068. "EventTuiCommandExecute": {
  16069. "type": "object",
  16070. "properties": {
  16071. "type": {
  16072. "type": "string",
  16073. "enum": ["tui.command.execute"]
  16074. },
  16075. "properties": {
  16076. "type": "object",
  16077. "properties": {
  16078. "command": {
  16079. "anyOf": [
  16080. {
  16081. "type": "string",
  16082. "enum": [
  16083. "session.list",
  16084. "session.new",
  16085. "session.share",
  16086. "session.interrupt",
  16087. "session.compact",
  16088. "session.page.up",
  16089. "session.page.down",
  16090. "session.line.up",
  16091. "session.line.down",
  16092. "session.half.page.up",
  16093. "session.half.page.down",
  16094. "session.first",
  16095. "session.last",
  16096. "prompt.clear",
  16097. "prompt.submit",
  16098. "agent.cycle"
  16099. ]
  16100. },
  16101. {
  16102. "type": "string"
  16103. }
  16104. ]
  16105. }
  16106. },
  16107. "required": ["command"],
  16108. "additionalProperties": false
  16109. }
  16110. },
  16111. "required": ["type", "properties"],
  16112. "additionalProperties": false
  16113. },
  16114. "EventTuiToastShow": {
  16115. "type": "object",
  16116. "properties": {
  16117. "type": {
  16118. "type": "string",
  16119. "enum": ["tui.toast.show"]
  16120. },
  16121. "properties": {
  16122. "type": "object",
  16123. "properties": {
  16124. "title": {
  16125. "type": "string"
  16126. },
  16127. "message": {
  16128. "type": "string"
  16129. },
  16130. "variant": {
  16131. "type": "string",
  16132. "enum": ["info", "success", "warning", "error"]
  16133. },
  16134. "duration": {
  16135. "type": "integer",
  16136. "exclusiveMinimum": 0
  16137. }
  16138. },
  16139. "required": ["message", "variant"],
  16140. "additionalProperties": false
  16141. }
  16142. },
  16143. "required": ["type", "properties"],
  16144. "additionalProperties": false
  16145. },
  16146. "EventTuiSessionSelect": {
  16147. "type": "object",
  16148. "properties": {
  16149. "type": {
  16150. "type": "string",
  16151. "enum": ["tui.session.select"]
  16152. },
  16153. "properties": {
  16154. "type": "object",
  16155. "properties": {
  16156. "sessionID": {
  16157. "type": "string",
  16158. "pattern": "^ses",
  16159. "description": "Session ID to navigate to"
  16160. }
  16161. },
  16162. "required": ["sessionID"],
  16163. "additionalProperties": false
  16164. }
  16165. },
  16166. "required": ["type", "properties"],
  16167. "additionalProperties": false
  16168. },
  16169. "Workspace": {
  16170. "type": "object",
  16171. "properties": {
  16172. "id": {
  16173. "type": "string",
  16174. "pattern": "^wrk"
  16175. },
  16176. "type": {
  16177. "type": "string"
  16178. },
  16179. "name": {
  16180. "type": "string"
  16181. },
  16182. "branch": {
  16183. "anyOf": [
  16184. {
  16185. "type": "string"
  16186. },
  16187. {
  16188. "type": "null"
  16189. }
  16190. ]
  16191. },
  16192. "directory": {
  16193. "anyOf": [
  16194. {
  16195. "type": "string"
  16196. },
  16197. {
  16198. "type": "null"
  16199. }
  16200. ]
  16201. },
  16202. "extra": {
  16203. "anyOf": [
  16204. {},
  16205. {
  16206. "type": "null"
  16207. }
  16208. ]
  16209. },
  16210. "projectID": {
  16211. "type": "string"
  16212. },
  16213. "timeUsed": {
  16214. "anyOf": [
  16215. {
  16216. "type": "number"
  16217. },
  16218. {
  16219. "type": "string",
  16220. "enum": ["NaN"]
  16221. },
  16222. {
  16223. "type": "string",
  16224. "enum": ["Infinity"]
  16225. },
  16226. {
  16227. "type": "string",
  16228. "enum": ["-Infinity"]
  16229. },
  16230. {
  16231. "type": "string",
  16232. "enum": ["Infinity", "-Infinity", "NaN"]
  16233. }
  16234. ]
  16235. }
  16236. },
  16237. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16238. "additionalProperties": false
  16239. },
  16240. "WorkspaceWarpError": {
  16241. "type": "object",
  16242. "properties": {
  16243. "name": {
  16244. "type": "string",
  16245. "enum": ["WorkspaceWarpError"]
  16246. },
  16247. "data": {
  16248. "type": "object",
  16249. "properties": {
  16250. "message": {
  16251. "type": "string"
  16252. }
  16253. },
  16254. "required": ["message"],
  16255. "additionalProperties": false
  16256. }
  16257. },
  16258. "required": ["name", "data"],
  16259. "additionalProperties": false
  16260. },
  16261. "effect_HttpApiError_Forbidden": {
  16262. "type": "object",
  16263. "properties": {
  16264. "_tag": {
  16265. "type": "string",
  16266. "enum": ["Forbidden"]
  16267. }
  16268. },
  16269. "required": ["_tag"],
  16270. "additionalProperties": false
  16271. },
  16272. "SyncEventMessageUpdated": {
  16273. "type": "object",
  16274. "properties": {
  16275. "type": {
  16276. "type": "string",
  16277. "enum": ["sync"]
  16278. },
  16279. "name": {
  16280. "type": "string",
  16281. "enum": ["message.updated.1"]
  16282. },
  16283. "id": {
  16284. "type": "string"
  16285. },
  16286. "seq": {
  16287. "type": "number"
  16288. },
  16289. "aggregateID": {
  16290. "type": "string",
  16291. "enum": ["sessionID"]
  16292. },
  16293. "data": {
  16294. "type": "object",
  16295. "properties": {
  16296. "sessionID": {
  16297. "type": "string",
  16298. "pattern": "^ses"
  16299. },
  16300. "info": {
  16301. "$ref": "#/components/schemas/Message"
  16302. }
  16303. },
  16304. "required": ["sessionID", "info"],
  16305. "additionalProperties": false
  16306. }
  16307. },
  16308. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16309. "additionalProperties": false
  16310. },
  16311. "SyncEventMessageRemoved": {
  16312. "type": "object",
  16313. "properties": {
  16314. "type": {
  16315. "type": "string",
  16316. "enum": ["sync"]
  16317. },
  16318. "name": {
  16319. "type": "string",
  16320. "enum": ["message.removed.1"]
  16321. },
  16322. "id": {
  16323. "type": "string"
  16324. },
  16325. "seq": {
  16326. "type": "number"
  16327. },
  16328. "aggregateID": {
  16329. "type": "string",
  16330. "enum": ["sessionID"]
  16331. },
  16332. "data": {
  16333. "type": "object",
  16334. "properties": {
  16335. "sessionID": {
  16336. "type": "string",
  16337. "pattern": "^ses"
  16338. },
  16339. "messageID": {
  16340. "type": "string",
  16341. "pattern": "^msg"
  16342. }
  16343. },
  16344. "required": ["sessionID", "messageID"],
  16345. "additionalProperties": false
  16346. }
  16347. },
  16348. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16349. "additionalProperties": false
  16350. },
  16351. "SyncEventMessagePartUpdated": {
  16352. "type": "object",
  16353. "properties": {
  16354. "type": {
  16355. "type": "string",
  16356. "enum": ["sync"]
  16357. },
  16358. "name": {
  16359. "type": "string",
  16360. "enum": ["message.part.updated.1"]
  16361. },
  16362. "id": {
  16363. "type": "string"
  16364. },
  16365. "seq": {
  16366. "type": "number"
  16367. },
  16368. "aggregateID": {
  16369. "type": "string",
  16370. "enum": ["sessionID"]
  16371. },
  16372. "data": {
  16373. "type": "object",
  16374. "properties": {
  16375. "sessionID": {
  16376. "type": "string",
  16377. "pattern": "^ses"
  16378. },
  16379. "part": {
  16380. "$ref": "#/components/schemas/Part"
  16381. },
  16382. "time": {
  16383. "type": "integer",
  16384. "minimum": 0
  16385. }
  16386. },
  16387. "required": ["sessionID", "part", "time"],
  16388. "additionalProperties": false
  16389. }
  16390. },
  16391. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16392. "additionalProperties": false
  16393. },
  16394. "SyncEventMessagePartRemoved": {
  16395. "type": "object",
  16396. "properties": {
  16397. "type": {
  16398. "type": "string",
  16399. "enum": ["sync"]
  16400. },
  16401. "name": {
  16402. "type": "string",
  16403. "enum": ["message.part.removed.1"]
  16404. },
  16405. "id": {
  16406. "type": "string"
  16407. },
  16408. "seq": {
  16409. "type": "number"
  16410. },
  16411. "aggregateID": {
  16412. "type": "string",
  16413. "enum": ["sessionID"]
  16414. },
  16415. "data": {
  16416. "type": "object",
  16417. "properties": {
  16418. "sessionID": {
  16419. "type": "string",
  16420. "pattern": "^ses"
  16421. },
  16422. "messageID": {
  16423. "type": "string",
  16424. "pattern": "^msg"
  16425. },
  16426. "partID": {
  16427. "type": "string",
  16428. "pattern": "^prt"
  16429. }
  16430. },
  16431. "required": ["sessionID", "messageID", "partID"],
  16432. "additionalProperties": false
  16433. }
  16434. },
  16435. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16436. "additionalProperties": false
  16437. },
  16438. "SyncEventSessionCreated": {
  16439. "type": "object",
  16440. "properties": {
  16441. "type": {
  16442. "type": "string",
  16443. "enum": ["sync"]
  16444. },
  16445. "name": {
  16446. "type": "string",
  16447. "enum": ["session.created.1"]
  16448. },
  16449. "id": {
  16450. "type": "string"
  16451. },
  16452. "seq": {
  16453. "type": "number"
  16454. },
  16455. "aggregateID": {
  16456. "type": "string",
  16457. "enum": ["sessionID"]
  16458. },
  16459. "data": {
  16460. "type": "object",
  16461. "properties": {
  16462. "sessionID": {
  16463. "type": "string",
  16464. "pattern": "^ses"
  16465. },
  16466. "info": {
  16467. "$ref": "#/components/schemas/Session"
  16468. }
  16469. },
  16470. "required": ["sessionID", "info"],
  16471. "additionalProperties": false
  16472. }
  16473. },
  16474. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16475. "additionalProperties": false
  16476. },
  16477. "SyncEventSessionUpdated": {
  16478. "type": "object",
  16479. "properties": {
  16480. "type": {
  16481. "type": "string",
  16482. "enum": ["sync"]
  16483. },
  16484. "name": {
  16485. "type": "string",
  16486. "enum": ["session.updated.1"]
  16487. },
  16488. "id": {
  16489. "type": "string"
  16490. },
  16491. "seq": {
  16492. "type": "number"
  16493. },
  16494. "aggregateID": {
  16495. "type": "string",
  16496. "enum": ["sessionID"]
  16497. },
  16498. "data": {
  16499. "type": "object",
  16500. "properties": {
  16501. "sessionID": {
  16502. "type": "string",
  16503. "pattern": "^ses"
  16504. },
  16505. "info": {
  16506. "type": "object",
  16507. "properties": {
  16508. "id": {
  16509. "anyOf": [
  16510. {
  16511. "type": "string",
  16512. "pattern": "^ses"
  16513. },
  16514. {
  16515. "type": "null"
  16516. }
  16517. ]
  16518. },
  16519. "slug": {
  16520. "anyOf": [
  16521. {
  16522. "type": "string"
  16523. },
  16524. {
  16525. "type": "null"
  16526. }
  16527. ]
  16528. },
  16529. "projectID": {
  16530. "anyOf": [
  16531. {
  16532. "type": "string"
  16533. },
  16534. {
  16535. "type": "null"
  16536. }
  16537. ]
  16538. },
  16539. "workspaceID": {
  16540. "anyOf": [
  16541. {
  16542. "type": "string",
  16543. "pattern": "^wrk"
  16544. },
  16545. {
  16546. "type": "null"
  16547. }
  16548. ]
  16549. },
  16550. "directory": {
  16551. "anyOf": [
  16552. {
  16553. "type": "string"
  16554. },
  16555. {
  16556. "type": "null"
  16557. }
  16558. ]
  16559. },
  16560. "path": {
  16561. "anyOf": [
  16562. {
  16563. "type": "string"
  16564. },
  16565. {
  16566. "type": "null"
  16567. }
  16568. ]
  16569. },
  16570. "parentID": {
  16571. "anyOf": [
  16572. {
  16573. "type": "string",
  16574. "pattern": "^ses"
  16575. },
  16576. {
  16577. "type": "null"
  16578. }
  16579. ]
  16580. },
  16581. "summary": {
  16582. "anyOf": [
  16583. {
  16584. "type": "object",
  16585. "properties": {
  16586. "additions": {
  16587. "type": "number"
  16588. },
  16589. "deletions": {
  16590. "type": "number"
  16591. },
  16592. "files": {
  16593. "type": "number"
  16594. },
  16595. "diffs": {
  16596. "type": "array",
  16597. "items": {
  16598. "$ref": "#/components/schemas/SnapshotFileDiff"
  16599. }
  16600. }
  16601. },
  16602. "required": ["additions", "deletions", "files"],
  16603. "additionalProperties": false
  16604. },
  16605. {
  16606. "type": "null"
  16607. }
  16608. ]
  16609. },
  16610. "cost": {
  16611. "anyOf": [
  16612. {
  16613. "type": "number"
  16614. },
  16615. {
  16616. "type": "null"
  16617. }
  16618. ]
  16619. },
  16620. "tokens": {
  16621. "anyOf": [
  16622. {
  16623. "type": "object",
  16624. "properties": {
  16625. "input": {
  16626. "type": "number"
  16627. },
  16628. "output": {
  16629. "type": "number"
  16630. },
  16631. "reasoning": {
  16632. "type": "number"
  16633. },
  16634. "cache": {
  16635. "type": "object",
  16636. "properties": {
  16637. "read": {
  16638. "type": "number"
  16639. },
  16640. "write": {
  16641. "type": "number"
  16642. }
  16643. },
  16644. "required": ["read", "write"],
  16645. "additionalProperties": false
  16646. }
  16647. },
  16648. "required": ["input", "output", "reasoning", "cache"],
  16649. "additionalProperties": false
  16650. },
  16651. {
  16652. "type": "null"
  16653. }
  16654. ]
  16655. },
  16656. "share": {
  16657. "type": "object",
  16658. "properties": {
  16659. "url": {
  16660. "anyOf": [
  16661. {
  16662. "type": "string"
  16663. },
  16664. {
  16665. "type": "null"
  16666. }
  16667. ]
  16668. }
  16669. },
  16670. "additionalProperties": false
  16671. },
  16672. "title": {
  16673. "anyOf": [
  16674. {
  16675. "type": "string"
  16676. },
  16677. {
  16678. "type": "null"
  16679. }
  16680. ]
  16681. },
  16682. "agent": {
  16683. "anyOf": [
  16684. {
  16685. "type": "string"
  16686. },
  16687. {
  16688. "type": "null"
  16689. }
  16690. ]
  16691. },
  16692. "model": {
  16693. "anyOf": [
  16694. {
  16695. "type": "object",
  16696. "properties": {
  16697. "id": {
  16698. "type": "string"
  16699. },
  16700. "providerID": {
  16701. "type": "string"
  16702. },
  16703. "variant": {
  16704. "type": "string"
  16705. }
  16706. },
  16707. "required": ["id", "providerID"],
  16708. "additionalProperties": false
  16709. },
  16710. {
  16711. "type": "null"
  16712. }
  16713. ]
  16714. },
  16715. "version": {
  16716. "anyOf": [
  16717. {
  16718. "type": "string"
  16719. },
  16720. {
  16721. "type": "null"
  16722. }
  16723. ]
  16724. },
  16725. "time": {
  16726. "type": "object",
  16727. "properties": {
  16728. "created": {
  16729. "anyOf": [
  16730. {
  16731. "type": "integer",
  16732. "minimum": 0
  16733. },
  16734. {
  16735. "type": "null"
  16736. }
  16737. ]
  16738. },
  16739. "updated": {
  16740. "anyOf": [
  16741. {
  16742. "type": "integer",
  16743. "minimum": 0
  16744. },
  16745. {
  16746. "type": "null"
  16747. }
  16748. ]
  16749. },
  16750. "compacting": {
  16751. "anyOf": [
  16752. {
  16753. "type": "integer",
  16754. "minimum": 0
  16755. },
  16756. {
  16757. "type": "null"
  16758. }
  16759. ]
  16760. },
  16761. "archived": {
  16762. "anyOf": [
  16763. {
  16764. "type": "number"
  16765. },
  16766. {
  16767. "type": "null"
  16768. }
  16769. ]
  16770. }
  16771. },
  16772. "additionalProperties": false
  16773. },
  16774. "permission": {
  16775. "anyOf": [
  16776. {
  16777. "$ref": "#/components/schemas/PermissionRuleset"
  16778. },
  16779. {
  16780. "type": "null"
  16781. }
  16782. ]
  16783. },
  16784. "revert": {
  16785. "anyOf": [
  16786. {
  16787. "type": "object",
  16788. "properties": {
  16789. "messageID": {
  16790. "type": "string",
  16791. "pattern": "^msg"
  16792. },
  16793. "partID": {
  16794. "type": "string",
  16795. "pattern": "^prt"
  16796. },
  16797. "snapshot": {
  16798. "type": "string"
  16799. },
  16800. "diff": {
  16801. "type": "string"
  16802. }
  16803. },
  16804. "required": ["messageID"],
  16805. "additionalProperties": false
  16806. },
  16807. {
  16808. "type": "null"
  16809. }
  16810. ]
  16811. }
  16812. },
  16813. "additionalProperties": false
  16814. }
  16815. },
  16816. "required": ["sessionID", "info"],
  16817. "additionalProperties": false
  16818. }
  16819. },
  16820. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16821. "additionalProperties": false
  16822. },
  16823. "SyncEventSessionDeleted": {
  16824. "type": "object",
  16825. "properties": {
  16826. "type": {
  16827. "type": "string",
  16828. "enum": ["sync"]
  16829. },
  16830. "name": {
  16831. "type": "string",
  16832. "enum": ["session.deleted.1"]
  16833. },
  16834. "id": {
  16835. "type": "string"
  16836. },
  16837. "seq": {
  16838. "type": "number"
  16839. },
  16840. "aggregateID": {
  16841. "type": "string",
  16842. "enum": ["sessionID"]
  16843. },
  16844. "data": {
  16845. "type": "object",
  16846. "properties": {
  16847. "sessionID": {
  16848. "type": "string",
  16849. "pattern": "^ses"
  16850. },
  16851. "info": {
  16852. "$ref": "#/components/schemas/Session"
  16853. }
  16854. },
  16855. "required": ["sessionID", "info"],
  16856. "additionalProperties": false
  16857. }
  16858. },
  16859. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16860. "additionalProperties": false
  16861. },
  16862. "SyncEventSessionNextAgentSwitched": {
  16863. "type": "object",
  16864. "properties": {
  16865. "type": {
  16866. "type": "string",
  16867. "enum": ["sync"]
  16868. },
  16869. "name": {
  16870. "type": "string",
  16871. "enum": ["session.next.agent.switched.1"]
  16872. },
  16873. "id": {
  16874. "type": "string"
  16875. },
  16876. "seq": {
  16877. "type": "number"
  16878. },
  16879. "aggregateID": {
  16880. "type": "string",
  16881. "enum": ["sessionID"]
  16882. },
  16883. "data": {
  16884. "type": "object",
  16885. "properties": {
  16886. "timestamp": {
  16887. "type": "number"
  16888. },
  16889. "sessionID": {
  16890. "type": "string",
  16891. "pattern": "^ses"
  16892. },
  16893. "agent": {
  16894. "type": "string"
  16895. }
  16896. },
  16897. "required": ["timestamp", "sessionID", "agent"],
  16898. "additionalProperties": false
  16899. }
  16900. },
  16901. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16902. "additionalProperties": false
  16903. },
  16904. "SyncEventSessionNextModelSwitched": {
  16905. "type": "object",
  16906. "properties": {
  16907. "type": {
  16908. "type": "string",
  16909. "enum": ["sync"]
  16910. },
  16911. "name": {
  16912. "type": "string",
  16913. "enum": ["session.next.model.switched.1"]
  16914. },
  16915. "id": {
  16916. "type": "string"
  16917. },
  16918. "seq": {
  16919. "type": "number"
  16920. },
  16921. "aggregateID": {
  16922. "type": "string",
  16923. "enum": ["sessionID"]
  16924. },
  16925. "data": {
  16926. "type": "object",
  16927. "properties": {
  16928. "timestamp": {
  16929. "type": "number"
  16930. },
  16931. "sessionID": {
  16932. "type": "string",
  16933. "pattern": "^ses"
  16934. },
  16935. "model": {
  16936. "type": "object",
  16937. "properties": {
  16938. "id": {
  16939. "type": "string"
  16940. },
  16941. "providerID": {
  16942. "type": "string"
  16943. },
  16944. "variant": {
  16945. "type": "string"
  16946. }
  16947. },
  16948. "required": ["id", "providerID", "variant"],
  16949. "additionalProperties": false
  16950. }
  16951. },
  16952. "required": ["timestamp", "sessionID", "model"],
  16953. "additionalProperties": false
  16954. }
  16955. },
  16956. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16957. "additionalProperties": false
  16958. },
  16959. "SyncEventSessionNextPrompted": {
  16960. "type": "object",
  16961. "properties": {
  16962. "type": {
  16963. "type": "string",
  16964. "enum": ["sync"]
  16965. },
  16966. "name": {
  16967. "type": "string",
  16968. "enum": ["session.next.prompted.1"]
  16969. },
  16970. "id": {
  16971. "type": "string"
  16972. },
  16973. "seq": {
  16974. "type": "number"
  16975. },
  16976. "aggregateID": {
  16977. "type": "string",
  16978. "enum": ["sessionID"]
  16979. },
  16980. "data": {
  16981. "type": "object",
  16982. "properties": {
  16983. "timestamp": {
  16984. "type": "number"
  16985. },
  16986. "sessionID": {
  16987. "type": "string",
  16988. "pattern": "^ses"
  16989. },
  16990. "prompt": {
  16991. "$ref": "#/components/schemas/Prompt"
  16992. }
  16993. },
  16994. "required": ["timestamp", "sessionID", "prompt"],
  16995. "additionalProperties": false
  16996. }
  16997. },
  16998. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16999. "additionalProperties": false
  17000. },
  17001. "SyncEventSessionNextSynthetic": {
  17002. "type": "object",
  17003. "properties": {
  17004. "type": {
  17005. "type": "string",
  17006. "enum": ["sync"]
  17007. },
  17008. "name": {
  17009. "type": "string",
  17010. "enum": ["session.next.synthetic.1"]
  17011. },
  17012. "id": {
  17013. "type": "string"
  17014. },
  17015. "seq": {
  17016. "type": "number"
  17017. },
  17018. "aggregateID": {
  17019. "type": "string",
  17020. "enum": ["sessionID"]
  17021. },
  17022. "data": {
  17023. "type": "object",
  17024. "properties": {
  17025. "timestamp": {
  17026. "type": "number"
  17027. },
  17028. "sessionID": {
  17029. "type": "string",
  17030. "pattern": "^ses"
  17031. },
  17032. "text": {
  17033. "type": "string"
  17034. }
  17035. },
  17036. "required": ["timestamp", "sessionID", "text"],
  17037. "additionalProperties": false
  17038. }
  17039. },
  17040. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17041. "additionalProperties": false
  17042. },
  17043. "SyncEventSessionNextShellStarted": {
  17044. "type": "object",
  17045. "properties": {
  17046. "type": {
  17047. "type": "string",
  17048. "enum": ["sync"]
  17049. },
  17050. "name": {
  17051. "type": "string",
  17052. "enum": ["session.next.shell.started.1"]
  17053. },
  17054. "id": {
  17055. "type": "string"
  17056. },
  17057. "seq": {
  17058. "type": "number"
  17059. },
  17060. "aggregateID": {
  17061. "type": "string",
  17062. "enum": ["sessionID"]
  17063. },
  17064. "data": {
  17065. "type": "object",
  17066. "properties": {
  17067. "timestamp": {
  17068. "type": "number"
  17069. },
  17070. "sessionID": {
  17071. "type": "string",
  17072. "pattern": "^ses"
  17073. },
  17074. "callID": {
  17075. "type": "string"
  17076. },
  17077. "command": {
  17078. "type": "string"
  17079. }
  17080. },
  17081. "required": ["timestamp", "sessionID", "callID", "command"],
  17082. "additionalProperties": false
  17083. }
  17084. },
  17085. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17086. "additionalProperties": false
  17087. },
  17088. "SyncEventSessionNextShellEnded": {
  17089. "type": "object",
  17090. "properties": {
  17091. "type": {
  17092. "type": "string",
  17093. "enum": ["sync"]
  17094. },
  17095. "name": {
  17096. "type": "string",
  17097. "enum": ["session.next.shell.ended.1"]
  17098. },
  17099. "id": {
  17100. "type": "string"
  17101. },
  17102. "seq": {
  17103. "type": "number"
  17104. },
  17105. "aggregateID": {
  17106. "type": "string",
  17107. "enum": ["sessionID"]
  17108. },
  17109. "data": {
  17110. "type": "object",
  17111. "properties": {
  17112. "timestamp": {
  17113. "type": "number"
  17114. },
  17115. "sessionID": {
  17116. "type": "string",
  17117. "pattern": "^ses"
  17118. },
  17119. "callID": {
  17120. "type": "string"
  17121. },
  17122. "output": {
  17123. "type": "string"
  17124. }
  17125. },
  17126. "required": ["timestamp", "sessionID", "callID", "output"],
  17127. "additionalProperties": false
  17128. }
  17129. },
  17130. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17131. "additionalProperties": false
  17132. },
  17133. "SyncEventSessionNextStepStarted": {
  17134. "type": "object",
  17135. "properties": {
  17136. "type": {
  17137. "type": "string",
  17138. "enum": ["sync"]
  17139. },
  17140. "name": {
  17141. "type": "string",
  17142. "enum": ["session.next.step.started.1"]
  17143. },
  17144. "id": {
  17145. "type": "string"
  17146. },
  17147. "seq": {
  17148. "type": "number"
  17149. },
  17150. "aggregateID": {
  17151. "type": "string",
  17152. "enum": ["sessionID"]
  17153. },
  17154. "data": {
  17155. "type": "object",
  17156. "properties": {
  17157. "timestamp": {
  17158. "type": "number"
  17159. },
  17160. "sessionID": {
  17161. "type": "string",
  17162. "pattern": "^ses"
  17163. },
  17164. "agent": {
  17165. "type": "string"
  17166. },
  17167. "model": {
  17168. "type": "object",
  17169. "properties": {
  17170. "id": {
  17171. "type": "string"
  17172. },
  17173. "providerID": {
  17174. "type": "string"
  17175. },
  17176. "variant": {
  17177. "type": "string"
  17178. }
  17179. },
  17180. "required": ["id", "providerID", "variant"],
  17181. "additionalProperties": false
  17182. },
  17183. "snapshot": {
  17184. "type": "string"
  17185. }
  17186. },
  17187. "required": ["timestamp", "sessionID", "agent", "model"],
  17188. "additionalProperties": false
  17189. }
  17190. },
  17191. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17192. "additionalProperties": false
  17193. },
  17194. "SyncEventSessionNextStepEnded": {
  17195. "type": "object",
  17196. "properties": {
  17197. "type": {
  17198. "type": "string",
  17199. "enum": ["sync"]
  17200. },
  17201. "name": {
  17202. "type": "string",
  17203. "enum": ["session.next.step.ended.1"]
  17204. },
  17205. "id": {
  17206. "type": "string"
  17207. },
  17208. "seq": {
  17209. "type": "number"
  17210. },
  17211. "aggregateID": {
  17212. "type": "string",
  17213. "enum": ["sessionID"]
  17214. },
  17215. "data": {
  17216. "type": "object",
  17217. "properties": {
  17218. "timestamp": {
  17219. "type": "number"
  17220. },
  17221. "sessionID": {
  17222. "type": "string",
  17223. "pattern": "^ses"
  17224. },
  17225. "finish": {
  17226. "type": "string"
  17227. },
  17228. "cost": {
  17229. "type": "number"
  17230. },
  17231. "tokens": {
  17232. "type": "object",
  17233. "properties": {
  17234. "input": {
  17235. "type": "number"
  17236. },
  17237. "output": {
  17238. "type": "number"
  17239. },
  17240. "reasoning": {
  17241. "type": "number"
  17242. },
  17243. "cache": {
  17244. "type": "object",
  17245. "properties": {
  17246. "read": {
  17247. "type": "number"
  17248. },
  17249. "write": {
  17250. "type": "number"
  17251. }
  17252. },
  17253. "required": ["read", "write"],
  17254. "additionalProperties": false
  17255. }
  17256. },
  17257. "required": ["input", "output", "reasoning", "cache"],
  17258. "additionalProperties": false
  17259. },
  17260. "snapshot": {
  17261. "type": "string"
  17262. }
  17263. },
  17264. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17265. "additionalProperties": false
  17266. }
  17267. },
  17268. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17269. "additionalProperties": false
  17270. },
  17271. "SyncEventSessionNextStepFailed": {
  17272. "type": "object",
  17273. "properties": {
  17274. "type": {
  17275. "type": "string",
  17276. "enum": ["sync"]
  17277. },
  17278. "name": {
  17279. "type": "string",
  17280. "enum": ["session.next.step.failed.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. "error": {
  17303. "$ref": "#/components/schemas/SessionErrorUnknown"
  17304. }
  17305. },
  17306. "required": ["timestamp", "sessionID", "error"],
  17307. "additionalProperties": false
  17308. }
  17309. },
  17310. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17311. "additionalProperties": false
  17312. },
  17313. "SyncEventSessionNextTextStarted": {
  17314. "type": "object",
  17315. "properties": {
  17316. "type": {
  17317. "type": "string",
  17318. "enum": ["sync"]
  17319. },
  17320. "name": {
  17321. "type": "string",
  17322. "enum": ["session.next.text.started.1"]
  17323. },
  17324. "id": {
  17325. "type": "string"
  17326. },
  17327. "seq": {
  17328. "type": "number"
  17329. },
  17330. "aggregateID": {
  17331. "type": "string",
  17332. "enum": ["sessionID"]
  17333. },
  17334. "data": {
  17335. "type": "object",
  17336. "properties": {
  17337. "timestamp": {
  17338. "type": "number"
  17339. },
  17340. "sessionID": {
  17341. "type": "string",
  17342. "pattern": "^ses"
  17343. }
  17344. },
  17345. "required": ["timestamp", "sessionID"],
  17346. "additionalProperties": false
  17347. }
  17348. },
  17349. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17350. "additionalProperties": false
  17351. },
  17352. "SyncEventSessionNextTextDelta": {
  17353. "type": "object",
  17354. "properties": {
  17355. "type": {
  17356. "type": "string",
  17357. "enum": ["sync"]
  17358. },
  17359. "name": {
  17360. "type": "string",
  17361. "enum": ["session.next.text.delta.1"]
  17362. },
  17363. "id": {
  17364. "type": "string"
  17365. },
  17366. "seq": {
  17367. "type": "number"
  17368. },
  17369. "aggregateID": {
  17370. "type": "string",
  17371. "enum": ["sessionID"]
  17372. },
  17373. "data": {
  17374. "type": "object",
  17375. "properties": {
  17376. "timestamp": {
  17377. "type": "number"
  17378. },
  17379. "sessionID": {
  17380. "type": "string",
  17381. "pattern": "^ses"
  17382. },
  17383. "delta": {
  17384. "type": "string"
  17385. }
  17386. },
  17387. "required": ["timestamp", "sessionID", "delta"],
  17388. "additionalProperties": false
  17389. }
  17390. },
  17391. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17392. "additionalProperties": false
  17393. },
  17394. "SyncEventSessionNextTextEnded": {
  17395. "type": "object",
  17396. "properties": {
  17397. "type": {
  17398. "type": "string",
  17399. "enum": ["sync"]
  17400. },
  17401. "name": {
  17402. "type": "string",
  17403. "enum": ["session.next.text.ended.1"]
  17404. },
  17405. "id": {
  17406. "type": "string"
  17407. },
  17408. "seq": {
  17409. "type": "number"
  17410. },
  17411. "aggregateID": {
  17412. "type": "string",
  17413. "enum": ["sessionID"]
  17414. },
  17415. "data": {
  17416. "type": "object",
  17417. "properties": {
  17418. "timestamp": {
  17419. "type": "number"
  17420. },
  17421. "sessionID": {
  17422. "type": "string",
  17423. "pattern": "^ses"
  17424. },
  17425. "text": {
  17426. "type": "string"
  17427. }
  17428. },
  17429. "required": ["timestamp", "sessionID", "text"],
  17430. "additionalProperties": false
  17431. }
  17432. },
  17433. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17434. "additionalProperties": false
  17435. },
  17436. "SyncEventSessionNextReasoningStarted": {
  17437. "type": "object",
  17438. "properties": {
  17439. "type": {
  17440. "type": "string",
  17441. "enum": ["sync"]
  17442. },
  17443. "name": {
  17444. "type": "string",
  17445. "enum": ["session.next.reasoning.started.1"]
  17446. },
  17447. "id": {
  17448. "type": "string"
  17449. },
  17450. "seq": {
  17451. "type": "number"
  17452. },
  17453. "aggregateID": {
  17454. "type": "string",
  17455. "enum": ["sessionID"]
  17456. },
  17457. "data": {
  17458. "type": "object",
  17459. "properties": {
  17460. "timestamp": {
  17461. "type": "number"
  17462. },
  17463. "sessionID": {
  17464. "type": "string",
  17465. "pattern": "^ses"
  17466. },
  17467. "reasoningID": {
  17468. "type": "string"
  17469. }
  17470. },
  17471. "required": ["timestamp", "sessionID", "reasoningID"],
  17472. "additionalProperties": false
  17473. }
  17474. },
  17475. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17476. "additionalProperties": false
  17477. },
  17478. "SyncEventSessionNextReasoningDelta": {
  17479. "type": "object",
  17480. "properties": {
  17481. "type": {
  17482. "type": "string",
  17483. "enum": ["sync"]
  17484. },
  17485. "name": {
  17486. "type": "string",
  17487. "enum": ["session.next.reasoning.delta.1"]
  17488. },
  17489. "id": {
  17490. "type": "string"
  17491. },
  17492. "seq": {
  17493. "type": "number"
  17494. },
  17495. "aggregateID": {
  17496. "type": "string",
  17497. "enum": ["sessionID"]
  17498. },
  17499. "data": {
  17500. "type": "object",
  17501. "properties": {
  17502. "timestamp": {
  17503. "type": "number"
  17504. },
  17505. "sessionID": {
  17506. "type": "string",
  17507. "pattern": "^ses"
  17508. },
  17509. "reasoningID": {
  17510. "type": "string"
  17511. },
  17512. "delta": {
  17513. "type": "string"
  17514. }
  17515. },
  17516. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17517. "additionalProperties": false
  17518. }
  17519. },
  17520. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17521. "additionalProperties": false
  17522. },
  17523. "SyncEventSessionNextReasoningEnded": {
  17524. "type": "object",
  17525. "properties": {
  17526. "type": {
  17527. "type": "string",
  17528. "enum": ["sync"]
  17529. },
  17530. "name": {
  17531. "type": "string",
  17532. "enum": ["session.next.reasoning.ended.1"]
  17533. },
  17534. "id": {
  17535. "type": "string"
  17536. },
  17537. "seq": {
  17538. "type": "number"
  17539. },
  17540. "aggregateID": {
  17541. "type": "string",
  17542. "enum": ["sessionID"]
  17543. },
  17544. "data": {
  17545. "type": "object",
  17546. "properties": {
  17547. "timestamp": {
  17548. "type": "number"
  17549. },
  17550. "sessionID": {
  17551. "type": "string",
  17552. "pattern": "^ses"
  17553. },
  17554. "reasoningID": {
  17555. "type": "string"
  17556. },
  17557. "text": {
  17558. "type": "string"
  17559. }
  17560. },
  17561. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17562. "additionalProperties": false
  17563. }
  17564. },
  17565. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17566. "additionalProperties": false
  17567. },
  17568. "SyncEventSessionNextToolInputStarted": {
  17569. "type": "object",
  17570. "properties": {
  17571. "type": {
  17572. "type": "string",
  17573. "enum": ["sync"]
  17574. },
  17575. "name": {
  17576. "type": "string",
  17577. "enum": ["session.next.tool.input.started.1"]
  17578. },
  17579. "id": {
  17580. "type": "string"
  17581. },
  17582. "seq": {
  17583. "type": "number"
  17584. },
  17585. "aggregateID": {
  17586. "type": "string",
  17587. "enum": ["sessionID"]
  17588. },
  17589. "data": {
  17590. "type": "object",
  17591. "properties": {
  17592. "timestamp": {
  17593. "type": "number"
  17594. },
  17595. "sessionID": {
  17596. "type": "string",
  17597. "pattern": "^ses"
  17598. },
  17599. "callID": {
  17600. "type": "string"
  17601. },
  17602. "name": {
  17603. "type": "string"
  17604. }
  17605. },
  17606. "required": ["timestamp", "sessionID", "callID", "name"],
  17607. "additionalProperties": false
  17608. }
  17609. },
  17610. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17611. "additionalProperties": false
  17612. },
  17613. "SyncEventSessionNextToolInputDelta": {
  17614. "type": "object",
  17615. "properties": {
  17616. "type": {
  17617. "type": "string",
  17618. "enum": ["sync"]
  17619. },
  17620. "name": {
  17621. "type": "string",
  17622. "enum": ["session.next.tool.input.delta.1"]
  17623. },
  17624. "id": {
  17625. "type": "string"
  17626. },
  17627. "seq": {
  17628. "type": "number"
  17629. },
  17630. "aggregateID": {
  17631. "type": "string",
  17632. "enum": ["sessionID"]
  17633. },
  17634. "data": {
  17635. "type": "object",
  17636. "properties": {
  17637. "timestamp": {
  17638. "type": "number"
  17639. },
  17640. "sessionID": {
  17641. "type": "string",
  17642. "pattern": "^ses"
  17643. },
  17644. "callID": {
  17645. "type": "string"
  17646. },
  17647. "delta": {
  17648. "type": "string"
  17649. }
  17650. },
  17651. "required": ["timestamp", "sessionID", "callID", "delta"],
  17652. "additionalProperties": false
  17653. }
  17654. },
  17655. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17656. "additionalProperties": false
  17657. },
  17658. "SyncEventSessionNextToolInputEnded": {
  17659. "type": "object",
  17660. "properties": {
  17661. "type": {
  17662. "type": "string",
  17663. "enum": ["sync"]
  17664. },
  17665. "name": {
  17666. "type": "string",
  17667. "enum": ["session.next.tool.input.ended.1"]
  17668. },
  17669. "id": {
  17670. "type": "string"
  17671. },
  17672. "seq": {
  17673. "type": "number"
  17674. },
  17675. "aggregateID": {
  17676. "type": "string",
  17677. "enum": ["sessionID"]
  17678. },
  17679. "data": {
  17680. "type": "object",
  17681. "properties": {
  17682. "timestamp": {
  17683. "type": "number"
  17684. },
  17685. "sessionID": {
  17686. "type": "string",
  17687. "pattern": "^ses"
  17688. },
  17689. "callID": {
  17690. "type": "string"
  17691. },
  17692. "text": {
  17693. "type": "string"
  17694. }
  17695. },
  17696. "required": ["timestamp", "sessionID", "callID", "text"],
  17697. "additionalProperties": false
  17698. }
  17699. },
  17700. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17701. "additionalProperties": false
  17702. },
  17703. "SyncEventSessionNextToolCalled": {
  17704. "type": "object",
  17705. "properties": {
  17706. "type": {
  17707. "type": "string",
  17708. "enum": ["sync"]
  17709. },
  17710. "name": {
  17711. "type": "string",
  17712. "enum": ["session.next.tool.called.1"]
  17713. },
  17714. "id": {
  17715. "type": "string"
  17716. },
  17717. "seq": {
  17718. "type": "number"
  17719. },
  17720. "aggregateID": {
  17721. "type": "string",
  17722. "enum": ["sessionID"]
  17723. },
  17724. "data": {
  17725. "type": "object",
  17726. "properties": {
  17727. "timestamp": {
  17728. "type": "number"
  17729. },
  17730. "sessionID": {
  17731. "type": "string",
  17732. "pattern": "^ses"
  17733. },
  17734. "callID": {
  17735. "type": "string"
  17736. },
  17737. "tool": {
  17738. "type": "string"
  17739. },
  17740. "input": {
  17741. "type": "object"
  17742. },
  17743. "provider": {
  17744. "type": "object",
  17745. "properties": {
  17746. "executed": {
  17747. "type": "boolean"
  17748. },
  17749. "metadata": {
  17750. "type": "object"
  17751. }
  17752. },
  17753. "required": ["executed"],
  17754. "additionalProperties": false
  17755. }
  17756. },
  17757. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17758. "additionalProperties": false
  17759. }
  17760. },
  17761. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17762. "additionalProperties": false
  17763. },
  17764. "SyncEventSessionNextToolProgress": {
  17765. "type": "object",
  17766. "properties": {
  17767. "type": {
  17768. "type": "string",
  17769. "enum": ["sync"]
  17770. },
  17771. "name": {
  17772. "type": "string",
  17773. "enum": ["session.next.tool.progress.1"]
  17774. },
  17775. "id": {
  17776. "type": "string"
  17777. },
  17778. "seq": {
  17779. "type": "number"
  17780. },
  17781. "aggregateID": {
  17782. "type": "string",
  17783. "enum": ["sessionID"]
  17784. },
  17785. "data": {
  17786. "type": "object",
  17787. "properties": {
  17788. "timestamp": {
  17789. "type": "number"
  17790. },
  17791. "sessionID": {
  17792. "type": "string",
  17793. "pattern": "^ses"
  17794. },
  17795. "callID": {
  17796. "type": "string"
  17797. },
  17798. "structured": {
  17799. "type": "object"
  17800. },
  17801. "content": {
  17802. "type": "array",
  17803. "items": {
  17804. "anyOf": [
  17805. {
  17806. "$ref": "#/components/schemas/ToolTextContent"
  17807. },
  17808. {
  17809. "$ref": "#/components/schemas/ToolFileContent"
  17810. }
  17811. ]
  17812. }
  17813. }
  17814. },
  17815. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17816. "additionalProperties": false
  17817. }
  17818. },
  17819. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17820. "additionalProperties": false
  17821. },
  17822. "SyncEventSessionNextToolSuccess": {
  17823. "type": "object",
  17824. "properties": {
  17825. "type": {
  17826. "type": "string",
  17827. "enum": ["sync"]
  17828. },
  17829. "name": {
  17830. "type": "string",
  17831. "enum": ["session.next.tool.success.1"]
  17832. },
  17833. "id": {
  17834. "type": "string"
  17835. },
  17836. "seq": {
  17837. "type": "number"
  17838. },
  17839. "aggregateID": {
  17840. "type": "string",
  17841. "enum": ["sessionID"]
  17842. },
  17843. "data": {
  17844. "type": "object",
  17845. "properties": {
  17846. "timestamp": {
  17847. "type": "number"
  17848. },
  17849. "sessionID": {
  17850. "type": "string",
  17851. "pattern": "^ses"
  17852. },
  17853. "callID": {
  17854. "type": "string"
  17855. },
  17856. "structured": {
  17857. "type": "object"
  17858. },
  17859. "content": {
  17860. "type": "array",
  17861. "items": {
  17862. "anyOf": [
  17863. {
  17864. "$ref": "#/components/schemas/ToolTextContent"
  17865. },
  17866. {
  17867. "$ref": "#/components/schemas/ToolFileContent"
  17868. }
  17869. ]
  17870. }
  17871. },
  17872. "provider": {
  17873. "type": "object",
  17874. "properties": {
  17875. "executed": {
  17876. "type": "boolean"
  17877. },
  17878. "metadata": {
  17879. "type": "object"
  17880. }
  17881. },
  17882. "required": ["executed"],
  17883. "additionalProperties": false
  17884. }
  17885. },
  17886. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17887. "additionalProperties": false
  17888. }
  17889. },
  17890. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17891. "additionalProperties": false
  17892. },
  17893. "SyncEventSessionNextToolFailed": {
  17894. "type": "object",
  17895. "properties": {
  17896. "type": {
  17897. "type": "string",
  17898. "enum": ["sync"]
  17899. },
  17900. "name": {
  17901. "type": "string",
  17902. "enum": ["session.next.tool.failed.1"]
  17903. },
  17904. "id": {
  17905. "type": "string"
  17906. },
  17907. "seq": {
  17908. "type": "number"
  17909. },
  17910. "aggregateID": {
  17911. "type": "string",
  17912. "enum": ["sessionID"]
  17913. },
  17914. "data": {
  17915. "type": "object",
  17916. "properties": {
  17917. "timestamp": {
  17918. "type": "number"
  17919. },
  17920. "sessionID": {
  17921. "type": "string",
  17922. "pattern": "^ses"
  17923. },
  17924. "callID": {
  17925. "type": "string"
  17926. },
  17927. "error": {
  17928. "$ref": "#/components/schemas/SessionErrorUnknown"
  17929. },
  17930. "provider": {
  17931. "type": "object",
  17932. "properties": {
  17933. "executed": {
  17934. "type": "boolean"
  17935. },
  17936. "metadata": {
  17937. "type": "object"
  17938. }
  17939. },
  17940. "required": ["executed"],
  17941. "additionalProperties": false
  17942. }
  17943. },
  17944. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17945. "additionalProperties": false
  17946. }
  17947. },
  17948. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17949. "additionalProperties": false
  17950. },
  17951. "SyncEventSessionNextRetried": {
  17952. "type": "object",
  17953. "properties": {
  17954. "type": {
  17955. "type": "string",
  17956. "enum": ["sync"]
  17957. },
  17958. "name": {
  17959. "type": "string",
  17960. "enum": ["session.next.retried.1"]
  17961. },
  17962. "id": {
  17963. "type": "string"
  17964. },
  17965. "seq": {
  17966. "type": "number"
  17967. },
  17968. "aggregateID": {
  17969. "type": "string",
  17970. "enum": ["sessionID"]
  17971. },
  17972. "data": {
  17973. "type": "object",
  17974. "properties": {
  17975. "timestamp": {
  17976. "type": "number"
  17977. },
  17978. "sessionID": {
  17979. "type": "string",
  17980. "pattern": "^ses"
  17981. },
  17982. "attempt": {
  17983. "type": "number"
  17984. },
  17985. "error": {
  17986. "$ref": "#/components/schemas/SessionNextRetry_error"
  17987. }
  17988. },
  17989. "required": ["timestamp", "sessionID", "attempt", "error"],
  17990. "additionalProperties": false
  17991. }
  17992. },
  17993. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17994. "additionalProperties": false
  17995. },
  17996. "SyncEventSessionNextCompactionStarted": {
  17997. "type": "object",
  17998. "properties": {
  17999. "type": {
  18000. "type": "string",
  18001. "enum": ["sync"]
  18002. },
  18003. "name": {
  18004. "type": "string",
  18005. "enum": ["session.next.compaction.started.1"]
  18006. },
  18007. "id": {
  18008. "type": "string"
  18009. },
  18010. "seq": {
  18011. "type": "number"
  18012. },
  18013. "aggregateID": {
  18014. "type": "string",
  18015. "enum": ["sessionID"]
  18016. },
  18017. "data": {
  18018. "type": "object",
  18019. "properties": {
  18020. "timestamp": {
  18021. "type": "number"
  18022. },
  18023. "sessionID": {
  18024. "type": "string",
  18025. "pattern": "^ses"
  18026. },
  18027. "reason": {
  18028. "type": "string",
  18029. "enum": ["auto", "manual"]
  18030. }
  18031. },
  18032. "required": ["timestamp", "sessionID", "reason"],
  18033. "additionalProperties": false
  18034. }
  18035. },
  18036. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18037. "additionalProperties": false
  18038. },
  18039. "SyncEventSessionNextCompactionDelta": {
  18040. "type": "object",
  18041. "properties": {
  18042. "type": {
  18043. "type": "string",
  18044. "enum": ["sync"]
  18045. },
  18046. "name": {
  18047. "type": "string",
  18048. "enum": ["session.next.compaction.delta.1"]
  18049. },
  18050. "id": {
  18051. "type": "string"
  18052. },
  18053. "seq": {
  18054. "type": "number"
  18055. },
  18056. "aggregateID": {
  18057. "type": "string",
  18058. "enum": ["sessionID"]
  18059. },
  18060. "data": {
  18061. "type": "object",
  18062. "properties": {
  18063. "timestamp": {
  18064. "type": "number"
  18065. },
  18066. "sessionID": {
  18067. "type": "string",
  18068. "pattern": "^ses"
  18069. },
  18070. "text": {
  18071. "type": "string"
  18072. }
  18073. },
  18074. "required": ["timestamp", "sessionID", "text"],
  18075. "additionalProperties": false
  18076. }
  18077. },
  18078. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18079. "additionalProperties": false
  18080. },
  18081. "SyncEventSessionNextCompactionEnded": {
  18082. "type": "object",
  18083. "properties": {
  18084. "type": {
  18085. "type": "string",
  18086. "enum": ["sync"]
  18087. },
  18088. "name": {
  18089. "type": "string",
  18090. "enum": ["session.next.compaction.ended.1"]
  18091. },
  18092. "id": {
  18093. "type": "string"
  18094. },
  18095. "seq": {
  18096. "type": "number"
  18097. },
  18098. "aggregateID": {
  18099. "type": "string",
  18100. "enum": ["sessionID"]
  18101. },
  18102. "data": {
  18103. "type": "object",
  18104. "properties": {
  18105. "timestamp": {
  18106. "type": "number"
  18107. },
  18108. "sessionID": {
  18109. "type": "string",
  18110. "pattern": "^ses"
  18111. },
  18112. "text": {
  18113. "type": "string"
  18114. },
  18115. "include": {
  18116. "type": "string"
  18117. }
  18118. },
  18119. "required": ["timestamp", "sessionID", "text"],
  18120. "additionalProperties": false
  18121. }
  18122. },
  18123. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18124. "additionalProperties": false
  18125. },
  18126. "EventServerConnected": {
  18127. "type": "object",
  18128. "properties": {
  18129. "id": {
  18130. "type": "string"
  18131. },
  18132. "type": {
  18133. "type": "string",
  18134. "enum": ["server.connected"]
  18135. },
  18136. "properties": {
  18137. "type": "object",
  18138. "properties": {}
  18139. }
  18140. },
  18141. "required": ["id", "type", "properties"],
  18142. "additionalProperties": false
  18143. },
  18144. "EventGlobalDisposed": {
  18145. "type": "object",
  18146. "properties": {
  18147. "id": {
  18148. "type": "string"
  18149. },
  18150. "type": {
  18151. "type": "string",
  18152. "enum": ["global.disposed"]
  18153. },
  18154. "properties": {
  18155. "type": "object",
  18156. "properties": {}
  18157. }
  18158. },
  18159. "required": ["id", "type", "properties"],
  18160. "additionalProperties": false
  18161. },
  18162. "EventServerInstanceDisposed": {
  18163. "type": "object",
  18164. "properties": {
  18165. "id": {
  18166. "type": "string"
  18167. },
  18168. "type": {
  18169. "type": "string",
  18170. "enum": ["server.instance.disposed"]
  18171. },
  18172. "properties": {
  18173. "type": "object",
  18174. "properties": {
  18175. "directory": {
  18176. "type": "string"
  18177. }
  18178. },
  18179. "required": ["directory"],
  18180. "additionalProperties": false
  18181. }
  18182. },
  18183. "required": ["id", "type", "properties"],
  18184. "additionalProperties": false
  18185. },
  18186. "EventFileEdited": {
  18187. "type": "object",
  18188. "properties": {
  18189. "id": {
  18190. "type": "string"
  18191. },
  18192. "type": {
  18193. "type": "string",
  18194. "enum": ["file.edited"]
  18195. },
  18196. "properties": {
  18197. "type": "object",
  18198. "properties": {
  18199. "file": {
  18200. "type": "string"
  18201. }
  18202. },
  18203. "required": ["file"],
  18204. "additionalProperties": false
  18205. }
  18206. },
  18207. "required": ["id", "type", "properties"],
  18208. "additionalProperties": false
  18209. },
  18210. "EventFileWatcherUpdated": {
  18211. "type": "object",
  18212. "properties": {
  18213. "id": {
  18214. "type": "string"
  18215. },
  18216. "type": {
  18217. "type": "string",
  18218. "enum": ["file.watcher.updated"]
  18219. },
  18220. "properties": {
  18221. "type": "object",
  18222. "properties": {
  18223. "file": {
  18224. "type": "string"
  18225. },
  18226. "event": {
  18227. "type": "string",
  18228. "enum": ["add", "change", "unlink"]
  18229. }
  18230. },
  18231. "required": ["file", "event"],
  18232. "additionalProperties": false
  18233. }
  18234. },
  18235. "required": ["id", "type", "properties"],
  18236. "additionalProperties": false
  18237. },
  18238. "EventLspClientDiagnostics": {
  18239. "type": "object",
  18240. "properties": {
  18241. "id": {
  18242. "type": "string"
  18243. },
  18244. "type": {
  18245. "type": "string",
  18246. "enum": ["lsp.client.diagnostics"]
  18247. },
  18248. "properties": {
  18249. "type": "object",
  18250. "properties": {
  18251. "serverID": {
  18252. "type": "string"
  18253. },
  18254. "path": {
  18255. "type": "string"
  18256. }
  18257. },
  18258. "required": ["serverID", "path"],
  18259. "additionalProperties": false
  18260. }
  18261. },
  18262. "required": ["id", "type", "properties"],
  18263. "additionalProperties": false
  18264. },
  18265. "EventLspUpdated": {
  18266. "type": "object",
  18267. "properties": {
  18268. "id": {
  18269. "type": "string"
  18270. },
  18271. "type": {
  18272. "type": "string",
  18273. "enum": ["lsp.updated"]
  18274. },
  18275. "properties": {
  18276. "type": "object",
  18277. "properties": {}
  18278. }
  18279. },
  18280. "required": ["id", "type", "properties"],
  18281. "additionalProperties": false
  18282. },
  18283. "EventMessagePartDelta": {
  18284. "type": "object",
  18285. "properties": {
  18286. "id": {
  18287. "type": "string"
  18288. },
  18289. "type": {
  18290. "type": "string",
  18291. "enum": ["message.part.delta"]
  18292. },
  18293. "properties": {
  18294. "type": "object",
  18295. "properties": {
  18296. "sessionID": {
  18297. "type": "string",
  18298. "pattern": "^ses"
  18299. },
  18300. "messageID": {
  18301. "type": "string",
  18302. "pattern": "^msg"
  18303. },
  18304. "partID": {
  18305. "type": "string",
  18306. "pattern": "^prt"
  18307. },
  18308. "field": {
  18309. "type": "string"
  18310. },
  18311. "delta": {
  18312. "type": "string"
  18313. }
  18314. },
  18315. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18316. "additionalProperties": false
  18317. }
  18318. },
  18319. "required": ["id", "type", "properties"],
  18320. "additionalProperties": false
  18321. },
  18322. "EventPermissionAsked": {
  18323. "type": "object",
  18324. "properties": {
  18325. "id": {
  18326. "type": "string"
  18327. },
  18328. "type": {
  18329. "type": "string",
  18330. "enum": ["permission.asked"]
  18331. },
  18332. "properties": {
  18333. "$ref": "#/components/schemas/PermissionRequest"
  18334. }
  18335. },
  18336. "required": ["id", "type", "properties"],
  18337. "additionalProperties": false
  18338. },
  18339. "EventPermissionReplied": {
  18340. "type": "object",
  18341. "properties": {
  18342. "id": {
  18343. "type": "string"
  18344. },
  18345. "type": {
  18346. "type": "string",
  18347. "enum": ["permission.replied"]
  18348. },
  18349. "properties": {
  18350. "type": "object",
  18351. "properties": {
  18352. "sessionID": {
  18353. "type": "string",
  18354. "pattern": "^ses"
  18355. },
  18356. "requestID": {
  18357. "type": "string",
  18358. "pattern": "^per"
  18359. },
  18360. "reply": {
  18361. "type": "string",
  18362. "enum": ["once", "always", "reject"]
  18363. }
  18364. },
  18365. "required": ["sessionID", "requestID", "reply"],
  18366. "additionalProperties": false
  18367. }
  18368. },
  18369. "required": ["id", "type", "properties"],
  18370. "additionalProperties": false
  18371. },
  18372. "EventSessionDiff": {
  18373. "type": "object",
  18374. "properties": {
  18375. "id": {
  18376. "type": "string"
  18377. },
  18378. "type": {
  18379. "type": "string",
  18380. "enum": ["session.diff"]
  18381. },
  18382. "properties": {
  18383. "type": "object",
  18384. "properties": {
  18385. "sessionID": {
  18386. "type": "string",
  18387. "pattern": "^ses"
  18388. },
  18389. "diff": {
  18390. "type": "array",
  18391. "items": {
  18392. "$ref": "#/components/schemas/SnapshotFileDiff"
  18393. }
  18394. }
  18395. },
  18396. "required": ["sessionID", "diff"],
  18397. "additionalProperties": false
  18398. }
  18399. },
  18400. "required": ["id", "type", "properties"],
  18401. "additionalProperties": false
  18402. },
  18403. "EventSessionError": {
  18404. "type": "object",
  18405. "properties": {
  18406. "id": {
  18407. "type": "string"
  18408. },
  18409. "type": {
  18410. "type": "string",
  18411. "enum": ["session.error"]
  18412. },
  18413. "properties": {
  18414. "type": "object",
  18415. "properties": {
  18416. "sessionID": {
  18417. "type": "string",
  18418. "pattern": "^ses"
  18419. },
  18420. "error": {
  18421. "anyOf": [
  18422. {
  18423. "$ref": "#/components/schemas/ProviderAuthError"
  18424. },
  18425. {
  18426. "$ref": "#/components/schemas/UnknownError"
  18427. },
  18428. {
  18429. "$ref": "#/components/schemas/MessageOutputLengthError"
  18430. },
  18431. {
  18432. "$ref": "#/components/schemas/MessageAbortedError"
  18433. },
  18434. {
  18435. "$ref": "#/components/schemas/StructuredOutputError"
  18436. },
  18437. {
  18438. "$ref": "#/components/schemas/ContextOverflowError"
  18439. },
  18440. {
  18441. "$ref": "#/components/schemas/APIError"
  18442. }
  18443. ]
  18444. }
  18445. },
  18446. "additionalProperties": false
  18447. }
  18448. },
  18449. "required": ["id", "type", "properties"],
  18450. "additionalProperties": false
  18451. },
  18452. "EventQuestionAsked": {
  18453. "type": "object",
  18454. "properties": {
  18455. "id": {
  18456. "type": "string"
  18457. },
  18458. "type": {
  18459. "type": "string",
  18460. "enum": ["question.asked"]
  18461. },
  18462. "properties": {
  18463. "$ref": "#/components/schemas/QuestionRequest"
  18464. }
  18465. },
  18466. "required": ["id", "type", "properties"],
  18467. "additionalProperties": false
  18468. },
  18469. "EventQuestionReplied": {
  18470. "type": "object",
  18471. "properties": {
  18472. "id": {
  18473. "type": "string"
  18474. },
  18475. "type": {
  18476. "type": "string",
  18477. "enum": ["question.replied"]
  18478. },
  18479. "properties": {
  18480. "$ref": "#/components/schemas/QuestionReplied"
  18481. }
  18482. },
  18483. "required": ["id", "type", "properties"],
  18484. "additionalProperties": false
  18485. },
  18486. "EventQuestionRejected": {
  18487. "type": "object",
  18488. "properties": {
  18489. "id": {
  18490. "type": "string"
  18491. },
  18492. "type": {
  18493. "type": "string",
  18494. "enum": ["question.rejected"]
  18495. },
  18496. "properties": {
  18497. "$ref": "#/components/schemas/QuestionRejected"
  18498. }
  18499. },
  18500. "required": ["id", "type", "properties"],
  18501. "additionalProperties": false
  18502. },
  18503. "EventTodoUpdated": {
  18504. "type": "object",
  18505. "properties": {
  18506. "id": {
  18507. "type": "string"
  18508. },
  18509. "type": {
  18510. "type": "string",
  18511. "enum": ["todo.updated"]
  18512. },
  18513. "properties": {
  18514. "type": "object",
  18515. "properties": {
  18516. "sessionID": {
  18517. "type": "string",
  18518. "pattern": "^ses"
  18519. },
  18520. "todos": {
  18521. "type": "array",
  18522. "items": {
  18523. "$ref": "#/components/schemas/Todo"
  18524. }
  18525. }
  18526. },
  18527. "required": ["sessionID", "todos"],
  18528. "additionalProperties": false
  18529. }
  18530. },
  18531. "required": ["id", "type", "properties"],
  18532. "additionalProperties": false
  18533. },
  18534. "EventSessionStatus": {
  18535. "type": "object",
  18536. "properties": {
  18537. "id": {
  18538. "type": "string"
  18539. },
  18540. "type": {
  18541. "type": "string",
  18542. "enum": ["session.status"]
  18543. },
  18544. "properties": {
  18545. "type": "object",
  18546. "properties": {
  18547. "sessionID": {
  18548. "type": "string",
  18549. "pattern": "^ses"
  18550. },
  18551. "status": {
  18552. "$ref": "#/components/schemas/SessionStatus"
  18553. }
  18554. },
  18555. "required": ["sessionID", "status"],
  18556. "additionalProperties": false
  18557. }
  18558. },
  18559. "required": ["id", "type", "properties"],
  18560. "additionalProperties": false
  18561. },
  18562. "EventSessionIdle": {
  18563. "type": "object",
  18564. "properties": {
  18565. "id": {
  18566. "type": "string"
  18567. },
  18568. "type": {
  18569. "type": "string",
  18570. "enum": ["session.idle"]
  18571. },
  18572. "properties": {
  18573. "type": "object",
  18574. "properties": {
  18575. "sessionID": {
  18576. "type": "string",
  18577. "pattern": "^ses"
  18578. }
  18579. },
  18580. "required": ["sessionID"],
  18581. "additionalProperties": false
  18582. }
  18583. },
  18584. "required": ["id", "type", "properties"],
  18585. "additionalProperties": false
  18586. },
  18587. "EventMcpToolsChanged": {
  18588. "type": "object",
  18589. "properties": {
  18590. "id": {
  18591. "type": "string"
  18592. },
  18593. "type": {
  18594. "type": "string",
  18595. "enum": ["mcp.tools.changed"]
  18596. },
  18597. "properties": {
  18598. "type": "object",
  18599. "properties": {
  18600. "server": {
  18601. "type": "string"
  18602. }
  18603. },
  18604. "required": ["server"],
  18605. "additionalProperties": false
  18606. }
  18607. },
  18608. "required": ["id", "type", "properties"],
  18609. "additionalProperties": false
  18610. },
  18611. "EventMcpBrowserOpenFailed": {
  18612. "type": "object",
  18613. "properties": {
  18614. "id": {
  18615. "type": "string"
  18616. },
  18617. "type": {
  18618. "type": "string",
  18619. "enum": ["mcp.browser.open.failed"]
  18620. },
  18621. "properties": {
  18622. "type": "object",
  18623. "properties": {
  18624. "mcpName": {
  18625. "type": "string"
  18626. },
  18627. "url": {
  18628. "type": "string"
  18629. }
  18630. },
  18631. "required": ["mcpName", "url"],
  18632. "additionalProperties": false
  18633. }
  18634. },
  18635. "required": ["id", "type", "properties"],
  18636. "additionalProperties": false
  18637. },
  18638. "EventCommandExecuted": {
  18639. "type": "object",
  18640. "properties": {
  18641. "id": {
  18642. "type": "string"
  18643. },
  18644. "type": {
  18645. "type": "string",
  18646. "enum": ["command.executed"]
  18647. },
  18648. "properties": {
  18649. "type": "object",
  18650. "properties": {
  18651. "name": {
  18652. "type": "string"
  18653. },
  18654. "sessionID": {
  18655. "type": "string",
  18656. "pattern": "^ses"
  18657. },
  18658. "arguments": {
  18659. "type": "string"
  18660. },
  18661. "messageID": {
  18662. "type": "string",
  18663. "pattern": "^msg"
  18664. }
  18665. },
  18666. "required": ["name", "sessionID", "arguments", "messageID"],
  18667. "additionalProperties": false
  18668. }
  18669. },
  18670. "required": ["id", "type", "properties"],
  18671. "additionalProperties": false
  18672. },
  18673. "EventProjectUpdated": {
  18674. "type": "object",
  18675. "properties": {
  18676. "id": {
  18677. "type": "string"
  18678. },
  18679. "type": {
  18680. "type": "string",
  18681. "enum": ["project.updated"]
  18682. },
  18683. "properties": {
  18684. "$ref": "#/components/schemas/Project"
  18685. }
  18686. },
  18687. "required": ["id", "type", "properties"],
  18688. "additionalProperties": false
  18689. },
  18690. "EventSessionCompacted": {
  18691. "type": "object",
  18692. "properties": {
  18693. "id": {
  18694. "type": "string"
  18695. },
  18696. "type": {
  18697. "type": "string",
  18698. "enum": ["session.compacted"]
  18699. },
  18700. "properties": {
  18701. "type": "object",
  18702. "properties": {
  18703. "sessionID": {
  18704. "type": "string",
  18705. "pattern": "^ses"
  18706. }
  18707. },
  18708. "required": ["sessionID"],
  18709. "additionalProperties": false
  18710. }
  18711. },
  18712. "required": ["id", "type", "properties"],
  18713. "additionalProperties": false
  18714. },
  18715. "EventVcsBranchUpdated": {
  18716. "type": "object",
  18717. "properties": {
  18718. "id": {
  18719. "type": "string"
  18720. },
  18721. "type": {
  18722. "type": "string",
  18723. "enum": ["vcs.branch.updated"]
  18724. },
  18725. "properties": {
  18726. "type": "object",
  18727. "properties": {
  18728. "branch": {
  18729. "type": "string"
  18730. }
  18731. },
  18732. "additionalProperties": false
  18733. }
  18734. },
  18735. "required": ["id", "type", "properties"],
  18736. "additionalProperties": false
  18737. },
  18738. "EventWorkspaceReady": {
  18739. "type": "object",
  18740. "properties": {
  18741. "id": {
  18742. "type": "string"
  18743. },
  18744. "type": {
  18745. "type": "string",
  18746. "enum": ["workspace.ready"]
  18747. },
  18748. "properties": {
  18749. "type": "object",
  18750. "properties": {
  18751. "name": {
  18752. "type": "string"
  18753. }
  18754. },
  18755. "required": ["name"],
  18756. "additionalProperties": false
  18757. }
  18758. },
  18759. "required": ["id", "type", "properties"],
  18760. "additionalProperties": false
  18761. },
  18762. "EventWorkspaceFailed": {
  18763. "type": "object",
  18764. "properties": {
  18765. "id": {
  18766. "type": "string"
  18767. },
  18768. "type": {
  18769. "type": "string",
  18770. "enum": ["workspace.failed"]
  18771. },
  18772. "properties": {
  18773. "type": "object",
  18774. "properties": {
  18775. "message": {
  18776. "type": "string"
  18777. }
  18778. },
  18779. "required": ["message"],
  18780. "additionalProperties": false
  18781. }
  18782. },
  18783. "required": ["id", "type", "properties"],
  18784. "additionalProperties": false
  18785. },
  18786. "EventWorkspaceStatus": {
  18787. "type": "object",
  18788. "properties": {
  18789. "id": {
  18790. "type": "string"
  18791. },
  18792. "type": {
  18793. "type": "string",
  18794. "enum": ["workspace.status"]
  18795. },
  18796. "properties": {
  18797. "type": "object",
  18798. "properties": {
  18799. "workspaceID": {
  18800. "type": "string",
  18801. "pattern": "^wrk"
  18802. },
  18803. "status": {
  18804. "type": "string",
  18805. "enum": ["connected", "connecting", "disconnected", "error"]
  18806. }
  18807. },
  18808. "required": ["workspaceID", "status"],
  18809. "additionalProperties": false
  18810. }
  18811. },
  18812. "required": ["id", "type", "properties"],
  18813. "additionalProperties": false
  18814. },
  18815. "EventWorktreeReady": {
  18816. "type": "object",
  18817. "properties": {
  18818. "id": {
  18819. "type": "string"
  18820. },
  18821. "type": {
  18822. "type": "string",
  18823. "enum": ["worktree.ready"]
  18824. },
  18825. "properties": {
  18826. "type": "object",
  18827. "properties": {
  18828. "name": {
  18829. "type": "string"
  18830. },
  18831. "branch": {
  18832. "type": "string"
  18833. }
  18834. },
  18835. "required": ["name"],
  18836. "additionalProperties": false
  18837. }
  18838. },
  18839. "required": ["id", "type", "properties"],
  18840. "additionalProperties": false
  18841. },
  18842. "EventWorktreeFailed": {
  18843. "type": "object",
  18844. "properties": {
  18845. "id": {
  18846. "type": "string"
  18847. },
  18848. "type": {
  18849. "type": "string",
  18850. "enum": ["worktree.failed"]
  18851. },
  18852. "properties": {
  18853. "type": "object",
  18854. "properties": {
  18855. "message": {
  18856. "type": "string"
  18857. }
  18858. },
  18859. "required": ["message"],
  18860. "additionalProperties": false
  18861. }
  18862. },
  18863. "required": ["id", "type", "properties"],
  18864. "additionalProperties": false
  18865. },
  18866. "EventPtyCreated": {
  18867. "type": "object",
  18868. "properties": {
  18869. "id": {
  18870. "type": "string"
  18871. },
  18872. "type": {
  18873. "type": "string",
  18874. "enum": ["pty.created"]
  18875. },
  18876. "properties": {
  18877. "type": "object",
  18878. "properties": {
  18879. "info": {
  18880. "$ref": "#/components/schemas/Pty"
  18881. }
  18882. },
  18883. "required": ["info"],
  18884. "additionalProperties": false
  18885. }
  18886. },
  18887. "required": ["id", "type", "properties"],
  18888. "additionalProperties": false
  18889. },
  18890. "EventPtyUpdated": {
  18891. "type": "object",
  18892. "properties": {
  18893. "id": {
  18894. "type": "string"
  18895. },
  18896. "type": {
  18897. "type": "string",
  18898. "enum": ["pty.updated"]
  18899. },
  18900. "properties": {
  18901. "type": "object",
  18902. "properties": {
  18903. "info": {
  18904. "$ref": "#/components/schemas/Pty"
  18905. }
  18906. },
  18907. "required": ["info"],
  18908. "additionalProperties": false
  18909. }
  18910. },
  18911. "required": ["id", "type", "properties"],
  18912. "additionalProperties": false
  18913. },
  18914. "EventPtyExited": {
  18915. "type": "object",
  18916. "properties": {
  18917. "id": {
  18918. "type": "string"
  18919. },
  18920. "type": {
  18921. "type": "string",
  18922. "enum": ["pty.exited"]
  18923. },
  18924. "properties": {
  18925. "type": "object",
  18926. "properties": {
  18927. "id": {
  18928. "type": "string",
  18929. "pattern": "^pty"
  18930. },
  18931. "exitCode": {
  18932. "type": "integer",
  18933. "minimum": 0
  18934. }
  18935. },
  18936. "required": ["id", "exitCode"],
  18937. "additionalProperties": false
  18938. }
  18939. },
  18940. "required": ["id", "type", "properties"],
  18941. "additionalProperties": false
  18942. },
  18943. "EventPtyDeleted": {
  18944. "type": "object",
  18945. "properties": {
  18946. "id": {
  18947. "type": "string"
  18948. },
  18949. "type": {
  18950. "type": "string",
  18951. "enum": ["pty.deleted"]
  18952. },
  18953. "properties": {
  18954. "type": "object",
  18955. "properties": {
  18956. "id": {
  18957. "type": "string",
  18958. "pattern": "^pty"
  18959. }
  18960. },
  18961. "required": ["id"],
  18962. "additionalProperties": false
  18963. }
  18964. },
  18965. "required": ["id", "type", "properties"],
  18966. "additionalProperties": false
  18967. },
  18968. "EventInstallationUpdated": {
  18969. "type": "object",
  18970. "properties": {
  18971. "id": {
  18972. "type": "string"
  18973. },
  18974. "type": {
  18975. "type": "string",
  18976. "enum": ["installation.updated"]
  18977. },
  18978. "properties": {
  18979. "type": "object",
  18980. "properties": {
  18981. "version": {
  18982. "type": "string"
  18983. }
  18984. },
  18985. "required": ["version"],
  18986. "additionalProperties": false
  18987. }
  18988. },
  18989. "required": ["id", "type", "properties"],
  18990. "additionalProperties": false
  18991. },
  18992. "EventInstallationUpdate-available": {
  18993. "type": "object",
  18994. "properties": {
  18995. "id": {
  18996. "type": "string"
  18997. },
  18998. "type": {
  18999. "type": "string",
  19000. "enum": ["installation.update-available"]
  19001. },
  19002. "properties": {
  19003. "type": "object",
  19004. "properties": {
  19005. "version": {
  19006. "type": "string"
  19007. }
  19008. },
  19009. "required": ["version"],
  19010. "additionalProperties": false
  19011. }
  19012. },
  19013. "required": ["id", "type", "properties"],
  19014. "additionalProperties": false
  19015. },
  19016. "EventMessageUpdated": {
  19017. "type": "object",
  19018. "properties": {
  19019. "id": {
  19020. "type": "string"
  19021. },
  19022. "type": {
  19023. "type": "string",
  19024. "enum": ["message.updated"]
  19025. },
  19026. "properties": {
  19027. "type": "object",
  19028. "properties": {
  19029. "sessionID": {
  19030. "type": "string",
  19031. "pattern": "^ses"
  19032. },
  19033. "info": {
  19034. "$ref": "#/components/schemas/Message"
  19035. }
  19036. },
  19037. "required": ["sessionID", "info"],
  19038. "additionalProperties": false
  19039. }
  19040. },
  19041. "required": ["id", "type", "properties"],
  19042. "additionalProperties": false
  19043. },
  19044. "EventMessageRemoved": {
  19045. "type": "object",
  19046. "properties": {
  19047. "id": {
  19048. "type": "string"
  19049. },
  19050. "type": {
  19051. "type": "string",
  19052. "enum": ["message.removed"]
  19053. },
  19054. "properties": {
  19055. "type": "object",
  19056. "properties": {
  19057. "sessionID": {
  19058. "type": "string",
  19059. "pattern": "^ses"
  19060. },
  19061. "messageID": {
  19062. "type": "string",
  19063. "pattern": "^msg"
  19064. }
  19065. },
  19066. "required": ["sessionID", "messageID"],
  19067. "additionalProperties": false
  19068. }
  19069. },
  19070. "required": ["id", "type", "properties"],
  19071. "additionalProperties": false
  19072. },
  19073. "EventMessagePartUpdated": {
  19074. "type": "object",
  19075. "properties": {
  19076. "id": {
  19077. "type": "string"
  19078. },
  19079. "type": {
  19080. "type": "string",
  19081. "enum": ["message.part.updated"]
  19082. },
  19083. "properties": {
  19084. "type": "object",
  19085. "properties": {
  19086. "sessionID": {
  19087. "type": "string",
  19088. "pattern": "^ses"
  19089. },
  19090. "part": {
  19091. "$ref": "#/components/schemas/Part"
  19092. },
  19093. "time": {
  19094. "type": "integer",
  19095. "minimum": 0
  19096. }
  19097. },
  19098. "required": ["sessionID", "part", "time"],
  19099. "additionalProperties": false
  19100. }
  19101. },
  19102. "required": ["id", "type", "properties"],
  19103. "additionalProperties": false
  19104. },
  19105. "EventMessagePartRemoved": {
  19106. "type": "object",
  19107. "properties": {
  19108. "id": {
  19109. "type": "string"
  19110. },
  19111. "type": {
  19112. "type": "string",
  19113. "enum": ["message.part.removed"]
  19114. },
  19115. "properties": {
  19116. "type": "object",
  19117. "properties": {
  19118. "sessionID": {
  19119. "type": "string",
  19120. "pattern": "^ses"
  19121. },
  19122. "messageID": {
  19123. "type": "string",
  19124. "pattern": "^msg"
  19125. },
  19126. "partID": {
  19127. "type": "string",
  19128. "pattern": "^prt"
  19129. }
  19130. },
  19131. "required": ["sessionID", "messageID", "partID"],
  19132. "additionalProperties": false
  19133. }
  19134. },
  19135. "required": ["id", "type", "properties"],
  19136. "additionalProperties": false
  19137. },
  19138. "EventSessionCreated": {
  19139. "type": "object",
  19140. "properties": {
  19141. "id": {
  19142. "type": "string"
  19143. },
  19144. "type": {
  19145. "type": "string",
  19146. "enum": ["session.created"]
  19147. },
  19148. "properties": {
  19149. "type": "object",
  19150. "properties": {
  19151. "sessionID": {
  19152. "type": "string",
  19153. "pattern": "^ses"
  19154. },
  19155. "info": {
  19156. "$ref": "#/components/schemas/Session"
  19157. }
  19158. },
  19159. "required": ["sessionID", "info"],
  19160. "additionalProperties": false
  19161. }
  19162. },
  19163. "required": ["id", "type", "properties"],
  19164. "additionalProperties": false
  19165. },
  19166. "EventSessionUpdated": {
  19167. "type": "object",
  19168. "properties": {
  19169. "id": {
  19170. "type": "string"
  19171. },
  19172. "type": {
  19173. "type": "string",
  19174. "enum": ["session.updated"]
  19175. },
  19176. "properties": {
  19177. "type": "object",
  19178. "properties": {
  19179. "sessionID": {
  19180. "type": "string",
  19181. "pattern": "^ses"
  19182. },
  19183. "info": {
  19184. "$ref": "#/components/schemas/Session"
  19185. }
  19186. },
  19187. "required": ["sessionID", "info"],
  19188. "additionalProperties": false
  19189. }
  19190. },
  19191. "required": ["id", "type", "properties"],
  19192. "additionalProperties": false
  19193. },
  19194. "EventSessionDeleted": {
  19195. "type": "object",
  19196. "properties": {
  19197. "id": {
  19198. "type": "string"
  19199. },
  19200. "type": {
  19201. "type": "string",
  19202. "enum": ["session.deleted"]
  19203. },
  19204. "properties": {
  19205. "type": "object",
  19206. "properties": {
  19207. "sessionID": {
  19208. "type": "string",
  19209. "pattern": "^ses"
  19210. },
  19211. "info": {
  19212. "$ref": "#/components/schemas/Session"
  19213. }
  19214. },
  19215. "required": ["sessionID", "info"],
  19216. "additionalProperties": false
  19217. }
  19218. },
  19219. "required": ["id", "type", "properties"],
  19220. "additionalProperties": false
  19221. },
  19222. "EventSessionNextAgentSwitched": {
  19223. "type": "object",
  19224. "properties": {
  19225. "id": {
  19226. "type": "string"
  19227. },
  19228. "type": {
  19229. "type": "string",
  19230. "enum": ["session.next.agent.switched"]
  19231. },
  19232. "properties": {
  19233. "type": "object",
  19234. "properties": {
  19235. "timestamp": {
  19236. "type": "number"
  19237. },
  19238. "sessionID": {
  19239. "type": "string",
  19240. "pattern": "^ses"
  19241. },
  19242. "agent": {
  19243. "type": "string"
  19244. }
  19245. },
  19246. "required": ["timestamp", "sessionID", "agent"],
  19247. "additionalProperties": false
  19248. }
  19249. },
  19250. "required": ["id", "type", "properties"],
  19251. "additionalProperties": false
  19252. },
  19253. "EventSessionNextModelSwitched": {
  19254. "type": "object",
  19255. "properties": {
  19256. "id": {
  19257. "type": "string"
  19258. },
  19259. "type": {
  19260. "type": "string",
  19261. "enum": ["session.next.model.switched"]
  19262. },
  19263. "properties": {
  19264. "type": "object",
  19265. "properties": {
  19266. "timestamp": {
  19267. "type": "number"
  19268. },
  19269. "sessionID": {
  19270. "type": "string",
  19271. "pattern": "^ses"
  19272. },
  19273. "model": {
  19274. "type": "object",
  19275. "properties": {
  19276. "id": {
  19277. "type": "string"
  19278. },
  19279. "providerID": {
  19280. "type": "string"
  19281. },
  19282. "variant": {
  19283. "type": "string"
  19284. }
  19285. },
  19286. "required": ["id", "providerID", "variant"],
  19287. "additionalProperties": false
  19288. }
  19289. },
  19290. "required": ["timestamp", "sessionID", "model"],
  19291. "additionalProperties": false
  19292. }
  19293. },
  19294. "required": ["id", "type", "properties"],
  19295. "additionalProperties": false
  19296. },
  19297. "PromptSource": {
  19298. "type": "object",
  19299. "properties": {
  19300. "start": {
  19301. "type": "number"
  19302. },
  19303. "end": {
  19304. "type": "number"
  19305. },
  19306. "text": {
  19307. "type": "string"
  19308. }
  19309. },
  19310. "required": ["start", "end", "text"],
  19311. "additionalProperties": false
  19312. },
  19313. "PromptFileAttachment": {
  19314. "type": "object",
  19315. "properties": {
  19316. "uri": {
  19317. "type": "string"
  19318. },
  19319. "mime": {
  19320. "type": "string"
  19321. },
  19322. "name": {
  19323. "type": "string"
  19324. },
  19325. "description": {
  19326. "type": "string"
  19327. },
  19328. "source": {
  19329. "$ref": "#/components/schemas/PromptSource"
  19330. }
  19331. },
  19332. "required": ["uri", "mime"],
  19333. "additionalProperties": false
  19334. },
  19335. "PromptAgentAttachment": {
  19336. "type": "object",
  19337. "properties": {
  19338. "name": {
  19339. "type": "string"
  19340. },
  19341. "source": {
  19342. "$ref": "#/components/schemas/PromptSource"
  19343. }
  19344. },
  19345. "required": ["name"],
  19346. "additionalProperties": false
  19347. },
  19348. "PromptReferenceAttachment": {
  19349. "type": "object",
  19350. "properties": {
  19351. "name": {
  19352. "type": "string"
  19353. },
  19354. "kind": {
  19355. "type": "string",
  19356. "enum": ["local", "git", "invalid"]
  19357. },
  19358. "uri": {
  19359. "type": "string"
  19360. },
  19361. "repository": {
  19362. "type": "string"
  19363. },
  19364. "branch": {
  19365. "type": "string"
  19366. },
  19367. "target": {
  19368. "type": "string"
  19369. },
  19370. "targetUri": {
  19371. "type": "string"
  19372. },
  19373. "problem": {
  19374. "type": "string"
  19375. },
  19376. "source": {
  19377. "$ref": "#/components/schemas/PromptSource"
  19378. }
  19379. },
  19380. "required": ["name", "kind"],
  19381. "additionalProperties": false
  19382. },
  19383. "EventSessionNextPrompted": {
  19384. "type": "object",
  19385. "properties": {
  19386. "id": {
  19387. "type": "string"
  19388. },
  19389. "type": {
  19390. "type": "string",
  19391. "enum": ["session.next.prompted"]
  19392. },
  19393. "properties": {
  19394. "type": "object",
  19395. "properties": {
  19396. "timestamp": {
  19397. "type": "number"
  19398. },
  19399. "sessionID": {
  19400. "type": "string",
  19401. "pattern": "^ses"
  19402. },
  19403. "prompt": {
  19404. "$ref": "#/components/schemas/Prompt"
  19405. }
  19406. },
  19407. "required": ["timestamp", "sessionID", "prompt"],
  19408. "additionalProperties": false
  19409. }
  19410. },
  19411. "required": ["id", "type", "properties"],
  19412. "additionalProperties": false
  19413. },
  19414. "EventSessionNextSynthetic": {
  19415. "type": "object",
  19416. "properties": {
  19417. "id": {
  19418. "type": "string"
  19419. },
  19420. "type": {
  19421. "type": "string",
  19422. "enum": ["session.next.synthetic"]
  19423. },
  19424. "properties": {
  19425. "type": "object",
  19426. "properties": {
  19427. "timestamp": {
  19428. "type": "number"
  19429. },
  19430. "sessionID": {
  19431. "type": "string",
  19432. "pattern": "^ses"
  19433. },
  19434. "text": {
  19435. "type": "string"
  19436. }
  19437. },
  19438. "required": ["timestamp", "sessionID", "text"],
  19439. "additionalProperties": false
  19440. }
  19441. },
  19442. "required": ["id", "type", "properties"],
  19443. "additionalProperties": false
  19444. },
  19445. "EventSessionNextShellStarted": {
  19446. "type": "object",
  19447. "properties": {
  19448. "id": {
  19449. "type": "string"
  19450. },
  19451. "type": {
  19452. "type": "string",
  19453. "enum": ["session.next.shell.started"]
  19454. },
  19455. "properties": {
  19456. "type": "object",
  19457. "properties": {
  19458. "timestamp": {
  19459. "type": "number"
  19460. },
  19461. "sessionID": {
  19462. "type": "string",
  19463. "pattern": "^ses"
  19464. },
  19465. "callID": {
  19466. "type": "string"
  19467. },
  19468. "command": {
  19469. "type": "string"
  19470. }
  19471. },
  19472. "required": ["timestamp", "sessionID", "callID", "command"],
  19473. "additionalProperties": false
  19474. }
  19475. },
  19476. "required": ["id", "type", "properties"],
  19477. "additionalProperties": false
  19478. },
  19479. "EventSessionNextShellEnded": {
  19480. "type": "object",
  19481. "properties": {
  19482. "id": {
  19483. "type": "string"
  19484. },
  19485. "type": {
  19486. "type": "string",
  19487. "enum": ["session.next.shell.ended"]
  19488. },
  19489. "properties": {
  19490. "type": "object",
  19491. "properties": {
  19492. "timestamp": {
  19493. "type": "number"
  19494. },
  19495. "sessionID": {
  19496. "type": "string",
  19497. "pattern": "^ses"
  19498. },
  19499. "callID": {
  19500. "type": "string"
  19501. },
  19502. "output": {
  19503. "type": "string"
  19504. }
  19505. },
  19506. "required": ["timestamp", "sessionID", "callID", "output"],
  19507. "additionalProperties": false
  19508. }
  19509. },
  19510. "required": ["id", "type", "properties"],
  19511. "additionalProperties": false
  19512. },
  19513. "EventSessionNextStepStarted": {
  19514. "type": "object",
  19515. "properties": {
  19516. "id": {
  19517. "type": "string"
  19518. },
  19519. "type": {
  19520. "type": "string",
  19521. "enum": ["session.next.step.started"]
  19522. },
  19523. "properties": {
  19524. "type": "object",
  19525. "properties": {
  19526. "timestamp": {
  19527. "type": "number"
  19528. },
  19529. "sessionID": {
  19530. "type": "string",
  19531. "pattern": "^ses"
  19532. },
  19533. "agent": {
  19534. "type": "string"
  19535. },
  19536. "model": {
  19537. "type": "object",
  19538. "properties": {
  19539. "id": {
  19540. "type": "string"
  19541. },
  19542. "providerID": {
  19543. "type": "string"
  19544. },
  19545. "variant": {
  19546. "type": "string"
  19547. }
  19548. },
  19549. "required": ["id", "providerID", "variant"],
  19550. "additionalProperties": false
  19551. },
  19552. "snapshot": {
  19553. "type": "string"
  19554. }
  19555. },
  19556. "required": ["timestamp", "sessionID", "agent", "model"],
  19557. "additionalProperties": false
  19558. }
  19559. },
  19560. "required": ["id", "type", "properties"],
  19561. "additionalProperties": false
  19562. },
  19563. "EventSessionNextStepEnded": {
  19564. "type": "object",
  19565. "properties": {
  19566. "id": {
  19567. "type": "string"
  19568. },
  19569. "type": {
  19570. "type": "string",
  19571. "enum": ["session.next.step.ended"]
  19572. },
  19573. "properties": {
  19574. "type": "object",
  19575. "properties": {
  19576. "timestamp": {
  19577. "type": "number"
  19578. },
  19579. "sessionID": {
  19580. "type": "string",
  19581. "pattern": "^ses"
  19582. },
  19583. "finish": {
  19584. "type": "string"
  19585. },
  19586. "cost": {
  19587. "type": "number"
  19588. },
  19589. "tokens": {
  19590. "type": "object",
  19591. "properties": {
  19592. "input": {
  19593. "type": "number"
  19594. },
  19595. "output": {
  19596. "type": "number"
  19597. },
  19598. "reasoning": {
  19599. "type": "number"
  19600. },
  19601. "cache": {
  19602. "type": "object",
  19603. "properties": {
  19604. "read": {
  19605. "type": "number"
  19606. },
  19607. "write": {
  19608. "type": "number"
  19609. }
  19610. },
  19611. "required": ["read", "write"],
  19612. "additionalProperties": false
  19613. }
  19614. },
  19615. "required": ["input", "output", "reasoning", "cache"],
  19616. "additionalProperties": false
  19617. },
  19618. "snapshot": {
  19619. "type": "string"
  19620. }
  19621. },
  19622. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19623. "additionalProperties": false
  19624. }
  19625. },
  19626. "required": ["id", "type", "properties"],
  19627. "additionalProperties": false
  19628. },
  19629. "SessionErrorUnknown": {
  19630. "type": "object",
  19631. "properties": {
  19632. "type": {
  19633. "type": "string",
  19634. "enum": ["unknown"]
  19635. },
  19636. "message": {
  19637. "type": "string"
  19638. }
  19639. },
  19640. "required": ["type", "message"],
  19641. "additionalProperties": false
  19642. },
  19643. "EventSessionNextStepFailed": {
  19644. "type": "object",
  19645. "properties": {
  19646. "id": {
  19647. "type": "string"
  19648. },
  19649. "type": {
  19650. "type": "string",
  19651. "enum": ["session.next.step.failed"]
  19652. },
  19653. "properties": {
  19654. "type": "object",
  19655. "properties": {
  19656. "timestamp": {
  19657. "type": "number"
  19658. },
  19659. "sessionID": {
  19660. "type": "string",
  19661. "pattern": "^ses"
  19662. },
  19663. "error": {
  19664. "$ref": "#/components/schemas/SessionErrorUnknown"
  19665. }
  19666. },
  19667. "required": ["timestamp", "sessionID", "error"],
  19668. "additionalProperties": false
  19669. }
  19670. },
  19671. "required": ["id", "type", "properties"],
  19672. "additionalProperties": false
  19673. },
  19674. "EventSessionNextTextStarted": {
  19675. "type": "object",
  19676. "properties": {
  19677. "id": {
  19678. "type": "string"
  19679. },
  19680. "type": {
  19681. "type": "string",
  19682. "enum": ["session.next.text.started"]
  19683. },
  19684. "properties": {
  19685. "type": "object",
  19686. "properties": {
  19687. "timestamp": {
  19688. "type": "number"
  19689. },
  19690. "sessionID": {
  19691. "type": "string",
  19692. "pattern": "^ses"
  19693. }
  19694. },
  19695. "required": ["timestamp", "sessionID"],
  19696. "additionalProperties": false
  19697. }
  19698. },
  19699. "required": ["id", "type", "properties"],
  19700. "additionalProperties": false
  19701. },
  19702. "EventSessionNextTextDelta": {
  19703. "type": "object",
  19704. "properties": {
  19705. "id": {
  19706. "type": "string"
  19707. },
  19708. "type": {
  19709. "type": "string",
  19710. "enum": ["session.next.text.delta"]
  19711. },
  19712. "properties": {
  19713. "type": "object",
  19714. "properties": {
  19715. "timestamp": {
  19716. "type": "number"
  19717. },
  19718. "sessionID": {
  19719. "type": "string",
  19720. "pattern": "^ses"
  19721. },
  19722. "delta": {
  19723. "type": "string"
  19724. }
  19725. },
  19726. "required": ["timestamp", "sessionID", "delta"],
  19727. "additionalProperties": false
  19728. }
  19729. },
  19730. "required": ["id", "type", "properties"],
  19731. "additionalProperties": false
  19732. },
  19733. "EventSessionNextTextEnded": {
  19734. "type": "object",
  19735. "properties": {
  19736. "id": {
  19737. "type": "string"
  19738. },
  19739. "type": {
  19740. "type": "string",
  19741. "enum": ["session.next.text.ended"]
  19742. },
  19743. "properties": {
  19744. "type": "object",
  19745. "properties": {
  19746. "timestamp": {
  19747. "type": "number"
  19748. },
  19749. "sessionID": {
  19750. "type": "string",
  19751. "pattern": "^ses"
  19752. },
  19753. "text": {
  19754. "type": "string"
  19755. }
  19756. },
  19757. "required": ["timestamp", "sessionID", "text"],
  19758. "additionalProperties": false
  19759. }
  19760. },
  19761. "required": ["id", "type", "properties"],
  19762. "additionalProperties": false
  19763. },
  19764. "EventSessionNextReasoningStarted": {
  19765. "type": "object",
  19766. "properties": {
  19767. "id": {
  19768. "type": "string"
  19769. },
  19770. "type": {
  19771. "type": "string",
  19772. "enum": ["session.next.reasoning.started"]
  19773. },
  19774. "properties": {
  19775. "type": "object",
  19776. "properties": {
  19777. "timestamp": {
  19778. "type": "number"
  19779. },
  19780. "sessionID": {
  19781. "type": "string",
  19782. "pattern": "^ses"
  19783. },
  19784. "reasoningID": {
  19785. "type": "string"
  19786. }
  19787. },
  19788. "required": ["timestamp", "sessionID", "reasoningID"],
  19789. "additionalProperties": false
  19790. }
  19791. },
  19792. "required": ["id", "type", "properties"],
  19793. "additionalProperties": false
  19794. },
  19795. "EventSessionNextReasoningDelta": {
  19796. "type": "object",
  19797. "properties": {
  19798. "id": {
  19799. "type": "string"
  19800. },
  19801. "type": {
  19802. "type": "string",
  19803. "enum": ["session.next.reasoning.delta"]
  19804. },
  19805. "properties": {
  19806. "type": "object",
  19807. "properties": {
  19808. "timestamp": {
  19809. "type": "number"
  19810. },
  19811. "sessionID": {
  19812. "type": "string",
  19813. "pattern": "^ses"
  19814. },
  19815. "reasoningID": {
  19816. "type": "string"
  19817. },
  19818. "delta": {
  19819. "type": "string"
  19820. }
  19821. },
  19822. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19823. "additionalProperties": false
  19824. }
  19825. },
  19826. "required": ["id", "type", "properties"],
  19827. "additionalProperties": false
  19828. },
  19829. "EventSessionNextReasoningEnded": {
  19830. "type": "object",
  19831. "properties": {
  19832. "id": {
  19833. "type": "string"
  19834. },
  19835. "type": {
  19836. "type": "string",
  19837. "enum": ["session.next.reasoning.ended"]
  19838. },
  19839. "properties": {
  19840. "type": "object",
  19841. "properties": {
  19842. "timestamp": {
  19843. "type": "number"
  19844. },
  19845. "sessionID": {
  19846. "type": "string",
  19847. "pattern": "^ses"
  19848. },
  19849. "reasoningID": {
  19850. "type": "string"
  19851. },
  19852. "text": {
  19853. "type": "string"
  19854. }
  19855. },
  19856. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19857. "additionalProperties": false
  19858. }
  19859. },
  19860. "required": ["id", "type", "properties"],
  19861. "additionalProperties": false
  19862. },
  19863. "EventSessionNextToolInputStarted": {
  19864. "type": "object",
  19865. "properties": {
  19866. "id": {
  19867. "type": "string"
  19868. },
  19869. "type": {
  19870. "type": "string",
  19871. "enum": ["session.next.tool.input.started"]
  19872. },
  19873. "properties": {
  19874. "type": "object",
  19875. "properties": {
  19876. "timestamp": {
  19877. "type": "number"
  19878. },
  19879. "sessionID": {
  19880. "type": "string",
  19881. "pattern": "^ses"
  19882. },
  19883. "callID": {
  19884. "type": "string"
  19885. },
  19886. "name": {
  19887. "type": "string"
  19888. }
  19889. },
  19890. "required": ["timestamp", "sessionID", "callID", "name"],
  19891. "additionalProperties": false
  19892. }
  19893. },
  19894. "required": ["id", "type", "properties"],
  19895. "additionalProperties": false
  19896. },
  19897. "EventSessionNextToolInputDelta": {
  19898. "type": "object",
  19899. "properties": {
  19900. "id": {
  19901. "type": "string"
  19902. },
  19903. "type": {
  19904. "type": "string",
  19905. "enum": ["session.next.tool.input.delta"]
  19906. },
  19907. "properties": {
  19908. "type": "object",
  19909. "properties": {
  19910. "timestamp": {
  19911. "type": "number"
  19912. },
  19913. "sessionID": {
  19914. "type": "string",
  19915. "pattern": "^ses"
  19916. },
  19917. "callID": {
  19918. "type": "string"
  19919. },
  19920. "delta": {
  19921. "type": "string"
  19922. }
  19923. },
  19924. "required": ["timestamp", "sessionID", "callID", "delta"],
  19925. "additionalProperties": false
  19926. }
  19927. },
  19928. "required": ["id", "type", "properties"],
  19929. "additionalProperties": false
  19930. },
  19931. "EventSessionNextToolInputEnded": {
  19932. "type": "object",
  19933. "properties": {
  19934. "id": {
  19935. "type": "string"
  19936. },
  19937. "type": {
  19938. "type": "string",
  19939. "enum": ["session.next.tool.input.ended"]
  19940. },
  19941. "properties": {
  19942. "type": "object",
  19943. "properties": {
  19944. "timestamp": {
  19945. "type": "number"
  19946. },
  19947. "sessionID": {
  19948. "type": "string",
  19949. "pattern": "^ses"
  19950. },
  19951. "callID": {
  19952. "type": "string"
  19953. },
  19954. "text": {
  19955. "type": "string"
  19956. }
  19957. },
  19958. "required": ["timestamp", "sessionID", "callID", "text"],
  19959. "additionalProperties": false
  19960. }
  19961. },
  19962. "required": ["id", "type", "properties"],
  19963. "additionalProperties": false
  19964. },
  19965. "EventSessionNextToolCalled": {
  19966. "type": "object",
  19967. "properties": {
  19968. "id": {
  19969. "type": "string"
  19970. },
  19971. "type": {
  19972. "type": "string",
  19973. "enum": ["session.next.tool.called"]
  19974. },
  19975. "properties": {
  19976. "type": "object",
  19977. "properties": {
  19978. "timestamp": {
  19979. "type": "number"
  19980. },
  19981. "sessionID": {
  19982. "type": "string",
  19983. "pattern": "^ses"
  19984. },
  19985. "callID": {
  19986. "type": "string"
  19987. },
  19988. "tool": {
  19989. "type": "string"
  19990. },
  19991. "input": {
  19992. "type": "object"
  19993. },
  19994. "provider": {
  19995. "type": "object",
  19996. "properties": {
  19997. "executed": {
  19998. "type": "boolean"
  19999. },
  20000. "metadata": {
  20001. "type": "object"
  20002. }
  20003. },
  20004. "required": ["executed"],
  20005. "additionalProperties": false
  20006. }
  20007. },
  20008. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  20009. "additionalProperties": false
  20010. }
  20011. },
  20012. "required": ["id", "type", "properties"],
  20013. "additionalProperties": false
  20014. },
  20015. "ToolTextContent": {
  20016. "type": "object",
  20017. "properties": {
  20018. "type": {
  20019. "type": "string",
  20020. "enum": ["text"]
  20021. },
  20022. "text": {
  20023. "type": "string"
  20024. }
  20025. },
  20026. "required": ["type", "text"],
  20027. "additionalProperties": false
  20028. },
  20029. "ToolFileContent": {
  20030. "type": "object",
  20031. "properties": {
  20032. "type": {
  20033. "type": "string",
  20034. "enum": ["file"]
  20035. },
  20036. "uri": {
  20037. "type": "string"
  20038. },
  20039. "mime": {
  20040. "type": "string"
  20041. },
  20042. "name": {
  20043. "type": "string"
  20044. }
  20045. },
  20046. "required": ["type", "uri", "mime"],
  20047. "additionalProperties": false
  20048. },
  20049. "EventSessionNextToolProgress": {
  20050. "type": "object",
  20051. "properties": {
  20052. "id": {
  20053. "type": "string"
  20054. },
  20055. "type": {
  20056. "type": "string",
  20057. "enum": ["session.next.tool.progress"]
  20058. },
  20059. "properties": {
  20060. "type": "object",
  20061. "properties": {
  20062. "timestamp": {
  20063. "type": "number"
  20064. },
  20065. "sessionID": {
  20066. "type": "string",
  20067. "pattern": "^ses"
  20068. },
  20069. "callID": {
  20070. "type": "string"
  20071. },
  20072. "structured": {
  20073. "type": "object"
  20074. },
  20075. "content": {
  20076. "type": "array",
  20077. "items": {
  20078. "anyOf": [
  20079. {
  20080. "$ref": "#/components/schemas/ToolTextContent"
  20081. },
  20082. {
  20083. "$ref": "#/components/schemas/ToolFileContent"
  20084. }
  20085. ]
  20086. }
  20087. }
  20088. },
  20089. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20090. "additionalProperties": false
  20091. }
  20092. },
  20093. "required": ["id", "type", "properties"],
  20094. "additionalProperties": false
  20095. },
  20096. "EventSessionNextToolSuccess": {
  20097. "type": "object",
  20098. "properties": {
  20099. "id": {
  20100. "type": "string"
  20101. },
  20102. "type": {
  20103. "type": "string",
  20104. "enum": ["session.next.tool.success"]
  20105. },
  20106. "properties": {
  20107. "type": "object",
  20108. "properties": {
  20109. "timestamp": {
  20110. "type": "number"
  20111. },
  20112. "sessionID": {
  20113. "type": "string",
  20114. "pattern": "^ses"
  20115. },
  20116. "callID": {
  20117. "type": "string"
  20118. },
  20119. "structured": {
  20120. "type": "object"
  20121. },
  20122. "content": {
  20123. "type": "array",
  20124. "items": {
  20125. "anyOf": [
  20126. {
  20127. "$ref": "#/components/schemas/ToolTextContent"
  20128. },
  20129. {
  20130. "$ref": "#/components/schemas/ToolFileContent"
  20131. }
  20132. ]
  20133. }
  20134. },
  20135. "provider": {
  20136. "type": "object",
  20137. "properties": {
  20138. "executed": {
  20139. "type": "boolean"
  20140. },
  20141. "metadata": {
  20142. "type": "object"
  20143. }
  20144. },
  20145. "required": ["executed"],
  20146. "additionalProperties": false
  20147. }
  20148. },
  20149. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20150. "additionalProperties": false
  20151. }
  20152. },
  20153. "required": ["id", "type", "properties"],
  20154. "additionalProperties": false
  20155. },
  20156. "EventSessionNextToolFailed": {
  20157. "type": "object",
  20158. "properties": {
  20159. "id": {
  20160. "type": "string"
  20161. },
  20162. "type": {
  20163. "type": "string",
  20164. "enum": ["session.next.tool.failed"]
  20165. },
  20166. "properties": {
  20167. "type": "object",
  20168. "properties": {
  20169. "timestamp": {
  20170. "type": "number"
  20171. },
  20172. "sessionID": {
  20173. "type": "string",
  20174. "pattern": "^ses"
  20175. },
  20176. "callID": {
  20177. "type": "string"
  20178. },
  20179. "error": {
  20180. "$ref": "#/components/schemas/SessionErrorUnknown"
  20181. },
  20182. "provider": {
  20183. "type": "object",
  20184. "properties": {
  20185. "executed": {
  20186. "type": "boolean"
  20187. },
  20188. "metadata": {
  20189. "type": "object"
  20190. }
  20191. },
  20192. "required": ["executed"],
  20193. "additionalProperties": false
  20194. }
  20195. },
  20196. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20197. "additionalProperties": false
  20198. }
  20199. },
  20200. "required": ["id", "type", "properties"],
  20201. "additionalProperties": false
  20202. },
  20203. "SessionNextRetry_error": {
  20204. "type": "object",
  20205. "properties": {
  20206. "message": {
  20207. "type": "string"
  20208. },
  20209. "statusCode": {
  20210. "type": "number"
  20211. },
  20212. "isRetryable": {
  20213. "type": "boolean"
  20214. },
  20215. "responseHeaders": {
  20216. "type": "object",
  20217. "additionalProperties": {
  20218. "type": "string"
  20219. }
  20220. },
  20221. "responseBody": {
  20222. "type": "string"
  20223. },
  20224. "metadata": {
  20225. "type": "object",
  20226. "additionalProperties": {
  20227. "type": "string"
  20228. }
  20229. }
  20230. },
  20231. "required": ["message", "isRetryable"],
  20232. "additionalProperties": false
  20233. },
  20234. "EventSessionNextRetried": {
  20235. "type": "object",
  20236. "properties": {
  20237. "id": {
  20238. "type": "string"
  20239. },
  20240. "type": {
  20241. "type": "string",
  20242. "enum": ["session.next.retried"]
  20243. },
  20244. "properties": {
  20245. "type": "object",
  20246. "properties": {
  20247. "timestamp": {
  20248. "type": "number"
  20249. },
  20250. "sessionID": {
  20251. "type": "string",
  20252. "pattern": "^ses"
  20253. },
  20254. "attempt": {
  20255. "type": "number"
  20256. },
  20257. "error": {
  20258. "$ref": "#/components/schemas/SessionNextRetry_error"
  20259. }
  20260. },
  20261. "required": ["timestamp", "sessionID", "attempt", "error"],
  20262. "additionalProperties": false
  20263. }
  20264. },
  20265. "required": ["id", "type", "properties"],
  20266. "additionalProperties": false
  20267. },
  20268. "EventSessionNextCompactionStarted": {
  20269. "type": "object",
  20270. "properties": {
  20271. "id": {
  20272. "type": "string"
  20273. },
  20274. "type": {
  20275. "type": "string",
  20276. "enum": ["session.next.compaction.started"]
  20277. },
  20278. "properties": {
  20279. "type": "object",
  20280. "properties": {
  20281. "timestamp": {
  20282. "type": "number"
  20283. },
  20284. "sessionID": {
  20285. "type": "string",
  20286. "pattern": "^ses"
  20287. },
  20288. "reason": {
  20289. "type": "string",
  20290. "enum": ["auto", "manual"]
  20291. }
  20292. },
  20293. "required": ["timestamp", "sessionID", "reason"],
  20294. "additionalProperties": false
  20295. }
  20296. },
  20297. "required": ["id", "type", "properties"],
  20298. "additionalProperties": false
  20299. },
  20300. "EventSessionNextCompactionDelta": {
  20301. "type": "object",
  20302. "properties": {
  20303. "id": {
  20304. "type": "string"
  20305. },
  20306. "type": {
  20307. "type": "string",
  20308. "enum": ["session.next.compaction.delta"]
  20309. },
  20310. "properties": {
  20311. "type": "object",
  20312. "properties": {
  20313. "timestamp": {
  20314. "type": "number"
  20315. },
  20316. "sessionID": {
  20317. "type": "string",
  20318. "pattern": "^ses"
  20319. },
  20320. "text": {
  20321. "type": "string"
  20322. }
  20323. },
  20324. "required": ["timestamp", "sessionID", "text"],
  20325. "additionalProperties": false
  20326. }
  20327. },
  20328. "required": ["id", "type", "properties"],
  20329. "additionalProperties": false
  20330. },
  20331. "EventSessionNextCompactionEnded": {
  20332. "type": "object",
  20333. "properties": {
  20334. "id": {
  20335. "type": "string"
  20336. },
  20337. "type": {
  20338. "type": "string",
  20339. "enum": ["session.next.compaction.ended"]
  20340. },
  20341. "properties": {
  20342. "type": "object",
  20343. "properties": {
  20344. "timestamp": {
  20345. "type": "number"
  20346. },
  20347. "sessionID": {
  20348. "type": "string",
  20349. "pattern": "^ses"
  20350. },
  20351. "text": {
  20352. "type": "string"
  20353. },
  20354. "include": {
  20355. "type": "string"
  20356. }
  20357. },
  20358. "required": ["timestamp", "sessionID", "text"],
  20359. "additionalProperties": false
  20360. }
  20361. },
  20362. "required": ["id", "type", "properties"],
  20363. "additionalProperties": false
  20364. },
  20365. "ModelV2Info": {
  20366. "type": "object",
  20367. "properties": {
  20368. "id": {
  20369. "type": "string"
  20370. },
  20371. "apiID": {
  20372. "type": "string"
  20373. },
  20374. "providerID": {
  20375. "type": "string"
  20376. },
  20377. "family": {
  20378. "type": "string"
  20379. },
  20380. "name": {
  20381. "type": "string"
  20382. },
  20383. "endpoint": {
  20384. "anyOf": [
  20385. {
  20386. "type": "object",
  20387. "properties": {
  20388. "type": {
  20389. "type": "string",
  20390. "enum": ["unknown"]
  20391. }
  20392. },
  20393. "required": ["type"],
  20394. "additionalProperties": false
  20395. },
  20396. {
  20397. "type": "object",
  20398. "properties": {
  20399. "type": {
  20400. "type": "string",
  20401. "enum": ["openai/responses"]
  20402. },
  20403. "url": {
  20404. "type": "string"
  20405. },
  20406. "websocket": {
  20407. "type": "boolean"
  20408. }
  20409. },
  20410. "required": ["type", "url"],
  20411. "additionalProperties": false
  20412. },
  20413. {
  20414. "type": "object",
  20415. "properties": {
  20416. "type": {
  20417. "type": "string",
  20418. "enum": ["openai/completions"]
  20419. },
  20420. "url": {
  20421. "type": "string"
  20422. },
  20423. "reasoning": {
  20424. "anyOf": [
  20425. {
  20426. "type": "object",
  20427. "properties": {
  20428. "type": {
  20429. "type": "string",
  20430. "enum": ["reasoning_content"]
  20431. }
  20432. },
  20433. "required": ["type"],
  20434. "additionalProperties": false
  20435. },
  20436. {
  20437. "type": "object",
  20438. "properties": {
  20439. "type": {
  20440. "type": "string",
  20441. "enum": ["reasoning_details"]
  20442. }
  20443. },
  20444. "required": ["type"],
  20445. "additionalProperties": false
  20446. }
  20447. ]
  20448. }
  20449. },
  20450. "required": ["type", "url"],
  20451. "additionalProperties": false
  20452. },
  20453. {
  20454. "type": "object",
  20455. "properties": {
  20456. "type": {
  20457. "type": "string",
  20458. "enum": ["anthropic/messages"]
  20459. },
  20460. "url": {
  20461. "type": "string"
  20462. }
  20463. },
  20464. "required": ["type", "url"],
  20465. "additionalProperties": false
  20466. },
  20467. {
  20468. "type": "object",
  20469. "properties": {
  20470. "type": {
  20471. "type": "string",
  20472. "enum": ["aisdk"]
  20473. },
  20474. "package": {
  20475. "type": "string"
  20476. },
  20477. "url": {
  20478. "type": "string"
  20479. }
  20480. },
  20481. "required": ["type", "package"],
  20482. "additionalProperties": false
  20483. }
  20484. ]
  20485. },
  20486. "capabilities": {
  20487. "type": "object",
  20488. "properties": {
  20489. "tools": {
  20490. "type": "boolean"
  20491. },
  20492. "input": {
  20493. "type": "array",
  20494. "items": {
  20495. "type": "string"
  20496. }
  20497. },
  20498. "output": {
  20499. "type": "array",
  20500. "items": {
  20501. "type": "string"
  20502. }
  20503. }
  20504. },
  20505. "required": ["tools", "input", "output"],
  20506. "additionalProperties": false
  20507. },
  20508. "options": {
  20509. "type": "object",
  20510. "properties": {
  20511. "headers": {
  20512. "type": "object",
  20513. "additionalProperties": {
  20514. "type": "string"
  20515. }
  20516. },
  20517. "body": {
  20518. "type": "object"
  20519. },
  20520. "aisdk": {
  20521. "type": "object",
  20522. "properties": {
  20523. "provider": {
  20524. "type": "object"
  20525. },
  20526. "request": {
  20527. "type": "object"
  20528. }
  20529. },
  20530. "required": ["provider", "request"],
  20531. "additionalProperties": false
  20532. },
  20533. "variant": {
  20534. "type": "string"
  20535. }
  20536. },
  20537. "required": ["headers", "body", "aisdk"],
  20538. "additionalProperties": false
  20539. },
  20540. "variants": {
  20541. "type": "array",
  20542. "items": {
  20543. "type": "object",
  20544. "properties": {
  20545. "id": {
  20546. "type": "string"
  20547. },
  20548. "headers": {
  20549. "type": "object",
  20550. "additionalProperties": {
  20551. "type": "string"
  20552. }
  20553. },
  20554. "body": {
  20555. "type": "object"
  20556. },
  20557. "aisdk": {
  20558. "type": "object",
  20559. "properties": {
  20560. "provider": {
  20561. "type": "object"
  20562. },
  20563. "request": {
  20564. "type": "object"
  20565. }
  20566. },
  20567. "required": ["provider", "request"],
  20568. "additionalProperties": false
  20569. }
  20570. },
  20571. "required": ["id", "headers", "body", "aisdk"],
  20572. "additionalProperties": false
  20573. }
  20574. },
  20575. "time": {
  20576. "type": "object",
  20577. "properties": {
  20578. "released": {
  20579. "anyOf": [
  20580. {
  20581. "type": "number"
  20582. },
  20583. {
  20584. "type": "string",
  20585. "enum": ["NaN"]
  20586. },
  20587. {
  20588. "type": "string",
  20589. "enum": ["Infinity"]
  20590. },
  20591. {
  20592. "type": "string",
  20593. "enum": ["-Infinity"]
  20594. },
  20595. {
  20596. "type": "string",
  20597. "enum": ["Infinity", "-Infinity", "NaN"]
  20598. }
  20599. ]
  20600. }
  20601. },
  20602. "required": ["released"],
  20603. "additionalProperties": false
  20604. },
  20605. "cost": {
  20606. "type": "array",
  20607. "items": {
  20608. "type": "object",
  20609. "properties": {
  20610. "tier": {
  20611. "type": "object",
  20612. "properties": {
  20613. "type": {
  20614. "type": "string",
  20615. "enum": ["context"]
  20616. },
  20617. "size": {
  20618. "type": "integer"
  20619. }
  20620. },
  20621. "required": ["type", "size"],
  20622. "additionalProperties": false
  20623. },
  20624. "input": {
  20625. "type": "number"
  20626. },
  20627. "output": {
  20628. "type": "number"
  20629. },
  20630. "cache": {
  20631. "type": "object",
  20632. "properties": {
  20633. "read": {
  20634. "type": "number"
  20635. },
  20636. "write": {
  20637. "type": "number"
  20638. }
  20639. },
  20640. "required": ["read", "write"],
  20641. "additionalProperties": false
  20642. }
  20643. },
  20644. "required": ["input", "output", "cache"],
  20645. "additionalProperties": false
  20646. }
  20647. },
  20648. "status": {
  20649. "type": "string",
  20650. "enum": ["alpha", "beta", "deprecated", "active"]
  20651. },
  20652. "enabled": {
  20653. "type": "boolean"
  20654. },
  20655. "limit": {
  20656. "type": "object",
  20657. "properties": {
  20658. "context": {
  20659. "type": "integer"
  20660. },
  20661. "input": {
  20662. "type": "integer"
  20663. },
  20664. "output": {
  20665. "type": "integer"
  20666. }
  20667. },
  20668. "required": ["context", "output"],
  20669. "additionalProperties": false
  20670. }
  20671. },
  20672. "required": [
  20673. "id",
  20674. "apiID",
  20675. "providerID",
  20676. "name",
  20677. "endpoint",
  20678. "capabilities",
  20679. "options",
  20680. "variants",
  20681. "time",
  20682. "cost",
  20683. "status",
  20684. "enabled",
  20685. "limit"
  20686. ],
  20687. "additionalProperties": false
  20688. },
  20689. "EventCatalogModelUpdated": {
  20690. "type": "object",
  20691. "properties": {
  20692. "id": {
  20693. "type": "string"
  20694. },
  20695. "type": {
  20696. "type": "string",
  20697. "enum": ["catalog.model.updated"]
  20698. },
  20699. "properties": {
  20700. "type": "object",
  20701. "properties": {
  20702. "model": {
  20703. "$ref": "#/components/schemas/ModelV2Info"
  20704. }
  20705. },
  20706. "required": ["model"],
  20707. "additionalProperties": false
  20708. }
  20709. },
  20710. "required": ["id", "type", "properties"],
  20711. "additionalProperties": false
  20712. },
  20713. "EventModels-devRefreshed": {
  20714. "type": "object",
  20715. "properties": {
  20716. "id": {
  20717. "type": "string"
  20718. },
  20719. "type": {
  20720. "type": "string",
  20721. "enum": ["models-dev.refreshed"]
  20722. },
  20723. "properties": {
  20724. "type": "object",
  20725. "properties": {}
  20726. }
  20727. },
  20728. "required": ["id", "type", "properties"],
  20729. "additionalProperties": false
  20730. },
  20731. "AccountV2OAuthCredential": {
  20732. "type": "object",
  20733. "properties": {
  20734. "type": {
  20735. "type": "string",
  20736. "enum": ["oauth"]
  20737. },
  20738. "refresh": {
  20739. "type": "string"
  20740. },
  20741. "access": {
  20742. "type": "string"
  20743. },
  20744. "expires": {
  20745. "type": "integer",
  20746. "minimum": 0
  20747. }
  20748. },
  20749. "required": ["type", "refresh", "access", "expires"],
  20750. "additionalProperties": false
  20751. },
  20752. "AccountV2ApiKeyCredential": {
  20753. "type": "object",
  20754. "properties": {
  20755. "type": {
  20756. "type": "string",
  20757. "enum": ["api"]
  20758. },
  20759. "key": {
  20760. "type": "string"
  20761. },
  20762. "metadata": {
  20763. "type": "object",
  20764. "additionalProperties": {
  20765. "type": "string"
  20766. }
  20767. }
  20768. },
  20769. "required": ["type", "key"],
  20770. "additionalProperties": false
  20771. },
  20772. "AccountV2Credential": {
  20773. "anyOf": [
  20774. {
  20775. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20776. },
  20777. {
  20778. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20779. }
  20780. ]
  20781. },
  20782. "AccountV2Info": {
  20783. "type": "object",
  20784. "properties": {
  20785. "id": {
  20786. "type": "string"
  20787. },
  20788. "serviceID": {
  20789. "type": "string"
  20790. },
  20791. "description": {
  20792. "type": "string"
  20793. },
  20794. "credential": {
  20795. "$ref": "#/components/schemas/AccountV2Credential"
  20796. }
  20797. },
  20798. "required": ["id", "serviceID", "description", "credential"],
  20799. "additionalProperties": false
  20800. },
  20801. "EventAccountAdded": {
  20802. "type": "object",
  20803. "properties": {
  20804. "id": {
  20805. "type": "string"
  20806. },
  20807. "type": {
  20808. "type": "string",
  20809. "enum": ["account.added"]
  20810. },
  20811. "properties": {
  20812. "type": "object",
  20813. "properties": {
  20814. "account": {
  20815. "$ref": "#/components/schemas/AccountV2Info"
  20816. }
  20817. },
  20818. "required": ["account"],
  20819. "additionalProperties": false
  20820. }
  20821. },
  20822. "required": ["id", "type", "properties"],
  20823. "additionalProperties": false
  20824. },
  20825. "EventAccountRemoved": {
  20826. "type": "object",
  20827. "properties": {
  20828. "id": {
  20829. "type": "string"
  20830. },
  20831. "type": {
  20832. "type": "string",
  20833. "enum": ["account.removed"]
  20834. },
  20835. "properties": {
  20836. "type": "object",
  20837. "properties": {
  20838. "account": {
  20839. "$ref": "#/components/schemas/AccountV2Info"
  20840. }
  20841. },
  20842. "required": ["account"],
  20843. "additionalProperties": false
  20844. }
  20845. },
  20846. "required": ["id", "type", "properties"],
  20847. "additionalProperties": false
  20848. },
  20849. "EventAccountSwitched": {
  20850. "type": "object",
  20851. "properties": {
  20852. "id": {
  20853. "type": "string"
  20854. },
  20855. "type": {
  20856. "type": "string",
  20857. "enum": ["account.switched"]
  20858. },
  20859. "properties": {
  20860. "type": "object",
  20861. "properties": {
  20862. "serviceID": {
  20863. "type": "string"
  20864. },
  20865. "from": {
  20866. "type": "string"
  20867. },
  20868. "to": {
  20869. "type": "string"
  20870. }
  20871. },
  20872. "required": ["serviceID"],
  20873. "additionalProperties": false
  20874. }
  20875. },
  20876. "required": ["id", "type", "properties"],
  20877. "additionalProperties": false
  20878. },
  20879. "SessionInfo": {
  20880. "type": "object",
  20881. "properties": {
  20882. "id": {
  20883. "type": "string",
  20884. "pattern": "^ses"
  20885. },
  20886. "parentID": {
  20887. "type": "string",
  20888. "pattern": "^ses"
  20889. },
  20890. "projectID": {
  20891. "type": "string"
  20892. },
  20893. "workspaceID": {
  20894. "type": "string",
  20895. "pattern": "^wrk"
  20896. },
  20897. "path": {
  20898. "type": "string"
  20899. },
  20900. "agent": {
  20901. "type": "string"
  20902. },
  20903. "model": {
  20904. "type": "object",
  20905. "properties": {
  20906. "id": {
  20907. "type": "string"
  20908. },
  20909. "providerID": {
  20910. "type": "string"
  20911. },
  20912. "variant": {
  20913. "type": "string"
  20914. }
  20915. },
  20916. "required": ["id", "providerID", "variant"],
  20917. "additionalProperties": false
  20918. },
  20919. "cost": {
  20920. "type": "number"
  20921. },
  20922. "tokens": {
  20923. "type": "object",
  20924. "properties": {
  20925. "input": {
  20926. "type": "number"
  20927. },
  20928. "output": {
  20929. "type": "number"
  20930. },
  20931. "reasoning": {
  20932. "type": "number"
  20933. },
  20934. "cache": {
  20935. "type": "object",
  20936. "properties": {
  20937. "read": {
  20938. "type": "number"
  20939. },
  20940. "write": {
  20941. "type": "number"
  20942. }
  20943. },
  20944. "required": ["read", "write"],
  20945. "additionalProperties": false
  20946. }
  20947. },
  20948. "required": ["input", "output", "reasoning", "cache"],
  20949. "additionalProperties": false
  20950. },
  20951. "time": {
  20952. "type": "object",
  20953. "properties": {
  20954. "created": {
  20955. "type": "number"
  20956. },
  20957. "updated": {
  20958. "type": "number"
  20959. },
  20960. "archived": {
  20961. "type": "number"
  20962. }
  20963. },
  20964. "required": ["created", "updated"],
  20965. "additionalProperties": false
  20966. },
  20967. "title": {
  20968. "type": "string"
  20969. }
  20970. },
  20971. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20972. "additionalProperties": false
  20973. },
  20974. "SessionDelivery": {
  20975. "type": "string",
  20976. "enum": ["immediate", "deferred"]
  20977. },
  20978. "SessionMessageAgentSwitched": {
  20979. "type": "object",
  20980. "properties": {
  20981. "id": {
  20982. "type": "string"
  20983. },
  20984. "metadata": {
  20985. "type": "object"
  20986. },
  20987. "time": {
  20988. "type": "object",
  20989. "properties": {
  20990. "created": {
  20991. "type": "number"
  20992. }
  20993. },
  20994. "required": ["created"],
  20995. "additionalProperties": false
  20996. },
  20997. "type": {
  20998. "type": "string",
  20999. "enum": ["agent-switched"]
  21000. },
  21001. "agent": {
  21002. "type": "string"
  21003. }
  21004. },
  21005. "required": ["id", "time", "type", "agent"],
  21006. "additionalProperties": false
  21007. },
  21008. "SessionMessageModelSwitched": {
  21009. "type": "object",
  21010. "properties": {
  21011. "id": {
  21012. "type": "string"
  21013. },
  21014. "metadata": {
  21015. "type": "object"
  21016. },
  21017. "time": {
  21018. "type": "object",
  21019. "properties": {
  21020. "created": {
  21021. "type": "number"
  21022. }
  21023. },
  21024. "required": ["created"],
  21025. "additionalProperties": false
  21026. },
  21027. "type": {
  21028. "type": "string",
  21029. "enum": ["model-switched"]
  21030. },
  21031. "model": {
  21032. "type": "object",
  21033. "properties": {
  21034. "id": {
  21035. "type": "string"
  21036. },
  21037. "providerID": {
  21038. "type": "string"
  21039. },
  21040. "variant": {
  21041. "type": "string"
  21042. }
  21043. },
  21044. "required": ["id", "providerID", "variant"],
  21045. "additionalProperties": false
  21046. }
  21047. },
  21048. "required": ["id", "time", "type", "model"],
  21049. "additionalProperties": false
  21050. },
  21051. "SessionMessageUser": {
  21052. "type": "object",
  21053. "properties": {
  21054. "id": {
  21055. "type": "string"
  21056. },
  21057. "metadata": {
  21058. "type": "object"
  21059. },
  21060. "time": {
  21061. "type": "object",
  21062. "properties": {
  21063. "created": {
  21064. "type": "number"
  21065. }
  21066. },
  21067. "required": ["created"],
  21068. "additionalProperties": false
  21069. },
  21070. "text": {
  21071. "type": "string"
  21072. },
  21073. "files": {
  21074. "type": "array",
  21075. "items": {
  21076. "$ref": "#/components/schemas/PromptFileAttachment"
  21077. }
  21078. },
  21079. "agents": {
  21080. "type": "array",
  21081. "items": {
  21082. "$ref": "#/components/schemas/PromptAgentAttachment"
  21083. }
  21084. },
  21085. "references": {
  21086. "type": "array",
  21087. "items": {
  21088. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21089. }
  21090. },
  21091. "type": {
  21092. "type": "string",
  21093. "enum": ["user"]
  21094. }
  21095. },
  21096. "required": ["id", "time", "text", "type"],
  21097. "additionalProperties": false
  21098. },
  21099. "SessionMessageSynthetic": {
  21100. "type": "object",
  21101. "properties": {
  21102. "id": {
  21103. "type": "string"
  21104. },
  21105. "metadata": {
  21106. "type": "object"
  21107. },
  21108. "time": {
  21109. "type": "object",
  21110. "properties": {
  21111. "created": {
  21112. "type": "number"
  21113. }
  21114. },
  21115. "required": ["created"],
  21116. "additionalProperties": false
  21117. },
  21118. "sessionID": {
  21119. "type": "string",
  21120. "pattern": "^ses"
  21121. },
  21122. "text": {
  21123. "type": "string"
  21124. },
  21125. "type": {
  21126. "type": "string",
  21127. "enum": ["synthetic"]
  21128. }
  21129. },
  21130. "required": ["id", "time", "sessionID", "text", "type"],
  21131. "additionalProperties": false
  21132. },
  21133. "SessionMessageShell": {
  21134. "type": "object",
  21135. "properties": {
  21136. "id": {
  21137. "type": "string"
  21138. },
  21139. "metadata": {
  21140. "type": "object"
  21141. },
  21142. "time": {
  21143. "type": "object",
  21144. "properties": {
  21145. "created": {
  21146. "type": "number"
  21147. },
  21148. "completed": {
  21149. "type": "number"
  21150. }
  21151. },
  21152. "required": ["created"],
  21153. "additionalProperties": false
  21154. },
  21155. "type": {
  21156. "type": "string",
  21157. "enum": ["shell"]
  21158. },
  21159. "callID": {
  21160. "type": "string"
  21161. },
  21162. "command": {
  21163. "type": "string"
  21164. },
  21165. "output": {
  21166. "type": "string"
  21167. }
  21168. },
  21169. "required": ["id", "time", "type", "callID", "command", "output"],
  21170. "additionalProperties": false
  21171. },
  21172. "SessionMessageAssistantText": {
  21173. "type": "object",
  21174. "properties": {
  21175. "type": {
  21176. "type": "string",
  21177. "enum": ["text"]
  21178. },
  21179. "text": {
  21180. "type": "string"
  21181. }
  21182. },
  21183. "required": ["type", "text"],
  21184. "additionalProperties": false
  21185. },
  21186. "SessionMessageAssistantReasoning": {
  21187. "type": "object",
  21188. "properties": {
  21189. "type": {
  21190. "type": "string",
  21191. "enum": ["reasoning"]
  21192. },
  21193. "id": {
  21194. "type": "string"
  21195. },
  21196. "text": {
  21197. "type": "string"
  21198. }
  21199. },
  21200. "required": ["type", "id", "text"],
  21201. "additionalProperties": false
  21202. },
  21203. "SessionMessageToolStatePending": {
  21204. "type": "object",
  21205. "properties": {
  21206. "status": {
  21207. "type": "string",
  21208. "enum": ["pending"]
  21209. },
  21210. "input": {
  21211. "type": "string"
  21212. }
  21213. },
  21214. "required": ["status", "input"],
  21215. "additionalProperties": false
  21216. },
  21217. "SessionMessageToolStateRunning": {
  21218. "type": "object",
  21219. "properties": {
  21220. "status": {
  21221. "type": "string",
  21222. "enum": ["running"]
  21223. },
  21224. "input": {
  21225. "type": "object"
  21226. },
  21227. "structured": {
  21228. "type": "object"
  21229. },
  21230. "content": {
  21231. "type": "array",
  21232. "items": {
  21233. "anyOf": [
  21234. {
  21235. "$ref": "#/components/schemas/ToolTextContent"
  21236. },
  21237. {
  21238. "$ref": "#/components/schemas/ToolFileContent"
  21239. }
  21240. ]
  21241. }
  21242. }
  21243. },
  21244. "required": ["status", "input", "structured", "content"],
  21245. "additionalProperties": false
  21246. },
  21247. "SessionMessageToolStateCompleted": {
  21248. "type": "object",
  21249. "properties": {
  21250. "status": {
  21251. "type": "string",
  21252. "enum": ["completed"]
  21253. },
  21254. "input": {
  21255. "type": "object"
  21256. },
  21257. "attachments": {
  21258. "type": "array",
  21259. "items": {
  21260. "$ref": "#/components/schemas/PromptFileAttachment"
  21261. }
  21262. },
  21263. "content": {
  21264. "type": "array",
  21265. "items": {
  21266. "anyOf": [
  21267. {
  21268. "$ref": "#/components/schemas/ToolTextContent"
  21269. },
  21270. {
  21271. "$ref": "#/components/schemas/ToolFileContent"
  21272. }
  21273. ]
  21274. }
  21275. },
  21276. "structured": {
  21277. "type": "object"
  21278. }
  21279. },
  21280. "required": ["status", "input", "content", "structured"],
  21281. "additionalProperties": false
  21282. },
  21283. "SessionMessageToolStateError": {
  21284. "type": "object",
  21285. "properties": {
  21286. "status": {
  21287. "type": "string",
  21288. "enum": ["error"]
  21289. },
  21290. "input": {
  21291. "type": "object"
  21292. },
  21293. "content": {
  21294. "type": "array",
  21295. "items": {
  21296. "anyOf": [
  21297. {
  21298. "$ref": "#/components/schemas/ToolTextContent"
  21299. },
  21300. {
  21301. "$ref": "#/components/schemas/ToolFileContent"
  21302. }
  21303. ]
  21304. }
  21305. },
  21306. "structured": {
  21307. "type": "object"
  21308. },
  21309. "error": {
  21310. "$ref": "#/components/schemas/SessionErrorUnknown"
  21311. }
  21312. },
  21313. "required": ["status", "input", "content", "structured", "error"],
  21314. "additionalProperties": false
  21315. },
  21316. "SessionMessageAssistantTool": {
  21317. "type": "object",
  21318. "properties": {
  21319. "type": {
  21320. "type": "string",
  21321. "enum": ["tool"]
  21322. },
  21323. "id": {
  21324. "type": "string"
  21325. },
  21326. "name": {
  21327. "type": "string"
  21328. },
  21329. "provider": {
  21330. "type": "object",
  21331. "properties": {
  21332. "executed": {
  21333. "type": "boolean"
  21334. },
  21335. "metadata": {
  21336. "type": "object"
  21337. }
  21338. },
  21339. "required": ["executed"],
  21340. "additionalProperties": false
  21341. },
  21342. "state": {
  21343. "anyOf": [
  21344. {
  21345. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21346. },
  21347. {
  21348. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21349. },
  21350. {
  21351. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21352. },
  21353. {
  21354. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21355. }
  21356. ]
  21357. },
  21358. "time": {
  21359. "type": "object",
  21360. "properties": {
  21361. "created": {
  21362. "type": "number"
  21363. },
  21364. "ran": {
  21365. "type": "number"
  21366. },
  21367. "completed": {
  21368. "type": "number"
  21369. },
  21370. "pruned": {
  21371. "type": "number"
  21372. }
  21373. },
  21374. "required": ["created"],
  21375. "additionalProperties": false
  21376. }
  21377. },
  21378. "required": ["type", "id", "name", "state", "time"],
  21379. "additionalProperties": false
  21380. },
  21381. "SessionMessageAssistant": {
  21382. "type": "object",
  21383. "properties": {
  21384. "id": {
  21385. "type": "string"
  21386. },
  21387. "metadata": {
  21388. "type": "object"
  21389. },
  21390. "time": {
  21391. "type": "object",
  21392. "properties": {
  21393. "created": {
  21394. "type": "number"
  21395. },
  21396. "completed": {
  21397. "type": "number"
  21398. }
  21399. },
  21400. "required": ["created"],
  21401. "additionalProperties": false
  21402. },
  21403. "type": {
  21404. "type": "string",
  21405. "enum": ["assistant"]
  21406. },
  21407. "agent": {
  21408. "type": "string"
  21409. },
  21410. "model": {
  21411. "type": "object",
  21412. "properties": {
  21413. "id": {
  21414. "type": "string"
  21415. },
  21416. "providerID": {
  21417. "type": "string"
  21418. },
  21419. "variant": {
  21420. "type": "string"
  21421. }
  21422. },
  21423. "required": ["id", "providerID", "variant"],
  21424. "additionalProperties": false
  21425. },
  21426. "content": {
  21427. "type": "array",
  21428. "items": {
  21429. "anyOf": [
  21430. {
  21431. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21432. },
  21433. {
  21434. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21435. },
  21436. {
  21437. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21438. }
  21439. ]
  21440. }
  21441. },
  21442. "snapshot": {
  21443. "type": "object",
  21444. "properties": {
  21445. "start": {
  21446. "type": "string"
  21447. },
  21448. "end": {
  21449. "type": "string"
  21450. }
  21451. },
  21452. "additionalProperties": false
  21453. },
  21454. "finish": {
  21455. "type": "string"
  21456. },
  21457. "cost": {
  21458. "type": "number"
  21459. },
  21460. "tokens": {
  21461. "type": "object",
  21462. "properties": {
  21463. "input": {
  21464. "type": "number"
  21465. },
  21466. "output": {
  21467. "type": "number"
  21468. },
  21469. "reasoning": {
  21470. "type": "number"
  21471. },
  21472. "cache": {
  21473. "type": "object",
  21474. "properties": {
  21475. "read": {
  21476. "type": "number"
  21477. },
  21478. "write": {
  21479. "type": "number"
  21480. }
  21481. },
  21482. "required": ["read", "write"],
  21483. "additionalProperties": false
  21484. }
  21485. },
  21486. "required": ["input", "output", "reasoning", "cache"],
  21487. "additionalProperties": false
  21488. },
  21489. "error": {
  21490. "$ref": "#/components/schemas/SessionErrorUnknown"
  21491. }
  21492. },
  21493. "required": ["id", "time", "type", "agent", "model", "content"],
  21494. "additionalProperties": false
  21495. },
  21496. "SessionMessageCompaction": {
  21497. "type": "object",
  21498. "properties": {
  21499. "type": {
  21500. "type": "string",
  21501. "enum": ["compaction"]
  21502. },
  21503. "reason": {
  21504. "type": "string",
  21505. "enum": ["auto", "manual"]
  21506. },
  21507. "summary": {
  21508. "type": "string"
  21509. },
  21510. "include": {
  21511. "type": "string"
  21512. },
  21513. "id": {
  21514. "type": "string"
  21515. },
  21516. "metadata": {
  21517. "type": "object"
  21518. },
  21519. "time": {
  21520. "type": "object",
  21521. "properties": {
  21522. "created": {
  21523. "type": "number"
  21524. }
  21525. },
  21526. "required": ["created"],
  21527. "additionalProperties": false
  21528. }
  21529. },
  21530. "required": ["type", "reason", "summary", "id", "time"],
  21531. "additionalProperties": false
  21532. },
  21533. "SessionMessage": {
  21534. "anyOf": [
  21535. {
  21536. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21537. },
  21538. {
  21539. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21540. },
  21541. {
  21542. "$ref": "#/components/schemas/SessionMessageUser"
  21543. },
  21544. {
  21545. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21546. },
  21547. {
  21548. "$ref": "#/components/schemas/SessionMessageShell"
  21549. },
  21550. {
  21551. "$ref": "#/components/schemas/SessionMessageAssistant"
  21552. },
  21553. {
  21554. "$ref": "#/components/schemas/SessionMessageCompaction"
  21555. }
  21556. ]
  21557. },
  21558. "ProviderV2Info": {
  21559. "type": "object",
  21560. "properties": {
  21561. "id": {
  21562. "type": "string"
  21563. },
  21564. "name": {
  21565. "type": "string"
  21566. },
  21567. "enabled": {
  21568. "anyOf": [
  21569. {
  21570. "type": "boolean",
  21571. "enum": [false]
  21572. },
  21573. {
  21574. "type": "object",
  21575. "properties": {
  21576. "via": {
  21577. "type": "string",
  21578. "enum": ["env"]
  21579. },
  21580. "name": {
  21581. "type": "string"
  21582. }
  21583. },
  21584. "required": ["via", "name"],
  21585. "additionalProperties": false
  21586. },
  21587. {
  21588. "type": "object",
  21589. "properties": {
  21590. "via": {
  21591. "type": "string",
  21592. "enum": ["account"]
  21593. },
  21594. "service": {
  21595. "type": "string"
  21596. }
  21597. },
  21598. "required": ["via", "service"],
  21599. "additionalProperties": false
  21600. },
  21601. {
  21602. "type": "object",
  21603. "properties": {
  21604. "via": {
  21605. "type": "string",
  21606. "enum": ["custom"]
  21607. },
  21608. "data": {
  21609. "type": "object"
  21610. }
  21611. },
  21612. "required": ["via", "data"],
  21613. "additionalProperties": false
  21614. }
  21615. ]
  21616. },
  21617. "env": {
  21618. "type": "array",
  21619. "items": {
  21620. "type": "string"
  21621. }
  21622. },
  21623. "endpoint": {
  21624. "anyOf": [
  21625. {
  21626. "type": "object",
  21627. "properties": {
  21628. "type": {
  21629. "type": "string",
  21630. "enum": ["unknown"]
  21631. }
  21632. },
  21633. "required": ["type"],
  21634. "additionalProperties": false
  21635. },
  21636. {
  21637. "type": "object",
  21638. "properties": {
  21639. "type": {
  21640. "type": "string",
  21641. "enum": ["openai/responses"]
  21642. },
  21643. "url": {
  21644. "type": "string"
  21645. },
  21646. "websocket": {
  21647. "type": "boolean"
  21648. }
  21649. },
  21650. "required": ["type", "url"],
  21651. "additionalProperties": false
  21652. },
  21653. {
  21654. "type": "object",
  21655. "properties": {
  21656. "type": {
  21657. "type": "string",
  21658. "enum": ["openai/completions"]
  21659. },
  21660. "url": {
  21661. "type": "string"
  21662. },
  21663. "reasoning": {
  21664. "anyOf": [
  21665. {
  21666. "type": "object",
  21667. "properties": {
  21668. "type": {
  21669. "type": "string",
  21670. "enum": ["reasoning_content"]
  21671. }
  21672. },
  21673. "required": ["type"],
  21674. "additionalProperties": false
  21675. },
  21676. {
  21677. "type": "object",
  21678. "properties": {
  21679. "type": {
  21680. "type": "string",
  21681. "enum": ["reasoning_details"]
  21682. }
  21683. },
  21684. "required": ["type"],
  21685. "additionalProperties": false
  21686. }
  21687. ]
  21688. }
  21689. },
  21690. "required": ["type", "url"],
  21691. "additionalProperties": false
  21692. },
  21693. {
  21694. "type": "object",
  21695. "properties": {
  21696. "type": {
  21697. "type": "string",
  21698. "enum": ["anthropic/messages"]
  21699. },
  21700. "url": {
  21701. "type": "string"
  21702. }
  21703. },
  21704. "required": ["type", "url"],
  21705. "additionalProperties": false
  21706. },
  21707. {
  21708. "type": "object",
  21709. "properties": {
  21710. "type": {
  21711. "type": "string",
  21712. "enum": ["aisdk"]
  21713. },
  21714. "package": {
  21715. "type": "string"
  21716. },
  21717. "url": {
  21718. "type": "string"
  21719. }
  21720. },
  21721. "required": ["type", "package"],
  21722. "additionalProperties": false
  21723. }
  21724. ]
  21725. },
  21726. "options": {
  21727. "type": "object",
  21728. "properties": {
  21729. "headers": {
  21730. "type": "object",
  21731. "additionalProperties": {
  21732. "type": "string"
  21733. }
  21734. },
  21735. "body": {
  21736. "type": "object"
  21737. },
  21738. "aisdk": {
  21739. "type": "object",
  21740. "properties": {
  21741. "provider": {
  21742. "type": "object"
  21743. },
  21744. "request": {
  21745. "type": "object"
  21746. }
  21747. },
  21748. "required": ["provider", "request"],
  21749. "additionalProperties": false
  21750. }
  21751. },
  21752. "required": ["headers", "body", "aisdk"],
  21753. "additionalProperties": false
  21754. }
  21755. },
  21756. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21757. "additionalProperties": false
  21758. },
  21759. "EventTuiToastShow1": {
  21760. "type": "object",
  21761. "properties": {
  21762. "id": {
  21763. "type": "string"
  21764. },
  21765. "type": {
  21766. "type": "string",
  21767. "enum": ["tui.toast.show"]
  21768. },
  21769. "properties": {
  21770. "type": "object",
  21771. "properties": {
  21772. "title": {
  21773. "type": "string"
  21774. },
  21775. "message": {
  21776. "type": "string"
  21777. },
  21778. "variant": {
  21779. "type": "string",
  21780. "enum": ["info", "success", "warning", "error"]
  21781. },
  21782. "duration": {
  21783. "type": "integer",
  21784. "exclusiveMinimum": 0
  21785. }
  21786. },
  21787. "required": ["message", "variant"],
  21788. "additionalProperties": false
  21789. }
  21790. },
  21791. "required": ["id", "type", "properties"],
  21792. "additionalProperties": false
  21793. },
  21794. "ModelV2Info1": {
  21795. "type": "object",
  21796. "properties": {
  21797. "id": {
  21798. "type": "string"
  21799. },
  21800. "apiID": {
  21801. "type": "string"
  21802. },
  21803. "providerID": {
  21804. "type": "string"
  21805. },
  21806. "family": {
  21807. "type": "string"
  21808. },
  21809. "name": {
  21810. "type": "string"
  21811. },
  21812. "endpoint": {
  21813. "anyOf": [
  21814. {
  21815. "type": "object",
  21816. "properties": {
  21817. "type": {
  21818. "type": "string",
  21819. "enum": ["unknown"]
  21820. }
  21821. },
  21822. "required": ["type"],
  21823. "additionalProperties": false
  21824. },
  21825. {
  21826. "type": "object",
  21827. "properties": {
  21828. "type": {
  21829. "type": "string",
  21830. "enum": ["openai/responses"]
  21831. },
  21832. "url": {
  21833. "type": "string"
  21834. },
  21835. "websocket": {
  21836. "type": "boolean"
  21837. }
  21838. },
  21839. "required": ["type", "url"],
  21840. "additionalProperties": false
  21841. },
  21842. {
  21843. "type": "object",
  21844. "properties": {
  21845. "type": {
  21846. "type": "string",
  21847. "enum": ["openai/completions"]
  21848. },
  21849. "url": {
  21850. "type": "string"
  21851. },
  21852. "reasoning": {
  21853. "anyOf": [
  21854. {
  21855. "type": "object",
  21856. "properties": {
  21857. "type": {
  21858. "type": "string",
  21859. "enum": ["reasoning_content"]
  21860. }
  21861. },
  21862. "required": ["type"],
  21863. "additionalProperties": false
  21864. },
  21865. {
  21866. "type": "object",
  21867. "properties": {
  21868. "type": {
  21869. "type": "string",
  21870. "enum": ["reasoning_details"]
  21871. }
  21872. },
  21873. "required": ["type"],
  21874. "additionalProperties": false
  21875. }
  21876. ]
  21877. }
  21878. },
  21879. "required": ["type", "url"],
  21880. "additionalProperties": false
  21881. },
  21882. {
  21883. "type": "object",
  21884. "properties": {
  21885. "type": {
  21886. "type": "string",
  21887. "enum": ["anthropic/messages"]
  21888. },
  21889. "url": {
  21890. "type": "string"
  21891. }
  21892. },
  21893. "required": ["type", "url"],
  21894. "additionalProperties": false
  21895. },
  21896. {
  21897. "type": "object",
  21898. "properties": {
  21899. "type": {
  21900. "type": "string",
  21901. "enum": ["aisdk"]
  21902. },
  21903. "package": {
  21904. "type": "string"
  21905. },
  21906. "url": {
  21907. "type": "string"
  21908. }
  21909. },
  21910. "required": ["type", "package"],
  21911. "additionalProperties": false
  21912. }
  21913. ]
  21914. },
  21915. "capabilities": {
  21916. "type": "object",
  21917. "properties": {
  21918. "tools": {
  21919. "type": "boolean"
  21920. },
  21921. "input": {
  21922. "type": "array",
  21923. "items": {
  21924. "type": "string"
  21925. }
  21926. },
  21927. "output": {
  21928. "type": "array",
  21929. "items": {
  21930. "type": "string"
  21931. }
  21932. }
  21933. },
  21934. "required": ["tools", "input", "output"],
  21935. "additionalProperties": false
  21936. },
  21937. "options": {
  21938. "type": "object",
  21939. "properties": {
  21940. "headers": {
  21941. "type": "object",
  21942. "additionalProperties": {
  21943. "type": "string"
  21944. }
  21945. },
  21946. "body": {
  21947. "type": "object"
  21948. },
  21949. "aisdk": {
  21950. "type": "object",
  21951. "properties": {
  21952. "provider": {
  21953. "type": "object"
  21954. },
  21955. "request": {
  21956. "type": "object"
  21957. }
  21958. },
  21959. "required": ["provider", "request"],
  21960. "additionalProperties": false
  21961. },
  21962. "variant": {
  21963. "type": "string"
  21964. }
  21965. },
  21966. "required": ["headers", "body", "aisdk"],
  21967. "additionalProperties": false
  21968. },
  21969. "variants": {
  21970. "type": "array",
  21971. "items": {
  21972. "type": "object",
  21973. "properties": {
  21974. "id": {
  21975. "type": "string"
  21976. },
  21977. "headers": {
  21978. "type": "object",
  21979. "additionalProperties": {
  21980. "type": "string"
  21981. }
  21982. },
  21983. "body": {
  21984. "type": "object"
  21985. },
  21986. "aisdk": {
  21987. "type": "object",
  21988. "properties": {
  21989. "provider": {
  21990. "type": "object"
  21991. },
  21992. "request": {
  21993. "type": "object"
  21994. }
  21995. },
  21996. "required": ["provider", "request"],
  21997. "additionalProperties": false
  21998. }
  21999. },
  22000. "required": ["id", "headers", "body", "aisdk"],
  22001. "additionalProperties": false
  22002. }
  22003. },
  22004. "time": {
  22005. "type": "object",
  22006. "properties": {
  22007. "released": {
  22008. "anyOf": [
  22009. {
  22010. "type": "number"
  22011. },
  22012. {
  22013. "type": "string",
  22014. "enum": ["NaN"]
  22015. },
  22016. {
  22017. "type": "string",
  22018. "enum": ["Infinity"]
  22019. },
  22020. {
  22021. "type": "string",
  22022. "enum": ["-Infinity"]
  22023. }
  22024. ]
  22025. }
  22026. },
  22027. "required": ["released"],
  22028. "additionalProperties": false
  22029. },
  22030. "cost": {
  22031. "type": "array",
  22032. "items": {
  22033. "type": "object",
  22034. "properties": {
  22035. "tier": {
  22036. "type": "object",
  22037. "properties": {
  22038. "type": {
  22039. "type": "string",
  22040. "enum": ["context"]
  22041. },
  22042. "size": {
  22043. "type": "integer"
  22044. }
  22045. },
  22046. "required": ["type", "size"],
  22047. "additionalProperties": false
  22048. },
  22049. "input": {
  22050. "type": "number"
  22051. },
  22052. "output": {
  22053. "type": "number"
  22054. },
  22055. "cache": {
  22056. "type": "object",
  22057. "properties": {
  22058. "read": {
  22059. "type": "number"
  22060. },
  22061. "write": {
  22062. "type": "number"
  22063. }
  22064. },
  22065. "required": ["read", "write"],
  22066. "additionalProperties": false
  22067. }
  22068. },
  22069. "required": ["input", "output", "cache"],
  22070. "additionalProperties": false
  22071. }
  22072. },
  22073. "status": {
  22074. "type": "string",
  22075. "enum": ["alpha", "beta", "deprecated", "active"]
  22076. },
  22077. "enabled": {
  22078. "type": "boolean"
  22079. },
  22080. "limit": {
  22081. "type": "object",
  22082. "properties": {
  22083. "context": {
  22084. "type": "integer"
  22085. },
  22086. "input": {
  22087. "type": "integer"
  22088. },
  22089. "output": {
  22090. "type": "integer"
  22091. }
  22092. },
  22093. "required": ["context", "output"],
  22094. "additionalProperties": false
  22095. }
  22096. },
  22097. "required": [
  22098. "id",
  22099. "apiID",
  22100. "providerID",
  22101. "name",
  22102. "endpoint",
  22103. "capabilities",
  22104. "options",
  22105. "variants",
  22106. "time",
  22107. "cost",
  22108. "status",
  22109. "enabled",
  22110. "limit"
  22111. ],
  22112. "additionalProperties": false
  22113. },
  22114. "BadRequestError": {
  22115. "type": "object",
  22116. "required": ["name", "data"],
  22117. "properties": {
  22118. "name": {
  22119. "type": "string",
  22120. "enum": ["BadRequest"]
  22121. },
  22122. "data": {
  22123. "type": "object",
  22124. "required": ["message"],
  22125. "properties": {
  22126. "message": {
  22127. "type": "string"
  22128. },
  22129. "kind": {
  22130. "type": "string",
  22131. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  22132. }
  22133. }
  22134. }
  22135. }
  22136. }
  22137. }
  22138. },
  22139. "security": [],
  22140. "tags": [
  22141. {
  22142. "name": "control",
  22143. "description": "Control plane routes."
  22144. },
  22145. {
  22146. "name": "global",
  22147. "description": "Global server routes."
  22148. },
  22149. {
  22150. "name": "event",
  22151. "description": "Instance event stream route."
  22152. },
  22153. {
  22154. "name": "config",
  22155. "description": "Experimental HttpApi config routes."
  22156. },
  22157. {
  22158. "name": "experimental",
  22159. "description": "Experimental HttpApi read-only routes."
  22160. },
  22161. {
  22162. "name": "file",
  22163. "description": "Experimental HttpApi file routes."
  22164. },
  22165. {
  22166. "name": "instance",
  22167. "description": "Experimental HttpApi instance read routes."
  22168. },
  22169. {
  22170. "name": "mcp",
  22171. "description": "Experimental HttpApi MCP routes."
  22172. },
  22173. {
  22174. "name": "project",
  22175. "description": "Experimental HttpApi project routes."
  22176. },
  22177. {
  22178. "name": "pty",
  22179. "description": "Experimental HttpApi PTY routes."
  22180. },
  22181. {
  22182. "name": "question",
  22183. "description": "Question routes."
  22184. },
  22185. {
  22186. "name": "permission",
  22187. "description": "Experimental HttpApi permission routes."
  22188. },
  22189. {
  22190. "name": "provider",
  22191. "description": "Experimental HttpApi provider routes."
  22192. },
  22193. {
  22194. "name": "session",
  22195. "description": "Experimental HttpApi session routes."
  22196. },
  22197. {
  22198. "name": "sync",
  22199. "description": "Experimental HttpApi sync routes."
  22200. },
  22201. {
  22202. "name": "v2",
  22203. "description": "Experimental v2 routes."
  22204. },
  22205. {
  22206. "name": "v2 messages",
  22207. "description": "Experimental v2 message routes."
  22208. },
  22209. {
  22210. "name": "v2 models",
  22211. "description": "Experimental v2 model routes."
  22212. },
  22213. {
  22214. "name": "v2 providers",
  22215. "description": "Experimental v2 provider routes."
  22216. },
  22217. {
  22218. "name": "tui",
  22219. "description": "Experimental HttpApi TUI routes."
  22220. },
  22221. {
  22222. "name": "workspace",
  22223. "description": "Experimental HttpApi workspace routes."
  22224. },
  22225. {
  22226. "name": "pty",
  22227. "description": "PTY websocket route."
  22228. }
  22229. ]
  22230. }