openapi.json 609 KB

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