openapi.json 609 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. },
  2292. {
  2293. "name": "context",
  2294. "in": "query",
  2295. "schema": {
  2296. "type": "integer",
  2297. "minimum": 0
  2298. },
  2299. "required": false
  2300. }
  2301. ],
  2302. "responses": {
  2303. "200": {
  2304. "description": "VCS diff",
  2305. "content": {
  2306. "application/json": {
  2307. "schema": {
  2308. "type": "array",
  2309. "items": {
  2310. "$ref": "#/components/schemas/VcsFileDiff"
  2311. },
  2312. "description": "VCS diff"
  2313. }
  2314. }
  2315. }
  2316. },
  2317. "400": {
  2318. "description": "Bad request",
  2319. "content": {
  2320. "application/json": {
  2321. "schema": {
  2322. "$ref": "#/components/schemas/BadRequestError"
  2323. }
  2324. }
  2325. }
  2326. }
  2327. },
  2328. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2329. "summary": "Get VCS diff",
  2330. "x-codeSamples": [
  2331. {
  2332. "lang": "js",
  2333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2334. }
  2335. ]
  2336. }
  2337. },
  2338. "/vcs/diff/raw": {
  2339. "get": {
  2340. "tags": ["instance"],
  2341. "operationId": "vcs.diff.raw",
  2342. "parameters": [
  2343. {
  2344. "name": "directory",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string"
  2348. },
  2349. "required": false
  2350. },
  2351. {
  2352. "name": "workspace",
  2353. "in": "query",
  2354. "schema": {
  2355. "type": "string"
  2356. },
  2357. "required": false
  2358. }
  2359. ],
  2360. "responses": {
  2361. "200": {
  2362. "description": "Raw VCS diff",
  2363. "content": {
  2364. "text/x-diff; charset=utf-8": {
  2365. "schema": {
  2366. "type": "string"
  2367. }
  2368. }
  2369. }
  2370. },
  2371. "400": {
  2372. "description": "Bad request",
  2373. "content": {
  2374. "application/json": {
  2375. "schema": {
  2376. "$ref": "#/components/schemas/BadRequestError"
  2377. }
  2378. }
  2379. }
  2380. }
  2381. },
  2382. "description": "Retrieve a raw patch for current uncommitted changes.",
  2383. "summary": "Get raw VCS diff",
  2384. "x-codeSamples": [
  2385. {
  2386. "lang": "js",
  2387. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2388. }
  2389. ]
  2390. }
  2391. },
  2392. "/vcs/apply": {
  2393. "post": {
  2394. "tags": ["instance"],
  2395. "operationId": "vcs.apply",
  2396. "parameters": [
  2397. {
  2398. "name": "directory",
  2399. "in": "query",
  2400. "schema": {
  2401. "type": "string"
  2402. },
  2403. "required": false
  2404. },
  2405. {
  2406. "name": "workspace",
  2407. "in": "query",
  2408. "schema": {
  2409. "type": "string"
  2410. },
  2411. "required": false
  2412. }
  2413. ],
  2414. "responses": {
  2415. "200": {
  2416. "description": "VCS patch applied",
  2417. "content": {
  2418. "application/json": {
  2419. "schema": {
  2420. "type": "object",
  2421. "properties": {
  2422. "applied": {
  2423. "type": "boolean"
  2424. }
  2425. },
  2426. "required": ["applied"],
  2427. "additionalProperties": false,
  2428. "description": "VCS patch applied"
  2429. }
  2430. }
  2431. }
  2432. },
  2433. "400": {
  2434. "description": "VcsApplyError | InvalidRequestError",
  2435. "content": {
  2436. "application/json": {
  2437. "schema": {
  2438. "anyOf": [
  2439. {
  2440. "$ref": "#/components/schemas/VcsApplyError"
  2441. },
  2442. {
  2443. "$ref": "#/components/schemas/InvalidRequestError"
  2444. }
  2445. ]
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Apply a raw patch to the current working tree.",
  2452. "summary": "Apply VCS patch",
  2453. "requestBody": {
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "properties": {
  2459. "patch": {
  2460. "type": "string"
  2461. }
  2462. },
  2463. "required": ["patch"],
  2464. "additionalProperties": false
  2465. }
  2466. }
  2467. }
  2468. },
  2469. "x-codeSamples": [
  2470. {
  2471. "lang": "js",
  2472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2473. }
  2474. ]
  2475. }
  2476. },
  2477. "/command": {
  2478. "get": {
  2479. "tags": ["instance"],
  2480. "operationId": "command.list",
  2481. "parameters": [
  2482. {
  2483. "name": "directory",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. },
  2490. {
  2491. "name": "workspace",
  2492. "in": "query",
  2493. "schema": {
  2494. "type": "string"
  2495. },
  2496. "required": false
  2497. }
  2498. ],
  2499. "responses": {
  2500. "200": {
  2501. "description": "List of commands",
  2502. "content": {
  2503. "application/json": {
  2504. "schema": {
  2505. "type": "array",
  2506. "items": {
  2507. "$ref": "#/components/schemas/Command"
  2508. },
  2509. "description": "List of commands"
  2510. }
  2511. }
  2512. }
  2513. },
  2514. "400": {
  2515. "description": "Bad request",
  2516. "content": {
  2517. "application/json": {
  2518. "schema": {
  2519. "$ref": "#/components/schemas/BadRequestError"
  2520. }
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "description": "Get a list of all available commands in the OpenCode system.",
  2526. "summary": "List commands",
  2527. "x-codeSamples": [
  2528. {
  2529. "lang": "js",
  2530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2531. }
  2532. ]
  2533. }
  2534. },
  2535. "/agent": {
  2536. "get": {
  2537. "tags": ["instance"],
  2538. "operationId": "app.agents",
  2539. "parameters": [
  2540. {
  2541. "name": "directory",
  2542. "in": "query",
  2543. "schema": {
  2544. "type": "string"
  2545. },
  2546. "required": false
  2547. },
  2548. {
  2549. "name": "workspace",
  2550. "in": "query",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": false
  2555. }
  2556. ],
  2557. "responses": {
  2558. "200": {
  2559. "description": "List of agents",
  2560. "content": {
  2561. "application/json": {
  2562. "schema": {
  2563. "type": "array",
  2564. "items": {
  2565. "$ref": "#/components/schemas/Agent"
  2566. },
  2567. "description": "List of agents"
  2568. }
  2569. }
  2570. }
  2571. },
  2572. "400": {
  2573. "description": "Bad request",
  2574. "content": {
  2575. "application/json": {
  2576. "schema": {
  2577. "$ref": "#/components/schemas/BadRequestError"
  2578. }
  2579. }
  2580. }
  2581. }
  2582. },
  2583. "description": "Get a list of all available AI agents in the OpenCode system.",
  2584. "summary": "List agents",
  2585. "x-codeSamples": [
  2586. {
  2587. "lang": "js",
  2588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2589. }
  2590. ]
  2591. }
  2592. },
  2593. "/skill": {
  2594. "get": {
  2595. "tags": ["instance"],
  2596. "operationId": "app.skills",
  2597. "parameters": [
  2598. {
  2599. "name": "directory",
  2600. "in": "query",
  2601. "schema": {
  2602. "type": "string"
  2603. },
  2604. "required": false
  2605. },
  2606. {
  2607. "name": "workspace",
  2608. "in": "query",
  2609. "schema": {
  2610. "type": "string"
  2611. },
  2612. "required": false
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "description": "List of skills",
  2618. "content": {
  2619. "application/json": {
  2620. "schema": {
  2621. "type": "array",
  2622. "items": {
  2623. "type": "object",
  2624. "properties": {
  2625. "name": {
  2626. "type": "string"
  2627. },
  2628. "description": {
  2629. "type": "string"
  2630. },
  2631. "location": {
  2632. "type": "string"
  2633. },
  2634. "content": {
  2635. "type": "string"
  2636. }
  2637. },
  2638. "required": ["name", "location", "content"],
  2639. "additionalProperties": false
  2640. },
  2641. "description": "List of skills"
  2642. }
  2643. }
  2644. }
  2645. },
  2646. "400": {
  2647. "description": "Bad request",
  2648. "content": {
  2649. "application/json": {
  2650. "schema": {
  2651. "$ref": "#/components/schemas/BadRequestError"
  2652. }
  2653. }
  2654. }
  2655. }
  2656. },
  2657. "description": "Get a list of all available skills in the OpenCode system.",
  2658. "summary": "List skills",
  2659. "x-codeSamples": [
  2660. {
  2661. "lang": "js",
  2662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2663. }
  2664. ]
  2665. }
  2666. },
  2667. "/lsp": {
  2668. "get": {
  2669. "tags": ["instance"],
  2670. "operationId": "lsp.status",
  2671. "parameters": [
  2672. {
  2673. "name": "directory",
  2674. "in": "query",
  2675. "schema": {
  2676. "type": "string"
  2677. },
  2678. "required": false
  2679. },
  2680. {
  2681. "name": "workspace",
  2682. "in": "query",
  2683. "schema": {
  2684. "type": "string"
  2685. },
  2686. "required": false
  2687. }
  2688. ],
  2689. "responses": {
  2690. "200": {
  2691. "description": "LSP server status",
  2692. "content": {
  2693. "application/json": {
  2694. "schema": {
  2695. "type": "array",
  2696. "items": {
  2697. "$ref": "#/components/schemas/LSPStatus"
  2698. },
  2699. "description": "LSP server status"
  2700. }
  2701. }
  2702. }
  2703. },
  2704. "400": {
  2705. "description": "Bad request",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "$ref": "#/components/schemas/BadRequestError"
  2710. }
  2711. }
  2712. }
  2713. }
  2714. },
  2715. "description": "Get LSP server status",
  2716. "summary": "Get LSP status",
  2717. "x-codeSamples": [
  2718. {
  2719. "lang": "js",
  2720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2721. }
  2722. ]
  2723. }
  2724. },
  2725. "/formatter": {
  2726. "get": {
  2727. "tags": ["instance"],
  2728. "operationId": "formatter.status",
  2729. "parameters": [
  2730. {
  2731. "name": "directory",
  2732. "in": "query",
  2733. "schema": {
  2734. "type": "string"
  2735. },
  2736. "required": false
  2737. },
  2738. {
  2739. "name": "workspace",
  2740. "in": "query",
  2741. "schema": {
  2742. "type": "string"
  2743. },
  2744. "required": false
  2745. }
  2746. ],
  2747. "responses": {
  2748. "200": {
  2749. "description": "Formatter status",
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "array",
  2754. "items": {
  2755. "$ref": "#/components/schemas/FormatterStatus"
  2756. },
  2757. "description": "Formatter status"
  2758. }
  2759. }
  2760. }
  2761. },
  2762. "400": {
  2763. "description": "Bad request",
  2764. "content": {
  2765. "application/json": {
  2766. "schema": {
  2767. "$ref": "#/components/schemas/BadRequestError"
  2768. }
  2769. }
  2770. }
  2771. }
  2772. },
  2773. "description": "Get formatter status",
  2774. "summary": "Get formatter status",
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp": {
  2784. "get": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.status",
  2787. "parameters": [
  2788. {
  2789. "name": "directory",
  2790. "in": "query",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": false
  2795. },
  2796. {
  2797. "name": "workspace",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. }
  2804. ],
  2805. "responses": {
  2806. "200": {
  2807. "description": "MCP server status",
  2808. "content": {
  2809. "application/json": {
  2810. "schema": {
  2811. "type": "object",
  2812. "additionalProperties": {
  2813. "$ref": "#/components/schemas/MCPStatus"
  2814. },
  2815. "description": "MCP server status"
  2816. }
  2817. }
  2818. }
  2819. },
  2820. "400": {
  2821. "description": "Bad request",
  2822. "content": {
  2823. "application/json": {
  2824. "schema": {
  2825. "$ref": "#/components/schemas/BadRequestError"
  2826. }
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2832. "summary": "Get MCP status",
  2833. "x-codeSamples": [
  2834. {
  2835. "lang": "js",
  2836. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2837. }
  2838. ]
  2839. },
  2840. "post": {
  2841. "tags": ["mcp"],
  2842. "operationId": "mcp.add",
  2843. "parameters": [
  2844. {
  2845. "name": "directory",
  2846. "in": "query",
  2847. "schema": {
  2848. "type": "string"
  2849. },
  2850. "required": false
  2851. },
  2852. {
  2853. "name": "workspace",
  2854. "in": "query",
  2855. "schema": {
  2856. "type": "string"
  2857. },
  2858. "required": false
  2859. }
  2860. ],
  2861. "responses": {
  2862. "200": {
  2863. "description": "MCP server added successfully",
  2864. "content": {
  2865. "application/json": {
  2866. "schema": {
  2867. "type": "object",
  2868. "additionalProperties": {
  2869. "$ref": "#/components/schemas/MCPStatus"
  2870. },
  2871. "description": "MCP server added successfully"
  2872. }
  2873. }
  2874. }
  2875. },
  2876. "400": {
  2877. "description": "BadRequest | InvalidRequestError",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "anyOf": [
  2882. {
  2883. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2884. },
  2885. {
  2886. "$ref": "#/components/schemas/InvalidRequestError"
  2887. }
  2888. ]
  2889. }
  2890. }
  2891. }
  2892. }
  2893. },
  2894. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2895. "summary": "Add MCP server",
  2896. "requestBody": {
  2897. "content": {
  2898. "application/json": {
  2899. "schema": {
  2900. "type": "object",
  2901. "properties": {
  2902. "name": {
  2903. "type": "string"
  2904. },
  2905. "config": {
  2906. "anyOf": [
  2907. {
  2908. "$ref": "#/components/schemas/McpLocalConfig"
  2909. },
  2910. {
  2911. "$ref": "#/components/schemas/McpRemoteConfig"
  2912. }
  2913. ]
  2914. }
  2915. },
  2916. "required": ["name", "config"],
  2917. "additionalProperties": false
  2918. }
  2919. }
  2920. }
  2921. },
  2922. "x-codeSamples": [
  2923. {
  2924. "lang": "js",
  2925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2926. }
  2927. ]
  2928. }
  2929. },
  2930. "/mcp/{name}/auth": {
  2931. "post": {
  2932. "tags": ["mcp"],
  2933. "operationId": "mcp.auth.start",
  2934. "parameters": [
  2935. {
  2936. "name": "name",
  2937. "in": "path",
  2938. "schema": {
  2939. "type": "string"
  2940. },
  2941. "required": true
  2942. },
  2943. {
  2944. "name": "directory",
  2945. "in": "query",
  2946. "schema": {
  2947. "type": "string"
  2948. },
  2949. "required": false
  2950. },
  2951. {
  2952. "name": "workspace",
  2953. "in": "query",
  2954. "schema": {
  2955. "type": "string"
  2956. },
  2957. "required": false
  2958. }
  2959. ],
  2960. "responses": {
  2961. "200": {
  2962. "description": "OAuth flow started",
  2963. "content": {
  2964. "application/json": {
  2965. "schema": {
  2966. "type": "object",
  2967. "properties": {
  2968. "authorizationUrl": {
  2969. "type": "string"
  2970. },
  2971. "oauthState": {
  2972. "type": "string"
  2973. }
  2974. },
  2975. "required": ["authorizationUrl", "oauthState"],
  2976. "additionalProperties": false,
  2977. "description": "OAuth flow started"
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "400": {
  2983. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "anyOf": [
  2988. {
  2989. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2990. },
  2991. {
  2992. "$ref": "#/components/schemas/InvalidRequestError"
  2993. }
  2994. ]
  2995. }
  2996. }
  2997. }
  2998. },
  2999. "404": {
  3000. "description": "McpServerNotFoundError",
  3001. "content": {
  3002. "application/json": {
  3003. "schema": {
  3004. "$ref": "#/components/schemas/McpServerNotFoundError"
  3005. }
  3006. }
  3007. }
  3008. }
  3009. },
  3010. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3011. "summary": "Start MCP OAuth",
  3012. "x-codeSamples": [
  3013. {
  3014. "lang": "js",
  3015. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3016. }
  3017. ]
  3018. },
  3019. "delete": {
  3020. "tags": ["mcp"],
  3021. "operationId": "mcp.auth.remove",
  3022. "parameters": [
  3023. {
  3024. "name": "name",
  3025. "in": "path",
  3026. "schema": {
  3027. "type": "string"
  3028. },
  3029. "required": true
  3030. },
  3031. {
  3032. "name": "directory",
  3033. "in": "query",
  3034. "schema": {
  3035. "type": "string"
  3036. },
  3037. "required": false
  3038. },
  3039. {
  3040. "name": "workspace",
  3041. "in": "query",
  3042. "schema": {
  3043. "type": "string"
  3044. },
  3045. "required": false
  3046. }
  3047. ],
  3048. "responses": {
  3049. "200": {
  3050. "description": "OAuth credentials removed",
  3051. "content": {
  3052. "application/json": {
  3053. "schema": {
  3054. "type": "object",
  3055. "properties": {
  3056. "success": {
  3057. "type": "boolean",
  3058. "enum": [true]
  3059. }
  3060. },
  3061. "required": ["success"],
  3062. "additionalProperties": false,
  3063. "description": "OAuth credentials removed"
  3064. }
  3065. }
  3066. }
  3067. },
  3068. "400": {
  3069. "description": "Bad request",
  3070. "content": {
  3071. "application/json": {
  3072. "schema": {
  3073. "$ref": "#/components/schemas/BadRequestError"
  3074. }
  3075. }
  3076. }
  3077. },
  3078. "404": {
  3079. "description": "McpServerNotFoundError",
  3080. "content": {
  3081. "application/json": {
  3082. "schema": {
  3083. "$ref": "#/components/schemas/McpServerNotFoundError"
  3084. }
  3085. }
  3086. }
  3087. }
  3088. },
  3089. "description": "Remove OAuth credentials for an MCP server.",
  3090. "summary": "Remove MCP OAuth",
  3091. "x-codeSamples": [
  3092. {
  3093. "lang": "js",
  3094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3095. }
  3096. ]
  3097. }
  3098. },
  3099. "/mcp/{name}/auth/callback": {
  3100. "post": {
  3101. "tags": ["mcp"],
  3102. "operationId": "mcp.auth.callback",
  3103. "parameters": [
  3104. {
  3105. "name": "name",
  3106. "in": "path",
  3107. "schema": {
  3108. "type": "string"
  3109. },
  3110. "required": true
  3111. },
  3112. {
  3113. "name": "directory",
  3114. "in": "query",
  3115. "schema": {
  3116. "type": "string"
  3117. },
  3118. "required": false
  3119. },
  3120. {
  3121. "name": "workspace",
  3122. "in": "query",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": false
  3127. }
  3128. ],
  3129. "responses": {
  3130. "200": {
  3131. "description": "OAuth authentication completed",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/MCPStatus"
  3136. }
  3137. }
  3138. }
  3139. },
  3140. "400": {
  3141. "description": "BadRequest | InvalidRequestError",
  3142. "content": {
  3143. "application/json": {
  3144. "schema": {
  3145. "anyOf": [
  3146. {
  3147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3148. },
  3149. {
  3150. "$ref": "#/components/schemas/InvalidRequestError"
  3151. }
  3152. ]
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "404": {
  3158. "description": "McpServerNotFoundError",
  3159. "content": {
  3160. "application/json": {
  3161. "schema": {
  3162. "$ref": "#/components/schemas/McpServerNotFoundError"
  3163. }
  3164. }
  3165. }
  3166. }
  3167. },
  3168. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3169. "summary": "Complete MCP OAuth",
  3170. "requestBody": {
  3171. "content": {
  3172. "application/json": {
  3173. "schema": {
  3174. "type": "object",
  3175. "properties": {
  3176. "code": {
  3177. "type": "string"
  3178. }
  3179. },
  3180. "required": ["code"],
  3181. "additionalProperties": false
  3182. }
  3183. }
  3184. }
  3185. },
  3186. "x-codeSamples": [
  3187. {
  3188. "lang": "js",
  3189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3190. }
  3191. ]
  3192. }
  3193. },
  3194. "/mcp/{name}/auth/authenticate": {
  3195. "post": {
  3196. "tags": ["mcp"],
  3197. "operationId": "mcp.auth.authenticate",
  3198. "parameters": [
  3199. {
  3200. "name": "name",
  3201. "in": "path",
  3202. "schema": {
  3203. "type": "string"
  3204. },
  3205. "required": true
  3206. },
  3207. {
  3208. "name": "directory",
  3209. "in": "query",
  3210. "schema": {
  3211. "type": "string"
  3212. },
  3213. "required": false
  3214. },
  3215. {
  3216. "name": "workspace",
  3217. "in": "query",
  3218. "schema": {
  3219. "type": "string"
  3220. },
  3221. "required": false
  3222. }
  3223. ],
  3224. "responses": {
  3225. "200": {
  3226. "description": "OAuth authentication completed",
  3227. "content": {
  3228. "application/json": {
  3229. "schema": {
  3230. "$ref": "#/components/schemas/MCPStatus"
  3231. }
  3232. }
  3233. }
  3234. },
  3235. "400": {
  3236. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3237. "content": {
  3238. "application/json": {
  3239. "schema": {
  3240. "anyOf": [
  3241. {
  3242. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3243. },
  3244. {
  3245. "$ref": "#/components/schemas/InvalidRequestError"
  3246. }
  3247. ]
  3248. }
  3249. }
  3250. }
  3251. },
  3252. "404": {
  3253. "description": "McpServerNotFoundError",
  3254. "content": {
  3255. "application/json": {
  3256. "schema": {
  3257. "$ref": "#/components/schemas/McpServerNotFoundError"
  3258. }
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "description": "Start OAuth flow and wait for callback (opens browser).",
  3264. "summary": "Authenticate MCP OAuth",
  3265. "x-codeSamples": [
  3266. {
  3267. "lang": "js",
  3268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3269. }
  3270. ]
  3271. }
  3272. },
  3273. "/mcp/{name}/connect": {
  3274. "post": {
  3275. "tags": ["mcp"],
  3276. "operationId": "mcp.connect",
  3277. "parameters": [
  3278. {
  3279. "name": "name",
  3280. "in": "path",
  3281. "schema": {
  3282. "type": "string"
  3283. },
  3284. "required": true
  3285. },
  3286. {
  3287. "name": "directory",
  3288. "in": "query",
  3289. "schema": {
  3290. "type": "string"
  3291. },
  3292. "required": false
  3293. },
  3294. {
  3295. "name": "workspace",
  3296. "in": "query",
  3297. "schema": {
  3298. "type": "string"
  3299. },
  3300. "required": false
  3301. }
  3302. ],
  3303. "responses": {
  3304. "200": {
  3305. "description": "MCP server connected successfully",
  3306. "content": {
  3307. "application/json": {
  3308. "schema": {
  3309. "type": "boolean",
  3310. "description": "MCP server connected successfully"
  3311. }
  3312. }
  3313. }
  3314. },
  3315. "400": {
  3316. "description": "Bad request",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/BadRequestError"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "404": {
  3326. "description": "McpServerNotFoundError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "$ref": "#/components/schemas/McpServerNotFoundError"
  3331. }
  3332. }
  3333. }
  3334. }
  3335. },
  3336. "description": "Connect an MCP server.",
  3337. "x-codeSamples": [
  3338. {
  3339. "lang": "js",
  3340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3341. }
  3342. ]
  3343. }
  3344. },
  3345. "/mcp/{name}/disconnect": {
  3346. "post": {
  3347. "tags": ["mcp"],
  3348. "operationId": "mcp.disconnect",
  3349. "parameters": [
  3350. {
  3351. "name": "name",
  3352. "in": "path",
  3353. "schema": {
  3354. "type": "string"
  3355. },
  3356. "required": true
  3357. },
  3358. {
  3359. "name": "directory",
  3360. "in": "query",
  3361. "schema": {
  3362. "type": "string"
  3363. },
  3364. "required": false
  3365. },
  3366. {
  3367. "name": "workspace",
  3368. "in": "query",
  3369. "schema": {
  3370. "type": "string"
  3371. },
  3372. "required": false
  3373. }
  3374. ],
  3375. "responses": {
  3376. "200": {
  3377. "description": "MCP server disconnected successfully",
  3378. "content": {
  3379. "application/json": {
  3380. "schema": {
  3381. "type": "boolean",
  3382. "description": "MCP server disconnected successfully"
  3383. }
  3384. }
  3385. }
  3386. },
  3387. "400": {
  3388. "description": "Bad request",
  3389. "content": {
  3390. "application/json": {
  3391. "schema": {
  3392. "$ref": "#/components/schemas/BadRequestError"
  3393. }
  3394. }
  3395. }
  3396. },
  3397. "404": {
  3398. "description": "McpServerNotFoundError",
  3399. "content": {
  3400. "application/json": {
  3401. "schema": {
  3402. "$ref": "#/components/schemas/McpServerNotFoundError"
  3403. }
  3404. }
  3405. }
  3406. }
  3407. },
  3408. "description": "Disconnect an MCP server.",
  3409. "x-codeSamples": [
  3410. {
  3411. "lang": "js",
  3412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3413. }
  3414. ]
  3415. }
  3416. },
  3417. "/project": {
  3418. "get": {
  3419. "tags": ["project"],
  3420. "operationId": "project.list",
  3421. "parameters": [
  3422. {
  3423. "name": "directory",
  3424. "in": "query",
  3425. "schema": {
  3426. "type": "string"
  3427. },
  3428. "required": false
  3429. },
  3430. {
  3431. "name": "workspace",
  3432. "in": "query",
  3433. "schema": {
  3434. "type": "string"
  3435. },
  3436. "required": false
  3437. }
  3438. ],
  3439. "responses": {
  3440. "200": {
  3441. "description": "List of projects",
  3442. "content": {
  3443. "application/json": {
  3444. "schema": {
  3445. "type": "array",
  3446. "items": {
  3447. "$ref": "#/components/schemas/Project"
  3448. },
  3449. "description": "List of projects"
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "400": {
  3455. "description": "Bad request",
  3456. "content": {
  3457. "application/json": {
  3458. "schema": {
  3459. "$ref": "#/components/schemas/BadRequestError"
  3460. }
  3461. }
  3462. }
  3463. }
  3464. },
  3465. "description": "Get a list of projects that have been opened with OpenCode.",
  3466. "summary": "List all projects",
  3467. "x-codeSamples": [
  3468. {
  3469. "lang": "js",
  3470. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3471. }
  3472. ]
  3473. }
  3474. },
  3475. "/project/current": {
  3476. "get": {
  3477. "tags": ["project"],
  3478. "operationId": "project.current",
  3479. "parameters": [
  3480. {
  3481. "name": "directory",
  3482. "in": "query",
  3483. "schema": {
  3484. "type": "string"
  3485. },
  3486. "required": false
  3487. },
  3488. {
  3489. "name": "workspace",
  3490. "in": "query",
  3491. "schema": {
  3492. "type": "string"
  3493. },
  3494. "required": false
  3495. }
  3496. ],
  3497. "responses": {
  3498. "200": {
  3499. "description": "Current project information",
  3500. "content": {
  3501. "application/json": {
  3502. "schema": {
  3503. "$ref": "#/components/schemas/Project"
  3504. }
  3505. }
  3506. }
  3507. },
  3508. "400": {
  3509. "description": "Bad request",
  3510. "content": {
  3511. "application/json": {
  3512. "schema": {
  3513. "$ref": "#/components/schemas/BadRequestError"
  3514. }
  3515. }
  3516. }
  3517. }
  3518. },
  3519. "description": "Retrieve the currently active project that OpenCode is working with.",
  3520. "summary": "Get current project",
  3521. "x-codeSamples": [
  3522. {
  3523. "lang": "js",
  3524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3525. }
  3526. ]
  3527. }
  3528. },
  3529. "/project/git/init": {
  3530. "post": {
  3531. "tags": ["project"],
  3532. "operationId": "project.initGit",
  3533. "parameters": [
  3534. {
  3535. "name": "directory",
  3536. "in": "query",
  3537. "schema": {
  3538. "type": "string"
  3539. },
  3540. "required": false
  3541. },
  3542. {
  3543. "name": "workspace",
  3544. "in": "query",
  3545. "schema": {
  3546. "type": "string"
  3547. },
  3548. "required": false
  3549. }
  3550. ],
  3551. "responses": {
  3552. "200": {
  3553. "description": "Project information after git initialization",
  3554. "content": {
  3555. "application/json": {
  3556. "schema": {
  3557. "$ref": "#/components/schemas/Project"
  3558. }
  3559. }
  3560. }
  3561. },
  3562. "400": {
  3563. "description": "Bad request",
  3564. "content": {
  3565. "application/json": {
  3566. "schema": {
  3567. "$ref": "#/components/schemas/BadRequestError"
  3568. }
  3569. }
  3570. }
  3571. }
  3572. },
  3573. "description": "Create a git repository for the current project and return the refreshed project info.",
  3574. "summary": "Initialize git repository",
  3575. "x-codeSamples": [
  3576. {
  3577. "lang": "js",
  3578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3579. }
  3580. ]
  3581. }
  3582. },
  3583. "/project/{projectID}": {
  3584. "patch": {
  3585. "tags": ["project"],
  3586. "operationId": "project.update",
  3587. "parameters": [
  3588. {
  3589. "name": "projectID",
  3590. "in": "path",
  3591. "schema": {
  3592. "type": "string"
  3593. },
  3594. "required": true
  3595. },
  3596. {
  3597. "name": "directory",
  3598. "in": "query",
  3599. "schema": {
  3600. "type": "string"
  3601. },
  3602. "required": false
  3603. },
  3604. {
  3605. "name": "workspace",
  3606. "in": "query",
  3607. "schema": {
  3608. "type": "string"
  3609. },
  3610. "required": false
  3611. }
  3612. ],
  3613. "responses": {
  3614. "200": {
  3615. "description": "Updated project information",
  3616. "content": {
  3617. "application/json": {
  3618. "schema": {
  3619. "$ref": "#/components/schemas/Project"
  3620. }
  3621. }
  3622. }
  3623. },
  3624. "400": {
  3625. "description": "BadRequest | InvalidRequestError",
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "anyOf": [
  3630. {
  3631. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3632. },
  3633. {
  3634. "$ref": "#/components/schemas/InvalidRequestError"
  3635. }
  3636. ]
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "404": {
  3642. "description": "ProjectNotFoundError",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/ProjectNotFoundError"
  3647. }
  3648. }
  3649. }
  3650. }
  3651. },
  3652. "description": "Update project properties such as name, icon, and commands.",
  3653. "summary": "Update project",
  3654. "requestBody": {
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "type": "object",
  3659. "properties": {
  3660. "name": {
  3661. "type": "string"
  3662. },
  3663. "icon": {
  3664. "type": "object",
  3665. "properties": {
  3666. "url": {
  3667. "type": "string"
  3668. },
  3669. "override": {
  3670. "type": "string"
  3671. },
  3672. "color": {
  3673. "type": "string"
  3674. }
  3675. },
  3676. "additionalProperties": false
  3677. },
  3678. "commands": {
  3679. "type": "object",
  3680. "properties": {
  3681. "start": {
  3682. "type": "string",
  3683. "description": "Startup script to run when creating a new workspace (worktree)"
  3684. }
  3685. },
  3686. "additionalProperties": false
  3687. }
  3688. },
  3689. "additionalProperties": false
  3690. }
  3691. }
  3692. }
  3693. },
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/pty/shells": {
  3703. "get": {
  3704. "tags": ["pty"],
  3705. "operationId": "pty.shells",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of shells",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "type": "object",
  3733. "properties": {
  3734. "path": {
  3735. "type": "string"
  3736. },
  3737. "name": {
  3738. "type": "string"
  3739. },
  3740. "acceptable": {
  3741. "type": "boolean"
  3742. }
  3743. },
  3744. "required": ["path", "name", "acceptable"],
  3745. "additionalProperties": false
  3746. },
  3747. "description": "List of shells"
  3748. }
  3749. }
  3750. }
  3751. },
  3752. "400": {
  3753. "description": "Bad request",
  3754. "content": {
  3755. "application/json": {
  3756. "schema": {
  3757. "$ref": "#/components/schemas/BadRequestError"
  3758. }
  3759. }
  3760. }
  3761. }
  3762. },
  3763. "description": "Get a list of available shells on the system.",
  3764. "summary": "List available shells",
  3765. "x-codeSamples": [
  3766. {
  3767. "lang": "js",
  3768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3769. }
  3770. ]
  3771. }
  3772. },
  3773. "/pty": {
  3774. "get": {
  3775. "tags": ["pty"],
  3776. "operationId": "pty.list",
  3777. "parameters": [
  3778. {
  3779. "name": "directory",
  3780. "in": "query",
  3781. "schema": {
  3782. "type": "string"
  3783. },
  3784. "required": false
  3785. },
  3786. {
  3787. "name": "workspace",
  3788. "in": "query",
  3789. "schema": {
  3790. "type": "string"
  3791. },
  3792. "required": false
  3793. }
  3794. ],
  3795. "responses": {
  3796. "200": {
  3797. "description": "List of sessions",
  3798. "content": {
  3799. "application/json": {
  3800. "schema": {
  3801. "type": "array",
  3802. "items": {
  3803. "$ref": "#/components/schemas/Pty"
  3804. },
  3805. "description": "List of sessions"
  3806. }
  3807. }
  3808. }
  3809. },
  3810. "400": {
  3811. "description": "Bad request",
  3812. "content": {
  3813. "application/json": {
  3814. "schema": {
  3815. "$ref": "#/components/schemas/BadRequestError"
  3816. }
  3817. }
  3818. }
  3819. }
  3820. },
  3821. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3822. "summary": "List PTY sessions",
  3823. "x-codeSamples": [
  3824. {
  3825. "lang": "js",
  3826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3827. }
  3828. ]
  3829. },
  3830. "post": {
  3831. "tags": ["pty"],
  3832. "operationId": "pty.create",
  3833. "parameters": [
  3834. {
  3835. "name": "directory",
  3836. "in": "query",
  3837. "schema": {
  3838. "type": "string"
  3839. },
  3840. "required": false
  3841. },
  3842. {
  3843. "name": "workspace",
  3844. "in": "query",
  3845. "schema": {
  3846. "type": "string"
  3847. },
  3848. "required": false
  3849. }
  3850. ],
  3851. "responses": {
  3852. "200": {
  3853. "description": "Created session",
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "$ref": "#/components/schemas/Pty"
  3858. }
  3859. }
  3860. }
  3861. },
  3862. "400": {
  3863. "description": "BadRequest | InvalidRequestError",
  3864. "content": {
  3865. "application/json": {
  3866. "schema": {
  3867. "anyOf": [
  3868. {
  3869. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3870. },
  3871. {
  3872. "$ref": "#/components/schemas/InvalidRequestError"
  3873. }
  3874. ]
  3875. }
  3876. }
  3877. }
  3878. }
  3879. },
  3880. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3881. "summary": "Create PTY session",
  3882. "requestBody": {
  3883. "content": {
  3884. "application/json": {
  3885. "schema": {
  3886. "type": "object",
  3887. "properties": {
  3888. "command": {
  3889. "type": "string"
  3890. },
  3891. "args": {
  3892. "type": "array",
  3893. "items": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "cwd": {
  3898. "type": "string"
  3899. },
  3900. "title": {
  3901. "type": "string"
  3902. },
  3903. "env": {
  3904. "type": "object",
  3905. "additionalProperties": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. },
  3910. "additionalProperties": false
  3911. }
  3912. }
  3913. }
  3914. },
  3915. "x-codeSamples": [
  3916. {
  3917. "lang": "js",
  3918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3919. }
  3920. ]
  3921. }
  3922. },
  3923. "/pty/{ptyID}": {
  3924. "get": {
  3925. "tags": ["pty"],
  3926. "operationId": "pty.get",
  3927. "parameters": [
  3928. {
  3929. "name": "ptyID",
  3930. "in": "path",
  3931. "schema": {
  3932. "type": "string",
  3933. "pattern": "^pty"
  3934. },
  3935. "required": true
  3936. },
  3937. {
  3938. "name": "directory",
  3939. "in": "query",
  3940. "schema": {
  3941. "type": "string"
  3942. },
  3943. "required": false
  3944. },
  3945. {
  3946. "name": "workspace",
  3947. "in": "query",
  3948. "schema": {
  3949. "type": "string"
  3950. },
  3951. "required": false
  3952. }
  3953. ],
  3954. "responses": {
  3955. "200": {
  3956. "description": "Session info",
  3957. "content": {
  3958. "application/json": {
  3959. "schema": {
  3960. "$ref": "#/components/schemas/Pty"
  3961. }
  3962. }
  3963. }
  3964. },
  3965. "400": {
  3966. "description": "Bad request",
  3967. "content": {
  3968. "application/json": {
  3969. "schema": {
  3970. "$ref": "#/components/schemas/BadRequestError"
  3971. }
  3972. }
  3973. }
  3974. },
  3975. "404": {
  3976. "description": "PtyNotFoundError",
  3977. "content": {
  3978. "application/json": {
  3979. "schema": {
  3980. "$ref": "#/components/schemas/PtyNotFoundError"
  3981. }
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3987. "summary": "Get PTY session",
  3988. "x-codeSamples": [
  3989. {
  3990. "lang": "js",
  3991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3992. }
  3993. ]
  3994. },
  3995. "put": {
  3996. "tags": ["pty"],
  3997. "operationId": "pty.update",
  3998. "parameters": [
  3999. {
  4000. "name": "ptyID",
  4001. "in": "path",
  4002. "schema": {
  4003. "type": "string",
  4004. "pattern": "^pty"
  4005. },
  4006. "required": true
  4007. },
  4008. {
  4009. "name": "directory",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. },
  4016. {
  4017. "name": "workspace",
  4018. "in": "query",
  4019. "schema": {
  4020. "type": "string"
  4021. },
  4022. "required": false
  4023. }
  4024. ],
  4025. "responses": {
  4026. "200": {
  4027. "description": "Updated session",
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "$ref": "#/components/schemas/Pty"
  4032. }
  4033. }
  4034. }
  4035. },
  4036. "400": {
  4037. "description": "BadRequest | InvalidRequestError",
  4038. "content": {
  4039. "application/json": {
  4040. "schema": {
  4041. "anyOf": [
  4042. {
  4043. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4044. },
  4045. {
  4046. "$ref": "#/components/schemas/InvalidRequestError"
  4047. }
  4048. ]
  4049. }
  4050. }
  4051. }
  4052. },
  4053. "404": {
  4054. "description": "PtyNotFoundError",
  4055. "content": {
  4056. "application/json": {
  4057. "schema": {
  4058. "$ref": "#/components/schemas/PtyNotFoundError"
  4059. }
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4065. "summary": "Update PTY session",
  4066. "requestBody": {
  4067. "content": {
  4068. "application/json": {
  4069. "schema": {
  4070. "type": "object",
  4071. "properties": {
  4072. "title": {
  4073. "type": "string"
  4074. },
  4075. "size": {
  4076. "type": "object",
  4077. "properties": {
  4078. "rows": {
  4079. "type": "integer",
  4080. "exclusiveMinimum": 0
  4081. },
  4082. "cols": {
  4083. "type": "integer",
  4084. "exclusiveMinimum": 0
  4085. }
  4086. },
  4087. "required": ["rows", "cols"],
  4088. "additionalProperties": false
  4089. }
  4090. },
  4091. "additionalProperties": false
  4092. }
  4093. }
  4094. }
  4095. },
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4100. }
  4101. ]
  4102. },
  4103. "delete": {
  4104. "tags": ["pty"],
  4105. "operationId": "pty.remove",
  4106. "parameters": [
  4107. {
  4108. "name": "ptyID",
  4109. "in": "path",
  4110. "schema": {
  4111. "type": "string",
  4112. "pattern": "^pty"
  4113. },
  4114. "required": true
  4115. },
  4116. {
  4117. "name": "directory",
  4118. "in": "query",
  4119. "schema": {
  4120. "type": "string"
  4121. },
  4122. "required": false
  4123. },
  4124. {
  4125. "name": "workspace",
  4126. "in": "query",
  4127. "schema": {
  4128. "type": "string"
  4129. },
  4130. "required": false
  4131. }
  4132. ],
  4133. "responses": {
  4134. "200": {
  4135. "description": "Session removed",
  4136. "content": {
  4137. "application/json": {
  4138. "schema": {
  4139. "type": "boolean",
  4140. "description": "Session removed"
  4141. }
  4142. }
  4143. }
  4144. },
  4145. "400": {
  4146. "description": "Bad request",
  4147. "content": {
  4148. "application/json": {
  4149. "schema": {
  4150. "$ref": "#/components/schemas/BadRequestError"
  4151. }
  4152. }
  4153. }
  4154. },
  4155. "404": {
  4156. "description": "PtyNotFoundError",
  4157. "content": {
  4158. "application/json": {
  4159. "schema": {
  4160. "$ref": "#/components/schemas/PtyNotFoundError"
  4161. }
  4162. }
  4163. }
  4164. }
  4165. },
  4166. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4167. "summary": "Remove PTY session",
  4168. "x-codeSamples": [
  4169. {
  4170. "lang": "js",
  4171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4172. }
  4173. ]
  4174. }
  4175. },
  4176. "/pty/{ptyID}/connect-token": {
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.connectToken",
  4180. "parameters": [
  4181. {
  4182. "name": "ptyID",
  4183. "in": "path",
  4184. "schema": {
  4185. "type": "string",
  4186. "pattern": "^pty"
  4187. },
  4188. "required": true
  4189. },
  4190. {
  4191. "name": "directory",
  4192. "in": "query",
  4193. "schema": {
  4194. "type": "string"
  4195. },
  4196. "required": false
  4197. },
  4198. {
  4199. "name": "workspace",
  4200. "in": "query",
  4201. "schema": {
  4202. "type": "string"
  4203. },
  4204. "required": false
  4205. }
  4206. ],
  4207. "responses": {
  4208. "200": {
  4209. "description": "WebSocket connect token",
  4210. "content": {
  4211. "application/json": {
  4212. "schema": {
  4213. "type": "object",
  4214. "properties": {
  4215. "ticket": {
  4216. "type": "string"
  4217. },
  4218. "expires_in": {
  4219. "type": "integer",
  4220. "exclusiveMinimum": 0
  4221. }
  4222. },
  4223. "required": ["ticket", "expires_in"],
  4224. "additionalProperties": false,
  4225. "description": "WebSocket connect token"
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "400": {
  4231. "description": "Bad request",
  4232. "content": {
  4233. "application/json": {
  4234. "schema": {
  4235. "$ref": "#/components/schemas/BadRequestError"
  4236. }
  4237. }
  4238. }
  4239. },
  4240. "403": {
  4241. "description": "PtyForbiddenError",
  4242. "content": {
  4243. "application/json": {
  4244. "schema": {
  4245. "$ref": "#/components/schemas/PtyForbiddenError"
  4246. }
  4247. }
  4248. }
  4249. },
  4250. "404": {
  4251. "description": "PtyNotFoundError",
  4252. "content": {
  4253. "application/json": {
  4254. "schema": {
  4255. "$ref": "#/components/schemas/PtyNotFoundError"
  4256. }
  4257. }
  4258. }
  4259. }
  4260. },
  4261. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4262. "summary": "Create PTY WebSocket token",
  4263. "x-codeSamples": [
  4264. {
  4265. "lang": "js",
  4266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4267. }
  4268. ]
  4269. }
  4270. },
  4271. "/question": {
  4272. "get": {
  4273. "tags": ["question"],
  4274. "operationId": "question.list",
  4275. "parameters": [
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "List of pending questions",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "array",
  4300. "items": {
  4301. "$ref": "#/components/schemas/QuestionRequest"
  4302. },
  4303. "description": "List of pending questions"
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "400": {
  4309. "description": "Bad request",
  4310. "content": {
  4311. "application/json": {
  4312. "schema": {
  4313. "$ref": "#/components/schemas/BadRequestError"
  4314. }
  4315. }
  4316. }
  4317. }
  4318. },
  4319. "description": "Get all pending question requests across all sessions.",
  4320. "summary": "List pending questions",
  4321. "x-codeSamples": [
  4322. {
  4323. "lang": "js",
  4324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4325. }
  4326. ]
  4327. }
  4328. },
  4329. "/question/{requestID}/reply": {
  4330. "post": {
  4331. "tags": ["question"],
  4332. "operationId": "question.reply",
  4333. "parameters": [
  4334. {
  4335. "name": "requestID",
  4336. "in": "path",
  4337. "schema": {
  4338. "type": "string",
  4339. "pattern": "^que"
  4340. },
  4341. "required": true
  4342. },
  4343. {
  4344. "name": "directory",
  4345. "in": "query",
  4346. "schema": {
  4347. "type": "string"
  4348. },
  4349. "required": false
  4350. },
  4351. {
  4352. "name": "workspace",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. }
  4359. ],
  4360. "responses": {
  4361. "200": {
  4362. "description": "Question answered successfully",
  4363. "content": {
  4364. "application/json": {
  4365. "schema": {
  4366. "type": "boolean",
  4367. "description": "Question answered successfully"
  4368. }
  4369. }
  4370. }
  4371. },
  4372. "400": {
  4373. "description": "BadRequest | InvalidRequestError",
  4374. "content": {
  4375. "application/json": {
  4376. "schema": {
  4377. "anyOf": [
  4378. {
  4379. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4380. },
  4381. {
  4382. "$ref": "#/components/schemas/InvalidRequestError"
  4383. }
  4384. ]
  4385. }
  4386. }
  4387. }
  4388. },
  4389. "404": {
  4390. "description": "QuestionNotFoundError",
  4391. "content": {
  4392. "application/json": {
  4393. "schema": {
  4394. "$ref": "#/components/schemas/QuestionNotFoundError"
  4395. }
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "description": "Provide answers to a question request from the AI assistant.",
  4401. "summary": "Reply to question request",
  4402. "requestBody": {
  4403. "content": {
  4404. "application/json": {
  4405. "schema": {
  4406. "type": "object",
  4407. "properties": {
  4408. "answers": {
  4409. "type": "array",
  4410. "items": {
  4411. "$ref": "#/components/schemas/QuestionAnswer"
  4412. },
  4413. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4414. }
  4415. },
  4416. "required": ["answers"],
  4417. "additionalProperties": false
  4418. }
  4419. }
  4420. }
  4421. },
  4422. "x-codeSamples": [
  4423. {
  4424. "lang": "js",
  4425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4426. }
  4427. ]
  4428. }
  4429. },
  4430. "/question/{requestID}/reject": {
  4431. "post": {
  4432. "tags": ["question"],
  4433. "operationId": "question.reject",
  4434. "parameters": [
  4435. {
  4436. "name": "requestID",
  4437. "in": "path",
  4438. "schema": {
  4439. "type": "string",
  4440. "pattern": "^que"
  4441. },
  4442. "required": true
  4443. },
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Question rejected successfully",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "type": "boolean",
  4468. "description": "Question rejected successfully"
  4469. }
  4470. }
  4471. }
  4472. },
  4473. "400": {
  4474. "description": "BadRequest | InvalidRequestError",
  4475. "content": {
  4476. "application/json": {
  4477. "schema": {
  4478. "anyOf": [
  4479. {
  4480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4481. },
  4482. {
  4483. "$ref": "#/components/schemas/InvalidRequestError"
  4484. }
  4485. ]
  4486. }
  4487. }
  4488. }
  4489. },
  4490. "404": {
  4491. "description": "QuestionNotFoundError",
  4492. "content": {
  4493. "application/json": {
  4494. "schema": {
  4495. "$ref": "#/components/schemas/QuestionNotFoundError"
  4496. }
  4497. }
  4498. }
  4499. }
  4500. },
  4501. "description": "Reject a question request from the AI assistant.",
  4502. "summary": "Reject question request",
  4503. "x-codeSamples": [
  4504. {
  4505. "lang": "js",
  4506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4507. }
  4508. ]
  4509. }
  4510. },
  4511. "/permission": {
  4512. "get": {
  4513. "tags": ["permission"],
  4514. "operationId": "permission.list",
  4515. "parameters": [
  4516. {
  4517. "name": "directory",
  4518. "in": "query",
  4519. "schema": {
  4520. "type": "string"
  4521. },
  4522. "required": false
  4523. },
  4524. {
  4525. "name": "workspace",
  4526. "in": "query",
  4527. "schema": {
  4528. "type": "string"
  4529. },
  4530. "required": false
  4531. }
  4532. ],
  4533. "responses": {
  4534. "200": {
  4535. "description": "List of pending permissions",
  4536. "content": {
  4537. "application/json": {
  4538. "schema": {
  4539. "type": "array",
  4540. "items": {
  4541. "$ref": "#/components/schemas/PermissionRequest"
  4542. },
  4543. "description": "List of pending permissions"
  4544. }
  4545. }
  4546. }
  4547. },
  4548. "400": {
  4549. "description": "Bad request",
  4550. "content": {
  4551. "application/json": {
  4552. "schema": {
  4553. "$ref": "#/components/schemas/BadRequestError"
  4554. }
  4555. }
  4556. }
  4557. }
  4558. },
  4559. "description": "Get all pending permission requests across all sessions.",
  4560. "summary": "List pending permissions",
  4561. "x-codeSamples": [
  4562. {
  4563. "lang": "js",
  4564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4565. }
  4566. ]
  4567. }
  4568. },
  4569. "/permission/{requestID}/reply": {
  4570. "post": {
  4571. "tags": ["permission"],
  4572. "operationId": "permission.reply",
  4573. "parameters": [
  4574. {
  4575. "name": "requestID",
  4576. "in": "path",
  4577. "schema": {
  4578. "type": "string",
  4579. "pattern": "^per"
  4580. },
  4581. "required": true
  4582. },
  4583. {
  4584. "name": "directory",
  4585. "in": "query",
  4586. "schema": {
  4587. "type": "string"
  4588. },
  4589. "required": false
  4590. },
  4591. {
  4592. "name": "workspace",
  4593. "in": "query",
  4594. "schema": {
  4595. "type": "string"
  4596. },
  4597. "required": false
  4598. }
  4599. ],
  4600. "responses": {
  4601. "200": {
  4602. "description": "Permission processed successfully",
  4603. "content": {
  4604. "application/json": {
  4605. "schema": {
  4606. "type": "boolean",
  4607. "description": "Permission processed successfully"
  4608. }
  4609. }
  4610. }
  4611. },
  4612. "400": {
  4613. "description": "BadRequest | InvalidRequestError",
  4614. "content": {
  4615. "application/json": {
  4616. "schema": {
  4617. "anyOf": [
  4618. {
  4619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4620. },
  4621. {
  4622. "$ref": "#/components/schemas/InvalidRequestError"
  4623. }
  4624. ]
  4625. }
  4626. }
  4627. }
  4628. },
  4629. "404": {
  4630. "description": "PermissionNotFoundError",
  4631. "content": {
  4632. "application/json": {
  4633. "schema": {
  4634. "$ref": "#/components/schemas/PermissionNotFoundError"
  4635. }
  4636. }
  4637. }
  4638. }
  4639. },
  4640. "description": "Approve or deny a permission request from the AI assistant.",
  4641. "summary": "Respond to permission request",
  4642. "requestBody": {
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "object",
  4647. "properties": {
  4648. "reply": {
  4649. "type": "string",
  4650. "enum": ["once", "always", "reject"]
  4651. },
  4652. "message": {
  4653. "type": "string"
  4654. }
  4655. },
  4656. "required": ["reply"],
  4657. "additionalProperties": false
  4658. }
  4659. }
  4660. }
  4661. },
  4662. "x-codeSamples": [
  4663. {
  4664. "lang": "js",
  4665. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4666. }
  4667. ]
  4668. }
  4669. },
  4670. "/provider": {
  4671. "get": {
  4672. "tags": ["provider"],
  4673. "operationId": "provider.list",
  4674. "parameters": [
  4675. {
  4676. "name": "directory",
  4677. "in": "query",
  4678. "schema": {
  4679. "type": "string"
  4680. },
  4681. "required": false
  4682. },
  4683. {
  4684. "name": "workspace",
  4685. "in": "query",
  4686. "schema": {
  4687. "type": "string"
  4688. },
  4689. "required": false
  4690. }
  4691. ],
  4692. "responses": {
  4693. "200": {
  4694. "description": "List of providers",
  4695. "content": {
  4696. "application/json": {
  4697. "schema": {
  4698. "type": "object",
  4699. "properties": {
  4700. "all": {
  4701. "type": "array",
  4702. "items": {
  4703. "$ref": "#/components/schemas/Provider"
  4704. }
  4705. },
  4706. "default": {
  4707. "type": "object",
  4708. "additionalProperties": {
  4709. "type": "string"
  4710. }
  4711. },
  4712. "connected": {
  4713. "type": "array",
  4714. "items": {
  4715. "type": "string"
  4716. }
  4717. }
  4718. },
  4719. "required": ["all", "default", "connected"],
  4720. "additionalProperties": false,
  4721. "description": "List of providers"
  4722. }
  4723. }
  4724. }
  4725. },
  4726. "400": {
  4727. "description": "Bad request",
  4728. "content": {
  4729. "application/json": {
  4730. "schema": {
  4731. "$ref": "#/components/schemas/BadRequestError"
  4732. }
  4733. }
  4734. }
  4735. }
  4736. },
  4737. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4738. "summary": "List providers",
  4739. "x-codeSamples": [
  4740. {
  4741. "lang": "js",
  4742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4743. }
  4744. ]
  4745. }
  4746. },
  4747. "/provider/auth": {
  4748. "get": {
  4749. "tags": ["provider"],
  4750. "operationId": "provider.auth",
  4751. "parameters": [
  4752. {
  4753. "name": "directory",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. },
  4760. {
  4761. "name": "workspace",
  4762. "in": "query",
  4763. "schema": {
  4764. "type": "string"
  4765. },
  4766. "required": false
  4767. }
  4768. ],
  4769. "responses": {
  4770. "200": {
  4771. "description": "Provider auth methods",
  4772. "content": {
  4773. "application/json": {
  4774. "schema": {
  4775. "type": "object",
  4776. "additionalProperties": {
  4777. "type": "array",
  4778. "items": {
  4779. "$ref": "#/components/schemas/ProviderAuthMethod"
  4780. }
  4781. },
  4782. "description": "Provider auth methods"
  4783. }
  4784. }
  4785. }
  4786. },
  4787. "400": {
  4788. "description": "Bad request",
  4789. "content": {
  4790. "application/json": {
  4791. "schema": {
  4792. "$ref": "#/components/schemas/BadRequestError"
  4793. }
  4794. }
  4795. }
  4796. }
  4797. },
  4798. "description": "Retrieve available authentication methods for all AI providers.",
  4799. "summary": "Get provider auth methods",
  4800. "x-codeSamples": [
  4801. {
  4802. "lang": "js",
  4803. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4804. }
  4805. ]
  4806. }
  4807. },
  4808. "/provider/{providerID}/oauth/authorize": {
  4809. "post": {
  4810. "tags": ["provider"],
  4811. "operationId": "provider.oauth.authorize",
  4812. "parameters": [
  4813. {
  4814. "name": "providerID",
  4815. "in": "path",
  4816. "schema": {
  4817. "type": "string"
  4818. },
  4819. "required": true
  4820. },
  4821. {
  4822. "name": "directory",
  4823. "in": "query",
  4824. "schema": {
  4825. "type": "string"
  4826. },
  4827. "required": false
  4828. },
  4829. {
  4830. "name": "workspace",
  4831. "in": "query",
  4832. "schema": {
  4833. "type": "string"
  4834. },
  4835. "required": false
  4836. }
  4837. ],
  4838. "responses": {
  4839. "200": {
  4840. "description": "Authorization URL and method",
  4841. "content": {
  4842. "application/json": {
  4843. "schema": {
  4844. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4845. }
  4846. }
  4847. }
  4848. },
  4849. "400": {
  4850. "description": "ProviderAuthError | InvalidRequestError",
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "anyOf": [
  4855. {
  4856. "$ref": "#/components/schemas/ProviderAuthError1"
  4857. },
  4858. {
  4859. "$ref": "#/components/schemas/InvalidRequestError"
  4860. }
  4861. ]
  4862. }
  4863. }
  4864. }
  4865. }
  4866. },
  4867. "description": "Start the OAuth authorization flow for a provider.",
  4868. "summary": "Start OAuth authorization",
  4869. "requestBody": {
  4870. "content": {
  4871. "application/json": {
  4872. "schema": {
  4873. "type": "object",
  4874. "properties": {
  4875. "method": {
  4876. "type": "number",
  4877. "description": "Auth method index"
  4878. },
  4879. "inputs": {
  4880. "type": "object",
  4881. "additionalProperties": {
  4882. "type": "string"
  4883. }
  4884. }
  4885. },
  4886. "required": ["method"],
  4887. "additionalProperties": false
  4888. }
  4889. }
  4890. }
  4891. },
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/provider/{providerID}/oauth/callback": {
  4901. "post": {
  4902. "tags": ["provider"],
  4903. "operationId": "provider.oauth.callback",
  4904. "parameters": [
  4905. {
  4906. "name": "providerID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string"
  4910. },
  4911. "required": true
  4912. },
  4913. {
  4914. "name": "directory",
  4915. "in": "query",
  4916. "schema": {
  4917. "type": "string"
  4918. },
  4919. "required": false
  4920. },
  4921. {
  4922. "name": "workspace",
  4923. "in": "query",
  4924. "schema": {
  4925. "type": "string"
  4926. },
  4927. "required": false
  4928. }
  4929. ],
  4930. "responses": {
  4931. "200": {
  4932. "description": "OAuth callback processed successfully",
  4933. "content": {
  4934. "application/json": {
  4935. "schema": {
  4936. "type": "boolean",
  4937. "description": "OAuth callback processed successfully"
  4938. }
  4939. }
  4940. }
  4941. },
  4942. "400": {
  4943. "description": "ProviderAuthError | InvalidRequestError",
  4944. "content": {
  4945. "application/json": {
  4946. "schema": {
  4947. "anyOf": [
  4948. {
  4949. "$ref": "#/components/schemas/ProviderAuthError1"
  4950. },
  4951. {
  4952. "$ref": "#/components/schemas/InvalidRequestError"
  4953. }
  4954. ]
  4955. }
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "description": "Handle the OAuth callback from a provider after user authorization.",
  4961. "summary": "Handle OAuth callback",
  4962. "requestBody": {
  4963. "content": {
  4964. "application/json": {
  4965. "schema": {
  4966. "type": "object",
  4967. "properties": {
  4968. "method": {
  4969. "type": "number",
  4970. "description": "Auth method index"
  4971. },
  4972. "code": {
  4973. "type": "string"
  4974. }
  4975. },
  4976. "required": ["method"],
  4977. "additionalProperties": false
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "x-codeSamples": [
  4983. {
  4984. "lang": "js",
  4985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4986. }
  4987. ]
  4988. }
  4989. },
  4990. "/session": {
  4991. "get": {
  4992. "tags": ["session"],
  4993. "operationId": "session.list",
  4994. "parameters": [
  4995. {
  4996. "name": "directory",
  4997. "in": "query",
  4998. "schema": {
  4999. "type": "string"
  5000. },
  5001. "required": false
  5002. },
  5003. {
  5004. "name": "workspace",
  5005. "in": "query",
  5006. "schema": {
  5007. "type": "string"
  5008. },
  5009. "required": false
  5010. },
  5011. {
  5012. "name": "scope",
  5013. "in": "query",
  5014. "schema": {
  5015. "type": "string",
  5016. "enum": ["project"]
  5017. },
  5018. "required": false
  5019. },
  5020. {
  5021. "name": "path",
  5022. "in": "query",
  5023. "schema": {
  5024. "type": "string"
  5025. },
  5026. "required": false
  5027. },
  5028. {
  5029. "name": "roots",
  5030. "in": "query",
  5031. "schema": {
  5032. "anyOf": [
  5033. {
  5034. "type": "boolean"
  5035. },
  5036. {
  5037. "type": "string",
  5038. "enum": ["true", "false"]
  5039. }
  5040. ]
  5041. },
  5042. "required": false
  5043. },
  5044. {
  5045. "name": "start",
  5046. "in": "query",
  5047. "schema": {
  5048. "type": "number"
  5049. },
  5050. "required": false
  5051. },
  5052. {
  5053. "name": "search",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "limit",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "number"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "List of sessions",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "array",
  5076. "items": {
  5077. "$ref": "#/components/schemas/Session"
  5078. },
  5079. "description": "List of sessions"
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "400": {
  5085. "description": "Bad request",
  5086. "content": {
  5087. "application/json": {
  5088. "schema": {
  5089. "$ref": "#/components/schemas/BadRequestError"
  5090. }
  5091. }
  5092. }
  5093. }
  5094. },
  5095. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5096. "summary": "List sessions",
  5097. "x-codeSamples": [
  5098. {
  5099. "lang": "js",
  5100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5101. }
  5102. ]
  5103. },
  5104. "post": {
  5105. "tags": ["session"],
  5106. "operationId": "session.create",
  5107. "parameters": [
  5108. {
  5109. "name": "directory",
  5110. "in": "query",
  5111. "schema": {
  5112. "type": "string"
  5113. },
  5114. "required": false
  5115. },
  5116. {
  5117. "name": "workspace",
  5118. "in": "query",
  5119. "schema": {
  5120. "type": "string"
  5121. },
  5122. "required": false
  5123. }
  5124. ],
  5125. "responses": {
  5126. "200": {
  5127. "description": "Successfully created session",
  5128. "content": {
  5129. "application/json": {
  5130. "schema": {
  5131. "$ref": "#/components/schemas/Session"
  5132. }
  5133. }
  5134. }
  5135. },
  5136. "400": {
  5137. "description": "BadRequest | InvalidRequestError",
  5138. "content": {
  5139. "application/json": {
  5140. "schema": {
  5141. "anyOf": [
  5142. {
  5143. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5144. },
  5145. {
  5146. "$ref": "#/components/schemas/InvalidRequestError"
  5147. }
  5148. ]
  5149. }
  5150. }
  5151. }
  5152. }
  5153. },
  5154. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5155. "summary": "Create session",
  5156. "requestBody": {
  5157. "content": {
  5158. "application/json": {
  5159. "schema": {
  5160. "type": "object",
  5161. "properties": {
  5162. "parentID": {
  5163. "type": "string",
  5164. "pattern": "^ses"
  5165. },
  5166. "title": {
  5167. "type": "string"
  5168. },
  5169. "agent": {
  5170. "type": "string"
  5171. },
  5172. "model": {
  5173. "type": "object",
  5174. "properties": {
  5175. "id": {
  5176. "type": "string"
  5177. },
  5178. "providerID": {
  5179. "type": "string"
  5180. },
  5181. "variant": {
  5182. "type": "string"
  5183. }
  5184. },
  5185. "required": ["id", "providerID"],
  5186. "additionalProperties": false
  5187. },
  5188. "permission": {
  5189. "$ref": "#/components/schemas/PermissionRuleset"
  5190. },
  5191. "workspaceID": {
  5192. "type": "string",
  5193. "pattern": "^wrk"
  5194. }
  5195. },
  5196. "additionalProperties": false
  5197. }
  5198. }
  5199. }
  5200. },
  5201. "x-codeSamples": [
  5202. {
  5203. "lang": "js",
  5204. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5205. }
  5206. ]
  5207. }
  5208. },
  5209. "/session/status": {
  5210. "get": {
  5211. "tags": ["session"],
  5212. "operationId": "session.status",
  5213. "parameters": [
  5214. {
  5215. "name": "directory",
  5216. "in": "query",
  5217. "schema": {
  5218. "type": "string"
  5219. },
  5220. "required": false
  5221. },
  5222. {
  5223. "name": "workspace",
  5224. "in": "query",
  5225. "schema": {
  5226. "type": "string"
  5227. },
  5228. "required": false
  5229. }
  5230. ],
  5231. "responses": {
  5232. "200": {
  5233. "description": "Get session status",
  5234. "content": {
  5235. "application/json": {
  5236. "schema": {
  5237. "type": "object",
  5238. "additionalProperties": {
  5239. "$ref": "#/components/schemas/SessionStatus"
  5240. },
  5241. "description": "Get session status"
  5242. }
  5243. }
  5244. }
  5245. },
  5246. "400": {
  5247. "description": "BadRequest | InvalidRequestError",
  5248. "content": {
  5249. "application/json": {
  5250. "schema": {
  5251. "anyOf": [
  5252. {
  5253. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5254. },
  5255. {
  5256. "$ref": "#/components/schemas/InvalidRequestError"
  5257. }
  5258. ]
  5259. }
  5260. }
  5261. }
  5262. }
  5263. },
  5264. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5265. "summary": "Get session status",
  5266. "x-codeSamples": [
  5267. {
  5268. "lang": "js",
  5269. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5270. }
  5271. ]
  5272. }
  5273. },
  5274. "/session/{sessionID}": {
  5275. "get": {
  5276. "tags": ["session"],
  5277. "operationId": "session.get",
  5278. "parameters": [
  5279. {
  5280. "name": "sessionID",
  5281. "in": "path",
  5282. "schema": {
  5283. "type": "string",
  5284. "pattern": "^ses"
  5285. },
  5286. "required": true
  5287. },
  5288. {
  5289. "name": "directory",
  5290. "in": "query",
  5291. "schema": {
  5292. "type": "string"
  5293. },
  5294. "required": false
  5295. },
  5296. {
  5297. "name": "workspace",
  5298. "in": "query",
  5299. "schema": {
  5300. "type": "string"
  5301. },
  5302. "required": false
  5303. }
  5304. ],
  5305. "responses": {
  5306. "200": {
  5307. "description": "Get session",
  5308. "content": {
  5309. "application/json": {
  5310. "schema": {
  5311. "$ref": "#/components/schemas/Session"
  5312. }
  5313. }
  5314. }
  5315. },
  5316. "400": {
  5317. "description": "BadRequest | InvalidRequestError",
  5318. "content": {
  5319. "application/json": {
  5320. "schema": {
  5321. "anyOf": [
  5322. {
  5323. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5324. },
  5325. {
  5326. "$ref": "#/components/schemas/InvalidRequestError"
  5327. }
  5328. ]
  5329. }
  5330. }
  5331. }
  5332. },
  5333. "404": {
  5334. "description": "NotFoundError",
  5335. "content": {
  5336. "application/json": {
  5337. "schema": {
  5338. "$ref": "#/components/schemas/NotFoundError"
  5339. }
  5340. }
  5341. }
  5342. }
  5343. },
  5344. "description": "Retrieve detailed information about a specific OpenCode session.",
  5345. "summary": "Get session",
  5346. "x-codeSamples": [
  5347. {
  5348. "lang": "js",
  5349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5350. }
  5351. ]
  5352. },
  5353. "delete": {
  5354. "tags": ["session"],
  5355. "operationId": "session.delete",
  5356. "parameters": [
  5357. {
  5358. "name": "sessionID",
  5359. "in": "path",
  5360. "schema": {
  5361. "type": "string",
  5362. "pattern": "^ses"
  5363. },
  5364. "required": true
  5365. },
  5366. {
  5367. "name": "directory",
  5368. "in": "query",
  5369. "schema": {
  5370. "type": "string"
  5371. },
  5372. "required": false
  5373. },
  5374. {
  5375. "name": "workspace",
  5376. "in": "query",
  5377. "schema": {
  5378. "type": "string"
  5379. },
  5380. "required": false
  5381. }
  5382. ],
  5383. "responses": {
  5384. "200": {
  5385. "description": "Successfully deleted session",
  5386. "content": {
  5387. "application/json": {
  5388. "schema": {
  5389. "type": "boolean",
  5390. "description": "Successfully deleted session"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "400": {
  5396. "description": "BadRequest | InvalidRequestError",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "anyOf": [
  5401. {
  5402. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5403. },
  5404. {
  5405. "$ref": "#/components/schemas/InvalidRequestError"
  5406. }
  5407. ]
  5408. }
  5409. }
  5410. }
  5411. },
  5412. "404": {
  5413. "description": "NotFoundError",
  5414. "content": {
  5415. "application/json": {
  5416. "schema": {
  5417. "$ref": "#/components/schemas/NotFoundError"
  5418. }
  5419. }
  5420. }
  5421. }
  5422. },
  5423. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5424. "summary": "Delete session",
  5425. "x-codeSamples": [
  5426. {
  5427. "lang": "js",
  5428. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5429. }
  5430. ]
  5431. },
  5432. "patch": {
  5433. "tags": ["session"],
  5434. "operationId": "session.update",
  5435. "parameters": [
  5436. {
  5437. "name": "sessionID",
  5438. "in": "path",
  5439. "schema": {
  5440. "type": "string",
  5441. "pattern": "^ses"
  5442. },
  5443. "required": true
  5444. },
  5445. {
  5446. "name": "directory",
  5447. "in": "query",
  5448. "schema": {
  5449. "type": "string"
  5450. },
  5451. "required": false
  5452. },
  5453. {
  5454. "name": "workspace",
  5455. "in": "query",
  5456. "schema": {
  5457. "type": "string"
  5458. },
  5459. "required": false
  5460. }
  5461. ],
  5462. "responses": {
  5463. "200": {
  5464. "description": "Successfully updated session",
  5465. "content": {
  5466. "application/json": {
  5467. "schema": {
  5468. "$ref": "#/components/schemas/Session"
  5469. }
  5470. }
  5471. }
  5472. },
  5473. "400": {
  5474. "description": "BadRequest | InvalidRequestError",
  5475. "content": {
  5476. "application/json": {
  5477. "schema": {
  5478. "anyOf": [
  5479. {
  5480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5481. },
  5482. {
  5483. "$ref": "#/components/schemas/InvalidRequestError"
  5484. }
  5485. ]
  5486. }
  5487. }
  5488. }
  5489. },
  5490. "404": {
  5491. "description": "NotFoundError",
  5492. "content": {
  5493. "application/json": {
  5494. "schema": {
  5495. "$ref": "#/components/schemas/NotFoundError"
  5496. }
  5497. }
  5498. }
  5499. }
  5500. },
  5501. "description": "Update properties of an existing session, such as title or other metadata.",
  5502. "summary": "Update session",
  5503. "requestBody": {
  5504. "content": {
  5505. "application/json": {
  5506. "schema": {
  5507. "type": "object",
  5508. "properties": {
  5509. "title": {
  5510. "type": "string"
  5511. },
  5512. "permission": {
  5513. "$ref": "#/components/schemas/PermissionRuleset"
  5514. },
  5515. "time": {
  5516. "type": "object",
  5517. "properties": {
  5518. "archived": {
  5519. "type": "number"
  5520. }
  5521. },
  5522. "additionalProperties": false
  5523. }
  5524. },
  5525. "additionalProperties": false
  5526. }
  5527. }
  5528. }
  5529. },
  5530. "x-codeSamples": [
  5531. {
  5532. "lang": "js",
  5533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5534. }
  5535. ]
  5536. }
  5537. },
  5538. "/session/{sessionID}/children": {
  5539. "get": {
  5540. "tags": ["session"],
  5541. "operationId": "session.children",
  5542. "parameters": [
  5543. {
  5544. "name": "sessionID",
  5545. "in": "path",
  5546. "schema": {
  5547. "type": "string",
  5548. "pattern": "^ses"
  5549. },
  5550. "required": true
  5551. },
  5552. {
  5553. "name": "directory",
  5554. "in": "query",
  5555. "schema": {
  5556. "type": "string"
  5557. },
  5558. "required": false
  5559. },
  5560. {
  5561. "name": "workspace",
  5562. "in": "query",
  5563. "schema": {
  5564. "type": "string"
  5565. },
  5566. "required": false
  5567. }
  5568. ],
  5569. "responses": {
  5570. "200": {
  5571. "description": "List of children",
  5572. "content": {
  5573. "application/json": {
  5574. "schema": {
  5575. "type": "array",
  5576. "items": {
  5577. "$ref": "#/components/schemas/Session"
  5578. },
  5579. "description": "List of children"
  5580. }
  5581. }
  5582. }
  5583. },
  5584. "400": {
  5585. "description": "BadRequest | InvalidRequestError",
  5586. "content": {
  5587. "application/json": {
  5588. "schema": {
  5589. "anyOf": [
  5590. {
  5591. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5592. },
  5593. {
  5594. "$ref": "#/components/schemas/InvalidRequestError"
  5595. }
  5596. ]
  5597. }
  5598. }
  5599. }
  5600. },
  5601. "404": {
  5602. "description": "NotFoundError",
  5603. "content": {
  5604. "application/json": {
  5605. "schema": {
  5606. "$ref": "#/components/schemas/NotFoundError"
  5607. }
  5608. }
  5609. }
  5610. }
  5611. },
  5612. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5613. "summary": "Get session children",
  5614. "x-codeSamples": [
  5615. {
  5616. "lang": "js",
  5617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5618. }
  5619. ]
  5620. }
  5621. },
  5622. "/session/{sessionID}/todo": {
  5623. "get": {
  5624. "tags": ["session"],
  5625. "operationId": "session.todo",
  5626. "parameters": [
  5627. {
  5628. "name": "sessionID",
  5629. "in": "path",
  5630. "schema": {
  5631. "type": "string",
  5632. "pattern": "^ses"
  5633. },
  5634. "required": true
  5635. },
  5636. {
  5637. "name": "directory",
  5638. "in": "query",
  5639. "schema": {
  5640. "type": "string"
  5641. },
  5642. "required": false
  5643. },
  5644. {
  5645. "name": "workspace",
  5646. "in": "query",
  5647. "schema": {
  5648. "type": "string"
  5649. },
  5650. "required": false
  5651. }
  5652. ],
  5653. "responses": {
  5654. "200": {
  5655. "description": "Todo list",
  5656. "content": {
  5657. "application/json": {
  5658. "schema": {
  5659. "type": "array",
  5660. "items": {
  5661. "$ref": "#/components/schemas/Todo"
  5662. },
  5663. "description": "Todo list"
  5664. }
  5665. }
  5666. }
  5667. },
  5668. "400": {
  5669. "description": "BadRequest | InvalidRequestError",
  5670. "content": {
  5671. "application/json": {
  5672. "schema": {
  5673. "anyOf": [
  5674. {
  5675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5676. },
  5677. {
  5678. "$ref": "#/components/schemas/InvalidRequestError"
  5679. }
  5680. ]
  5681. }
  5682. }
  5683. }
  5684. },
  5685. "404": {
  5686. "description": "NotFoundError",
  5687. "content": {
  5688. "application/json": {
  5689. "schema": {
  5690. "$ref": "#/components/schemas/NotFoundError"
  5691. }
  5692. }
  5693. }
  5694. }
  5695. },
  5696. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5697. "summary": "Get session todos",
  5698. "x-codeSamples": [
  5699. {
  5700. "lang": "js",
  5701. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5702. }
  5703. ]
  5704. }
  5705. },
  5706. "/session/{sessionID}/diff": {
  5707. "get": {
  5708. "tags": ["session"],
  5709. "operationId": "session.diff",
  5710. "parameters": [
  5711. {
  5712. "name": "sessionID",
  5713. "in": "path",
  5714. "schema": {
  5715. "type": "string",
  5716. "pattern": "^ses"
  5717. },
  5718. "required": true
  5719. },
  5720. {
  5721. "name": "directory",
  5722. "in": "query",
  5723. "schema": {
  5724. "type": "string"
  5725. },
  5726. "required": false
  5727. },
  5728. {
  5729. "name": "workspace",
  5730. "in": "query",
  5731. "schema": {
  5732. "type": "string"
  5733. },
  5734. "required": false
  5735. },
  5736. {
  5737. "name": "messageID",
  5738. "in": "query",
  5739. "schema": {
  5740. "type": "string",
  5741. "pattern": "^msg"
  5742. },
  5743. "required": false
  5744. }
  5745. ],
  5746. "responses": {
  5747. "200": {
  5748. "description": "Successfully retrieved diff",
  5749. "content": {
  5750. "application/json": {
  5751. "schema": {
  5752. "type": "array",
  5753. "items": {
  5754. "$ref": "#/components/schemas/SnapshotFileDiff"
  5755. },
  5756. "description": "Successfully retrieved diff"
  5757. }
  5758. }
  5759. }
  5760. },
  5761. "400": {
  5762. "description": "Bad request",
  5763. "content": {
  5764. "application/json": {
  5765. "schema": {
  5766. "$ref": "#/components/schemas/BadRequestError"
  5767. }
  5768. }
  5769. }
  5770. }
  5771. },
  5772. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5773. "summary": "Get message diff",
  5774. "x-codeSamples": [
  5775. {
  5776. "lang": "js",
  5777. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5778. }
  5779. ]
  5780. }
  5781. },
  5782. "/session/{sessionID}/message": {
  5783. "get": {
  5784. "tags": ["session"],
  5785. "operationId": "session.messages",
  5786. "parameters": [
  5787. {
  5788. "name": "sessionID",
  5789. "in": "path",
  5790. "schema": {
  5791. "type": "string",
  5792. "pattern": "^ses"
  5793. },
  5794. "required": true
  5795. },
  5796. {
  5797. "name": "directory",
  5798. "in": "query",
  5799. "schema": {
  5800. "type": "string"
  5801. },
  5802. "required": false
  5803. },
  5804. {
  5805. "name": "workspace",
  5806. "in": "query",
  5807. "schema": {
  5808. "type": "string"
  5809. },
  5810. "required": false
  5811. },
  5812. {
  5813. "name": "limit",
  5814. "in": "query",
  5815. "schema": {
  5816. "type": "integer",
  5817. "minimum": 0,
  5818. "maximum": 9007199254740991
  5819. },
  5820. "required": false
  5821. },
  5822. {
  5823. "name": "before",
  5824. "in": "query",
  5825. "schema": {
  5826. "type": "string"
  5827. },
  5828. "required": false
  5829. }
  5830. ],
  5831. "responses": {
  5832. "200": {
  5833. "description": "List of messages",
  5834. "content": {
  5835. "application/json": {
  5836. "schema": {
  5837. "type": "array",
  5838. "items": {
  5839. "type": "object",
  5840. "properties": {
  5841. "info": {
  5842. "$ref": "#/components/schemas/Message"
  5843. },
  5844. "parts": {
  5845. "type": "array",
  5846. "items": {
  5847. "$ref": "#/components/schemas/Part"
  5848. }
  5849. }
  5850. },
  5851. "required": ["info", "parts"],
  5852. "additionalProperties": false
  5853. },
  5854. "description": "List of messages"
  5855. }
  5856. }
  5857. }
  5858. },
  5859. "400": {
  5860. "description": "BadRequest | InvalidRequestError",
  5861. "content": {
  5862. "application/json": {
  5863. "schema": {
  5864. "anyOf": [
  5865. {
  5866. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5867. },
  5868. {
  5869. "$ref": "#/components/schemas/InvalidRequestError"
  5870. }
  5871. ]
  5872. }
  5873. }
  5874. }
  5875. },
  5876. "404": {
  5877. "description": "NotFoundError",
  5878. "content": {
  5879. "application/json": {
  5880. "schema": {
  5881. "$ref": "#/components/schemas/NotFoundError"
  5882. }
  5883. }
  5884. }
  5885. }
  5886. },
  5887. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5888. "summary": "Get session messages",
  5889. "x-codeSamples": [
  5890. {
  5891. "lang": "js",
  5892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5893. }
  5894. ]
  5895. },
  5896. "post": {
  5897. "tags": ["session"],
  5898. "operationId": "session.prompt",
  5899. "parameters": [
  5900. {
  5901. "name": "sessionID",
  5902. "in": "path",
  5903. "schema": {
  5904. "type": "string",
  5905. "pattern": "^ses"
  5906. },
  5907. "required": true
  5908. },
  5909. {
  5910. "name": "directory",
  5911. "in": "query",
  5912. "schema": {
  5913. "type": "string"
  5914. },
  5915. "required": false
  5916. },
  5917. {
  5918. "name": "workspace",
  5919. "in": "query",
  5920. "schema": {
  5921. "type": "string"
  5922. },
  5923. "required": false
  5924. }
  5925. ],
  5926. "responses": {
  5927. "200": {
  5928. "description": "Created message",
  5929. "content": {
  5930. "application/json": {
  5931. "schema": {
  5932. "type": "object",
  5933. "required": ["info", "parts"],
  5934. "properties": {
  5935. "info": {
  5936. "$ref": "#/components/schemas/AssistantMessage"
  5937. },
  5938. "parts": {
  5939. "type": "array",
  5940. "items": {
  5941. "$ref": "#/components/schemas/Part"
  5942. }
  5943. }
  5944. }
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "400": {
  5950. "description": "BadRequest | InvalidRequestError",
  5951. "content": {
  5952. "application/json": {
  5953. "schema": {
  5954. "anyOf": [
  5955. {
  5956. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5957. },
  5958. {
  5959. "$ref": "#/components/schemas/InvalidRequestError"
  5960. }
  5961. ]
  5962. }
  5963. }
  5964. }
  5965. },
  5966. "404": {
  5967. "description": "NotFoundError",
  5968. "content": {
  5969. "application/json": {
  5970. "schema": {
  5971. "$ref": "#/components/schemas/NotFoundError"
  5972. }
  5973. }
  5974. }
  5975. }
  5976. },
  5977. "description": "Create and send a new message to a session, streaming the AI response.",
  5978. "summary": "Send message",
  5979. "requestBody": {
  5980. "content": {
  5981. "application/json": {
  5982. "schema": {
  5983. "type": "object",
  5984. "properties": {
  5985. "messageID": {
  5986. "type": "string",
  5987. "pattern": "^msg"
  5988. },
  5989. "model": {
  5990. "type": "object",
  5991. "properties": {
  5992. "providerID": {
  5993. "type": "string"
  5994. },
  5995. "modelID": {
  5996. "type": "string"
  5997. }
  5998. },
  5999. "required": ["providerID", "modelID"],
  6000. "additionalProperties": false
  6001. },
  6002. "agent": {
  6003. "type": "string"
  6004. },
  6005. "noReply": {
  6006. "type": "boolean"
  6007. },
  6008. "tools": {
  6009. "type": "object",
  6010. "additionalProperties": {
  6011. "type": "boolean"
  6012. }
  6013. },
  6014. "format": {
  6015. "$ref": "#/components/schemas/OutputFormat"
  6016. },
  6017. "system": {
  6018. "type": "string"
  6019. },
  6020. "variant": {
  6021. "type": "string"
  6022. },
  6023. "parts": {
  6024. "type": "array",
  6025. "items": {
  6026. "anyOf": [
  6027. {
  6028. "$ref": "#/components/schemas/TextPartInput"
  6029. },
  6030. {
  6031. "$ref": "#/components/schemas/FilePartInput"
  6032. },
  6033. {
  6034. "$ref": "#/components/schemas/AgentPartInput"
  6035. },
  6036. {
  6037. "$ref": "#/components/schemas/SubtaskPartInput"
  6038. }
  6039. ]
  6040. }
  6041. }
  6042. },
  6043. "required": ["parts"],
  6044. "additionalProperties": false
  6045. }
  6046. }
  6047. }
  6048. },
  6049. "x-codeSamples": [
  6050. {
  6051. "lang": "js",
  6052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6053. }
  6054. ]
  6055. }
  6056. },
  6057. "/session/{sessionID}/message/{messageID}": {
  6058. "get": {
  6059. "tags": ["session"],
  6060. "operationId": "session.message",
  6061. "parameters": [
  6062. {
  6063. "name": "sessionID",
  6064. "in": "path",
  6065. "schema": {
  6066. "type": "string",
  6067. "pattern": "^ses"
  6068. },
  6069. "required": true
  6070. },
  6071. {
  6072. "name": "messageID",
  6073. "in": "path",
  6074. "schema": {
  6075. "type": "string",
  6076. "pattern": "^msg"
  6077. },
  6078. "required": true
  6079. },
  6080. {
  6081. "name": "directory",
  6082. "in": "query",
  6083. "schema": {
  6084. "type": "string"
  6085. },
  6086. "required": false
  6087. },
  6088. {
  6089. "name": "workspace",
  6090. "in": "query",
  6091. "schema": {
  6092. "type": "string"
  6093. },
  6094. "required": false
  6095. }
  6096. ],
  6097. "responses": {
  6098. "200": {
  6099. "description": "Message",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "type": "object",
  6104. "properties": {
  6105. "info": {
  6106. "$ref": "#/components/schemas/Message"
  6107. },
  6108. "parts": {
  6109. "type": "array",
  6110. "items": {
  6111. "$ref": "#/components/schemas/Part"
  6112. }
  6113. }
  6114. },
  6115. "required": ["info", "parts"],
  6116. "additionalProperties": false,
  6117. "description": "Message"
  6118. }
  6119. }
  6120. }
  6121. },
  6122. "400": {
  6123. "description": "BadRequest | InvalidRequestError",
  6124. "content": {
  6125. "application/json": {
  6126. "schema": {
  6127. "anyOf": [
  6128. {
  6129. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6130. },
  6131. {
  6132. "$ref": "#/components/schemas/InvalidRequestError"
  6133. }
  6134. ]
  6135. }
  6136. }
  6137. }
  6138. },
  6139. "404": {
  6140. "description": "NotFoundError",
  6141. "content": {
  6142. "application/json": {
  6143. "schema": {
  6144. "$ref": "#/components/schemas/NotFoundError"
  6145. }
  6146. }
  6147. }
  6148. }
  6149. },
  6150. "description": "Retrieve a specific message from a session by its message ID.",
  6151. "summary": "Get message",
  6152. "x-codeSamples": [
  6153. {
  6154. "lang": "js",
  6155. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6156. }
  6157. ]
  6158. },
  6159. "delete": {
  6160. "tags": ["session"],
  6161. "operationId": "session.deleteMessage",
  6162. "parameters": [
  6163. {
  6164. "name": "sessionID",
  6165. "in": "path",
  6166. "schema": {
  6167. "type": "string",
  6168. "pattern": "^ses"
  6169. },
  6170. "required": true
  6171. },
  6172. {
  6173. "name": "messageID",
  6174. "in": "path",
  6175. "schema": {
  6176. "type": "string",
  6177. "pattern": "^msg"
  6178. },
  6179. "required": true
  6180. },
  6181. {
  6182. "name": "directory",
  6183. "in": "query",
  6184. "schema": {
  6185. "type": "string"
  6186. },
  6187. "required": false
  6188. },
  6189. {
  6190. "name": "workspace",
  6191. "in": "query",
  6192. "schema": {
  6193. "type": "string"
  6194. },
  6195. "required": false
  6196. }
  6197. ],
  6198. "responses": {
  6199. "200": {
  6200. "description": "Successfully deleted message",
  6201. "content": {
  6202. "application/json": {
  6203. "schema": {
  6204. "type": "boolean",
  6205. "description": "Successfully deleted message"
  6206. }
  6207. }
  6208. }
  6209. },
  6210. "400": {
  6211. "description": "BadRequest | InvalidRequestError",
  6212. "content": {
  6213. "application/json": {
  6214. "schema": {
  6215. "anyOf": [
  6216. {
  6217. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6218. },
  6219. {
  6220. "$ref": "#/components/schemas/InvalidRequestError"
  6221. }
  6222. ]
  6223. }
  6224. }
  6225. }
  6226. },
  6227. "404": {
  6228. "description": "NotFoundError",
  6229. "content": {
  6230. "application/json": {
  6231. "schema": {
  6232. "$ref": "#/components/schemas/NotFoundError"
  6233. }
  6234. }
  6235. }
  6236. },
  6237. "409": {
  6238. "description": "SessionBusyError",
  6239. "content": {
  6240. "application/json": {
  6241. "schema": {
  6242. "$ref": "#/components/schemas/SessionBusyError"
  6243. }
  6244. }
  6245. }
  6246. }
  6247. },
  6248. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6249. "summary": "Delete message",
  6250. "x-codeSamples": [
  6251. {
  6252. "lang": "js",
  6253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6254. }
  6255. ]
  6256. }
  6257. },
  6258. "/session/{sessionID}/fork": {
  6259. "post": {
  6260. "tags": ["session"],
  6261. "operationId": "session.fork",
  6262. "parameters": [
  6263. {
  6264. "name": "sessionID",
  6265. "in": "path",
  6266. "schema": {
  6267. "type": "string",
  6268. "pattern": "^ses"
  6269. },
  6270. "required": true
  6271. },
  6272. {
  6273. "name": "directory",
  6274. "in": "query",
  6275. "schema": {
  6276. "type": "string"
  6277. },
  6278. "required": false
  6279. },
  6280. {
  6281. "name": "workspace",
  6282. "in": "query",
  6283. "schema": {
  6284. "type": "string"
  6285. },
  6286. "required": false
  6287. }
  6288. ],
  6289. "responses": {
  6290. "200": {
  6291. "description": "200",
  6292. "content": {
  6293. "application/json": {
  6294. "schema": {
  6295. "$ref": "#/components/schemas/Session"
  6296. }
  6297. }
  6298. }
  6299. },
  6300. "400": {
  6301. "description": "BadRequest | InvalidRequestError",
  6302. "content": {
  6303. "application/json": {
  6304. "schema": {
  6305. "anyOf": [
  6306. {
  6307. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6308. },
  6309. {
  6310. "$ref": "#/components/schemas/InvalidRequestError"
  6311. }
  6312. ]
  6313. }
  6314. }
  6315. }
  6316. },
  6317. "404": {
  6318. "description": "NotFoundError",
  6319. "content": {
  6320. "application/json": {
  6321. "schema": {
  6322. "$ref": "#/components/schemas/NotFoundError"
  6323. }
  6324. }
  6325. }
  6326. }
  6327. },
  6328. "description": "Create a new session by forking an existing session at a specific message point.",
  6329. "summary": "Fork session",
  6330. "requestBody": {
  6331. "content": {
  6332. "application/json": {
  6333. "schema": {
  6334. "type": "object",
  6335. "properties": {
  6336. "messageID": {
  6337. "type": "string",
  6338. "pattern": "^msg"
  6339. }
  6340. },
  6341. "additionalProperties": false
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "x-codeSamples": [
  6347. {
  6348. "lang": "js",
  6349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6350. }
  6351. ]
  6352. }
  6353. },
  6354. "/session/{sessionID}/abort": {
  6355. "post": {
  6356. "tags": ["session"],
  6357. "operationId": "session.abort",
  6358. "parameters": [
  6359. {
  6360. "name": "sessionID",
  6361. "in": "path",
  6362. "schema": {
  6363. "type": "string",
  6364. "pattern": "^ses"
  6365. },
  6366. "required": true
  6367. },
  6368. {
  6369. "name": "directory",
  6370. "in": "query",
  6371. "schema": {
  6372. "type": "string"
  6373. },
  6374. "required": false
  6375. },
  6376. {
  6377. "name": "workspace",
  6378. "in": "query",
  6379. "schema": {
  6380. "type": "string"
  6381. },
  6382. "required": false
  6383. }
  6384. ],
  6385. "responses": {
  6386. "200": {
  6387. "description": "Aborted session",
  6388. "content": {
  6389. "application/json": {
  6390. "schema": {
  6391. "type": "boolean",
  6392. "description": "Aborted session"
  6393. }
  6394. }
  6395. }
  6396. },
  6397. "400": {
  6398. "description": "BadRequest | InvalidRequestError",
  6399. "content": {
  6400. "application/json": {
  6401. "schema": {
  6402. "anyOf": [
  6403. {
  6404. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6405. },
  6406. {
  6407. "$ref": "#/components/schemas/InvalidRequestError"
  6408. }
  6409. ]
  6410. }
  6411. }
  6412. }
  6413. }
  6414. },
  6415. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6416. "summary": "Abort session",
  6417. "x-codeSamples": [
  6418. {
  6419. "lang": "js",
  6420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6421. }
  6422. ]
  6423. }
  6424. },
  6425. "/session/{sessionID}/init": {
  6426. "post": {
  6427. "tags": ["session"],
  6428. "operationId": "session.init",
  6429. "parameters": [
  6430. {
  6431. "name": "sessionID",
  6432. "in": "path",
  6433. "schema": {
  6434. "type": "string",
  6435. "pattern": "^ses"
  6436. },
  6437. "required": true
  6438. },
  6439. {
  6440. "name": "directory",
  6441. "in": "query",
  6442. "schema": {
  6443. "type": "string"
  6444. },
  6445. "required": false
  6446. },
  6447. {
  6448. "name": "workspace",
  6449. "in": "query",
  6450. "schema": {
  6451. "type": "string"
  6452. },
  6453. "required": false
  6454. }
  6455. ],
  6456. "responses": {
  6457. "200": {
  6458. "description": "200",
  6459. "content": {
  6460. "application/json": {
  6461. "schema": {
  6462. "type": "boolean",
  6463. "description": "200"
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "400": {
  6469. "description": "BadRequest | InvalidRequestError",
  6470. "content": {
  6471. "application/json": {
  6472. "schema": {
  6473. "anyOf": [
  6474. {
  6475. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6476. },
  6477. {
  6478. "$ref": "#/components/schemas/InvalidRequestError"
  6479. }
  6480. ]
  6481. }
  6482. }
  6483. }
  6484. },
  6485. "404": {
  6486. "description": "NotFoundError",
  6487. "content": {
  6488. "application/json": {
  6489. "schema": {
  6490. "$ref": "#/components/schemas/NotFoundError"
  6491. }
  6492. }
  6493. }
  6494. }
  6495. },
  6496. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6497. "summary": "Initialize session",
  6498. "requestBody": {
  6499. "content": {
  6500. "application/json": {
  6501. "schema": {
  6502. "type": "object",
  6503. "properties": {
  6504. "modelID": {
  6505. "type": "string"
  6506. },
  6507. "providerID": {
  6508. "type": "string"
  6509. },
  6510. "messageID": {
  6511. "type": "string",
  6512. "pattern": "^msg"
  6513. }
  6514. },
  6515. "required": ["modelID", "providerID", "messageID"],
  6516. "additionalProperties": false
  6517. }
  6518. }
  6519. }
  6520. },
  6521. "x-codeSamples": [
  6522. {
  6523. "lang": "js",
  6524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6525. }
  6526. ]
  6527. }
  6528. },
  6529. "/session/{sessionID}/share": {
  6530. "post": {
  6531. "tags": ["session"],
  6532. "operationId": "session.share",
  6533. "parameters": [
  6534. {
  6535. "name": "sessionID",
  6536. "in": "path",
  6537. "schema": {
  6538. "type": "string",
  6539. "pattern": "^ses"
  6540. },
  6541. "required": true
  6542. },
  6543. {
  6544. "name": "directory",
  6545. "in": "query",
  6546. "schema": {
  6547. "type": "string"
  6548. },
  6549. "required": false
  6550. },
  6551. {
  6552. "name": "workspace",
  6553. "in": "query",
  6554. "schema": {
  6555. "type": "string"
  6556. },
  6557. "required": false
  6558. }
  6559. ],
  6560. "responses": {
  6561. "200": {
  6562. "description": "Successfully shared session",
  6563. "content": {
  6564. "application/json": {
  6565. "schema": {
  6566. "$ref": "#/components/schemas/Session"
  6567. }
  6568. }
  6569. }
  6570. },
  6571. "400": {
  6572. "description": "Bad request",
  6573. "content": {
  6574. "application/json": {
  6575. "schema": {
  6576. "$ref": "#/components/schemas/BadRequestError"
  6577. }
  6578. }
  6579. }
  6580. },
  6581. "404": {
  6582. "description": "NotFoundError",
  6583. "content": {
  6584. "application/json": {
  6585. "schema": {
  6586. "$ref": "#/components/schemas/NotFoundError"
  6587. }
  6588. }
  6589. }
  6590. },
  6591. "500": {
  6592. "description": "InternalServerError",
  6593. "content": {
  6594. "application/json": {
  6595. "schema": {
  6596. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6597. }
  6598. }
  6599. }
  6600. }
  6601. },
  6602. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6603. "summary": "Share session",
  6604. "x-codeSamples": [
  6605. {
  6606. "lang": "js",
  6607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6608. }
  6609. ]
  6610. },
  6611. "delete": {
  6612. "tags": ["session"],
  6613. "operationId": "session.unshare",
  6614. "parameters": [
  6615. {
  6616. "name": "sessionID",
  6617. "in": "path",
  6618. "schema": {
  6619. "type": "string",
  6620. "pattern": "^ses"
  6621. },
  6622. "required": true
  6623. },
  6624. {
  6625. "name": "directory",
  6626. "in": "query",
  6627. "schema": {
  6628. "type": "string"
  6629. },
  6630. "required": false
  6631. },
  6632. {
  6633. "name": "workspace",
  6634. "in": "query",
  6635. "schema": {
  6636. "type": "string"
  6637. },
  6638. "required": false
  6639. }
  6640. ],
  6641. "responses": {
  6642. "200": {
  6643. "description": "Successfully unshared session",
  6644. "content": {
  6645. "application/json": {
  6646. "schema": {
  6647. "$ref": "#/components/schemas/Session"
  6648. }
  6649. }
  6650. }
  6651. },
  6652. "400": {
  6653. "description": "Bad request",
  6654. "content": {
  6655. "application/json": {
  6656. "schema": {
  6657. "$ref": "#/components/schemas/BadRequestError"
  6658. }
  6659. }
  6660. }
  6661. },
  6662. "404": {
  6663. "description": "NotFoundError",
  6664. "content": {
  6665. "application/json": {
  6666. "schema": {
  6667. "$ref": "#/components/schemas/NotFoundError"
  6668. }
  6669. }
  6670. }
  6671. },
  6672. "500": {
  6673. "description": "InternalServerError",
  6674. "content": {
  6675. "application/json": {
  6676. "schema": {
  6677. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6678. }
  6679. }
  6680. }
  6681. }
  6682. },
  6683. "description": "Remove the shareable link for a session, making it private again.",
  6684. "summary": "Unshare session",
  6685. "x-codeSamples": [
  6686. {
  6687. "lang": "js",
  6688. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6689. }
  6690. ]
  6691. }
  6692. },
  6693. "/session/{sessionID}/summarize": {
  6694. "post": {
  6695. "tags": ["session"],
  6696. "operationId": "session.summarize",
  6697. "parameters": [
  6698. {
  6699. "name": "sessionID",
  6700. "in": "path",
  6701. "schema": {
  6702. "type": "string",
  6703. "pattern": "^ses"
  6704. },
  6705. "required": true
  6706. },
  6707. {
  6708. "name": "directory",
  6709. "in": "query",
  6710. "schema": {
  6711. "type": "string"
  6712. },
  6713. "required": false
  6714. },
  6715. {
  6716. "name": "workspace",
  6717. "in": "query",
  6718. "schema": {
  6719. "type": "string"
  6720. },
  6721. "required": false
  6722. }
  6723. ],
  6724. "responses": {
  6725. "200": {
  6726. "description": "Summarized session",
  6727. "content": {
  6728. "application/json": {
  6729. "schema": {
  6730. "type": "boolean",
  6731. "description": "Summarized session"
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "400": {
  6737. "description": "BadRequest | InvalidRequestError",
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "anyOf": [
  6742. {
  6743. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6744. },
  6745. {
  6746. "$ref": "#/components/schemas/InvalidRequestError"
  6747. }
  6748. ]
  6749. }
  6750. }
  6751. }
  6752. },
  6753. "404": {
  6754. "description": "NotFoundError",
  6755. "content": {
  6756. "application/json": {
  6757. "schema": {
  6758. "$ref": "#/components/schemas/NotFoundError"
  6759. }
  6760. }
  6761. }
  6762. }
  6763. },
  6764. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6765. "summary": "Summarize session",
  6766. "requestBody": {
  6767. "content": {
  6768. "application/json": {
  6769. "schema": {
  6770. "type": "object",
  6771. "properties": {
  6772. "providerID": {
  6773. "type": "string"
  6774. },
  6775. "modelID": {
  6776. "type": "string"
  6777. },
  6778. "auto": {
  6779. "type": "boolean"
  6780. }
  6781. },
  6782. "required": ["providerID", "modelID"],
  6783. "additionalProperties": false
  6784. }
  6785. }
  6786. }
  6787. },
  6788. "x-codeSamples": [
  6789. {
  6790. "lang": "js",
  6791. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6792. }
  6793. ]
  6794. }
  6795. },
  6796. "/session/{sessionID}/prompt_async": {
  6797. "post": {
  6798. "tags": ["session"],
  6799. "operationId": "session.prompt_async",
  6800. "parameters": [
  6801. {
  6802. "name": "sessionID",
  6803. "in": "path",
  6804. "schema": {
  6805. "type": "string",
  6806. "pattern": "^ses"
  6807. },
  6808. "required": true
  6809. },
  6810. {
  6811. "name": "directory",
  6812. "in": "query",
  6813. "schema": {
  6814. "type": "string"
  6815. },
  6816. "required": false
  6817. },
  6818. {
  6819. "name": "workspace",
  6820. "in": "query",
  6821. "schema": {
  6822. "type": "string"
  6823. },
  6824. "required": false
  6825. }
  6826. ],
  6827. "responses": {
  6828. "204": {
  6829. "description": "Prompt accepted"
  6830. },
  6831. "400": {
  6832. "description": "BadRequest | InvalidRequestError",
  6833. "content": {
  6834. "application/json": {
  6835. "schema": {
  6836. "anyOf": [
  6837. {
  6838. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6839. },
  6840. {
  6841. "$ref": "#/components/schemas/InvalidRequestError"
  6842. }
  6843. ]
  6844. }
  6845. }
  6846. }
  6847. },
  6848. "404": {
  6849. "description": "NotFoundError",
  6850. "content": {
  6851. "application/json": {
  6852. "schema": {
  6853. "$ref": "#/components/schemas/NotFoundError"
  6854. }
  6855. }
  6856. }
  6857. }
  6858. },
  6859. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6860. "summary": "Send async message",
  6861. "requestBody": {
  6862. "content": {
  6863. "application/json": {
  6864. "schema": {
  6865. "type": "object",
  6866. "properties": {
  6867. "messageID": {
  6868. "type": "string",
  6869. "pattern": "^msg"
  6870. },
  6871. "model": {
  6872. "type": "object",
  6873. "properties": {
  6874. "providerID": {
  6875. "type": "string"
  6876. },
  6877. "modelID": {
  6878. "type": "string"
  6879. }
  6880. },
  6881. "required": ["providerID", "modelID"],
  6882. "additionalProperties": false
  6883. },
  6884. "agent": {
  6885. "type": "string"
  6886. },
  6887. "noReply": {
  6888. "type": "boolean"
  6889. },
  6890. "tools": {
  6891. "type": "object",
  6892. "additionalProperties": {
  6893. "type": "boolean"
  6894. }
  6895. },
  6896. "format": {
  6897. "$ref": "#/components/schemas/OutputFormat"
  6898. },
  6899. "system": {
  6900. "type": "string"
  6901. },
  6902. "variant": {
  6903. "type": "string"
  6904. },
  6905. "parts": {
  6906. "type": "array",
  6907. "items": {
  6908. "anyOf": [
  6909. {
  6910. "$ref": "#/components/schemas/TextPartInput"
  6911. },
  6912. {
  6913. "$ref": "#/components/schemas/FilePartInput"
  6914. },
  6915. {
  6916. "$ref": "#/components/schemas/AgentPartInput"
  6917. },
  6918. {
  6919. "$ref": "#/components/schemas/SubtaskPartInput"
  6920. }
  6921. ]
  6922. }
  6923. }
  6924. },
  6925. "required": ["parts"],
  6926. "additionalProperties": false
  6927. }
  6928. }
  6929. }
  6930. },
  6931. "x-codeSamples": [
  6932. {
  6933. "lang": "js",
  6934. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6935. }
  6936. ]
  6937. }
  6938. },
  6939. "/session/{sessionID}/command": {
  6940. "post": {
  6941. "tags": ["session"],
  6942. "operationId": "session.command",
  6943. "parameters": [
  6944. {
  6945. "name": "sessionID",
  6946. "in": "path",
  6947. "schema": {
  6948. "type": "string",
  6949. "pattern": "^ses"
  6950. },
  6951. "required": true
  6952. },
  6953. {
  6954. "name": "directory",
  6955. "in": "query",
  6956. "schema": {
  6957. "type": "string"
  6958. },
  6959. "required": false
  6960. },
  6961. {
  6962. "name": "workspace",
  6963. "in": "query",
  6964. "schema": {
  6965. "type": "string"
  6966. },
  6967. "required": false
  6968. }
  6969. ],
  6970. "responses": {
  6971. "200": {
  6972. "description": "Created message",
  6973. "content": {
  6974. "application/json": {
  6975. "schema": {
  6976. "type": "object",
  6977. "required": ["info", "parts"],
  6978. "properties": {
  6979. "info": {
  6980. "$ref": "#/components/schemas/AssistantMessage"
  6981. },
  6982. "parts": {
  6983. "type": "array",
  6984. "items": {
  6985. "$ref": "#/components/schemas/Part"
  6986. }
  6987. }
  6988. }
  6989. }
  6990. }
  6991. }
  6992. },
  6993. "400": {
  6994. "description": "BadRequest | InvalidRequestError",
  6995. "content": {
  6996. "application/json": {
  6997. "schema": {
  6998. "anyOf": [
  6999. {
  7000. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7001. },
  7002. {
  7003. "$ref": "#/components/schemas/InvalidRequestError"
  7004. }
  7005. ]
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "404": {
  7011. "description": "NotFoundError",
  7012. "content": {
  7013. "application/json": {
  7014. "schema": {
  7015. "$ref": "#/components/schemas/NotFoundError"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. },
  7021. "description": "Send a new command to a session for execution by the AI assistant.",
  7022. "summary": "Send command",
  7023. "requestBody": {
  7024. "content": {
  7025. "application/json": {
  7026. "schema": {
  7027. "type": "object",
  7028. "properties": {
  7029. "messageID": {
  7030. "type": "string",
  7031. "pattern": "^msg"
  7032. },
  7033. "agent": {
  7034. "type": "string"
  7035. },
  7036. "model": {
  7037. "type": "string"
  7038. },
  7039. "arguments": {
  7040. "type": "string"
  7041. },
  7042. "command": {
  7043. "type": "string"
  7044. },
  7045. "variant": {
  7046. "type": "string"
  7047. },
  7048. "parts": {
  7049. "type": "array",
  7050. "items": {
  7051. "type": "object",
  7052. "properties": {
  7053. "id": {
  7054. "type": "string",
  7055. "pattern": "^prt"
  7056. },
  7057. "type": {
  7058. "type": "string",
  7059. "enum": ["file"]
  7060. },
  7061. "mime": {
  7062. "type": "string"
  7063. },
  7064. "filename": {
  7065. "type": "string"
  7066. },
  7067. "url": {
  7068. "type": "string"
  7069. },
  7070. "source": {
  7071. "$ref": "#/components/schemas/FilePartSource"
  7072. }
  7073. },
  7074. "required": ["type", "mime", "url"],
  7075. "additionalProperties": false
  7076. }
  7077. }
  7078. },
  7079. "required": ["arguments", "command"],
  7080. "additionalProperties": false
  7081. }
  7082. }
  7083. }
  7084. },
  7085. "x-codeSamples": [
  7086. {
  7087. "lang": "js",
  7088. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7089. }
  7090. ]
  7091. }
  7092. },
  7093. "/session/{sessionID}/shell": {
  7094. "post": {
  7095. "tags": ["session"],
  7096. "operationId": "session.shell",
  7097. "parameters": [
  7098. {
  7099. "name": "sessionID",
  7100. "in": "path",
  7101. "schema": {
  7102. "type": "string",
  7103. "pattern": "^ses"
  7104. },
  7105. "required": true
  7106. },
  7107. {
  7108. "name": "directory",
  7109. "in": "query",
  7110. "schema": {
  7111. "type": "string"
  7112. },
  7113. "required": false
  7114. },
  7115. {
  7116. "name": "workspace",
  7117. "in": "query",
  7118. "schema": {
  7119. "type": "string"
  7120. },
  7121. "required": false
  7122. }
  7123. ],
  7124. "responses": {
  7125. "200": {
  7126. "description": "Created message",
  7127. "content": {
  7128. "application/json": {
  7129. "schema": {
  7130. "type": "object",
  7131. "properties": {
  7132. "info": {
  7133. "$ref": "#/components/schemas/Message"
  7134. },
  7135. "parts": {
  7136. "type": "array",
  7137. "items": {
  7138. "$ref": "#/components/schemas/Part"
  7139. }
  7140. }
  7141. },
  7142. "required": ["info", "parts"],
  7143. "additionalProperties": false,
  7144. "description": "Created message"
  7145. }
  7146. }
  7147. }
  7148. },
  7149. "400": {
  7150. "description": "BadRequest | InvalidRequestError",
  7151. "content": {
  7152. "application/json": {
  7153. "schema": {
  7154. "anyOf": [
  7155. {
  7156. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7157. },
  7158. {
  7159. "$ref": "#/components/schemas/InvalidRequestError"
  7160. }
  7161. ]
  7162. }
  7163. }
  7164. }
  7165. },
  7166. "404": {
  7167. "description": "NotFoundError",
  7168. "content": {
  7169. "application/json": {
  7170. "schema": {
  7171. "$ref": "#/components/schemas/NotFoundError"
  7172. }
  7173. }
  7174. }
  7175. },
  7176. "409": {
  7177. "description": "SessionBusyError",
  7178. "content": {
  7179. "application/json": {
  7180. "schema": {
  7181. "$ref": "#/components/schemas/SessionBusyError"
  7182. }
  7183. }
  7184. }
  7185. }
  7186. },
  7187. "description": "Execute a shell command within the session context and return the AI's response.",
  7188. "summary": "Run shell command",
  7189. "requestBody": {
  7190. "content": {
  7191. "application/json": {
  7192. "schema": {
  7193. "type": "object",
  7194. "properties": {
  7195. "messageID": {
  7196. "type": "string",
  7197. "pattern": "^msg"
  7198. },
  7199. "agent": {
  7200. "type": "string"
  7201. },
  7202. "model": {
  7203. "type": "object",
  7204. "properties": {
  7205. "providerID": {
  7206. "type": "string"
  7207. },
  7208. "modelID": {
  7209. "type": "string"
  7210. }
  7211. },
  7212. "required": ["providerID", "modelID"],
  7213. "additionalProperties": false
  7214. },
  7215. "command": {
  7216. "type": "string"
  7217. }
  7218. },
  7219. "required": ["agent", "command"],
  7220. "additionalProperties": false
  7221. }
  7222. }
  7223. }
  7224. },
  7225. "x-codeSamples": [
  7226. {
  7227. "lang": "js",
  7228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7229. }
  7230. ]
  7231. }
  7232. },
  7233. "/session/{sessionID}/revert": {
  7234. "post": {
  7235. "tags": ["session"],
  7236. "operationId": "session.revert",
  7237. "parameters": [
  7238. {
  7239. "name": "sessionID",
  7240. "in": "path",
  7241. "schema": {
  7242. "type": "string",
  7243. "pattern": "^ses"
  7244. },
  7245. "required": true
  7246. },
  7247. {
  7248. "name": "directory",
  7249. "in": "query",
  7250. "schema": {
  7251. "type": "string"
  7252. },
  7253. "required": false
  7254. },
  7255. {
  7256. "name": "workspace",
  7257. "in": "query",
  7258. "schema": {
  7259. "type": "string"
  7260. },
  7261. "required": false
  7262. }
  7263. ],
  7264. "responses": {
  7265. "200": {
  7266. "description": "Updated session",
  7267. "content": {
  7268. "application/json": {
  7269. "schema": {
  7270. "$ref": "#/components/schemas/Session"
  7271. }
  7272. }
  7273. }
  7274. },
  7275. "400": {
  7276. "description": "BadRequest | InvalidRequestError",
  7277. "content": {
  7278. "application/json": {
  7279. "schema": {
  7280. "anyOf": [
  7281. {
  7282. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7283. },
  7284. {
  7285. "$ref": "#/components/schemas/InvalidRequestError"
  7286. }
  7287. ]
  7288. }
  7289. }
  7290. }
  7291. },
  7292. "404": {
  7293. "description": "NotFoundError",
  7294. "content": {
  7295. "application/json": {
  7296. "schema": {
  7297. "$ref": "#/components/schemas/NotFoundError"
  7298. }
  7299. }
  7300. }
  7301. },
  7302. "409": {
  7303. "description": "SessionBusyError",
  7304. "content": {
  7305. "application/json": {
  7306. "schema": {
  7307. "$ref": "#/components/schemas/SessionBusyError"
  7308. }
  7309. }
  7310. }
  7311. }
  7312. },
  7313. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7314. "summary": "Revert message",
  7315. "requestBody": {
  7316. "content": {
  7317. "application/json": {
  7318. "schema": {
  7319. "type": "object",
  7320. "properties": {
  7321. "messageID": {
  7322. "type": "string",
  7323. "pattern": "^msg"
  7324. },
  7325. "partID": {
  7326. "type": "string",
  7327. "pattern": "^prt"
  7328. }
  7329. },
  7330. "required": ["messageID"],
  7331. "additionalProperties": false
  7332. }
  7333. }
  7334. }
  7335. },
  7336. "x-codeSamples": [
  7337. {
  7338. "lang": "js",
  7339. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7340. }
  7341. ]
  7342. }
  7343. },
  7344. "/session/{sessionID}/unrevert": {
  7345. "post": {
  7346. "tags": ["session"],
  7347. "operationId": "session.unrevert",
  7348. "parameters": [
  7349. {
  7350. "name": "sessionID",
  7351. "in": "path",
  7352. "schema": {
  7353. "type": "string",
  7354. "pattern": "^ses"
  7355. },
  7356. "required": true
  7357. },
  7358. {
  7359. "name": "directory",
  7360. "in": "query",
  7361. "schema": {
  7362. "type": "string"
  7363. },
  7364. "required": false
  7365. },
  7366. {
  7367. "name": "workspace",
  7368. "in": "query",
  7369. "schema": {
  7370. "type": "string"
  7371. },
  7372. "required": false
  7373. }
  7374. ],
  7375. "responses": {
  7376. "200": {
  7377. "description": "Updated session",
  7378. "content": {
  7379. "application/json": {
  7380. "schema": {
  7381. "$ref": "#/components/schemas/Session"
  7382. }
  7383. }
  7384. }
  7385. },
  7386. "400": {
  7387. "description": "BadRequest | InvalidRequestError",
  7388. "content": {
  7389. "application/json": {
  7390. "schema": {
  7391. "anyOf": [
  7392. {
  7393. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7394. },
  7395. {
  7396. "$ref": "#/components/schemas/InvalidRequestError"
  7397. }
  7398. ]
  7399. }
  7400. }
  7401. }
  7402. },
  7403. "404": {
  7404. "description": "NotFoundError",
  7405. "content": {
  7406. "application/json": {
  7407. "schema": {
  7408. "$ref": "#/components/schemas/NotFoundError"
  7409. }
  7410. }
  7411. }
  7412. },
  7413. "409": {
  7414. "description": "SessionBusyError",
  7415. "content": {
  7416. "application/json": {
  7417. "schema": {
  7418. "$ref": "#/components/schemas/SessionBusyError"
  7419. }
  7420. }
  7421. }
  7422. }
  7423. },
  7424. "description": "Restore all previously reverted messages in a session.",
  7425. "summary": "Restore reverted messages",
  7426. "x-codeSamples": [
  7427. {
  7428. "lang": "js",
  7429. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7430. }
  7431. ]
  7432. }
  7433. },
  7434. "/session/{sessionID}/permissions/{permissionID}": {
  7435. "post": {
  7436. "tags": ["session"],
  7437. "operationId": "permission.respond",
  7438. "parameters": [
  7439. {
  7440. "name": "sessionID",
  7441. "in": "path",
  7442. "schema": {
  7443. "type": "string",
  7444. "pattern": "^ses"
  7445. },
  7446. "required": true
  7447. },
  7448. {
  7449. "name": "permissionID",
  7450. "in": "path",
  7451. "schema": {
  7452. "type": "string",
  7453. "pattern": "^per"
  7454. },
  7455. "required": true
  7456. },
  7457. {
  7458. "name": "directory",
  7459. "in": "query",
  7460. "schema": {
  7461. "type": "string"
  7462. },
  7463. "required": false
  7464. },
  7465. {
  7466. "name": "workspace",
  7467. "in": "query",
  7468. "schema": {
  7469. "type": "string"
  7470. },
  7471. "required": false
  7472. }
  7473. ],
  7474. "responses": {
  7475. "200": {
  7476. "description": "Permission processed successfully",
  7477. "content": {
  7478. "application/json": {
  7479. "schema": {
  7480. "type": "boolean",
  7481. "description": "Permission processed successfully"
  7482. }
  7483. }
  7484. }
  7485. },
  7486. "400": {
  7487. "description": "BadRequest | InvalidRequestError",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "anyOf": [
  7492. {
  7493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7494. },
  7495. {
  7496. "$ref": "#/components/schemas/InvalidRequestError"
  7497. }
  7498. ]
  7499. }
  7500. }
  7501. }
  7502. },
  7503. "404": {
  7504. "description": "NotFoundError | PermissionNotFoundError",
  7505. "content": {
  7506. "application/json": {
  7507. "schema": {
  7508. "anyOf": [
  7509. {
  7510. "$ref": "#/components/schemas/NotFoundError"
  7511. },
  7512. {
  7513. "$ref": "#/components/schemas/PermissionNotFoundError"
  7514. }
  7515. ]
  7516. }
  7517. }
  7518. }
  7519. }
  7520. },
  7521. "description": "Approve or deny a permission request from the AI assistant.",
  7522. "summary": "Respond to permission",
  7523. "deprecated": true,
  7524. "requestBody": {
  7525. "content": {
  7526. "application/json": {
  7527. "schema": {
  7528. "type": "object",
  7529. "properties": {
  7530. "response": {
  7531. "type": "string",
  7532. "enum": ["once", "always", "reject"]
  7533. }
  7534. },
  7535. "required": ["response"],
  7536. "additionalProperties": false
  7537. }
  7538. }
  7539. }
  7540. },
  7541. "x-codeSamples": [
  7542. {
  7543. "lang": "js",
  7544. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7545. }
  7546. ]
  7547. }
  7548. },
  7549. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7550. "delete": {
  7551. "tags": ["session"],
  7552. "operationId": "part.delete",
  7553. "parameters": [
  7554. {
  7555. "name": "sessionID",
  7556. "in": "path",
  7557. "schema": {
  7558. "type": "string",
  7559. "pattern": "^ses"
  7560. },
  7561. "required": true
  7562. },
  7563. {
  7564. "name": "messageID",
  7565. "in": "path",
  7566. "schema": {
  7567. "type": "string",
  7568. "pattern": "^msg"
  7569. },
  7570. "required": true
  7571. },
  7572. {
  7573. "name": "partID",
  7574. "in": "path",
  7575. "schema": {
  7576. "type": "string",
  7577. "pattern": "^prt"
  7578. },
  7579. "required": true
  7580. },
  7581. {
  7582. "name": "directory",
  7583. "in": "query",
  7584. "schema": {
  7585. "type": "string"
  7586. },
  7587. "required": false
  7588. },
  7589. {
  7590. "name": "workspace",
  7591. "in": "query",
  7592. "schema": {
  7593. "type": "string"
  7594. },
  7595. "required": false
  7596. }
  7597. ],
  7598. "responses": {
  7599. "200": {
  7600. "description": "Successfully deleted part",
  7601. "content": {
  7602. "application/json": {
  7603. "schema": {
  7604. "type": "boolean",
  7605. "description": "Successfully deleted part"
  7606. }
  7607. }
  7608. }
  7609. },
  7610. "400": {
  7611. "description": "BadRequest | InvalidRequestError",
  7612. "content": {
  7613. "application/json": {
  7614. "schema": {
  7615. "anyOf": [
  7616. {
  7617. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7618. },
  7619. {
  7620. "$ref": "#/components/schemas/InvalidRequestError"
  7621. }
  7622. ]
  7623. }
  7624. }
  7625. }
  7626. },
  7627. "404": {
  7628. "description": "NotFoundError",
  7629. "content": {
  7630. "application/json": {
  7631. "schema": {
  7632. "$ref": "#/components/schemas/NotFoundError"
  7633. }
  7634. }
  7635. }
  7636. }
  7637. },
  7638. "description": "Delete a part from a message.",
  7639. "x-codeSamples": [
  7640. {
  7641. "lang": "js",
  7642. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7643. }
  7644. ]
  7645. },
  7646. "patch": {
  7647. "tags": ["session"],
  7648. "operationId": "part.update",
  7649. "parameters": [
  7650. {
  7651. "name": "sessionID",
  7652. "in": "path",
  7653. "schema": {
  7654. "type": "string",
  7655. "pattern": "^ses"
  7656. },
  7657. "required": true
  7658. },
  7659. {
  7660. "name": "messageID",
  7661. "in": "path",
  7662. "schema": {
  7663. "type": "string",
  7664. "pattern": "^msg"
  7665. },
  7666. "required": true
  7667. },
  7668. {
  7669. "name": "partID",
  7670. "in": "path",
  7671. "schema": {
  7672. "type": "string",
  7673. "pattern": "^prt"
  7674. },
  7675. "required": true
  7676. },
  7677. {
  7678. "name": "directory",
  7679. "in": "query",
  7680. "schema": {
  7681. "type": "string"
  7682. },
  7683. "required": false
  7684. },
  7685. {
  7686. "name": "workspace",
  7687. "in": "query",
  7688. "schema": {
  7689. "type": "string"
  7690. },
  7691. "required": false
  7692. }
  7693. ],
  7694. "responses": {
  7695. "200": {
  7696. "description": "Successfully updated part",
  7697. "content": {
  7698. "application/json": {
  7699. "schema": {
  7700. "$ref": "#/components/schemas/Part"
  7701. }
  7702. }
  7703. }
  7704. },
  7705. "400": {
  7706. "description": "BadRequest | InvalidRequestError",
  7707. "content": {
  7708. "application/json": {
  7709. "schema": {
  7710. "anyOf": [
  7711. {
  7712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7713. },
  7714. {
  7715. "$ref": "#/components/schemas/InvalidRequestError"
  7716. }
  7717. ]
  7718. }
  7719. }
  7720. }
  7721. },
  7722. "404": {
  7723. "description": "NotFoundError",
  7724. "content": {
  7725. "application/json": {
  7726. "schema": {
  7727. "$ref": "#/components/schemas/NotFoundError"
  7728. }
  7729. }
  7730. }
  7731. }
  7732. },
  7733. "description": "Update a part in a message.",
  7734. "requestBody": {
  7735. "content": {
  7736. "application/json": {
  7737. "schema": {
  7738. "$ref": "#/components/schemas/Part"
  7739. }
  7740. }
  7741. }
  7742. },
  7743. "x-codeSamples": [
  7744. {
  7745. "lang": "js",
  7746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7747. }
  7748. ]
  7749. }
  7750. },
  7751. "/sync/start": {
  7752. "post": {
  7753. "tags": ["sync"],
  7754. "operationId": "sync.start",
  7755. "parameters": [
  7756. {
  7757. "name": "directory",
  7758. "in": "query",
  7759. "schema": {
  7760. "type": "string"
  7761. },
  7762. "required": false
  7763. },
  7764. {
  7765. "name": "workspace",
  7766. "in": "query",
  7767. "schema": {
  7768. "type": "string"
  7769. },
  7770. "required": false
  7771. }
  7772. ],
  7773. "responses": {
  7774. "200": {
  7775. "description": "Workspace sync started",
  7776. "content": {
  7777. "application/json": {
  7778. "schema": {
  7779. "type": "boolean",
  7780. "description": "Workspace sync started"
  7781. }
  7782. }
  7783. }
  7784. },
  7785. "400": {
  7786. "description": "Bad request",
  7787. "content": {
  7788. "application/json": {
  7789. "schema": {
  7790. "$ref": "#/components/schemas/BadRequestError"
  7791. }
  7792. }
  7793. }
  7794. }
  7795. },
  7796. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7797. "summary": "Start workspace sync",
  7798. "x-codeSamples": [
  7799. {
  7800. "lang": "js",
  7801. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7802. }
  7803. ]
  7804. }
  7805. },
  7806. "/sync/replay": {
  7807. "post": {
  7808. "tags": ["sync"],
  7809. "operationId": "sync.replay",
  7810. "parameters": [
  7811. {
  7812. "name": "directory",
  7813. "in": "query",
  7814. "schema": {
  7815. "type": "string"
  7816. },
  7817. "required": false
  7818. },
  7819. {
  7820. "name": "workspace",
  7821. "in": "query",
  7822. "schema": {
  7823. "type": "string"
  7824. },
  7825. "required": false
  7826. }
  7827. ],
  7828. "responses": {
  7829. "200": {
  7830. "description": "Replayed sync events",
  7831. "content": {
  7832. "application/json": {
  7833. "schema": {
  7834. "type": "object",
  7835. "properties": {
  7836. "sessionID": {
  7837. "type": "string"
  7838. }
  7839. },
  7840. "required": ["sessionID"],
  7841. "additionalProperties": false,
  7842. "description": "Replayed sync events"
  7843. }
  7844. }
  7845. }
  7846. },
  7847. "400": {
  7848. "description": "BadRequest | InvalidRequestError",
  7849. "content": {
  7850. "application/json": {
  7851. "schema": {
  7852. "anyOf": [
  7853. {
  7854. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7855. },
  7856. {
  7857. "$ref": "#/components/schemas/InvalidRequestError"
  7858. }
  7859. ]
  7860. }
  7861. }
  7862. }
  7863. }
  7864. },
  7865. "description": "Validate and replay a complete sync event history.",
  7866. "summary": "Replay sync events",
  7867. "requestBody": {
  7868. "content": {
  7869. "application/json": {
  7870. "schema": {
  7871. "type": "object",
  7872. "properties": {
  7873. "directory": {
  7874. "type": "string"
  7875. },
  7876. "events": {
  7877. "type": "array",
  7878. "minItems": 1,
  7879. "items": {
  7880. "type": "object",
  7881. "properties": {
  7882. "id": {
  7883. "type": "string"
  7884. },
  7885. "aggregateID": {
  7886. "type": "string"
  7887. },
  7888. "seq": {
  7889. "type": "integer",
  7890. "minimum": 0
  7891. },
  7892. "type": {
  7893. "type": "string"
  7894. },
  7895. "data": {
  7896. "type": "object"
  7897. }
  7898. },
  7899. "required": ["id", "aggregateID", "seq", "type", "data"],
  7900. "additionalProperties": false
  7901. }
  7902. }
  7903. },
  7904. "required": ["directory", "events"],
  7905. "additionalProperties": false
  7906. }
  7907. }
  7908. }
  7909. },
  7910. "x-codeSamples": [
  7911. {
  7912. "lang": "js",
  7913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7914. }
  7915. ]
  7916. }
  7917. },
  7918. "/sync/steal": {
  7919. "post": {
  7920. "tags": ["sync"],
  7921. "operationId": "sync.steal",
  7922. "parameters": [
  7923. {
  7924. "name": "directory",
  7925. "in": "query",
  7926. "schema": {
  7927. "type": "string"
  7928. },
  7929. "required": false
  7930. },
  7931. {
  7932. "name": "workspace",
  7933. "in": "query",
  7934. "schema": {
  7935. "type": "string"
  7936. },
  7937. "required": false
  7938. }
  7939. ],
  7940. "responses": {
  7941. "200": {
  7942. "description": "Session stolen into workspace",
  7943. "content": {
  7944. "application/json": {
  7945. "schema": {
  7946. "type": "object",
  7947. "properties": {
  7948. "sessionID": {
  7949. "type": "string",
  7950. "pattern": "^ses"
  7951. }
  7952. },
  7953. "required": ["sessionID"],
  7954. "additionalProperties": false,
  7955. "description": "Session stolen into workspace"
  7956. }
  7957. }
  7958. }
  7959. },
  7960. "400": {
  7961. "description": "BadRequest | InvalidRequestError",
  7962. "content": {
  7963. "application/json": {
  7964. "schema": {
  7965. "anyOf": [
  7966. {
  7967. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7968. },
  7969. {
  7970. "$ref": "#/components/schemas/InvalidRequestError"
  7971. }
  7972. ]
  7973. }
  7974. }
  7975. }
  7976. }
  7977. },
  7978. "description": "Update a session to belong to the current workspace through the sync event system.",
  7979. "summary": "Steal session into workspace",
  7980. "requestBody": {
  7981. "content": {
  7982. "application/json": {
  7983. "schema": {
  7984. "type": "object",
  7985. "properties": {
  7986. "sessionID": {
  7987. "type": "string",
  7988. "pattern": "^ses"
  7989. }
  7990. },
  7991. "required": ["sessionID"],
  7992. "additionalProperties": false
  7993. }
  7994. }
  7995. }
  7996. },
  7997. "x-codeSamples": [
  7998. {
  7999. "lang": "js",
  8000. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8001. }
  8002. ]
  8003. }
  8004. },
  8005. "/sync/history": {
  8006. "post": {
  8007. "tags": ["sync"],
  8008. "operationId": "sync.history.list",
  8009. "parameters": [
  8010. {
  8011. "name": "directory",
  8012. "in": "query",
  8013. "schema": {
  8014. "type": "string"
  8015. },
  8016. "required": false
  8017. },
  8018. {
  8019. "name": "workspace",
  8020. "in": "query",
  8021. "schema": {
  8022. "type": "string"
  8023. },
  8024. "required": false
  8025. }
  8026. ],
  8027. "responses": {
  8028. "200": {
  8029. "description": "Sync events",
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "type": "array",
  8034. "items": {
  8035. "type": "object",
  8036. "properties": {
  8037. "id": {
  8038. "type": "string"
  8039. },
  8040. "aggregate_id": {
  8041. "type": "string"
  8042. },
  8043. "seq": {
  8044. "type": "integer",
  8045. "minimum": 0
  8046. },
  8047. "type": {
  8048. "type": "string"
  8049. },
  8050. "data": {
  8051. "type": "object"
  8052. }
  8053. },
  8054. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8055. "additionalProperties": false
  8056. },
  8057. "description": "Sync events"
  8058. }
  8059. }
  8060. }
  8061. },
  8062. "400": {
  8063. "description": "BadRequest | InvalidRequestError",
  8064. "content": {
  8065. "application/json": {
  8066. "schema": {
  8067. "anyOf": [
  8068. {
  8069. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8070. },
  8071. {
  8072. "$ref": "#/components/schemas/InvalidRequestError"
  8073. }
  8074. ]
  8075. }
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8081. "summary": "List sync events",
  8082. "requestBody": {
  8083. "content": {
  8084. "application/json": {
  8085. "schema": {
  8086. "type": "object",
  8087. "additionalProperties": {
  8088. "type": "integer",
  8089. "minimum": 0
  8090. }
  8091. }
  8092. }
  8093. }
  8094. },
  8095. "x-codeSamples": [
  8096. {
  8097. "lang": "js",
  8098. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8099. }
  8100. ]
  8101. }
  8102. },
  8103. "/api/session": {
  8104. "get": {
  8105. "tags": ["v2"],
  8106. "operationId": "v2.session.list",
  8107. "parameters": [
  8108. {
  8109. "name": "directory",
  8110. "in": "query",
  8111. "schema": {
  8112. "type": "string"
  8113. },
  8114. "required": false
  8115. },
  8116. {
  8117. "name": "workspace",
  8118. "in": "query",
  8119. "schema": {
  8120. "type": "string"
  8121. },
  8122. "required": false
  8123. },
  8124. {
  8125. "name": "limit",
  8126. "in": "query",
  8127. "schema": {
  8128. "type": "number"
  8129. },
  8130. "required": false
  8131. },
  8132. {
  8133. "name": "order",
  8134. "in": "query",
  8135. "schema": {
  8136. "type": "string",
  8137. "enum": ["asc", "desc"]
  8138. },
  8139. "required": false
  8140. },
  8141. {
  8142. "name": "path",
  8143. "in": "query",
  8144. "schema": {
  8145. "type": "string"
  8146. },
  8147. "required": false
  8148. },
  8149. {
  8150. "name": "roots",
  8151. "in": "query",
  8152. "schema": {
  8153. "anyOf": [
  8154. {
  8155. "type": "boolean"
  8156. },
  8157. {
  8158. "type": "string",
  8159. "enum": ["true", "false"]
  8160. }
  8161. ]
  8162. },
  8163. "required": false
  8164. },
  8165. {
  8166. "name": "start",
  8167. "in": "query",
  8168. "schema": {
  8169. "type": "number"
  8170. },
  8171. "required": false
  8172. },
  8173. {
  8174. "name": "search",
  8175. "in": "query",
  8176. "schema": {
  8177. "type": "string"
  8178. },
  8179. "required": false
  8180. },
  8181. {
  8182. "name": "cursor",
  8183. "in": "query",
  8184. "schema": {
  8185. "type": "string",
  8186. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8187. },
  8188. "required": false
  8189. }
  8190. ],
  8191. "security": [],
  8192. "responses": {
  8193. "200": {
  8194. "description": "V2SessionsResponse",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "$ref": "#/components/schemas/V2SessionsResponse"
  8199. }
  8200. }
  8201. }
  8202. },
  8203. "400": {
  8204. "description": "InvalidCursorError | InvalidRequestError",
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "anyOf": [
  8209. {
  8210. "$ref": "#/components/schemas/InvalidCursorError"
  8211. },
  8212. {
  8213. "$ref": "#/components/schemas/InvalidRequestError"
  8214. },
  8215. {
  8216. "$ref": "#/components/schemas/InvalidRequestError"
  8217. }
  8218. ]
  8219. }
  8220. }
  8221. }
  8222. },
  8223. "401": {
  8224. "description": "UnauthorizedError",
  8225. "content": {
  8226. "application/json": {
  8227. "schema": {
  8228. "$ref": "#/components/schemas/UnauthorizedError"
  8229. }
  8230. }
  8231. }
  8232. }
  8233. },
  8234. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  8235. "summary": "List v2 sessions",
  8236. "x-codeSamples": [
  8237. {
  8238. "lang": "js",
  8239. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8240. }
  8241. ]
  8242. }
  8243. },
  8244. "/api/session/{sessionID}/prompt": {
  8245. "post": {
  8246. "tags": ["v2"],
  8247. "operationId": "v2.session.prompt",
  8248. "parameters": [
  8249. {
  8250. "name": "sessionID",
  8251. "in": "path",
  8252. "schema": {
  8253. "type": "string",
  8254. "pattern": "^ses"
  8255. },
  8256. "required": true
  8257. },
  8258. {
  8259. "name": "directory",
  8260. "in": "query",
  8261. "schema": {
  8262. "type": "string"
  8263. },
  8264. "required": false
  8265. },
  8266. {
  8267. "name": "workspace",
  8268. "in": "query",
  8269. "schema": {
  8270. "type": "string"
  8271. },
  8272. "required": false
  8273. }
  8274. ],
  8275. "security": [],
  8276. "responses": {
  8277. "200": {
  8278. "description": "Session.Message",
  8279. "content": {
  8280. "application/json": {
  8281. "schema": {
  8282. "$ref": "#/components/schemas/SessionMessage"
  8283. }
  8284. }
  8285. }
  8286. },
  8287. "400": {
  8288. "description": "InvalidRequestError",
  8289. "content": {
  8290. "application/json": {
  8291. "schema": {
  8292. "$ref": "#/components/schemas/InvalidRequestError"
  8293. }
  8294. }
  8295. }
  8296. },
  8297. "401": {
  8298. "description": "UnauthorizedError",
  8299. "content": {
  8300. "application/json": {
  8301. "schema": {
  8302. "$ref": "#/components/schemas/UnauthorizedError"
  8303. }
  8304. }
  8305. }
  8306. },
  8307. "404": {
  8308. "description": "SessionNotFoundError",
  8309. "content": {
  8310. "application/json": {
  8311. "schema": {
  8312. "$ref": "#/components/schemas/SessionNotFoundError"
  8313. }
  8314. }
  8315. }
  8316. },
  8317. "503": {
  8318. "description": "ServiceUnavailableError",
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "$ref": "#/components/schemas/ServiceUnavailableError"
  8323. }
  8324. }
  8325. }
  8326. }
  8327. },
  8328. "description": "Create a v2 session message and queue it for the agent loop.",
  8329. "summary": "Send v2 message",
  8330. "requestBody": {
  8331. "content": {
  8332. "application/json": {
  8333. "schema": {
  8334. "type": "object",
  8335. "properties": {
  8336. "prompt": {
  8337. "$ref": "#/components/schemas/Prompt"
  8338. },
  8339. "delivery": {
  8340. "$ref": "#/components/schemas/SessionDelivery"
  8341. }
  8342. },
  8343. "required": ["prompt"],
  8344. "additionalProperties": false
  8345. }
  8346. }
  8347. }
  8348. },
  8349. "x-codeSamples": [
  8350. {
  8351. "lang": "js",
  8352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8353. }
  8354. ]
  8355. }
  8356. },
  8357. "/api/session/{sessionID}/compact": {
  8358. "post": {
  8359. "tags": ["v2"],
  8360. "operationId": "v2.session.compact",
  8361. "parameters": [
  8362. {
  8363. "name": "sessionID",
  8364. "in": "path",
  8365. "schema": {
  8366. "type": "string",
  8367. "pattern": "^ses"
  8368. },
  8369. "required": true
  8370. },
  8371. {
  8372. "name": "directory",
  8373. "in": "query",
  8374. "schema": {
  8375. "type": "string"
  8376. },
  8377. "required": false
  8378. },
  8379. {
  8380. "name": "workspace",
  8381. "in": "query",
  8382. "schema": {
  8383. "type": "string"
  8384. },
  8385. "required": false
  8386. }
  8387. ],
  8388. "security": [],
  8389. "responses": {
  8390. "204": {
  8391. "description": "<No Content>"
  8392. },
  8393. "400": {
  8394. "description": "InvalidRequestError",
  8395. "content": {
  8396. "application/json": {
  8397. "schema": {
  8398. "$ref": "#/components/schemas/InvalidRequestError"
  8399. }
  8400. }
  8401. }
  8402. },
  8403. "401": {
  8404. "description": "UnauthorizedError",
  8405. "content": {
  8406. "application/json": {
  8407. "schema": {
  8408. "$ref": "#/components/schemas/UnauthorizedError"
  8409. }
  8410. }
  8411. }
  8412. },
  8413. "404": {
  8414. "description": "SessionNotFoundError",
  8415. "content": {
  8416. "application/json": {
  8417. "schema": {
  8418. "$ref": "#/components/schemas/SessionNotFoundError"
  8419. }
  8420. }
  8421. }
  8422. },
  8423. "503": {
  8424. "description": "ServiceUnavailableError",
  8425. "content": {
  8426. "application/json": {
  8427. "schema": {
  8428. "$ref": "#/components/schemas/ServiceUnavailableError"
  8429. }
  8430. }
  8431. }
  8432. }
  8433. },
  8434. "description": "Compact a v2 session conversation.",
  8435. "summary": "Compact v2 session",
  8436. "x-codeSamples": [
  8437. {
  8438. "lang": "js",
  8439. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8440. }
  8441. ]
  8442. }
  8443. },
  8444. "/api/session/{sessionID}/wait": {
  8445. "post": {
  8446. "tags": ["v2"],
  8447. "operationId": "v2.session.wait",
  8448. "parameters": [
  8449. {
  8450. "name": "sessionID",
  8451. "in": "path",
  8452. "schema": {
  8453. "type": "string",
  8454. "pattern": "^ses"
  8455. },
  8456. "required": true
  8457. },
  8458. {
  8459. "name": "directory",
  8460. "in": "query",
  8461. "schema": {
  8462. "type": "string"
  8463. },
  8464. "required": false
  8465. },
  8466. {
  8467. "name": "workspace",
  8468. "in": "query",
  8469. "schema": {
  8470. "type": "string"
  8471. },
  8472. "required": false
  8473. }
  8474. ],
  8475. "security": [],
  8476. "responses": {
  8477. "204": {
  8478. "description": "<No Content>"
  8479. },
  8480. "400": {
  8481. "description": "InvalidRequestError",
  8482. "content": {
  8483. "application/json": {
  8484. "schema": {
  8485. "$ref": "#/components/schemas/InvalidRequestError"
  8486. }
  8487. }
  8488. }
  8489. },
  8490. "401": {
  8491. "description": "UnauthorizedError",
  8492. "content": {
  8493. "application/json": {
  8494. "schema": {
  8495. "$ref": "#/components/schemas/UnauthorizedError"
  8496. }
  8497. }
  8498. }
  8499. },
  8500. "404": {
  8501. "description": "SessionNotFoundError",
  8502. "content": {
  8503. "application/json": {
  8504. "schema": {
  8505. "$ref": "#/components/schemas/SessionNotFoundError"
  8506. }
  8507. }
  8508. }
  8509. },
  8510. "503": {
  8511. "description": "ServiceUnavailableError",
  8512. "content": {
  8513. "application/json": {
  8514. "schema": {
  8515. "$ref": "#/components/schemas/ServiceUnavailableError"
  8516. }
  8517. }
  8518. }
  8519. }
  8520. },
  8521. "description": "Wait for a v2 session agent loop to become idle.",
  8522. "summary": "Wait for v2 session",
  8523. "x-codeSamples": [
  8524. {
  8525. "lang": "js",
  8526. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8527. }
  8528. ]
  8529. }
  8530. },
  8531. "/api/session/{sessionID}/context": {
  8532. "get": {
  8533. "tags": ["v2"],
  8534. "operationId": "v2.session.context",
  8535. "parameters": [
  8536. {
  8537. "name": "sessionID",
  8538. "in": "path",
  8539. "schema": {
  8540. "type": "string",
  8541. "pattern": "^ses"
  8542. },
  8543. "required": true
  8544. },
  8545. {
  8546. "name": "directory",
  8547. "in": "query",
  8548. "schema": {
  8549. "type": "string"
  8550. },
  8551. "required": false
  8552. },
  8553. {
  8554. "name": "workspace",
  8555. "in": "query",
  8556. "schema": {
  8557. "type": "string"
  8558. },
  8559. "required": false
  8560. }
  8561. ],
  8562. "security": [],
  8563. "responses": {
  8564. "200": {
  8565. "description": "Success",
  8566. "content": {
  8567. "application/json": {
  8568. "schema": {
  8569. "type": "array",
  8570. "items": {
  8571. "$ref": "#/components/schemas/SessionMessage"
  8572. }
  8573. }
  8574. }
  8575. }
  8576. },
  8577. "400": {
  8578. "description": "InvalidRequestError",
  8579. "content": {
  8580. "application/json": {
  8581. "schema": {
  8582. "$ref": "#/components/schemas/InvalidRequestError"
  8583. }
  8584. }
  8585. }
  8586. },
  8587. "401": {
  8588. "description": "UnauthorizedError",
  8589. "content": {
  8590. "application/json": {
  8591. "schema": {
  8592. "$ref": "#/components/schemas/UnauthorizedError"
  8593. }
  8594. }
  8595. }
  8596. },
  8597. "404": {
  8598. "description": "SessionNotFoundError",
  8599. "content": {
  8600. "application/json": {
  8601. "schema": {
  8602. "$ref": "#/components/schemas/SessionNotFoundError"
  8603. }
  8604. }
  8605. }
  8606. },
  8607. "500": {
  8608. "description": "UnknownError",
  8609. "content": {
  8610. "application/json": {
  8611. "schema": {
  8612. "$ref": "#/components/schemas/UnknownError1"
  8613. }
  8614. }
  8615. }
  8616. }
  8617. },
  8618. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8619. "summary": "Get v2 session context",
  8620. "x-codeSamples": [
  8621. {
  8622. "lang": "js",
  8623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8624. }
  8625. ]
  8626. }
  8627. },
  8628. "/api/session/{sessionID}/message": {
  8629. "get": {
  8630. "tags": ["v2 messages"],
  8631. "operationId": "v2.session.messages",
  8632. "parameters": [
  8633. {
  8634. "name": "sessionID",
  8635. "in": "path",
  8636. "schema": {
  8637. "type": "string",
  8638. "pattern": "^ses"
  8639. },
  8640. "required": true
  8641. },
  8642. {
  8643. "name": "directory",
  8644. "in": "query",
  8645. "schema": {
  8646. "type": "string"
  8647. },
  8648. "required": false
  8649. },
  8650. {
  8651. "name": "workspace",
  8652. "in": "query",
  8653. "schema": {
  8654. "type": "string"
  8655. },
  8656. "required": false
  8657. },
  8658. {
  8659. "name": "limit",
  8660. "in": "query",
  8661. "schema": {
  8662. "type": "number"
  8663. },
  8664. "required": false
  8665. },
  8666. {
  8667. "name": "order",
  8668. "in": "query",
  8669. "schema": {
  8670. "type": "string",
  8671. "enum": ["asc", "desc"]
  8672. },
  8673. "required": false
  8674. },
  8675. {
  8676. "name": "cursor",
  8677. "in": "query",
  8678. "schema": {
  8679. "type": "string",
  8680. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8681. },
  8682. "required": false
  8683. }
  8684. ],
  8685. "security": [],
  8686. "responses": {
  8687. "200": {
  8688. "description": "V2SessionMessagesResponse",
  8689. "content": {
  8690. "application/json": {
  8691. "schema": {
  8692. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8693. }
  8694. }
  8695. }
  8696. },
  8697. "400": {
  8698. "description": "InvalidCursorError | InvalidRequestError",
  8699. "content": {
  8700. "application/json": {
  8701. "schema": {
  8702. "anyOf": [
  8703. {
  8704. "$ref": "#/components/schemas/InvalidCursorError"
  8705. },
  8706. {
  8707. "$ref": "#/components/schemas/InvalidRequestError"
  8708. }
  8709. ]
  8710. }
  8711. }
  8712. }
  8713. },
  8714. "401": {
  8715. "description": "UnauthorizedError",
  8716. "content": {
  8717. "application/json": {
  8718. "schema": {
  8719. "$ref": "#/components/schemas/UnauthorizedError"
  8720. }
  8721. }
  8722. }
  8723. },
  8724. "404": {
  8725. "description": "SessionNotFoundError",
  8726. "content": {
  8727. "application/json": {
  8728. "schema": {
  8729. "$ref": "#/components/schemas/SessionNotFoundError"
  8730. }
  8731. }
  8732. }
  8733. },
  8734. "500": {
  8735. "description": "UnknownError",
  8736. "content": {
  8737. "application/json": {
  8738. "schema": {
  8739. "$ref": "#/components/schemas/UnknownError1"
  8740. }
  8741. }
  8742. }
  8743. }
  8744. },
  8745. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  8746. "summary": "Get v2 session messages",
  8747. "x-codeSamples": [
  8748. {
  8749. "lang": "js",
  8750. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8751. }
  8752. ]
  8753. }
  8754. },
  8755. "/api/model": {
  8756. "get": {
  8757. "tags": ["v2 models"],
  8758. "operationId": "v2.model.list",
  8759. "parameters": [
  8760. {
  8761. "name": "location",
  8762. "in": "query",
  8763. "schema": {
  8764. "type": "object",
  8765. "properties": {
  8766. "directory": {
  8767. "type": "string"
  8768. },
  8769. "workspace": {
  8770. "type": "string"
  8771. }
  8772. },
  8773. "additionalProperties": false
  8774. },
  8775. "required": false,
  8776. "style": "deepObject",
  8777. "explode": true
  8778. }
  8779. ],
  8780. "security": [],
  8781. "responses": {
  8782. "200": {
  8783. "description": "Success",
  8784. "content": {
  8785. "application/json": {
  8786. "schema": {
  8787. "type": "array",
  8788. "items": {
  8789. "$ref": "#/components/schemas/ModelV2Info"
  8790. }
  8791. }
  8792. }
  8793. }
  8794. },
  8795. "400": {
  8796. "description": "InvalidRequestError",
  8797. "content": {
  8798. "application/json": {
  8799. "schema": {
  8800. "$ref": "#/components/schemas/InvalidRequestError"
  8801. }
  8802. }
  8803. }
  8804. },
  8805. "401": {
  8806. "description": "UnauthorizedError",
  8807. "content": {
  8808. "application/json": {
  8809. "schema": {
  8810. "$ref": "#/components/schemas/UnauthorizedError"
  8811. }
  8812. }
  8813. }
  8814. },
  8815. "503": {
  8816. "description": "ServiceUnavailableError",
  8817. "content": {
  8818. "application/json": {
  8819. "schema": {
  8820. "$ref": "#/components/schemas/ServiceUnavailableError"
  8821. }
  8822. }
  8823. }
  8824. }
  8825. },
  8826. "description": "Retrieve available v2 models ordered by release date.",
  8827. "summary": "List v2 models",
  8828. "x-codeSamples": [
  8829. {
  8830. "lang": "js",
  8831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8832. }
  8833. ]
  8834. }
  8835. },
  8836. "/api/provider": {
  8837. "get": {
  8838. "tags": ["v2 providers"],
  8839. "operationId": "v2.provider.list",
  8840. "parameters": [
  8841. {
  8842. "name": "location",
  8843. "in": "query",
  8844. "schema": {
  8845. "type": "object",
  8846. "properties": {
  8847. "directory": {
  8848. "type": "string"
  8849. },
  8850. "workspace": {
  8851. "type": "string"
  8852. }
  8853. },
  8854. "additionalProperties": false
  8855. },
  8856. "required": false,
  8857. "style": "deepObject",
  8858. "explode": true
  8859. }
  8860. ],
  8861. "security": [],
  8862. "responses": {
  8863. "200": {
  8864. "description": "Success",
  8865. "content": {
  8866. "application/json": {
  8867. "schema": {
  8868. "type": "array",
  8869. "items": {
  8870. "$ref": "#/components/schemas/ProviderV2Info"
  8871. }
  8872. }
  8873. }
  8874. }
  8875. },
  8876. "400": {
  8877. "description": "InvalidRequestError",
  8878. "content": {
  8879. "application/json": {
  8880. "schema": {
  8881. "$ref": "#/components/schemas/InvalidRequestError"
  8882. }
  8883. }
  8884. }
  8885. },
  8886. "401": {
  8887. "description": "UnauthorizedError",
  8888. "content": {
  8889. "application/json": {
  8890. "schema": {
  8891. "$ref": "#/components/schemas/UnauthorizedError"
  8892. }
  8893. }
  8894. }
  8895. },
  8896. "503": {
  8897. "description": "ServiceUnavailableError",
  8898. "content": {
  8899. "application/json": {
  8900. "schema": {
  8901. "$ref": "#/components/schemas/ServiceUnavailableError"
  8902. }
  8903. }
  8904. }
  8905. }
  8906. },
  8907. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8908. "summary": "List v2 providers",
  8909. "x-codeSamples": [
  8910. {
  8911. "lang": "js",
  8912. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8913. }
  8914. ]
  8915. }
  8916. },
  8917. "/api/provider/{providerID}": {
  8918. "get": {
  8919. "tags": ["v2 providers"],
  8920. "operationId": "v2.provider.get",
  8921. "parameters": [
  8922. {
  8923. "name": "providerID",
  8924. "in": "path",
  8925. "schema": {
  8926. "type": "string"
  8927. },
  8928. "required": true
  8929. },
  8930. {
  8931. "name": "location",
  8932. "in": "query",
  8933. "schema": {
  8934. "type": "object",
  8935. "properties": {
  8936. "directory": {
  8937. "type": "string"
  8938. },
  8939. "workspace": {
  8940. "type": "string"
  8941. }
  8942. },
  8943. "additionalProperties": false
  8944. },
  8945. "required": false,
  8946. "style": "deepObject",
  8947. "explode": true
  8948. }
  8949. ],
  8950. "security": [],
  8951. "responses": {
  8952. "200": {
  8953. "description": "ProviderV2.Info",
  8954. "content": {
  8955. "application/json": {
  8956. "schema": {
  8957. "$ref": "#/components/schemas/ProviderV2Info"
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "400": {
  8963. "description": "InvalidRequestError",
  8964. "content": {
  8965. "application/json": {
  8966. "schema": {
  8967. "$ref": "#/components/schemas/InvalidRequestError"
  8968. }
  8969. }
  8970. }
  8971. },
  8972. "401": {
  8973. "description": "UnauthorizedError",
  8974. "content": {
  8975. "application/json": {
  8976. "schema": {
  8977. "$ref": "#/components/schemas/UnauthorizedError"
  8978. }
  8979. }
  8980. }
  8981. },
  8982. "404": {
  8983. "description": "ProviderNotFoundError",
  8984. "content": {
  8985. "application/json": {
  8986. "schema": {
  8987. "$ref": "#/components/schemas/ProviderNotFoundError"
  8988. }
  8989. }
  8990. }
  8991. },
  8992. "503": {
  8993. "description": "ServiceUnavailableError",
  8994. "content": {
  8995. "application/json": {
  8996. "schema": {
  8997. "$ref": "#/components/schemas/ServiceUnavailableError"
  8998. }
  8999. }
  9000. }
  9001. }
  9002. },
  9003. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  9004. "summary": "Get v2 provider",
  9005. "x-codeSamples": [
  9006. {
  9007. "lang": "js",
  9008. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9009. }
  9010. ]
  9011. }
  9012. },
  9013. "/tui/append-prompt": {
  9014. "post": {
  9015. "tags": ["tui"],
  9016. "operationId": "tui.appendPrompt",
  9017. "parameters": [
  9018. {
  9019. "name": "directory",
  9020. "in": "query",
  9021. "schema": {
  9022. "type": "string"
  9023. },
  9024. "required": false
  9025. },
  9026. {
  9027. "name": "workspace",
  9028. "in": "query",
  9029. "schema": {
  9030. "type": "string"
  9031. },
  9032. "required": false
  9033. }
  9034. ],
  9035. "responses": {
  9036. "200": {
  9037. "description": "Prompt processed successfully",
  9038. "content": {
  9039. "application/json": {
  9040. "schema": {
  9041. "type": "boolean",
  9042. "description": "Prompt processed successfully"
  9043. }
  9044. }
  9045. }
  9046. },
  9047. "400": {
  9048. "description": "BadRequest | InvalidRequestError",
  9049. "content": {
  9050. "application/json": {
  9051. "schema": {
  9052. "anyOf": [
  9053. {
  9054. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9055. },
  9056. {
  9057. "$ref": "#/components/schemas/InvalidRequestError"
  9058. }
  9059. ]
  9060. }
  9061. }
  9062. }
  9063. }
  9064. },
  9065. "description": "Append prompt to the TUI.",
  9066. "summary": "Append TUI prompt",
  9067. "requestBody": {
  9068. "content": {
  9069. "application/json": {
  9070. "schema": {
  9071. "type": "object",
  9072. "properties": {
  9073. "text": {
  9074. "type": "string"
  9075. }
  9076. },
  9077. "required": ["text"],
  9078. "additionalProperties": false
  9079. }
  9080. }
  9081. }
  9082. },
  9083. "x-codeSamples": [
  9084. {
  9085. "lang": "js",
  9086. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9087. }
  9088. ]
  9089. }
  9090. },
  9091. "/tui/open-help": {
  9092. "post": {
  9093. "tags": ["tui"],
  9094. "operationId": "tui.openHelp",
  9095. "parameters": [
  9096. {
  9097. "name": "directory",
  9098. "in": "query",
  9099. "schema": {
  9100. "type": "string"
  9101. },
  9102. "required": false
  9103. },
  9104. {
  9105. "name": "workspace",
  9106. "in": "query",
  9107. "schema": {
  9108. "type": "string"
  9109. },
  9110. "required": false
  9111. }
  9112. ],
  9113. "responses": {
  9114. "200": {
  9115. "description": "Help dialog opened successfully",
  9116. "content": {
  9117. "application/json": {
  9118. "schema": {
  9119. "type": "boolean",
  9120. "description": "Help dialog opened successfully"
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "400": {
  9126. "description": "Bad request",
  9127. "content": {
  9128. "application/json": {
  9129. "schema": {
  9130. "$ref": "#/components/schemas/BadRequestError"
  9131. }
  9132. }
  9133. }
  9134. }
  9135. },
  9136. "description": "Open the help dialog in the TUI to display user assistance information.",
  9137. "summary": "Open help dialog",
  9138. "x-codeSamples": [
  9139. {
  9140. "lang": "js",
  9141. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9142. }
  9143. ]
  9144. }
  9145. },
  9146. "/tui/open-sessions": {
  9147. "post": {
  9148. "tags": ["tui"],
  9149. "operationId": "tui.openSessions",
  9150. "parameters": [
  9151. {
  9152. "name": "directory",
  9153. "in": "query",
  9154. "schema": {
  9155. "type": "string"
  9156. },
  9157. "required": false
  9158. },
  9159. {
  9160. "name": "workspace",
  9161. "in": "query",
  9162. "schema": {
  9163. "type": "string"
  9164. },
  9165. "required": false
  9166. }
  9167. ],
  9168. "responses": {
  9169. "200": {
  9170. "description": "Session dialog opened successfully",
  9171. "content": {
  9172. "application/json": {
  9173. "schema": {
  9174. "type": "boolean",
  9175. "description": "Session dialog opened successfully"
  9176. }
  9177. }
  9178. }
  9179. },
  9180. "400": {
  9181. "description": "Bad request",
  9182. "content": {
  9183. "application/json": {
  9184. "schema": {
  9185. "$ref": "#/components/schemas/BadRequestError"
  9186. }
  9187. }
  9188. }
  9189. }
  9190. },
  9191. "description": "Open the session dialog.",
  9192. "summary": "Open sessions dialog",
  9193. "x-codeSamples": [
  9194. {
  9195. "lang": "js",
  9196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9197. }
  9198. ]
  9199. }
  9200. },
  9201. "/tui/open-themes": {
  9202. "post": {
  9203. "tags": ["tui"],
  9204. "operationId": "tui.openThemes",
  9205. "parameters": [
  9206. {
  9207. "name": "directory",
  9208. "in": "query",
  9209. "schema": {
  9210. "type": "string"
  9211. },
  9212. "required": false
  9213. },
  9214. {
  9215. "name": "workspace",
  9216. "in": "query",
  9217. "schema": {
  9218. "type": "string"
  9219. },
  9220. "required": false
  9221. }
  9222. ],
  9223. "responses": {
  9224. "200": {
  9225. "description": "Theme dialog opened successfully",
  9226. "content": {
  9227. "application/json": {
  9228. "schema": {
  9229. "type": "boolean",
  9230. "description": "Theme dialog opened successfully"
  9231. }
  9232. }
  9233. }
  9234. },
  9235. "400": {
  9236. "description": "Bad request",
  9237. "content": {
  9238. "application/json": {
  9239. "schema": {
  9240. "$ref": "#/components/schemas/BadRequestError"
  9241. }
  9242. }
  9243. }
  9244. }
  9245. },
  9246. "description": "Open the theme dialog.",
  9247. "summary": "Open themes dialog",
  9248. "x-codeSamples": [
  9249. {
  9250. "lang": "js",
  9251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9252. }
  9253. ]
  9254. }
  9255. },
  9256. "/tui/open-models": {
  9257. "post": {
  9258. "tags": ["tui"],
  9259. "operationId": "tui.openModels",
  9260. "parameters": [
  9261. {
  9262. "name": "directory",
  9263. "in": "query",
  9264. "schema": {
  9265. "type": "string"
  9266. },
  9267. "required": false
  9268. },
  9269. {
  9270. "name": "workspace",
  9271. "in": "query",
  9272. "schema": {
  9273. "type": "string"
  9274. },
  9275. "required": false
  9276. }
  9277. ],
  9278. "responses": {
  9279. "200": {
  9280. "description": "Model dialog opened successfully",
  9281. "content": {
  9282. "application/json": {
  9283. "schema": {
  9284. "type": "boolean",
  9285. "description": "Model dialog opened successfully"
  9286. }
  9287. }
  9288. }
  9289. },
  9290. "400": {
  9291. "description": "Bad request",
  9292. "content": {
  9293. "application/json": {
  9294. "schema": {
  9295. "$ref": "#/components/schemas/BadRequestError"
  9296. }
  9297. }
  9298. }
  9299. }
  9300. },
  9301. "description": "Open the model dialog.",
  9302. "summary": "Open models dialog",
  9303. "x-codeSamples": [
  9304. {
  9305. "lang": "js",
  9306. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9307. }
  9308. ]
  9309. }
  9310. },
  9311. "/tui/submit-prompt": {
  9312. "post": {
  9313. "tags": ["tui"],
  9314. "operationId": "tui.submitPrompt",
  9315. "parameters": [
  9316. {
  9317. "name": "directory",
  9318. "in": "query",
  9319. "schema": {
  9320. "type": "string"
  9321. },
  9322. "required": false
  9323. },
  9324. {
  9325. "name": "workspace",
  9326. "in": "query",
  9327. "schema": {
  9328. "type": "string"
  9329. },
  9330. "required": false
  9331. }
  9332. ],
  9333. "responses": {
  9334. "200": {
  9335. "description": "Prompt submitted successfully",
  9336. "content": {
  9337. "application/json": {
  9338. "schema": {
  9339. "type": "boolean",
  9340. "description": "Prompt submitted successfully"
  9341. }
  9342. }
  9343. }
  9344. },
  9345. "400": {
  9346. "description": "Bad request",
  9347. "content": {
  9348. "application/json": {
  9349. "schema": {
  9350. "$ref": "#/components/schemas/BadRequestError"
  9351. }
  9352. }
  9353. }
  9354. }
  9355. },
  9356. "description": "Submit the prompt.",
  9357. "summary": "Submit TUI prompt",
  9358. "x-codeSamples": [
  9359. {
  9360. "lang": "js",
  9361. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9362. }
  9363. ]
  9364. }
  9365. },
  9366. "/tui/clear-prompt": {
  9367. "post": {
  9368. "tags": ["tui"],
  9369. "operationId": "tui.clearPrompt",
  9370. "parameters": [
  9371. {
  9372. "name": "directory",
  9373. "in": "query",
  9374. "schema": {
  9375. "type": "string"
  9376. },
  9377. "required": false
  9378. },
  9379. {
  9380. "name": "workspace",
  9381. "in": "query",
  9382. "schema": {
  9383. "type": "string"
  9384. },
  9385. "required": false
  9386. }
  9387. ],
  9388. "responses": {
  9389. "200": {
  9390. "description": "Prompt cleared successfully",
  9391. "content": {
  9392. "application/json": {
  9393. "schema": {
  9394. "type": "boolean",
  9395. "description": "Prompt cleared successfully"
  9396. }
  9397. }
  9398. }
  9399. },
  9400. "400": {
  9401. "description": "Bad request",
  9402. "content": {
  9403. "application/json": {
  9404. "schema": {
  9405. "$ref": "#/components/schemas/BadRequestError"
  9406. }
  9407. }
  9408. }
  9409. }
  9410. },
  9411. "description": "Clear the prompt.",
  9412. "summary": "Clear TUI prompt",
  9413. "x-codeSamples": [
  9414. {
  9415. "lang": "js",
  9416. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9417. }
  9418. ]
  9419. }
  9420. },
  9421. "/tui/execute-command": {
  9422. "post": {
  9423. "tags": ["tui"],
  9424. "operationId": "tui.executeCommand",
  9425. "parameters": [
  9426. {
  9427. "name": "directory",
  9428. "in": "query",
  9429. "schema": {
  9430. "type": "string"
  9431. },
  9432. "required": false
  9433. },
  9434. {
  9435. "name": "workspace",
  9436. "in": "query",
  9437. "schema": {
  9438. "type": "string"
  9439. },
  9440. "required": false
  9441. }
  9442. ],
  9443. "responses": {
  9444. "200": {
  9445. "description": "Command executed successfully",
  9446. "content": {
  9447. "application/json": {
  9448. "schema": {
  9449. "type": "boolean",
  9450. "description": "Command executed successfully"
  9451. }
  9452. }
  9453. }
  9454. },
  9455. "400": {
  9456. "description": "BadRequest | InvalidRequestError",
  9457. "content": {
  9458. "application/json": {
  9459. "schema": {
  9460. "anyOf": [
  9461. {
  9462. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9463. },
  9464. {
  9465. "$ref": "#/components/schemas/InvalidRequestError"
  9466. }
  9467. ]
  9468. }
  9469. }
  9470. }
  9471. }
  9472. },
  9473. "description": "Execute a TUI command.",
  9474. "summary": "Execute TUI command",
  9475. "requestBody": {
  9476. "content": {
  9477. "application/json": {
  9478. "schema": {
  9479. "type": "object",
  9480. "properties": {
  9481. "command": {
  9482. "type": "string"
  9483. }
  9484. },
  9485. "required": ["command"],
  9486. "additionalProperties": false
  9487. }
  9488. }
  9489. }
  9490. },
  9491. "x-codeSamples": [
  9492. {
  9493. "lang": "js",
  9494. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9495. }
  9496. ]
  9497. }
  9498. },
  9499. "/tui/show-toast": {
  9500. "post": {
  9501. "tags": ["tui"],
  9502. "operationId": "tui.showToast",
  9503. "parameters": [
  9504. {
  9505. "name": "directory",
  9506. "in": "query",
  9507. "schema": {
  9508. "type": "string"
  9509. },
  9510. "required": false
  9511. },
  9512. {
  9513. "name": "workspace",
  9514. "in": "query",
  9515. "schema": {
  9516. "type": "string"
  9517. },
  9518. "required": false
  9519. }
  9520. ],
  9521. "responses": {
  9522. "200": {
  9523. "description": "Toast notification shown successfully",
  9524. "content": {
  9525. "application/json": {
  9526. "schema": {
  9527. "type": "boolean",
  9528. "description": "Toast notification shown successfully"
  9529. }
  9530. }
  9531. }
  9532. },
  9533. "400": {
  9534. "description": "Bad request",
  9535. "content": {
  9536. "application/json": {
  9537. "schema": {
  9538. "$ref": "#/components/schemas/BadRequestError"
  9539. }
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "description": "Show a toast notification in the TUI.",
  9545. "summary": "Show TUI toast",
  9546. "requestBody": {
  9547. "content": {
  9548. "application/json": {
  9549. "schema": {
  9550. "type": "object",
  9551. "properties": {
  9552. "title": {
  9553. "type": "string"
  9554. },
  9555. "message": {
  9556. "type": "string"
  9557. },
  9558. "variant": {
  9559. "type": "string",
  9560. "enum": ["info", "success", "warning", "error"]
  9561. },
  9562. "duration": {
  9563. "type": "integer",
  9564. "exclusiveMinimum": 0
  9565. }
  9566. },
  9567. "required": ["message", "variant"],
  9568. "additionalProperties": false
  9569. }
  9570. }
  9571. }
  9572. },
  9573. "x-codeSamples": [
  9574. {
  9575. "lang": "js",
  9576. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9577. }
  9578. ]
  9579. }
  9580. },
  9581. "/tui/publish": {
  9582. "post": {
  9583. "tags": ["tui"],
  9584. "operationId": "tui.publish",
  9585. "parameters": [
  9586. {
  9587. "name": "directory",
  9588. "in": "query",
  9589. "schema": {
  9590. "type": "string"
  9591. },
  9592. "required": false
  9593. },
  9594. {
  9595. "name": "workspace",
  9596. "in": "query",
  9597. "schema": {
  9598. "type": "string"
  9599. },
  9600. "required": false
  9601. }
  9602. ],
  9603. "responses": {
  9604. "200": {
  9605. "description": "Event published successfully",
  9606. "content": {
  9607. "application/json": {
  9608. "schema": {
  9609. "type": "boolean",
  9610. "description": "Event published successfully"
  9611. }
  9612. }
  9613. }
  9614. },
  9615. "400": {
  9616. "description": "BadRequest | InvalidRequestError",
  9617. "content": {
  9618. "application/json": {
  9619. "schema": {
  9620. "anyOf": [
  9621. {
  9622. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9623. },
  9624. {
  9625. "$ref": "#/components/schemas/InvalidRequestError"
  9626. }
  9627. ]
  9628. }
  9629. }
  9630. }
  9631. }
  9632. },
  9633. "description": "Publish a TUI event.",
  9634. "summary": "Publish TUI event",
  9635. "requestBody": {
  9636. "content": {
  9637. "application/json": {
  9638. "schema": {
  9639. "anyOf": [
  9640. {
  9641. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9642. },
  9643. {
  9644. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9645. },
  9646. {
  9647. "$ref": "#/components/schemas/EventTuiToastShow"
  9648. },
  9649. {
  9650. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9651. }
  9652. ]
  9653. }
  9654. }
  9655. }
  9656. },
  9657. "x-codeSamples": [
  9658. {
  9659. "lang": "js",
  9660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9661. }
  9662. ]
  9663. }
  9664. },
  9665. "/tui/select-session": {
  9666. "post": {
  9667. "tags": ["tui"],
  9668. "operationId": "tui.selectSession",
  9669. "parameters": [
  9670. {
  9671. "name": "directory",
  9672. "in": "query",
  9673. "schema": {
  9674. "type": "string"
  9675. },
  9676. "required": false
  9677. },
  9678. {
  9679. "name": "workspace",
  9680. "in": "query",
  9681. "schema": {
  9682. "type": "string"
  9683. },
  9684. "required": false
  9685. }
  9686. ],
  9687. "responses": {
  9688. "200": {
  9689. "description": "Session selected successfully",
  9690. "content": {
  9691. "application/json": {
  9692. "schema": {
  9693. "type": "boolean",
  9694. "description": "Session selected successfully"
  9695. }
  9696. }
  9697. }
  9698. },
  9699. "400": {
  9700. "description": "BadRequest | InvalidRequestError",
  9701. "content": {
  9702. "application/json": {
  9703. "schema": {
  9704. "anyOf": [
  9705. {
  9706. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9707. },
  9708. {
  9709. "$ref": "#/components/schemas/InvalidRequestError"
  9710. }
  9711. ]
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "404": {
  9717. "description": "NotFoundError",
  9718. "content": {
  9719. "application/json": {
  9720. "schema": {
  9721. "$ref": "#/components/schemas/NotFoundError"
  9722. }
  9723. }
  9724. }
  9725. }
  9726. },
  9727. "description": "Navigate the TUI to display the specified session.",
  9728. "summary": "Select session",
  9729. "requestBody": {
  9730. "content": {
  9731. "application/json": {
  9732. "schema": {
  9733. "type": "object",
  9734. "properties": {
  9735. "sessionID": {
  9736. "type": "string",
  9737. "pattern": "^ses",
  9738. "description": "Session ID to navigate to"
  9739. }
  9740. },
  9741. "required": ["sessionID"],
  9742. "additionalProperties": false
  9743. }
  9744. }
  9745. }
  9746. },
  9747. "x-codeSamples": [
  9748. {
  9749. "lang": "js",
  9750. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9751. }
  9752. ]
  9753. }
  9754. },
  9755. "/tui/control/next": {
  9756. "get": {
  9757. "tags": ["tui"],
  9758. "operationId": "tui.control.next",
  9759. "parameters": [
  9760. {
  9761. "name": "directory",
  9762. "in": "query",
  9763. "schema": {
  9764. "type": "string"
  9765. },
  9766. "required": false
  9767. },
  9768. {
  9769. "name": "workspace",
  9770. "in": "query",
  9771. "schema": {
  9772. "type": "string"
  9773. },
  9774. "required": false
  9775. }
  9776. ],
  9777. "responses": {
  9778. "200": {
  9779. "description": "Next TUI request",
  9780. "content": {
  9781. "application/json": {
  9782. "schema": {
  9783. "type": "object",
  9784. "properties": {
  9785. "path": {
  9786. "type": "string"
  9787. },
  9788. "body": {}
  9789. },
  9790. "required": ["path", "body"],
  9791. "additionalProperties": false,
  9792. "description": "Next TUI request"
  9793. }
  9794. }
  9795. }
  9796. },
  9797. "400": {
  9798. "description": "Bad request",
  9799. "content": {
  9800. "application/json": {
  9801. "schema": {
  9802. "$ref": "#/components/schemas/BadRequestError"
  9803. }
  9804. }
  9805. }
  9806. }
  9807. },
  9808. "description": "Retrieve the next TUI request from the queue for processing.",
  9809. "summary": "Get next TUI request",
  9810. "x-codeSamples": [
  9811. {
  9812. "lang": "js",
  9813. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9814. }
  9815. ]
  9816. }
  9817. },
  9818. "/tui/control/response": {
  9819. "post": {
  9820. "tags": ["tui"],
  9821. "operationId": "tui.control.response",
  9822. "parameters": [
  9823. {
  9824. "name": "directory",
  9825. "in": "query",
  9826. "schema": {
  9827. "type": "string"
  9828. },
  9829. "required": false
  9830. },
  9831. {
  9832. "name": "workspace",
  9833. "in": "query",
  9834. "schema": {
  9835. "type": "string"
  9836. },
  9837. "required": false
  9838. }
  9839. ],
  9840. "responses": {
  9841. "200": {
  9842. "description": "Response submitted successfully",
  9843. "content": {
  9844. "application/json": {
  9845. "schema": {
  9846. "type": "boolean",
  9847. "description": "Response submitted successfully"
  9848. }
  9849. }
  9850. }
  9851. },
  9852. "400": {
  9853. "description": "Bad request",
  9854. "content": {
  9855. "application/json": {
  9856. "schema": {
  9857. "$ref": "#/components/schemas/BadRequestError"
  9858. }
  9859. }
  9860. }
  9861. }
  9862. },
  9863. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9864. "summary": "Submit TUI response",
  9865. "requestBody": {
  9866. "content": {
  9867. "application/json": {
  9868. "schema": {}
  9869. }
  9870. }
  9871. },
  9872. "x-codeSamples": [
  9873. {
  9874. "lang": "js",
  9875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9876. }
  9877. ]
  9878. }
  9879. },
  9880. "/experimental/workspace/adapter": {
  9881. "get": {
  9882. "tags": ["workspace"],
  9883. "operationId": "experimental.workspace.adapter.list",
  9884. "parameters": [
  9885. {
  9886. "name": "directory",
  9887. "in": "query",
  9888. "schema": {
  9889. "type": "string"
  9890. },
  9891. "required": false
  9892. },
  9893. {
  9894. "name": "workspace",
  9895. "in": "query",
  9896. "schema": {
  9897. "type": "string"
  9898. },
  9899. "required": false
  9900. }
  9901. ],
  9902. "responses": {
  9903. "200": {
  9904. "description": "Workspace adapters",
  9905. "content": {
  9906. "application/json": {
  9907. "schema": {
  9908. "type": "array",
  9909. "items": {
  9910. "type": "object",
  9911. "properties": {
  9912. "type": {
  9913. "type": "string"
  9914. },
  9915. "name": {
  9916. "type": "string"
  9917. },
  9918. "description": {
  9919. "type": "string"
  9920. }
  9921. },
  9922. "required": ["type", "name", "description"],
  9923. "additionalProperties": false
  9924. },
  9925. "description": "Workspace adapters"
  9926. }
  9927. }
  9928. }
  9929. },
  9930. "400": {
  9931. "description": "Bad request",
  9932. "content": {
  9933. "application/json": {
  9934. "schema": {
  9935. "$ref": "#/components/schemas/BadRequestError"
  9936. }
  9937. }
  9938. }
  9939. }
  9940. },
  9941. "description": "List all available workspace adapters for the current project.",
  9942. "summary": "List workspace adapters",
  9943. "x-codeSamples": [
  9944. {
  9945. "lang": "js",
  9946. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9947. }
  9948. ]
  9949. }
  9950. },
  9951. "/experimental/workspace": {
  9952. "get": {
  9953. "tags": ["workspace"],
  9954. "operationId": "experimental.workspace.list",
  9955. "parameters": [
  9956. {
  9957. "name": "directory",
  9958. "in": "query",
  9959. "schema": {
  9960. "type": "string"
  9961. },
  9962. "required": false
  9963. },
  9964. {
  9965. "name": "workspace",
  9966. "in": "query",
  9967. "schema": {
  9968. "type": "string"
  9969. },
  9970. "required": false
  9971. }
  9972. ],
  9973. "responses": {
  9974. "200": {
  9975. "description": "Workspaces",
  9976. "content": {
  9977. "application/json": {
  9978. "schema": {
  9979. "type": "array",
  9980. "items": {
  9981. "$ref": "#/components/schemas/Workspace"
  9982. },
  9983. "description": "Workspaces"
  9984. }
  9985. }
  9986. }
  9987. },
  9988. "400": {
  9989. "description": "Bad request",
  9990. "content": {
  9991. "application/json": {
  9992. "schema": {
  9993. "$ref": "#/components/schemas/BadRequestError"
  9994. }
  9995. }
  9996. }
  9997. }
  9998. },
  9999. "description": "List all workspaces.",
  10000. "summary": "List workspaces",
  10001. "x-codeSamples": [
  10002. {
  10003. "lang": "js",
  10004. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  10005. }
  10006. ]
  10007. },
  10008. "post": {
  10009. "tags": ["workspace"],
  10010. "operationId": "experimental.workspace.create",
  10011. "parameters": [
  10012. {
  10013. "name": "directory",
  10014. "in": "query",
  10015. "schema": {
  10016. "type": "string"
  10017. },
  10018. "required": false
  10019. },
  10020. {
  10021. "name": "workspace",
  10022. "in": "query",
  10023. "schema": {
  10024. "type": "string"
  10025. },
  10026. "required": false
  10027. }
  10028. ],
  10029. "responses": {
  10030. "200": {
  10031. "description": "Workspace created",
  10032. "content": {
  10033. "application/json": {
  10034. "schema": {
  10035. "$ref": "#/components/schemas/Workspace"
  10036. }
  10037. }
  10038. }
  10039. },
  10040. "400": {
  10041. "description": "BadRequest | InvalidRequestError",
  10042. "content": {
  10043. "application/json": {
  10044. "schema": {
  10045. "anyOf": [
  10046. {
  10047. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10048. },
  10049. {
  10050. "$ref": "#/components/schemas/InvalidRequestError"
  10051. }
  10052. ]
  10053. }
  10054. }
  10055. }
  10056. }
  10057. },
  10058. "description": "Create a workspace for the current project.",
  10059. "summary": "Create workspace",
  10060. "requestBody": {
  10061. "content": {
  10062. "application/json": {
  10063. "schema": {
  10064. "type": "object",
  10065. "properties": {
  10066. "id": {
  10067. "type": "string",
  10068. "pattern": "^wrk"
  10069. },
  10070. "type": {
  10071. "type": "string"
  10072. },
  10073. "branch": {
  10074. "anyOf": [
  10075. {
  10076. "type": "string"
  10077. },
  10078. {
  10079. "type": "null"
  10080. }
  10081. ]
  10082. },
  10083. "extra": {
  10084. "anyOf": [
  10085. {},
  10086. {
  10087. "type": "null"
  10088. }
  10089. ]
  10090. }
  10091. },
  10092. "required": ["type"],
  10093. "additionalProperties": false
  10094. }
  10095. }
  10096. }
  10097. },
  10098. "x-codeSamples": [
  10099. {
  10100. "lang": "js",
  10101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10102. }
  10103. ]
  10104. }
  10105. },
  10106. "/experimental/workspace/sync-list": {
  10107. "post": {
  10108. "tags": ["workspace"],
  10109. "operationId": "experimental.workspace.syncList",
  10110. "parameters": [
  10111. {
  10112. "name": "directory",
  10113. "in": "query",
  10114. "schema": {
  10115. "type": "string"
  10116. },
  10117. "required": false
  10118. },
  10119. {
  10120. "name": "workspace",
  10121. "in": "query",
  10122. "schema": {
  10123. "type": "string"
  10124. },
  10125. "required": false
  10126. }
  10127. ],
  10128. "responses": {
  10129. "204": {
  10130. "description": "Workspace list synced"
  10131. },
  10132. "400": {
  10133. "description": "Bad request",
  10134. "content": {
  10135. "application/json": {
  10136. "schema": {
  10137. "$ref": "#/components/schemas/BadRequestError"
  10138. }
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "description": "Register missing workspaces returned by workspace adapters.",
  10144. "summary": "Sync workspace list",
  10145. "x-codeSamples": [
  10146. {
  10147. "lang": "js",
  10148. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10149. }
  10150. ]
  10151. }
  10152. },
  10153. "/experimental/workspace/status": {
  10154. "get": {
  10155. "tags": ["workspace"],
  10156. "operationId": "experimental.workspace.status",
  10157. "parameters": [
  10158. {
  10159. "name": "directory",
  10160. "in": "query",
  10161. "schema": {
  10162. "type": "string"
  10163. },
  10164. "required": false
  10165. },
  10166. {
  10167. "name": "workspace",
  10168. "in": "query",
  10169. "schema": {
  10170. "type": "string"
  10171. },
  10172. "required": false
  10173. }
  10174. ],
  10175. "responses": {
  10176. "200": {
  10177. "description": "Workspace status",
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "type": "array",
  10182. "items": {
  10183. "type": "object",
  10184. "properties": {
  10185. "workspaceID": {
  10186. "type": "string",
  10187. "pattern": "^wrk"
  10188. },
  10189. "status": {
  10190. "type": "string",
  10191. "enum": ["connected", "connecting", "disconnected", "error"]
  10192. }
  10193. },
  10194. "required": ["workspaceID", "status"],
  10195. "additionalProperties": false
  10196. },
  10197. "description": "Workspace status"
  10198. }
  10199. }
  10200. }
  10201. },
  10202. "400": {
  10203. "description": "Bad request",
  10204. "content": {
  10205. "application/json": {
  10206. "schema": {
  10207. "$ref": "#/components/schemas/BadRequestError"
  10208. }
  10209. }
  10210. }
  10211. }
  10212. },
  10213. "description": "Get connection status for workspaces in the current project.",
  10214. "summary": "Workspace status",
  10215. "x-codeSamples": [
  10216. {
  10217. "lang": "js",
  10218. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10219. }
  10220. ]
  10221. }
  10222. },
  10223. "/experimental/workspace/{id}": {
  10224. "delete": {
  10225. "tags": ["workspace"],
  10226. "operationId": "experimental.workspace.remove",
  10227. "parameters": [
  10228. {
  10229. "name": "id",
  10230. "in": "path",
  10231. "schema": {
  10232. "type": "string",
  10233. "pattern": "^wrk"
  10234. },
  10235. "required": true
  10236. },
  10237. {
  10238. "name": "directory",
  10239. "in": "query",
  10240. "schema": {
  10241. "type": "string"
  10242. },
  10243. "required": false
  10244. },
  10245. {
  10246. "name": "workspace",
  10247. "in": "query",
  10248. "schema": {
  10249. "type": "string"
  10250. },
  10251. "required": false
  10252. }
  10253. ],
  10254. "responses": {
  10255. "200": {
  10256. "description": "Workspace removed",
  10257. "content": {
  10258. "application/json": {
  10259. "schema": {
  10260. "$ref": "#/components/schemas/Workspace"
  10261. }
  10262. }
  10263. }
  10264. },
  10265. "400": {
  10266. "description": "BadRequest | InvalidRequestError",
  10267. "content": {
  10268. "application/json": {
  10269. "schema": {
  10270. "anyOf": [
  10271. {
  10272. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10273. },
  10274. {
  10275. "$ref": "#/components/schemas/InvalidRequestError"
  10276. }
  10277. ]
  10278. }
  10279. }
  10280. }
  10281. }
  10282. },
  10283. "description": "Remove an existing workspace.",
  10284. "summary": "Remove workspace",
  10285. "x-codeSamples": [
  10286. {
  10287. "lang": "js",
  10288. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10289. }
  10290. ]
  10291. }
  10292. },
  10293. "/experimental/workspace/warp": {
  10294. "post": {
  10295. "tags": ["workspace"],
  10296. "operationId": "experimental.workspace.warp",
  10297. "parameters": [
  10298. {
  10299. "name": "directory",
  10300. "in": "query",
  10301. "schema": {
  10302. "type": "string"
  10303. },
  10304. "required": false
  10305. },
  10306. {
  10307. "name": "workspace",
  10308. "in": "query",
  10309. "schema": {
  10310. "type": "string"
  10311. },
  10312. "required": false
  10313. }
  10314. ],
  10315. "responses": {
  10316. "204": {
  10317. "description": "Session warped"
  10318. },
  10319. "400": {
  10320. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10321. "content": {
  10322. "application/json": {
  10323. "schema": {
  10324. "anyOf": [
  10325. {
  10326. "$ref": "#/components/schemas/WorkspaceWarpError"
  10327. },
  10328. {
  10329. "$ref": "#/components/schemas/VcsApplyError"
  10330. },
  10331. {
  10332. "$ref": "#/components/schemas/InvalidRequestError"
  10333. }
  10334. ]
  10335. }
  10336. }
  10337. }
  10338. },
  10339. "404": {
  10340. "description": "NotFoundError",
  10341. "content": {
  10342. "application/json": {
  10343. "schema": {
  10344. "$ref": "#/components/schemas/NotFoundError"
  10345. }
  10346. }
  10347. }
  10348. }
  10349. },
  10350. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10351. "summary": "Warp session into workspace",
  10352. "requestBody": {
  10353. "content": {
  10354. "application/json": {
  10355. "schema": {
  10356. "type": "object",
  10357. "properties": {
  10358. "id": {
  10359. "anyOf": [
  10360. {
  10361. "type": "string",
  10362. "pattern": "^wrk"
  10363. },
  10364. {
  10365. "type": "null"
  10366. }
  10367. ]
  10368. },
  10369. "sessionID": {
  10370. "type": "string",
  10371. "pattern": "^ses"
  10372. },
  10373. "copyChanges": {
  10374. "type": "boolean"
  10375. }
  10376. },
  10377. "required": ["id", "sessionID"],
  10378. "additionalProperties": false
  10379. }
  10380. }
  10381. }
  10382. },
  10383. "x-codeSamples": [
  10384. {
  10385. "lang": "js",
  10386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10387. }
  10388. ]
  10389. }
  10390. },
  10391. "/pty/{ptyID}/connect": {
  10392. "get": {
  10393. "tags": ["pty"],
  10394. "operationId": "pty.connect",
  10395. "parameters": [
  10396. {
  10397. "name": "ptyID",
  10398. "in": "path",
  10399. "schema": {
  10400. "type": "string",
  10401. "pattern": "^pty"
  10402. },
  10403. "required": true
  10404. },
  10405. {
  10406. "name": "directory",
  10407. "in": "query",
  10408. "schema": {
  10409. "type": "string"
  10410. },
  10411. "required": false
  10412. },
  10413. {
  10414. "name": "workspace",
  10415. "in": "query",
  10416. "schema": {
  10417. "type": "string"
  10418. },
  10419. "required": false
  10420. }
  10421. ],
  10422. "responses": {
  10423. "200": {
  10424. "description": "Connected session",
  10425. "content": {
  10426. "application/json": {
  10427. "schema": {
  10428. "type": "boolean",
  10429. "description": "Connected session"
  10430. }
  10431. }
  10432. }
  10433. },
  10434. "403": {
  10435. "description": "Forbidden",
  10436. "content": {
  10437. "application/json": {
  10438. "schema": {
  10439. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10440. }
  10441. }
  10442. }
  10443. },
  10444. "404": {
  10445. "description": "Not found",
  10446. "content": {
  10447. "application/json": {
  10448. "schema": {
  10449. "$ref": "#/components/schemas/NotFoundError"
  10450. }
  10451. }
  10452. }
  10453. }
  10454. },
  10455. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10456. "summary": "Connect to PTY session",
  10457. "x-codeSamples": [
  10458. {
  10459. "lang": "js",
  10460. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10461. }
  10462. ]
  10463. }
  10464. }
  10465. },
  10466. "components": {
  10467. "schemas": {
  10468. "Event": {
  10469. "anyOf": [
  10470. {
  10471. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10472. },
  10473. {
  10474. "$ref": "#/components/schemas/Event.tui.command.execute"
  10475. },
  10476. {
  10477. "$ref": "#/components/schemas/EventTuiToastShow1"
  10478. },
  10479. {
  10480. "$ref": "#/components/schemas/Event.tui.session.select"
  10481. },
  10482. {
  10483. "$ref": "#/components/schemas/EventServerConnected"
  10484. },
  10485. {
  10486. "$ref": "#/components/schemas/EventGlobalDisposed"
  10487. },
  10488. {
  10489. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10490. },
  10491. {
  10492. "$ref": "#/components/schemas/EventFileEdited"
  10493. },
  10494. {
  10495. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10496. },
  10497. {
  10498. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10499. },
  10500. {
  10501. "$ref": "#/components/schemas/EventLspUpdated"
  10502. },
  10503. {
  10504. "$ref": "#/components/schemas/EventMessagePartDelta"
  10505. },
  10506. {
  10507. "$ref": "#/components/schemas/EventPermissionAsked"
  10508. },
  10509. {
  10510. "$ref": "#/components/schemas/EventPermissionReplied"
  10511. },
  10512. {
  10513. "$ref": "#/components/schemas/EventSessionDiff"
  10514. },
  10515. {
  10516. "$ref": "#/components/schemas/EventSessionError"
  10517. },
  10518. {
  10519. "$ref": "#/components/schemas/EventQuestionAsked"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/EventQuestionReplied"
  10523. },
  10524. {
  10525. "$ref": "#/components/schemas/EventQuestionRejected"
  10526. },
  10527. {
  10528. "$ref": "#/components/schemas/EventTodoUpdated"
  10529. },
  10530. {
  10531. "$ref": "#/components/schemas/EventSessionStatus"
  10532. },
  10533. {
  10534. "$ref": "#/components/schemas/EventSessionIdle"
  10535. },
  10536. {
  10537. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10538. },
  10539. {
  10540. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10541. },
  10542. {
  10543. "$ref": "#/components/schemas/EventCommandExecuted"
  10544. },
  10545. {
  10546. "$ref": "#/components/schemas/EventProjectUpdated"
  10547. },
  10548. {
  10549. "$ref": "#/components/schemas/EventSessionCompacted"
  10550. },
  10551. {
  10552. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10553. },
  10554. {
  10555. "$ref": "#/components/schemas/EventWorkspaceReady"
  10556. },
  10557. {
  10558. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10559. },
  10560. {
  10561. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10562. },
  10563. {
  10564. "$ref": "#/components/schemas/EventWorktreeReady"
  10565. },
  10566. {
  10567. "$ref": "#/components/schemas/EventWorktreeFailed"
  10568. },
  10569. {
  10570. "$ref": "#/components/schemas/EventPtyCreated"
  10571. },
  10572. {
  10573. "$ref": "#/components/schemas/EventPtyUpdated"
  10574. },
  10575. {
  10576. "$ref": "#/components/schemas/EventPtyExited"
  10577. },
  10578. {
  10579. "$ref": "#/components/schemas/EventPtyDeleted"
  10580. },
  10581. {
  10582. "$ref": "#/components/schemas/EventInstallationUpdated"
  10583. },
  10584. {
  10585. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/EventMessageUpdated"
  10589. },
  10590. {
  10591. "$ref": "#/components/schemas/EventMessageRemoved"
  10592. },
  10593. {
  10594. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10595. },
  10596. {
  10597. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10598. },
  10599. {
  10600. "$ref": "#/components/schemas/EventSessionCreated"
  10601. },
  10602. {
  10603. "$ref": "#/components/schemas/EventSessionUpdated"
  10604. },
  10605. {
  10606. "$ref": "#/components/schemas/EventSessionDeleted"
  10607. },
  10608. {
  10609. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10610. },
  10611. {
  10612. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10613. },
  10614. {
  10615. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10616. },
  10617. {
  10618. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10619. },
  10620. {
  10621. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10622. },
  10623. {
  10624. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10625. },
  10626. {
  10627. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10628. },
  10629. {
  10630. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10631. },
  10632. {
  10633. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10634. },
  10635. {
  10636. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10637. },
  10638. {
  10639. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10640. },
  10641. {
  10642. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10643. },
  10644. {
  10645. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10646. },
  10647. {
  10648. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10649. },
  10650. {
  10651. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10652. },
  10653. {
  10654. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10655. },
  10656. {
  10657. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10658. },
  10659. {
  10660. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10661. },
  10662. {
  10663. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10664. },
  10665. {
  10666. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10667. },
  10668. {
  10669. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10673. },
  10674. {
  10675. "$ref": "#/components/schemas/EventSessionNextRetried"
  10676. },
  10677. {
  10678. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10682. },
  10683. {
  10684. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10685. },
  10686. {
  10687. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10688. },
  10689. {
  10690. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10691. },
  10692. {
  10693. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10694. },
  10695. {
  10696. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10697. },
  10698. {
  10699. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10700. },
  10701. {
  10702. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10703. },
  10704. {
  10705. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10706. },
  10707. {
  10708. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10709. },
  10710. {
  10711. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10712. },
  10713. {
  10714. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10715. },
  10716. {
  10717. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10718. },
  10719. {
  10720. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10721. },
  10722. {
  10723. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10724. },
  10725. {
  10726. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10727. },
  10728. {
  10729. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10730. },
  10731. {
  10732. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10733. },
  10734. {
  10735. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10736. },
  10737. {
  10738. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10739. },
  10740. {
  10741. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10742. },
  10743. {
  10744. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10745. },
  10746. {
  10747. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10751. },
  10752. {
  10753. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10754. },
  10755. {
  10756. "$ref": "#/components/schemas/EventSessionNextRetried"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10760. },
  10761. {
  10762. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10763. },
  10764. {
  10765. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10766. },
  10767. {
  10768. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10769. },
  10770. {
  10771. "$ref": "#/components/schemas/EventAccountAdded"
  10772. },
  10773. {
  10774. "$ref": "#/components/schemas/EventAccountRemoved"
  10775. },
  10776. {
  10777. "$ref": "#/components/schemas/EventAccountSwitched"
  10778. }
  10779. ]
  10780. },
  10781. "OAuth": {
  10782. "type": "object",
  10783. "properties": {
  10784. "type": {
  10785. "type": "string",
  10786. "enum": ["oauth"]
  10787. },
  10788. "refresh": {
  10789. "type": "string"
  10790. },
  10791. "access": {
  10792. "type": "string"
  10793. },
  10794. "expires": {
  10795. "type": "integer",
  10796. "minimum": 0
  10797. },
  10798. "accountId": {
  10799. "type": "string"
  10800. },
  10801. "enterpriseUrl": {
  10802. "type": "string"
  10803. }
  10804. },
  10805. "required": ["type", "refresh", "access", "expires"],
  10806. "additionalProperties": false
  10807. },
  10808. "ApiAuth": {
  10809. "type": "object",
  10810. "properties": {
  10811. "type": {
  10812. "type": "string",
  10813. "enum": ["api"]
  10814. },
  10815. "key": {
  10816. "type": "string"
  10817. },
  10818. "metadata": {
  10819. "type": "object",
  10820. "additionalProperties": {
  10821. "type": "string"
  10822. }
  10823. }
  10824. },
  10825. "required": ["type", "key"],
  10826. "additionalProperties": false
  10827. },
  10828. "WellKnownAuth": {
  10829. "type": "object",
  10830. "properties": {
  10831. "type": {
  10832. "type": "string",
  10833. "enum": ["wellknown"]
  10834. },
  10835. "key": {
  10836. "type": "string"
  10837. },
  10838. "token": {
  10839. "type": "string"
  10840. }
  10841. },
  10842. "required": ["type", "key", "token"],
  10843. "additionalProperties": false
  10844. },
  10845. "Auth": {
  10846. "anyOf": [
  10847. {
  10848. "$ref": "#/components/schemas/OAuth"
  10849. },
  10850. {
  10851. "$ref": "#/components/schemas/ApiAuth"
  10852. },
  10853. {
  10854. "$ref": "#/components/schemas/WellKnownAuth"
  10855. }
  10856. ]
  10857. },
  10858. "effect_HttpApiError_BadRequest": {
  10859. "type": "object",
  10860. "properties": {
  10861. "_tag": {
  10862. "type": "string",
  10863. "enum": ["BadRequest"]
  10864. }
  10865. },
  10866. "required": ["_tag"],
  10867. "additionalProperties": false
  10868. },
  10869. "InvalidRequestError": {
  10870. "type": "object",
  10871. "properties": {
  10872. "_tag": {
  10873. "type": "string",
  10874. "enum": ["InvalidRequestError"]
  10875. },
  10876. "message": {
  10877. "type": "string"
  10878. },
  10879. "kind": {
  10880. "type": "string"
  10881. },
  10882. "field": {
  10883. "type": "string"
  10884. }
  10885. },
  10886. "required": ["_tag", "message"],
  10887. "additionalProperties": false
  10888. },
  10889. "Event.tui.prompt.append": {
  10890. "type": "object",
  10891. "properties": {
  10892. "id": {
  10893. "type": "string"
  10894. },
  10895. "type": {
  10896. "type": "string",
  10897. "enum": ["tui.prompt.append"]
  10898. },
  10899. "properties": {
  10900. "type": "object",
  10901. "properties": {
  10902. "text": {
  10903. "type": "string"
  10904. }
  10905. },
  10906. "required": ["text"],
  10907. "additionalProperties": false
  10908. }
  10909. },
  10910. "required": ["id", "type", "properties"],
  10911. "additionalProperties": false
  10912. },
  10913. "Event.tui.command.execute": {
  10914. "type": "object",
  10915. "properties": {
  10916. "id": {
  10917. "type": "string"
  10918. },
  10919. "type": {
  10920. "type": "string",
  10921. "enum": ["tui.command.execute"]
  10922. },
  10923. "properties": {
  10924. "type": "object",
  10925. "properties": {
  10926. "command": {
  10927. "anyOf": [
  10928. {
  10929. "type": "string",
  10930. "enum": [
  10931. "session.list",
  10932. "session.new",
  10933. "session.share",
  10934. "session.interrupt",
  10935. "session.compact",
  10936. "session.page.up",
  10937. "session.page.down",
  10938. "session.line.up",
  10939. "session.line.down",
  10940. "session.half.page.up",
  10941. "session.half.page.down",
  10942. "session.first",
  10943. "session.last",
  10944. "prompt.clear",
  10945. "prompt.submit",
  10946. "agent.cycle"
  10947. ]
  10948. },
  10949. {
  10950. "type": "string"
  10951. }
  10952. ]
  10953. }
  10954. },
  10955. "required": ["command"],
  10956. "additionalProperties": false
  10957. }
  10958. },
  10959. "required": ["id", "type", "properties"],
  10960. "additionalProperties": false
  10961. },
  10962. "Event.tui.toast.show": {
  10963. "type": "object",
  10964. "properties": {
  10965. "id": {
  10966. "type": "string"
  10967. },
  10968. "type": {
  10969. "type": "string",
  10970. "enum": ["tui.toast.show"]
  10971. },
  10972. "properties": {
  10973. "type": "object",
  10974. "properties": {
  10975. "title": {
  10976. "type": "string"
  10977. },
  10978. "message": {
  10979. "type": "string"
  10980. },
  10981. "variant": {
  10982. "type": "string",
  10983. "enum": ["info", "success", "warning", "error"]
  10984. },
  10985. "duration": {
  10986. "type": "integer",
  10987. "exclusiveMinimum": 0
  10988. }
  10989. },
  10990. "required": ["message", "variant"],
  10991. "additionalProperties": false
  10992. }
  10993. },
  10994. "required": ["id", "type", "properties"],
  10995. "additionalProperties": false
  10996. },
  10997. "Event.tui.session.select": {
  10998. "type": "object",
  10999. "properties": {
  11000. "id": {
  11001. "type": "string"
  11002. },
  11003. "type": {
  11004. "type": "string",
  11005. "enum": ["tui.session.select"]
  11006. },
  11007. "properties": {
  11008. "type": "object",
  11009. "properties": {
  11010. "sessionID": {
  11011. "type": "string",
  11012. "pattern": "^ses",
  11013. "description": "Session ID to navigate to"
  11014. }
  11015. },
  11016. "required": ["sessionID"],
  11017. "additionalProperties": false
  11018. }
  11019. },
  11020. "required": ["id", "type", "properties"],
  11021. "additionalProperties": false
  11022. },
  11023. "PermissionRequest": {
  11024. "type": "object",
  11025. "properties": {
  11026. "id": {
  11027. "type": "string",
  11028. "pattern": "^per"
  11029. },
  11030. "sessionID": {
  11031. "type": "string",
  11032. "pattern": "^ses"
  11033. },
  11034. "permission": {
  11035. "type": "string"
  11036. },
  11037. "patterns": {
  11038. "type": "array",
  11039. "items": {
  11040. "type": "string"
  11041. }
  11042. },
  11043. "metadata": {
  11044. "type": "object"
  11045. },
  11046. "always": {
  11047. "type": "array",
  11048. "items": {
  11049. "type": "string"
  11050. }
  11051. },
  11052. "tool": {
  11053. "type": "object",
  11054. "properties": {
  11055. "messageID": {
  11056. "type": "string",
  11057. "pattern": "^msg"
  11058. },
  11059. "callID": {
  11060. "type": "string"
  11061. }
  11062. },
  11063. "required": ["messageID", "callID"],
  11064. "additionalProperties": false
  11065. }
  11066. },
  11067. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  11068. "additionalProperties": false
  11069. },
  11070. "SnapshotFileDiff": {
  11071. "type": "object",
  11072. "properties": {
  11073. "file": {
  11074. "type": "string"
  11075. },
  11076. "patch": {
  11077. "type": "string"
  11078. },
  11079. "additions": {
  11080. "type": "number"
  11081. },
  11082. "deletions": {
  11083. "type": "number"
  11084. },
  11085. "status": {
  11086. "type": "string",
  11087. "enum": ["added", "deleted", "modified"]
  11088. }
  11089. },
  11090. "required": ["additions", "deletions"],
  11091. "additionalProperties": false
  11092. },
  11093. "ProviderAuthError": {
  11094. "type": "object",
  11095. "properties": {
  11096. "name": {
  11097. "type": "string",
  11098. "enum": ["ProviderAuthError"]
  11099. },
  11100. "data": {
  11101. "type": "object",
  11102. "properties": {
  11103. "providerID": {
  11104. "type": "string"
  11105. },
  11106. "message": {
  11107. "type": "string"
  11108. }
  11109. },
  11110. "required": ["providerID", "message"],
  11111. "additionalProperties": false
  11112. }
  11113. },
  11114. "required": ["name", "data"],
  11115. "additionalProperties": false
  11116. },
  11117. "UnknownError": {
  11118. "type": "object",
  11119. "properties": {
  11120. "name": {
  11121. "type": "string",
  11122. "enum": ["UnknownError"]
  11123. },
  11124. "data": {
  11125. "type": "object",
  11126. "properties": {
  11127. "message": {
  11128. "type": "string"
  11129. },
  11130. "ref": {
  11131. "type": "string"
  11132. }
  11133. },
  11134. "required": ["message"],
  11135. "additionalProperties": false
  11136. }
  11137. },
  11138. "required": ["name", "data"],
  11139. "additionalProperties": false
  11140. },
  11141. "MessageOutputLengthError": {
  11142. "type": "object",
  11143. "properties": {
  11144. "name": {
  11145. "type": "string",
  11146. "enum": ["MessageOutputLengthError"]
  11147. },
  11148. "data": {
  11149. "type": "object",
  11150. "properties": {}
  11151. }
  11152. },
  11153. "required": ["name", "data"],
  11154. "additionalProperties": false
  11155. },
  11156. "MessageAbortedError": {
  11157. "type": "object",
  11158. "properties": {
  11159. "name": {
  11160. "type": "string",
  11161. "enum": ["MessageAbortedError"]
  11162. },
  11163. "data": {
  11164. "type": "object",
  11165. "properties": {
  11166. "message": {
  11167. "type": "string"
  11168. }
  11169. },
  11170. "required": ["message"],
  11171. "additionalProperties": false
  11172. }
  11173. },
  11174. "required": ["name", "data"],
  11175. "additionalProperties": false
  11176. },
  11177. "StructuredOutputError": {
  11178. "type": "object",
  11179. "properties": {
  11180. "name": {
  11181. "type": "string",
  11182. "enum": ["StructuredOutputError"]
  11183. },
  11184. "data": {
  11185. "type": "object",
  11186. "properties": {
  11187. "message": {
  11188. "type": "string"
  11189. },
  11190. "retries": {
  11191. "type": "integer",
  11192. "minimum": 0
  11193. }
  11194. },
  11195. "required": ["message", "retries"],
  11196. "additionalProperties": false
  11197. }
  11198. },
  11199. "required": ["name", "data"],
  11200. "additionalProperties": false
  11201. },
  11202. "ContextOverflowError": {
  11203. "type": "object",
  11204. "properties": {
  11205. "name": {
  11206. "type": "string",
  11207. "enum": ["ContextOverflowError"]
  11208. },
  11209. "data": {
  11210. "type": "object",
  11211. "properties": {
  11212. "message": {
  11213. "type": "string"
  11214. },
  11215. "responseBody": {
  11216. "type": "string"
  11217. }
  11218. },
  11219. "required": ["message"],
  11220. "additionalProperties": false
  11221. }
  11222. },
  11223. "required": ["name", "data"],
  11224. "additionalProperties": false
  11225. },
  11226. "APIError": {
  11227. "type": "object",
  11228. "properties": {
  11229. "name": {
  11230. "type": "string",
  11231. "enum": ["APIError"]
  11232. },
  11233. "data": {
  11234. "type": "object",
  11235. "properties": {
  11236. "message": {
  11237. "type": "string"
  11238. },
  11239. "statusCode": {
  11240. "type": "integer",
  11241. "minimum": 0
  11242. },
  11243. "isRetryable": {
  11244. "type": "boolean"
  11245. },
  11246. "responseHeaders": {
  11247. "type": "object",
  11248. "additionalProperties": {
  11249. "type": "string"
  11250. }
  11251. },
  11252. "responseBody": {
  11253. "type": "string"
  11254. },
  11255. "metadata": {
  11256. "type": "object",
  11257. "additionalProperties": {
  11258. "type": "string"
  11259. }
  11260. }
  11261. },
  11262. "required": ["message", "isRetryable"],
  11263. "additionalProperties": false
  11264. }
  11265. },
  11266. "required": ["name", "data"],
  11267. "additionalProperties": false
  11268. },
  11269. "QuestionOption": {
  11270. "type": "object",
  11271. "properties": {
  11272. "label": {
  11273. "type": "string",
  11274. "description": "Display text (1-5 words, concise)"
  11275. },
  11276. "description": {
  11277. "type": "string",
  11278. "description": "Explanation of choice"
  11279. }
  11280. },
  11281. "required": ["label", "description"],
  11282. "additionalProperties": false
  11283. },
  11284. "QuestionInfo": {
  11285. "type": "object",
  11286. "properties": {
  11287. "question": {
  11288. "type": "string",
  11289. "description": "Complete question"
  11290. },
  11291. "header": {
  11292. "type": "string",
  11293. "description": "Very short label (max 30 chars)"
  11294. },
  11295. "options": {
  11296. "type": "array",
  11297. "items": {
  11298. "$ref": "#/components/schemas/QuestionOption"
  11299. },
  11300. "description": "Available choices"
  11301. },
  11302. "multiple": {
  11303. "type": "boolean"
  11304. },
  11305. "custom": {
  11306. "type": "boolean"
  11307. }
  11308. },
  11309. "required": ["question", "header", "options"],
  11310. "additionalProperties": false
  11311. },
  11312. "QuestionTool": {
  11313. "type": "object",
  11314. "properties": {
  11315. "messageID": {
  11316. "type": "string",
  11317. "pattern": "^msg"
  11318. },
  11319. "callID": {
  11320. "type": "string"
  11321. }
  11322. },
  11323. "required": ["messageID", "callID"],
  11324. "additionalProperties": false
  11325. },
  11326. "QuestionRequest": {
  11327. "type": "object",
  11328. "properties": {
  11329. "id": {
  11330. "type": "string",
  11331. "pattern": "^que"
  11332. },
  11333. "sessionID": {
  11334. "type": "string",
  11335. "pattern": "^ses"
  11336. },
  11337. "questions": {
  11338. "type": "array",
  11339. "items": {
  11340. "$ref": "#/components/schemas/QuestionInfo"
  11341. },
  11342. "description": "Questions to ask"
  11343. },
  11344. "tool": {
  11345. "$ref": "#/components/schemas/QuestionTool"
  11346. }
  11347. },
  11348. "required": ["id", "sessionID", "questions"],
  11349. "additionalProperties": false
  11350. },
  11351. "QuestionAnswer": {
  11352. "type": "array",
  11353. "items": {
  11354. "type": "string"
  11355. }
  11356. },
  11357. "QuestionReplied": {
  11358. "type": "object",
  11359. "properties": {
  11360. "sessionID": {
  11361. "type": "string",
  11362. "pattern": "^ses"
  11363. },
  11364. "requestID": {
  11365. "type": "string",
  11366. "pattern": "^que"
  11367. },
  11368. "answers": {
  11369. "type": "array",
  11370. "items": {
  11371. "$ref": "#/components/schemas/QuestionAnswer"
  11372. }
  11373. }
  11374. },
  11375. "required": ["sessionID", "requestID", "answers"],
  11376. "additionalProperties": false
  11377. },
  11378. "QuestionRejected": {
  11379. "type": "object",
  11380. "properties": {
  11381. "sessionID": {
  11382. "type": "string",
  11383. "pattern": "^ses"
  11384. },
  11385. "requestID": {
  11386. "type": "string",
  11387. "pattern": "^que"
  11388. }
  11389. },
  11390. "required": ["sessionID", "requestID"],
  11391. "additionalProperties": false
  11392. },
  11393. "Todo": {
  11394. "type": "object",
  11395. "properties": {
  11396. "content": {
  11397. "type": "string",
  11398. "description": "Brief description of the task"
  11399. },
  11400. "status": {
  11401. "type": "string",
  11402. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11403. },
  11404. "priority": {
  11405. "type": "string",
  11406. "description": "Priority level of the task: high, medium, low"
  11407. }
  11408. },
  11409. "required": ["content", "status", "priority"],
  11410. "additionalProperties": false
  11411. },
  11412. "SessionStatus": {
  11413. "anyOf": [
  11414. {
  11415. "type": "object",
  11416. "properties": {
  11417. "type": {
  11418. "type": "string",
  11419. "enum": ["idle"]
  11420. }
  11421. },
  11422. "required": ["type"],
  11423. "additionalProperties": false
  11424. },
  11425. {
  11426. "type": "object",
  11427. "properties": {
  11428. "type": {
  11429. "type": "string",
  11430. "enum": ["retry"]
  11431. },
  11432. "attempt": {
  11433. "type": "integer",
  11434. "minimum": 0
  11435. },
  11436. "message": {
  11437. "type": "string"
  11438. },
  11439. "action": {
  11440. "type": "object",
  11441. "properties": {
  11442. "reason": {
  11443. "type": "string"
  11444. },
  11445. "provider": {
  11446. "type": "string"
  11447. },
  11448. "title": {
  11449. "type": "string"
  11450. },
  11451. "message": {
  11452. "type": "string"
  11453. },
  11454. "label": {
  11455. "type": "string"
  11456. },
  11457. "link": {
  11458. "type": "string"
  11459. }
  11460. },
  11461. "required": ["reason", "provider", "title", "message", "label"],
  11462. "additionalProperties": false
  11463. },
  11464. "next": {
  11465. "type": "integer",
  11466. "minimum": 0
  11467. }
  11468. },
  11469. "required": ["type", "attempt", "message", "next"],
  11470. "additionalProperties": false
  11471. },
  11472. {
  11473. "type": "object",
  11474. "properties": {
  11475. "type": {
  11476. "type": "string",
  11477. "enum": ["busy"]
  11478. }
  11479. },
  11480. "required": ["type"],
  11481. "additionalProperties": false
  11482. }
  11483. ]
  11484. },
  11485. "Project": {
  11486. "type": "object",
  11487. "properties": {
  11488. "id": {
  11489. "type": "string"
  11490. },
  11491. "worktree": {
  11492. "type": "string"
  11493. },
  11494. "vcs": {
  11495. "type": "string",
  11496. "enum": ["git"]
  11497. },
  11498. "name": {
  11499. "type": "string"
  11500. },
  11501. "icon": {
  11502. "type": "object",
  11503. "properties": {
  11504. "url": {
  11505. "type": "string"
  11506. },
  11507. "override": {
  11508. "type": "string"
  11509. },
  11510. "color": {
  11511. "type": "string"
  11512. }
  11513. },
  11514. "additionalProperties": false
  11515. },
  11516. "commands": {
  11517. "type": "object",
  11518. "properties": {
  11519. "start": {
  11520. "type": "string",
  11521. "description": "Startup script to run when creating a new workspace (worktree)"
  11522. }
  11523. },
  11524. "additionalProperties": false
  11525. },
  11526. "time": {
  11527. "type": "object",
  11528. "properties": {
  11529. "created": {
  11530. "type": "integer",
  11531. "minimum": 0
  11532. },
  11533. "updated": {
  11534. "type": "integer",
  11535. "minimum": 0
  11536. },
  11537. "initialized": {
  11538. "type": "integer",
  11539. "minimum": 0
  11540. }
  11541. },
  11542. "required": ["created", "updated"],
  11543. "additionalProperties": false
  11544. },
  11545. "sandboxes": {
  11546. "type": "array",
  11547. "items": {
  11548. "type": "string"
  11549. }
  11550. }
  11551. },
  11552. "required": ["id", "worktree", "time", "sandboxes"],
  11553. "additionalProperties": false
  11554. },
  11555. "Pty": {
  11556. "type": "object",
  11557. "properties": {
  11558. "id": {
  11559. "type": "string",
  11560. "pattern": "^pty"
  11561. },
  11562. "title": {
  11563. "type": "string"
  11564. },
  11565. "command": {
  11566. "type": "string"
  11567. },
  11568. "args": {
  11569. "type": "array",
  11570. "items": {
  11571. "type": "string"
  11572. }
  11573. },
  11574. "cwd": {
  11575. "type": "string"
  11576. },
  11577. "status": {
  11578. "type": "string",
  11579. "enum": ["running", "exited"]
  11580. },
  11581. "pid": {
  11582. "type": "integer",
  11583. "exclusiveMinimum": 0
  11584. }
  11585. },
  11586. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11587. "additionalProperties": false
  11588. },
  11589. "OutputFormatText": {
  11590. "type": "object",
  11591. "properties": {
  11592. "type": {
  11593. "type": "string",
  11594. "enum": ["text"]
  11595. }
  11596. },
  11597. "required": ["type"],
  11598. "additionalProperties": false
  11599. },
  11600. "JSONSchema": {
  11601. "type": "object"
  11602. },
  11603. "OutputFormatJsonSchema": {
  11604. "type": "object",
  11605. "properties": {
  11606. "type": {
  11607. "type": "string",
  11608. "enum": ["json_schema"]
  11609. },
  11610. "schema": {
  11611. "$ref": "#/components/schemas/JSONSchema"
  11612. },
  11613. "retryCount": {
  11614. "type": "integer",
  11615. "minimum": 0
  11616. }
  11617. },
  11618. "required": ["type", "schema"],
  11619. "additionalProperties": false
  11620. },
  11621. "OutputFormat": {
  11622. "anyOf": [
  11623. {
  11624. "$ref": "#/components/schemas/OutputFormatText"
  11625. },
  11626. {
  11627. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11628. }
  11629. ]
  11630. },
  11631. "UserMessage": {
  11632. "type": "object",
  11633. "properties": {
  11634. "id": {
  11635. "type": "string",
  11636. "pattern": "^msg"
  11637. },
  11638. "sessionID": {
  11639. "type": "string",
  11640. "pattern": "^ses"
  11641. },
  11642. "role": {
  11643. "type": "string",
  11644. "enum": ["user"]
  11645. },
  11646. "time": {
  11647. "type": "object",
  11648. "properties": {
  11649. "created": {
  11650. "type": "integer",
  11651. "minimum": 0
  11652. }
  11653. },
  11654. "required": ["created"],
  11655. "additionalProperties": false
  11656. },
  11657. "format": {
  11658. "$ref": "#/components/schemas/OutputFormat"
  11659. },
  11660. "summary": {
  11661. "type": "object",
  11662. "properties": {
  11663. "title": {
  11664. "type": "string"
  11665. },
  11666. "body": {
  11667. "type": "string"
  11668. },
  11669. "diffs": {
  11670. "type": "array",
  11671. "items": {
  11672. "$ref": "#/components/schemas/SnapshotFileDiff"
  11673. }
  11674. }
  11675. },
  11676. "required": ["diffs"],
  11677. "additionalProperties": false
  11678. },
  11679. "agent": {
  11680. "type": "string"
  11681. },
  11682. "model": {
  11683. "type": "object",
  11684. "properties": {
  11685. "providerID": {
  11686. "type": "string"
  11687. },
  11688. "modelID": {
  11689. "type": "string"
  11690. },
  11691. "variant": {
  11692. "type": "string"
  11693. }
  11694. },
  11695. "required": ["providerID", "modelID"],
  11696. "additionalProperties": false
  11697. },
  11698. "system": {
  11699. "type": "string"
  11700. },
  11701. "tools": {
  11702. "type": "object",
  11703. "additionalProperties": {
  11704. "type": "boolean"
  11705. }
  11706. }
  11707. },
  11708. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11709. "additionalProperties": false
  11710. },
  11711. "AssistantMessage": {
  11712. "type": "object",
  11713. "properties": {
  11714. "id": {
  11715. "type": "string",
  11716. "pattern": "^msg"
  11717. },
  11718. "sessionID": {
  11719. "type": "string",
  11720. "pattern": "^ses"
  11721. },
  11722. "role": {
  11723. "type": "string",
  11724. "enum": ["assistant"]
  11725. },
  11726. "time": {
  11727. "type": "object",
  11728. "properties": {
  11729. "created": {
  11730. "type": "integer",
  11731. "minimum": 0
  11732. },
  11733. "completed": {
  11734. "type": "integer",
  11735. "minimum": 0
  11736. }
  11737. },
  11738. "required": ["created"],
  11739. "additionalProperties": false
  11740. },
  11741. "error": {
  11742. "anyOf": [
  11743. {
  11744. "$ref": "#/components/schemas/ProviderAuthError"
  11745. },
  11746. {
  11747. "$ref": "#/components/schemas/UnknownError"
  11748. },
  11749. {
  11750. "$ref": "#/components/schemas/MessageOutputLengthError"
  11751. },
  11752. {
  11753. "$ref": "#/components/schemas/MessageAbortedError"
  11754. },
  11755. {
  11756. "$ref": "#/components/schemas/StructuredOutputError"
  11757. },
  11758. {
  11759. "$ref": "#/components/schemas/ContextOverflowError"
  11760. },
  11761. {
  11762. "$ref": "#/components/schemas/APIError"
  11763. }
  11764. ]
  11765. },
  11766. "parentID": {
  11767. "type": "string",
  11768. "pattern": "^msg"
  11769. },
  11770. "modelID": {
  11771. "type": "string"
  11772. },
  11773. "providerID": {
  11774. "type": "string"
  11775. },
  11776. "mode": {
  11777. "type": "string"
  11778. },
  11779. "agent": {
  11780. "type": "string"
  11781. },
  11782. "path": {
  11783. "type": "object",
  11784. "properties": {
  11785. "cwd": {
  11786. "type": "string"
  11787. },
  11788. "root": {
  11789. "type": "string"
  11790. }
  11791. },
  11792. "required": ["cwd", "root"],
  11793. "additionalProperties": false
  11794. },
  11795. "summary": {
  11796. "type": "boolean"
  11797. },
  11798. "cost": {
  11799. "type": "number"
  11800. },
  11801. "tokens": {
  11802. "type": "object",
  11803. "properties": {
  11804. "total": {
  11805. "type": "number"
  11806. },
  11807. "input": {
  11808. "type": "number"
  11809. },
  11810. "output": {
  11811. "type": "number"
  11812. },
  11813. "reasoning": {
  11814. "type": "number"
  11815. },
  11816. "cache": {
  11817. "type": "object",
  11818. "properties": {
  11819. "read": {
  11820. "type": "number"
  11821. },
  11822. "write": {
  11823. "type": "number"
  11824. }
  11825. },
  11826. "required": ["read", "write"],
  11827. "additionalProperties": false
  11828. }
  11829. },
  11830. "required": ["input", "output", "reasoning", "cache"],
  11831. "additionalProperties": false
  11832. },
  11833. "structured": {},
  11834. "variant": {
  11835. "type": "string"
  11836. },
  11837. "finish": {
  11838. "type": "string"
  11839. }
  11840. },
  11841. "required": [
  11842. "id",
  11843. "sessionID",
  11844. "role",
  11845. "time",
  11846. "parentID",
  11847. "modelID",
  11848. "providerID",
  11849. "mode",
  11850. "agent",
  11851. "path",
  11852. "cost",
  11853. "tokens"
  11854. ],
  11855. "additionalProperties": false
  11856. },
  11857. "Message": {
  11858. "anyOf": [
  11859. {
  11860. "$ref": "#/components/schemas/UserMessage"
  11861. },
  11862. {
  11863. "$ref": "#/components/schemas/AssistantMessage"
  11864. }
  11865. ]
  11866. },
  11867. "TextPart": {
  11868. "type": "object",
  11869. "properties": {
  11870. "id": {
  11871. "type": "string",
  11872. "pattern": "^prt"
  11873. },
  11874. "sessionID": {
  11875. "type": "string",
  11876. "pattern": "^ses"
  11877. },
  11878. "messageID": {
  11879. "type": "string",
  11880. "pattern": "^msg"
  11881. },
  11882. "type": {
  11883. "type": "string",
  11884. "enum": ["text"]
  11885. },
  11886. "text": {
  11887. "type": "string"
  11888. },
  11889. "synthetic": {
  11890. "type": "boolean"
  11891. },
  11892. "ignored": {
  11893. "type": "boolean"
  11894. },
  11895. "time": {
  11896. "type": "object",
  11897. "properties": {
  11898. "start": {
  11899. "type": "integer",
  11900. "minimum": 0
  11901. },
  11902. "end": {
  11903. "type": "integer",
  11904. "minimum": 0
  11905. }
  11906. },
  11907. "required": ["start"],
  11908. "additionalProperties": false
  11909. },
  11910. "metadata": {
  11911. "type": "object"
  11912. }
  11913. },
  11914. "required": ["id", "sessionID", "messageID", "type", "text"],
  11915. "additionalProperties": false
  11916. },
  11917. "SubtaskPart": {
  11918. "type": "object",
  11919. "properties": {
  11920. "id": {
  11921. "type": "string",
  11922. "pattern": "^prt"
  11923. },
  11924. "sessionID": {
  11925. "type": "string",
  11926. "pattern": "^ses"
  11927. },
  11928. "messageID": {
  11929. "type": "string",
  11930. "pattern": "^msg"
  11931. },
  11932. "type": {
  11933. "type": "string",
  11934. "enum": ["subtask"]
  11935. },
  11936. "prompt": {
  11937. "type": "string"
  11938. },
  11939. "description": {
  11940. "type": "string"
  11941. },
  11942. "agent": {
  11943. "type": "string"
  11944. },
  11945. "model": {
  11946. "type": "object",
  11947. "properties": {
  11948. "providerID": {
  11949. "type": "string"
  11950. },
  11951. "modelID": {
  11952. "type": "string"
  11953. }
  11954. },
  11955. "required": ["providerID", "modelID"],
  11956. "additionalProperties": false
  11957. },
  11958. "command": {
  11959. "type": "string"
  11960. }
  11961. },
  11962. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11963. "additionalProperties": false
  11964. },
  11965. "ReasoningPart": {
  11966. "type": "object",
  11967. "properties": {
  11968. "id": {
  11969. "type": "string",
  11970. "pattern": "^prt"
  11971. },
  11972. "sessionID": {
  11973. "type": "string",
  11974. "pattern": "^ses"
  11975. },
  11976. "messageID": {
  11977. "type": "string",
  11978. "pattern": "^msg"
  11979. },
  11980. "type": {
  11981. "type": "string",
  11982. "enum": ["reasoning"]
  11983. },
  11984. "text": {
  11985. "type": "string"
  11986. },
  11987. "metadata": {
  11988. "type": "object"
  11989. },
  11990. "time": {
  11991. "type": "object",
  11992. "properties": {
  11993. "start": {
  11994. "type": "integer",
  11995. "minimum": 0
  11996. },
  11997. "end": {
  11998. "type": "integer",
  11999. "minimum": 0
  12000. }
  12001. },
  12002. "required": ["start"],
  12003. "additionalProperties": false
  12004. }
  12005. },
  12006. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  12007. "additionalProperties": false
  12008. },
  12009. "FilePartSourceText": {
  12010. "type": "object",
  12011. "properties": {
  12012. "value": {
  12013. "type": "string"
  12014. },
  12015. "start": {
  12016. "type": "number"
  12017. },
  12018. "end": {
  12019. "type": "number"
  12020. }
  12021. },
  12022. "required": ["value", "start", "end"],
  12023. "additionalProperties": false
  12024. },
  12025. "FileSource": {
  12026. "type": "object",
  12027. "properties": {
  12028. "text": {
  12029. "$ref": "#/components/schemas/FilePartSourceText"
  12030. },
  12031. "type": {
  12032. "type": "string",
  12033. "enum": ["file"]
  12034. },
  12035. "path": {
  12036. "type": "string"
  12037. }
  12038. },
  12039. "required": ["text", "type", "path"],
  12040. "additionalProperties": false
  12041. },
  12042. "Range": {
  12043. "type": "object",
  12044. "properties": {
  12045. "start": {
  12046. "type": "object",
  12047. "properties": {
  12048. "line": {
  12049. "type": "integer",
  12050. "minimum": 0
  12051. },
  12052. "character": {
  12053. "type": "integer",
  12054. "minimum": 0
  12055. }
  12056. },
  12057. "required": ["line", "character"],
  12058. "additionalProperties": false
  12059. },
  12060. "end": {
  12061. "type": "object",
  12062. "properties": {
  12063. "line": {
  12064. "type": "integer",
  12065. "minimum": 0
  12066. },
  12067. "character": {
  12068. "type": "integer",
  12069. "minimum": 0
  12070. }
  12071. },
  12072. "required": ["line", "character"],
  12073. "additionalProperties": false
  12074. }
  12075. },
  12076. "required": ["start", "end"],
  12077. "additionalProperties": false
  12078. },
  12079. "SymbolSource": {
  12080. "type": "object",
  12081. "properties": {
  12082. "text": {
  12083. "$ref": "#/components/schemas/FilePartSourceText"
  12084. },
  12085. "type": {
  12086. "type": "string",
  12087. "enum": ["symbol"]
  12088. },
  12089. "path": {
  12090. "type": "string"
  12091. },
  12092. "range": {
  12093. "$ref": "#/components/schemas/Range"
  12094. },
  12095. "name": {
  12096. "type": "string"
  12097. },
  12098. "kind": {
  12099. "type": "integer",
  12100. "minimum": 0
  12101. }
  12102. },
  12103. "required": ["text", "type", "path", "range", "name", "kind"],
  12104. "additionalProperties": false
  12105. },
  12106. "ResourceSource": {
  12107. "type": "object",
  12108. "properties": {
  12109. "text": {
  12110. "$ref": "#/components/schemas/FilePartSourceText"
  12111. },
  12112. "type": {
  12113. "type": "string",
  12114. "enum": ["resource"]
  12115. },
  12116. "clientName": {
  12117. "type": "string"
  12118. },
  12119. "uri": {
  12120. "type": "string"
  12121. }
  12122. },
  12123. "required": ["text", "type", "clientName", "uri"],
  12124. "additionalProperties": false
  12125. },
  12126. "FilePartSource": {
  12127. "anyOf": [
  12128. {
  12129. "$ref": "#/components/schemas/FileSource"
  12130. },
  12131. {
  12132. "$ref": "#/components/schemas/SymbolSource"
  12133. },
  12134. {
  12135. "$ref": "#/components/schemas/ResourceSource"
  12136. }
  12137. ]
  12138. },
  12139. "FilePart": {
  12140. "type": "object",
  12141. "properties": {
  12142. "id": {
  12143. "type": "string",
  12144. "pattern": "^prt"
  12145. },
  12146. "sessionID": {
  12147. "type": "string",
  12148. "pattern": "^ses"
  12149. },
  12150. "messageID": {
  12151. "type": "string",
  12152. "pattern": "^msg"
  12153. },
  12154. "type": {
  12155. "type": "string",
  12156. "enum": ["file"]
  12157. },
  12158. "mime": {
  12159. "type": "string"
  12160. },
  12161. "filename": {
  12162. "type": "string"
  12163. },
  12164. "url": {
  12165. "type": "string"
  12166. },
  12167. "source": {
  12168. "$ref": "#/components/schemas/FilePartSource"
  12169. }
  12170. },
  12171. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12172. "additionalProperties": false
  12173. },
  12174. "ToolStatePending": {
  12175. "type": "object",
  12176. "properties": {
  12177. "status": {
  12178. "type": "string",
  12179. "enum": ["pending"]
  12180. },
  12181. "input": {
  12182. "type": "object"
  12183. },
  12184. "raw": {
  12185. "type": "string"
  12186. }
  12187. },
  12188. "required": ["status", "input", "raw"],
  12189. "additionalProperties": false
  12190. },
  12191. "ToolStateRunning": {
  12192. "type": "object",
  12193. "properties": {
  12194. "status": {
  12195. "type": "string",
  12196. "enum": ["running"]
  12197. },
  12198. "input": {
  12199. "type": "object"
  12200. },
  12201. "title": {
  12202. "type": "string"
  12203. },
  12204. "metadata": {
  12205. "type": "object"
  12206. },
  12207. "time": {
  12208. "type": "object",
  12209. "properties": {
  12210. "start": {
  12211. "type": "integer",
  12212. "minimum": 0
  12213. }
  12214. },
  12215. "required": ["start"],
  12216. "additionalProperties": false
  12217. }
  12218. },
  12219. "required": ["status", "input", "time"],
  12220. "additionalProperties": false
  12221. },
  12222. "ToolStateCompleted": {
  12223. "type": "object",
  12224. "properties": {
  12225. "status": {
  12226. "type": "string",
  12227. "enum": ["completed"]
  12228. },
  12229. "input": {
  12230. "type": "object"
  12231. },
  12232. "output": {
  12233. "type": "string"
  12234. },
  12235. "title": {
  12236. "type": "string"
  12237. },
  12238. "metadata": {
  12239. "type": "object"
  12240. },
  12241. "time": {
  12242. "type": "object",
  12243. "properties": {
  12244. "start": {
  12245. "type": "integer",
  12246. "minimum": 0
  12247. },
  12248. "end": {
  12249. "type": "integer",
  12250. "minimum": 0
  12251. },
  12252. "compacted": {
  12253. "type": "integer",
  12254. "minimum": 0
  12255. }
  12256. },
  12257. "required": ["start", "end"],
  12258. "additionalProperties": false
  12259. },
  12260. "attachments": {
  12261. "type": "array",
  12262. "items": {
  12263. "$ref": "#/components/schemas/FilePart"
  12264. }
  12265. }
  12266. },
  12267. "required": ["status", "input", "output", "title", "metadata", "time"],
  12268. "additionalProperties": false
  12269. },
  12270. "ToolStateError": {
  12271. "type": "object",
  12272. "properties": {
  12273. "status": {
  12274. "type": "string",
  12275. "enum": ["error"]
  12276. },
  12277. "input": {
  12278. "type": "object"
  12279. },
  12280. "error": {
  12281. "type": "string"
  12282. },
  12283. "metadata": {
  12284. "type": "object"
  12285. },
  12286. "time": {
  12287. "type": "object",
  12288. "properties": {
  12289. "start": {
  12290. "type": "integer",
  12291. "minimum": 0
  12292. },
  12293. "end": {
  12294. "type": "integer",
  12295. "minimum": 0
  12296. }
  12297. },
  12298. "required": ["start", "end"],
  12299. "additionalProperties": false
  12300. }
  12301. },
  12302. "required": ["status", "input", "error", "time"],
  12303. "additionalProperties": false
  12304. },
  12305. "ToolState": {
  12306. "anyOf": [
  12307. {
  12308. "$ref": "#/components/schemas/ToolStatePending"
  12309. },
  12310. {
  12311. "$ref": "#/components/schemas/ToolStateRunning"
  12312. },
  12313. {
  12314. "$ref": "#/components/schemas/ToolStateCompleted"
  12315. },
  12316. {
  12317. "$ref": "#/components/schemas/ToolStateError"
  12318. }
  12319. ]
  12320. },
  12321. "ToolPart": {
  12322. "type": "object",
  12323. "properties": {
  12324. "id": {
  12325. "type": "string",
  12326. "pattern": "^prt"
  12327. },
  12328. "sessionID": {
  12329. "type": "string",
  12330. "pattern": "^ses"
  12331. },
  12332. "messageID": {
  12333. "type": "string",
  12334. "pattern": "^msg"
  12335. },
  12336. "type": {
  12337. "type": "string",
  12338. "enum": ["tool"]
  12339. },
  12340. "callID": {
  12341. "type": "string"
  12342. },
  12343. "tool": {
  12344. "type": "string"
  12345. },
  12346. "state": {
  12347. "$ref": "#/components/schemas/ToolState"
  12348. },
  12349. "metadata": {
  12350. "type": "object"
  12351. }
  12352. },
  12353. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12354. "additionalProperties": false
  12355. },
  12356. "StepStartPart": {
  12357. "type": "object",
  12358. "properties": {
  12359. "id": {
  12360. "type": "string",
  12361. "pattern": "^prt"
  12362. },
  12363. "sessionID": {
  12364. "type": "string",
  12365. "pattern": "^ses"
  12366. },
  12367. "messageID": {
  12368. "type": "string",
  12369. "pattern": "^msg"
  12370. },
  12371. "type": {
  12372. "type": "string",
  12373. "enum": ["step-start"]
  12374. },
  12375. "snapshot": {
  12376. "type": "string"
  12377. }
  12378. },
  12379. "required": ["id", "sessionID", "messageID", "type"],
  12380. "additionalProperties": false
  12381. },
  12382. "StepFinishPart": {
  12383. "type": "object",
  12384. "properties": {
  12385. "id": {
  12386. "type": "string",
  12387. "pattern": "^prt"
  12388. },
  12389. "sessionID": {
  12390. "type": "string",
  12391. "pattern": "^ses"
  12392. },
  12393. "messageID": {
  12394. "type": "string",
  12395. "pattern": "^msg"
  12396. },
  12397. "type": {
  12398. "type": "string",
  12399. "enum": ["step-finish"]
  12400. },
  12401. "reason": {
  12402. "type": "string"
  12403. },
  12404. "snapshot": {
  12405. "type": "string"
  12406. },
  12407. "cost": {
  12408. "type": "number"
  12409. },
  12410. "tokens": {
  12411. "type": "object",
  12412. "properties": {
  12413. "total": {
  12414. "type": "number"
  12415. },
  12416. "input": {
  12417. "type": "number"
  12418. },
  12419. "output": {
  12420. "type": "number"
  12421. },
  12422. "reasoning": {
  12423. "type": "number"
  12424. },
  12425. "cache": {
  12426. "type": "object",
  12427. "properties": {
  12428. "read": {
  12429. "type": "number"
  12430. },
  12431. "write": {
  12432. "type": "number"
  12433. }
  12434. },
  12435. "required": ["read", "write"],
  12436. "additionalProperties": false
  12437. }
  12438. },
  12439. "required": ["input", "output", "reasoning", "cache"],
  12440. "additionalProperties": false
  12441. }
  12442. },
  12443. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12444. "additionalProperties": false
  12445. },
  12446. "SnapshotPart": {
  12447. "type": "object",
  12448. "properties": {
  12449. "id": {
  12450. "type": "string",
  12451. "pattern": "^prt"
  12452. },
  12453. "sessionID": {
  12454. "type": "string",
  12455. "pattern": "^ses"
  12456. },
  12457. "messageID": {
  12458. "type": "string",
  12459. "pattern": "^msg"
  12460. },
  12461. "type": {
  12462. "type": "string",
  12463. "enum": ["snapshot"]
  12464. },
  12465. "snapshot": {
  12466. "type": "string"
  12467. }
  12468. },
  12469. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12470. "additionalProperties": false
  12471. },
  12472. "PatchPart": {
  12473. "type": "object",
  12474. "properties": {
  12475. "id": {
  12476. "type": "string",
  12477. "pattern": "^prt"
  12478. },
  12479. "sessionID": {
  12480. "type": "string",
  12481. "pattern": "^ses"
  12482. },
  12483. "messageID": {
  12484. "type": "string",
  12485. "pattern": "^msg"
  12486. },
  12487. "type": {
  12488. "type": "string",
  12489. "enum": ["patch"]
  12490. },
  12491. "hash": {
  12492. "type": "string"
  12493. },
  12494. "files": {
  12495. "type": "array",
  12496. "items": {
  12497. "type": "string"
  12498. }
  12499. }
  12500. },
  12501. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12502. "additionalProperties": false
  12503. },
  12504. "AgentPart": {
  12505. "type": "object",
  12506. "properties": {
  12507. "id": {
  12508. "type": "string",
  12509. "pattern": "^prt"
  12510. },
  12511. "sessionID": {
  12512. "type": "string",
  12513. "pattern": "^ses"
  12514. },
  12515. "messageID": {
  12516. "type": "string",
  12517. "pattern": "^msg"
  12518. },
  12519. "type": {
  12520. "type": "string",
  12521. "enum": ["agent"]
  12522. },
  12523. "name": {
  12524. "type": "string"
  12525. },
  12526. "source": {
  12527. "type": "object",
  12528. "properties": {
  12529. "value": {
  12530. "type": "string"
  12531. },
  12532. "start": {
  12533. "type": "integer",
  12534. "minimum": 0
  12535. },
  12536. "end": {
  12537. "type": "integer",
  12538. "minimum": 0
  12539. }
  12540. },
  12541. "required": ["value", "start", "end"],
  12542. "additionalProperties": false
  12543. }
  12544. },
  12545. "required": ["id", "sessionID", "messageID", "type", "name"],
  12546. "additionalProperties": false
  12547. },
  12548. "RetryPart": {
  12549. "type": "object",
  12550. "properties": {
  12551. "id": {
  12552. "type": "string",
  12553. "pattern": "^prt"
  12554. },
  12555. "sessionID": {
  12556. "type": "string",
  12557. "pattern": "^ses"
  12558. },
  12559. "messageID": {
  12560. "type": "string",
  12561. "pattern": "^msg"
  12562. },
  12563. "type": {
  12564. "type": "string",
  12565. "enum": ["retry"]
  12566. },
  12567. "attempt": {
  12568. "type": "integer",
  12569. "minimum": 0
  12570. },
  12571. "error": {
  12572. "$ref": "#/components/schemas/APIError"
  12573. },
  12574. "time": {
  12575. "type": "object",
  12576. "properties": {
  12577. "created": {
  12578. "type": "integer",
  12579. "minimum": 0
  12580. }
  12581. },
  12582. "required": ["created"],
  12583. "additionalProperties": false
  12584. }
  12585. },
  12586. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12587. "additionalProperties": false
  12588. },
  12589. "CompactionPart": {
  12590. "type": "object",
  12591. "properties": {
  12592. "id": {
  12593. "type": "string",
  12594. "pattern": "^prt"
  12595. },
  12596. "sessionID": {
  12597. "type": "string",
  12598. "pattern": "^ses"
  12599. },
  12600. "messageID": {
  12601. "type": "string",
  12602. "pattern": "^msg"
  12603. },
  12604. "type": {
  12605. "type": "string",
  12606. "enum": ["compaction"]
  12607. },
  12608. "auto": {
  12609. "type": "boolean"
  12610. },
  12611. "overflow": {
  12612. "type": "boolean"
  12613. },
  12614. "tail_start_id": {
  12615. "type": "string",
  12616. "pattern": "^msg"
  12617. }
  12618. },
  12619. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12620. "additionalProperties": false
  12621. },
  12622. "Part": {
  12623. "anyOf": [
  12624. {
  12625. "$ref": "#/components/schemas/TextPart"
  12626. },
  12627. {
  12628. "$ref": "#/components/schemas/SubtaskPart"
  12629. },
  12630. {
  12631. "$ref": "#/components/schemas/ReasoningPart"
  12632. },
  12633. {
  12634. "$ref": "#/components/schemas/FilePart"
  12635. },
  12636. {
  12637. "$ref": "#/components/schemas/ToolPart"
  12638. },
  12639. {
  12640. "$ref": "#/components/schemas/StepStartPart"
  12641. },
  12642. {
  12643. "$ref": "#/components/schemas/StepFinishPart"
  12644. },
  12645. {
  12646. "$ref": "#/components/schemas/SnapshotPart"
  12647. },
  12648. {
  12649. "$ref": "#/components/schemas/PatchPart"
  12650. },
  12651. {
  12652. "$ref": "#/components/schemas/AgentPart"
  12653. },
  12654. {
  12655. "$ref": "#/components/schemas/RetryPart"
  12656. },
  12657. {
  12658. "$ref": "#/components/schemas/CompactionPart"
  12659. }
  12660. ]
  12661. },
  12662. "PermissionAction": {
  12663. "type": "string",
  12664. "enum": ["allow", "deny", "ask"]
  12665. },
  12666. "PermissionRule": {
  12667. "type": "object",
  12668. "properties": {
  12669. "permission": {
  12670. "type": "string"
  12671. },
  12672. "pattern": {
  12673. "type": "string"
  12674. },
  12675. "action": {
  12676. "$ref": "#/components/schemas/PermissionAction"
  12677. }
  12678. },
  12679. "required": ["permission", "pattern", "action"],
  12680. "additionalProperties": false
  12681. },
  12682. "PermissionRuleset": {
  12683. "type": "array",
  12684. "items": {
  12685. "$ref": "#/components/schemas/PermissionRule"
  12686. }
  12687. },
  12688. "Session": {
  12689. "type": "object",
  12690. "properties": {
  12691. "id": {
  12692. "type": "string",
  12693. "pattern": "^ses"
  12694. },
  12695. "slug": {
  12696. "type": "string"
  12697. },
  12698. "projectID": {
  12699. "type": "string"
  12700. },
  12701. "workspaceID": {
  12702. "type": "string",
  12703. "pattern": "^wrk"
  12704. },
  12705. "directory": {
  12706. "type": "string"
  12707. },
  12708. "path": {
  12709. "type": "string"
  12710. },
  12711. "parentID": {
  12712. "type": "string",
  12713. "pattern": "^ses"
  12714. },
  12715. "summary": {
  12716. "type": "object",
  12717. "properties": {
  12718. "additions": {
  12719. "type": "number"
  12720. },
  12721. "deletions": {
  12722. "type": "number"
  12723. },
  12724. "files": {
  12725. "type": "number"
  12726. },
  12727. "diffs": {
  12728. "type": "array",
  12729. "items": {
  12730. "$ref": "#/components/schemas/SnapshotFileDiff"
  12731. }
  12732. }
  12733. },
  12734. "required": ["additions", "deletions", "files"],
  12735. "additionalProperties": false
  12736. },
  12737. "cost": {
  12738. "type": "number"
  12739. },
  12740. "tokens": {
  12741. "type": "object",
  12742. "properties": {
  12743. "input": {
  12744. "type": "number"
  12745. },
  12746. "output": {
  12747. "type": "number"
  12748. },
  12749. "reasoning": {
  12750. "type": "number"
  12751. },
  12752. "cache": {
  12753. "type": "object",
  12754. "properties": {
  12755. "read": {
  12756. "type": "number"
  12757. },
  12758. "write": {
  12759. "type": "number"
  12760. }
  12761. },
  12762. "required": ["read", "write"],
  12763. "additionalProperties": false
  12764. }
  12765. },
  12766. "required": ["input", "output", "reasoning", "cache"],
  12767. "additionalProperties": false
  12768. },
  12769. "share": {
  12770. "type": "object",
  12771. "properties": {
  12772. "url": {
  12773. "type": "string"
  12774. }
  12775. },
  12776. "required": ["url"],
  12777. "additionalProperties": false
  12778. },
  12779. "title": {
  12780. "type": "string"
  12781. },
  12782. "agent": {
  12783. "type": "string"
  12784. },
  12785. "model": {
  12786. "type": "object",
  12787. "properties": {
  12788. "id": {
  12789. "type": "string"
  12790. },
  12791. "providerID": {
  12792. "type": "string"
  12793. },
  12794. "variant": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "required": ["id", "providerID"],
  12799. "additionalProperties": false
  12800. },
  12801. "version": {
  12802. "type": "string"
  12803. },
  12804. "time": {
  12805. "type": "object",
  12806. "properties": {
  12807. "created": {
  12808. "type": "integer",
  12809. "minimum": 0
  12810. },
  12811. "updated": {
  12812. "type": "integer",
  12813. "minimum": 0
  12814. },
  12815. "compacting": {
  12816. "type": "integer",
  12817. "minimum": 0
  12818. },
  12819. "archived": {
  12820. "type": "number"
  12821. }
  12822. },
  12823. "required": ["created", "updated"],
  12824. "additionalProperties": false
  12825. },
  12826. "permission": {
  12827. "$ref": "#/components/schemas/PermissionRuleset"
  12828. },
  12829. "revert": {
  12830. "type": "object",
  12831. "properties": {
  12832. "messageID": {
  12833. "type": "string",
  12834. "pattern": "^msg"
  12835. },
  12836. "partID": {
  12837. "type": "string",
  12838. "pattern": "^prt"
  12839. },
  12840. "snapshot": {
  12841. "type": "string"
  12842. },
  12843. "diff": {
  12844. "type": "string"
  12845. }
  12846. },
  12847. "required": ["messageID"],
  12848. "additionalProperties": false
  12849. }
  12850. },
  12851. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12852. "additionalProperties": false
  12853. },
  12854. "Prompt": {
  12855. "type": "object",
  12856. "properties": {
  12857. "text": {
  12858. "type": "string"
  12859. },
  12860. "files": {
  12861. "type": "array",
  12862. "items": {
  12863. "$ref": "#/components/schemas/PromptFileAttachment"
  12864. }
  12865. },
  12866. "agents": {
  12867. "type": "array",
  12868. "items": {
  12869. "$ref": "#/components/schemas/PromptAgentAttachment"
  12870. }
  12871. },
  12872. "references": {
  12873. "type": "array",
  12874. "items": {
  12875. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12876. }
  12877. }
  12878. },
  12879. "required": ["text"],
  12880. "additionalProperties": false
  12881. },
  12882. "GlobalEvent": {
  12883. "type": "object",
  12884. "properties": {
  12885. "directory": {
  12886. "type": "string"
  12887. },
  12888. "project": {
  12889. "type": "string"
  12890. },
  12891. "workspace": {
  12892. "type": "string"
  12893. },
  12894. "payload": {
  12895. "anyOf": [
  12896. {
  12897. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12898. },
  12899. {
  12900. "$ref": "#/components/schemas/Event.tui.command.execute"
  12901. },
  12902. {
  12903. "$ref": "#/components/schemas/Event.tui.toast.show"
  12904. },
  12905. {
  12906. "$ref": "#/components/schemas/Event.tui.session.select"
  12907. },
  12908. {
  12909. "$ref": "#/components/schemas/EventServerConnected"
  12910. },
  12911. {
  12912. "$ref": "#/components/schemas/EventGlobalDisposed"
  12913. },
  12914. {
  12915. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12916. },
  12917. {
  12918. "$ref": "#/components/schemas/EventFileEdited"
  12919. },
  12920. {
  12921. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12922. },
  12923. {
  12924. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12925. },
  12926. {
  12927. "$ref": "#/components/schemas/EventLspUpdated"
  12928. },
  12929. {
  12930. "$ref": "#/components/schemas/EventMessagePartDelta"
  12931. },
  12932. {
  12933. "$ref": "#/components/schemas/EventPermissionAsked"
  12934. },
  12935. {
  12936. "$ref": "#/components/schemas/EventPermissionReplied"
  12937. },
  12938. {
  12939. "$ref": "#/components/schemas/EventSessionDiff"
  12940. },
  12941. {
  12942. "$ref": "#/components/schemas/EventSessionError"
  12943. },
  12944. {
  12945. "$ref": "#/components/schemas/EventQuestionAsked"
  12946. },
  12947. {
  12948. "$ref": "#/components/schemas/EventQuestionReplied"
  12949. },
  12950. {
  12951. "$ref": "#/components/schemas/EventQuestionRejected"
  12952. },
  12953. {
  12954. "$ref": "#/components/schemas/EventTodoUpdated"
  12955. },
  12956. {
  12957. "$ref": "#/components/schemas/EventSessionStatus"
  12958. },
  12959. {
  12960. "$ref": "#/components/schemas/EventSessionIdle"
  12961. },
  12962. {
  12963. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12964. },
  12965. {
  12966. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12967. },
  12968. {
  12969. "$ref": "#/components/schemas/EventCommandExecuted"
  12970. },
  12971. {
  12972. "$ref": "#/components/schemas/EventProjectUpdated"
  12973. },
  12974. {
  12975. "$ref": "#/components/schemas/EventSessionCompacted"
  12976. },
  12977. {
  12978. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12979. },
  12980. {
  12981. "$ref": "#/components/schemas/EventWorkspaceReady"
  12982. },
  12983. {
  12984. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12985. },
  12986. {
  12987. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12988. },
  12989. {
  12990. "$ref": "#/components/schemas/EventWorktreeReady"
  12991. },
  12992. {
  12993. "$ref": "#/components/schemas/EventWorktreeFailed"
  12994. },
  12995. {
  12996. "$ref": "#/components/schemas/EventPtyCreated"
  12997. },
  12998. {
  12999. "$ref": "#/components/schemas/EventPtyUpdated"
  13000. },
  13001. {
  13002. "$ref": "#/components/schemas/EventPtyExited"
  13003. },
  13004. {
  13005. "$ref": "#/components/schemas/EventPtyDeleted"
  13006. },
  13007. {
  13008. "$ref": "#/components/schemas/EventInstallationUpdated"
  13009. },
  13010. {
  13011. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  13012. },
  13013. {
  13014. "$ref": "#/components/schemas/EventMessageUpdated"
  13015. },
  13016. {
  13017. "$ref": "#/components/schemas/EventMessageRemoved"
  13018. },
  13019. {
  13020. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13021. },
  13022. {
  13023. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13024. },
  13025. {
  13026. "$ref": "#/components/schemas/EventSessionCreated"
  13027. },
  13028. {
  13029. "$ref": "#/components/schemas/EventSessionUpdated"
  13030. },
  13031. {
  13032. "$ref": "#/components/schemas/EventSessionDeleted"
  13033. },
  13034. {
  13035. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13036. },
  13037. {
  13038. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13039. },
  13040. {
  13041. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13042. },
  13043. {
  13044. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13045. },
  13046. {
  13047. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13048. },
  13049. {
  13050. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13051. },
  13052. {
  13053. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13054. },
  13055. {
  13056. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13057. },
  13058. {
  13059. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13060. },
  13061. {
  13062. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13063. },
  13064. {
  13065. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13066. },
  13067. {
  13068. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13069. },
  13070. {
  13071. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13072. },
  13073. {
  13074. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13075. },
  13076. {
  13077. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13078. },
  13079. {
  13080. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13081. },
  13082. {
  13083. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13084. },
  13085. {
  13086. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13087. },
  13088. {
  13089. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13090. },
  13091. {
  13092. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13093. },
  13094. {
  13095. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13096. },
  13097. {
  13098. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13099. },
  13100. {
  13101. "$ref": "#/components/schemas/EventSessionNextRetried"
  13102. },
  13103. {
  13104. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13105. },
  13106. {
  13107. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13108. },
  13109. {
  13110. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13111. },
  13112. {
  13113. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13114. },
  13115. {
  13116. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13117. },
  13118. {
  13119. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13120. },
  13121. {
  13122. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13123. },
  13124. {
  13125. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13126. },
  13127. {
  13128. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13129. },
  13130. {
  13131. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13132. },
  13133. {
  13134. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13135. },
  13136. {
  13137. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13138. },
  13139. {
  13140. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13141. },
  13142. {
  13143. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13144. },
  13145. {
  13146. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13147. },
  13148. {
  13149. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13150. },
  13151. {
  13152. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13153. },
  13154. {
  13155. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13156. },
  13157. {
  13158. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13159. },
  13160. {
  13161. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13162. },
  13163. {
  13164. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13165. },
  13166. {
  13167. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13168. },
  13169. {
  13170. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13171. },
  13172. {
  13173. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13174. },
  13175. {
  13176. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13177. },
  13178. {
  13179. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13180. },
  13181. {
  13182. "$ref": "#/components/schemas/EventSessionNextRetried"
  13183. },
  13184. {
  13185. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13186. },
  13187. {
  13188. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13189. },
  13190. {
  13191. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13192. },
  13193. {
  13194. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13195. },
  13196. {
  13197. "$ref": "#/components/schemas/EventAccountAdded"
  13198. },
  13199. {
  13200. "$ref": "#/components/schemas/EventAccountRemoved"
  13201. },
  13202. {
  13203. "$ref": "#/components/schemas/EventAccountSwitched"
  13204. },
  13205. {
  13206. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13207. },
  13208. {
  13209. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13210. },
  13211. {
  13212. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13213. },
  13214. {
  13215. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13216. },
  13217. {
  13218. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13219. },
  13220. {
  13221. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13222. },
  13223. {
  13224. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13225. },
  13226. {
  13227. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13228. },
  13229. {
  13230. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13231. },
  13232. {
  13233. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13234. },
  13235. {
  13236. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13237. },
  13238. {
  13239. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13240. },
  13241. {
  13242. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13243. },
  13244. {
  13245. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13246. },
  13247. {
  13248. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13249. },
  13250. {
  13251. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13252. },
  13253. {
  13254. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13255. },
  13256. {
  13257. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13258. },
  13259. {
  13260. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13261. },
  13262. {
  13263. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13264. },
  13265. {
  13266. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13267. },
  13268. {
  13269. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13270. },
  13271. {
  13272. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13273. },
  13274. {
  13275. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13276. },
  13277. {
  13278. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13279. },
  13280. {
  13281. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13282. },
  13283. {
  13284. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13285. },
  13286. {
  13287. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13288. },
  13289. {
  13290. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13291. },
  13292. {
  13293. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13294. },
  13295. {
  13296. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13297. },
  13298. {
  13299. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13300. },
  13301. {
  13302. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13303. }
  13304. ]
  13305. }
  13306. },
  13307. "required": ["directory", "payload"],
  13308. "additionalProperties": false
  13309. },
  13310. "LogLevel": {
  13311. "type": "string",
  13312. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13313. "description": "Log level"
  13314. },
  13315. "ServerConfig": {
  13316. "type": "object",
  13317. "properties": {
  13318. "port": {
  13319. "type": "integer",
  13320. "exclusiveMinimum": 0
  13321. },
  13322. "hostname": {
  13323. "type": "string"
  13324. },
  13325. "mdns": {
  13326. "type": "boolean"
  13327. },
  13328. "mdnsDomain": {
  13329. "type": "string"
  13330. },
  13331. "cors": {
  13332. "type": "array",
  13333. "items": {
  13334. "type": "string"
  13335. }
  13336. }
  13337. },
  13338. "additionalProperties": false,
  13339. "description": "Server configuration for opencode serve and web commands"
  13340. },
  13341. "ReferenceConfigEntry": {
  13342. "anyOf": [
  13343. {
  13344. "type": "string"
  13345. },
  13346. {
  13347. "type": "object",
  13348. "properties": {
  13349. "repository": {
  13350. "type": "string",
  13351. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13352. },
  13353. "branch": {
  13354. "type": "string"
  13355. }
  13356. },
  13357. "required": ["repository"],
  13358. "additionalProperties": false
  13359. },
  13360. {
  13361. "type": "object",
  13362. "properties": {
  13363. "path": {
  13364. "type": "string",
  13365. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13366. }
  13367. },
  13368. "required": ["path"],
  13369. "additionalProperties": false
  13370. }
  13371. ]
  13372. },
  13373. "ReferenceConfig": {
  13374. "type": "object",
  13375. "additionalProperties": {
  13376. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13377. }
  13378. },
  13379. "PermissionActionConfig": {
  13380. "type": "string",
  13381. "enum": ["ask", "allow", "deny"]
  13382. },
  13383. "PermissionObjectConfig": {
  13384. "type": "object",
  13385. "additionalProperties": {
  13386. "$ref": "#/components/schemas/PermissionActionConfig"
  13387. }
  13388. },
  13389. "PermissionRuleConfig": {
  13390. "anyOf": [
  13391. {
  13392. "$ref": "#/components/schemas/PermissionActionConfig"
  13393. },
  13394. {
  13395. "$ref": "#/components/schemas/PermissionObjectConfig"
  13396. }
  13397. ]
  13398. },
  13399. "PermissionConfig": {
  13400. "anyOf": [
  13401. {
  13402. "$ref": "#/components/schemas/PermissionActionConfig"
  13403. },
  13404. {
  13405. "type": "object",
  13406. "properties": {
  13407. "read": {
  13408. "$ref": "#/components/schemas/PermissionRuleConfig"
  13409. },
  13410. "edit": {
  13411. "$ref": "#/components/schemas/PermissionRuleConfig"
  13412. },
  13413. "glob": {
  13414. "$ref": "#/components/schemas/PermissionRuleConfig"
  13415. },
  13416. "grep": {
  13417. "$ref": "#/components/schemas/PermissionRuleConfig"
  13418. },
  13419. "list": {
  13420. "$ref": "#/components/schemas/PermissionRuleConfig"
  13421. },
  13422. "bash": {
  13423. "$ref": "#/components/schemas/PermissionRuleConfig"
  13424. },
  13425. "task": {
  13426. "$ref": "#/components/schemas/PermissionRuleConfig"
  13427. },
  13428. "external_directory": {
  13429. "$ref": "#/components/schemas/PermissionRuleConfig"
  13430. },
  13431. "todowrite": {
  13432. "$ref": "#/components/schemas/PermissionActionConfig"
  13433. },
  13434. "question": {
  13435. "$ref": "#/components/schemas/PermissionActionConfig"
  13436. },
  13437. "webfetch": {
  13438. "$ref": "#/components/schemas/PermissionActionConfig"
  13439. },
  13440. "websearch": {
  13441. "$ref": "#/components/schemas/PermissionActionConfig"
  13442. },
  13443. "repo_clone": {
  13444. "$ref": "#/components/schemas/PermissionRuleConfig"
  13445. },
  13446. "repo_overview": {
  13447. "$ref": "#/components/schemas/PermissionRuleConfig"
  13448. },
  13449. "lsp": {
  13450. "$ref": "#/components/schemas/PermissionRuleConfig"
  13451. },
  13452. "doom_loop": {
  13453. "$ref": "#/components/schemas/PermissionActionConfig"
  13454. },
  13455. "skill": {
  13456. "$ref": "#/components/schemas/PermissionRuleConfig"
  13457. }
  13458. },
  13459. "additionalProperties": {
  13460. "$ref": "#/components/schemas/PermissionRuleConfig"
  13461. }
  13462. }
  13463. ]
  13464. },
  13465. "AgentConfig": {
  13466. "type": "object",
  13467. "properties": {
  13468. "model": {
  13469. "type": "string"
  13470. },
  13471. "variant": {
  13472. "type": "string"
  13473. },
  13474. "temperature": {
  13475. "type": "number"
  13476. },
  13477. "top_p": {
  13478. "type": "number"
  13479. },
  13480. "prompt": {
  13481. "type": "string"
  13482. },
  13483. "tools": {
  13484. "type": "object",
  13485. "additionalProperties": {
  13486. "type": "boolean"
  13487. }
  13488. },
  13489. "disable": {
  13490. "type": "boolean"
  13491. },
  13492. "description": {
  13493. "type": "string"
  13494. },
  13495. "mode": {
  13496. "type": "string",
  13497. "enum": ["subagent", "primary", "all"]
  13498. },
  13499. "hidden": {
  13500. "type": "boolean"
  13501. },
  13502. "options": {
  13503. "type": "object"
  13504. },
  13505. "color": {
  13506. "anyOf": [
  13507. {
  13508. "type": "string",
  13509. "pattern": "^#[0-9a-fA-F]{6}$"
  13510. },
  13511. {
  13512. "type": "string",
  13513. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13514. }
  13515. ],
  13516. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13517. },
  13518. "steps": {
  13519. "type": "integer",
  13520. "exclusiveMinimum": 0
  13521. },
  13522. "maxSteps": {
  13523. "type": "integer",
  13524. "exclusiveMinimum": 0
  13525. },
  13526. "permission": {
  13527. "$ref": "#/components/schemas/PermissionConfig"
  13528. }
  13529. },
  13530. "additionalProperties": {}
  13531. },
  13532. "ProviderConfig": {
  13533. "type": "object",
  13534. "properties": {
  13535. "api": {
  13536. "type": "string"
  13537. },
  13538. "name": {
  13539. "type": "string"
  13540. },
  13541. "env": {
  13542. "type": "array",
  13543. "items": {
  13544. "type": "string"
  13545. }
  13546. },
  13547. "id": {
  13548. "type": "string"
  13549. },
  13550. "npm": {
  13551. "type": "string"
  13552. },
  13553. "whitelist": {
  13554. "type": "array",
  13555. "items": {
  13556. "type": "string"
  13557. }
  13558. },
  13559. "blacklist": {
  13560. "type": "array",
  13561. "items": {
  13562. "type": "string"
  13563. }
  13564. },
  13565. "options": {
  13566. "type": "object",
  13567. "properties": {
  13568. "apiKey": {
  13569. "type": "string"
  13570. },
  13571. "baseURL": {
  13572. "type": "string"
  13573. },
  13574. "enterpriseUrl": {
  13575. "type": "string"
  13576. },
  13577. "setCacheKey": {
  13578. "type": "boolean"
  13579. },
  13580. "timeout": {
  13581. "anyOf": [
  13582. {
  13583. "type": "integer",
  13584. "exclusiveMinimum": 0
  13585. },
  13586. {
  13587. "type": "boolean",
  13588. "enum": [false]
  13589. }
  13590. ],
  13591. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13592. },
  13593. "chunkTimeout": {
  13594. "type": "integer",
  13595. "exclusiveMinimum": 0
  13596. }
  13597. },
  13598. "additionalProperties": {}
  13599. },
  13600. "models": {
  13601. "type": "object",
  13602. "additionalProperties": {
  13603. "type": "object",
  13604. "properties": {
  13605. "id": {
  13606. "type": "string"
  13607. },
  13608. "name": {
  13609. "type": "string"
  13610. },
  13611. "family": {
  13612. "type": "string"
  13613. },
  13614. "release_date": {
  13615. "type": "string"
  13616. },
  13617. "attachment": {
  13618. "type": "boolean"
  13619. },
  13620. "reasoning": {
  13621. "type": "boolean"
  13622. },
  13623. "temperature": {
  13624. "type": "boolean"
  13625. },
  13626. "tool_call": {
  13627. "type": "boolean"
  13628. },
  13629. "interleaved": {
  13630. "anyOf": [
  13631. {
  13632. "type": "boolean",
  13633. "enum": [true]
  13634. },
  13635. {
  13636. "type": "object",
  13637. "properties": {
  13638. "field": {
  13639. "type": "string",
  13640. "enum": ["reasoning_content", "reasoning_details"]
  13641. }
  13642. },
  13643. "required": ["field"],
  13644. "additionalProperties": false
  13645. }
  13646. ]
  13647. },
  13648. "cost": {
  13649. "type": "object",
  13650. "properties": {
  13651. "input": {
  13652. "type": "number"
  13653. },
  13654. "output": {
  13655. "type": "number"
  13656. },
  13657. "cache_read": {
  13658. "type": "number"
  13659. },
  13660. "cache_write": {
  13661. "type": "number"
  13662. },
  13663. "context_over_200k": {
  13664. "type": "object",
  13665. "properties": {
  13666. "input": {
  13667. "type": "number"
  13668. },
  13669. "output": {
  13670. "type": "number"
  13671. },
  13672. "cache_read": {
  13673. "type": "number"
  13674. },
  13675. "cache_write": {
  13676. "type": "number"
  13677. }
  13678. },
  13679. "required": ["input", "output"],
  13680. "additionalProperties": false
  13681. }
  13682. },
  13683. "required": ["input", "output"],
  13684. "additionalProperties": false
  13685. },
  13686. "limit": {
  13687. "type": "object",
  13688. "properties": {
  13689. "context": {
  13690. "type": "number"
  13691. },
  13692. "input": {
  13693. "type": "number"
  13694. },
  13695. "output": {
  13696. "type": "number"
  13697. }
  13698. },
  13699. "required": ["context", "output"],
  13700. "additionalProperties": false
  13701. },
  13702. "modalities": {
  13703. "type": "object",
  13704. "properties": {
  13705. "input": {
  13706. "type": "array",
  13707. "items": {
  13708. "type": "string",
  13709. "enum": ["text", "audio", "image", "video", "pdf"]
  13710. }
  13711. },
  13712. "output": {
  13713. "type": "array",
  13714. "items": {
  13715. "type": "string",
  13716. "enum": ["text", "audio", "image", "video", "pdf"]
  13717. }
  13718. }
  13719. },
  13720. "required": ["input", "output"],
  13721. "additionalProperties": false
  13722. },
  13723. "experimental": {
  13724. "type": "boolean"
  13725. },
  13726. "status": {
  13727. "type": "string",
  13728. "enum": ["alpha", "beta", "deprecated", "active"]
  13729. },
  13730. "provider": {
  13731. "type": "object",
  13732. "properties": {
  13733. "npm": {
  13734. "type": "string"
  13735. },
  13736. "api": {
  13737. "type": "string"
  13738. }
  13739. },
  13740. "additionalProperties": false
  13741. },
  13742. "options": {
  13743. "type": "object"
  13744. },
  13745. "headers": {
  13746. "type": "object",
  13747. "additionalProperties": {
  13748. "type": "string"
  13749. }
  13750. },
  13751. "variants": {
  13752. "type": "object",
  13753. "additionalProperties": {
  13754. "type": "object",
  13755. "properties": {
  13756. "disabled": {
  13757. "type": "boolean"
  13758. }
  13759. },
  13760. "additionalProperties": {}
  13761. },
  13762. "description": "Variant-specific configuration"
  13763. }
  13764. },
  13765. "additionalProperties": false
  13766. }
  13767. }
  13768. },
  13769. "additionalProperties": false
  13770. },
  13771. "McpLocalConfig": {
  13772. "type": "object",
  13773. "properties": {
  13774. "type": {
  13775. "type": "string",
  13776. "enum": ["local"],
  13777. "description": "Type of MCP server connection"
  13778. },
  13779. "command": {
  13780. "type": "array",
  13781. "items": {
  13782. "type": "string"
  13783. },
  13784. "description": "Command and arguments to run the MCP server"
  13785. },
  13786. "environment": {
  13787. "type": "object",
  13788. "additionalProperties": {
  13789. "type": "string"
  13790. }
  13791. },
  13792. "enabled": {
  13793. "type": "boolean"
  13794. },
  13795. "timeout": {
  13796. "type": "integer",
  13797. "exclusiveMinimum": 0
  13798. }
  13799. },
  13800. "required": ["type", "command"],
  13801. "additionalProperties": false
  13802. },
  13803. "McpOAuthConfig": {
  13804. "type": "object",
  13805. "properties": {
  13806. "clientId": {
  13807. "type": "string"
  13808. },
  13809. "clientSecret": {
  13810. "type": "string"
  13811. },
  13812. "scope": {
  13813. "type": "string"
  13814. },
  13815. "callbackPort": {
  13816. "type": "integer",
  13817. "minimum": 1,
  13818. "maximum": 65535
  13819. },
  13820. "redirectUri": {
  13821. "type": "string"
  13822. }
  13823. },
  13824. "additionalProperties": false
  13825. },
  13826. "McpRemoteConfig": {
  13827. "type": "object",
  13828. "properties": {
  13829. "type": {
  13830. "type": "string",
  13831. "enum": ["remote"],
  13832. "description": "Type of MCP server connection"
  13833. },
  13834. "url": {
  13835. "type": "string",
  13836. "description": "URL of the remote MCP server"
  13837. },
  13838. "enabled": {
  13839. "type": "boolean"
  13840. },
  13841. "headers": {
  13842. "type": "object",
  13843. "additionalProperties": {
  13844. "type": "string"
  13845. }
  13846. },
  13847. "oauth": {
  13848. "anyOf": [
  13849. {
  13850. "$ref": "#/components/schemas/McpOAuthConfig"
  13851. },
  13852. {
  13853. "type": "boolean",
  13854. "enum": [false]
  13855. }
  13856. ],
  13857. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13858. },
  13859. "timeout": {
  13860. "type": "integer",
  13861. "exclusiveMinimum": 0
  13862. }
  13863. },
  13864. "required": ["type", "url"],
  13865. "additionalProperties": false
  13866. },
  13867. "LayoutConfig": {
  13868. "type": "string",
  13869. "enum": ["auto", "stretch"],
  13870. "description": "@deprecated Always uses stretch layout."
  13871. },
  13872. "ImageAttachmentConfig": {
  13873. "type": "object",
  13874. "properties": {
  13875. "auto_resize": {
  13876. "type": "boolean"
  13877. },
  13878. "max_width": {
  13879. "type": "integer",
  13880. "exclusiveMinimum": 0
  13881. },
  13882. "max_height": {
  13883. "type": "integer",
  13884. "exclusiveMinimum": 0
  13885. },
  13886. "max_base64_bytes": {
  13887. "type": "integer",
  13888. "exclusiveMinimum": 0
  13889. }
  13890. },
  13891. "additionalProperties": false
  13892. },
  13893. "AttachmentConfig": {
  13894. "type": "object",
  13895. "properties": {
  13896. "image": {
  13897. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13898. }
  13899. },
  13900. "additionalProperties": false
  13901. },
  13902. "Config": {
  13903. "type": "object",
  13904. "properties": {
  13905. "$schema": {
  13906. "type": "string"
  13907. },
  13908. "shell": {
  13909. "type": "string"
  13910. },
  13911. "logLevel": {
  13912. "$ref": "#/components/schemas/LogLevel"
  13913. },
  13914. "server": {
  13915. "$ref": "#/components/schemas/ServerConfig"
  13916. },
  13917. "command": {
  13918. "type": "object",
  13919. "additionalProperties": {
  13920. "type": "object",
  13921. "properties": {
  13922. "template": {
  13923. "type": "string"
  13924. },
  13925. "description": {
  13926. "type": "string"
  13927. },
  13928. "agent": {
  13929. "type": "string"
  13930. },
  13931. "model": {
  13932. "type": "string"
  13933. },
  13934. "subtask": {
  13935. "type": "boolean"
  13936. }
  13937. },
  13938. "required": ["template"],
  13939. "additionalProperties": false
  13940. }
  13941. },
  13942. "skills": {
  13943. "type": "object",
  13944. "properties": {
  13945. "paths": {
  13946. "type": "array",
  13947. "items": {
  13948. "type": "string"
  13949. }
  13950. },
  13951. "urls": {
  13952. "type": "array",
  13953. "items": {
  13954. "type": "string"
  13955. }
  13956. }
  13957. },
  13958. "additionalProperties": false
  13959. },
  13960. "reference": {
  13961. "$ref": "#/components/schemas/ReferenceConfig"
  13962. },
  13963. "watcher": {
  13964. "type": "object",
  13965. "properties": {
  13966. "ignore": {
  13967. "type": "array",
  13968. "items": {
  13969. "type": "string"
  13970. }
  13971. }
  13972. },
  13973. "additionalProperties": false
  13974. },
  13975. "snapshot": {
  13976. "type": "boolean"
  13977. },
  13978. "plugin": {
  13979. "type": "array",
  13980. "items": {
  13981. "anyOf": [
  13982. {
  13983. "type": "string"
  13984. },
  13985. {
  13986. "type": "array",
  13987. "prefixItems": [
  13988. {
  13989. "type": "string"
  13990. },
  13991. {
  13992. "type": "object"
  13993. }
  13994. ],
  13995. "maxItems": 2,
  13996. "minItems": 2
  13997. }
  13998. ]
  13999. }
  14000. },
  14001. "share": {
  14002. "type": "string",
  14003. "enum": ["manual", "auto", "disabled"]
  14004. },
  14005. "autoshare": {
  14006. "type": "boolean"
  14007. },
  14008. "autoupdate": {
  14009. "anyOf": [
  14010. {
  14011. "type": "boolean"
  14012. },
  14013. {
  14014. "type": "string",
  14015. "enum": ["notify"]
  14016. }
  14017. ],
  14018. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  14019. },
  14020. "disabled_providers": {
  14021. "type": "array",
  14022. "items": {
  14023. "type": "string"
  14024. }
  14025. },
  14026. "enabled_providers": {
  14027. "type": "array",
  14028. "items": {
  14029. "type": "string"
  14030. }
  14031. },
  14032. "model": {
  14033. "type": "string"
  14034. },
  14035. "small_model": {
  14036. "type": "string"
  14037. },
  14038. "default_agent": {
  14039. "type": "string"
  14040. },
  14041. "username": {
  14042. "type": "string"
  14043. },
  14044. "mode": {
  14045. "type": "object",
  14046. "properties": {
  14047. "build": {
  14048. "$ref": "#/components/schemas/AgentConfig"
  14049. },
  14050. "plan": {
  14051. "$ref": "#/components/schemas/AgentConfig"
  14052. }
  14053. },
  14054. "additionalProperties": {
  14055. "$ref": "#/components/schemas/AgentConfig"
  14056. }
  14057. },
  14058. "agent": {
  14059. "type": "object",
  14060. "properties": {
  14061. "plan": {
  14062. "$ref": "#/components/schemas/AgentConfig"
  14063. },
  14064. "build": {
  14065. "$ref": "#/components/schemas/AgentConfig"
  14066. },
  14067. "general": {
  14068. "$ref": "#/components/schemas/AgentConfig"
  14069. },
  14070. "explore": {
  14071. "$ref": "#/components/schemas/AgentConfig"
  14072. },
  14073. "scout": {
  14074. "$ref": "#/components/schemas/AgentConfig"
  14075. },
  14076. "title": {
  14077. "$ref": "#/components/schemas/AgentConfig"
  14078. },
  14079. "summary": {
  14080. "$ref": "#/components/schemas/AgentConfig"
  14081. },
  14082. "compaction": {
  14083. "$ref": "#/components/schemas/AgentConfig"
  14084. }
  14085. },
  14086. "additionalProperties": {
  14087. "$ref": "#/components/schemas/AgentConfig"
  14088. }
  14089. },
  14090. "provider": {
  14091. "type": "object",
  14092. "additionalProperties": {
  14093. "$ref": "#/components/schemas/ProviderConfig"
  14094. }
  14095. },
  14096. "mcp": {
  14097. "type": "object",
  14098. "additionalProperties": {
  14099. "anyOf": [
  14100. {
  14101. "$ref": "#/components/schemas/McpLocalConfig"
  14102. },
  14103. {
  14104. "$ref": "#/components/schemas/McpRemoteConfig"
  14105. },
  14106. {
  14107. "type": "object",
  14108. "properties": {
  14109. "enabled": {
  14110. "type": "boolean"
  14111. }
  14112. },
  14113. "required": ["enabled"],
  14114. "additionalProperties": false
  14115. }
  14116. ]
  14117. }
  14118. },
  14119. "formatter": {
  14120. "anyOf": [
  14121. {
  14122. "type": "boolean"
  14123. },
  14124. {
  14125. "type": "object",
  14126. "additionalProperties": {
  14127. "type": "object",
  14128. "properties": {
  14129. "disabled": {
  14130. "type": "boolean"
  14131. },
  14132. "command": {
  14133. "type": "array",
  14134. "items": {
  14135. "type": "string"
  14136. }
  14137. },
  14138. "environment": {
  14139. "type": "object",
  14140. "additionalProperties": {
  14141. "type": "string"
  14142. }
  14143. },
  14144. "extensions": {
  14145. "type": "array",
  14146. "items": {
  14147. "type": "string"
  14148. }
  14149. }
  14150. },
  14151. "additionalProperties": false
  14152. }
  14153. }
  14154. ],
  14155. "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."
  14156. },
  14157. "lsp": {
  14158. "anyOf": [
  14159. {
  14160. "type": "boolean"
  14161. },
  14162. {
  14163. "type": "object",
  14164. "additionalProperties": {
  14165. "anyOf": [
  14166. {
  14167. "type": "object",
  14168. "properties": {
  14169. "disabled": {
  14170. "type": "boolean",
  14171. "enum": [true]
  14172. }
  14173. },
  14174. "required": ["disabled"],
  14175. "additionalProperties": false
  14176. },
  14177. {
  14178. "type": "object",
  14179. "properties": {
  14180. "command": {
  14181. "type": "array",
  14182. "items": {
  14183. "type": "string"
  14184. }
  14185. },
  14186. "extensions": {
  14187. "type": "array",
  14188. "items": {
  14189. "type": "string"
  14190. }
  14191. },
  14192. "disabled": {
  14193. "type": "boolean"
  14194. },
  14195. "env": {
  14196. "type": "object",
  14197. "additionalProperties": {
  14198. "type": "string"
  14199. }
  14200. },
  14201. "initialization": {
  14202. "type": "object"
  14203. }
  14204. },
  14205. "required": ["command"],
  14206. "additionalProperties": false
  14207. }
  14208. ]
  14209. }
  14210. }
  14211. ],
  14212. "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."
  14213. },
  14214. "instructions": {
  14215. "type": "array",
  14216. "items": {
  14217. "type": "string"
  14218. }
  14219. },
  14220. "layout": {
  14221. "$ref": "#/components/schemas/LayoutConfig"
  14222. },
  14223. "permission": {
  14224. "$ref": "#/components/schemas/PermissionConfig"
  14225. },
  14226. "tools": {
  14227. "type": "object",
  14228. "additionalProperties": {
  14229. "type": "boolean"
  14230. }
  14231. },
  14232. "attachment": {
  14233. "$ref": "#/components/schemas/AttachmentConfig"
  14234. },
  14235. "enterprise": {
  14236. "type": "object",
  14237. "properties": {
  14238. "url": {
  14239. "type": "string"
  14240. }
  14241. },
  14242. "additionalProperties": false
  14243. },
  14244. "tool_output": {
  14245. "type": "object",
  14246. "properties": {
  14247. "max_lines": {
  14248. "type": "integer",
  14249. "exclusiveMinimum": 0
  14250. },
  14251. "max_bytes": {
  14252. "type": "integer",
  14253. "exclusiveMinimum": 0
  14254. }
  14255. },
  14256. "additionalProperties": false
  14257. },
  14258. "compaction": {
  14259. "type": "object",
  14260. "properties": {
  14261. "auto": {
  14262. "type": "boolean"
  14263. },
  14264. "prune": {
  14265. "type": "boolean"
  14266. },
  14267. "tail_turns": {
  14268. "type": "integer",
  14269. "minimum": 0
  14270. },
  14271. "preserve_recent_tokens": {
  14272. "type": "integer",
  14273. "minimum": 0
  14274. },
  14275. "reserved": {
  14276. "type": "integer",
  14277. "minimum": 0
  14278. }
  14279. },
  14280. "additionalProperties": false
  14281. },
  14282. "experimental": {
  14283. "type": "object",
  14284. "properties": {
  14285. "disable_paste_summary": {
  14286. "type": "boolean"
  14287. },
  14288. "batch_tool": {
  14289. "type": "boolean"
  14290. },
  14291. "openTelemetry": {
  14292. "type": "boolean"
  14293. },
  14294. "primary_tools": {
  14295. "type": "array",
  14296. "items": {
  14297. "type": "string"
  14298. }
  14299. },
  14300. "continue_loop_on_deny": {
  14301. "type": "boolean"
  14302. },
  14303. "mcp_timeout": {
  14304. "type": "integer",
  14305. "exclusiveMinimum": 0
  14306. }
  14307. },
  14308. "additionalProperties": false
  14309. }
  14310. },
  14311. "additionalProperties": false
  14312. },
  14313. "Model": {
  14314. "type": "object",
  14315. "properties": {
  14316. "id": {
  14317. "type": "string"
  14318. },
  14319. "providerID": {
  14320. "type": "string"
  14321. },
  14322. "api": {
  14323. "type": "object",
  14324. "properties": {
  14325. "id": {
  14326. "type": "string"
  14327. },
  14328. "url": {
  14329. "type": "string"
  14330. },
  14331. "npm": {
  14332. "type": "string"
  14333. }
  14334. },
  14335. "required": ["id", "url", "npm"],
  14336. "additionalProperties": false
  14337. },
  14338. "name": {
  14339. "type": "string"
  14340. },
  14341. "family": {
  14342. "type": "string"
  14343. },
  14344. "capabilities": {
  14345. "type": "object",
  14346. "properties": {
  14347. "temperature": {
  14348. "type": "boolean"
  14349. },
  14350. "reasoning": {
  14351. "type": "boolean"
  14352. },
  14353. "attachment": {
  14354. "type": "boolean"
  14355. },
  14356. "toolcall": {
  14357. "type": "boolean"
  14358. },
  14359. "input": {
  14360. "type": "object",
  14361. "properties": {
  14362. "text": {
  14363. "type": "boolean"
  14364. },
  14365. "audio": {
  14366. "type": "boolean"
  14367. },
  14368. "image": {
  14369. "type": "boolean"
  14370. },
  14371. "video": {
  14372. "type": "boolean"
  14373. },
  14374. "pdf": {
  14375. "type": "boolean"
  14376. }
  14377. },
  14378. "required": ["text", "audio", "image", "video", "pdf"],
  14379. "additionalProperties": false
  14380. },
  14381. "output": {
  14382. "type": "object",
  14383. "properties": {
  14384. "text": {
  14385. "type": "boolean"
  14386. },
  14387. "audio": {
  14388. "type": "boolean"
  14389. },
  14390. "image": {
  14391. "type": "boolean"
  14392. },
  14393. "video": {
  14394. "type": "boolean"
  14395. },
  14396. "pdf": {
  14397. "type": "boolean"
  14398. }
  14399. },
  14400. "required": ["text", "audio", "image", "video", "pdf"],
  14401. "additionalProperties": false
  14402. },
  14403. "interleaved": {
  14404. "anyOf": [
  14405. {
  14406. "type": "boolean"
  14407. },
  14408. {
  14409. "type": "object",
  14410. "properties": {
  14411. "field": {
  14412. "type": "string",
  14413. "enum": ["reasoning_content", "reasoning_details"]
  14414. }
  14415. },
  14416. "required": ["field"],
  14417. "additionalProperties": false
  14418. }
  14419. ]
  14420. }
  14421. },
  14422. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14423. "additionalProperties": false
  14424. },
  14425. "cost": {
  14426. "type": "object",
  14427. "properties": {
  14428. "input": {
  14429. "type": "number"
  14430. },
  14431. "output": {
  14432. "type": "number"
  14433. },
  14434. "cache": {
  14435. "type": "object",
  14436. "properties": {
  14437. "read": {
  14438. "type": "number"
  14439. },
  14440. "write": {
  14441. "type": "number"
  14442. }
  14443. },
  14444. "required": ["read", "write"],
  14445. "additionalProperties": false
  14446. },
  14447. "tiers": {
  14448. "type": "array",
  14449. "items": {
  14450. "type": "object",
  14451. "properties": {
  14452. "input": {
  14453. "type": "number"
  14454. },
  14455. "output": {
  14456. "type": "number"
  14457. },
  14458. "cache": {
  14459. "type": "object",
  14460. "properties": {
  14461. "read": {
  14462. "type": "number"
  14463. },
  14464. "write": {
  14465. "type": "number"
  14466. }
  14467. },
  14468. "required": ["read", "write"],
  14469. "additionalProperties": false
  14470. },
  14471. "tier": {
  14472. "type": "object",
  14473. "properties": {
  14474. "type": {
  14475. "type": "string",
  14476. "enum": ["context"]
  14477. },
  14478. "size": {
  14479. "type": "number"
  14480. }
  14481. },
  14482. "required": ["type", "size"],
  14483. "additionalProperties": false
  14484. }
  14485. },
  14486. "required": ["input", "output", "cache", "tier"],
  14487. "additionalProperties": false
  14488. }
  14489. },
  14490. "experimentalOver200K": {
  14491. "type": "object",
  14492. "properties": {
  14493. "input": {
  14494. "type": "number"
  14495. },
  14496. "output": {
  14497. "type": "number"
  14498. },
  14499. "cache": {
  14500. "type": "object",
  14501. "properties": {
  14502. "read": {
  14503. "type": "number"
  14504. },
  14505. "write": {
  14506. "type": "number"
  14507. }
  14508. },
  14509. "required": ["read", "write"],
  14510. "additionalProperties": false
  14511. }
  14512. },
  14513. "required": ["input", "output", "cache"],
  14514. "additionalProperties": false
  14515. }
  14516. },
  14517. "required": ["input", "output", "cache"],
  14518. "additionalProperties": false
  14519. },
  14520. "limit": {
  14521. "type": "object",
  14522. "properties": {
  14523. "context": {
  14524. "type": "number"
  14525. },
  14526. "input": {
  14527. "type": "number"
  14528. },
  14529. "output": {
  14530. "type": "number"
  14531. }
  14532. },
  14533. "required": ["context", "output"],
  14534. "additionalProperties": false
  14535. },
  14536. "status": {
  14537. "type": "string",
  14538. "enum": ["alpha", "beta", "deprecated", "active"]
  14539. },
  14540. "options": {
  14541. "type": "object"
  14542. },
  14543. "headers": {
  14544. "type": "object",
  14545. "additionalProperties": {
  14546. "type": "string"
  14547. }
  14548. },
  14549. "release_date": {
  14550. "type": "string"
  14551. },
  14552. "variants": {
  14553. "type": "object",
  14554. "additionalProperties": {
  14555. "type": "object"
  14556. }
  14557. }
  14558. },
  14559. "required": [
  14560. "id",
  14561. "providerID",
  14562. "api",
  14563. "name",
  14564. "capabilities",
  14565. "cost",
  14566. "limit",
  14567. "status",
  14568. "options",
  14569. "headers",
  14570. "release_date"
  14571. ],
  14572. "additionalProperties": false
  14573. },
  14574. "Provider": {
  14575. "type": "object",
  14576. "properties": {
  14577. "id": {
  14578. "type": "string"
  14579. },
  14580. "name": {
  14581. "type": "string"
  14582. },
  14583. "source": {
  14584. "type": "string",
  14585. "enum": ["env", "config", "custom", "api"]
  14586. },
  14587. "env": {
  14588. "type": "array",
  14589. "items": {
  14590. "type": "string"
  14591. }
  14592. },
  14593. "key": {
  14594. "type": "string"
  14595. },
  14596. "options": {
  14597. "type": "object"
  14598. },
  14599. "models": {
  14600. "type": "object",
  14601. "additionalProperties": {
  14602. "$ref": "#/components/schemas/Model"
  14603. }
  14604. }
  14605. },
  14606. "required": ["id", "name", "source", "env", "options", "models"],
  14607. "additionalProperties": false
  14608. },
  14609. "ConsoleState": {
  14610. "type": "object",
  14611. "properties": {
  14612. "consoleManagedProviders": {
  14613. "type": "array",
  14614. "items": {
  14615. "type": "string"
  14616. }
  14617. },
  14618. "activeOrgName": {
  14619. "type": "string"
  14620. },
  14621. "switchableOrgCount": {
  14622. "type": "integer",
  14623. "minimum": 0
  14624. }
  14625. },
  14626. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14627. "additionalProperties": false
  14628. },
  14629. "effect_HttpApiError_InternalServerError": {
  14630. "type": "object",
  14631. "properties": {
  14632. "_tag": {
  14633. "type": "string",
  14634. "enum": ["InternalServerError"]
  14635. }
  14636. },
  14637. "required": ["_tag"],
  14638. "additionalProperties": false
  14639. },
  14640. "ToolListItem": {
  14641. "type": "object",
  14642. "properties": {
  14643. "id": {
  14644. "type": "string"
  14645. },
  14646. "description": {
  14647. "type": "string"
  14648. },
  14649. "parameters": {}
  14650. },
  14651. "required": ["id", "description", "parameters"],
  14652. "additionalProperties": false
  14653. },
  14654. "ToolList": {
  14655. "type": "array",
  14656. "items": {
  14657. "$ref": "#/components/schemas/ToolListItem"
  14658. }
  14659. },
  14660. "ToolIDs": {
  14661. "type": "array",
  14662. "items": {
  14663. "type": "string"
  14664. }
  14665. },
  14666. "WorktreeError": {
  14667. "type": "object",
  14668. "properties": {
  14669. "name": {
  14670. "type": "string",
  14671. "enum": [
  14672. "WorktreeNotGitError",
  14673. "WorktreeNameGenerationFailedError",
  14674. "WorktreeCreateFailedError",
  14675. "WorktreeStartCommandFailedError",
  14676. "WorktreeRemoveFailedError",
  14677. "WorktreeResetFailedError",
  14678. "WorktreeListFailedError"
  14679. ]
  14680. },
  14681. "data": {
  14682. "type": "object",
  14683. "properties": {
  14684. "message": {
  14685. "type": "string"
  14686. }
  14687. },
  14688. "required": ["message"],
  14689. "additionalProperties": false
  14690. }
  14691. },
  14692. "required": ["name", "data"],
  14693. "additionalProperties": false
  14694. },
  14695. "WorktreeCreateInput": {
  14696. "type": "object",
  14697. "properties": {
  14698. "name": {
  14699. "type": "string"
  14700. },
  14701. "startCommand": {
  14702. "type": "string",
  14703. "description": "Additional startup script to run after the project's start command"
  14704. }
  14705. },
  14706. "additionalProperties": false
  14707. },
  14708. "Worktree": {
  14709. "type": "object",
  14710. "properties": {
  14711. "name": {
  14712. "type": "string"
  14713. },
  14714. "branch": {
  14715. "type": "string"
  14716. },
  14717. "directory": {
  14718. "type": "string"
  14719. }
  14720. },
  14721. "required": ["name", "directory"],
  14722. "additionalProperties": false
  14723. },
  14724. "WorktreeRemoveInput": {
  14725. "type": "object",
  14726. "properties": {
  14727. "directory": {
  14728. "type": "string"
  14729. }
  14730. },
  14731. "required": ["directory"],
  14732. "additionalProperties": false
  14733. },
  14734. "WorktreeResetInput": {
  14735. "type": "object",
  14736. "properties": {
  14737. "directory": {
  14738. "type": "string"
  14739. }
  14740. },
  14741. "required": ["directory"],
  14742. "additionalProperties": false
  14743. },
  14744. "ProjectSummary": {
  14745. "type": "object",
  14746. "properties": {
  14747. "id": {
  14748. "type": "string"
  14749. },
  14750. "name": {
  14751. "type": "string"
  14752. },
  14753. "worktree": {
  14754. "type": "string"
  14755. }
  14756. },
  14757. "required": ["id", "worktree"],
  14758. "additionalProperties": false
  14759. },
  14760. "GlobalSession": {
  14761. "type": "object",
  14762. "properties": {
  14763. "id": {
  14764. "type": "string",
  14765. "pattern": "^ses"
  14766. },
  14767. "slug": {
  14768. "type": "string"
  14769. },
  14770. "projectID": {
  14771. "type": "string"
  14772. },
  14773. "workspaceID": {
  14774. "type": "string",
  14775. "pattern": "^wrk"
  14776. },
  14777. "directory": {
  14778. "type": "string"
  14779. },
  14780. "path": {
  14781. "type": "string"
  14782. },
  14783. "parentID": {
  14784. "type": "string",
  14785. "pattern": "^ses"
  14786. },
  14787. "summary": {
  14788. "type": "object",
  14789. "properties": {
  14790. "additions": {
  14791. "type": "number"
  14792. },
  14793. "deletions": {
  14794. "type": "number"
  14795. },
  14796. "files": {
  14797. "type": "number"
  14798. },
  14799. "diffs": {
  14800. "type": "array",
  14801. "items": {
  14802. "$ref": "#/components/schemas/SnapshotFileDiff"
  14803. }
  14804. }
  14805. },
  14806. "required": ["additions", "deletions", "files"],
  14807. "additionalProperties": false
  14808. },
  14809. "cost": {
  14810. "type": "number"
  14811. },
  14812. "tokens": {
  14813. "type": "object",
  14814. "properties": {
  14815. "input": {
  14816. "type": "number"
  14817. },
  14818. "output": {
  14819. "type": "number"
  14820. },
  14821. "reasoning": {
  14822. "type": "number"
  14823. },
  14824. "cache": {
  14825. "type": "object",
  14826. "properties": {
  14827. "read": {
  14828. "type": "number"
  14829. },
  14830. "write": {
  14831. "type": "number"
  14832. }
  14833. },
  14834. "required": ["read", "write"],
  14835. "additionalProperties": false
  14836. }
  14837. },
  14838. "required": ["input", "output", "reasoning", "cache"],
  14839. "additionalProperties": false
  14840. },
  14841. "share": {
  14842. "type": "object",
  14843. "properties": {
  14844. "url": {
  14845. "type": "string"
  14846. }
  14847. },
  14848. "required": ["url"],
  14849. "additionalProperties": false
  14850. },
  14851. "title": {
  14852. "type": "string"
  14853. },
  14854. "agent": {
  14855. "type": "string"
  14856. },
  14857. "model": {
  14858. "type": "object",
  14859. "properties": {
  14860. "id": {
  14861. "type": "string"
  14862. },
  14863. "providerID": {
  14864. "type": "string"
  14865. },
  14866. "variant": {
  14867. "type": "string"
  14868. }
  14869. },
  14870. "required": ["id", "providerID"],
  14871. "additionalProperties": false
  14872. },
  14873. "version": {
  14874. "type": "string"
  14875. },
  14876. "time": {
  14877. "type": "object",
  14878. "properties": {
  14879. "created": {
  14880. "type": "integer",
  14881. "minimum": 0
  14882. },
  14883. "updated": {
  14884. "type": "integer",
  14885. "minimum": 0
  14886. },
  14887. "compacting": {
  14888. "type": "integer",
  14889. "minimum": 0
  14890. },
  14891. "archived": {
  14892. "type": "number"
  14893. }
  14894. },
  14895. "required": ["created", "updated"],
  14896. "additionalProperties": false
  14897. },
  14898. "permission": {
  14899. "$ref": "#/components/schemas/PermissionRuleset"
  14900. },
  14901. "revert": {
  14902. "type": "object",
  14903. "properties": {
  14904. "messageID": {
  14905. "type": "string",
  14906. "pattern": "^msg"
  14907. },
  14908. "partID": {
  14909. "type": "string",
  14910. "pattern": "^prt"
  14911. },
  14912. "snapshot": {
  14913. "type": "string"
  14914. },
  14915. "diff": {
  14916. "type": "string"
  14917. }
  14918. },
  14919. "required": ["messageID"],
  14920. "additionalProperties": false
  14921. },
  14922. "project": {
  14923. "anyOf": [
  14924. {
  14925. "$ref": "#/components/schemas/ProjectSummary"
  14926. },
  14927. {
  14928. "type": "null"
  14929. }
  14930. ]
  14931. }
  14932. },
  14933. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14934. "additionalProperties": false
  14935. },
  14936. "McpResource": {
  14937. "type": "object",
  14938. "properties": {
  14939. "name": {
  14940. "type": "string"
  14941. },
  14942. "uri": {
  14943. "type": "string"
  14944. },
  14945. "description": {
  14946. "type": "string"
  14947. },
  14948. "mimeType": {
  14949. "type": "string"
  14950. },
  14951. "client": {
  14952. "type": "string"
  14953. }
  14954. },
  14955. "required": ["name", "uri", "client"],
  14956. "additionalProperties": false
  14957. },
  14958. "Symbol": {
  14959. "type": "object",
  14960. "properties": {
  14961. "name": {
  14962. "type": "string"
  14963. },
  14964. "kind": {
  14965. "type": "integer",
  14966. "minimum": 0
  14967. },
  14968. "location": {
  14969. "type": "object",
  14970. "properties": {
  14971. "uri": {
  14972. "type": "string"
  14973. },
  14974. "range": {
  14975. "$ref": "#/components/schemas/Range"
  14976. }
  14977. },
  14978. "required": ["uri", "range"],
  14979. "additionalProperties": false
  14980. }
  14981. },
  14982. "required": ["name", "kind", "location"],
  14983. "additionalProperties": false
  14984. },
  14985. "FileNode": {
  14986. "type": "object",
  14987. "properties": {
  14988. "name": {
  14989. "type": "string"
  14990. },
  14991. "path": {
  14992. "type": "string"
  14993. },
  14994. "absolute": {
  14995. "type": "string"
  14996. },
  14997. "type": {
  14998. "type": "string",
  14999. "enum": ["file", "directory"]
  15000. },
  15001. "ignored": {
  15002. "type": "boolean"
  15003. }
  15004. },
  15005. "required": ["name", "path", "absolute", "type", "ignored"],
  15006. "additionalProperties": false
  15007. },
  15008. "FileContent": {
  15009. "type": "object",
  15010. "properties": {
  15011. "type": {
  15012. "type": "string",
  15013. "enum": ["text", "binary"]
  15014. },
  15015. "content": {
  15016. "type": "string"
  15017. },
  15018. "diff": {
  15019. "type": "string"
  15020. },
  15021. "patch": {
  15022. "type": "object",
  15023. "properties": {
  15024. "oldFileName": {
  15025. "type": "string"
  15026. },
  15027. "newFileName": {
  15028. "type": "string"
  15029. },
  15030. "oldHeader": {
  15031. "type": "string"
  15032. },
  15033. "newHeader": {
  15034. "type": "string"
  15035. },
  15036. "hunks": {
  15037. "type": "array",
  15038. "items": {
  15039. "type": "object",
  15040. "properties": {
  15041. "oldStart": {
  15042. "type": "integer",
  15043. "minimum": 0
  15044. },
  15045. "oldLines": {
  15046. "type": "integer",
  15047. "minimum": 0
  15048. },
  15049. "newStart": {
  15050. "type": "integer",
  15051. "minimum": 0
  15052. },
  15053. "newLines": {
  15054. "type": "integer",
  15055. "minimum": 0
  15056. },
  15057. "lines": {
  15058. "type": "array",
  15059. "items": {
  15060. "type": "string"
  15061. }
  15062. }
  15063. },
  15064. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  15065. "additionalProperties": false
  15066. }
  15067. },
  15068. "index": {
  15069. "type": "string"
  15070. }
  15071. },
  15072. "required": ["oldFileName", "newFileName", "hunks"],
  15073. "additionalProperties": false
  15074. },
  15075. "encoding": {
  15076. "type": "string",
  15077. "enum": ["base64"]
  15078. },
  15079. "mimeType": {
  15080. "type": "string"
  15081. }
  15082. },
  15083. "required": ["type", "content"],
  15084. "additionalProperties": false
  15085. },
  15086. "File": {
  15087. "type": "object",
  15088. "properties": {
  15089. "path": {
  15090. "type": "string"
  15091. },
  15092. "added": {
  15093. "type": "integer",
  15094. "minimum": 0
  15095. },
  15096. "removed": {
  15097. "type": "integer",
  15098. "minimum": 0
  15099. },
  15100. "status": {
  15101. "type": "string",
  15102. "enum": ["added", "deleted", "modified"]
  15103. }
  15104. },
  15105. "required": ["path", "added", "removed", "status"],
  15106. "additionalProperties": false
  15107. },
  15108. "Path": {
  15109. "type": "object",
  15110. "properties": {
  15111. "home": {
  15112. "type": "string"
  15113. },
  15114. "state": {
  15115. "type": "string"
  15116. },
  15117. "config": {
  15118. "type": "string"
  15119. },
  15120. "worktree": {
  15121. "type": "string"
  15122. },
  15123. "directory": {
  15124. "type": "string"
  15125. }
  15126. },
  15127. "required": ["home", "state", "config", "worktree", "directory"],
  15128. "additionalProperties": false
  15129. },
  15130. "VcsInfo": {
  15131. "type": "object",
  15132. "properties": {
  15133. "branch": {
  15134. "type": "string"
  15135. },
  15136. "default_branch": {
  15137. "type": "string"
  15138. }
  15139. },
  15140. "additionalProperties": false
  15141. },
  15142. "VcsFileStatus": {
  15143. "type": "object",
  15144. "properties": {
  15145. "file": {
  15146. "type": "string"
  15147. },
  15148. "additions": {
  15149. "type": "number"
  15150. },
  15151. "deletions": {
  15152. "type": "number"
  15153. },
  15154. "status": {
  15155. "type": "string",
  15156. "enum": ["added", "deleted", "modified"]
  15157. }
  15158. },
  15159. "required": ["file", "additions", "deletions", "status"],
  15160. "additionalProperties": false
  15161. },
  15162. "VcsFileDiff": {
  15163. "type": "object",
  15164. "properties": {
  15165. "file": {
  15166. "type": "string"
  15167. },
  15168. "patch": {
  15169. "type": "string"
  15170. },
  15171. "additions": {
  15172. "type": "number"
  15173. },
  15174. "deletions": {
  15175. "type": "number"
  15176. },
  15177. "status": {
  15178. "type": "string",
  15179. "enum": ["added", "deleted", "modified"]
  15180. }
  15181. },
  15182. "required": ["file", "additions", "deletions"],
  15183. "additionalProperties": false
  15184. },
  15185. "VcsApplyError": {
  15186. "type": "object",
  15187. "properties": {
  15188. "name": {
  15189. "type": "string",
  15190. "enum": ["VcsApplyError"]
  15191. },
  15192. "data": {
  15193. "type": "object",
  15194. "properties": {
  15195. "message": {
  15196. "type": "string"
  15197. },
  15198. "reason": {
  15199. "type": "string",
  15200. "enum": ["non-git", "not-clean"]
  15201. }
  15202. },
  15203. "required": ["message", "reason"],
  15204. "additionalProperties": false
  15205. }
  15206. },
  15207. "required": ["name", "data"],
  15208. "additionalProperties": false
  15209. },
  15210. "Command": {
  15211. "type": "object",
  15212. "properties": {
  15213. "name": {
  15214. "type": "string"
  15215. },
  15216. "description": {
  15217. "type": "string"
  15218. },
  15219. "agent": {
  15220. "type": "string"
  15221. },
  15222. "model": {
  15223. "type": "string"
  15224. },
  15225. "source": {
  15226. "type": "string",
  15227. "enum": ["command", "mcp", "skill"]
  15228. },
  15229. "template": {
  15230. "type": "string"
  15231. },
  15232. "subtask": {
  15233. "type": "boolean"
  15234. },
  15235. "hints": {
  15236. "type": "array",
  15237. "items": {
  15238. "type": "string"
  15239. }
  15240. }
  15241. },
  15242. "required": ["name", "template", "hints"],
  15243. "additionalProperties": false
  15244. },
  15245. "Agent": {
  15246. "type": "object",
  15247. "properties": {
  15248. "name": {
  15249. "type": "string"
  15250. },
  15251. "description": {
  15252. "type": "string"
  15253. },
  15254. "mode": {
  15255. "type": "string",
  15256. "enum": ["subagent", "primary", "all"]
  15257. },
  15258. "native": {
  15259. "type": "boolean"
  15260. },
  15261. "hidden": {
  15262. "type": "boolean"
  15263. },
  15264. "topP": {
  15265. "type": "number"
  15266. },
  15267. "temperature": {
  15268. "type": "number"
  15269. },
  15270. "color": {
  15271. "type": "string"
  15272. },
  15273. "permission": {
  15274. "$ref": "#/components/schemas/PermissionRuleset"
  15275. },
  15276. "model": {
  15277. "type": "object",
  15278. "properties": {
  15279. "modelID": {
  15280. "type": "string"
  15281. },
  15282. "providerID": {
  15283. "type": "string"
  15284. }
  15285. },
  15286. "required": ["modelID", "providerID"],
  15287. "additionalProperties": false
  15288. },
  15289. "variant": {
  15290. "type": "string"
  15291. },
  15292. "prompt": {
  15293. "type": "string"
  15294. },
  15295. "options": {
  15296. "type": "object"
  15297. },
  15298. "steps": {
  15299. "type": "number"
  15300. }
  15301. },
  15302. "required": ["name", "mode", "permission", "options"],
  15303. "additionalProperties": false
  15304. },
  15305. "LSPStatus": {
  15306. "type": "object",
  15307. "properties": {
  15308. "id": {
  15309. "type": "string"
  15310. },
  15311. "name": {
  15312. "type": "string"
  15313. },
  15314. "root": {
  15315. "type": "string"
  15316. },
  15317. "status": {
  15318. "type": "string",
  15319. "enum": ["connected", "error"]
  15320. }
  15321. },
  15322. "required": ["id", "name", "root", "status"],
  15323. "additionalProperties": false
  15324. },
  15325. "FormatterStatus": {
  15326. "type": "object",
  15327. "properties": {
  15328. "name": {
  15329. "type": "string"
  15330. },
  15331. "extensions": {
  15332. "type": "array",
  15333. "items": {
  15334. "type": "string"
  15335. }
  15336. },
  15337. "enabled": {
  15338. "type": "boolean"
  15339. }
  15340. },
  15341. "required": ["name", "extensions", "enabled"],
  15342. "additionalProperties": false
  15343. },
  15344. "MCPStatusConnected": {
  15345. "type": "object",
  15346. "properties": {
  15347. "status": {
  15348. "type": "string",
  15349. "enum": ["connected"]
  15350. }
  15351. },
  15352. "required": ["status"],
  15353. "additionalProperties": false
  15354. },
  15355. "MCPStatusDisabled": {
  15356. "type": "object",
  15357. "properties": {
  15358. "status": {
  15359. "type": "string",
  15360. "enum": ["disabled"]
  15361. }
  15362. },
  15363. "required": ["status"],
  15364. "additionalProperties": false
  15365. },
  15366. "MCPStatusFailed": {
  15367. "type": "object",
  15368. "properties": {
  15369. "status": {
  15370. "type": "string",
  15371. "enum": ["failed"]
  15372. },
  15373. "error": {
  15374. "type": "string"
  15375. }
  15376. },
  15377. "required": ["status", "error"],
  15378. "additionalProperties": false
  15379. },
  15380. "MCPStatusNeedsAuth": {
  15381. "type": "object",
  15382. "properties": {
  15383. "status": {
  15384. "type": "string",
  15385. "enum": ["needs_auth"]
  15386. }
  15387. },
  15388. "required": ["status"],
  15389. "additionalProperties": false
  15390. },
  15391. "MCPStatusNeedsClientRegistration": {
  15392. "type": "object",
  15393. "properties": {
  15394. "status": {
  15395. "type": "string",
  15396. "enum": ["needs_client_registration"]
  15397. },
  15398. "error": {
  15399. "type": "string"
  15400. }
  15401. },
  15402. "required": ["status", "error"],
  15403. "additionalProperties": false
  15404. },
  15405. "MCPStatus": {
  15406. "anyOf": [
  15407. {
  15408. "$ref": "#/components/schemas/MCPStatusConnected"
  15409. },
  15410. {
  15411. "$ref": "#/components/schemas/MCPStatusDisabled"
  15412. },
  15413. {
  15414. "$ref": "#/components/schemas/MCPStatusFailed"
  15415. },
  15416. {
  15417. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15418. },
  15419. {
  15420. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15421. }
  15422. ]
  15423. },
  15424. "McpUnsupportedOAuthError": {
  15425. "type": "object",
  15426. "properties": {
  15427. "error": {
  15428. "type": "string"
  15429. }
  15430. },
  15431. "required": ["error"],
  15432. "additionalProperties": false
  15433. },
  15434. "McpServerNotFoundError": {
  15435. "type": "object",
  15436. "properties": {
  15437. "_tag": {
  15438. "type": "string",
  15439. "enum": ["McpServerNotFoundError"]
  15440. },
  15441. "name": {
  15442. "type": "string"
  15443. },
  15444. "message": {
  15445. "type": "string"
  15446. }
  15447. },
  15448. "required": ["_tag", "name", "message"],
  15449. "additionalProperties": false
  15450. },
  15451. "ProjectNotFoundError": {
  15452. "type": "object",
  15453. "properties": {
  15454. "_tag": {
  15455. "type": "string",
  15456. "enum": ["ProjectNotFoundError"]
  15457. },
  15458. "projectID": {
  15459. "type": "string"
  15460. },
  15461. "message": {
  15462. "type": "string"
  15463. }
  15464. },
  15465. "required": ["_tag", "projectID", "message"],
  15466. "additionalProperties": false
  15467. },
  15468. "PtyNotFoundError": {
  15469. "type": "object",
  15470. "properties": {
  15471. "_tag": {
  15472. "type": "string",
  15473. "enum": ["PtyNotFoundError"]
  15474. },
  15475. "ptyID": {
  15476. "type": "string"
  15477. },
  15478. "message": {
  15479. "type": "string"
  15480. }
  15481. },
  15482. "required": ["_tag", "ptyID", "message"],
  15483. "additionalProperties": false
  15484. },
  15485. "PtyForbiddenError": {
  15486. "type": "object",
  15487. "properties": {
  15488. "_tag": {
  15489. "type": "string",
  15490. "enum": ["PtyForbiddenError"]
  15491. },
  15492. "message": {
  15493. "type": "string"
  15494. }
  15495. },
  15496. "required": ["_tag", "message"],
  15497. "additionalProperties": false
  15498. },
  15499. "QuestionNotFoundError": {
  15500. "type": "object",
  15501. "properties": {
  15502. "_tag": {
  15503. "type": "string",
  15504. "enum": ["QuestionNotFoundError"]
  15505. },
  15506. "requestID": {
  15507. "type": "string"
  15508. },
  15509. "message": {
  15510. "type": "string"
  15511. }
  15512. },
  15513. "required": ["_tag", "requestID", "message"],
  15514. "additionalProperties": false
  15515. },
  15516. "PermissionNotFoundError": {
  15517. "type": "object",
  15518. "properties": {
  15519. "_tag": {
  15520. "type": "string",
  15521. "enum": ["PermissionNotFoundError"]
  15522. },
  15523. "requestID": {
  15524. "type": "string"
  15525. },
  15526. "message": {
  15527. "type": "string"
  15528. }
  15529. },
  15530. "required": ["_tag", "requestID", "message"],
  15531. "additionalProperties": false
  15532. },
  15533. "ProviderAuthMethod": {
  15534. "type": "object",
  15535. "properties": {
  15536. "type": {
  15537. "type": "string",
  15538. "enum": ["oauth", "api"]
  15539. },
  15540. "label": {
  15541. "type": "string"
  15542. },
  15543. "prompts": {
  15544. "type": "array",
  15545. "items": {
  15546. "anyOf": [
  15547. {
  15548. "type": "object",
  15549. "properties": {
  15550. "type": {
  15551. "type": "string",
  15552. "enum": ["text"]
  15553. },
  15554. "key": {
  15555. "type": "string"
  15556. },
  15557. "message": {
  15558. "type": "string"
  15559. },
  15560. "placeholder": {
  15561. "type": "string"
  15562. },
  15563. "when": {
  15564. "type": "object",
  15565. "properties": {
  15566. "key": {
  15567. "type": "string"
  15568. },
  15569. "op": {
  15570. "type": "string",
  15571. "enum": ["eq", "neq"]
  15572. },
  15573. "value": {
  15574. "type": "string"
  15575. }
  15576. },
  15577. "required": ["key", "op", "value"],
  15578. "additionalProperties": false
  15579. }
  15580. },
  15581. "required": ["type", "key", "message"],
  15582. "additionalProperties": false
  15583. },
  15584. {
  15585. "type": "object",
  15586. "properties": {
  15587. "type": {
  15588. "type": "string",
  15589. "enum": ["select"]
  15590. },
  15591. "key": {
  15592. "type": "string"
  15593. },
  15594. "message": {
  15595. "type": "string"
  15596. },
  15597. "options": {
  15598. "type": "array",
  15599. "items": {
  15600. "type": "object",
  15601. "properties": {
  15602. "label": {
  15603. "type": "string"
  15604. },
  15605. "value": {
  15606. "type": "string"
  15607. },
  15608. "hint": {
  15609. "type": "string"
  15610. }
  15611. },
  15612. "required": ["label", "value"],
  15613. "additionalProperties": false
  15614. }
  15615. },
  15616. "when": {
  15617. "type": "object",
  15618. "properties": {
  15619. "key": {
  15620. "type": "string"
  15621. },
  15622. "op": {
  15623. "type": "string",
  15624. "enum": ["eq", "neq"]
  15625. },
  15626. "value": {
  15627. "type": "string"
  15628. }
  15629. },
  15630. "required": ["key", "op", "value"],
  15631. "additionalProperties": false
  15632. }
  15633. },
  15634. "required": ["type", "key", "message", "options"],
  15635. "additionalProperties": false
  15636. }
  15637. ]
  15638. }
  15639. }
  15640. },
  15641. "required": ["type", "label"],
  15642. "additionalProperties": false
  15643. },
  15644. "ProviderAuthAuthorization": {
  15645. "type": "object",
  15646. "properties": {
  15647. "url": {
  15648. "type": "string"
  15649. },
  15650. "method": {
  15651. "type": "string",
  15652. "enum": ["auto", "code"]
  15653. },
  15654. "instructions": {
  15655. "type": "string"
  15656. }
  15657. },
  15658. "required": ["url", "method", "instructions"],
  15659. "additionalProperties": false
  15660. },
  15661. "ProviderAuthError1": {
  15662. "type": "object",
  15663. "properties": {
  15664. "name": {
  15665. "type": "string",
  15666. "enum": [
  15667. "BadRequest",
  15668. "ProviderAuthOauthMissing",
  15669. "ProviderAuthOauthCodeMissing",
  15670. "ProviderAuthOauthCallbackFailed",
  15671. "ProviderAuthValidationFailed"
  15672. ]
  15673. },
  15674. "data": {
  15675. "type": "object",
  15676. "properties": {
  15677. "providerID": {
  15678. "type": "string"
  15679. },
  15680. "field": {
  15681. "type": "string"
  15682. },
  15683. "message": {
  15684. "type": "string"
  15685. },
  15686. "kind": {
  15687. "type": "string"
  15688. }
  15689. },
  15690. "additionalProperties": false
  15691. }
  15692. },
  15693. "required": ["name", "data"],
  15694. "additionalProperties": false
  15695. },
  15696. "NotFoundError": {
  15697. "type": "object",
  15698. "required": ["name", "data"],
  15699. "properties": {
  15700. "name": {
  15701. "type": "string",
  15702. "enum": ["NotFoundError"]
  15703. },
  15704. "data": {
  15705. "type": "object",
  15706. "required": ["message"],
  15707. "properties": {
  15708. "message": {
  15709. "type": "string"
  15710. }
  15711. }
  15712. }
  15713. }
  15714. },
  15715. "TextPartInput": {
  15716. "type": "object",
  15717. "properties": {
  15718. "id": {
  15719. "type": "string",
  15720. "pattern": "^prt"
  15721. },
  15722. "type": {
  15723. "type": "string",
  15724. "enum": ["text"]
  15725. },
  15726. "text": {
  15727. "type": "string"
  15728. },
  15729. "synthetic": {
  15730. "type": "boolean"
  15731. },
  15732. "ignored": {
  15733. "type": "boolean"
  15734. },
  15735. "time": {
  15736. "type": "object",
  15737. "properties": {
  15738. "start": {
  15739. "type": "integer",
  15740. "minimum": 0
  15741. },
  15742. "end": {
  15743. "type": "integer",
  15744. "minimum": 0
  15745. }
  15746. },
  15747. "required": ["start"],
  15748. "additionalProperties": false
  15749. },
  15750. "metadata": {
  15751. "type": "object"
  15752. }
  15753. },
  15754. "required": ["type", "text"],
  15755. "additionalProperties": false
  15756. },
  15757. "FilePartInput": {
  15758. "type": "object",
  15759. "properties": {
  15760. "id": {
  15761. "type": "string",
  15762. "pattern": "^prt"
  15763. },
  15764. "type": {
  15765. "type": "string",
  15766. "enum": ["file"]
  15767. },
  15768. "mime": {
  15769. "type": "string"
  15770. },
  15771. "filename": {
  15772. "type": "string"
  15773. },
  15774. "url": {
  15775. "type": "string"
  15776. },
  15777. "source": {
  15778. "$ref": "#/components/schemas/FilePartSource"
  15779. }
  15780. },
  15781. "required": ["type", "mime", "url"],
  15782. "additionalProperties": false
  15783. },
  15784. "AgentPartInput": {
  15785. "type": "object",
  15786. "properties": {
  15787. "id": {
  15788. "type": "string",
  15789. "pattern": "^prt"
  15790. },
  15791. "type": {
  15792. "type": "string",
  15793. "enum": ["agent"]
  15794. },
  15795. "name": {
  15796. "type": "string"
  15797. },
  15798. "source": {
  15799. "type": "object",
  15800. "properties": {
  15801. "value": {
  15802. "type": "string"
  15803. },
  15804. "start": {
  15805. "type": "integer",
  15806. "minimum": 0
  15807. },
  15808. "end": {
  15809. "type": "integer",
  15810. "minimum": 0
  15811. }
  15812. },
  15813. "required": ["value", "start", "end"],
  15814. "additionalProperties": false
  15815. }
  15816. },
  15817. "required": ["type", "name"],
  15818. "additionalProperties": false
  15819. },
  15820. "SubtaskPartInput": {
  15821. "type": "object",
  15822. "properties": {
  15823. "id": {
  15824. "type": "string",
  15825. "pattern": "^prt"
  15826. },
  15827. "type": {
  15828. "type": "string",
  15829. "enum": ["subtask"]
  15830. },
  15831. "prompt": {
  15832. "type": "string"
  15833. },
  15834. "description": {
  15835. "type": "string"
  15836. },
  15837. "agent": {
  15838. "type": "string"
  15839. },
  15840. "model": {
  15841. "type": "object",
  15842. "properties": {
  15843. "providerID": {
  15844. "type": "string"
  15845. },
  15846. "modelID": {
  15847. "type": "string"
  15848. }
  15849. },
  15850. "required": ["providerID", "modelID"],
  15851. "additionalProperties": false
  15852. },
  15853. "command": {
  15854. "type": "string"
  15855. }
  15856. },
  15857. "required": ["type", "prompt", "description", "agent"],
  15858. "additionalProperties": false
  15859. },
  15860. "SessionBusyError": {
  15861. "type": "object",
  15862. "properties": {
  15863. "_tag": {
  15864. "type": "string",
  15865. "enum": ["SessionBusyError"]
  15866. },
  15867. "sessionID": {
  15868. "type": "string"
  15869. },
  15870. "message": {
  15871. "type": "string"
  15872. }
  15873. },
  15874. "required": ["_tag", "sessionID", "message"],
  15875. "additionalProperties": false
  15876. },
  15877. "V2SessionsResponse": {
  15878. "type": "object",
  15879. "properties": {
  15880. "items": {
  15881. "type": "array",
  15882. "items": {
  15883. "$ref": "#/components/schemas/SessionInfo"
  15884. }
  15885. },
  15886. "cursor": {
  15887. "type": "object",
  15888. "properties": {
  15889. "previous": {
  15890. "type": "string"
  15891. },
  15892. "next": {
  15893. "type": "string"
  15894. }
  15895. },
  15896. "additionalProperties": false
  15897. }
  15898. },
  15899. "required": ["items", "cursor"],
  15900. "additionalProperties": false
  15901. },
  15902. "InvalidCursorError": {
  15903. "type": "object",
  15904. "properties": {
  15905. "_tag": {
  15906. "type": "string",
  15907. "enum": ["InvalidCursorError"]
  15908. },
  15909. "message": {
  15910. "type": "string"
  15911. }
  15912. },
  15913. "required": ["_tag", "message"],
  15914. "additionalProperties": false
  15915. },
  15916. "UnauthorizedError": {
  15917. "type": "object",
  15918. "properties": {
  15919. "_tag": {
  15920. "type": "string",
  15921. "enum": ["UnauthorizedError"]
  15922. },
  15923. "message": {
  15924. "type": "string"
  15925. }
  15926. },
  15927. "required": ["_tag", "message"],
  15928. "additionalProperties": false
  15929. },
  15930. "SessionNotFoundError": {
  15931. "type": "object",
  15932. "properties": {
  15933. "_tag": {
  15934. "type": "string",
  15935. "enum": ["SessionNotFoundError"]
  15936. },
  15937. "sessionID": {
  15938. "type": "string"
  15939. },
  15940. "message": {
  15941. "type": "string"
  15942. }
  15943. },
  15944. "required": ["_tag", "sessionID", "message"],
  15945. "additionalProperties": false
  15946. },
  15947. "ServiceUnavailableError": {
  15948. "type": "object",
  15949. "properties": {
  15950. "_tag": {
  15951. "type": "string",
  15952. "enum": ["ServiceUnavailableError"]
  15953. },
  15954. "message": {
  15955. "type": "string"
  15956. },
  15957. "service": {
  15958. "type": "string"
  15959. }
  15960. },
  15961. "required": ["_tag", "message"],
  15962. "additionalProperties": false
  15963. },
  15964. "UnknownError1": {
  15965. "type": "object",
  15966. "properties": {
  15967. "_tag": {
  15968. "type": "string",
  15969. "enum": ["UnknownError"]
  15970. },
  15971. "message": {
  15972. "type": "string"
  15973. },
  15974. "ref": {
  15975. "type": "string"
  15976. }
  15977. },
  15978. "required": ["_tag", "message"],
  15979. "additionalProperties": false
  15980. },
  15981. "V2SessionMessagesResponse": {
  15982. "type": "object",
  15983. "properties": {
  15984. "items": {
  15985. "type": "array",
  15986. "items": {
  15987. "$ref": "#/components/schemas/SessionMessage"
  15988. }
  15989. },
  15990. "cursor": {
  15991. "type": "object",
  15992. "properties": {
  15993. "previous": {
  15994. "type": "string"
  15995. },
  15996. "next": {
  15997. "type": "string"
  15998. }
  15999. },
  16000. "additionalProperties": false
  16001. }
  16002. },
  16003. "required": ["items", "cursor"],
  16004. "additionalProperties": false
  16005. },
  16006. "ProviderNotFoundError": {
  16007. "type": "object",
  16008. "properties": {
  16009. "_tag": {
  16010. "type": "string",
  16011. "enum": ["ProviderNotFoundError"]
  16012. },
  16013. "providerID": {
  16014. "type": "string"
  16015. },
  16016. "message": {
  16017. "type": "string"
  16018. }
  16019. },
  16020. "required": ["_tag", "providerID", "message"],
  16021. "additionalProperties": false
  16022. },
  16023. "EventTuiPromptAppend": {
  16024. "type": "object",
  16025. "properties": {
  16026. "type": {
  16027. "type": "string",
  16028. "enum": ["tui.prompt.append"]
  16029. },
  16030. "properties": {
  16031. "type": "object",
  16032. "properties": {
  16033. "text": {
  16034. "type": "string"
  16035. }
  16036. },
  16037. "required": ["text"],
  16038. "additionalProperties": false
  16039. }
  16040. },
  16041. "required": ["type", "properties"],
  16042. "additionalProperties": false
  16043. },
  16044. "EventTuiCommandExecute": {
  16045. "type": "object",
  16046. "properties": {
  16047. "type": {
  16048. "type": "string",
  16049. "enum": ["tui.command.execute"]
  16050. },
  16051. "properties": {
  16052. "type": "object",
  16053. "properties": {
  16054. "command": {
  16055. "anyOf": [
  16056. {
  16057. "type": "string",
  16058. "enum": [
  16059. "session.list",
  16060. "session.new",
  16061. "session.share",
  16062. "session.interrupt",
  16063. "session.compact",
  16064. "session.page.up",
  16065. "session.page.down",
  16066. "session.line.up",
  16067. "session.line.down",
  16068. "session.half.page.up",
  16069. "session.half.page.down",
  16070. "session.first",
  16071. "session.last",
  16072. "prompt.clear",
  16073. "prompt.submit",
  16074. "agent.cycle"
  16075. ]
  16076. },
  16077. {
  16078. "type": "string"
  16079. }
  16080. ]
  16081. }
  16082. },
  16083. "required": ["command"],
  16084. "additionalProperties": false
  16085. }
  16086. },
  16087. "required": ["type", "properties"],
  16088. "additionalProperties": false
  16089. },
  16090. "EventTuiToastShow": {
  16091. "type": "object",
  16092. "properties": {
  16093. "type": {
  16094. "type": "string",
  16095. "enum": ["tui.toast.show"]
  16096. },
  16097. "properties": {
  16098. "type": "object",
  16099. "properties": {
  16100. "title": {
  16101. "type": "string"
  16102. },
  16103. "message": {
  16104. "type": "string"
  16105. },
  16106. "variant": {
  16107. "type": "string",
  16108. "enum": ["info", "success", "warning", "error"]
  16109. },
  16110. "duration": {
  16111. "type": "integer",
  16112. "exclusiveMinimum": 0
  16113. }
  16114. },
  16115. "required": ["message", "variant"],
  16116. "additionalProperties": false
  16117. }
  16118. },
  16119. "required": ["type", "properties"],
  16120. "additionalProperties": false
  16121. },
  16122. "EventTuiSessionSelect": {
  16123. "type": "object",
  16124. "properties": {
  16125. "type": {
  16126. "type": "string",
  16127. "enum": ["tui.session.select"]
  16128. },
  16129. "properties": {
  16130. "type": "object",
  16131. "properties": {
  16132. "sessionID": {
  16133. "type": "string",
  16134. "pattern": "^ses",
  16135. "description": "Session ID to navigate to"
  16136. }
  16137. },
  16138. "required": ["sessionID"],
  16139. "additionalProperties": false
  16140. }
  16141. },
  16142. "required": ["type", "properties"],
  16143. "additionalProperties": false
  16144. },
  16145. "Workspace": {
  16146. "type": "object",
  16147. "properties": {
  16148. "id": {
  16149. "type": "string",
  16150. "pattern": "^wrk"
  16151. },
  16152. "type": {
  16153. "type": "string"
  16154. },
  16155. "name": {
  16156. "type": "string"
  16157. },
  16158. "branch": {
  16159. "anyOf": [
  16160. {
  16161. "type": "string"
  16162. },
  16163. {
  16164. "type": "null"
  16165. }
  16166. ]
  16167. },
  16168. "directory": {
  16169. "anyOf": [
  16170. {
  16171. "type": "string"
  16172. },
  16173. {
  16174. "type": "null"
  16175. }
  16176. ]
  16177. },
  16178. "extra": {
  16179. "anyOf": [
  16180. {},
  16181. {
  16182. "type": "null"
  16183. }
  16184. ]
  16185. },
  16186. "projectID": {
  16187. "type": "string"
  16188. },
  16189. "timeUsed": {
  16190. "anyOf": [
  16191. {
  16192. "type": "number"
  16193. },
  16194. {
  16195. "type": "string",
  16196. "enum": ["NaN"]
  16197. },
  16198. {
  16199. "type": "string",
  16200. "enum": ["Infinity"]
  16201. },
  16202. {
  16203. "type": "string",
  16204. "enum": ["-Infinity"]
  16205. },
  16206. {
  16207. "type": "string",
  16208. "enum": ["Infinity", "-Infinity", "NaN"]
  16209. }
  16210. ]
  16211. }
  16212. },
  16213. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16214. "additionalProperties": false
  16215. },
  16216. "WorkspaceWarpError": {
  16217. "type": "object",
  16218. "properties": {
  16219. "name": {
  16220. "type": "string",
  16221. "enum": ["WorkspaceWarpError"]
  16222. },
  16223. "data": {
  16224. "type": "object",
  16225. "properties": {
  16226. "message": {
  16227. "type": "string"
  16228. }
  16229. },
  16230. "required": ["message"],
  16231. "additionalProperties": false
  16232. }
  16233. },
  16234. "required": ["name", "data"],
  16235. "additionalProperties": false
  16236. },
  16237. "effect_HttpApiError_Forbidden": {
  16238. "type": "object",
  16239. "properties": {
  16240. "_tag": {
  16241. "type": "string",
  16242. "enum": ["Forbidden"]
  16243. }
  16244. },
  16245. "required": ["_tag"],
  16246. "additionalProperties": false
  16247. },
  16248. "SyncEventMessageUpdated": {
  16249. "type": "object",
  16250. "properties": {
  16251. "type": {
  16252. "type": "string",
  16253. "enum": ["sync"]
  16254. },
  16255. "name": {
  16256. "type": "string",
  16257. "enum": ["message.updated.1"]
  16258. },
  16259. "id": {
  16260. "type": "string"
  16261. },
  16262. "seq": {
  16263. "type": "number"
  16264. },
  16265. "aggregateID": {
  16266. "type": "string",
  16267. "enum": ["sessionID"]
  16268. },
  16269. "data": {
  16270. "type": "object",
  16271. "properties": {
  16272. "sessionID": {
  16273. "type": "string",
  16274. "pattern": "^ses"
  16275. },
  16276. "info": {
  16277. "$ref": "#/components/schemas/Message"
  16278. }
  16279. },
  16280. "required": ["sessionID", "info"],
  16281. "additionalProperties": false
  16282. }
  16283. },
  16284. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16285. "additionalProperties": false
  16286. },
  16287. "SyncEventMessageRemoved": {
  16288. "type": "object",
  16289. "properties": {
  16290. "type": {
  16291. "type": "string",
  16292. "enum": ["sync"]
  16293. },
  16294. "name": {
  16295. "type": "string",
  16296. "enum": ["message.removed.1"]
  16297. },
  16298. "id": {
  16299. "type": "string"
  16300. },
  16301. "seq": {
  16302. "type": "number"
  16303. },
  16304. "aggregateID": {
  16305. "type": "string",
  16306. "enum": ["sessionID"]
  16307. },
  16308. "data": {
  16309. "type": "object",
  16310. "properties": {
  16311. "sessionID": {
  16312. "type": "string",
  16313. "pattern": "^ses"
  16314. },
  16315. "messageID": {
  16316. "type": "string",
  16317. "pattern": "^msg"
  16318. }
  16319. },
  16320. "required": ["sessionID", "messageID"],
  16321. "additionalProperties": false
  16322. }
  16323. },
  16324. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16325. "additionalProperties": false
  16326. },
  16327. "SyncEventMessagePartUpdated": {
  16328. "type": "object",
  16329. "properties": {
  16330. "type": {
  16331. "type": "string",
  16332. "enum": ["sync"]
  16333. },
  16334. "name": {
  16335. "type": "string",
  16336. "enum": ["message.part.updated.1"]
  16337. },
  16338. "id": {
  16339. "type": "string"
  16340. },
  16341. "seq": {
  16342. "type": "number"
  16343. },
  16344. "aggregateID": {
  16345. "type": "string",
  16346. "enum": ["sessionID"]
  16347. },
  16348. "data": {
  16349. "type": "object",
  16350. "properties": {
  16351. "sessionID": {
  16352. "type": "string",
  16353. "pattern": "^ses"
  16354. },
  16355. "part": {
  16356. "$ref": "#/components/schemas/Part"
  16357. },
  16358. "time": {
  16359. "type": "integer",
  16360. "minimum": 0
  16361. }
  16362. },
  16363. "required": ["sessionID", "part", "time"],
  16364. "additionalProperties": false
  16365. }
  16366. },
  16367. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16368. "additionalProperties": false
  16369. },
  16370. "SyncEventMessagePartRemoved": {
  16371. "type": "object",
  16372. "properties": {
  16373. "type": {
  16374. "type": "string",
  16375. "enum": ["sync"]
  16376. },
  16377. "name": {
  16378. "type": "string",
  16379. "enum": ["message.part.removed.1"]
  16380. },
  16381. "id": {
  16382. "type": "string"
  16383. },
  16384. "seq": {
  16385. "type": "number"
  16386. },
  16387. "aggregateID": {
  16388. "type": "string",
  16389. "enum": ["sessionID"]
  16390. },
  16391. "data": {
  16392. "type": "object",
  16393. "properties": {
  16394. "sessionID": {
  16395. "type": "string",
  16396. "pattern": "^ses"
  16397. },
  16398. "messageID": {
  16399. "type": "string",
  16400. "pattern": "^msg"
  16401. },
  16402. "partID": {
  16403. "type": "string",
  16404. "pattern": "^prt"
  16405. }
  16406. },
  16407. "required": ["sessionID", "messageID", "partID"],
  16408. "additionalProperties": false
  16409. }
  16410. },
  16411. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16412. "additionalProperties": false
  16413. },
  16414. "SyncEventSessionCreated": {
  16415. "type": "object",
  16416. "properties": {
  16417. "type": {
  16418. "type": "string",
  16419. "enum": ["sync"]
  16420. },
  16421. "name": {
  16422. "type": "string",
  16423. "enum": ["session.created.1"]
  16424. },
  16425. "id": {
  16426. "type": "string"
  16427. },
  16428. "seq": {
  16429. "type": "number"
  16430. },
  16431. "aggregateID": {
  16432. "type": "string",
  16433. "enum": ["sessionID"]
  16434. },
  16435. "data": {
  16436. "type": "object",
  16437. "properties": {
  16438. "sessionID": {
  16439. "type": "string",
  16440. "pattern": "^ses"
  16441. },
  16442. "info": {
  16443. "$ref": "#/components/schemas/Session"
  16444. }
  16445. },
  16446. "required": ["sessionID", "info"],
  16447. "additionalProperties": false
  16448. }
  16449. },
  16450. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16451. "additionalProperties": false
  16452. },
  16453. "SyncEventSessionUpdated": {
  16454. "type": "object",
  16455. "properties": {
  16456. "type": {
  16457. "type": "string",
  16458. "enum": ["sync"]
  16459. },
  16460. "name": {
  16461. "type": "string",
  16462. "enum": ["session.updated.1"]
  16463. },
  16464. "id": {
  16465. "type": "string"
  16466. },
  16467. "seq": {
  16468. "type": "number"
  16469. },
  16470. "aggregateID": {
  16471. "type": "string",
  16472. "enum": ["sessionID"]
  16473. },
  16474. "data": {
  16475. "type": "object",
  16476. "properties": {
  16477. "sessionID": {
  16478. "type": "string",
  16479. "pattern": "^ses"
  16480. },
  16481. "info": {
  16482. "type": "object",
  16483. "properties": {
  16484. "id": {
  16485. "anyOf": [
  16486. {
  16487. "type": "string",
  16488. "pattern": "^ses"
  16489. },
  16490. {
  16491. "type": "null"
  16492. }
  16493. ]
  16494. },
  16495. "slug": {
  16496. "anyOf": [
  16497. {
  16498. "type": "string"
  16499. },
  16500. {
  16501. "type": "null"
  16502. }
  16503. ]
  16504. },
  16505. "projectID": {
  16506. "anyOf": [
  16507. {
  16508. "type": "string"
  16509. },
  16510. {
  16511. "type": "null"
  16512. }
  16513. ]
  16514. },
  16515. "workspaceID": {
  16516. "anyOf": [
  16517. {
  16518. "type": "string",
  16519. "pattern": "^wrk"
  16520. },
  16521. {
  16522. "type": "null"
  16523. }
  16524. ]
  16525. },
  16526. "directory": {
  16527. "anyOf": [
  16528. {
  16529. "type": "string"
  16530. },
  16531. {
  16532. "type": "null"
  16533. }
  16534. ]
  16535. },
  16536. "path": {
  16537. "anyOf": [
  16538. {
  16539. "type": "string"
  16540. },
  16541. {
  16542. "type": "null"
  16543. }
  16544. ]
  16545. },
  16546. "parentID": {
  16547. "anyOf": [
  16548. {
  16549. "type": "string",
  16550. "pattern": "^ses"
  16551. },
  16552. {
  16553. "type": "null"
  16554. }
  16555. ]
  16556. },
  16557. "summary": {
  16558. "anyOf": [
  16559. {
  16560. "type": "object",
  16561. "properties": {
  16562. "additions": {
  16563. "type": "number"
  16564. },
  16565. "deletions": {
  16566. "type": "number"
  16567. },
  16568. "files": {
  16569. "type": "number"
  16570. },
  16571. "diffs": {
  16572. "type": "array",
  16573. "items": {
  16574. "$ref": "#/components/schemas/SnapshotFileDiff"
  16575. }
  16576. }
  16577. },
  16578. "required": ["additions", "deletions", "files"],
  16579. "additionalProperties": false
  16580. },
  16581. {
  16582. "type": "null"
  16583. }
  16584. ]
  16585. },
  16586. "cost": {
  16587. "anyOf": [
  16588. {
  16589. "type": "number"
  16590. },
  16591. {
  16592. "type": "null"
  16593. }
  16594. ]
  16595. },
  16596. "tokens": {
  16597. "anyOf": [
  16598. {
  16599. "type": "object",
  16600. "properties": {
  16601. "input": {
  16602. "type": "number"
  16603. },
  16604. "output": {
  16605. "type": "number"
  16606. },
  16607. "reasoning": {
  16608. "type": "number"
  16609. },
  16610. "cache": {
  16611. "type": "object",
  16612. "properties": {
  16613. "read": {
  16614. "type": "number"
  16615. },
  16616. "write": {
  16617. "type": "number"
  16618. }
  16619. },
  16620. "required": ["read", "write"],
  16621. "additionalProperties": false
  16622. }
  16623. },
  16624. "required": ["input", "output", "reasoning", "cache"],
  16625. "additionalProperties": false
  16626. },
  16627. {
  16628. "type": "null"
  16629. }
  16630. ]
  16631. },
  16632. "share": {
  16633. "type": "object",
  16634. "properties": {
  16635. "url": {
  16636. "anyOf": [
  16637. {
  16638. "type": "string"
  16639. },
  16640. {
  16641. "type": "null"
  16642. }
  16643. ]
  16644. }
  16645. },
  16646. "additionalProperties": false
  16647. },
  16648. "title": {
  16649. "anyOf": [
  16650. {
  16651. "type": "string"
  16652. },
  16653. {
  16654. "type": "null"
  16655. }
  16656. ]
  16657. },
  16658. "agent": {
  16659. "anyOf": [
  16660. {
  16661. "type": "string"
  16662. },
  16663. {
  16664. "type": "null"
  16665. }
  16666. ]
  16667. },
  16668. "model": {
  16669. "anyOf": [
  16670. {
  16671. "type": "object",
  16672. "properties": {
  16673. "id": {
  16674. "type": "string"
  16675. },
  16676. "providerID": {
  16677. "type": "string"
  16678. },
  16679. "variant": {
  16680. "type": "string"
  16681. }
  16682. },
  16683. "required": ["id", "providerID"],
  16684. "additionalProperties": false
  16685. },
  16686. {
  16687. "type": "null"
  16688. }
  16689. ]
  16690. },
  16691. "version": {
  16692. "anyOf": [
  16693. {
  16694. "type": "string"
  16695. },
  16696. {
  16697. "type": "null"
  16698. }
  16699. ]
  16700. },
  16701. "time": {
  16702. "type": "object",
  16703. "properties": {
  16704. "created": {
  16705. "anyOf": [
  16706. {
  16707. "type": "integer",
  16708. "minimum": 0
  16709. },
  16710. {
  16711. "type": "null"
  16712. }
  16713. ]
  16714. },
  16715. "updated": {
  16716. "anyOf": [
  16717. {
  16718. "type": "integer",
  16719. "minimum": 0
  16720. },
  16721. {
  16722. "type": "null"
  16723. }
  16724. ]
  16725. },
  16726. "compacting": {
  16727. "anyOf": [
  16728. {
  16729. "type": "integer",
  16730. "minimum": 0
  16731. },
  16732. {
  16733. "type": "null"
  16734. }
  16735. ]
  16736. },
  16737. "archived": {
  16738. "anyOf": [
  16739. {
  16740. "type": "number"
  16741. },
  16742. {
  16743. "type": "null"
  16744. }
  16745. ]
  16746. }
  16747. },
  16748. "additionalProperties": false
  16749. },
  16750. "permission": {
  16751. "anyOf": [
  16752. {
  16753. "$ref": "#/components/schemas/PermissionRuleset"
  16754. },
  16755. {
  16756. "type": "null"
  16757. }
  16758. ]
  16759. },
  16760. "revert": {
  16761. "anyOf": [
  16762. {
  16763. "type": "object",
  16764. "properties": {
  16765. "messageID": {
  16766. "type": "string",
  16767. "pattern": "^msg"
  16768. },
  16769. "partID": {
  16770. "type": "string",
  16771. "pattern": "^prt"
  16772. },
  16773. "snapshot": {
  16774. "type": "string"
  16775. },
  16776. "diff": {
  16777. "type": "string"
  16778. }
  16779. },
  16780. "required": ["messageID"],
  16781. "additionalProperties": false
  16782. },
  16783. {
  16784. "type": "null"
  16785. }
  16786. ]
  16787. }
  16788. },
  16789. "additionalProperties": false
  16790. }
  16791. },
  16792. "required": ["sessionID", "info"],
  16793. "additionalProperties": false
  16794. }
  16795. },
  16796. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16797. "additionalProperties": false
  16798. },
  16799. "SyncEventSessionDeleted": {
  16800. "type": "object",
  16801. "properties": {
  16802. "type": {
  16803. "type": "string",
  16804. "enum": ["sync"]
  16805. },
  16806. "name": {
  16807. "type": "string",
  16808. "enum": ["session.deleted.1"]
  16809. },
  16810. "id": {
  16811. "type": "string"
  16812. },
  16813. "seq": {
  16814. "type": "number"
  16815. },
  16816. "aggregateID": {
  16817. "type": "string",
  16818. "enum": ["sessionID"]
  16819. },
  16820. "data": {
  16821. "type": "object",
  16822. "properties": {
  16823. "sessionID": {
  16824. "type": "string",
  16825. "pattern": "^ses"
  16826. },
  16827. "info": {
  16828. "$ref": "#/components/schemas/Session"
  16829. }
  16830. },
  16831. "required": ["sessionID", "info"],
  16832. "additionalProperties": false
  16833. }
  16834. },
  16835. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16836. "additionalProperties": false
  16837. },
  16838. "SyncEventSessionNextAgentSwitched": {
  16839. "type": "object",
  16840. "properties": {
  16841. "type": {
  16842. "type": "string",
  16843. "enum": ["sync"]
  16844. },
  16845. "name": {
  16846. "type": "string",
  16847. "enum": ["session.next.agent.switched.1"]
  16848. },
  16849. "id": {
  16850. "type": "string"
  16851. },
  16852. "seq": {
  16853. "type": "number"
  16854. },
  16855. "aggregateID": {
  16856. "type": "string",
  16857. "enum": ["sessionID"]
  16858. },
  16859. "data": {
  16860. "type": "object",
  16861. "properties": {
  16862. "timestamp": {
  16863. "type": "number"
  16864. },
  16865. "sessionID": {
  16866. "type": "string",
  16867. "pattern": "^ses"
  16868. },
  16869. "agent": {
  16870. "type": "string"
  16871. }
  16872. },
  16873. "required": ["timestamp", "sessionID", "agent"],
  16874. "additionalProperties": false
  16875. }
  16876. },
  16877. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16878. "additionalProperties": false
  16879. },
  16880. "SyncEventSessionNextModelSwitched": {
  16881. "type": "object",
  16882. "properties": {
  16883. "type": {
  16884. "type": "string",
  16885. "enum": ["sync"]
  16886. },
  16887. "name": {
  16888. "type": "string",
  16889. "enum": ["session.next.model.switched.1"]
  16890. },
  16891. "id": {
  16892. "type": "string"
  16893. },
  16894. "seq": {
  16895. "type": "number"
  16896. },
  16897. "aggregateID": {
  16898. "type": "string",
  16899. "enum": ["sessionID"]
  16900. },
  16901. "data": {
  16902. "type": "object",
  16903. "properties": {
  16904. "timestamp": {
  16905. "type": "number"
  16906. },
  16907. "sessionID": {
  16908. "type": "string",
  16909. "pattern": "^ses"
  16910. },
  16911. "model": {
  16912. "type": "object",
  16913. "properties": {
  16914. "id": {
  16915. "type": "string"
  16916. },
  16917. "providerID": {
  16918. "type": "string"
  16919. },
  16920. "variant": {
  16921. "type": "string"
  16922. }
  16923. },
  16924. "required": ["id", "providerID", "variant"],
  16925. "additionalProperties": false
  16926. }
  16927. },
  16928. "required": ["timestamp", "sessionID", "model"],
  16929. "additionalProperties": false
  16930. }
  16931. },
  16932. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16933. "additionalProperties": false
  16934. },
  16935. "SyncEventSessionNextPrompted": {
  16936. "type": "object",
  16937. "properties": {
  16938. "type": {
  16939. "type": "string",
  16940. "enum": ["sync"]
  16941. },
  16942. "name": {
  16943. "type": "string",
  16944. "enum": ["session.next.prompted.1"]
  16945. },
  16946. "id": {
  16947. "type": "string"
  16948. },
  16949. "seq": {
  16950. "type": "number"
  16951. },
  16952. "aggregateID": {
  16953. "type": "string",
  16954. "enum": ["sessionID"]
  16955. },
  16956. "data": {
  16957. "type": "object",
  16958. "properties": {
  16959. "timestamp": {
  16960. "type": "number"
  16961. },
  16962. "sessionID": {
  16963. "type": "string",
  16964. "pattern": "^ses"
  16965. },
  16966. "prompt": {
  16967. "$ref": "#/components/schemas/Prompt"
  16968. }
  16969. },
  16970. "required": ["timestamp", "sessionID", "prompt"],
  16971. "additionalProperties": false
  16972. }
  16973. },
  16974. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16975. "additionalProperties": false
  16976. },
  16977. "SyncEventSessionNextSynthetic": {
  16978. "type": "object",
  16979. "properties": {
  16980. "type": {
  16981. "type": "string",
  16982. "enum": ["sync"]
  16983. },
  16984. "name": {
  16985. "type": "string",
  16986. "enum": ["session.next.synthetic.1"]
  16987. },
  16988. "id": {
  16989. "type": "string"
  16990. },
  16991. "seq": {
  16992. "type": "number"
  16993. },
  16994. "aggregateID": {
  16995. "type": "string",
  16996. "enum": ["sessionID"]
  16997. },
  16998. "data": {
  16999. "type": "object",
  17000. "properties": {
  17001. "timestamp": {
  17002. "type": "number"
  17003. },
  17004. "sessionID": {
  17005. "type": "string",
  17006. "pattern": "^ses"
  17007. },
  17008. "text": {
  17009. "type": "string"
  17010. }
  17011. },
  17012. "required": ["timestamp", "sessionID", "text"],
  17013. "additionalProperties": false
  17014. }
  17015. },
  17016. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17017. "additionalProperties": false
  17018. },
  17019. "SyncEventSessionNextShellStarted": {
  17020. "type": "object",
  17021. "properties": {
  17022. "type": {
  17023. "type": "string",
  17024. "enum": ["sync"]
  17025. },
  17026. "name": {
  17027. "type": "string",
  17028. "enum": ["session.next.shell.started.1"]
  17029. },
  17030. "id": {
  17031. "type": "string"
  17032. },
  17033. "seq": {
  17034. "type": "number"
  17035. },
  17036. "aggregateID": {
  17037. "type": "string",
  17038. "enum": ["sessionID"]
  17039. },
  17040. "data": {
  17041. "type": "object",
  17042. "properties": {
  17043. "timestamp": {
  17044. "type": "number"
  17045. },
  17046. "sessionID": {
  17047. "type": "string",
  17048. "pattern": "^ses"
  17049. },
  17050. "callID": {
  17051. "type": "string"
  17052. },
  17053. "command": {
  17054. "type": "string"
  17055. }
  17056. },
  17057. "required": ["timestamp", "sessionID", "callID", "command"],
  17058. "additionalProperties": false
  17059. }
  17060. },
  17061. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17062. "additionalProperties": false
  17063. },
  17064. "SyncEventSessionNextShellEnded": {
  17065. "type": "object",
  17066. "properties": {
  17067. "type": {
  17068. "type": "string",
  17069. "enum": ["sync"]
  17070. },
  17071. "name": {
  17072. "type": "string",
  17073. "enum": ["session.next.shell.ended.1"]
  17074. },
  17075. "id": {
  17076. "type": "string"
  17077. },
  17078. "seq": {
  17079. "type": "number"
  17080. },
  17081. "aggregateID": {
  17082. "type": "string",
  17083. "enum": ["sessionID"]
  17084. },
  17085. "data": {
  17086. "type": "object",
  17087. "properties": {
  17088. "timestamp": {
  17089. "type": "number"
  17090. },
  17091. "sessionID": {
  17092. "type": "string",
  17093. "pattern": "^ses"
  17094. },
  17095. "callID": {
  17096. "type": "string"
  17097. },
  17098. "output": {
  17099. "type": "string"
  17100. }
  17101. },
  17102. "required": ["timestamp", "sessionID", "callID", "output"],
  17103. "additionalProperties": false
  17104. }
  17105. },
  17106. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17107. "additionalProperties": false
  17108. },
  17109. "SyncEventSessionNextStepStarted": {
  17110. "type": "object",
  17111. "properties": {
  17112. "type": {
  17113. "type": "string",
  17114. "enum": ["sync"]
  17115. },
  17116. "name": {
  17117. "type": "string",
  17118. "enum": ["session.next.step.started.1"]
  17119. },
  17120. "id": {
  17121. "type": "string"
  17122. },
  17123. "seq": {
  17124. "type": "number"
  17125. },
  17126. "aggregateID": {
  17127. "type": "string",
  17128. "enum": ["sessionID"]
  17129. },
  17130. "data": {
  17131. "type": "object",
  17132. "properties": {
  17133. "timestamp": {
  17134. "type": "number"
  17135. },
  17136. "sessionID": {
  17137. "type": "string",
  17138. "pattern": "^ses"
  17139. },
  17140. "agent": {
  17141. "type": "string"
  17142. },
  17143. "model": {
  17144. "type": "object",
  17145. "properties": {
  17146. "id": {
  17147. "type": "string"
  17148. },
  17149. "providerID": {
  17150. "type": "string"
  17151. },
  17152. "variant": {
  17153. "type": "string"
  17154. }
  17155. },
  17156. "required": ["id", "providerID", "variant"],
  17157. "additionalProperties": false
  17158. },
  17159. "snapshot": {
  17160. "type": "string"
  17161. }
  17162. },
  17163. "required": ["timestamp", "sessionID", "agent", "model"],
  17164. "additionalProperties": false
  17165. }
  17166. },
  17167. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17168. "additionalProperties": false
  17169. },
  17170. "SyncEventSessionNextStepEnded": {
  17171. "type": "object",
  17172. "properties": {
  17173. "type": {
  17174. "type": "string",
  17175. "enum": ["sync"]
  17176. },
  17177. "name": {
  17178. "type": "string",
  17179. "enum": ["session.next.step.ended.1"]
  17180. },
  17181. "id": {
  17182. "type": "string"
  17183. },
  17184. "seq": {
  17185. "type": "number"
  17186. },
  17187. "aggregateID": {
  17188. "type": "string",
  17189. "enum": ["sessionID"]
  17190. },
  17191. "data": {
  17192. "type": "object",
  17193. "properties": {
  17194. "timestamp": {
  17195. "type": "number"
  17196. },
  17197. "sessionID": {
  17198. "type": "string",
  17199. "pattern": "^ses"
  17200. },
  17201. "finish": {
  17202. "type": "string"
  17203. },
  17204. "cost": {
  17205. "type": "number"
  17206. },
  17207. "tokens": {
  17208. "type": "object",
  17209. "properties": {
  17210. "input": {
  17211. "type": "number"
  17212. },
  17213. "output": {
  17214. "type": "number"
  17215. },
  17216. "reasoning": {
  17217. "type": "number"
  17218. },
  17219. "cache": {
  17220. "type": "object",
  17221. "properties": {
  17222. "read": {
  17223. "type": "number"
  17224. },
  17225. "write": {
  17226. "type": "number"
  17227. }
  17228. },
  17229. "required": ["read", "write"],
  17230. "additionalProperties": false
  17231. }
  17232. },
  17233. "required": ["input", "output", "reasoning", "cache"],
  17234. "additionalProperties": false
  17235. },
  17236. "snapshot": {
  17237. "type": "string"
  17238. }
  17239. },
  17240. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17241. "additionalProperties": false
  17242. }
  17243. },
  17244. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17245. "additionalProperties": false
  17246. },
  17247. "SyncEventSessionNextStepFailed": {
  17248. "type": "object",
  17249. "properties": {
  17250. "type": {
  17251. "type": "string",
  17252. "enum": ["sync"]
  17253. },
  17254. "name": {
  17255. "type": "string",
  17256. "enum": ["session.next.step.failed.1"]
  17257. },
  17258. "id": {
  17259. "type": "string"
  17260. },
  17261. "seq": {
  17262. "type": "number"
  17263. },
  17264. "aggregateID": {
  17265. "type": "string",
  17266. "enum": ["sessionID"]
  17267. },
  17268. "data": {
  17269. "type": "object",
  17270. "properties": {
  17271. "timestamp": {
  17272. "type": "number"
  17273. },
  17274. "sessionID": {
  17275. "type": "string",
  17276. "pattern": "^ses"
  17277. },
  17278. "error": {
  17279. "$ref": "#/components/schemas/SessionErrorUnknown"
  17280. }
  17281. },
  17282. "required": ["timestamp", "sessionID", "error"],
  17283. "additionalProperties": false
  17284. }
  17285. },
  17286. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17287. "additionalProperties": false
  17288. },
  17289. "SyncEventSessionNextTextStarted": {
  17290. "type": "object",
  17291. "properties": {
  17292. "type": {
  17293. "type": "string",
  17294. "enum": ["sync"]
  17295. },
  17296. "name": {
  17297. "type": "string",
  17298. "enum": ["session.next.text.started.1"]
  17299. },
  17300. "id": {
  17301. "type": "string"
  17302. },
  17303. "seq": {
  17304. "type": "number"
  17305. },
  17306. "aggregateID": {
  17307. "type": "string",
  17308. "enum": ["sessionID"]
  17309. },
  17310. "data": {
  17311. "type": "object",
  17312. "properties": {
  17313. "timestamp": {
  17314. "type": "number"
  17315. },
  17316. "sessionID": {
  17317. "type": "string",
  17318. "pattern": "^ses"
  17319. }
  17320. },
  17321. "required": ["timestamp", "sessionID"],
  17322. "additionalProperties": false
  17323. }
  17324. },
  17325. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17326. "additionalProperties": false
  17327. },
  17328. "SyncEventSessionNextTextDelta": {
  17329. "type": "object",
  17330. "properties": {
  17331. "type": {
  17332. "type": "string",
  17333. "enum": ["sync"]
  17334. },
  17335. "name": {
  17336. "type": "string",
  17337. "enum": ["session.next.text.delta.1"]
  17338. },
  17339. "id": {
  17340. "type": "string"
  17341. },
  17342. "seq": {
  17343. "type": "number"
  17344. },
  17345. "aggregateID": {
  17346. "type": "string",
  17347. "enum": ["sessionID"]
  17348. },
  17349. "data": {
  17350. "type": "object",
  17351. "properties": {
  17352. "timestamp": {
  17353. "type": "number"
  17354. },
  17355. "sessionID": {
  17356. "type": "string",
  17357. "pattern": "^ses"
  17358. },
  17359. "delta": {
  17360. "type": "string"
  17361. }
  17362. },
  17363. "required": ["timestamp", "sessionID", "delta"],
  17364. "additionalProperties": false
  17365. }
  17366. },
  17367. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17368. "additionalProperties": false
  17369. },
  17370. "SyncEventSessionNextTextEnded": {
  17371. "type": "object",
  17372. "properties": {
  17373. "type": {
  17374. "type": "string",
  17375. "enum": ["sync"]
  17376. },
  17377. "name": {
  17378. "type": "string",
  17379. "enum": ["session.next.text.ended.1"]
  17380. },
  17381. "id": {
  17382. "type": "string"
  17383. },
  17384. "seq": {
  17385. "type": "number"
  17386. },
  17387. "aggregateID": {
  17388. "type": "string",
  17389. "enum": ["sessionID"]
  17390. },
  17391. "data": {
  17392. "type": "object",
  17393. "properties": {
  17394. "timestamp": {
  17395. "type": "number"
  17396. },
  17397. "sessionID": {
  17398. "type": "string",
  17399. "pattern": "^ses"
  17400. },
  17401. "text": {
  17402. "type": "string"
  17403. }
  17404. },
  17405. "required": ["timestamp", "sessionID", "text"],
  17406. "additionalProperties": false
  17407. }
  17408. },
  17409. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17410. "additionalProperties": false
  17411. },
  17412. "SyncEventSessionNextReasoningStarted": {
  17413. "type": "object",
  17414. "properties": {
  17415. "type": {
  17416. "type": "string",
  17417. "enum": ["sync"]
  17418. },
  17419. "name": {
  17420. "type": "string",
  17421. "enum": ["session.next.reasoning.started.1"]
  17422. },
  17423. "id": {
  17424. "type": "string"
  17425. },
  17426. "seq": {
  17427. "type": "number"
  17428. },
  17429. "aggregateID": {
  17430. "type": "string",
  17431. "enum": ["sessionID"]
  17432. },
  17433. "data": {
  17434. "type": "object",
  17435. "properties": {
  17436. "timestamp": {
  17437. "type": "number"
  17438. },
  17439. "sessionID": {
  17440. "type": "string",
  17441. "pattern": "^ses"
  17442. },
  17443. "reasoningID": {
  17444. "type": "string"
  17445. }
  17446. },
  17447. "required": ["timestamp", "sessionID", "reasoningID"],
  17448. "additionalProperties": false
  17449. }
  17450. },
  17451. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17452. "additionalProperties": false
  17453. },
  17454. "SyncEventSessionNextReasoningDelta": {
  17455. "type": "object",
  17456. "properties": {
  17457. "type": {
  17458. "type": "string",
  17459. "enum": ["sync"]
  17460. },
  17461. "name": {
  17462. "type": "string",
  17463. "enum": ["session.next.reasoning.delta.1"]
  17464. },
  17465. "id": {
  17466. "type": "string"
  17467. },
  17468. "seq": {
  17469. "type": "number"
  17470. },
  17471. "aggregateID": {
  17472. "type": "string",
  17473. "enum": ["sessionID"]
  17474. },
  17475. "data": {
  17476. "type": "object",
  17477. "properties": {
  17478. "timestamp": {
  17479. "type": "number"
  17480. },
  17481. "sessionID": {
  17482. "type": "string",
  17483. "pattern": "^ses"
  17484. },
  17485. "reasoningID": {
  17486. "type": "string"
  17487. },
  17488. "delta": {
  17489. "type": "string"
  17490. }
  17491. },
  17492. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17493. "additionalProperties": false
  17494. }
  17495. },
  17496. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17497. "additionalProperties": false
  17498. },
  17499. "SyncEventSessionNextReasoningEnded": {
  17500. "type": "object",
  17501. "properties": {
  17502. "type": {
  17503. "type": "string",
  17504. "enum": ["sync"]
  17505. },
  17506. "name": {
  17507. "type": "string",
  17508. "enum": ["session.next.reasoning.ended.1"]
  17509. },
  17510. "id": {
  17511. "type": "string"
  17512. },
  17513. "seq": {
  17514. "type": "number"
  17515. },
  17516. "aggregateID": {
  17517. "type": "string",
  17518. "enum": ["sessionID"]
  17519. },
  17520. "data": {
  17521. "type": "object",
  17522. "properties": {
  17523. "timestamp": {
  17524. "type": "number"
  17525. },
  17526. "sessionID": {
  17527. "type": "string",
  17528. "pattern": "^ses"
  17529. },
  17530. "reasoningID": {
  17531. "type": "string"
  17532. },
  17533. "text": {
  17534. "type": "string"
  17535. }
  17536. },
  17537. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17538. "additionalProperties": false
  17539. }
  17540. },
  17541. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17542. "additionalProperties": false
  17543. },
  17544. "SyncEventSessionNextToolInputStarted": {
  17545. "type": "object",
  17546. "properties": {
  17547. "type": {
  17548. "type": "string",
  17549. "enum": ["sync"]
  17550. },
  17551. "name": {
  17552. "type": "string",
  17553. "enum": ["session.next.tool.input.started.1"]
  17554. },
  17555. "id": {
  17556. "type": "string"
  17557. },
  17558. "seq": {
  17559. "type": "number"
  17560. },
  17561. "aggregateID": {
  17562. "type": "string",
  17563. "enum": ["sessionID"]
  17564. },
  17565. "data": {
  17566. "type": "object",
  17567. "properties": {
  17568. "timestamp": {
  17569. "type": "number"
  17570. },
  17571. "sessionID": {
  17572. "type": "string",
  17573. "pattern": "^ses"
  17574. },
  17575. "callID": {
  17576. "type": "string"
  17577. },
  17578. "name": {
  17579. "type": "string"
  17580. }
  17581. },
  17582. "required": ["timestamp", "sessionID", "callID", "name"],
  17583. "additionalProperties": false
  17584. }
  17585. },
  17586. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17587. "additionalProperties": false
  17588. },
  17589. "SyncEventSessionNextToolInputDelta": {
  17590. "type": "object",
  17591. "properties": {
  17592. "type": {
  17593. "type": "string",
  17594. "enum": ["sync"]
  17595. },
  17596. "name": {
  17597. "type": "string",
  17598. "enum": ["session.next.tool.input.delta.1"]
  17599. },
  17600. "id": {
  17601. "type": "string"
  17602. },
  17603. "seq": {
  17604. "type": "number"
  17605. },
  17606. "aggregateID": {
  17607. "type": "string",
  17608. "enum": ["sessionID"]
  17609. },
  17610. "data": {
  17611. "type": "object",
  17612. "properties": {
  17613. "timestamp": {
  17614. "type": "number"
  17615. },
  17616. "sessionID": {
  17617. "type": "string",
  17618. "pattern": "^ses"
  17619. },
  17620. "callID": {
  17621. "type": "string"
  17622. },
  17623. "delta": {
  17624. "type": "string"
  17625. }
  17626. },
  17627. "required": ["timestamp", "sessionID", "callID", "delta"],
  17628. "additionalProperties": false
  17629. }
  17630. },
  17631. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17632. "additionalProperties": false
  17633. },
  17634. "SyncEventSessionNextToolInputEnded": {
  17635. "type": "object",
  17636. "properties": {
  17637. "type": {
  17638. "type": "string",
  17639. "enum": ["sync"]
  17640. },
  17641. "name": {
  17642. "type": "string",
  17643. "enum": ["session.next.tool.input.ended.1"]
  17644. },
  17645. "id": {
  17646. "type": "string"
  17647. },
  17648. "seq": {
  17649. "type": "number"
  17650. },
  17651. "aggregateID": {
  17652. "type": "string",
  17653. "enum": ["sessionID"]
  17654. },
  17655. "data": {
  17656. "type": "object",
  17657. "properties": {
  17658. "timestamp": {
  17659. "type": "number"
  17660. },
  17661. "sessionID": {
  17662. "type": "string",
  17663. "pattern": "^ses"
  17664. },
  17665. "callID": {
  17666. "type": "string"
  17667. },
  17668. "text": {
  17669. "type": "string"
  17670. }
  17671. },
  17672. "required": ["timestamp", "sessionID", "callID", "text"],
  17673. "additionalProperties": false
  17674. }
  17675. },
  17676. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17677. "additionalProperties": false
  17678. },
  17679. "SyncEventSessionNextToolCalled": {
  17680. "type": "object",
  17681. "properties": {
  17682. "type": {
  17683. "type": "string",
  17684. "enum": ["sync"]
  17685. },
  17686. "name": {
  17687. "type": "string",
  17688. "enum": ["session.next.tool.called.1"]
  17689. },
  17690. "id": {
  17691. "type": "string"
  17692. },
  17693. "seq": {
  17694. "type": "number"
  17695. },
  17696. "aggregateID": {
  17697. "type": "string",
  17698. "enum": ["sessionID"]
  17699. },
  17700. "data": {
  17701. "type": "object",
  17702. "properties": {
  17703. "timestamp": {
  17704. "type": "number"
  17705. },
  17706. "sessionID": {
  17707. "type": "string",
  17708. "pattern": "^ses"
  17709. },
  17710. "callID": {
  17711. "type": "string"
  17712. },
  17713. "tool": {
  17714. "type": "string"
  17715. },
  17716. "input": {
  17717. "type": "object"
  17718. },
  17719. "provider": {
  17720. "type": "object",
  17721. "properties": {
  17722. "executed": {
  17723. "type": "boolean"
  17724. },
  17725. "metadata": {
  17726. "type": "object"
  17727. }
  17728. },
  17729. "required": ["executed"],
  17730. "additionalProperties": false
  17731. }
  17732. },
  17733. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17734. "additionalProperties": false
  17735. }
  17736. },
  17737. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17738. "additionalProperties": false
  17739. },
  17740. "SyncEventSessionNextToolProgress": {
  17741. "type": "object",
  17742. "properties": {
  17743. "type": {
  17744. "type": "string",
  17745. "enum": ["sync"]
  17746. },
  17747. "name": {
  17748. "type": "string",
  17749. "enum": ["session.next.tool.progress.1"]
  17750. },
  17751. "id": {
  17752. "type": "string"
  17753. },
  17754. "seq": {
  17755. "type": "number"
  17756. },
  17757. "aggregateID": {
  17758. "type": "string",
  17759. "enum": ["sessionID"]
  17760. },
  17761. "data": {
  17762. "type": "object",
  17763. "properties": {
  17764. "timestamp": {
  17765. "type": "number"
  17766. },
  17767. "sessionID": {
  17768. "type": "string",
  17769. "pattern": "^ses"
  17770. },
  17771. "callID": {
  17772. "type": "string"
  17773. },
  17774. "structured": {
  17775. "type": "object"
  17776. },
  17777. "content": {
  17778. "type": "array",
  17779. "items": {
  17780. "anyOf": [
  17781. {
  17782. "$ref": "#/components/schemas/ToolTextContent"
  17783. },
  17784. {
  17785. "$ref": "#/components/schemas/ToolFileContent"
  17786. }
  17787. ]
  17788. }
  17789. }
  17790. },
  17791. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17792. "additionalProperties": false
  17793. }
  17794. },
  17795. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17796. "additionalProperties": false
  17797. },
  17798. "SyncEventSessionNextToolSuccess": {
  17799. "type": "object",
  17800. "properties": {
  17801. "type": {
  17802. "type": "string",
  17803. "enum": ["sync"]
  17804. },
  17805. "name": {
  17806. "type": "string",
  17807. "enum": ["session.next.tool.success.1"]
  17808. },
  17809. "id": {
  17810. "type": "string"
  17811. },
  17812. "seq": {
  17813. "type": "number"
  17814. },
  17815. "aggregateID": {
  17816. "type": "string",
  17817. "enum": ["sessionID"]
  17818. },
  17819. "data": {
  17820. "type": "object",
  17821. "properties": {
  17822. "timestamp": {
  17823. "type": "number"
  17824. },
  17825. "sessionID": {
  17826. "type": "string",
  17827. "pattern": "^ses"
  17828. },
  17829. "callID": {
  17830. "type": "string"
  17831. },
  17832. "structured": {
  17833. "type": "object"
  17834. },
  17835. "content": {
  17836. "type": "array",
  17837. "items": {
  17838. "anyOf": [
  17839. {
  17840. "$ref": "#/components/schemas/ToolTextContent"
  17841. },
  17842. {
  17843. "$ref": "#/components/schemas/ToolFileContent"
  17844. }
  17845. ]
  17846. }
  17847. },
  17848. "provider": {
  17849. "type": "object",
  17850. "properties": {
  17851. "executed": {
  17852. "type": "boolean"
  17853. },
  17854. "metadata": {
  17855. "type": "object"
  17856. }
  17857. },
  17858. "required": ["executed"],
  17859. "additionalProperties": false
  17860. }
  17861. },
  17862. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17863. "additionalProperties": false
  17864. }
  17865. },
  17866. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17867. "additionalProperties": false
  17868. },
  17869. "SyncEventSessionNextToolFailed": {
  17870. "type": "object",
  17871. "properties": {
  17872. "type": {
  17873. "type": "string",
  17874. "enum": ["sync"]
  17875. },
  17876. "name": {
  17877. "type": "string",
  17878. "enum": ["session.next.tool.failed.1"]
  17879. },
  17880. "id": {
  17881. "type": "string"
  17882. },
  17883. "seq": {
  17884. "type": "number"
  17885. },
  17886. "aggregateID": {
  17887. "type": "string",
  17888. "enum": ["sessionID"]
  17889. },
  17890. "data": {
  17891. "type": "object",
  17892. "properties": {
  17893. "timestamp": {
  17894. "type": "number"
  17895. },
  17896. "sessionID": {
  17897. "type": "string",
  17898. "pattern": "^ses"
  17899. },
  17900. "callID": {
  17901. "type": "string"
  17902. },
  17903. "error": {
  17904. "$ref": "#/components/schemas/SessionErrorUnknown"
  17905. },
  17906. "provider": {
  17907. "type": "object",
  17908. "properties": {
  17909. "executed": {
  17910. "type": "boolean"
  17911. },
  17912. "metadata": {
  17913. "type": "object"
  17914. }
  17915. },
  17916. "required": ["executed"],
  17917. "additionalProperties": false
  17918. }
  17919. },
  17920. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17921. "additionalProperties": false
  17922. }
  17923. },
  17924. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17925. "additionalProperties": false
  17926. },
  17927. "SyncEventSessionNextRetried": {
  17928. "type": "object",
  17929. "properties": {
  17930. "type": {
  17931. "type": "string",
  17932. "enum": ["sync"]
  17933. },
  17934. "name": {
  17935. "type": "string",
  17936. "enum": ["session.next.retried.1"]
  17937. },
  17938. "id": {
  17939. "type": "string"
  17940. },
  17941. "seq": {
  17942. "type": "number"
  17943. },
  17944. "aggregateID": {
  17945. "type": "string",
  17946. "enum": ["sessionID"]
  17947. },
  17948. "data": {
  17949. "type": "object",
  17950. "properties": {
  17951. "timestamp": {
  17952. "type": "number"
  17953. },
  17954. "sessionID": {
  17955. "type": "string",
  17956. "pattern": "^ses"
  17957. },
  17958. "attempt": {
  17959. "type": "number"
  17960. },
  17961. "error": {
  17962. "$ref": "#/components/schemas/SessionNextRetry_error"
  17963. }
  17964. },
  17965. "required": ["timestamp", "sessionID", "attempt", "error"],
  17966. "additionalProperties": false
  17967. }
  17968. },
  17969. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17970. "additionalProperties": false
  17971. },
  17972. "SyncEventSessionNextCompactionStarted": {
  17973. "type": "object",
  17974. "properties": {
  17975. "type": {
  17976. "type": "string",
  17977. "enum": ["sync"]
  17978. },
  17979. "name": {
  17980. "type": "string",
  17981. "enum": ["session.next.compaction.started.1"]
  17982. },
  17983. "id": {
  17984. "type": "string"
  17985. },
  17986. "seq": {
  17987. "type": "number"
  17988. },
  17989. "aggregateID": {
  17990. "type": "string",
  17991. "enum": ["sessionID"]
  17992. },
  17993. "data": {
  17994. "type": "object",
  17995. "properties": {
  17996. "timestamp": {
  17997. "type": "number"
  17998. },
  17999. "sessionID": {
  18000. "type": "string",
  18001. "pattern": "^ses"
  18002. },
  18003. "reason": {
  18004. "type": "string",
  18005. "enum": ["auto", "manual"]
  18006. }
  18007. },
  18008. "required": ["timestamp", "sessionID", "reason"],
  18009. "additionalProperties": false
  18010. }
  18011. },
  18012. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18013. "additionalProperties": false
  18014. },
  18015. "SyncEventSessionNextCompactionDelta": {
  18016. "type": "object",
  18017. "properties": {
  18018. "type": {
  18019. "type": "string",
  18020. "enum": ["sync"]
  18021. },
  18022. "name": {
  18023. "type": "string",
  18024. "enum": ["session.next.compaction.delta.1"]
  18025. },
  18026. "id": {
  18027. "type": "string"
  18028. },
  18029. "seq": {
  18030. "type": "number"
  18031. },
  18032. "aggregateID": {
  18033. "type": "string",
  18034. "enum": ["sessionID"]
  18035. },
  18036. "data": {
  18037. "type": "object",
  18038. "properties": {
  18039. "timestamp": {
  18040. "type": "number"
  18041. },
  18042. "sessionID": {
  18043. "type": "string",
  18044. "pattern": "^ses"
  18045. },
  18046. "text": {
  18047. "type": "string"
  18048. }
  18049. },
  18050. "required": ["timestamp", "sessionID", "text"],
  18051. "additionalProperties": false
  18052. }
  18053. },
  18054. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18055. "additionalProperties": false
  18056. },
  18057. "SyncEventSessionNextCompactionEnded": {
  18058. "type": "object",
  18059. "properties": {
  18060. "type": {
  18061. "type": "string",
  18062. "enum": ["sync"]
  18063. },
  18064. "name": {
  18065. "type": "string",
  18066. "enum": ["session.next.compaction.ended.1"]
  18067. },
  18068. "id": {
  18069. "type": "string"
  18070. },
  18071. "seq": {
  18072. "type": "number"
  18073. },
  18074. "aggregateID": {
  18075. "type": "string",
  18076. "enum": ["sessionID"]
  18077. },
  18078. "data": {
  18079. "type": "object",
  18080. "properties": {
  18081. "timestamp": {
  18082. "type": "number"
  18083. },
  18084. "sessionID": {
  18085. "type": "string",
  18086. "pattern": "^ses"
  18087. },
  18088. "text": {
  18089. "type": "string"
  18090. },
  18091. "include": {
  18092. "type": "string"
  18093. }
  18094. },
  18095. "required": ["timestamp", "sessionID", "text"],
  18096. "additionalProperties": false
  18097. }
  18098. },
  18099. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18100. "additionalProperties": false
  18101. },
  18102. "EventServerConnected": {
  18103. "type": "object",
  18104. "properties": {
  18105. "id": {
  18106. "type": "string"
  18107. },
  18108. "type": {
  18109. "type": "string",
  18110. "enum": ["server.connected"]
  18111. },
  18112. "properties": {
  18113. "type": "object",
  18114. "properties": {}
  18115. }
  18116. },
  18117. "required": ["id", "type", "properties"],
  18118. "additionalProperties": false
  18119. },
  18120. "EventGlobalDisposed": {
  18121. "type": "object",
  18122. "properties": {
  18123. "id": {
  18124. "type": "string"
  18125. },
  18126. "type": {
  18127. "type": "string",
  18128. "enum": ["global.disposed"]
  18129. },
  18130. "properties": {
  18131. "type": "object",
  18132. "properties": {}
  18133. }
  18134. },
  18135. "required": ["id", "type", "properties"],
  18136. "additionalProperties": false
  18137. },
  18138. "EventServerInstanceDisposed": {
  18139. "type": "object",
  18140. "properties": {
  18141. "id": {
  18142. "type": "string"
  18143. },
  18144. "type": {
  18145. "type": "string",
  18146. "enum": ["server.instance.disposed"]
  18147. },
  18148. "properties": {
  18149. "type": "object",
  18150. "properties": {
  18151. "directory": {
  18152. "type": "string"
  18153. }
  18154. },
  18155. "required": ["directory"],
  18156. "additionalProperties": false
  18157. }
  18158. },
  18159. "required": ["id", "type", "properties"],
  18160. "additionalProperties": false
  18161. },
  18162. "EventFileEdited": {
  18163. "type": "object",
  18164. "properties": {
  18165. "id": {
  18166. "type": "string"
  18167. },
  18168. "type": {
  18169. "type": "string",
  18170. "enum": ["file.edited"]
  18171. },
  18172. "properties": {
  18173. "type": "object",
  18174. "properties": {
  18175. "file": {
  18176. "type": "string"
  18177. }
  18178. },
  18179. "required": ["file"],
  18180. "additionalProperties": false
  18181. }
  18182. },
  18183. "required": ["id", "type", "properties"],
  18184. "additionalProperties": false
  18185. },
  18186. "EventFileWatcherUpdated": {
  18187. "type": "object",
  18188. "properties": {
  18189. "id": {
  18190. "type": "string"
  18191. },
  18192. "type": {
  18193. "type": "string",
  18194. "enum": ["file.watcher.updated"]
  18195. },
  18196. "properties": {
  18197. "type": "object",
  18198. "properties": {
  18199. "file": {
  18200. "type": "string"
  18201. },
  18202. "event": {
  18203. "type": "string",
  18204. "enum": ["add", "change", "unlink"]
  18205. }
  18206. },
  18207. "required": ["file", "event"],
  18208. "additionalProperties": false
  18209. }
  18210. },
  18211. "required": ["id", "type", "properties"],
  18212. "additionalProperties": false
  18213. },
  18214. "EventLspClientDiagnostics": {
  18215. "type": "object",
  18216. "properties": {
  18217. "id": {
  18218. "type": "string"
  18219. },
  18220. "type": {
  18221. "type": "string",
  18222. "enum": ["lsp.client.diagnostics"]
  18223. },
  18224. "properties": {
  18225. "type": "object",
  18226. "properties": {
  18227. "serverID": {
  18228. "type": "string"
  18229. },
  18230. "path": {
  18231. "type": "string"
  18232. }
  18233. },
  18234. "required": ["serverID", "path"],
  18235. "additionalProperties": false
  18236. }
  18237. },
  18238. "required": ["id", "type", "properties"],
  18239. "additionalProperties": false
  18240. },
  18241. "EventLspUpdated": {
  18242. "type": "object",
  18243. "properties": {
  18244. "id": {
  18245. "type": "string"
  18246. },
  18247. "type": {
  18248. "type": "string",
  18249. "enum": ["lsp.updated"]
  18250. },
  18251. "properties": {
  18252. "type": "object",
  18253. "properties": {}
  18254. }
  18255. },
  18256. "required": ["id", "type", "properties"],
  18257. "additionalProperties": false
  18258. },
  18259. "EventMessagePartDelta": {
  18260. "type": "object",
  18261. "properties": {
  18262. "id": {
  18263. "type": "string"
  18264. },
  18265. "type": {
  18266. "type": "string",
  18267. "enum": ["message.part.delta"]
  18268. },
  18269. "properties": {
  18270. "type": "object",
  18271. "properties": {
  18272. "sessionID": {
  18273. "type": "string",
  18274. "pattern": "^ses"
  18275. },
  18276. "messageID": {
  18277. "type": "string",
  18278. "pattern": "^msg"
  18279. },
  18280. "partID": {
  18281. "type": "string",
  18282. "pattern": "^prt"
  18283. },
  18284. "field": {
  18285. "type": "string"
  18286. },
  18287. "delta": {
  18288. "type": "string"
  18289. }
  18290. },
  18291. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18292. "additionalProperties": false
  18293. }
  18294. },
  18295. "required": ["id", "type", "properties"],
  18296. "additionalProperties": false
  18297. },
  18298. "EventPermissionAsked": {
  18299. "type": "object",
  18300. "properties": {
  18301. "id": {
  18302. "type": "string"
  18303. },
  18304. "type": {
  18305. "type": "string",
  18306. "enum": ["permission.asked"]
  18307. },
  18308. "properties": {
  18309. "$ref": "#/components/schemas/PermissionRequest"
  18310. }
  18311. },
  18312. "required": ["id", "type", "properties"],
  18313. "additionalProperties": false
  18314. },
  18315. "EventPermissionReplied": {
  18316. "type": "object",
  18317. "properties": {
  18318. "id": {
  18319. "type": "string"
  18320. },
  18321. "type": {
  18322. "type": "string",
  18323. "enum": ["permission.replied"]
  18324. },
  18325. "properties": {
  18326. "type": "object",
  18327. "properties": {
  18328. "sessionID": {
  18329. "type": "string",
  18330. "pattern": "^ses"
  18331. },
  18332. "requestID": {
  18333. "type": "string",
  18334. "pattern": "^per"
  18335. },
  18336. "reply": {
  18337. "type": "string",
  18338. "enum": ["once", "always", "reject"]
  18339. }
  18340. },
  18341. "required": ["sessionID", "requestID", "reply"],
  18342. "additionalProperties": false
  18343. }
  18344. },
  18345. "required": ["id", "type", "properties"],
  18346. "additionalProperties": false
  18347. },
  18348. "EventSessionDiff": {
  18349. "type": "object",
  18350. "properties": {
  18351. "id": {
  18352. "type": "string"
  18353. },
  18354. "type": {
  18355. "type": "string",
  18356. "enum": ["session.diff"]
  18357. },
  18358. "properties": {
  18359. "type": "object",
  18360. "properties": {
  18361. "sessionID": {
  18362. "type": "string",
  18363. "pattern": "^ses"
  18364. },
  18365. "diff": {
  18366. "type": "array",
  18367. "items": {
  18368. "$ref": "#/components/schemas/SnapshotFileDiff"
  18369. }
  18370. }
  18371. },
  18372. "required": ["sessionID", "diff"],
  18373. "additionalProperties": false
  18374. }
  18375. },
  18376. "required": ["id", "type", "properties"],
  18377. "additionalProperties": false
  18378. },
  18379. "EventSessionError": {
  18380. "type": "object",
  18381. "properties": {
  18382. "id": {
  18383. "type": "string"
  18384. },
  18385. "type": {
  18386. "type": "string",
  18387. "enum": ["session.error"]
  18388. },
  18389. "properties": {
  18390. "type": "object",
  18391. "properties": {
  18392. "sessionID": {
  18393. "type": "string",
  18394. "pattern": "^ses"
  18395. },
  18396. "error": {
  18397. "anyOf": [
  18398. {
  18399. "$ref": "#/components/schemas/ProviderAuthError"
  18400. },
  18401. {
  18402. "$ref": "#/components/schemas/UnknownError"
  18403. },
  18404. {
  18405. "$ref": "#/components/schemas/MessageOutputLengthError"
  18406. },
  18407. {
  18408. "$ref": "#/components/schemas/MessageAbortedError"
  18409. },
  18410. {
  18411. "$ref": "#/components/schemas/StructuredOutputError"
  18412. },
  18413. {
  18414. "$ref": "#/components/schemas/ContextOverflowError"
  18415. },
  18416. {
  18417. "$ref": "#/components/schemas/APIError"
  18418. }
  18419. ]
  18420. }
  18421. },
  18422. "additionalProperties": false
  18423. }
  18424. },
  18425. "required": ["id", "type", "properties"],
  18426. "additionalProperties": false
  18427. },
  18428. "EventQuestionAsked": {
  18429. "type": "object",
  18430. "properties": {
  18431. "id": {
  18432. "type": "string"
  18433. },
  18434. "type": {
  18435. "type": "string",
  18436. "enum": ["question.asked"]
  18437. },
  18438. "properties": {
  18439. "$ref": "#/components/schemas/QuestionRequest"
  18440. }
  18441. },
  18442. "required": ["id", "type", "properties"],
  18443. "additionalProperties": false
  18444. },
  18445. "EventQuestionReplied": {
  18446. "type": "object",
  18447. "properties": {
  18448. "id": {
  18449. "type": "string"
  18450. },
  18451. "type": {
  18452. "type": "string",
  18453. "enum": ["question.replied"]
  18454. },
  18455. "properties": {
  18456. "$ref": "#/components/schemas/QuestionReplied"
  18457. }
  18458. },
  18459. "required": ["id", "type", "properties"],
  18460. "additionalProperties": false
  18461. },
  18462. "EventQuestionRejected": {
  18463. "type": "object",
  18464. "properties": {
  18465. "id": {
  18466. "type": "string"
  18467. },
  18468. "type": {
  18469. "type": "string",
  18470. "enum": ["question.rejected"]
  18471. },
  18472. "properties": {
  18473. "$ref": "#/components/schemas/QuestionRejected"
  18474. }
  18475. },
  18476. "required": ["id", "type", "properties"],
  18477. "additionalProperties": false
  18478. },
  18479. "EventTodoUpdated": {
  18480. "type": "object",
  18481. "properties": {
  18482. "id": {
  18483. "type": "string"
  18484. },
  18485. "type": {
  18486. "type": "string",
  18487. "enum": ["todo.updated"]
  18488. },
  18489. "properties": {
  18490. "type": "object",
  18491. "properties": {
  18492. "sessionID": {
  18493. "type": "string",
  18494. "pattern": "^ses"
  18495. },
  18496. "todos": {
  18497. "type": "array",
  18498. "items": {
  18499. "$ref": "#/components/schemas/Todo"
  18500. }
  18501. }
  18502. },
  18503. "required": ["sessionID", "todos"],
  18504. "additionalProperties": false
  18505. }
  18506. },
  18507. "required": ["id", "type", "properties"],
  18508. "additionalProperties": false
  18509. },
  18510. "EventSessionStatus": {
  18511. "type": "object",
  18512. "properties": {
  18513. "id": {
  18514. "type": "string"
  18515. },
  18516. "type": {
  18517. "type": "string",
  18518. "enum": ["session.status"]
  18519. },
  18520. "properties": {
  18521. "type": "object",
  18522. "properties": {
  18523. "sessionID": {
  18524. "type": "string",
  18525. "pattern": "^ses"
  18526. },
  18527. "status": {
  18528. "$ref": "#/components/schemas/SessionStatus"
  18529. }
  18530. },
  18531. "required": ["sessionID", "status"],
  18532. "additionalProperties": false
  18533. }
  18534. },
  18535. "required": ["id", "type", "properties"],
  18536. "additionalProperties": false
  18537. },
  18538. "EventSessionIdle": {
  18539. "type": "object",
  18540. "properties": {
  18541. "id": {
  18542. "type": "string"
  18543. },
  18544. "type": {
  18545. "type": "string",
  18546. "enum": ["session.idle"]
  18547. },
  18548. "properties": {
  18549. "type": "object",
  18550. "properties": {
  18551. "sessionID": {
  18552. "type": "string",
  18553. "pattern": "^ses"
  18554. }
  18555. },
  18556. "required": ["sessionID"],
  18557. "additionalProperties": false
  18558. }
  18559. },
  18560. "required": ["id", "type", "properties"],
  18561. "additionalProperties": false
  18562. },
  18563. "EventMcpToolsChanged": {
  18564. "type": "object",
  18565. "properties": {
  18566. "id": {
  18567. "type": "string"
  18568. },
  18569. "type": {
  18570. "type": "string",
  18571. "enum": ["mcp.tools.changed"]
  18572. },
  18573. "properties": {
  18574. "type": "object",
  18575. "properties": {
  18576. "server": {
  18577. "type": "string"
  18578. }
  18579. },
  18580. "required": ["server"],
  18581. "additionalProperties": false
  18582. }
  18583. },
  18584. "required": ["id", "type", "properties"],
  18585. "additionalProperties": false
  18586. },
  18587. "EventMcpBrowserOpenFailed": {
  18588. "type": "object",
  18589. "properties": {
  18590. "id": {
  18591. "type": "string"
  18592. },
  18593. "type": {
  18594. "type": "string",
  18595. "enum": ["mcp.browser.open.failed"]
  18596. },
  18597. "properties": {
  18598. "type": "object",
  18599. "properties": {
  18600. "mcpName": {
  18601. "type": "string"
  18602. },
  18603. "url": {
  18604. "type": "string"
  18605. }
  18606. },
  18607. "required": ["mcpName", "url"],
  18608. "additionalProperties": false
  18609. }
  18610. },
  18611. "required": ["id", "type", "properties"],
  18612. "additionalProperties": false
  18613. },
  18614. "EventCommandExecuted": {
  18615. "type": "object",
  18616. "properties": {
  18617. "id": {
  18618. "type": "string"
  18619. },
  18620. "type": {
  18621. "type": "string",
  18622. "enum": ["command.executed"]
  18623. },
  18624. "properties": {
  18625. "type": "object",
  18626. "properties": {
  18627. "name": {
  18628. "type": "string"
  18629. },
  18630. "sessionID": {
  18631. "type": "string",
  18632. "pattern": "^ses"
  18633. },
  18634. "arguments": {
  18635. "type": "string"
  18636. },
  18637. "messageID": {
  18638. "type": "string",
  18639. "pattern": "^msg"
  18640. }
  18641. },
  18642. "required": ["name", "sessionID", "arguments", "messageID"],
  18643. "additionalProperties": false
  18644. }
  18645. },
  18646. "required": ["id", "type", "properties"],
  18647. "additionalProperties": false
  18648. },
  18649. "EventProjectUpdated": {
  18650. "type": "object",
  18651. "properties": {
  18652. "id": {
  18653. "type": "string"
  18654. },
  18655. "type": {
  18656. "type": "string",
  18657. "enum": ["project.updated"]
  18658. },
  18659. "properties": {
  18660. "$ref": "#/components/schemas/Project"
  18661. }
  18662. },
  18663. "required": ["id", "type", "properties"],
  18664. "additionalProperties": false
  18665. },
  18666. "EventSessionCompacted": {
  18667. "type": "object",
  18668. "properties": {
  18669. "id": {
  18670. "type": "string"
  18671. },
  18672. "type": {
  18673. "type": "string",
  18674. "enum": ["session.compacted"]
  18675. },
  18676. "properties": {
  18677. "type": "object",
  18678. "properties": {
  18679. "sessionID": {
  18680. "type": "string",
  18681. "pattern": "^ses"
  18682. }
  18683. },
  18684. "required": ["sessionID"],
  18685. "additionalProperties": false
  18686. }
  18687. },
  18688. "required": ["id", "type", "properties"],
  18689. "additionalProperties": false
  18690. },
  18691. "EventVcsBranchUpdated": {
  18692. "type": "object",
  18693. "properties": {
  18694. "id": {
  18695. "type": "string"
  18696. },
  18697. "type": {
  18698. "type": "string",
  18699. "enum": ["vcs.branch.updated"]
  18700. },
  18701. "properties": {
  18702. "type": "object",
  18703. "properties": {
  18704. "branch": {
  18705. "type": "string"
  18706. }
  18707. },
  18708. "additionalProperties": false
  18709. }
  18710. },
  18711. "required": ["id", "type", "properties"],
  18712. "additionalProperties": false
  18713. },
  18714. "EventWorkspaceReady": {
  18715. "type": "object",
  18716. "properties": {
  18717. "id": {
  18718. "type": "string"
  18719. },
  18720. "type": {
  18721. "type": "string",
  18722. "enum": ["workspace.ready"]
  18723. },
  18724. "properties": {
  18725. "type": "object",
  18726. "properties": {
  18727. "name": {
  18728. "type": "string"
  18729. }
  18730. },
  18731. "required": ["name"],
  18732. "additionalProperties": false
  18733. }
  18734. },
  18735. "required": ["id", "type", "properties"],
  18736. "additionalProperties": false
  18737. },
  18738. "EventWorkspaceFailed": {
  18739. "type": "object",
  18740. "properties": {
  18741. "id": {
  18742. "type": "string"
  18743. },
  18744. "type": {
  18745. "type": "string",
  18746. "enum": ["workspace.failed"]
  18747. },
  18748. "properties": {
  18749. "type": "object",
  18750. "properties": {
  18751. "message": {
  18752. "type": "string"
  18753. }
  18754. },
  18755. "required": ["message"],
  18756. "additionalProperties": false
  18757. }
  18758. },
  18759. "required": ["id", "type", "properties"],
  18760. "additionalProperties": false
  18761. },
  18762. "EventWorkspaceStatus": {
  18763. "type": "object",
  18764. "properties": {
  18765. "id": {
  18766. "type": "string"
  18767. },
  18768. "type": {
  18769. "type": "string",
  18770. "enum": ["workspace.status"]
  18771. },
  18772. "properties": {
  18773. "type": "object",
  18774. "properties": {
  18775. "workspaceID": {
  18776. "type": "string",
  18777. "pattern": "^wrk"
  18778. },
  18779. "status": {
  18780. "type": "string",
  18781. "enum": ["connected", "connecting", "disconnected", "error"]
  18782. }
  18783. },
  18784. "required": ["workspaceID", "status"],
  18785. "additionalProperties": false
  18786. }
  18787. },
  18788. "required": ["id", "type", "properties"],
  18789. "additionalProperties": false
  18790. },
  18791. "EventWorktreeReady": {
  18792. "type": "object",
  18793. "properties": {
  18794. "id": {
  18795. "type": "string"
  18796. },
  18797. "type": {
  18798. "type": "string",
  18799. "enum": ["worktree.ready"]
  18800. },
  18801. "properties": {
  18802. "type": "object",
  18803. "properties": {
  18804. "name": {
  18805. "type": "string"
  18806. },
  18807. "branch": {
  18808. "type": "string"
  18809. }
  18810. },
  18811. "required": ["name"],
  18812. "additionalProperties": false
  18813. }
  18814. },
  18815. "required": ["id", "type", "properties"],
  18816. "additionalProperties": false
  18817. },
  18818. "EventWorktreeFailed": {
  18819. "type": "object",
  18820. "properties": {
  18821. "id": {
  18822. "type": "string"
  18823. },
  18824. "type": {
  18825. "type": "string",
  18826. "enum": ["worktree.failed"]
  18827. },
  18828. "properties": {
  18829. "type": "object",
  18830. "properties": {
  18831. "message": {
  18832. "type": "string"
  18833. }
  18834. },
  18835. "required": ["message"],
  18836. "additionalProperties": false
  18837. }
  18838. },
  18839. "required": ["id", "type", "properties"],
  18840. "additionalProperties": false
  18841. },
  18842. "EventPtyCreated": {
  18843. "type": "object",
  18844. "properties": {
  18845. "id": {
  18846. "type": "string"
  18847. },
  18848. "type": {
  18849. "type": "string",
  18850. "enum": ["pty.created"]
  18851. },
  18852. "properties": {
  18853. "type": "object",
  18854. "properties": {
  18855. "info": {
  18856. "$ref": "#/components/schemas/Pty"
  18857. }
  18858. },
  18859. "required": ["info"],
  18860. "additionalProperties": false
  18861. }
  18862. },
  18863. "required": ["id", "type", "properties"],
  18864. "additionalProperties": false
  18865. },
  18866. "EventPtyUpdated": {
  18867. "type": "object",
  18868. "properties": {
  18869. "id": {
  18870. "type": "string"
  18871. },
  18872. "type": {
  18873. "type": "string",
  18874. "enum": ["pty.updated"]
  18875. },
  18876. "properties": {
  18877. "type": "object",
  18878. "properties": {
  18879. "info": {
  18880. "$ref": "#/components/schemas/Pty"
  18881. }
  18882. },
  18883. "required": ["info"],
  18884. "additionalProperties": false
  18885. }
  18886. },
  18887. "required": ["id", "type", "properties"],
  18888. "additionalProperties": false
  18889. },
  18890. "EventPtyExited": {
  18891. "type": "object",
  18892. "properties": {
  18893. "id": {
  18894. "type": "string"
  18895. },
  18896. "type": {
  18897. "type": "string",
  18898. "enum": ["pty.exited"]
  18899. },
  18900. "properties": {
  18901. "type": "object",
  18902. "properties": {
  18903. "id": {
  18904. "type": "string",
  18905. "pattern": "^pty"
  18906. },
  18907. "exitCode": {
  18908. "type": "integer",
  18909. "minimum": 0
  18910. }
  18911. },
  18912. "required": ["id", "exitCode"],
  18913. "additionalProperties": false
  18914. }
  18915. },
  18916. "required": ["id", "type", "properties"],
  18917. "additionalProperties": false
  18918. },
  18919. "EventPtyDeleted": {
  18920. "type": "object",
  18921. "properties": {
  18922. "id": {
  18923. "type": "string"
  18924. },
  18925. "type": {
  18926. "type": "string",
  18927. "enum": ["pty.deleted"]
  18928. },
  18929. "properties": {
  18930. "type": "object",
  18931. "properties": {
  18932. "id": {
  18933. "type": "string",
  18934. "pattern": "^pty"
  18935. }
  18936. },
  18937. "required": ["id"],
  18938. "additionalProperties": false
  18939. }
  18940. },
  18941. "required": ["id", "type", "properties"],
  18942. "additionalProperties": false
  18943. },
  18944. "EventInstallationUpdated": {
  18945. "type": "object",
  18946. "properties": {
  18947. "id": {
  18948. "type": "string"
  18949. },
  18950. "type": {
  18951. "type": "string",
  18952. "enum": ["installation.updated"]
  18953. },
  18954. "properties": {
  18955. "type": "object",
  18956. "properties": {
  18957. "version": {
  18958. "type": "string"
  18959. }
  18960. },
  18961. "required": ["version"],
  18962. "additionalProperties": false
  18963. }
  18964. },
  18965. "required": ["id", "type", "properties"],
  18966. "additionalProperties": false
  18967. },
  18968. "EventInstallationUpdate-available": {
  18969. "type": "object",
  18970. "properties": {
  18971. "id": {
  18972. "type": "string"
  18973. },
  18974. "type": {
  18975. "type": "string",
  18976. "enum": ["installation.update-available"]
  18977. },
  18978. "properties": {
  18979. "type": "object",
  18980. "properties": {
  18981. "version": {
  18982. "type": "string"
  18983. }
  18984. },
  18985. "required": ["version"],
  18986. "additionalProperties": false
  18987. }
  18988. },
  18989. "required": ["id", "type", "properties"],
  18990. "additionalProperties": false
  18991. },
  18992. "EventMessageUpdated": {
  18993. "type": "object",
  18994. "properties": {
  18995. "id": {
  18996. "type": "string"
  18997. },
  18998. "type": {
  18999. "type": "string",
  19000. "enum": ["message.updated"]
  19001. },
  19002. "properties": {
  19003. "type": "object",
  19004. "properties": {
  19005. "sessionID": {
  19006. "type": "string",
  19007. "pattern": "^ses"
  19008. },
  19009. "info": {
  19010. "$ref": "#/components/schemas/Message"
  19011. }
  19012. },
  19013. "required": ["sessionID", "info"],
  19014. "additionalProperties": false
  19015. }
  19016. },
  19017. "required": ["id", "type", "properties"],
  19018. "additionalProperties": false
  19019. },
  19020. "EventMessageRemoved": {
  19021. "type": "object",
  19022. "properties": {
  19023. "id": {
  19024. "type": "string"
  19025. },
  19026. "type": {
  19027. "type": "string",
  19028. "enum": ["message.removed"]
  19029. },
  19030. "properties": {
  19031. "type": "object",
  19032. "properties": {
  19033. "sessionID": {
  19034. "type": "string",
  19035. "pattern": "^ses"
  19036. },
  19037. "messageID": {
  19038. "type": "string",
  19039. "pattern": "^msg"
  19040. }
  19041. },
  19042. "required": ["sessionID", "messageID"],
  19043. "additionalProperties": false
  19044. }
  19045. },
  19046. "required": ["id", "type", "properties"],
  19047. "additionalProperties": false
  19048. },
  19049. "EventMessagePartUpdated": {
  19050. "type": "object",
  19051. "properties": {
  19052. "id": {
  19053. "type": "string"
  19054. },
  19055. "type": {
  19056. "type": "string",
  19057. "enum": ["message.part.updated"]
  19058. },
  19059. "properties": {
  19060. "type": "object",
  19061. "properties": {
  19062. "sessionID": {
  19063. "type": "string",
  19064. "pattern": "^ses"
  19065. },
  19066. "part": {
  19067. "$ref": "#/components/schemas/Part"
  19068. },
  19069. "time": {
  19070. "type": "integer",
  19071. "minimum": 0
  19072. }
  19073. },
  19074. "required": ["sessionID", "part", "time"],
  19075. "additionalProperties": false
  19076. }
  19077. },
  19078. "required": ["id", "type", "properties"],
  19079. "additionalProperties": false
  19080. },
  19081. "EventMessagePartRemoved": {
  19082. "type": "object",
  19083. "properties": {
  19084. "id": {
  19085. "type": "string"
  19086. },
  19087. "type": {
  19088. "type": "string",
  19089. "enum": ["message.part.removed"]
  19090. },
  19091. "properties": {
  19092. "type": "object",
  19093. "properties": {
  19094. "sessionID": {
  19095. "type": "string",
  19096. "pattern": "^ses"
  19097. },
  19098. "messageID": {
  19099. "type": "string",
  19100. "pattern": "^msg"
  19101. },
  19102. "partID": {
  19103. "type": "string",
  19104. "pattern": "^prt"
  19105. }
  19106. },
  19107. "required": ["sessionID", "messageID", "partID"],
  19108. "additionalProperties": false
  19109. }
  19110. },
  19111. "required": ["id", "type", "properties"],
  19112. "additionalProperties": false
  19113. },
  19114. "EventSessionCreated": {
  19115. "type": "object",
  19116. "properties": {
  19117. "id": {
  19118. "type": "string"
  19119. },
  19120. "type": {
  19121. "type": "string",
  19122. "enum": ["session.created"]
  19123. },
  19124. "properties": {
  19125. "type": "object",
  19126. "properties": {
  19127. "sessionID": {
  19128. "type": "string",
  19129. "pattern": "^ses"
  19130. },
  19131. "info": {
  19132. "$ref": "#/components/schemas/Session"
  19133. }
  19134. },
  19135. "required": ["sessionID", "info"],
  19136. "additionalProperties": false
  19137. }
  19138. },
  19139. "required": ["id", "type", "properties"],
  19140. "additionalProperties": false
  19141. },
  19142. "EventSessionUpdated": {
  19143. "type": "object",
  19144. "properties": {
  19145. "id": {
  19146. "type": "string"
  19147. },
  19148. "type": {
  19149. "type": "string",
  19150. "enum": ["session.updated"]
  19151. },
  19152. "properties": {
  19153. "type": "object",
  19154. "properties": {
  19155. "sessionID": {
  19156. "type": "string",
  19157. "pattern": "^ses"
  19158. },
  19159. "info": {
  19160. "$ref": "#/components/schemas/Session"
  19161. }
  19162. },
  19163. "required": ["sessionID", "info"],
  19164. "additionalProperties": false
  19165. }
  19166. },
  19167. "required": ["id", "type", "properties"],
  19168. "additionalProperties": false
  19169. },
  19170. "EventSessionDeleted": {
  19171. "type": "object",
  19172. "properties": {
  19173. "id": {
  19174. "type": "string"
  19175. },
  19176. "type": {
  19177. "type": "string",
  19178. "enum": ["session.deleted"]
  19179. },
  19180. "properties": {
  19181. "type": "object",
  19182. "properties": {
  19183. "sessionID": {
  19184. "type": "string",
  19185. "pattern": "^ses"
  19186. },
  19187. "info": {
  19188. "$ref": "#/components/schemas/Session"
  19189. }
  19190. },
  19191. "required": ["sessionID", "info"],
  19192. "additionalProperties": false
  19193. }
  19194. },
  19195. "required": ["id", "type", "properties"],
  19196. "additionalProperties": false
  19197. },
  19198. "EventSessionNextAgentSwitched": {
  19199. "type": "object",
  19200. "properties": {
  19201. "id": {
  19202. "type": "string"
  19203. },
  19204. "type": {
  19205. "type": "string",
  19206. "enum": ["session.next.agent.switched"]
  19207. },
  19208. "properties": {
  19209. "type": "object",
  19210. "properties": {
  19211. "timestamp": {
  19212. "type": "number"
  19213. },
  19214. "sessionID": {
  19215. "type": "string",
  19216. "pattern": "^ses"
  19217. },
  19218. "agent": {
  19219. "type": "string"
  19220. }
  19221. },
  19222. "required": ["timestamp", "sessionID", "agent"],
  19223. "additionalProperties": false
  19224. }
  19225. },
  19226. "required": ["id", "type", "properties"],
  19227. "additionalProperties": false
  19228. },
  19229. "EventSessionNextModelSwitched": {
  19230. "type": "object",
  19231. "properties": {
  19232. "id": {
  19233. "type": "string"
  19234. },
  19235. "type": {
  19236. "type": "string",
  19237. "enum": ["session.next.model.switched"]
  19238. },
  19239. "properties": {
  19240. "type": "object",
  19241. "properties": {
  19242. "timestamp": {
  19243. "type": "number"
  19244. },
  19245. "sessionID": {
  19246. "type": "string",
  19247. "pattern": "^ses"
  19248. },
  19249. "model": {
  19250. "type": "object",
  19251. "properties": {
  19252. "id": {
  19253. "type": "string"
  19254. },
  19255. "providerID": {
  19256. "type": "string"
  19257. },
  19258. "variant": {
  19259. "type": "string"
  19260. }
  19261. },
  19262. "required": ["id", "providerID", "variant"],
  19263. "additionalProperties": false
  19264. }
  19265. },
  19266. "required": ["timestamp", "sessionID", "model"],
  19267. "additionalProperties": false
  19268. }
  19269. },
  19270. "required": ["id", "type", "properties"],
  19271. "additionalProperties": false
  19272. },
  19273. "PromptSource": {
  19274. "type": "object",
  19275. "properties": {
  19276. "start": {
  19277. "type": "number"
  19278. },
  19279. "end": {
  19280. "type": "number"
  19281. },
  19282. "text": {
  19283. "type": "string"
  19284. }
  19285. },
  19286. "required": ["start", "end", "text"],
  19287. "additionalProperties": false
  19288. },
  19289. "PromptFileAttachment": {
  19290. "type": "object",
  19291. "properties": {
  19292. "uri": {
  19293. "type": "string"
  19294. },
  19295. "mime": {
  19296. "type": "string"
  19297. },
  19298. "name": {
  19299. "type": "string"
  19300. },
  19301. "description": {
  19302. "type": "string"
  19303. },
  19304. "source": {
  19305. "$ref": "#/components/schemas/PromptSource"
  19306. }
  19307. },
  19308. "required": ["uri", "mime"],
  19309. "additionalProperties": false
  19310. },
  19311. "PromptAgentAttachment": {
  19312. "type": "object",
  19313. "properties": {
  19314. "name": {
  19315. "type": "string"
  19316. },
  19317. "source": {
  19318. "$ref": "#/components/schemas/PromptSource"
  19319. }
  19320. },
  19321. "required": ["name"],
  19322. "additionalProperties": false
  19323. },
  19324. "PromptReferenceAttachment": {
  19325. "type": "object",
  19326. "properties": {
  19327. "name": {
  19328. "type": "string"
  19329. },
  19330. "kind": {
  19331. "type": "string",
  19332. "enum": ["local", "git", "invalid"]
  19333. },
  19334. "uri": {
  19335. "type": "string"
  19336. },
  19337. "repository": {
  19338. "type": "string"
  19339. },
  19340. "branch": {
  19341. "type": "string"
  19342. },
  19343. "target": {
  19344. "type": "string"
  19345. },
  19346. "targetUri": {
  19347. "type": "string"
  19348. },
  19349. "problem": {
  19350. "type": "string"
  19351. },
  19352. "source": {
  19353. "$ref": "#/components/schemas/PromptSource"
  19354. }
  19355. },
  19356. "required": ["name", "kind"],
  19357. "additionalProperties": false
  19358. },
  19359. "EventSessionNextPrompted": {
  19360. "type": "object",
  19361. "properties": {
  19362. "id": {
  19363. "type": "string"
  19364. },
  19365. "type": {
  19366. "type": "string",
  19367. "enum": ["session.next.prompted"]
  19368. },
  19369. "properties": {
  19370. "type": "object",
  19371. "properties": {
  19372. "timestamp": {
  19373. "type": "number"
  19374. },
  19375. "sessionID": {
  19376. "type": "string",
  19377. "pattern": "^ses"
  19378. },
  19379. "prompt": {
  19380. "$ref": "#/components/schemas/Prompt"
  19381. }
  19382. },
  19383. "required": ["timestamp", "sessionID", "prompt"],
  19384. "additionalProperties": false
  19385. }
  19386. },
  19387. "required": ["id", "type", "properties"],
  19388. "additionalProperties": false
  19389. },
  19390. "EventSessionNextSynthetic": {
  19391. "type": "object",
  19392. "properties": {
  19393. "id": {
  19394. "type": "string"
  19395. },
  19396. "type": {
  19397. "type": "string",
  19398. "enum": ["session.next.synthetic"]
  19399. },
  19400. "properties": {
  19401. "type": "object",
  19402. "properties": {
  19403. "timestamp": {
  19404. "type": "number"
  19405. },
  19406. "sessionID": {
  19407. "type": "string",
  19408. "pattern": "^ses"
  19409. },
  19410. "text": {
  19411. "type": "string"
  19412. }
  19413. },
  19414. "required": ["timestamp", "sessionID", "text"],
  19415. "additionalProperties": false
  19416. }
  19417. },
  19418. "required": ["id", "type", "properties"],
  19419. "additionalProperties": false
  19420. },
  19421. "EventSessionNextShellStarted": {
  19422. "type": "object",
  19423. "properties": {
  19424. "id": {
  19425. "type": "string"
  19426. },
  19427. "type": {
  19428. "type": "string",
  19429. "enum": ["session.next.shell.started"]
  19430. },
  19431. "properties": {
  19432. "type": "object",
  19433. "properties": {
  19434. "timestamp": {
  19435. "type": "number"
  19436. },
  19437. "sessionID": {
  19438. "type": "string",
  19439. "pattern": "^ses"
  19440. },
  19441. "callID": {
  19442. "type": "string"
  19443. },
  19444. "command": {
  19445. "type": "string"
  19446. }
  19447. },
  19448. "required": ["timestamp", "sessionID", "callID", "command"],
  19449. "additionalProperties": false
  19450. }
  19451. },
  19452. "required": ["id", "type", "properties"],
  19453. "additionalProperties": false
  19454. },
  19455. "EventSessionNextShellEnded": {
  19456. "type": "object",
  19457. "properties": {
  19458. "id": {
  19459. "type": "string"
  19460. },
  19461. "type": {
  19462. "type": "string",
  19463. "enum": ["session.next.shell.ended"]
  19464. },
  19465. "properties": {
  19466. "type": "object",
  19467. "properties": {
  19468. "timestamp": {
  19469. "type": "number"
  19470. },
  19471. "sessionID": {
  19472. "type": "string",
  19473. "pattern": "^ses"
  19474. },
  19475. "callID": {
  19476. "type": "string"
  19477. },
  19478. "output": {
  19479. "type": "string"
  19480. }
  19481. },
  19482. "required": ["timestamp", "sessionID", "callID", "output"],
  19483. "additionalProperties": false
  19484. }
  19485. },
  19486. "required": ["id", "type", "properties"],
  19487. "additionalProperties": false
  19488. },
  19489. "EventSessionNextStepStarted": {
  19490. "type": "object",
  19491. "properties": {
  19492. "id": {
  19493. "type": "string"
  19494. },
  19495. "type": {
  19496. "type": "string",
  19497. "enum": ["session.next.step.started"]
  19498. },
  19499. "properties": {
  19500. "type": "object",
  19501. "properties": {
  19502. "timestamp": {
  19503. "type": "number"
  19504. },
  19505. "sessionID": {
  19506. "type": "string",
  19507. "pattern": "^ses"
  19508. },
  19509. "agent": {
  19510. "type": "string"
  19511. },
  19512. "model": {
  19513. "type": "object",
  19514. "properties": {
  19515. "id": {
  19516. "type": "string"
  19517. },
  19518. "providerID": {
  19519. "type": "string"
  19520. },
  19521. "variant": {
  19522. "type": "string"
  19523. }
  19524. },
  19525. "required": ["id", "providerID", "variant"],
  19526. "additionalProperties": false
  19527. },
  19528. "snapshot": {
  19529. "type": "string"
  19530. }
  19531. },
  19532. "required": ["timestamp", "sessionID", "agent", "model"],
  19533. "additionalProperties": false
  19534. }
  19535. },
  19536. "required": ["id", "type", "properties"],
  19537. "additionalProperties": false
  19538. },
  19539. "EventSessionNextStepEnded": {
  19540. "type": "object",
  19541. "properties": {
  19542. "id": {
  19543. "type": "string"
  19544. },
  19545. "type": {
  19546. "type": "string",
  19547. "enum": ["session.next.step.ended"]
  19548. },
  19549. "properties": {
  19550. "type": "object",
  19551. "properties": {
  19552. "timestamp": {
  19553. "type": "number"
  19554. },
  19555. "sessionID": {
  19556. "type": "string",
  19557. "pattern": "^ses"
  19558. },
  19559. "finish": {
  19560. "type": "string"
  19561. },
  19562. "cost": {
  19563. "type": "number"
  19564. },
  19565. "tokens": {
  19566. "type": "object",
  19567. "properties": {
  19568. "input": {
  19569. "type": "number"
  19570. },
  19571. "output": {
  19572. "type": "number"
  19573. },
  19574. "reasoning": {
  19575. "type": "number"
  19576. },
  19577. "cache": {
  19578. "type": "object",
  19579. "properties": {
  19580. "read": {
  19581. "type": "number"
  19582. },
  19583. "write": {
  19584. "type": "number"
  19585. }
  19586. },
  19587. "required": ["read", "write"],
  19588. "additionalProperties": false
  19589. }
  19590. },
  19591. "required": ["input", "output", "reasoning", "cache"],
  19592. "additionalProperties": false
  19593. },
  19594. "snapshot": {
  19595. "type": "string"
  19596. }
  19597. },
  19598. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19599. "additionalProperties": false
  19600. }
  19601. },
  19602. "required": ["id", "type", "properties"],
  19603. "additionalProperties": false
  19604. },
  19605. "SessionErrorUnknown": {
  19606. "type": "object",
  19607. "properties": {
  19608. "type": {
  19609. "type": "string",
  19610. "enum": ["unknown"]
  19611. },
  19612. "message": {
  19613. "type": "string"
  19614. }
  19615. },
  19616. "required": ["type", "message"],
  19617. "additionalProperties": false
  19618. },
  19619. "EventSessionNextStepFailed": {
  19620. "type": "object",
  19621. "properties": {
  19622. "id": {
  19623. "type": "string"
  19624. },
  19625. "type": {
  19626. "type": "string",
  19627. "enum": ["session.next.step.failed"]
  19628. },
  19629. "properties": {
  19630. "type": "object",
  19631. "properties": {
  19632. "timestamp": {
  19633. "type": "number"
  19634. },
  19635. "sessionID": {
  19636. "type": "string",
  19637. "pattern": "^ses"
  19638. },
  19639. "error": {
  19640. "$ref": "#/components/schemas/SessionErrorUnknown"
  19641. }
  19642. },
  19643. "required": ["timestamp", "sessionID", "error"],
  19644. "additionalProperties": false
  19645. }
  19646. },
  19647. "required": ["id", "type", "properties"],
  19648. "additionalProperties": false
  19649. },
  19650. "EventSessionNextTextStarted": {
  19651. "type": "object",
  19652. "properties": {
  19653. "id": {
  19654. "type": "string"
  19655. },
  19656. "type": {
  19657. "type": "string",
  19658. "enum": ["session.next.text.started"]
  19659. },
  19660. "properties": {
  19661. "type": "object",
  19662. "properties": {
  19663. "timestamp": {
  19664. "type": "number"
  19665. },
  19666. "sessionID": {
  19667. "type": "string",
  19668. "pattern": "^ses"
  19669. }
  19670. },
  19671. "required": ["timestamp", "sessionID"],
  19672. "additionalProperties": false
  19673. }
  19674. },
  19675. "required": ["id", "type", "properties"],
  19676. "additionalProperties": false
  19677. },
  19678. "EventSessionNextTextDelta": {
  19679. "type": "object",
  19680. "properties": {
  19681. "id": {
  19682. "type": "string"
  19683. },
  19684. "type": {
  19685. "type": "string",
  19686. "enum": ["session.next.text.delta"]
  19687. },
  19688. "properties": {
  19689. "type": "object",
  19690. "properties": {
  19691. "timestamp": {
  19692. "type": "number"
  19693. },
  19694. "sessionID": {
  19695. "type": "string",
  19696. "pattern": "^ses"
  19697. },
  19698. "delta": {
  19699. "type": "string"
  19700. }
  19701. },
  19702. "required": ["timestamp", "sessionID", "delta"],
  19703. "additionalProperties": false
  19704. }
  19705. },
  19706. "required": ["id", "type", "properties"],
  19707. "additionalProperties": false
  19708. },
  19709. "EventSessionNextTextEnded": {
  19710. "type": "object",
  19711. "properties": {
  19712. "id": {
  19713. "type": "string"
  19714. },
  19715. "type": {
  19716. "type": "string",
  19717. "enum": ["session.next.text.ended"]
  19718. },
  19719. "properties": {
  19720. "type": "object",
  19721. "properties": {
  19722. "timestamp": {
  19723. "type": "number"
  19724. },
  19725. "sessionID": {
  19726. "type": "string",
  19727. "pattern": "^ses"
  19728. },
  19729. "text": {
  19730. "type": "string"
  19731. }
  19732. },
  19733. "required": ["timestamp", "sessionID", "text"],
  19734. "additionalProperties": false
  19735. }
  19736. },
  19737. "required": ["id", "type", "properties"],
  19738. "additionalProperties": false
  19739. },
  19740. "EventSessionNextReasoningStarted": {
  19741. "type": "object",
  19742. "properties": {
  19743. "id": {
  19744. "type": "string"
  19745. },
  19746. "type": {
  19747. "type": "string",
  19748. "enum": ["session.next.reasoning.started"]
  19749. },
  19750. "properties": {
  19751. "type": "object",
  19752. "properties": {
  19753. "timestamp": {
  19754. "type": "number"
  19755. },
  19756. "sessionID": {
  19757. "type": "string",
  19758. "pattern": "^ses"
  19759. },
  19760. "reasoningID": {
  19761. "type": "string"
  19762. }
  19763. },
  19764. "required": ["timestamp", "sessionID", "reasoningID"],
  19765. "additionalProperties": false
  19766. }
  19767. },
  19768. "required": ["id", "type", "properties"],
  19769. "additionalProperties": false
  19770. },
  19771. "EventSessionNextReasoningDelta": {
  19772. "type": "object",
  19773. "properties": {
  19774. "id": {
  19775. "type": "string"
  19776. },
  19777. "type": {
  19778. "type": "string",
  19779. "enum": ["session.next.reasoning.delta"]
  19780. },
  19781. "properties": {
  19782. "type": "object",
  19783. "properties": {
  19784. "timestamp": {
  19785. "type": "number"
  19786. },
  19787. "sessionID": {
  19788. "type": "string",
  19789. "pattern": "^ses"
  19790. },
  19791. "reasoningID": {
  19792. "type": "string"
  19793. },
  19794. "delta": {
  19795. "type": "string"
  19796. }
  19797. },
  19798. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19799. "additionalProperties": false
  19800. }
  19801. },
  19802. "required": ["id", "type", "properties"],
  19803. "additionalProperties": false
  19804. },
  19805. "EventSessionNextReasoningEnded": {
  19806. "type": "object",
  19807. "properties": {
  19808. "id": {
  19809. "type": "string"
  19810. },
  19811. "type": {
  19812. "type": "string",
  19813. "enum": ["session.next.reasoning.ended"]
  19814. },
  19815. "properties": {
  19816. "type": "object",
  19817. "properties": {
  19818. "timestamp": {
  19819. "type": "number"
  19820. },
  19821. "sessionID": {
  19822. "type": "string",
  19823. "pattern": "^ses"
  19824. },
  19825. "reasoningID": {
  19826. "type": "string"
  19827. },
  19828. "text": {
  19829. "type": "string"
  19830. }
  19831. },
  19832. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19833. "additionalProperties": false
  19834. }
  19835. },
  19836. "required": ["id", "type", "properties"],
  19837. "additionalProperties": false
  19838. },
  19839. "EventSessionNextToolInputStarted": {
  19840. "type": "object",
  19841. "properties": {
  19842. "id": {
  19843. "type": "string"
  19844. },
  19845. "type": {
  19846. "type": "string",
  19847. "enum": ["session.next.tool.input.started"]
  19848. },
  19849. "properties": {
  19850. "type": "object",
  19851. "properties": {
  19852. "timestamp": {
  19853. "type": "number"
  19854. },
  19855. "sessionID": {
  19856. "type": "string",
  19857. "pattern": "^ses"
  19858. },
  19859. "callID": {
  19860. "type": "string"
  19861. },
  19862. "name": {
  19863. "type": "string"
  19864. }
  19865. },
  19866. "required": ["timestamp", "sessionID", "callID", "name"],
  19867. "additionalProperties": false
  19868. }
  19869. },
  19870. "required": ["id", "type", "properties"],
  19871. "additionalProperties": false
  19872. },
  19873. "EventSessionNextToolInputDelta": {
  19874. "type": "object",
  19875. "properties": {
  19876. "id": {
  19877. "type": "string"
  19878. },
  19879. "type": {
  19880. "type": "string",
  19881. "enum": ["session.next.tool.input.delta"]
  19882. },
  19883. "properties": {
  19884. "type": "object",
  19885. "properties": {
  19886. "timestamp": {
  19887. "type": "number"
  19888. },
  19889. "sessionID": {
  19890. "type": "string",
  19891. "pattern": "^ses"
  19892. },
  19893. "callID": {
  19894. "type": "string"
  19895. },
  19896. "delta": {
  19897. "type": "string"
  19898. }
  19899. },
  19900. "required": ["timestamp", "sessionID", "callID", "delta"],
  19901. "additionalProperties": false
  19902. }
  19903. },
  19904. "required": ["id", "type", "properties"],
  19905. "additionalProperties": false
  19906. },
  19907. "EventSessionNextToolInputEnded": {
  19908. "type": "object",
  19909. "properties": {
  19910. "id": {
  19911. "type": "string"
  19912. },
  19913. "type": {
  19914. "type": "string",
  19915. "enum": ["session.next.tool.input.ended"]
  19916. },
  19917. "properties": {
  19918. "type": "object",
  19919. "properties": {
  19920. "timestamp": {
  19921. "type": "number"
  19922. },
  19923. "sessionID": {
  19924. "type": "string",
  19925. "pattern": "^ses"
  19926. },
  19927. "callID": {
  19928. "type": "string"
  19929. },
  19930. "text": {
  19931. "type": "string"
  19932. }
  19933. },
  19934. "required": ["timestamp", "sessionID", "callID", "text"],
  19935. "additionalProperties": false
  19936. }
  19937. },
  19938. "required": ["id", "type", "properties"],
  19939. "additionalProperties": false
  19940. },
  19941. "EventSessionNextToolCalled": {
  19942. "type": "object",
  19943. "properties": {
  19944. "id": {
  19945. "type": "string"
  19946. },
  19947. "type": {
  19948. "type": "string",
  19949. "enum": ["session.next.tool.called"]
  19950. },
  19951. "properties": {
  19952. "type": "object",
  19953. "properties": {
  19954. "timestamp": {
  19955. "type": "number"
  19956. },
  19957. "sessionID": {
  19958. "type": "string",
  19959. "pattern": "^ses"
  19960. },
  19961. "callID": {
  19962. "type": "string"
  19963. },
  19964. "tool": {
  19965. "type": "string"
  19966. },
  19967. "input": {
  19968. "type": "object"
  19969. },
  19970. "provider": {
  19971. "type": "object",
  19972. "properties": {
  19973. "executed": {
  19974. "type": "boolean"
  19975. },
  19976. "metadata": {
  19977. "type": "object"
  19978. }
  19979. },
  19980. "required": ["executed"],
  19981. "additionalProperties": false
  19982. }
  19983. },
  19984. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19985. "additionalProperties": false
  19986. }
  19987. },
  19988. "required": ["id", "type", "properties"],
  19989. "additionalProperties": false
  19990. },
  19991. "ToolTextContent": {
  19992. "type": "object",
  19993. "properties": {
  19994. "type": {
  19995. "type": "string",
  19996. "enum": ["text"]
  19997. },
  19998. "text": {
  19999. "type": "string"
  20000. }
  20001. },
  20002. "required": ["type", "text"],
  20003. "additionalProperties": false
  20004. },
  20005. "ToolFileContent": {
  20006. "type": "object",
  20007. "properties": {
  20008. "type": {
  20009. "type": "string",
  20010. "enum": ["file"]
  20011. },
  20012. "uri": {
  20013. "type": "string"
  20014. },
  20015. "mime": {
  20016. "type": "string"
  20017. },
  20018. "name": {
  20019. "type": "string"
  20020. }
  20021. },
  20022. "required": ["type", "uri", "mime"],
  20023. "additionalProperties": false
  20024. },
  20025. "EventSessionNextToolProgress": {
  20026. "type": "object",
  20027. "properties": {
  20028. "id": {
  20029. "type": "string"
  20030. },
  20031. "type": {
  20032. "type": "string",
  20033. "enum": ["session.next.tool.progress"]
  20034. },
  20035. "properties": {
  20036. "type": "object",
  20037. "properties": {
  20038. "timestamp": {
  20039. "type": "number"
  20040. },
  20041. "sessionID": {
  20042. "type": "string",
  20043. "pattern": "^ses"
  20044. },
  20045. "callID": {
  20046. "type": "string"
  20047. },
  20048. "structured": {
  20049. "type": "object"
  20050. },
  20051. "content": {
  20052. "type": "array",
  20053. "items": {
  20054. "anyOf": [
  20055. {
  20056. "$ref": "#/components/schemas/ToolTextContent"
  20057. },
  20058. {
  20059. "$ref": "#/components/schemas/ToolFileContent"
  20060. }
  20061. ]
  20062. }
  20063. }
  20064. },
  20065. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20066. "additionalProperties": false
  20067. }
  20068. },
  20069. "required": ["id", "type", "properties"],
  20070. "additionalProperties": false
  20071. },
  20072. "EventSessionNextToolSuccess": {
  20073. "type": "object",
  20074. "properties": {
  20075. "id": {
  20076. "type": "string"
  20077. },
  20078. "type": {
  20079. "type": "string",
  20080. "enum": ["session.next.tool.success"]
  20081. },
  20082. "properties": {
  20083. "type": "object",
  20084. "properties": {
  20085. "timestamp": {
  20086. "type": "number"
  20087. },
  20088. "sessionID": {
  20089. "type": "string",
  20090. "pattern": "^ses"
  20091. },
  20092. "callID": {
  20093. "type": "string"
  20094. },
  20095. "structured": {
  20096. "type": "object"
  20097. },
  20098. "content": {
  20099. "type": "array",
  20100. "items": {
  20101. "anyOf": [
  20102. {
  20103. "$ref": "#/components/schemas/ToolTextContent"
  20104. },
  20105. {
  20106. "$ref": "#/components/schemas/ToolFileContent"
  20107. }
  20108. ]
  20109. }
  20110. },
  20111. "provider": {
  20112. "type": "object",
  20113. "properties": {
  20114. "executed": {
  20115. "type": "boolean"
  20116. },
  20117. "metadata": {
  20118. "type": "object"
  20119. }
  20120. },
  20121. "required": ["executed"],
  20122. "additionalProperties": false
  20123. }
  20124. },
  20125. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20126. "additionalProperties": false
  20127. }
  20128. },
  20129. "required": ["id", "type", "properties"],
  20130. "additionalProperties": false
  20131. },
  20132. "EventSessionNextToolFailed": {
  20133. "type": "object",
  20134. "properties": {
  20135. "id": {
  20136. "type": "string"
  20137. },
  20138. "type": {
  20139. "type": "string",
  20140. "enum": ["session.next.tool.failed"]
  20141. },
  20142. "properties": {
  20143. "type": "object",
  20144. "properties": {
  20145. "timestamp": {
  20146. "type": "number"
  20147. },
  20148. "sessionID": {
  20149. "type": "string",
  20150. "pattern": "^ses"
  20151. },
  20152. "callID": {
  20153. "type": "string"
  20154. },
  20155. "error": {
  20156. "$ref": "#/components/schemas/SessionErrorUnknown"
  20157. },
  20158. "provider": {
  20159. "type": "object",
  20160. "properties": {
  20161. "executed": {
  20162. "type": "boolean"
  20163. },
  20164. "metadata": {
  20165. "type": "object"
  20166. }
  20167. },
  20168. "required": ["executed"],
  20169. "additionalProperties": false
  20170. }
  20171. },
  20172. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20173. "additionalProperties": false
  20174. }
  20175. },
  20176. "required": ["id", "type", "properties"],
  20177. "additionalProperties": false
  20178. },
  20179. "SessionNextRetry_error": {
  20180. "type": "object",
  20181. "properties": {
  20182. "message": {
  20183. "type": "string"
  20184. },
  20185. "statusCode": {
  20186. "type": "number"
  20187. },
  20188. "isRetryable": {
  20189. "type": "boolean"
  20190. },
  20191. "responseHeaders": {
  20192. "type": "object",
  20193. "additionalProperties": {
  20194. "type": "string"
  20195. }
  20196. },
  20197. "responseBody": {
  20198. "type": "string"
  20199. },
  20200. "metadata": {
  20201. "type": "object",
  20202. "additionalProperties": {
  20203. "type": "string"
  20204. }
  20205. }
  20206. },
  20207. "required": ["message", "isRetryable"],
  20208. "additionalProperties": false
  20209. },
  20210. "EventSessionNextRetried": {
  20211. "type": "object",
  20212. "properties": {
  20213. "id": {
  20214. "type": "string"
  20215. },
  20216. "type": {
  20217. "type": "string",
  20218. "enum": ["session.next.retried"]
  20219. },
  20220. "properties": {
  20221. "type": "object",
  20222. "properties": {
  20223. "timestamp": {
  20224. "type": "number"
  20225. },
  20226. "sessionID": {
  20227. "type": "string",
  20228. "pattern": "^ses"
  20229. },
  20230. "attempt": {
  20231. "type": "number"
  20232. },
  20233. "error": {
  20234. "$ref": "#/components/schemas/SessionNextRetry_error"
  20235. }
  20236. },
  20237. "required": ["timestamp", "sessionID", "attempt", "error"],
  20238. "additionalProperties": false
  20239. }
  20240. },
  20241. "required": ["id", "type", "properties"],
  20242. "additionalProperties": false
  20243. },
  20244. "EventSessionNextCompactionStarted": {
  20245. "type": "object",
  20246. "properties": {
  20247. "id": {
  20248. "type": "string"
  20249. },
  20250. "type": {
  20251. "type": "string",
  20252. "enum": ["session.next.compaction.started"]
  20253. },
  20254. "properties": {
  20255. "type": "object",
  20256. "properties": {
  20257. "timestamp": {
  20258. "type": "number"
  20259. },
  20260. "sessionID": {
  20261. "type": "string",
  20262. "pattern": "^ses"
  20263. },
  20264. "reason": {
  20265. "type": "string",
  20266. "enum": ["auto", "manual"]
  20267. }
  20268. },
  20269. "required": ["timestamp", "sessionID", "reason"],
  20270. "additionalProperties": false
  20271. }
  20272. },
  20273. "required": ["id", "type", "properties"],
  20274. "additionalProperties": false
  20275. },
  20276. "EventSessionNextCompactionDelta": {
  20277. "type": "object",
  20278. "properties": {
  20279. "id": {
  20280. "type": "string"
  20281. },
  20282. "type": {
  20283. "type": "string",
  20284. "enum": ["session.next.compaction.delta"]
  20285. },
  20286. "properties": {
  20287. "type": "object",
  20288. "properties": {
  20289. "timestamp": {
  20290. "type": "number"
  20291. },
  20292. "sessionID": {
  20293. "type": "string",
  20294. "pattern": "^ses"
  20295. },
  20296. "text": {
  20297. "type": "string"
  20298. }
  20299. },
  20300. "required": ["timestamp", "sessionID", "text"],
  20301. "additionalProperties": false
  20302. }
  20303. },
  20304. "required": ["id", "type", "properties"],
  20305. "additionalProperties": false
  20306. },
  20307. "EventSessionNextCompactionEnded": {
  20308. "type": "object",
  20309. "properties": {
  20310. "id": {
  20311. "type": "string"
  20312. },
  20313. "type": {
  20314. "type": "string",
  20315. "enum": ["session.next.compaction.ended"]
  20316. },
  20317. "properties": {
  20318. "type": "object",
  20319. "properties": {
  20320. "timestamp": {
  20321. "type": "number"
  20322. },
  20323. "sessionID": {
  20324. "type": "string",
  20325. "pattern": "^ses"
  20326. },
  20327. "text": {
  20328. "type": "string"
  20329. },
  20330. "include": {
  20331. "type": "string"
  20332. }
  20333. },
  20334. "required": ["timestamp", "sessionID", "text"],
  20335. "additionalProperties": false
  20336. }
  20337. },
  20338. "required": ["id", "type", "properties"],
  20339. "additionalProperties": false
  20340. },
  20341. "ModelV2Info": {
  20342. "type": "object",
  20343. "properties": {
  20344. "id": {
  20345. "type": "string"
  20346. },
  20347. "apiID": {
  20348. "type": "string"
  20349. },
  20350. "providerID": {
  20351. "type": "string"
  20352. },
  20353. "family": {
  20354. "type": "string"
  20355. },
  20356. "name": {
  20357. "type": "string"
  20358. },
  20359. "endpoint": {
  20360. "anyOf": [
  20361. {
  20362. "type": "object",
  20363. "properties": {
  20364. "type": {
  20365. "type": "string",
  20366. "enum": ["unknown"]
  20367. }
  20368. },
  20369. "required": ["type"],
  20370. "additionalProperties": false
  20371. },
  20372. {
  20373. "type": "object",
  20374. "properties": {
  20375. "type": {
  20376. "type": "string",
  20377. "enum": ["openai/responses"]
  20378. },
  20379. "url": {
  20380. "type": "string"
  20381. },
  20382. "websocket": {
  20383. "type": "boolean"
  20384. }
  20385. },
  20386. "required": ["type", "url"],
  20387. "additionalProperties": false
  20388. },
  20389. {
  20390. "type": "object",
  20391. "properties": {
  20392. "type": {
  20393. "type": "string",
  20394. "enum": ["openai/completions"]
  20395. },
  20396. "url": {
  20397. "type": "string"
  20398. },
  20399. "reasoning": {
  20400. "anyOf": [
  20401. {
  20402. "type": "object",
  20403. "properties": {
  20404. "type": {
  20405. "type": "string",
  20406. "enum": ["reasoning_content"]
  20407. }
  20408. },
  20409. "required": ["type"],
  20410. "additionalProperties": false
  20411. },
  20412. {
  20413. "type": "object",
  20414. "properties": {
  20415. "type": {
  20416. "type": "string",
  20417. "enum": ["reasoning_details"]
  20418. }
  20419. },
  20420. "required": ["type"],
  20421. "additionalProperties": false
  20422. }
  20423. ]
  20424. }
  20425. },
  20426. "required": ["type", "url"],
  20427. "additionalProperties": false
  20428. },
  20429. {
  20430. "type": "object",
  20431. "properties": {
  20432. "type": {
  20433. "type": "string",
  20434. "enum": ["anthropic/messages"]
  20435. },
  20436. "url": {
  20437. "type": "string"
  20438. }
  20439. },
  20440. "required": ["type", "url"],
  20441. "additionalProperties": false
  20442. },
  20443. {
  20444. "type": "object",
  20445. "properties": {
  20446. "type": {
  20447. "type": "string",
  20448. "enum": ["aisdk"]
  20449. },
  20450. "package": {
  20451. "type": "string"
  20452. },
  20453. "url": {
  20454. "type": "string"
  20455. }
  20456. },
  20457. "required": ["type", "package"],
  20458. "additionalProperties": false
  20459. }
  20460. ]
  20461. },
  20462. "capabilities": {
  20463. "type": "object",
  20464. "properties": {
  20465. "tools": {
  20466. "type": "boolean"
  20467. },
  20468. "input": {
  20469. "type": "array",
  20470. "items": {
  20471. "type": "string"
  20472. }
  20473. },
  20474. "output": {
  20475. "type": "array",
  20476. "items": {
  20477. "type": "string"
  20478. }
  20479. }
  20480. },
  20481. "required": ["tools", "input", "output"],
  20482. "additionalProperties": false
  20483. },
  20484. "options": {
  20485. "type": "object",
  20486. "properties": {
  20487. "headers": {
  20488. "type": "object",
  20489. "additionalProperties": {
  20490. "type": "string"
  20491. }
  20492. },
  20493. "body": {
  20494. "type": "object"
  20495. },
  20496. "aisdk": {
  20497. "type": "object",
  20498. "properties": {
  20499. "provider": {
  20500. "type": "object"
  20501. },
  20502. "request": {
  20503. "type": "object"
  20504. }
  20505. },
  20506. "required": ["provider", "request"],
  20507. "additionalProperties": false
  20508. },
  20509. "variant": {
  20510. "type": "string"
  20511. }
  20512. },
  20513. "required": ["headers", "body", "aisdk"],
  20514. "additionalProperties": false
  20515. },
  20516. "variants": {
  20517. "type": "array",
  20518. "items": {
  20519. "type": "object",
  20520. "properties": {
  20521. "id": {
  20522. "type": "string"
  20523. },
  20524. "headers": {
  20525. "type": "object",
  20526. "additionalProperties": {
  20527. "type": "string"
  20528. }
  20529. },
  20530. "body": {
  20531. "type": "object"
  20532. },
  20533. "aisdk": {
  20534. "type": "object",
  20535. "properties": {
  20536. "provider": {
  20537. "type": "object"
  20538. },
  20539. "request": {
  20540. "type": "object"
  20541. }
  20542. },
  20543. "required": ["provider", "request"],
  20544. "additionalProperties": false
  20545. }
  20546. },
  20547. "required": ["id", "headers", "body", "aisdk"],
  20548. "additionalProperties": false
  20549. }
  20550. },
  20551. "time": {
  20552. "type": "object",
  20553. "properties": {
  20554. "released": {
  20555. "anyOf": [
  20556. {
  20557. "type": "number"
  20558. },
  20559. {
  20560. "type": "string",
  20561. "enum": ["NaN"]
  20562. },
  20563. {
  20564. "type": "string",
  20565. "enum": ["Infinity"]
  20566. },
  20567. {
  20568. "type": "string",
  20569. "enum": ["-Infinity"]
  20570. },
  20571. {
  20572. "type": "string",
  20573. "enum": ["Infinity", "-Infinity", "NaN"]
  20574. }
  20575. ]
  20576. }
  20577. },
  20578. "required": ["released"],
  20579. "additionalProperties": false
  20580. },
  20581. "cost": {
  20582. "type": "array",
  20583. "items": {
  20584. "type": "object",
  20585. "properties": {
  20586. "tier": {
  20587. "type": "object",
  20588. "properties": {
  20589. "type": {
  20590. "type": "string",
  20591. "enum": ["context"]
  20592. },
  20593. "size": {
  20594. "type": "integer"
  20595. }
  20596. },
  20597. "required": ["type", "size"],
  20598. "additionalProperties": false
  20599. },
  20600. "input": {
  20601. "type": "number"
  20602. },
  20603. "output": {
  20604. "type": "number"
  20605. },
  20606. "cache": {
  20607. "type": "object",
  20608. "properties": {
  20609. "read": {
  20610. "type": "number"
  20611. },
  20612. "write": {
  20613. "type": "number"
  20614. }
  20615. },
  20616. "required": ["read", "write"],
  20617. "additionalProperties": false
  20618. }
  20619. },
  20620. "required": ["input", "output", "cache"],
  20621. "additionalProperties": false
  20622. }
  20623. },
  20624. "status": {
  20625. "type": "string",
  20626. "enum": ["alpha", "beta", "deprecated", "active"]
  20627. },
  20628. "enabled": {
  20629. "type": "boolean"
  20630. },
  20631. "limit": {
  20632. "type": "object",
  20633. "properties": {
  20634. "context": {
  20635. "type": "integer"
  20636. },
  20637. "input": {
  20638. "type": "integer"
  20639. },
  20640. "output": {
  20641. "type": "integer"
  20642. }
  20643. },
  20644. "required": ["context", "output"],
  20645. "additionalProperties": false
  20646. }
  20647. },
  20648. "required": [
  20649. "id",
  20650. "apiID",
  20651. "providerID",
  20652. "name",
  20653. "endpoint",
  20654. "capabilities",
  20655. "options",
  20656. "variants",
  20657. "time",
  20658. "cost",
  20659. "status",
  20660. "enabled",
  20661. "limit"
  20662. ],
  20663. "additionalProperties": false
  20664. },
  20665. "EventCatalogModelUpdated": {
  20666. "type": "object",
  20667. "properties": {
  20668. "id": {
  20669. "type": "string"
  20670. },
  20671. "type": {
  20672. "type": "string",
  20673. "enum": ["catalog.model.updated"]
  20674. },
  20675. "properties": {
  20676. "type": "object",
  20677. "properties": {
  20678. "model": {
  20679. "$ref": "#/components/schemas/ModelV2Info"
  20680. }
  20681. },
  20682. "required": ["model"],
  20683. "additionalProperties": false
  20684. }
  20685. },
  20686. "required": ["id", "type", "properties"],
  20687. "additionalProperties": false
  20688. },
  20689. "EventModels-devRefreshed": {
  20690. "type": "object",
  20691. "properties": {
  20692. "id": {
  20693. "type": "string"
  20694. },
  20695. "type": {
  20696. "type": "string",
  20697. "enum": ["models-dev.refreshed"]
  20698. },
  20699. "properties": {
  20700. "type": "object",
  20701. "properties": {}
  20702. }
  20703. },
  20704. "required": ["id", "type", "properties"],
  20705. "additionalProperties": false
  20706. },
  20707. "AccountV2OAuthCredential": {
  20708. "type": "object",
  20709. "properties": {
  20710. "type": {
  20711. "type": "string",
  20712. "enum": ["oauth"]
  20713. },
  20714. "refresh": {
  20715. "type": "string"
  20716. },
  20717. "access": {
  20718. "type": "string"
  20719. },
  20720. "expires": {
  20721. "type": "integer",
  20722. "minimum": 0
  20723. }
  20724. },
  20725. "required": ["type", "refresh", "access", "expires"],
  20726. "additionalProperties": false
  20727. },
  20728. "AccountV2ApiKeyCredential": {
  20729. "type": "object",
  20730. "properties": {
  20731. "type": {
  20732. "type": "string",
  20733. "enum": ["api"]
  20734. },
  20735. "key": {
  20736. "type": "string"
  20737. },
  20738. "metadata": {
  20739. "type": "object",
  20740. "additionalProperties": {
  20741. "type": "string"
  20742. }
  20743. }
  20744. },
  20745. "required": ["type", "key"],
  20746. "additionalProperties": false
  20747. },
  20748. "AccountV2Credential": {
  20749. "anyOf": [
  20750. {
  20751. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20752. },
  20753. {
  20754. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20755. }
  20756. ]
  20757. },
  20758. "AccountV2Info": {
  20759. "type": "object",
  20760. "properties": {
  20761. "id": {
  20762. "type": "string"
  20763. },
  20764. "serviceID": {
  20765. "type": "string"
  20766. },
  20767. "description": {
  20768. "type": "string"
  20769. },
  20770. "credential": {
  20771. "$ref": "#/components/schemas/AccountV2Credential"
  20772. }
  20773. },
  20774. "required": ["id", "serviceID", "description", "credential"],
  20775. "additionalProperties": false
  20776. },
  20777. "EventAccountAdded": {
  20778. "type": "object",
  20779. "properties": {
  20780. "id": {
  20781. "type": "string"
  20782. },
  20783. "type": {
  20784. "type": "string",
  20785. "enum": ["account.added"]
  20786. },
  20787. "properties": {
  20788. "type": "object",
  20789. "properties": {
  20790. "account": {
  20791. "$ref": "#/components/schemas/AccountV2Info"
  20792. }
  20793. },
  20794. "required": ["account"],
  20795. "additionalProperties": false
  20796. }
  20797. },
  20798. "required": ["id", "type", "properties"],
  20799. "additionalProperties": false
  20800. },
  20801. "EventAccountRemoved": {
  20802. "type": "object",
  20803. "properties": {
  20804. "id": {
  20805. "type": "string"
  20806. },
  20807. "type": {
  20808. "type": "string",
  20809. "enum": ["account.removed"]
  20810. },
  20811. "properties": {
  20812. "type": "object",
  20813. "properties": {
  20814. "account": {
  20815. "$ref": "#/components/schemas/AccountV2Info"
  20816. }
  20817. },
  20818. "required": ["account"],
  20819. "additionalProperties": false
  20820. }
  20821. },
  20822. "required": ["id", "type", "properties"],
  20823. "additionalProperties": false
  20824. },
  20825. "EventAccountSwitched": {
  20826. "type": "object",
  20827. "properties": {
  20828. "id": {
  20829. "type": "string"
  20830. },
  20831. "type": {
  20832. "type": "string",
  20833. "enum": ["account.switched"]
  20834. },
  20835. "properties": {
  20836. "type": "object",
  20837. "properties": {
  20838. "serviceID": {
  20839. "type": "string"
  20840. },
  20841. "from": {
  20842. "type": "string"
  20843. },
  20844. "to": {
  20845. "type": "string"
  20846. }
  20847. },
  20848. "required": ["serviceID"],
  20849. "additionalProperties": false
  20850. }
  20851. },
  20852. "required": ["id", "type", "properties"],
  20853. "additionalProperties": false
  20854. },
  20855. "SessionInfo": {
  20856. "type": "object",
  20857. "properties": {
  20858. "id": {
  20859. "type": "string",
  20860. "pattern": "^ses"
  20861. },
  20862. "parentID": {
  20863. "type": "string",
  20864. "pattern": "^ses"
  20865. },
  20866. "projectID": {
  20867. "type": "string"
  20868. },
  20869. "workspaceID": {
  20870. "type": "string",
  20871. "pattern": "^wrk"
  20872. },
  20873. "path": {
  20874. "type": "string"
  20875. },
  20876. "agent": {
  20877. "type": "string"
  20878. },
  20879. "model": {
  20880. "type": "object",
  20881. "properties": {
  20882. "id": {
  20883. "type": "string"
  20884. },
  20885. "providerID": {
  20886. "type": "string"
  20887. },
  20888. "variant": {
  20889. "type": "string"
  20890. }
  20891. },
  20892. "required": ["id", "providerID", "variant"],
  20893. "additionalProperties": false
  20894. },
  20895. "cost": {
  20896. "type": "number"
  20897. },
  20898. "tokens": {
  20899. "type": "object",
  20900. "properties": {
  20901. "input": {
  20902. "type": "number"
  20903. },
  20904. "output": {
  20905. "type": "number"
  20906. },
  20907. "reasoning": {
  20908. "type": "number"
  20909. },
  20910. "cache": {
  20911. "type": "object",
  20912. "properties": {
  20913. "read": {
  20914. "type": "number"
  20915. },
  20916. "write": {
  20917. "type": "number"
  20918. }
  20919. },
  20920. "required": ["read", "write"],
  20921. "additionalProperties": false
  20922. }
  20923. },
  20924. "required": ["input", "output", "reasoning", "cache"],
  20925. "additionalProperties": false
  20926. },
  20927. "time": {
  20928. "type": "object",
  20929. "properties": {
  20930. "created": {
  20931. "type": "number"
  20932. },
  20933. "updated": {
  20934. "type": "number"
  20935. },
  20936. "archived": {
  20937. "type": "number"
  20938. }
  20939. },
  20940. "required": ["created", "updated"],
  20941. "additionalProperties": false
  20942. },
  20943. "title": {
  20944. "type": "string"
  20945. }
  20946. },
  20947. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20948. "additionalProperties": false
  20949. },
  20950. "SessionDelivery": {
  20951. "type": "string",
  20952. "enum": ["immediate", "deferred"]
  20953. },
  20954. "SessionMessageAgentSwitched": {
  20955. "type": "object",
  20956. "properties": {
  20957. "id": {
  20958. "type": "string"
  20959. },
  20960. "metadata": {
  20961. "type": "object"
  20962. },
  20963. "time": {
  20964. "type": "object",
  20965. "properties": {
  20966. "created": {
  20967. "type": "number"
  20968. }
  20969. },
  20970. "required": ["created"],
  20971. "additionalProperties": false
  20972. },
  20973. "type": {
  20974. "type": "string",
  20975. "enum": ["agent-switched"]
  20976. },
  20977. "agent": {
  20978. "type": "string"
  20979. }
  20980. },
  20981. "required": ["id", "time", "type", "agent"],
  20982. "additionalProperties": false
  20983. },
  20984. "SessionMessageModelSwitched": {
  20985. "type": "object",
  20986. "properties": {
  20987. "id": {
  20988. "type": "string"
  20989. },
  20990. "metadata": {
  20991. "type": "object"
  20992. },
  20993. "time": {
  20994. "type": "object",
  20995. "properties": {
  20996. "created": {
  20997. "type": "number"
  20998. }
  20999. },
  21000. "required": ["created"],
  21001. "additionalProperties": false
  21002. },
  21003. "type": {
  21004. "type": "string",
  21005. "enum": ["model-switched"]
  21006. },
  21007. "model": {
  21008. "type": "object",
  21009. "properties": {
  21010. "id": {
  21011. "type": "string"
  21012. },
  21013. "providerID": {
  21014. "type": "string"
  21015. },
  21016. "variant": {
  21017. "type": "string"
  21018. }
  21019. },
  21020. "required": ["id", "providerID", "variant"],
  21021. "additionalProperties": false
  21022. }
  21023. },
  21024. "required": ["id", "time", "type", "model"],
  21025. "additionalProperties": false
  21026. },
  21027. "SessionMessageUser": {
  21028. "type": "object",
  21029. "properties": {
  21030. "id": {
  21031. "type": "string"
  21032. },
  21033. "metadata": {
  21034. "type": "object"
  21035. },
  21036. "time": {
  21037. "type": "object",
  21038. "properties": {
  21039. "created": {
  21040. "type": "number"
  21041. }
  21042. },
  21043. "required": ["created"],
  21044. "additionalProperties": false
  21045. },
  21046. "text": {
  21047. "type": "string"
  21048. },
  21049. "files": {
  21050. "type": "array",
  21051. "items": {
  21052. "$ref": "#/components/schemas/PromptFileAttachment"
  21053. }
  21054. },
  21055. "agents": {
  21056. "type": "array",
  21057. "items": {
  21058. "$ref": "#/components/schemas/PromptAgentAttachment"
  21059. }
  21060. },
  21061. "references": {
  21062. "type": "array",
  21063. "items": {
  21064. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21065. }
  21066. },
  21067. "type": {
  21068. "type": "string",
  21069. "enum": ["user"]
  21070. }
  21071. },
  21072. "required": ["id", "time", "text", "type"],
  21073. "additionalProperties": false
  21074. },
  21075. "SessionMessageSynthetic": {
  21076. "type": "object",
  21077. "properties": {
  21078. "id": {
  21079. "type": "string"
  21080. },
  21081. "metadata": {
  21082. "type": "object"
  21083. },
  21084. "time": {
  21085. "type": "object",
  21086. "properties": {
  21087. "created": {
  21088. "type": "number"
  21089. }
  21090. },
  21091. "required": ["created"],
  21092. "additionalProperties": false
  21093. },
  21094. "sessionID": {
  21095. "type": "string",
  21096. "pattern": "^ses"
  21097. },
  21098. "text": {
  21099. "type": "string"
  21100. },
  21101. "type": {
  21102. "type": "string",
  21103. "enum": ["synthetic"]
  21104. }
  21105. },
  21106. "required": ["id", "time", "sessionID", "text", "type"],
  21107. "additionalProperties": false
  21108. },
  21109. "SessionMessageShell": {
  21110. "type": "object",
  21111. "properties": {
  21112. "id": {
  21113. "type": "string"
  21114. },
  21115. "metadata": {
  21116. "type": "object"
  21117. },
  21118. "time": {
  21119. "type": "object",
  21120. "properties": {
  21121. "created": {
  21122. "type": "number"
  21123. },
  21124. "completed": {
  21125. "type": "number"
  21126. }
  21127. },
  21128. "required": ["created"],
  21129. "additionalProperties": false
  21130. },
  21131. "type": {
  21132. "type": "string",
  21133. "enum": ["shell"]
  21134. },
  21135. "callID": {
  21136. "type": "string"
  21137. },
  21138. "command": {
  21139. "type": "string"
  21140. },
  21141. "output": {
  21142. "type": "string"
  21143. }
  21144. },
  21145. "required": ["id", "time", "type", "callID", "command", "output"],
  21146. "additionalProperties": false
  21147. },
  21148. "SessionMessageAssistantText": {
  21149. "type": "object",
  21150. "properties": {
  21151. "type": {
  21152. "type": "string",
  21153. "enum": ["text"]
  21154. },
  21155. "text": {
  21156. "type": "string"
  21157. }
  21158. },
  21159. "required": ["type", "text"],
  21160. "additionalProperties": false
  21161. },
  21162. "SessionMessageAssistantReasoning": {
  21163. "type": "object",
  21164. "properties": {
  21165. "type": {
  21166. "type": "string",
  21167. "enum": ["reasoning"]
  21168. },
  21169. "id": {
  21170. "type": "string"
  21171. },
  21172. "text": {
  21173. "type": "string"
  21174. }
  21175. },
  21176. "required": ["type", "id", "text"],
  21177. "additionalProperties": false
  21178. },
  21179. "SessionMessageToolStatePending": {
  21180. "type": "object",
  21181. "properties": {
  21182. "status": {
  21183. "type": "string",
  21184. "enum": ["pending"]
  21185. },
  21186. "input": {
  21187. "type": "string"
  21188. }
  21189. },
  21190. "required": ["status", "input"],
  21191. "additionalProperties": false
  21192. },
  21193. "SessionMessageToolStateRunning": {
  21194. "type": "object",
  21195. "properties": {
  21196. "status": {
  21197. "type": "string",
  21198. "enum": ["running"]
  21199. },
  21200. "input": {
  21201. "type": "object"
  21202. },
  21203. "structured": {
  21204. "type": "object"
  21205. },
  21206. "content": {
  21207. "type": "array",
  21208. "items": {
  21209. "anyOf": [
  21210. {
  21211. "$ref": "#/components/schemas/ToolTextContent"
  21212. },
  21213. {
  21214. "$ref": "#/components/schemas/ToolFileContent"
  21215. }
  21216. ]
  21217. }
  21218. }
  21219. },
  21220. "required": ["status", "input", "structured", "content"],
  21221. "additionalProperties": false
  21222. },
  21223. "SessionMessageToolStateCompleted": {
  21224. "type": "object",
  21225. "properties": {
  21226. "status": {
  21227. "type": "string",
  21228. "enum": ["completed"]
  21229. },
  21230. "input": {
  21231. "type": "object"
  21232. },
  21233. "attachments": {
  21234. "type": "array",
  21235. "items": {
  21236. "$ref": "#/components/schemas/PromptFileAttachment"
  21237. }
  21238. },
  21239. "content": {
  21240. "type": "array",
  21241. "items": {
  21242. "anyOf": [
  21243. {
  21244. "$ref": "#/components/schemas/ToolTextContent"
  21245. },
  21246. {
  21247. "$ref": "#/components/schemas/ToolFileContent"
  21248. }
  21249. ]
  21250. }
  21251. },
  21252. "structured": {
  21253. "type": "object"
  21254. }
  21255. },
  21256. "required": ["status", "input", "content", "structured"],
  21257. "additionalProperties": false
  21258. },
  21259. "SessionMessageToolStateError": {
  21260. "type": "object",
  21261. "properties": {
  21262. "status": {
  21263. "type": "string",
  21264. "enum": ["error"]
  21265. },
  21266. "input": {
  21267. "type": "object"
  21268. },
  21269. "content": {
  21270. "type": "array",
  21271. "items": {
  21272. "anyOf": [
  21273. {
  21274. "$ref": "#/components/schemas/ToolTextContent"
  21275. },
  21276. {
  21277. "$ref": "#/components/schemas/ToolFileContent"
  21278. }
  21279. ]
  21280. }
  21281. },
  21282. "structured": {
  21283. "type": "object"
  21284. },
  21285. "error": {
  21286. "$ref": "#/components/schemas/SessionErrorUnknown"
  21287. }
  21288. },
  21289. "required": ["status", "input", "content", "structured", "error"],
  21290. "additionalProperties": false
  21291. },
  21292. "SessionMessageAssistantTool": {
  21293. "type": "object",
  21294. "properties": {
  21295. "type": {
  21296. "type": "string",
  21297. "enum": ["tool"]
  21298. },
  21299. "id": {
  21300. "type": "string"
  21301. },
  21302. "name": {
  21303. "type": "string"
  21304. },
  21305. "provider": {
  21306. "type": "object",
  21307. "properties": {
  21308. "executed": {
  21309. "type": "boolean"
  21310. },
  21311. "metadata": {
  21312. "type": "object"
  21313. }
  21314. },
  21315. "required": ["executed"],
  21316. "additionalProperties": false
  21317. },
  21318. "state": {
  21319. "anyOf": [
  21320. {
  21321. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21322. },
  21323. {
  21324. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21325. },
  21326. {
  21327. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21328. },
  21329. {
  21330. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21331. }
  21332. ]
  21333. },
  21334. "time": {
  21335. "type": "object",
  21336. "properties": {
  21337. "created": {
  21338. "type": "number"
  21339. },
  21340. "ran": {
  21341. "type": "number"
  21342. },
  21343. "completed": {
  21344. "type": "number"
  21345. },
  21346. "pruned": {
  21347. "type": "number"
  21348. }
  21349. },
  21350. "required": ["created"],
  21351. "additionalProperties": false
  21352. }
  21353. },
  21354. "required": ["type", "id", "name", "state", "time"],
  21355. "additionalProperties": false
  21356. },
  21357. "SessionMessageAssistant": {
  21358. "type": "object",
  21359. "properties": {
  21360. "id": {
  21361. "type": "string"
  21362. },
  21363. "metadata": {
  21364. "type": "object"
  21365. },
  21366. "time": {
  21367. "type": "object",
  21368. "properties": {
  21369. "created": {
  21370. "type": "number"
  21371. },
  21372. "completed": {
  21373. "type": "number"
  21374. }
  21375. },
  21376. "required": ["created"],
  21377. "additionalProperties": false
  21378. },
  21379. "type": {
  21380. "type": "string",
  21381. "enum": ["assistant"]
  21382. },
  21383. "agent": {
  21384. "type": "string"
  21385. },
  21386. "model": {
  21387. "type": "object",
  21388. "properties": {
  21389. "id": {
  21390. "type": "string"
  21391. },
  21392. "providerID": {
  21393. "type": "string"
  21394. },
  21395. "variant": {
  21396. "type": "string"
  21397. }
  21398. },
  21399. "required": ["id", "providerID", "variant"],
  21400. "additionalProperties": false
  21401. },
  21402. "content": {
  21403. "type": "array",
  21404. "items": {
  21405. "anyOf": [
  21406. {
  21407. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21408. },
  21409. {
  21410. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21411. },
  21412. {
  21413. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21414. }
  21415. ]
  21416. }
  21417. },
  21418. "snapshot": {
  21419. "type": "object",
  21420. "properties": {
  21421. "start": {
  21422. "type": "string"
  21423. },
  21424. "end": {
  21425. "type": "string"
  21426. }
  21427. },
  21428. "additionalProperties": false
  21429. },
  21430. "finish": {
  21431. "type": "string"
  21432. },
  21433. "cost": {
  21434. "type": "number"
  21435. },
  21436. "tokens": {
  21437. "type": "object",
  21438. "properties": {
  21439. "input": {
  21440. "type": "number"
  21441. },
  21442. "output": {
  21443. "type": "number"
  21444. },
  21445. "reasoning": {
  21446. "type": "number"
  21447. },
  21448. "cache": {
  21449. "type": "object",
  21450. "properties": {
  21451. "read": {
  21452. "type": "number"
  21453. },
  21454. "write": {
  21455. "type": "number"
  21456. }
  21457. },
  21458. "required": ["read", "write"],
  21459. "additionalProperties": false
  21460. }
  21461. },
  21462. "required": ["input", "output", "reasoning", "cache"],
  21463. "additionalProperties": false
  21464. },
  21465. "error": {
  21466. "$ref": "#/components/schemas/SessionErrorUnknown"
  21467. }
  21468. },
  21469. "required": ["id", "time", "type", "agent", "model", "content"],
  21470. "additionalProperties": false
  21471. },
  21472. "SessionMessageCompaction": {
  21473. "type": "object",
  21474. "properties": {
  21475. "type": {
  21476. "type": "string",
  21477. "enum": ["compaction"]
  21478. },
  21479. "reason": {
  21480. "type": "string",
  21481. "enum": ["auto", "manual"]
  21482. },
  21483. "summary": {
  21484. "type": "string"
  21485. },
  21486. "include": {
  21487. "type": "string"
  21488. },
  21489. "id": {
  21490. "type": "string"
  21491. },
  21492. "metadata": {
  21493. "type": "object"
  21494. },
  21495. "time": {
  21496. "type": "object",
  21497. "properties": {
  21498. "created": {
  21499. "type": "number"
  21500. }
  21501. },
  21502. "required": ["created"],
  21503. "additionalProperties": false
  21504. }
  21505. },
  21506. "required": ["type", "reason", "summary", "id", "time"],
  21507. "additionalProperties": false
  21508. },
  21509. "SessionMessage": {
  21510. "anyOf": [
  21511. {
  21512. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21513. },
  21514. {
  21515. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21516. },
  21517. {
  21518. "$ref": "#/components/schemas/SessionMessageUser"
  21519. },
  21520. {
  21521. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21522. },
  21523. {
  21524. "$ref": "#/components/schemas/SessionMessageShell"
  21525. },
  21526. {
  21527. "$ref": "#/components/schemas/SessionMessageAssistant"
  21528. },
  21529. {
  21530. "$ref": "#/components/schemas/SessionMessageCompaction"
  21531. }
  21532. ]
  21533. },
  21534. "ProviderV2Info": {
  21535. "type": "object",
  21536. "properties": {
  21537. "id": {
  21538. "type": "string"
  21539. },
  21540. "name": {
  21541. "type": "string"
  21542. },
  21543. "enabled": {
  21544. "anyOf": [
  21545. {
  21546. "type": "boolean",
  21547. "enum": [false]
  21548. },
  21549. {
  21550. "type": "object",
  21551. "properties": {
  21552. "via": {
  21553. "type": "string",
  21554. "enum": ["env"]
  21555. },
  21556. "name": {
  21557. "type": "string"
  21558. }
  21559. },
  21560. "required": ["via", "name"],
  21561. "additionalProperties": false
  21562. },
  21563. {
  21564. "type": "object",
  21565. "properties": {
  21566. "via": {
  21567. "type": "string",
  21568. "enum": ["account"]
  21569. },
  21570. "service": {
  21571. "type": "string"
  21572. }
  21573. },
  21574. "required": ["via", "service"],
  21575. "additionalProperties": false
  21576. },
  21577. {
  21578. "type": "object",
  21579. "properties": {
  21580. "via": {
  21581. "type": "string",
  21582. "enum": ["custom"]
  21583. },
  21584. "data": {
  21585. "type": "object"
  21586. }
  21587. },
  21588. "required": ["via", "data"],
  21589. "additionalProperties": false
  21590. }
  21591. ]
  21592. },
  21593. "env": {
  21594. "type": "array",
  21595. "items": {
  21596. "type": "string"
  21597. }
  21598. },
  21599. "endpoint": {
  21600. "anyOf": [
  21601. {
  21602. "type": "object",
  21603. "properties": {
  21604. "type": {
  21605. "type": "string",
  21606. "enum": ["unknown"]
  21607. }
  21608. },
  21609. "required": ["type"],
  21610. "additionalProperties": false
  21611. },
  21612. {
  21613. "type": "object",
  21614. "properties": {
  21615. "type": {
  21616. "type": "string",
  21617. "enum": ["openai/responses"]
  21618. },
  21619. "url": {
  21620. "type": "string"
  21621. },
  21622. "websocket": {
  21623. "type": "boolean"
  21624. }
  21625. },
  21626. "required": ["type", "url"],
  21627. "additionalProperties": false
  21628. },
  21629. {
  21630. "type": "object",
  21631. "properties": {
  21632. "type": {
  21633. "type": "string",
  21634. "enum": ["openai/completions"]
  21635. },
  21636. "url": {
  21637. "type": "string"
  21638. },
  21639. "reasoning": {
  21640. "anyOf": [
  21641. {
  21642. "type": "object",
  21643. "properties": {
  21644. "type": {
  21645. "type": "string",
  21646. "enum": ["reasoning_content"]
  21647. }
  21648. },
  21649. "required": ["type"],
  21650. "additionalProperties": false
  21651. },
  21652. {
  21653. "type": "object",
  21654. "properties": {
  21655. "type": {
  21656. "type": "string",
  21657. "enum": ["reasoning_details"]
  21658. }
  21659. },
  21660. "required": ["type"],
  21661. "additionalProperties": false
  21662. }
  21663. ]
  21664. }
  21665. },
  21666. "required": ["type", "url"],
  21667. "additionalProperties": false
  21668. },
  21669. {
  21670. "type": "object",
  21671. "properties": {
  21672. "type": {
  21673. "type": "string",
  21674. "enum": ["anthropic/messages"]
  21675. },
  21676. "url": {
  21677. "type": "string"
  21678. }
  21679. },
  21680. "required": ["type", "url"],
  21681. "additionalProperties": false
  21682. },
  21683. {
  21684. "type": "object",
  21685. "properties": {
  21686. "type": {
  21687. "type": "string",
  21688. "enum": ["aisdk"]
  21689. },
  21690. "package": {
  21691. "type": "string"
  21692. },
  21693. "url": {
  21694. "type": "string"
  21695. }
  21696. },
  21697. "required": ["type", "package"],
  21698. "additionalProperties": false
  21699. }
  21700. ]
  21701. },
  21702. "options": {
  21703. "type": "object",
  21704. "properties": {
  21705. "headers": {
  21706. "type": "object",
  21707. "additionalProperties": {
  21708. "type": "string"
  21709. }
  21710. },
  21711. "body": {
  21712. "type": "object"
  21713. },
  21714. "aisdk": {
  21715. "type": "object",
  21716. "properties": {
  21717. "provider": {
  21718. "type": "object"
  21719. },
  21720. "request": {
  21721. "type": "object"
  21722. }
  21723. },
  21724. "required": ["provider", "request"],
  21725. "additionalProperties": false
  21726. }
  21727. },
  21728. "required": ["headers", "body", "aisdk"],
  21729. "additionalProperties": false
  21730. }
  21731. },
  21732. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21733. "additionalProperties": false
  21734. },
  21735. "EventTuiToastShow1": {
  21736. "type": "object",
  21737. "properties": {
  21738. "id": {
  21739. "type": "string"
  21740. },
  21741. "type": {
  21742. "type": "string",
  21743. "enum": ["tui.toast.show"]
  21744. },
  21745. "properties": {
  21746. "type": "object",
  21747. "properties": {
  21748. "title": {
  21749. "type": "string"
  21750. },
  21751. "message": {
  21752. "type": "string"
  21753. },
  21754. "variant": {
  21755. "type": "string",
  21756. "enum": ["info", "success", "warning", "error"]
  21757. },
  21758. "duration": {
  21759. "type": "integer",
  21760. "exclusiveMinimum": 0
  21761. }
  21762. },
  21763. "required": ["message", "variant"],
  21764. "additionalProperties": false
  21765. }
  21766. },
  21767. "required": ["id", "type", "properties"],
  21768. "additionalProperties": false
  21769. },
  21770. "ModelV2Info1": {
  21771. "type": "object",
  21772. "properties": {
  21773. "id": {
  21774. "type": "string"
  21775. },
  21776. "apiID": {
  21777. "type": "string"
  21778. },
  21779. "providerID": {
  21780. "type": "string"
  21781. },
  21782. "family": {
  21783. "type": "string"
  21784. },
  21785. "name": {
  21786. "type": "string"
  21787. },
  21788. "endpoint": {
  21789. "anyOf": [
  21790. {
  21791. "type": "object",
  21792. "properties": {
  21793. "type": {
  21794. "type": "string",
  21795. "enum": ["unknown"]
  21796. }
  21797. },
  21798. "required": ["type"],
  21799. "additionalProperties": false
  21800. },
  21801. {
  21802. "type": "object",
  21803. "properties": {
  21804. "type": {
  21805. "type": "string",
  21806. "enum": ["openai/responses"]
  21807. },
  21808. "url": {
  21809. "type": "string"
  21810. },
  21811. "websocket": {
  21812. "type": "boolean"
  21813. }
  21814. },
  21815. "required": ["type", "url"],
  21816. "additionalProperties": false
  21817. },
  21818. {
  21819. "type": "object",
  21820. "properties": {
  21821. "type": {
  21822. "type": "string",
  21823. "enum": ["openai/completions"]
  21824. },
  21825. "url": {
  21826. "type": "string"
  21827. },
  21828. "reasoning": {
  21829. "anyOf": [
  21830. {
  21831. "type": "object",
  21832. "properties": {
  21833. "type": {
  21834. "type": "string",
  21835. "enum": ["reasoning_content"]
  21836. }
  21837. },
  21838. "required": ["type"],
  21839. "additionalProperties": false
  21840. },
  21841. {
  21842. "type": "object",
  21843. "properties": {
  21844. "type": {
  21845. "type": "string",
  21846. "enum": ["reasoning_details"]
  21847. }
  21848. },
  21849. "required": ["type"],
  21850. "additionalProperties": false
  21851. }
  21852. ]
  21853. }
  21854. },
  21855. "required": ["type", "url"],
  21856. "additionalProperties": false
  21857. },
  21858. {
  21859. "type": "object",
  21860. "properties": {
  21861. "type": {
  21862. "type": "string",
  21863. "enum": ["anthropic/messages"]
  21864. },
  21865. "url": {
  21866. "type": "string"
  21867. }
  21868. },
  21869. "required": ["type", "url"],
  21870. "additionalProperties": false
  21871. },
  21872. {
  21873. "type": "object",
  21874. "properties": {
  21875. "type": {
  21876. "type": "string",
  21877. "enum": ["aisdk"]
  21878. },
  21879. "package": {
  21880. "type": "string"
  21881. },
  21882. "url": {
  21883. "type": "string"
  21884. }
  21885. },
  21886. "required": ["type", "package"],
  21887. "additionalProperties": false
  21888. }
  21889. ]
  21890. },
  21891. "capabilities": {
  21892. "type": "object",
  21893. "properties": {
  21894. "tools": {
  21895. "type": "boolean"
  21896. },
  21897. "input": {
  21898. "type": "array",
  21899. "items": {
  21900. "type": "string"
  21901. }
  21902. },
  21903. "output": {
  21904. "type": "array",
  21905. "items": {
  21906. "type": "string"
  21907. }
  21908. }
  21909. },
  21910. "required": ["tools", "input", "output"],
  21911. "additionalProperties": false
  21912. },
  21913. "options": {
  21914. "type": "object",
  21915. "properties": {
  21916. "headers": {
  21917. "type": "object",
  21918. "additionalProperties": {
  21919. "type": "string"
  21920. }
  21921. },
  21922. "body": {
  21923. "type": "object"
  21924. },
  21925. "aisdk": {
  21926. "type": "object",
  21927. "properties": {
  21928. "provider": {
  21929. "type": "object"
  21930. },
  21931. "request": {
  21932. "type": "object"
  21933. }
  21934. },
  21935. "required": ["provider", "request"],
  21936. "additionalProperties": false
  21937. },
  21938. "variant": {
  21939. "type": "string"
  21940. }
  21941. },
  21942. "required": ["headers", "body", "aisdk"],
  21943. "additionalProperties": false
  21944. },
  21945. "variants": {
  21946. "type": "array",
  21947. "items": {
  21948. "type": "object",
  21949. "properties": {
  21950. "id": {
  21951. "type": "string"
  21952. },
  21953. "headers": {
  21954. "type": "object",
  21955. "additionalProperties": {
  21956. "type": "string"
  21957. }
  21958. },
  21959. "body": {
  21960. "type": "object"
  21961. },
  21962. "aisdk": {
  21963. "type": "object",
  21964. "properties": {
  21965. "provider": {
  21966. "type": "object"
  21967. },
  21968. "request": {
  21969. "type": "object"
  21970. }
  21971. },
  21972. "required": ["provider", "request"],
  21973. "additionalProperties": false
  21974. }
  21975. },
  21976. "required": ["id", "headers", "body", "aisdk"],
  21977. "additionalProperties": false
  21978. }
  21979. },
  21980. "time": {
  21981. "type": "object",
  21982. "properties": {
  21983. "released": {
  21984. "anyOf": [
  21985. {
  21986. "type": "number"
  21987. },
  21988. {
  21989. "type": "string",
  21990. "enum": ["NaN"]
  21991. },
  21992. {
  21993. "type": "string",
  21994. "enum": ["Infinity"]
  21995. },
  21996. {
  21997. "type": "string",
  21998. "enum": ["-Infinity"]
  21999. }
  22000. ]
  22001. }
  22002. },
  22003. "required": ["released"],
  22004. "additionalProperties": false
  22005. },
  22006. "cost": {
  22007. "type": "array",
  22008. "items": {
  22009. "type": "object",
  22010. "properties": {
  22011. "tier": {
  22012. "type": "object",
  22013. "properties": {
  22014. "type": {
  22015. "type": "string",
  22016. "enum": ["context"]
  22017. },
  22018. "size": {
  22019. "type": "integer"
  22020. }
  22021. },
  22022. "required": ["type", "size"],
  22023. "additionalProperties": false
  22024. },
  22025. "input": {
  22026. "type": "number"
  22027. },
  22028. "output": {
  22029. "type": "number"
  22030. },
  22031. "cache": {
  22032. "type": "object",
  22033. "properties": {
  22034. "read": {
  22035. "type": "number"
  22036. },
  22037. "write": {
  22038. "type": "number"
  22039. }
  22040. },
  22041. "required": ["read", "write"],
  22042. "additionalProperties": false
  22043. }
  22044. },
  22045. "required": ["input", "output", "cache"],
  22046. "additionalProperties": false
  22047. }
  22048. },
  22049. "status": {
  22050. "type": "string",
  22051. "enum": ["alpha", "beta", "deprecated", "active"]
  22052. },
  22053. "enabled": {
  22054. "type": "boolean"
  22055. },
  22056. "limit": {
  22057. "type": "object",
  22058. "properties": {
  22059. "context": {
  22060. "type": "integer"
  22061. },
  22062. "input": {
  22063. "type": "integer"
  22064. },
  22065. "output": {
  22066. "type": "integer"
  22067. }
  22068. },
  22069. "required": ["context", "output"],
  22070. "additionalProperties": false
  22071. }
  22072. },
  22073. "required": [
  22074. "id",
  22075. "apiID",
  22076. "providerID",
  22077. "name",
  22078. "endpoint",
  22079. "capabilities",
  22080. "options",
  22081. "variants",
  22082. "time",
  22083. "cost",
  22084. "status",
  22085. "enabled",
  22086. "limit"
  22087. ],
  22088. "additionalProperties": false
  22089. },
  22090. "BadRequestError": {
  22091. "type": "object",
  22092. "required": ["name", "data"],
  22093. "properties": {
  22094. "name": {
  22095. "type": "string",
  22096. "enum": ["BadRequest"]
  22097. },
  22098. "data": {
  22099. "type": "object",
  22100. "required": ["message"],
  22101. "properties": {
  22102. "message": {
  22103. "type": "string"
  22104. },
  22105. "kind": {
  22106. "type": "string",
  22107. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  22108. }
  22109. }
  22110. }
  22111. }
  22112. }
  22113. }
  22114. },
  22115. "security": [],
  22116. "tags": [
  22117. {
  22118. "name": "control",
  22119. "description": "Control plane routes."
  22120. },
  22121. {
  22122. "name": "global",
  22123. "description": "Global server routes."
  22124. },
  22125. {
  22126. "name": "event",
  22127. "description": "Instance event stream route."
  22128. },
  22129. {
  22130. "name": "config",
  22131. "description": "Experimental HttpApi config routes."
  22132. },
  22133. {
  22134. "name": "experimental",
  22135. "description": "Experimental HttpApi read-only routes."
  22136. },
  22137. {
  22138. "name": "file",
  22139. "description": "Experimental HttpApi file routes."
  22140. },
  22141. {
  22142. "name": "instance",
  22143. "description": "Experimental HttpApi instance read routes."
  22144. },
  22145. {
  22146. "name": "mcp",
  22147. "description": "Experimental HttpApi MCP routes."
  22148. },
  22149. {
  22150. "name": "project",
  22151. "description": "Experimental HttpApi project routes."
  22152. },
  22153. {
  22154. "name": "pty",
  22155. "description": "Experimental HttpApi PTY routes."
  22156. },
  22157. {
  22158. "name": "question",
  22159. "description": "Question routes."
  22160. },
  22161. {
  22162. "name": "permission",
  22163. "description": "Experimental HttpApi permission routes."
  22164. },
  22165. {
  22166. "name": "provider",
  22167. "description": "Experimental HttpApi provider routes."
  22168. },
  22169. {
  22170. "name": "session",
  22171. "description": "Experimental HttpApi session routes."
  22172. },
  22173. {
  22174. "name": "sync",
  22175. "description": "Experimental HttpApi sync routes."
  22176. },
  22177. {
  22178. "name": "v2",
  22179. "description": "Experimental v2 routes."
  22180. },
  22181. {
  22182. "name": "v2 messages",
  22183. "description": "Experimental v2 message routes."
  22184. },
  22185. {
  22186. "name": "v2 models",
  22187. "description": "Experimental v2 model routes."
  22188. },
  22189. {
  22190. "name": "v2 providers",
  22191. "description": "Experimental v2 provider routes."
  22192. },
  22193. {
  22194. "name": "tui",
  22195. "description": "Experimental HttpApi TUI routes."
  22196. },
  22197. {
  22198. "name": "workspace",
  22199. "description": "Experimental HttpApi workspace routes."
  22200. },
  22201. {
  22202. "name": "pty",
  22203. "description": "PTY websocket route."
  22204. }
  22205. ]
  22206. }