openapi.json 557 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "Bad request",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "$ref": "#/components/schemas/BadRequestError"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "description": "Set authentication credentials",
  47. "summary": "Set auth credentials",
  48. "requestBody": {
  49. "content": {
  50. "application/json": {
  51. "schema": {
  52. "$ref": "#/components/schemas/Auth"
  53. }
  54. }
  55. }
  56. },
  57. "x-codeSamples": [
  58. {
  59. "lang": "js",
  60. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  61. }
  62. ]
  63. },
  64. "delete": {
  65. "tags": ["control"],
  66. "operationId": "auth.remove",
  67. "parameters": [
  68. {
  69. "name": "providerID",
  70. "in": "path",
  71. "schema": {
  72. "type": "string"
  73. },
  74. "required": true
  75. }
  76. ],
  77. "responses": {
  78. "200": {
  79. "description": "Successfully removed authentication credentials",
  80. "content": {
  81. "application/json": {
  82. "schema": {
  83. "type": "boolean",
  84. "description": "Successfully removed authentication credentials"
  85. }
  86. }
  87. }
  88. },
  89. "400": {
  90. "description": "Bad request",
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "$ref": "#/components/schemas/BadRequestError"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "description": "Remove authentication credentials",
  101. "summary": "Remove auth credentials",
  102. "x-codeSamples": [
  103. {
  104. "lang": "js",
  105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  106. }
  107. ]
  108. }
  109. },
  110. "/log": {
  111. "post": {
  112. "tags": ["control"],
  113. "operationId": "app.log",
  114. "parameters": [
  115. {
  116. "name": "directory",
  117. "in": "query",
  118. "schema": {
  119. "type": "string"
  120. },
  121. "required": false
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "schema": {
  127. "type": "string"
  128. },
  129. "required": false
  130. }
  131. ],
  132. "responses": {
  133. "200": {
  134. "description": "Log entry written successfully",
  135. "content": {
  136. "application/json": {
  137. "schema": {
  138. "type": "boolean",
  139. "description": "Log entry written successfully"
  140. }
  141. }
  142. }
  143. },
  144. "400": {
  145. "description": "Bad request",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "#/components/schemas/BadRequestError"
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "description": "Write a log entry to the server logs with specified level and metadata.",
  156. "summary": "Write log",
  157. "requestBody": {
  158. "content": {
  159. "application/json": {
  160. "schema": {
  161. "type": "object",
  162. "properties": {
  163. "service": {
  164. "type": "string",
  165. "description": "Service name for the log entry"
  166. },
  167. "level": {
  168. "type": "string",
  169. "enum": ["debug", "info", "error", "warn"],
  170. "description": "Log level"
  171. },
  172. "message": {
  173. "type": "string",
  174. "description": "Log message"
  175. },
  176. "extra": {
  177. "type": "object"
  178. }
  179. },
  180. "required": ["service", "level", "message"],
  181. "additionalProperties": false
  182. }
  183. }
  184. }
  185. },
  186. "x-codeSamples": [
  187. {
  188. "lang": "js",
  189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  190. }
  191. ]
  192. }
  193. },
  194. "/global/health": {
  195. "get": {
  196. "tags": ["global"],
  197. "operationId": "global.health",
  198. "parameters": [],
  199. "responses": {
  200. "200": {
  201. "description": "Health information",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "properties": {
  207. "healthy": {
  208. "type": "boolean",
  209. "enum": [true]
  210. },
  211. "version": {
  212. "type": "string"
  213. }
  214. },
  215. "required": ["healthy", "version"],
  216. "additionalProperties": false,
  217. "description": "Health information"
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "description": "Get health information about the OpenCode server.",
  224. "summary": "Get health",
  225. "x-codeSamples": [
  226. {
  227. "lang": "js",
  228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  229. }
  230. ]
  231. }
  232. },
  233. "/global/event": {
  234. "get": {
  235. "tags": ["global"],
  236. "operationId": "global.event",
  237. "parameters": [],
  238. "responses": {
  239. "200": {
  240. "description": "Event stream",
  241. "content": {
  242. "text/event-stream": {
  243. "schema": {
  244. "$ref": "#/components/schemas/GlobalEvent"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  251. "summary": "Get global events",
  252. "x-codeSamples": [
  253. {
  254. "lang": "js",
  255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  256. }
  257. ]
  258. }
  259. },
  260. "/global/config": {
  261. "get": {
  262. "tags": ["global"],
  263. "operationId": "global.config.get",
  264. "parameters": [],
  265. "responses": {
  266. "200": {
  267. "description": "Get global config info",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "$ref": "#/components/schemas/Config"
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  278. "summary": "Get global configuration",
  279. "x-codeSamples": [
  280. {
  281. "lang": "js",
  282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  283. }
  284. ]
  285. },
  286. "patch": {
  287. "tags": ["global"],
  288. "operationId": "global.config.update",
  289. "parameters": [],
  290. "responses": {
  291. "200": {
  292. "description": "Successfully updated global config",
  293. "content": {
  294. "application/json": {
  295. "schema": {
  296. "$ref": "#/components/schemas/Config"
  297. }
  298. }
  299. }
  300. },
  301. "400": {
  302. "description": "Bad request",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "$ref": "#/components/schemas/BadRequestError"
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "description": "Update global OpenCode configuration settings and preferences.",
  313. "summary": "Update global configuration",
  314. "requestBody": {
  315. "content": {
  316. "application/json": {
  317. "schema": {
  318. "$ref": "#/components/schemas/Config"
  319. }
  320. }
  321. }
  322. },
  323. "x-codeSamples": [
  324. {
  325. "lang": "js",
  326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  327. }
  328. ]
  329. }
  330. },
  331. "/global/dispose": {
  332. "post": {
  333. "tags": ["global"],
  334. "operationId": "global.dispose",
  335. "parameters": [],
  336. "responses": {
  337. "200": {
  338. "description": "Global disposed",
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "boolean",
  343. "description": "Global disposed"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  350. "summary": "Dispose instance",
  351. "x-codeSamples": [
  352. {
  353. "lang": "js",
  354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  355. }
  356. ]
  357. }
  358. },
  359. "/global/upgrade": {
  360. "post": {
  361. "tags": ["global"],
  362. "operationId": "global.upgrade",
  363. "parameters": [],
  364. "responses": {
  365. "200": {
  366. "description": "Upgrade result",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "anyOf": [
  371. {
  372. "type": "object",
  373. "properties": {
  374. "success": {
  375. "type": "boolean",
  376. "enum": [true]
  377. },
  378. "version": {
  379. "type": "string"
  380. }
  381. },
  382. "required": ["success", "version"],
  383. "additionalProperties": false
  384. },
  385. {
  386. "type": "object",
  387. "properties": {
  388. "success": {
  389. "type": "boolean",
  390. "enum": [false]
  391. },
  392. "error": {
  393. "type": "string"
  394. }
  395. },
  396. "required": ["success", "error"],
  397. "additionalProperties": false
  398. }
  399. ],
  400. "description": "Upgrade result"
  401. }
  402. }
  403. }
  404. },
  405. "400": {
  406. "description": "Bad request",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "$ref": "#/components/schemas/BadRequestError"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "description": "Upgrade opencode to the specified version or latest if not specified.",
  417. "summary": "Upgrade opencode",
  418. "requestBody": {
  419. "content": {
  420. "application/json": {
  421. "schema": {
  422. "type": "object",
  423. "properties": {
  424. "target": {
  425. "type": "string"
  426. }
  427. },
  428. "additionalProperties": false
  429. }
  430. }
  431. }
  432. },
  433. "x-codeSamples": [
  434. {
  435. "lang": "js",
  436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  437. }
  438. ]
  439. }
  440. },
  441. "/event": {
  442. "get": {
  443. "tags": ["event"],
  444. "operationId": "event.subscribe",
  445. "parameters": [
  446. {
  447. "name": "directory",
  448. "in": "query",
  449. "schema": {
  450. "type": "string"
  451. },
  452. "required": false
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "schema": {
  458. "type": "string"
  459. },
  460. "required": false
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "Event stream",
  466. "content": {
  467. "text/event-stream": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Event"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "description": "Get events",
  476. "summary": "Subscribe to events",
  477. "x-codeSamples": [
  478. {
  479. "lang": "js",
  480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  481. }
  482. ]
  483. }
  484. },
  485. "/config": {
  486. "get": {
  487. "tags": ["config"],
  488. "operationId": "config.get",
  489. "parameters": [
  490. {
  491. "name": "directory",
  492. "in": "query",
  493. "schema": {
  494. "type": "string"
  495. },
  496. "required": false
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "schema": {
  502. "type": "string"
  503. },
  504. "required": false
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "Get config info",
  510. "content": {
  511. "application/json": {
  512. "schema": {
  513. "$ref": "#/components/schemas/Config"
  514. }
  515. }
  516. }
  517. }
  518. },
  519. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  520. "summary": "Get configuration",
  521. "x-codeSamples": [
  522. {
  523. "lang": "js",
  524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  525. }
  526. ]
  527. },
  528. "patch": {
  529. "tags": ["config"],
  530. "operationId": "config.update",
  531. "parameters": [
  532. {
  533. "name": "directory",
  534. "in": "query",
  535. "schema": {
  536. "type": "string"
  537. },
  538. "required": false
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "schema": {
  544. "type": "string"
  545. },
  546. "required": false
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "Successfully updated config",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "$ref": "#/components/schemas/Config"
  556. }
  557. }
  558. }
  559. },
  560. "400": {
  561. "description": "Bad request",
  562. "content": {
  563. "application/json": {
  564. "schema": {
  565. "$ref": "#/components/schemas/BadRequestError"
  566. }
  567. }
  568. }
  569. }
  570. },
  571. "description": "Update OpenCode configuration settings and preferences.",
  572. "summary": "Update configuration",
  573. "requestBody": {
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/Config"
  578. }
  579. }
  580. }
  581. },
  582. "x-codeSamples": [
  583. {
  584. "lang": "js",
  585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  586. }
  587. ]
  588. }
  589. },
  590. "/config/providers": {
  591. "get": {
  592. "tags": ["config"],
  593. "operationId": "config.providers",
  594. "parameters": [
  595. {
  596. "name": "directory",
  597. "in": "query",
  598. "schema": {
  599. "type": "string"
  600. },
  601. "required": false
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "schema": {
  607. "type": "string"
  608. },
  609. "required": false
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "List of providers",
  615. "content": {
  616. "application/json": {
  617. "schema": {
  618. "type": "object",
  619. "properties": {
  620. "providers": {
  621. "type": "array",
  622. "items": {
  623. "$ref": "#/components/schemas/Provider"
  624. }
  625. },
  626. "default": {
  627. "type": "object",
  628. "additionalProperties": {
  629. "type": "string"
  630. }
  631. }
  632. },
  633. "required": ["providers", "default"],
  634. "additionalProperties": false,
  635. "description": "List of providers"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "description": "Get a list of all configured AI providers and their default models.",
  642. "summary": "List config providers",
  643. "x-codeSamples": [
  644. {
  645. "lang": "js",
  646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  647. }
  648. ]
  649. }
  650. },
  651. "/experimental/console": {
  652. "get": {
  653. "tags": ["experimental"],
  654. "operationId": "experimental.console.get",
  655. "parameters": [
  656. {
  657. "name": "directory",
  658. "in": "query",
  659. "schema": {
  660. "type": "string"
  661. },
  662. "required": false
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "schema": {
  668. "type": "string"
  669. },
  670. "required": false
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "Active Console provider metadata",
  676. "content": {
  677. "application/json": {
  678. "schema": {
  679. "$ref": "#/components/schemas/ConsoleState"
  680. }
  681. }
  682. }
  683. },
  684. "500": {
  685. "description": "InternalServerError",
  686. "content": {
  687. "application/json": {
  688. "schema": {
  689. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  696. "summary": "Get active Console provider metadata",
  697. "x-codeSamples": [
  698. {
  699. "lang": "js",
  700. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  701. }
  702. ]
  703. }
  704. },
  705. "/experimental/console/orgs": {
  706. "get": {
  707. "tags": ["experimental"],
  708. "operationId": "experimental.console.listOrgs",
  709. "parameters": [
  710. {
  711. "name": "directory",
  712. "in": "query",
  713. "schema": {
  714. "type": "string"
  715. },
  716. "required": false
  717. },
  718. {
  719. "name": "workspace",
  720. "in": "query",
  721. "schema": {
  722. "type": "string"
  723. },
  724. "required": false
  725. }
  726. ],
  727. "responses": {
  728. "200": {
  729. "description": "Switchable Console orgs",
  730. "content": {
  731. "application/json": {
  732. "schema": {
  733. "type": "object",
  734. "properties": {
  735. "orgs": {
  736. "type": "array",
  737. "items": {
  738. "type": "object",
  739. "properties": {
  740. "accountID": {
  741. "type": "string"
  742. },
  743. "accountEmail": {
  744. "type": "string"
  745. },
  746. "accountUrl": {
  747. "type": "string"
  748. },
  749. "orgID": {
  750. "type": "string"
  751. },
  752. "orgName": {
  753. "type": "string"
  754. },
  755. "active": {
  756. "type": "boolean"
  757. }
  758. },
  759. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  760. "additionalProperties": false
  761. }
  762. }
  763. },
  764. "required": ["orgs"],
  765. "additionalProperties": false,
  766. "description": "Switchable Console orgs"
  767. }
  768. }
  769. }
  770. },
  771. "500": {
  772. "description": "InternalServerError",
  773. "content": {
  774. "application/json": {
  775. "schema": {
  776. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  777. }
  778. }
  779. }
  780. }
  781. },
  782. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  783. "summary": "List switchable Console orgs",
  784. "x-codeSamples": [
  785. {
  786. "lang": "js",
  787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  788. }
  789. ]
  790. }
  791. },
  792. "/experimental/console/switch": {
  793. "post": {
  794. "tags": ["experimental"],
  795. "operationId": "experimental.console.switchOrg",
  796. "parameters": [
  797. {
  798. "name": "directory",
  799. "in": "query",
  800. "schema": {
  801. "type": "string"
  802. },
  803. "required": false
  804. },
  805. {
  806. "name": "workspace",
  807. "in": "query",
  808. "schema": {
  809. "type": "string"
  810. },
  811. "required": false
  812. }
  813. ],
  814. "responses": {
  815. "200": {
  816. "description": "Switch success",
  817. "content": {
  818. "application/json": {
  819. "schema": {
  820. "type": "boolean",
  821. "description": "Switch success"
  822. }
  823. }
  824. }
  825. }
  826. },
  827. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  828. "summary": "Switch active Console org",
  829. "requestBody": {
  830. "content": {
  831. "application/json": {
  832. "schema": {
  833. "type": "object",
  834. "properties": {
  835. "accountID": {
  836. "type": "string"
  837. },
  838. "orgID": {
  839. "type": "string"
  840. }
  841. },
  842. "required": ["accountID", "orgID"],
  843. "additionalProperties": false
  844. }
  845. }
  846. }
  847. },
  848. "x-codeSamples": [
  849. {
  850. "lang": "js",
  851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  852. }
  853. ]
  854. }
  855. },
  856. "/experimental/tool": {
  857. "get": {
  858. "tags": ["experimental"],
  859. "operationId": "tool.list",
  860. "parameters": [
  861. {
  862. "name": "directory",
  863. "in": "query",
  864. "schema": {
  865. "type": "string"
  866. },
  867. "required": false
  868. },
  869. {
  870. "name": "workspace",
  871. "in": "query",
  872. "schema": {
  873. "type": "string"
  874. },
  875. "required": false
  876. },
  877. {
  878. "name": "provider",
  879. "in": "query",
  880. "schema": {
  881. "type": "string"
  882. },
  883. "required": true
  884. },
  885. {
  886. "name": "model",
  887. "in": "query",
  888. "schema": {
  889. "type": "string"
  890. },
  891. "required": true
  892. }
  893. ],
  894. "responses": {
  895. "200": {
  896. "description": "Tools",
  897. "content": {
  898. "application/json": {
  899. "schema": {
  900. "$ref": "#/components/schemas/ToolList"
  901. }
  902. }
  903. }
  904. },
  905. "400": {
  906. "description": "Bad request",
  907. "content": {
  908. "application/json": {
  909. "schema": {
  910. "$ref": "#/components/schemas/BadRequestError"
  911. }
  912. }
  913. }
  914. }
  915. },
  916. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  917. "summary": "List tools",
  918. "x-codeSamples": [
  919. {
  920. "lang": "js",
  921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  922. }
  923. ]
  924. }
  925. },
  926. "/experimental/tool/ids": {
  927. "get": {
  928. "tags": ["experimental"],
  929. "operationId": "tool.ids",
  930. "parameters": [
  931. {
  932. "name": "directory",
  933. "in": "query",
  934. "schema": {
  935. "type": "string"
  936. },
  937. "required": false
  938. },
  939. {
  940. "name": "workspace",
  941. "in": "query",
  942. "schema": {
  943. "type": "string"
  944. },
  945. "required": false
  946. }
  947. ],
  948. "responses": {
  949. "200": {
  950. "description": "Tool IDs",
  951. "content": {
  952. "application/json": {
  953. "schema": {
  954. "$ref": "#/components/schemas/ToolIDs"
  955. }
  956. }
  957. }
  958. },
  959. "400": {
  960. "description": "Bad request",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/BadRequestError"
  965. }
  966. }
  967. }
  968. }
  969. },
  970. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  971. "summary": "List tool IDs",
  972. "x-codeSamples": [
  973. {
  974. "lang": "js",
  975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  976. }
  977. ]
  978. }
  979. },
  980. "/experimental/worktree": {
  981. "get": {
  982. "tags": ["experimental"],
  983. "operationId": "worktree.list",
  984. "parameters": [
  985. {
  986. "name": "directory",
  987. "in": "query",
  988. "schema": {
  989. "type": "string"
  990. },
  991. "required": false
  992. },
  993. {
  994. "name": "workspace",
  995. "in": "query",
  996. "schema": {
  997. "type": "string"
  998. },
  999. "required": false
  1000. }
  1001. ],
  1002. "responses": {
  1003. "200": {
  1004. "description": "List of worktree directories",
  1005. "content": {
  1006. "application/json": {
  1007. "schema": {
  1008. "type": "array",
  1009. "items": {
  1010. "type": "string"
  1011. },
  1012. "description": "List of worktree directories"
  1013. }
  1014. }
  1015. }
  1016. },
  1017. "400": {
  1018. "description": "WorktreeError",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/WorktreeError"
  1023. }
  1024. }
  1025. }
  1026. }
  1027. },
  1028. "description": "List all sandbox worktrees for the current project.",
  1029. "summary": "List worktrees",
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1034. }
  1035. ]
  1036. },
  1037. "post": {
  1038. "tags": ["experimental"],
  1039. "operationId": "worktree.create",
  1040. "parameters": [
  1041. {
  1042. "name": "directory",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. },
  1049. {
  1050. "name": "workspace",
  1051. "in": "query",
  1052. "schema": {
  1053. "type": "string"
  1054. },
  1055. "required": false
  1056. }
  1057. ],
  1058. "responses": {
  1059. "200": {
  1060. "description": "Worktree created",
  1061. "content": {
  1062. "application/json": {
  1063. "schema": {
  1064. "$ref": "#/components/schemas/Worktree"
  1065. }
  1066. }
  1067. }
  1068. },
  1069. "400": {
  1070. "description": "WorktreeError",
  1071. "content": {
  1072. "application/json": {
  1073. "schema": {
  1074. "$ref": "#/components/schemas/WorktreeError"
  1075. }
  1076. }
  1077. }
  1078. }
  1079. },
  1080. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1081. "summary": "Create worktree",
  1082. "requestBody": {
  1083. "content": {
  1084. "application/json": {
  1085. "schema": {
  1086. "$ref": "#/components/schemas/WorktreeCreateInput"
  1087. }
  1088. }
  1089. }
  1090. },
  1091. "x-codeSamples": [
  1092. {
  1093. "lang": "js",
  1094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1095. }
  1096. ]
  1097. },
  1098. "delete": {
  1099. "tags": ["experimental"],
  1100. "operationId": "worktree.remove",
  1101. "parameters": [
  1102. {
  1103. "name": "directory",
  1104. "in": "query",
  1105. "schema": {
  1106. "type": "string"
  1107. },
  1108. "required": false
  1109. },
  1110. {
  1111. "name": "workspace",
  1112. "in": "query",
  1113. "schema": {
  1114. "type": "string"
  1115. },
  1116. "required": false
  1117. }
  1118. ],
  1119. "responses": {
  1120. "200": {
  1121. "description": "Worktree removed",
  1122. "content": {
  1123. "application/json": {
  1124. "schema": {
  1125. "type": "boolean",
  1126. "description": "Worktree removed"
  1127. }
  1128. }
  1129. }
  1130. },
  1131. "400": {
  1132. "description": "WorktreeError",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/WorktreeError"
  1137. }
  1138. }
  1139. }
  1140. }
  1141. },
  1142. "description": "Remove a git worktree and delete its branch.",
  1143. "summary": "Remove worktree",
  1144. "requestBody": {
  1145. "content": {
  1146. "application/json": {
  1147. "schema": {
  1148. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "x-codeSamples": [
  1154. {
  1155. "lang": "js",
  1156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1157. }
  1158. ]
  1159. }
  1160. },
  1161. "/experimental/worktree/reset": {
  1162. "post": {
  1163. "tags": ["experimental"],
  1164. "operationId": "worktree.reset",
  1165. "parameters": [
  1166. {
  1167. "name": "directory",
  1168. "in": "query",
  1169. "schema": {
  1170. "type": "string"
  1171. },
  1172. "required": false
  1173. },
  1174. {
  1175. "name": "workspace",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. }
  1182. ],
  1183. "responses": {
  1184. "200": {
  1185. "description": "Worktree reset",
  1186. "content": {
  1187. "application/json": {
  1188. "schema": {
  1189. "type": "boolean",
  1190. "description": "Worktree reset"
  1191. }
  1192. }
  1193. }
  1194. },
  1195. "400": {
  1196. "description": "WorktreeError",
  1197. "content": {
  1198. "application/json": {
  1199. "schema": {
  1200. "$ref": "#/components/schemas/WorktreeError"
  1201. }
  1202. }
  1203. }
  1204. }
  1205. },
  1206. "description": "Reset a worktree branch to the primary default branch.",
  1207. "summary": "Reset worktree",
  1208. "requestBody": {
  1209. "content": {
  1210. "application/json": {
  1211. "schema": {
  1212. "$ref": "#/components/schemas/WorktreeResetInput"
  1213. }
  1214. }
  1215. }
  1216. },
  1217. "x-codeSamples": [
  1218. {
  1219. "lang": "js",
  1220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1221. }
  1222. ]
  1223. }
  1224. },
  1225. "/experimental/session": {
  1226. "get": {
  1227. "tags": ["experimental"],
  1228. "operationId": "experimental.session.list",
  1229. "parameters": [
  1230. {
  1231. "name": "directory",
  1232. "in": "query",
  1233. "schema": {
  1234. "type": "string"
  1235. },
  1236. "required": false
  1237. },
  1238. {
  1239. "name": "workspace",
  1240. "in": "query",
  1241. "schema": {
  1242. "type": "string"
  1243. },
  1244. "required": false
  1245. },
  1246. {
  1247. "name": "roots",
  1248. "in": "query",
  1249. "schema": {
  1250. "anyOf": [
  1251. {
  1252. "type": "boolean"
  1253. },
  1254. {
  1255. "type": "string",
  1256. "enum": ["true", "false"]
  1257. }
  1258. ]
  1259. },
  1260. "required": false
  1261. },
  1262. {
  1263. "name": "start",
  1264. "in": "query",
  1265. "schema": {
  1266. "type": "number"
  1267. },
  1268. "required": false
  1269. },
  1270. {
  1271. "name": "cursor",
  1272. "in": "query",
  1273. "schema": {
  1274. "type": "number"
  1275. },
  1276. "required": false
  1277. },
  1278. {
  1279. "name": "search",
  1280. "in": "query",
  1281. "schema": {
  1282. "type": "string"
  1283. },
  1284. "required": false
  1285. },
  1286. {
  1287. "name": "limit",
  1288. "in": "query",
  1289. "schema": {
  1290. "type": "number"
  1291. },
  1292. "required": false
  1293. },
  1294. {
  1295. "name": "archived",
  1296. "in": "query",
  1297. "schema": {
  1298. "anyOf": [
  1299. {
  1300. "type": "boolean"
  1301. },
  1302. {
  1303. "type": "string",
  1304. "enum": ["true", "false"]
  1305. }
  1306. ]
  1307. },
  1308. "required": false
  1309. }
  1310. ],
  1311. "responses": {
  1312. "200": {
  1313. "description": "List of sessions",
  1314. "content": {
  1315. "application/json": {
  1316. "schema": {
  1317. "type": "array",
  1318. "items": {
  1319. "$ref": "#/components/schemas/GlobalSession"
  1320. },
  1321. "description": "List of sessions"
  1322. }
  1323. }
  1324. }
  1325. }
  1326. },
  1327. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1328. "summary": "List sessions",
  1329. "x-codeSamples": [
  1330. {
  1331. "lang": "js",
  1332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1333. }
  1334. ]
  1335. }
  1336. },
  1337. "/experimental/resource": {
  1338. "get": {
  1339. "tags": ["experimental"],
  1340. "operationId": "experimental.resource.list",
  1341. "parameters": [
  1342. {
  1343. "name": "directory",
  1344. "in": "query",
  1345. "schema": {
  1346. "type": "string"
  1347. },
  1348. "required": false
  1349. },
  1350. {
  1351. "name": "workspace",
  1352. "in": "query",
  1353. "schema": {
  1354. "type": "string"
  1355. },
  1356. "required": false
  1357. }
  1358. ],
  1359. "responses": {
  1360. "200": {
  1361. "description": "MCP resources",
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "type": "object",
  1366. "additionalProperties": {
  1367. "$ref": "#/components/schemas/McpResource"
  1368. },
  1369. "description": "MCP resources"
  1370. }
  1371. }
  1372. }
  1373. }
  1374. },
  1375. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1376. "summary": "Get MCP resources",
  1377. "x-codeSamples": [
  1378. {
  1379. "lang": "js",
  1380. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1381. }
  1382. ]
  1383. }
  1384. },
  1385. "/find": {
  1386. "get": {
  1387. "tags": ["file"],
  1388. "operationId": "find.text",
  1389. "parameters": [
  1390. {
  1391. "name": "directory",
  1392. "in": "query",
  1393. "schema": {
  1394. "type": "string"
  1395. },
  1396. "required": false
  1397. },
  1398. {
  1399. "name": "workspace",
  1400. "in": "query",
  1401. "schema": {
  1402. "type": "string"
  1403. },
  1404. "required": false
  1405. },
  1406. {
  1407. "name": "pattern",
  1408. "in": "query",
  1409. "schema": {
  1410. "type": "string"
  1411. },
  1412. "required": true
  1413. }
  1414. ],
  1415. "responses": {
  1416. "200": {
  1417. "description": "Matches",
  1418. "content": {
  1419. "application/json": {
  1420. "schema": {
  1421. "type": "array",
  1422. "items": {
  1423. "type": "object",
  1424. "properties": {
  1425. "path": {
  1426. "type": "object",
  1427. "properties": {
  1428. "text": {
  1429. "type": "string"
  1430. }
  1431. },
  1432. "required": ["text"],
  1433. "additionalProperties": false
  1434. },
  1435. "lines": {
  1436. "type": "object",
  1437. "properties": {
  1438. "text": {
  1439. "type": "string"
  1440. }
  1441. },
  1442. "required": ["text"],
  1443. "additionalProperties": false
  1444. },
  1445. "line_number": {
  1446. "type": "integer",
  1447. "minimum": 0
  1448. },
  1449. "absolute_offset": {
  1450. "type": "integer",
  1451. "minimum": 0
  1452. },
  1453. "submatches": {
  1454. "type": "array",
  1455. "items": {
  1456. "type": "object",
  1457. "properties": {
  1458. "match": {
  1459. "type": "object",
  1460. "properties": {
  1461. "text": {
  1462. "type": "string"
  1463. }
  1464. },
  1465. "required": ["text"],
  1466. "additionalProperties": false
  1467. },
  1468. "start": {
  1469. "type": "integer",
  1470. "minimum": 0
  1471. },
  1472. "end": {
  1473. "type": "integer",
  1474. "minimum": 0
  1475. }
  1476. },
  1477. "required": ["match", "start", "end"],
  1478. "additionalProperties": false
  1479. }
  1480. }
  1481. },
  1482. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1483. "additionalProperties": false
  1484. },
  1485. "description": "Matches"
  1486. }
  1487. }
  1488. }
  1489. }
  1490. },
  1491. "description": "Search for text patterns across files in the project using ripgrep.",
  1492. "summary": "Find text",
  1493. "x-codeSamples": [
  1494. {
  1495. "lang": "js",
  1496. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1497. }
  1498. ]
  1499. }
  1500. },
  1501. "/find/file": {
  1502. "get": {
  1503. "tags": ["file"],
  1504. "operationId": "find.files",
  1505. "parameters": [
  1506. {
  1507. "name": "directory",
  1508. "in": "query",
  1509. "schema": {
  1510. "type": "string"
  1511. },
  1512. "required": false
  1513. },
  1514. {
  1515. "name": "workspace",
  1516. "in": "query",
  1517. "schema": {
  1518. "type": "string"
  1519. },
  1520. "required": false
  1521. },
  1522. {
  1523. "name": "query",
  1524. "in": "query",
  1525. "schema": {
  1526. "type": "string"
  1527. },
  1528. "required": true
  1529. },
  1530. {
  1531. "name": "dirs",
  1532. "in": "query",
  1533. "schema": {
  1534. "type": "string",
  1535. "enum": ["true", "false"]
  1536. },
  1537. "required": false
  1538. },
  1539. {
  1540. "name": "type",
  1541. "in": "query",
  1542. "schema": {
  1543. "type": "string",
  1544. "enum": ["file", "directory"]
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "limit",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "integer",
  1553. "minimum": 1,
  1554. "maximum": 200
  1555. },
  1556. "required": false
  1557. }
  1558. ],
  1559. "responses": {
  1560. "200": {
  1561. "description": "File paths",
  1562. "content": {
  1563. "application/json": {
  1564. "schema": {
  1565. "type": "array",
  1566. "items": {
  1567. "type": "string"
  1568. },
  1569. "description": "File paths"
  1570. }
  1571. }
  1572. }
  1573. }
  1574. },
  1575. "description": "Search for files or directories by name or pattern in the project directory.",
  1576. "summary": "Find files",
  1577. "x-codeSamples": [
  1578. {
  1579. "lang": "js",
  1580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1581. }
  1582. ]
  1583. }
  1584. },
  1585. "/find/symbol": {
  1586. "get": {
  1587. "tags": ["file"],
  1588. "operationId": "find.symbols",
  1589. "parameters": [
  1590. {
  1591. "name": "directory",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": false
  1597. },
  1598. {
  1599. "name": "workspace",
  1600. "in": "query",
  1601. "schema": {
  1602. "type": "string"
  1603. },
  1604. "required": false
  1605. },
  1606. {
  1607. "name": "query",
  1608. "in": "query",
  1609. "schema": {
  1610. "type": "string"
  1611. },
  1612. "required": true
  1613. }
  1614. ],
  1615. "responses": {
  1616. "200": {
  1617. "description": "Symbols",
  1618. "content": {
  1619. "application/json": {
  1620. "schema": {
  1621. "type": "array",
  1622. "items": {
  1623. "$ref": "#/components/schemas/Symbol"
  1624. },
  1625. "description": "Symbols"
  1626. }
  1627. }
  1628. }
  1629. }
  1630. },
  1631. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1632. "summary": "Find symbols",
  1633. "x-codeSamples": [
  1634. {
  1635. "lang": "js",
  1636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1637. }
  1638. ]
  1639. }
  1640. },
  1641. "/file": {
  1642. "get": {
  1643. "tags": ["file"],
  1644. "operationId": "file.list",
  1645. "parameters": [
  1646. {
  1647. "name": "directory",
  1648. "in": "query",
  1649. "schema": {
  1650. "type": "string"
  1651. },
  1652. "required": false
  1653. },
  1654. {
  1655. "name": "workspace",
  1656. "in": "query",
  1657. "schema": {
  1658. "type": "string"
  1659. },
  1660. "required": false
  1661. },
  1662. {
  1663. "name": "path",
  1664. "in": "query",
  1665. "schema": {
  1666. "type": "string"
  1667. },
  1668. "required": true
  1669. }
  1670. ],
  1671. "responses": {
  1672. "200": {
  1673. "description": "Files and directories",
  1674. "content": {
  1675. "application/json": {
  1676. "schema": {
  1677. "type": "array",
  1678. "items": {
  1679. "$ref": "#/components/schemas/FileNode"
  1680. },
  1681. "description": "Files and directories"
  1682. }
  1683. }
  1684. }
  1685. }
  1686. },
  1687. "description": "List files and directories in a specified path.",
  1688. "summary": "List files",
  1689. "x-codeSamples": [
  1690. {
  1691. "lang": "js",
  1692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1693. }
  1694. ]
  1695. }
  1696. },
  1697. "/file/content": {
  1698. "get": {
  1699. "tags": ["file"],
  1700. "operationId": "file.read",
  1701. "parameters": [
  1702. {
  1703. "name": "directory",
  1704. "in": "query",
  1705. "schema": {
  1706. "type": "string"
  1707. },
  1708. "required": false
  1709. },
  1710. {
  1711. "name": "workspace",
  1712. "in": "query",
  1713. "schema": {
  1714. "type": "string"
  1715. },
  1716. "required": false
  1717. },
  1718. {
  1719. "name": "path",
  1720. "in": "query",
  1721. "schema": {
  1722. "type": "string"
  1723. },
  1724. "required": true
  1725. }
  1726. ],
  1727. "responses": {
  1728. "200": {
  1729. "description": "File content",
  1730. "content": {
  1731. "application/json": {
  1732. "schema": {
  1733. "$ref": "#/components/schemas/FileContent"
  1734. }
  1735. }
  1736. }
  1737. }
  1738. },
  1739. "description": "Read the content of a specified file.",
  1740. "summary": "Read file",
  1741. "x-codeSamples": [
  1742. {
  1743. "lang": "js",
  1744. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1745. }
  1746. ]
  1747. }
  1748. },
  1749. "/file/status": {
  1750. "get": {
  1751. "tags": ["file"],
  1752. "operationId": "file.status",
  1753. "parameters": [
  1754. {
  1755. "name": "directory",
  1756. "in": "query",
  1757. "schema": {
  1758. "type": "string"
  1759. },
  1760. "required": false
  1761. },
  1762. {
  1763. "name": "workspace",
  1764. "in": "query",
  1765. "schema": {
  1766. "type": "string"
  1767. },
  1768. "required": false
  1769. }
  1770. ],
  1771. "responses": {
  1772. "200": {
  1773. "description": "File status",
  1774. "content": {
  1775. "application/json": {
  1776. "schema": {
  1777. "type": "array",
  1778. "items": {
  1779. "$ref": "#/components/schemas/File"
  1780. },
  1781. "description": "File status"
  1782. }
  1783. }
  1784. }
  1785. }
  1786. },
  1787. "description": "Get the git status of all files in the project.",
  1788. "summary": "Get file status",
  1789. "x-codeSamples": [
  1790. {
  1791. "lang": "js",
  1792. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1793. }
  1794. ]
  1795. }
  1796. },
  1797. "/instance/dispose": {
  1798. "post": {
  1799. "tags": ["instance"],
  1800. "operationId": "instance.dispose",
  1801. "parameters": [
  1802. {
  1803. "name": "directory",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "workspace",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": false
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Instance disposed",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "boolean",
  1826. "description": "Instance disposed"
  1827. }
  1828. }
  1829. }
  1830. }
  1831. },
  1832. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1833. "summary": "Dispose instance",
  1834. "x-codeSamples": [
  1835. {
  1836. "lang": "js",
  1837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1838. }
  1839. ]
  1840. }
  1841. },
  1842. "/path": {
  1843. "get": {
  1844. "tags": ["instance"],
  1845. "operationId": "path.get",
  1846. "parameters": [
  1847. {
  1848. "name": "directory",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": false
  1854. },
  1855. {
  1856. "name": "workspace",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string"
  1860. },
  1861. "required": false
  1862. }
  1863. ],
  1864. "responses": {
  1865. "200": {
  1866. "description": "Path",
  1867. "content": {
  1868. "application/json": {
  1869. "schema": {
  1870. "$ref": "#/components/schemas/Path"
  1871. }
  1872. }
  1873. }
  1874. }
  1875. },
  1876. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1877. "summary": "Get paths",
  1878. "x-codeSamples": [
  1879. {
  1880. "lang": "js",
  1881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1882. }
  1883. ]
  1884. }
  1885. },
  1886. "/vcs": {
  1887. "get": {
  1888. "tags": ["instance"],
  1889. "operationId": "vcs.get",
  1890. "parameters": [
  1891. {
  1892. "name": "directory",
  1893. "in": "query",
  1894. "schema": {
  1895. "type": "string"
  1896. },
  1897. "required": false
  1898. },
  1899. {
  1900. "name": "workspace",
  1901. "in": "query",
  1902. "schema": {
  1903. "type": "string"
  1904. },
  1905. "required": false
  1906. }
  1907. ],
  1908. "responses": {
  1909. "200": {
  1910. "description": "VCS info",
  1911. "content": {
  1912. "application/json": {
  1913. "schema": {
  1914. "$ref": "#/components/schemas/VcsInfo"
  1915. }
  1916. }
  1917. }
  1918. }
  1919. },
  1920. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1921. "summary": "Get VCS info",
  1922. "x-codeSamples": [
  1923. {
  1924. "lang": "js",
  1925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1926. }
  1927. ]
  1928. }
  1929. },
  1930. "/vcs/status": {
  1931. "get": {
  1932. "tags": ["instance"],
  1933. "operationId": "vcs.status",
  1934. "parameters": [
  1935. {
  1936. "name": "directory",
  1937. "in": "query",
  1938. "schema": {
  1939. "type": "string"
  1940. },
  1941. "required": false
  1942. },
  1943. {
  1944. "name": "workspace",
  1945. "in": "query",
  1946. "schema": {
  1947. "type": "string"
  1948. },
  1949. "required": false
  1950. }
  1951. ],
  1952. "responses": {
  1953. "200": {
  1954. "description": "VCS status",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "type": "array",
  1959. "items": {
  1960. "$ref": "#/components/schemas/VcsFileStatus"
  1961. },
  1962. "description": "VCS status"
  1963. }
  1964. }
  1965. }
  1966. }
  1967. },
  1968. "description": "Retrieve changed files in the current working tree without patches.",
  1969. "summary": "Get VCS status",
  1970. "x-codeSamples": [
  1971. {
  1972. "lang": "js",
  1973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1974. }
  1975. ]
  1976. }
  1977. },
  1978. "/vcs/diff": {
  1979. "get": {
  1980. "tags": ["instance"],
  1981. "operationId": "vcs.diff",
  1982. "parameters": [
  1983. {
  1984. "name": "directory",
  1985. "in": "query",
  1986. "schema": {
  1987. "type": "string"
  1988. },
  1989. "required": false
  1990. },
  1991. {
  1992. "name": "workspace",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "mode",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string",
  2004. "enum": ["git", "branch"]
  2005. },
  2006. "required": true
  2007. }
  2008. ],
  2009. "responses": {
  2010. "200": {
  2011. "description": "VCS diff",
  2012. "content": {
  2013. "application/json": {
  2014. "schema": {
  2015. "type": "array",
  2016. "items": {
  2017. "$ref": "#/components/schemas/VcsFileDiff"
  2018. },
  2019. "description": "VCS diff"
  2020. }
  2021. }
  2022. }
  2023. }
  2024. },
  2025. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2026. "summary": "Get VCS diff",
  2027. "x-codeSamples": [
  2028. {
  2029. "lang": "js",
  2030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2031. }
  2032. ]
  2033. }
  2034. },
  2035. "/vcs/diff/raw": {
  2036. "get": {
  2037. "tags": ["instance"],
  2038. "operationId": "vcs.diff.raw",
  2039. "parameters": [
  2040. {
  2041. "name": "directory",
  2042. "in": "query",
  2043. "schema": {
  2044. "type": "string"
  2045. },
  2046. "required": false
  2047. },
  2048. {
  2049. "name": "workspace",
  2050. "in": "query",
  2051. "schema": {
  2052. "type": "string"
  2053. },
  2054. "required": false
  2055. }
  2056. ],
  2057. "responses": {
  2058. "200": {
  2059. "description": "Raw VCS diff",
  2060. "content": {
  2061. "text/x-diff; charset=utf-8": {
  2062. "schema": {
  2063. "type": "string"
  2064. }
  2065. }
  2066. }
  2067. }
  2068. },
  2069. "description": "Retrieve a raw patch for current uncommitted changes.",
  2070. "summary": "Get raw VCS diff",
  2071. "x-codeSamples": [
  2072. {
  2073. "lang": "js",
  2074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2075. }
  2076. ]
  2077. }
  2078. },
  2079. "/vcs/apply": {
  2080. "post": {
  2081. "tags": ["instance"],
  2082. "operationId": "vcs.apply",
  2083. "parameters": [
  2084. {
  2085. "name": "directory",
  2086. "in": "query",
  2087. "schema": {
  2088. "type": "string"
  2089. },
  2090. "required": false
  2091. },
  2092. {
  2093. "name": "workspace",
  2094. "in": "query",
  2095. "schema": {
  2096. "type": "string"
  2097. },
  2098. "required": false
  2099. }
  2100. ],
  2101. "responses": {
  2102. "200": {
  2103. "description": "VCS patch applied",
  2104. "content": {
  2105. "application/json": {
  2106. "schema": {
  2107. "type": "object",
  2108. "properties": {
  2109. "applied": {
  2110. "type": "boolean"
  2111. }
  2112. },
  2113. "required": ["applied"],
  2114. "additionalProperties": false,
  2115. "description": "VCS patch applied"
  2116. }
  2117. }
  2118. }
  2119. },
  2120. "400": {
  2121. "description": "VcsApplyError",
  2122. "content": {
  2123. "application/json": {
  2124. "schema": {
  2125. "$ref": "#/components/schemas/VcsApplyError"
  2126. }
  2127. }
  2128. }
  2129. }
  2130. },
  2131. "description": "Apply a raw patch to the current working tree.",
  2132. "summary": "Apply VCS patch",
  2133. "requestBody": {
  2134. "content": {
  2135. "application/json": {
  2136. "schema": {
  2137. "type": "object",
  2138. "properties": {
  2139. "patch": {
  2140. "type": "string"
  2141. }
  2142. },
  2143. "required": ["patch"],
  2144. "additionalProperties": false
  2145. }
  2146. }
  2147. }
  2148. },
  2149. "x-codeSamples": [
  2150. {
  2151. "lang": "js",
  2152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2153. }
  2154. ]
  2155. }
  2156. },
  2157. "/command": {
  2158. "get": {
  2159. "tags": ["instance"],
  2160. "operationId": "command.list",
  2161. "parameters": [
  2162. {
  2163. "name": "directory",
  2164. "in": "query",
  2165. "schema": {
  2166. "type": "string"
  2167. },
  2168. "required": false
  2169. },
  2170. {
  2171. "name": "workspace",
  2172. "in": "query",
  2173. "schema": {
  2174. "type": "string"
  2175. },
  2176. "required": false
  2177. }
  2178. ],
  2179. "responses": {
  2180. "200": {
  2181. "description": "List of commands",
  2182. "content": {
  2183. "application/json": {
  2184. "schema": {
  2185. "type": "array",
  2186. "items": {
  2187. "$ref": "#/components/schemas/Command"
  2188. },
  2189. "description": "List of commands"
  2190. }
  2191. }
  2192. }
  2193. }
  2194. },
  2195. "description": "Get a list of all available commands in the OpenCode system.",
  2196. "summary": "List commands",
  2197. "x-codeSamples": [
  2198. {
  2199. "lang": "js",
  2200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2201. }
  2202. ]
  2203. }
  2204. },
  2205. "/agent": {
  2206. "get": {
  2207. "tags": ["instance"],
  2208. "operationId": "app.agents",
  2209. "parameters": [
  2210. {
  2211. "name": "directory",
  2212. "in": "query",
  2213. "schema": {
  2214. "type": "string"
  2215. },
  2216. "required": false
  2217. },
  2218. {
  2219. "name": "workspace",
  2220. "in": "query",
  2221. "schema": {
  2222. "type": "string"
  2223. },
  2224. "required": false
  2225. }
  2226. ],
  2227. "responses": {
  2228. "200": {
  2229. "description": "List of agents",
  2230. "content": {
  2231. "application/json": {
  2232. "schema": {
  2233. "type": "array",
  2234. "items": {
  2235. "$ref": "#/components/schemas/Agent"
  2236. },
  2237. "description": "List of agents"
  2238. }
  2239. }
  2240. }
  2241. }
  2242. },
  2243. "description": "Get a list of all available AI agents in the OpenCode system.",
  2244. "summary": "List agents",
  2245. "x-codeSamples": [
  2246. {
  2247. "lang": "js",
  2248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2249. }
  2250. ]
  2251. }
  2252. },
  2253. "/skill": {
  2254. "get": {
  2255. "tags": ["instance"],
  2256. "operationId": "app.skills",
  2257. "parameters": [
  2258. {
  2259. "name": "directory",
  2260. "in": "query",
  2261. "schema": {
  2262. "type": "string"
  2263. },
  2264. "required": false
  2265. },
  2266. {
  2267. "name": "workspace",
  2268. "in": "query",
  2269. "schema": {
  2270. "type": "string"
  2271. },
  2272. "required": false
  2273. }
  2274. ],
  2275. "responses": {
  2276. "200": {
  2277. "description": "List of skills",
  2278. "content": {
  2279. "application/json": {
  2280. "schema": {
  2281. "type": "array",
  2282. "items": {
  2283. "type": "object",
  2284. "properties": {
  2285. "name": {
  2286. "type": "string"
  2287. },
  2288. "description": {
  2289. "type": "string"
  2290. },
  2291. "location": {
  2292. "type": "string"
  2293. },
  2294. "content": {
  2295. "type": "string"
  2296. }
  2297. },
  2298. "required": ["name", "location", "content"],
  2299. "additionalProperties": false
  2300. },
  2301. "description": "List of skills"
  2302. }
  2303. }
  2304. }
  2305. }
  2306. },
  2307. "description": "Get a list of all available skills in the OpenCode system.",
  2308. "summary": "List skills",
  2309. "x-codeSamples": [
  2310. {
  2311. "lang": "js",
  2312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2313. }
  2314. ]
  2315. }
  2316. },
  2317. "/lsp": {
  2318. "get": {
  2319. "tags": ["instance"],
  2320. "operationId": "lsp.status",
  2321. "parameters": [
  2322. {
  2323. "name": "directory",
  2324. "in": "query",
  2325. "schema": {
  2326. "type": "string"
  2327. },
  2328. "required": false
  2329. },
  2330. {
  2331. "name": "workspace",
  2332. "in": "query",
  2333. "schema": {
  2334. "type": "string"
  2335. },
  2336. "required": false
  2337. }
  2338. ],
  2339. "responses": {
  2340. "200": {
  2341. "description": "LSP server status",
  2342. "content": {
  2343. "application/json": {
  2344. "schema": {
  2345. "type": "array",
  2346. "items": {
  2347. "$ref": "#/components/schemas/LSPStatus"
  2348. },
  2349. "description": "LSP server status"
  2350. }
  2351. }
  2352. }
  2353. }
  2354. },
  2355. "description": "Get LSP server status",
  2356. "summary": "Get LSP status",
  2357. "x-codeSamples": [
  2358. {
  2359. "lang": "js",
  2360. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2361. }
  2362. ]
  2363. }
  2364. },
  2365. "/formatter": {
  2366. "get": {
  2367. "tags": ["instance"],
  2368. "operationId": "formatter.status",
  2369. "parameters": [
  2370. {
  2371. "name": "directory",
  2372. "in": "query",
  2373. "schema": {
  2374. "type": "string"
  2375. },
  2376. "required": false
  2377. },
  2378. {
  2379. "name": "workspace",
  2380. "in": "query",
  2381. "schema": {
  2382. "type": "string"
  2383. },
  2384. "required": false
  2385. }
  2386. ],
  2387. "responses": {
  2388. "200": {
  2389. "description": "Formatter status",
  2390. "content": {
  2391. "application/json": {
  2392. "schema": {
  2393. "type": "array",
  2394. "items": {
  2395. "$ref": "#/components/schemas/FormatterStatus"
  2396. },
  2397. "description": "Formatter status"
  2398. }
  2399. }
  2400. }
  2401. }
  2402. },
  2403. "description": "Get formatter status",
  2404. "summary": "Get formatter status",
  2405. "x-codeSamples": [
  2406. {
  2407. "lang": "js",
  2408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2409. }
  2410. ]
  2411. }
  2412. },
  2413. "/mcp": {
  2414. "get": {
  2415. "tags": ["mcp"],
  2416. "operationId": "mcp.status",
  2417. "parameters": [
  2418. {
  2419. "name": "directory",
  2420. "in": "query",
  2421. "schema": {
  2422. "type": "string"
  2423. },
  2424. "required": false
  2425. },
  2426. {
  2427. "name": "workspace",
  2428. "in": "query",
  2429. "schema": {
  2430. "type": "string"
  2431. },
  2432. "required": false
  2433. }
  2434. ],
  2435. "responses": {
  2436. "200": {
  2437. "description": "MCP server status",
  2438. "content": {
  2439. "application/json": {
  2440. "schema": {
  2441. "type": "object",
  2442. "additionalProperties": {
  2443. "$ref": "#/components/schemas/MCPStatus"
  2444. },
  2445. "description": "MCP server status"
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2452. "summary": "Get MCP status",
  2453. "x-codeSamples": [
  2454. {
  2455. "lang": "js",
  2456. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2457. }
  2458. ]
  2459. },
  2460. "post": {
  2461. "tags": ["mcp"],
  2462. "operationId": "mcp.add",
  2463. "parameters": [
  2464. {
  2465. "name": "directory",
  2466. "in": "query",
  2467. "schema": {
  2468. "type": "string"
  2469. },
  2470. "required": false
  2471. },
  2472. {
  2473. "name": "workspace",
  2474. "in": "query",
  2475. "schema": {
  2476. "type": "string"
  2477. },
  2478. "required": false
  2479. }
  2480. ],
  2481. "responses": {
  2482. "200": {
  2483. "description": "MCP server added successfully",
  2484. "content": {
  2485. "application/json": {
  2486. "schema": {
  2487. "type": "object",
  2488. "additionalProperties": {
  2489. "$ref": "#/components/schemas/MCPStatus"
  2490. },
  2491. "description": "MCP server added successfully"
  2492. }
  2493. }
  2494. }
  2495. },
  2496. "400": {
  2497. "description": "Bad request",
  2498. "content": {
  2499. "application/json": {
  2500. "schema": {
  2501. "$ref": "#/components/schemas/BadRequestError"
  2502. }
  2503. }
  2504. }
  2505. }
  2506. },
  2507. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2508. "summary": "Add MCP server",
  2509. "requestBody": {
  2510. "content": {
  2511. "application/json": {
  2512. "schema": {
  2513. "type": "object",
  2514. "properties": {
  2515. "name": {
  2516. "type": "string"
  2517. },
  2518. "config": {
  2519. "anyOf": [
  2520. {
  2521. "$ref": "#/components/schemas/McpLocalConfig"
  2522. },
  2523. {
  2524. "$ref": "#/components/schemas/McpRemoteConfig"
  2525. }
  2526. ]
  2527. }
  2528. },
  2529. "required": ["name", "config"],
  2530. "additionalProperties": false
  2531. }
  2532. }
  2533. }
  2534. },
  2535. "x-codeSamples": [
  2536. {
  2537. "lang": "js",
  2538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2539. }
  2540. ]
  2541. }
  2542. },
  2543. "/mcp/{name}/auth": {
  2544. "post": {
  2545. "tags": ["mcp"],
  2546. "operationId": "mcp.auth.start",
  2547. "parameters": [
  2548. {
  2549. "name": "name",
  2550. "in": "path",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": true
  2555. },
  2556. {
  2557. "name": "directory",
  2558. "in": "query",
  2559. "schema": {
  2560. "type": "string"
  2561. },
  2562. "required": false
  2563. },
  2564. {
  2565. "name": "workspace",
  2566. "in": "query",
  2567. "schema": {
  2568. "type": "string"
  2569. },
  2570. "required": false
  2571. }
  2572. ],
  2573. "responses": {
  2574. "200": {
  2575. "description": "OAuth flow started",
  2576. "content": {
  2577. "application/json": {
  2578. "schema": {
  2579. "type": "object",
  2580. "properties": {
  2581. "authorizationUrl": {
  2582. "type": "string"
  2583. },
  2584. "oauthState": {
  2585. "type": "string"
  2586. }
  2587. },
  2588. "required": ["authorizationUrl", "oauthState"],
  2589. "additionalProperties": false,
  2590. "description": "OAuth flow started"
  2591. }
  2592. }
  2593. }
  2594. },
  2595. "400": {
  2596. "description": "McpUnsupportedOAuthError",
  2597. "content": {
  2598. "application/json": {
  2599. "schema": {
  2600. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2601. }
  2602. }
  2603. }
  2604. },
  2605. "404": {
  2606. "description": "Not found",
  2607. "content": {
  2608. "application/json": {
  2609. "schema": {
  2610. "$ref": "#/components/schemas/NotFoundError"
  2611. }
  2612. }
  2613. }
  2614. }
  2615. },
  2616. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2617. "summary": "Start MCP OAuth",
  2618. "x-codeSamples": [
  2619. {
  2620. "lang": "js",
  2621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2622. }
  2623. ]
  2624. },
  2625. "delete": {
  2626. "tags": ["mcp"],
  2627. "operationId": "mcp.auth.remove",
  2628. "parameters": [
  2629. {
  2630. "name": "name",
  2631. "in": "path",
  2632. "schema": {
  2633. "type": "string"
  2634. },
  2635. "required": true
  2636. },
  2637. {
  2638. "name": "directory",
  2639. "in": "query",
  2640. "schema": {
  2641. "type": "string"
  2642. },
  2643. "required": false
  2644. },
  2645. {
  2646. "name": "workspace",
  2647. "in": "query",
  2648. "schema": {
  2649. "type": "string"
  2650. },
  2651. "required": false
  2652. }
  2653. ],
  2654. "responses": {
  2655. "200": {
  2656. "description": "OAuth credentials removed",
  2657. "content": {
  2658. "application/json": {
  2659. "schema": {
  2660. "type": "object",
  2661. "properties": {
  2662. "success": {
  2663. "type": "boolean",
  2664. "enum": [true]
  2665. }
  2666. },
  2667. "required": ["success"],
  2668. "additionalProperties": false,
  2669. "description": "OAuth credentials removed"
  2670. }
  2671. }
  2672. }
  2673. },
  2674. "404": {
  2675. "description": "Not found",
  2676. "content": {
  2677. "application/json": {
  2678. "schema": {
  2679. "$ref": "#/components/schemas/NotFoundError"
  2680. }
  2681. }
  2682. }
  2683. }
  2684. },
  2685. "description": "Remove OAuth credentials for an MCP server.",
  2686. "summary": "Remove MCP OAuth",
  2687. "x-codeSamples": [
  2688. {
  2689. "lang": "js",
  2690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2691. }
  2692. ]
  2693. }
  2694. },
  2695. "/mcp/{name}/auth/callback": {
  2696. "post": {
  2697. "tags": ["mcp"],
  2698. "operationId": "mcp.auth.callback",
  2699. "parameters": [
  2700. {
  2701. "name": "name",
  2702. "in": "path",
  2703. "schema": {
  2704. "type": "string"
  2705. },
  2706. "required": true
  2707. },
  2708. {
  2709. "name": "directory",
  2710. "in": "query",
  2711. "schema": {
  2712. "type": "string"
  2713. },
  2714. "required": false
  2715. },
  2716. {
  2717. "name": "workspace",
  2718. "in": "query",
  2719. "schema": {
  2720. "type": "string"
  2721. },
  2722. "required": false
  2723. }
  2724. ],
  2725. "responses": {
  2726. "200": {
  2727. "description": "OAuth authentication completed",
  2728. "content": {
  2729. "application/json": {
  2730. "schema": {
  2731. "$ref": "#/components/schemas/MCPStatus"
  2732. }
  2733. }
  2734. }
  2735. },
  2736. "400": {
  2737. "description": "Bad request",
  2738. "content": {
  2739. "application/json": {
  2740. "schema": {
  2741. "$ref": "#/components/schemas/BadRequestError"
  2742. }
  2743. }
  2744. }
  2745. },
  2746. "404": {
  2747. "description": "Not found",
  2748. "content": {
  2749. "application/json": {
  2750. "schema": {
  2751. "$ref": "#/components/schemas/NotFoundError"
  2752. }
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2758. "summary": "Complete MCP OAuth",
  2759. "requestBody": {
  2760. "content": {
  2761. "application/json": {
  2762. "schema": {
  2763. "type": "object",
  2764. "properties": {
  2765. "code": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["code"],
  2770. "additionalProperties": false
  2771. }
  2772. }
  2773. }
  2774. },
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp/{name}/auth/authenticate": {
  2784. "post": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.auth.authenticate",
  2787. "parameters": [
  2788. {
  2789. "name": "name",
  2790. "in": "path",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": true
  2795. },
  2796. {
  2797. "name": "directory",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. },
  2804. {
  2805. "name": "workspace",
  2806. "in": "query",
  2807. "schema": {
  2808. "type": "string"
  2809. },
  2810. "required": false
  2811. }
  2812. ],
  2813. "responses": {
  2814. "200": {
  2815. "description": "OAuth authentication completed",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "$ref": "#/components/schemas/MCPStatus"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "400": {
  2825. "description": "McpUnsupportedOAuthError",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2830. }
  2831. }
  2832. }
  2833. },
  2834. "404": {
  2835. "description": "Not found",
  2836. "content": {
  2837. "application/json": {
  2838. "schema": {
  2839. "$ref": "#/components/schemas/NotFoundError"
  2840. }
  2841. }
  2842. }
  2843. }
  2844. },
  2845. "description": "Start OAuth flow and wait for callback (opens browser).",
  2846. "summary": "Authenticate MCP OAuth",
  2847. "x-codeSamples": [
  2848. {
  2849. "lang": "js",
  2850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2851. }
  2852. ]
  2853. }
  2854. },
  2855. "/mcp/{name}/connect": {
  2856. "post": {
  2857. "tags": ["mcp"],
  2858. "operationId": "mcp.connect",
  2859. "parameters": [
  2860. {
  2861. "name": "name",
  2862. "in": "path",
  2863. "schema": {
  2864. "type": "string"
  2865. },
  2866. "required": true
  2867. },
  2868. {
  2869. "name": "directory",
  2870. "in": "query",
  2871. "schema": {
  2872. "type": "string"
  2873. },
  2874. "required": false
  2875. },
  2876. {
  2877. "name": "workspace",
  2878. "in": "query",
  2879. "schema": {
  2880. "type": "string"
  2881. },
  2882. "required": false
  2883. }
  2884. ],
  2885. "responses": {
  2886. "200": {
  2887. "description": "MCP server connected successfully",
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "boolean",
  2892. "description": "MCP server connected successfully"
  2893. }
  2894. }
  2895. }
  2896. }
  2897. },
  2898. "description": "Connect an MCP server.",
  2899. "x-codeSamples": [
  2900. {
  2901. "lang": "js",
  2902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "/mcp/{name}/disconnect": {
  2908. "post": {
  2909. "tags": ["mcp"],
  2910. "operationId": "mcp.disconnect",
  2911. "parameters": [
  2912. {
  2913. "name": "name",
  2914. "in": "path",
  2915. "schema": {
  2916. "type": "string"
  2917. },
  2918. "required": true
  2919. },
  2920. {
  2921. "name": "directory",
  2922. "in": "query",
  2923. "schema": {
  2924. "type": "string"
  2925. },
  2926. "required": false
  2927. },
  2928. {
  2929. "name": "workspace",
  2930. "in": "query",
  2931. "schema": {
  2932. "type": "string"
  2933. },
  2934. "required": false
  2935. }
  2936. ],
  2937. "responses": {
  2938. "200": {
  2939. "description": "MCP server disconnected successfully",
  2940. "content": {
  2941. "application/json": {
  2942. "schema": {
  2943. "type": "boolean",
  2944. "description": "MCP server disconnected successfully"
  2945. }
  2946. }
  2947. }
  2948. }
  2949. },
  2950. "description": "Disconnect an MCP server.",
  2951. "x-codeSamples": [
  2952. {
  2953. "lang": "js",
  2954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2955. }
  2956. ]
  2957. }
  2958. },
  2959. "/project": {
  2960. "get": {
  2961. "tags": ["project"],
  2962. "operationId": "project.list",
  2963. "parameters": [
  2964. {
  2965. "name": "directory",
  2966. "in": "query",
  2967. "schema": {
  2968. "type": "string"
  2969. },
  2970. "required": false
  2971. },
  2972. {
  2973. "name": "workspace",
  2974. "in": "query",
  2975. "schema": {
  2976. "type": "string"
  2977. },
  2978. "required": false
  2979. }
  2980. ],
  2981. "responses": {
  2982. "200": {
  2983. "description": "List of projects",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "type": "array",
  2988. "items": {
  2989. "$ref": "#/components/schemas/Project"
  2990. },
  2991. "description": "List of projects"
  2992. }
  2993. }
  2994. }
  2995. }
  2996. },
  2997. "description": "Get a list of projects that have been opened with OpenCode.",
  2998. "summary": "List all projects",
  2999. "x-codeSamples": [
  3000. {
  3001. "lang": "js",
  3002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3003. }
  3004. ]
  3005. }
  3006. },
  3007. "/project/current": {
  3008. "get": {
  3009. "tags": ["project"],
  3010. "operationId": "project.current",
  3011. "parameters": [
  3012. {
  3013. "name": "directory",
  3014. "in": "query",
  3015. "schema": {
  3016. "type": "string"
  3017. },
  3018. "required": false
  3019. },
  3020. {
  3021. "name": "workspace",
  3022. "in": "query",
  3023. "schema": {
  3024. "type": "string"
  3025. },
  3026. "required": false
  3027. }
  3028. ],
  3029. "responses": {
  3030. "200": {
  3031. "description": "Current project information",
  3032. "content": {
  3033. "application/json": {
  3034. "schema": {
  3035. "$ref": "#/components/schemas/Project"
  3036. }
  3037. }
  3038. }
  3039. }
  3040. },
  3041. "description": "Retrieve the currently active project that OpenCode is working with.",
  3042. "summary": "Get current project",
  3043. "x-codeSamples": [
  3044. {
  3045. "lang": "js",
  3046. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3047. }
  3048. ]
  3049. }
  3050. },
  3051. "/project/git/init": {
  3052. "post": {
  3053. "tags": ["project"],
  3054. "operationId": "project.initGit",
  3055. "parameters": [
  3056. {
  3057. "name": "directory",
  3058. "in": "query",
  3059. "schema": {
  3060. "type": "string"
  3061. },
  3062. "required": false
  3063. },
  3064. {
  3065. "name": "workspace",
  3066. "in": "query",
  3067. "schema": {
  3068. "type": "string"
  3069. },
  3070. "required": false
  3071. }
  3072. ],
  3073. "responses": {
  3074. "200": {
  3075. "description": "Project information after git initialization",
  3076. "content": {
  3077. "application/json": {
  3078. "schema": {
  3079. "$ref": "#/components/schemas/Project"
  3080. }
  3081. }
  3082. }
  3083. }
  3084. },
  3085. "description": "Create a git repository for the current project and return the refreshed project info.",
  3086. "summary": "Initialize git repository",
  3087. "x-codeSamples": [
  3088. {
  3089. "lang": "js",
  3090. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3091. }
  3092. ]
  3093. }
  3094. },
  3095. "/project/{projectID}": {
  3096. "patch": {
  3097. "tags": ["project"],
  3098. "operationId": "project.update",
  3099. "parameters": [
  3100. {
  3101. "name": "projectID",
  3102. "in": "path",
  3103. "schema": {
  3104. "type": "string"
  3105. },
  3106. "required": true
  3107. },
  3108. {
  3109. "name": "directory",
  3110. "in": "query",
  3111. "schema": {
  3112. "type": "string"
  3113. },
  3114. "required": false
  3115. },
  3116. {
  3117. "name": "workspace",
  3118. "in": "query",
  3119. "schema": {
  3120. "type": "string"
  3121. },
  3122. "required": false
  3123. }
  3124. ],
  3125. "responses": {
  3126. "200": {
  3127. "description": "Updated project information",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/Project"
  3132. }
  3133. }
  3134. }
  3135. },
  3136. "400": {
  3137. "description": "Bad request",
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "$ref": "#/components/schemas/BadRequestError"
  3142. }
  3143. }
  3144. }
  3145. },
  3146. "404": {
  3147. "description": "Not found",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "$ref": "#/components/schemas/NotFoundError"
  3152. }
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "description": "Update project properties such as name, icon, and commands.",
  3158. "summary": "Update project",
  3159. "requestBody": {
  3160. "content": {
  3161. "application/json": {
  3162. "schema": {
  3163. "type": "object",
  3164. "properties": {
  3165. "name": {
  3166. "type": "string"
  3167. },
  3168. "icon": {
  3169. "type": "object",
  3170. "properties": {
  3171. "url": {
  3172. "type": "string"
  3173. },
  3174. "override": {
  3175. "type": "string"
  3176. },
  3177. "color": {
  3178. "type": "string"
  3179. }
  3180. },
  3181. "additionalProperties": false
  3182. },
  3183. "commands": {
  3184. "type": "object",
  3185. "properties": {
  3186. "start": {
  3187. "type": "string",
  3188. "description": "Startup script to run when creating a new workspace (worktree)"
  3189. }
  3190. },
  3191. "additionalProperties": false
  3192. }
  3193. },
  3194. "additionalProperties": false
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "x-codeSamples": [
  3200. {
  3201. "lang": "js",
  3202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3203. }
  3204. ]
  3205. }
  3206. },
  3207. "/pty/shells": {
  3208. "get": {
  3209. "tags": ["pty"],
  3210. "operationId": "pty.shells",
  3211. "parameters": [
  3212. {
  3213. "name": "directory",
  3214. "in": "query",
  3215. "schema": {
  3216. "type": "string"
  3217. },
  3218. "required": false
  3219. },
  3220. {
  3221. "name": "workspace",
  3222. "in": "query",
  3223. "schema": {
  3224. "type": "string"
  3225. },
  3226. "required": false
  3227. }
  3228. ],
  3229. "responses": {
  3230. "200": {
  3231. "description": "List of shells",
  3232. "content": {
  3233. "application/json": {
  3234. "schema": {
  3235. "type": "array",
  3236. "items": {
  3237. "type": "object",
  3238. "properties": {
  3239. "path": {
  3240. "type": "string"
  3241. },
  3242. "name": {
  3243. "type": "string"
  3244. },
  3245. "acceptable": {
  3246. "type": "boolean"
  3247. }
  3248. },
  3249. "required": ["path", "name", "acceptable"],
  3250. "additionalProperties": false
  3251. },
  3252. "description": "List of shells"
  3253. }
  3254. }
  3255. }
  3256. }
  3257. },
  3258. "description": "Get a list of available shells on the system.",
  3259. "summary": "List available shells",
  3260. "x-codeSamples": [
  3261. {
  3262. "lang": "js",
  3263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3264. }
  3265. ]
  3266. }
  3267. },
  3268. "/pty": {
  3269. "get": {
  3270. "tags": ["pty"],
  3271. "operationId": "pty.list",
  3272. "parameters": [
  3273. {
  3274. "name": "directory",
  3275. "in": "query",
  3276. "schema": {
  3277. "type": "string"
  3278. },
  3279. "required": false
  3280. },
  3281. {
  3282. "name": "workspace",
  3283. "in": "query",
  3284. "schema": {
  3285. "type": "string"
  3286. },
  3287. "required": false
  3288. }
  3289. ],
  3290. "responses": {
  3291. "200": {
  3292. "description": "List of sessions",
  3293. "content": {
  3294. "application/json": {
  3295. "schema": {
  3296. "type": "array",
  3297. "items": {
  3298. "$ref": "#/components/schemas/Pty"
  3299. },
  3300. "description": "List of sessions"
  3301. }
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3307. "summary": "List PTY sessions",
  3308. "x-codeSamples": [
  3309. {
  3310. "lang": "js",
  3311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3312. }
  3313. ]
  3314. },
  3315. "post": {
  3316. "tags": ["pty"],
  3317. "operationId": "pty.create",
  3318. "parameters": [
  3319. {
  3320. "name": "directory",
  3321. "in": "query",
  3322. "schema": {
  3323. "type": "string"
  3324. },
  3325. "required": false
  3326. },
  3327. {
  3328. "name": "workspace",
  3329. "in": "query",
  3330. "schema": {
  3331. "type": "string"
  3332. },
  3333. "required": false
  3334. }
  3335. ],
  3336. "responses": {
  3337. "200": {
  3338. "description": "Created session",
  3339. "content": {
  3340. "application/json": {
  3341. "schema": {
  3342. "$ref": "#/components/schemas/Pty"
  3343. }
  3344. }
  3345. }
  3346. },
  3347. "400": {
  3348. "description": "Bad request",
  3349. "content": {
  3350. "application/json": {
  3351. "schema": {
  3352. "$ref": "#/components/schemas/BadRequestError"
  3353. }
  3354. }
  3355. }
  3356. }
  3357. },
  3358. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3359. "summary": "Create PTY session",
  3360. "requestBody": {
  3361. "content": {
  3362. "application/json": {
  3363. "schema": {
  3364. "type": "object",
  3365. "properties": {
  3366. "command": {
  3367. "type": "string"
  3368. },
  3369. "args": {
  3370. "type": "array",
  3371. "items": {
  3372. "type": "string"
  3373. }
  3374. },
  3375. "cwd": {
  3376. "type": "string"
  3377. },
  3378. "title": {
  3379. "type": "string"
  3380. },
  3381. "env": {
  3382. "type": "object",
  3383. "additionalProperties": {
  3384. "type": "string"
  3385. }
  3386. }
  3387. },
  3388. "additionalProperties": false
  3389. }
  3390. }
  3391. }
  3392. },
  3393. "x-codeSamples": [
  3394. {
  3395. "lang": "js",
  3396. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3397. }
  3398. ]
  3399. }
  3400. },
  3401. "/pty/{ptyID}": {
  3402. "get": {
  3403. "tags": ["pty"],
  3404. "operationId": "pty.get",
  3405. "parameters": [
  3406. {
  3407. "name": "ptyID",
  3408. "in": "path",
  3409. "schema": {
  3410. "type": "string",
  3411. "pattern": "^pty"
  3412. },
  3413. "required": true
  3414. },
  3415. {
  3416. "name": "directory",
  3417. "in": "query",
  3418. "schema": {
  3419. "type": "string"
  3420. },
  3421. "required": false
  3422. },
  3423. {
  3424. "name": "workspace",
  3425. "in": "query",
  3426. "schema": {
  3427. "type": "string"
  3428. },
  3429. "required": false
  3430. }
  3431. ],
  3432. "responses": {
  3433. "200": {
  3434. "description": "Session info",
  3435. "content": {
  3436. "application/json": {
  3437. "schema": {
  3438. "$ref": "#/components/schemas/Pty"
  3439. }
  3440. }
  3441. }
  3442. },
  3443. "404": {
  3444. "description": "NotFoundError",
  3445. "content": {
  3446. "application/json": {
  3447. "schema": {
  3448. "$ref": "#/components/schemas/NotFoundError"
  3449. }
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3455. "summary": "Get PTY session",
  3456. "x-codeSamples": [
  3457. {
  3458. "lang": "js",
  3459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3460. }
  3461. ]
  3462. },
  3463. "put": {
  3464. "tags": ["pty"],
  3465. "operationId": "pty.update",
  3466. "parameters": [
  3467. {
  3468. "name": "ptyID",
  3469. "in": "path",
  3470. "schema": {
  3471. "type": "string",
  3472. "pattern": "^pty"
  3473. },
  3474. "required": true
  3475. },
  3476. {
  3477. "name": "directory",
  3478. "in": "query",
  3479. "schema": {
  3480. "type": "string"
  3481. },
  3482. "required": false
  3483. },
  3484. {
  3485. "name": "workspace",
  3486. "in": "query",
  3487. "schema": {
  3488. "type": "string"
  3489. },
  3490. "required": false
  3491. }
  3492. ],
  3493. "responses": {
  3494. "200": {
  3495. "description": "Updated session",
  3496. "content": {
  3497. "application/json": {
  3498. "schema": {
  3499. "$ref": "#/components/schemas/Pty"
  3500. }
  3501. }
  3502. }
  3503. },
  3504. "400": {
  3505. "description": "Bad request",
  3506. "content": {
  3507. "application/json": {
  3508. "schema": {
  3509. "$ref": "#/components/schemas/BadRequestError"
  3510. }
  3511. }
  3512. }
  3513. }
  3514. },
  3515. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3516. "summary": "Update PTY session",
  3517. "requestBody": {
  3518. "content": {
  3519. "application/json": {
  3520. "schema": {
  3521. "type": "object",
  3522. "properties": {
  3523. "title": {
  3524. "type": "string"
  3525. },
  3526. "size": {
  3527. "type": "object",
  3528. "properties": {
  3529. "rows": {
  3530. "type": "integer",
  3531. "exclusiveMinimum": 0
  3532. },
  3533. "cols": {
  3534. "type": "integer",
  3535. "exclusiveMinimum": 0
  3536. }
  3537. },
  3538. "required": ["rows", "cols"],
  3539. "additionalProperties": false
  3540. }
  3541. },
  3542. "additionalProperties": false
  3543. }
  3544. }
  3545. }
  3546. },
  3547. "x-codeSamples": [
  3548. {
  3549. "lang": "js",
  3550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3551. }
  3552. ]
  3553. },
  3554. "delete": {
  3555. "tags": ["pty"],
  3556. "operationId": "pty.remove",
  3557. "parameters": [
  3558. {
  3559. "name": "ptyID",
  3560. "in": "path",
  3561. "schema": {
  3562. "type": "string",
  3563. "pattern": "^pty"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Session removed",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "type": "boolean",
  3591. "description": "Session removed"
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "404": {
  3597. "description": "NotFoundError",
  3598. "content": {
  3599. "application/json": {
  3600. "schema": {
  3601. "$ref": "#/components/schemas/NotFoundError"
  3602. }
  3603. }
  3604. }
  3605. }
  3606. },
  3607. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3608. "summary": "Remove PTY session",
  3609. "x-codeSamples": [
  3610. {
  3611. "lang": "js",
  3612. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3613. }
  3614. ]
  3615. }
  3616. },
  3617. "/pty/{ptyID}/connect-token": {
  3618. "post": {
  3619. "tags": ["pty"],
  3620. "operationId": "pty.connectToken",
  3621. "parameters": [
  3622. {
  3623. "name": "ptyID",
  3624. "in": "path",
  3625. "schema": {
  3626. "type": "string",
  3627. "pattern": "^pty"
  3628. },
  3629. "required": true
  3630. },
  3631. {
  3632. "name": "directory",
  3633. "in": "query",
  3634. "schema": {
  3635. "type": "string"
  3636. },
  3637. "required": false
  3638. },
  3639. {
  3640. "name": "workspace",
  3641. "in": "query",
  3642. "schema": {
  3643. "type": "string"
  3644. },
  3645. "required": false
  3646. }
  3647. ],
  3648. "responses": {
  3649. "200": {
  3650. "description": "WebSocket connect token",
  3651. "content": {
  3652. "application/json": {
  3653. "schema": {
  3654. "type": "object",
  3655. "properties": {
  3656. "ticket": {
  3657. "type": "string"
  3658. },
  3659. "expires_in": {
  3660. "type": "integer",
  3661. "exclusiveMinimum": 0
  3662. }
  3663. },
  3664. "required": ["ticket", "expires_in"],
  3665. "additionalProperties": false,
  3666. "description": "WebSocket connect token"
  3667. }
  3668. }
  3669. }
  3670. },
  3671. "403": {
  3672. "description": "Forbidden",
  3673. "content": {
  3674. "application/json": {
  3675. "schema": {
  3676. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3677. }
  3678. }
  3679. }
  3680. },
  3681. "404": {
  3682. "description": "NotFoundError",
  3683. "content": {
  3684. "application/json": {
  3685. "schema": {
  3686. "$ref": "#/components/schemas/NotFoundError"
  3687. }
  3688. }
  3689. }
  3690. }
  3691. },
  3692. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3693. "summary": "Create PTY WebSocket token",
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/question": {
  3703. "get": {
  3704. "tags": ["question"],
  3705. "operationId": "question.list",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of pending questions",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "$ref": "#/components/schemas/QuestionRequest"
  3733. },
  3734. "description": "List of pending questions"
  3735. }
  3736. }
  3737. }
  3738. }
  3739. },
  3740. "description": "Get all pending question requests across all sessions.",
  3741. "summary": "List pending questions",
  3742. "x-codeSamples": [
  3743. {
  3744. "lang": "js",
  3745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3746. }
  3747. ]
  3748. }
  3749. },
  3750. "/question/{requestID}/reply": {
  3751. "post": {
  3752. "tags": ["question"],
  3753. "operationId": "question.reply",
  3754. "parameters": [
  3755. {
  3756. "name": "requestID",
  3757. "in": "path",
  3758. "schema": {
  3759. "type": "string",
  3760. "pattern": "^que"
  3761. },
  3762. "required": true
  3763. },
  3764. {
  3765. "name": "directory",
  3766. "in": "query",
  3767. "schema": {
  3768. "type": "string"
  3769. },
  3770. "required": false
  3771. },
  3772. {
  3773. "name": "workspace",
  3774. "in": "query",
  3775. "schema": {
  3776. "type": "string"
  3777. },
  3778. "required": false
  3779. }
  3780. ],
  3781. "responses": {
  3782. "200": {
  3783. "description": "Question answered successfully",
  3784. "content": {
  3785. "application/json": {
  3786. "schema": {
  3787. "type": "boolean",
  3788. "description": "Question answered successfully"
  3789. }
  3790. }
  3791. }
  3792. },
  3793. "400": {
  3794. "description": "Bad request",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/BadRequestError"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "404": {
  3804. "description": "Not found",
  3805. "content": {
  3806. "application/json": {
  3807. "schema": {
  3808. "$ref": "#/components/schemas/NotFoundError"
  3809. }
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "description": "Provide answers to a question request from the AI assistant.",
  3815. "summary": "Reply to question request",
  3816. "requestBody": {
  3817. "content": {
  3818. "application/json": {
  3819. "schema": {
  3820. "type": "object",
  3821. "properties": {
  3822. "answers": {
  3823. "type": "array",
  3824. "items": {
  3825. "$ref": "#/components/schemas/QuestionAnswer"
  3826. },
  3827. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3828. }
  3829. },
  3830. "required": ["answers"],
  3831. "additionalProperties": false
  3832. }
  3833. }
  3834. }
  3835. },
  3836. "x-codeSamples": [
  3837. {
  3838. "lang": "js",
  3839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3840. }
  3841. ]
  3842. }
  3843. },
  3844. "/question/{requestID}/reject": {
  3845. "post": {
  3846. "tags": ["question"],
  3847. "operationId": "question.reject",
  3848. "parameters": [
  3849. {
  3850. "name": "requestID",
  3851. "in": "path",
  3852. "schema": {
  3853. "type": "string",
  3854. "pattern": "^que"
  3855. },
  3856. "required": true
  3857. },
  3858. {
  3859. "name": "directory",
  3860. "in": "query",
  3861. "schema": {
  3862. "type": "string"
  3863. },
  3864. "required": false
  3865. },
  3866. {
  3867. "name": "workspace",
  3868. "in": "query",
  3869. "schema": {
  3870. "type": "string"
  3871. },
  3872. "required": false
  3873. }
  3874. ],
  3875. "responses": {
  3876. "200": {
  3877. "description": "Question rejected successfully",
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "boolean",
  3882. "description": "Question rejected successfully"
  3883. }
  3884. }
  3885. }
  3886. },
  3887. "400": {
  3888. "description": "Bad request",
  3889. "content": {
  3890. "application/json": {
  3891. "schema": {
  3892. "$ref": "#/components/schemas/BadRequestError"
  3893. }
  3894. }
  3895. }
  3896. },
  3897. "404": {
  3898. "description": "Not found",
  3899. "content": {
  3900. "application/json": {
  3901. "schema": {
  3902. "$ref": "#/components/schemas/NotFoundError"
  3903. }
  3904. }
  3905. }
  3906. }
  3907. },
  3908. "description": "Reject a question request from the AI assistant.",
  3909. "summary": "Reject question request",
  3910. "x-codeSamples": [
  3911. {
  3912. "lang": "js",
  3913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3914. }
  3915. ]
  3916. }
  3917. },
  3918. "/permission": {
  3919. "get": {
  3920. "tags": ["permission"],
  3921. "operationId": "permission.list",
  3922. "parameters": [
  3923. {
  3924. "name": "directory",
  3925. "in": "query",
  3926. "schema": {
  3927. "type": "string"
  3928. },
  3929. "required": false
  3930. },
  3931. {
  3932. "name": "workspace",
  3933. "in": "query",
  3934. "schema": {
  3935. "type": "string"
  3936. },
  3937. "required": false
  3938. }
  3939. ],
  3940. "responses": {
  3941. "200": {
  3942. "description": "List of pending permissions",
  3943. "content": {
  3944. "application/json": {
  3945. "schema": {
  3946. "type": "array",
  3947. "items": {
  3948. "$ref": "#/components/schemas/PermissionRequest"
  3949. },
  3950. "description": "List of pending permissions"
  3951. }
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "description": "Get all pending permission requests across all sessions.",
  3957. "summary": "List pending permissions",
  3958. "x-codeSamples": [
  3959. {
  3960. "lang": "js",
  3961. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3962. }
  3963. ]
  3964. }
  3965. },
  3966. "/permission/{requestID}/reply": {
  3967. "post": {
  3968. "tags": ["permission"],
  3969. "operationId": "permission.reply",
  3970. "parameters": [
  3971. {
  3972. "name": "requestID",
  3973. "in": "path",
  3974. "schema": {
  3975. "type": "string",
  3976. "pattern": "^per"
  3977. },
  3978. "required": true
  3979. },
  3980. {
  3981. "name": "directory",
  3982. "in": "query",
  3983. "schema": {
  3984. "type": "string"
  3985. },
  3986. "required": false
  3987. },
  3988. {
  3989. "name": "workspace",
  3990. "in": "query",
  3991. "schema": {
  3992. "type": "string"
  3993. },
  3994. "required": false
  3995. }
  3996. ],
  3997. "responses": {
  3998. "200": {
  3999. "description": "Permission processed successfully",
  4000. "content": {
  4001. "application/json": {
  4002. "schema": {
  4003. "type": "boolean",
  4004. "description": "Permission processed successfully"
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "400": {
  4010. "description": "Bad request",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "$ref": "#/components/schemas/BadRequestError"
  4015. }
  4016. }
  4017. }
  4018. },
  4019. "404": {
  4020. "description": "Not found",
  4021. "content": {
  4022. "application/json": {
  4023. "schema": {
  4024. "$ref": "#/components/schemas/NotFoundError"
  4025. }
  4026. }
  4027. }
  4028. }
  4029. },
  4030. "description": "Approve or deny a permission request from the AI assistant.",
  4031. "summary": "Respond to permission request",
  4032. "requestBody": {
  4033. "content": {
  4034. "application/json": {
  4035. "schema": {
  4036. "type": "object",
  4037. "properties": {
  4038. "reply": {
  4039. "type": "string",
  4040. "enum": ["once", "always", "reject"]
  4041. },
  4042. "message": {
  4043. "type": "string"
  4044. }
  4045. },
  4046. "required": ["reply"],
  4047. "additionalProperties": false
  4048. }
  4049. }
  4050. }
  4051. },
  4052. "x-codeSamples": [
  4053. {
  4054. "lang": "js",
  4055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4056. }
  4057. ]
  4058. }
  4059. },
  4060. "/provider": {
  4061. "get": {
  4062. "tags": ["provider"],
  4063. "operationId": "provider.list",
  4064. "parameters": [
  4065. {
  4066. "name": "directory",
  4067. "in": "query",
  4068. "schema": {
  4069. "type": "string"
  4070. },
  4071. "required": false
  4072. },
  4073. {
  4074. "name": "workspace",
  4075. "in": "query",
  4076. "schema": {
  4077. "type": "string"
  4078. },
  4079. "required": false
  4080. }
  4081. ],
  4082. "responses": {
  4083. "200": {
  4084. "description": "List of providers",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "type": "object",
  4089. "properties": {
  4090. "all": {
  4091. "type": "array",
  4092. "items": {
  4093. "$ref": "#/components/schemas/Provider"
  4094. }
  4095. },
  4096. "default": {
  4097. "type": "object",
  4098. "additionalProperties": {
  4099. "type": "string"
  4100. }
  4101. },
  4102. "connected": {
  4103. "type": "array",
  4104. "items": {
  4105. "type": "string"
  4106. }
  4107. }
  4108. },
  4109. "required": ["all", "default", "connected"],
  4110. "additionalProperties": false,
  4111. "description": "List of providers"
  4112. }
  4113. }
  4114. }
  4115. }
  4116. },
  4117. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4118. "summary": "List providers",
  4119. "x-codeSamples": [
  4120. {
  4121. "lang": "js",
  4122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4123. }
  4124. ]
  4125. }
  4126. },
  4127. "/provider/auth": {
  4128. "get": {
  4129. "tags": ["provider"],
  4130. "operationId": "provider.auth",
  4131. "parameters": [
  4132. {
  4133. "name": "directory",
  4134. "in": "query",
  4135. "schema": {
  4136. "type": "string"
  4137. },
  4138. "required": false
  4139. },
  4140. {
  4141. "name": "workspace",
  4142. "in": "query",
  4143. "schema": {
  4144. "type": "string"
  4145. },
  4146. "required": false
  4147. }
  4148. ],
  4149. "responses": {
  4150. "200": {
  4151. "description": "Provider auth methods",
  4152. "content": {
  4153. "application/json": {
  4154. "schema": {
  4155. "type": "object",
  4156. "additionalProperties": {
  4157. "type": "array",
  4158. "items": {
  4159. "$ref": "#/components/schemas/ProviderAuthMethod"
  4160. }
  4161. },
  4162. "description": "Provider auth methods"
  4163. }
  4164. }
  4165. }
  4166. }
  4167. },
  4168. "description": "Retrieve available authentication methods for all AI providers.",
  4169. "summary": "Get provider auth methods",
  4170. "x-codeSamples": [
  4171. {
  4172. "lang": "js",
  4173. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4174. }
  4175. ]
  4176. }
  4177. },
  4178. "/provider/{providerID}/oauth/authorize": {
  4179. "post": {
  4180. "tags": ["provider"],
  4181. "operationId": "provider.oauth.authorize",
  4182. "parameters": [
  4183. {
  4184. "name": "providerID",
  4185. "in": "path",
  4186. "schema": {
  4187. "type": "string"
  4188. },
  4189. "required": true
  4190. },
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "Authorization URL and method",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4215. }
  4216. }
  4217. }
  4218. },
  4219. "400": {
  4220. "description": "ProviderAuthError",
  4221. "content": {
  4222. "application/json": {
  4223. "schema": {
  4224. "$ref": "#/components/schemas/ProviderAuthError1"
  4225. }
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "description": "Start the OAuth authorization flow for a provider.",
  4231. "summary": "Start OAuth authorization",
  4232. "requestBody": {
  4233. "content": {
  4234. "application/json": {
  4235. "schema": {
  4236. "type": "object",
  4237. "properties": {
  4238. "method": {
  4239. "type": "number",
  4240. "description": "Auth method index"
  4241. },
  4242. "inputs": {
  4243. "type": "object",
  4244. "additionalProperties": {
  4245. "type": "string"
  4246. }
  4247. }
  4248. },
  4249. "required": ["method"],
  4250. "additionalProperties": false
  4251. }
  4252. }
  4253. }
  4254. },
  4255. "x-codeSamples": [
  4256. {
  4257. "lang": "js",
  4258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4259. }
  4260. ]
  4261. }
  4262. },
  4263. "/provider/{providerID}/oauth/callback": {
  4264. "post": {
  4265. "tags": ["provider"],
  4266. "operationId": "provider.oauth.callback",
  4267. "parameters": [
  4268. {
  4269. "name": "providerID",
  4270. "in": "path",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": true
  4275. },
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "OAuth callback processed successfully",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "boolean",
  4300. "description": "OAuth callback processed successfully"
  4301. }
  4302. }
  4303. }
  4304. },
  4305. "400": {
  4306. "description": "ProviderAuthError",
  4307. "content": {
  4308. "application/json": {
  4309. "schema": {
  4310. "$ref": "#/components/schemas/ProviderAuthError1"
  4311. }
  4312. }
  4313. }
  4314. }
  4315. },
  4316. "description": "Handle the OAuth callback from a provider after user authorization.",
  4317. "summary": "Handle OAuth callback",
  4318. "requestBody": {
  4319. "content": {
  4320. "application/json": {
  4321. "schema": {
  4322. "type": "object",
  4323. "properties": {
  4324. "method": {
  4325. "type": "number",
  4326. "description": "Auth method index"
  4327. },
  4328. "code": {
  4329. "type": "string"
  4330. }
  4331. },
  4332. "required": ["method"],
  4333. "additionalProperties": false
  4334. }
  4335. }
  4336. }
  4337. },
  4338. "x-codeSamples": [
  4339. {
  4340. "lang": "js",
  4341. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4342. }
  4343. ]
  4344. }
  4345. },
  4346. "/session": {
  4347. "get": {
  4348. "tags": ["session"],
  4349. "operationId": "session.list",
  4350. "parameters": [
  4351. {
  4352. "name": "directory",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. },
  4359. {
  4360. "name": "workspace",
  4361. "in": "query",
  4362. "schema": {
  4363. "type": "string"
  4364. },
  4365. "required": false
  4366. },
  4367. {
  4368. "name": "scope",
  4369. "in": "query",
  4370. "schema": {
  4371. "type": "string",
  4372. "enum": ["project"]
  4373. },
  4374. "required": false
  4375. },
  4376. {
  4377. "name": "path",
  4378. "in": "query",
  4379. "schema": {
  4380. "type": "string"
  4381. },
  4382. "required": false
  4383. },
  4384. {
  4385. "name": "roots",
  4386. "in": "query",
  4387. "schema": {
  4388. "anyOf": [
  4389. {
  4390. "type": "boolean"
  4391. },
  4392. {
  4393. "type": "string",
  4394. "enum": ["true", "false"]
  4395. }
  4396. ]
  4397. },
  4398. "required": false
  4399. },
  4400. {
  4401. "name": "start",
  4402. "in": "query",
  4403. "schema": {
  4404. "type": "number"
  4405. },
  4406. "required": false
  4407. },
  4408. {
  4409. "name": "search",
  4410. "in": "query",
  4411. "schema": {
  4412. "type": "string"
  4413. },
  4414. "required": false
  4415. },
  4416. {
  4417. "name": "limit",
  4418. "in": "query",
  4419. "schema": {
  4420. "type": "number"
  4421. },
  4422. "required": false
  4423. }
  4424. ],
  4425. "responses": {
  4426. "200": {
  4427. "description": "List of sessions",
  4428. "content": {
  4429. "application/json": {
  4430. "schema": {
  4431. "type": "array",
  4432. "items": {
  4433. "$ref": "#/components/schemas/Session"
  4434. },
  4435. "description": "List of sessions"
  4436. }
  4437. }
  4438. }
  4439. }
  4440. },
  4441. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4442. "summary": "List sessions",
  4443. "x-codeSamples": [
  4444. {
  4445. "lang": "js",
  4446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4447. }
  4448. ]
  4449. },
  4450. "post": {
  4451. "tags": ["session"],
  4452. "operationId": "session.create",
  4453. "parameters": [
  4454. {
  4455. "name": "directory",
  4456. "in": "query",
  4457. "schema": {
  4458. "type": "string"
  4459. },
  4460. "required": false
  4461. },
  4462. {
  4463. "name": "workspace",
  4464. "in": "query",
  4465. "schema": {
  4466. "type": "string"
  4467. },
  4468. "required": false
  4469. }
  4470. ],
  4471. "responses": {
  4472. "200": {
  4473. "description": "Successfully created session",
  4474. "content": {
  4475. "application/json": {
  4476. "schema": {
  4477. "$ref": "#/components/schemas/Session"
  4478. }
  4479. }
  4480. }
  4481. },
  4482. "400": {
  4483. "description": "Bad request",
  4484. "content": {
  4485. "application/json": {
  4486. "schema": {
  4487. "$ref": "#/components/schemas/BadRequestError"
  4488. }
  4489. }
  4490. }
  4491. }
  4492. },
  4493. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4494. "summary": "Create session",
  4495. "requestBody": {
  4496. "content": {
  4497. "application/json": {
  4498. "schema": {
  4499. "type": "object",
  4500. "properties": {
  4501. "parentID": {
  4502. "type": "string",
  4503. "pattern": "^ses"
  4504. },
  4505. "title": {
  4506. "type": "string"
  4507. },
  4508. "agent": {
  4509. "type": "string"
  4510. },
  4511. "model": {
  4512. "type": "object",
  4513. "properties": {
  4514. "id": {
  4515. "type": "string"
  4516. },
  4517. "providerID": {
  4518. "type": "string"
  4519. },
  4520. "variant": {
  4521. "type": "string"
  4522. }
  4523. },
  4524. "required": ["id", "providerID"],
  4525. "additionalProperties": false
  4526. },
  4527. "permission": {
  4528. "$ref": "#/components/schemas/PermissionRuleset"
  4529. },
  4530. "workspaceID": {
  4531. "type": "string",
  4532. "pattern": "^wrk"
  4533. }
  4534. },
  4535. "additionalProperties": false
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "x-codeSamples": [
  4541. {
  4542. "lang": "js",
  4543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4544. }
  4545. ]
  4546. }
  4547. },
  4548. "/session/status": {
  4549. "get": {
  4550. "tags": ["session"],
  4551. "operationId": "session.status",
  4552. "parameters": [
  4553. {
  4554. "name": "directory",
  4555. "in": "query",
  4556. "schema": {
  4557. "type": "string"
  4558. },
  4559. "required": false
  4560. },
  4561. {
  4562. "name": "workspace",
  4563. "in": "query",
  4564. "schema": {
  4565. "type": "string"
  4566. },
  4567. "required": false
  4568. }
  4569. ],
  4570. "responses": {
  4571. "200": {
  4572. "description": "Get session status",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "type": "object",
  4577. "additionalProperties": {
  4578. "$ref": "#/components/schemas/SessionStatus"
  4579. },
  4580. "description": "Get session status"
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "400": {
  4586. "description": "Bad request",
  4587. "content": {
  4588. "application/json": {
  4589. "schema": {
  4590. "$ref": "#/components/schemas/BadRequestError"
  4591. }
  4592. }
  4593. }
  4594. }
  4595. },
  4596. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4597. "summary": "Get session status",
  4598. "x-codeSamples": [
  4599. {
  4600. "lang": "js",
  4601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4602. }
  4603. ]
  4604. }
  4605. },
  4606. "/session/{sessionID}": {
  4607. "get": {
  4608. "tags": ["session"],
  4609. "operationId": "session.get",
  4610. "parameters": [
  4611. {
  4612. "name": "sessionID",
  4613. "in": "path",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^ses"
  4617. },
  4618. "required": true
  4619. },
  4620. {
  4621. "name": "directory",
  4622. "in": "query",
  4623. "schema": {
  4624. "type": "string"
  4625. },
  4626. "required": false
  4627. },
  4628. {
  4629. "name": "workspace",
  4630. "in": "query",
  4631. "schema": {
  4632. "type": "string"
  4633. },
  4634. "required": false
  4635. }
  4636. ],
  4637. "responses": {
  4638. "200": {
  4639. "description": "Get session",
  4640. "content": {
  4641. "application/json": {
  4642. "schema": {
  4643. "$ref": "#/components/schemas/Session"
  4644. }
  4645. }
  4646. }
  4647. },
  4648. "400": {
  4649. "description": "Bad request",
  4650. "content": {
  4651. "application/json": {
  4652. "schema": {
  4653. "$ref": "#/components/schemas/BadRequestError"
  4654. }
  4655. }
  4656. }
  4657. },
  4658. "404": {
  4659. "description": "NotFoundError",
  4660. "content": {
  4661. "application/json": {
  4662. "schema": {
  4663. "$ref": "#/components/schemas/NotFoundError"
  4664. }
  4665. }
  4666. }
  4667. }
  4668. },
  4669. "description": "Retrieve detailed information about a specific OpenCode session.",
  4670. "summary": "Get session",
  4671. "x-codeSamples": [
  4672. {
  4673. "lang": "js",
  4674. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4675. }
  4676. ]
  4677. },
  4678. "delete": {
  4679. "tags": ["session"],
  4680. "operationId": "session.delete",
  4681. "parameters": [
  4682. {
  4683. "name": "sessionID",
  4684. "in": "path",
  4685. "schema": {
  4686. "type": "string",
  4687. "pattern": "^ses"
  4688. },
  4689. "required": true
  4690. },
  4691. {
  4692. "name": "directory",
  4693. "in": "query",
  4694. "schema": {
  4695. "type": "string"
  4696. },
  4697. "required": false
  4698. },
  4699. {
  4700. "name": "workspace",
  4701. "in": "query",
  4702. "schema": {
  4703. "type": "string"
  4704. },
  4705. "required": false
  4706. }
  4707. ],
  4708. "responses": {
  4709. "200": {
  4710. "description": "Successfully deleted session",
  4711. "content": {
  4712. "application/json": {
  4713. "schema": {
  4714. "type": "boolean",
  4715. "description": "Successfully deleted session"
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "400": {
  4721. "description": "Bad request",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/BadRequestError"
  4726. }
  4727. }
  4728. }
  4729. },
  4730. "404": {
  4731. "description": "NotFoundError",
  4732. "content": {
  4733. "application/json": {
  4734. "schema": {
  4735. "$ref": "#/components/schemas/NotFoundError"
  4736. }
  4737. }
  4738. }
  4739. }
  4740. },
  4741. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4742. "summary": "Delete session",
  4743. "x-codeSamples": [
  4744. {
  4745. "lang": "js",
  4746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4747. }
  4748. ]
  4749. },
  4750. "patch": {
  4751. "tags": ["session"],
  4752. "operationId": "session.update",
  4753. "parameters": [
  4754. {
  4755. "name": "sessionID",
  4756. "in": "path",
  4757. "schema": {
  4758. "type": "string",
  4759. "pattern": "^ses"
  4760. },
  4761. "required": true
  4762. },
  4763. {
  4764. "name": "directory",
  4765. "in": "query",
  4766. "schema": {
  4767. "type": "string"
  4768. },
  4769. "required": false
  4770. },
  4771. {
  4772. "name": "workspace",
  4773. "in": "query",
  4774. "schema": {
  4775. "type": "string"
  4776. },
  4777. "required": false
  4778. }
  4779. ],
  4780. "responses": {
  4781. "200": {
  4782. "description": "Successfully updated session",
  4783. "content": {
  4784. "application/json": {
  4785. "schema": {
  4786. "$ref": "#/components/schemas/Session"
  4787. }
  4788. }
  4789. }
  4790. },
  4791. "400": {
  4792. "description": "Bad request",
  4793. "content": {
  4794. "application/json": {
  4795. "schema": {
  4796. "$ref": "#/components/schemas/BadRequestError"
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "404": {
  4802. "description": "NotFoundError",
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "$ref": "#/components/schemas/NotFoundError"
  4807. }
  4808. }
  4809. }
  4810. }
  4811. },
  4812. "description": "Update properties of an existing session, such as title or other metadata.",
  4813. "summary": "Update session",
  4814. "requestBody": {
  4815. "content": {
  4816. "application/json": {
  4817. "schema": {
  4818. "type": "object",
  4819. "properties": {
  4820. "title": {
  4821. "type": "string"
  4822. },
  4823. "permission": {
  4824. "$ref": "#/components/schemas/PermissionRuleset"
  4825. },
  4826. "time": {
  4827. "type": "object",
  4828. "properties": {
  4829. "archived": {
  4830. "type": "number"
  4831. }
  4832. },
  4833. "additionalProperties": false
  4834. }
  4835. },
  4836. "additionalProperties": false
  4837. }
  4838. }
  4839. }
  4840. },
  4841. "x-codeSamples": [
  4842. {
  4843. "lang": "js",
  4844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4845. }
  4846. ]
  4847. }
  4848. },
  4849. "/session/{sessionID}/children": {
  4850. "get": {
  4851. "tags": ["session"],
  4852. "operationId": "session.children",
  4853. "parameters": [
  4854. {
  4855. "name": "sessionID",
  4856. "in": "path",
  4857. "schema": {
  4858. "type": "string",
  4859. "pattern": "^ses"
  4860. },
  4861. "required": true
  4862. },
  4863. {
  4864. "name": "directory",
  4865. "in": "query",
  4866. "schema": {
  4867. "type": "string"
  4868. },
  4869. "required": false
  4870. },
  4871. {
  4872. "name": "workspace",
  4873. "in": "query",
  4874. "schema": {
  4875. "type": "string"
  4876. },
  4877. "required": false
  4878. }
  4879. ],
  4880. "responses": {
  4881. "200": {
  4882. "description": "List of children",
  4883. "content": {
  4884. "application/json": {
  4885. "schema": {
  4886. "type": "array",
  4887. "items": {
  4888. "$ref": "#/components/schemas/Session"
  4889. },
  4890. "description": "List of children"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "400": {
  4896. "description": "Bad request",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/BadRequestError"
  4901. }
  4902. }
  4903. }
  4904. },
  4905. "404": {
  4906. "description": "NotFoundError",
  4907. "content": {
  4908. "application/json": {
  4909. "schema": {
  4910. "$ref": "#/components/schemas/NotFoundError"
  4911. }
  4912. }
  4913. }
  4914. }
  4915. },
  4916. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4917. "summary": "Get session children",
  4918. "x-codeSamples": [
  4919. {
  4920. "lang": "js",
  4921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4922. }
  4923. ]
  4924. }
  4925. },
  4926. "/session/{sessionID}/todo": {
  4927. "get": {
  4928. "tags": ["session"],
  4929. "operationId": "session.todo",
  4930. "parameters": [
  4931. {
  4932. "name": "sessionID",
  4933. "in": "path",
  4934. "schema": {
  4935. "type": "string",
  4936. "pattern": "^ses"
  4937. },
  4938. "required": true
  4939. },
  4940. {
  4941. "name": "directory",
  4942. "in": "query",
  4943. "schema": {
  4944. "type": "string"
  4945. },
  4946. "required": false
  4947. },
  4948. {
  4949. "name": "workspace",
  4950. "in": "query",
  4951. "schema": {
  4952. "type": "string"
  4953. },
  4954. "required": false
  4955. }
  4956. ],
  4957. "responses": {
  4958. "200": {
  4959. "description": "Todo list",
  4960. "content": {
  4961. "application/json": {
  4962. "schema": {
  4963. "type": "array",
  4964. "items": {
  4965. "$ref": "#/components/schemas/Todo"
  4966. },
  4967. "description": "Todo list"
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "400": {
  4973. "description": "Bad request",
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "$ref": "#/components/schemas/BadRequestError"
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "404": {
  4983. "description": "NotFoundError",
  4984. "content": {
  4985. "application/json": {
  4986. "schema": {
  4987. "$ref": "#/components/schemas/NotFoundError"
  4988. }
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4994. "summary": "Get session todos",
  4995. "x-codeSamples": [
  4996. {
  4997. "lang": "js",
  4998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4999. }
  5000. ]
  5001. }
  5002. },
  5003. "/session/{sessionID}/diff": {
  5004. "get": {
  5005. "tags": ["session"],
  5006. "operationId": "session.diff",
  5007. "parameters": [
  5008. {
  5009. "name": "sessionID",
  5010. "in": "path",
  5011. "schema": {
  5012. "type": "string",
  5013. "pattern": "^ses"
  5014. },
  5015. "required": true
  5016. },
  5017. {
  5018. "name": "directory",
  5019. "in": "query",
  5020. "schema": {
  5021. "type": "string"
  5022. },
  5023. "required": false
  5024. },
  5025. {
  5026. "name": "workspace",
  5027. "in": "query",
  5028. "schema": {
  5029. "type": "string"
  5030. },
  5031. "required": false
  5032. },
  5033. {
  5034. "name": "messageID",
  5035. "in": "query",
  5036. "schema": {
  5037. "type": "string",
  5038. "pattern": "^msg"
  5039. },
  5040. "required": false
  5041. }
  5042. ],
  5043. "responses": {
  5044. "200": {
  5045. "description": "Successfully retrieved diff",
  5046. "content": {
  5047. "application/json": {
  5048. "schema": {
  5049. "type": "array",
  5050. "items": {
  5051. "$ref": "#/components/schemas/SnapshotFileDiff"
  5052. },
  5053. "description": "Successfully retrieved diff"
  5054. }
  5055. }
  5056. }
  5057. }
  5058. },
  5059. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5060. "summary": "Get message diff",
  5061. "x-codeSamples": [
  5062. {
  5063. "lang": "js",
  5064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5065. }
  5066. ]
  5067. }
  5068. },
  5069. "/session/{sessionID}/message": {
  5070. "get": {
  5071. "tags": ["session"],
  5072. "operationId": "session.messages",
  5073. "parameters": [
  5074. {
  5075. "name": "sessionID",
  5076. "in": "path",
  5077. "schema": {
  5078. "type": "string",
  5079. "pattern": "^ses"
  5080. },
  5081. "required": true
  5082. },
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. },
  5099. {
  5100. "name": "limit",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "integer",
  5104. "minimum": 0,
  5105. "maximum": 9007199254740991
  5106. },
  5107. "required": false
  5108. },
  5109. {
  5110. "name": "before",
  5111. "in": "query",
  5112. "schema": {
  5113. "type": "string"
  5114. },
  5115. "required": false
  5116. }
  5117. ],
  5118. "responses": {
  5119. "200": {
  5120. "description": "List of messages",
  5121. "content": {
  5122. "application/json": {
  5123. "schema": {
  5124. "type": "array",
  5125. "items": {
  5126. "type": "object",
  5127. "properties": {
  5128. "info": {
  5129. "$ref": "#/components/schemas/Message"
  5130. },
  5131. "parts": {
  5132. "type": "array",
  5133. "items": {
  5134. "$ref": "#/components/schemas/Part"
  5135. }
  5136. }
  5137. },
  5138. "required": ["info", "parts"],
  5139. "additionalProperties": false
  5140. },
  5141. "description": "List of messages"
  5142. }
  5143. }
  5144. }
  5145. },
  5146. "400": {
  5147. "description": "Bad request",
  5148. "content": {
  5149. "application/json": {
  5150. "schema": {
  5151. "$ref": "#/components/schemas/BadRequestError"
  5152. }
  5153. }
  5154. }
  5155. },
  5156. "404": {
  5157. "description": "NotFoundError",
  5158. "content": {
  5159. "application/json": {
  5160. "schema": {
  5161. "$ref": "#/components/schemas/NotFoundError"
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5168. "summary": "Get session messages",
  5169. "x-codeSamples": [
  5170. {
  5171. "lang": "js",
  5172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5173. }
  5174. ]
  5175. },
  5176. "post": {
  5177. "tags": ["session"],
  5178. "operationId": "session.prompt",
  5179. "parameters": [
  5180. {
  5181. "name": "sessionID",
  5182. "in": "path",
  5183. "schema": {
  5184. "type": "string",
  5185. "pattern": "^ses"
  5186. },
  5187. "required": true
  5188. },
  5189. {
  5190. "name": "directory",
  5191. "in": "query",
  5192. "schema": {
  5193. "type": "string"
  5194. },
  5195. "required": false
  5196. },
  5197. {
  5198. "name": "workspace",
  5199. "in": "query",
  5200. "schema": {
  5201. "type": "string"
  5202. },
  5203. "required": false
  5204. }
  5205. ],
  5206. "responses": {
  5207. "200": {
  5208. "description": "Created message",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "type": "object",
  5213. "required": ["info", "parts"],
  5214. "properties": {
  5215. "info": {
  5216. "$ref": "#/components/schemas/AssistantMessage"
  5217. },
  5218. "parts": {
  5219. "type": "array",
  5220. "items": {
  5221. "$ref": "#/components/schemas/Part"
  5222. }
  5223. }
  5224. }
  5225. }
  5226. }
  5227. }
  5228. },
  5229. "400": {
  5230. "description": "Bad request",
  5231. "content": {
  5232. "application/json": {
  5233. "schema": {
  5234. "$ref": "#/components/schemas/BadRequestError"
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "404": {
  5240. "description": "NotFoundError",
  5241. "content": {
  5242. "application/json": {
  5243. "schema": {
  5244. "$ref": "#/components/schemas/NotFoundError"
  5245. }
  5246. }
  5247. }
  5248. }
  5249. },
  5250. "description": "Create and send a new message to a session, streaming the AI response.",
  5251. "summary": "Send message",
  5252. "requestBody": {
  5253. "content": {
  5254. "application/json": {
  5255. "schema": {
  5256. "type": "object",
  5257. "properties": {
  5258. "messageID": {
  5259. "type": "string",
  5260. "pattern": "^msg"
  5261. },
  5262. "model": {
  5263. "type": "object",
  5264. "properties": {
  5265. "providerID": {
  5266. "type": "string"
  5267. },
  5268. "modelID": {
  5269. "type": "string"
  5270. }
  5271. },
  5272. "required": ["providerID", "modelID"],
  5273. "additionalProperties": false
  5274. },
  5275. "agent": {
  5276. "type": "string"
  5277. },
  5278. "noReply": {
  5279. "type": "boolean"
  5280. },
  5281. "tools": {
  5282. "type": "object",
  5283. "additionalProperties": {
  5284. "type": "boolean"
  5285. }
  5286. },
  5287. "format": {
  5288. "$ref": "#/components/schemas/OutputFormat"
  5289. },
  5290. "system": {
  5291. "type": "string"
  5292. },
  5293. "variant": {
  5294. "type": "string"
  5295. },
  5296. "parts": {
  5297. "type": "array",
  5298. "items": {
  5299. "anyOf": [
  5300. {
  5301. "$ref": "#/components/schemas/TextPartInput"
  5302. },
  5303. {
  5304. "$ref": "#/components/schemas/FilePartInput"
  5305. },
  5306. {
  5307. "$ref": "#/components/schemas/AgentPartInput"
  5308. },
  5309. {
  5310. "$ref": "#/components/schemas/SubtaskPartInput"
  5311. }
  5312. ]
  5313. }
  5314. }
  5315. },
  5316. "required": ["parts"],
  5317. "additionalProperties": false
  5318. }
  5319. }
  5320. }
  5321. },
  5322. "x-codeSamples": [
  5323. {
  5324. "lang": "js",
  5325. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5326. }
  5327. ]
  5328. }
  5329. },
  5330. "/session/{sessionID}/message/{messageID}": {
  5331. "get": {
  5332. "tags": ["session"],
  5333. "operationId": "session.message",
  5334. "parameters": [
  5335. {
  5336. "name": "sessionID",
  5337. "in": "path",
  5338. "schema": {
  5339. "type": "string",
  5340. "pattern": "^ses"
  5341. },
  5342. "required": true
  5343. },
  5344. {
  5345. "name": "messageID",
  5346. "in": "path",
  5347. "schema": {
  5348. "type": "string",
  5349. "pattern": "^msg"
  5350. },
  5351. "required": true
  5352. },
  5353. {
  5354. "name": "directory",
  5355. "in": "query",
  5356. "schema": {
  5357. "type": "string"
  5358. },
  5359. "required": false
  5360. },
  5361. {
  5362. "name": "workspace",
  5363. "in": "query",
  5364. "schema": {
  5365. "type": "string"
  5366. },
  5367. "required": false
  5368. }
  5369. ],
  5370. "responses": {
  5371. "200": {
  5372. "description": "Message",
  5373. "content": {
  5374. "application/json": {
  5375. "schema": {
  5376. "type": "object",
  5377. "properties": {
  5378. "info": {
  5379. "$ref": "#/components/schemas/Message"
  5380. },
  5381. "parts": {
  5382. "type": "array",
  5383. "items": {
  5384. "$ref": "#/components/schemas/Part"
  5385. }
  5386. }
  5387. },
  5388. "required": ["info", "parts"],
  5389. "additionalProperties": false,
  5390. "description": "Message"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "400": {
  5396. "description": "Bad request",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "$ref": "#/components/schemas/BadRequestError"
  5401. }
  5402. }
  5403. }
  5404. },
  5405. "404": {
  5406. "description": "NotFoundError",
  5407. "content": {
  5408. "application/json": {
  5409. "schema": {
  5410. "$ref": "#/components/schemas/NotFoundError"
  5411. }
  5412. }
  5413. }
  5414. }
  5415. },
  5416. "description": "Retrieve a specific message from a session by its message ID.",
  5417. "summary": "Get message",
  5418. "x-codeSamples": [
  5419. {
  5420. "lang": "js",
  5421. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5422. }
  5423. ]
  5424. },
  5425. "delete": {
  5426. "tags": ["session"],
  5427. "operationId": "session.deleteMessage",
  5428. "parameters": [
  5429. {
  5430. "name": "sessionID",
  5431. "in": "path",
  5432. "schema": {
  5433. "type": "string",
  5434. "pattern": "^ses"
  5435. },
  5436. "required": true
  5437. },
  5438. {
  5439. "name": "messageID",
  5440. "in": "path",
  5441. "schema": {
  5442. "type": "string",
  5443. "pattern": "^msg"
  5444. },
  5445. "required": true
  5446. },
  5447. {
  5448. "name": "directory",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. },
  5455. {
  5456. "name": "workspace",
  5457. "in": "query",
  5458. "schema": {
  5459. "type": "string"
  5460. },
  5461. "required": false
  5462. }
  5463. ],
  5464. "responses": {
  5465. "200": {
  5466. "description": "Successfully deleted message",
  5467. "content": {
  5468. "application/json": {
  5469. "schema": {
  5470. "type": "boolean",
  5471. "description": "Successfully deleted message"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "Bad request",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "$ref": "#/components/schemas/BadRequestError"
  5482. }
  5483. }
  5484. }
  5485. },
  5486. "404": {
  5487. "description": "NotFoundError",
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "$ref": "#/components/schemas/NotFoundError"
  5492. }
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5498. "summary": "Delete message",
  5499. "x-codeSamples": [
  5500. {
  5501. "lang": "js",
  5502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5503. }
  5504. ]
  5505. }
  5506. },
  5507. "/session/{sessionID}/fork": {
  5508. "post": {
  5509. "tags": ["session"],
  5510. "operationId": "session.fork",
  5511. "parameters": [
  5512. {
  5513. "name": "sessionID",
  5514. "in": "path",
  5515. "schema": {
  5516. "type": "string",
  5517. "pattern": "^ses"
  5518. },
  5519. "required": true
  5520. },
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "200",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "Bad request",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "$ref": "#/components/schemas/BadRequestError"
  5555. }
  5556. }
  5557. }
  5558. },
  5559. "404": {
  5560. "description": "NotFoundError",
  5561. "content": {
  5562. "application/json": {
  5563. "schema": {
  5564. "$ref": "#/components/schemas/NotFoundError"
  5565. }
  5566. }
  5567. }
  5568. }
  5569. },
  5570. "description": "Create a new session by forking an existing session at a specific message point.",
  5571. "summary": "Fork session",
  5572. "requestBody": {
  5573. "content": {
  5574. "application/json": {
  5575. "schema": {
  5576. "type": "object",
  5577. "properties": {
  5578. "messageID": {
  5579. "type": "string",
  5580. "pattern": "^msg"
  5581. }
  5582. },
  5583. "additionalProperties": false
  5584. }
  5585. }
  5586. }
  5587. },
  5588. "x-codeSamples": [
  5589. {
  5590. "lang": "js",
  5591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5592. }
  5593. ]
  5594. }
  5595. },
  5596. "/session/{sessionID}/abort": {
  5597. "post": {
  5598. "tags": ["session"],
  5599. "operationId": "session.abort",
  5600. "parameters": [
  5601. {
  5602. "name": "sessionID",
  5603. "in": "path",
  5604. "schema": {
  5605. "type": "string",
  5606. "pattern": "^ses"
  5607. },
  5608. "required": true
  5609. },
  5610. {
  5611. "name": "directory",
  5612. "in": "query",
  5613. "schema": {
  5614. "type": "string"
  5615. },
  5616. "required": false
  5617. },
  5618. {
  5619. "name": "workspace",
  5620. "in": "query",
  5621. "schema": {
  5622. "type": "string"
  5623. },
  5624. "required": false
  5625. }
  5626. ],
  5627. "responses": {
  5628. "200": {
  5629. "description": "Aborted session",
  5630. "content": {
  5631. "application/json": {
  5632. "schema": {
  5633. "type": "boolean",
  5634. "description": "Aborted session"
  5635. }
  5636. }
  5637. }
  5638. },
  5639. "400": {
  5640. "description": "Bad request",
  5641. "content": {
  5642. "application/json": {
  5643. "schema": {
  5644. "$ref": "#/components/schemas/BadRequestError"
  5645. }
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5651. "summary": "Abort session",
  5652. "x-codeSamples": [
  5653. {
  5654. "lang": "js",
  5655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5656. }
  5657. ]
  5658. }
  5659. },
  5660. "/session/{sessionID}/init": {
  5661. "post": {
  5662. "tags": ["session"],
  5663. "operationId": "session.init",
  5664. "parameters": [
  5665. {
  5666. "name": "sessionID",
  5667. "in": "path",
  5668. "schema": {
  5669. "type": "string",
  5670. "pattern": "^ses"
  5671. },
  5672. "required": true
  5673. },
  5674. {
  5675. "name": "directory",
  5676. "in": "query",
  5677. "schema": {
  5678. "type": "string"
  5679. },
  5680. "required": false
  5681. },
  5682. {
  5683. "name": "workspace",
  5684. "in": "query",
  5685. "schema": {
  5686. "type": "string"
  5687. },
  5688. "required": false
  5689. }
  5690. ],
  5691. "responses": {
  5692. "200": {
  5693. "description": "200",
  5694. "content": {
  5695. "application/json": {
  5696. "schema": {
  5697. "type": "boolean",
  5698. "description": "200"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "400": {
  5704. "description": "Bad request",
  5705. "content": {
  5706. "application/json": {
  5707. "schema": {
  5708. "$ref": "#/components/schemas/BadRequestError"
  5709. }
  5710. }
  5711. }
  5712. },
  5713. "404": {
  5714. "description": "NotFoundError",
  5715. "content": {
  5716. "application/json": {
  5717. "schema": {
  5718. "$ref": "#/components/schemas/NotFoundError"
  5719. }
  5720. }
  5721. }
  5722. }
  5723. },
  5724. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5725. "summary": "Initialize session",
  5726. "requestBody": {
  5727. "content": {
  5728. "application/json": {
  5729. "schema": {
  5730. "type": "object",
  5731. "properties": {
  5732. "modelID": {
  5733. "type": "string"
  5734. },
  5735. "providerID": {
  5736. "type": "string"
  5737. },
  5738. "messageID": {
  5739. "type": "string",
  5740. "pattern": "^msg"
  5741. }
  5742. },
  5743. "required": ["modelID", "providerID", "messageID"],
  5744. "additionalProperties": false
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "x-codeSamples": [
  5750. {
  5751. "lang": "js",
  5752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5753. }
  5754. ]
  5755. }
  5756. },
  5757. "/session/{sessionID}/share": {
  5758. "post": {
  5759. "tags": ["session"],
  5760. "operationId": "session.share",
  5761. "parameters": [
  5762. {
  5763. "name": "sessionID",
  5764. "in": "path",
  5765. "schema": {
  5766. "type": "string",
  5767. "pattern": "^ses"
  5768. },
  5769. "required": true
  5770. },
  5771. {
  5772. "name": "directory",
  5773. "in": "query",
  5774. "schema": {
  5775. "type": "string"
  5776. },
  5777. "required": false
  5778. },
  5779. {
  5780. "name": "workspace",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. }
  5787. ],
  5788. "responses": {
  5789. "200": {
  5790. "description": "Successfully shared session",
  5791. "content": {
  5792. "application/json": {
  5793. "schema": {
  5794. "$ref": "#/components/schemas/Session"
  5795. }
  5796. }
  5797. }
  5798. },
  5799. "404": {
  5800. "description": "NotFoundError",
  5801. "content": {
  5802. "application/json": {
  5803. "schema": {
  5804. "$ref": "#/components/schemas/NotFoundError"
  5805. }
  5806. }
  5807. }
  5808. },
  5809. "500": {
  5810. "description": "InternalServerError",
  5811. "content": {
  5812. "application/json": {
  5813. "schema": {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5815. }
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5821. "summary": "Share session",
  5822. "x-codeSamples": [
  5823. {
  5824. "lang": "js",
  5825. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5826. }
  5827. ]
  5828. },
  5829. "delete": {
  5830. "tags": ["session"],
  5831. "operationId": "session.unshare",
  5832. "parameters": [
  5833. {
  5834. "name": "sessionID",
  5835. "in": "path",
  5836. "schema": {
  5837. "type": "string",
  5838. "pattern": "^ses"
  5839. },
  5840. "required": true
  5841. },
  5842. {
  5843. "name": "directory",
  5844. "in": "query",
  5845. "schema": {
  5846. "type": "string"
  5847. },
  5848. "required": false
  5849. },
  5850. {
  5851. "name": "workspace",
  5852. "in": "query",
  5853. "schema": {
  5854. "type": "string"
  5855. },
  5856. "required": false
  5857. }
  5858. ],
  5859. "responses": {
  5860. "200": {
  5861. "description": "Successfully unshared session",
  5862. "content": {
  5863. "application/json": {
  5864. "schema": {
  5865. "$ref": "#/components/schemas/Session"
  5866. }
  5867. }
  5868. }
  5869. },
  5870. "404": {
  5871. "description": "NotFoundError",
  5872. "content": {
  5873. "application/json": {
  5874. "schema": {
  5875. "$ref": "#/components/schemas/NotFoundError"
  5876. }
  5877. }
  5878. }
  5879. },
  5880. "500": {
  5881. "description": "InternalServerError",
  5882. "content": {
  5883. "application/json": {
  5884. "schema": {
  5885. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5886. }
  5887. }
  5888. }
  5889. }
  5890. },
  5891. "description": "Remove the shareable link for a session, making it private again.",
  5892. "summary": "Unshare session",
  5893. "x-codeSamples": [
  5894. {
  5895. "lang": "js",
  5896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5897. }
  5898. ]
  5899. }
  5900. },
  5901. "/session/{sessionID}/summarize": {
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.summarize",
  5905. "parameters": [
  5906. {
  5907. "name": "sessionID",
  5908. "in": "path",
  5909. "schema": {
  5910. "type": "string",
  5911. "pattern": "^ses"
  5912. },
  5913. "required": true
  5914. },
  5915. {
  5916. "name": "directory",
  5917. "in": "query",
  5918. "schema": {
  5919. "type": "string"
  5920. },
  5921. "required": false
  5922. },
  5923. {
  5924. "name": "workspace",
  5925. "in": "query",
  5926. "schema": {
  5927. "type": "string"
  5928. },
  5929. "required": false
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "description": "Summarized session",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "boolean",
  5939. "description": "Summarized session"
  5940. }
  5941. }
  5942. }
  5943. },
  5944. "400": {
  5945. "description": "Bad request",
  5946. "content": {
  5947. "application/json": {
  5948. "schema": {
  5949. "$ref": "#/components/schemas/BadRequestError"
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "404": {
  5955. "description": "NotFoundError",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/NotFoundError"
  5960. }
  5961. }
  5962. }
  5963. }
  5964. },
  5965. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5966. "summary": "Summarize session",
  5967. "requestBody": {
  5968. "content": {
  5969. "application/json": {
  5970. "schema": {
  5971. "type": "object",
  5972. "properties": {
  5973. "providerID": {
  5974. "type": "string"
  5975. },
  5976. "modelID": {
  5977. "type": "string"
  5978. },
  5979. "auto": {
  5980. "type": "boolean"
  5981. }
  5982. },
  5983. "required": ["providerID", "modelID"],
  5984. "additionalProperties": false
  5985. }
  5986. }
  5987. }
  5988. },
  5989. "x-codeSamples": [
  5990. {
  5991. "lang": "js",
  5992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5993. }
  5994. ]
  5995. }
  5996. },
  5997. "/session/{sessionID}/prompt_async": {
  5998. "post": {
  5999. "tags": ["session"],
  6000. "operationId": "session.prompt_async",
  6001. "parameters": [
  6002. {
  6003. "name": "sessionID",
  6004. "in": "path",
  6005. "schema": {
  6006. "type": "string",
  6007. "pattern": "^ses"
  6008. },
  6009. "required": true
  6010. },
  6011. {
  6012. "name": "directory",
  6013. "in": "query",
  6014. "schema": {
  6015. "type": "string"
  6016. },
  6017. "required": false
  6018. },
  6019. {
  6020. "name": "workspace",
  6021. "in": "query",
  6022. "schema": {
  6023. "type": "string"
  6024. },
  6025. "required": false
  6026. }
  6027. ],
  6028. "responses": {
  6029. "204": {
  6030. "description": "Prompt accepted"
  6031. },
  6032. "400": {
  6033. "description": "Bad request",
  6034. "content": {
  6035. "application/json": {
  6036. "schema": {
  6037. "$ref": "#/components/schemas/BadRequestError"
  6038. }
  6039. }
  6040. }
  6041. },
  6042. "404": {
  6043. "description": "NotFoundError",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "$ref": "#/components/schemas/NotFoundError"
  6048. }
  6049. }
  6050. }
  6051. }
  6052. },
  6053. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6054. "summary": "Send async message",
  6055. "requestBody": {
  6056. "content": {
  6057. "application/json": {
  6058. "schema": {
  6059. "type": "object",
  6060. "properties": {
  6061. "messageID": {
  6062. "type": "string",
  6063. "pattern": "^msg"
  6064. },
  6065. "model": {
  6066. "type": "object",
  6067. "properties": {
  6068. "providerID": {
  6069. "type": "string"
  6070. },
  6071. "modelID": {
  6072. "type": "string"
  6073. }
  6074. },
  6075. "required": ["providerID", "modelID"],
  6076. "additionalProperties": false
  6077. },
  6078. "agent": {
  6079. "type": "string"
  6080. },
  6081. "noReply": {
  6082. "type": "boolean"
  6083. },
  6084. "tools": {
  6085. "type": "object",
  6086. "additionalProperties": {
  6087. "type": "boolean"
  6088. }
  6089. },
  6090. "format": {
  6091. "$ref": "#/components/schemas/OutputFormat"
  6092. },
  6093. "system": {
  6094. "type": "string"
  6095. },
  6096. "variant": {
  6097. "type": "string"
  6098. },
  6099. "parts": {
  6100. "type": "array",
  6101. "items": {
  6102. "anyOf": [
  6103. {
  6104. "$ref": "#/components/schemas/TextPartInput"
  6105. },
  6106. {
  6107. "$ref": "#/components/schemas/FilePartInput"
  6108. },
  6109. {
  6110. "$ref": "#/components/schemas/AgentPartInput"
  6111. },
  6112. {
  6113. "$ref": "#/components/schemas/SubtaskPartInput"
  6114. }
  6115. ]
  6116. }
  6117. }
  6118. },
  6119. "required": ["parts"],
  6120. "additionalProperties": false
  6121. }
  6122. }
  6123. }
  6124. },
  6125. "x-codeSamples": [
  6126. {
  6127. "lang": "js",
  6128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6129. }
  6130. ]
  6131. }
  6132. },
  6133. "/session/{sessionID}/command": {
  6134. "post": {
  6135. "tags": ["session"],
  6136. "operationId": "session.command",
  6137. "parameters": [
  6138. {
  6139. "name": "sessionID",
  6140. "in": "path",
  6141. "schema": {
  6142. "type": "string",
  6143. "pattern": "^ses"
  6144. },
  6145. "required": true
  6146. },
  6147. {
  6148. "name": "directory",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "workspace",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string"
  6160. },
  6161. "required": false
  6162. }
  6163. ],
  6164. "responses": {
  6165. "200": {
  6166. "description": "Created message",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "type": "object",
  6171. "required": ["info", "parts"],
  6172. "properties": {
  6173. "info": {
  6174. "$ref": "#/components/schemas/AssistantMessage"
  6175. },
  6176. "parts": {
  6177. "type": "array",
  6178. "items": {
  6179. "$ref": "#/components/schemas/Part"
  6180. }
  6181. }
  6182. }
  6183. }
  6184. }
  6185. }
  6186. },
  6187. "400": {
  6188. "description": "Bad request",
  6189. "content": {
  6190. "application/json": {
  6191. "schema": {
  6192. "$ref": "#/components/schemas/BadRequestError"
  6193. }
  6194. }
  6195. }
  6196. },
  6197. "404": {
  6198. "description": "NotFoundError",
  6199. "content": {
  6200. "application/json": {
  6201. "schema": {
  6202. "$ref": "#/components/schemas/NotFoundError"
  6203. }
  6204. }
  6205. }
  6206. }
  6207. },
  6208. "description": "Send a new command to a session for execution by the AI assistant.",
  6209. "summary": "Send command",
  6210. "requestBody": {
  6211. "content": {
  6212. "application/json": {
  6213. "schema": {
  6214. "type": "object",
  6215. "properties": {
  6216. "messageID": {
  6217. "type": "string",
  6218. "pattern": "^msg"
  6219. },
  6220. "agent": {
  6221. "type": "string"
  6222. },
  6223. "model": {
  6224. "type": "string"
  6225. },
  6226. "arguments": {
  6227. "type": "string"
  6228. },
  6229. "command": {
  6230. "type": "string"
  6231. },
  6232. "variant": {
  6233. "type": "string"
  6234. },
  6235. "parts": {
  6236. "type": "array",
  6237. "items": {
  6238. "type": "object",
  6239. "properties": {
  6240. "id": {
  6241. "type": "string",
  6242. "pattern": "^prt"
  6243. },
  6244. "type": {
  6245. "type": "string",
  6246. "enum": ["file"]
  6247. },
  6248. "mime": {
  6249. "type": "string"
  6250. },
  6251. "filename": {
  6252. "type": "string"
  6253. },
  6254. "url": {
  6255. "type": "string"
  6256. },
  6257. "source": {
  6258. "$ref": "#/components/schemas/FilePartSource"
  6259. }
  6260. },
  6261. "required": ["type", "mime", "url"],
  6262. "additionalProperties": false
  6263. }
  6264. }
  6265. },
  6266. "required": ["arguments", "command"],
  6267. "additionalProperties": false
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "x-codeSamples": [
  6273. {
  6274. "lang": "js",
  6275. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6276. }
  6277. ]
  6278. }
  6279. },
  6280. "/session/{sessionID}/shell": {
  6281. "post": {
  6282. "tags": ["session"],
  6283. "operationId": "session.shell",
  6284. "parameters": [
  6285. {
  6286. "name": "sessionID",
  6287. "in": "path",
  6288. "schema": {
  6289. "type": "string",
  6290. "pattern": "^ses"
  6291. },
  6292. "required": true
  6293. },
  6294. {
  6295. "name": "directory",
  6296. "in": "query",
  6297. "schema": {
  6298. "type": "string"
  6299. },
  6300. "required": false
  6301. },
  6302. {
  6303. "name": "workspace",
  6304. "in": "query",
  6305. "schema": {
  6306. "type": "string"
  6307. },
  6308. "required": false
  6309. }
  6310. ],
  6311. "responses": {
  6312. "200": {
  6313. "description": "Created message",
  6314. "content": {
  6315. "application/json": {
  6316. "schema": {
  6317. "type": "object",
  6318. "properties": {
  6319. "info": {
  6320. "$ref": "#/components/schemas/Message"
  6321. },
  6322. "parts": {
  6323. "type": "array",
  6324. "items": {
  6325. "$ref": "#/components/schemas/Part"
  6326. }
  6327. }
  6328. },
  6329. "required": ["info", "parts"],
  6330. "additionalProperties": false,
  6331. "description": "Created message"
  6332. }
  6333. }
  6334. }
  6335. },
  6336. "400": {
  6337. "description": "Bad request",
  6338. "content": {
  6339. "application/json": {
  6340. "schema": {
  6341. "$ref": "#/components/schemas/BadRequestError"
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "404": {
  6347. "description": "NotFoundError",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "$ref": "#/components/schemas/NotFoundError"
  6352. }
  6353. }
  6354. }
  6355. }
  6356. },
  6357. "description": "Execute a shell command within the session context and return the AI's response.",
  6358. "summary": "Run shell command",
  6359. "requestBody": {
  6360. "content": {
  6361. "application/json": {
  6362. "schema": {
  6363. "type": "object",
  6364. "properties": {
  6365. "messageID": {
  6366. "type": "string",
  6367. "pattern": "^msg"
  6368. },
  6369. "agent": {
  6370. "type": "string"
  6371. },
  6372. "model": {
  6373. "type": "object",
  6374. "properties": {
  6375. "providerID": {
  6376. "type": "string"
  6377. },
  6378. "modelID": {
  6379. "type": "string"
  6380. }
  6381. },
  6382. "required": ["providerID", "modelID"],
  6383. "additionalProperties": false
  6384. },
  6385. "command": {
  6386. "type": "string"
  6387. }
  6388. },
  6389. "required": ["agent", "command"],
  6390. "additionalProperties": false
  6391. }
  6392. }
  6393. }
  6394. },
  6395. "x-codeSamples": [
  6396. {
  6397. "lang": "js",
  6398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6399. }
  6400. ]
  6401. }
  6402. },
  6403. "/session/{sessionID}/revert": {
  6404. "post": {
  6405. "tags": ["session"],
  6406. "operationId": "session.revert",
  6407. "parameters": [
  6408. {
  6409. "name": "sessionID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^ses"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Updated session",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "$ref": "#/components/schemas/Session"
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "400": {
  6446. "description": "Bad request",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/BadRequestError"
  6451. }
  6452. }
  6453. }
  6454. },
  6455. "404": {
  6456. "description": "NotFoundError",
  6457. "content": {
  6458. "application/json": {
  6459. "schema": {
  6460. "$ref": "#/components/schemas/NotFoundError"
  6461. }
  6462. }
  6463. }
  6464. }
  6465. },
  6466. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6467. "summary": "Revert message",
  6468. "requestBody": {
  6469. "content": {
  6470. "application/json": {
  6471. "schema": {
  6472. "type": "object",
  6473. "properties": {
  6474. "messageID": {
  6475. "type": "string",
  6476. "pattern": "^msg"
  6477. },
  6478. "partID": {
  6479. "type": "string",
  6480. "pattern": "^prt"
  6481. }
  6482. },
  6483. "required": ["messageID"],
  6484. "additionalProperties": false
  6485. }
  6486. }
  6487. }
  6488. },
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6493. }
  6494. ]
  6495. }
  6496. },
  6497. "/session/{sessionID}/unrevert": {
  6498. "post": {
  6499. "tags": ["session"],
  6500. "operationId": "session.unrevert",
  6501. "parameters": [
  6502. {
  6503. "name": "sessionID",
  6504. "in": "path",
  6505. "schema": {
  6506. "type": "string",
  6507. "pattern": "^ses"
  6508. },
  6509. "required": true
  6510. },
  6511. {
  6512. "name": "directory",
  6513. "in": "query",
  6514. "schema": {
  6515. "type": "string"
  6516. },
  6517. "required": false
  6518. },
  6519. {
  6520. "name": "workspace",
  6521. "in": "query",
  6522. "schema": {
  6523. "type": "string"
  6524. },
  6525. "required": false
  6526. }
  6527. ],
  6528. "responses": {
  6529. "200": {
  6530. "description": "Updated session",
  6531. "content": {
  6532. "application/json": {
  6533. "schema": {
  6534. "$ref": "#/components/schemas/Session"
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "400": {
  6540. "description": "Bad request",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/BadRequestError"
  6545. }
  6546. }
  6547. }
  6548. },
  6549. "404": {
  6550. "description": "NotFoundError",
  6551. "content": {
  6552. "application/json": {
  6553. "schema": {
  6554. "$ref": "#/components/schemas/NotFoundError"
  6555. }
  6556. }
  6557. }
  6558. }
  6559. },
  6560. "description": "Restore all previously reverted messages in a session.",
  6561. "summary": "Restore reverted messages",
  6562. "x-codeSamples": [
  6563. {
  6564. "lang": "js",
  6565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6566. }
  6567. ]
  6568. }
  6569. },
  6570. "/session/{sessionID}/permissions/{permissionID}": {
  6571. "post": {
  6572. "tags": ["session"],
  6573. "operationId": "permission.respond",
  6574. "parameters": [
  6575. {
  6576. "name": "sessionID",
  6577. "in": "path",
  6578. "schema": {
  6579. "type": "string",
  6580. "pattern": "^ses"
  6581. },
  6582. "required": true
  6583. },
  6584. {
  6585. "name": "permissionID",
  6586. "in": "path",
  6587. "schema": {
  6588. "type": "string",
  6589. "pattern": "^per"
  6590. },
  6591. "required": true
  6592. },
  6593. {
  6594. "name": "directory",
  6595. "in": "query",
  6596. "schema": {
  6597. "type": "string"
  6598. },
  6599. "required": false
  6600. },
  6601. {
  6602. "name": "workspace",
  6603. "in": "query",
  6604. "schema": {
  6605. "type": "string"
  6606. },
  6607. "required": false
  6608. }
  6609. ],
  6610. "responses": {
  6611. "200": {
  6612. "description": "Permission processed successfully",
  6613. "content": {
  6614. "application/json": {
  6615. "schema": {
  6616. "type": "boolean",
  6617. "description": "Permission processed successfully"
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "400": {
  6623. "description": "Bad request",
  6624. "content": {
  6625. "application/json": {
  6626. "schema": {
  6627. "$ref": "#/components/schemas/BadRequestError"
  6628. }
  6629. }
  6630. }
  6631. },
  6632. "404": {
  6633. "description": "NotFoundError",
  6634. "content": {
  6635. "application/json": {
  6636. "schema": {
  6637. "$ref": "#/components/schemas/NotFoundError"
  6638. }
  6639. }
  6640. }
  6641. }
  6642. },
  6643. "description": "Approve or deny a permission request from the AI assistant.",
  6644. "summary": "Respond to permission",
  6645. "deprecated": true,
  6646. "requestBody": {
  6647. "content": {
  6648. "application/json": {
  6649. "schema": {
  6650. "type": "object",
  6651. "properties": {
  6652. "response": {
  6653. "type": "string",
  6654. "enum": ["once", "always", "reject"]
  6655. }
  6656. },
  6657. "required": ["response"],
  6658. "additionalProperties": false
  6659. }
  6660. }
  6661. }
  6662. },
  6663. "x-codeSamples": [
  6664. {
  6665. "lang": "js",
  6666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6667. }
  6668. ]
  6669. }
  6670. },
  6671. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6672. "delete": {
  6673. "tags": ["session"],
  6674. "operationId": "part.delete",
  6675. "parameters": [
  6676. {
  6677. "name": "sessionID",
  6678. "in": "path",
  6679. "schema": {
  6680. "type": "string",
  6681. "pattern": "^ses"
  6682. },
  6683. "required": true
  6684. },
  6685. {
  6686. "name": "messageID",
  6687. "in": "path",
  6688. "schema": {
  6689. "type": "string",
  6690. "pattern": "^msg"
  6691. },
  6692. "required": true
  6693. },
  6694. {
  6695. "name": "partID",
  6696. "in": "path",
  6697. "schema": {
  6698. "type": "string",
  6699. "pattern": "^prt"
  6700. },
  6701. "required": true
  6702. },
  6703. {
  6704. "name": "directory",
  6705. "in": "query",
  6706. "schema": {
  6707. "type": "string"
  6708. },
  6709. "required": false
  6710. },
  6711. {
  6712. "name": "workspace",
  6713. "in": "query",
  6714. "schema": {
  6715. "type": "string"
  6716. },
  6717. "required": false
  6718. }
  6719. ],
  6720. "responses": {
  6721. "200": {
  6722. "description": "Successfully deleted part",
  6723. "content": {
  6724. "application/json": {
  6725. "schema": {
  6726. "type": "boolean",
  6727. "description": "Successfully deleted part"
  6728. }
  6729. }
  6730. }
  6731. },
  6732. "400": {
  6733. "description": "Bad request",
  6734. "content": {
  6735. "application/json": {
  6736. "schema": {
  6737. "$ref": "#/components/schemas/BadRequestError"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "404": {
  6743. "description": "NotFoundError",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "$ref": "#/components/schemas/NotFoundError"
  6748. }
  6749. }
  6750. }
  6751. }
  6752. },
  6753. "description": "Delete a part from a message.",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6758. }
  6759. ]
  6760. },
  6761. "patch": {
  6762. "tags": ["session"],
  6763. "operationId": "part.update",
  6764. "parameters": [
  6765. {
  6766. "name": "sessionID",
  6767. "in": "path",
  6768. "schema": {
  6769. "type": "string",
  6770. "pattern": "^ses"
  6771. },
  6772. "required": true
  6773. },
  6774. {
  6775. "name": "messageID",
  6776. "in": "path",
  6777. "schema": {
  6778. "type": "string",
  6779. "pattern": "^msg"
  6780. },
  6781. "required": true
  6782. },
  6783. {
  6784. "name": "partID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^prt"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "Successfully updated part",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "$ref": "#/components/schemas/Part"
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "400": {
  6821. "description": "Bad request",
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/BadRequestError"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "404": {
  6831. "description": "NotFoundError",
  6832. "content": {
  6833. "application/json": {
  6834. "schema": {
  6835. "$ref": "#/components/schemas/NotFoundError"
  6836. }
  6837. }
  6838. }
  6839. }
  6840. },
  6841. "description": "Update a part in a message.",
  6842. "requestBody": {
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "$ref": "#/components/schemas/Part"
  6847. }
  6848. }
  6849. }
  6850. },
  6851. "x-codeSamples": [
  6852. {
  6853. "lang": "js",
  6854. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6855. }
  6856. ]
  6857. }
  6858. },
  6859. "/sync/start": {
  6860. "post": {
  6861. "tags": ["sync"],
  6862. "operationId": "sync.start",
  6863. "parameters": [
  6864. {
  6865. "name": "directory",
  6866. "in": "query",
  6867. "schema": {
  6868. "type": "string"
  6869. },
  6870. "required": false
  6871. },
  6872. {
  6873. "name": "workspace",
  6874. "in": "query",
  6875. "schema": {
  6876. "type": "string"
  6877. },
  6878. "required": false
  6879. }
  6880. ],
  6881. "responses": {
  6882. "200": {
  6883. "description": "Workspace sync started",
  6884. "content": {
  6885. "application/json": {
  6886. "schema": {
  6887. "type": "boolean",
  6888. "description": "Workspace sync started"
  6889. }
  6890. }
  6891. }
  6892. }
  6893. },
  6894. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6895. "summary": "Start workspace sync",
  6896. "x-codeSamples": [
  6897. {
  6898. "lang": "js",
  6899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6900. }
  6901. ]
  6902. }
  6903. },
  6904. "/sync/replay": {
  6905. "post": {
  6906. "tags": ["sync"],
  6907. "operationId": "sync.replay",
  6908. "parameters": [
  6909. {
  6910. "name": "directory",
  6911. "in": "query",
  6912. "schema": {
  6913. "type": "string"
  6914. },
  6915. "required": false
  6916. },
  6917. {
  6918. "name": "workspace",
  6919. "in": "query",
  6920. "schema": {
  6921. "type": "string"
  6922. },
  6923. "required": false
  6924. }
  6925. ],
  6926. "responses": {
  6927. "200": {
  6928. "description": "Replayed sync events",
  6929. "content": {
  6930. "application/json": {
  6931. "schema": {
  6932. "type": "object",
  6933. "properties": {
  6934. "sessionID": {
  6935. "type": "string"
  6936. }
  6937. },
  6938. "required": ["sessionID"],
  6939. "additionalProperties": false,
  6940. "description": "Replayed sync events"
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "400": {
  6946. "description": "Bad request",
  6947. "content": {
  6948. "application/json": {
  6949. "schema": {
  6950. "$ref": "#/components/schemas/BadRequestError"
  6951. }
  6952. }
  6953. }
  6954. }
  6955. },
  6956. "description": "Validate and replay a complete sync event history.",
  6957. "summary": "Replay sync events",
  6958. "requestBody": {
  6959. "content": {
  6960. "application/json": {
  6961. "schema": {
  6962. "type": "object",
  6963. "properties": {
  6964. "directory": {
  6965. "type": "string"
  6966. },
  6967. "events": {
  6968. "type": "array",
  6969. "minItems": 1,
  6970. "items": {
  6971. "type": "object",
  6972. "properties": {
  6973. "id": {
  6974. "type": "string"
  6975. },
  6976. "aggregateID": {
  6977. "type": "string"
  6978. },
  6979. "seq": {
  6980. "type": "integer",
  6981. "minimum": 0
  6982. },
  6983. "type": {
  6984. "type": "string"
  6985. },
  6986. "data": {
  6987. "type": "object"
  6988. }
  6989. },
  6990. "required": ["id", "aggregateID", "seq", "type", "data"],
  6991. "additionalProperties": false
  6992. }
  6993. }
  6994. },
  6995. "required": ["directory", "events"],
  6996. "additionalProperties": false
  6997. }
  6998. }
  6999. }
  7000. },
  7001. "x-codeSamples": [
  7002. {
  7003. "lang": "js",
  7004. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7005. }
  7006. ]
  7007. }
  7008. },
  7009. "/sync/steal": {
  7010. "post": {
  7011. "tags": ["sync"],
  7012. "operationId": "sync.steal",
  7013. "parameters": [
  7014. {
  7015. "name": "directory",
  7016. "in": "query",
  7017. "schema": {
  7018. "type": "string"
  7019. },
  7020. "required": false
  7021. },
  7022. {
  7023. "name": "workspace",
  7024. "in": "query",
  7025. "schema": {
  7026. "type": "string"
  7027. },
  7028. "required": false
  7029. }
  7030. ],
  7031. "responses": {
  7032. "200": {
  7033. "description": "Session stolen into workspace",
  7034. "content": {
  7035. "application/json": {
  7036. "schema": {
  7037. "type": "object",
  7038. "properties": {
  7039. "sessionID": {
  7040. "type": "string",
  7041. "pattern": "^ses"
  7042. }
  7043. },
  7044. "required": ["sessionID"],
  7045. "additionalProperties": false,
  7046. "description": "Session stolen into workspace"
  7047. }
  7048. }
  7049. }
  7050. },
  7051. "400": {
  7052. "description": "Bad request",
  7053. "content": {
  7054. "application/json": {
  7055. "schema": {
  7056. "$ref": "#/components/schemas/BadRequestError"
  7057. }
  7058. }
  7059. }
  7060. }
  7061. },
  7062. "description": "Update a session to belong to the current workspace through the sync event system.",
  7063. "summary": "Steal session into workspace",
  7064. "requestBody": {
  7065. "content": {
  7066. "application/json": {
  7067. "schema": {
  7068. "type": "object",
  7069. "properties": {
  7070. "sessionID": {
  7071. "type": "string",
  7072. "pattern": "^ses"
  7073. }
  7074. },
  7075. "required": ["sessionID"],
  7076. "additionalProperties": false
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "x-codeSamples": [
  7082. {
  7083. "lang": "js",
  7084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7085. }
  7086. ]
  7087. }
  7088. },
  7089. "/sync/history": {
  7090. "post": {
  7091. "tags": ["sync"],
  7092. "operationId": "sync.history.list",
  7093. "parameters": [
  7094. {
  7095. "name": "directory",
  7096. "in": "query",
  7097. "schema": {
  7098. "type": "string"
  7099. },
  7100. "required": false
  7101. },
  7102. {
  7103. "name": "workspace",
  7104. "in": "query",
  7105. "schema": {
  7106. "type": "string"
  7107. },
  7108. "required": false
  7109. }
  7110. ],
  7111. "responses": {
  7112. "200": {
  7113. "description": "Sync events",
  7114. "content": {
  7115. "application/json": {
  7116. "schema": {
  7117. "type": "array",
  7118. "items": {
  7119. "type": "object",
  7120. "properties": {
  7121. "id": {
  7122. "type": "string"
  7123. },
  7124. "aggregate_id": {
  7125. "type": "string"
  7126. },
  7127. "seq": {
  7128. "type": "integer",
  7129. "minimum": 0
  7130. },
  7131. "type": {
  7132. "type": "string"
  7133. },
  7134. "data": {
  7135. "type": "object"
  7136. }
  7137. },
  7138. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7139. "additionalProperties": false
  7140. },
  7141. "description": "Sync events"
  7142. }
  7143. }
  7144. }
  7145. },
  7146. "400": {
  7147. "description": "Bad request",
  7148. "content": {
  7149. "application/json": {
  7150. "schema": {
  7151. "$ref": "#/components/schemas/BadRequestError"
  7152. }
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  7158. "summary": "List sync events",
  7159. "requestBody": {
  7160. "content": {
  7161. "application/json": {
  7162. "schema": {
  7163. "type": "object",
  7164. "additionalProperties": {
  7165. "type": "integer",
  7166. "minimum": 0
  7167. }
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "x-codeSamples": [
  7173. {
  7174. "lang": "js",
  7175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7176. }
  7177. ]
  7178. }
  7179. },
  7180. "/api/session": {
  7181. "get": {
  7182. "tags": ["v2"],
  7183. "operationId": "v2.session.list",
  7184. "parameters": [
  7185. {
  7186. "name": "directory",
  7187. "in": "query",
  7188. "schema": {
  7189. "type": "string"
  7190. },
  7191. "required": false
  7192. },
  7193. {
  7194. "name": "workspace",
  7195. "in": "query",
  7196. "schema": {
  7197. "type": "string"
  7198. },
  7199. "required": false
  7200. },
  7201. {
  7202. "name": "limit",
  7203. "in": "query",
  7204. "schema": {
  7205. "type": "number"
  7206. },
  7207. "required": false
  7208. },
  7209. {
  7210. "name": "order",
  7211. "in": "query",
  7212. "schema": {
  7213. "type": "string",
  7214. "enum": ["asc", "desc"]
  7215. },
  7216. "required": false
  7217. },
  7218. {
  7219. "name": "path",
  7220. "in": "query",
  7221. "schema": {
  7222. "type": "string"
  7223. },
  7224. "required": false
  7225. },
  7226. {
  7227. "name": "roots",
  7228. "in": "query",
  7229. "schema": {
  7230. "anyOf": [
  7231. {
  7232. "type": "boolean"
  7233. },
  7234. {
  7235. "type": "string",
  7236. "enum": ["true", "false"]
  7237. }
  7238. ]
  7239. },
  7240. "required": false
  7241. },
  7242. {
  7243. "name": "start",
  7244. "in": "query",
  7245. "schema": {
  7246. "type": "number"
  7247. },
  7248. "required": false
  7249. },
  7250. {
  7251. "name": "search",
  7252. "in": "query",
  7253. "schema": {
  7254. "type": "string"
  7255. },
  7256. "required": false
  7257. },
  7258. {
  7259. "name": "cursor",
  7260. "in": "query",
  7261. "schema": {
  7262. "type": "string",
  7263. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7264. },
  7265. "required": false
  7266. }
  7267. ],
  7268. "security": [],
  7269. "responses": {
  7270. "200": {
  7271. "description": "V2SessionsResponse",
  7272. "content": {
  7273. "application/json": {
  7274. "schema": {
  7275. "$ref": "#/components/schemas/V2SessionsResponse"
  7276. }
  7277. }
  7278. }
  7279. },
  7280. "400": {
  7281. "description": "BadRequest",
  7282. "content": {
  7283. "application/json": {
  7284. "schema": {
  7285. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7286. }
  7287. }
  7288. }
  7289. },
  7290. "401": {
  7291. "description": "Unauthorized"
  7292. }
  7293. },
  7294. "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.",
  7295. "summary": "List v2 sessions",
  7296. "x-codeSamples": [
  7297. {
  7298. "lang": "js",
  7299. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7300. }
  7301. ]
  7302. }
  7303. },
  7304. "/api/session/{sessionID}/prompt": {
  7305. "post": {
  7306. "tags": ["v2"],
  7307. "operationId": "v2.session.prompt",
  7308. "parameters": [
  7309. {
  7310. "name": "sessionID",
  7311. "in": "path",
  7312. "schema": {
  7313. "type": "string",
  7314. "pattern": "^ses"
  7315. },
  7316. "required": true
  7317. },
  7318. {
  7319. "name": "directory",
  7320. "in": "query",
  7321. "schema": {
  7322. "type": "string"
  7323. },
  7324. "required": false
  7325. },
  7326. {
  7327. "name": "workspace",
  7328. "in": "query",
  7329. "schema": {
  7330. "type": "string"
  7331. },
  7332. "required": false
  7333. }
  7334. ],
  7335. "security": [],
  7336. "responses": {
  7337. "200": {
  7338. "description": "Session.Message",
  7339. "content": {
  7340. "application/json": {
  7341. "schema": {
  7342. "$ref": "#/components/schemas/SessionMessage"
  7343. }
  7344. }
  7345. }
  7346. },
  7347. "401": {
  7348. "description": "Unauthorized"
  7349. }
  7350. },
  7351. "description": "Create a v2 session message and queue it for the agent loop.",
  7352. "summary": "Send v2 message",
  7353. "requestBody": {
  7354. "content": {
  7355. "application/json": {
  7356. "schema": {
  7357. "type": "object",
  7358. "properties": {
  7359. "prompt": {
  7360. "$ref": "#/components/schemas/Prompt"
  7361. },
  7362. "delivery": {
  7363. "$ref": "#/components/schemas/SessionDelivery"
  7364. }
  7365. },
  7366. "required": ["prompt"],
  7367. "additionalProperties": false
  7368. }
  7369. }
  7370. }
  7371. },
  7372. "x-codeSamples": [
  7373. {
  7374. "lang": "js",
  7375. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7376. }
  7377. ]
  7378. }
  7379. },
  7380. "/api/session/{sessionID}/compact": {
  7381. "post": {
  7382. "tags": ["v2"],
  7383. "operationId": "v2.session.compact",
  7384. "parameters": [
  7385. {
  7386. "name": "sessionID",
  7387. "in": "path",
  7388. "schema": {
  7389. "type": "string",
  7390. "pattern": "^ses"
  7391. },
  7392. "required": true
  7393. },
  7394. {
  7395. "name": "directory",
  7396. "in": "query",
  7397. "schema": {
  7398. "type": "string"
  7399. },
  7400. "required": false
  7401. },
  7402. {
  7403. "name": "workspace",
  7404. "in": "query",
  7405. "schema": {
  7406. "type": "string"
  7407. },
  7408. "required": false
  7409. }
  7410. ],
  7411. "security": [],
  7412. "responses": {
  7413. "204": {
  7414. "description": "<No Content>"
  7415. },
  7416. "401": {
  7417. "description": "Unauthorized"
  7418. }
  7419. },
  7420. "description": "Compact a v2 session conversation.",
  7421. "summary": "Compact v2 session",
  7422. "x-codeSamples": [
  7423. {
  7424. "lang": "js",
  7425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7426. }
  7427. ]
  7428. }
  7429. },
  7430. "/api/session/{sessionID}/wait": {
  7431. "post": {
  7432. "tags": ["v2"],
  7433. "operationId": "v2.session.wait",
  7434. "parameters": [
  7435. {
  7436. "name": "sessionID",
  7437. "in": "path",
  7438. "schema": {
  7439. "type": "string",
  7440. "pattern": "^ses"
  7441. },
  7442. "required": true
  7443. },
  7444. {
  7445. "name": "directory",
  7446. "in": "query",
  7447. "schema": {
  7448. "type": "string"
  7449. },
  7450. "required": false
  7451. },
  7452. {
  7453. "name": "workspace",
  7454. "in": "query",
  7455. "schema": {
  7456. "type": "string"
  7457. },
  7458. "required": false
  7459. }
  7460. ],
  7461. "security": [],
  7462. "responses": {
  7463. "204": {
  7464. "description": "<No Content>"
  7465. },
  7466. "401": {
  7467. "description": "Unauthorized"
  7468. }
  7469. },
  7470. "description": "Wait for a v2 session agent loop to become idle.",
  7471. "summary": "Wait for v2 session",
  7472. "x-codeSamples": [
  7473. {
  7474. "lang": "js",
  7475. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7476. }
  7477. ]
  7478. }
  7479. },
  7480. "/api/session/{sessionID}/context": {
  7481. "get": {
  7482. "tags": ["v2"],
  7483. "operationId": "v2.session.context",
  7484. "parameters": [
  7485. {
  7486. "name": "sessionID",
  7487. "in": "path",
  7488. "schema": {
  7489. "type": "string",
  7490. "pattern": "^ses"
  7491. },
  7492. "required": true
  7493. },
  7494. {
  7495. "name": "directory",
  7496. "in": "query",
  7497. "schema": {
  7498. "type": "string"
  7499. },
  7500. "required": false
  7501. },
  7502. {
  7503. "name": "workspace",
  7504. "in": "query",
  7505. "schema": {
  7506. "type": "string"
  7507. },
  7508. "required": false
  7509. }
  7510. ],
  7511. "security": [],
  7512. "responses": {
  7513. "200": {
  7514. "description": "Success",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "type": "array",
  7519. "items": {
  7520. "$ref": "#/components/schemas/SessionMessage"
  7521. }
  7522. }
  7523. }
  7524. }
  7525. },
  7526. "401": {
  7527. "description": "Unauthorized"
  7528. }
  7529. },
  7530. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7531. "summary": "Get v2 session context",
  7532. "x-codeSamples": [
  7533. {
  7534. "lang": "js",
  7535. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7536. }
  7537. ]
  7538. }
  7539. },
  7540. "/api/session/{sessionID}/message": {
  7541. "get": {
  7542. "tags": ["v2 messages"],
  7543. "operationId": "v2.session.messages",
  7544. "parameters": [
  7545. {
  7546. "name": "sessionID",
  7547. "in": "path",
  7548. "schema": {
  7549. "type": "string",
  7550. "pattern": "^ses"
  7551. },
  7552. "required": true
  7553. },
  7554. {
  7555. "name": "directory",
  7556. "in": "query",
  7557. "schema": {
  7558. "type": "string"
  7559. },
  7560. "required": false
  7561. },
  7562. {
  7563. "name": "workspace",
  7564. "in": "query",
  7565. "schema": {
  7566. "type": "string"
  7567. },
  7568. "required": false
  7569. },
  7570. {
  7571. "name": "limit",
  7572. "in": "query",
  7573. "schema": {
  7574. "type": "number"
  7575. },
  7576. "required": false
  7577. },
  7578. {
  7579. "name": "order",
  7580. "in": "query",
  7581. "schema": {
  7582. "type": "string",
  7583. "enum": ["asc", "desc"]
  7584. },
  7585. "required": false
  7586. },
  7587. {
  7588. "name": "cursor",
  7589. "in": "query",
  7590. "schema": {
  7591. "type": "string",
  7592. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7593. },
  7594. "required": false
  7595. }
  7596. ],
  7597. "security": [],
  7598. "responses": {
  7599. "200": {
  7600. "description": "V2SessionMessagesResponse",
  7601. "content": {
  7602. "application/json": {
  7603. "schema": {
  7604. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7605. }
  7606. }
  7607. }
  7608. },
  7609. "400": {
  7610. "description": "BadRequest",
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "401": {
  7620. "description": "Unauthorized"
  7621. }
  7622. },
  7623. "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.",
  7624. "summary": "Get v2 session messages",
  7625. "x-codeSamples": [
  7626. {
  7627. "lang": "js",
  7628. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7629. }
  7630. ]
  7631. }
  7632. },
  7633. "/api/model": {
  7634. "get": {
  7635. "tags": ["v2 models"],
  7636. "operationId": "v2.model.list",
  7637. "parameters": [
  7638. {
  7639. "name": "location",
  7640. "in": "query",
  7641. "schema": {
  7642. "type": "object",
  7643. "properties": {
  7644. "directory": {
  7645. "type": "string"
  7646. },
  7647. "workspace": {
  7648. "type": "string"
  7649. }
  7650. },
  7651. "additionalProperties": false
  7652. },
  7653. "required": false,
  7654. "style": "deepObject",
  7655. "explode": true
  7656. }
  7657. ],
  7658. "security": [],
  7659. "responses": {
  7660. "200": {
  7661. "description": "Success",
  7662. "content": {
  7663. "application/json": {
  7664. "schema": {
  7665. "type": "array",
  7666. "items": {
  7667. "$ref": "#/components/schemas/ModelV2Info"
  7668. }
  7669. }
  7670. }
  7671. }
  7672. },
  7673. "401": {
  7674. "description": "Unauthorized"
  7675. }
  7676. },
  7677. "description": "Retrieve available v2 models ordered by release date.",
  7678. "summary": "List v2 models",
  7679. "x-codeSamples": [
  7680. {
  7681. "lang": "js",
  7682. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  7683. }
  7684. ]
  7685. }
  7686. },
  7687. "/api/provider": {
  7688. "get": {
  7689. "tags": ["v2 providers"],
  7690. "operationId": "v2.provider.list",
  7691. "parameters": [
  7692. {
  7693. "name": "location",
  7694. "in": "query",
  7695. "schema": {
  7696. "type": "object",
  7697. "properties": {
  7698. "directory": {
  7699. "type": "string"
  7700. },
  7701. "workspace": {
  7702. "type": "string"
  7703. }
  7704. },
  7705. "additionalProperties": false
  7706. },
  7707. "required": false,
  7708. "style": "deepObject",
  7709. "explode": true
  7710. }
  7711. ],
  7712. "security": [],
  7713. "responses": {
  7714. "200": {
  7715. "description": "Success",
  7716. "content": {
  7717. "application/json": {
  7718. "schema": {
  7719. "type": "array",
  7720. "items": {
  7721. "$ref": "#/components/schemas/ProviderV2Info"
  7722. }
  7723. }
  7724. }
  7725. }
  7726. },
  7727. "401": {
  7728. "description": "Unauthorized"
  7729. }
  7730. },
  7731. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  7732. "summary": "List v2 providers",
  7733. "x-codeSamples": [
  7734. {
  7735. "lang": "js",
  7736. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  7737. }
  7738. ]
  7739. }
  7740. },
  7741. "/api/provider/{providerID}": {
  7742. "get": {
  7743. "tags": ["v2 providers"],
  7744. "operationId": "v2.provider.get",
  7745. "parameters": [
  7746. {
  7747. "name": "providerID",
  7748. "in": "path",
  7749. "schema": {
  7750. "type": "string"
  7751. },
  7752. "required": true
  7753. },
  7754. {
  7755. "name": "location",
  7756. "in": "query",
  7757. "schema": {
  7758. "type": "object",
  7759. "properties": {
  7760. "directory": {
  7761. "type": "string"
  7762. },
  7763. "workspace": {
  7764. "type": "string"
  7765. }
  7766. },
  7767. "additionalProperties": false
  7768. },
  7769. "required": false,
  7770. "style": "deepObject",
  7771. "explode": true
  7772. }
  7773. ],
  7774. "security": [],
  7775. "responses": {
  7776. "200": {
  7777. "description": "ProviderV2.Info",
  7778. "content": {
  7779. "application/json": {
  7780. "schema": {
  7781. "$ref": "#/components/schemas/ProviderV2Info"
  7782. }
  7783. }
  7784. }
  7785. },
  7786. "401": {
  7787. "description": "Unauthorized"
  7788. },
  7789. "404": {
  7790. "description": "NotFoundError",
  7791. "content": {
  7792. "application/json": {
  7793. "schema": {
  7794. "$ref": "#/components/schemas/NotFoundError"
  7795. }
  7796. }
  7797. }
  7798. }
  7799. },
  7800. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  7801. "summary": "Get v2 provider",
  7802. "x-codeSamples": [
  7803. {
  7804. "lang": "js",
  7805. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  7806. }
  7807. ]
  7808. }
  7809. },
  7810. "/tui/append-prompt": {
  7811. "post": {
  7812. "tags": ["tui"],
  7813. "operationId": "tui.appendPrompt",
  7814. "parameters": [
  7815. {
  7816. "name": "directory",
  7817. "in": "query",
  7818. "schema": {
  7819. "type": "string"
  7820. },
  7821. "required": false
  7822. },
  7823. {
  7824. "name": "workspace",
  7825. "in": "query",
  7826. "schema": {
  7827. "type": "string"
  7828. },
  7829. "required": false
  7830. }
  7831. ],
  7832. "responses": {
  7833. "200": {
  7834. "description": "Prompt processed successfully",
  7835. "content": {
  7836. "application/json": {
  7837. "schema": {
  7838. "type": "boolean",
  7839. "description": "Prompt processed successfully"
  7840. }
  7841. }
  7842. }
  7843. },
  7844. "400": {
  7845. "description": "Bad request",
  7846. "content": {
  7847. "application/json": {
  7848. "schema": {
  7849. "$ref": "#/components/schemas/BadRequestError"
  7850. }
  7851. }
  7852. }
  7853. }
  7854. },
  7855. "description": "Append prompt to the TUI.",
  7856. "summary": "Append TUI prompt",
  7857. "requestBody": {
  7858. "content": {
  7859. "application/json": {
  7860. "schema": {
  7861. "type": "object",
  7862. "properties": {
  7863. "text": {
  7864. "type": "string"
  7865. }
  7866. },
  7867. "required": ["text"],
  7868. "additionalProperties": false
  7869. }
  7870. }
  7871. }
  7872. },
  7873. "x-codeSamples": [
  7874. {
  7875. "lang": "js",
  7876. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7877. }
  7878. ]
  7879. }
  7880. },
  7881. "/tui/open-help": {
  7882. "post": {
  7883. "tags": ["tui"],
  7884. "operationId": "tui.openHelp",
  7885. "parameters": [
  7886. {
  7887. "name": "directory",
  7888. "in": "query",
  7889. "schema": {
  7890. "type": "string"
  7891. },
  7892. "required": false
  7893. },
  7894. {
  7895. "name": "workspace",
  7896. "in": "query",
  7897. "schema": {
  7898. "type": "string"
  7899. },
  7900. "required": false
  7901. }
  7902. ],
  7903. "responses": {
  7904. "200": {
  7905. "description": "Help dialog opened successfully",
  7906. "content": {
  7907. "application/json": {
  7908. "schema": {
  7909. "type": "boolean",
  7910. "description": "Help dialog opened successfully"
  7911. }
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "description": "Open the help dialog in the TUI to display user assistance information.",
  7917. "summary": "Open help dialog",
  7918. "x-codeSamples": [
  7919. {
  7920. "lang": "js",
  7921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7922. }
  7923. ]
  7924. }
  7925. },
  7926. "/tui/open-sessions": {
  7927. "post": {
  7928. "tags": ["tui"],
  7929. "operationId": "tui.openSessions",
  7930. "parameters": [
  7931. {
  7932. "name": "directory",
  7933. "in": "query",
  7934. "schema": {
  7935. "type": "string"
  7936. },
  7937. "required": false
  7938. },
  7939. {
  7940. "name": "workspace",
  7941. "in": "query",
  7942. "schema": {
  7943. "type": "string"
  7944. },
  7945. "required": false
  7946. }
  7947. ],
  7948. "responses": {
  7949. "200": {
  7950. "description": "Session dialog opened successfully",
  7951. "content": {
  7952. "application/json": {
  7953. "schema": {
  7954. "type": "boolean",
  7955. "description": "Session dialog opened successfully"
  7956. }
  7957. }
  7958. }
  7959. }
  7960. },
  7961. "description": "Open the session dialog.",
  7962. "summary": "Open sessions dialog",
  7963. "x-codeSamples": [
  7964. {
  7965. "lang": "js",
  7966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7967. }
  7968. ]
  7969. }
  7970. },
  7971. "/tui/open-themes": {
  7972. "post": {
  7973. "tags": ["tui"],
  7974. "operationId": "tui.openThemes",
  7975. "parameters": [
  7976. {
  7977. "name": "directory",
  7978. "in": "query",
  7979. "schema": {
  7980. "type": "string"
  7981. },
  7982. "required": false
  7983. },
  7984. {
  7985. "name": "workspace",
  7986. "in": "query",
  7987. "schema": {
  7988. "type": "string"
  7989. },
  7990. "required": false
  7991. }
  7992. ],
  7993. "responses": {
  7994. "200": {
  7995. "description": "Theme dialog opened successfully",
  7996. "content": {
  7997. "application/json": {
  7998. "schema": {
  7999. "type": "boolean",
  8000. "description": "Theme dialog opened successfully"
  8001. }
  8002. }
  8003. }
  8004. }
  8005. },
  8006. "description": "Open the theme dialog.",
  8007. "summary": "Open themes dialog",
  8008. "x-codeSamples": [
  8009. {
  8010. "lang": "js",
  8011. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8012. }
  8013. ]
  8014. }
  8015. },
  8016. "/tui/open-models": {
  8017. "post": {
  8018. "tags": ["tui"],
  8019. "operationId": "tui.openModels",
  8020. "parameters": [
  8021. {
  8022. "name": "directory",
  8023. "in": "query",
  8024. "schema": {
  8025. "type": "string"
  8026. },
  8027. "required": false
  8028. },
  8029. {
  8030. "name": "workspace",
  8031. "in": "query",
  8032. "schema": {
  8033. "type": "string"
  8034. },
  8035. "required": false
  8036. }
  8037. ],
  8038. "responses": {
  8039. "200": {
  8040. "description": "Model dialog opened successfully",
  8041. "content": {
  8042. "application/json": {
  8043. "schema": {
  8044. "type": "boolean",
  8045. "description": "Model dialog opened successfully"
  8046. }
  8047. }
  8048. }
  8049. }
  8050. },
  8051. "description": "Open the model dialog.",
  8052. "summary": "Open models dialog",
  8053. "x-codeSamples": [
  8054. {
  8055. "lang": "js",
  8056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8057. }
  8058. ]
  8059. }
  8060. },
  8061. "/tui/submit-prompt": {
  8062. "post": {
  8063. "tags": ["tui"],
  8064. "operationId": "tui.submitPrompt",
  8065. "parameters": [
  8066. {
  8067. "name": "directory",
  8068. "in": "query",
  8069. "schema": {
  8070. "type": "string"
  8071. },
  8072. "required": false
  8073. },
  8074. {
  8075. "name": "workspace",
  8076. "in": "query",
  8077. "schema": {
  8078. "type": "string"
  8079. },
  8080. "required": false
  8081. }
  8082. ],
  8083. "responses": {
  8084. "200": {
  8085. "description": "Prompt submitted successfully",
  8086. "content": {
  8087. "application/json": {
  8088. "schema": {
  8089. "type": "boolean",
  8090. "description": "Prompt submitted successfully"
  8091. }
  8092. }
  8093. }
  8094. }
  8095. },
  8096. "description": "Submit the prompt.",
  8097. "summary": "Submit TUI prompt",
  8098. "x-codeSamples": [
  8099. {
  8100. "lang": "js",
  8101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8102. }
  8103. ]
  8104. }
  8105. },
  8106. "/tui/clear-prompt": {
  8107. "post": {
  8108. "tags": ["tui"],
  8109. "operationId": "tui.clearPrompt",
  8110. "parameters": [
  8111. {
  8112. "name": "directory",
  8113. "in": "query",
  8114. "schema": {
  8115. "type": "string"
  8116. },
  8117. "required": false
  8118. },
  8119. {
  8120. "name": "workspace",
  8121. "in": "query",
  8122. "schema": {
  8123. "type": "string"
  8124. },
  8125. "required": false
  8126. }
  8127. ],
  8128. "responses": {
  8129. "200": {
  8130. "description": "Prompt cleared successfully",
  8131. "content": {
  8132. "application/json": {
  8133. "schema": {
  8134. "type": "boolean",
  8135. "description": "Prompt cleared successfully"
  8136. }
  8137. }
  8138. }
  8139. }
  8140. },
  8141. "description": "Clear the prompt.",
  8142. "summary": "Clear TUI prompt",
  8143. "x-codeSamples": [
  8144. {
  8145. "lang": "js",
  8146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8147. }
  8148. ]
  8149. }
  8150. },
  8151. "/tui/execute-command": {
  8152. "post": {
  8153. "tags": ["tui"],
  8154. "operationId": "tui.executeCommand",
  8155. "parameters": [
  8156. {
  8157. "name": "directory",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. },
  8164. {
  8165. "name": "workspace",
  8166. "in": "query",
  8167. "schema": {
  8168. "type": "string"
  8169. },
  8170. "required": false
  8171. }
  8172. ],
  8173. "responses": {
  8174. "200": {
  8175. "description": "Command executed successfully",
  8176. "content": {
  8177. "application/json": {
  8178. "schema": {
  8179. "type": "boolean",
  8180. "description": "Command executed successfully"
  8181. }
  8182. }
  8183. }
  8184. },
  8185. "400": {
  8186. "description": "Bad request",
  8187. "content": {
  8188. "application/json": {
  8189. "schema": {
  8190. "$ref": "#/components/schemas/BadRequestError"
  8191. }
  8192. }
  8193. }
  8194. }
  8195. },
  8196. "description": "Execute a TUI command.",
  8197. "summary": "Execute TUI command",
  8198. "requestBody": {
  8199. "content": {
  8200. "application/json": {
  8201. "schema": {
  8202. "type": "object",
  8203. "properties": {
  8204. "command": {
  8205. "type": "string"
  8206. }
  8207. },
  8208. "required": ["command"],
  8209. "additionalProperties": false
  8210. }
  8211. }
  8212. }
  8213. },
  8214. "x-codeSamples": [
  8215. {
  8216. "lang": "js",
  8217. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8218. }
  8219. ]
  8220. }
  8221. },
  8222. "/tui/show-toast": {
  8223. "post": {
  8224. "tags": ["tui"],
  8225. "operationId": "tui.showToast",
  8226. "parameters": [
  8227. {
  8228. "name": "directory",
  8229. "in": "query",
  8230. "schema": {
  8231. "type": "string"
  8232. },
  8233. "required": false
  8234. },
  8235. {
  8236. "name": "workspace",
  8237. "in": "query",
  8238. "schema": {
  8239. "type": "string"
  8240. },
  8241. "required": false
  8242. }
  8243. ],
  8244. "responses": {
  8245. "200": {
  8246. "description": "Toast notification shown successfully",
  8247. "content": {
  8248. "application/json": {
  8249. "schema": {
  8250. "type": "boolean",
  8251. "description": "Toast notification shown successfully"
  8252. }
  8253. }
  8254. }
  8255. }
  8256. },
  8257. "description": "Show a toast notification in the TUI.",
  8258. "summary": "Show TUI toast",
  8259. "requestBody": {
  8260. "content": {
  8261. "application/json": {
  8262. "schema": {
  8263. "type": "object",
  8264. "properties": {
  8265. "title": {
  8266. "type": "string"
  8267. },
  8268. "message": {
  8269. "type": "string"
  8270. },
  8271. "variant": {
  8272. "type": "string",
  8273. "enum": ["info", "success", "warning", "error"]
  8274. },
  8275. "duration": {
  8276. "type": "integer",
  8277. "exclusiveMinimum": 0
  8278. }
  8279. },
  8280. "required": ["message", "variant"],
  8281. "additionalProperties": false
  8282. }
  8283. }
  8284. }
  8285. },
  8286. "x-codeSamples": [
  8287. {
  8288. "lang": "js",
  8289. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8290. }
  8291. ]
  8292. }
  8293. },
  8294. "/tui/publish": {
  8295. "post": {
  8296. "tags": ["tui"],
  8297. "operationId": "tui.publish",
  8298. "parameters": [
  8299. {
  8300. "name": "directory",
  8301. "in": "query",
  8302. "schema": {
  8303. "type": "string"
  8304. },
  8305. "required": false
  8306. },
  8307. {
  8308. "name": "workspace",
  8309. "in": "query",
  8310. "schema": {
  8311. "type": "string"
  8312. },
  8313. "required": false
  8314. }
  8315. ],
  8316. "responses": {
  8317. "200": {
  8318. "description": "Event published successfully",
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "type": "boolean",
  8323. "description": "Event published successfully"
  8324. }
  8325. }
  8326. }
  8327. },
  8328. "400": {
  8329. "description": "Bad request",
  8330. "content": {
  8331. "application/json": {
  8332. "schema": {
  8333. "$ref": "#/components/schemas/BadRequestError"
  8334. }
  8335. }
  8336. }
  8337. }
  8338. },
  8339. "description": "Publish a TUI event.",
  8340. "summary": "Publish TUI event",
  8341. "requestBody": {
  8342. "content": {
  8343. "application/json": {
  8344. "schema": {
  8345. "anyOf": [
  8346. {
  8347. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8348. },
  8349. {
  8350. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8351. },
  8352. {
  8353. "$ref": "#/components/schemas/EventTuiToastShow"
  8354. },
  8355. {
  8356. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8357. }
  8358. ]
  8359. }
  8360. }
  8361. }
  8362. },
  8363. "x-codeSamples": [
  8364. {
  8365. "lang": "js",
  8366. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8367. }
  8368. ]
  8369. }
  8370. },
  8371. "/tui/select-session": {
  8372. "post": {
  8373. "tags": ["tui"],
  8374. "operationId": "tui.selectSession",
  8375. "parameters": [
  8376. {
  8377. "name": "directory",
  8378. "in": "query",
  8379. "schema": {
  8380. "type": "string"
  8381. },
  8382. "required": false
  8383. },
  8384. {
  8385. "name": "workspace",
  8386. "in": "query",
  8387. "schema": {
  8388. "type": "string"
  8389. },
  8390. "required": false
  8391. }
  8392. ],
  8393. "responses": {
  8394. "200": {
  8395. "description": "Session selected successfully",
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "type": "boolean",
  8400. "description": "Session selected successfully"
  8401. }
  8402. }
  8403. }
  8404. },
  8405. "400": {
  8406. "description": "Bad request",
  8407. "content": {
  8408. "application/json": {
  8409. "schema": {
  8410. "$ref": "#/components/schemas/BadRequestError"
  8411. }
  8412. }
  8413. }
  8414. },
  8415. "404": {
  8416. "description": "NotFoundError",
  8417. "content": {
  8418. "application/json": {
  8419. "schema": {
  8420. "$ref": "#/components/schemas/NotFoundError"
  8421. }
  8422. }
  8423. }
  8424. }
  8425. },
  8426. "description": "Navigate the TUI to display the specified session.",
  8427. "summary": "Select session",
  8428. "requestBody": {
  8429. "content": {
  8430. "application/json": {
  8431. "schema": {
  8432. "type": "object",
  8433. "properties": {
  8434. "sessionID": {
  8435. "type": "string",
  8436. "pattern": "^ses",
  8437. "description": "Session ID to navigate to"
  8438. }
  8439. },
  8440. "required": ["sessionID"],
  8441. "additionalProperties": false
  8442. }
  8443. }
  8444. }
  8445. },
  8446. "x-codeSamples": [
  8447. {
  8448. "lang": "js",
  8449. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8450. }
  8451. ]
  8452. }
  8453. },
  8454. "/tui/control/next": {
  8455. "get": {
  8456. "tags": ["tui"],
  8457. "operationId": "tui.control.next",
  8458. "parameters": [
  8459. {
  8460. "name": "directory",
  8461. "in": "query",
  8462. "schema": {
  8463. "type": "string"
  8464. },
  8465. "required": false
  8466. },
  8467. {
  8468. "name": "workspace",
  8469. "in": "query",
  8470. "schema": {
  8471. "type": "string"
  8472. },
  8473. "required": false
  8474. }
  8475. ],
  8476. "responses": {
  8477. "200": {
  8478. "description": "Next TUI request",
  8479. "content": {
  8480. "application/json": {
  8481. "schema": {
  8482. "type": "object",
  8483. "properties": {
  8484. "path": {
  8485. "type": "string"
  8486. },
  8487. "body": {}
  8488. },
  8489. "required": ["path", "body"],
  8490. "additionalProperties": false,
  8491. "description": "Next TUI request"
  8492. }
  8493. }
  8494. }
  8495. }
  8496. },
  8497. "description": "Retrieve the next TUI request from the queue for processing.",
  8498. "summary": "Get next TUI request",
  8499. "x-codeSamples": [
  8500. {
  8501. "lang": "js",
  8502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8503. }
  8504. ]
  8505. }
  8506. },
  8507. "/tui/control/response": {
  8508. "post": {
  8509. "tags": ["tui"],
  8510. "operationId": "tui.control.response",
  8511. "parameters": [
  8512. {
  8513. "name": "directory",
  8514. "in": "query",
  8515. "schema": {
  8516. "type": "string"
  8517. },
  8518. "required": false
  8519. },
  8520. {
  8521. "name": "workspace",
  8522. "in": "query",
  8523. "schema": {
  8524. "type": "string"
  8525. },
  8526. "required": false
  8527. }
  8528. ],
  8529. "responses": {
  8530. "200": {
  8531. "description": "Response submitted successfully",
  8532. "content": {
  8533. "application/json": {
  8534. "schema": {
  8535. "type": "boolean",
  8536. "description": "Response submitted successfully"
  8537. }
  8538. }
  8539. }
  8540. }
  8541. },
  8542. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8543. "summary": "Submit TUI response",
  8544. "requestBody": {
  8545. "content": {
  8546. "application/json": {
  8547. "schema": {}
  8548. }
  8549. }
  8550. },
  8551. "x-codeSamples": [
  8552. {
  8553. "lang": "js",
  8554. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8555. }
  8556. ]
  8557. }
  8558. },
  8559. "/experimental/workspace/adapter": {
  8560. "get": {
  8561. "tags": ["workspace"],
  8562. "operationId": "experimental.workspace.adapter.list",
  8563. "parameters": [
  8564. {
  8565. "name": "directory",
  8566. "in": "query",
  8567. "schema": {
  8568. "type": "string"
  8569. },
  8570. "required": false
  8571. },
  8572. {
  8573. "name": "workspace",
  8574. "in": "query",
  8575. "schema": {
  8576. "type": "string"
  8577. },
  8578. "required": false
  8579. }
  8580. ],
  8581. "responses": {
  8582. "200": {
  8583. "description": "Workspace adapters",
  8584. "content": {
  8585. "application/json": {
  8586. "schema": {
  8587. "type": "array",
  8588. "items": {
  8589. "type": "object",
  8590. "properties": {
  8591. "type": {
  8592. "type": "string"
  8593. },
  8594. "name": {
  8595. "type": "string"
  8596. },
  8597. "description": {
  8598. "type": "string"
  8599. }
  8600. },
  8601. "required": ["type", "name", "description"],
  8602. "additionalProperties": false
  8603. },
  8604. "description": "Workspace adapters"
  8605. }
  8606. }
  8607. }
  8608. }
  8609. },
  8610. "description": "List all available workspace adapters for the current project.",
  8611. "summary": "List workspace adapters",
  8612. "x-codeSamples": [
  8613. {
  8614. "lang": "js",
  8615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8616. }
  8617. ]
  8618. }
  8619. },
  8620. "/experimental/workspace": {
  8621. "get": {
  8622. "tags": ["workspace"],
  8623. "operationId": "experimental.workspace.list",
  8624. "parameters": [
  8625. {
  8626. "name": "directory",
  8627. "in": "query",
  8628. "schema": {
  8629. "type": "string"
  8630. },
  8631. "required": false
  8632. },
  8633. {
  8634. "name": "workspace",
  8635. "in": "query",
  8636. "schema": {
  8637. "type": "string"
  8638. },
  8639. "required": false
  8640. }
  8641. ],
  8642. "responses": {
  8643. "200": {
  8644. "description": "Workspaces",
  8645. "content": {
  8646. "application/json": {
  8647. "schema": {
  8648. "type": "array",
  8649. "items": {
  8650. "$ref": "#/components/schemas/Workspace"
  8651. },
  8652. "description": "Workspaces"
  8653. }
  8654. }
  8655. }
  8656. }
  8657. },
  8658. "description": "List all workspaces.",
  8659. "summary": "List workspaces",
  8660. "x-codeSamples": [
  8661. {
  8662. "lang": "js",
  8663. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8664. }
  8665. ]
  8666. },
  8667. "post": {
  8668. "tags": ["workspace"],
  8669. "operationId": "experimental.workspace.create",
  8670. "parameters": [
  8671. {
  8672. "name": "directory",
  8673. "in": "query",
  8674. "schema": {
  8675. "type": "string"
  8676. },
  8677. "required": false
  8678. },
  8679. {
  8680. "name": "workspace",
  8681. "in": "query",
  8682. "schema": {
  8683. "type": "string"
  8684. },
  8685. "required": false
  8686. }
  8687. ],
  8688. "responses": {
  8689. "200": {
  8690. "description": "Workspace created",
  8691. "content": {
  8692. "application/json": {
  8693. "schema": {
  8694. "$ref": "#/components/schemas/Workspace"
  8695. }
  8696. }
  8697. }
  8698. },
  8699. "400": {
  8700. "description": "Bad request",
  8701. "content": {
  8702. "application/json": {
  8703. "schema": {
  8704. "$ref": "#/components/schemas/BadRequestError"
  8705. }
  8706. }
  8707. }
  8708. }
  8709. },
  8710. "description": "Create a workspace for the current project.",
  8711. "summary": "Create workspace",
  8712. "requestBody": {
  8713. "content": {
  8714. "application/json": {
  8715. "schema": {
  8716. "type": "object",
  8717. "properties": {
  8718. "id": {
  8719. "type": "string",
  8720. "pattern": "^wrk"
  8721. },
  8722. "type": {
  8723. "type": "string"
  8724. },
  8725. "branch": {
  8726. "anyOf": [
  8727. {
  8728. "type": "string"
  8729. },
  8730. {
  8731. "type": "null"
  8732. }
  8733. ]
  8734. },
  8735. "extra": {
  8736. "anyOf": [
  8737. {},
  8738. {
  8739. "type": "null"
  8740. }
  8741. ]
  8742. }
  8743. },
  8744. "required": ["type"],
  8745. "additionalProperties": false
  8746. }
  8747. }
  8748. }
  8749. },
  8750. "x-codeSamples": [
  8751. {
  8752. "lang": "js",
  8753. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8754. }
  8755. ]
  8756. }
  8757. },
  8758. "/experimental/workspace/sync-list": {
  8759. "post": {
  8760. "tags": ["workspace"],
  8761. "operationId": "experimental.workspace.syncList",
  8762. "parameters": [
  8763. {
  8764. "name": "directory",
  8765. "in": "query",
  8766. "schema": {
  8767. "type": "string"
  8768. },
  8769. "required": false
  8770. },
  8771. {
  8772. "name": "workspace",
  8773. "in": "query",
  8774. "schema": {
  8775. "type": "string"
  8776. },
  8777. "required": false
  8778. }
  8779. ],
  8780. "responses": {
  8781. "204": {
  8782. "description": "Workspace list synced"
  8783. }
  8784. },
  8785. "description": "Register missing workspaces returned by workspace adapters.",
  8786. "summary": "Sync workspace list",
  8787. "x-codeSamples": [
  8788. {
  8789. "lang": "js",
  8790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8791. }
  8792. ]
  8793. }
  8794. },
  8795. "/experimental/workspace/status": {
  8796. "get": {
  8797. "tags": ["workspace"],
  8798. "operationId": "experimental.workspace.status",
  8799. "parameters": [
  8800. {
  8801. "name": "directory",
  8802. "in": "query",
  8803. "schema": {
  8804. "type": "string"
  8805. },
  8806. "required": false
  8807. },
  8808. {
  8809. "name": "workspace",
  8810. "in": "query",
  8811. "schema": {
  8812. "type": "string"
  8813. },
  8814. "required": false
  8815. }
  8816. ],
  8817. "responses": {
  8818. "200": {
  8819. "description": "Workspace status",
  8820. "content": {
  8821. "application/json": {
  8822. "schema": {
  8823. "type": "array",
  8824. "items": {
  8825. "type": "object",
  8826. "properties": {
  8827. "workspaceID": {
  8828. "type": "string",
  8829. "pattern": "^wrk"
  8830. },
  8831. "status": {
  8832. "type": "string",
  8833. "enum": ["connected", "connecting", "disconnected", "error"]
  8834. }
  8835. },
  8836. "required": ["workspaceID", "status"],
  8837. "additionalProperties": false
  8838. },
  8839. "description": "Workspace status"
  8840. }
  8841. }
  8842. }
  8843. }
  8844. },
  8845. "description": "Get connection status for workspaces in the current project.",
  8846. "summary": "Workspace status",
  8847. "x-codeSamples": [
  8848. {
  8849. "lang": "js",
  8850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8851. }
  8852. ]
  8853. }
  8854. },
  8855. "/experimental/workspace/{id}": {
  8856. "delete": {
  8857. "tags": ["workspace"],
  8858. "operationId": "experimental.workspace.remove",
  8859. "parameters": [
  8860. {
  8861. "name": "id",
  8862. "in": "path",
  8863. "schema": {
  8864. "type": "string",
  8865. "pattern": "^wrk"
  8866. },
  8867. "required": true
  8868. },
  8869. {
  8870. "name": "directory",
  8871. "in": "query",
  8872. "schema": {
  8873. "type": "string"
  8874. },
  8875. "required": false
  8876. },
  8877. {
  8878. "name": "workspace",
  8879. "in": "query",
  8880. "schema": {
  8881. "type": "string"
  8882. },
  8883. "required": false
  8884. }
  8885. ],
  8886. "responses": {
  8887. "200": {
  8888. "description": "Workspace removed",
  8889. "content": {
  8890. "application/json": {
  8891. "schema": {
  8892. "$ref": "#/components/schemas/Workspace"
  8893. }
  8894. }
  8895. }
  8896. },
  8897. "400": {
  8898. "description": "Bad request",
  8899. "content": {
  8900. "application/json": {
  8901. "schema": {
  8902. "$ref": "#/components/schemas/BadRequestError"
  8903. }
  8904. }
  8905. }
  8906. }
  8907. },
  8908. "description": "Remove an existing workspace.",
  8909. "summary": "Remove workspace",
  8910. "x-codeSamples": [
  8911. {
  8912. "lang": "js",
  8913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8914. }
  8915. ]
  8916. }
  8917. },
  8918. "/experimental/workspace/warp": {
  8919. "post": {
  8920. "tags": ["workspace"],
  8921. "operationId": "experimental.workspace.warp",
  8922. "parameters": [
  8923. {
  8924. "name": "directory",
  8925. "in": "query",
  8926. "schema": {
  8927. "type": "string"
  8928. },
  8929. "required": false
  8930. },
  8931. {
  8932. "name": "workspace",
  8933. "in": "query",
  8934. "schema": {
  8935. "type": "string"
  8936. },
  8937. "required": false
  8938. }
  8939. ],
  8940. "responses": {
  8941. "204": {
  8942. "description": "Session warped"
  8943. },
  8944. "400": {
  8945. "description": "WorkspaceWarpError | VcsApplyError",
  8946. "content": {
  8947. "application/json": {
  8948. "schema": {
  8949. "anyOf": [
  8950. {
  8951. "$ref": "#/components/schemas/WorkspaceWarpError"
  8952. },
  8953. {
  8954. "$ref": "#/components/schemas/VcsApplyError"
  8955. }
  8956. ]
  8957. }
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8963. "summary": "Warp session into workspace",
  8964. "requestBody": {
  8965. "content": {
  8966. "application/json": {
  8967. "schema": {
  8968. "type": "object",
  8969. "properties": {
  8970. "id": {
  8971. "anyOf": [
  8972. {
  8973. "type": "string",
  8974. "pattern": "^wrk"
  8975. },
  8976. {
  8977. "type": "null"
  8978. }
  8979. ]
  8980. },
  8981. "sessionID": {
  8982. "type": "string",
  8983. "pattern": "^ses"
  8984. },
  8985. "copyChanges": {
  8986. "type": "boolean"
  8987. }
  8988. },
  8989. "required": ["id", "sessionID"],
  8990. "additionalProperties": false
  8991. }
  8992. }
  8993. }
  8994. },
  8995. "x-codeSamples": [
  8996. {
  8997. "lang": "js",
  8998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8999. }
  9000. ]
  9001. }
  9002. },
  9003. "/pty/{ptyID}/connect": {
  9004. "get": {
  9005. "tags": ["pty"],
  9006. "operationId": "pty.connect",
  9007. "parameters": [
  9008. {
  9009. "name": "ptyID",
  9010. "in": "path",
  9011. "schema": {
  9012. "type": "string",
  9013. "pattern": "^pty"
  9014. },
  9015. "required": true
  9016. },
  9017. {
  9018. "name": "directory",
  9019. "in": "query",
  9020. "schema": {
  9021. "type": "string"
  9022. },
  9023. "required": false
  9024. },
  9025. {
  9026. "name": "workspace",
  9027. "in": "query",
  9028. "schema": {
  9029. "type": "string"
  9030. },
  9031. "required": false
  9032. }
  9033. ],
  9034. "responses": {
  9035. "200": {
  9036. "description": "Connected session",
  9037. "content": {
  9038. "application/json": {
  9039. "schema": {
  9040. "type": "boolean",
  9041. "description": "Connected session"
  9042. }
  9043. }
  9044. }
  9045. },
  9046. "403": {
  9047. "description": "Forbidden",
  9048. "content": {
  9049. "application/json": {
  9050. "schema": {
  9051. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  9052. }
  9053. }
  9054. }
  9055. },
  9056. "404": {
  9057. "description": "Not found",
  9058. "content": {
  9059. "application/json": {
  9060. "schema": {
  9061. "$ref": "#/components/schemas/NotFoundError"
  9062. }
  9063. }
  9064. }
  9065. }
  9066. },
  9067. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  9068. "summary": "Connect to PTY session",
  9069. "x-codeSamples": [
  9070. {
  9071. "lang": "js",
  9072. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  9073. }
  9074. ]
  9075. }
  9076. }
  9077. },
  9078. "components": {
  9079. "schemas": {
  9080. "Event": {
  9081. "anyOf": [
  9082. {
  9083. "$ref": "#/components/schemas/Event.tui.prompt.append"
  9084. },
  9085. {
  9086. "$ref": "#/components/schemas/Event.tui.command.execute"
  9087. },
  9088. {
  9089. "$ref": "#/components/schemas/EventTuiToastShow1"
  9090. },
  9091. {
  9092. "$ref": "#/components/schemas/Event.tui.session.select"
  9093. },
  9094. {
  9095. "$ref": "#/components/schemas/EventServerConnected"
  9096. },
  9097. {
  9098. "$ref": "#/components/schemas/EventGlobalDisposed"
  9099. },
  9100. {
  9101. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  9102. },
  9103. {
  9104. "$ref": "#/components/schemas/EventFileEdited"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  9108. },
  9109. {
  9110. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  9111. },
  9112. {
  9113. "$ref": "#/components/schemas/EventLspUpdated"
  9114. },
  9115. {
  9116. "$ref": "#/components/schemas/EventMessagePartDelta"
  9117. },
  9118. {
  9119. "$ref": "#/components/schemas/EventPermissionAsked"
  9120. },
  9121. {
  9122. "$ref": "#/components/schemas/EventPermissionReplied"
  9123. },
  9124. {
  9125. "$ref": "#/components/schemas/EventSessionDiff"
  9126. },
  9127. {
  9128. "$ref": "#/components/schemas/EventSessionError"
  9129. },
  9130. {
  9131. "$ref": "#/components/schemas/EventQuestionAsked"
  9132. },
  9133. {
  9134. "$ref": "#/components/schemas/EventQuestionReplied"
  9135. },
  9136. {
  9137. "$ref": "#/components/schemas/EventQuestionRejected"
  9138. },
  9139. {
  9140. "$ref": "#/components/schemas/EventTodoUpdated"
  9141. },
  9142. {
  9143. "$ref": "#/components/schemas/EventSessionStatus"
  9144. },
  9145. {
  9146. "$ref": "#/components/schemas/EventSessionIdle"
  9147. },
  9148. {
  9149. "$ref": "#/components/schemas/EventMcpToolsChanged"
  9150. },
  9151. {
  9152. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  9153. },
  9154. {
  9155. "$ref": "#/components/schemas/EventCommandExecuted"
  9156. },
  9157. {
  9158. "$ref": "#/components/schemas/EventProjectUpdated"
  9159. },
  9160. {
  9161. "$ref": "#/components/schemas/EventSessionCompacted"
  9162. },
  9163. {
  9164. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  9165. },
  9166. {
  9167. "$ref": "#/components/schemas/EventWorkspaceReady"
  9168. },
  9169. {
  9170. "$ref": "#/components/schemas/EventWorkspaceFailed"
  9171. },
  9172. {
  9173. "$ref": "#/components/schemas/EventWorkspaceStatus"
  9174. },
  9175. {
  9176. "$ref": "#/components/schemas/EventWorktreeReady"
  9177. },
  9178. {
  9179. "$ref": "#/components/schemas/EventWorktreeFailed"
  9180. },
  9181. {
  9182. "$ref": "#/components/schemas/EventPtyCreated"
  9183. },
  9184. {
  9185. "$ref": "#/components/schemas/EventPtyUpdated"
  9186. },
  9187. {
  9188. "$ref": "#/components/schemas/EventPtyExited"
  9189. },
  9190. {
  9191. "$ref": "#/components/schemas/EventPtyDeleted"
  9192. },
  9193. {
  9194. "$ref": "#/components/schemas/EventInstallationUpdated"
  9195. },
  9196. {
  9197. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  9198. },
  9199. {
  9200. "$ref": "#/components/schemas/EventMessageUpdated"
  9201. },
  9202. {
  9203. "$ref": "#/components/schemas/EventMessageRemoved"
  9204. },
  9205. {
  9206. "$ref": "#/components/schemas/EventMessagePartUpdated"
  9207. },
  9208. {
  9209. "$ref": "#/components/schemas/EventMessagePartRemoved"
  9210. },
  9211. {
  9212. "$ref": "#/components/schemas/EventSessionCreated"
  9213. },
  9214. {
  9215. "$ref": "#/components/schemas/EventSessionUpdated"
  9216. },
  9217. {
  9218. "$ref": "#/components/schemas/EventSessionDeleted"
  9219. },
  9220. {
  9221. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9222. },
  9223. {
  9224. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9225. },
  9226. {
  9227. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9228. },
  9229. {
  9230. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9231. },
  9232. {
  9233. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9234. },
  9235. {
  9236. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9237. },
  9238. {
  9239. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9240. },
  9241. {
  9242. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9243. },
  9244. {
  9245. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9246. },
  9247. {
  9248. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9249. },
  9250. {
  9251. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9252. },
  9253. {
  9254. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9255. },
  9256. {
  9257. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9258. },
  9259. {
  9260. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9261. },
  9262. {
  9263. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9264. },
  9265. {
  9266. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9267. },
  9268. {
  9269. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9270. },
  9271. {
  9272. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9273. },
  9274. {
  9275. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9276. },
  9277. {
  9278. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9279. },
  9280. {
  9281. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9282. },
  9283. {
  9284. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9285. },
  9286. {
  9287. "$ref": "#/components/schemas/EventSessionNextRetried"
  9288. },
  9289. {
  9290. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9291. },
  9292. {
  9293. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9294. },
  9295. {
  9296. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9297. },
  9298. {
  9299. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  9300. },
  9301. {
  9302. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9303. },
  9304. {
  9305. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9306. },
  9307. {
  9308. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9309. },
  9310. {
  9311. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9312. },
  9313. {
  9314. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9315. },
  9316. {
  9317. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9318. },
  9319. {
  9320. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9321. },
  9322. {
  9323. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9324. },
  9325. {
  9326. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9327. },
  9328. {
  9329. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9330. },
  9331. {
  9332. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9333. },
  9334. {
  9335. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9336. },
  9337. {
  9338. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9339. },
  9340. {
  9341. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9342. },
  9343. {
  9344. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9345. },
  9346. {
  9347. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9348. },
  9349. {
  9350. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9351. },
  9352. {
  9353. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9354. },
  9355. {
  9356. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9357. },
  9358. {
  9359. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9360. },
  9361. {
  9362. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9363. },
  9364. {
  9365. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9366. },
  9367. {
  9368. "$ref": "#/components/schemas/EventSessionNextRetried"
  9369. },
  9370. {
  9371. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9372. },
  9373. {
  9374. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9375. },
  9376. {
  9377. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9378. }
  9379. ]
  9380. },
  9381. "OAuth": {
  9382. "type": "object",
  9383. "properties": {
  9384. "type": {
  9385. "type": "string",
  9386. "enum": ["oauth"]
  9387. },
  9388. "refresh": {
  9389. "type": "string"
  9390. },
  9391. "access": {
  9392. "type": "string"
  9393. },
  9394. "expires": {
  9395. "type": "integer",
  9396. "minimum": 0
  9397. },
  9398. "accountId": {
  9399. "type": "string"
  9400. },
  9401. "enterpriseUrl": {
  9402. "type": "string"
  9403. }
  9404. },
  9405. "required": ["type", "refresh", "access", "expires"],
  9406. "additionalProperties": false
  9407. },
  9408. "ApiAuth": {
  9409. "type": "object",
  9410. "properties": {
  9411. "type": {
  9412. "type": "string",
  9413. "enum": ["api"]
  9414. },
  9415. "key": {
  9416. "type": "string"
  9417. },
  9418. "metadata": {
  9419. "type": "object",
  9420. "additionalProperties": {
  9421. "type": "string"
  9422. }
  9423. }
  9424. },
  9425. "required": ["type", "key"],
  9426. "additionalProperties": false
  9427. },
  9428. "WellKnownAuth": {
  9429. "type": "object",
  9430. "properties": {
  9431. "type": {
  9432. "type": "string",
  9433. "enum": ["wellknown"]
  9434. },
  9435. "key": {
  9436. "type": "string"
  9437. },
  9438. "token": {
  9439. "type": "string"
  9440. }
  9441. },
  9442. "required": ["type", "key", "token"],
  9443. "additionalProperties": false
  9444. },
  9445. "Auth": {
  9446. "anyOf": [
  9447. {
  9448. "$ref": "#/components/schemas/OAuth"
  9449. },
  9450. {
  9451. "$ref": "#/components/schemas/ApiAuth"
  9452. },
  9453. {
  9454. "$ref": "#/components/schemas/WellKnownAuth"
  9455. }
  9456. ]
  9457. },
  9458. "effect_HttpApiError_BadRequest": {
  9459. "type": "object",
  9460. "properties": {
  9461. "_tag": {
  9462. "type": "string",
  9463. "enum": ["BadRequest"]
  9464. }
  9465. },
  9466. "required": ["_tag"],
  9467. "additionalProperties": false
  9468. },
  9469. "Event.tui.prompt.append": {
  9470. "type": "object",
  9471. "properties": {
  9472. "id": {
  9473. "type": "string"
  9474. },
  9475. "type": {
  9476. "type": "string",
  9477. "enum": ["tui.prompt.append"]
  9478. },
  9479. "properties": {
  9480. "type": "object",
  9481. "properties": {
  9482. "text": {
  9483. "type": "string"
  9484. }
  9485. },
  9486. "required": ["text"],
  9487. "additionalProperties": false
  9488. }
  9489. },
  9490. "required": ["id", "type", "properties"],
  9491. "additionalProperties": false
  9492. },
  9493. "Event.tui.command.execute": {
  9494. "type": "object",
  9495. "properties": {
  9496. "id": {
  9497. "type": "string"
  9498. },
  9499. "type": {
  9500. "type": "string",
  9501. "enum": ["tui.command.execute"]
  9502. },
  9503. "properties": {
  9504. "type": "object",
  9505. "properties": {
  9506. "command": {
  9507. "anyOf": [
  9508. {
  9509. "type": "string",
  9510. "enum": [
  9511. "session.list",
  9512. "session.new",
  9513. "session.share",
  9514. "session.interrupt",
  9515. "session.compact",
  9516. "session.page.up",
  9517. "session.page.down",
  9518. "session.line.up",
  9519. "session.line.down",
  9520. "session.half.page.up",
  9521. "session.half.page.down",
  9522. "session.first",
  9523. "session.last",
  9524. "prompt.clear",
  9525. "prompt.submit",
  9526. "agent.cycle"
  9527. ]
  9528. },
  9529. {
  9530. "type": "string"
  9531. }
  9532. ]
  9533. }
  9534. },
  9535. "required": ["command"],
  9536. "additionalProperties": false
  9537. }
  9538. },
  9539. "required": ["id", "type", "properties"],
  9540. "additionalProperties": false
  9541. },
  9542. "Event.tui.toast.show": {
  9543. "type": "object",
  9544. "properties": {
  9545. "id": {
  9546. "type": "string"
  9547. },
  9548. "type": {
  9549. "type": "string",
  9550. "enum": ["tui.toast.show"]
  9551. },
  9552. "properties": {
  9553. "type": "object",
  9554. "properties": {
  9555. "title": {
  9556. "type": "string"
  9557. },
  9558. "message": {
  9559. "type": "string"
  9560. },
  9561. "variant": {
  9562. "type": "string",
  9563. "enum": ["info", "success", "warning", "error"]
  9564. },
  9565. "duration": {
  9566. "type": "integer",
  9567. "exclusiveMinimum": 0
  9568. }
  9569. },
  9570. "required": ["message", "variant"],
  9571. "additionalProperties": false
  9572. }
  9573. },
  9574. "required": ["id", "type", "properties"],
  9575. "additionalProperties": false
  9576. },
  9577. "Event.tui.session.select": {
  9578. "type": "object",
  9579. "properties": {
  9580. "id": {
  9581. "type": "string"
  9582. },
  9583. "type": {
  9584. "type": "string",
  9585. "enum": ["tui.session.select"]
  9586. },
  9587. "properties": {
  9588. "type": "object",
  9589. "properties": {
  9590. "sessionID": {
  9591. "type": "string",
  9592. "pattern": "^ses",
  9593. "description": "Session ID to navigate to"
  9594. }
  9595. },
  9596. "required": ["sessionID"],
  9597. "additionalProperties": false
  9598. }
  9599. },
  9600. "required": ["id", "type", "properties"],
  9601. "additionalProperties": false
  9602. },
  9603. "PermissionRequest": {
  9604. "type": "object",
  9605. "properties": {
  9606. "id": {
  9607. "type": "string",
  9608. "pattern": "^per"
  9609. },
  9610. "sessionID": {
  9611. "type": "string",
  9612. "pattern": "^ses"
  9613. },
  9614. "permission": {
  9615. "type": "string"
  9616. },
  9617. "patterns": {
  9618. "type": "array",
  9619. "items": {
  9620. "type": "string"
  9621. }
  9622. },
  9623. "metadata": {
  9624. "type": "object"
  9625. },
  9626. "always": {
  9627. "type": "array",
  9628. "items": {
  9629. "type": "string"
  9630. }
  9631. },
  9632. "tool": {
  9633. "type": "object",
  9634. "properties": {
  9635. "messageID": {
  9636. "type": "string",
  9637. "pattern": "^msg"
  9638. },
  9639. "callID": {
  9640. "type": "string"
  9641. }
  9642. },
  9643. "required": ["messageID", "callID"],
  9644. "additionalProperties": false
  9645. }
  9646. },
  9647. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9648. "additionalProperties": false
  9649. },
  9650. "SnapshotFileDiff": {
  9651. "type": "object",
  9652. "properties": {
  9653. "file": {
  9654. "type": "string"
  9655. },
  9656. "patch": {
  9657. "type": "string"
  9658. },
  9659. "additions": {
  9660. "type": "number"
  9661. },
  9662. "deletions": {
  9663. "type": "number"
  9664. },
  9665. "status": {
  9666. "type": "string",
  9667. "enum": ["added", "deleted", "modified"]
  9668. }
  9669. },
  9670. "required": ["additions", "deletions"],
  9671. "additionalProperties": false
  9672. },
  9673. "ProviderAuthError": {
  9674. "type": "object",
  9675. "properties": {
  9676. "name": {
  9677. "type": "string",
  9678. "enum": ["ProviderAuthError"]
  9679. },
  9680. "data": {
  9681. "type": "object",
  9682. "properties": {
  9683. "providerID": {
  9684. "type": "string"
  9685. },
  9686. "message": {
  9687. "type": "string"
  9688. }
  9689. },
  9690. "required": ["providerID", "message"],
  9691. "additionalProperties": false
  9692. }
  9693. },
  9694. "required": ["name", "data"],
  9695. "additionalProperties": false
  9696. },
  9697. "UnknownError": {
  9698. "type": "object",
  9699. "properties": {
  9700. "name": {
  9701. "type": "string",
  9702. "enum": ["UnknownError"]
  9703. },
  9704. "data": {
  9705. "type": "object",
  9706. "properties": {
  9707. "message": {
  9708. "type": "string"
  9709. }
  9710. },
  9711. "required": ["message"],
  9712. "additionalProperties": false
  9713. }
  9714. },
  9715. "required": ["name", "data"],
  9716. "additionalProperties": false
  9717. },
  9718. "MessageOutputLengthError": {
  9719. "type": "object",
  9720. "properties": {
  9721. "name": {
  9722. "type": "string",
  9723. "enum": ["MessageOutputLengthError"]
  9724. },
  9725. "data": {
  9726. "type": "object",
  9727. "properties": {}
  9728. }
  9729. },
  9730. "required": ["name", "data"],
  9731. "additionalProperties": false
  9732. },
  9733. "MessageAbortedError": {
  9734. "type": "object",
  9735. "properties": {
  9736. "name": {
  9737. "type": "string",
  9738. "enum": ["MessageAbortedError"]
  9739. },
  9740. "data": {
  9741. "type": "object",
  9742. "properties": {
  9743. "message": {
  9744. "type": "string"
  9745. }
  9746. },
  9747. "required": ["message"],
  9748. "additionalProperties": false
  9749. }
  9750. },
  9751. "required": ["name", "data"],
  9752. "additionalProperties": false
  9753. },
  9754. "StructuredOutputError": {
  9755. "type": "object",
  9756. "properties": {
  9757. "name": {
  9758. "type": "string",
  9759. "enum": ["StructuredOutputError"]
  9760. },
  9761. "data": {
  9762. "type": "object",
  9763. "properties": {
  9764. "message": {
  9765. "type": "string"
  9766. },
  9767. "retries": {
  9768. "type": "integer",
  9769. "minimum": 0
  9770. }
  9771. },
  9772. "required": ["message", "retries"],
  9773. "additionalProperties": false
  9774. }
  9775. },
  9776. "required": ["name", "data"],
  9777. "additionalProperties": false
  9778. },
  9779. "ContextOverflowError": {
  9780. "type": "object",
  9781. "properties": {
  9782. "name": {
  9783. "type": "string",
  9784. "enum": ["ContextOverflowError"]
  9785. },
  9786. "data": {
  9787. "type": "object",
  9788. "properties": {
  9789. "message": {
  9790. "type": "string"
  9791. },
  9792. "responseBody": {
  9793. "type": "string"
  9794. }
  9795. },
  9796. "required": ["message"],
  9797. "additionalProperties": false
  9798. }
  9799. },
  9800. "required": ["name", "data"],
  9801. "additionalProperties": false
  9802. },
  9803. "APIError": {
  9804. "type": "object",
  9805. "properties": {
  9806. "name": {
  9807. "type": "string",
  9808. "enum": ["APIError"]
  9809. },
  9810. "data": {
  9811. "type": "object",
  9812. "properties": {
  9813. "message": {
  9814. "type": "string"
  9815. },
  9816. "statusCode": {
  9817. "type": "integer",
  9818. "minimum": 0
  9819. },
  9820. "isRetryable": {
  9821. "type": "boolean"
  9822. },
  9823. "responseHeaders": {
  9824. "type": "object",
  9825. "additionalProperties": {
  9826. "type": "string"
  9827. }
  9828. },
  9829. "responseBody": {
  9830. "type": "string"
  9831. },
  9832. "metadata": {
  9833. "type": "object",
  9834. "additionalProperties": {
  9835. "type": "string"
  9836. }
  9837. }
  9838. },
  9839. "required": ["message", "isRetryable"],
  9840. "additionalProperties": false
  9841. }
  9842. },
  9843. "required": ["name", "data"],
  9844. "additionalProperties": false
  9845. },
  9846. "QuestionOption": {
  9847. "type": "object",
  9848. "properties": {
  9849. "label": {
  9850. "type": "string",
  9851. "description": "Display text (1-5 words, concise)"
  9852. },
  9853. "description": {
  9854. "type": "string",
  9855. "description": "Explanation of choice"
  9856. }
  9857. },
  9858. "required": ["label", "description"],
  9859. "additionalProperties": false
  9860. },
  9861. "QuestionInfo": {
  9862. "type": "object",
  9863. "properties": {
  9864. "question": {
  9865. "type": "string",
  9866. "description": "Complete question"
  9867. },
  9868. "header": {
  9869. "type": "string",
  9870. "description": "Very short label (max 30 chars)"
  9871. },
  9872. "options": {
  9873. "type": "array",
  9874. "items": {
  9875. "$ref": "#/components/schemas/QuestionOption"
  9876. },
  9877. "description": "Available choices"
  9878. },
  9879. "multiple": {
  9880. "type": "boolean"
  9881. },
  9882. "custom": {
  9883. "type": "boolean"
  9884. }
  9885. },
  9886. "required": ["question", "header", "options"],
  9887. "additionalProperties": false
  9888. },
  9889. "QuestionTool": {
  9890. "type": "object",
  9891. "properties": {
  9892. "messageID": {
  9893. "type": "string",
  9894. "pattern": "^msg"
  9895. },
  9896. "callID": {
  9897. "type": "string"
  9898. }
  9899. },
  9900. "required": ["messageID", "callID"],
  9901. "additionalProperties": false
  9902. },
  9903. "QuestionRequest": {
  9904. "type": "object",
  9905. "properties": {
  9906. "id": {
  9907. "type": "string",
  9908. "pattern": "^que"
  9909. },
  9910. "sessionID": {
  9911. "type": "string",
  9912. "pattern": "^ses"
  9913. },
  9914. "questions": {
  9915. "type": "array",
  9916. "items": {
  9917. "$ref": "#/components/schemas/QuestionInfo"
  9918. },
  9919. "description": "Questions to ask"
  9920. },
  9921. "tool": {
  9922. "$ref": "#/components/schemas/QuestionTool"
  9923. }
  9924. },
  9925. "required": ["id", "sessionID", "questions"],
  9926. "additionalProperties": false
  9927. },
  9928. "QuestionAnswer": {
  9929. "type": "array",
  9930. "items": {
  9931. "type": "string"
  9932. }
  9933. },
  9934. "QuestionReplied": {
  9935. "type": "object",
  9936. "properties": {
  9937. "sessionID": {
  9938. "type": "string",
  9939. "pattern": "^ses"
  9940. },
  9941. "requestID": {
  9942. "type": "string",
  9943. "pattern": "^que"
  9944. },
  9945. "answers": {
  9946. "type": "array",
  9947. "items": {
  9948. "$ref": "#/components/schemas/QuestionAnswer"
  9949. }
  9950. }
  9951. },
  9952. "required": ["sessionID", "requestID", "answers"],
  9953. "additionalProperties": false
  9954. },
  9955. "QuestionRejected": {
  9956. "type": "object",
  9957. "properties": {
  9958. "sessionID": {
  9959. "type": "string",
  9960. "pattern": "^ses"
  9961. },
  9962. "requestID": {
  9963. "type": "string",
  9964. "pattern": "^que"
  9965. }
  9966. },
  9967. "required": ["sessionID", "requestID"],
  9968. "additionalProperties": false
  9969. },
  9970. "Todo": {
  9971. "type": "object",
  9972. "properties": {
  9973. "content": {
  9974. "type": "string",
  9975. "description": "Brief description of the task"
  9976. },
  9977. "status": {
  9978. "type": "string",
  9979. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9980. },
  9981. "priority": {
  9982. "type": "string",
  9983. "description": "Priority level of the task: high, medium, low"
  9984. }
  9985. },
  9986. "required": ["content", "status", "priority"],
  9987. "additionalProperties": false
  9988. },
  9989. "SessionStatus": {
  9990. "anyOf": [
  9991. {
  9992. "type": "object",
  9993. "properties": {
  9994. "type": {
  9995. "type": "string",
  9996. "enum": ["idle"]
  9997. }
  9998. },
  9999. "required": ["type"],
  10000. "additionalProperties": false
  10001. },
  10002. {
  10003. "type": "object",
  10004. "properties": {
  10005. "type": {
  10006. "type": "string",
  10007. "enum": ["retry"]
  10008. },
  10009. "attempt": {
  10010. "type": "integer",
  10011. "minimum": 0
  10012. },
  10013. "message": {
  10014. "type": "string"
  10015. },
  10016. "action": {
  10017. "type": "object",
  10018. "properties": {
  10019. "reason": {
  10020. "type": "string"
  10021. },
  10022. "provider": {
  10023. "type": "string"
  10024. },
  10025. "title": {
  10026. "type": "string"
  10027. },
  10028. "message": {
  10029. "type": "string"
  10030. },
  10031. "label": {
  10032. "type": "string"
  10033. },
  10034. "link": {
  10035. "type": "string"
  10036. }
  10037. },
  10038. "required": ["reason", "provider", "title", "message", "label"],
  10039. "additionalProperties": false
  10040. },
  10041. "next": {
  10042. "type": "integer",
  10043. "minimum": 0
  10044. }
  10045. },
  10046. "required": ["type", "attempt", "message", "next"],
  10047. "additionalProperties": false
  10048. },
  10049. {
  10050. "type": "object",
  10051. "properties": {
  10052. "type": {
  10053. "type": "string",
  10054. "enum": ["busy"]
  10055. }
  10056. },
  10057. "required": ["type"],
  10058. "additionalProperties": false
  10059. }
  10060. ]
  10061. },
  10062. "Project": {
  10063. "type": "object",
  10064. "properties": {
  10065. "id": {
  10066. "type": "string"
  10067. },
  10068. "worktree": {
  10069. "type": "string"
  10070. },
  10071. "vcs": {
  10072. "type": "string",
  10073. "enum": ["git"]
  10074. },
  10075. "name": {
  10076. "type": "string"
  10077. },
  10078. "icon": {
  10079. "type": "object",
  10080. "properties": {
  10081. "url": {
  10082. "type": "string"
  10083. },
  10084. "override": {
  10085. "type": "string"
  10086. },
  10087. "color": {
  10088. "type": "string"
  10089. }
  10090. },
  10091. "additionalProperties": false
  10092. },
  10093. "commands": {
  10094. "type": "object",
  10095. "properties": {
  10096. "start": {
  10097. "type": "string",
  10098. "description": "Startup script to run when creating a new workspace (worktree)"
  10099. }
  10100. },
  10101. "additionalProperties": false
  10102. },
  10103. "time": {
  10104. "type": "object",
  10105. "properties": {
  10106. "created": {
  10107. "type": "integer",
  10108. "minimum": 0
  10109. },
  10110. "updated": {
  10111. "type": "integer",
  10112. "minimum": 0
  10113. },
  10114. "initialized": {
  10115. "type": "integer",
  10116. "minimum": 0
  10117. }
  10118. },
  10119. "required": ["created", "updated"],
  10120. "additionalProperties": false
  10121. },
  10122. "sandboxes": {
  10123. "type": "array",
  10124. "items": {
  10125. "type": "string"
  10126. }
  10127. }
  10128. },
  10129. "required": ["id", "worktree", "time", "sandboxes"],
  10130. "additionalProperties": false
  10131. },
  10132. "Pty": {
  10133. "type": "object",
  10134. "properties": {
  10135. "id": {
  10136. "type": "string",
  10137. "pattern": "^pty"
  10138. },
  10139. "title": {
  10140. "type": "string"
  10141. },
  10142. "command": {
  10143. "type": "string"
  10144. },
  10145. "args": {
  10146. "type": "array",
  10147. "items": {
  10148. "type": "string"
  10149. }
  10150. },
  10151. "cwd": {
  10152. "type": "string"
  10153. },
  10154. "status": {
  10155. "type": "string",
  10156. "enum": ["running", "exited"]
  10157. },
  10158. "pid": {
  10159. "type": "integer",
  10160. "exclusiveMinimum": 0
  10161. }
  10162. },
  10163. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  10164. "additionalProperties": false
  10165. },
  10166. "OutputFormatText": {
  10167. "type": "object",
  10168. "properties": {
  10169. "type": {
  10170. "type": "string",
  10171. "enum": ["text"]
  10172. }
  10173. },
  10174. "required": ["type"],
  10175. "additionalProperties": false
  10176. },
  10177. "JSONSchema": {
  10178. "type": "object"
  10179. },
  10180. "OutputFormatJsonSchema": {
  10181. "type": "object",
  10182. "properties": {
  10183. "type": {
  10184. "type": "string",
  10185. "enum": ["json_schema"]
  10186. },
  10187. "schema": {
  10188. "$ref": "#/components/schemas/JSONSchema"
  10189. },
  10190. "retryCount": {
  10191. "type": "integer",
  10192. "minimum": 0
  10193. }
  10194. },
  10195. "required": ["type", "schema"],
  10196. "additionalProperties": false
  10197. },
  10198. "OutputFormat": {
  10199. "anyOf": [
  10200. {
  10201. "$ref": "#/components/schemas/OutputFormatText"
  10202. },
  10203. {
  10204. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  10205. }
  10206. ]
  10207. },
  10208. "UserMessage": {
  10209. "type": "object",
  10210. "properties": {
  10211. "id": {
  10212. "type": "string",
  10213. "pattern": "^msg"
  10214. },
  10215. "sessionID": {
  10216. "type": "string",
  10217. "pattern": "^ses"
  10218. },
  10219. "role": {
  10220. "type": "string",
  10221. "enum": ["user"]
  10222. },
  10223. "time": {
  10224. "type": "object",
  10225. "properties": {
  10226. "created": {
  10227. "type": "integer",
  10228. "minimum": 0
  10229. }
  10230. },
  10231. "required": ["created"],
  10232. "additionalProperties": false
  10233. },
  10234. "format": {
  10235. "$ref": "#/components/schemas/OutputFormat"
  10236. },
  10237. "summary": {
  10238. "type": "object",
  10239. "properties": {
  10240. "title": {
  10241. "type": "string"
  10242. },
  10243. "body": {
  10244. "type": "string"
  10245. },
  10246. "diffs": {
  10247. "type": "array",
  10248. "items": {
  10249. "$ref": "#/components/schemas/SnapshotFileDiff"
  10250. }
  10251. }
  10252. },
  10253. "required": ["diffs"],
  10254. "additionalProperties": false
  10255. },
  10256. "agent": {
  10257. "type": "string"
  10258. },
  10259. "model": {
  10260. "type": "object",
  10261. "properties": {
  10262. "providerID": {
  10263. "type": "string"
  10264. },
  10265. "modelID": {
  10266. "type": "string"
  10267. },
  10268. "variant": {
  10269. "type": "string"
  10270. }
  10271. },
  10272. "required": ["providerID", "modelID"],
  10273. "additionalProperties": false
  10274. },
  10275. "system": {
  10276. "type": "string"
  10277. },
  10278. "tools": {
  10279. "type": "object",
  10280. "additionalProperties": {
  10281. "type": "boolean"
  10282. }
  10283. }
  10284. },
  10285. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  10286. "additionalProperties": false
  10287. },
  10288. "AssistantMessage": {
  10289. "type": "object",
  10290. "properties": {
  10291. "id": {
  10292. "type": "string",
  10293. "pattern": "^msg"
  10294. },
  10295. "sessionID": {
  10296. "type": "string",
  10297. "pattern": "^ses"
  10298. },
  10299. "role": {
  10300. "type": "string",
  10301. "enum": ["assistant"]
  10302. },
  10303. "time": {
  10304. "type": "object",
  10305. "properties": {
  10306. "created": {
  10307. "type": "integer",
  10308. "minimum": 0
  10309. },
  10310. "completed": {
  10311. "type": "integer",
  10312. "minimum": 0
  10313. }
  10314. },
  10315. "required": ["created"],
  10316. "additionalProperties": false
  10317. },
  10318. "error": {
  10319. "anyOf": [
  10320. {
  10321. "$ref": "#/components/schemas/ProviderAuthError"
  10322. },
  10323. {
  10324. "$ref": "#/components/schemas/UnknownError"
  10325. },
  10326. {
  10327. "$ref": "#/components/schemas/MessageOutputLengthError"
  10328. },
  10329. {
  10330. "$ref": "#/components/schemas/MessageAbortedError"
  10331. },
  10332. {
  10333. "$ref": "#/components/schemas/StructuredOutputError"
  10334. },
  10335. {
  10336. "$ref": "#/components/schemas/ContextOverflowError"
  10337. },
  10338. {
  10339. "$ref": "#/components/schemas/APIError"
  10340. }
  10341. ]
  10342. },
  10343. "parentID": {
  10344. "type": "string",
  10345. "pattern": "^msg"
  10346. },
  10347. "modelID": {
  10348. "type": "string"
  10349. },
  10350. "providerID": {
  10351. "type": "string"
  10352. },
  10353. "mode": {
  10354. "type": "string"
  10355. },
  10356. "agent": {
  10357. "type": "string"
  10358. },
  10359. "path": {
  10360. "type": "object",
  10361. "properties": {
  10362. "cwd": {
  10363. "type": "string"
  10364. },
  10365. "root": {
  10366. "type": "string"
  10367. }
  10368. },
  10369. "required": ["cwd", "root"],
  10370. "additionalProperties": false
  10371. },
  10372. "summary": {
  10373. "type": "boolean"
  10374. },
  10375. "cost": {
  10376. "type": "number"
  10377. },
  10378. "tokens": {
  10379. "type": "object",
  10380. "properties": {
  10381. "total": {
  10382. "type": "number"
  10383. },
  10384. "input": {
  10385. "type": "number"
  10386. },
  10387. "output": {
  10388. "type": "number"
  10389. },
  10390. "reasoning": {
  10391. "type": "number"
  10392. },
  10393. "cache": {
  10394. "type": "object",
  10395. "properties": {
  10396. "read": {
  10397. "type": "number"
  10398. },
  10399. "write": {
  10400. "type": "number"
  10401. }
  10402. },
  10403. "required": ["read", "write"],
  10404. "additionalProperties": false
  10405. }
  10406. },
  10407. "required": ["input", "output", "reasoning", "cache"],
  10408. "additionalProperties": false
  10409. },
  10410. "structured": {},
  10411. "variant": {
  10412. "type": "string"
  10413. },
  10414. "finish": {
  10415. "type": "string"
  10416. }
  10417. },
  10418. "required": [
  10419. "id",
  10420. "sessionID",
  10421. "role",
  10422. "time",
  10423. "parentID",
  10424. "modelID",
  10425. "providerID",
  10426. "mode",
  10427. "agent",
  10428. "path",
  10429. "cost",
  10430. "tokens"
  10431. ],
  10432. "additionalProperties": false
  10433. },
  10434. "Message": {
  10435. "anyOf": [
  10436. {
  10437. "$ref": "#/components/schemas/UserMessage"
  10438. },
  10439. {
  10440. "$ref": "#/components/schemas/AssistantMessage"
  10441. }
  10442. ]
  10443. },
  10444. "TextPart": {
  10445. "type": "object",
  10446. "properties": {
  10447. "id": {
  10448. "type": "string",
  10449. "pattern": "^prt"
  10450. },
  10451. "sessionID": {
  10452. "type": "string",
  10453. "pattern": "^ses"
  10454. },
  10455. "messageID": {
  10456. "type": "string",
  10457. "pattern": "^msg"
  10458. },
  10459. "type": {
  10460. "type": "string",
  10461. "enum": ["text"]
  10462. },
  10463. "text": {
  10464. "type": "string"
  10465. },
  10466. "synthetic": {
  10467. "type": "boolean"
  10468. },
  10469. "ignored": {
  10470. "type": "boolean"
  10471. },
  10472. "time": {
  10473. "type": "object",
  10474. "properties": {
  10475. "start": {
  10476. "type": "integer",
  10477. "minimum": 0
  10478. },
  10479. "end": {
  10480. "type": "integer",
  10481. "minimum": 0
  10482. }
  10483. },
  10484. "required": ["start"],
  10485. "additionalProperties": false
  10486. },
  10487. "metadata": {
  10488. "type": "object"
  10489. }
  10490. },
  10491. "required": ["id", "sessionID", "messageID", "type", "text"],
  10492. "additionalProperties": false
  10493. },
  10494. "SubtaskPart": {
  10495. "type": "object",
  10496. "properties": {
  10497. "id": {
  10498. "type": "string",
  10499. "pattern": "^prt"
  10500. },
  10501. "sessionID": {
  10502. "type": "string",
  10503. "pattern": "^ses"
  10504. },
  10505. "messageID": {
  10506. "type": "string",
  10507. "pattern": "^msg"
  10508. },
  10509. "type": {
  10510. "type": "string",
  10511. "enum": ["subtask"]
  10512. },
  10513. "prompt": {
  10514. "type": "string"
  10515. },
  10516. "description": {
  10517. "type": "string"
  10518. },
  10519. "agent": {
  10520. "type": "string"
  10521. },
  10522. "model": {
  10523. "type": "object",
  10524. "properties": {
  10525. "providerID": {
  10526. "type": "string"
  10527. },
  10528. "modelID": {
  10529. "type": "string"
  10530. }
  10531. },
  10532. "required": ["providerID", "modelID"],
  10533. "additionalProperties": false
  10534. },
  10535. "command": {
  10536. "type": "string"
  10537. }
  10538. },
  10539. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10540. "additionalProperties": false
  10541. },
  10542. "ReasoningPart": {
  10543. "type": "object",
  10544. "properties": {
  10545. "id": {
  10546. "type": "string",
  10547. "pattern": "^prt"
  10548. },
  10549. "sessionID": {
  10550. "type": "string",
  10551. "pattern": "^ses"
  10552. },
  10553. "messageID": {
  10554. "type": "string",
  10555. "pattern": "^msg"
  10556. },
  10557. "type": {
  10558. "type": "string",
  10559. "enum": ["reasoning"]
  10560. },
  10561. "text": {
  10562. "type": "string"
  10563. },
  10564. "metadata": {
  10565. "type": "object"
  10566. },
  10567. "time": {
  10568. "type": "object",
  10569. "properties": {
  10570. "start": {
  10571. "type": "integer",
  10572. "minimum": 0
  10573. },
  10574. "end": {
  10575. "type": "integer",
  10576. "minimum": 0
  10577. }
  10578. },
  10579. "required": ["start"],
  10580. "additionalProperties": false
  10581. }
  10582. },
  10583. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10584. "additionalProperties": false
  10585. },
  10586. "FilePartSourceText": {
  10587. "type": "object",
  10588. "properties": {
  10589. "value": {
  10590. "type": "string"
  10591. },
  10592. "start": {
  10593. "type": "number"
  10594. },
  10595. "end": {
  10596. "type": "number"
  10597. }
  10598. },
  10599. "required": ["value", "start", "end"],
  10600. "additionalProperties": false
  10601. },
  10602. "FileSource": {
  10603. "type": "object",
  10604. "properties": {
  10605. "text": {
  10606. "$ref": "#/components/schemas/FilePartSourceText"
  10607. },
  10608. "type": {
  10609. "type": "string",
  10610. "enum": ["file"]
  10611. },
  10612. "path": {
  10613. "type": "string"
  10614. }
  10615. },
  10616. "required": ["text", "type", "path"],
  10617. "additionalProperties": false
  10618. },
  10619. "Range": {
  10620. "type": "object",
  10621. "properties": {
  10622. "start": {
  10623. "type": "object",
  10624. "properties": {
  10625. "line": {
  10626. "type": "integer",
  10627. "minimum": 0
  10628. },
  10629. "character": {
  10630. "type": "integer",
  10631. "minimum": 0
  10632. }
  10633. },
  10634. "required": ["line", "character"],
  10635. "additionalProperties": false
  10636. },
  10637. "end": {
  10638. "type": "object",
  10639. "properties": {
  10640. "line": {
  10641. "type": "integer",
  10642. "minimum": 0
  10643. },
  10644. "character": {
  10645. "type": "integer",
  10646. "minimum": 0
  10647. }
  10648. },
  10649. "required": ["line", "character"],
  10650. "additionalProperties": false
  10651. }
  10652. },
  10653. "required": ["start", "end"],
  10654. "additionalProperties": false
  10655. },
  10656. "SymbolSource": {
  10657. "type": "object",
  10658. "properties": {
  10659. "text": {
  10660. "$ref": "#/components/schemas/FilePartSourceText"
  10661. },
  10662. "type": {
  10663. "type": "string",
  10664. "enum": ["symbol"]
  10665. },
  10666. "path": {
  10667. "type": "string"
  10668. },
  10669. "range": {
  10670. "$ref": "#/components/schemas/Range"
  10671. },
  10672. "name": {
  10673. "type": "string"
  10674. },
  10675. "kind": {
  10676. "type": "integer",
  10677. "minimum": 0
  10678. }
  10679. },
  10680. "required": ["text", "type", "path", "range", "name", "kind"],
  10681. "additionalProperties": false
  10682. },
  10683. "ResourceSource": {
  10684. "type": "object",
  10685. "properties": {
  10686. "text": {
  10687. "$ref": "#/components/schemas/FilePartSourceText"
  10688. },
  10689. "type": {
  10690. "type": "string",
  10691. "enum": ["resource"]
  10692. },
  10693. "clientName": {
  10694. "type": "string"
  10695. },
  10696. "uri": {
  10697. "type": "string"
  10698. }
  10699. },
  10700. "required": ["text", "type", "clientName", "uri"],
  10701. "additionalProperties": false
  10702. },
  10703. "FilePartSource": {
  10704. "anyOf": [
  10705. {
  10706. "$ref": "#/components/schemas/FileSource"
  10707. },
  10708. {
  10709. "$ref": "#/components/schemas/SymbolSource"
  10710. },
  10711. {
  10712. "$ref": "#/components/schemas/ResourceSource"
  10713. }
  10714. ]
  10715. },
  10716. "FilePart": {
  10717. "type": "object",
  10718. "properties": {
  10719. "id": {
  10720. "type": "string",
  10721. "pattern": "^prt"
  10722. },
  10723. "sessionID": {
  10724. "type": "string",
  10725. "pattern": "^ses"
  10726. },
  10727. "messageID": {
  10728. "type": "string",
  10729. "pattern": "^msg"
  10730. },
  10731. "type": {
  10732. "type": "string",
  10733. "enum": ["file"]
  10734. },
  10735. "mime": {
  10736. "type": "string"
  10737. },
  10738. "filename": {
  10739. "type": "string"
  10740. },
  10741. "url": {
  10742. "type": "string"
  10743. },
  10744. "source": {
  10745. "$ref": "#/components/schemas/FilePartSource"
  10746. }
  10747. },
  10748. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10749. "additionalProperties": false
  10750. },
  10751. "ToolStatePending": {
  10752. "type": "object",
  10753. "properties": {
  10754. "status": {
  10755. "type": "string",
  10756. "enum": ["pending"]
  10757. },
  10758. "input": {
  10759. "type": "object"
  10760. },
  10761. "raw": {
  10762. "type": "string"
  10763. }
  10764. },
  10765. "required": ["status", "input", "raw"],
  10766. "additionalProperties": false
  10767. },
  10768. "ToolStateRunning": {
  10769. "type": "object",
  10770. "properties": {
  10771. "status": {
  10772. "type": "string",
  10773. "enum": ["running"]
  10774. },
  10775. "input": {
  10776. "type": "object"
  10777. },
  10778. "title": {
  10779. "type": "string"
  10780. },
  10781. "metadata": {
  10782. "type": "object"
  10783. },
  10784. "time": {
  10785. "type": "object",
  10786. "properties": {
  10787. "start": {
  10788. "type": "integer",
  10789. "minimum": 0
  10790. }
  10791. },
  10792. "required": ["start"],
  10793. "additionalProperties": false
  10794. }
  10795. },
  10796. "required": ["status", "input", "time"],
  10797. "additionalProperties": false
  10798. },
  10799. "ToolStateCompleted": {
  10800. "type": "object",
  10801. "properties": {
  10802. "status": {
  10803. "type": "string",
  10804. "enum": ["completed"]
  10805. },
  10806. "input": {
  10807. "type": "object"
  10808. },
  10809. "output": {
  10810. "type": "string"
  10811. },
  10812. "title": {
  10813. "type": "string"
  10814. },
  10815. "metadata": {
  10816. "type": "object"
  10817. },
  10818. "time": {
  10819. "type": "object",
  10820. "properties": {
  10821. "start": {
  10822. "type": "integer",
  10823. "minimum": 0
  10824. },
  10825. "end": {
  10826. "type": "integer",
  10827. "minimum": 0
  10828. },
  10829. "compacted": {
  10830. "type": "integer",
  10831. "minimum": 0
  10832. }
  10833. },
  10834. "required": ["start", "end"],
  10835. "additionalProperties": false
  10836. },
  10837. "attachments": {
  10838. "type": "array",
  10839. "items": {
  10840. "$ref": "#/components/schemas/FilePart"
  10841. }
  10842. }
  10843. },
  10844. "required": ["status", "input", "output", "title", "metadata", "time"],
  10845. "additionalProperties": false
  10846. },
  10847. "ToolStateError": {
  10848. "type": "object",
  10849. "properties": {
  10850. "status": {
  10851. "type": "string",
  10852. "enum": ["error"]
  10853. },
  10854. "input": {
  10855. "type": "object"
  10856. },
  10857. "error": {
  10858. "type": "string"
  10859. },
  10860. "metadata": {
  10861. "type": "object"
  10862. },
  10863. "time": {
  10864. "type": "object",
  10865. "properties": {
  10866. "start": {
  10867. "type": "integer",
  10868. "minimum": 0
  10869. },
  10870. "end": {
  10871. "type": "integer",
  10872. "minimum": 0
  10873. }
  10874. },
  10875. "required": ["start", "end"],
  10876. "additionalProperties": false
  10877. }
  10878. },
  10879. "required": ["status", "input", "error", "time"],
  10880. "additionalProperties": false
  10881. },
  10882. "ToolState": {
  10883. "anyOf": [
  10884. {
  10885. "$ref": "#/components/schemas/ToolStatePending"
  10886. },
  10887. {
  10888. "$ref": "#/components/schemas/ToolStateRunning"
  10889. },
  10890. {
  10891. "$ref": "#/components/schemas/ToolStateCompleted"
  10892. },
  10893. {
  10894. "$ref": "#/components/schemas/ToolStateError"
  10895. }
  10896. ]
  10897. },
  10898. "ToolPart": {
  10899. "type": "object",
  10900. "properties": {
  10901. "id": {
  10902. "type": "string",
  10903. "pattern": "^prt"
  10904. },
  10905. "sessionID": {
  10906. "type": "string",
  10907. "pattern": "^ses"
  10908. },
  10909. "messageID": {
  10910. "type": "string",
  10911. "pattern": "^msg"
  10912. },
  10913. "type": {
  10914. "type": "string",
  10915. "enum": ["tool"]
  10916. },
  10917. "callID": {
  10918. "type": "string"
  10919. },
  10920. "tool": {
  10921. "type": "string"
  10922. },
  10923. "state": {
  10924. "$ref": "#/components/schemas/ToolState"
  10925. },
  10926. "metadata": {
  10927. "type": "object"
  10928. }
  10929. },
  10930. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10931. "additionalProperties": false
  10932. },
  10933. "StepStartPart": {
  10934. "type": "object",
  10935. "properties": {
  10936. "id": {
  10937. "type": "string",
  10938. "pattern": "^prt"
  10939. },
  10940. "sessionID": {
  10941. "type": "string",
  10942. "pattern": "^ses"
  10943. },
  10944. "messageID": {
  10945. "type": "string",
  10946. "pattern": "^msg"
  10947. },
  10948. "type": {
  10949. "type": "string",
  10950. "enum": ["step-start"]
  10951. },
  10952. "snapshot": {
  10953. "type": "string"
  10954. }
  10955. },
  10956. "required": ["id", "sessionID", "messageID", "type"],
  10957. "additionalProperties": false
  10958. },
  10959. "StepFinishPart": {
  10960. "type": "object",
  10961. "properties": {
  10962. "id": {
  10963. "type": "string",
  10964. "pattern": "^prt"
  10965. },
  10966. "sessionID": {
  10967. "type": "string",
  10968. "pattern": "^ses"
  10969. },
  10970. "messageID": {
  10971. "type": "string",
  10972. "pattern": "^msg"
  10973. },
  10974. "type": {
  10975. "type": "string",
  10976. "enum": ["step-finish"]
  10977. },
  10978. "reason": {
  10979. "type": "string"
  10980. },
  10981. "snapshot": {
  10982. "type": "string"
  10983. },
  10984. "cost": {
  10985. "type": "number"
  10986. },
  10987. "tokens": {
  10988. "type": "object",
  10989. "properties": {
  10990. "total": {
  10991. "type": "number"
  10992. },
  10993. "input": {
  10994. "type": "number"
  10995. },
  10996. "output": {
  10997. "type": "number"
  10998. },
  10999. "reasoning": {
  11000. "type": "number"
  11001. },
  11002. "cache": {
  11003. "type": "object",
  11004. "properties": {
  11005. "read": {
  11006. "type": "number"
  11007. },
  11008. "write": {
  11009. "type": "number"
  11010. }
  11011. },
  11012. "required": ["read", "write"],
  11013. "additionalProperties": false
  11014. }
  11015. },
  11016. "required": ["input", "output", "reasoning", "cache"],
  11017. "additionalProperties": false
  11018. }
  11019. },
  11020. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  11021. "additionalProperties": false
  11022. },
  11023. "SnapshotPart": {
  11024. "type": "object",
  11025. "properties": {
  11026. "id": {
  11027. "type": "string",
  11028. "pattern": "^prt"
  11029. },
  11030. "sessionID": {
  11031. "type": "string",
  11032. "pattern": "^ses"
  11033. },
  11034. "messageID": {
  11035. "type": "string",
  11036. "pattern": "^msg"
  11037. },
  11038. "type": {
  11039. "type": "string",
  11040. "enum": ["snapshot"]
  11041. },
  11042. "snapshot": {
  11043. "type": "string"
  11044. }
  11045. },
  11046. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  11047. "additionalProperties": false
  11048. },
  11049. "PatchPart": {
  11050. "type": "object",
  11051. "properties": {
  11052. "id": {
  11053. "type": "string",
  11054. "pattern": "^prt"
  11055. },
  11056. "sessionID": {
  11057. "type": "string",
  11058. "pattern": "^ses"
  11059. },
  11060. "messageID": {
  11061. "type": "string",
  11062. "pattern": "^msg"
  11063. },
  11064. "type": {
  11065. "type": "string",
  11066. "enum": ["patch"]
  11067. },
  11068. "hash": {
  11069. "type": "string"
  11070. },
  11071. "files": {
  11072. "type": "array",
  11073. "items": {
  11074. "type": "string"
  11075. }
  11076. }
  11077. },
  11078. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  11079. "additionalProperties": false
  11080. },
  11081. "AgentPart": {
  11082. "type": "object",
  11083. "properties": {
  11084. "id": {
  11085. "type": "string",
  11086. "pattern": "^prt"
  11087. },
  11088. "sessionID": {
  11089. "type": "string",
  11090. "pattern": "^ses"
  11091. },
  11092. "messageID": {
  11093. "type": "string",
  11094. "pattern": "^msg"
  11095. },
  11096. "type": {
  11097. "type": "string",
  11098. "enum": ["agent"]
  11099. },
  11100. "name": {
  11101. "type": "string"
  11102. },
  11103. "source": {
  11104. "type": "object",
  11105. "properties": {
  11106. "value": {
  11107. "type": "string"
  11108. },
  11109. "start": {
  11110. "type": "integer",
  11111. "minimum": 0
  11112. },
  11113. "end": {
  11114. "type": "integer",
  11115. "minimum": 0
  11116. }
  11117. },
  11118. "required": ["value", "start", "end"],
  11119. "additionalProperties": false
  11120. }
  11121. },
  11122. "required": ["id", "sessionID", "messageID", "type", "name"],
  11123. "additionalProperties": false
  11124. },
  11125. "RetryPart": {
  11126. "type": "object",
  11127. "properties": {
  11128. "id": {
  11129. "type": "string",
  11130. "pattern": "^prt"
  11131. },
  11132. "sessionID": {
  11133. "type": "string",
  11134. "pattern": "^ses"
  11135. },
  11136. "messageID": {
  11137. "type": "string",
  11138. "pattern": "^msg"
  11139. },
  11140. "type": {
  11141. "type": "string",
  11142. "enum": ["retry"]
  11143. },
  11144. "attempt": {
  11145. "type": "integer",
  11146. "minimum": 0
  11147. },
  11148. "error": {
  11149. "$ref": "#/components/schemas/APIError"
  11150. },
  11151. "time": {
  11152. "type": "object",
  11153. "properties": {
  11154. "created": {
  11155. "type": "integer",
  11156. "minimum": 0
  11157. }
  11158. },
  11159. "required": ["created"],
  11160. "additionalProperties": false
  11161. }
  11162. },
  11163. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  11164. "additionalProperties": false
  11165. },
  11166. "CompactionPart": {
  11167. "type": "object",
  11168. "properties": {
  11169. "id": {
  11170. "type": "string",
  11171. "pattern": "^prt"
  11172. },
  11173. "sessionID": {
  11174. "type": "string",
  11175. "pattern": "^ses"
  11176. },
  11177. "messageID": {
  11178. "type": "string",
  11179. "pattern": "^msg"
  11180. },
  11181. "type": {
  11182. "type": "string",
  11183. "enum": ["compaction"]
  11184. },
  11185. "auto": {
  11186. "type": "boolean"
  11187. },
  11188. "overflow": {
  11189. "type": "boolean"
  11190. },
  11191. "tail_start_id": {
  11192. "type": "string",
  11193. "pattern": "^msg"
  11194. }
  11195. },
  11196. "required": ["id", "sessionID", "messageID", "type", "auto"],
  11197. "additionalProperties": false
  11198. },
  11199. "Part": {
  11200. "anyOf": [
  11201. {
  11202. "$ref": "#/components/schemas/TextPart"
  11203. },
  11204. {
  11205. "$ref": "#/components/schemas/SubtaskPart"
  11206. },
  11207. {
  11208. "$ref": "#/components/schemas/ReasoningPart"
  11209. },
  11210. {
  11211. "$ref": "#/components/schemas/FilePart"
  11212. },
  11213. {
  11214. "$ref": "#/components/schemas/ToolPart"
  11215. },
  11216. {
  11217. "$ref": "#/components/schemas/StepStartPart"
  11218. },
  11219. {
  11220. "$ref": "#/components/schemas/StepFinishPart"
  11221. },
  11222. {
  11223. "$ref": "#/components/schemas/SnapshotPart"
  11224. },
  11225. {
  11226. "$ref": "#/components/schemas/PatchPart"
  11227. },
  11228. {
  11229. "$ref": "#/components/schemas/AgentPart"
  11230. },
  11231. {
  11232. "$ref": "#/components/schemas/RetryPart"
  11233. },
  11234. {
  11235. "$ref": "#/components/schemas/CompactionPart"
  11236. }
  11237. ]
  11238. },
  11239. "PermissionAction": {
  11240. "type": "string",
  11241. "enum": ["allow", "deny", "ask"]
  11242. },
  11243. "PermissionRule": {
  11244. "type": "object",
  11245. "properties": {
  11246. "permission": {
  11247. "type": "string"
  11248. },
  11249. "pattern": {
  11250. "type": "string"
  11251. },
  11252. "action": {
  11253. "$ref": "#/components/schemas/PermissionAction"
  11254. }
  11255. },
  11256. "required": ["permission", "pattern", "action"],
  11257. "additionalProperties": false
  11258. },
  11259. "PermissionRuleset": {
  11260. "type": "array",
  11261. "items": {
  11262. "$ref": "#/components/schemas/PermissionRule"
  11263. }
  11264. },
  11265. "Session": {
  11266. "type": "object",
  11267. "properties": {
  11268. "id": {
  11269. "type": "string",
  11270. "pattern": "^ses"
  11271. },
  11272. "slug": {
  11273. "type": "string"
  11274. },
  11275. "projectID": {
  11276. "type": "string"
  11277. },
  11278. "workspaceID": {
  11279. "type": "string",
  11280. "pattern": "^wrk"
  11281. },
  11282. "directory": {
  11283. "type": "string"
  11284. },
  11285. "path": {
  11286. "type": "string"
  11287. },
  11288. "parentID": {
  11289. "type": "string",
  11290. "pattern": "^ses"
  11291. },
  11292. "summary": {
  11293. "type": "object",
  11294. "properties": {
  11295. "additions": {
  11296. "type": "number"
  11297. },
  11298. "deletions": {
  11299. "type": "number"
  11300. },
  11301. "files": {
  11302. "type": "number"
  11303. },
  11304. "diffs": {
  11305. "type": "array",
  11306. "items": {
  11307. "$ref": "#/components/schemas/SnapshotFileDiff"
  11308. }
  11309. }
  11310. },
  11311. "required": ["additions", "deletions", "files"],
  11312. "additionalProperties": false
  11313. },
  11314. "cost": {
  11315. "type": "number"
  11316. },
  11317. "tokens": {
  11318. "type": "object",
  11319. "properties": {
  11320. "input": {
  11321. "type": "number"
  11322. },
  11323. "output": {
  11324. "type": "number"
  11325. },
  11326. "reasoning": {
  11327. "type": "number"
  11328. },
  11329. "cache": {
  11330. "type": "object",
  11331. "properties": {
  11332. "read": {
  11333. "type": "number"
  11334. },
  11335. "write": {
  11336. "type": "number"
  11337. }
  11338. },
  11339. "required": ["read", "write"],
  11340. "additionalProperties": false
  11341. }
  11342. },
  11343. "required": ["input", "output", "reasoning", "cache"],
  11344. "additionalProperties": false
  11345. },
  11346. "share": {
  11347. "type": "object",
  11348. "properties": {
  11349. "url": {
  11350. "type": "string"
  11351. }
  11352. },
  11353. "required": ["url"],
  11354. "additionalProperties": false
  11355. },
  11356. "title": {
  11357. "type": "string"
  11358. },
  11359. "agent": {
  11360. "type": "string"
  11361. },
  11362. "model": {
  11363. "type": "object",
  11364. "properties": {
  11365. "id": {
  11366. "type": "string"
  11367. },
  11368. "providerID": {
  11369. "type": "string"
  11370. },
  11371. "variant": {
  11372. "type": "string"
  11373. }
  11374. },
  11375. "required": ["id", "providerID"],
  11376. "additionalProperties": false
  11377. },
  11378. "version": {
  11379. "type": "string"
  11380. },
  11381. "time": {
  11382. "type": "object",
  11383. "properties": {
  11384. "created": {
  11385. "type": "integer",
  11386. "minimum": 0
  11387. },
  11388. "updated": {
  11389. "type": "integer",
  11390. "minimum": 0
  11391. },
  11392. "compacting": {
  11393. "type": "integer",
  11394. "minimum": 0
  11395. },
  11396. "archived": {
  11397. "type": "number"
  11398. }
  11399. },
  11400. "required": ["created", "updated"],
  11401. "additionalProperties": false
  11402. },
  11403. "permission": {
  11404. "$ref": "#/components/schemas/PermissionRuleset"
  11405. },
  11406. "revert": {
  11407. "type": "object",
  11408. "properties": {
  11409. "messageID": {
  11410. "type": "string",
  11411. "pattern": "^msg"
  11412. },
  11413. "partID": {
  11414. "type": "string",
  11415. "pattern": "^prt"
  11416. },
  11417. "snapshot": {
  11418. "type": "string"
  11419. },
  11420. "diff": {
  11421. "type": "string"
  11422. }
  11423. },
  11424. "required": ["messageID"],
  11425. "additionalProperties": false
  11426. }
  11427. },
  11428. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11429. "additionalProperties": false
  11430. },
  11431. "Prompt": {
  11432. "type": "object",
  11433. "properties": {
  11434. "text": {
  11435. "type": "string"
  11436. },
  11437. "files": {
  11438. "type": "array",
  11439. "items": {
  11440. "$ref": "#/components/schemas/PromptFileAttachment"
  11441. }
  11442. },
  11443. "agents": {
  11444. "type": "array",
  11445. "items": {
  11446. "$ref": "#/components/schemas/PromptAgentAttachment"
  11447. }
  11448. },
  11449. "references": {
  11450. "type": "array",
  11451. "items": {
  11452. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11453. }
  11454. }
  11455. },
  11456. "required": ["text"],
  11457. "additionalProperties": false
  11458. },
  11459. "GlobalEvent": {
  11460. "type": "object",
  11461. "properties": {
  11462. "directory": {
  11463. "type": "string"
  11464. },
  11465. "project": {
  11466. "type": "string"
  11467. },
  11468. "workspace": {
  11469. "type": "string"
  11470. },
  11471. "payload": {
  11472. "anyOf": [
  11473. {
  11474. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11475. },
  11476. {
  11477. "$ref": "#/components/schemas/Event.tui.command.execute"
  11478. },
  11479. {
  11480. "$ref": "#/components/schemas/Event.tui.toast.show"
  11481. },
  11482. {
  11483. "$ref": "#/components/schemas/Event.tui.session.select"
  11484. },
  11485. {
  11486. "$ref": "#/components/schemas/EventServerConnected"
  11487. },
  11488. {
  11489. "$ref": "#/components/schemas/EventGlobalDisposed"
  11490. },
  11491. {
  11492. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11493. },
  11494. {
  11495. "$ref": "#/components/schemas/EventFileEdited"
  11496. },
  11497. {
  11498. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11499. },
  11500. {
  11501. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11502. },
  11503. {
  11504. "$ref": "#/components/schemas/EventLspUpdated"
  11505. },
  11506. {
  11507. "$ref": "#/components/schemas/EventMessagePartDelta"
  11508. },
  11509. {
  11510. "$ref": "#/components/schemas/EventPermissionAsked"
  11511. },
  11512. {
  11513. "$ref": "#/components/schemas/EventPermissionReplied"
  11514. },
  11515. {
  11516. "$ref": "#/components/schemas/EventSessionDiff"
  11517. },
  11518. {
  11519. "$ref": "#/components/schemas/EventSessionError"
  11520. },
  11521. {
  11522. "$ref": "#/components/schemas/EventQuestionAsked"
  11523. },
  11524. {
  11525. "$ref": "#/components/schemas/EventQuestionReplied"
  11526. },
  11527. {
  11528. "$ref": "#/components/schemas/EventQuestionRejected"
  11529. },
  11530. {
  11531. "$ref": "#/components/schemas/EventTodoUpdated"
  11532. },
  11533. {
  11534. "$ref": "#/components/schemas/EventSessionStatus"
  11535. },
  11536. {
  11537. "$ref": "#/components/schemas/EventSessionIdle"
  11538. },
  11539. {
  11540. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11541. },
  11542. {
  11543. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11544. },
  11545. {
  11546. "$ref": "#/components/schemas/EventCommandExecuted"
  11547. },
  11548. {
  11549. "$ref": "#/components/schemas/EventProjectUpdated"
  11550. },
  11551. {
  11552. "$ref": "#/components/schemas/EventSessionCompacted"
  11553. },
  11554. {
  11555. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11556. },
  11557. {
  11558. "$ref": "#/components/schemas/EventWorkspaceReady"
  11559. },
  11560. {
  11561. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11562. },
  11563. {
  11564. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11565. },
  11566. {
  11567. "$ref": "#/components/schemas/EventWorktreeReady"
  11568. },
  11569. {
  11570. "$ref": "#/components/schemas/EventWorktreeFailed"
  11571. },
  11572. {
  11573. "$ref": "#/components/schemas/EventPtyCreated"
  11574. },
  11575. {
  11576. "$ref": "#/components/schemas/EventPtyUpdated"
  11577. },
  11578. {
  11579. "$ref": "#/components/schemas/EventPtyExited"
  11580. },
  11581. {
  11582. "$ref": "#/components/schemas/EventPtyDeleted"
  11583. },
  11584. {
  11585. "$ref": "#/components/schemas/EventInstallationUpdated"
  11586. },
  11587. {
  11588. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11589. },
  11590. {
  11591. "$ref": "#/components/schemas/EventMessageUpdated"
  11592. },
  11593. {
  11594. "$ref": "#/components/schemas/EventMessageRemoved"
  11595. },
  11596. {
  11597. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11598. },
  11599. {
  11600. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11601. },
  11602. {
  11603. "$ref": "#/components/schemas/EventSessionCreated"
  11604. },
  11605. {
  11606. "$ref": "#/components/schemas/EventSessionUpdated"
  11607. },
  11608. {
  11609. "$ref": "#/components/schemas/EventSessionDeleted"
  11610. },
  11611. {
  11612. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11613. },
  11614. {
  11615. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11616. },
  11617. {
  11618. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11619. },
  11620. {
  11621. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11622. },
  11623. {
  11624. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11625. },
  11626. {
  11627. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11628. },
  11629. {
  11630. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11631. },
  11632. {
  11633. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11634. },
  11635. {
  11636. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11637. },
  11638. {
  11639. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11640. },
  11641. {
  11642. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11643. },
  11644. {
  11645. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11646. },
  11647. {
  11648. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11649. },
  11650. {
  11651. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11652. },
  11653. {
  11654. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11655. },
  11656. {
  11657. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11658. },
  11659. {
  11660. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11661. },
  11662. {
  11663. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11664. },
  11665. {
  11666. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11667. },
  11668. {
  11669. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11670. },
  11671. {
  11672. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11673. },
  11674. {
  11675. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11676. },
  11677. {
  11678. "$ref": "#/components/schemas/EventSessionNextRetried"
  11679. },
  11680. {
  11681. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11682. },
  11683. {
  11684. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11685. },
  11686. {
  11687. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11688. },
  11689. {
  11690. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11691. },
  11692. {
  11693. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11694. },
  11695. {
  11696. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11697. },
  11698. {
  11699. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11700. },
  11701. {
  11702. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11703. },
  11704. {
  11705. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11706. },
  11707. {
  11708. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11709. },
  11710. {
  11711. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11712. },
  11713. {
  11714. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11715. },
  11716. {
  11717. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11718. },
  11719. {
  11720. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11721. },
  11722. {
  11723. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11724. },
  11725. {
  11726. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11727. },
  11728. {
  11729. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11730. },
  11731. {
  11732. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11733. },
  11734. {
  11735. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11736. },
  11737. {
  11738. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11739. },
  11740. {
  11741. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11742. },
  11743. {
  11744. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11745. },
  11746. {
  11747. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11748. },
  11749. {
  11750. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11751. },
  11752. {
  11753. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11754. },
  11755. {
  11756. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11757. },
  11758. {
  11759. "$ref": "#/components/schemas/EventSessionNextRetried"
  11760. },
  11761. {
  11762. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11763. },
  11764. {
  11765. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11766. },
  11767. {
  11768. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11769. },
  11770. {
  11771. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11772. },
  11773. {
  11774. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11775. },
  11776. {
  11777. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11778. },
  11779. {
  11780. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11781. },
  11782. {
  11783. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11784. },
  11785. {
  11786. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11787. },
  11788. {
  11789. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11790. },
  11791. {
  11792. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11793. },
  11794. {
  11795. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11796. },
  11797. {
  11798. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11799. },
  11800. {
  11801. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11802. },
  11803. {
  11804. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11805. },
  11806. {
  11807. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11808. },
  11809. {
  11810. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11811. },
  11812. {
  11813. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11814. },
  11815. {
  11816. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11817. },
  11818. {
  11819. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11820. },
  11821. {
  11822. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11823. },
  11824. {
  11825. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11826. },
  11827. {
  11828. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11829. },
  11830. {
  11831. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11832. },
  11833. {
  11834. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11835. },
  11836. {
  11837. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11838. },
  11839. {
  11840. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11841. },
  11842. {
  11843. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11844. },
  11845. {
  11846. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11847. },
  11848. {
  11849. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11850. },
  11851. {
  11852. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11853. },
  11854. {
  11855. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11856. },
  11857. {
  11858. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11859. },
  11860. {
  11861. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11862. },
  11863. {
  11864. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11865. },
  11866. {
  11867. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11868. }
  11869. ]
  11870. }
  11871. },
  11872. "required": ["directory", "payload"],
  11873. "additionalProperties": false
  11874. },
  11875. "LogLevel": {
  11876. "type": "string",
  11877. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11878. "description": "Log level"
  11879. },
  11880. "ServerConfig": {
  11881. "type": "object",
  11882. "properties": {
  11883. "port": {
  11884. "type": "integer",
  11885. "exclusiveMinimum": 0
  11886. },
  11887. "hostname": {
  11888. "type": "string"
  11889. },
  11890. "mdns": {
  11891. "type": "boolean"
  11892. },
  11893. "mdnsDomain": {
  11894. "type": "string"
  11895. },
  11896. "cors": {
  11897. "type": "array",
  11898. "items": {
  11899. "type": "string"
  11900. }
  11901. }
  11902. },
  11903. "additionalProperties": false,
  11904. "description": "Server configuration for opencode serve and web commands"
  11905. },
  11906. "ReferenceConfigEntry": {
  11907. "anyOf": [
  11908. {
  11909. "type": "string"
  11910. },
  11911. {
  11912. "type": "object",
  11913. "properties": {
  11914. "repository": {
  11915. "type": "string",
  11916. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11917. },
  11918. "branch": {
  11919. "type": "string"
  11920. }
  11921. },
  11922. "required": ["repository"],
  11923. "additionalProperties": false
  11924. },
  11925. {
  11926. "type": "object",
  11927. "properties": {
  11928. "path": {
  11929. "type": "string",
  11930. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11931. }
  11932. },
  11933. "required": ["path"],
  11934. "additionalProperties": false
  11935. }
  11936. ]
  11937. },
  11938. "ReferenceConfig": {
  11939. "type": "object",
  11940. "additionalProperties": {
  11941. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11942. }
  11943. },
  11944. "PermissionActionConfig": {
  11945. "type": "string",
  11946. "enum": ["ask", "allow", "deny"]
  11947. },
  11948. "PermissionObjectConfig": {
  11949. "type": "object",
  11950. "additionalProperties": {
  11951. "$ref": "#/components/schemas/PermissionActionConfig"
  11952. }
  11953. },
  11954. "PermissionRuleConfig": {
  11955. "anyOf": [
  11956. {
  11957. "$ref": "#/components/schemas/PermissionActionConfig"
  11958. },
  11959. {
  11960. "$ref": "#/components/schemas/PermissionObjectConfig"
  11961. }
  11962. ]
  11963. },
  11964. "PermissionConfig": {
  11965. "anyOf": [
  11966. {
  11967. "$ref": "#/components/schemas/PermissionActionConfig"
  11968. },
  11969. {
  11970. "type": "object",
  11971. "properties": {
  11972. "read": {
  11973. "$ref": "#/components/schemas/PermissionRuleConfig"
  11974. },
  11975. "edit": {
  11976. "$ref": "#/components/schemas/PermissionRuleConfig"
  11977. },
  11978. "glob": {
  11979. "$ref": "#/components/schemas/PermissionRuleConfig"
  11980. },
  11981. "grep": {
  11982. "$ref": "#/components/schemas/PermissionRuleConfig"
  11983. },
  11984. "list": {
  11985. "$ref": "#/components/schemas/PermissionRuleConfig"
  11986. },
  11987. "bash": {
  11988. "$ref": "#/components/schemas/PermissionRuleConfig"
  11989. },
  11990. "task": {
  11991. "$ref": "#/components/schemas/PermissionRuleConfig"
  11992. },
  11993. "external_directory": {
  11994. "$ref": "#/components/schemas/PermissionRuleConfig"
  11995. },
  11996. "todowrite": {
  11997. "$ref": "#/components/schemas/PermissionActionConfig"
  11998. },
  11999. "question": {
  12000. "$ref": "#/components/schemas/PermissionActionConfig"
  12001. },
  12002. "webfetch": {
  12003. "$ref": "#/components/schemas/PermissionActionConfig"
  12004. },
  12005. "websearch": {
  12006. "$ref": "#/components/schemas/PermissionActionConfig"
  12007. },
  12008. "repo_clone": {
  12009. "$ref": "#/components/schemas/PermissionRuleConfig"
  12010. },
  12011. "repo_overview": {
  12012. "$ref": "#/components/schemas/PermissionRuleConfig"
  12013. },
  12014. "lsp": {
  12015. "$ref": "#/components/schemas/PermissionRuleConfig"
  12016. },
  12017. "doom_loop": {
  12018. "$ref": "#/components/schemas/PermissionActionConfig"
  12019. },
  12020. "skill": {
  12021. "$ref": "#/components/schemas/PermissionRuleConfig"
  12022. }
  12023. },
  12024. "additionalProperties": {
  12025. "$ref": "#/components/schemas/PermissionRuleConfig"
  12026. }
  12027. }
  12028. ]
  12029. },
  12030. "AgentConfig": {
  12031. "type": "object",
  12032. "properties": {
  12033. "model": {
  12034. "type": "string"
  12035. },
  12036. "variant": {
  12037. "type": "string"
  12038. },
  12039. "temperature": {
  12040. "type": "number"
  12041. },
  12042. "top_p": {
  12043. "type": "number"
  12044. },
  12045. "prompt": {
  12046. "type": "string"
  12047. },
  12048. "tools": {
  12049. "type": "object",
  12050. "additionalProperties": {
  12051. "type": "boolean"
  12052. }
  12053. },
  12054. "disable": {
  12055. "type": "boolean"
  12056. },
  12057. "description": {
  12058. "type": "string"
  12059. },
  12060. "mode": {
  12061. "type": "string",
  12062. "enum": ["subagent", "primary", "all"]
  12063. },
  12064. "hidden": {
  12065. "type": "boolean"
  12066. },
  12067. "options": {
  12068. "type": "object"
  12069. },
  12070. "color": {
  12071. "anyOf": [
  12072. {
  12073. "type": "string",
  12074. "pattern": "^#[0-9a-fA-F]{6}$"
  12075. },
  12076. {
  12077. "type": "string",
  12078. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  12079. }
  12080. ],
  12081. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  12082. },
  12083. "steps": {
  12084. "type": "integer",
  12085. "exclusiveMinimum": 0
  12086. },
  12087. "maxSteps": {
  12088. "type": "integer",
  12089. "exclusiveMinimum": 0
  12090. },
  12091. "permission": {
  12092. "$ref": "#/components/schemas/PermissionConfig"
  12093. }
  12094. },
  12095. "additionalProperties": {}
  12096. },
  12097. "ProviderConfig": {
  12098. "type": "object",
  12099. "properties": {
  12100. "api": {
  12101. "type": "string"
  12102. },
  12103. "name": {
  12104. "type": "string"
  12105. },
  12106. "env": {
  12107. "type": "array",
  12108. "items": {
  12109. "type": "string"
  12110. }
  12111. },
  12112. "id": {
  12113. "type": "string"
  12114. },
  12115. "npm": {
  12116. "type": "string"
  12117. },
  12118. "whitelist": {
  12119. "type": "array",
  12120. "items": {
  12121. "type": "string"
  12122. }
  12123. },
  12124. "blacklist": {
  12125. "type": "array",
  12126. "items": {
  12127. "type": "string"
  12128. }
  12129. },
  12130. "options": {
  12131. "type": "object",
  12132. "properties": {
  12133. "apiKey": {
  12134. "type": "string"
  12135. },
  12136. "baseURL": {
  12137. "type": "string"
  12138. },
  12139. "enterpriseUrl": {
  12140. "type": "string"
  12141. },
  12142. "setCacheKey": {
  12143. "type": "boolean"
  12144. },
  12145. "timeout": {
  12146. "anyOf": [
  12147. {
  12148. "type": "integer",
  12149. "exclusiveMinimum": 0
  12150. },
  12151. {
  12152. "type": "boolean",
  12153. "enum": [false]
  12154. }
  12155. ],
  12156. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  12157. },
  12158. "chunkTimeout": {
  12159. "type": "integer",
  12160. "exclusiveMinimum": 0
  12161. }
  12162. },
  12163. "additionalProperties": {}
  12164. },
  12165. "models": {
  12166. "type": "object",
  12167. "additionalProperties": {
  12168. "type": "object",
  12169. "properties": {
  12170. "id": {
  12171. "type": "string"
  12172. },
  12173. "name": {
  12174. "type": "string"
  12175. },
  12176. "family": {
  12177. "type": "string"
  12178. },
  12179. "release_date": {
  12180. "type": "string"
  12181. },
  12182. "attachment": {
  12183. "type": "boolean"
  12184. },
  12185. "reasoning": {
  12186. "type": "boolean"
  12187. },
  12188. "temperature": {
  12189. "type": "boolean"
  12190. },
  12191. "tool_call": {
  12192. "type": "boolean"
  12193. },
  12194. "interleaved": {
  12195. "anyOf": [
  12196. {
  12197. "type": "boolean",
  12198. "enum": [true]
  12199. },
  12200. {
  12201. "type": "object",
  12202. "properties": {
  12203. "field": {
  12204. "type": "string",
  12205. "enum": ["reasoning_content", "reasoning_details"]
  12206. }
  12207. },
  12208. "required": ["field"],
  12209. "additionalProperties": false
  12210. }
  12211. ]
  12212. },
  12213. "cost": {
  12214. "type": "object",
  12215. "properties": {
  12216. "input": {
  12217. "type": "number"
  12218. },
  12219. "output": {
  12220. "type": "number"
  12221. },
  12222. "cache_read": {
  12223. "type": "number"
  12224. },
  12225. "cache_write": {
  12226. "type": "number"
  12227. },
  12228. "context_over_200k": {
  12229. "type": "object",
  12230. "properties": {
  12231. "input": {
  12232. "type": "number"
  12233. },
  12234. "output": {
  12235. "type": "number"
  12236. },
  12237. "cache_read": {
  12238. "type": "number"
  12239. },
  12240. "cache_write": {
  12241. "type": "number"
  12242. }
  12243. },
  12244. "required": ["input", "output"],
  12245. "additionalProperties": false
  12246. }
  12247. },
  12248. "required": ["input", "output"],
  12249. "additionalProperties": false
  12250. },
  12251. "limit": {
  12252. "type": "object",
  12253. "properties": {
  12254. "context": {
  12255. "type": "number"
  12256. },
  12257. "input": {
  12258. "type": "number"
  12259. },
  12260. "output": {
  12261. "type": "number"
  12262. }
  12263. },
  12264. "required": ["context", "output"],
  12265. "additionalProperties": false
  12266. },
  12267. "modalities": {
  12268. "type": "object",
  12269. "properties": {
  12270. "input": {
  12271. "type": "array",
  12272. "items": {
  12273. "type": "string",
  12274. "enum": ["text", "audio", "image", "video", "pdf"]
  12275. }
  12276. },
  12277. "output": {
  12278. "type": "array",
  12279. "items": {
  12280. "type": "string",
  12281. "enum": ["text", "audio", "image", "video", "pdf"]
  12282. }
  12283. }
  12284. },
  12285. "required": ["input", "output"],
  12286. "additionalProperties": false
  12287. },
  12288. "experimental": {
  12289. "type": "boolean"
  12290. },
  12291. "status": {
  12292. "type": "string",
  12293. "enum": ["alpha", "beta", "deprecated", "active"]
  12294. },
  12295. "provider": {
  12296. "type": "object",
  12297. "properties": {
  12298. "npm": {
  12299. "type": "string"
  12300. },
  12301. "api": {
  12302. "type": "string"
  12303. }
  12304. },
  12305. "additionalProperties": false
  12306. },
  12307. "options": {
  12308. "type": "object"
  12309. },
  12310. "headers": {
  12311. "type": "object",
  12312. "additionalProperties": {
  12313. "type": "string"
  12314. }
  12315. },
  12316. "variants": {
  12317. "type": "object",
  12318. "additionalProperties": {
  12319. "type": "object",
  12320. "properties": {
  12321. "disabled": {
  12322. "type": "boolean"
  12323. }
  12324. },
  12325. "additionalProperties": {}
  12326. },
  12327. "description": "Variant-specific configuration"
  12328. }
  12329. },
  12330. "additionalProperties": false
  12331. }
  12332. }
  12333. },
  12334. "additionalProperties": false
  12335. },
  12336. "McpLocalConfig": {
  12337. "type": "object",
  12338. "properties": {
  12339. "type": {
  12340. "type": "string",
  12341. "enum": ["local"],
  12342. "description": "Type of MCP server connection"
  12343. },
  12344. "command": {
  12345. "type": "array",
  12346. "items": {
  12347. "type": "string"
  12348. },
  12349. "description": "Command and arguments to run the MCP server"
  12350. },
  12351. "environment": {
  12352. "type": "object",
  12353. "additionalProperties": {
  12354. "type": "string"
  12355. }
  12356. },
  12357. "enabled": {
  12358. "type": "boolean"
  12359. },
  12360. "timeout": {
  12361. "type": "integer",
  12362. "exclusiveMinimum": 0
  12363. }
  12364. },
  12365. "required": ["type", "command"],
  12366. "additionalProperties": false
  12367. },
  12368. "McpOAuthConfig": {
  12369. "type": "object",
  12370. "properties": {
  12371. "clientId": {
  12372. "type": "string"
  12373. },
  12374. "clientSecret": {
  12375. "type": "string"
  12376. },
  12377. "scope": {
  12378. "type": "string"
  12379. },
  12380. "redirectUri": {
  12381. "type": "string"
  12382. }
  12383. },
  12384. "additionalProperties": false
  12385. },
  12386. "McpRemoteConfig": {
  12387. "type": "object",
  12388. "properties": {
  12389. "type": {
  12390. "type": "string",
  12391. "enum": ["remote"],
  12392. "description": "Type of MCP server connection"
  12393. },
  12394. "url": {
  12395. "type": "string",
  12396. "description": "URL of the remote MCP server"
  12397. },
  12398. "enabled": {
  12399. "type": "boolean"
  12400. },
  12401. "headers": {
  12402. "type": "object",
  12403. "additionalProperties": {
  12404. "type": "string"
  12405. }
  12406. },
  12407. "oauth": {
  12408. "anyOf": [
  12409. {
  12410. "$ref": "#/components/schemas/McpOAuthConfig"
  12411. },
  12412. {
  12413. "type": "boolean",
  12414. "enum": [false]
  12415. }
  12416. ],
  12417. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12418. },
  12419. "timeout": {
  12420. "type": "integer",
  12421. "exclusiveMinimum": 0
  12422. }
  12423. },
  12424. "required": ["type", "url"],
  12425. "additionalProperties": false
  12426. },
  12427. "LayoutConfig": {
  12428. "type": "string",
  12429. "enum": ["auto", "stretch"],
  12430. "description": "@deprecated Always uses stretch layout."
  12431. },
  12432. "ImageAttachmentConfig": {
  12433. "type": "object",
  12434. "properties": {
  12435. "auto_resize": {
  12436. "type": "boolean"
  12437. },
  12438. "max_width": {
  12439. "type": "integer",
  12440. "exclusiveMinimum": 0
  12441. },
  12442. "max_height": {
  12443. "type": "integer",
  12444. "exclusiveMinimum": 0
  12445. },
  12446. "max_base64_bytes": {
  12447. "type": "integer",
  12448. "exclusiveMinimum": 0
  12449. }
  12450. },
  12451. "additionalProperties": false
  12452. },
  12453. "AttachmentConfig": {
  12454. "type": "object",
  12455. "properties": {
  12456. "image": {
  12457. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12458. }
  12459. },
  12460. "additionalProperties": false
  12461. },
  12462. "Config": {
  12463. "type": "object",
  12464. "properties": {
  12465. "$schema": {
  12466. "type": "string"
  12467. },
  12468. "shell": {
  12469. "type": "string"
  12470. },
  12471. "logLevel": {
  12472. "$ref": "#/components/schemas/LogLevel"
  12473. },
  12474. "server": {
  12475. "$ref": "#/components/schemas/ServerConfig"
  12476. },
  12477. "command": {
  12478. "type": "object",
  12479. "additionalProperties": {
  12480. "type": "object",
  12481. "properties": {
  12482. "template": {
  12483. "type": "string"
  12484. },
  12485. "description": {
  12486. "type": "string"
  12487. },
  12488. "agent": {
  12489. "type": "string"
  12490. },
  12491. "model": {
  12492. "type": "string"
  12493. },
  12494. "subtask": {
  12495. "type": "boolean"
  12496. }
  12497. },
  12498. "required": ["template"],
  12499. "additionalProperties": false
  12500. }
  12501. },
  12502. "skills": {
  12503. "type": "object",
  12504. "properties": {
  12505. "paths": {
  12506. "type": "array",
  12507. "items": {
  12508. "type": "string"
  12509. }
  12510. },
  12511. "urls": {
  12512. "type": "array",
  12513. "items": {
  12514. "type": "string"
  12515. }
  12516. }
  12517. },
  12518. "additionalProperties": false
  12519. },
  12520. "reference": {
  12521. "$ref": "#/components/schemas/ReferenceConfig"
  12522. },
  12523. "watcher": {
  12524. "type": "object",
  12525. "properties": {
  12526. "ignore": {
  12527. "type": "array",
  12528. "items": {
  12529. "type": "string"
  12530. }
  12531. }
  12532. },
  12533. "additionalProperties": false
  12534. },
  12535. "snapshot": {
  12536. "type": "boolean"
  12537. },
  12538. "plugin": {
  12539. "type": "array",
  12540. "items": {
  12541. "anyOf": [
  12542. {
  12543. "type": "string"
  12544. },
  12545. {
  12546. "type": "array",
  12547. "prefixItems": [
  12548. {
  12549. "type": "string"
  12550. },
  12551. {
  12552. "type": "object"
  12553. }
  12554. ],
  12555. "maxItems": 2,
  12556. "minItems": 2
  12557. }
  12558. ]
  12559. }
  12560. },
  12561. "share": {
  12562. "type": "string",
  12563. "enum": ["manual", "auto", "disabled"]
  12564. },
  12565. "autoshare": {
  12566. "type": "boolean"
  12567. },
  12568. "autoupdate": {
  12569. "anyOf": [
  12570. {
  12571. "type": "boolean"
  12572. },
  12573. {
  12574. "type": "string",
  12575. "enum": ["notify"]
  12576. }
  12577. ],
  12578. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12579. },
  12580. "disabled_providers": {
  12581. "type": "array",
  12582. "items": {
  12583. "type": "string"
  12584. }
  12585. },
  12586. "enabled_providers": {
  12587. "type": "array",
  12588. "items": {
  12589. "type": "string"
  12590. }
  12591. },
  12592. "model": {
  12593. "type": "string"
  12594. },
  12595. "small_model": {
  12596. "type": "string"
  12597. },
  12598. "default_agent": {
  12599. "type": "string"
  12600. },
  12601. "username": {
  12602. "type": "string"
  12603. },
  12604. "mode": {
  12605. "type": "object",
  12606. "properties": {
  12607. "build": {
  12608. "$ref": "#/components/schemas/AgentConfig"
  12609. },
  12610. "plan": {
  12611. "$ref": "#/components/schemas/AgentConfig"
  12612. }
  12613. },
  12614. "additionalProperties": {
  12615. "$ref": "#/components/schemas/AgentConfig"
  12616. }
  12617. },
  12618. "agent": {
  12619. "type": "object",
  12620. "properties": {
  12621. "plan": {
  12622. "$ref": "#/components/schemas/AgentConfig"
  12623. },
  12624. "build": {
  12625. "$ref": "#/components/schemas/AgentConfig"
  12626. },
  12627. "general": {
  12628. "$ref": "#/components/schemas/AgentConfig"
  12629. },
  12630. "explore": {
  12631. "$ref": "#/components/schemas/AgentConfig"
  12632. },
  12633. "scout": {
  12634. "$ref": "#/components/schemas/AgentConfig"
  12635. },
  12636. "title": {
  12637. "$ref": "#/components/schemas/AgentConfig"
  12638. },
  12639. "summary": {
  12640. "$ref": "#/components/schemas/AgentConfig"
  12641. },
  12642. "compaction": {
  12643. "$ref": "#/components/schemas/AgentConfig"
  12644. }
  12645. },
  12646. "additionalProperties": {
  12647. "$ref": "#/components/schemas/AgentConfig"
  12648. }
  12649. },
  12650. "provider": {
  12651. "type": "object",
  12652. "additionalProperties": {
  12653. "$ref": "#/components/schemas/ProviderConfig"
  12654. }
  12655. },
  12656. "mcp": {
  12657. "type": "object",
  12658. "additionalProperties": {
  12659. "anyOf": [
  12660. {
  12661. "$ref": "#/components/schemas/McpLocalConfig"
  12662. },
  12663. {
  12664. "$ref": "#/components/schemas/McpRemoteConfig"
  12665. },
  12666. {
  12667. "type": "object",
  12668. "properties": {
  12669. "enabled": {
  12670. "type": "boolean"
  12671. }
  12672. },
  12673. "required": ["enabled"],
  12674. "additionalProperties": false
  12675. }
  12676. ]
  12677. }
  12678. },
  12679. "formatter": {
  12680. "anyOf": [
  12681. {
  12682. "type": "boolean"
  12683. },
  12684. {
  12685. "type": "object",
  12686. "additionalProperties": {
  12687. "type": "object",
  12688. "properties": {
  12689. "disabled": {
  12690. "type": "boolean"
  12691. },
  12692. "command": {
  12693. "type": "array",
  12694. "items": {
  12695. "type": "string"
  12696. }
  12697. },
  12698. "environment": {
  12699. "type": "object",
  12700. "additionalProperties": {
  12701. "type": "string"
  12702. }
  12703. },
  12704. "extensions": {
  12705. "type": "array",
  12706. "items": {
  12707. "type": "string"
  12708. }
  12709. }
  12710. },
  12711. "additionalProperties": false
  12712. }
  12713. }
  12714. ],
  12715. "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."
  12716. },
  12717. "lsp": {
  12718. "anyOf": [
  12719. {
  12720. "type": "boolean"
  12721. },
  12722. {
  12723. "type": "object",
  12724. "additionalProperties": {
  12725. "anyOf": [
  12726. {
  12727. "type": "object",
  12728. "properties": {
  12729. "disabled": {
  12730. "type": "boolean",
  12731. "enum": [true]
  12732. }
  12733. },
  12734. "required": ["disabled"],
  12735. "additionalProperties": false
  12736. },
  12737. {
  12738. "type": "object",
  12739. "properties": {
  12740. "command": {
  12741. "type": "array",
  12742. "items": {
  12743. "type": "string"
  12744. }
  12745. },
  12746. "extensions": {
  12747. "type": "array",
  12748. "items": {
  12749. "type": "string"
  12750. }
  12751. },
  12752. "disabled": {
  12753. "type": "boolean"
  12754. },
  12755. "env": {
  12756. "type": "object",
  12757. "additionalProperties": {
  12758. "type": "string"
  12759. }
  12760. },
  12761. "initialization": {
  12762. "type": "object"
  12763. }
  12764. },
  12765. "required": ["command"],
  12766. "additionalProperties": false
  12767. }
  12768. ]
  12769. }
  12770. }
  12771. ],
  12772. "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."
  12773. },
  12774. "instructions": {
  12775. "type": "array",
  12776. "items": {
  12777. "type": "string"
  12778. }
  12779. },
  12780. "layout": {
  12781. "$ref": "#/components/schemas/LayoutConfig"
  12782. },
  12783. "permission": {
  12784. "$ref": "#/components/schemas/PermissionConfig"
  12785. },
  12786. "tools": {
  12787. "type": "object",
  12788. "additionalProperties": {
  12789. "type": "boolean"
  12790. }
  12791. },
  12792. "attachment": {
  12793. "$ref": "#/components/schemas/AttachmentConfig"
  12794. },
  12795. "enterprise": {
  12796. "type": "object",
  12797. "properties": {
  12798. "url": {
  12799. "type": "string"
  12800. }
  12801. },
  12802. "additionalProperties": false
  12803. },
  12804. "tool_output": {
  12805. "type": "object",
  12806. "properties": {
  12807. "max_lines": {
  12808. "type": "integer",
  12809. "exclusiveMinimum": 0
  12810. },
  12811. "max_bytes": {
  12812. "type": "integer",
  12813. "exclusiveMinimum": 0
  12814. }
  12815. },
  12816. "additionalProperties": false
  12817. },
  12818. "compaction": {
  12819. "type": "object",
  12820. "properties": {
  12821. "auto": {
  12822. "type": "boolean"
  12823. },
  12824. "prune": {
  12825. "type": "boolean"
  12826. },
  12827. "tail_turns": {
  12828. "type": "integer",
  12829. "minimum": 0
  12830. },
  12831. "preserve_recent_tokens": {
  12832. "type": "integer",
  12833. "minimum": 0
  12834. },
  12835. "reserved": {
  12836. "type": "integer",
  12837. "minimum": 0
  12838. }
  12839. },
  12840. "additionalProperties": false
  12841. },
  12842. "experimental": {
  12843. "type": "object",
  12844. "properties": {
  12845. "disable_paste_summary": {
  12846. "type": "boolean"
  12847. },
  12848. "batch_tool": {
  12849. "type": "boolean"
  12850. },
  12851. "openTelemetry": {
  12852. "type": "boolean"
  12853. },
  12854. "primary_tools": {
  12855. "type": "array",
  12856. "items": {
  12857. "type": "string"
  12858. }
  12859. },
  12860. "continue_loop_on_deny": {
  12861. "type": "boolean"
  12862. },
  12863. "mcp_timeout": {
  12864. "type": "integer",
  12865. "exclusiveMinimum": 0
  12866. }
  12867. },
  12868. "additionalProperties": false
  12869. }
  12870. },
  12871. "additionalProperties": false
  12872. },
  12873. "Model": {
  12874. "type": "object",
  12875. "properties": {
  12876. "id": {
  12877. "type": "string"
  12878. },
  12879. "providerID": {
  12880. "type": "string"
  12881. },
  12882. "api": {
  12883. "type": "object",
  12884. "properties": {
  12885. "id": {
  12886. "type": "string"
  12887. },
  12888. "url": {
  12889. "type": "string"
  12890. },
  12891. "npm": {
  12892. "type": "string"
  12893. }
  12894. },
  12895. "required": ["id", "url", "npm"],
  12896. "additionalProperties": false
  12897. },
  12898. "name": {
  12899. "type": "string"
  12900. },
  12901. "family": {
  12902. "type": "string"
  12903. },
  12904. "capabilities": {
  12905. "type": "object",
  12906. "properties": {
  12907. "temperature": {
  12908. "type": "boolean"
  12909. },
  12910. "reasoning": {
  12911. "type": "boolean"
  12912. },
  12913. "attachment": {
  12914. "type": "boolean"
  12915. },
  12916. "toolcall": {
  12917. "type": "boolean"
  12918. },
  12919. "input": {
  12920. "type": "object",
  12921. "properties": {
  12922. "text": {
  12923. "type": "boolean"
  12924. },
  12925. "audio": {
  12926. "type": "boolean"
  12927. },
  12928. "image": {
  12929. "type": "boolean"
  12930. },
  12931. "video": {
  12932. "type": "boolean"
  12933. },
  12934. "pdf": {
  12935. "type": "boolean"
  12936. }
  12937. },
  12938. "required": ["text", "audio", "image", "video", "pdf"],
  12939. "additionalProperties": false
  12940. },
  12941. "output": {
  12942. "type": "object",
  12943. "properties": {
  12944. "text": {
  12945. "type": "boolean"
  12946. },
  12947. "audio": {
  12948. "type": "boolean"
  12949. },
  12950. "image": {
  12951. "type": "boolean"
  12952. },
  12953. "video": {
  12954. "type": "boolean"
  12955. },
  12956. "pdf": {
  12957. "type": "boolean"
  12958. }
  12959. },
  12960. "required": ["text", "audio", "image", "video", "pdf"],
  12961. "additionalProperties": false
  12962. },
  12963. "interleaved": {
  12964. "anyOf": [
  12965. {
  12966. "type": "boolean"
  12967. },
  12968. {
  12969. "type": "object",
  12970. "properties": {
  12971. "field": {
  12972. "type": "string",
  12973. "enum": ["reasoning_content", "reasoning_details"]
  12974. }
  12975. },
  12976. "required": ["field"],
  12977. "additionalProperties": false
  12978. }
  12979. ]
  12980. }
  12981. },
  12982. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12983. "additionalProperties": false
  12984. },
  12985. "cost": {
  12986. "type": "object",
  12987. "properties": {
  12988. "input": {
  12989. "type": "number"
  12990. },
  12991. "output": {
  12992. "type": "number"
  12993. },
  12994. "cache": {
  12995. "type": "object",
  12996. "properties": {
  12997. "read": {
  12998. "type": "number"
  12999. },
  13000. "write": {
  13001. "type": "number"
  13002. }
  13003. },
  13004. "required": ["read", "write"],
  13005. "additionalProperties": false
  13006. },
  13007. "tiers": {
  13008. "type": "array",
  13009. "items": {
  13010. "type": "object",
  13011. "properties": {
  13012. "input": {
  13013. "type": "number"
  13014. },
  13015. "output": {
  13016. "type": "number"
  13017. },
  13018. "cache": {
  13019. "type": "object",
  13020. "properties": {
  13021. "read": {
  13022. "type": "number"
  13023. },
  13024. "write": {
  13025. "type": "number"
  13026. }
  13027. },
  13028. "required": ["read", "write"],
  13029. "additionalProperties": false
  13030. },
  13031. "tier": {
  13032. "type": "object",
  13033. "properties": {
  13034. "type": {
  13035. "type": "string",
  13036. "enum": ["context"]
  13037. },
  13038. "size": {
  13039. "type": "number"
  13040. }
  13041. },
  13042. "required": ["type", "size"],
  13043. "additionalProperties": false
  13044. }
  13045. },
  13046. "required": ["input", "output", "cache", "tier"],
  13047. "additionalProperties": false
  13048. }
  13049. },
  13050. "experimentalOver200K": {
  13051. "type": "object",
  13052. "properties": {
  13053. "input": {
  13054. "type": "number"
  13055. },
  13056. "output": {
  13057. "type": "number"
  13058. },
  13059. "cache": {
  13060. "type": "object",
  13061. "properties": {
  13062. "read": {
  13063. "type": "number"
  13064. },
  13065. "write": {
  13066. "type": "number"
  13067. }
  13068. },
  13069. "required": ["read", "write"],
  13070. "additionalProperties": false
  13071. }
  13072. },
  13073. "required": ["input", "output", "cache"],
  13074. "additionalProperties": false
  13075. }
  13076. },
  13077. "required": ["input", "output", "cache"],
  13078. "additionalProperties": false
  13079. },
  13080. "limit": {
  13081. "type": "object",
  13082. "properties": {
  13083. "context": {
  13084. "type": "number"
  13085. },
  13086. "input": {
  13087. "type": "number"
  13088. },
  13089. "output": {
  13090. "type": "number"
  13091. }
  13092. },
  13093. "required": ["context", "output"],
  13094. "additionalProperties": false
  13095. },
  13096. "status": {
  13097. "type": "string",
  13098. "enum": ["alpha", "beta", "deprecated", "active"]
  13099. },
  13100. "options": {
  13101. "type": "object"
  13102. },
  13103. "headers": {
  13104. "type": "object",
  13105. "additionalProperties": {
  13106. "type": "string"
  13107. }
  13108. },
  13109. "release_date": {
  13110. "type": "string"
  13111. },
  13112. "variants": {
  13113. "type": "object",
  13114. "additionalProperties": {
  13115. "type": "object"
  13116. }
  13117. }
  13118. },
  13119. "required": [
  13120. "id",
  13121. "providerID",
  13122. "api",
  13123. "name",
  13124. "capabilities",
  13125. "cost",
  13126. "limit",
  13127. "status",
  13128. "options",
  13129. "headers",
  13130. "release_date"
  13131. ],
  13132. "additionalProperties": false
  13133. },
  13134. "Provider": {
  13135. "type": "object",
  13136. "properties": {
  13137. "id": {
  13138. "type": "string"
  13139. },
  13140. "name": {
  13141. "type": "string"
  13142. },
  13143. "source": {
  13144. "type": "string",
  13145. "enum": ["env", "config", "custom", "api"]
  13146. },
  13147. "env": {
  13148. "type": "array",
  13149. "items": {
  13150. "type": "string"
  13151. }
  13152. },
  13153. "key": {
  13154. "type": "string"
  13155. },
  13156. "options": {
  13157. "type": "object"
  13158. },
  13159. "models": {
  13160. "type": "object",
  13161. "additionalProperties": {
  13162. "$ref": "#/components/schemas/Model"
  13163. }
  13164. }
  13165. },
  13166. "required": ["id", "name", "source", "env", "options", "models"],
  13167. "additionalProperties": false
  13168. },
  13169. "ConsoleState": {
  13170. "type": "object",
  13171. "properties": {
  13172. "consoleManagedProviders": {
  13173. "type": "array",
  13174. "items": {
  13175. "type": "string"
  13176. }
  13177. },
  13178. "activeOrgName": {
  13179. "type": "string"
  13180. },
  13181. "switchableOrgCount": {
  13182. "type": "integer",
  13183. "minimum": 0
  13184. }
  13185. },
  13186. "required": ["consoleManagedProviders", "switchableOrgCount"],
  13187. "additionalProperties": false
  13188. },
  13189. "effect_HttpApiError_InternalServerError": {
  13190. "type": "object",
  13191. "properties": {
  13192. "_tag": {
  13193. "type": "string",
  13194. "enum": ["InternalServerError"]
  13195. }
  13196. },
  13197. "required": ["_tag"],
  13198. "additionalProperties": false
  13199. },
  13200. "ToolListItem": {
  13201. "type": "object",
  13202. "properties": {
  13203. "id": {
  13204. "type": "string"
  13205. },
  13206. "description": {
  13207. "type": "string"
  13208. },
  13209. "parameters": {}
  13210. },
  13211. "required": ["id", "description", "parameters"],
  13212. "additionalProperties": false
  13213. },
  13214. "ToolList": {
  13215. "type": "array",
  13216. "items": {
  13217. "$ref": "#/components/schemas/ToolListItem"
  13218. }
  13219. },
  13220. "ToolIDs": {
  13221. "type": "array",
  13222. "items": {
  13223. "type": "string"
  13224. }
  13225. },
  13226. "WorktreeError": {
  13227. "type": "object",
  13228. "properties": {
  13229. "name": {
  13230. "type": "string",
  13231. "enum": [
  13232. "WorktreeNotGitError",
  13233. "WorktreeNameGenerationFailedError",
  13234. "WorktreeCreateFailedError",
  13235. "WorktreeStartCommandFailedError",
  13236. "WorktreeRemoveFailedError",
  13237. "WorktreeResetFailedError",
  13238. "WorktreeListFailedError"
  13239. ]
  13240. },
  13241. "data": {
  13242. "type": "object",
  13243. "properties": {
  13244. "message": {
  13245. "type": "string"
  13246. }
  13247. },
  13248. "required": ["message"],
  13249. "additionalProperties": false
  13250. }
  13251. },
  13252. "required": ["name", "data"],
  13253. "additionalProperties": false
  13254. },
  13255. "WorktreeCreateInput": {
  13256. "type": "object",
  13257. "properties": {
  13258. "name": {
  13259. "type": "string"
  13260. },
  13261. "startCommand": {
  13262. "type": "string",
  13263. "description": "Additional startup script to run after the project's start command"
  13264. }
  13265. },
  13266. "additionalProperties": false
  13267. },
  13268. "Worktree": {
  13269. "type": "object",
  13270. "properties": {
  13271. "name": {
  13272. "type": "string"
  13273. },
  13274. "branch": {
  13275. "type": "string"
  13276. },
  13277. "directory": {
  13278. "type": "string"
  13279. }
  13280. },
  13281. "required": ["name", "directory"],
  13282. "additionalProperties": false
  13283. },
  13284. "WorktreeRemoveInput": {
  13285. "type": "object",
  13286. "properties": {
  13287. "directory": {
  13288. "type": "string"
  13289. }
  13290. },
  13291. "required": ["directory"],
  13292. "additionalProperties": false
  13293. },
  13294. "WorktreeResetInput": {
  13295. "type": "object",
  13296. "properties": {
  13297. "directory": {
  13298. "type": "string"
  13299. }
  13300. },
  13301. "required": ["directory"],
  13302. "additionalProperties": false
  13303. },
  13304. "ProjectSummary": {
  13305. "type": "object",
  13306. "properties": {
  13307. "id": {
  13308. "type": "string"
  13309. },
  13310. "name": {
  13311. "type": "string"
  13312. },
  13313. "worktree": {
  13314. "type": "string"
  13315. }
  13316. },
  13317. "required": ["id", "worktree"],
  13318. "additionalProperties": false
  13319. },
  13320. "GlobalSession": {
  13321. "type": "object",
  13322. "properties": {
  13323. "id": {
  13324. "type": "string",
  13325. "pattern": "^ses"
  13326. },
  13327. "slug": {
  13328. "type": "string"
  13329. },
  13330. "projectID": {
  13331. "type": "string"
  13332. },
  13333. "workspaceID": {
  13334. "type": "string",
  13335. "pattern": "^wrk"
  13336. },
  13337. "directory": {
  13338. "type": "string"
  13339. },
  13340. "path": {
  13341. "type": "string"
  13342. },
  13343. "parentID": {
  13344. "type": "string",
  13345. "pattern": "^ses"
  13346. },
  13347. "summary": {
  13348. "type": "object",
  13349. "properties": {
  13350. "additions": {
  13351. "type": "number"
  13352. },
  13353. "deletions": {
  13354. "type": "number"
  13355. },
  13356. "files": {
  13357. "type": "number"
  13358. },
  13359. "diffs": {
  13360. "type": "array",
  13361. "items": {
  13362. "$ref": "#/components/schemas/SnapshotFileDiff"
  13363. }
  13364. }
  13365. },
  13366. "required": ["additions", "deletions", "files"],
  13367. "additionalProperties": false
  13368. },
  13369. "cost": {
  13370. "type": "number"
  13371. },
  13372. "tokens": {
  13373. "type": "object",
  13374. "properties": {
  13375. "input": {
  13376. "type": "number"
  13377. },
  13378. "output": {
  13379. "type": "number"
  13380. },
  13381. "reasoning": {
  13382. "type": "number"
  13383. },
  13384. "cache": {
  13385. "type": "object",
  13386. "properties": {
  13387. "read": {
  13388. "type": "number"
  13389. },
  13390. "write": {
  13391. "type": "number"
  13392. }
  13393. },
  13394. "required": ["read", "write"],
  13395. "additionalProperties": false
  13396. }
  13397. },
  13398. "required": ["input", "output", "reasoning", "cache"],
  13399. "additionalProperties": false
  13400. },
  13401. "share": {
  13402. "type": "object",
  13403. "properties": {
  13404. "url": {
  13405. "type": "string"
  13406. }
  13407. },
  13408. "required": ["url"],
  13409. "additionalProperties": false
  13410. },
  13411. "title": {
  13412. "type": "string"
  13413. },
  13414. "agent": {
  13415. "type": "string"
  13416. },
  13417. "model": {
  13418. "type": "object",
  13419. "properties": {
  13420. "id": {
  13421. "type": "string"
  13422. },
  13423. "providerID": {
  13424. "type": "string"
  13425. },
  13426. "variant": {
  13427. "type": "string"
  13428. }
  13429. },
  13430. "required": ["id", "providerID"],
  13431. "additionalProperties": false
  13432. },
  13433. "version": {
  13434. "type": "string"
  13435. },
  13436. "time": {
  13437. "type": "object",
  13438. "properties": {
  13439. "created": {
  13440. "type": "integer",
  13441. "minimum": 0
  13442. },
  13443. "updated": {
  13444. "type": "integer",
  13445. "minimum": 0
  13446. },
  13447. "compacting": {
  13448. "type": "integer",
  13449. "minimum": 0
  13450. },
  13451. "archived": {
  13452. "type": "number"
  13453. }
  13454. },
  13455. "required": ["created", "updated"],
  13456. "additionalProperties": false
  13457. },
  13458. "permission": {
  13459. "$ref": "#/components/schemas/PermissionRuleset"
  13460. },
  13461. "revert": {
  13462. "type": "object",
  13463. "properties": {
  13464. "messageID": {
  13465. "type": "string",
  13466. "pattern": "^msg"
  13467. },
  13468. "partID": {
  13469. "type": "string",
  13470. "pattern": "^prt"
  13471. },
  13472. "snapshot": {
  13473. "type": "string"
  13474. },
  13475. "diff": {
  13476. "type": "string"
  13477. }
  13478. },
  13479. "required": ["messageID"],
  13480. "additionalProperties": false
  13481. },
  13482. "project": {
  13483. "anyOf": [
  13484. {
  13485. "$ref": "#/components/schemas/ProjectSummary"
  13486. },
  13487. {
  13488. "type": "null"
  13489. }
  13490. ]
  13491. }
  13492. },
  13493. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13494. "additionalProperties": false
  13495. },
  13496. "McpResource": {
  13497. "type": "object",
  13498. "properties": {
  13499. "name": {
  13500. "type": "string"
  13501. },
  13502. "uri": {
  13503. "type": "string"
  13504. },
  13505. "description": {
  13506. "type": "string"
  13507. },
  13508. "mimeType": {
  13509. "type": "string"
  13510. },
  13511. "client": {
  13512. "type": "string"
  13513. }
  13514. },
  13515. "required": ["name", "uri", "client"],
  13516. "additionalProperties": false
  13517. },
  13518. "Symbol": {
  13519. "type": "object",
  13520. "properties": {
  13521. "name": {
  13522. "type": "string"
  13523. },
  13524. "kind": {
  13525. "type": "integer",
  13526. "minimum": 0
  13527. },
  13528. "location": {
  13529. "type": "object",
  13530. "properties": {
  13531. "uri": {
  13532. "type": "string"
  13533. },
  13534. "range": {
  13535. "$ref": "#/components/schemas/Range"
  13536. }
  13537. },
  13538. "required": ["uri", "range"],
  13539. "additionalProperties": false
  13540. }
  13541. },
  13542. "required": ["name", "kind", "location"],
  13543. "additionalProperties": false
  13544. },
  13545. "FileNode": {
  13546. "type": "object",
  13547. "properties": {
  13548. "name": {
  13549. "type": "string"
  13550. },
  13551. "path": {
  13552. "type": "string"
  13553. },
  13554. "absolute": {
  13555. "type": "string"
  13556. },
  13557. "type": {
  13558. "type": "string",
  13559. "enum": ["file", "directory"]
  13560. },
  13561. "ignored": {
  13562. "type": "boolean"
  13563. }
  13564. },
  13565. "required": ["name", "path", "absolute", "type", "ignored"],
  13566. "additionalProperties": false
  13567. },
  13568. "FileContent": {
  13569. "type": "object",
  13570. "properties": {
  13571. "type": {
  13572. "type": "string",
  13573. "enum": ["text", "binary"]
  13574. },
  13575. "content": {
  13576. "type": "string"
  13577. },
  13578. "diff": {
  13579. "type": "string"
  13580. },
  13581. "patch": {
  13582. "type": "object",
  13583. "properties": {
  13584. "oldFileName": {
  13585. "type": "string"
  13586. },
  13587. "newFileName": {
  13588. "type": "string"
  13589. },
  13590. "oldHeader": {
  13591. "type": "string"
  13592. },
  13593. "newHeader": {
  13594. "type": "string"
  13595. },
  13596. "hunks": {
  13597. "type": "array",
  13598. "items": {
  13599. "type": "object",
  13600. "properties": {
  13601. "oldStart": {
  13602. "type": "integer",
  13603. "minimum": 0
  13604. },
  13605. "oldLines": {
  13606. "type": "integer",
  13607. "minimum": 0
  13608. },
  13609. "newStart": {
  13610. "type": "integer",
  13611. "minimum": 0
  13612. },
  13613. "newLines": {
  13614. "type": "integer",
  13615. "minimum": 0
  13616. },
  13617. "lines": {
  13618. "type": "array",
  13619. "items": {
  13620. "type": "string"
  13621. }
  13622. }
  13623. },
  13624. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13625. "additionalProperties": false
  13626. }
  13627. },
  13628. "index": {
  13629. "type": "string"
  13630. }
  13631. },
  13632. "required": ["oldFileName", "newFileName", "hunks"],
  13633. "additionalProperties": false
  13634. },
  13635. "encoding": {
  13636. "type": "string",
  13637. "enum": ["base64"]
  13638. },
  13639. "mimeType": {
  13640. "type": "string"
  13641. }
  13642. },
  13643. "required": ["type", "content"],
  13644. "additionalProperties": false
  13645. },
  13646. "File": {
  13647. "type": "object",
  13648. "properties": {
  13649. "path": {
  13650. "type": "string"
  13651. },
  13652. "added": {
  13653. "type": "integer",
  13654. "minimum": 0
  13655. },
  13656. "removed": {
  13657. "type": "integer",
  13658. "minimum": 0
  13659. },
  13660. "status": {
  13661. "type": "string",
  13662. "enum": ["added", "deleted", "modified"]
  13663. }
  13664. },
  13665. "required": ["path", "added", "removed", "status"],
  13666. "additionalProperties": false
  13667. },
  13668. "Path": {
  13669. "type": "object",
  13670. "properties": {
  13671. "home": {
  13672. "type": "string"
  13673. },
  13674. "state": {
  13675. "type": "string"
  13676. },
  13677. "config": {
  13678. "type": "string"
  13679. },
  13680. "worktree": {
  13681. "type": "string"
  13682. },
  13683. "directory": {
  13684. "type": "string"
  13685. }
  13686. },
  13687. "required": ["home", "state", "config", "worktree", "directory"],
  13688. "additionalProperties": false
  13689. },
  13690. "VcsInfo": {
  13691. "type": "object",
  13692. "properties": {
  13693. "branch": {
  13694. "type": "string"
  13695. },
  13696. "default_branch": {
  13697. "type": "string"
  13698. }
  13699. },
  13700. "additionalProperties": false
  13701. },
  13702. "VcsFileStatus": {
  13703. "type": "object",
  13704. "properties": {
  13705. "file": {
  13706. "type": "string"
  13707. },
  13708. "additions": {
  13709. "type": "number"
  13710. },
  13711. "deletions": {
  13712. "type": "number"
  13713. },
  13714. "status": {
  13715. "type": "string",
  13716. "enum": ["added", "deleted", "modified"]
  13717. }
  13718. },
  13719. "required": ["file", "additions", "deletions", "status"],
  13720. "additionalProperties": false
  13721. },
  13722. "VcsFileDiff": {
  13723. "type": "object",
  13724. "properties": {
  13725. "file": {
  13726. "type": "string"
  13727. },
  13728. "patch": {
  13729. "type": "string"
  13730. },
  13731. "additions": {
  13732. "type": "number"
  13733. },
  13734. "deletions": {
  13735. "type": "number"
  13736. },
  13737. "status": {
  13738. "type": "string",
  13739. "enum": ["added", "deleted", "modified"]
  13740. }
  13741. },
  13742. "required": ["file", "additions", "deletions"],
  13743. "additionalProperties": false
  13744. },
  13745. "VcsApplyError": {
  13746. "type": "object",
  13747. "properties": {
  13748. "name": {
  13749. "type": "string",
  13750. "enum": ["VcsApplyError"]
  13751. },
  13752. "data": {
  13753. "type": "object",
  13754. "properties": {
  13755. "message": {
  13756. "type": "string"
  13757. },
  13758. "reason": {
  13759. "type": "string",
  13760. "enum": ["non-git", "not-clean"]
  13761. }
  13762. },
  13763. "required": ["message", "reason"],
  13764. "additionalProperties": false
  13765. }
  13766. },
  13767. "required": ["name", "data"],
  13768. "additionalProperties": false
  13769. },
  13770. "Command": {
  13771. "type": "object",
  13772. "properties": {
  13773. "name": {
  13774. "type": "string"
  13775. },
  13776. "description": {
  13777. "type": "string"
  13778. },
  13779. "agent": {
  13780. "type": "string"
  13781. },
  13782. "model": {
  13783. "type": "string"
  13784. },
  13785. "source": {
  13786. "type": "string",
  13787. "enum": ["command", "mcp", "skill"]
  13788. },
  13789. "template": {
  13790. "type": "string"
  13791. },
  13792. "subtask": {
  13793. "type": "boolean"
  13794. },
  13795. "hints": {
  13796. "type": "array",
  13797. "items": {
  13798. "type": "string"
  13799. }
  13800. }
  13801. },
  13802. "required": ["name", "template", "hints"],
  13803. "additionalProperties": false
  13804. },
  13805. "Agent": {
  13806. "type": "object",
  13807. "properties": {
  13808. "name": {
  13809. "type": "string"
  13810. },
  13811. "description": {
  13812. "type": "string"
  13813. },
  13814. "mode": {
  13815. "type": "string",
  13816. "enum": ["subagent", "primary", "all"]
  13817. },
  13818. "native": {
  13819. "type": "boolean"
  13820. },
  13821. "hidden": {
  13822. "type": "boolean"
  13823. },
  13824. "topP": {
  13825. "type": "number"
  13826. },
  13827. "temperature": {
  13828. "type": "number"
  13829. },
  13830. "color": {
  13831. "type": "string"
  13832. },
  13833. "permission": {
  13834. "$ref": "#/components/schemas/PermissionRuleset"
  13835. },
  13836. "model": {
  13837. "type": "object",
  13838. "properties": {
  13839. "modelID": {
  13840. "type": "string"
  13841. },
  13842. "providerID": {
  13843. "type": "string"
  13844. }
  13845. },
  13846. "required": ["modelID", "providerID"],
  13847. "additionalProperties": false
  13848. },
  13849. "variant": {
  13850. "type": "string"
  13851. },
  13852. "prompt": {
  13853. "type": "string"
  13854. },
  13855. "options": {
  13856. "type": "object"
  13857. },
  13858. "steps": {
  13859. "type": "number"
  13860. }
  13861. },
  13862. "required": ["name", "mode", "permission", "options"],
  13863. "additionalProperties": false
  13864. },
  13865. "LSPStatus": {
  13866. "type": "object",
  13867. "properties": {
  13868. "id": {
  13869. "type": "string"
  13870. },
  13871. "name": {
  13872. "type": "string"
  13873. },
  13874. "root": {
  13875. "type": "string"
  13876. },
  13877. "status": {
  13878. "type": "string",
  13879. "enum": ["connected", "error"]
  13880. }
  13881. },
  13882. "required": ["id", "name", "root", "status"],
  13883. "additionalProperties": false
  13884. },
  13885. "FormatterStatus": {
  13886. "type": "object",
  13887. "properties": {
  13888. "name": {
  13889. "type": "string"
  13890. },
  13891. "extensions": {
  13892. "type": "array",
  13893. "items": {
  13894. "type": "string"
  13895. }
  13896. },
  13897. "enabled": {
  13898. "type": "boolean"
  13899. }
  13900. },
  13901. "required": ["name", "extensions", "enabled"],
  13902. "additionalProperties": false
  13903. },
  13904. "MCPStatusConnected": {
  13905. "type": "object",
  13906. "properties": {
  13907. "status": {
  13908. "type": "string",
  13909. "enum": ["connected"]
  13910. }
  13911. },
  13912. "required": ["status"],
  13913. "additionalProperties": false
  13914. },
  13915. "MCPStatusDisabled": {
  13916. "type": "object",
  13917. "properties": {
  13918. "status": {
  13919. "type": "string",
  13920. "enum": ["disabled"]
  13921. }
  13922. },
  13923. "required": ["status"],
  13924. "additionalProperties": false
  13925. },
  13926. "MCPStatusFailed": {
  13927. "type": "object",
  13928. "properties": {
  13929. "status": {
  13930. "type": "string",
  13931. "enum": ["failed"]
  13932. },
  13933. "error": {
  13934. "type": "string"
  13935. }
  13936. },
  13937. "required": ["status", "error"],
  13938. "additionalProperties": false
  13939. },
  13940. "MCPStatusNeedsAuth": {
  13941. "type": "object",
  13942. "properties": {
  13943. "status": {
  13944. "type": "string",
  13945. "enum": ["needs_auth"]
  13946. }
  13947. },
  13948. "required": ["status"],
  13949. "additionalProperties": false
  13950. },
  13951. "MCPStatusNeedsClientRegistration": {
  13952. "type": "object",
  13953. "properties": {
  13954. "status": {
  13955. "type": "string",
  13956. "enum": ["needs_client_registration"]
  13957. },
  13958. "error": {
  13959. "type": "string"
  13960. }
  13961. },
  13962. "required": ["status", "error"],
  13963. "additionalProperties": false
  13964. },
  13965. "MCPStatus": {
  13966. "anyOf": [
  13967. {
  13968. "$ref": "#/components/schemas/MCPStatusConnected"
  13969. },
  13970. {
  13971. "$ref": "#/components/schemas/MCPStatusDisabled"
  13972. },
  13973. {
  13974. "$ref": "#/components/schemas/MCPStatusFailed"
  13975. },
  13976. {
  13977. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13978. },
  13979. {
  13980. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13981. }
  13982. ]
  13983. },
  13984. "McpUnsupportedOAuthError": {
  13985. "type": "object",
  13986. "properties": {
  13987. "error": {
  13988. "type": "string"
  13989. }
  13990. },
  13991. "required": ["error"],
  13992. "additionalProperties": false
  13993. },
  13994. "NotFoundError": {
  13995. "type": "object",
  13996. "required": ["name", "data"],
  13997. "properties": {
  13998. "name": {
  13999. "type": "string",
  14000. "enum": ["NotFoundError"]
  14001. },
  14002. "data": {
  14003. "type": "object",
  14004. "required": ["message"],
  14005. "properties": {
  14006. "message": {
  14007. "type": "string"
  14008. }
  14009. }
  14010. }
  14011. }
  14012. },
  14013. "effect_HttpApiError_Forbidden": {
  14014. "type": "object",
  14015. "properties": {
  14016. "_tag": {
  14017. "type": "string",
  14018. "enum": ["Forbidden"]
  14019. }
  14020. },
  14021. "required": ["_tag"],
  14022. "additionalProperties": false
  14023. },
  14024. "ProviderAuthMethod": {
  14025. "type": "object",
  14026. "properties": {
  14027. "type": {
  14028. "type": "string",
  14029. "enum": ["oauth", "api"]
  14030. },
  14031. "label": {
  14032. "type": "string"
  14033. },
  14034. "prompts": {
  14035. "type": "array",
  14036. "items": {
  14037. "anyOf": [
  14038. {
  14039. "type": "object",
  14040. "properties": {
  14041. "type": {
  14042. "type": "string",
  14043. "enum": ["text"]
  14044. },
  14045. "key": {
  14046. "type": "string"
  14047. },
  14048. "message": {
  14049. "type": "string"
  14050. },
  14051. "placeholder": {
  14052. "type": "string"
  14053. },
  14054. "when": {
  14055. "type": "object",
  14056. "properties": {
  14057. "key": {
  14058. "type": "string"
  14059. },
  14060. "op": {
  14061. "type": "string",
  14062. "enum": ["eq", "neq"]
  14063. },
  14064. "value": {
  14065. "type": "string"
  14066. }
  14067. },
  14068. "required": ["key", "op", "value"],
  14069. "additionalProperties": false
  14070. }
  14071. },
  14072. "required": ["type", "key", "message"],
  14073. "additionalProperties": false
  14074. },
  14075. {
  14076. "type": "object",
  14077. "properties": {
  14078. "type": {
  14079. "type": "string",
  14080. "enum": ["select"]
  14081. },
  14082. "key": {
  14083. "type": "string"
  14084. },
  14085. "message": {
  14086. "type": "string"
  14087. },
  14088. "options": {
  14089. "type": "array",
  14090. "items": {
  14091. "type": "object",
  14092. "properties": {
  14093. "label": {
  14094. "type": "string"
  14095. },
  14096. "value": {
  14097. "type": "string"
  14098. },
  14099. "hint": {
  14100. "type": "string"
  14101. }
  14102. },
  14103. "required": ["label", "value"],
  14104. "additionalProperties": false
  14105. }
  14106. },
  14107. "when": {
  14108. "type": "object",
  14109. "properties": {
  14110. "key": {
  14111. "type": "string"
  14112. },
  14113. "op": {
  14114. "type": "string",
  14115. "enum": ["eq", "neq"]
  14116. },
  14117. "value": {
  14118. "type": "string"
  14119. }
  14120. },
  14121. "required": ["key", "op", "value"],
  14122. "additionalProperties": false
  14123. }
  14124. },
  14125. "required": ["type", "key", "message", "options"],
  14126. "additionalProperties": false
  14127. }
  14128. ]
  14129. }
  14130. }
  14131. },
  14132. "required": ["type", "label"],
  14133. "additionalProperties": false
  14134. },
  14135. "ProviderAuthAuthorization": {
  14136. "type": "object",
  14137. "properties": {
  14138. "url": {
  14139. "type": "string"
  14140. },
  14141. "method": {
  14142. "type": "string",
  14143. "enum": ["auto", "code"]
  14144. },
  14145. "instructions": {
  14146. "type": "string"
  14147. }
  14148. },
  14149. "required": ["url", "method", "instructions"],
  14150. "additionalProperties": false
  14151. },
  14152. "ProviderAuthError1": {
  14153. "type": "object",
  14154. "properties": {
  14155. "name": {
  14156. "type": "string",
  14157. "enum": [
  14158. "BadRequest",
  14159. "ProviderAuthOauthMissing",
  14160. "ProviderAuthOauthCodeMissing",
  14161. "ProviderAuthOauthCallbackFailed",
  14162. "ProviderAuthValidationFailed"
  14163. ]
  14164. },
  14165. "data": {
  14166. "type": "object",
  14167. "properties": {
  14168. "providerID": {
  14169. "type": "string"
  14170. },
  14171. "field": {
  14172. "type": "string"
  14173. },
  14174. "message": {
  14175. "type": "string"
  14176. },
  14177. "kind": {
  14178. "type": "string"
  14179. }
  14180. },
  14181. "additionalProperties": false
  14182. }
  14183. },
  14184. "required": ["name", "data"],
  14185. "additionalProperties": false
  14186. },
  14187. "TextPartInput": {
  14188. "type": "object",
  14189. "properties": {
  14190. "id": {
  14191. "type": "string",
  14192. "pattern": "^prt"
  14193. },
  14194. "type": {
  14195. "type": "string",
  14196. "enum": ["text"]
  14197. },
  14198. "text": {
  14199. "type": "string"
  14200. },
  14201. "synthetic": {
  14202. "type": "boolean"
  14203. },
  14204. "ignored": {
  14205. "type": "boolean"
  14206. },
  14207. "time": {
  14208. "type": "object",
  14209. "properties": {
  14210. "start": {
  14211. "type": "integer",
  14212. "minimum": 0
  14213. },
  14214. "end": {
  14215. "type": "integer",
  14216. "minimum": 0
  14217. }
  14218. },
  14219. "required": ["start"],
  14220. "additionalProperties": false
  14221. },
  14222. "metadata": {
  14223. "type": "object"
  14224. }
  14225. },
  14226. "required": ["type", "text"],
  14227. "additionalProperties": false
  14228. },
  14229. "FilePartInput": {
  14230. "type": "object",
  14231. "properties": {
  14232. "id": {
  14233. "type": "string",
  14234. "pattern": "^prt"
  14235. },
  14236. "type": {
  14237. "type": "string",
  14238. "enum": ["file"]
  14239. },
  14240. "mime": {
  14241. "type": "string"
  14242. },
  14243. "filename": {
  14244. "type": "string"
  14245. },
  14246. "url": {
  14247. "type": "string"
  14248. },
  14249. "source": {
  14250. "$ref": "#/components/schemas/FilePartSource"
  14251. }
  14252. },
  14253. "required": ["type", "mime", "url"],
  14254. "additionalProperties": false
  14255. },
  14256. "AgentPartInput": {
  14257. "type": "object",
  14258. "properties": {
  14259. "id": {
  14260. "type": "string",
  14261. "pattern": "^prt"
  14262. },
  14263. "type": {
  14264. "type": "string",
  14265. "enum": ["agent"]
  14266. },
  14267. "name": {
  14268. "type": "string"
  14269. },
  14270. "source": {
  14271. "type": "object",
  14272. "properties": {
  14273. "value": {
  14274. "type": "string"
  14275. },
  14276. "start": {
  14277. "type": "integer",
  14278. "minimum": 0
  14279. },
  14280. "end": {
  14281. "type": "integer",
  14282. "minimum": 0
  14283. }
  14284. },
  14285. "required": ["value", "start", "end"],
  14286. "additionalProperties": false
  14287. }
  14288. },
  14289. "required": ["type", "name"],
  14290. "additionalProperties": false
  14291. },
  14292. "SubtaskPartInput": {
  14293. "type": "object",
  14294. "properties": {
  14295. "id": {
  14296. "type": "string",
  14297. "pattern": "^prt"
  14298. },
  14299. "type": {
  14300. "type": "string",
  14301. "enum": ["subtask"]
  14302. },
  14303. "prompt": {
  14304. "type": "string"
  14305. },
  14306. "description": {
  14307. "type": "string"
  14308. },
  14309. "agent": {
  14310. "type": "string"
  14311. },
  14312. "model": {
  14313. "type": "object",
  14314. "properties": {
  14315. "providerID": {
  14316. "type": "string"
  14317. },
  14318. "modelID": {
  14319. "type": "string"
  14320. }
  14321. },
  14322. "required": ["providerID", "modelID"],
  14323. "additionalProperties": false
  14324. },
  14325. "command": {
  14326. "type": "string"
  14327. }
  14328. },
  14329. "required": ["type", "prompt", "description", "agent"],
  14330. "additionalProperties": false
  14331. },
  14332. "V2SessionsResponse": {
  14333. "type": "object",
  14334. "properties": {
  14335. "items": {
  14336. "type": "array",
  14337. "items": {
  14338. "$ref": "#/components/schemas/SessionInfo"
  14339. }
  14340. },
  14341. "cursor": {
  14342. "type": "object",
  14343. "properties": {
  14344. "previous": {
  14345. "type": "string"
  14346. },
  14347. "next": {
  14348. "type": "string"
  14349. }
  14350. },
  14351. "additionalProperties": false
  14352. }
  14353. },
  14354. "required": ["items", "cursor"],
  14355. "additionalProperties": false
  14356. },
  14357. "V2SessionMessagesResponse": {
  14358. "type": "object",
  14359. "properties": {
  14360. "items": {
  14361. "type": "array",
  14362. "items": {
  14363. "$ref": "#/components/schemas/SessionMessage"
  14364. }
  14365. },
  14366. "cursor": {
  14367. "type": "object",
  14368. "properties": {
  14369. "previous": {
  14370. "type": "string"
  14371. },
  14372. "next": {
  14373. "type": "string"
  14374. }
  14375. },
  14376. "additionalProperties": false
  14377. }
  14378. },
  14379. "required": ["items", "cursor"],
  14380. "additionalProperties": false
  14381. },
  14382. "EventTuiPromptAppend": {
  14383. "type": "object",
  14384. "properties": {
  14385. "type": {
  14386. "type": "string",
  14387. "enum": ["tui.prompt.append"]
  14388. },
  14389. "properties": {
  14390. "type": "object",
  14391. "properties": {
  14392. "text": {
  14393. "type": "string"
  14394. }
  14395. },
  14396. "required": ["text"],
  14397. "additionalProperties": false
  14398. }
  14399. },
  14400. "required": ["type", "properties"],
  14401. "additionalProperties": false
  14402. },
  14403. "EventTuiCommandExecute": {
  14404. "type": "object",
  14405. "properties": {
  14406. "type": {
  14407. "type": "string",
  14408. "enum": ["tui.command.execute"]
  14409. },
  14410. "properties": {
  14411. "type": "object",
  14412. "properties": {
  14413. "command": {
  14414. "anyOf": [
  14415. {
  14416. "type": "string",
  14417. "enum": [
  14418. "session.list",
  14419. "session.new",
  14420. "session.share",
  14421. "session.interrupt",
  14422. "session.compact",
  14423. "session.page.up",
  14424. "session.page.down",
  14425. "session.line.up",
  14426. "session.line.down",
  14427. "session.half.page.up",
  14428. "session.half.page.down",
  14429. "session.first",
  14430. "session.last",
  14431. "prompt.clear",
  14432. "prompt.submit",
  14433. "agent.cycle"
  14434. ]
  14435. },
  14436. {
  14437. "type": "string"
  14438. }
  14439. ]
  14440. }
  14441. },
  14442. "required": ["command"],
  14443. "additionalProperties": false
  14444. }
  14445. },
  14446. "required": ["type", "properties"],
  14447. "additionalProperties": false
  14448. },
  14449. "EventTuiToastShow": {
  14450. "type": "object",
  14451. "properties": {
  14452. "type": {
  14453. "type": "string",
  14454. "enum": ["tui.toast.show"]
  14455. },
  14456. "properties": {
  14457. "type": "object",
  14458. "properties": {
  14459. "title": {
  14460. "type": "string"
  14461. },
  14462. "message": {
  14463. "type": "string"
  14464. },
  14465. "variant": {
  14466. "type": "string",
  14467. "enum": ["info", "success", "warning", "error"]
  14468. },
  14469. "duration": {
  14470. "type": "integer",
  14471. "exclusiveMinimum": 0
  14472. }
  14473. },
  14474. "required": ["message", "variant"],
  14475. "additionalProperties": false
  14476. }
  14477. },
  14478. "required": ["type", "properties"],
  14479. "additionalProperties": false
  14480. },
  14481. "EventTuiSessionSelect": {
  14482. "type": "object",
  14483. "properties": {
  14484. "type": {
  14485. "type": "string",
  14486. "enum": ["tui.session.select"]
  14487. },
  14488. "properties": {
  14489. "type": "object",
  14490. "properties": {
  14491. "sessionID": {
  14492. "type": "string",
  14493. "pattern": "^ses",
  14494. "description": "Session ID to navigate to"
  14495. }
  14496. },
  14497. "required": ["sessionID"],
  14498. "additionalProperties": false
  14499. }
  14500. },
  14501. "required": ["type", "properties"],
  14502. "additionalProperties": false
  14503. },
  14504. "Workspace": {
  14505. "type": "object",
  14506. "properties": {
  14507. "id": {
  14508. "type": "string",
  14509. "pattern": "^wrk"
  14510. },
  14511. "type": {
  14512. "type": "string"
  14513. },
  14514. "name": {
  14515. "type": "string"
  14516. },
  14517. "branch": {
  14518. "anyOf": [
  14519. {
  14520. "type": "string"
  14521. },
  14522. {
  14523. "type": "null"
  14524. }
  14525. ]
  14526. },
  14527. "directory": {
  14528. "anyOf": [
  14529. {
  14530. "type": "string"
  14531. },
  14532. {
  14533. "type": "null"
  14534. }
  14535. ]
  14536. },
  14537. "extra": {
  14538. "anyOf": [
  14539. {},
  14540. {
  14541. "type": "null"
  14542. }
  14543. ]
  14544. },
  14545. "projectID": {
  14546. "type": "string"
  14547. },
  14548. "timeUsed": {
  14549. "anyOf": [
  14550. {
  14551. "type": "number"
  14552. },
  14553. {
  14554. "type": "string",
  14555. "enum": ["NaN"]
  14556. },
  14557. {
  14558. "type": "string",
  14559. "enum": ["Infinity"]
  14560. },
  14561. {
  14562. "type": "string",
  14563. "enum": ["-Infinity"]
  14564. },
  14565. {
  14566. "type": "string",
  14567. "enum": ["Infinity", "-Infinity", "NaN"]
  14568. }
  14569. ]
  14570. }
  14571. },
  14572. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14573. "additionalProperties": false
  14574. },
  14575. "WorkspaceWarpError": {
  14576. "type": "object",
  14577. "properties": {
  14578. "name": {
  14579. "type": "string",
  14580. "enum": ["WorkspaceWarpError"]
  14581. },
  14582. "data": {
  14583. "type": "object",
  14584. "properties": {
  14585. "message": {
  14586. "type": "string"
  14587. }
  14588. },
  14589. "required": ["message"],
  14590. "additionalProperties": false
  14591. }
  14592. },
  14593. "required": ["name", "data"],
  14594. "additionalProperties": false
  14595. },
  14596. "SyncEventMessageUpdated": {
  14597. "type": "object",
  14598. "properties": {
  14599. "type": {
  14600. "type": "string",
  14601. "enum": ["sync"]
  14602. },
  14603. "name": {
  14604. "type": "string",
  14605. "enum": ["message.updated.1"]
  14606. },
  14607. "id": {
  14608. "type": "string"
  14609. },
  14610. "seq": {
  14611. "type": "number"
  14612. },
  14613. "aggregateID": {
  14614. "type": "string",
  14615. "enum": ["sessionID"]
  14616. },
  14617. "data": {
  14618. "type": "object",
  14619. "properties": {
  14620. "sessionID": {
  14621. "type": "string",
  14622. "pattern": "^ses"
  14623. },
  14624. "info": {
  14625. "$ref": "#/components/schemas/Message"
  14626. }
  14627. },
  14628. "required": ["sessionID", "info"],
  14629. "additionalProperties": false
  14630. }
  14631. },
  14632. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14633. "additionalProperties": false
  14634. },
  14635. "SyncEventMessageRemoved": {
  14636. "type": "object",
  14637. "properties": {
  14638. "type": {
  14639. "type": "string",
  14640. "enum": ["sync"]
  14641. },
  14642. "name": {
  14643. "type": "string",
  14644. "enum": ["message.removed.1"]
  14645. },
  14646. "id": {
  14647. "type": "string"
  14648. },
  14649. "seq": {
  14650. "type": "number"
  14651. },
  14652. "aggregateID": {
  14653. "type": "string",
  14654. "enum": ["sessionID"]
  14655. },
  14656. "data": {
  14657. "type": "object",
  14658. "properties": {
  14659. "sessionID": {
  14660. "type": "string",
  14661. "pattern": "^ses"
  14662. },
  14663. "messageID": {
  14664. "type": "string",
  14665. "pattern": "^msg"
  14666. }
  14667. },
  14668. "required": ["sessionID", "messageID"],
  14669. "additionalProperties": false
  14670. }
  14671. },
  14672. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14673. "additionalProperties": false
  14674. },
  14675. "SyncEventMessagePartUpdated": {
  14676. "type": "object",
  14677. "properties": {
  14678. "type": {
  14679. "type": "string",
  14680. "enum": ["sync"]
  14681. },
  14682. "name": {
  14683. "type": "string",
  14684. "enum": ["message.part.updated.1"]
  14685. },
  14686. "id": {
  14687. "type": "string"
  14688. },
  14689. "seq": {
  14690. "type": "number"
  14691. },
  14692. "aggregateID": {
  14693. "type": "string",
  14694. "enum": ["sessionID"]
  14695. },
  14696. "data": {
  14697. "type": "object",
  14698. "properties": {
  14699. "sessionID": {
  14700. "type": "string",
  14701. "pattern": "^ses"
  14702. },
  14703. "part": {
  14704. "$ref": "#/components/schemas/Part"
  14705. },
  14706. "time": {
  14707. "type": "integer",
  14708. "minimum": 0
  14709. }
  14710. },
  14711. "required": ["sessionID", "part", "time"],
  14712. "additionalProperties": false
  14713. }
  14714. },
  14715. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14716. "additionalProperties": false
  14717. },
  14718. "SyncEventMessagePartRemoved": {
  14719. "type": "object",
  14720. "properties": {
  14721. "type": {
  14722. "type": "string",
  14723. "enum": ["sync"]
  14724. },
  14725. "name": {
  14726. "type": "string",
  14727. "enum": ["message.part.removed.1"]
  14728. },
  14729. "id": {
  14730. "type": "string"
  14731. },
  14732. "seq": {
  14733. "type": "number"
  14734. },
  14735. "aggregateID": {
  14736. "type": "string",
  14737. "enum": ["sessionID"]
  14738. },
  14739. "data": {
  14740. "type": "object",
  14741. "properties": {
  14742. "sessionID": {
  14743. "type": "string",
  14744. "pattern": "^ses"
  14745. },
  14746. "messageID": {
  14747. "type": "string",
  14748. "pattern": "^msg"
  14749. },
  14750. "partID": {
  14751. "type": "string",
  14752. "pattern": "^prt"
  14753. }
  14754. },
  14755. "required": ["sessionID", "messageID", "partID"],
  14756. "additionalProperties": false
  14757. }
  14758. },
  14759. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14760. "additionalProperties": false
  14761. },
  14762. "SyncEventSessionCreated": {
  14763. "type": "object",
  14764. "properties": {
  14765. "type": {
  14766. "type": "string",
  14767. "enum": ["sync"]
  14768. },
  14769. "name": {
  14770. "type": "string",
  14771. "enum": ["session.created.1"]
  14772. },
  14773. "id": {
  14774. "type": "string"
  14775. },
  14776. "seq": {
  14777. "type": "number"
  14778. },
  14779. "aggregateID": {
  14780. "type": "string",
  14781. "enum": ["sessionID"]
  14782. },
  14783. "data": {
  14784. "type": "object",
  14785. "properties": {
  14786. "sessionID": {
  14787. "type": "string",
  14788. "pattern": "^ses"
  14789. },
  14790. "info": {
  14791. "$ref": "#/components/schemas/Session"
  14792. }
  14793. },
  14794. "required": ["sessionID", "info"],
  14795. "additionalProperties": false
  14796. }
  14797. },
  14798. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14799. "additionalProperties": false
  14800. },
  14801. "SyncEventSessionUpdated": {
  14802. "type": "object",
  14803. "properties": {
  14804. "type": {
  14805. "type": "string",
  14806. "enum": ["sync"]
  14807. },
  14808. "name": {
  14809. "type": "string",
  14810. "enum": ["session.updated.1"]
  14811. },
  14812. "id": {
  14813. "type": "string"
  14814. },
  14815. "seq": {
  14816. "type": "number"
  14817. },
  14818. "aggregateID": {
  14819. "type": "string",
  14820. "enum": ["sessionID"]
  14821. },
  14822. "data": {
  14823. "type": "object",
  14824. "properties": {
  14825. "sessionID": {
  14826. "type": "string",
  14827. "pattern": "^ses"
  14828. },
  14829. "info": {
  14830. "type": "object",
  14831. "properties": {
  14832. "id": {
  14833. "anyOf": [
  14834. {
  14835. "type": "string",
  14836. "pattern": "^ses"
  14837. },
  14838. {
  14839. "type": "null"
  14840. }
  14841. ]
  14842. },
  14843. "slug": {
  14844. "anyOf": [
  14845. {
  14846. "type": "string"
  14847. },
  14848. {
  14849. "type": "null"
  14850. }
  14851. ]
  14852. },
  14853. "projectID": {
  14854. "anyOf": [
  14855. {
  14856. "type": "string"
  14857. },
  14858. {
  14859. "type": "null"
  14860. }
  14861. ]
  14862. },
  14863. "workspaceID": {
  14864. "anyOf": [
  14865. {
  14866. "type": "string",
  14867. "pattern": "^wrk"
  14868. },
  14869. {
  14870. "type": "null"
  14871. }
  14872. ]
  14873. },
  14874. "directory": {
  14875. "anyOf": [
  14876. {
  14877. "type": "string"
  14878. },
  14879. {
  14880. "type": "null"
  14881. }
  14882. ]
  14883. },
  14884. "path": {
  14885. "anyOf": [
  14886. {
  14887. "type": "string"
  14888. },
  14889. {
  14890. "type": "null"
  14891. }
  14892. ]
  14893. },
  14894. "parentID": {
  14895. "anyOf": [
  14896. {
  14897. "type": "string",
  14898. "pattern": "^ses"
  14899. },
  14900. {
  14901. "type": "null"
  14902. }
  14903. ]
  14904. },
  14905. "summary": {
  14906. "anyOf": [
  14907. {
  14908. "type": "object",
  14909. "properties": {
  14910. "additions": {
  14911. "type": "number"
  14912. },
  14913. "deletions": {
  14914. "type": "number"
  14915. },
  14916. "files": {
  14917. "type": "number"
  14918. },
  14919. "diffs": {
  14920. "type": "array",
  14921. "items": {
  14922. "$ref": "#/components/schemas/SnapshotFileDiff"
  14923. }
  14924. }
  14925. },
  14926. "required": ["additions", "deletions", "files"],
  14927. "additionalProperties": false
  14928. },
  14929. {
  14930. "type": "null"
  14931. }
  14932. ]
  14933. },
  14934. "cost": {
  14935. "anyOf": [
  14936. {
  14937. "type": "number"
  14938. },
  14939. {
  14940. "type": "null"
  14941. }
  14942. ]
  14943. },
  14944. "tokens": {
  14945. "anyOf": [
  14946. {
  14947. "type": "object",
  14948. "properties": {
  14949. "input": {
  14950. "type": "number"
  14951. },
  14952. "output": {
  14953. "type": "number"
  14954. },
  14955. "reasoning": {
  14956. "type": "number"
  14957. },
  14958. "cache": {
  14959. "type": "object",
  14960. "properties": {
  14961. "read": {
  14962. "type": "number"
  14963. },
  14964. "write": {
  14965. "type": "number"
  14966. }
  14967. },
  14968. "required": ["read", "write"],
  14969. "additionalProperties": false
  14970. }
  14971. },
  14972. "required": ["input", "output", "reasoning", "cache"],
  14973. "additionalProperties": false
  14974. },
  14975. {
  14976. "type": "null"
  14977. }
  14978. ]
  14979. },
  14980. "share": {
  14981. "type": "object",
  14982. "properties": {
  14983. "url": {
  14984. "anyOf": [
  14985. {
  14986. "type": "string"
  14987. },
  14988. {
  14989. "type": "null"
  14990. }
  14991. ]
  14992. }
  14993. },
  14994. "additionalProperties": false
  14995. },
  14996. "title": {
  14997. "anyOf": [
  14998. {
  14999. "type": "string"
  15000. },
  15001. {
  15002. "type": "null"
  15003. }
  15004. ]
  15005. },
  15006. "agent": {
  15007. "anyOf": [
  15008. {
  15009. "type": "string"
  15010. },
  15011. {
  15012. "type": "null"
  15013. }
  15014. ]
  15015. },
  15016. "model": {
  15017. "anyOf": [
  15018. {
  15019. "type": "object",
  15020. "properties": {
  15021. "id": {
  15022. "type": "string"
  15023. },
  15024. "providerID": {
  15025. "type": "string"
  15026. },
  15027. "variant": {
  15028. "type": "string"
  15029. }
  15030. },
  15031. "required": ["id", "providerID"],
  15032. "additionalProperties": false
  15033. },
  15034. {
  15035. "type": "null"
  15036. }
  15037. ]
  15038. },
  15039. "version": {
  15040. "anyOf": [
  15041. {
  15042. "type": "string"
  15043. },
  15044. {
  15045. "type": "null"
  15046. }
  15047. ]
  15048. },
  15049. "time": {
  15050. "type": "object",
  15051. "properties": {
  15052. "created": {
  15053. "anyOf": [
  15054. {
  15055. "type": "integer",
  15056. "minimum": 0
  15057. },
  15058. {
  15059. "type": "null"
  15060. }
  15061. ]
  15062. },
  15063. "updated": {
  15064. "anyOf": [
  15065. {
  15066. "type": "integer",
  15067. "minimum": 0
  15068. },
  15069. {
  15070. "type": "null"
  15071. }
  15072. ]
  15073. },
  15074. "compacting": {
  15075. "anyOf": [
  15076. {
  15077. "type": "integer",
  15078. "minimum": 0
  15079. },
  15080. {
  15081. "type": "null"
  15082. }
  15083. ]
  15084. },
  15085. "archived": {
  15086. "anyOf": [
  15087. {
  15088. "type": "number"
  15089. },
  15090. {
  15091. "type": "null"
  15092. }
  15093. ]
  15094. }
  15095. },
  15096. "additionalProperties": false
  15097. },
  15098. "permission": {
  15099. "anyOf": [
  15100. {
  15101. "$ref": "#/components/schemas/PermissionRuleset"
  15102. },
  15103. {
  15104. "type": "null"
  15105. }
  15106. ]
  15107. },
  15108. "revert": {
  15109. "anyOf": [
  15110. {
  15111. "type": "object",
  15112. "properties": {
  15113. "messageID": {
  15114. "type": "string",
  15115. "pattern": "^msg"
  15116. },
  15117. "partID": {
  15118. "type": "string",
  15119. "pattern": "^prt"
  15120. },
  15121. "snapshot": {
  15122. "type": "string"
  15123. },
  15124. "diff": {
  15125. "type": "string"
  15126. }
  15127. },
  15128. "required": ["messageID"],
  15129. "additionalProperties": false
  15130. },
  15131. {
  15132. "type": "null"
  15133. }
  15134. ]
  15135. }
  15136. },
  15137. "additionalProperties": false
  15138. }
  15139. },
  15140. "required": ["sessionID", "info"],
  15141. "additionalProperties": false
  15142. }
  15143. },
  15144. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15145. "additionalProperties": false
  15146. },
  15147. "SyncEventSessionDeleted": {
  15148. "type": "object",
  15149. "properties": {
  15150. "type": {
  15151. "type": "string",
  15152. "enum": ["sync"]
  15153. },
  15154. "name": {
  15155. "type": "string",
  15156. "enum": ["session.deleted.1"]
  15157. },
  15158. "id": {
  15159. "type": "string"
  15160. },
  15161. "seq": {
  15162. "type": "number"
  15163. },
  15164. "aggregateID": {
  15165. "type": "string",
  15166. "enum": ["sessionID"]
  15167. },
  15168. "data": {
  15169. "type": "object",
  15170. "properties": {
  15171. "sessionID": {
  15172. "type": "string",
  15173. "pattern": "^ses"
  15174. },
  15175. "info": {
  15176. "$ref": "#/components/schemas/Session"
  15177. }
  15178. },
  15179. "required": ["sessionID", "info"],
  15180. "additionalProperties": false
  15181. }
  15182. },
  15183. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15184. "additionalProperties": false
  15185. },
  15186. "SyncEventSessionNextAgentSwitched": {
  15187. "type": "object",
  15188. "properties": {
  15189. "type": {
  15190. "type": "string",
  15191. "enum": ["sync"]
  15192. },
  15193. "name": {
  15194. "type": "string",
  15195. "enum": ["session.next.agent.switched.1"]
  15196. },
  15197. "id": {
  15198. "type": "string"
  15199. },
  15200. "seq": {
  15201. "type": "number"
  15202. },
  15203. "aggregateID": {
  15204. "type": "string",
  15205. "enum": ["sessionID"]
  15206. },
  15207. "data": {
  15208. "type": "object",
  15209. "properties": {
  15210. "timestamp": {
  15211. "type": "number"
  15212. },
  15213. "sessionID": {
  15214. "type": "string",
  15215. "pattern": "^ses"
  15216. },
  15217. "agent": {
  15218. "type": "string"
  15219. }
  15220. },
  15221. "required": ["timestamp", "sessionID", "agent"],
  15222. "additionalProperties": false
  15223. }
  15224. },
  15225. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15226. "additionalProperties": false
  15227. },
  15228. "SyncEventSessionNextModelSwitched": {
  15229. "type": "object",
  15230. "properties": {
  15231. "type": {
  15232. "type": "string",
  15233. "enum": ["sync"]
  15234. },
  15235. "name": {
  15236. "type": "string",
  15237. "enum": ["session.next.model.switched.1"]
  15238. },
  15239. "id": {
  15240. "type": "string"
  15241. },
  15242. "seq": {
  15243. "type": "number"
  15244. },
  15245. "aggregateID": {
  15246. "type": "string",
  15247. "enum": ["sessionID"]
  15248. },
  15249. "data": {
  15250. "type": "object",
  15251. "properties": {
  15252. "timestamp": {
  15253. "type": "number"
  15254. },
  15255. "sessionID": {
  15256. "type": "string",
  15257. "pattern": "^ses"
  15258. },
  15259. "model": {
  15260. "type": "object",
  15261. "properties": {
  15262. "id": {
  15263. "type": "string"
  15264. },
  15265. "providerID": {
  15266. "type": "string"
  15267. },
  15268. "variant": {
  15269. "type": "string"
  15270. }
  15271. },
  15272. "required": ["id", "providerID", "variant"],
  15273. "additionalProperties": false
  15274. }
  15275. },
  15276. "required": ["timestamp", "sessionID", "model"],
  15277. "additionalProperties": false
  15278. }
  15279. },
  15280. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15281. "additionalProperties": false
  15282. },
  15283. "SyncEventSessionNextPrompted": {
  15284. "type": "object",
  15285. "properties": {
  15286. "type": {
  15287. "type": "string",
  15288. "enum": ["sync"]
  15289. },
  15290. "name": {
  15291. "type": "string",
  15292. "enum": ["session.next.prompted.1"]
  15293. },
  15294. "id": {
  15295. "type": "string"
  15296. },
  15297. "seq": {
  15298. "type": "number"
  15299. },
  15300. "aggregateID": {
  15301. "type": "string",
  15302. "enum": ["sessionID"]
  15303. },
  15304. "data": {
  15305. "type": "object",
  15306. "properties": {
  15307. "timestamp": {
  15308. "type": "number"
  15309. },
  15310. "sessionID": {
  15311. "type": "string",
  15312. "pattern": "^ses"
  15313. },
  15314. "prompt": {
  15315. "$ref": "#/components/schemas/Prompt"
  15316. }
  15317. },
  15318. "required": ["timestamp", "sessionID", "prompt"],
  15319. "additionalProperties": false
  15320. }
  15321. },
  15322. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15323. "additionalProperties": false
  15324. },
  15325. "SyncEventSessionNextSynthetic": {
  15326. "type": "object",
  15327. "properties": {
  15328. "type": {
  15329. "type": "string",
  15330. "enum": ["sync"]
  15331. },
  15332. "name": {
  15333. "type": "string",
  15334. "enum": ["session.next.synthetic.1"]
  15335. },
  15336. "id": {
  15337. "type": "string"
  15338. },
  15339. "seq": {
  15340. "type": "number"
  15341. },
  15342. "aggregateID": {
  15343. "type": "string",
  15344. "enum": ["sessionID"]
  15345. },
  15346. "data": {
  15347. "type": "object",
  15348. "properties": {
  15349. "timestamp": {
  15350. "type": "number"
  15351. },
  15352. "sessionID": {
  15353. "type": "string",
  15354. "pattern": "^ses"
  15355. },
  15356. "text": {
  15357. "type": "string"
  15358. }
  15359. },
  15360. "required": ["timestamp", "sessionID", "text"],
  15361. "additionalProperties": false
  15362. }
  15363. },
  15364. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15365. "additionalProperties": false
  15366. },
  15367. "SyncEventSessionNextShellStarted": {
  15368. "type": "object",
  15369. "properties": {
  15370. "type": {
  15371. "type": "string",
  15372. "enum": ["sync"]
  15373. },
  15374. "name": {
  15375. "type": "string",
  15376. "enum": ["session.next.shell.started.1"]
  15377. },
  15378. "id": {
  15379. "type": "string"
  15380. },
  15381. "seq": {
  15382. "type": "number"
  15383. },
  15384. "aggregateID": {
  15385. "type": "string",
  15386. "enum": ["sessionID"]
  15387. },
  15388. "data": {
  15389. "type": "object",
  15390. "properties": {
  15391. "timestamp": {
  15392. "type": "number"
  15393. },
  15394. "sessionID": {
  15395. "type": "string",
  15396. "pattern": "^ses"
  15397. },
  15398. "callID": {
  15399. "type": "string"
  15400. },
  15401. "command": {
  15402. "type": "string"
  15403. }
  15404. },
  15405. "required": ["timestamp", "sessionID", "callID", "command"],
  15406. "additionalProperties": false
  15407. }
  15408. },
  15409. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15410. "additionalProperties": false
  15411. },
  15412. "SyncEventSessionNextShellEnded": {
  15413. "type": "object",
  15414. "properties": {
  15415. "type": {
  15416. "type": "string",
  15417. "enum": ["sync"]
  15418. },
  15419. "name": {
  15420. "type": "string",
  15421. "enum": ["session.next.shell.ended.1"]
  15422. },
  15423. "id": {
  15424. "type": "string"
  15425. },
  15426. "seq": {
  15427. "type": "number"
  15428. },
  15429. "aggregateID": {
  15430. "type": "string",
  15431. "enum": ["sessionID"]
  15432. },
  15433. "data": {
  15434. "type": "object",
  15435. "properties": {
  15436. "timestamp": {
  15437. "type": "number"
  15438. },
  15439. "sessionID": {
  15440. "type": "string",
  15441. "pattern": "^ses"
  15442. },
  15443. "callID": {
  15444. "type": "string"
  15445. },
  15446. "output": {
  15447. "type": "string"
  15448. }
  15449. },
  15450. "required": ["timestamp", "sessionID", "callID", "output"],
  15451. "additionalProperties": false
  15452. }
  15453. },
  15454. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15455. "additionalProperties": false
  15456. },
  15457. "SyncEventSessionNextStepStarted": {
  15458. "type": "object",
  15459. "properties": {
  15460. "type": {
  15461. "type": "string",
  15462. "enum": ["sync"]
  15463. },
  15464. "name": {
  15465. "type": "string",
  15466. "enum": ["session.next.step.started.1"]
  15467. },
  15468. "id": {
  15469. "type": "string"
  15470. },
  15471. "seq": {
  15472. "type": "number"
  15473. },
  15474. "aggregateID": {
  15475. "type": "string",
  15476. "enum": ["sessionID"]
  15477. },
  15478. "data": {
  15479. "type": "object",
  15480. "properties": {
  15481. "timestamp": {
  15482. "type": "number"
  15483. },
  15484. "sessionID": {
  15485. "type": "string",
  15486. "pattern": "^ses"
  15487. },
  15488. "agent": {
  15489. "type": "string"
  15490. },
  15491. "model": {
  15492. "type": "object",
  15493. "properties": {
  15494. "id": {
  15495. "type": "string"
  15496. },
  15497. "providerID": {
  15498. "type": "string"
  15499. },
  15500. "variant": {
  15501. "type": "string"
  15502. }
  15503. },
  15504. "required": ["id", "providerID", "variant"],
  15505. "additionalProperties": false
  15506. },
  15507. "snapshot": {
  15508. "type": "string"
  15509. }
  15510. },
  15511. "required": ["timestamp", "sessionID", "agent", "model"],
  15512. "additionalProperties": false
  15513. }
  15514. },
  15515. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15516. "additionalProperties": false
  15517. },
  15518. "SyncEventSessionNextStepEnded": {
  15519. "type": "object",
  15520. "properties": {
  15521. "type": {
  15522. "type": "string",
  15523. "enum": ["sync"]
  15524. },
  15525. "name": {
  15526. "type": "string",
  15527. "enum": ["session.next.step.ended.1"]
  15528. },
  15529. "id": {
  15530. "type": "string"
  15531. },
  15532. "seq": {
  15533. "type": "number"
  15534. },
  15535. "aggregateID": {
  15536. "type": "string",
  15537. "enum": ["sessionID"]
  15538. },
  15539. "data": {
  15540. "type": "object",
  15541. "properties": {
  15542. "timestamp": {
  15543. "type": "number"
  15544. },
  15545. "sessionID": {
  15546. "type": "string",
  15547. "pattern": "^ses"
  15548. },
  15549. "finish": {
  15550. "type": "string"
  15551. },
  15552. "cost": {
  15553. "type": "number"
  15554. },
  15555. "tokens": {
  15556. "type": "object",
  15557. "properties": {
  15558. "input": {
  15559. "type": "number"
  15560. },
  15561. "output": {
  15562. "type": "number"
  15563. },
  15564. "reasoning": {
  15565. "type": "number"
  15566. },
  15567. "cache": {
  15568. "type": "object",
  15569. "properties": {
  15570. "read": {
  15571. "type": "number"
  15572. },
  15573. "write": {
  15574. "type": "number"
  15575. }
  15576. },
  15577. "required": ["read", "write"],
  15578. "additionalProperties": false
  15579. }
  15580. },
  15581. "required": ["input", "output", "reasoning", "cache"],
  15582. "additionalProperties": false
  15583. },
  15584. "snapshot": {
  15585. "type": "string"
  15586. }
  15587. },
  15588. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15589. "additionalProperties": false
  15590. }
  15591. },
  15592. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15593. "additionalProperties": false
  15594. },
  15595. "SyncEventSessionNextStepFailed": {
  15596. "type": "object",
  15597. "properties": {
  15598. "type": {
  15599. "type": "string",
  15600. "enum": ["sync"]
  15601. },
  15602. "name": {
  15603. "type": "string",
  15604. "enum": ["session.next.step.failed.1"]
  15605. },
  15606. "id": {
  15607. "type": "string"
  15608. },
  15609. "seq": {
  15610. "type": "number"
  15611. },
  15612. "aggregateID": {
  15613. "type": "string",
  15614. "enum": ["sessionID"]
  15615. },
  15616. "data": {
  15617. "type": "object",
  15618. "properties": {
  15619. "timestamp": {
  15620. "type": "number"
  15621. },
  15622. "sessionID": {
  15623. "type": "string",
  15624. "pattern": "^ses"
  15625. },
  15626. "error": {
  15627. "$ref": "#/components/schemas/SessionErrorUnknown"
  15628. }
  15629. },
  15630. "required": ["timestamp", "sessionID", "error"],
  15631. "additionalProperties": false
  15632. }
  15633. },
  15634. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15635. "additionalProperties": false
  15636. },
  15637. "SyncEventSessionNextTextStarted": {
  15638. "type": "object",
  15639. "properties": {
  15640. "type": {
  15641. "type": "string",
  15642. "enum": ["sync"]
  15643. },
  15644. "name": {
  15645. "type": "string",
  15646. "enum": ["session.next.text.started.1"]
  15647. },
  15648. "id": {
  15649. "type": "string"
  15650. },
  15651. "seq": {
  15652. "type": "number"
  15653. },
  15654. "aggregateID": {
  15655. "type": "string",
  15656. "enum": ["sessionID"]
  15657. },
  15658. "data": {
  15659. "type": "object",
  15660. "properties": {
  15661. "timestamp": {
  15662. "type": "number"
  15663. },
  15664. "sessionID": {
  15665. "type": "string",
  15666. "pattern": "^ses"
  15667. }
  15668. },
  15669. "required": ["timestamp", "sessionID"],
  15670. "additionalProperties": false
  15671. }
  15672. },
  15673. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15674. "additionalProperties": false
  15675. },
  15676. "SyncEventSessionNextTextDelta": {
  15677. "type": "object",
  15678. "properties": {
  15679. "type": {
  15680. "type": "string",
  15681. "enum": ["sync"]
  15682. },
  15683. "name": {
  15684. "type": "string",
  15685. "enum": ["session.next.text.delta.1"]
  15686. },
  15687. "id": {
  15688. "type": "string"
  15689. },
  15690. "seq": {
  15691. "type": "number"
  15692. },
  15693. "aggregateID": {
  15694. "type": "string",
  15695. "enum": ["sessionID"]
  15696. },
  15697. "data": {
  15698. "type": "object",
  15699. "properties": {
  15700. "timestamp": {
  15701. "type": "number"
  15702. },
  15703. "sessionID": {
  15704. "type": "string",
  15705. "pattern": "^ses"
  15706. },
  15707. "delta": {
  15708. "type": "string"
  15709. }
  15710. },
  15711. "required": ["timestamp", "sessionID", "delta"],
  15712. "additionalProperties": false
  15713. }
  15714. },
  15715. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15716. "additionalProperties": false
  15717. },
  15718. "SyncEventSessionNextTextEnded": {
  15719. "type": "object",
  15720. "properties": {
  15721. "type": {
  15722. "type": "string",
  15723. "enum": ["sync"]
  15724. },
  15725. "name": {
  15726. "type": "string",
  15727. "enum": ["session.next.text.ended.1"]
  15728. },
  15729. "id": {
  15730. "type": "string"
  15731. },
  15732. "seq": {
  15733. "type": "number"
  15734. },
  15735. "aggregateID": {
  15736. "type": "string",
  15737. "enum": ["sessionID"]
  15738. },
  15739. "data": {
  15740. "type": "object",
  15741. "properties": {
  15742. "timestamp": {
  15743. "type": "number"
  15744. },
  15745. "sessionID": {
  15746. "type": "string",
  15747. "pattern": "^ses"
  15748. },
  15749. "text": {
  15750. "type": "string"
  15751. }
  15752. },
  15753. "required": ["timestamp", "sessionID", "text"],
  15754. "additionalProperties": false
  15755. }
  15756. },
  15757. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15758. "additionalProperties": false
  15759. },
  15760. "SyncEventSessionNextReasoningStarted": {
  15761. "type": "object",
  15762. "properties": {
  15763. "type": {
  15764. "type": "string",
  15765. "enum": ["sync"]
  15766. },
  15767. "name": {
  15768. "type": "string",
  15769. "enum": ["session.next.reasoning.started.1"]
  15770. },
  15771. "id": {
  15772. "type": "string"
  15773. },
  15774. "seq": {
  15775. "type": "number"
  15776. },
  15777. "aggregateID": {
  15778. "type": "string",
  15779. "enum": ["sessionID"]
  15780. },
  15781. "data": {
  15782. "type": "object",
  15783. "properties": {
  15784. "timestamp": {
  15785. "type": "number"
  15786. },
  15787. "sessionID": {
  15788. "type": "string",
  15789. "pattern": "^ses"
  15790. },
  15791. "reasoningID": {
  15792. "type": "string"
  15793. }
  15794. },
  15795. "required": ["timestamp", "sessionID", "reasoningID"],
  15796. "additionalProperties": false
  15797. }
  15798. },
  15799. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15800. "additionalProperties": false
  15801. },
  15802. "SyncEventSessionNextReasoningDelta": {
  15803. "type": "object",
  15804. "properties": {
  15805. "type": {
  15806. "type": "string",
  15807. "enum": ["sync"]
  15808. },
  15809. "name": {
  15810. "type": "string",
  15811. "enum": ["session.next.reasoning.delta.1"]
  15812. },
  15813. "id": {
  15814. "type": "string"
  15815. },
  15816. "seq": {
  15817. "type": "number"
  15818. },
  15819. "aggregateID": {
  15820. "type": "string",
  15821. "enum": ["sessionID"]
  15822. },
  15823. "data": {
  15824. "type": "object",
  15825. "properties": {
  15826. "timestamp": {
  15827. "type": "number"
  15828. },
  15829. "sessionID": {
  15830. "type": "string",
  15831. "pattern": "^ses"
  15832. },
  15833. "reasoningID": {
  15834. "type": "string"
  15835. },
  15836. "delta": {
  15837. "type": "string"
  15838. }
  15839. },
  15840. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15841. "additionalProperties": false
  15842. }
  15843. },
  15844. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15845. "additionalProperties": false
  15846. },
  15847. "SyncEventSessionNextReasoningEnded": {
  15848. "type": "object",
  15849. "properties": {
  15850. "type": {
  15851. "type": "string",
  15852. "enum": ["sync"]
  15853. },
  15854. "name": {
  15855. "type": "string",
  15856. "enum": ["session.next.reasoning.ended.1"]
  15857. },
  15858. "id": {
  15859. "type": "string"
  15860. },
  15861. "seq": {
  15862. "type": "number"
  15863. },
  15864. "aggregateID": {
  15865. "type": "string",
  15866. "enum": ["sessionID"]
  15867. },
  15868. "data": {
  15869. "type": "object",
  15870. "properties": {
  15871. "timestamp": {
  15872. "type": "number"
  15873. },
  15874. "sessionID": {
  15875. "type": "string",
  15876. "pattern": "^ses"
  15877. },
  15878. "reasoningID": {
  15879. "type": "string"
  15880. },
  15881. "text": {
  15882. "type": "string"
  15883. }
  15884. },
  15885. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15886. "additionalProperties": false
  15887. }
  15888. },
  15889. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15890. "additionalProperties": false
  15891. },
  15892. "SyncEventSessionNextToolInputStarted": {
  15893. "type": "object",
  15894. "properties": {
  15895. "type": {
  15896. "type": "string",
  15897. "enum": ["sync"]
  15898. },
  15899. "name": {
  15900. "type": "string",
  15901. "enum": ["session.next.tool.input.started.1"]
  15902. },
  15903. "id": {
  15904. "type": "string"
  15905. },
  15906. "seq": {
  15907. "type": "number"
  15908. },
  15909. "aggregateID": {
  15910. "type": "string",
  15911. "enum": ["sessionID"]
  15912. },
  15913. "data": {
  15914. "type": "object",
  15915. "properties": {
  15916. "timestamp": {
  15917. "type": "number"
  15918. },
  15919. "sessionID": {
  15920. "type": "string",
  15921. "pattern": "^ses"
  15922. },
  15923. "callID": {
  15924. "type": "string"
  15925. },
  15926. "name": {
  15927. "type": "string"
  15928. }
  15929. },
  15930. "required": ["timestamp", "sessionID", "callID", "name"],
  15931. "additionalProperties": false
  15932. }
  15933. },
  15934. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15935. "additionalProperties": false
  15936. },
  15937. "SyncEventSessionNextToolInputDelta": {
  15938. "type": "object",
  15939. "properties": {
  15940. "type": {
  15941. "type": "string",
  15942. "enum": ["sync"]
  15943. },
  15944. "name": {
  15945. "type": "string",
  15946. "enum": ["session.next.tool.input.delta.1"]
  15947. },
  15948. "id": {
  15949. "type": "string"
  15950. },
  15951. "seq": {
  15952. "type": "number"
  15953. },
  15954. "aggregateID": {
  15955. "type": "string",
  15956. "enum": ["sessionID"]
  15957. },
  15958. "data": {
  15959. "type": "object",
  15960. "properties": {
  15961. "timestamp": {
  15962. "type": "number"
  15963. },
  15964. "sessionID": {
  15965. "type": "string",
  15966. "pattern": "^ses"
  15967. },
  15968. "callID": {
  15969. "type": "string"
  15970. },
  15971. "delta": {
  15972. "type": "string"
  15973. }
  15974. },
  15975. "required": ["timestamp", "sessionID", "callID", "delta"],
  15976. "additionalProperties": false
  15977. }
  15978. },
  15979. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15980. "additionalProperties": false
  15981. },
  15982. "SyncEventSessionNextToolInputEnded": {
  15983. "type": "object",
  15984. "properties": {
  15985. "type": {
  15986. "type": "string",
  15987. "enum": ["sync"]
  15988. },
  15989. "name": {
  15990. "type": "string",
  15991. "enum": ["session.next.tool.input.ended.1"]
  15992. },
  15993. "id": {
  15994. "type": "string"
  15995. },
  15996. "seq": {
  15997. "type": "number"
  15998. },
  15999. "aggregateID": {
  16000. "type": "string",
  16001. "enum": ["sessionID"]
  16002. },
  16003. "data": {
  16004. "type": "object",
  16005. "properties": {
  16006. "timestamp": {
  16007. "type": "number"
  16008. },
  16009. "sessionID": {
  16010. "type": "string",
  16011. "pattern": "^ses"
  16012. },
  16013. "callID": {
  16014. "type": "string"
  16015. },
  16016. "text": {
  16017. "type": "string"
  16018. }
  16019. },
  16020. "required": ["timestamp", "sessionID", "callID", "text"],
  16021. "additionalProperties": false
  16022. }
  16023. },
  16024. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16025. "additionalProperties": false
  16026. },
  16027. "SyncEventSessionNextToolCalled": {
  16028. "type": "object",
  16029. "properties": {
  16030. "type": {
  16031. "type": "string",
  16032. "enum": ["sync"]
  16033. },
  16034. "name": {
  16035. "type": "string",
  16036. "enum": ["session.next.tool.called.1"]
  16037. },
  16038. "id": {
  16039. "type": "string"
  16040. },
  16041. "seq": {
  16042. "type": "number"
  16043. },
  16044. "aggregateID": {
  16045. "type": "string",
  16046. "enum": ["sessionID"]
  16047. },
  16048. "data": {
  16049. "type": "object",
  16050. "properties": {
  16051. "timestamp": {
  16052. "type": "number"
  16053. },
  16054. "sessionID": {
  16055. "type": "string",
  16056. "pattern": "^ses"
  16057. },
  16058. "callID": {
  16059. "type": "string"
  16060. },
  16061. "tool": {
  16062. "type": "string"
  16063. },
  16064. "input": {
  16065. "type": "object"
  16066. },
  16067. "provider": {
  16068. "type": "object",
  16069. "properties": {
  16070. "executed": {
  16071. "type": "boolean"
  16072. },
  16073. "metadata": {
  16074. "type": "object"
  16075. }
  16076. },
  16077. "required": ["executed"],
  16078. "additionalProperties": false
  16079. }
  16080. },
  16081. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  16082. "additionalProperties": false
  16083. }
  16084. },
  16085. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16086. "additionalProperties": false
  16087. },
  16088. "SyncEventSessionNextToolProgress": {
  16089. "type": "object",
  16090. "properties": {
  16091. "type": {
  16092. "type": "string",
  16093. "enum": ["sync"]
  16094. },
  16095. "name": {
  16096. "type": "string",
  16097. "enum": ["session.next.tool.progress.1"]
  16098. },
  16099. "id": {
  16100. "type": "string"
  16101. },
  16102. "seq": {
  16103. "type": "number"
  16104. },
  16105. "aggregateID": {
  16106. "type": "string",
  16107. "enum": ["sessionID"]
  16108. },
  16109. "data": {
  16110. "type": "object",
  16111. "properties": {
  16112. "timestamp": {
  16113. "type": "number"
  16114. },
  16115. "sessionID": {
  16116. "type": "string",
  16117. "pattern": "^ses"
  16118. },
  16119. "callID": {
  16120. "type": "string"
  16121. },
  16122. "structured": {
  16123. "type": "object"
  16124. },
  16125. "content": {
  16126. "type": "array",
  16127. "items": {
  16128. "anyOf": [
  16129. {
  16130. "$ref": "#/components/schemas/ToolTextContent"
  16131. },
  16132. {
  16133. "$ref": "#/components/schemas/ToolFileContent"
  16134. }
  16135. ]
  16136. }
  16137. }
  16138. },
  16139. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  16140. "additionalProperties": false
  16141. }
  16142. },
  16143. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16144. "additionalProperties": false
  16145. },
  16146. "SyncEventSessionNextToolSuccess": {
  16147. "type": "object",
  16148. "properties": {
  16149. "type": {
  16150. "type": "string",
  16151. "enum": ["sync"]
  16152. },
  16153. "name": {
  16154. "type": "string",
  16155. "enum": ["session.next.tool.success.1"]
  16156. },
  16157. "id": {
  16158. "type": "string"
  16159. },
  16160. "seq": {
  16161. "type": "number"
  16162. },
  16163. "aggregateID": {
  16164. "type": "string",
  16165. "enum": ["sessionID"]
  16166. },
  16167. "data": {
  16168. "type": "object",
  16169. "properties": {
  16170. "timestamp": {
  16171. "type": "number"
  16172. },
  16173. "sessionID": {
  16174. "type": "string",
  16175. "pattern": "^ses"
  16176. },
  16177. "callID": {
  16178. "type": "string"
  16179. },
  16180. "structured": {
  16181. "type": "object"
  16182. },
  16183. "content": {
  16184. "type": "array",
  16185. "items": {
  16186. "anyOf": [
  16187. {
  16188. "$ref": "#/components/schemas/ToolTextContent"
  16189. },
  16190. {
  16191. "$ref": "#/components/schemas/ToolFileContent"
  16192. }
  16193. ]
  16194. }
  16195. },
  16196. "provider": {
  16197. "type": "object",
  16198. "properties": {
  16199. "executed": {
  16200. "type": "boolean"
  16201. },
  16202. "metadata": {
  16203. "type": "object"
  16204. }
  16205. },
  16206. "required": ["executed"],
  16207. "additionalProperties": false
  16208. }
  16209. },
  16210. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  16211. "additionalProperties": false
  16212. }
  16213. },
  16214. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16215. "additionalProperties": false
  16216. },
  16217. "SyncEventSessionNextToolFailed": {
  16218. "type": "object",
  16219. "properties": {
  16220. "type": {
  16221. "type": "string",
  16222. "enum": ["sync"]
  16223. },
  16224. "name": {
  16225. "type": "string",
  16226. "enum": ["session.next.tool.failed.1"]
  16227. },
  16228. "id": {
  16229. "type": "string"
  16230. },
  16231. "seq": {
  16232. "type": "number"
  16233. },
  16234. "aggregateID": {
  16235. "type": "string",
  16236. "enum": ["sessionID"]
  16237. },
  16238. "data": {
  16239. "type": "object",
  16240. "properties": {
  16241. "timestamp": {
  16242. "type": "number"
  16243. },
  16244. "sessionID": {
  16245. "type": "string",
  16246. "pattern": "^ses"
  16247. },
  16248. "callID": {
  16249. "type": "string"
  16250. },
  16251. "error": {
  16252. "$ref": "#/components/schemas/SessionErrorUnknown"
  16253. },
  16254. "provider": {
  16255. "type": "object",
  16256. "properties": {
  16257. "executed": {
  16258. "type": "boolean"
  16259. },
  16260. "metadata": {
  16261. "type": "object"
  16262. }
  16263. },
  16264. "required": ["executed"],
  16265. "additionalProperties": false
  16266. }
  16267. },
  16268. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  16269. "additionalProperties": false
  16270. }
  16271. },
  16272. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16273. "additionalProperties": false
  16274. },
  16275. "SyncEventSessionNextRetried": {
  16276. "type": "object",
  16277. "properties": {
  16278. "type": {
  16279. "type": "string",
  16280. "enum": ["sync"]
  16281. },
  16282. "name": {
  16283. "type": "string",
  16284. "enum": ["session.next.retried.1"]
  16285. },
  16286. "id": {
  16287. "type": "string"
  16288. },
  16289. "seq": {
  16290. "type": "number"
  16291. },
  16292. "aggregateID": {
  16293. "type": "string",
  16294. "enum": ["sessionID"]
  16295. },
  16296. "data": {
  16297. "type": "object",
  16298. "properties": {
  16299. "timestamp": {
  16300. "type": "number"
  16301. },
  16302. "sessionID": {
  16303. "type": "string",
  16304. "pattern": "^ses"
  16305. },
  16306. "attempt": {
  16307. "type": "number"
  16308. },
  16309. "error": {
  16310. "$ref": "#/components/schemas/SessionNextRetry_error"
  16311. }
  16312. },
  16313. "required": ["timestamp", "sessionID", "attempt", "error"],
  16314. "additionalProperties": false
  16315. }
  16316. },
  16317. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16318. "additionalProperties": false
  16319. },
  16320. "SyncEventSessionNextCompactionStarted": {
  16321. "type": "object",
  16322. "properties": {
  16323. "type": {
  16324. "type": "string",
  16325. "enum": ["sync"]
  16326. },
  16327. "name": {
  16328. "type": "string",
  16329. "enum": ["session.next.compaction.started.1"]
  16330. },
  16331. "id": {
  16332. "type": "string"
  16333. },
  16334. "seq": {
  16335. "type": "number"
  16336. },
  16337. "aggregateID": {
  16338. "type": "string",
  16339. "enum": ["sessionID"]
  16340. },
  16341. "data": {
  16342. "type": "object",
  16343. "properties": {
  16344. "timestamp": {
  16345. "type": "number"
  16346. },
  16347. "sessionID": {
  16348. "type": "string",
  16349. "pattern": "^ses"
  16350. },
  16351. "reason": {
  16352. "type": "string",
  16353. "enum": ["auto", "manual"]
  16354. }
  16355. },
  16356. "required": ["timestamp", "sessionID", "reason"],
  16357. "additionalProperties": false
  16358. }
  16359. },
  16360. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16361. "additionalProperties": false
  16362. },
  16363. "SyncEventSessionNextCompactionDelta": {
  16364. "type": "object",
  16365. "properties": {
  16366. "type": {
  16367. "type": "string",
  16368. "enum": ["sync"]
  16369. },
  16370. "name": {
  16371. "type": "string",
  16372. "enum": ["session.next.compaction.delta.1"]
  16373. },
  16374. "id": {
  16375. "type": "string"
  16376. },
  16377. "seq": {
  16378. "type": "number"
  16379. },
  16380. "aggregateID": {
  16381. "type": "string",
  16382. "enum": ["sessionID"]
  16383. },
  16384. "data": {
  16385. "type": "object",
  16386. "properties": {
  16387. "timestamp": {
  16388. "type": "number"
  16389. },
  16390. "sessionID": {
  16391. "type": "string",
  16392. "pattern": "^ses"
  16393. },
  16394. "text": {
  16395. "type": "string"
  16396. }
  16397. },
  16398. "required": ["timestamp", "sessionID", "text"],
  16399. "additionalProperties": false
  16400. }
  16401. },
  16402. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16403. "additionalProperties": false
  16404. },
  16405. "SyncEventSessionNextCompactionEnded": {
  16406. "type": "object",
  16407. "properties": {
  16408. "type": {
  16409. "type": "string",
  16410. "enum": ["sync"]
  16411. },
  16412. "name": {
  16413. "type": "string",
  16414. "enum": ["session.next.compaction.ended.1"]
  16415. },
  16416. "id": {
  16417. "type": "string"
  16418. },
  16419. "seq": {
  16420. "type": "number"
  16421. },
  16422. "aggregateID": {
  16423. "type": "string",
  16424. "enum": ["sessionID"]
  16425. },
  16426. "data": {
  16427. "type": "object",
  16428. "properties": {
  16429. "timestamp": {
  16430. "type": "number"
  16431. },
  16432. "sessionID": {
  16433. "type": "string",
  16434. "pattern": "^ses"
  16435. },
  16436. "text": {
  16437. "type": "string"
  16438. },
  16439. "include": {
  16440. "type": "string"
  16441. }
  16442. },
  16443. "required": ["timestamp", "sessionID", "text"],
  16444. "additionalProperties": false
  16445. }
  16446. },
  16447. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16448. "additionalProperties": false
  16449. },
  16450. "EventServerConnected": {
  16451. "type": "object",
  16452. "properties": {
  16453. "id": {
  16454. "type": "string"
  16455. },
  16456. "type": {
  16457. "type": "string",
  16458. "enum": ["server.connected"]
  16459. },
  16460. "properties": {
  16461. "type": "object",
  16462. "properties": {}
  16463. }
  16464. },
  16465. "required": ["id", "type", "properties"],
  16466. "additionalProperties": false
  16467. },
  16468. "EventGlobalDisposed": {
  16469. "type": "object",
  16470. "properties": {
  16471. "id": {
  16472. "type": "string"
  16473. },
  16474. "type": {
  16475. "type": "string",
  16476. "enum": ["global.disposed"]
  16477. },
  16478. "properties": {
  16479. "type": "object",
  16480. "properties": {}
  16481. }
  16482. },
  16483. "required": ["id", "type", "properties"],
  16484. "additionalProperties": false
  16485. },
  16486. "EventServerInstanceDisposed": {
  16487. "type": "object",
  16488. "properties": {
  16489. "id": {
  16490. "type": "string"
  16491. },
  16492. "type": {
  16493. "type": "string",
  16494. "enum": ["server.instance.disposed"]
  16495. },
  16496. "properties": {
  16497. "type": "object",
  16498. "properties": {
  16499. "directory": {
  16500. "type": "string"
  16501. }
  16502. },
  16503. "required": ["directory"],
  16504. "additionalProperties": false
  16505. }
  16506. },
  16507. "required": ["id", "type", "properties"],
  16508. "additionalProperties": false
  16509. },
  16510. "EventFileEdited": {
  16511. "type": "object",
  16512. "properties": {
  16513. "id": {
  16514. "type": "string"
  16515. },
  16516. "type": {
  16517. "type": "string",
  16518. "enum": ["file.edited"]
  16519. },
  16520. "properties": {
  16521. "type": "object",
  16522. "properties": {
  16523. "file": {
  16524. "type": "string"
  16525. }
  16526. },
  16527. "required": ["file"],
  16528. "additionalProperties": false
  16529. }
  16530. },
  16531. "required": ["id", "type", "properties"],
  16532. "additionalProperties": false
  16533. },
  16534. "EventFileWatcherUpdated": {
  16535. "type": "object",
  16536. "properties": {
  16537. "id": {
  16538. "type": "string"
  16539. },
  16540. "type": {
  16541. "type": "string",
  16542. "enum": ["file.watcher.updated"]
  16543. },
  16544. "properties": {
  16545. "type": "object",
  16546. "properties": {
  16547. "file": {
  16548. "type": "string"
  16549. },
  16550. "event": {
  16551. "type": "string",
  16552. "enum": ["add", "change", "unlink"]
  16553. }
  16554. },
  16555. "required": ["file", "event"],
  16556. "additionalProperties": false
  16557. }
  16558. },
  16559. "required": ["id", "type", "properties"],
  16560. "additionalProperties": false
  16561. },
  16562. "EventLspClientDiagnostics": {
  16563. "type": "object",
  16564. "properties": {
  16565. "id": {
  16566. "type": "string"
  16567. },
  16568. "type": {
  16569. "type": "string",
  16570. "enum": ["lsp.client.diagnostics"]
  16571. },
  16572. "properties": {
  16573. "type": "object",
  16574. "properties": {
  16575. "serverID": {
  16576. "type": "string"
  16577. },
  16578. "path": {
  16579. "type": "string"
  16580. }
  16581. },
  16582. "required": ["serverID", "path"],
  16583. "additionalProperties": false
  16584. }
  16585. },
  16586. "required": ["id", "type", "properties"],
  16587. "additionalProperties": false
  16588. },
  16589. "EventLspUpdated": {
  16590. "type": "object",
  16591. "properties": {
  16592. "id": {
  16593. "type": "string"
  16594. },
  16595. "type": {
  16596. "type": "string",
  16597. "enum": ["lsp.updated"]
  16598. },
  16599. "properties": {
  16600. "type": "object",
  16601. "properties": {}
  16602. }
  16603. },
  16604. "required": ["id", "type", "properties"],
  16605. "additionalProperties": false
  16606. },
  16607. "EventMessagePartDelta": {
  16608. "type": "object",
  16609. "properties": {
  16610. "id": {
  16611. "type": "string"
  16612. },
  16613. "type": {
  16614. "type": "string",
  16615. "enum": ["message.part.delta"]
  16616. },
  16617. "properties": {
  16618. "type": "object",
  16619. "properties": {
  16620. "sessionID": {
  16621. "type": "string",
  16622. "pattern": "^ses"
  16623. },
  16624. "messageID": {
  16625. "type": "string",
  16626. "pattern": "^msg"
  16627. },
  16628. "partID": {
  16629. "type": "string",
  16630. "pattern": "^prt"
  16631. },
  16632. "field": {
  16633. "type": "string"
  16634. },
  16635. "delta": {
  16636. "type": "string"
  16637. }
  16638. },
  16639. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16640. "additionalProperties": false
  16641. }
  16642. },
  16643. "required": ["id", "type", "properties"],
  16644. "additionalProperties": false
  16645. },
  16646. "EventPermissionAsked": {
  16647. "type": "object",
  16648. "properties": {
  16649. "id": {
  16650. "type": "string"
  16651. },
  16652. "type": {
  16653. "type": "string",
  16654. "enum": ["permission.asked"]
  16655. },
  16656. "properties": {
  16657. "$ref": "#/components/schemas/PermissionRequest"
  16658. }
  16659. },
  16660. "required": ["id", "type", "properties"],
  16661. "additionalProperties": false
  16662. },
  16663. "EventPermissionReplied": {
  16664. "type": "object",
  16665. "properties": {
  16666. "id": {
  16667. "type": "string"
  16668. },
  16669. "type": {
  16670. "type": "string",
  16671. "enum": ["permission.replied"]
  16672. },
  16673. "properties": {
  16674. "type": "object",
  16675. "properties": {
  16676. "sessionID": {
  16677. "type": "string",
  16678. "pattern": "^ses"
  16679. },
  16680. "requestID": {
  16681. "type": "string",
  16682. "pattern": "^per"
  16683. },
  16684. "reply": {
  16685. "type": "string",
  16686. "enum": ["once", "always", "reject"]
  16687. }
  16688. },
  16689. "required": ["sessionID", "requestID", "reply"],
  16690. "additionalProperties": false
  16691. }
  16692. },
  16693. "required": ["id", "type", "properties"],
  16694. "additionalProperties": false
  16695. },
  16696. "EventSessionDiff": {
  16697. "type": "object",
  16698. "properties": {
  16699. "id": {
  16700. "type": "string"
  16701. },
  16702. "type": {
  16703. "type": "string",
  16704. "enum": ["session.diff"]
  16705. },
  16706. "properties": {
  16707. "type": "object",
  16708. "properties": {
  16709. "sessionID": {
  16710. "type": "string",
  16711. "pattern": "^ses"
  16712. },
  16713. "diff": {
  16714. "type": "array",
  16715. "items": {
  16716. "$ref": "#/components/schemas/SnapshotFileDiff"
  16717. }
  16718. }
  16719. },
  16720. "required": ["sessionID", "diff"],
  16721. "additionalProperties": false
  16722. }
  16723. },
  16724. "required": ["id", "type", "properties"],
  16725. "additionalProperties": false
  16726. },
  16727. "EventSessionError": {
  16728. "type": "object",
  16729. "properties": {
  16730. "id": {
  16731. "type": "string"
  16732. },
  16733. "type": {
  16734. "type": "string",
  16735. "enum": ["session.error"]
  16736. },
  16737. "properties": {
  16738. "type": "object",
  16739. "properties": {
  16740. "sessionID": {
  16741. "type": "string",
  16742. "pattern": "^ses"
  16743. },
  16744. "error": {
  16745. "anyOf": [
  16746. {
  16747. "$ref": "#/components/schemas/ProviderAuthError"
  16748. },
  16749. {
  16750. "$ref": "#/components/schemas/UnknownError"
  16751. },
  16752. {
  16753. "$ref": "#/components/schemas/MessageOutputLengthError"
  16754. },
  16755. {
  16756. "$ref": "#/components/schemas/MessageAbortedError"
  16757. },
  16758. {
  16759. "$ref": "#/components/schemas/StructuredOutputError"
  16760. },
  16761. {
  16762. "$ref": "#/components/schemas/ContextOverflowError"
  16763. },
  16764. {
  16765. "$ref": "#/components/schemas/APIError"
  16766. }
  16767. ]
  16768. }
  16769. },
  16770. "additionalProperties": false
  16771. }
  16772. },
  16773. "required": ["id", "type", "properties"],
  16774. "additionalProperties": false
  16775. },
  16776. "EventQuestionAsked": {
  16777. "type": "object",
  16778. "properties": {
  16779. "id": {
  16780. "type": "string"
  16781. },
  16782. "type": {
  16783. "type": "string",
  16784. "enum": ["question.asked"]
  16785. },
  16786. "properties": {
  16787. "$ref": "#/components/schemas/QuestionRequest"
  16788. }
  16789. },
  16790. "required": ["id", "type", "properties"],
  16791. "additionalProperties": false
  16792. },
  16793. "EventQuestionReplied": {
  16794. "type": "object",
  16795. "properties": {
  16796. "id": {
  16797. "type": "string"
  16798. },
  16799. "type": {
  16800. "type": "string",
  16801. "enum": ["question.replied"]
  16802. },
  16803. "properties": {
  16804. "$ref": "#/components/schemas/QuestionReplied"
  16805. }
  16806. },
  16807. "required": ["id", "type", "properties"],
  16808. "additionalProperties": false
  16809. },
  16810. "EventQuestionRejected": {
  16811. "type": "object",
  16812. "properties": {
  16813. "id": {
  16814. "type": "string"
  16815. },
  16816. "type": {
  16817. "type": "string",
  16818. "enum": ["question.rejected"]
  16819. },
  16820. "properties": {
  16821. "$ref": "#/components/schemas/QuestionRejected"
  16822. }
  16823. },
  16824. "required": ["id", "type", "properties"],
  16825. "additionalProperties": false
  16826. },
  16827. "EventTodoUpdated": {
  16828. "type": "object",
  16829. "properties": {
  16830. "id": {
  16831. "type": "string"
  16832. },
  16833. "type": {
  16834. "type": "string",
  16835. "enum": ["todo.updated"]
  16836. },
  16837. "properties": {
  16838. "type": "object",
  16839. "properties": {
  16840. "sessionID": {
  16841. "type": "string",
  16842. "pattern": "^ses"
  16843. },
  16844. "todos": {
  16845. "type": "array",
  16846. "items": {
  16847. "$ref": "#/components/schemas/Todo"
  16848. }
  16849. }
  16850. },
  16851. "required": ["sessionID", "todos"],
  16852. "additionalProperties": false
  16853. }
  16854. },
  16855. "required": ["id", "type", "properties"],
  16856. "additionalProperties": false
  16857. },
  16858. "EventSessionStatus": {
  16859. "type": "object",
  16860. "properties": {
  16861. "id": {
  16862. "type": "string"
  16863. },
  16864. "type": {
  16865. "type": "string",
  16866. "enum": ["session.status"]
  16867. },
  16868. "properties": {
  16869. "type": "object",
  16870. "properties": {
  16871. "sessionID": {
  16872. "type": "string",
  16873. "pattern": "^ses"
  16874. },
  16875. "status": {
  16876. "$ref": "#/components/schemas/SessionStatus"
  16877. }
  16878. },
  16879. "required": ["sessionID", "status"],
  16880. "additionalProperties": false
  16881. }
  16882. },
  16883. "required": ["id", "type", "properties"],
  16884. "additionalProperties": false
  16885. },
  16886. "EventSessionIdle": {
  16887. "type": "object",
  16888. "properties": {
  16889. "id": {
  16890. "type": "string"
  16891. },
  16892. "type": {
  16893. "type": "string",
  16894. "enum": ["session.idle"]
  16895. },
  16896. "properties": {
  16897. "type": "object",
  16898. "properties": {
  16899. "sessionID": {
  16900. "type": "string",
  16901. "pattern": "^ses"
  16902. }
  16903. },
  16904. "required": ["sessionID"],
  16905. "additionalProperties": false
  16906. }
  16907. },
  16908. "required": ["id", "type", "properties"],
  16909. "additionalProperties": false
  16910. },
  16911. "EventMcpToolsChanged": {
  16912. "type": "object",
  16913. "properties": {
  16914. "id": {
  16915. "type": "string"
  16916. },
  16917. "type": {
  16918. "type": "string",
  16919. "enum": ["mcp.tools.changed"]
  16920. },
  16921. "properties": {
  16922. "type": "object",
  16923. "properties": {
  16924. "server": {
  16925. "type": "string"
  16926. }
  16927. },
  16928. "required": ["server"],
  16929. "additionalProperties": false
  16930. }
  16931. },
  16932. "required": ["id", "type", "properties"],
  16933. "additionalProperties": false
  16934. },
  16935. "EventMcpBrowserOpenFailed": {
  16936. "type": "object",
  16937. "properties": {
  16938. "id": {
  16939. "type": "string"
  16940. },
  16941. "type": {
  16942. "type": "string",
  16943. "enum": ["mcp.browser.open.failed"]
  16944. },
  16945. "properties": {
  16946. "type": "object",
  16947. "properties": {
  16948. "mcpName": {
  16949. "type": "string"
  16950. },
  16951. "url": {
  16952. "type": "string"
  16953. }
  16954. },
  16955. "required": ["mcpName", "url"],
  16956. "additionalProperties": false
  16957. }
  16958. },
  16959. "required": ["id", "type", "properties"],
  16960. "additionalProperties": false
  16961. },
  16962. "EventCommandExecuted": {
  16963. "type": "object",
  16964. "properties": {
  16965. "id": {
  16966. "type": "string"
  16967. },
  16968. "type": {
  16969. "type": "string",
  16970. "enum": ["command.executed"]
  16971. },
  16972. "properties": {
  16973. "type": "object",
  16974. "properties": {
  16975. "name": {
  16976. "type": "string"
  16977. },
  16978. "sessionID": {
  16979. "type": "string",
  16980. "pattern": "^ses"
  16981. },
  16982. "arguments": {
  16983. "type": "string"
  16984. },
  16985. "messageID": {
  16986. "type": "string",
  16987. "pattern": "^msg"
  16988. }
  16989. },
  16990. "required": ["name", "sessionID", "arguments", "messageID"],
  16991. "additionalProperties": false
  16992. }
  16993. },
  16994. "required": ["id", "type", "properties"],
  16995. "additionalProperties": false
  16996. },
  16997. "EventProjectUpdated": {
  16998. "type": "object",
  16999. "properties": {
  17000. "id": {
  17001. "type": "string"
  17002. },
  17003. "type": {
  17004. "type": "string",
  17005. "enum": ["project.updated"]
  17006. },
  17007. "properties": {
  17008. "$ref": "#/components/schemas/Project"
  17009. }
  17010. },
  17011. "required": ["id", "type", "properties"],
  17012. "additionalProperties": false
  17013. },
  17014. "EventSessionCompacted": {
  17015. "type": "object",
  17016. "properties": {
  17017. "id": {
  17018. "type": "string"
  17019. },
  17020. "type": {
  17021. "type": "string",
  17022. "enum": ["session.compacted"]
  17023. },
  17024. "properties": {
  17025. "type": "object",
  17026. "properties": {
  17027. "sessionID": {
  17028. "type": "string",
  17029. "pattern": "^ses"
  17030. }
  17031. },
  17032. "required": ["sessionID"],
  17033. "additionalProperties": false
  17034. }
  17035. },
  17036. "required": ["id", "type", "properties"],
  17037. "additionalProperties": false
  17038. },
  17039. "EventVcsBranchUpdated": {
  17040. "type": "object",
  17041. "properties": {
  17042. "id": {
  17043. "type": "string"
  17044. },
  17045. "type": {
  17046. "type": "string",
  17047. "enum": ["vcs.branch.updated"]
  17048. },
  17049. "properties": {
  17050. "type": "object",
  17051. "properties": {
  17052. "branch": {
  17053. "type": "string"
  17054. }
  17055. },
  17056. "additionalProperties": false
  17057. }
  17058. },
  17059. "required": ["id", "type", "properties"],
  17060. "additionalProperties": false
  17061. },
  17062. "EventWorkspaceReady": {
  17063. "type": "object",
  17064. "properties": {
  17065. "id": {
  17066. "type": "string"
  17067. },
  17068. "type": {
  17069. "type": "string",
  17070. "enum": ["workspace.ready"]
  17071. },
  17072. "properties": {
  17073. "type": "object",
  17074. "properties": {
  17075. "name": {
  17076. "type": "string"
  17077. }
  17078. },
  17079. "required": ["name"],
  17080. "additionalProperties": false
  17081. }
  17082. },
  17083. "required": ["id", "type", "properties"],
  17084. "additionalProperties": false
  17085. },
  17086. "EventWorkspaceFailed": {
  17087. "type": "object",
  17088. "properties": {
  17089. "id": {
  17090. "type": "string"
  17091. },
  17092. "type": {
  17093. "type": "string",
  17094. "enum": ["workspace.failed"]
  17095. },
  17096. "properties": {
  17097. "type": "object",
  17098. "properties": {
  17099. "message": {
  17100. "type": "string"
  17101. }
  17102. },
  17103. "required": ["message"],
  17104. "additionalProperties": false
  17105. }
  17106. },
  17107. "required": ["id", "type", "properties"],
  17108. "additionalProperties": false
  17109. },
  17110. "EventWorkspaceStatus": {
  17111. "type": "object",
  17112. "properties": {
  17113. "id": {
  17114. "type": "string"
  17115. },
  17116. "type": {
  17117. "type": "string",
  17118. "enum": ["workspace.status"]
  17119. },
  17120. "properties": {
  17121. "type": "object",
  17122. "properties": {
  17123. "workspaceID": {
  17124. "type": "string",
  17125. "pattern": "^wrk"
  17126. },
  17127. "status": {
  17128. "type": "string",
  17129. "enum": ["connected", "connecting", "disconnected", "error"]
  17130. }
  17131. },
  17132. "required": ["workspaceID", "status"],
  17133. "additionalProperties": false
  17134. }
  17135. },
  17136. "required": ["id", "type", "properties"],
  17137. "additionalProperties": false
  17138. },
  17139. "EventWorktreeReady": {
  17140. "type": "object",
  17141. "properties": {
  17142. "id": {
  17143. "type": "string"
  17144. },
  17145. "type": {
  17146. "type": "string",
  17147. "enum": ["worktree.ready"]
  17148. },
  17149. "properties": {
  17150. "type": "object",
  17151. "properties": {
  17152. "name": {
  17153. "type": "string"
  17154. },
  17155. "branch": {
  17156. "type": "string"
  17157. }
  17158. },
  17159. "required": ["name"],
  17160. "additionalProperties": false
  17161. }
  17162. },
  17163. "required": ["id", "type", "properties"],
  17164. "additionalProperties": false
  17165. },
  17166. "EventWorktreeFailed": {
  17167. "type": "object",
  17168. "properties": {
  17169. "id": {
  17170. "type": "string"
  17171. },
  17172. "type": {
  17173. "type": "string",
  17174. "enum": ["worktree.failed"]
  17175. },
  17176. "properties": {
  17177. "type": "object",
  17178. "properties": {
  17179. "message": {
  17180. "type": "string"
  17181. }
  17182. },
  17183. "required": ["message"],
  17184. "additionalProperties": false
  17185. }
  17186. },
  17187. "required": ["id", "type", "properties"],
  17188. "additionalProperties": false
  17189. },
  17190. "EventPtyCreated": {
  17191. "type": "object",
  17192. "properties": {
  17193. "id": {
  17194. "type": "string"
  17195. },
  17196. "type": {
  17197. "type": "string",
  17198. "enum": ["pty.created"]
  17199. },
  17200. "properties": {
  17201. "type": "object",
  17202. "properties": {
  17203. "info": {
  17204. "$ref": "#/components/schemas/Pty"
  17205. }
  17206. },
  17207. "required": ["info"],
  17208. "additionalProperties": false
  17209. }
  17210. },
  17211. "required": ["id", "type", "properties"],
  17212. "additionalProperties": false
  17213. },
  17214. "EventPtyUpdated": {
  17215. "type": "object",
  17216. "properties": {
  17217. "id": {
  17218. "type": "string"
  17219. },
  17220. "type": {
  17221. "type": "string",
  17222. "enum": ["pty.updated"]
  17223. },
  17224. "properties": {
  17225. "type": "object",
  17226. "properties": {
  17227. "info": {
  17228. "$ref": "#/components/schemas/Pty"
  17229. }
  17230. },
  17231. "required": ["info"],
  17232. "additionalProperties": false
  17233. }
  17234. },
  17235. "required": ["id", "type", "properties"],
  17236. "additionalProperties": false
  17237. },
  17238. "EventPtyExited": {
  17239. "type": "object",
  17240. "properties": {
  17241. "id": {
  17242. "type": "string"
  17243. },
  17244. "type": {
  17245. "type": "string",
  17246. "enum": ["pty.exited"]
  17247. },
  17248. "properties": {
  17249. "type": "object",
  17250. "properties": {
  17251. "id": {
  17252. "type": "string",
  17253. "pattern": "^pty"
  17254. },
  17255. "exitCode": {
  17256. "type": "integer",
  17257. "minimum": 0
  17258. }
  17259. },
  17260. "required": ["id", "exitCode"],
  17261. "additionalProperties": false
  17262. }
  17263. },
  17264. "required": ["id", "type", "properties"],
  17265. "additionalProperties": false
  17266. },
  17267. "EventPtyDeleted": {
  17268. "type": "object",
  17269. "properties": {
  17270. "id": {
  17271. "type": "string"
  17272. },
  17273. "type": {
  17274. "type": "string",
  17275. "enum": ["pty.deleted"]
  17276. },
  17277. "properties": {
  17278. "type": "object",
  17279. "properties": {
  17280. "id": {
  17281. "type": "string",
  17282. "pattern": "^pty"
  17283. }
  17284. },
  17285. "required": ["id"],
  17286. "additionalProperties": false
  17287. }
  17288. },
  17289. "required": ["id", "type", "properties"],
  17290. "additionalProperties": false
  17291. },
  17292. "EventInstallationUpdated": {
  17293. "type": "object",
  17294. "properties": {
  17295. "id": {
  17296. "type": "string"
  17297. },
  17298. "type": {
  17299. "type": "string",
  17300. "enum": ["installation.updated"]
  17301. },
  17302. "properties": {
  17303. "type": "object",
  17304. "properties": {
  17305. "version": {
  17306. "type": "string"
  17307. }
  17308. },
  17309. "required": ["version"],
  17310. "additionalProperties": false
  17311. }
  17312. },
  17313. "required": ["id", "type", "properties"],
  17314. "additionalProperties": false
  17315. },
  17316. "EventInstallationUpdate-available": {
  17317. "type": "object",
  17318. "properties": {
  17319. "id": {
  17320. "type": "string"
  17321. },
  17322. "type": {
  17323. "type": "string",
  17324. "enum": ["installation.update-available"]
  17325. },
  17326. "properties": {
  17327. "type": "object",
  17328. "properties": {
  17329. "version": {
  17330. "type": "string"
  17331. }
  17332. },
  17333. "required": ["version"],
  17334. "additionalProperties": false
  17335. }
  17336. },
  17337. "required": ["id", "type", "properties"],
  17338. "additionalProperties": false
  17339. },
  17340. "EventMessageUpdated": {
  17341. "type": "object",
  17342. "properties": {
  17343. "id": {
  17344. "type": "string"
  17345. },
  17346. "type": {
  17347. "type": "string",
  17348. "enum": ["message.updated"]
  17349. },
  17350. "properties": {
  17351. "type": "object",
  17352. "properties": {
  17353. "sessionID": {
  17354. "type": "string",
  17355. "pattern": "^ses"
  17356. },
  17357. "info": {
  17358. "$ref": "#/components/schemas/Message"
  17359. }
  17360. },
  17361. "required": ["sessionID", "info"],
  17362. "additionalProperties": false
  17363. }
  17364. },
  17365. "required": ["id", "type", "properties"],
  17366. "additionalProperties": false
  17367. },
  17368. "EventMessageRemoved": {
  17369. "type": "object",
  17370. "properties": {
  17371. "id": {
  17372. "type": "string"
  17373. },
  17374. "type": {
  17375. "type": "string",
  17376. "enum": ["message.removed"]
  17377. },
  17378. "properties": {
  17379. "type": "object",
  17380. "properties": {
  17381. "sessionID": {
  17382. "type": "string",
  17383. "pattern": "^ses"
  17384. },
  17385. "messageID": {
  17386. "type": "string",
  17387. "pattern": "^msg"
  17388. }
  17389. },
  17390. "required": ["sessionID", "messageID"],
  17391. "additionalProperties": false
  17392. }
  17393. },
  17394. "required": ["id", "type", "properties"],
  17395. "additionalProperties": false
  17396. },
  17397. "EventMessagePartUpdated": {
  17398. "type": "object",
  17399. "properties": {
  17400. "id": {
  17401. "type": "string"
  17402. },
  17403. "type": {
  17404. "type": "string",
  17405. "enum": ["message.part.updated"]
  17406. },
  17407. "properties": {
  17408. "type": "object",
  17409. "properties": {
  17410. "sessionID": {
  17411. "type": "string",
  17412. "pattern": "^ses"
  17413. },
  17414. "part": {
  17415. "$ref": "#/components/schemas/Part"
  17416. },
  17417. "time": {
  17418. "type": "integer",
  17419. "minimum": 0
  17420. }
  17421. },
  17422. "required": ["sessionID", "part", "time"],
  17423. "additionalProperties": false
  17424. }
  17425. },
  17426. "required": ["id", "type", "properties"],
  17427. "additionalProperties": false
  17428. },
  17429. "EventMessagePartRemoved": {
  17430. "type": "object",
  17431. "properties": {
  17432. "id": {
  17433. "type": "string"
  17434. },
  17435. "type": {
  17436. "type": "string",
  17437. "enum": ["message.part.removed"]
  17438. },
  17439. "properties": {
  17440. "type": "object",
  17441. "properties": {
  17442. "sessionID": {
  17443. "type": "string",
  17444. "pattern": "^ses"
  17445. },
  17446. "messageID": {
  17447. "type": "string",
  17448. "pattern": "^msg"
  17449. },
  17450. "partID": {
  17451. "type": "string",
  17452. "pattern": "^prt"
  17453. }
  17454. },
  17455. "required": ["sessionID", "messageID", "partID"],
  17456. "additionalProperties": false
  17457. }
  17458. },
  17459. "required": ["id", "type", "properties"],
  17460. "additionalProperties": false
  17461. },
  17462. "EventSessionCreated": {
  17463. "type": "object",
  17464. "properties": {
  17465. "id": {
  17466. "type": "string"
  17467. },
  17468. "type": {
  17469. "type": "string",
  17470. "enum": ["session.created"]
  17471. },
  17472. "properties": {
  17473. "type": "object",
  17474. "properties": {
  17475. "sessionID": {
  17476. "type": "string",
  17477. "pattern": "^ses"
  17478. },
  17479. "info": {
  17480. "$ref": "#/components/schemas/Session"
  17481. }
  17482. },
  17483. "required": ["sessionID", "info"],
  17484. "additionalProperties": false
  17485. }
  17486. },
  17487. "required": ["id", "type", "properties"],
  17488. "additionalProperties": false
  17489. },
  17490. "EventSessionUpdated": {
  17491. "type": "object",
  17492. "properties": {
  17493. "id": {
  17494. "type": "string"
  17495. },
  17496. "type": {
  17497. "type": "string",
  17498. "enum": ["session.updated"]
  17499. },
  17500. "properties": {
  17501. "type": "object",
  17502. "properties": {
  17503. "sessionID": {
  17504. "type": "string",
  17505. "pattern": "^ses"
  17506. },
  17507. "info": {
  17508. "$ref": "#/components/schemas/Session"
  17509. }
  17510. },
  17511. "required": ["sessionID", "info"],
  17512. "additionalProperties": false
  17513. }
  17514. },
  17515. "required": ["id", "type", "properties"],
  17516. "additionalProperties": false
  17517. },
  17518. "EventSessionDeleted": {
  17519. "type": "object",
  17520. "properties": {
  17521. "id": {
  17522. "type": "string"
  17523. },
  17524. "type": {
  17525. "type": "string",
  17526. "enum": ["session.deleted"]
  17527. },
  17528. "properties": {
  17529. "type": "object",
  17530. "properties": {
  17531. "sessionID": {
  17532. "type": "string",
  17533. "pattern": "^ses"
  17534. },
  17535. "info": {
  17536. "$ref": "#/components/schemas/Session"
  17537. }
  17538. },
  17539. "required": ["sessionID", "info"],
  17540. "additionalProperties": false
  17541. }
  17542. },
  17543. "required": ["id", "type", "properties"],
  17544. "additionalProperties": false
  17545. },
  17546. "EventSessionNextAgentSwitched": {
  17547. "type": "object",
  17548. "properties": {
  17549. "id": {
  17550. "type": "string"
  17551. },
  17552. "type": {
  17553. "type": "string",
  17554. "enum": ["session.next.agent.switched"]
  17555. },
  17556. "properties": {
  17557. "type": "object",
  17558. "properties": {
  17559. "timestamp": {
  17560. "type": "number"
  17561. },
  17562. "sessionID": {
  17563. "type": "string",
  17564. "pattern": "^ses"
  17565. },
  17566. "agent": {
  17567. "type": "string"
  17568. }
  17569. },
  17570. "required": ["timestamp", "sessionID", "agent"],
  17571. "additionalProperties": false
  17572. }
  17573. },
  17574. "required": ["id", "type", "properties"],
  17575. "additionalProperties": false
  17576. },
  17577. "EventSessionNextModelSwitched": {
  17578. "type": "object",
  17579. "properties": {
  17580. "id": {
  17581. "type": "string"
  17582. },
  17583. "type": {
  17584. "type": "string",
  17585. "enum": ["session.next.model.switched"]
  17586. },
  17587. "properties": {
  17588. "type": "object",
  17589. "properties": {
  17590. "timestamp": {
  17591. "type": "number"
  17592. },
  17593. "sessionID": {
  17594. "type": "string",
  17595. "pattern": "^ses"
  17596. },
  17597. "model": {
  17598. "type": "object",
  17599. "properties": {
  17600. "id": {
  17601. "type": "string"
  17602. },
  17603. "providerID": {
  17604. "type": "string"
  17605. },
  17606. "variant": {
  17607. "type": "string"
  17608. }
  17609. },
  17610. "required": ["id", "providerID", "variant"],
  17611. "additionalProperties": false
  17612. }
  17613. },
  17614. "required": ["timestamp", "sessionID", "model"],
  17615. "additionalProperties": false
  17616. }
  17617. },
  17618. "required": ["id", "type", "properties"],
  17619. "additionalProperties": false
  17620. },
  17621. "PromptSource": {
  17622. "type": "object",
  17623. "properties": {
  17624. "start": {
  17625. "type": "number"
  17626. },
  17627. "end": {
  17628. "type": "number"
  17629. },
  17630. "text": {
  17631. "type": "string"
  17632. }
  17633. },
  17634. "required": ["start", "end", "text"],
  17635. "additionalProperties": false
  17636. },
  17637. "PromptFileAttachment": {
  17638. "type": "object",
  17639. "properties": {
  17640. "uri": {
  17641. "type": "string"
  17642. },
  17643. "mime": {
  17644. "type": "string"
  17645. },
  17646. "name": {
  17647. "type": "string"
  17648. },
  17649. "description": {
  17650. "type": "string"
  17651. },
  17652. "source": {
  17653. "$ref": "#/components/schemas/PromptSource"
  17654. }
  17655. },
  17656. "required": ["uri", "mime"],
  17657. "additionalProperties": false
  17658. },
  17659. "PromptAgentAttachment": {
  17660. "type": "object",
  17661. "properties": {
  17662. "name": {
  17663. "type": "string"
  17664. },
  17665. "source": {
  17666. "$ref": "#/components/schemas/PromptSource"
  17667. }
  17668. },
  17669. "required": ["name"],
  17670. "additionalProperties": false
  17671. },
  17672. "PromptReferenceAttachment": {
  17673. "type": "object",
  17674. "properties": {
  17675. "name": {
  17676. "type": "string"
  17677. },
  17678. "kind": {
  17679. "type": "string",
  17680. "enum": ["local", "git", "invalid"]
  17681. },
  17682. "uri": {
  17683. "type": "string"
  17684. },
  17685. "repository": {
  17686. "type": "string"
  17687. },
  17688. "branch": {
  17689. "type": "string"
  17690. },
  17691. "target": {
  17692. "type": "string"
  17693. },
  17694. "targetUri": {
  17695. "type": "string"
  17696. },
  17697. "problem": {
  17698. "type": "string"
  17699. },
  17700. "source": {
  17701. "$ref": "#/components/schemas/PromptSource"
  17702. }
  17703. },
  17704. "required": ["name", "kind"],
  17705. "additionalProperties": false
  17706. },
  17707. "EventSessionNextPrompted": {
  17708. "type": "object",
  17709. "properties": {
  17710. "id": {
  17711. "type": "string"
  17712. },
  17713. "type": {
  17714. "type": "string",
  17715. "enum": ["session.next.prompted"]
  17716. },
  17717. "properties": {
  17718. "type": "object",
  17719. "properties": {
  17720. "timestamp": {
  17721. "type": "number"
  17722. },
  17723. "sessionID": {
  17724. "type": "string",
  17725. "pattern": "^ses"
  17726. },
  17727. "prompt": {
  17728. "$ref": "#/components/schemas/Prompt"
  17729. }
  17730. },
  17731. "required": ["timestamp", "sessionID", "prompt"],
  17732. "additionalProperties": false
  17733. }
  17734. },
  17735. "required": ["id", "type", "properties"],
  17736. "additionalProperties": false
  17737. },
  17738. "EventSessionNextSynthetic": {
  17739. "type": "object",
  17740. "properties": {
  17741. "id": {
  17742. "type": "string"
  17743. },
  17744. "type": {
  17745. "type": "string",
  17746. "enum": ["session.next.synthetic"]
  17747. },
  17748. "properties": {
  17749. "type": "object",
  17750. "properties": {
  17751. "timestamp": {
  17752. "type": "number"
  17753. },
  17754. "sessionID": {
  17755. "type": "string",
  17756. "pattern": "^ses"
  17757. },
  17758. "text": {
  17759. "type": "string"
  17760. }
  17761. },
  17762. "required": ["timestamp", "sessionID", "text"],
  17763. "additionalProperties": false
  17764. }
  17765. },
  17766. "required": ["id", "type", "properties"],
  17767. "additionalProperties": false
  17768. },
  17769. "EventSessionNextShellStarted": {
  17770. "type": "object",
  17771. "properties": {
  17772. "id": {
  17773. "type": "string"
  17774. },
  17775. "type": {
  17776. "type": "string",
  17777. "enum": ["session.next.shell.started"]
  17778. },
  17779. "properties": {
  17780. "type": "object",
  17781. "properties": {
  17782. "timestamp": {
  17783. "type": "number"
  17784. },
  17785. "sessionID": {
  17786. "type": "string",
  17787. "pattern": "^ses"
  17788. },
  17789. "callID": {
  17790. "type": "string"
  17791. },
  17792. "command": {
  17793. "type": "string"
  17794. }
  17795. },
  17796. "required": ["timestamp", "sessionID", "callID", "command"],
  17797. "additionalProperties": false
  17798. }
  17799. },
  17800. "required": ["id", "type", "properties"],
  17801. "additionalProperties": false
  17802. },
  17803. "EventSessionNextShellEnded": {
  17804. "type": "object",
  17805. "properties": {
  17806. "id": {
  17807. "type": "string"
  17808. },
  17809. "type": {
  17810. "type": "string",
  17811. "enum": ["session.next.shell.ended"]
  17812. },
  17813. "properties": {
  17814. "type": "object",
  17815. "properties": {
  17816. "timestamp": {
  17817. "type": "number"
  17818. },
  17819. "sessionID": {
  17820. "type": "string",
  17821. "pattern": "^ses"
  17822. },
  17823. "callID": {
  17824. "type": "string"
  17825. },
  17826. "output": {
  17827. "type": "string"
  17828. }
  17829. },
  17830. "required": ["timestamp", "sessionID", "callID", "output"],
  17831. "additionalProperties": false
  17832. }
  17833. },
  17834. "required": ["id", "type", "properties"],
  17835. "additionalProperties": false
  17836. },
  17837. "EventSessionNextStepStarted": {
  17838. "type": "object",
  17839. "properties": {
  17840. "id": {
  17841. "type": "string"
  17842. },
  17843. "type": {
  17844. "type": "string",
  17845. "enum": ["session.next.step.started"]
  17846. },
  17847. "properties": {
  17848. "type": "object",
  17849. "properties": {
  17850. "timestamp": {
  17851. "type": "number"
  17852. },
  17853. "sessionID": {
  17854. "type": "string",
  17855. "pattern": "^ses"
  17856. },
  17857. "agent": {
  17858. "type": "string"
  17859. },
  17860. "model": {
  17861. "type": "object",
  17862. "properties": {
  17863. "id": {
  17864. "type": "string"
  17865. },
  17866. "providerID": {
  17867. "type": "string"
  17868. },
  17869. "variant": {
  17870. "type": "string"
  17871. }
  17872. },
  17873. "required": ["id", "providerID", "variant"],
  17874. "additionalProperties": false
  17875. },
  17876. "snapshot": {
  17877. "type": "string"
  17878. }
  17879. },
  17880. "required": ["timestamp", "sessionID", "agent", "model"],
  17881. "additionalProperties": false
  17882. }
  17883. },
  17884. "required": ["id", "type", "properties"],
  17885. "additionalProperties": false
  17886. },
  17887. "EventSessionNextStepEnded": {
  17888. "type": "object",
  17889. "properties": {
  17890. "id": {
  17891. "type": "string"
  17892. },
  17893. "type": {
  17894. "type": "string",
  17895. "enum": ["session.next.step.ended"]
  17896. },
  17897. "properties": {
  17898. "type": "object",
  17899. "properties": {
  17900. "timestamp": {
  17901. "type": "number"
  17902. },
  17903. "sessionID": {
  17904. "type": "string",
  17905. "pattern": "^ses"
  17906. },
  17907. "finish": {
  17908. "type": "string"
  17909. },
  17910. "cost": {
  17911. "type": "number"
  17912. },
  17913. "tokens": {
  17914. "type": "object",
  17915. "properties": {
  17916. "input": {
  17917. "type": "number"
  17918. },
  17919. "output": {
  17920. "type": "number"
  17921. },
  17922. "reasoning": {
  17923. "type": "number"
  17924. },
  17925. "cache": {
  17926. "type": "object",
  17927. "properties": {
  17928. "read": {
  17929. "type": "number"
  17930. },
  17931. "write": {
  17932. "type": "number"
  17933. }
  17934. },
  17935. "required": ["read", "write"],
  17936. "additionalProperties": false
  17937. }
  17938. },
  17939. "required": ["input", "output", "reasoning", "cache"],
  17940. "additionalProperties": false
  17941. },
  17942. "snapshot": {
  17943. "type": "string"
  17944. }
  17945. },
  17946. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17947. "additionalProperties": false
  17948. }
  17949. },
  17950. "required": ["id", "type", "properties"],
  17951. "additionalProperties": false
  17952. },
  17953. "SessionErrorUnknown": {
  17954. "type": "object",
  17955. "properties": {
  17956. "type": {
  17957. "type": "string",
  17958. "enum": ["unknown"]
  17959. },
  17960. "message": {
  17961. "type": "string"
  17962. }
  17963. },
  17964. "required": ["type", "message"],
  17965. "additionalProperties": false
  17966. },
  17967. "EventSessionNextStepFailed": {
  17968. "type": "object",
  17969. "properties": {
  17970. "id": {
  17971. "type": "string"
  17972. },
  17973. "type": {
  17974. "type": "string",
  17975. "enum": ["session.next.step.failed"]
  17976. },
  17977. "properties": {
  17978. "type": "object",
  17979. "properties": {
  17980. "timestamp": {
  17981. "type": "number"
  17982. },
  17983. "sessionID": {
  17984. "type": "string",
  17985. "pattern": "^ses"
  17986. },
  17987. "error": {
  17988. "$ref": "#/components/schemas/SessionErrorUnknown"
  17989. }
  17990. },
  17991. "required": ["timestamp", "sessionID", "error"],
  17992. "additionalProperties": false
  17993. }
  17994. },
  17995. "required": ["id", "type", "properties"],
  17996. "additionalProperties": false
  17997. },
  17998. "EventSessionNextTextStarted": {
  17999. "type": "object",
  18000. "properties": {
  18001. "id": {
  18002. "type": "string"
  18003. },
  18004. "type": {
  18005. "type": "string",
  18006. "enum": ["session.next.text.started"]
  18007. },
  18008. "properties": {
  18009. "type": "object",
  18010. "properties": {
  18011. "timestamp": {
  18012. "type": "number"
  18013. },
  18014. "sessionID": {
  18015. "type": "string",
  18016. "pattern": "^ses"
  18017. }
  18018. },
  18019. "required": ["timestamp", "sessionID"],
  18020. "additionalProperties": false
  18021. }
  18022. },
  18023. "required": ["id", "type", "properties"],
  18024. "additionalProperties": false
  18025. },
  18026. "EventSessionNextTextDelta": {
  18027. "type": "object",
  18028. "properties": {
  18029. "id": {
  18030. "type": "string"
  18031. },
  18032. "type": {
  18033. "type": "string",
  18034. "enum": ["session.next.text.delta"]
  18035. },
  18036. "properties": {
  18037. "type": "object",
  18038. "properties": {
  18039. "timestamp": {
  18040. "type": "number"
  18041. },
  18042. "sessionID": {
  18043. "type": "string",
  18044. "pattern": "^ses"
  18045. },
  18046. "delta": {
  18047. "type": "string"
  18048. }
  18049. },
  18050. "required": ["timestamp", "sessionID", "delta"],
  18051. "additionalProperties": false
  18052. }
  18053. },
  18054. "required": ["id", "type", "properties"],
  18055. "additionalProperties": false
  18056. },
  18057. "EventSessionNextTextEnded": {
  18058. "type": "object",
  18059. "properties": {
  18060. "id": {
  18061. "type": "string"
  18062. },
  18063. "type": {
  18064. "type": "string",
  18065. "enum": ["session.next.text.ended"]
  18066. },
  18067. "properties": {
  18068. "type": "object",
  18069. "properties": {
  18070. "timestamp": {
  18071. "type": "number"
  18072. },
  18073. "sessionID": {
  18074. "type": "string",
  18075. "pattern": "^ses"
  18076. },
  18077. "text": {
  18078. "type": "string"
  18079. }
  18080. },
  18081. "required": ["timestamp", "sessionID", "text"],
  18082. "additionalProperties": false
  18083. }
  18084. },
  18085. "required": ["id", "type", "properties"],
  18086. "additionalProperties": false
  18087. },
  18088. "EventSessionNextReasoningStarted": {
  18089. "type": "object",
  18090. "properties": {
  18091. "id": {
  18092. "type": "string"
  18093. },
  18094. "type": {
  18095. "type": "string",
  18096. "enum": ["session.next.reasoning.started"]
  18097. },
  18098. "properties": {
  18099. "type": "object",
  18100. "properties": {
  18101. "timestamp": {
  18102. "type": "number"
  18103. },
  18104. "sessionID": {
  18105. "type": "string",
  18106. "pattern": "^ses"
  18107. },
  18108. "reasoningID": {
  18109. "type": "string"
  18110. }
  18111. },
  18112. "required": ["timestamp", "sessionID", "reasoningID"],
  18113. "additionalProperties": false
  18114. }
  18115. },
  18116. "required": ["id", "type", "properties"],
  18117. "additionalProperties": false
  18118. },
  18119. "EventSessionNextReasoningDelta": {
  18120. "type": "object",
  18121. "properties": {
  18122. "id": {
  18123. "type": "string"
  18124. },
  18125. "type": {
  18126. "type": "string",
  18127. "enum": ["session.next.reasoning.delta"]
  18128. },
  18129. "properties": {
  18130. "type": "object",
  18131. "properties": {
  18132. "timestamp": {
  18133. "type": "number"
  18134. },
  18135. "sessionID": {
  18136. "type": "string",
  18137. "pattern": "^ses"
  18138. },
  18139. "reasoningID": {
  18140. "type": "string"
  18141. },
  18142. "delta": {
  18143. "type": "string"
  18144. }
  18145. },
  18146. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  18147. "additionalProperties": false
  18148. }
  18149. },
  18150. "required": ["id", "type", "properties"],
  18151. "additionalProperties": false
  18152. },
  18153. "EventSessionNextReasoningEnded": {
  18154. "type": "object",
  18155. "properties": {
  18156. "id": {
  18157. "type": "string"
  18158. },
  18159. "type": {
  18160. "type": "string",
  18161. "enum": ["session.next.reasoning.ended"]
  18162. },
  18163. "properties": {
  18164. "type": "object",
  18165. "properties": {
  18166. "timestamp": {
  18167. "type": "number"
  18168. },
  18169. "sessionID": {
  18170. "type": "string",
  18171. "pattern": "^ses"
  18172. },
  18173. "reasoningID": {
  18174. "type": "string"
  18175. },
  18176. "text": {
  18177. "type": "string"
  18178. }
  18179. },
  18180. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  18181. "additionalProperties": false
  18182. }
  18183. },
  18184. "required": ["id", "type", "properties"],
  18185. "additionalProperties": false
  18186. },
  18187. "EventSessionNextToolInputStarted": {
  18188. "type": "object",
  18189. "properties": {
  18190. "id": {
  18191. "type": "string"
  18192. },
  18193. "type": {
  18194. "type": "string",
  18195. "enum": ["session.next.tool.input.started"]
  18196. },
  18197. "properties": {
  18198. "type": "object",
  18199. "properties": {
  18200. "timestamp": {
  18201. "type": "number"
  18202. },
  18203. "sessionID": {
  18204. "type": "string",
  18205. "pattern": "^ses"
  18206. },
  18207. "callID": {
  18208. "type": "string"
  18209. },
  18210. "name": {
  18211. "type": "string"
  18212. }
  18213. },
  18214. "required": ["timestamp", "sessionID", "callID", "name"],
  18215. "additionalProperties": false
  18216. }
  18217. },
  18218. "required": ["id", "type", "properties"],
  18219. "additionalProperties": false
  18220. },
  18221. "EventSessionNextToolInputDelta": {
  18222. "type": "object",
  18223. "properties": {
  18224. "id": {
  18225. "type": "string"
  18226. },
  18227. "type": {
  18228. "type": "string",
  18229. "enum": ["session.next.tool.input.delta"]
  18230. },
  18231. "properties": {
  18232. "type": "object",
  18233. "properties": {
  18234. "timestamp": {
  18235. "type": "number"
  18236. },
  18237. "sessionID": {
  18238. "type": "string",
  18239. "pattern": "^ses"
  18240. },
  18241. "callID": {
  18242. "type": "string"
  18243. },
  18244. "delta": {
  18245. "type": "string"
  18246. }
  18247. },
  18248. "required": ["timestamp", "sessionID", "callID", "delta"],
  18249. "additionalProperties": false
  18250. }
  18251. },
  18252. "required": ["id", "type", "properties"],
  18253. "additionalProperties": false
  18254. },
  18255. "EventSessionNextToolInputEnded": {
  18256. "type": "object",
  18257. "properties": {
  18258. "id": {
  18259. "type": "string"
  18260. },
  18261. "type": {
  18262. "type": "string",
  18263. "enum": ["session.next.tool.input.ended"]
  18264. },
  18265. "properties": {
  18266. "type": "object",
  18267. "properties": {
  18268. "timestamp": {
  18269. "type": "number"
  18270. },
  18271. "sessionID": {
  18272. "type": "string",
  18273. "pattern": "^ses"
  18274. },
  18275. "callID": {
  18276. "type": "string"
  18277. },
  18278. "text": {
  18279. "type": "string"
  18280. }
  18281. },
  18282. "required": ["timestamp", "sessionID", "callID", "text"],
  18283. "additionalProperties": false
  18284. }
  18285. },
  18286. "required": ["id", "type", "properties"],
  18287. "additionalProperties": false
  18288. },
  18289. "EventSessionNextToolCalled": {
  18290. "type": "object",
  18291. "properties": {
  18292. "id": {
  18293. "type": "string"
  18294. },
  18295. "type": {
  18296. "type": "string",
  18297. "enum": ["session.next.tool.called"]
  18298. },
  18299. "properties": {
  18300. "type": "object",
  18301. "properties": {
  18302. "timestamp": {
  18303. "type": "number"
  18304. },
  18305. "sessionID": {
  18306. "type": "string",
  18307. "pattern": "^ses"
  18308. },
  18309. "callID": {
  18310. "type": "string"
  18311. },
  18312. "tool": {
  18313. "type": "string"
  18314. },
  18315. "input": {
  18316. "type": "object"
  18317. },
  18318. "provider": {
  18319. "type": "object",
  18320. "properties": {
  18321. "executed": {
  18322. "type": "boolean"
  18323. },
  18324. "metadata": {
  18325. "type": "object"
  18326. }
  18327. },
  18328. "required": ["executed"],
  18329. "additionalProperties": false
  18330. }
  18331. },
  18332. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  18333. "additionalProperties": false
  18334. }
  18335. },
  18336. "required": ["id", "type", "properties"],
  18337. "additionalProperties": false
  18338. },
  18339. "ToolTextContent": {
  18340. "type": "object",
  18341. "properties": {
  18342. "type": {
  18343. "type": "string",
  18344. "enum": ["text"]
  18345. },
  18346. "text": {
  18347. "type": "string"
  18348. }
  18349. },
  18350. "required": ["type", "text"],
  18351. "additionalProperties": false
  18352. },
  18353. "ToolFileContent": {
  18354. "type": "object",
  18355. "properties": {
  18356. "type": {
  18357. "type": "string",
  18358. "enum": ["file"]
  18359. },
  18360. "uri": {
  18361. "type": "string"
  18362. },
  18363. "mime": {
  18364. "type": "string"
  18365. },
  18366. "name": {
  18367. "type": "string"
  18368. }
  18369. },
  18370. "required": ["type", "uri", "mime"],
  18371. "additionalProperties": false
  18372. },
  18373. "EventSessionNextToolProgress": {
  18374. "type": "object",
  18375. "properties": {
  18376. "id": {
  18377. "type": "string"
  18378. },
  18379. "type": {
  18380. "type": "string",
  18381. "enum": ["session.next.tool.progress"]
  18382. },
  18383. "properties": {
  18384. "type": "object",
  18385. "properties": {
  18386. "timestamp": {
  18387. "type": "number"
  18388. },
  18389. "sessionID": {
  18390. "type": "string",
  18391. "pattern": "^ses"
  18392. },
  18393. "callID": {
  18394. "type": "string"
  18395. },
  18396. "structured": {
  18397. "type": "object"
  18398. },
  18399. "content": {
  18400. "type": "array",
  18401. "items": {
  18402. "anyOf": [
  18403. {
  18404. "$ref": "#/components/schemas/ToolTextContent"
  18405. },
  18406. {
  18407. "$ref": "#/components/schemas/ToolFileContent"
  18408. }
  18409. ]
  18410. }
  18411. }
  18412. },
  18413. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  18414. "additionalProperties": false
  18415. }
  18416. },
  18417. "required": ["id", "type", "properties"],
  18418. "additionalProperties": false
  18419. },
  18420. "EventSessionNextToolSuccess": {
  18421. "type": "object",
  18422. "properties": {
  18423. "id": {
  18424. "type": "string"
  18425. },
  18426. "type": {
  18427. "type": "string",
  18428. "enum": ["session.next.tool.success"]
  18429. },
  18430. "properties": {
  18431. "type": "object",
  18432. "properties": {
  18433. "timestamp": {
  18434. "type": "number"
  18435. },
  18436. "sessionID": {
  18437. "type": "string",
  18438. "pattern": "^ses"
  18439. },
  18440. "callID": {
  18441. "type": "string"
  18442. },
  18443. "structured": {
  18444. "type": "object"
  18445. },
  18446. "content": {
  18447. "type": "array",
  18448. "items": {
  18449. "anyOf": [
  18450. {
  18451. "$ref": "#/components/schemas/ToolTextContent"
  18452. },
  18453. {
  18454. "$ref": "#/components/schemas/ToolFileContent"
  18455. }
  18456. ]
  18457. }
  18458. },
  18459. "provider": {
  18460. "type": "object",
  18461. "properties": {
  18462. "executed": {
  18463. "type": "boolean"
  18464. },
  18465. "metadata": {
  18466. "type": "object"
  18467. }
  18468. },
  18469. "required": ["executed"],
  18470. "additionalProperties": false
  18471. }
  18472. },
  18473. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  18474. "additionalProperties": false
  18475. }
  18476. },
  18477. "required": ["id", "type", "properties"],
  18478. "additionalProperties": false
  18479. },
  18480. "EventSessionNextToolFailed": {
  18481. "type": "object",
  18482. "properties": {
  18483. "id": {
  18484. "type": "string"
  18485. },
  18486. "type": {
  18487. "type": "string",
  18488. "enum": ["session.next.tool.failed"]
  18489. },
  18490. "properties": {
  18491. "type": "object",
  18492. "properties": {
  18493. "timestamp": {
  18494. "type": "number"
  18495. },
  18496. "sessionID": {
  18497. "type": "string",
  18498. "pattern": "^ses"
  18499. },
  18500. "callID": {
  18501. "type": "string"
  18502. },
  18503. "error": {
  18504. "$ref": "#/components/schemas/SessionErrorUnknown"
  18505. },
  18506. "provider": {
  18507. "type": "object",
  18508. "properties": {
  18509. "executed": {
  18510. "type": "boolean"
  18511. },
  18512. "metadata": {
  18513. "type": "object"
  18514. }
  18515. },
  18516. "required": ["executed"],
  18517. "additionalProperties": false
  18518. }
  18519. },
  18520. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18521. "additionalProperties": false
  18522. }
  18523. },
  18524. "required": ["id", "type", "properties"],
  18525. "additionalProperties": false
  18526. },
  18527. "SessionNextRetry_error": {
  18528. "type": "object",
  18529. "properties": {
  18530. "message": {
  18531. "type": "string"
  18532. },
  18533. "statusCode": {
  18534. "type": "number"
  18535. },
  18536. "isRetryable": {
  18537. "type": "boolean"
  18538. },
  18539. "responseHeaders": {
  18540. "type": "object",
  18541. "additionalProperties": {
  18542. "type": "string"
  18543. }
  18544. },
  18545. "responseBody": {
  18546. "type": "string"
  18547. },
  18548. "metadata": {
  18549. "type": "object",
  18550. "additionalProperties": {
  18551. "type": "string"
  18552. }
  18553. }
  18554. },
  18555. "required": ["message", "isRetryable"],
  18556. "additionalProperties": false
  18557. },
  18558. "EventSessionNextRetried": {
  18559. "type": "object",
  18560. "properties": {
  18561. "id": {
  18562. "type": "string"
  18563. },
  18564. "type": {
  18565. "type": "string",
  18566. "enum": ["session.next.retried"]
  18567. },
  18568. "properties": {
  18569. "type": "object",
  18570. "properties": {
  18571. "timestamp": {
  18572. "type": "number"
  18573. },
  18574. "sessionID": {
  18575. "type": "string",
  18576. "pattern": "^ses"
  18577. },
  18578. "attempt": {
  18579. "type": "number"
  18580. },
  18581. "error": {
  18582. "$ref": "#/components/schemas/SessionNextRetry_error"
  18583. }
  18584. },
  18585. "required": ["timestamp", "sessionID", "attempt", "error"],
  18586. "additionalProperties": false
  18587. }
  18588. },
  18589. "required": ["id", "type", "properties"],
  18590. "additionalProperties": false
  18591. },
  18592. "EventSessionNextCompactionStarted": {
  18593. "type": "object",
  18594. "properties": {
  18595. "id": {
  18596. "type": "string"
  18597. },
  18598. "type": {
  18599. "type": "string",
  18600. "enum": ["session.next.compaction.started"]
  18601. },
  18602. "properties": {
  18603. "type": "object",
  18604. "properties": {
  18605. "timestamp": {
  18606. "type": "number"
  18607. },
  18608. "sessionID": {
  18609. "type": "string",
  18610. "pattern": "^ses"
  18611. },
  18612. "reason": {
  18613. "type": "string",
  18614. "enum": ["auto", "manual"]
  18615. }
  18616. },
  18617. "required": ["timestamp", "sessionID", "reason"],
  18618. "additionalProperties": false
  18619. }
  18620. },
  18621. "required": ["id", "type", "properties"],
  18622. "additionalProperties": false
  18623. },
  18624. "EventSessionNextCompactionDelta": {
  18625. "type": "object",
  18626. "properties": {
  18627. "id": {
  18628. "type": "string"
  18629. },
  18630. "type": {
  18631. "type": "string",
  18632. "enum": ["session.next.compaction.delta"]
  18633. },
  18634. "properties": {
  18635. "type": "object",
  18636. "properties": {
  18637. "timestamp": {
  18638. "type": "number"
  18639. },
  18640. "sessionID": {
  18641. "type": "string",
  18642. "pattern": "^ses"
  18643. },
  18644. "text": {
  18645. "type": "string"
  18646. }
  18647. },
  18648. "required": ["timestamp", "sessionID", "text"],
  18649. "additionalProperties": false
  18650. }
  18651. },
  18652. "required": ["id", "type", "properties"],
  18653. "additionalProperties": false
  18654. },
  18655. "EventSessionNextCompactionEnded": {
  18656. "type": "object",
  18657. "properties": {
  18658. "id": {
  18659. "type": "string"
  18660. },
  18661. "type": {
  18662. "type": "string",
  18663. "enum": ["session.next.compaction.ended"]
  18664. },
  18665. "properties": {
  18666. "type": "object",
  18667. "properties": {
  18668. "timestamp": {
  18669. "type": "number"
  18670. },
  18671. "sessionID": {
  18672. "type": "string",
  18673. "pattern": "^ses"
  18674. },
  18675. "text": {
  18676. "type": "string"
  18677. },
  18678. "include": {
  18679. "type": "string"
  18680. }
  18681. },
  18682. "required": ["timestamp", "sessionID", "text"],
  18683. "additionalProperties": false
  18684. }
  18685. },
  18686. "required": ["id", "type", "properties"],
  18687. "additionalProperties": false
  18688. },
  18689. "ModelV2Info": {
  18690. "type": "object",
  18691. "properties": {
  18692. "id": {
  18693. "type": "string"
  18694. },
  18695. "apiID": {
  18696. "type": "string"
  18697. },
  18698. "providerID": {
  18699. "type": "string"
  18700. },
  18701. "family": {
  18702. "type": "string"
  18703. },
  18704. "name": {
  18705. "type": "string"
  18706. },
  18707. "endpoint": {
  18708. "anyOf": [
  18709. {
  18710. "type": "object",
  18711. "properties": {
  18712. "type": {
  18713. "type": "string",
  18714. "enum": ["unknown"]
  18715. }
  18716. },
  18717. "required": ["type"],
  18718. "additionalProperties": false
  18719. },
  18720. {
  18721. "type": "object",
  18722. "properties": {
  18723. "type": {
  18724. "type": "string",
  18725. "enum": ["openai/responses"]
  18726. },
  18727. "url": {
  18728. "type": "string"
  18729. },
  18730. "websocket": {
  18731. "type": "boolean"
  18732. }
  18733. },
  18734. "required": ["type", "url"],
  18735. "additionalProperties": false
  18736. },
  18737. {
  18738. "type": "object",
  18739. "properties": {
  18740. "type": {
  18741. "type": "string",
  18742. "enum": ["openai/completions"]
  18743. },
  18744. "url": {
  18745. "type": "string"
  18746. },
  18747. "reasoning": {
  18748. "anyOf": [
  18749. {
  18750. "type": "object",
  18751. "properties": {
  18752. "type": {
  18753. "type": "string",
  18754. "enum": ["reasoning_content"]
  18755. }
  18756. },
  18757. "required": ["type"],
  18758. "additionalProperties": false
  18759. },
  18760. {
  18761. "type": "object",
  18762. "properties": {
  18763. "type": {
  18764. "type": "string",
  18765. "enum": ["reasoning_details"]
  18766. }
  18767. },
  18768. "required": ["type"],
  18769. "additionalProperties": false
  18770. }
  18771. ]
  18772. }
  18773. },
  18774. "required": ["type", "url"],
  18775. "additionalProperties": false
  18776. },
  18777. {
  18778. "type": "object",
  18779. "properties": {
  18780. "type": {
  18781. "type": "string",
  18782. "enum": ["anthropic/messages"]
  18783. },
  18784. "url": {
  18785. "type": "string"
  18786. }
  18787. },
  18788. "required": ["type", "url"],
  18789. "additionalProperties": false
  18790. },
  18791. {
  18792. "type": "object",
  18793. "properties": {
  18794. "type": {
  18795. "type": "string",
  18796. "enum": ["aisdk"]
  18797. },
  18798. "package": {
  18799. "type": "string"
  18800. },
  18801. "url": {
  18802. "type": "string"
  18803. }
  18804. },
  18805. "required": ["type", "package"],
  18806. "additionalProperties": false
  18807. }
  18808. ]
  18809. },
  18810. "capabilities": {
  18811. "type": "object",
  18812. "properties": {
  18813. "tools": {
  18814. "type": "boolean"
  18815. },
  18816. "input": {
  18817. "type": "array",
  18818. "items": {
  18819. "type": "string"
  18820. }
  18821. },
  18822. "output": {
  18823. "type": "array",
  18824. "items": {
  18825. "type": "string"
  18826. }
  18827. }
  18828. },
  18829. "required": ["tools", "input", "output"],
  18830. "additionalProperties": false
  18831. },
  18832. "options": {
  18833. "type": "object",
  18834. "properties": {
  18835. "headers": {
  18836. "type": "object",
  18837. "additionalProperties": {
  18838. "type": "string"
  18839. }
  18840. },
  18841. "body": {
  18842. "type": "object"
  18843. },
  18844. "aisdk": {
  18845. "type": "object",
  18846. "properties": {
  18847. "provider": {
  18848. "type": "object"
  18849. },
  18850. "request": {
  18851. "type": "object"
  18852. }
  18853. },
  18854. "required": ["provider", "request"],
  18855. "additionalProperties": false
  18856. },
  18857. "variant": {
  18858. "type": "string"
  18859. }
  18860. },
  18861. "required": ["headers", "body", "aisdk"],
  18862. "additionalProperties": false
  18863. },
  18864. "variants": {
  18865. "type": "array",
  18866. "items": {
  18867. "type": "object",
  18868. "properties": {
  18869. "id": {
  18870. "type": "string"
  18871. },
  18872. "headers": {
  18873. "type": "object",
  18874. "additionalProperties": {
  18875. "type": "string"
  18876. }
  18877. },
  18878. "body": {
  18879. "type": "object"
  18880. },
  18881. "aisdk": {
  18882. "type": "object",
  18883. "properties": {
  18884. "provider": {
  18885. "type": "object"
  18886. },
  18887. "request": {
  18888. "type": "object"
  18889. }
  18890. },
  18891. "required": ["provider", "request"],
  18892. "additionalProperties": false
  18893. }
  18894. },
  18895. "required": ["id", "headers", "body", "aisdk"],
  18896. "additionalProperties": false
  18897. }
  18898. },
  18899. "time": {
  18900. "type": "object",
  18901. "properties": {
  18902. "released": {
  18903. "anyOf": [
  18904. {
  18905. "type": "number"
  18906. },
  18907. {
  18908. "type": "string",
  18909. "enum": ["NaN"]
  18910. },
  18911. {
  18912. "type": "string",
  18913. "enum": ["Infinity"]
  18914. },
  18915. {
  18916. "type": "string",
  18917. "enum": ["-Infinity"]
  18918. },
  18919. {
  18920. "type": "string",
  18921. "enum": ["Infinity", "-Infinity", "NaN"]
  18922. }
  18923. ]
  18924. }
  18925. },
  18926. "required": ["released"],
  18927. "additionalProperties": false
  18928. },
  18929. "cost": {
  18930. "type": "array",
  18931. "items": {
  18932. "type": "object",
  18933. "properties": {
  18934. "tier": {
  18935. "type": "object",
  18936. "properties": {
  18937. "type": {
  18938. "type": "string",
  18939. "enum": ["context"]
  18940. },
  18941. "size": {
  18942. "type": "integer"
  18943. }
  18944. },
  18945. "required": ["type", "size"],
  18946. "additionalProperties": false
  18947. },
  18948. "input": {
  18949. "type": "number"
  18950. },
  18951. "output": {
  18952. "type": "number"
  18953. },
  18954. "cache": {
  18955. "type": "object",
  18956. "properties": {
  18957. "read": {
  18958. "type": "number"
  18959. },
  18960. "write": {
  18961. "type": "number"
  18962. }
  18963. },
  18964. "required": ["read", "write"],
  18965. "additionalProperties": false
  18966. }
  18967. },
  18968. "required": ["input", "output", "cache"],
  18969. "additionalProperties": false
  18970. }
  18971. },
  18972. "status": {
  18973. "type": "string",
  18974. "enum": ["alpha", "beta", "deprecated", "active"]
  18975. },
  18976. "enabled": {
  18977. "type": "boolean"
  18978. },
  18979. "limit": {
  18980. "type": "object",
  18981. "properties": {
  18982. "context": {
  18983. "type": "integer"
  18984. },
  18985. "input": {
  18986. "type": "integer"
  18987. },
  18988. "output": {
  18989. "type": "integer"
  18990. }
  18991. },
  18992. "required": ["context", "output"],
  18993. "additionalProperties": false
  18994. }
  18995. },
  18996. "required": [
  18997. "id",
  18998. "apiID",
  18999. "providerID",
  19000. "name",
  19001. "endpoint",
  19002. "capabilities",
  19003. "options",
  19004. "variants",
  19005. "time",
  19006. "cost",
  19007. "status",
  19008. "enabled",
  19009. "limit"
  19010. ],
  19011. "additionalProperties": false
  19012. },
  19013. "EventCatalogModelUpdated": {
  19014. "type": "object",
  19015. "properties": {
  19016. "id": {
  19017. "type": "string"
  19018. },
  19019. "type": {
  19020. "type": "string",
  19021. "enum": ["catalog.model.updated"]
  19022. },
  19023. "properties": {
  19024. "type": "object",
  19025. "properties": {
  19026. "model": {
  19027. "$ref": "#/components/schemas/ModelV2Info"
  19028. }
  19029. },
  19030. "required": ["model"],
  19031. "additionalProperties": false
  19032. }
  19033. },
  19034. "required": ["id", "type", "properties"],
  19035. "additionalProperties": false
  19036. },
  19037. "SessionInfo": {
  19038. "type": "object",
  19039. "properties": {
  19040. "id": {
  19041. "type": "string",
  19042. "pattern": "^ses"
  19043. },
  19044. "parentID": {
  19045. "type": "string",
  19046. "pattern": "^ses"
  19047. },
  19048. "projectID": {
  19049. "type": "string"
  19050. },
  19051. "workspaceID": {
  19052. "type": "string",
  19053. "pattern": "^wrk"
  19054. },
  19055. "path": {
  19056. "type": "string"
  19057. },
  19058. "agent": {
  19059. "type": "string"
  19060. },
  19061. "model": {
  19062. "type": "object",
  19063. "properties": {
  19064. "id": {
  19065. "type": "string"
  19066. },
  19067. "providerID": {
  19068. "type": "string"
  19069. },
  19070. "variant": {
  19071. "type": "string"
  19072. }
  19073. },
  19074. "required": ["id", "providerID", "variant"],
  19075. "additionalProperties": false
  19076. },
  19077. "cost": {
  19078. "type": "number"
  19079. },
  19080. "tokens": {
  19081. "type": "object",
  19082. "properties": {
  19083. "input": {
  19084. "type": "number"
  19085. },
  19086. "output": {
  19087. "type": "number"
  19088. },
  19089. "reasoning": {
  19090. "type": "number"
  19091. },
  19092. "cache": {
  19093. "type": "object",
  19094. "properties": {
  19095. "read": {
  19096. "type": "number"
  19097. },
  19098. "write": {
  19099. "type": "number"
  19100. }
  19101. },
  19102. "required": ["read", "write"],
  19103. "additionalProperties": false
  19104. }
  19105. },
  19106. "required": ["input", "output", "reasoning", "cache"],
  19107. "additionalProperties": false
  19108. },
  19109. "time": {
  19110. "type": "object",
  19111. "properties": {
  19112. "created": {
  19113. "type": "number"
  19114. },
  19115. "updated": {
  19116. "type": "number"
  19117. },
  19118. "archived": {
  19119. "type": "number"
  19120. }
  19121. },
  19122. "required": ["created", "updated"],
  19123. "additionalProperties": false
  19124. },
  19125. "title": {
  19126. "type": "string"
  19127. }
  19128. },
  19129. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  19130. "additionalProperties": false
  19131. },
  19132. "SessionDelivery": {
  19133. "type": "string",
  19134. "enum": ["immediate", "deferred"]
  19135. },
  19136. "SessionMessageAgentSwitched": {
  19137. "type": "object",
  19138. "properties": {
  19139. "id": {
  19140. "type": "string"
  19141. },
  19142. "metadata": {
  19143. "type": "object"
  19144. },
  19145. "time": {
  19146. "type": "object",
  19147. "properties": {
  19148. "created": {
  19149. "type": "number"
  19150. }
  19151. },
  19152. "required": ["created"],
  19153. "additionalProperties": false
  19154. },
  19155. "type": {
  19156. "type": "string",
  19157. "enum": ["agent-switched"]
  19158. },
  19159. "agent": {
  19160. "type": "string"
  19161. }
  19162. },
  19163. "required": ["id", "time", "type", "agent"],
  19164. "additionalProperties": false
  19165. },
  19166. "SessionMessageModelSwitched": {
  19167. "type": "object",
  19168. "properties": {
  19169. "id": {
  19170. "type": "string"
  19171. },
  19172. "metadata": {
  19173. "type": "object"
  19174. },
  19175. "time": {
  19176. "type": "object",
  19177. "properties": {
  19178. "created": {
  19179. "type": "number"
  19180. }
  19181. },
  19182. "required": ["created"],
  19183. "additionalProperties": false
  19184. },
  19185. "type": {
  19186. "type": "string",
  19187. "enum": ["model-switched"]
  19188. },
  19189. "model": {
  19190. "type": "object",
  19191. "properties": {
  19192. "id": {
  19193. "type": "string"
  19194. },
  19195. "providerID": {
  19196. "type": "string"
  19197. },
  19198. "variant": {
  19199. "type": "string"
  19200. }
  19201. },
  19202. "required": ["id", "providerID", "variant"],
  19203. "additionalProperties": false
  19204. }
  19205. },
  19206. "required": ["id", "time", "type", "model"],
  19207. "additionalProperties": false
  19208. },
  19209. "SessionMessageUser": {
  19210. "type": "object",
  19211. "properties": {
  19212. "id": {
  19213. "type": "string"
  19214. },
  19215. "metadata": {
  19216. "type": "object"
  19217. },
  19218. "time": {
  19219. "type": "object",
  19220. "properties": {
  19221. "created": {
  19222. "type": "number"
  19223. }
  19224. },
  19225. "required": ["created"],
  19226. "additionalProperties": false
  19227. },
  19228. "text": {
  19229. "type": "string"
  19230. },
  19231. "files": {
  19232. "type": "array",
  19233. "items": {
  19234. "$ref": "#/components/schemas/PromptFileAttachment"
  19235. }
  19236. },
  19237. "agents": {
  19238. "type": "array",
  19239. "items": {
  19240. "$ref": "#/components/schemas/PromptAgentAttachment"
  19241. }
  19242. },
  19243. "references": {
  19244. "type": "array",
  19245. "items": {
  19246. "$ref": "#/components/schemas/PromptReferenceAttachment"
  19247. }
  19248. },
  19249. "type": {
  19250. "type": "string",
  19251. "enum": ["user"]
  19252. }
  19253. },
  19254. "required": ["id", "time", "text", "type"],
  19255. "additionalProperties": false
  19256. },
  19257. "SessionMessageSynthetic": {
  19258. "type": "object",
  19259. "properties": {
  19260. "id": {
  19261. "type": "string"
  19262. },
  19263. "metadata": {
  19264. "type": "object"
  19265. },
  19266. "time": {
  19267. "type": "object",
  19268. "properties": {
  19269. "created": {
  19270. "type": "number"
  19271. }
  19272. },
  19273. "required": ["created"],
  19274. "additionalProperties": false
  19275. },
  19276. "sessionID": {
  19277. "type": "string",
  19278. "pattern": "^ses"
  19279. },
  19280. "text": {
  19281. "type": "string"
  19282. },
  19283. "type": {
  19284. "type": "string",
  19285. "enum": ["synthetic"]
  19286. }
  19287. },
  19288. "required": ["id", "time", "sessionID", "text", "type"],
  19289. "additionalProperties": false
  19290. },
  19291. "SessionMessageShell": {
  19292. "type": "object",
  19293. "properties": {
  19294. "id": {
  19295. "type": "string"
  19296. },
  19297. "metadata": {
  19298. "type": "object"
  19299. },
  19300. "time": {
  19301. "type": "object",
  19302. "properties": {
  19303. "created": {
  19304. "type": "number"
  19305. },
  19306. "completed": {
  19307. "type": "number"
  19308. }
  19309. },
  19310. "required": ["created"],
  19311. "additionalProperties": false
  19312. },
  19313. "type": {
  19314. "type": "string",
  19315. "enum": ["shell"]
  19316. },
  19317. "callID": {
  19318. "type": "string"
  19319. },
  19320. "command": {
  19321. "type": "string"
  19322. },
  19323. "output": {
  19324. "type": "string"
  19325. }
  19326. },
  19327. "required": ["id", "time", "type", "callID", "command", "output"],
  19328. "additionalProperties": false
  19329. },
  19330. "SessionMessageAssistantText": {
  19331. "type": "object",
  19332. "properties": {
  19333. "type": {
  19334. "type": "string",
  19335. "enum": ["text"]
  19336. },
  19337. "text": {
  19338. "type": "string"
  19339. }
  19340. },
  19341. "required": ["type", "text"],
  19342. "additionalProperties": false
  19343. },
  19344. "SessionMessageAssistantReasoning": {
  19345. "type": "object",
  19346. "properties": {
  19347. "type": {
  19348. "type": "string",
  19349. "enum": ["reasoning"]
  19350. },
  19351. "id": {
  19352. "type": "string"
  19353. },
  19354. "text": {
  19355. "type": "string"
  19356. }
  19357. },
  19358. "required": ["type", "id", "text"],
  19359. "additionalProperties": false
  19360. },
  19361. "SessionMessageToolStatePending": {
  19362. "type": "object",
  19363. "properties": {
  19364. "status": {
  19365. "type": "string",
  19366. "enum": ["pending"]
  19367. },
  19368. "input": {
  19369. "type": "string"
  19370. }
  19371. },
  19372. "required": ["status", "input"],
  19373. "additionalProperties": false
  19374. },
  19375. "SessionMessageToolStateRunning": {
  19376. "type": "object",
  19377. "properties": {
  19378. "status": {
  19379. "type": "string",
  19380. "enum": ["running"]
  19381. },
  19382. "input": {
  19383. "type": "object"
  19384. },
  19385. "structured": {
  19386. "type": "object"
  19387. },
  19388. "content": {
  19389. "type": "array",
  19390. "items": {
  19391. "anyOf": [
  19392. {
  19393. "$ref": "#/components/schemas/ToolTextContent"
  19394. },
  19395. {
  19396. "$ref": "#/components/schemas/ToolFileContent"
  19397. }
  19398. ]
  19399. }
  19400. }
  19401. },
  19402. "required": ["status", "input", "structured", "content"],
  19403. "additionalProperties": false
  19404. },
  19405. "SessionMessageToolStateCompleted": {
  19406. "type": "object",
  19407. "properties": {
  19408. "status": {
  19409. "type": "string",
  19410. "enum": ["completed"]
  19411. },
  19412. "input": {
  19413. "type": "object"
  19414. },
  19415. "attachments": {
  19416. "type": "array",
  19417. "items": {
  19418. "$ref": "#/components/schemas/PromptFileAttachment"
  19419. }
  19420. },
  19421. "content": {
  19422. "type": "array",
  19423. "items": {
  19424. "anyOf": [
  19425. {
  19426. "$ref": "#/components/schemas/ToolTextContent"
  19427. },
  19428. {
  19429. "$ref": "#/components/schemas/ToolFileContent"
  19430. }
  19431. ]
  19432. }
  19433. },
  19434. "structured": {
  19435. "type": "object"
  19436. }
  19437. },
  19438. "required": ["status", "input", "content", "structured"],
  19439. "additionalProperties": false
  19440. },
  19441. "SessionMessageToolStateError": {
  19442. "type": "object",
  19443. "properties": {
  19444. "status": {
  19445. "type": "string",
  19446. "enum": ["error"]
  19447. },
  19448. "input": {
  19449. "type": "object"
  19450. },
  19451. "content": {
  19452. "type": "array",
  19453. "items": {
  19454. "anyOf": [
  19455. {
  19456. "$ref": "#/components/schemas/ToolTextContent"
  19457. },
  19458. {
  19459. "$ref": "#/components/schemas/ToolFileContent"
  19460. }
  19461. ]
  19462. }
  19463. },
  19464. "structured": {
  19465. "type": "object"
  19466. },
  19467. "error": {
  19468. "$ref": "#/components/schemas/SessionErrorUnknown"
  19469. }
  19470. },
  19471. "required": ["status", "input", "content", "structured", "error"],
  19472. "additionalProperties": false
  19473. },
  19474. "SessionMessageAssistantTool": {
  19475. "type": "object",
  19476. "properties": {
  19477. "type": {
  19478. "type": "string",
  19479. "enum": ["tool"]
  19480. },
  19481. "id": {
  19482. "type": "string"
  19483. },
  19484. "name": {
  19485. "type": "string"
  19486. },
  19487. "provider": {
  19488. "type": "object",
  19489. "properties": {
  19490. "executed": {
  19491. "type": "boolean"
  19492. },
  19493. "metadata": {
  19494. "type": "object"
  19495. }
  19496. },
  19497. "required": ["executed"],
  19498. "additionalProperties": false
  19499. },
  19500. "state": {
  19501. "anyOf": [
  19502. {
  19503. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  19504. },
  19505. {
  19506. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  19507. },
  19508. {
  19509. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  19510. },
  19511. {
  19512. "$ref": "#/components/schemas/SessionMessageToolStateError"
  19513. }
  19514. ]
  19515. },
  19516. "time": {
  19517. "type": "object",
  19518. "properties": {
  19519. "created": {
  19520. "type": "number"
  19521. },
  19522. "ran": {
  19523. "type": "number"
  19524. },
  19525. "completed": {
  19526. "type": "number"
  19527. },
  19528. "pruned": {
  19529. "type": "number"
  19530. }
  19531. },
  19532. "required": ["created"],
  19533. "additionalProperties": false
  19534. }
  19535. },
  19536. "required": ["type", "id", "name", "state", "time"],
  19537. "additionalProperties": false
  19538. },
  19539. "SessionMessageAssistant": {
  19540. "type": "object",
  19541. "properties": {
  19542. "id": {
  19543. "type": "string"
  19544. },
  19545. "metadata": {
  19546. "type": "object"
  19547. },
  19548. "time": {
  19549. "type": "object",
  19550. "properties": {
  19551. "created": {
  19552. "type": "number"
  19553. },
  19554. "completed": {
  19555. "type": "number"
  19556. }
  19557. },
  19558. "required": ["created"],
  19559. "additionalProperties": false
  19560. },
  19561. "type": {
  19562. "type": "string",
  19563. "enum": ["assistant"]
  19564. },
  19565. "agent": {
  19566. "type": "string"
  19567. },
  19568. "model": {
  19569. "type": "object",
  19570. "properties": {
  19571. "id": {
  19572. "type": "string"
  19573. },
  19574. "providerID": {
  19575. "type": "string"
  19576. },
  19577. "variant": {
  19578. "type": "string"
  19579. }
  19580. },
  19581. "required": ["id", "providerID", "variant"],
  19582. "additionalProperties": false
  19583. },
  19584. "content": {
  19585. "type": "array",
  19586. "items": {
  19587. "anyOf": [
  19588. {
  19589. "$ref": "#/components/schemas/SessionMessageAssistantText"
  19590. },
  19591. {
  19592. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  19593. },
  19594. {
  19595. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  19596. }
  19597. ]
  19598. }
  19599. },
  19600. "snapshot": {
  19601. "type": "object",
  19602. "properties": {
  19603. "start": {
  19604. "type": "string"
  19605. },
  19606. "end": {
  19607. "type": "string"
  19608. }
  19609. },
  19610. "additionalProperties": false
  19611. },
  19612. "finish": {
  19613. "type": "string"
  19614. },
  19615. "cost": {
  19616. "type": "number"
  19617. },
  19618. "tokens": {
  19619. "type": "object",
  19620. "properties": {
  19621. "input": {
  19622. "type": "number"
  19623. },
  19624. "output": {
  19625. "type": "number"
  19626. },
  19627. "reasoning": {
  19628. "type": "number"
  19629. },
  19630. "cache": {
  19631. "type": "object",
  19632. "properties": {
  19633. "read": {
  19634. "type": "number"
  19635. },
  19636. "write": {
  19637. "type": "number"
  19638. }
  19639. },
  19640. "required": ["read", "write"],
  19641. "additionalProperties": false
  19642. }
  19643. },
  19644. "required": ["input", "output", "reasoning", "cache"],
  19645. "additionalProperties": false
  19646. },
  19647. "error": {
  19648. "$ref": "#/components/schemas/SessionErrorUnknown"
  19649. }
  19650. },
  19651. "required": ["id", "time", "type", "agent", "model", "content"],
  19652. "additionalProperties": false
  19653. },
  19654. "SessionMessageCompaction": {
  19655. "type": "object",
  19656. "properties": {
  19657. "type": {
  19658. "type": "string",
  19659. "enum": ["compaction"]
  19660. },
  19661. "reason": {
  19662. "type": "string",
  19663. "enum": ["auto", "manual"]
  19664. },
  19665. "summary": {
  19666. "type": "string"
  19667. },
  19668. "include": {
  19669. "type": "string"
  19670. },
  19671. "id": {
  19672. "type": "string"
  19673. },
  19674. "metadata": {
  19675. "type": "object"
  19676. },
  19677. "time": {
  19678. "type": "object",
  19679. "properties": {
  19680. "created": {
  19681. "type": "number"
  19682. }
  19683. },
  19684. "required": ["created"],
  19685. "additionalProperties": false
  19686. }
  19687. },
  19688. "required": ["type", "reason", "summary", "id", "time"],
  19689. "additionalProperties": false
  19690. },
  19691. "SessionMessage": {
  19692. "anyOf": [
  19693. {
  19694. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  19695. },
  19696. {
  19697. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  19698. },
  19699. {
  19700. "$ref": "#/components/schemas/SessionMessageUser"
  19701. },
  19702. {
  19703. "$ref": "#/components/schemas/SessionMessageSynthetic"
  19704. },
  19705. {
  19706. "$ref": "#/components/schemas/SessionMessageShell"
  19707. },
  19708. {
  19709. "$ref": "#/components/schemas/SessionMessageAssistant"
  19710. },
  19711. {
  19712. "$ref": "#/components/schemas/SessionMessageCompaction"
  19713. }
  19714. ]
  19715. },
  19716. "ProviderV2Info": {
  19717. "type": "object",
  19718. "properties": {
  19719. "id": {
  19720. "type": "string"
  19721. },
  19722. "name": {
  19723. "type": "string"
  19724. },
  19725. "enabled": {
  19726. "anyOf": [
  19727. {
  19728. "type": "boolean",
  19729. "enum": [false]
  19730. },
  19731. {
  19732. "type": "object",
  19733. "properties": {
  19734. "via": {
  19735. "type": "string",
  19736. "enum": ["env"]
  19737. },
  19738. "name": {
  19739. "type": "string"
  19740. }
  19741. },
  19742. "required": ["via", "name"],
  19743. "additionalProperties": false
  19744. },
  19745. {
  19746. "type": "object",
  19747. "properties": {
  19748. "via": {
  19749. "type": "string",
  19750. "enum": ["auth"]
  19751. },
  19752. "service": {
  19753. "type": "string"
  19754. }
  19755. },
  19756. "required": ["via", "service"],
  19757. "additionalProperties": false
  19758. },
  19759. {
  19760. "type": "object",
  19761. "properties": {
  19762. "via": {
  19763. "type": "string",
  19764. "enum": ["custom"]
  19765. },
  19766. "data": {
  19767. "type": "object"
  19768. }
  19769. },
  19770. "required": ["via", "data"],
  19771. "additionalProperties": false
  19772. }
  19773. ]
  19774. },
  19775. "env": {
  19776. "type": "array",
  19777. "items": {
  19778. "type": "string"
  19779. }
  19780. },
  19781. "endpoint": {
  19782. "anyOf": [
  19783. {
  19784. "type": "object",
  19785. "properties": {
  19786. "type": {
  19787. "type": "string",
  19788. "enum": ["unknown"]
  19789. }
  19790. },
  19791. "required": ["type"],
  19792. "additionalProperties": false
  19793. },
  19794. {
  19795. "type": "object",
  19796. "properties": {
  19797. "type": {
  19798. "type": "string",
  19799. "enum": ["openai/responses"]
  19800. },
  19801. "url": {
  19802. "type": "string"
  19803. },
  19804. "websocket": {
  19805. "type": "boolean"
  19806. }
  19807. },
  19808. "required": ["type", "url"],
  19809. "additionalProperties": false
  19810. },
  19811. {
  19812. "type": "object",
  19813. "properties": {
  19814. "type": {
  19815. "type": "string",
  19816. "enum": ["openai/completions"]
  19817. },
  19818. "url": {
  19819. "type": "string"
  19820. },
  19821. "reasoning": {
  19822. "anyOf": [
  19823. {
  19824. "type": "object",
  19825. "properties": {
  19826. "type": {
  19827. "type": "string",
  19828. "enum": ["reasoning_content"]
  19829. }
  19830. },
  19831. "required": ["type"],
  19832. "additionalProperties": false
  19833. },
  19834. {
  19835. "type": "object",
  19836. "properties": {
  19837. "type": {
  19838. "type": "string",
  19839. "enum": ["reasoning_details"]
  19840. }
  19841. },
  19842. "required": ["type"],
  19843. "additionalProperties": false
  19844. }
  19845. ]
  19846. }
  19847. },
  19848. "required": ["type", "url"],
  19849. "additionalProperties": false
  19850. },
  19851. {
  19852. "type": "object",
  19853. "properties": {
  19854. "type": {
  19855. "type": "string",
  19856. "enum": ["anthropic/messages"]
  19857. },
  19858. "url": {
  19859. "type": "string"
  19860. }
  19861. },
  19862. "required": ["type", "url"],
  19863. "additionalProperties": false
  19864. },
  19865. {
  19866. "type": "object",
  19867. "properties": {
  19868. "type": {
  19869. "type": "string",
  19870. "enum": ["aisdk"]
  19871. },
  19872. "package": {
  19873. "type": "string"
  19874. },
  19875. "url": {
  19876. "type": "string"
  19877. }
  19878. },
  19879. "required": ["type", "package"],
  19880. "additionalProperties": false
  19881. }
  19882. ]
  19883. },
  19884. "options": {
  19885. "type": "object",
  19886. "properties": {
  19887. "headers": {
  19888. "type": "object",
  19889. "additionalProperties": {
  19890. "type": "string"
  19891. }
  19892. },
  19893. "body": {
  19894. "type": "object"
  19895. },
  19896. "aisdk": {
  19897. "type": "object",
  19898. "properties": {
  19899. "provider": {
  19900. "type": "object"
  19901. },
  19902. "request": {
  19903. "type": "object"
  19904. }
  19905. },
  19906. "required": ["provider", "request"],
  19907. "additionalProperties": false
  19908. }
  19909. },
  19910. "required": ["headers", "body", "aisdk"],
  19911. "additionalProperties": false
  19912. }
  19913. },
  19914. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  19915. "additionalProperties": false
  19916. },
  19917. "EventTuiToastShow1": {
  19918. "type": "object",
  19919. "properties": {
  19920. "id": {
  19921. "type": "string"
  19922. },
  19923. "type": {
  19924. "type": "string",
  19925. "enum": ["tui.toast.show"]
  19926. },
  19927. "properties": {
  19928. "type": "object",
  19929. "properties": {
  19930. "title": {
  19931. "type": "string"
  19932. },
  19933. "message": {
  19934. "type": "string"
  19935. },
  19936. "variant": {
  19937. "type": "string",
  19938. "enum": ["info", "success", "warning", "error"]
  19939. },
  19940. "duration": {
  19941. "type": "integer",
  19942. "exclusiveMinimum": 0
  19943. }
  19944. },
  19945. "required": ["message", "variant"],
  19946. "additionalProperties": false
  19947. }
  19948. },
  19949. "required": ["id", "type", "properties"],
  19950. "additionalProperties": false
  19951. },
  19952. "ModelV2Info1": {
  19953. "type": "object",
  19954. "properties": {
  19955. "id": {
  19956. "type": "string"
  19957. },
  19958. "apiID": {
  19959. "type": "string"
  19960. },
  19961. "providerID": {
  19962. "type": "string"
  19963. },
  19964. "family": {
  19965. "type": "string"
  19966. },
  19967. "name": {
  19968. "type": "string"
  19969. },
  19970. "endpoint": {
  19971. "anyOf": [
  19972. {
  19973. "type": "object",
  19974. "properties": {
  19975. "type": {
  19976. "type": "string",
  19977. "enum": ["unknown"]
  19978. }
  19979. },
  19980. "required": ["type"],
  19981. "additionalProperties": false
  19982. },
  19983. {
  19984. "type": "object",
  19985. "properties": {
  19986. "type": {
  19987. "type": "string",
  19988. "enum": ["openai/responses"]
  19989. },
  19990. "url": {
  19991. "type": "string"
  19992. },
  19993. "websocket": {
  19994. "type": "boolean"
  19995. }
  19996. },
  19997. "required": ["type", "url"],
  19998. "additionalProperties": false
  19999. },
  20000. {
  20001. "type": "object",
  20002. "properties": {
  20003. "type": {
  20004. "type": "string",
  20005. "enum": ["openai/completions"]
  20006. },
  20007. "url": {
  20008. "type": "string"
  20009. },
  20010. "reasoning": {
  20011. "anyOf": [
  20012. {
  20013. "type": "object",
  20014. "properties": {
  20015. "type": {
  20016. "type": "string",
  20017. "enum": ["reasoning_content"]
  20018. }
  20019. },
  20020. "required": ["type"],
  20021. "additionalProperties": false
  20022. },
  20023. {
  20024. "type": "object",
  20025. "properties": {
  20026. "type": {
  20027. "type": "string",
  20028. "enum": ["reasoning_details"]
  20029. }
  20030. },
  20031. "required": ["type"],
  20032. "additionalProperties": false
  20033. }
  20034. ]
  20035. }
  20036. },
  20037. "required": ["type", "url"],
  20038. "additionalProperties": false
  20039. },
  20040. {
  20041. "type": "object",
  20042. "properties": {
  20043. "type": {
  20044. "type": "string",
  20045. "enum": ["anthropic/messages"]
  20046. },
  20047. "url": {
  20048. "type": "string"
  20049. }
  20050. },
  20051. "required": ["type", "url"],
  20052. "additionalProperties": false
  20053. },
  20054. {
  20055. "type": "object",
  20056. "properties": {
  20057. "type": {
  20058. "type": "string",
  20059. "enum": ["aisdk"]
  20060. },
  20061. "package": {
  20062. "type": "string"
  20063. },
  20064. "url": {
  20065. "type": "string"
  20066. }
  20067. },
  20068. "required": ["type", "package"],
  20069. "additionalProperties": false
  20070. }
  20071. ]
  20072. },
  20073. "capabilities": {
  20074. "type": "object",
  20075. "properties": {
  20076. "tools": {
  20077. "type": "boolean"
  20078. },
  20079. "input": {
  20080. "type": "array",
  20081. "items": {
  20082. "type": "string"
  20083. }
  20084. },
  20085. "output": {
  20086. "type": "array",
  20087. "items": {
  20088. "type": "string"
  20089. }
  20090. }
  20091. },
  20092. "required": ["tools", "input", "output"],
  20093. "additionalProperties": false
  20094. },
  20095. "options": {
  20096. "type": "object",
  20097. "properties": {
  20098. "headers": {
  20099. "type": "object",
  20100. "additionalProperties": {
  20101. "type": "string"
  20102. }
  20103. },
  20104. "body": {
  20105. "type": "object"
  20106. },
  20107. "aisdk": {
  20108. "type": "object",
  20109. "properties": {
  20110. "provider": {
  20111. "type": "object"
  20112. },
  20113. "request": {
  20114. "type": "object"
  20115. }
  20116. },
  20117. "required": ["provider", "request"],
  20118. "additionalProperties": false
  20119. },
  20120. "variant": {
  20121. "type": "string"
  20122. }
  20123. },
  20124. "required": ["headers", "body", "aisdk"],
  20125. "additionalProperties": false
  20126. },
  20127. "variants": {
  20128. "type": "array",
  20129. "items": {
  20130. "type": "object",
  20131. "properties": {
  20132. "id": {
  20133. "type": "string"
  20134. },
  20135. "headers": {
  20136. "type": "object",
  20137. "additionalProperties": {
  20138. "type": "string"
  20139. }
  20140. },
  20141. "body": {
  20142. "type": "object"
  20143. },
  20144. "aisdk": {
  20145. "type": "object",
  20146. "properties": {
  20147. "provider": {
  20148. "type": "object"
  20149. },
  20150. "request": {
  20151. "type": "object"
  20152. }
  20153. },
  20154. "required": ["provider", "request"],
  20155. "additionalProperties": false
  20156. }
  20157. },
  20158. "required": ["id", "headers", "body", "aisdk"],
  20159. "additionalProperties": false
  20160. }
  20161. },
  20162. "time": {
  20163. "type": "object",
  20164. "properties": {
  20165. "released": {
  20166. "anyOf": [
  20167. {
  20168. "type": "number"
  20169. },
  20170. {
  20171. "type": "string",
  20172. "enum": ["NaN"]
  20173. },
  20174. {
  20175. "type": "string",
  20176. "enum": ["Infinity"]
  20177. },
  20178. {
  20179. "type": "string",
  20180. "enum": ["-Infinity"]
  20181. }
  20182. ]
  20183. }
  20184. },
  20185. "required": ["released"],
  20186. "additionalProperties": false
  20187. },
  20188. "cost": {
  20189. "type": "array",
  20190. "items": {
  20191. "type": "object",
  20192. "properties": {
  20193. "tier": {
  20194. "type": "object",
  20195. "properties": {
  20196. "type": {
  20197. "type": "string",
  20198. "enum": ["context"]
  20199. },
  20200. "size": {
  20201. "type": "integer"
  20202. }
  20203. },
  20204. "required": ["type", "size"],
  20205. "additionalProperties": false
  20206. },
  20207. "input": {
  20208. "type": "number"
  20209. },
  20210. "output": {
  20211. "type": "number"
  20212. },
  20213. "cache": {
  20214. "type": "object",
  20215. "properties": {
  20216. "read": {
  20217. "type": "number"
  20218. },
  20219. "write": {
  20220. "type": "number"
  20221. }
  20222. },
  20223. "required": ["read", "write"],
  20224. "additionalProperties": false
  20225. }
  20226. },
  20227. "required": ["input", "output", "cache"],
  20228. "additionalProperties": false
  20229. }
  20230. },
  20231. "status": {
  20232. "type": "string",
  20233. "enum": ["alpha", "beta", "deprecated", "active"]
  20234. },
  20235. "enabled": {
  20236. "type": "boolean"
  20237. },
  20238. "limit": {
  20239. "type": "object",
  20240. "properties": {
  20241. "context": {
  20242. "type": "integer"
  20243. },
  20244. "input": {
  20245. "type": "integer"
  20246. },
  20247. "output": {
  20248. "type": "integer"
  20249. }
  20250. },
  20251. "required": ["context", "output"],
  20252. "additionalProperties": false
  20253. }
  20254. },
  20255. "required": [
  20256. "id",
  20257. "apiID",
  20258. "providerID",
  20259. "name",
  20260. "endpoint",
  20261. "capabilities",
  20262. "options",
  20263. "variants",
  20264. "time",
  20265. "cost",
  20266. "status",
  20267. "enabled",
  20268. "limit"
  20269. ],
  20270. "additionalProperties": false
  20271. },
  20272. "BadRequestError": {
  20273. "type": "object",
  20274. "required": ["name", "data"],
  20275. "properties": {
  20276. "name": {
  20277. "type": "string",
  20278. "enum": ["BadRequest"]
  20279. },
  20280. "data": {
  20281. "type": "object",
  20282. "required": ["message"],
  20283. "properties": {
  20284. "message": {
  20285. "type": "string"
  20286. },
  20287. "kind": {
  20288. "type": "string",
  20289. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  20290. }
  20291. }
  20292. }
  20293. }
  20294. }
  20295. }
  20296. },
  20297. "security": [],
  20298. "tags": [
  20299. {
  20300. "name": "control",
  20301. "description": "Control plane routes."
  20302. },
  20303. {
  20304. "name": "global",
  20305. "description": "Global server routes."
  20306. },
  20307. {
  20308. "name": "event",
  20309. "description": "Instance event stream route."
  20310. },
  20311. {
  20312. "name": "config",
  20313. "description": "Experimental HttpApi config routes."
  20314. },
  20315. {
  20316. "name": "experimental",
  20317. "description": "Experimental HttpApi read-only routes."
  20318. },
  20319. {
  20320. "name": "file",
  20321. "description": "Experimental HttpApi file routes."
  20322. },
  20323. {
  20324. "name": "instance",
  20325. "description": "Experimental HttpApi instance read routes."
  20326. },
  20327. {
  20328. "name": "mcp",
  20329. "description": "Experimental HttpApi MCP routes."
  20330. },
  20331. {
  20332. "name": "project",
  20333. "description": "Experimental HttpApi project routes."
  20334. },
  20335. {
  20336. "name": "pty",
  20337. "description": "Experimental HttpApi PTY routes."
  20338. },
  20339. {
  20340. "name": "question",
  20341. "description": "Question routes."
  20342. },
  20343. {
  20344. "name": "permission",
  20345. "description": "Experimental HttpApi permission routes."
  20346. },
  20347. {
  20348. "name": "provider",
  20349. "description": "Experimental HttpApi provider routes."
  20350. },
  20351. {
  20352. "name": "session",
  20353. "description": "Experimental HttpApi session routes."
  20354. },
  20355. {
  20356. "name": "sync",
  20357. "description": "Experimental HttpApi sync routes."
  20358. },
  20359. {
  20360. "name": "v2",
  20361. "description": "Experimental v2 routes."
  20362. },
  20363. {
  20364. "name": "v2 messages",
  20365. "description": "Experimental v2 message routes."
  20366. },
  20367. {
  20368. "name": "v2 models",
  20369. "description": "Experimental v2 model routes."
  20370. },
  20371. {
  20372. "name": "v2 providers",
  20373. "description": "Experimental v2 provider routes."
  20374. },
  20375. {
  20376. "name": "tui",
  20377. "description": "Experimental HttpApi TUI routes."
  20378. },
  20379. {
  20380. "name": "workspace",
  20381. "description": "Experimental HttpApi workspace routes."
  20382. },
  20383. {
  20384. "name": "pty",
  20385. "description": "PTY websocket route."
  20386. }
  20387. ]
  20388. }