openapi.json 363 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412
  1. {
  2. "openapi": "3.1.1",
  3. "info": {
  4. "title": "opencode",
  5. "description": "opencode api",
  6. "version": "1.0.0"
  7. },
  8. "paths": {
  9. "/global/health": {
  10. "get": {
  11. "operationId": "global.health",
  12. "summary": "Get health",
  13. "description": "Get health information about the OpenCode server.",
  14. "responses": {
  15. "200": {
  16. "description": "Health information",
  17. "content": {
  18. "application/json": {
  19. "schema": {
  20. "type": "object",
  21. "properties": {
  22. "healthy": {
  23. "type": "boolean",
  24. "const": true
  25. },
  26. "version": {
  27. "type": "string"
  28. }
  29. },
  30. "required": ["healthy", "version"]
  31. }
  32. }
  33. }
  34. }
  35. },
  36. "x-codeSamples": [
  37. {
  38. "lang": "js",
  39. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  40. }
  41. ]
  42. }
  43. },
  44. "/global/event": {
  45. "get": {
  46. "operationId": "global.event",
  47. "summary": "Get global events",
  48. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  49. "responses": {
  50. "200": {
  51. "description": "Event stream",
  52. "content": {
  53. "text/event-stream": {
  54. "schema": {
  55. "$ref": "#/components/schemas/GlobalEvent"
  56. }
  57. }
  58. }
  59. }
  60. },
  61. "x-codeSamples": [
  62. {
  63. "lang": "js",
  64. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  65. }
  66. ]
  67. }
  68. },
  69. "/global/config": {
  70. "get": {
  71. "operationId": "global.config.get",
  72. "summary": "Get global configuration",
  73. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  74. "responses": {
  75. "200": {
  76. "description": "Get global config info",
  77. "content": {
  78. "application/json": {
  79. "schema": {
  80. "$ref": "#/components/schemas/Config"
  81. }
  82. }
  83. }
  84. }
  85. },
  86. "x-codeSamples": [
  87. {
  88. "lang": "js",
  89. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  90. }
  91. ]
  92. },
  93. "patch": {
  94. "operationId": "global.config.update",
  95. "summary": "Update global configuration",
  96. "description": "Update global OpenCode configuration settings and preferences.",
  97. "responses": {
  98. "200": {
  99. "description": "Successfully updated global config",
  100. "content": {
  101. "application/json": {
  102. "schema": {
  103. "$ref": "#/components/schemas/Config"
  104. }
  105. }
  106. }
  107. },
  108. "400": {
  109. "description": "Bad request",
  110. "content": {
  111. "application/json": {
  112. "schema": {
  113. "$ref": "#/components/schemas/BadRequestError"
  114. }
  115. }
  116. }
  117. }
  118. },
  119. "requestBody": {
  120. "content": {
  121. "application/json": {
  122. "schema": {
  123. "$ref": "#/components/schemas/Config"
  124. }
  125. }
  126. }
  127. },
  128. "x-codeSamples": [
  129. {
  130. "lang": "js",
  131. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  132. }
  133. ]
  134. }
  135. },
  136. "/global/dispose": {
  137. "post": {
  138. "operationId": "global.dispose",
  139. "summary": "Dispose instance",
  140. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  141. "responses": {
  142. "200": {
  143. "description": "Global disposed",
  144. "content": {
  145. "application/json": {
  146. "schema": {
  147. "type": "boolean"
  148. }
  149. }
  150. }
  151. }
  152. },
  153. "x-codeSamples": [
  154. {
  155. "lang": "js",
  156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  157. }
  158. ]
  159. }
  160. },
  161. "/global/upgrade": {
  162. "post": {
  163. "operationId": "global.upgrade",
  164. "summary": "Upgrade opencode",
  165. "description": "Upgrade opencode to the specified version or latest if not specified.",
  166. "responses": {
  167. "200": {
  168. "description": "Upgrade result",
  169. "content": {
  170. "application/json": {
  171. "schema": {
  172. "anyOf": [
  173. {
  174. "type": "object",
  175. "properties": {
  176. "success": {
  177. "type": "boolean",
  178. "const": true
  179. },
  180. "version": {
  181. "type": "string"
  182. }
  183. },
  184. "required": ["success", "version"]
  185. },
  186. {
  187. "type": "object",
  188. "properties": {
  189. "success": {
  190. "type": "boolean",
  191. "const": false
  192. },
  193. "error": {
  194. "type": "string"
  195. }
  196. },
  197. "required": ["success", "error"]
  198. }
  199. ]
  200. }
  201. }
  202. }
  203. },
  204. "400": {
  205. "description": "Bad request",
  206. "content": {
  207. "application/json": {
  208. "schema": {
  209. "$ref": "#/components/schemas/BadRequestError"
  210. }
  211. }
  212. }
  213. }
  214. },
  215. "requestBody": {
  216. "content": {
  217. "application/json": {
  218. "schema": {
  219. "type": "object",
  220. "properties": {
  221. "target": {
  222. "type": "string"
  223. }
  224. }
  225. }
  226. }
  227. }
  228. },
  229. "x-codeSamples": [
  230. {
  231. "lang": "js",
  232. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  233. }
  234. ]
  235. }
  236. },
  237. "/auth/{providerID}": {
  238. "put": {
  239. "operationId": "auth.set",
  240. "summary": "Set auth credentials",
  241. "description": "Set authentication credentials",
  242. "responses": {
  243. "200": {
  244. "description": "Successfully set authentication credentials",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "boolean"
  249. }
  250. }
  251. }
  252. },
  253. "400": {
  254. "description": "Bad request",
  255. "content": {
  256. "application/json": {
  257. "schema": {
  258. "$ref": "#/components/schemas/BadRequestError"
  259. }
  260. }
  261. }
  262. }
  263. },
  264. "parameters": [
  265. {
  266. "in": "path",
  267. "name": "providerID",
  268. "schema": {
  269. "type": "string"
  270. },
  271. "required": true
  272. }
  273. ],
  274. "requestBody": {
  275. "content": {
  276. "application/json": {
  277. "schema": {
  278. "$ref": "#/components/schemas/Auth"
  279. }
  280. }
  281. }
  282. },
  283. "x-codeSamples": [
  284. {
  285. "lang": "js",
  286. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  287. }
  288. ]
  289. },
  290. "delete": {
  291. "operationId": "auth.remove",
  292. "summary": "Remove auth credentials",
  293. "description": "Remove authentication credentials",
  294. "responses": {
  295. "200": {
  296. "description": "Successfully removed authentication credentials",
  297. "content": {
  298. "application/json": {
  299. "schema": {
  300. "type": "boolean"
  301. }
  302. }
  303. }
  304. },
  305. "400": {
  306. "description": "Bad request",
  307. "content": {
  308. "application/json": {
  309. "schema": {
  310. "$ref": "#/components/schemas/BadRequestError"
  311. }
  312. }
  313. }
  314. }
  315. },
  316. "parameters": [
  317. {
  318. "in": "path",
  319. "name": "providerID",
  320. "schema": {
  321. "type": "string"
  322. },
  323. "required": true
  324. }
  325. ],
  326. "x-codeSamples": [
  327. {
  328. "lang": "js",
  329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  330. }
  331. ]
  332. }
  333. },
  334. "/log": {
  335. "post": {
  336. "operationId": "app.log",
  337. "parameters": [
  338. {
  339. "in": "query",
  340. "name": "directory",
  341. "schema": {
  342. "type": "string"
  343. }
  344. },
  345. {
  346. "in": "query",
  347. "name": "workspace",
  348. "schema": {
  349. "type": "string"
  350. }
  351. }
  352. ],
  353. "summary": "Write log",
  354. "description": "Write a log entry to the server logs with specified level and metadata.",
  355. "responses": {
  356. "200": {
  357. "description": "Log entry written successfully",
  358. "content": {
  359. "application/json": {
  360. "schema": {
  361. "type": "boolean"
  362. }
  363. }
  364. }
  365. },
  366. "400": {
  367. "description": "Bad request",
  368. "content": {
  369. "application/json": {
  370. "schema": {
  371. "$ref": "#/components/schemas/BadRequestError"
  372. }
  373. }
  374. }
  375. }
  376. },
  377. "requestBody": {
  378. "content": {
  379. "application/json": {
  380. "schema": {
  381. "type": "object",
  382. "properties": {
  383. "service": {
  384. "description": "Service name for the log entry",
  385. "type": "string"
  386. },
  387. "level": {
  388. "description": "Log level",
  389. "type": "string",
  390. "enum": ["debug", "info", "error", "warn"]
  391. },
  392. "message": {
  393. "description": "Log message",
  394. "type": "string"
  395. },
  396. "extra": {
  397. "description": "Additional metadata for the log entry",
  398. "type": "object",
  399. "propertyNames": {
  400. "type": "string"
  401. },
  402. "additionalProperties": {}
  403. }
  404. },
  405. "required": ["service", "level", "message"]
  406. }
  407. }
  408. }
  409. },
  410. "x-codeSamples": [
  411. {
  412. "lang": "js",
  413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  414. }
  415. ]
  416. }
  417. },
  418. "/experimental/workspace/adaptor": {
  419. "get": {
  420. "operationId": "experimental.workspace.adaptor.list",
  421. "parameters": [
  422. {
  423. "in": "query",
  424. "name": "directory",
  425. "schema": {
  426. "type": "string"
  427. }
  428. },
  429. {
  430. "in": "query",
  431. "name": "workspace",
  432. "schema": {
  433. "type": "string"
  434. }
  435. }
  436. ],
  437. "summary": "List workspace adaptors",
  438. "description": "List all available workspace adaptors for the current project.",
  439. "responses": {
  440. "200": {
  441. "description": "Workspace adaptors",
  442. "content": {
  443. "application/json": {
  444. "schema": {
  445. "type": "array",
  446. "items": {
  447. "type": "object",
  448. "properties": {
  449. "type": {
  450. "type": "string"
  451. },
  452. "name": {
  453. "type": "string"
  454. },
  455. "description": {
  456. "type": "string"
  457. }
  458. },
  459. "required": ["type", "name", "description"]
  460. }
  461. }
  462. }
  463. }
  464. }
  465. },
  466. "x-codeSamples": [
  467. {
  468. "lang": "js",
  469. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adaptor.list({\n ...\n})"
  470. }
  471. ]
  472. }
  473. },
  474. "/experimental/workspace": {
  475. "post": {
  476. "operationId": "experimental.workspace.create",
  477. "parameters": [
  478. {
  479. "in": "query",
  480. "name": "directory",
  481. "schema": {
  482. "type": "string"
  483. }
  484. },
  485. {
  486. "in": "query",
  487. "name": "workspace",
  488. "schema": {
  489. "type": "string"
  490. }
  491. }
  492. ],
  493. "summary": "Create workspace",
  494. "description": "Create a workspace for the current project.",
  495. "responses": {
  496. "200": {
  497. "description": "Workspace created",
  498. "content": {
  499. "application/json": {
  500. "schema": {
  501. "$ref": "#/components/schemas/Workspace"
  502. }
  503. }
  504. }
  505. },
  506. "400": {
  507. "description": "Bad request",
  508. "content": {
  509. "application/json": {
  510. "schema": {
  511. "$ref": "#/components/schemas/BadRequestError"
  512. }
  513. }
  514. }
  515. }
  516. },
  517. "requestBody": {
  518. "content": {
  519. "application/json": {
  520. "schema": {
  521. "type": "object",
  522. "properties": {
  523. "id": {
  524. "type": "string",
  525. "pattern": "^wrk.*"
  526. },
  527. "type": {
  528. "type": "string"
  529. },
  530. "branch": {
  531. "anyOf": [
  532. {
  533. "type": "string"
  534. },
  535. {
  536. "type": "null"
  537. }
  538. ]
  539. },
  540. "extra": {
  541. "anyOf": [
  542. {},
  543. {
  544. "type": "null"
  545. }
  546. ]
  547. }
  548. },
  549. "required": ["type", "branch", "extra"]
  550. }
  551. }
  552. }
  553. },
  554. "x-codeSamples": [
  555. {
  556. "lang": "js",
  557. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  558. }
  559. ]
  560. },
  561. "get": {
  562. "operationId": "experimental.workspace.list",
  563. "parameters": [
  564. {
  565. "in": "query",
  566. "name": "directory",
  567. "schema": {
  568. "type": "string"
  569. }
  570. },
  571. {
  572. "in": "query",
  573. "name": "workspace",
  574. "schema": {
  575. "type": "string"
  576. }
  577. }
  578. ],
  579. "summary": "List workspaces",
  580. "description": "List all workspaces.",
  581. "responses": {
  582. "200": {
  583. "description": "Workspaces",
  584. "content": {
  585. "application/json": {
  586. "schema": {
  587. "type": "array",
  588. "items": {
  589. "$ref": "#/components/schemas/Workspace"
  590. }
  591. }
  592. }
  593. }
  594. }
  595. },
  596. "x-codeSamples": [
  597. {
  598. "lang": "js",
  599. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  600. }
  601. ]
  602. }
  603. },
  604. "/experimental/workspace/status": {
  605. "get": {
  606. "operationId": "experimental.workspace.status",
  607. "parameters": [
  608. {
  609. "in": "query",
  610. "name": "directory",
  611. "schema": {
  612. "type": "string"
  613. }
  614. },
  615. {
  616. "in": "query",
  617. "name": "workspace",
  618. "schema": {
  619. "type": "string"
  620. }
  621. }
  622. ],
  623. "summary": "Workspace status",
  624. "description": "Get connection status for workspaces in the current project.",
  625. "responses": {
  626. "200": {
  627. "description": "Workspace status",
  628. "content": {
  629. "application/json": {
  630. "schema": {
  631. "type": "array",
  632. "items": {
  633. "type": "object",
  634. "properties": {
  635. "workspaceID": {
  636. "type": "string",
  637. "pattern": "^wrk.*"
  638. },
  639. "status": {
  640. "type": "string",
  641. "enum": ["connected", "connecting", "disconnected", "error"]
  642. }
  643. },
  644. "required": ["workspaceID", "status"]
  645. }
  646. }
  647. }
  648. }
  649. }
  650. },
  651. "x-codeSamples": [
  652. {
  653. "lang": "js",
  654. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  655. }
  656. ]
  657. }
  658. },
  659. "/experimental/workspace/{id}": {
  660. "delete": {
  661. "operationId": "experimental.workspace.remove",
  662. "parameters": [
  663. {
  664. "in": "query",
  665. "name": "directory",
  666. "schema": {
  667. "type": "string"
  668. }
  669. },
  670. {
  671. "in": "query",
  672. "name": "workspace",
  673. "schema": {
  674. "type": "string"
  675. }
  676. },
  677. {
  678. "in": "path",
  679. "name": "id",
  680. "schema": {
  681. "type": "string",
  682. "pattern": "^wrk.*"
  683. },
  684. "required": true
  685. }
  686. ],
  687. "summary": "Remove workspace",
  688. "description": "Remove an existing workspace.",
  689. "responses": {
  690. "200": {
  691. "description": "Workspace removed",
  692. "content": {
  693. "application/json": {
  694. "schema": {
  695. "$ref": "#/components/schemas/Workspace"
  696. }
  697. }
  698. }
  699. },
  700. "400": {
  701. "description": "Bad request",
  702. "content": {
  703. "application/json": {
  704. "schema": {
  705. "$ref": "#/components/schemas/BadRequestError"
  706. }
  707. }
  708. }
  709. }
  710. },
  711. "x-codeSamples": [
  712. {
  713. "lang": "js",
  714. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  715. }
  716. ]
  717. }
  718. },
  719. "/experimental/workspace/{id}/session-restore": {
  720. "post": {
  721. "operationId": "experimental.workspace.sessionRestore",
  722. "parameters": [
  723. {
  724. "in": "query",
  725. "name": "directory",
  726. "schema": {
  727. "type": "string"
  728. }
  729. },
  730. {
  731. "in": "query",
  732. "name": "workspace",
  733. "schema": {
  734. "type": "string"
  735. }
  736. },
  737. {
  738. "in": "path",
  739. "name": "id",
  740. "schema": {
  741. "type": "string",
  742. "pattern": "^wrk.*"
  743. },
  744. "required": true
  745. }
  746. ],
  747. "summary": "Restore session into workspace",
  748. "description": "Replay a session's sync events into the target workspace in batches.",
  749. "responses": {
  750. "200": {
  751. "description": "Session replay started",
  752. "content": {
  753. "application/json": {
  754. "schema": {
  755. "type": "object",
  756. "properties": {
  757. "total": {
  758. "type": "integer",
  759. "minimum": 0,
  760. "maximum": 9007199254740991
  761. }
  762. },
  763. "required": ["total"]
  764. }
  765. }
  766. }
  767. },
  768. "400": {
  769. "description": "Bad request",
  770. "content": {
  771. "application/json": {
  772. "schema": {
  773. "$ref": "#/components/schemas/BadRequestError"
  774. }
  775. }
  776. }
  777. }
  778. },
  779. "requestBody": {
  780. "content": {
  781. "application/json": {
  782. "schema": {
  783. "type": "object",
  784. "properties": {
  785. "sessionID": {
  786. "type": "string",
  787. "pattern": "^ses.*"
  788. }
  789. },
  790. "required": ["sessionID"]
  791. }
  792. }
  793. }
  794. },
  795. "x-codeSamples": [
  796. {
  797. "lang": "js",
  798. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.sessionRestore({\n ...\n})"
  799. }
  800. ]
  801. }
  802. },
  803. "/project": {
  804. "get": {
  805. "operationId": "project.list",
  806. "parameters": [
  807. {
  808. "in": "query",
  809. "name": "directory",
  810. "schema": {
  811. "type": "string"
  812. }
  813. },
  814. {
  815. "in": "query",
  816. "name": "workspace",
  817. "schema": {
  818. "type": "string"
  819. }
  820. }
  821. ],
  822. "summary": "List all projects",
  823. "description": "Get a list of projects that have been opened with OpenCode.",
  824. "responses": {
  825. "200": {
  826. "description": "List of projects",
  827. "content": {
  828. "application/json": {
  829. "schema": {
  830. "type": "array",
  831. "items": {
  832. "$ref": "#/components/schemas/Project"
  833. }
  834. }
  835. }
  836. }
  837. }
  838. },
  839. "x-codeSamples": [
  840. {
  841. "lang": "js",
  842. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  843. }
  844. ]
  845. }
  846. },
  847. "/project/current": {
  848. "get": {
  849. "operationId": "project.current",
  850. "parameters": [
  851. {
  852. "in": "query",
  853. "name": "directory",
  854. "schema": {
  855. "type": "string"
  856. }
  857. },
  858. {
  859. "in": "query",
  860. "name": "workspace",
  861. "schema": {
  862. "type": "string"
  863. }
  864. }
  865. ],
  866. "summary": "Get current project",
  867. "description": "Retrieve the currently active project that OpenCode is working with.",
  868. "responses": {
  869. "200": {
  870. "description": "Current project information",
  871. "content": {
  872. "application/json": {
  873. "schema": {
  874. "$ref": "#/components/schemas/Project"
  875. }
  876. }
  877. }
  878. }
  879. },
  880. "x-codeSamples": [
  881. {
  882. "lang": "js",
  883. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  884. }
  885. ]
  886. }
  887. },
  888. "/project/git/init": {
  889. "post": {
  890. "operationId": "project.initGit",
  891. "parameters": [
  892. {
  893. "in": "query",
  894. "name": "directory",
  895. "schema": {
  896. "type": "string"
  897. }
  898. },
  899. {
  900. "in": "query",
  901. "name": "workspace",
  902. "schema": {
  903. "type": "string"
  904. }
  905. }
  906. ],
  907. "summary": "Initialize git repository",
  908. "description": "Create a git repository for the current project and return the refreshed project info.",
  909. "responses": {
  910. "200": {
  911. "description": "Project information after git initialization",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/Project"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "x-codeSamples": [
  922. {
  923. "lang": "js",
  924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  925. }
  926. ]
  927. }
  928. },
  929. "/project/{projectID}": {
  930. "patch": {
  931. "operationId": "project.update",
  932. "parameters": [
  933. {
  934. "in": "query",
  935. "name": "directory",
  936. "schema": {
  937. "type": "string"
  938. }
  939. },
  940. {
  941. "in": "query",
  942. "name": "workspace",
  943. "schema": {
  944. "type": "string"
  945. }
  946. },
  947. {
  948. "in": "path",
  949. "name": "projectID",
  950. "schema": {
  951. "type": "string"
  952. },
  953. "required": true
  954. }
  955. ],
  956. "summary": "Update project",
  957. "description": "Update project properties such as name, icon, and commands.",
  958. "responses": {
  959. "200": {
  960. "description": "Updated project information",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/Project"
  965. }
  966. }
  967. }
  968. },
  969. "400": {
  970. "description": "Bad request",
  971. "content": {
  972. "application/json": {
  973. "schema": {
  974. "$ref": "#/components/schemas/BadRequestError"
  975. }
  976. }
  977. }
  978. },
  979. "404": {
  980. "description": "Not found",
  981. "content": {
  982. "application/json": {
  983. "schema": {
  984. "$ref": "#/components/schemas/NotFoundError"
  985. }
  986. }
  987. }
  988. }
  989. },
  990. "requestBody": {
  991. "content": {
  992. "application/json": {
  993. "schema": {
  994. "type": "object",
  995. "properties": {
  996. "name": {
  997. "type": "string"
  998. },
  999. "icon": {
  1000. "type": "object",
  1001. "properties": {
  1002. "url": {
  1003. "type": "string"
  1004. },
  1005. "override": {
  1006. "type": "string"
  1007. },
  1008. "color": {
  1009. "type": "string"
  1010. }
  1011. }
  1012. },
  1013. "commands": {
  1014. "type": "object",
  1015. "properties": {
  1016. "start": {
  1017. "description": "Startup script to run when creating a new workspace (worktree)",
  1018. "type": "string"
  1019. }
  1020. }
  1021. }
  1022. }
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "x-codeSamples": [
  1028. {
  1029. "lang": "js",
  1030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  1031. }
  1032. ]
  1033. }
  1034. },
  1035. "/pty": {
  1036. "get": {
  1037. "operationId": "pty.list",
  1038. "parameters": [
  1039. {
  1040. "in": "query",
  1041. "name": "directory",
  1042. "schema": {
  1043. "type": "string"
  1044. }
  1045. },
  1046. {
  1047. "in": "query",
  1048. "name": "workspace",
  1049. "schema": {
  1050. "type": "string"
  1051. }
  1052. }
  1053. ],
  1054. "summary": "List PTY sessions",
  1055. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  1056. "responses": {
  1057. "200": {
  1058. "description": "List of sessions",
  1059. "content": {
  1060. "application/json": {
  1061. "schema": {
  1062. "type": "array",
  1063. "items": {
  1064. "$ref": "#/components/schemas/Pty"
  1065. }
  1066. }
  1067. }
  1068. }
  1069. }
  1070. },
  1071. "x-codeSamples": [
  1072. {
  1073. "lang": "js",
  1074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  1075. }
  1076. ]
  1077. },
  1078. "post": {
  1079. "operationId": "pty.create",
  1080. "parameters": [
  1081. {
  1082. "in": "query",
  1083. "name": "directory",
  1084. "schema": {
  1085. "type": "string"
  1086. }
  1087. },
  1088. {
  1089. "in": "query",
  1090. "name": "workspace",
  1091. "schema": {
  1092. "type": "string"
  1093. }
  1094. }
  1095. ],
  1096. "summary": "Create PTY session",
  1097. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  1098. "responses": {
  1099. "200": {
  1100. "description": "Created session",
  1101. "content": {
  1102. "application/json": {
  1103. "schema": {
  1104. "$ref": "#/components/schemas/Pty"
  1105. }
  1106. }
  1107. }
  1108. },
  1109. "400": {
  1110. "description": "Bad request",
  1111. "content": {
  1112. "application/json": {
  1113. "schema": {
  1114. "$ref": "#/components/schemas/BadRequestError"
  1115. }
  1116. }
  1117. }
  1118. }
  1119. },
  1120. "requestBody": {
  1121. "content": {
  1122. "application/json": {
  1123. "schema": {
  1124. "type": "object",
  1125. "properties": {
  1126. "command": {
  1127. "type": "string"
  1128. },
  1129. "args": {
  1130. "type": "array",
  1131. "items": {
  1132. "type": "string"
  1133. }
  1134. },
  1135. "cwd": {
  1136. "type": "string"
  1137. },
  1138. "title": {
  1139. "type": "string"
  1140. },
  1141. "env": {
  1142. "type": "object",
  1143. "propertyNames": {
  1144. "type": "string"
  1145. },
  1146. "additionalProperties": {
  1147. "type": "string"
  1148. }
  1149. }
  1150. }
  1151. }
  1152. }
  1153. }
  1154. },
  1155. "x-codeSamples": [
  1156. {
  1157. "lang": "js",
  1158. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  1159. }
  1160. ]
  1161. }
  1162. },
  1163. "/pty/{ptyID}": {
  1164. "get": {
  1165. "operationId": "pty.get",
  1166. "parameters": [
  1167. {
  1168. "in": "query",
  1169. "name": "directory",
  1170. "schema": {
  1171. "type": "string"
  1172. }
  1173. },
  1174. {
  1175. "in": "query",
  1176. "name": "workspace",
  1177. "schema": {
  1178. "type": "string"
  1179. }
  1180. },
  1181. {
  1182. "in": "path",
  1183. "name": "ptyID",
  1184. "schema": {
  1185. "type": "string",
  1186. "pattern": "^pty.*"
  1187. },
  1188. "required": true
  1189. }
  1190. ],
  1191. "summary": "Get PTY session",
  1192. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  1193. "responses": {
  1194. "200": {
  1195. "description": "Session info",
  1196. "content": {
  1197. "application/json": {
  1198. "schema": {
  1199. "$ref": "#/components/schemas/Pty"
  1200. }
  1201. }
  1202. }
  1203. },
  1204. "404": {
  1205. "description": "Not found",
  1206. "content": {
  1207. "application/json": {
  1208. "schema": {
  1209. "$ref": "#/components/schemas/NotFoundError"
  1210. }
  1211. }
  1212. }
  1213. }
  1214. },
  1215. "x-codeSamples": [
  1216. {
  1217. "lang": "js",
  1218. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  1219. }
  1220. ]
  1221. },
  1222. "put": {
  1223. "operationId": "pty.update",
  1224. "parameters": [
  1225. {
  1226. "in": "query",
  1227. "name": "directory",
  1228. "schema": {
  1229. "type": "string"
  1230. }
  1231. },
  1232. {
  1233. "in": "query",
  1234. "name": "workspace",
  1235. "schema": {
  1236. "type": "string"
  1237. }
  1238. },
  1239. {
  1240. "in": "path",
  1241. "name": "ptyID",
  1242. "schema": {
  1243. "type": "string",
  1244. "pattern": "^pty.*"
  1245. },
  1246. "required": true
  1247. }
  1248. ],
  1249. "summary": "Update PTY session",
  1250. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  1251. "responses": {
  1252. "200": {
  1253. "description": "Updated session",
  1254. "content": {
  1255. "application/json": {
  1256. "schema": {
  1257. "$ref": "#/components/schemas/Pty"
  1258. }
  1259. }
  1260. }
  1261. },
  1262. "400": {
  1263. "description": "Bad request",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/BadRequestError"
  1268. }
  1269. }
  1270. }
  1271. }
  1272. },
  1273. "requestBody": {
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "type": "object",
  1278. "properties": {
  1279. "title": {
  1280. "type": "string"
  1281. },
  1282. "size": {
  1283. "type": "object",
  1284. "properties": {
  1285. "rows": {
  1286. "type": "number"
  1287. },
  1288. "cols": {
  1289. "type": "number"
  1290. }
  1291. },
  1292. "required": ["rows", "cols"]
  1293. }
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "x-codeSamples": [
  1300. {
  1301. "lang": "js",
  1302. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  1303. }
  1304. ]
  1305. },
  1306. "delete": {
  1307. "operationId": "pty.remove",
  1308. "parameters": [
  1309. {
  1310. "in": "query",
  1311. "name": "directory",
  1312. "schema": {
  1313. "type": "string"
  1314. }
  1315. },
  1316. {
  1317. "in": "query",
  1318. "name": "workspace",
  1319. "schema": {
  1320. "type": "string"
  1321. }
  1322. },
  1323. {
  1324. "in": "path",
  1325. "name": "ptyID",
  1326. "schema": {
  1327. "type": "string",
  1328. "pattern": "^pty.*"
  1329. },
  1330. "required": true
  1331. }
  1332. ],
  1333. "summary": "Remove PTY session",
  1334. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  1335. "responses": {
  1336. "200": {
  1337. "description": "Session removed",
  1338. "content": {
  1339. "application/json": {
  1340. "schema": {
  1341. "type": "boolean"
  1342. }
  1343. }
  1344. }
  1345. },
  1346. "404": {
  1347. "description": "Not found",
  1348. "content": {
  1349. "application/json": {
  1350. "schema": {
  1351. "$ref": "#/components/schemas/NotFoundError"
  1352. }
  1353. }
  1354. }
  1355. }
  1356. },
  1357. "x-codeSamples": [
  1358. {
  1359. "lang": "js",
  1360. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  1361. }
  1362. ]
  1363. }
  1364. },
  1365. "/pty/{ptyID}/connect": {
  1366. "get": {
  1367. "operationId": "pty.connect",
  1368. "parameters": [
  1369. {
  1370. "in": "query",
  1371. "name": "directory",
  1372. "schema": {
  1373. "type": "string"
  1374. }
  1375. },
  1376. {
  1377. "in": "query",
  1378. "name": "workspace",
  1379. "schema": {
  1380. "type": "string"
  1381. }
  1382. },
  1383. {
  1384. "in": "path",
  1385. "name": "ptyID",
  1386. "schema": {
  1387. "type": "string",
  1388. "pattern": "^pty.*"
  1389. },
  1390. "required": true
  1391. }
  1392. ],
  1393. "summary": "Connect to PTY session",
  1394. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  1395. "responses": {
  1396. "200": {
  1397. "description": "Connected session",
  1398. "content": {
  1399. "application/json": {
  1400. "schema": {
  1401. "type": "boolean"
  1402. }
  1403. }
  1404. }
  1405. },
  1406. "404": {
  1407. "description": "Not found",
  1408. "content": {
  1409. "application/json": {
  1410. "schema": {
  1411. "$ref": "#/components/schemas/NotFoundError"
  1412. }
  1413. }
  1414. }
  1415. }
  1416. },
  1417. "x-codeSamples": [
  1418. {
  1419. "lang": "js",
  1420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  1421. }
  1422. ]
  1423. }
  1424. },
  1425. "/config": {
  1426. "get": {
  1427. "operationId": "config.get",
  1428. "parameters": [
  1429. {
  1430. "in": "query",
  1431. "name": "directory",
  1432. "schema": {
  1433. "type": "string"
  1434. }
  1435. },
  1436. {
  1437. "in": "query",
  1438. "name": "workspace",
  1439. "schema": {
  1440. "type": "string"
  1441. }
  1442. }
  1443. ],
  1444. "summary": "Get configuration",
  1445. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  1446. "responses": {
  1447. "200": {
  1448. "description": "Get config info",
  1449. "content": {
  1450. "application/json": {
  1451. "schema": {
  1452. "$ref": "#/components/schemas/Config"
  1453. }
  1454. }
  1455. }
  1456. }
  1457. },
  1458. "x-codeSamples": [
  1459. {
  1460. "lang": "js",
  1461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  1462. }
  1463. ]
  1464. },
  1465. "patch": {
  1466. "operationId": "config.update",
  1467. "parameters": [
  1468. {
  1469. "in": "query",
  1470. "name": "directory",
  1471. "schema": {
  1472. "type": "string"
  1473. }
  1474. },
  1475. {
  1476. "in": "query",
  1477. "name": "workspace",
  1478. "schema": {
  1479. "type": "string"
  1480. }
  1481. }
  1482. ],
  1483. "summary": "Update configuration",
  1484. "description": "Update OpenCode configuration settings and preferences.",
  1485. "responses": {
  1486. "200": {
  1487. "description": "Successfully updated config",
  1488. "content": {
  1489. "application/json": {
  1490. "schema": {
  1491. "$ref": "#/components/schemas/Config"
  1492. }
  1493. }
  1494. }
  1495. },
  1496. "400": {
  1497. "description": "Bad request",
  1498. "content": {
  1499. "application/json": {
  1500. "schema": {
  1501. "$ref": "#/components/schemas/BadRequestError"
  1502. }
  1503. }
  1504. }
  1505. }
  1506. },
  1507. "requestBody": {
  1508. "content": {
  1509. "application/json": {
  1510. "schema": {
  1511. "$ref": "#/components/schemas/Config"
  1512. }
  1513. }
  1514. }
  1515. },
  1516. "x-codeSamples": [
  1517. {
  1518. "lang": "js",
  1519. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  1520. }
  1521. ]
  1522. }
  1523. },
  1524. "/config/providers": {
  1525. "get": {
  1526. "operationId": "config.providers",
  1527. "parameters": [
  1528. {
  1529. "in": "query",
  1530. "name": "directory",
  1531. "schema": {
  1532. "type": "string"
  1533. }
  1534. },
  1535. {
  1536. "in": "query",
  1537. "name": "workspace",
  1538. "schema": {
  1539. "type": "string"
  1540. }
  1541. }
  1542. ],
  1543. "summary": "List config providers",
  1544. "description": "Get a list of all configured AI providers and their default models.",
  1545. "responses": {
  1546. "200": {
  1547. "description": "List of providers",
  1548. "content": {
  1549. "application/json": {
  1550. "schema": {
  1551. "type": "object",
  1552. "properties": {
  1553. "providers": {
  1554. "type": "array",
  1555. "items": {
  1556. "$ref": "#/components/schemas/Provider"
  1557. }
  1558. },
  1559. "default": {
  1560. "type": "object",
  1561. "propertyNames": {
  1562. "type": "string"
  1563. },
  1564. "additionalProperties": {
  1565. "type": "string"
  1566. }
  1567. }
  1568. },
  1569. "required": ["providers", "default"]
  1570. }
  1571. }
  1572. }
  1573. }
  1574. },
  1575. "x-codeSamples": [
  1576. {
  1577. "lang": "js",
  1578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  1579. }
  1580. ]
  1581. }
  1582. },
  1583. "/experimental/console": {
  1584. "get": {
  1585. "operationId": "experimental.console.get",
  1586. "parameters": [
  1587. {
  1588. "in": "query",
  1589. "name": "directory",
  1590. "schema": {
  1591. "type": "string"
  1592. }
  1593. },
  1594. {
  1595. "in": "query",
  1596. "name": "workspace",
  1597. "schema": {
  1598. "type": "string"
  1599. }
  1600. }
  1601. ],
  1602. "summary": "Get active Console provider metadata",
  1603. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  1604. "responses": {
  1605. "200": {
  1606. "description": "Active Console provider metadata",
  1607. "content": {
  1608. "application/json": {
  1609. "schema": {
  1610. "$ref": "#/components/schemas/ConsoleState"
  1611. }
  1612. }
  1613. }
  1614. }
  1615. },
  1616. "x-codeSamples": [
  1617. {
  1618. "lang": "js",
  1619. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  1620. }
  1621. ]
  1622. }
  1623. },
  1624. "/experimental/console/orgs": {
  1625. "get": {
  1626. "operationId": "experimental.console.listOrgs",
  1627. "parameters": [
  1628. {
  1629. "in": "query",
  1630. "name": "directory",
  1631. "schema": {
  1632. "type": "string"
  1633. }
  1634. },
  1635. {
  1636. "in": "query",
  1637. "name": "workspace",
  1638. "schema": {
  1639. "type": "string"
  1640. }
  1641. }
  1642. ],
  1643. "summary": "List switchable Console orgs",
  1644. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1645. "responses": {
  1646. "200": {
  1647. "description": "Switchable Console orgs",
  1648. "content": {
  1649. "application/json": {
  1650. "schema": {
  1651. "type": "object",
  1652. "properties": {
  1653. "orgs": {
  1654. "type": "array",
  1655. "items": {
  1656. "type": "object",
  1657. "properties": {
  1658. "accountID": {
  1659. "type": "string"
  1660. },
  1661. "accountEmail": {
  1662. "type": "string"
  1663. },
  1664. "accountUrl": {
  1665. "type": "string"
  1666. },
  1667. "orgID": {
  1668. "type": "string"
  1669. },
  1670. "orgName": {
  1671. "type": "string"
  1672. },
  1673. "active": {
  1674. "type": "boolean"
  1675. }
  1676. },
  1677. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"]
  1678. }
  1679. }
  1680. },
  1681. "required": ["orgs"]
  1682. }
  1683. }
  1684. }
  1685. }
  1686. },
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/experimental/console/switch": {
  1696. "post": {
  1697. "operationId": "experimental.console.switchOrg",
  1698. "parameters": [
  1699. {
  1700. "in": "query",
  1701. "name": "directory",
  1702. "schema": {
  1703. "type": "string"
  1704. }
  1705. },
  1706. {
  1707. "in": "query",
  1708. "name": "workspace",
  1709. "schema": {
  1710. "type": "string"
  1711. }
  1712. }
  1713. ],
  1714. "summary": "Switch active Console org",
  1715. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1716. "responses": {
  1717. "200": {
  1718. "description": "Switch success",
  1719. "content": {
  1720. "application/json": {
  1721. "schema": {
  1722. "type": "boolean"
  1723. }
  1724. }
  1725. }
  1726. }
  1727. },
  1728. "requestBody": {
  1729. "content": {
  1730. "application/json": {
  1731. "schema": {
  1732. "type": "object",
  1733. "properties": {
  1734. "accountID": {
  1735. "type": "string"
  1736. },
  1737. "orgID": {
  1738. "type": "string"
  1739. }
  1740. },
  1741. "required": ["accountID", "orgID"]
  1742. }
  1743. }
  1744. }
  1745. },
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/experimental/tool/ids": {
  1755. "get": {
  1756. "operationId": "tool.ids",
  1757. "parameters": [
  1758. {
  1759. "in": "query",
  1760. "name": "directory",
  1761. "schema": {
  1762. "type": "string"
  1763. }
  1764. },
  1765. {
  1766. "in": "query",
  1767. "name": "workspace",
  1768. "schema": {
  1769. "type": "string"
  1770. }
  1771. }
  1772. ],
  1773. "summary": "List tool IDs",
  1774. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1775. "responses": {
  1776. "200": {
  1777. "description": "Tool IDs",
  1778. "content": {
  1779. "application/json": {
  1780. "schema": {
  1781. "$ref": "#/components/schemas/ToolIDs"
  1782. }
  1783. }
  1784. }
  1785. },
  1786. "400": {
  1787. "description": "Bad request",
  1788. "content": {
  1789. "application/json": {
  1790. "schema": {
  1791. "$ref": "#/components/schemas/BadRequestError"
  1792. }
  1793. }
  1794. }
  1795. }
  1796. },
  1797. "x-codeSamples": [
  1798. {
  1799. "lang": "js",
  1800. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1801. }
  1802. ]
  1803. }
  1804. },
  1805. "/experimental/tool": {
  1806. "get": {
  1807. "operationId": "tool.list",
  1808. "parameters": [
  1809. {
  1810. "in": "query",
  1811. "name": "directory",
  1812. "schema": {
  1813. "type": "string"
  1814. }
  1815. },
  1816. {
  1817. "in": "query",
  1818. "name": "workspace",
  1819. "schema": {
  1820. "type": "string"
  1821. }
  1822. },
  1823. {
  1824. "in": "query",
  1825. "name": "provider",
  1826. "schema": {
  1827. "type": "string"
  1828. },
  1829. "required": true
  1830. },
  1831. {
  1832. "in": "query",
  1833. "name": "model",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": true
  1838. }
  1839. ],
  1840. "summary": "List tools",
  1841. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1842. "responses": {
  1843. "200": {
  1844. "description": "Tools",
  1845. "content": {
  1846. "application/json": {
  1847. "schema": {
  1848. "$ref": "#/components/schemas/ToolList"
  1849. }
  1850. }
  1851. }
  1852. },
  1853. "400": {
  1854. "description": "Bad request",
  1855. "content": {
  1856. "application/json": {
  1857. "schema": {
  1858. "$ref": "#/components/schemas/BadRequestError"
  1859. }
  1860. }
  1861. }
  1862. }
  1863. },
  1864. "x-codeSamples": [
  1865. {
  1866. "lang": "js",
  1867. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1868. }
  1869. ]
  1870. }
  1871. },
  1872. "/experimental/worktree": {
  1873. "post": {
  1874. "operationId": "worktree.create",
  1875. "parameters": [
  1876. {
  1877. "in": "query",
  1878. "name": "directory",
  1879. "schema": {
  1880. "type": "string"
  1881. }
  1882. },
  1883. {
  1884. "in": "query",
  1885. "name": "workspace",
  1886. "schema": {
  1887. "type": "string"
  1888. }
  1889. }
  1890. ],
  1891. "summary": "Create worktree",
  1892. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1893. "responses": {
  1894. "200": {
  1895. "description": "Worktree created",
  1896. "content": {
  1897. "application/json": {
  1898. "schema": {
  1899. "$ref": "#/components/schemas/Worktree"
  1900. }
  1901. }
  1902. }
  1903. },
  1904. "400": {
  1905. "description": "Bad request",
  1906. "content": {
  1907. "application/json": {
  1908. "schema": {
  1909. "$ref": "#/components/schemas/BadRequestError"
  1910. }
  1911. }
  1912. }
  1913. }
  1914. },
  1915. "requestBody": {
  1916. "content": {
  1917. "application/json": {
  1918. "schema": {
  1919. "$ref": "#/components/schemas/WorktreeCreateInput"
  1920. }
  1921. }
  1922. }
  1923. },
  1924. "x-codeSamples": [
  1925. {
  1926. "lang": "js",
  1927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1928. }
  1929. ]
  1930. },
  1931. "get": {
  1932. "operationId": "worktree.list",
  1933. "parameters": [
  1934. {
  1935. "in": "query",
  1936. "name": "directory",
  1937. "schema": {
  1938. "type": "string"
  1939. }
  1940. },
  1941. {
  1942. "in": "query",
  1943. "name": "workspace",
  1944. "schema": {
  1945. "type": "string"
  1946. }
  1947. }
  1948. ],
  1949. "summary": "List worktrees",
  1950. "description": "List all sandbox worktrees for the current project.",
  1951. "responses": {
  1952. "200": {
  1953. "description": "List of worktree directories",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "type": "array",
  1958. "items": {
  1959. "type": "string"
  1960. }
  1961. }
  1962. }
  1963. }
  1964. }
  1965. },
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1970. }
  1971. ]
  1972. },
  1973. "delete": {
  1974. "operationId": "worktree.remove",
  1975. "parameters": [
  1976. {
  1977. "in": "query",
  1978. "name": "directory",
  1979. "schema": {
  1980. "type": "string"
  1981. }
  1982. },
  1983. {
  1984. "in": "query",
  1985. "name": "workspace",
  1986. "schema": {
  1987. "type": "string"
  1988. }
  1989. }
  1990. ],
  1991. "summary": "Remove worktree",
  1992. "description": "Remove a git worktree and delete its branch.",
  1993. "responses": {
  1994. "200": {
  1995. "description": "Worktree removed",
  1996. "content": {
  1997. "application/json": {
  1998. "schema": {
  1999. "type": "boolean"
  2000. }
  2001. }
  2002. }
  2003. },
  2004. "400": {
  2005. "description": "Bad request",
  2006. "content": {
  2007. "application/json": {
  2008. "schema": {
  2009. "$ref": "#/components/schemas/BadRequestError"
  2010. }
  2011. }
  2012. }
  2013. }
  2014. },
  2015. "requestBody": {
  2016. "content": {
  2017. "application/json": {
  2018. "schema": {
  2019. "$ref": "#/components/schemas/WorktreeRemoveInput"
  2020. }
  2021. }
  2022. }
  2023. },
  2024. "x-codeSamples": [
  2025. {
  2026. "lang": "js",
  2027. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  2028. }
  2029. ]
  2030. }
  2031. },
  2032. "/experimental/worktree/reset": {
  2033. "post": {
  2034. "operationId": "worktree.reset",
  2035. "parameters": [
  2036. {
  2037. "in": "query",
  2038. "name": "directory",
  2039. "schema": {
  2040. "type": "string"
  2041. }
  2042. },
  2043. {
  2044. "in": "query",
  2045. "name": "workspace",
  2046. "schema": {
  2047. "type": "string"
  2048. }
  2049. }
  2050. ],
  2051. "summary": "Reset worktree",
  2052. "description": "Reset a worktree branch to the primary default branch.",
  2053. "responses": {
  2054. "200": {
  2055. "description": "Worktree reset",
  2056. "content": {
  2057. "application/json": {
  2058. "schema": {
  2059. "type": "boolean"
  2060. }
  2061. }
  2062. }
  2063. },
  2064. "400": {
  2065. "description": "Bad request",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "$ref": "#/components/schemas/BadRequestError"
  2070. }
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "requestBody": {
  2076. "content": {
  2077. "application/json": {
  2078. "schema": {
  2079. "$ref": "#/components/schemas/WorktreeResetInput"
  2080. }
  2081. }
  2082. }
  2083. },
  2084. "x-codeSamples": [
  2085. {
  2086. "lang": "js",
  2087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  2088. }
  2089. ]
  2090. }
  2091. },
  2092. "/experimental/session": {
  2093. "get": {
  2094. "operationId": "experimental.session.list",
  2095. "parameters": [
  2096. {
  2097. "in": "query",
  2098. "name": "directory",
  2099. "schema": {
  2100. "type": "string"
  2101. },
  2102. "description": "Filter sessions by project directory"
  2103. },
  2104. {
  2105. "in": "query",
  2106. "name": "workspace",
  2107. "schema": {
  2108. "type": "string"
  2109. }
  2110. },
  2111. {
  2112. "in": "query",
  2113. "name": "roots",
  2114. "schema": {
  2115. "type": "boolean"
  2116. },
  2117. "description": "Only return root sessions (no parentID)"
  2118. },
  2119. {
  2120. "in": "query",
  2121. "name": "start",
  2122. "schema": {
  2123. "type": "number"
  2124. },
  2125. "description": "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
  2126. },
  2127. {
  2128. "in": "query",
  2129. "name": "cursor",
  2130. "schema": {
  2131. "type": "number"
  2132. },
  2133. "description": "Return sessions updated before this timestamp (milliseconds since epoch)"
  2134. },
  2135. {
  2136. "in": "query",
  2137. "name": "search",
  2138. "schema": {
  2139. "type": "string"
  2140. },
  2141. "description": "Filter sessions by title (case-insensitive)"
  2142. },
  2143. {
  2144. "in": "query",
  2145. "name": "limit",
  2146. "schema": {
  2147. "type": "number"
  2148. },
  2149. "description": "Maximum number of sessions to return"
  2150. },
  2151. {
  2152. "in": "query",
  2153. "name": "archived",
  2154. "schema": {
  2155. "type": "boolean"
  2156. },
  2157. "description": "Include archived sessions (default false)"
  2158. }
  2159. ],
  2160. "summary": "List sessions",
  2161. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  2162. "responses": {
  2163. "200": {
  2164. "description": "List of sessions",
  2165. "content": {
  2166. "application/json": {
  2167. "schema": {
  2168. "type": "array",
  2169. "items": {
  2170. "$ref": "#/components/schemas/GlobalSession"
  2171. }
  2172. }
  2173. }
  2174. }
  2175. }
  2176. },
  2177. "x-codeSamples": [
  2178. {
  2179. "lang": "js",
  2180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  2181. }
  2182. ]
  2183. }
  2184. },
  2185. "/experimental/resource": {
  2186. "get": {
  2187. "operationId": "experimental.resource.list",
  2188. "parameters": [
  2189. {
  2190. "in": "query",
  2191. "name": "directory",
  2192. "schema": {
  2193. "type": "string"
  2194. }
  2195. },
  2196. {
  2197. "in": "query",
  2198. "name": "workspace",
  2199. "schema": {
  2200. "type": "string"
  2201. }
  2202. }
  2203. ],
  2204. "summary": "Get MCP resources",
  2205. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  2206. "responses": {
  2207. "200": {
  2208. "description": "MCP resources",
  2209. "content": {
  2210. "application/json": {
  2211. "schema": {
  2212. "type": "object",
  2213. "propertyNames": {
  2214. "type": "string"
  2215. },
  2216. "additionalProperties": {
  2217. "$ref": "#/components/schemas/McpResource"
  2218. }
  2219. }
  2220. }
  2221. }
  2222. }
  2223. },
  2224. "x-codeSamples": [
  2225. {
  2226. "lang": "js",
  2227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  2228. }
  2229. ]
  2230. }
  2231. },
  2232. "/session": {
  2233. "get": {
  2234. "operationId": "session.list",
  2235. "parameters": [
  2236. {
  2237. "in": "query",
  2238. "name": "directory",
  2239. "schema": {
  2240. "type": "string"
  2241. },
  2242. "description": "Filter sessions by project directory"
  2243. },
  2244. {
  2245. "in": "query",
  2246. "name": "workspace",
  2247. "schema": {
  2248. "type": "string"
  2249. }
  2250. },
  2251. {
  2252. "in": "query",
  2253. "name": "roots",
  2254. "schema": {
  2255. "type": "boolean"
  2256. },
  2257. "description": "Only return root sessions (no parentID)"
  2258. },
  2259. {
  2260. "in": "query",
  2261. "name": "start",
  2262. "schema": {
  2263. "type": "number"
  2264. },
  2265. "description": "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
  2266. },
  2267. {
  2268. "in": "query",
  2269. "name": "search",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "description": "Filter sessions by title (case-insensitive)"
  2274. },
  2275. {
  2276. "in": "query",
  2277. "name": "limit",
  2278. "schema": {
  2279. "type": "number"
  2280. },
  2281. "description": "Maximum number of sessions to return"
  2282. }
  2283. ],
  2284. "summary": "List sessions",
  2285. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  2286. "responses": {
  2287. "200": {
  2288. "description": "List of sessions",
  2289. "content": {
  2290. "application/json": {
  2291. "schema": {
  2292. "type": "array",
  2293. "items": {
  2294. "$ref": "#/components/schemas/Session"
  2295. }
  2296. }
  2297. }
  2298. }
  2299. }
  2300. },
  2301. "x-codeSamples": [
  2302. {
  2303. "lang": "js",
  2304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  2305. }
  2306. ]
  2307. },
  2308. "post": {
  2309. "operationId": "session.create",
  2310. "parameters": [
  2311. {
  2312. "in": "query",
  2313. "name": "directory",
  2314. "schema": {
  2315. "type": "string"
  2316. }
  2317. },
  2318. {
  2319. "in": "query",
  2320. "name": "workspace",
  2321. "schema": {
  2322. "type": "string"
  2323. }
  2324. }
  2325. ],
  2326. "summary": "Create session",
  2327. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  2328. "responses": {
  2329. "200": {
  2330. "description": "Successfully created session",
  2331. "content": {
  2332. "application/json": {
  2333. "schema": {
  2334. "$ref": "#/components/schemas/Session"
  2335. }
  2336. }
  2337. }
  2338. },
  2339. "400": {
  2340. "description": "Bad request",
  2341. "content": {
  2342. "application/json": {
  2343. "schema": {
  2344. "$ref": "#/components/schemas/BadRequestError"
  2345. }
  2346. }
  2347. }
  2348. }
  2349. },
  2350. "requestBody": {
  2351. "content": {
  2352. "application/json": {
  2353. "schema": {
  2354. "type": "object",
  2355. "properties": {
  2356. "parentID": {
  2357. "type": "string",
  2358. "pattern": "^ses.*"
  2359. },
  2360. "title": {
  2361. "type": "string"
  2362. },
  2363. "permission": {
  2364. "$ref": "#/components/schemas/PermissionRuleset"
  2365. },
  2366. "workspaceID": {
  2367. "type": "string",
  2368. "pattern": "^wrk.*"
  2369. }
  2370. }
  2371. }
  2372. }
  2373. }
  2374. },
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/session/status": {
  2384. "get": {
  2385. "operationId": "session.status",
  2386. "parameters": [
  2387. {
  2388. "in": "query",
  2389. "name": "directory",
  2390. "schema": {
  2391. "type": "string"
  2392. }
  2393. },
  2394. {
  2395. "in": "query",
  2396. "name": "workspace",
  2397. "schema": {
  2398. "type": "string"
  2399. }
  2400. }
  2401. ],
  2402. "summary": "Get session status",
  2403. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  2404. "responses": {
  2405. "200": {
  2406. "description": "Get session status",
  2407. "content": {
  2408. "application/json": {
  2409. "schema": {
  2410. "type": "object",
  2411. "propertyNames": {
  2412. "type": "string"
  2413. },
  2414. "additionalProperties": {
  2415. "$ref": "#/components/schemas/SessionStatus"
  2416. }
  2417. }
  2418. }
  2419. }
  2420. },
  2421. "400": {
  2422. "description": "Bad request",
  2423. "content": {
  2424. "application/json": {
  2425. "schema": {
  2426. "$ref": "#/components/schemas/BadRequestError"
  2427. }
  2428. }
  2429. }
  2430. }
  2431. },
  2432. "x-codeSamples": [
  2433. {
  2434. "lang": "js",
  2435. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  2436. }
  2437. ]
  2438. }
  2439. },
  2440. "/session/{sessionID}": {
  2441. "get": {
  2442. "operationId": "session.get",
  2443. "parameters": [
  2444. {
  2445. "in": "query",
  2446. "name": "directory",
  2447. "schema": {
  2448. "type": "string"
  2449. }
  2450. },
  2451. {
  2452. "in": "query",
  2453. "name": "workspace",
  2454. "schema": {
  2455. "type": "string"
  2456. }
  2457. },
  2458. {
  2459. "in": "path",
  2460. "name": "sessionID",
  2461. "schema": {
  2462. "type": "string",
  2463. "pattern": "^ses.*"
  2464. },
  2465. "required": true
  2466. }
  2467. ],
  2468. "summary": "Get session",
  2469. "description": "Retrieve detailed information about a specific OpenCode session.",
  2470. "tags": ["Session"],
  2471. "responses": {
  2472. "200": {
  2473. "description": "Get session",
  2474. "content": {
  2475. "application/json": {
  2476. "schema": {
  2477. "$ref": "#/components/schemas/Session"
  2478. }
  2479. }
  2480. }
  2481. },
  2482. "400": {
  2483. "description": "Bad request",
  2484. "content": {
  2485. "application/json": {
  2486. "schema": {
  2487. "$ref": "#/components/schemas/BadRequestError"
  2488. }
  2489. }
  2490. }
  2491. },
  2492. "404": {
  2493. "description": "Not found",
  2494. "content": {
  2495. "application/json": {
  2496. "schema": {
  2497. "$ref": "#/components/schemas/NotFoundError"
  2498. }
  2499. }
  2500. }
  2501. }
  2502. },
  2503. "x-codeSamples": [
  2504. {
  2505. "lang": "js",
  2506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  2507. }
  2508. ]
  2509. },
  2510. "delete": {
  2511. "operationId": "session.delete",
  2512. "parameters": [
  2513. {
  2514. "in": "query",
  2515. "name": "directory",
  2516. "schema": {
  2517. "type": "string"
  2518. }
  2519. },
  2520. {
  2521. "in": "query",
  2522. "name": "workspace",
  2523. "schema": {
  2524. "type": "string"
  2525. }
  2526. },
  2527. {
  2528. "in": "path",
  2529. "name": "sessionID",
  2530. "schema": {
  2531. "type": "string",
  2532. "pattern": "^ses.*"
  2533. },
  2534. "required": true
  2535. }
  2536. ],
  2537. "summary": "Delete session",
  2538. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  2539. "responses": {
  2540. "200": {
  2541. "description": "Successfully deleted session",
  2542. "content": {
  2543. "application/json": {
  2544. "schema": {
  2545. "type": "boolean"
  2546. }
  2547. }
  2548. }
  2549. },
  2550. "400": {
  2551. "description": "Bad request",
  2552. "content": {
  2553. "application/json": {
  2554. "schema": {
  2555. "$ref": "#/components/schemas/BadRequestError"
  2556. }
  2557. }
  2558. }
  2559. },
  2560. "404": {
  2561. "description": "Not found",
  2562. "content": {
  2563. "application/json": {
  2564. "schema": {
  2565. "$ref": "#/components/schemas/NotFoundError"
  2566. }
  2567. }
  2568. }
  2569. }
  2570. },
  2571. "x-codeSamples": [
  2572. {
  2573. "lang": "js",
  2574. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  2575. }
  2576. ]
  2577. },
  2578. "patch": {
  2579. "operationId": "session.update",
  2580. "parameters": [
  2581. {
  2582. "in": "query",
  2583. "name": "directory",
  2584. "schema": {
  2585. "type": "string"
  2586. }
  2587. },
  2588. {
  2589. "in": "query",
  2590. "name": "workspace",
  2591. "schema": {
  2592. "type": "string"
  2593. }
  2594. },
  2595. {
  2596. "in": "path",
  2597. "name": "sessionID",
  2598. "schema": {
  2599. "type": "string",
  2600. "pattern": "^ses.*"
  2601. },
  2602. "required": true
  2603. }
  2604. ],
  2605. "summary": "Update session",
  2606. "description": "Update properties of an existing session, such as title or other metadata.",
  2607. "responses": {
  2608. "200": {
  2609. "description": "Successfully updated session",
  2610. "content": {
  2611. "application/json": {
  2612. "schema": {
  2613. "$ref": "#/components/schemas/Session"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "Bad request",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "$ref": "#/components/schemas/BadRequestError"
  2624. }
  2625. }
  2626. }
  2627. },
  2628. "404": {
  2629. "description": "Not found",
  2630. "content": {
  2631. "application/json": {
  2632. "schema": {
  2633. "$ref": "#/components/schemas/NotFoundError"
  2634. }
  2635. }
  2636. }
  2637. }
  2638. },
  2639. "requestBody": {
  2640. "content": {
  2641. "application/json": {
  2642. "schema": {
  2643. "type": "object",
  2644. "properties": {
  2645. "title": {
  2646. "type": "string"
  2647. },
  2648. "permission": {
  2649. "$ref": "#/components/schemas/PermissionRuleset"
  2650. },
  2651. "time": {
  2652. "type": "object",
  2653. "properties": {
  2654. "archived": {
  2655. "type": "number"
  2656. }
  2657. }
  2658. }
  2659. }
  2660. }
  2661. }
  2662. }
  2663. },
  2664. "x-codeSamples": [
  2665. {
  2666. "lang": "js",
  2667. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  2668. }
  2669. ]
  2670. }
  2671. },
  2672. "/session/{sessionID}/children": {
  2673. "get": {
  2674. "operationId": "session.children",
  2675. "parameters": [
  2676. {
  2677. "in": "query",
  2678. "name": "directory",
  2679. "schema": {
  2680. "type": "string"
  2681. }
  2682. },
  2683. {
  2684. "in": "query",
  2685. "name": "workspace",
  2686. "schema": {
  2687. "type": "string"
  2688. }
  2689. },
  2690. {
  2691. "in": "path",
  2692. "name": "sessionID",
  2693. "schema": {
  2694. "type": "string",
  2695. "pattern": "^ses.*"
  2696. },
  2697. "required": true
  2698. }
  2699. ],
  2700. "summary": "Get session children",
  2701. "tags": ["Session"],
  2702. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  2703. "responses": {
  2704. "200": {
  2705. "description": "List of children",
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "type": "array",
  2710. "items": {
  2711. "$ref": "#/components/schemas/Session"
  2712. }
  2713. }
  2714. }
  2715. }
  2716. },
  2717. "400": {
  2718. "description": "Bad request",
  2719. "content": {
  2720. "application/json": {
  2721. "schema": {
  2722. "$ref": "#/components/schemas/BadRequestError"
  2723. }
  2724. }
  2725. }
  2726. },
  2727. "404": {
  2728. "description": "Not found",
  2729. "content": {
  2730. "application/json": {
  2731. "schema": {
  2732. "$ref": "#/components/schemas/NotFoundError"
  2733. }
  2734. }
  2735. }
  2736. }
  2737. },
  2738. "x-codeSamples": [
  2739. {
  2740. "lang": "js",
  2741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  2742. }
  2743. ]
  2744. }
  2745. },
  2746. "/session/{sessionID}/todo": {
  2747. "get": {
  2748. "operationId": "session.todo",
  2749. "parameters": [
  2750. {
  2751. "in": "query",
  2752. "name": "directory",
  2753. "schema": {
  2754. "type": "string"
  2755. }
  2756. },
  2757. {
  2758. "in": "query",
  2759. "name": "workspace",
  2760. "schema": {
  2761. "type": "string"
  2762. }
  2763. },
  2764. {
  2765. "in": "path",
  2766. "name": "sessionID",
  2767. "schema": {
  2768. "type": "string",
  2769. "pattern": "^ses.*"
  2770. },
  2771. "required": true
  2772. }
  2773. ],
  2774. "summary": "Get session todos",
  2775. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  2776. "responses": {
  2777. "200": {
  2778. "description": "Todo list",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "type": "array",
  2783. "items": {
  2784. "$ref": "#/components/schemas/Todo"
  2785. }
  2786. }
  2787. }
  2788. }
  2789. },
  2790. "400": {
  2791. "description": "Bad request",
  2792. "content": {
  2793. "application/json": {
  2794. "schema": {
  2795. "$ref": "#/components/schemas/BadRequestError"
  2796. }
  2797. }
  2798. }
  2799. },
  2800. "404": {
  2801. "description": "Not found",
  2802. "content": {
  2803. "application/json": {
  2804. "schema": {
  2805. "$ref": "#/components/schemas/NotFoundError"
  2806. }
  2807. }
  2808. }
  2809. }
  2810. },
  2811. "x-codeSamples": [
  2812. {
  2813. "lang": "js",
  2814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  2815. }
  2816. ]
  2817. }
  2818. },
  2819. "/session/{sessionID}/init": {
  2820. "post": {
  2821. "operationId": "session.init",
  2822. "parameters": [
  2823. {
  2824. "in": "query",
  2825. "name": "directory",
  2826. "schema": {
  2827. "type": "string"
  2828. }
  2829. },
  2830. {
  2831. "in": "query",
  2832. "name": "workspace",
  2833. "schema": {
  2834. "type": "string"
  2835. }
  2836. },
  2837. {
  2838. "in": "path",
  2839. "name": "sessionID",
  2840. "schema": {
  2841. "type": "string",
  2842. "pattern": "^ses.*"
  2843. },
  2844. "required": true
  2845. }
  2846. ],
  2847. "summary": "Initialize session",
  2848. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  2849. "responses": {
  2850. "200": {
  2851. "description": "200",
  2852. "content": {
  2853. "application/json": {
  2854. "schema": {
  2855. "type": "boolean"
  2856. }
  2857. }
  2858. }
  2859. },
  2860. "400": {
  2861. "description": "Bad request",
  2862. "content": {
  2863. "application/json": {
  2864. "schema": {
  2865. "$ref": "#/components/schemas/BadRequestError"
  2866. }
  2867. }
  2868. }
  2869. },
  2870. "404": {
  2871. "description": "Not found",
  2872. "content": {
  2873. "application/json": {
  2874. "schema": {
  2875. "$ref": "#/components/schemas/NotFoundError"
  2876. }
  2877. }
  2878. }
  2879. }
  2880. },
  2881. "requestBody": {
  2882. "content": {
  2883. "application/json": {
  2884. "schema": {
  2885. "type": "object",
  2886. "properties": {
  2887. "modelID": {
  2888. "type": "string"
  2889. },
  2890. "providerID": {
  2891. "type": "string"
  2892. },
  2893. "messageID": {
  2894. "type": "string",
  2895. "pattern": "^msg.*"
  2896. }
  2897. },
  2898. "required": ["modelID", "providerID", "messageID"]
  2899. }
  2900. }
  2901. }
  2902. },
  2903. "x-codeSamples": [
  2904. {
  2905. "lang": "js",
  2906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  2907. }
  2908. ]
  2909. }
  2910. },
  2911. "/session/{sessionID}/fork": {
  2912. "post": {
  2913. "operationId": "session.fork",
  2914. "parameters": [
  2915. {
  2916. "in": "query",
  2917. "name": "directory",
  2918. "schema": {
  2919. "type": "string"
  2920. }
  2921. },
  2922. {
  2923. "in": "query",
  2924. "name": "workspace",
  2925. "schema": {
  2926. "type": "string"
  2927. }
  2928. },
  2929. {
  2930. "in": "path",
  2931. "name": "sessionID",
  2932. "schema": {
  2933. "type": "string",
  2934. "pattern": "^ses.*"
  2935. },
  2936. "required": true
  2937. }
  2938. ],
  2939. "summary": "Fork session",
  2940. "description": "Create a new session by forking an existing session at a specific message point.",
  2941. "responses": {
  2942. "200": {
  2943. "description": "200",
  2944. "content": {
  2945. "application/json": {
  2946. "schema": {
  2947. "$ref": "#/components/schemas/Session"
  2948. }
  2949. }
  2950. }
  2951. }
  2952. },
  2953. "requestBody": {
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "messageID": {
  2960. "type": "string",
  2961. "pattern": "^msg.*"
  2962. }
  2963. }
  2964. }
  2965. }
  2966. }
  2967. },
  2968. "x-codeSamples": [
  2969. {
  2970. "lang": "js",
  2971. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  2972. }
  2973. ]
  2974. }
  2975. },
  2976. "/session/{sessionID}/abort": {
  2977. "post": {
  2978. "operationId": "session.abort",
  2979. "parameters": [
  2980. {
  2981. "in": "query",
  2982. "name": "directory",
  2983. "schema": {
  2984. "type": "string"
  2985. }
  2986. },
  2987. {
  2988. "in": "query",
  2989. "name": "workspace",
  2990. "schema": {
  2991. "type": "string"
  2992. }
  2993. },
  2994. {
  2995. "in": "path",
  2996. "name": "sessionID",
  2997. "schema": {
  2998. "type": "string",
  2999. "pattern": "^ses.*"
  3000. },
  3001. "required": true
  3002. }
  3003. ],
  3004. "summary": "Abort session",
  3005. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  3006. "responses": {
  3007. "200": {
  3008. "description": "Aborted session",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "type": "boolean"
  3013. }
  3014. }
  3015. }
  3016. },
  3017. "400": {
  3018. "description": "Bad request",
  3019. "content": {
  3020. "application/json": {
  3021. "schema": {
  3022. "$ref": "#/components/schemas/BadRequestError"
  3023. }
  3024. }
  3025. }
  3026. },
  3027. "404": {
  3028. "description": "Not found",
  3029. "content": {
  3030. "application/json": {
  3031. "schema": {
  3032. "$ref": "#/components/schemas/NotFoundError"
  3033. }
  3034. }
  3035. }
  3036. }
  3037. },
  3038. "x-codeSamples": [
  3039. {
  3040. "lang": "js",
  3041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  3042. }
  3043. ]
  3044. }
  3045. },
  3046. "/session/{sessionID}/share": {
  3047. "post": {
  3048. "operationId": "session.share",
  3049. "parameters": [
  3050. {
  3051. "in": "query",
  3052. "name": "directory",
  3053. "schema": {
  3054. "type": "string"
  3055. }
  3056. },
  3057. {
  3058. "in": "query",
  3059. "name": "workspace",
  3060. "schema": {
  3061. "type": "string"
  3062. }
  3063. },
  3064. {
  3065. "in": "path",
  3066. "name": "sessionID",
  3067. "schema": {
  3068. "type": "string",
  3069. "pattern": "^ses.*"
  3070. },
  3071. "required": true
  3072. }
  3073. ],
  3074. "summary": "Share session",
  3075. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  3076. "responses": {
  3077. "200": {
  3078. "description": "Successfully shared session",
  3079. "content": {
  3080. "application/json": {
  3081. "schema": {
  3082. "$ref": "#/components/schemas/Session"
  3083. }
  3084. }
  3085. }
  3086. },
  3087. "400": {
  3088. "description": "Bad request",
  3089. "content": {
  3090. "application/json": {
  3091. "schema": {
  3092. "$ref": "#/components/schemas/BadRequestError"
  3093. }
  3094. }
  3095. }
  3096. },
  3097. "404": {
  3098. "description": "Not found",
  3099. "content": {
  3100. "application/json": {
  3101. "schema": {
  3102. "$ref": "#/components/schemas/NotFoundError"
  3103. }
  3104. }
  3105. }
  3106. }
  3107. },
  3108. "x-codeSamples": [
  3109. {
  3110. "lang": "js",
  3111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  3112. }
  3113. ]
  3114. },
  3115. "delete": {
  3116. "operationId": "session.unshare",
  3117. "parameters": [
  3118. {
  3119. "in": "query",
  3120. "name": "directory",
  3121. "schema": {
  3122. "type": "string"
  3123. }
  3124. },
  3125. {
  3126. "in": "query",
  3127. "name": "workspace",
  3128. "schema": {
  3129. "type": "string"
  3130. }
  3131. },
  3132. {
  3133. "in": "path",
  3134. "name": "sessionID",
  3135. "schema": {
  3136. "type": "string",
  3137. "pattern": "^ses.*"
  3138. },
  3139. "required": true
  3140. }
  3141. ],
  3142. "summary": "Unshare session",
  3143. "description": "Remove the shareable link for a session, making it private again.",
  3144. "responses": {
  3145. "200": {
  3146. "description": "Successfully unshared session",
  3147. "content": {
  3148. "application/json": {
  3149. "schema": {
  3150. "$ref": "#/components/schemas/Session"
  3151. }
  3152. }
  3153. }
  3154. },
  3155. "400": {
  3156. "description": "Bad request",
  3157. "content": {
  3158. "application/json": {
  3159. "schema": {
  3160. "$ref": "#/components/schemas/BadRequestError"
  3161. }
  3162. }
  3163. }
  3164. },
  3165. "404": {
  3166. "description": "Not found",
  3167. "content": {
  3168. "application/json": {
  3169. "schema": {
  3170. "$ref": "#/components/schemas/NotFoundError"
  3171. }
  3172. }
  3173. }
  3174. }
  3175. },
  3176. "x-codeSamples": [
  3177. {
  3178. "lang": "js",
  3179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  3180. }
  3181. ]
  3182. }
  3183. },
  3184. "/session/{sessionID}/diff": {
  3185. "get": {
  3186. "operationId": "session.diff",
  3187. "parameters": [
  3188. {
  3189. "in": "query",
  3190. "name": "directory",
  3191. "schema": {
  3192. "type": "string"
  3193. }
  3194. },
  3195. {
  3196. "in": "query",
  3197. "name": "workspace",
  3198. "schema": {
  3199. "type": "string"
  3200. }
  3201. },
  3202. {
  3203. "in": "path",
  3204. "name": "sessionID",
  3205. "schema": {
  3206. "type": "string",
  3207. "pattern": "^ses.*"
  3208. },
  3209. "required": true
  3210. },
  3211. {
  3212. "in": "query",
  3213. "name": "messageID",
  3214. "schema": {
  3215. "type": "string",
  3216. "pattern": "^msg.*"
  3217. }
  3218. }
  3219. ],
  3220. "summary": "Get message diff",
  3221. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  3222. "responses": {
  3223. "200": {
  3224. "description": "Successfully retrieved diff",
  3225. "content": {
  3226. "application/json": {
  3227. "schema": {
  3228. "type": "array",
  3229. "items": {
  3230. "$ref": "#/components/schemas/SnapshotFileDiff"
  3231. }
  3232. }
  3233. }
  3234. }
  3235. }
  3236. },
  3237. "x-codeSamples": [
  3238. {
  3239. "lang": "js",
  3240. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  3241. }
  3242. ]
  3243. }
  3244. },
  3245. "/session/{sessionID}/summarize": {
  3246. "post": {
  3247. "operationId": "session.summarize",
  3248. "parameters": [
  3249. {
  3250. "in": "query",
  3251. "name": "directory",
  3252. "schema": {
  3253. "type": "string"
  3254. }
  3255. },
  3256. {
  3257. "in": "query",
  3258. "name": "workspace",
  3259. "schema": {
  3260. "type": "string"
  3261. }
  3262. },
  3263. {
  3264. "in": "path",
  3265. "name": "sessionID",
  3266. "schema": {
  3267. "type": "string",
  3268. "pattern": "^ses.*"
  3269. },
  3270. "required": true
  3271. }
  3272. ],
  3273. "summary": "Summarize session",
  3274. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  3275. "responses": {
  3276. "200": {
  3277. "description": "Summarized session",
  3278. "content": {
  3279. "application/json": {
  3280. "schema": {
  3281. "type": "boolean"
  3282. }
  3283. }
  3284. }
  3285. },
  3286. "400": {
  3287. "description": "Bad request",
  3288. "content": {
  3289. "application/json": {
  3290. "schema": {
  3291. "$ref": "#/components/schemas/BadRequestError"
  3292. }
  3293. }
  3294. }
  3295. },
  3296. "404": {
  3297. "description": "Not found",
  3298. "content": {
  3299. "application/json": {
  3300. "schema": {
  3301. "$ref": "#/components/schemas/NotFoundError"
  3302. }
  3303. }
  3304. }
  3305. }
  3306. },
  3307. "requestBody": {
  3308. "content": {
  3309. "application/json": {
  3310. "schema": {
  3311. "type": "object",
  3312. "properties": {
  3313. "providerID": {
  3314. "type": "string"
  3315. },
  3316. "modelID": {
  3317. "type": "string"
  3318. },
  3319. "auto": {
  3320. "default": false,
  3321. "type": "boolean"
  3322. }
  3323. },
  3324. "required": ["providerID", "modelID"]
  3325. }
  3326. }
  3327. }
  3328. },
  3329. "x-codeSamples": [
  3330. {
  3331. "lang": "js",
  3332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  3333. }
  3334. ]
  3335. }
  3336. },
  3337. "/session/{sessionID}/message": {
  3338. "get": {
  3339. "operationId": "session.messages",
  3340. "parameters": [
  3341. {
  3342. "in": "query",
  3343. "name": "directory",
  3344. "schema": {
  3345. "type": "string"
  3346. }
  3347. },
  3348. {
  3349. "in": "query",
  3350. "name": "workspace",
  3351. "schema": {
  3352. "type": "string"
  3353. }
  3354. },
  3355. {
  3356. "in": "path",
  3357. "name": "sessionID",
  3358. "schema": {
  3359. "type": "string",
  3360. "pattern": "^ses.*"
  3361. },
  3362. "required": true
  3363. },
  3364. {
  3365. "in": "query",
  3366. "name": "limit",
  3367. "schema": {
  3368. "type": "integer",
  3369. "minimum": 0,
  3370. "maximum": 9007199254740991
  3371. },
  3372. "description": "Maximum number of messages to return"
  3373. },
  3374. {
  3375. "in": "query",
  3376. "name": "before",
  3377. "schema": {
  3378. "type": "string"
  3379. }
  3380. }
  3381. ],
  3382. "summary": "Get session messages",
  3383. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  3384. "responses": {
  3385. "200": {
  3386. "description": "List of messages",
  3387. "content": {
  3388. "application/json": {
  3389. "schema": {
  3390. "type": "array",
  3391. "items": {
  3392. "type": "object",
  3393. "properties": {
  3394. "info": {
  3395. "$ref": "#/components/schemas/Message"
  3396. },
  3397. "parts": {
  3398. "type": "array",
  3399. "items": {
  3400. "$ref": "#/components/schemas/Part"
  3401. }
  3402. }
  3403. },
  3404. "required": ["info", "parts"]
  3405. }
  3406. }
  3407. }
  3408. }
  3409. },
  3410. "400": {
  3411. "description": "Bad request",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/BadRequestError"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "404": {
  3421. "description": "Not found",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "$ref": "#/components/schemas/NotFoundError"
  3426. }
  3427. }
  3428. }
  3429. }
  3430. },
  3431. "x-codeSamples": [
  3432. {
  3433. "lang": "js",
  3434. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  3435. }
  3436. ]
  3437. },
  3438. "post": {
  3439. "operationId": "session.prompt",
  3440. "parameters": [
  3441. {
  3442. "in": "query",
  3443. "name": "directory",
  3444. "schema": {
  3445. "type": "string"
  3446. }
  3447. },
  3448. {
  3449. "in": "query",
  3450. "name": "workspace",
  3451. "schema": {
  3452. "type": "string"
  3453. }
  3454. },
  3455. {
  3456. "in": "path",
  3457. "name": "sessionID",
  3458. "schema": {
  3459. "type": "string",
  3460. "pattern": "^ses.*"
  3461. },
  3462. "required": true
  3463. }
  3464. ],
  3465. "summary": "Send message",
  3466. "description": "Create and send a new message to a session, streaming the AI response.",
  3467. "responses": {
  3468. "200": {
  3469. "description": "Created message",
  3470. "content": {
  3471. "application/json": {
  3472. "schema": {
  3473. "type": "object",
  3474. "properties": {
  3475. "info": {
  3476. "$ref": "#/components/schemas/AssistantMessage"
  3477. },
  3478. "parts": {
  3479. "type": "array",
  3480. "items": {
  3481. "$ref": "#/components/schemas/Part"
  3482. }
  3483. }
  3484. },
  3485. "required": ["info", "parts"]
  3486. }
  3487. }
  3488. }
  3489. },
  3490. "400": {
  3491. "description": "Bad request",
  3492. "content": {
  3493. "application/json": {
  3494. "schema": {
  3495. "$ref": "#/components/schemas/BadRequestError"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "404": {
  3501. "description": "Not found",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/NotFoundError"
  3506. }
  3507. }
  3508. }
  3509. }
  3510. },
  3511. "requestBody": {
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "type": "object",
  3516. "properties": {
  3517. "messageID": {
  3518. "type": "string",
  3519. "pattern": "^msg.*"
  3520. },
  3521. "model": {
  3522. "type": "object",
  3523. "properties": {
  3524. "providerID": {
  3525. "type": "string"
  3526. },
  3527. "modelID": {
  3528. "type": "string"
  3529. }
  3530. },
  3531. "required": ["providerID", "modelID"]
  3532. },
  3533. "agent": {
  3534. "type": "string"
  3535. },
  3536. "noReply": {
  3537. "type": "boolean"
  3538. },
  3539. "tools": {
  3540. "description": "@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
  3541. "type": "object",
  3542. "propertyNames": {
  3543. "type": "string"
  3544. },
  3545. "additionalProperties": {
  3546. "type": "boolean"
  3547. }
  3548. },
  3549. "format": {
  3550. "$ref": "#/components/schemas/OutputFormat"
  3551. },
  3552. "system": {
  3553. "type": "string"
  3554. },
  3555. "variant": {
  3556. "type": "string"
  3557. },
  3558. "parts": {
  3559. "type": "array",
  3560. "items": {
  3561. "anyOf": [
  3562. {
  3563. "$ref": "#/components/schemas/TextPartInput"
  3564. },
  3565. {
  3566. "$ref": "#/components/schemas/FilePartInput"
  3567. },
  3568. {
  3569. "$ref": "#/components/schemas/AgentPartInput"
  3570. },
  3571. {
  3572. "$ref": "#/components/schemas/SubtaskPartInput"
  3573. }
  3574. ]
  3575. }
  3576. }
  3577. },
  3578. "required": ["parts"]
  3579. }
  3580. }
  3581. }
  3582. },
  3583. "x-codeSamples": [
  3584. {
  3585. "lang": "js",
  3586. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  3587. }
  3588. ]
  3589. }
  3590. },
  3591. "/session/{sessionID}/message/{messageID}": {
  3592. "get": {
  3593. "operationId": "session.message",
  3594. "parameters": [
  3595. {
  3596. "in": "query",
  3597. "name": "directory",
  3598. "schema": {
  3599. "type": "string"
  3600. }
  3601. },
  3602. {
  3603. "in": "query",
  3604. "name": "workspace",
  3605. "schema": {
  3606. "type": "string"
  3607. }
  3608. },
  3609. {
  3610. "in": "path",
  3611. "name": "sessionID",
  3612. "schema": {
  3613. "type": "string",
  3614. "pattern": "^ses.*"
  3615. },
  3616. "required": true
  3617. },
  3618. {
  3619. "in": "path",
  3620. "name": "messageID",
  3621. "schema": {
  3622. "type": "string",
  3623. "pattern": "^msg.*"
  3624. },
  3625. "required": true
  3626. }
  3627. ],
  3628. "summary": "Get message",
  3629. "description": "Retrieve a specific message from a session by its message ID.",
  3630. "responses": {
  3631. "200": {
  3632. "description": "Message",
  3633. "content": {
  3634. "application/json": {
  3635. "schema": {
  3636. "type": "object",
  3637. "properties": {
  3638. "info": {
  3639. "$ref": "#/components/schemas/Message"
  3640. },
  3641. "parts": {
  3642. "type": "array",
  3643. "items": {
  3644. "$ref": "#/components/schemas/Part"
  3645. }
  3646. }
  3647. },
  3648. "required": ["info", "parts"]
  3649. }
  3650. }
  3651. }
  3652. },
  3653. "400": {
  3654. "description": "Bad request",
  3655. "content": {
  3656. "application/json": {
  3657. "schema": {
  3658. "$ref": "#/components/schemas/BadRequestError"
  3659. }
  3660. }
  3661. }
  3662. },
  3663. "404": {
  3664. "description": "Not found",
  3665. "content": {
  3666. "application/json": {
  3667. "schema": {
  3668. "$ref": "#/components/schemas/NotFoundError"
  3669. }
  3670. }
  3671. }
  3672. }
  3673. },
  3674. "x-codeSamples": [
  3675. {
  3676. "lang": "js",
  3677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  3678. }
  3679. ]
  3680. },
  3681. "delete": {
  3682. "operationId": "session.deleteMessage",
  3683. "parameters": [
  3684. {
  3685. "in": "query",
  3686. "name": "directory",
  3687. "schema": {
  3688. "type": "string"
  3689. }
  3690. },
  3691. {
  3692. "in": "query",
  3693. "name": "workspace",
  3694. "schema": {
  3695. "type": "string"
  3696. }
  3697. },
  3698. {
  3699. "in": "path",
  3700. "name": "sessionID",
  3701. "schema": {
  3702. "type": "string",
  3703. "pattern": "^ses.*"
  3704. },
  3705. "required": true
  3706. },
  3707. {
  3708. "in": "path",
  3709. "name": "messageID",
  3710. "schema": {
  3711. "type": "string",
  3712. "pattern": "^msg.*"
  3713. },
  3714. "required": true
  3715. }
  3716. ],
  3717. "summary": "Delete message",
  3718. "description": "Permanently delete a specific message (and all of its parts) from a session. This does not revert any file changes that may have been made while processing the message.",
  3719. "responses": {
  3720. "200": {
  3721. "description": "Successfully deleted message",
  3722. "content": {
  3723. "application/json": {
  3724. "schema": {
  3725. "type": "boolean"
  3726. }
  3727. }
  3728. }
  3729. },
  3730. "400": {
  3731. "description": "Bad request",
  3732. "content": {
  3733. "application/json": {
  3734. "schema": {
  3735. "$ref": "#/components/schemas/BadRequestError"
  3736. }
  3737. }
  3738. }
  3739. },
  3740. "404": {
  3741. "description": "Not found",
  3742. "content": {
  3743. "application/json": {
  3744. "schema": {
  3745. "$ref": "#/components/schemas/NotFoundError"
  3746. }
  3747. }
  3748. }
  3749. }
  3750. },
  3751. "x-codeSamples": [
  3752. {
  3753. "lang": "js",
  3754. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  3755. }
  3756. ]
  3757. }
  3758. },
  3759. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  3760. "delete": {
  3761. "operationId": "part.delete",
  3762. "parameters": [
  3763. {
  3764. "in": "query",
  3765. "name": "directory",
  3766. "schema": {
  3767. "type": "string"
  3768. }
  3769. },
  3770. {
  3771. "in": "query",
  3772. "name": "workspace",
  3773. "schema": {
  3774. "type": "string"
  3775. }
  3776. },
  3777. {
  3778. "in": "path",
  3779. "name": "sessionID",
  3780. "schema": {
  3781. "type": "string",
  3782. "pattern": "^ses.*"
  3783. },
  3784. "required": true
  3785. },
  3786. {
  3787. "in": "path",
  3788. "name": "messageID",
  3789. "schema": {
  3790. "type": "string",
  3791. "pattern": "^msg.*"
  3792. },
  3793. "required": true
  3794. },
  3795. {
  3796. "in": "path",
  3797. "name": "partID",
  3798. "schema": {
  3799. "type": "string",
  3800. "pattern": "^prt.*"
  3801. },
  3802. "required": true
  3803. }
  3804. ],
  3805. "description": "Delete a part from a message",
  3806. "responses": {
  3807. "200": {
  3808. "description": "Successfully deleted part",
  3809. "content": {
  3810. "application/json": {
  3811. "schema": {
  3812. "type": "boolean"
  3813. }
  3814. }
  3815. }
  3816. },
  3817. "400": {
  3818. "description": "Bad request",
  3819. "content": {
  3820. "application/json": {
  3821. "schema": {
  3822. "$ref": "#/components/schemas/BadRequestError"
  3823. }
  3824. }
  3825. }
  3826. },
  3827. "404": {
  3828. "description": "Not found",
  3829. "content": {
  3830. "application/json": {
  3831. "schema": {
  3832. "$ref": "#/components/schemas/NotFoundError"
  3833. }
  3834. }
  3835. }
  3836. }
  3837. },
  3838. "x-codeSamples": [
  3839. {
  3840. "lang": "js",
  3841. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  3842. }
  3843. ]
  3844. },
  3845. "patch": {
  3846. "operationId": "part.update",
  3847. "parameters": [
  3848. {
  3849. "in": "query",
  3850. "name": "directory",
  3851. "schema": {
  3852. "type": "string"
  3853. }
  3854. },
  3855. {
  3856. "in": "query",
  3857. "name": "workspace",
  3858. "schema": {
  3859. "type": "string"
  3860. }
  3861. },
  3862. {
  3863. "in": "path",
  3864. "name": "sessionID",
  3865. "schema": {
  3866. "type": "string",
  3867. "pattern": "^ses.*"
  3868. },
  3869. "required": true
  3870. },
  3871. {
  3872. "in": "path",
  3873. "name": "messageID",
  3874. "schema": {
  3875. "type": "string",
  3876. "pattern": "^msg.*"
  3877. },
  3878. "required": true
  3879. },
  3880. {
  3881. "in": "path",
  3882. "name": "partID",
  3883. "schema": {
  3884. "type": "string",
  3885. "pattern": "^prt.*"
  3886. },
  3887. "required": true
  3888. }
  3889. ],
  3890. "description": "Update a part in a message",
  3891. "responses": {
  3892. "200": {
  3893. "description": "Successfully updated part",
  3894. "content": {
  3895. "application/json": {
  3896. "schema": {
  3897. "$ref": "#/components/schemas/Part"
  3898. }
  3899. }
  3900. }
  3901. },
  3902. "400": {
  3903. "description": "Bad request",
  3904. "content": {
  3905. "application/json": {
  3906. "schema": {
  3907. "$ref": "#/components/schemas/BadRequestError"
  3908. }
  3909. }
  3910. }
  3911. },
  3912. "404": {
  3913. "description": "Not found",
  3914. "content": {
  3915. "application/json": {
  3916. "schema": {
  3917. "$ref": "#/components/schemas/NotFoundError"
  3918. }
  3919. }
  3920. }
  3921. }
  3922. },
  3923. "requestBody": {
  3924. "content": {
  3925. "application/json": {
  3926. "schema": {
  3927. "$ref": "#/components/schemas/Part"
  3928. }
  3929. }
  3930. }
  3931. },
  3932. "x-codeSamples": [
  3933. {
  3934. "lang": "js",
  3935. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  3936. }
  3937. ]
  3938. }
  3939. },
  3940. "/session/{sessionID}/prompt_async": {
  3941. "post": {
  3942. "operationId": "session.prompt_async",
  3943. "parameters": [
  3944. {
  3945. "in": "query",
  3946. "name": "directory",
  3947. "schema": {
  3948. "type": "string"
  3949. }
  3950. },
  3951. {
  3952. "in": "query",
  3953. "name": "workspace",
  3954. "schema": {
  3955. "type": "string"
  3956. }
  3957. },
  3958. {
  3959. "in": "path",
  3960. "name": "sessionID",
  3961. "schema": {
  3962. "type": "string",
  3963. "pattern": "^ses.*"
  3964. },
  3965. "required": true
  3966. }
  3967. ],
  3968. "summary": "Send async message",
  3969. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  3970. "responses": {
  3971. "204": {
  3972. "description": "Prompt accepted"
  3973. },
  3974. "400": {
  3975. "description": "Bad request",
  3976. "content": {
  3977. "application/json": {
  3978. "schema": {
  3979. "$ref": "#/components/schemas/BadRequestError"
  3980. }
  3981. }
  3982. }
  3983. },
  3984. "404": {
  3985. "description": "Not found",
  3986. "content": {
  3987. "application/json": {
  3988. "schema": {
  3989. "$ref": "#/components/schemas/NotFoundError"
  3990. }
  3991. }
  3992. }
  3993. }
  3994. },
  3995. "requestBody": {
  3996. "content": {
  3997. "application/json": {
  3998. "schema": {
  3999. "type": "object",
  4000. "properties": {
  4001. "messageID": {
  4002. "type": "string",
  4003. "pattern": "^msg.*"
  4004. },
  4005. "model": {
  4006. "type": "object",
  4007. "properties": {
  4008. "providerID": {
  4009. "type": "string"
  4010. },
  4011. "modelID": {
  4012. "type": "string"
  4013. }
  4014. },
  4015. "required": ["providerID", "modelID"]
  4016. },
  4017. "agent": {
  4018. "type": "string"
  4019. },
  4020. "noReply": {
  4021. "type": "boolean"
  4022. },
  4023. "tools": {
  4024. "description": "@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
  4025. "type": "object",
  4026. "propertyNames": {
  4027. "type": "string"
  4028. },
  4029. "additionalProperties": {
  4030. "type": "boolean"
  4031. }
  4032. },
  4033. "format": {
  4034. "$ref": "#/components/schemas/OutputFormat"
  4035. },
  4036. "system": {
  4037. "type": "string"
  4038. },
  4039. "variant": {
  4040. "type": "string"
  4041. },
  4042. "parts": {
  4043. "type": "array",
  4044. "items": {
  4045. "anyOf": [
  4046. {
  4047. "$ref": "#/components/schemas/TextPartInput"
  4048. },
  4049. {
  4050. "$ref": "#/components/schemas/FilePartInput"
  4051. },
  4052. {
  4053. "$ref": "#/components/schemas/AgentPartInput"
  4054. },
  4055. {
  4056. "$ref": "#/components/schemas/SubtaskPartInput"
  4057. }
  4058. ]
  4059. }
  4060. }
  4061. },
  4062. "required": ["parts"]
  4063. }
  4064. }
  4065. }
  4066. },
  4067. "x-codeSamples": [
  4068. {
  4069. "lang": "js",
  4070. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  4071. }
  4072. ]
  4073. }
  4074. },
  4075. "/session/{sessionID}/command": {
  4076. "post": {
  4077. "operationId": "session.command",
  4078. "parameters": [
  4079. {
  4080. "in": "query",
  4081. "name": "directory",
  4082. "schema": {
  4083. "type": "string"
  4084. }
  4085. },
  4086. {
  4087. "in": "query",
  4088. "name": "workspace",
  4089. "schema": {
  4090. "type": "string"
  4091. }
  4092. },
  4093. {
  4094. "in": "path",
  4095. "name": "sessionID",
  4096. "schema": {
  4097. "type": "string",
  4098. "pattern": "^ses.*"
  4099. },
  4100. "required": true
  4101. }
  4102. ],
  4103. "summary": "Send command",
  4104. "description": "Send a new command to a session for execution by the AI assistant.",
  4105. "responses": {
  4106. "200": {
  4107. "description": "Created message",
  4108. "content": {
  4109. "application/json": {
  4110. "schema": {
  4111. "type": "object",
  4112. "properties": {
  4113. "info": {
  4114. "$ref": "#/components/schemas/AssistantMessage"
  4115. },
  4116. "parts": {
  4117. "type": "array",
  4118. "items": {
  4119. "$ref": "#/components/schemas/Part"
  4120. }
  4121. }
  4122. },
  4123. "required": ["info", "parts"]
  4124. }
  4125. }
  4126. }
  4127. },
  4128. "400": {
  4129. "description": "Bad request",
  4130. "content": {
  4131. "application/json": {
  4132. "schema": {
  4133. "$ref": "#/components/schemas/BadRequestError"
  4134. }
  4135. }
  4136. }
  4137. },
  4138. "404": {
  4139. "description": "Not found",
  4140. "content": {
  4141. "application/json": {
  4142. "schema": {
  4143. "$ref": "#/components/schemas/NotFoundError"
  4144. }
  4145. }
  4146. }
  4147. }
  4148. },
  4149. "requestBody": {
  4150. "content": {
  4151. "application/json": {
  4152. "schema": {
  4153. "type": "object",
  4154. "properties": {
  4155. "messageID": {
  4156. "type": "string",
  4157. "pattern": "^msg.*"
  4158. },
  4159. "agent": {
  4160. "type": "string"
  4161. },
  4162. "model": {
  4163. "type": "string"
  4164. },
  4165. "arguments": {
  4166. "type": "string"
  4167. },
  4168. "command": {
  4169. "type": "string"
  4170. },
  4171. "variant": {
  4172. "type": "string"
  4173. },
  4174. "parts": {
  4175. "type": "array",
  4176. "items": {
  4177. "anyOf": [
  4178. {
  4179. "type": "object",
  4180. "properties": {
  4181. "id": {
  4182. "type": "string",
  4183. "pattern": "^prt.*"
  4184. },
  4185. "type": {
  4186. "type": "string",
  4187. "const": "file"
  4188. },
  4189. "mime": {
  4190. "type": "string"
  4191. },
  4192. "filename": {
  4193. "type": "string"
  4194. },
  4195. "url": {
  4196. "type": "string"
  4197. },
  4198. "source": {
  4199. "$ref": "#/components/schemas/FilePartSource"
  4200. }
  4201. },
  4202. "required": ["type", "mime", "url"]
  4203. }
  4204. ]
  4205. }
  4206. }
  4207. },
  4208. "required": ["arguments", "command"]
  4209. }
  4210. }
  4211. }
  4212. },
  4213. "x-codeSamples": [
  4214. {
  4215. "lang": "js",
  4216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  4217. }
  4218. ]
  4219. }
  4220. },
  4221. "/session/{sessionID}/shell": {
  4222. "post": {
  4223. "operationId": "session.shell",
  4224. "parameters": [
  4225. {
  4226. "in": "query",
  4227. "name": "directory",
  4228. "schema": {
  4229. "type": "string"
  4230. }
  4231. },
  4232. {
  4233. "in": "query",
  4234. "name": "workspace",
  4235. "schema": {
  4236. "type": "string"
  4237. }
  4238. },
  4239. {
  4240. "in": "path",
  4241. "name": "sessionID",
  4242. "schema": {
  4243. "type": "string",
  4244. "pattern": "^ses.*"
  4245. },
  4246. "required": true
  4247. }
  4248. ],
  4249. "summary": "Run shell command",
  4250. "description": "Execute a shell command within the session context and return the AI's response.",
  4251. "responses": {
  4252. "200": {
  4253. "description": "Created message",
  4254. "content": {
  4255. "application/json": {
  4256. "schema": {
  4257. "type": "object",
  4258. "properties": {
  4259. "info": {
  4260. "$ref": "#/components/schemas/Message"
  4261. },
  4262. "parts": {
  4263. "type": "array",
  4264. "items": {
  4265. "$ref": "#/components/schemas/Part"
  4266. }
  4267. }
  4268. },
  4269. "required": ["info", "parts"]
  4270. }
  4271. }
  4272. }
  4273. },
  4274. "400": {
  4275. "description": "Bad request",
  4276. "content": {
  4277. "application/json": {
  4278. "schema": {
  4279. "$ref": "#/components/schemas/BadRequestError"
  4280. }
  4281. }
  4282. }
  4283. },
  4284. "404": {
  4285. "description": "Not found",
  4286. "content": {
  4287. "application/json": {
  4288. "schema": {
  4289. "$ref": "#/components/schemas/NotFoundError"
  4290. }
  4291. }
  4292. }
  4293. }
  4294. },
  4295. "requestBody": {
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "object",
  4300. "properties": {
  4301. "messageID": {
  4302. "type": "string",
  4303. "pattern": "^msg.*"
  4304. },
  4305. "agent": {
  4306. "type": "string"
  4307. },
  4308. "model": {
  4309. "type": "object",
  4310. "properties": {
  4311. "providerID": {
  4312. "type": "string"
  4313. },
  4314. "modelID": {
  4315. "type": "string"
  4316. }
  4317. },
  4318. "required": ["providerID", "modelID"]
  4319. },
  4320. "command": {
  4321. "type": "string"
  4322. }
  4323. },
  4324. "required": ["agent", "command"]
  4325. }
  4326. }
  4327. }
  4328. },
  4329. "x-codeSamples": [
  4330. {
  4331. "lang": "js",
  4332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  4333. }
  4334. ]
  4335. }
  4336. },
  4337. "/session/{sessionID}/revert": {
  4338. "post": {
  4339. "operationId": "session.revert",
  4340. "parameters": [
  4341. {
  4342. "in": "query",
  4343. "name": "directory",
  4344. "schema": {
  4345. "type": "string"
  4346. }
  4347. },
  4348. {
  4349. "in": "query",
  4350. "name": "workspace",
  4351. "schema": {
  4352. "type": "string"
  4353. }
  4354. },
  4355. {
  4356. "in": "path",
  4357. "name": "sessionID",
  4358. "schema": {
  4359. "type": "string",
  4360. "pattern": "^ses.*"
  4361. },
  4362. "required": true
  4363. }
  4364. ],
  4365. "summary": "Revert message",
  4366. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  4367. "responses": {
  4368. "200": {
  4369. "description": "Updated session",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "$ref": "#/components/schemas/Session"
  4374. }
  4375. }
  4376. }
  4377. },
  4378. "400": {
  4379. "description": "Bad request",
  4380. "content": {
  4381. "application/json": {
  4382. "schema": {
  4383. "$ref": "#/components/schemas/BadRequestError"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "404": {
  4389. "description": "Not found",
  4390. "content": {
  4391. "application/json": {
  4392. "schema": {
  4393. "$ref": "#/components/schemas/NotFoundError"
  4394. }
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "requestBody": {
  4400. "content": {
  4401. "application/json": {
  4402. "schema": {
  4403. "type": "object",
  4404. "properties": {
  4405. "messageID": {
  4406. "type": "string",
  4407. "pattern": "^msg.*"
  4408. },
  4409. "partID": {
  4410. "type": "string",
  4411. "pattern": "^prt.*"
  4412. }
  4413. },
  4414. "required": ["messageID"]
  4415. }
  4416. }
  4417. }
  4418. },
  4419. "x-codeSamples": [
  4420. {
  4421. "lang": "js",
  4422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  4423. }
  4424. ]
  4425. }
  4426. },
  4427. "/session/{sessionID}/unrevert": {
  4428. "post": {
  4429. "operationId": "session.unrevert",
  4430. "parameters": [
  4431. {
  4432. "in": "query",
  4433. "name": "directory",
  4434. "schema": {
  4435. "type": "string"
  4436. }
  4437. },
  4438. {
  4439. "in": "query",
  4440. "name": "workspace",
  4441. "schema": {
  4442. "type": "string"
  4443. }
  4444. },
  4445. {
  4446. "in": "path",
  4447. "name": "sessionID",
  4448. "schema": {
  4449. "type": "string",
  4450. "pattern": "^ses.*"
  4451. },
  4452. "required": true
  4453. }
  4454. ],
  4455. "summary": "Restore reverted messages",
  4456. "description": "Restore all previously reverted messages in a session.",
  4457. "responses": {
  4458. "200": {
  4459. "description": "Updated session",
  4460. "content": {
  4461. "application/json": {
  4462. "schema": {
  4463. "$ref": "#/components/schemas/Session"
  4464. }
  4465. }
  4466. }
  4467. },
  4468. "400": {
  4469. "description": "Bad request",
  4470. "content": {
  4471. "application/json": {
  4472. "schema": {
  4473. "$ref": "#/components/schemas/BadRequestError"
  4474. }
  4475. }
  4476. }
  4477. },
  4478. "404": {
  4479. "description": "Not found",
  4480. "content": {
  4481. "application/json": {
  4482. "schema": {
  4483. "$ref": "#/components/schemas/NotFoundError"
  4484. }
  4485. }
  4486. }
  4487. }
  4488. },
  4489. "x-codeSamples": [
  4490. {
  4491. "lang": "js",
  4492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  4493. }
  4494. ]
  4495. }
  4496. },
  4497. "/session/{sessionID}/permissions/{permissionID}": {
  4498. "post": {
  4499. "operationId": "permission.respond",
  4500. "parameters": [
  4501. {
  4502. "in": "query",
  4503. "name": "directory",
  4504. "schema": {
  4505. "type": "string"
  4506. }
  4507. },
  4508. {
  4509. "in": "query",
  4510. "name": "workspace",
  4511. "schema": {
  4512. "type": "string"
  4513. }
  4514. },
  4515. {
  4516. "in": "path",
  4517. "name": "sessionID",
  4518. "schema": {
  4519. "type": "string",
  4520. "pattern": "^ses.*"
  4521. },
  4522. "required": true
  4523. },
  4524. {
  4525. "in": "path",
  4526. "name": "permissionID",
  4527. "schema": {
  4528. "type": "string",
  4529. "pattern": "^per.*"
  4530. },
  4531. "required": true
  4532. }
  4533. ],
  4534. "summary": "Respond to permission",
  4535. "deprecated": true,
  4536. "description": "Approve or deny a permission request from the AI assistant.",
  4537. "responses": {
  4538. "200": {
  4539. "description": "Permission processed successfully",
  4540. "content": {
  4541. "application/json": {
  4542. "schema": {
  4543. "type": "boolean"
  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. "404": {
  4559. "description": "Not found",
  4560. "content": {
  4561. "application/json": {
  4562. "schema": {
  4563. "$ref": "#/components/schemas/NotFoundError"
  4564. }
  4565. }
  4566. }
  4567. }
  4568. },
  4569. "requestBody": {
  4570. "content": {
  4571. "application/json": {
  4572. "schema": {
  4573. "type": "object",
  4574. "properties": {
  4575. "response": {
  4576. "type": "string",
  4577. "enum": ["once", "always", "reject"]
  4578. }
  4579. },
  4580. "required": ["response"]
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "x-codeSamples": [
  4586. {
  4587. "lang": "js",
  4588. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  4589. }
  4590. ]
  4591. }
  4592. },
  4593. "/permission/{requestID}/reply": {
  4594. "post": {
  4595. "operationId": "permission.reply",
  4596. "parameters": [
  4597. {
  4598. "in": "query",
  4599. "name": "directory",
  4600. "schema": {
  4601. "type": "string"
  4602. }
  4603. },
  4604. {
  4605. "in": "query",
  4606. "name": "workspace",
  4607. "schema": {
  4608. "type": "string"
  4609. }
  4610. },
  4611. {
  4612. "in": "path",
  4613. "name": "requestID",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^per.*"
  4617. },
  4618. "required": true
  4619. }
  4620. ],
  4621. "summary": "Respond to permission request",
  4622. "description": "Approve or deny a permission request from the AI assistant.",
  4623. "responses": {
  4624. "200": {
  4625. "description": "Permission processed successfully",
  4626. "content": {
  4627. "application/json": {
  4628. "schema": {
  4629. "type": "boolean"
  4630. }
  4631. }
  4632. }
  4633. },
  4634. "400": {
  4635. "description": "Bad request",
  4636. "content": {
  4637. "application/json": {
  4638. "schema": {
  4639. "$ref": "#/components/schemas/BadRequestError"
  4640. }
  4641. }
  4642. }
  4643. },
  4644. "404": {
  4645. "description": "Not found",
  4646. "content": {
  4647. "application/json": {
  4648. "schema": {
  4649. "$ref": "#/components/schemas/NotFoundError"
  4650. }
  4651. }
  4652. }
  4653. }
  4654. },
  4655. "requestBody": {
  4656. "content": {
  4657. "application/json": {
  4658. "schema": {
  4659. "type": "object",
  4660. "properties": {
  4661. "reply": {
  4662. "type": "string",
  4663. "enum": ["once", "always", "reject"]
  4664. },
  4665. "message": {
  4666. "type": "string"
  4667. }
  4668. },
  4669. "required": ["reply"]
  4670. }
  4671. }
  4672. }
  4673. },
  4674. "x-codeSamples": [
  4675. {
  4676. "lang": "js",
  4677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4678. }
  4679. ]
  4680. }
  4681. },
  4682. "/permission": {
  4683. "get": {
  4684. "operationId": "permission.list",
  4685. "parameters": [
  4686. {
  4687. "in": "query",
  4688. "name": "directory",
  4689. "schema": {
  4690. "type": "string"
  4691. }
  4692. },
  4693. {
  4694. "in": "query",
  4695. "name": "workspace",
  4696. "schema": {
  4697. "type": "string"
  4698. }
  4699. }
  4700. ],
  4701. "summary": "List pending permissions",
  4702. "description": "Get all pending permission requests across all sessions.",
  4703. "responses": {
  4704. "200": {
  4705. "description": "List of pending permissions",
  4706. "content": {
  4707. "application/json": {
  4708. "schema": {
  4709. "type": "array",
  4710. "items": {
  4711. "$ref": "#/components/schemas/PermissionRequest"
  4712. }
  4713. }
  4714. }
  4715. }
  4716. }
  4717. },
  4718. "x-codeSamples": [
  4719. {
  4720. "lang": "js",
  4721. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4722. }
  4723. ]
  4724. }
  4725. },
  4726. "/question": {
  4727. "get": {
  4728. "operationId": "question.list",
  4729. "parameters": [
  4730. {
  4731. "in": "query",
  4732. "name": "directory",
  4733. "schema": {
  4734. "type": "string"
  4735. }
  4736. },
  4737. {
  4738. "in": "query",
  4739. "name": "workspace",
  4740. "schema": {
  4741. "type": "string"
  4742. }
  4743. }
  4744. ],
  4745. "summary": "List pending questions",
  4746. "description": "Get all pending question requests across all sessions.",
  4747. "responses": {
  4748. "200": {
  4749. "description": "List of pending questions",
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "type": "array",
  4754. "items": {
  4755. "$ref": "#/components/schemas/QuestionRequest"
  4756. }
  4757. }
  4758. }
  4759. }
  4760. }
  4761. },
  4762. "x-codeSamples": [
  4763. {
  4764. "lang": "js",
  4765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4766. }
  4767. ]
  4768. }
  4769. },
  4770. "/question/{requestID}/reply": {
  4771. "post": {
  4772. "operationId": "question.reply",
  4773. "parameters": [
  4774. {
  4775. "in": "query",
  4776. "name": "directory",
  4777. "schema": {
  4778. "type": "string"
  4779. }
  4780. },
  4781. {
  4782. "in": "query",
  4783. "name": "workspace",
  4784. "schema": {
  4785. "type": "string"
  4786. }
  4787. },
  4788. {
  4789. "in": "path",
  4790. "name": "requestID",
  4791. "schema": {
  4792. "type": "string",
  4793. "pattern": "^que.*"
  4794. },
  4795. "required": true
  4796. }
  4797. ],
  4798. "summary": "Reply to question request",
  4799. "description": "Provide answers to a question request from the AI assistant.",
  4800. "responses": {
  4801. "200": {
  4802. "description": "Question answered successfully",
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "type": "boolean"
  4807. }
  4808. }
  4809. }
  4810. },
  4811. "400": {
  4812. "description": "Bad request",
  4813. "content": {
  4814. "application/json": {
  4815. "schema": {
  4816. "$ref": "#/components/schemas/BadRequestError"
  4817. }
  4818. }
  4819. }
  4820. },
  4821. "404": {
  4822. "description": "Not found",
  4823. "content": {
  4824. "application/json": {
  4825. "schema": {
  4826. "$ref": "#/components/schemas/NotFoundError"
  4827. }
  4828. }
  4829. }
  4830. }
  4831. },
  4832. "requestBody": {
  4833. "content": {
  4834. "application/json": {
  4835. "schema": {
  4836. "type": "object",
  4837. "properties": {
  4838. "answers": {
  4839. "description": "User answers in order of questions (each answer is an array of selected labels)",
  4840. "type": "array",
  4841. "items": {
  4842. "$ref": "#/components/schemas/QuestionAnswer"
  4843. }
  4844. }
  4845. },
  4846. "required": ["answers"]
  4847. }
  4848. }
  4849. }
  4850. },
  4851. "x-codeSamples": [
  4852. {
  4853. "lang": "js",
  4854. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4855. }
  4856. ]
  4857. }
  4858. },
  4859. "/question/{requestID}/reject": {
  4860. "post": {
  4861. "operationId": "question.reject",
  4862. "parameters": [
  4863. {
  4864. "in": "query",
  4865. "name": "directory",
  4866. "schema": {
  4867. "type": "string"
  4868. }
  4869. },
  4870. {
  4871. "in": "query",
  4872. "name": "workspace",
  4873. "schema": {
  4874. "type": "string"
  4875. }
  4876. },
  4877. {
  4878. "in": "path",
  4879. "name": "requestID",
  4880. "schema": {
  4881. "type": "string",
  4882. "pattern": "^que.*"
  4883. },
  4884. "required": true
  4885. }
  4886. ],
  4887. "summary": "Reject question request",
  4888. "description": "Reject a question request from the AI assistant.",
  4889. "responses": {
  4890. "200": {
  4891. "description": "Question rejected successfully",
  4892. "content": {
  4893. "application/json": {
  4894. "schema": {
  4895. "type": "boolean"
  4896. }
  4897. }
  4898. }
  4899. },
  4900. "400": {
  4901. "description": "Bad request",
  4902. "content": {
  4903. "application/json": {
  4904. "schema": {
  4905. "$ref": "#/components/schemas/BadRequestError"
  4906. }
  4907. }
  4908. }
  4909. },
  4910. "404": {
  4911. "description": "Not found",
  4912. "content": {
  4913. "application/json": {
  4914. "schema": {
  4915. "$ref": "#/components/schemas/NotFoundError"
  4916. }
  4917. }
  4918. }
  4919. }
  4920. },
  4921. "x-codeSamples": [
  4922. {
  4923. "lang": "js",
  4924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4925. }
  4926. ]
  4927. }
  4928. },
  4929. "/provider": {
  4930. "get": {
  4931. "operationId": "provider.list",
  4932. "parameters": [
  4933. {
  4934. "in": "query",
  4935. "name": "directory",
  4936. "schema": {
  4937. "type": "string"
  4938. }
  4939. },
  4940. {
  4941. "in": "query",
  4942. "name": "workspace",
  4943. "schema": {
  4944. "type": "string"
  4945. }
  4946. }
  4947. ],
  4948. "summary": "List providers",
  4949. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4950. "responses": {
  4951. "200": {
  4952. "description": "List of providers",
  4953. "content": {
  4954. "application/json": {
  4955. "schema": {
  4956. "type": "object",
  4957. "properties": {
  4958. "all": {
  4959. "type": "array",
  4960. "items": {
  4961. "$ref": "#/components/schemas/Provider"
  4962. }
  4963. },
  4964. "default": {
  4965. "type": "object",
  4966. "propertyNames": {
  4967. "type": "string"
  4968. },
  4969. "additionalProperties": {
  4970. "type": "string"
  4971. }
  4972. },
  4973. "connected": {
  4974. "type": "array",
  4975. "items": {
  4976. "type": "string"
  4977. }
  4978. }
  4979. },
  4980. "required": ["all", "default", "connected"]
  4981. }
  4982. }
  4983. }
  4984. }
  4985. },
  4986. "x-codeSamples": [
  4987. {
  4988. "lang": "js",
  4989. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4990. }
  4991. ]
  4992. }
  4993. },
  4994. "/provider/auth": {
  4995. "get": {
  4996. "operationId": "provider.auth",
  4997. "parameters": [
  4998. {
  4999. "in": "query",
  5000. "name": "directory",
  5001. "schema": {
  5002. "type": "string"
  5003. }
  5004. },
  5005. {
  5006. "in": "query",
  5007. "name": "workspace",
  5008. "schema": {
  5009. "type": "string"
  5010. }
  5011. }
  5012. ],
  5013. "summary": "Get provider auth methods",
  5014. "description": "Retrieve available authentication methods for all AI providers.",
  5015. "responses": {
  5016. "200": {
  5017. "description": "Provider auth methods",
  5018. "content": {
  5019. "application/json": {
  5020. "schema": {
  5021. "type": "object",
  5022. "propertyNames": {
  5023. "type": "string"
  5024. },
  5025. "additionalProperties": {
  5026. "type": "array",
  5027. "items": {
  5028. "$ref": "#/components/schemas/ProviderAuthMethod"
  5029. }
  5030. }
  5031. }
  5032. }
  5033. }
  5034. }
  5035. },
  5036. "x-codeSamples": [
  5037. {
  5038. "lang": "js",
  5039. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5040. }
  5041. ]
  5042. }
  5043. },
  5044. "/provider/{providerID}/oauth/authorize": {
  5045. "post": {
  5046. "operationId": "provider.oauth.authorize",
  5047. "parameters": [
  5048. {
  5049. "in": "query",
  5050. "name": "directory",
  5051. "schema": {
  5052. "type": "string"
  5053. }
  5054. },
  5055. {
  5056. "in": "query",
  5057. "name": "workspace",
  5058. "schema": {
  5059. "type": "string"
  5060. }
  5061. },
  5062. {
  5063. "in": "path",
  5064. "name": "providerID",
  5065. "schema": {
  5066. "type": "string"
  5067. },
  5068. "required": true,
  5069. "description": "Provider ID"
  5070. }
  5071. ],
  5072. "summary": "OAuth authorize",
  5073. "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
  5074. "responses": {
  5075. "200": {
  5076. "description": "Authorization URL and method",
  5077. "content": {
  5078. "application/json": {
  5079. "schema": {
  5080. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5081. }
  5082. }
  5083. }
  5084. },
  5085. "400": {
  5086. "description": "Bad request",
  5087. "content": {
  5088. "application/json": {
  5089. "schema": {
  5090. "$ref": "#/components/schemas/BadRequestError"
  5091. }
  5092. }
  5093. }
  5094. }
  5095. },
  5096. "requestBody": {
  5097. "content": {
  5098. "application/json": {
  5099. "schema": {
  5100. "type": "object",
  5101. "properties": {
  5102. "method": {
  5103. "description": "Auth method index",
  5104. "type": "number"
  5105. },
  5106. "inputs": {
  5107. "description": "Prompt inputs",
  5108. "type": "object",
  5109. "propertyNames": {
  5110. "type": "string"
  5111. },
  5112. "additionalProperties": {
  5113. "type": "string"
  5114. }
  5115. }
  5116. },
  5117. "required": ["method"]
  5118. }
  5119. }
  5120. }
  5121. },
  5122. "x-codeSamples": [
  5123. {
  5124. "lang": "js",
  5125. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5126. }
  5127. ]
  5128. }
  5129. },
  5130. "/provider/{providerID}/oauth/callback": {
  5131. "post": {
  5132. "operationId": "provider.oauth.callback",
  5133. "parameters": [
  5134. {
  5135. "in": "query",
  5136. "name": "directory",
  5137. "schema": {
  5138. "type": "string"
  5139. }
  5140. },
  5141. {
  5142. "in": "query",
  5143. "name": "workspace",
  5144. "schema": {
  5145. "type": "string"
  5146. }
  5147. },
  5148. {
  5149. "in": "path",
  5150. "name": "providerID",
  5151. "schema": {
  5152. "type": "string"
  5153. },
  5154. "required": true,
  5155. "description": "Provider ID"
  5156. }
  5157. ],
  5158. "summary": "OAuth callback",
  5159. "description": "Handle the OAuth callback from a provider after user authorization.",
  5160. "responses": {
  5161. "200": {
  5162. "description": "OAuth callback processed successfully",
  5163. "content": {
  5164. "application/json": {
  5165. "schema": {
  5166. "type": "boolean"
  5167. }
  5168. }
  5169. }
  5170. },
  5171. "400": {
  5172. "description": "Bad request",
  5173. "content": {
  5174. "application/json": {
  5175. "schema": {
  5176. "$ref": "#/components/schemas/BadRequestError"
  5177. }
  5178. }
  5179. }
  5180. }
  5181. },
  5182. "requestBody": {
  5183. "content": {
  5184. "application/json": {
  5185. "schema": {
  5186. "type": "object",
  5187. "properties": {
  5188. "method": {
  5189. "description": "Auth method index",
  5190. "type": "number"
  5191. },
  5192. "code": {
  5193. "description": "OAuth authorization code",
  5194. "type": "string"
  5195. }
  5196. },
  5197. "required": ["method"]
  5198. }
  5199. }
  5200. }
  5201. },
  5202. "x-codeSamples": [
  5203. {
  5204. "lang": "js",
  5205. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5206. }
  5207. ]
  5208. }
  5209. },
  5210. "/sync/start": {
  5211. "post": {
  5212. "operationId": "sync.start",
  5213. "parameters": [
  5214. {
  5215. "in": "query",
  5216. "name": "directory",
  5217. "schema": {
  5218. "type": "string"
  5219. }
  5220. },
  5221. {
  5222. "in": "query",
  5223. "name": "workspace",
  5224. "schema": {
  5225. "type": "string"
  5226. }
  5227. }
  5228. ],
  5229. "summary": "Start workspace sync",
  5230. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  5231. "responses": {
  5232. "200": {
  5233. "description": "Workspace sync started",
  5234. "content": {
  5235. "application/json": {
  5236. "schema": {
  5237. "type": "boolean"
  5238. }
  5239. }
  5240. }
  5241. }
  5242. },
  5243. "x-codeSamples": [
  5244. {
  5245. "lang": "js",
  5246. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  5247. }
  5248. ]
  5249. }
  5250. },
  5251. "/sync/replay": {
  5252. "post": {
  5253. "operationId": "sync.replay",
  5254. "parameters": [
  5255. {
  5256. "in": "query",
  5257. "name": "directory",
  5258. "schema": {
  5259. "type": "string"
  5260. }
  5261. },
  5262. {
  5263. "in": "query",
  5264. "name": "workspace",
  5265. "schema": {
  5266. "type": "string"
  5267. }
  5268. }
  5269. ],
  5270. "summary": "Replay sync events",
  5271. "description": "Validate and replay a complete sync event history.",
  5272. "responses": {
  5273. "200": {
  5274. "description": "Replayed sync events",
  5275. "content": {
  5276. "application/json": {
  5277. "schema": {
  5278. "type": "object",
  5279. "properties": {
  5280. "sessionID": {
  5281. "type": "string"
  5282. }
  5283. },
  5284. "required": ["sessionID"]
  5285. }
  5286. }
  5287. }
  5288. },
  5289. "400": {
  5290. "description": "Bad request",
  5291. "content": {
  5292. "application/json": {
  5293. "schema": {
  5294. "$ref": "#/components/schemas/BadRequestError"
  5295. }
  5296. }
  5297. }
  5298. }
  5299. },
  5300. "requestBody": {
  5301. "content": {
  5302. "application/json": {
  5303. "schema": {
  5304. "type": "object",
  5305. "properties": {
  5306. "directory": {
  5307. "type": "string"
  5308. },
  5309. "events": {
  5310. "minItems": 1,
  5311. "type": "array",
  5312. "items": {
  5313. "type": "object",
  5314. "properties": {
  5315. "id": {
  5316. "type": "string"
  5317. },
  5318. "aggregateID": {
  5319. "type": "string"
  5320. },
  5321. "seq": {
  5322. "type": "integer",
  5323. "minimum": 0,
  5324. "maximum": 9007199254740991
  5325. },
  5326. "type": {
  5327. "type": "string"
  5328. },
  5329. "data": {
  5330. "type": "object",
  5331. "propertyNames": {
  5332. "type": "string"
  5333. },
  5334. "additionalProperties": {}
  5335. }
  5336. },
  5337. "required": ["id", "aggregateID", "seq", "type", "data"]
  5338. }
  5339. }
  5340. },
  5341. "required": ["directory", "events"]
  5342. }
  5343. }
  5344. }
  5345. },
  5346. "x-codeSamples": [
  5347. {
  5348. "lang": "js",
  5349. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  5350. }
  5351. ]
  5352. }
  5353. },
  5354. "/sync/history": {
  5355. "post": {
  5356. "operationId": "sync.history.list",
  5357. "parameters": [
  5358. {
  5359. "in": "query",
  5360. "name": "directory",
  5361. "schema": {
  5362. "type": "string"
  5363. }
  5364. },
  5365. {
  5366. "in": "query",
  5367. "name": "workspace",
  5368. "schema": {
  5369. "type": "string"
  5370. }
  5371. }
  5372. ],
  5373. "summary": "List sync events",
  5374. "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.",
  5375. "responses": {
  5376. "200": {
  5377. "description": "Sync events",
  5378. "content": {
  5379. "application/json": {
  5380. "schema": {
  5381. "type": "array",
  5382. "items": {
  5383. "type": "object",
  5384. "properties": {
  5385. "id": {
  5386. "type": "string"
  5387. },
  5388. "aggregate_id": {
  5389. "type": "string"
  5390. },
  5391. "seq": {
  5392. "type": "number"
  5393. },
  5394. "type": {
  5395. "type": "string"
  5396. },
  5397. "data": {
  5398. "type": "object",
  5399. "propertyNames": {
  5400. "type": "string"
  5401. },
  5402. "additionalProperties": {}
  5403. }
  5404. },
  5405. "required": ["id", "aggregate_id", "seq", "type", "data"]
  5406. }
  5407. }
  5408. }
  5409. }
  5410. },
  5411. "400": {
  5412. "description": "Bad request",
  5413. "content": {
  5414. "application/json": {
  5415. "schema": {
  5416. "$ref": "#/components/schemas/BadRequestError"
  5417. }
  5418. }
  5419. }
  5420. }
  5421. },
  5422. "requestBody": {
  5423. "content": {
  5424. "application/json": {
  5425. "schema": {
  5426. "type": "object",
  5427. "propertyNames": {
  5428. "type": "string"
  5429. },
  5430. "additionalProperties": {
  5431. "type": "integer",
  5432. "minimum": 0,
  5433. "maximum": 9007199254740991
  5434. }
  5435. }
  5436. }
  5437. }
  5438. },
  5439. "x-codeSamples": [
  5440. {
  5441. "lang": "js",
  5442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  5443. }
  5444. ]
  5445. }
  5446. },
  5447. "/find": {
  5448. "get": {
  5449. "operationId": "find.text",
  5450. "parameters": [
  5451. {
  5452. "in": "query",
  5453. "name": "directory",
  5454. "schema": {
  5455. "type": "string"
  5456. }
  5457. },
  5458. {
  5459. "in": "query",
  5460. "name": "workspace",
  5461. "schema": {
  5462. "type": "string"
  5463. }
  5464. },
  5465. {
  5466. "in": "query",
  5467. "name": "pattern",
  5468. "schema": {
  5469. "type": "string"
  5470. },
  5471. "required": true
  5472. }
  5473. ],
  5474. "summary": "Find text",
  5475. "description": "Search for text patterns across files in the project using ripgrep.",
  5476. "responses": {
  5477. "200": {
  5478. "description": "Matches",
  5479. "content": {
  5480. "application/json": {
  5481. "schema": {
  5482. "type": "array",
  5483. "items": {
  5484. "type": "object",
  5485. "properties": {
  5486. "path": {
  5487. "type": "object",
  5488. "properties": {
  5489. "text": {
  5490. "type": "string"
  5491. }
  5492. },
  5493. "required": ["text"]
  5494. },
  5495. "lines": {
  5496. "type": "object",
  5497. "properties": {
  5498. "text": {
  5499. "type": "string"
  5500. }
  5501. },
  5502. "required": ["text"]
  5503. },
  5504. "line_number": {
  5505. "type": "number"
  5506. },
  5507. "absolute_offset": {
  5508. "type": "number"
  5509. },
  5510. "submatches": {
  5511. "type": "array",
  5512. "items": {
  5513. "type": "object",
  5514. "properties": {
  5515. "match": {
  5516. "type": "object",
  5517. "properties": {
  5518. "text": {
  5519. "type": "string"
  5520. }
  5521. },
  5522. "required": ["text"]
  5523. },
  5524. "start": {
  5525. "type": "number"
  5526. },
  5527. "end": {
  5528. "type": "number"
  5529. }
  5530. },
  5531. "required": ["match", "start", "end"]
  5532. }
  5533. }
  5534. },
  5535. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
  5536. }
  5537. }
  5538. }
  5539. }
  5540. }
  5541. },
  5542. "x-codeSamples": [
  5543. {
  5544. "lang": "js",
  5545. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  5546. }
  5547. ]
  5548. }
  5549. },
  5550. "/find/file": {
  5551. "get": {
  5552. "operationId": "find.files",
  5553. "parameters": [
  5554. {
  5555. "in": "query",
  5556. "name": "directory",
  5557. "schema": {
  5558. "type": "string"
  5559. }
  5560. },
  5561. {
  5562. "in": "query",
  5563. "name": "workspace",
  5564. "schema": {
  5565. "type": "string"
  5566. }
  5567. },
  5568. {
  5569. "in": "query",
  5570. "name": "query",
  5571. "schema": {
  5572. "type": "string"
  5573. },
  5574. "required": true
  5575. },
  5576. {
  5577. "in": "query",
  5578. "name": "dirs",
  5579. "schema": {
  5580. "type": "string",
  5581. "enum": ["true", "false"]
  5582. }
  5583. },
  5584. {
  5585. "in": "query",
  5586. "name": "type",
  5587. "schema": {
  5588. "type": "string",
  5589. "enum": ["file", "directory"]
  5590. }
  5591. },
  5592. {
  5593. "in": "query",
  5594. "name": "limit",
  5595. "schema": {
  5596. "type": "integer",
  5597. "minimum": 1,
  5598. "maximum": 200
  5599. }
  5600. }
  5601. ],
  5602. "summary": "Find files",
  5603. "description": "Search for files or directories by name or pattern in the project directory.",
  5604. "responses": {
  5605. "200": {
  5606. "description": "File paths",
  5607. "content": {
  5608. "application/json": {
  5609. "schema": {
  5610. "type": "array",
  5611. "items": {
  5612. "type": "string"
  5613. }
  5614. }
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "x-codeSamples": [
  5620. {
  5621. "lang": "js",
  5622. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  5623. }
  5624. ]
  5625. }
  5626. },
  5627. "/find/symbol": {
  5628. "get": {
  5629. "operationId": "find.symbols",
  5630. "parameters": [
  5631. {
  5632. "in": "query",
  5633. "name": "directory",
  5634. "schema": {
  5635. "type": "string"
  5636. }
  5637. },
  5638. {
  5639. "in": "query",
  5640. "name": "workspace",
  5641. "schema": {
  5642. "type": "string"
  5643. }
  5644. },
  5645. {
  5646. "in": "query",
  5647. "name": "query",
  5648. "schema": {
  5649. "type": "string"
  5650. },
  5651. "required": true
  5652. }
  5653. ],
  5654. "summary": "Find symbols",
  5655. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  5656. "responses": {
  5657. "200": {
  5658. "description": "Symbols",
  5659. "content": {
  5660. "application/json": {
  5661. "schema": {
  5662. "type": "array",
  5663. "items": {
  5664. "$ref": "#/components/schemas/Symbol"
  5665. }
  5666. }
  5667. }
  5668. }
  5669. }
  5670. },
  5671. "x-codeSamples": [
  5672. {
  5673. "lang": "js",
  5674. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  5675. }
  5676. ]
  5677. }
  5678. },
  5679. "/file": {
  5680. "get": {
  5681. "operationId": "file.list",
  5682. "parameters": [
  5683. {
  5684. "in": "query",
  5685. "name": "directory",
  5686. "schema": {
  5687. "type": "string"
  5688. }
  5689. },
  5690. {
  5691. "in": "query",
  5692. "name": "workspace",
  5693. "schema": {
  5694. "type": "string"
  5695. }
  5696. },
  5697. {
  5698. "in": "query",
  5699. "name": "path",
  5700. "schema": {
  5701. "type": "string"
  5702. },
  5703. "required": true
  5704. }
  5705. ],
  5706. "summary": "List files",
  5707. "description": "List files and directories in a specified path.",
  5708. "responses": {
  5709. "200": {
  5710. "description": "Files and directories",
  5711. "content": {
  5712. "application/json": {
  5713. "schema": {
  5714. "type": "array",
  5715. "items": {
  5716. "$ref": "#/components/schemas/FileNode"
  5717. }
  5718. }
  5719. }
  5720. }
  5721. }
  5722. },
  5723. "x-codeSamples": [
  5724. {
  5725. "lang": "js",
  5726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  5727. }
  5728. ]
  5729. }
  5730. },
  5731. "/file/content": {
  5732. "get": {
  5733. "operationId": "file.read",
  5734. "parameters": [
  5735. {
  5736. "in": "query",
  5737. "name": "directory",
  5738. "schema": {
  5739. "type": "string"
  5740. }
  5741. },
  5742. {
  5743. "in": "query",
  5744. "name": "workspace",
  5745. "schema": {
  5746. "type": "string"
  5747. }
  5748. },
  5749. {
  5750. "in": "query",
  5751. "name": "path",
  5752. "schema": {
  5753. "type": "string"
  5754. },
  5755. "required": true
  5756. }
  5757. ],
  5758. "summary": "Read file",
  5759. "description": "Read the content of a specified file.",
  5760. "responses": {
  5761. "200": {
  5762. "description": "File content",
  5763. "content": {
  5764. "application/json": {
  5765. "schema": {
  5766. "$ref": "#/components/schemas/FileContent"
  5767. }
  5768. }
  5769. }
  5770. }
  5771. },
  5772. "x-codeSamples": [
  5773. {
  5774. "lang": "js",
  5775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  5776. }
  5777. ]
  5778. }
  5779. },
  5780. "/file/status": {
  5781. "get": {
  5782. "operationId": "file.status",
  5783. "parameters": [
  5784. {
  5785. "in": "query",
  5786. "name": "directory",
  5787. "schema": {
  5788. "type": "string"
  5789. }
  5790. },
  5791. {
  5792. "in": "query",
  5793. "name": "workspace",
  5794. "schema": {
  5795. "type": "string"
  5796. }
  5797. }
  5798. ],
  5799. "summary": "Get file status",
  5800. "description": "Get the git status of all files in the project.",
  5801. "responses": {
  5802. "200": {
  5803. "description": "File status",
  5804. "content": {
  5805. "application/json": {
  5806. "schema": {
  5807. "type": "array",
  5808. "items": {
  5809. "$ref": "#/components/schemas/File"
  5810. }
  5811. }
  5812. }
  5813. }
  5814. }
  5815. },
  5816. "x-codeSamples": [
  5817. {
  5818. "lang": "js",
  5819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  5820. }
  5821. ]
  5822. }
  5823. },
  5824. "/event": {
  5825. "get": {
  5826. "operationId": "event.subscribe",
  5827. "parameters": [
  5828. {
  5829. "in": "query",
  5830. "name": "directory",
  5831. "schema": {
  5832. "type": "string"
  5833. }
  5834. },
  5835. {
  5836. "in": "query",
  5837. "name": "workspace",
  5838. "schema": {
  5839. "type": "string"
  5840. }
  5841. }
  5842. ],
  5843. "summary": "Subscribe to events",
  5844. "description": "Get events",
  5845. "responses": {
  5846. "200": {
  5847. "description": "Event stream",
  5848. "content": {
  5849. "text/event-stream": {
  5850. "schema": {
  5851. "$ref": "#/components/schemas/Event"
  5852. }
  5853. }
  5854. }
  5855. }
  5856. },
  5857. "x-codeSamples": [
  5858. {
  5859. "lang": "js",
  5860. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  5861. }
  5862. ]
  5863. }
  5864. },
  5865. "/mcp": {
  5866. "get": {
  5867. "operationId": "mcp.status",
  5868. "parameters": [
  5869. {
  5870. "in": "query",
  5871. "name": "directory",
  5872. "schema": {
  5873. "type": "string"
  5874. }
  5875. },
  5876. {
  5877. "in": "query",
  5878. "name": "workspace",
  5879. "schema": {
  5880. "type": "string"
  5881. }
  5882. }
  5883. ],
  5884. "summary": "Get MCP status",
  5885. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  5886. "responses": {
  5887. "200": {
  5888. "description": "MCP server status",
  5889. "content": {
  5890. "application/json": {
  5891. "schema": {
  5892. "type": "object",
  5893. "propertyNames": {
  5894. "type": "string"
  5895. },
  5896. "additionalProperties": {
  5897. "$ref": "#/components/schemas/MCPStatus"
  5898. }
  5899. }
  5900. }
  5901. }
  5902. }
  5903. },
  5904. "x-codeSamples": [
  5905. {
  5906. "lang": "js",
  5907. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  5908. }
  5909. ]
  5910. },
  5911. "post": {
  5912. "operationId": "mcp.add",
  5913. "parameters": [
  5914. {
  5915. "in": "query",
  5916. "name": "directory",
  5917. "schema": {
  5918. "type": "string"
  5919. }
  5920. },
  5921. {
  5922. "in": "query",
  5923. "name": "workspace",
  5924. "schema": {
  5925. "type": "string"
  5926. }
  5927. }
  5928. ],
  5929. "summary": "Add MCP server",
  5930. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  5931. "responses": {
  5932. "200": {
  5933. "description": "MCP server added successfully",
  5934. "content": {
  5935. "application/json": {
  5936. "schema": {
  5937. "type": "object",
  5938. "propertyNames": {
  5939. "type": "string"
  5940. },
  5941. "additionalProperties": {
  5942. "$ref": "#/components/schemas/MCPStatus"
  5943. }
  5944. }
  5945. }
  5946. }
  5947. },
  5948. "400": {
  5949. "description": "Bad request",
  5950. "content": {
  5951. "application/json": {
  5952. "schema": {
  5953. "$ref": "#/components/schemas/BadRequestError"
  5954. }
  5955. }
  5956. }
  5957. }
  5958. },
  5959. "requestBody": {
  5960. "content": {
  5961. "application/json": {
  5962. "schema": {
  5963. "type": "object",
  5964. "properties": {
  5965. "name": {
  5966. "type": "string"
  5967. },
  5968. "config": {
  5969. "anyOf": [
  5970. {
  5971. "$ref": "#/components/schemas/McpLocalConfig"
  5972. },
  5973. {
  5974. "$ref": "#/components/schemas/McpRemoteConfig"
  5975. }
  5976. ]
  5977. }
  5978. },
  5979. "required": ["name", "config"]
  5980. }
  5981. }
  5982. }
  5983. },
  5984. "x-codeSamples": [
  5985. {
  5986. "lang": "js",
  5987. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  5988. }
  5989. ]
  5990. }
  5991. },
  5992. "/mcp/{name}/auth": {
  5993. "post": {
  5994. "operationId": "mcp.auth.start",
  5995. "parameters": [
  5996. {
  5997. "in": "query",
  5998. "name": "directory",
  5999. "schema": {
  6000. "type": "string"
  6001. }
  6002. },
  6003. {
  6004. "in": "query",
  6005. "name": "workspace",
  6006. "schema": {
  6007. "type": "string"
  6008. }
  6009. },
  6010. {
  6011. "schema": {
  6012. "type": "string"
  6013. },
  6014. "in": "path",
  6015. "name": "name",
  6016. "required": true
  6017. }
  6018. ],
  6019. "summary": "Start MCP OAuth",
  6020. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  6021. "responses": {
  6022. "200": {
  6023. "description": "OAuth flow started",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "type": "object",
  6028. "properties": {
  6029. "authorizationUrl": {
  6030. "description": "URL to open in browser for authorization",
  6031. "type": "string"
  6032. }
  6033. },
  6034. "required": ["authorizationUrl"]
  6035. }
  6036. }
  6037. }
  6038. },
  6039. "400": {
  6040. "description": "Bad request",
  6041. "content": {
  6042. "application/json": {
  6043. "schema": {
  6044. "$ref": "#/components/schemas/BadRequestError"
  6045. }
  6046. }
  6047. }
  6048. },
  6049. "404": {
  6050. "description": "Not found",
  6051. "content": {
  6052. "application/json": {
  6053. "schema": {
  6054. "$ref": "#/components/schemas/NotFoundError"
  6055. }
  6056. }
  6057. }
  6058. }
  6059. },
  6060. "x-codeSamples": [
  6061. {
  6062. "lang": "js",
  6063. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  6064. }
  6065. ]
  6066. },
  6067. "delete": {
  6068. "operationId": "mcp.auth.remove",
  6069. "parameters": [
  6070. {
  6071. "in": "query",
  6072. "name": "directory",
  6073. "schema": {
  6074. "type": "string"
  6075. }
  6076. },
  6077. {
  6078. "in": "query",
  6079. "name": "workspace",
  6080. "schema": {
  6081. "type": "string"
  6082. }
  6083. },
  6084. {
  6085. "schema": {
  6086. "type": "string"
  6087. },
  6088. "in": "path",
  6089. "name": "name",
  6090. "required": true
  6091. }
  6092. ],
  6093. "summary": "Remove MCP OAuth",
  6094. "description": "Remove OAuth credentials for an MCP server",
  6095. "responses": {
  6096. "200": {
  6097. "description": "OAuth credentials removed",
  6098. "content": {
  6099. "application/json": {
  6100. "schema": {
  6101. "type": "object",
  6102. "properties": {
  6103. "success": {
  6104. "type": "boolean",
  6105. "const": true
  6106. }
  6107. },
  6108. "required": ["success"]
  6109. }
  6110. }
  6111. }
  6112. },
  6113. "404": {
  6114. "description": "Not found",
  6115. "content": {
  6116. "application/json": {
  6117. "schema": {
  6118. "$ref": "#/components/schemas/NotFoundError"
  6119. }
  6120. }
  6121. }
  6122. }
  6123. },
  6124. "x-codeSamples": [
  6125. {
  6126. "lang": "js",
  6127. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  6128. }
  6129. ]
  6130. }
  6131. },
  6132. "/mcp/{name}/auth/callback": {
  6133. "post": {
  6134. "operationId": "mcp.auth.callback",
  6135. "parameters": [
  6136. {
  6137. "in": "query",
  6138. "name": "directory",
  6139. "schema": {
  6140. "type": "string"
  6141. }
  6142. },
  6143. {
  6144. "in": "query",
  6145. "name": "workspace",
  6146. "schema": {
  6147. "type": "string"
  6148. }
  6149. },
  6150. {
  6151. "schema": {
  6152. "type": "string"
  6153. },
  6154. "in": "path",
  6155. "name": "name",
  6156. "required": true
  6157. }
  6158. ],
  6159. "summary": "Complete MCP OAuth",
  6160. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  6161. "responses": {
  6162. "200": {
  6163. "description": "OAuth authentication completed",
  6164. "content": {
  6165. "application/json": {
  6166. "schema": {
  6167. "$ref": "#/components/schemas/MCPStatus"
  6168. }
  6169. }
  6170. }
  6171. },
  6172. "400": {
  6173. "description": "Bad request",
  6174. "content": {
  6175. "application/json": {
  6176. "schema": {
  6177. "$ref": "#/components/schemas/BadRequestError"
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "404": {
  6183. "description": "Not found",
  6184. "content": {
  6185. "application/json": {
  6186. "schema": {
  6187. "$ref": "#/components/schemas/NotFoundError"
  6188. }
  6189. }
  6190. }
  6191. }
  6192. },
  6193. "requestBody": {
  6194. "content": {
  6195. "application/json": {
  6196. "schema": {
  6197. "type": "object",
  6198. "properties": {
  6199. "code": {
  6200. "description": "Authorization code from OAuth callback",
  6201. "type": "string"
  6202. }
  6203. },
  6204. "required": ["code"]
  6205. }
  6206. }
  6207. }
  6208. },
  6209. "x-codeSamples": [
  6210. {
  6211. "lang": "js",
  6212. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  6213. }
  6214. ]
  6215. }
  6216. },
  6217. "/mcp/{name}/auth/authenticate": {
  6218. "post": {
  6219. "operationId": "mcp.auth.authenticate",
  6220. "parameters": [
  6221. {
  6222. "in": "query",
  6223. "name": "directory",
  6224. "schema": {
  6225. "type": "string"
  6226. }
  6227. },
  6228. {
  6229. "in": "query",
  6230. "name": "workspace",
  6231. "schema": {
  6232. "type": "string"
  6233. }
  6234. },
  6235. {
  6236. "schema": {
  6237. "type": "string"
  6238. },
  6239. "in": "path",
  6240. "name": "name",
  6241. "required": true
  6242. }
  6243. ],
  6244. "summary": "Authenticate MCP OAuth",
  6245. "description": "Start OAuth flow and wait for callback (opens browser)",
  6246. "responses": {
  6247. "200": {
  6248. "description": "OAuth authentication completed",
  6249. "content": {
  6250. "application/json": {
  6251. "schema": {
  6252. "$ref": "#/components/schemas/MCPStatus"
  6253. }
  6254. }
  6255. }
  6256. },
  6257. "400": {
  6258. "description": "Bad request",
  6259. "content": {
  6260. "application/json": {
  6261. "schema": {
  6262. "$ref": "#/components/schemas/BadRequestError"
  6263. }
  6264. }
  6265. }
  6266. },
  6267. "404": {
  6268. "description": "Not found",
  6269. "content": {
  6270. "application/json": {
  6271. "schema": {
  6272. "$ref": "#/components/schemas/NotFoundError"
  6273. }
  6274. }
  6275. }
  6276. }
  6277. },
  6278. "x-codeSamples": [
  6279. {
  6280. "lang": "js",
  6281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  6282. }
  6283. ]
  6284. }
  6285. },
  6286. "/mcp/{name}/connect": {
  6287. "post": {
  6288. "operationId": "mcp.connect",
  6289. "parameters": [
  6290. {
  6291. "in": "query",
  6292. "name": "directory",
  6293. "schema": {
  6294. "type": "string"
  6295. }
  6296. },
  6297. {
  6298. "in": "query",
  6299. "name": "workspace",
  6300. "schema": {
  6301. "type": "string"
  6302. }
  6303. },
  6304. {
  6305. "in": "path",
  6306. "name": "name",
  6307. "schema": {
  6308. "type": "string"
  6309. },
  6310. "required": true
  6311. }
  6312. ],
  6313. "description": "Connect an MCP server",
  6314. "responses": {
  6315. "200": {
  6316. "description": "MCP server connected successfully",
  6317. "content": {
  6318. "application/json": {
  6319. "schema": {
  6320. "type": "boolean"
  6321. }
  6322. }
  6323. }
  6324. }
  6325. },
  6326. "x-codeSamples": [
  6327. {
  6328. "lang": "js",
  6329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  6330. }
  6331. ]
  6332. }
  6333. },
  6334. "/mcp/{name}/disconnect": {
  6335. "post": {
  6336. "operationId": "mcp.disconnect",
  6337. "parameters": [
  6338. {
  6339. "in": "query",
  6340. "name": "directory",
  6341. "schema": {
  6342. "type": "string"
  6343. }
  6344. },
  6345. {
  6346. "in": "query",
  6347. "name": "workspace",
  6348. "schema": {
  6349. "type": "string"
  6350. }
  6351. },
  6352. {
  6353. "in": "path",
  6354. "name": "name",
  6355. "schema": {
  6356. "type": "string"
  6357. },
  6358. "required": true
  6359. }
  6360. ],
  6361. "description": "Disconnect an MCP server",
  6362. "responses": {
  6363. "200": {
  6364. "description": "MCP server disconnected successfully",
  6365. "content": {
  6366. "application/json": {
  6367. "schema": {
  6368. "type": "boolean"
  6369. }
  6370. }
  6371. }
  6372. }
  6373. },
  6374. "x-codeSamples": [
  6375. {
  6376. "lang": "js",
  6377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  6378. }
  6379. ]
  6380. }
  6381. },
  6382. "/tui/append-prompt": {
  6383. "post": {
  6384. "operationId": "tui.appendPrompt",
  6385. "parameters": [
  6386. {
  6387. "in": "query",
  6388. "name": "directory",
  6389. "schema": {
  6390. "type": "string"
  6391. }
  6392. },
  6393. {
  6394. "in": "query",
  6395. "name": "workspace",
  6396. "schema": {
  6397. "type": "string"
  6398. }
  6399. }
  6400. ],
  6401. "summary": "Append TUI prompt",
  6402. "description": "Append prompt to the TUI",
  6403. "responses": {
  6404. "200": {
  6405. "description": "Prompt processed successfully",
  6406. "content": {
  6407. "application/json": {
  6408. "schema": {
  6409. "type": "boolean"
  6410. }
  6411. }
  6412. }
  6413. },
  6414. "400": {
  6415. "description": "Bad request",
  6416. "content": {
  6417. "application/json": {
  6418. "schema": {
  6419. "$ref": "#/components/schemas/BadRequestError"
  6420. }
  6421. }
  6422. }
  6423. }
  6424. },
  6425. "requestBody": {
  6426. "content": {
  6427. "application/json": {
  6428. "schema": {
  6429. "type": "object",
  6430. "properties": {
  6431. "text": {
  6432. "type": "string"
  6433. }
  6434. },
  6435. "required": ["text"]
  6436. }
  6437. }
  6438. }
  6439. },
  6440. "x-codeSamples": [
  6441. {
  6442. "lang": "js",
  6443. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  6444. }
  6445. ]
  6446. }
  6447. },
  6448. "/tui/open-help": {
  6449. "post": {
  6450. "operationId": "tui.openHelp",
  6451. "parameters": [
  6452. {
  6453. "in": "query",
  6454. "name": "directory",
  6455. "schema": {
  6456. "type": "string"
  6457. }
  6458. },
  6459. {
  6460. "in": "query",
  6461. "name": "workspace",
  6462. "schema": {
  6463. "type": "string"
  6464. }
  6465. }
  6466. ],
  6467. "summary": "Open help dialog",
  6468. "description": "Open the help dialog in the TUI to display user assistance information.",
  6469. "responses": {
  6470. "200": {
  6471. "description": "Help dialog opened successfully",
  6472. "content": {
  6473. "application/json": {
  6474. "schema": {
  6475. "type": "boolean"
  6476. }
  6477. }
  6478. }
  6479. }
  6480. },
  6481. "x-codeSamples": [
  6482. {
  6483. "lang": "js",
  6484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  6485. }
  6486. ]
  6487. }
  6488. },
  6489. "/tui/open-sessions": {
  6490. "post": {
  6491. "operationId": "tui.openSessions",
  6492. "parameters": [
  6493. {
  6494. "in": "query",
  6495. "name": "directory",
  6496. "schema": {
  6497. "type": "string"
  6498. }
  6499. },
  6500. {
  6501. "in": "query",
  6502. "name": "workspace",
  6503. "schema": {
  6504. "type": "string"
  6505. }
  6506. }
  6507. ],
  6508. "summary": "Open sessions dialog",
  6509. "description": "Open the session dialog",
  6510. "responses": {
  6511. "200": {
  6512. "description": "Session dialog opened successfully",
  6513. "content": {
  6514. "application/json": {
  6515. "schema": {
  6516. "type": "boolean"
  6517. }
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "x-codeSamples": [
  6523. {
  6524. "lang": "js",
  6525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  6526. }
  6527. ]
  6528. }
  6529. },
  6530. "/tui/open-themes": {
  6531. "post": {
  6532. "operationId": "tui.openThemes",
  6533. "parameters": [
  6534. {
  6535. "in": "query",
  6536. "name": "directory",
  6537. "schema": {
  6538. "type": "string"
  6539. }
  6540. },
  6541. {
  6542. "in": "query",
  6543. "name": "workspace",
  6544. "schema": {
  6545. "type": "string"
  6546. }
  6547. }
  6548. ],
  6549. "summary": "Open themes dialog",
  6550. "description": "Open the theme dialog",
  6551. "responses": {
  6552. "200": {
  6553. "description": "Theme dialog opened successfully",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "type": "boolean"
  6558. }
  6559. }
  6560. }
  6561. }
  6562. },
  6563. "x-codeSamples": [
  6564. {
  6565. "lang": "js",
  6566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  6567. }
  6568. ]
  6569. }
  6570. },
  6571. "/tui/open-models": {
  6572. "post": {
  6573. "operationId": "tui.openModels",
  6574. "parameters": [
  6575. {
  6576. "in": "query",
  6577. "name": "directory",
  6578. "schema": {
  6579. "type": "string"
  6580. }
  6581. },
  6582. {
  6583. "in": "query",
  6584. "name": "workspace",
  6585. "schema": {
  6586. "type": "string"
  6587. }
  6588. }
  6589. ],
  6590. "summary": "Open models dialog",
  6591. "description": "Open the model dialog",
  6592. "responses": {
  6593. "200": {
  6594. "description": "Model dialog opened successfully",
  6595. "content": {
  6596. "application/json": {
  6597. "schema": {
  6598. "type": "boolean"
  6599. }
  6600. }
  6601. }
  6602. }
  6603. },
  6604. "x-codeSamples": [
  6605. {
  6606. "lang": "js",
  6607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  6608. }
  6609. ]
  6610. }
  6611. },
  6612. "/tui/submit-prompt": {
  6613. "post": {
  6614. "operationId": "tui.submitPrompt",
  6615. "parameters": [
  6616. {
  6617. "in": "query",
  6618. "name": "directory",
  6619. "schema": {
  6620. "type": "string"
  6621. }
  6622. },
  6623. {
  6624. "in": "query",
  6625. "name": "workspace",
  6626. "schema": {
  6627. "type": "string"
  6628. }
  6629. }
  6630. ],
  6631. "summary": "Submit TUI prompt",
  6632. "description": "Submit the prompt",
  6633. "responses": {
  6634. "200": {
  6635. "description": "Prompt submitted successfully",
  6636. "content": {
  6637. "application/json": {
  6638. "schema": {
  6639. "type": "boolean"
  6640. }
  6641. }
  6642. }
  6643. }
  6644. },
  6645. "x-codeSamples": [
  6646. {
  6647. "lang": "js",
  6648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  6649. }
  6650. ]
  6651. }
  6652. },
  6653. "/tui/clear-prompt": {
  6654. "post": {
  6655. "operationId": "tui.clearPrompt",
  6656. "parameters": [
  6657. {
  6658. "in": "query",
  6659. "name": "directory",
  6660. "schema": {
  6661. "type": "string"
  6662. }
  6663. },
  6664. {
  6665. "in": "query",
  6666. "name": "workspace",
  6667. "schema": {
  6668. "type": "string"
  6669. }
  6670. }
  6671. ],
  6672. "summary": "Clear TUI prompt",
  6673. "description": "Clear the prompt",
  6674. "responses": {
  6675. "200": {
  6676. "description": "Prompt cleared successfully",
  6677. "content": {
  6678. "application/json": {
  6679. "schema": {
  6680. "type": "boolean"
  6681. }
  6682. }
  6683. }
  6684. }
  6685. },
  6686. "x-codeSamples": [
  6687. {
  6688. "lang": "js",
  6689. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  6690. }
  6691. ]
  6692. }
  6693. },
  6694. "/tui/execute-command": {
  6695. "post": {
  6696. "operationId": "tui.executeCommand",
  6697. "parameters": [
  6698. {
  6699. "in": "query",
  6700. "name": "directory",
  6701. "schema": {
  6702. "type": "string"
  6703. }
  6704. },
  6705. {
  6706. "in": "query",
  6707. "name": "workspace",
  6708. "schema": {
  6709. "type": "string"
  6710. }
  6711. }
  6712. ],
  6713. "summary": "Execute TUI command",
  6714. "description": "Execute a TUI command (e.g. agent_cycle)",
  6715. "responses": {
  6716. "200": {
  6717. "description": "Command executed successfully",
  6718. "content": {
  6719. "application/json": {
  6720. "schema": {
  6721. "type": "boolean"
  6722. }
  6723. }
  6724. }
  6725. },
  6726. "400": {
  6727. "description": "Bad request",
  6728. "content": {
  6729. "application/json": {
  6730. "schema": {
  6731. "$ref": "#/components/schemas/BadRequestError"
  6732. }
  6733. }
  6734. }
  6735. }
  6736. },
  6737. "requestBody": {
  6738. "content": {
  6739. "application/json": {
  6740. "schema": {
  6741. "type": "object",
  6742. "properties": {
  6743. "command": {
  6744. "type": "string"
  6745. }
  6746. },
  6747. "required": ["command"]
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "x-codeSamples": [
  6753. {
  6754. "lang": "js",
  6755. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  6756. }
  6757. ]
  6758. }
  6759. },
  6760. "/tui/show-toast": {
  6761. "post": {
  6762. "operationId": "tui.showToast",
  6763. "parameters": [
  6764. {
  6765. "in": "query",
  6766. "name": "directory",
  6767. "schema": {
  6768. "type": "string"
  6769. }
  6770. },
  6771. {
  6772. "in": "query",
  6773. "name": "workspace",
  6774. "schema": {
  6775. "type": "string"
  6776. }
  6777. }
  6778. ],
  6779. "summary": "Show TUI toast",
  6780. "description": "Show a toast notification in the TUI",
  6781. "responses": {
  6782. "200": {
  6783. "description": "Toast notification shown successfully",
  6784. "content": {
  6785. "application/json": {
  6786. "schema": {
  6787. "type": "boolean"
  6788. }
  6789. }
  6790. }
  6791. }
  6792. },
  6793. "requestBody": {
  6794. "content": {
  6795. "application/json": {
  6796. "schema": {
  6797. "type": "object",
  6798. "properties": {
  6799. "title": {
  6800. "type": "string"
  6801. },
  6802. "message": {
  6803. "type": "string"
  6804. },
  6805. "variant": {
  6806. "type": "string",
  6807. "enum": ["info", "success", "warning", "error"]
  6808. },
  6809. "duration": {
  6810. "description": "Duration in milliseconds",
  6811. "default": 5000,
  6812. "type": "number"
  6813. }
  6814. },
  6815. "required": ["message", "variant"]
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "x-codeSamples": [
  6821. {
  6822. "lang": "js",
  6823. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  6824. }
  6825. ]
  6826. }
  6827. },
  6828. "/tui/publish": {
  6829. "post": {
  6830. "operationId": "tui.publish",
  6831. "parameters": [
  6832. {
  6833. "in": "query",
  6834. "name": "directory",
  6835. "schema": {
  6836. "type": "string"
  6837. }
  6838. },
  6839. {
  6840. "in": "query",
  6841. "name": "workspace",
  6842. "schema": {
  6843. "type": "string"
  6844. }
  6845. }
  6846. ],
  6847. "summary": "Publish TUI event",
  6848. "description": "Publish a TUI event",
  6849. "responses": {
  6850. "200": {
  6851. "description": "Event published successfully",
  6852. "content": {
  6853. "application/json": {
  6854. "schema": {
  6855. "type": "boolean"
  6856. }
  6857. }
  6858. }
  6859. },
  6860. "400": {
  6861. "description": "Bad request",
  6862. "content": {
  6863. "application/json": {
  6864. "schema": {
  6865. "$ref": "#/components/schemas/BadRequestError"
  6866. }
  6867. }
  6868. }
  6869. }
  6870. },
  6871. "requestBody": {
  6872. "content": {
  6873. "application/json": {
  6874. "schema": {
  6875. "anyOf": [
  6876. {
  6877. "$ref": "#/components/schemas/Event.tui.prompt.append"
  6878. },
  6879. {
  6880. "$ref": "#/components/schemas/Event.tui.command.execute"
  6881. },
  6882. {
  6883. "$ref": "#/components/schemas/Event.tui.toast.show"
  6884. },
  6885. {
  6886. "$ref": "#/components/schemas/Event.tui.session.select"
  6887. }
  6888. ]
  6889. }
  6890. }
  6891. }
  6892. },
  6893. "x-codeSamples": [
  6894. {
  6895. "lang": "js",
  6896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  6897. }
  6898. ]
  6899. }
  6900. },
  6901. "/tui/select-session": {
  6902. "post": {
  6903. "operationId": "tui.selectSession",
  6904. "parameters": [
  6905. {
  6906. "in": "query",
  6907. "name": "directory",
  6908. "schema": {
  6909. "type": "string"
  6910. }
  6911. },
  6912. {
  6913. "in": "query",
  6914. "name": "workspace",
  6915. "schema": {
  6916. "type": "string"
  6917. }
  6918. }
  6919. ],
  6920. "summary": "Select session",
  6921. "description": "Navigate the TUI to display the specified session.",
  6922. "responses": {
  6923. "200": {
  6924. "description": "Session selected successfully",
  6925. "content": {
  6926. "application/json": {
  6927. "schema": {
  6928. "type": "boolean"
  6929. }
  6930. }
  6931. }
  6932. },
  6933. "400": {
  6934. "description": "Bad request",
  6935. "content": {
  6936. "application/json": {
  6937. "schema": {
  6938. "$ref": "#/components/schemas/BadRequestError"
  6939. }
  6940. }
  6941. }
  6942. },
  6943. "404": {
  6944. "description": "Not found",
  6945. "content": {
  6946. "application/json": {
  6947. "schema": {
  6948. "$ref": "#/components/schemas/NotFoundError"
  6949. }
  6950. }
  6951. }
  6952. }
  6953. },
  6954. "requestBody": {
  6955. "content": {
  6956. "application/json": {
  6957. "schema": {
  6958. "type": "object",
  6959. "properties": {
  6960. "sessionID": {
  6961. "description": "Session ID to navigate to",
  6962. "type": "string",
  6963. "pattern": "^ses.*"
  6964. }
  6965. },
  6966. "required": ["sessionID"]
  6967. }
  6968. }
  6969. }
  6970. },
  6971. "x-codeSamples": [
  6972. {
  6973. "lang": "js",
  6974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  6975. }
  6976. ]
  6977. }
  6978. },
  6979. "/tui/control/next": {
  6980. "get": {
  6981. "operationId": "tui.control.next",
  6982. "parameters": [
  6983. {
  6984. "in": "query",
  6985. "name": "directory",
  6986. "schema": {
  6987. "type": "string"
  6988. }
  6989. },
  6990. {
  6991. "in": "query",
  6992. "name": "workspace",
  6993. "schema": {
  6994. "type": "string"
  6995. }
  6996. }
  6997. ],
  6998. "summary": "Get next TUI request",
  6999. "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
  7000. "responses": {
  7001. "200": {
  7002. "description": "Next TUI request",
  7003. "content": {
  7004. "application/json": {
  7005. "schema": {
  7006. "type": "object",
  7007. "properties": {
  7008. "path": {
  7009. "type": "string"
  7010. },
  7011. "body": {}
  7012. },
  7013. "required": ["path", "body"]
  7014. }
  7015. }
  7016. }
  7017. }
  7018. },
  7019. "x-codeSamples": [
  7020. {
  7021. "lang": "js",
  7022. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  7023. }
  7024. ]
  7025. }
  7026. },
  7027. "/tui/control/response": {
  7028. "post": {
  7029. "operationId": "tui.control.response",
  7030. "parameters": [
  7031. {
  7032. "in": "query",
  7033. "name": "directory",
  7034. "schema": {
  7035. "type": "string"
  7036. }
  7037. },
  7038. {
  7039. "in": "query",
  7040. "name": "workspace",
  7041. "schema": {
  7042. "type": "string"
  7043. }
  7044. }
  7045. ],
  7046. "summary": "Submit TUI response",
  7047. "description": "Submit a response to the TUI request queue to complete a pending request.",
  7048. "responses": {
  7049. "200": {
  7050. "description": "Response submitted successfully",
  7051. "content": {
  7052. "application/json": {
  7053. "schema": {
  7054. "type": "boolean"
  7055. }
  7056. }
  7057. }
  7058. }
  7059. },
  7060. "requestBody": {
  7061. "content": {
  7062. "application/json": {
  7063. "schema": {}
  7064. }
  7065. }
  7066. },
  7067. "x-codeSamples": [
  7068. {
  7069. "lang": "js",
  7070. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  7071. }
  7072. ]
  7073. }
  7074. },
  7075. "/instance/dispose": {
  7076. "post": {
  7077. "operationId": "instance.dispose",
  7078. "parameters": [
  7079. {
  7080. "in": "query",
  7081. "name": "directory",
  7082. "schema": {
  7083. "type": "string"
  7084. }
  7085. },
  7086. {
  7087. "in": "query",
  7088. "name": "workspace",
  7089. "schema": {
  7090. "type": "string"
  7091. }
  7092. }
  7093. ],
  7094. "summary": "Dispose instance",
  7095. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  7096. "responses": {
  7097. "200": {
  7098. "description": "Instance disposed",
  7099. "content": {
  7100. "application/json": {
  7101. "schema": {
  7102. "type": "boolean"
  7103. }
  7104. }
  7105. }
  7106. }
  7107. },
  7108. "x-codeSamples": [
  7109. {
  7110. "lang": "js",
  7111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  7112. }
  7113. ]
  7114. }
  7115. },
  7116. "/path": {
  7117. "get": {
  7118. "operationId": "path.get",
  7119. "parameters": [
  7120. {
  7121. "in": "query",
  7122. "name": "directory",
  7123. "schema": {
  7124. "type": "string"
  7125. }
  7126. },
  7127. {
  7128. "in": "query",
  7129. "name": "workspace",
  7130. "schema": {
  7131. "type": "string"
  7132. }
  7133. }
  7134. ],
  7135. "summary": "Get paths",
  7136. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  7137. "responses": {
  7138. "200": {
  7139. "description": "Path",
  7140. "content": {
  7141. "application/json": {
  7142. "schema": {
  7143. "$ref": "#/components/schemas/Path"
  7144. }
  7145. }
  7146. }
  7147. }
  7148. },
  7149. "x-codeSamples": [
  7150. {
  7151. "lang": "js",
  7152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  7153. }
  7154. ]
  7155. }
  7156. },
  7157. "/vcs": {
  7158. "get": {
  7159. "operationId": "vcs.get",
  7160. "parameters": [
  7161. {
  7162. "in": "query",
  7163. "name": "directory",
  7164. "schema": {
  7165. "type": "string"
  7166. }
  7167. },
  7168. {
  7169. "in": "query",
  7170. "name": "workspace",
  7171. "schema": {
  7172. "type": "string"
  7173. }
  7174. }
  7175. ],
  7176. "summary": "Get VCS info",
  7177. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  7178. "responses": {
  7179. "200": {
  7180. "description": "VCS info",
  7181. "content": {
  7182. "application/json": {
  7183. "schema": {
  7184. "$ref": "#/components/schemas/VcsInfo"
  7185. }
  7186. }
  7187. }
  7188. }
  7189. },
  7190. "x-codeSamples": [
  7191. {
  7192. "lang": "js",
  7193. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  7194. }
  7195. ]
  7196. }
  7197. },
  7198. "/vcs/diff": {
  7199. "get": {
  7200. "operationId": "vcs.diff",
  7201. "parameters": [
  7202. {
  7203. "in": "query",
  7204. "name": "directory",
  7205. "schema": {
  7206. "type": "string"
  7207. }
  7208. },
  7209. {
  7210. "in": "query",
  7211. "name": "workspace",
  7212. "schema": {
  7213. "type": "string"
  7214. }
  7215. },
  7216. {
  7217. "in": "query",
  7218. "name": "mode",
  7219. "schema": {
  7220. "type": "string",
  7221. "enum": ["git", "branch"]
  7222. },
  7223. "required": true
  7224. }
  7225. ],
  7226. "summary": "Get VCS diff",
  7227. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  7228. "responses": {
  7229. "200": {
  7230. "description": "VCS diff",
  7231. "content": {
  7232. "application/json": {
  7233. "schema": {
  7234. "type": "array",
  7235. "items": {
  7236. "$ref": "#/components/schemas/VcsFileDiff"
  7237. }
  7238. }
  7239. }
  7240. }
  7241. }
  7242. },
  7243. "x-codeSamples": [
  7244. {
  7245. "lang": "js",
  7246. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  7247. }
  7248. ]
  7249. }
  7250. },
  7251. "/command": {
  7252. "get": {
  7253. "operationId": "command.list",
  7254. "parameters": [
  7255. {
  7256. "in": "query",
  7257. "name": "directory",
  7258. "schema": {
  7259. "type": "string"
  7260. }
  7261. },
  7262. {
  7263. "in": "query",
  7264. "name": "workspace",
  7265. "schema": {
  7266. "type": "string"
  7267. }
  7268. }
  7269. ],
  7270. "summary": "List commands",
  7271. "description": "Get a list of all available commands in the OpenCode system.",
  7272. "responses": {
  7273. "200": {
  7274. "description": "List of commands",
  7275. "content": {
  7276. "application/json": {
  7277. "schema": {
  7278. "type": "array",
  7279. "items": {
  7280. "$ref": "#/components/schemas/Command"
  7281. }
  7282. }
  7283. }
  7284. }
  7285. }
  7286. },
  7287. "x-codeSamples": [
  7288. {
  7289. "lang": "js",
  7290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  7291. }
  7292. ]
  7293. }
  7294. },
  7295. "/agent": {
  7296. "get": {
  7297. "operationId": "app.agents",
  7298. "parameters": [
  7299. {
  7300. "in": "query",
  7301. "name": "directory",
  7302. "schema": {
  7303. "type": "string"
  7304. }
  7305. },
  7306. {
  7307. "in": "query",
  7308. "name": "workspace",
  7309. "schema": {
  7310. "type": "string"
  7311. }
  7312. }
  7313. ],
  7314. "summary": "List agents",
  7315. "description": "Get a list of all available AI agents in the OpenCode system.",
  7316. "responses": {
  7317. "200": {
  7318. "description": "List of agents",
  7319. "content": {
  7320. "application/json": {
  7321. "schema": {
  7322. "type": "array",
  7323. "items": {
  7324. "$ref": "#/components/schemas/Agent"
  7325. }
  7326. }
  7327. }
  7328. }
  7329. }
  7330. },
  7331. "x-codeSamples": [
  7332. {
  7333. "lang": "js",
  7334. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  7335. }
  7336. ]
  7337. }
  7338. },
  7339. "/skill": {
  7340. "get": {
  7341. "operationId": "app.skills",
  7342. "parameters": [
  7343. {
  7344. "in": "query",
  7345. "name": "directory",
  7346. "schema": {
  7347. "type": "string"
  7348. }
  7349. },
  7350. {
  7351. "in": "query",
  7352. "name": "workspace",
  7353. "schema": {
  7354. "type": "string"
  7355. }
  7356. }
  7357. ],
  7358. "summary": "List skills",
  7359. "description": "Get a list of all available skills in the OpenCode system.",
  7360. "responses": {
  7361. "200": {
  7362. "description": "List of skills",
  7363. "content": {
  7364. "application/json": {
  7365. "schema": {
  7366. "type": "array",
  7367. "items": {
  7368. "type": "object",
  7369. "properties": {
  7370. "name": {
  7371. "type": "string"
  7372. },
  7373. "description": {
  7374. "type": "string"
  7375. },
  7376. "location": {
  7377. "type": "string"
  7378. },
  7379. "content": {
  7380. "type": "string"
  7381. }
  7382. },
  7383. "required": ["name", "description", "location", "content"]
  7384. }
  7385. }
  7386. }
  7387. }
  7388. }
  7389. },
  7390. "x-codeSamples": [
  7391. {
  7392. "lang": "js",
  7393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  7394. }
  7395. ]
  7396. }
  7397. },
  7398. "/lsp": {
  7399. "get": {
  7400. "operationId": "lsp.status",
  7401. "parameters": [
  7402. {
  7403. "in": "query",
  7404. "name": "directory",
  7405. "schema": {
  7406. "type": "string"
  7407. }
  7408. },
  7409. {
  7410. "in": "query",
  7411. "name": "workspace",
  7412. "schema": {
  7413. "type": "string"
  7414. }
  7415. }
  7416. ],
  7417. "summary": "Get LSP status",
  7418. "description": "Get LSP server status",
  7419. "responses": {
  7420. "200": {
  7421. "description": "LSP server status",
  7422. "content": {
  7423. "application/json": {
  7424. "schema": {
  7425. "type": "array",
  7426. "items": {
  7427. "$ref": "#/components/schemas/LSPStatus"
  7428. }
  7429. }
  7430. }
  7431. }
  7432. }
  7433. },
  7434. "x-codeSamples": [
  7435. {
  7436. "lang": "js",
  7437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  7438. }
  7439. ]
  7440. }
  7441. },
  7442. "/formatter": {
  7443. "get": {
  7444. "operationId": "formatter.status",
  7445. "parameters": [
  7446. {
  7447. "in": "query",
  7448. "name": "directory",
  7449. "schema": {
  7450. "type": "string"
  7451. }
  7452. },
  7453. {
  7454. "in": "query",
  7455. "name": "workspace",
  7456. "schema": {
  7457. "type": "string"
  7458. }
  7459. }
  7460. ],
  7461. "summary": "Get formatter status",
  7462. "description": "Get formatter status",
  7463. "responses": {
  7464. "200": {
  7465. "description": "Formatter status",
  7466. "content": {
  7467. "application/json": {
  7468. "schema": {
  7469. "type": "array",
  7470. "items": {
  7471. "$ref": "#/components/schemas/FormatterStatus"
  7472. }
  7473. }
  7474. }
  7475. }
  7476. }
  7477. },
  7478. "x-codeSamples": [
  7479. {
  7480. "lang": "js",
  7481. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  7482. }
  7483. ]
  7484. }
  7485. }
  7486. },
  7487. "components": {
  7488. "schemas": {
  7489. "Project": {
  7490. "type": "object",
  7491. "properties": {
  7492. "id": {
  7493. "type": "string"
  7494. },
  7495. "worktree": {
  7496. "type": "string"
  7497. },
  7498. "vcs": {
  7499. "type": "string",
  7500. "const": "git"
  7501. },
  7502. "name": {
  7503. "type": "string"
  7504. },
  7505. "icon": {
  7506. "type": "object",
  7507. "properties": {
  7508. "url": {
  7509. "type": "string"
  7510. },
  7511. "override": {
  7512. "type": "string"
  7513. },
  7514. "color": {
  7515. "type": "string"
  7516. }
  7517. }
  7518. },
  7519. "commands": {
  7520. "type": "object",
  7521. "properties": {
  7522. "start": {
  7523. "description": "Startup script to run when creating a new workspace (worktree)",
  7524. "type": "string"
  7525. }
  7526. }
  7527. },
  7528. "time": {
  7529. "type": "object",
  7530. "properties": {
  7531. "created": {
  7532. "type": "number"
  7533. },
  7534. "updated": {
  7535. "type": "number"
  7536. },
  7537. "initialized": {
  7538. "type": "number"
  7539. }
  7540. },
  7541. "required": ["created", "updated"]
  7542. },
  7543. "sandboxes": {
  7544. "type": "array",
  7545. "items": {
  7546. "type": "string"
  7547. }
  7548. }
  7549. },
  7550. "required": ["id", "worktree", "time", "sandboxes"]
  7551. },
  7552. "Event.project.updated": {
  7553. "type": "object",
  7554. "properties": {
  7555. "type": {
  7556. "type": "string",
  7557. "const": "project.updated"
  7558. },
  7559. "properties": {
  7560. "$ref": "#/components/schemas/Project"
  7561. }
  7562. },
  7563. "required": ["type", "properties"]
  7564. },
  7565. "Event.server.instance.disposed": {
  7566. "type": "object",
  7567. "properties": {
  7568. "type": {
  7569. "type": "string",
  7570. "const": "server.instance.disposed"
  7571. },
  7572. "properties": {
  7573. "type": "object",
  7574. "properties": {
  7575. "directory": {
  7576. "type": "string"
  7577. }
  7578. },
  7579. "required": ["directory"]
  7580. }
  7581. },
  7582. "required": ["type", "properties"]
  7583. },
  7584. "Event.server.connected": {
  7585. "type": "object",
  7586. "properties": {
  7587. "type": {
  7588. "type": "string",
  7589. "const": "server.connected"
  7590. },
  7591. "properties": {
  7592. "type": "object",
  7593. "properties": {}
  7594. }
  7595. },
  7596. "required": ["type", "properties"]
  7597. },
  7598. "Event.global.disposed": {
  7599. "type": "object",
  7600. "properties": {
  7601. "type": {
  7602. "type": "string",
  7603. "const": "global.disposed"
  7604. },
  7605. "properties": {
  7606. "type": "object",
  7607. "properties": {}
  7608. }
  7609. },
  7610. "required": ["type", "properties"]
  7611. },
  7612. "Event.file.edited": {
  7613. "type": "object",
  7614. "properties": {
  7615. "type": {
  7616. "type": "string",
  7617. "const": "file.edited"
  7618. },
  7619. "properties": {
  7620. "type": "object",
  7621. "properties": {
  7622. "file": {
  7623. "type": "string"
  7624. }
  7625. },
  7626. "required": ["file"]
  7627. }
  7628. },
  7629. "required": ["type", "properties"]
  7630. },
  7631. "Event.file.watcher.updated": {
  7632. "type": "object",
  7633. "properties": {
  7634. "type": {
  7635. "type": "string",
  7636. "const": "file.watcher.updated"
  7637. },
  7638. "properties": {
  7639. "type": "object",
  7640. "properties": {
  7641. "file": {
  7642. "type": "string"
  7643. },
  7644. "event": {
  7645. "anyOf": [
  7646. {
  7647. "type": "string",
  7648. "const": "add"
  7649. },
  7650. {
  7651. "type": "string",
  7652. "const": "change"
  7653. },
  7654. {
  7655. "type": "string",
  7656. "const": "unlink"
  7657. }
  7658. ]
  7659. }
  7660. },
  7661. "required": ["file", "event"]
  7662. }
  7663. },
  7664. "required": ["type", "properties"]
  7665. },
  7666. "Event.lsp.client.diagnostics": {
  7667. "type": "object",
  7668. "properties": {
  7669. "type": {
  7670. "type": "string",
  7671. "const": "lsp.client.diagnostics"
  7672. },
  7673. "properties": {
  7674. "type": "object",
  7675. "properties": {
  7676. "serverID": {
  7677. "type": "string"
  7678. },
  7679. "path": {
  7680. "type": "string"
  7681. }
  7682. },
  7683. "required": ["serverID", "path"]
  7684. }
  7685. },
  7686. "required": ["type", "properties"]
  7687. },
  7688. "Event.lsp.updated": {
  7689. "type": "object",
  7690. "properties": {
  7691. "type": {
  7692. "type": "string",
  7693. "const": "lsp.updated"
  7694. },
  7695. "properties": {
  7696. "type": "object",
  7697. "properties": {}
  7698. }
  7699. },
  7700. "required": ["type", "properties"]
  7701. },
  7702. "Event.installation.updated": {
  7703. "type": "object",
  7704. "properties": {
  7705. "type": {
  7706. "type": "string",
  7707. "const": "installation.updated"
  7708. },
  7709. "properties": {
  7710. "type": "object",
  7711. "properties": {
  7712. "version": {
  7713. "type": "string"
  7714. }
  7715. },
  7716. "required": ["version"]
  7717. }
  7718. },
  7719. "required": ["type", "properties"]
  7720. },
  7721. "Event.installation.update-available": {
  7722. "type": "object",
  7723. "properties": {
  7724. "type": {
  7725. "type": "string",
  7726. "const": "installation.update-available"
  7727. },
  7728. "properties": {
  7729. "type": "object",
  7730. "properties": {
  7731. "version": {
  7732. "type": "string"
  7733. }
  7734. },
  7735. "required": ["version"]
  7736. }
  7737. },
  7738. "required": ["type", "properties"]
  7739. },
  7740. "Event.message.part.delta": {
  7741. "type": "object",
  7742. "properties": {
  7743. "type": {
  7744. "type": "string",
  7745. "const": "message.part.delta"
  7746. },
  7747. "properties": {
  7748. "type": "object",
  7749. "properties": {
  7750. "sessionID": {
  7751. "type": "string",
  7752. "pattern": "^ses.*"
  7753. },
  7754. "messageID": {
  7755. "type": "string",
  7756. "pattern": "^msg.*"
  7757. },
  7758. "partID": {
  7759. "type": "string",
  7760. "pattern": "^prt.*"
  7761. },
  7762. "field": {
  7763. "type": "string"
  7764. },
  7765. "delta": {
  7766. "type": "string"
  7767. }
  7768. },
  7769. "required": ["sessionID", "messageID", "partID", "field", "delta"]
  7770. }
  7771. },
  7772. "required": ["type", "properties"]
  7773. },
  7774. "PermissionRequest": {
  7775. "type": "object",
  7776. "properties": {
  7777. "id": {
  7778. "type": "string",
  7779. "pattern": "^per.*"
  7780. },
  7781. "sessionID": {
  7782. "type": "string",
  7783. "pattern": "^ses.*"
  7784. },
  7785. "permission": {
  7786. "type": "string"
  7787. },
  7788. "patterns": {
  7789. "type": "array",
  7790. "items": {
  7791. "type": "string"
  7792. }
  7793. },
  7794. "metadata": {
  7795. "type": "object",
  7796. "propertyNames": {
  7797. "type": "string"
  7798. },
  7799. "additionalProperties": {}
  7800. },
  7801. "always": {
  7802. "type": "array",
  7803. "items": {
  7804. "type": "string"
  7805. }
  7806. },
  7807. "tool": {
  7808. "type": "object",
  7809. "properties": {
  7810. "messageID": {
  7811. "type": "string",
  7812. "pattern": "^msg.*"
  7813. },
  7814. "callID": {
  7815. "type": "string"
  7816. }
  7817. },
  7818. "required": ["messageID", "callID"]
  7819. }
  7820. },
  7821. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"]
  7822. },
  7823. "Event.permission.asked": {
  7824. "type": "object",
  7825. "properties": {
  7826. "type": {
  7827. "type": "string",
  7828. "const": "permission.asked"
  7829. },
  7830. "properties": {
  7831. "$ref": "#/components/schemas/PermissionRequest"
  7832. }
  7833. },
  7834. "required": ["type", "properties"]
  7835. },
  7836. "Event.permission.replied": {
  7837. "type": "object",
  7838. "properties": {
  7839. "type": {
  7840. "type": "string",
  7841. "const": "permission.replied"
  7842. },
  7843. "properties": {
  7844. "type": "object",
  7845. "properties": {
  7846. "sessionID": {
  7847. "type": "string",
  7848. "pattern": "^ses.*"
  7849. },
  7850. "requestID": {
  7851. "type": "string",
  7852. "pattern": "^per.*"
  7853. },
  7854. "reply": {
  7855. "type": "string",
  7856. "enum": ["once", "always", "reject"]
  7857. }
  7858. },
  7859. "required": ["sessionID", "requestID", "reply"]
  7860. }
  7861. },
  7862. "required": ["type", "properties"]
  7863. },
  7864. "SnapshotFileDiff": {
  7865. "type": "object",
  7866. "properties": {
  7867. "file": {
  7868. "type": "string"
  7869. },
  7870. "patch": {
  7871. "type": "string"
  7872. },
  7873. "additions": {
  7874. "type": "number"
  7875. },
  7876. "deletions": {
  7877. "type": "number"
  7878. },
  7879. "status": {
  7880. "type": "string",
  7881. "enum": ["added", "deleted", "modified"]
  7882. }
  7883. },
  7884. "required": ["file", "patch", "additions", "deletions"]
  7885. },
  7886. "Event.session.diff": {
  7887. "type": "object",
  7888. "properties": {
  7889. "type": {
  7890. "type": "string",
  7891. "const": "session.diff"
  7892. },
  7893. "properties": {
  7894. "type": "object",
  7895. "properties": {
  7896. "sessionID": {
  7897. "type": "string",
  7898. "pattern": "^ses.*"
  7899. },
  7900. "diff": {
  7901. "type": "array",
  7902. "items": {
  7903. "$ref": "#/components/schemas/SnapshotFileDiff"
  7904. }
  7905. }
  7906. },
  7907. "required": ["sessionID", "diff"]
  7908. }
  7909. },
  7910. "required": ["type", "properties"]
  7911. },
  7912. "ProviderAuthError": {
  7913. "type": "object",
  7914. "properties": {
  7915. "name": {
  7916. "type": "string",
  7917. "const": "ProviderAuthError"
  7918. },
  7919. "data": {
  7920. "type": "object",
  7921. "properties": {
  7922. "providerID": {
  7923. "type": "string"
  7924. },
  7925. "message": {
  7926. "type": "string"
  7927. }
  7928. },
  7929. "required": ["providerID", "message"]
  7930. }
  7931. },
  7932. "required": ["name", "data"]
  7933. },
  7934. "UnknownError": {
  7935. "type": "object",
  7936. "properties": {
  7937. "name": {
  7938. "type": "string",
  7939. "const": "UnknownError"
  7940. },
  7941. "data": {
  7942. "type": "object",
  7943. "properties": {
  7944. "message": {
  7945. "type": "string"
  7946. }
  7947. },
  7948. "required": ["message"]
  7949. }
  7950. },
  7951. "required": ["name", "data"]
  7952. },
  7953. "MessageOutputLengthError": {
  7954. "type": "object",
  7955. "properties": {
  7956. "name": {
  7957. "type": "string",
  7958. "const": "MessageOutputLengthError"
  7959. },
  7960. "data": {
  7961. "type": "object",
  7962. "properties": {}
  7963. }
  7964. },
  7965. "required": ["name", "data"]
  7966. },
  7967. "MessageAbortedError": {
  7968. "type": "object",
  7969. "properties": {
  7970. "name": {
  7971. "type": "string",
  7972. "const": "MessageAbortedError"
  7973. },
  7974. "data": {
  7975. "type": "object",
  7976. "properties": {
  7977. "message": {
  7978. "type": "string"
  7979. }
  7980. },
  7981. "required": ["message"]
  7982. }
  7983. },
  7984. "required": ["name", "data"]
  7985. },
  7986. "StructuredOutputError": {
  7987. "type": "object",
  7988. "properties": {
  7989. "name": {
  7990. "type": "string",
  7991. "const": "StructuredOutputError"
  7992. },
  7993. "data": {
  7994. "type": "object",
  7995. "properties": {
  7996. "message": {
  7997. "type": "string"
  7998. },
  7999. "retries": {
  8000. "type": "number"
  8001. }
  8002. },
  8003. "required": ["message", "retries"]
  8004. }
  8005. },
  8006. "required": ["name", "data"]
  8007. },
  8008. "ContextOverflowError": {
  8009. "type": "object",
  8010. "properties": {
  8011. "name": {
  8012. "type": "string",
  8013. "const": "ContextOverflowError"
  8014. },
  8015. "data": {
  8016. "type": "object",
  8017. "properties": {
  8018. "message": {
  8019. "type": "string"
  8020. },
  8021. "responseBody": {
  8022. "type": "string"
  8023. }
  8024. },
  8025. "required": ["message"]
  8026. }
  8027. },
  8028. "required": ["name", "data"]
  8029. },
  8030. "APIError": {
  8031. "type": "object",
  8032. "properties": {
  8033. "name": {
  8034. "type": "string",
  8035. "const": "APIError"
  8036. },
  8037. "data": {
  8038. "type": "object",
  8039. "properties": {
  8040. "message": {
  8041. "type": "string"
  8042. },
  8043. "statusCode": {
  8044. "type": "number"
  8045. },
  8046. "isRetryable": {
  8047. "type": "boolean"
  8048. },
  8049. "responseHeaders": {
  8050. "type": "object",
  8051. "propertyNames": {
  8052. "type": "string"
  8053. },
  8054. "additionalProperties": {
  8055. "type": "string"
  8056. }
  8057. },
  8058. "responseBody": {
  8059. "type": "string"
  8060. },
  8061. "metadata": {
  8062. "type": "object",
  8063. "propertyNames": {
  8064. "type": "string"
  8065. },
  8066. "additionalProperties": {
  8067. "type": "string"
  8068. }
  8069. }
  8070. },
  8071. "required": ["message", "isRetryable"]
  8072. }
  8073. },
  8074. "required": ["name", "data"]
  8075. },
  8076. "Event.session.error": {
  8077. "type": "object",
  8078. "properties": {
  8079. "type": {
  8080. "type": "string",
  8081. "const": "session.error"
  8082. },
  8083. "properties": {
  8084. "type": "object",
  8085. "properties": {
  8086. "sessionID": {
  8087. "type": "string",
  8088. "pattern": "^ses.*"
  8089. },
  8090. "error": {
  8091. "anyOf": [
  8092. {
  8093. "$ref": "#/components/schemas/ProviderAuthError"
  8094. },
  8095. {
  8096. "$ref": "#/components/schemas/UnknownError"
  8097. },
  8098. {
  8099. "$ref": "#/components/schemas/MessageOutputLengthError"
  8100. },
  8101. {
  8102. "$ref": "#/components/schemas/MessageAbortedError"
  8103. },
  8104. {
  8105. "$ref": "#/components/schemas/StructuredOutputError"
  8106. },
  8107. {
  8108. "$ref": "#/components/schemas/ContextOverflowError"
  8109. },
  8110. {
  8111. "$ref": "#/components/schemas/APIError"
  8112. }
  8113. ]
  8114. }
  8115. }
  8116. }
  8117. },
  8118. "required": ["type", "properties"]
  8119. },
  8120. "QuestionOption": {
  8121. "type": "object",
  8122. "properties": {
  8123. "label": {
  8124. "description": "Display text (1-5 words, concise)",
  8125. "type": "string"
  8126. },
  8127. "description": {
  8128. "description": "Explanation of choice",
  8129. "type": "string"
  8130. }
  8131. },
  8132. "required": ["label", "description"]
  8133. },
  8134. "QuestionInfo": {
  8135. "type": "object",
  8136. "properties": {
  8137. "question": {
  8138. "description": "Complete question",
  8139. "type": "string"
  8140. },
  8141. "header": {
  8142. "description": "Very short label (max 30 chars)",
  8143. "type": "string"
  8144. },
  8145. "options": {
  8146. "description": "Available choices",
  8147. "type": "array",
  8148. "items": {
  8149. "$ref": "#/components/schemas/QuestionOption"
  8150. }
  8151. },
  8152. "multiple": {
  8153. "description": "Allow selecting multiple choices",
  8154. "type": "boolean"
  8155. },
  8156. "custom": {
  8157. "description": "Allow typing a custom answer (default: true)",
  8158. "type": "boolean"
  8159. }
  8160. },
  8161. "required": ["question", "header", "options"]
  8162. },
  8163. "QuestionTool": {
  8164. "type": "object",
  8165. "properties": {
  8166. "messageID": {
  8167. "type": "string",
  8168. "pattern": "^msg.*"
  8169. },
  8170. "callID": {
  8171. "type": "string"
  8172. }
  8173. },
  8174. "required": ["messageID", "callID"]
  8175. },
  8176. "QuestionRequest": {
  8177. "type": "object",
  8178. "properties": {
  8179. "id": {
  8180. "type": "string",
  8181. "pattern": "^que.*"
  8182. },
  8183. "sessionID": {
  8184. "type": "string",
  8185. "pattern": "^ses.*"
  8186. },
  8187. "questions": {
  8188. "description": "Questions to ask",
  8189. "type": "array",
  8190. "items": {
  8191. "$ref": "#/components/schemas/QuestionInfo"
  8192. }
  8193. },
  8194. "tool": {
  8195. "$ref": "#/components/schemas/QuestionTool"
  8196. }
  8197. },
  8198. "required": ["id", "sessionID", "questions"]
  8199. },
  8200. "Event.question.asked": {
  8201. "type": "object",
  8202. "properties": {
  8203. "type": {
  8204. "type": "string",
  8205. "const": "question.asked"
  8206. },
  8207. "properties": {
  8208. "$ref": "#/components/schemas/QuestionRequest"
  8209. }
  8210. },
  8211. "required": ["type", "properties"]
  8212. },
  8213. "QuestionAnswer": {
  8214. "type": "array",
  8215. "items": {
  8216. "type": "string"
  8217. }
  8218. },
  8219. "QuestionReplied": {
  8220. "type": "object",
  8221. "properties": {
  8222. "sessionID": {
  8223. "type": "string",
  8224. "pattern": "^ses.*"
  8225. },
  8226. "requestID": {
  8227. "type": "string",
  8228. "pattern": "^que.*"
  8229. },
  8230. "answers": {
  8231. "type": "array",
  8232. "items": {
  8233. "$ref": "#/components/schemas/QuestionAnswer"
  8234. }
  8235. }
  8236. },
  8237. "required": ["sessionID", "requestID", "answers"]
  8238. },
  8239. "Event.question.replied": {
  8240. "type": "object",
  8241. "properties": {
  8242. "type": {
  8243. "type": "string",
  8244. "const": "question.replied"
  8245. },
  8246. "properties": {
  8247. "$ref": "#/components/schemas/QuestionReplied"
  8248. }
  8249. },
  8250. "required": ["type", "properties"]
  8251. },
  8252. "QuestionRejected": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string",
  8257. "pattern": "^ses.*"
  8258. },
  8259. "requestID": {
  8260. "type": "string",
  8261. "pattern": "^que.*"
  8262. }
  8263. },
  8264. "required": ["sessionID", "requestID"]
  8265. },
  8266. "Event.question.rejected": {
  8267. "type": "object",
  8268. "properties": {
  8269. "type": {
  8270. "type": "string",
  8271. "const": "question.rejected"
  8272. },
  8273. "properties": {
  8274. "$ref": "#/components/schemas/QuestionRejected"
  8275. }
  8276. },
  8277. "required": ["type", "properties"]
  8278. },
  8279. "Todo": {
  8280. "type": "object",
  8281. "properties": {
  8282. "content": {
  8283. "description": "Brief description of the task",
  8284. "type": "string"
  8285. },
  8286. "status": {
  8287. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  8288. "type": "string"
  8289. },
  8290. "priority": {
  8291. "description": "Priority level of the task: high, medium, low",
  8292. "type": "string"
  8293. }
  8294. },
  8295. "required": ["content", "status", "priority"]
  8296. },
  8297. "Event.todo.updated": {
  8298. "type": "object",
  8299. "properties": {
  8300. "type": {
  8301. "type": "string",
  8302. "const": "todo.updated"
  8303. },
  8304. "properties": {
  8305. "type": "object",
  8306. "properties": {
  8307. "sessionID": {
  8308. "type": "string",
  8309. "pattern": "^ses.*"
  8310. },
  8311. "todos": {
  8312. "type": "array",
  8313. "items": {
  8314. "$ref": "#/components/schemas/Todo"
  8315. }
  8316. }
  8317. },
  8318. "required": ["sessionID", "todos"]
  8319. }
  8320. },
  8321. "required": ["type", "properties"]
  8322. },
  8323. "SessionStatus": {
  8324. "anyOf": [
  8325. {
  8326. "type": "object",
  8327. "properties": {
  8328. "type": {
  8329. "type": "string",
  8330. "const": "idle"
  8331. }
  8332. },
  8333. "required": ["type"]
  8334. },
  8335. {
  8336. "type": "object",
  8337. "properties": {
  8338. "type": {
  8339. "type": "string",
  8340. "const": "retry"
  8341. },
  8342. "attempt": {
  8343. "type": "number"
  8344. },
  8345. "message": {
  8346. "type": "string"
  8347. },
  8348. "next": {
  8349. "type": "number"
  8350. }
  8351. },
  8352. "required": ["type", "attempt", "message", "next"]
  8353. },
  8354. {
  8355. "type": "object",
  8356. "properties": {
  8357. "type": {
  8358. "type": "string",
  8359. "const": "busy"
  8360. }
  8361. },
  8362. "required": ["type"]
  8363. }
  8364. ]
  8365. },
  8366. "Event.session.status": {
  8367. "type": "object",
  8368. "properties": {
  8369. "type": {
  8370. "type": "string",
  8371. "const": "session.status"
  8372. },
  8373. "properties": {
  8374. "type": "object",
  8375. "properties": {
  8376. "sessionID": {
  8377. "type": "string",
  8378. "pattern": "^ses.*"
  8379. },
  8380. "status": {
  8381. "$ref": "#/components/schemas/SessionStatus"
  8382. }
  8383. },
  8384. "required": ["sessionID", "status"]
  8385. }
  8386. },
  8387. "required": ["type", "properties"]
  8388. },
  8389. "Event.session.idle": {
  8390. "type": "object",
  8391. "properties": {
  8392. "type": {
  8393. "type": "string",
  8394. "const": "session.idle"
  8395. },
  8396. "properties": {
  8397. "type": "object",
  8398. "properties": {
  8399. "sessionID": {
  8400. "type": "string",
  8401. "pattern": "^ses.*"
  8402. }
  8403. },
  8404. "required": ["sessionID"]
  8405. }
  8406. },
  8407. "required": ["type", "properties"]
  8408. },
  8409. "Event.session.compacted": {
  8410. "type": "object",
  8411. "properties": {
  8412. "type": {
  8413. "type": "string",
  8414. "const": "session.compacted"
  8415. },
  8416. "properties": {
  8417. "type": "object",
  8418. "properties": {
  8419. "sessionID": {
  8420. "type": "string",
  8421. "pattern": "^ses.*"
  8422. }
  8423. },
  8424. "required": ["sessionID"]
  8425. }
  8426. },
  8427. "required": ["type", "properties"]
  8428. },
  8429. "Event.tui.prompt.append": {
  8430. "type": "object",
  8431. "properties": {
  8432. "type": {
  8433. "type": "string",
  8434. "const": "tui.prompt.append"
  8435. },
  8436. "properties": {
  8437. "type": "object",
  8438. "properties": {
  8439. "text": {
  8440. "type": "string"
  8441. }
  8442. },
  8443. "required": ["text"]
  8444. }
  8445. },
  8446. "required": ["type", "properties"]
  8447. },
  8448. "Event.tui.command.execute": {
  8449. "type": "object",
  8450. "properties": {
  8451. "type": {
  8452. "type": "string",
  8453. "const": "tui.command.execute"
  8454. },
  8455. "properties": {
  8456. "type": "object",
  8457. "properties": {
  8458. "command": {
  8459. "anyOf": [
  8460. {
  8461. "type": "string",
  8462. "enum": [
  8463. "session.list",
  8464. "session.new",
  8465. "session.share",
  8466. "session.interrupt",
  8467. "session.compact",
  8468. "session.page.up",
  8469. "session.page.down",
  8470. "session.line.up",
  8471. "session.line.down",
  8472. "session.half.page.up",
  8473. "session.half.page.down",
  8474. "session.first",
  8475. "session.last",
  8476. "prompt.clear",
  8477. "prompt.submit",
  8478. "agent.cycle"
  8479. ]
  8480. },
  8481. {
  8482. "type": "string"
  8483. }
  8484. ]
  8485. }
  8486. },
  8487. "required": ["command"]
  8488. }
  8489. },
  8490. "required": ["type", "properties"]
  8491. },
  8492. "Event.tui.toast.show": {
  8493. "type": "object",
  8494. "properties": {
  8495. "type": {
  8496. "type": "string",
  8497. "const": "tui.toast.show"
  8498. },
  8499. "properties": {
  8500. "type": "object",
  8501. "properties": {
  8502. "title": {
  8503. "type": "string"
  8504. },
  8505. "message": {
  8506. "type": "string"
  8507. },
  8508. "variant": {
  8509. "type": "string",
  8510. "enum": ["info", "success", "warning", "error"]
  8511. },
  8512. "duration": {
  8513. "description": "Duration in milliseconds",
  8514. "default": 5000,
  8515. "type": "number"
  8516. }
  8517. },
  8518. "required": ["message", "variant"]
  8519. }
  8520. },
  8521. "required": ["type", "properties"]
  8522. },
  8523. "Event.tui.session.select": {
  8524. "type": "object",
  8525. "properties": {
  8526. "type": {
  8527. "type": "string",
  8528. "const": "tui.session.select"
  8529. },
  8530. "properties": {
  8531. "type": "object",
  8532. "properties": {
  8533. "sessionID": {
  8534. "description": "Session ID to navigate to",
  8535. "type": "string",
  8536. "pattern": "^ses.*"
  8537. }
  8538. },
  8539. "required": ["sessionID"]
  8540. }
  8541. },
  8542. "required": ["type", "properties"]
  8543. },
  8544. "Event.mcp.tools.changed": {
  8545. "type": "object",
  8546. "properties": {
  8547. "type": {
  8548. "type": "string",
  8549. "const": "mcp.tools.changed"
  8550. },
  8551. "properties": {
  8552. "type": "object",
  8553. "properties": {
  8554. "server": {
  8555. "type": "string"
  8556. }
  8557. },
  8558. "required": ["server"]
  8559. }
  8560. },
  8561. "required": ["type", "properties"]
  8562. },
  8563. "Event.mcp.browser.open.failed": {
  8564. "type": "object",
  8565. "properties": {
  8566. "type": {
  8567. "type": "string",
  8568. "const": "mcp.browser.open.failed"
  8569. },
  8570. "properties": {
  8571. "type": "object",
  8572. "properties": {
  8573. "mcpName": {
  8574. "type": "string"
  8575. },
  8576. "url": {
  8577. "type": "string"
  8578. }
  8579. },
  8580. "required": ["mcpName", "url"]
  8581. }
  8582. },
  8583. "required": ["type", "properties"]
  8584. },
  8585. "Event.command.executed": {
  8586. "type": "object",
  8587. "properties": {
  8588. "type": {
  8589. "type": "string",
  8590. "const": "command.executed"
  8591. },
  8592. "properties": {
  8593. "type": "object",
  8594. "properties": {
  8595. "name": {
  8596. "type": "string"
  8597. },
  8598. "sessionID": {
  8599. "type": "string",
  8600. "pattern": "^ses.*"
  8601. },
  8602. "arguments": {
  8603. "type": "string"
  8604. },
  8605. "messageID": {
  8606. "type": "string",
  8607. "pattern": "^msg.*"
  8608. }
  8609. },
  8610. "required": ["name", "sessionID", "arguments", "messageID"]
  8611. }
  8612. },
  8613. "required": ["type", "properties"]
  8614. },
  8615. "Event.vcs.branch.updated": {
  8616. "type": "object",
  8617. "properties": {
  8618. "type": {
  8619. "type": "string",
  8620. "const": "vcs.branch.updated"
  8621. },
  8622. "properties": {
  8623. "type": "object",
  8624. "properties": {
  8625. "branch": {
  8626. "type": "string"
  8627. }
  8628. }
  8629. }
  8630. },
  8631. "required": ["type", "properties"]
  8632. },
  8633. "Event.worktree.ready": {
  8634. "type": "object",
  8635. "properties": {
  8636. "type": {
  8637. "type": "string",
  8638. "const": "worktree.ready"
  8639. },
  8640. "properties": {
  8641. "type": "object",
  8642. "properties": {
  8643. "name": {
  8644. "type": "string"
  8645. },
  8646. "branch": {
  8647. "type": "string"
  8648. }
  8649. },
  8650. "required": ["name", "branch"]
  8651. }
  8652. },
  8653. "required": ["type", "properties"]
  8654. },
  8655. "Event.worktree.failed": {
  8656. "type": "object",
  8657. "properties": {
  8658. "type": {
  8659. "type": "string",
  8660. "const": "worktree.failed"
  8661. },
  8662. "properties": {
  8663. "type": "object",
  8664. "properties": {
  8665. "message": {
  8666. "type": "string"
  8667. }
  8668. },
  8669. "required": ["message"]
  8670. }
  8671. },
  8672. "required": ["type", "properties"]
  8673. },
  8674. "Pty": {
  8675. "type": "object",
  8676. "properties": {
  8677. "id": {
  8678. "type": "string",
  8679. "pattern": "^pty.*"
  8680. },
  8681. "title": {
  8682. "type": "string"
  8683. },
  8684. "command": {
  8685. "type": "string"
  8686. },
  8687. "args": {
  8688. "type": "array",
  8689. "items": {
  8690. "type": "string"
  8691. }
  8692. },
  8693. "cwd": {
  8694. "type": "string"
  8695. },
  8696. "status": {
  8697. "type": "string",
  8698. "enum": ["running", "exited"]
  8699. },
  8700. "pid": {
  8701. "type": "number"
  8702. }
  8703. },
  8704. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  8705. },
  8706. "Event.pty.created": {
  8707. "type": "object",
  8708. "properties": {
  8709. "type": {
  8710. "type": "string",
  8711. "const": "pty.created"
  8712. },
  8713. "properties": {
  8714. "type": "object",
  8715. "properties": {
  8716. "info": {
  8717. "$ref": "#/components/schemas/Pty"
  8718. }
  8719. },
  8720. "required": ["info"]
  8721. }
  8722. },
  8723. "required": ["type", "properties"]
  8724. },
  8725. "Event.pty.updated": {
  8726. "type": "object",
  8727. "properties": {
  8728. "type": {
  8729. "type": "string",
  8730. "const": "pty.updated"
  8731. },
  8732. "properties": {
  8733. "type": "object",
  8734. "properties": {
  8735. "info": {
  8736. "$ref": "#/components/schemas/Pty"
  8737. }
  8738. },
  8739. "required": ["info"]
  8740. }
  8741. },
  8742. "required": ["type", "properties"]
  8743. },
  8744. "Event.pty.exited": {
  8745. "type": "object",
  8746. "properties": {
  8747. "type": {
  8748. "type": "string",
  8749. "const": "pty.exited"
  8750. },
  8751. "properties": {
  8752. "type": "object",
  8753. "properties": {
  8754. "id": {
  8755. "type": "string",
  8756. "pattern": "^pty.*"
  8757. },
  8758. "exitCode": {
  8759. "type": "number"
  8760. }
  8761. },
  8762. "required": ["id", "exitCode"]
  8763. }
  8764. },
  8765. "required": ["type", "properties"]
  8766. },
  8767. "Event.pty.deleted": {
  8768. "type": "object",
  8769. "properties": {
  8770. "type": {
  8771. "type": "string",
  8772. "const": "pty.deleted"
  8773. },
  8774. "properties": {
  8775. "type": "object",
  8776. "properties": {
  8777. "id": {
  8778. "type": "string",
  8779. "pattern": "^pty.*"
  8780. }
  8781. },
  8782. "required": ["id"]
  8783. }
  8784. },
  8785. "required": ["type", "properties"]
  8786. },
  8787. "Event.workspace.ready": {
  8788. "type": "object",
  8789. "properties": {
  8790. "type": {
  8791. "type": "string",
  8792. "const": "workspace.ready"
  8793. },
  8794. "properties": {
  8795. "type": "object",
  8796. "properties": {
  8797. "name": {
  8798. "type": "string"
  8799. }
  8800. },
  8801. "required": ["name"]
  8802. }
  8803. },
  8804. "required": ["type", "properties"]
  8805. },
  8806. "Event.workspace.failed": {
  8807. "type": "object",
  8808. "properties": {
  8809. "type": {
  8810. "type": "string",
  8811. "const": "workspace.failed"
  8812. },
  8813. "properties": {
  8814. "type": "object",
  8815. "properties": {
  8816. "message": {
  8817. "type": "string"
  8818. }
  8819. },
  8820. "required": ["message"]
  8821. }
  8822. },
  8823. "required": ["type", "properties"]
  8824. },
  8825. "Event.workspace.restore": {
  8826. "type": "object",
  8827. "properties": {
  8828. "type": {
  8829. "type": "string",
  8830. "const": "workspace.restore"
  8831. },
  8832. "properties": {
  8833. "type": "object",
  8834. "properties": {
  8835. "workspaceID": {
  8836. "type": "string",
  8837. "pattern": "^wrk.*"
  8838. },
  8839. "sessionID": {
  8840. "type": "string",
  8841. "pattern": "^ses.*"
  8842. },
  8843. "total": {
  8844. "type": "integer",
  8845. "minimum": 0,
  8846. "maximum": 9007199254740991
  8847. },
  8848. "step": {
  8849. "type": "integer",
  8850. "minimum": 0,
  8851. "maximum": 9007199254740991
  8852. }
  8853. },
  8854. "required": ["workspaceID", "sessionID", "total", "step"]
  8855. }
  8856. },
  8857. "required": ["type", "properties"]
  8858. },
  8859. "Event.workspace.status": {
  8860. "type": "object",
  8861. "properties": {
  8862. "type": {
  8863. "type": "string",
  8864. "const": "workspace.status"
  8865. },
  8866. "properties": {
  8867. "type": "object",
  8868. "properties": {
  8869. "workspaceID": {
  8870. "type": "string",
  8871. "pattern": "^wrk.*"
  8872. },
  8873. "status": {
  8874. "type": "string",
  8875. "enum": ["connected", "connecting", "disconnected", "error"]
  8876. }
  8877. },
  8878. "required": ["workspaceID", "status"]
  8879. }
  8880. },
  8881. "required": ["type", "properties"]
  8882. },
  8883. "OutputFormatText": {
  8884. "type": "object",
  8885. "properties": {
  8886. "type": {
  8887. "type": "string",
  8888. "const": "text"
  8889. }
  8890. },
  8891. "required": ["type"]
  8892. },
  8893. "JSONSchema": {
  8894. "type": "object",
  8895. "propertyNames": {
  8896. "type": "string"
  8897. },
  8898. "additionalProperties": {}
  8899. },
  8900. "OutputFormatJsonSchema": {
  8901. "type": "object",
  8902. "properties": {
  8903. "type": {
  8904. "type": "string",
  8905. "const": "json_schema"
  8906. },
  8907. "schema": {
  8908. "$ref": "#/components/schemas/JSONSchema"
  8909. },
  8910. "retryCount": {
  8911. "default": 2,
  8912. "type": "integer",
  8913. "minimum": 0,
  8914. "maximum": 9007199254740991
  8915. }
  8916. },
  8917. "required": ["type", "schema"]
  8918. },
  8919. "OutputFormat": {
  8920. "anyOf": [
  8921. {
  8922. "$ref": "#/components/schemas/OutputFormatText"
  8923. },
  8924. {
  8925. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  8926. }
  8927. ]
  8928. },
  8929. "UserMessage": {
  8930. "type": "object",
  8931. "properties": {
  8932. "id": {
  8933. "type": "string",
  8934. "pattern": "^msg.*"
  8935. },
  8936. "sessionID": {
  8937. "type": "string",
  8938. "pattern": "^ses.*"
  8939. },
  8940. "role": {
  8941. "type": "string",
  8942. "const": "user"
  8943. },
  8944. "time": {
  8945. "type": "object",
  8946. "properties": {
  8947. "created": {
  8948. "type": "number"
  8949. }
  8950. },
  8951. "required": ["created"]
  8952. },
  8953. "format": {
  8954. "$ref": "#/components/schemas/OutputFormat"
  8955. },
  8956. "summary": {
  8957. "type": "object",
  8958. "properties": {
  8959. "title": {
  8960. "type": "string"
  8961. },
  8962. "body": {
  8963. "type": "string"
  8964. },
  8965. "diffs": {
  8966. "type": "array",
  8967. "items": {
  8968. "$ref": "#/components/schemas/SnapshotFileDiff"
  8969. }
  8970. }
  8971. },
  8972. "required": ["diffs"]
  8973. },
  8974. "agent": {
  8975. "type": "string"
  8976. },
  8977. "model": {
  8978. "type": "object",
  8979. "properties": {
  8980. "providerID": {
  8981. "type": "string"
  8982. },
  8983. "modelID": {
  8984. "type": "string"
  8985. },
  8986. "variant": {
  8987. "type": "string"
  8988. }
  8989. },
  8990. "required": ["providerID", "modelID"]
  8991. },
  8992. "system": {
  8993. "type": "string"
  8994. },
  8995. "tools": {
  8996. "type": "object",
  8997. "propertyNames": {
  8998. "type": "string"
  8999. },
  9000. "additionalProperties": {
  9001. "type": "boolean"
  9002. }
  9003. }
  9004. },
  9005. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  9006. },
  9007. "AssistantMessage": {
  9008. "type": "object",
  9009. "properties": {
  9010. "id": {
  9011. "type": "string",
  9012. "pattern": "^msg.*"
  9013. },
  9014. "sessionID": {
  9015. "type": "string",
  9016. "pattern": "^ses.*"
  9017. },
  9018. "role": {
  9019. "type": "string",
  9020. "const": "assistant"
  9021. },
  9022. "time": {
  9023. "type": "object",
  9024. "properties": {
  9025. "created": {
  9026. "type": "number"
  9027. },
  9028. "completed": {
  9029. "type": "number"
  9030. }
  9031. },
  9032. "required": ["created"]
  9033. },
  9034. "error": {
  9035. "anyOf": [
  9036. {
  9037. "$ref": "#/components/schemas/ProviderAuthError"
  9038. },
  9039. {
  9040. "$ref": "#/components/schemas/UnknownError"
  9041. },
  9042. {
  9043. "$ref": "#/components/schemas/MessageOutputLengthError"
  9044. },
  9045. {
  9046. "$ref": "#/components/schemas/MessageAbortedError"
  9047. },
  9048. {
  9049. "$ref": "#/components/schemas/StructuredOutputError"
  9050. },
  9051. {
  9052. "$ref": "#/components/schemas/ContextOverflowError"
  9053. },
  9054. {
  9055. "$ref": "#/components/schemas/APIError"
  9056. }
  9057. ]
  9058. },
  9059. "parentID": {
  9060. "type": "string",
  9061. "pattern": "^msg.*"
  9062. },
  9063. "modelID": {
  9064. "type": "string"
  9065. },
  9066. "providerID": {
  9067. "type": "string"
  9068. },
  9069. "mode": {
  9070. "type": "string"
  9071. },
  9072. "agent": {
  9073. "type": "string"
  9074. },
  9075. "path": {
  9076. "type": "object",
  9077. "properties": {
  9078. "cwd": {
  9079. "type": "string"
  9080. },
  9081. "root": {
  9082. "type": "string"
  9083. }
  9084. },
  9085. "required": ["cwd", "root"]
  9086. },
  9087. "summary": {
  9088. "type": "boolean"
  9089. },
  9090. "cost": {
  9091. "type": "number"
  9092. },
  9093. "tokens": {
  9094. "type": "object",
  9095. "properties": {
  9096. "total": {
  9097. "type": "number"
  9098. },
  9099. "input": {
  9100. "type": "number"
  9101. },
  9102. "output": {
  9103. "type": "number"
  9104. },
  9105. "reasoning": {
  9106. "type": "number"
  9107. },
  9108. "cache": {
  9109. "type": "object",
  9110. "properties": {
  9111. "read": {
  9112. "type": "number"
  9113. },
  9114. "write": {
  9115. "type": "number"
  9116. }
  9117. },
  9118. "required": ["read", "write"]
  9119. }
  9120. },
  9121. "required": ["input", "output", "reasoning", "cache"]
  9122. },
  9123. "structured": {},
  9124. "variant": {
  9125. "type": "string"
  9126. },
  9127. "finish": {
  9128. "type": "string"
  9129. }
  9130. },
  9131. "required": [
  9132. "id",
  9133. "sessionID",
  9134. "role",
  9135. "time",
  9136. "parentID",
  9137. "modelID",
  9138. "providerID",
  9139. "mode",
  9140. "agent",
  9141. "path",
  9142. "cost",
  9143. "tokens"
  9144. ]
  9145. },
  9146. "Message": {
  9147. "anyOf": [
  9148. {
  9149. "$ref": "#/components/schemas/UserMessage"
  9150. },
  9151. {
  9152. "$ref": "#/components/schemas/AssistantMessage"
  9153. }
  9154. ]
  9155. },
  9156. "Event.message.updated": {
  9157. "type": "object",
  9158. "properties": {
  9159. "type": {
  9160. "type": "string",
  9161. "const": "message.updated"
  9162. },
  9163. "properties": {
  9164. "type": "object",
  9165. "properties": {
  9166. "sessionID": {
  9167. "type": "string",
  9168. "pattern": "^ses.*"
  9169. },
  9170. "info": {
  9171. "$ref": "#/components/schemas/Message"
  9172. }
  9173. },
  9174. "required": ["sessionID", "info"]
  9175. }
  9176. },
  9177. "required": ["type", "properties"]
  9178. },
  9179. "Event.message.removed": {
  9180. "type": "object",
  9181. "properties": {
  9182. "type": {
  9183. "type": "string",
  9184. "const": "message.removed"
  9185. },
  9186. "properties": {
  9187. "type": "object",
  9188. "properties": {
  9189. "sessionID": {
  9190. "type": "string",
  9191. "pattern": "^ses.*"
  9192. },
  9193. "messageID": {
  9194. "type": "string",
  9195. "pattern": "^msg.*"
  9196. }
  9197. },
  9198. "required": ["sessionID", "messageID"]
  9199. }
  9200. },
  9201. "required": ["type", "properties"]
  9202. },
  9203. "TextPart": {
  9204. "type": "object",
  9205. "properties": {
  9206. "id": {
  9207. "type": "string",
  9208. "pattern": "^prt.*"
  9209. },
  9210. "sessionID": {
  9211. "type": "string",
  9212. "pattern": "^ses.*"
  9213. },
  9214. "messageID": {
  9215. "type": "string",
  9216. "pattern": "^msg.*"
  9217. },
  9218. "type": {
  9219. "type": "string",
  9220. "const": "text"
  9221. },
  9222. "text": {
  9223. "type": "string"
  9224. },
  9225. "synthetic": {
  9226. "type": "boolean"
  9227. },
  9228. "ignored": {
  9229. "type": "boolean"
  9230. },
  9231. "time": {
  9232. "type": "object",
  9233. "properties": {
  9234. "start": {
  9235. "type": "number"
  9236. },
  9237. "end": {
  9238. "type": "number"
  9239. }
  9240. },
  9241. "required": ["start"]
  9242. },
  9243. "metadata": {
  9244. "type": "object",
  9245. "propertyNames": {
  9246. "type": "string"
  9247. },
  9248. "additionalProperties": {}
  9249. }
  9250. },
  9251. "required": ["id", "sessionID", "messageID", "type", "text"]
  9252. },
  9253. "SubtaskPart": {
  9254. "type": "object",
  9255. "properties": {
  9256. "id": {
  9257. "type": "string",
  9258. "pattern": "^prt.*"
  9259. },
  9260. "sessionID": {
  9261. "type": "string",
  9262. "pattern": "^ses.*"
  9263. },
  9264. "messageID": {
  9265. "type": "string",
  9266. "pattern": "^msg.*"
  9267. },
  9268. "type": {
  9269. "type": "string",
  9270. "const": "subtask"
  9271. },
  9272. "prompt": {
  9273. "type": "string"
  9274. },
  9275. "description": {
  9276. "type": "string"
  9277. },
  9278. "agent": {
  9279. "type": "string"
  9280. },
  9281. "model": {
  9282. "type": "object",
  9283. "properties": {
  9284. "providerID": {
  9285. "type": "string"
  9286. },
  9287. "modelID": {
  9288. "type": "string"
  9289. }
  9290. },
  9291. "required": ["providerID", "modelID"]
  9292. },
  9293. "command": {
  9294. "type": "string"
  9295. }
  9296. },
  9297. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  9298. },
  9299. "ReasoningPart": {
  9300. "type": "object",
  9301. "properties": {
  9302. "id": {
  9303. "type": "string",
  9304. "pattern": "^prt.*"
  9305. },
  9306. "sessionID": {
  9307. "type": "string",
  9308. "pattern": "^ses.*"
  9309. },
  9310. "messageID": {
  9311. "type": "string",
  9312. "pattern": "^msg.*"
  9313. },
  9314. "type": {
  9315. "type": "string",
  9316. "const": "reasoning"
  9317. },
  9318. "text": {
  9319. "type": "string"
  9320. },
  9321. "metadata": {
  9322. "type": "object",
  9323. "propertyNames": {
  9324. "type": "string"
  9325. },
  9326. "additionalProperties": {}
  9327. },
  9328. "time": {
  9329. "type": "object",
  9330. "properties": {
  9331. "start": {
  9332. "type": "number"
  9333. },
  9334. "end": {
  9335. "type": "number"
  9336. }
  9337. },
  9338. "required": ["start"]
  9339. }
  9340. },
  9341. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  9342. },
  9343. "FilePartSourceText": {
  9344. "type": "object",
  9345. "properties": {
  9346. "value": {
  9347. "type": "string"
  9348. },
  9349. "start": {
  9350. "type": "integer",
  9351. "minimum": -9007199254740991,
  9352. "maximum": 9007199254740991
  9353. },
  9354. "end": {
  9355. "type": "integer",
  9356. "minimum": -9007199254740991,
  9357. "maximum": 9007199254740991
  9358. }
  9359. },
  9360. "required": ["value", "start", "end"]
  9361. },
  9362. "FileSource": {
  9363. "type": "object",
  9364. "properties": {
  9365. "text": {
  9366. "$ref": "#/components/schemas/FilePartSourceText"
  9367. },
  9368. "type": {
  9369. "type": "string",
  9370. "const": "file"
  9371. },
  9372. "path": {
  9373. "type": "string"
  9374. }
  9375. },
  9376. "required": ["text", "type", "path"]
  9377. },
  9378. "Range": {
  9379. "type": "object",
  9380. "properties": {
  9381. "start": {
  9382. "type": "object",
  9383. "properties": {
  9384. "line": {
  9385. "type": "number"
  9386. },
  9387. "character": {
  9388. "type": "number"
  9389. }
  9390. },
  9391. "required": ["line", "character"]
  9392. },
  9393. "end": {
  9394. "type": "object",
  9395. "properties": {
  9396. "line": {
  9397. "type": "number"
  9398. },
  9399. "character": {
  9400. "type": "number"
  9401. }
  9402. },
  9403. "required": ["line", "character"]
  9404. }
  9405. },
  9406. "required": ["start", "end"]
  9407. },
  9408. "SymbolSource": {
  9409. "type": "object",
  9410. "properties": {
  9411. "text": {
  9412. "$ref": "#/components/schemas/FilePartSourceText"
  9413. },
  9414. "type": {
  9415. "type": "string",
  9416. "const": "symbol"
  9417. },
  9418. "path": {
  9419. "type": "string"
  9420. },
  9421. "range": {
  9422. "$ref": "#/components/schemas/Range"
  9423. },
  9424. "name": {
  9425. "type": "string"
  9426. },
  9427. "kind": {
  9428. "type": "integer",
  9429. "minimum": -9007199254740991,
  9430. "maximum": 9007199254740991
  9431. }
  9432. },
  9433. "required": ["text", "type", "path", "range", "name", "kind"]
  9434. },
  9435. "ResourceSource": {
  9436. "type": "object",
  9437. "properties": {
  9438. "text": {
  9439. "$ref": "#/components/schemas/FilePartSourceText"
  9440. },
  9441. "type": {
  9442. "type": "string",
  9443. "const": "resource"
  9444. },
  9445. "clientName": {
  9446. "type": "string"
  9447. },
  9448. "uri": {
  9449. "type": "string"
  9450. }
  9451. },
  9452. "required": ["text", "type", "clientName", "uri"]
  9453. },
  9454. "FilePartSource": {
  9455. "anyOf": [
  9456. {
  9457. "$ref": "#/components/schemas/FileSource"
  9458. },
  9459. {
  9460. "$ref": "#/components/schemas/SymbolSource"
  9461. },
  9462. {
  9463. "$ref": "#/components/schemas/ResourceSource"
  9464. }
  9465. ]
  9466. },
  9467. "FilePart": {
  9468. "type": "object",
  9469. "properties": {
  9470. "id": {
  9471. "type": "string",
  9472. "pattern": "^prt.*"
  9473. },
  9474. "sessionID": {
  9475. "type": "string",
  9476. "pattern": "^ses.*"
  9477. },
  9478. "messageID": {
  9479. "type": "string",
  9480. "pattern": "^msg.*"
  9481. },
  9482. "type": {
  9483. "type": "string",
  9484. "const": "file"
  9485. },
  9486. "mime": {
  9487. "type": "string"
  9488. },
  9489. "filename": {
  9490. "type": "string"
  9491. },
  9492. "url": {
  9493. "type": "string"
  9494. },
  9495. "source": {
  9496. "$ref": "#/components/schemas/FilePartSource"
  9497. }
  9498. },
  9499. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  9500. },
  9501. "ToolStatePending": {
  9502. "type": "object",
  9503. "properties": {
  9504. "status": {
  9505. "type": "string",
  9506. "const": "pending"
  9507. },
  9508. "input": {
  9509. "type": "object",
  9510. "propertyNames": {
  9511. "type": "string"
  9512. },
  9513. "additionalProperties": {}
  9514. },
  9515. "raw": {
  9516. "type": "string"
  9517. }
  9518. },
  9519. "required": ["status", "input", "raw"]
  9520. },
  9521. "ToolStateRunning": {
  9522. "type": "object",
  9523. "properties": {
  9524. "status": {
  9525. "type": "string",
  9526. "const": "running"
  9527. },
  9528. "input": {
  9529. "type": "object",
  9530. "propertyNames": {
  9531. "type": "string"
  9532. },
  9533. "additionalProperties": {}
  9534. },
  9535. "title": {
  9536. "type": "string"
  9537. },
  9538. "metadata": {
  9539. "type": "object",
  9540. "propertyNames": {
  9541. "type": "string"
  9542. },
  9543. "additionalProperties": {}
  9544. },
  9545. "time": {
  9546. "type": "object",
  9547. "properties": {
  9548. "start": {
  9549. "type": "number"
  9550. }
  9551. },
  9552. "required": ["start"]
  9553. }
  9554. },
  9555. "required": ["status", "input", "time"]
  9556. },
  9557. "ToolStateCompleted": {
  9558. "type": "object",
  9559. "properties": {
  9560. "status": {
  9561. "type": "string",
  9562. "const": "completed"
  9563. },
  9564. "input": {
  9565. "type": "object",
  9566. "propertyNames": {
  9567. "type": "string"
  9568. },
  9569. "additionalProperties": {}
  9570. },
  9571. "output": {
  9572. "type": "string"
  9573. },
  9574. "title": {
  9575. "type": "string"
  9576. },
  9577. "metadata": {
  9578. "type": "object",
  9579. "propertyNames": {
  9580. "type": "string"
  9581. },
  9582. "additionalProperties": {}
  9583. },
  9584. "time": {
  9585. "type": "object",
  9586. "properties": {
  9587. "start": {
  9588. "type": "number"
  9589. },
  9590. "end": {
  9591. "type": "number"
  9592. },
  9593. "compacted": {
  9594. "type": "number"
  9595. }
  9596. },
  9597. "required": ["start", "end"]
  9598. },
  9599. "attachments": {
  9600. "type": "array",
  9601. "items": {
  9602. "$ref": "#/components/schemas/FilePart"
  9603. }
  9604. }
  9605. },
  9606. "required": ["status", "input", "output", "title", "metadata", "time"]
  9607. },
  9608. "ToolStateError": {
  9609. "type": "object",
  9610. "properties": {
  9611. "status": {
  9612. "type": "string",
  9613. "const": "error"
  9614. },
  9615. "input": {
  9616. "type": "object",
  9617. "propertyNames": {
  9618. "type": "string"
  9619. },
  9620. "additionalProperties": {}
  9621. },
  9622. "error": {
  9623. "type": "string"
  9624. },
  9625. "metadata": {
  9626. "type": "object",
  9627. "propertyNames": {
  9628. "type": "string"
  9629. },
  9630. "additionalProperties": {}
  9631. },
  9632. "time": {
  9633. "type": "object",
  9634. "properties": {
  9635. "start": {
  9636. "type": "number"
  9637. },
  9638. "end": {
  9639. "type": "number"
  9640. }
  9641. },
  9642. "required": ["start", "end"]
  9643. }
  9644. },
  9645. "required": ["status", "input", "error", "time"]
  9646. },
  9647. "ToolState": {
  9648. "anyOf": [
  9649. {
  9650. "$ref": "#/components/schemas/ToolStatePending"
  9651. },
  9652. {
  9653. "$ref": "#/components/schemas/ToolStateRunning"
  9654. },
  9655. {
  9656. "$ref": "#/components/schemas/ToolStateCompleted"
  9657. },
  9658. {
  9659. "$ref": "#/components/schemas/ToolStateError"
  9660. }
  9661. ]
  9662. },
  9663. "ToolPart": {
  9664. "type": "object",
  9665. "properties": {
  9666. "id": {
  9667. "type": "string",
  9668. "pattern": "^prt.*"
  9669. },
  9670. "sessionID": {
  9671. "type": "string",
  9672. "pattern": "^ses.*"
  9673. },
  9674. "messageID": {
  9675. "type": "string",
  9676. "pattern": "^msg.*"
  9677. },
  9678. "type": {
  9679. "type": "string",
  9680. "const": "tool"
  9681. },
  9682. "callID": {
  9683. "type": "string"
  9684. },
  9685. "tool": {
  9686. "type": "string"
  9687. },
  9688. "state": {
  9689. "$ref": "#/components/schemas/ToolState"
  9690. },
  9691. "metadata": {
  9692. "type": "object",
  9693. "propertyNames": {
  9694. "type": "string"
  9695. },
  9696. "additionalProperties": {}
  9697. }
  9698. },
  9699. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  9700. },
  9701. "StepStartPart": {
  9702. "type": "object",
  9703. "properties": {
  9704. "id": {
  9705. "type": "string",
  9706. "pattern": "^prt.*"
  9707. },
  9708. "sessionID": {
  9709. "type": "string",
  9710. "pattern": "^ses.*"
  9711. },
  9712. "messageID": {
  9713. "type": "string",
  9714. "pattern": "^msg.*"
  9715. },
  9716. "type": {
  9717. "type": "string",
  9718. "const": "step-start"
  9719. },
  9720. "snapshot": {
  9721. "type": "string"
  9722. }
  9723. },
  9724. "required": ["id", "sessionID", "messageID", "type"]
  9725. },
  9726. "StepFinishPart": {
  9727. "type": "object",
  9728. "properties": {
  9729. "id": {
  9730. "type": "string",
  9731. "pattern": "^prt.*"
  9732. },
  9733. "sessionID": {
  9734. "type": "string",
  9735. "pattern": "^ses.*"
  9736. },
  9737. "messageID": {
  9738. "type": "string",
  9739. "pattern": "^msg.*"
  9740. },
  9741. "type": {
  9742. "type": "string",
  9743. "const": "step-finish"
  9744. },
  9745. "reason": {
  9746. "type": "string"
  9747. },
  9748. "snapshot": {
  9749. "type": "string"
  9750. },
  9751. "cost": {
  9752. "type": "number"
  9753. },
  9754. "tokens": {
  9755. "type": "object",
  9756. "properties": {
  9757. "total": {
  9758. "type": "number"
  9759. },
  9760. "input": {
  9761. "type": "number"
  9762. },
  9763. "output": {
  9764. "type": "number"
  9765. },
  9766. "reasoning": {
  9767. "type": "number"
  9768. },
  9769. "cache": {
  9770. "type": "object",
  9771. "properties": {
  9772. "read": {
  9773. "type": "number"
  9774. },
  9775. "write": {
  9776. "type": "number"
  9777. }
  9778. },
  9779. "required": ["read", "write"]
  9780. }
  9781. },
  9782. "required": ["input", "output", "reasoning", "cache"]
  9783. }
  9784. },
  9785. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  9786. },
  9787. "SnapshotPart": {
  9788. "type": "object",
  9789. "properties": {
  9790. "id": {
  9791. "type": "string",
  9792. "pattern": "^prt.*"
  9793. },
  9794. "sessionID": {
  9795. "type": "string",
  9796. "pattern": "^ses.*"
  9797. },
  9798. "messageID": {
  9799. "type": "string",
  9800. "pattern": "^msg.*"
  9801. },
  9802. "type": {
  9803. "type": "string",
  9804. "const": "snapshot"
  9805. },
  9806. "snapshot": {
  9807. "type": "string"
  9808. }
  9809. },
  9810. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  9811. },
  9812. "PatchPart": {
  9813. "type": "object",
  9814. "properties": {
  9815. "id": {
  9816. "type": "string",
  9817. "pattern": "^prt.*"
  9818. },
  9819. "sessionID": {
  9820. "type": "string",
  9821. "pattern": "^ses.*"
  9822. },
  9823. "messageID": {
  9824. "type": "string",
  9825. "pattern": "^msg.*"
  9826. },
  9827. "type": {
  9828. "type": "string",
  9829. "const": "patch"
  9830. },
  9831. "hash": {
  9832. "type": "string"
  9833. },
  9834. "files": {
  9835. "type": "array",
  9836. "items": {
  9837. "type": "string"
  9838. }
  9839. }
  9840. },
  9841. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  9842. },
  9843. "AgentPart": {
  9844. "type": "object",
  9845. "properties": {
  9846. "id": {
  9847. "type": "string",
  9848. "pattern": "^prt.*"
  9849. },
  9850. "sessionID": {
  9851. "type": "string",
  9852. "pattern": "^ses.*"
  9853. },
  9854. "messageID": {
  9855. "type": "string",
  9856. "pattern": "^msg.*"
  9857. },
  9858. "type": {
  9859. "type": "string",
  9860. "const": "agent"
  9861. },
  9862. "name": {
  9863. "type": "string"
  9864. },
  9865. "source": {
  9866. "type": "object",
  9867. "properties": {
  9868. "value": {
  9869. "type": "string"
  9870. },
  9871. "start": {
  9872. "type": "integer",
  9873. "minimum": -9007199254740991,
  9874. "maximum": 9007199254740991
  9875. },
  9876. "end": {
  9877. "type": "integer",
  9878. "minimum": -9007199254740991,
  9879. "maximum": 9007199254740991
  9880. }
  9881. },
  9882. "required": ["value", "start", "end"]
  9883. }
  9884. },
  9885. "required": ["id", "sessionID", "messageID", "type", "name"]
  9886. },
  9887. "RetryPart": {
  9888. "type": "object",
  9889. "properties": {
  9890. "id": {
  9891. "type": "string",
  9892. "pattern": "^prt.*"
  9893. },
  9894. "sessionID": {
  9895. "type": "string",
  9896. "pattern": "^ses.*"
  9897. },
  9898. "messageID": {
  9899. "type": "string",
  9900. "pattern": "^msg.*"
  9901. },
  9902. "type": {
  9903. "type": "string",
  9904. "const": "retry"
  9905. },
  9906. "attempt": {
  9907. "type": "number"
  9908. },
  9909. "error": {
  9910. "$ref": "#/components/schemas/APIError"
  9911. },
  9912. "time": {
  9913. "type": "object",
  9914. "properties": {
  9915. "created": {
  9916. "type": "number"
  9917. }
  9918. },
  9919. "required": ["created"]
  9920. }
  9921. },
  9922. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  9923. },
  9924. "CompactionPart": {
  9925. "type": "object",
  9926. "properties": {
  9927. "id": {
  9928. "type": "string",
  9929. "pattern": "^prt.*"
  9930. },
  9931. "sessionID": {
  9932. "type": "string",
  9933. "pattern": "^ses.*"
  9934. },
  9935. "messageID": {
  9936. "type": "string",
  9937. "pattern": "^msg.*"
  9938. },
  9939. "type": {
  9940. "type": "string",
  9941. "const": "compaction"
  9942. },
  9943. "auto": {
  9944. "type": "boolean"
  9945. },
  9946. "overflow": {
  9947. "type": "boolean"
  9948. }
  9949. },
  9950. "required": ["id", "sessionID", "messageID", "type", "auto"]
  9951. },
  9952. "Part": {
  9953. "anyOf": [
  9954. {
  9955. "$ref": "#/components/schemas/TextPart"
  9956. },
  9957. {
  9958. "$ref": "#/components/schemas/SubtaskPart"
  9959. },
  9960. {
  9961. "$ref": "#/components/schemas/ReasoningPart"
  9962. },
  9963. {
  9964. "$ref": "#/components/schemas/FilePart"
  9965. },
  9966. {
  9967. "$ref": "#/components/schemas/ToolPart"
  9968. },
  9969. {
  9970. "$ref": "#/components/schemas/StepStartPart"
  9971. },
  9972. {
  9973. "$ref": "#/components/schemas/StepFinishPart"
  9974. },
  9975. {
  9976. "$ref": "#/components/schemas/SnapshotPart"
  9977. },
  9978. {
  9979. "$ref": "#/components/schemas/PatchPart"
  9980. },
  9981. {
  9982. "$ref": "#/components/schemas/AgentPart"
  9983. },
  9984. {
  9985. "$ref": "#/components/schemas/RetryPart"
  9986. },
  9987. {
  9988. "$ref": "#/components/schemas/CompactionPart"
  9989. }
  9990. ]
  9991. },
  9992. "Event.message.part.updated": {
  9993. "type": "object",
  9994. "properties": {
  9995. "type": {
  9996. "type": "string",
  9997. "const": "message.part.updated"
  9998. },
  9999. "properties": {
  10000. "type": "object",
  10001. "properties": {
  10002. "sessionID": {
  10003. "type": "string",
  10004. "pattern": "^ses.*"
  10005. },
  10006. "part": {
  10007. "$ref": "#/components/schemas/Part"
  10008. },
  10009. "time": {
  10010. "type": "number"
  10011. }
  10012. },
  10013. "required": ["sessionID", "part", "time"]
  10014. }
  10015. },
  10016. "required": ["type", "properties"]
  10017. },
  10018. "Event.message.part.removed": {
  10019. "type": "object",
  10020. "properties": {
  10021. "type": {
  10022. "type": "string",
  10023. "const": "message.part.removed"
  10024. },
  10025. "properties": {
  10026. "type": "object",
  10027. "properties": {
  10028. "sessionID": {
  10029. "type": "string",
  10030. "pattern": "^ses.*"
  10031. },
  10032. "messageID": {
  10033. "type": "string",
  10034. "pattern": "^msg.*"
  10035. },
  10036. "partID": {
  10037. "type": "string",
  10038. "pattern": "^prt.*"
  10039. }
  10040. },
  10041. "required": ["sessionID", "messageID", "partID"]
  10042. }
  10043. },
  10044. "required": ["type", "properties"]
  10045. },
  10046. "PermissionAction": {
  10047. "type": "string",
  10048. "enum": ["allow", "deny", "ask"]
  10049. },
  10050. "PermissionRule": {
  10051. "type": "object",
  10052. "properties": {
  10053. "permission": {
  10054. "type": "string"
  10055. },
  10056. "pattern": {
  10057. "type": "string"
  10058. },
  10059. "action": {
  10060. "$ref": "#/components/schemas/PermissionAction"
  10061. }
  10062. },
  10063. "required": ["permission", "pattern", "action"]
  10064. },
  10065. "PermissionRuleset": {
  10066. "type": "array",
  10067. "items": {
  10068. "$ref": "#/components/schemas/PermissionRule"
  10069. }
  10070. },
  10071. "Session": {
  10072. "type": "object",
  10073. "properties": {
  10074. "id": {
  10075. "type": "string",
  10076. "pattern": "^ses.*"
  10077. },
  10078. "slug": {
  10079. "type": "string"
  10080. },
  10081. "projectID": {
  10082. "type": "string"
  10083. },
  10084. "workspaceID": {
  10085. "type": "string",
  10086. "pattern": "^wrk.*"
  10087. },
  10088. "directory": {
  10089. "type": "string"
  10090. },
  10091. "parentID": {
  10092. "type": "string",
  10093. "pattern": "^ses.*"
  10094. },
  10095. "summary": {
  10096. "type": "object",
  10097. "properties": {
  10098. "additions": {
  10099. "type": "number"
  10100. },
  10101. "deletions": {
  10102. "type": "number"
  10103. },
  10104. "files": {
  10105. "type": "number"
  10106. },
  10107. "diffs": {
  10108. "type": "array",
  10109. "items": {
  10110. "$ref": "#/components/schemas/SnapshotFileDiff"
  10111. }
  10112. }
  10113. },
  10114. "required": ["additions", "deletions", "files"]
  10115. },
  10116. "share": {
  10117. "type": "object",
  10118. "properties": {
  10119. "url": {
  10120. "type": "string"
  10121. }
  10122. },
  10123. "required": ["url"]
  10124. },
  10125. "title": {
  10126. "type": "string"
  10127. },
  10128. "version": {
  10129. "type": "string"
  10130. },
  10131. "time": {
  10132. "type": "object",
  10133. "properties": {
  10134. "created": {
  10135. "type": "number"
  10136. },
  10137. "updated": {
  10138. "type": "number"
  10139. },
  10140. "compacting": {
  10141. "type": "number"
  10142. },
  10143. "archived": {
  10144. "type": "number"
  10145. }
  10146. },
  10147. "required": ["created", "updated"]
  10148. },
  10149. "permission": {
  10150. "$ref": "#/components/schemas/PermissionRuleset"
  10151. },
  10152. "revert": {
  10153. "type": "object",
  10154. "properties": {
  10155. "messageID": {
  10156. "type": "string",
  10157. "pattern": "^msg.*"
  10158. },
  10159. "partID": {
  10160. "type": "string",
  10161. "pattern": "^prt.*"
  10162. },
  10163. "snapshot": {
  10164. "type": "string"
  10165. },
  10166. "diff": {
  10167. "type": "string"
  10168. }
  10169. },
  10170. "required": ["messageID"]
  10171. }
  10172. },
  10173. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"]
  10174. },
  10175. "Event.session.created": {
  10176. "type": "object",
  10177. "properties": {
  10178. "type": {
  10179. "type": "string",
  10180. "const": "session.created"
  10181. },
  10182. "properties": {
  10183. "type": "object",
  10184. "properties": {
  10185. "sessionID": {
  10186. "type": "string",
  10187. "pattern": "^ses.*"
  10188. },
  10189. "info": {
  10190. "$ref": "#/components/schemas/Session"
  10191. }
  10192. },
  10193. "required": ["sessionID", "info"]
  10194. }
  10195. },
  10196. "required": ["type", "properties"]
  10197. },
  10198. "Event.session.updated": {
  10199. "type": "object",
  10200. "properties": {
  10201. "type": {
  10202. "type": "string",
  10203. "const": "session.updated"
  10204. },
  10205. "properties": {
  10206. "type": "object",
  10207. "properties": {
  10208. "sessionID": {
  10209. "type": "string",
  10210. "pattern": "^ses.*"
  10211. },
  10212. "info": {
  10213. "$ref": "#/components/schemas/Session"
  10214. }
  10215. },
  10216. "required": ["sessionID", "info"]
  10217. }
  10218. },
  10219. "required": ["type", "properties"]
  10220. },
  10221. "Event.session.deleted": {
  10222. "type": "object",
  10223. "properties": {
  10224. "type": {
  10225. "type": "string",
  10226. "const": "session.deleted"
  10227. },
  10228. "properties": {
  10229. "type": "object",
  10230. "properties": {
  10231. "sessionID": {
  10232. "type": "string",
  10233. "pattern": "^ses.*"
  10234. },
  10235. "info": {
  10236. "$ref": "#/components/schemas/Session"
  10237. }
  10238. },
  10239. "required": ["sessionID", "info"]
  10240. }
  10241. },
  10242. "required": ["type", "properties"]
  10243. },
  10244. "SyncEvent.message.updated": {
  10245. "type": "object",
  10246. "properties": {
  10247. "type": {
  10248. "type": "string",
  10249. "const": "sync"
  10250. },
  10251. "name": {
  10252. "type": "string",
  10253. "const": "message.updated.1"
  10254. },
  10255. "id": {
  10256. "type": "string"
  10257. },
  10258. "seq": {
  10259. "type": "number"
  10260. },
  10261. "aggregateID": {
  10262. "type": "string",
  10263. "const": "sessionID"
  10264. },
  10265. "data": {
  10266. "type": "object",
  10267. "properties": {
  10268. "sessionID": {
  10269. "type": "string",
  10270. "pattern": "^ses.*"
  10271. },
  10272. "info": {
  10273. "$ref": "#/components/schemas/Message"
  10274. }
  10275. },
  10276. "required": ["sessionID", "info"]
  10277. }
  10278. },
  10279. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10280. },
  10281. "SyncEvent.message.removed": {
  10282. "type": "object",
  10283. "properties": {
  10284. "type": {
  10285. "type": "string",
  10286. "const": "sync"
  10287. },
  10288. "name": {
  10289. "type": "string",
  10290. "const": "message.removed.1"
  10291. },
  10292. "id": {
  10293. "type": "string"
  10294. },
  10295. "seq": {
  10296. "type": "number"
  10297. },
  10298. "aggregateID": {
  10299. "type": "string",
  10300. "const": "sessionID"
  10301. },
  10302. "data": {
  10303. "type": "object",
  10304. "properties": {
  10305. "sessionID": {
  10306. "type": "string",
  10307. "pattern": "^ses.*"
  10308. },
  10309. "messageID": {
  10310. "type": "string",
  10311. "pattern": "^msg.*"
  10312. }
  10313. },
  10314. "required": ["sessionID", "messageID"]
  10315. }
  10316. },
  10317. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10318. },
  10319. "SyncEvent.message.part.updated": {
  10320. "type": "object",
  10321. "properties": {
  10322. "type": {
  10323. "type": "string",
  10324. "const": "sync"
  10325. },
  10326. "name": {
  10327. "type": "string",
  10328. "const": "message.part.updated.1"
  10329. },
  10330. "id": {
  10331. "type": "string"
  10332. },
  10333. "seq": {
  10334. "type": "number"
  10335. },
  10336. "aggregateID": {
  10337. "type": "string",
  10338. "const": "sessionID"
  10339. },
  10340. "data": {
  10341. "type": "object",
  10342. "properties": {
  10343. "sessionID": {
  10344. "type": "string",
  10345. "pattern": "^ses.*"
  10346. },
  10347. "part": {
  10348. "$ref": "#/components/schemas/Part"
  10349. },
  10350. "time": {
  10351. "type": "number"
  10352. }
  10353. },
  10354. "required": ["sessionID", "part", "time"]
  10355. }
  10356. },
  10357. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10358. },
  10359. "SyncEvent.message.part.removed": {
  10360. "type": "object",
  10361. "properties": {
  10362. "type": {
  10363. "type": "string",
  10364. "const": "sync"
  10365. },
  10366. "name": {
  10367. "type": "string",
  10368. "const": "message.part.removed.1"
  10369. },
  10370. "id": {
  10371. "type": "string"
  10372. },
  10373. "seq": {
  10374. "type": "number"
  10375. },
  10376. "aggregateID": {
  10377. "type": "string",
  10378. "const": "sessionID"
  10379. },
  10380. "data": {
  10381. "type": "object",
  10382. "properties": {
  10383. "sessionID": {
  10384. "type": "string",
  10385. "pattern": "^ses.*"
  10386. },
  10387. "messageID": {
  10388. "type": "string",
  10389. "pattern": "^msg.*"
  10390. },
  10391. "partID": {
  10392. "type": "string",
  10393. "pattern": "^prt.*"
  10394. }
  10395. },
  10396. "required": ["sessionID", "messageID", "partID"]
  10397. }
  10398. },
  10399. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10400. },
  10401. "SyncEvent.session.created": {
  10402. "type": "object",
  10403. "properties": {
  10404. "type": {
  10405. "type": "string",
  10406. "const": "sync"
  10407. },
  10408. "name": {
  10409. "type": "string",
  10410. "const": "session.created.1"
  10411. },
  10412. "id": {
  10413. "type": "string"
  10414. },
  10415. "seq": {
  10416. "type": "number"
  10417. },
  10418. "aggregateID": {
  10419. "type": "string",
  10420. "const": "sessionID"
  10421. },
  10422. "data": {
  10423. "type": "object",
  10424. "properties": {
  10425. "sessionID": {
  10426. "type": "string",
  10427. "pattern": "^ses.*"
  10428. },
  10429. "info": {
  10430. "$ref": "#/components/schemas/Session"
  10431. }
  10432. },
  10433. "required": ["sessionID", "info"]
  10434. }
  10435. },
  10436. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10437. },
  10438. "SyncEvent.session.updated": {
  10439. "type": "object",
  10440. "properties": {
  10441. "type": {
  10442. "type": "string",
  10443. "const": "sync"
  10444. },
  10445. "name": {
  10446. "type": "string",
  10447. "const": "session.updated.1"
  10448. },
  10449. "id": {
  10450. "type": "string"
  10451. },
  10452. "seq": {
  10453. "type": "number"
  10454. },
  10455. "aggregateID": {
  10456. "type": "string",
  10457. "const": "sessionID"
  10458. },
  10459. "data": {
  10460. "type": "object",
  10461. "properties": {
  10462. "sessionID": {
  10463. "type": "string",
  10464. "pattern": "^ses.*"
  10465. },
  10466. "info": {
  10467. "type": "object",
  10468. "properties": {
  10469. "id": {
  10470. "anyOf": [
  10471. {
  10472. "type": "string",
  10473. "pattern": "^ses.*"
  10474. },
  10475. {
  10476. "type": "null"
  10477. }
  10478. ]
  10479. },
  10480. "slug": {
  10481. "anyOf": [
  10482. {
  10483. "type": "string"
  10484. },
  10485. {
  10486. "type": "null"
  10487. }
  10488. ]
  10489. },
  10490. "projectID": {
  10491. "anyOf": [
  10492. {
  10493. "type": "string"
  10494. },
  10495. {
  10496. "type": "null"
  10497. }
  10498. ]
  10499. },
  10500. "workspaceID": {
  10501. "anyOf": [
  10502. {
  10503. "type": "string",
  10504. "pattern": "^wrk.*"
  10505. },
  10506. {
  10507. "type": "null"
  10508. }
  10509. ]
  10510. },
  10511. "directory": {
  10512. "anyOf": [
  10513. {
  10514. "type": "string"
  10515. },
  10516. {
  10517. "type": "null"
  10518. }
  10519. ]
  10520. },
  10521. "parentID": {
  10522. "anyOf": [
  10523. {
  10524. "type": "string",
  10525. "pattern": "^ses.*"
  10526. },
  10527. {
  10528. "type": "null"
  10529. }
  10530. ]
  10531. },
  10532. "summary": {
  10533. "anyOf": [
  10534. {
  10535. "type": "object",
  10536. "properties": {
  10537. "additions": {
  10538. "type": "number"
  10539. },
  10540. "deletions": {
  10541. "type": "number"
  10542. },
  10543. "files": {
  10544. "type": "number"
  10545. },
  10546. "diffs": {
  10547. "type": "array",
  10548. "items": {
  10549. "$ref": "#/components/schemas/SnapshotFileDiff"
  10550. }
  10551. }
  10552. },
  10553. "required": ["additions", "deletions", "files"]
  10554. },
  10555. {
  10556. "type": "null"
  10557. }
  10558. ]
  10559. },
  10560. "share": {
  10561. "type": "object",
  10562. "properties": {
  10563. "url": {
  10564. "anyOf": [
  10565. {
  10566. "type": "string"
  10567. },
  10568. {
  10569. "type": "null"
  10570. }
  10571. ]
  10572. }
  10573. },
  10574. "required": ["url"]
  10575. },
  10576. "title": {
  10577. "anyOf": [
  10578. {
  10579. "type": "string"
  10580. },
  10581. {
  10582. "type": "null"
  10583. }
  10584. ]
  10585. },
  10586. "version": {
  10587. "anyOf": [
  10588. {
  10589. "type": "string"
  10590. },
  10591. {
  10592. "type": "null"
  10593. }
  10594. ]
  10595. },
  10596. "time": {
  10597. "type": "object",
  10598. "properties": {
  10599. "created": {
  10600. "anyOf": [
  10601. {
  10602. "type": "number"
  10603. },
  10604. {
  10605. "type": "null"
  10606. }
  10607. ]
  10608. },
  10609. "updated": {
  10610. "anyOf": [
  10611. {
  10612. "type": "number"
  10613. },
  10614. {
  10615. "type": "null"
  10616. }
  10617. ]
  10618. },
  10619. "compacting": {
  10620. "anyOf": [
  10621. {
  10622. "type": "number"
  10623. },
  10624. {
  10625. "type": "null"
  10626. }
  10627. ]
  10628. },
  10629. "archived": {
  10630. "anyOf": [
  10631. {
  10632. "type": "number"
  10633. },
  10634. {
  10635. "type": "null"
  10636. }
  10637. ]
  10638. }
  10639. },
  10640. "required": ["created", "updated", "compacting", "archived"]
  10641. },
  10642. "permission": {
  10643. "anyOf": [
  10644. {
  10645. "$ref": "#/components/schemas/PermissionRuleset"
  10646. },
  10647. {
  10648. "type": "null"
  10649. }
  10650. ]
  10651. },
  10652. "revert": {
  10653. "anyOf": [
  10654. {
  10655. "type": "object",
  10656. "properties": {
  10657. "messageID": {
  10658. "type": "string",
  10659. "pattern": "^msg.*"
  10660. },
  10661. "partID": {
  10662. "type": "string",
  10663. "pattern": "^prt.*"
  10664. },
  10665. "snapshot": {
  10666. "type": "string"
  10667. },
  10668. "diff": {
  10669. "type": "string"
  10670. }
  10671. },
  10672. "required": ["messageID"]
  10673. },
  10674. {
  10675. "type": "null"
  10676. }
  10677. ]
  10678. }
  10679. },
  10680. "required": [
  10681. "id",
  10682. "slug",
  10683. "projectID",
  10684. "workspaceID",
  10685. "directory",
  10686. "parentID",
  10687. "summary",
  10688. "title",
  10689. "version",
  10690. "permission",
  10691. "revert"
  10692. ]
  10693. }
  10694. },
  10695. "required": ["sessionID", "info"]
  10696. }
  10697. },
  10698. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10699. },
  10700. "SyncEvent.session.deleted": {
  10701. "type": "object",
  10702. "properties": {
  10703. "type": {
  10704. "type": "string",
  10705. "const": "sync"
  10706. },
  10707. "name": {
  10708. "type": "string",
  10709. "const": "session.deleted.1"
  10710. },
  10711. "id": {
  10712. "type": "string"
  10713. },
  10714. "seq": {
  10715. "type": "number"
  10716. },
  10717. "aggregateID": {
  10718. "type": "string",
  10719. "const": "sessionID"
  10720. },
  10721. "data": {
  10722. "type": "object",
  10723. "properties": {
  10724. "sessionID": {
  10725. "type": "string",
  10726. "pattern": "^ses.*"
  10727. },
  10728. "info": {
  10729. "$ref": "#/components/schemas/Session"
  10730. }
  10731. },
  10732. "required": ["sessionID", "info"]
  10733. }
  10734. },
  10735. "required": ["type", "name", "id", "seq", "aggregateID", "data"]
  10736. },
  10737. "GlobalEvent": {
  10738. "type": "object",
  10739. "properties": {
  10740. "directory": {
  10741. "type": "string"
  10742. },
  10743. "project": {
  10744. "type": "string"
  10745. },
  10746. "workspace": {
  10747. "type": "string"
  10748. },
  10749. "payload": {
  10750. "anyOf": [
  10751. {
  10752. "$ref": "#/components/schemas/Event.project.updated"
  10753. },
  10754. {
  10755. "$ref": "#/components/schemas/Event.server.instance.disposed"
  10756. },
  10757. {
  10758. "$ref": "#/components/schemas/Event.server.connected"
  10759. },
  10760. {
  10761. "$ref": "#/components/schemas/Event.global.disposed"
  10762. },
  10763. {
  10764. "$ref": "#/components/schemas/Event.file.edited"
  10765. },
  10766. {
  10767. "$ref": "#/components/schemas/Event.file.watcher.updated"
  10768. },
  10769. {
  10770. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  10771. },
  10772. {
  10773. "$ref": "#/components/schemas/Event.lsp.updated"
  10774. },
  10775. {
  10776. "$ref": "#/components/schemas/Event.installation.updated"
  10777. },
  10778. {
  10779. "$ref": "#/components/schemas/Event.installation.update-available"
  10780. },
  10781. {
  10782. "$ref": "#/components/schemas/Event.message.part.delta"
  10783. },
  10784. {
  10785. "$ref": "#/components/schemas/Event.permission.asked"
  10786. },
  10787. {
  10788. "$ref": "#/components/schemas/Event.permission.replied"
  10789. },
  10790. {
  10791. "$ref": "#/components/schemas/Event.session.diff"
  10792. },
  10793. {
  10794. "$ref": "#/components/schemas/Event.session.error"
  10795. },
  10796. {
  10797. "$ref": "#/components/schemas/Event.question.asked"
  10798. },
  10799. {
  10800. "$ref": "#/components/schemas/Event.question.replied"
  10801. },
  10802. {
  10803. "$ref": "#/components/schemas/Event.question.rejected"
  10804. },
  10805. {
  10806. "$ref": "#/components/schemas/Event.todo.updated"
  10807. },
  10808. {
  10809. "$ref": "#/components/schemas/Event.session.status"
  10810. },
  10811. {
  10812. "$ref": "#/components/schemas/Event.session.idle"
  10813. },
  10814. {
  10815. "$ref": "#/components/schemas/Event.session.compacted"
  10816. },
  10817. {
  10818. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10819. },
  10820. {
  10821. "$ref": "#/components/schemas/Event.tui.command.execute"
  10822. },
  10823. {
  10824. "$ref": "#/components/schemas/Event.tui.toast.show"
  10825. },
  10826. {
  10827. "$ref": "#/components/schemas/Event.tui.session.select"
  10828. },
  10829. {
  10830. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  10831. },
  10832. {
  10833. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  10834. },
  10835. {
  10836. "$ref": "#/components/schemas/Event.command.executed"
  10837. },
  10838. {
  10839. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  10840. },
  10841. {
  10842. "$ref": "#/components/schemas/Event.worktree.ready"
  10843. },
  10844. {
  10845. "$ref": "#/components/schemas/Event.worktree.failed"
  10846. },
  10847. {
  10848. "$ref": "#/components/schemas/Event.pty.created"
  10849. },
  10850. {
  10851. "$ref": "#/components/schemas/Event.pty.updated"
  10852. },
  10853. {
  10854. "$ref": "#/components/schemas/Event.pty.exited"
  10855. },
  10856. {
  10857. "$ref": "#/components/schemas/Event.pty.deleted"
  10858. },
  10859. {
  10860. "$ref": "#/components/schemas/Event.workspace.ready"
  10861. },
  10862. {
  10863. "$ref": "#/components/schemas/Event.workspace.failed"
  10864. },
  10865. {
  10866. "$ref": "#/components/schemas/Event.workspace.restore"
  10867. },
  10868. {
  10869. "$ref": "#/components/schemas/Event.workspace.status"
  10870. },
  10871. {
  10872. "$ref": "#/components/schemas/Event.message.updated"
  10873. },
  10874. {
  10875. "$ref": "#/components/schemas/Event.message.removed"
  10876. },
  10877. {
  10878. "$ref": "#/components/schemas/Event.message.part.updated"
  10879. },
  10880. {
  10881. "$ref": "#/components/schemas/Event.message.part.removed"
  10882. },
  10883. {
  10884. "$ref": "#/components/schemas/Event.session.created"
  10885. },
  10886. {
  10887. "$ref": "#/components/schemas/Event.session.updated"
  10888. },
  10889. {
  10890. "$ref": "#/components/schemas/Event.session.deleted"
  10891. },
  10892. {
  10893. "$ref": "#/components/schemas/SyncEvent.message.updated"
  10894. },
  10895. {
  10896. "$ref": "#/components/schemas/SyncEvent.message.removed"
  10897. },
  10898. {
  10899. "$ref": "#/components/schemas/SyncEvent.message.part.updated"
  10900. },
  10901. {
  10902. "$ref": "#/components/schemas/SyncEvent.message.part.removed"
  10903. },
  10904. {
  10905. "$ref": "#/components/schemas/SyncEvent.session.created"
  10906. },
  10907. {
  10908. "$ref": "#/components/schemas/SyncEvent.session.updated"
  10909. },
  10910. {
  10911. "$ref": "#/components/schemas/SyncEvent.session.deleted"
  10912. }
  10913. ]
  10914. }
  10915. },
  10916. "required": ["directory", "payload"]
  10917. },
  10918. "LogLevel": {
  10919. "description": "Log level",
  10920. "type": "string",
  10921. "enum": ["DEBUG", "INFO", "WARN", "ERROR"]
  10922. },
  10923. "ServerConfig": {
  10924. "description": "Server configuration for opencode serve and web commands",
  10925. "type": "object",
  10926. "properties": {
  10927. "port": {
  10928. "description": "Port to listen on",
  10929. "type": "integer",
  10930. "exclusiveMinimum": 0,
  10931. "maximum": 9007199254740991
  10932. },
  10933. "hostname": {
  10934. "description": "Hostname to listen on",
  10935. "type": "string"
  10936. },
  10937. "mdns": {
  10938. "description": "Enable mDNS service discovery",
  10939. "type": "boolean"
  10940. },
  10941. "mdnsDomain": {
  10942. "description": "Custom domain name for mDNS service (default: opencode.local)",
  10943. "type": "string"
  10944. },
  10945. "cors": {
  10946. "description": "Additional domains to allow for CORS",
  10947. "type": "array",
  10948. "items": {
  10949. "type": "string"
  10950. }
  10951. }
  10952. },
  10953. "additionalProperties": false
  10954. },
  10955. "PermissionActionConfig": {
  10956. "type": "string",
  10957. "enum": ["ask", "allow", "deny"]
  10958. },
  10959. "PermissionObjectConfig": {
  10960. "type": "object",
  10961. "propertyNames": {
  10962. "type": "string"
  10963. },
  10964. "additionalProperties": {
  10965. "$ref": "#/components/schemas/PermissionActionConfig"
  10966. }
  10967. },
  10968. "PermissionRuleConfig": {
  10969. "anyOf": [
  10970. {
  10971. "$ref": "#/components/schemas/PermissionActionConfig"
  10972. },
  10973. {
  10974. "$ref": "#/components/schemas/PermissionObjectConfig"
  10975. }
  10976. ]
  10977. },
  10978. "PermissionConfig": {
  10979. "anyOf": [
  10980. {
  10981. "type": "object",
  10982. "properties": {
  10983. "__originalKeys": {
  10984. "type": "array",
  10985. "items": {
  10986. "type": "string"
  10987. }
  10988. },
  10989. "read": {
  10990. "$ref": "#/components/schemas/PermissionRuleConfig"
  10991. },
  10992. "edit": {
  10993. "$ref": "#/components/schemas/PermissionRuleConfig"
  10994. },
  10995. "glob": {
  10996. "$ref": "#/components/schemas/PermissionRuleConfig"
  10997. },
  10998. "grep": {
  10999. "$ref": "#/components/schemas/PermissionRuleConfig"
  11000. },
  11001. "list": {
  11002. "$ref": "#/components/schemas/PermissionRuleConfig"
  11003. },
  11004. "bash": {
  11005. "$ref": "#/components/schemas/PermissionRuleConfig"
  11006. },
  11007. "task": {
  11008. "$ref": "#/components/schemas/PermissionRuleConfig"
  11009. },
  11010. "external_directory": {
  11011. "$ref": "#/components/schemas/PermissionRuleConfig"
  11012. },
  11013. "todowrite": {
  11014. "$ref": "#/components/schemas/PermissionActionConfig"
  11015. },
  11016. "question": {
  11017. "$ref": "#/components/schemas/PermissionActionConfig"
  11018. },
  11019. "webfetch": {
  11020. "$ref": "#/components/schemas/PermissionActionConfig"
  11021. },
  11022. "websearch": {
  11023. "$ref": "#/components/schemas/PermissionActionConfig"
  11024. },
  11025. "codesearch": {
  11026. "$ref": "#/components/schemas/PermissionActionConfig"
  11027. },
  11028. "lsp": {
  11029. "$ref": "#/components/schemas/PermissionRuleConfig"
  11030. },
  11031. "doom_loop": {
  11032. "$ref": "#/components/schemas/PermissionActionConfig"
  11033. },
  11034. "skill": {
  11035. "$ref": "#/components/schemas/PermissionRuleConfig"
  11036. }
  11037. },
  11038. "additionalProperties": {
  11039. "$ref": "#/components/schemas/PermissionRuleConfig"
  11040. }
  11041. },
  11042. {
  11043. "$ref": "#/components/schemas/PermissionActionConfig"
  11044. }
  11045. ]
  11046. },
  11047. "AgentConfig": {
  11048. "type": "object",
  11049. "properties": {
  11050. "model": {
  11051. "type": "string"
  11052. },
  11053. "variant": {
  11054. "description": "Default model variant for this agent (applies only when using the agent's configured model).",
  11055. "type": "string"
  11056. },
  11057. "temperature": {
  11058. "type": "number"
  11059. },
  11060. "top_p": {
  11061. "type": "number"
  11062. },
  11063. "prompt": {
  11064. "type": "string"
  11065. },
  11066. "tools": {
  11067. "description": "@deprecated Use 'permission' field instead",
  11068. "type": "object",
  11069. "propertyNames": {
  11070. "type": "string"
  11071. },
  11072. "additionalProperties": {
  11073. "type": "boolean"
  11074. }
  11075. },
  11076. "disable": {
  11077. "type": "boolean"
  11078. },
  11079. "description": {
  11080. "description": "Description of when to use the agent",
  11081. "type": "string"
  11082. },
  11083. "mode": {
  11084. "type": "string",
  11085. "enum": ["subagent", "primary", "all"]
  11086. },
  11087. "hidden": {
  11088. "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
  11089. "type": "boolean"
  11090. },
  11091. "options": {
  11092. "type": "object",
  11093. "propertyNames": {
  11094. "type": "string"
  11095. },
  11096. "additionalProperties": {}
  11097. },
  11098. "color": {
  11099. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
  11100. "anyOf": [
  11101. {
  11102. "type": "string",
  11103. "pattern": "^#[0-9a-fA-F]{6}$"
  11104. },
  11105. {
  11106. "type": "string",
  11107. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11108. }
  11109. ]
  11110. },
  11111. "steps": {
  11112. "description": "Maximum number of agentic iterations before forcing text-only response",
  11113. "type": "integer",
  11114. "exclusiveMinimum": 0,
  11115. "maximum": 9007199254740991
  11116. },
  11117. "maxSteps": {
  11118. "description": "@deprecated Use 'steps' field instead.",
  11119. "type": "integer",
  11120. "exclusiveMinimum": 0,
  11121. "maximum": 9007199254740991
  11122. },
  11123. "permission": {
  11124. "$ref": "#/components/schemas/PermissionConfig"
  11125. }
  11126. },
  11127. "additionalProperties": {}
  11128. },
  11129. "ProviderConfig": {
  11130. "type": "object",
  11131. "properties": {
  11132. "api": {
  11133. "type": "string"
  11134. },
  11135. "name": {
  11136. "type": "string"
  11137. },
  11138. "env": {
  11139. "type": "array",
  11140. "items": {
  11141. "type": "string"
  11142. }
  11143. },
  11144. "id": {
  11145. "type": "string"
  11146. },
  11147. "npm": {
  11148. "type": "string"
  11149. },
  11150. "whitelist": {
  11151. "type": "array",
  11152. "items": {
  11153. "type": "string"
  11154. }
  11155. },
  11156. "blacklist": {
  11157. "type": "array",
  11158. "items": {
  11159. "type": "string"
  11160. }
  11161. },
  11162. "options": {
  11163. "type": "object",
  11164. "properties": {
  11165. "apiKey": {
  11166. "type": "string"
  11167. },
  11168. "baseURL": {
  11169. "type": "string"
  11170. },
  11171. "enterpriseUrl": {
  11172. "description": "GitHub Enterprise URL for copilot authentication",
  11173. "type": "string"
  11174. },
  11175. "setCacheKey": {
  11176. "description": "Enable promptCacheKey for this provider (default false)",
  11177. "type": "boolean"
  11178. },
  11179. "timeout": {
  11180. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  11181. "anyOf": [
  11182. {
  11183. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  11184. "type": "integer",
  11185. "exclusiveMinimum": 0,
  11186. "maximum": 9007199254740991
  11187. },
  11188. {
  11189. "description": "Disable timeout for this provider entirely.",
  11190. "type": "boolean",
  11191. "const": false
  11192. }
  11193. ]
  11194. },
  11195. "chunkTimeout": {
  11196. "description": "Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.",
  11197. "type": "integer",
  11198. "exclusiveMinimum": 0,
  11199. "maximum": 9007199254740991
  11200. }
  11201. },
  11202. "additionalProperties": {}
  11203. },
  11204. "models": {
  11205. "type": "object",
  11206. "propertyNames": {
  11207. "type": "string"
  11208. },
  11209. "additionalProperties": {
  11210. "type": "object",
  11211. "properties": {
  11212. "id": {
  11213. "type": "string"
  11214. },
  11215. "name": {
  11216. "type": "string"
  11217. },
  11218. "family": {
  11219. "type": "string"
  11220. },
  11221. "release_date": {
  11222. "type": "string"
  11223. },
  11224. "attachment": {
  11225. "type": "boolean"
  11226. },
  11227. "reasoning": {
  11228. "type": "boolean"
  11229. },
  11230. "temperature": {
  11231. "type": "boolean"
  11232. },
  11233. "tool_call": {
  11234. "type": "boolean"
  11235. },
  11236. "interleaved": {
  11237. "anyOf": [
  11238. {
  11239. "type": "boolean",
  11240. "const": true
  11241. },
  11242. {
  11243. "type": "object",
  11244. "properties": {
  11245. "field": {
  11246. "type": "string",
  11247. "enum": ["reasoning_content", "reasoning_details"]
  11248. }
  11249. },
  11250. "required": ["field"],
  11251. "additionalProperties": false
  11252. }
  11253. ]
  11254. },
  11255. "cost": {
  11256. "type": "object",
  11257. "properties": {
  11258. "input": {
  11259. "type": "number"
  11260. },
  11261. "output": {
  11262. "type": "number"
  11263. },
  11264. "cache_read": {
  11265. "type": "number"
  11266. },
  11267. "cache_write": {
  11268. "type": "number"
  11269. },
  11270. "context_over_200k": {
  11271. "type": "object",
  11272. "properties": {
  11273. "input": {
  11274. "type": "number"
  11275. },
  11276. "output": {
  11277. "type": "number"
  11278. },
  11279. "cache_read": {
  11280. "type": "number"
  11281. },
  11282. "cache_write": {
  11283. "type": "number"
  11284. }
  11285. },
  11286. "required": ["input", "output"]
  11287. }
  11288. },
  11289. "required": ["input", "output"]
  11290. },
  11291. "limit": {
  11292. "type": "object",
  11293. "properties": {
  11294. "context": {
  11295. "type": "number"
  11296. },
  11297. "input": {
  11298. "type": "number"
  11299. },
  11300. "output": {
  11301. "type": "number"
  11302. }
  11303. },
  11304. "required": ["context", "output"]
  11305. },
  11306. "modalities": {
  11307. "type": "object",
  11308. "properties": {
  11309. "input": {
  11310. "type": "array",
  11311. "items": {
  11312. "type": "string",
  11313. "enum": ["text", "audio", "image", "video", "pdf"]
  11314. }
  11315. },
  11316. "output": {
  11317. "type": "array",
  11318. "items": {
  11319. "type": "string",
  11320. "enum": ["text", "audio", "image", "video", "pdf"]
  11321. }
  11322. }
  11323. },
  11324. "required": ["input", "output"]
  11325. },
  11326. "experimental": {
  11327. "type": "boolean"
  11328. },
  11329. "status": {
  11330. "type": "string",
  11331. "enum": ["alpha", "beta", "deprecated"]
  11332. },
  11333. "provider": {
  11334. "type": "object",
  11335. "properties": {
  11336. "npm": {
  11337. "type": "string"
  11338. },
  11339. "api": {
  11340. "type": "string"
  11341. }
  11342. }
  11343. },
  11344. "options": {
  11345. "type": "object",
  11346. "propertyNames": {
  11347. "type": "string"
  11348. },
  11349. "additionalProperties": {}
  11350. },
  11351. "headers": {
  11352. "type": "object",
  11353. "propertyNames": {
  11354. "type": "string"
  11355. },
  11356. "additionalProperties": {
  11357. "type": "string"
  11358. }
  11359. },
  11360. "variants": {
  11361. "description": "Variant-specific configuration",
  11362. "type": "object",
  11363. "propertyNames": {
  11364. "type": "string"
  11365. },
  11366. "additionalProperties": {
  11367. "type": "object",
  11368. "properties": {
  11369. "disabled": {
  11370. "description": "Disable this variant for the model",
  11371. "type": "boolean"
  11372. }
  11373. },
  11374. "additionalProperties": {}
  11375. }
  11376. }
  11377. }
  11378. }
  11379. }
  11380. },
  11381. "additionalProperties": false
  11382. },
  11383. "McpLocalConfig": {
  11384. "type": "object",
  11385. "properties": {
  11386. "type": {
  11387. "description": "Type of MCP server connection",
  11388. "type": "string",
  11389. "const": "local"
  11390. },
  11391. "command": {
  11392. "description": "Command and arguments to run the MCP server",
  11393. "type": "array",
  11394. "items": {
  11395. "type": "string"
  11396. }
  11397. },
  11398. "environment": {
  11399. "description": "Environment variables to set when running the MCP server",
  11400. "type": "object",
  11401. "propertyNames": {
  11402. "type": "string"
  11403. },
  11404. "additionalProperties": {
  11405. "type": "string"
  11406. }
  11407. },
  11408. "enabled": {
  11409. "description": "Enable or disable the MCP server on startup",
  11410. "type": "boolean"
  11411. },
  11412. "timeout": {
  11413. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  11414. "type": "number"
  11415. }
  11416. },
  11417. "required": ["type", "command"]
  11418. },
  11419. "McpOAuthConfig": {
  11420. "type": "object",
  11421. "properties": {
  11422. "clientId": {
  11423. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  11424. "type": "string"
  11425. },
  11426. "clientSecret": {
  11427. "description": "OAuth client secret (if required by the authorization server)",
  11428. "type": "string"
  11429. },
  11430. "scope": {
  11431. "description": "OAuth scopes to request during authorization",
  11432. "type": "string"
  11433. },
  11434. "redirectUri": {
  11435. "description": "OAuth redirect URI (default: http://127.0.0.1:19876/mcp/oauth/callback).",
  11436. "type": "string"
  11437. }
  11438. }
  11439. },
  11440. "McpRemoteConfig": {
  11441. "type": "object",
  11442. "properties": {
  11443. "type": {
  11444. "description": "Type of MCP server connection",
  11445. "type": "string",
  11446. "const": "remote"
  11447. },
  11448. "url": {
  11449. "description": "URL of the remote MCP server",
  11450. "type": "string"
  11451. },
  11452. "enabled": {
  11453. "description": "Enable or disable the MCP server on startup",
  11454. "type": "boolean"
  11455. },
  11456. "headers": {
  11457. "description": "Headers to send with the request",
  11458. "type": "object",
  11459. "propertyNames": {
  11460. "type": "string"
  11461. },
  11462. "additionalProperties": {
  11463. "type": "string"
  11464. }
  11465. },
  11466. "oauth": {
  11467. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  11468. "anyOf": [
  11469. {
  11470. "$ref": "#/components/schemas/McpOAuthConfig"
  11471. },
  11472. {
  11473. "type": "boolean",
  11474. "const": false
  11475. }
  11476. ]
  11477. },
  11478. "timeout": {
  11479. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  11480. "type": "number"
  11481. }
  11482. },
  11483. "required": ["type", "url"]
  11484. },
  11485. "LayoutConfig": {
  11486. "description": "@deprecated Always uses stretch layout.",
  11487. "type": "string",
  11488. "enum": ["auto", "stretch"]
  11489. },
  11490. "Config": {
  11491. "type": "object",
  11492. "properties": {
  11493. "$schema": {
  11494. "description": "JSON schema reference for configuration validation",
  11495. "type": "string"
  11496. },
  11497. "logLevel": {
  11498. "$ref": "#/components/schemas/LogLevel"
  11499. },
  11500. "server": {
  11501. "$ref": "#/components/schemas/ServerConfig"
  11502. },
  11503. "command": {
  11504. "description": "Command configuration, see https://opencode.ai/docs/commands",
  11505. "type": "object",
  11506. "propertyNames": {
  11507. "type": "string"
  11508. },
  11509. "additionalProperties": {
  11510. "type": "object",
  11511. "properties": {
  11512. "template": {
  11513. "type": "string"
  11514. },
  11515. "description": {
  11516. "type": "string"
  11517. },
  11518. "agent": {
  11519. "type": "string"
  11520. },
  11521. "model": {
  11522. "type": "string"
  11523. },
  11524. "subtask": {
  11525. "type": "boolean"
  11526. }
  11527. },
  11528. "required": ["template"]
  11529. }
  11530. },
  11531. "skills": {
  11532. "description": "Additional skill folder paths",
  11533. "type": "object",
  11534. "properties": {
  11535. "paths": {
  11536. "description": "Additional paths to skill folders",
  11537. "type": "array",
  11538. "items": {
  11539. "type": "string"
  11540. }
  11541. },
  11542. "urls": {
  11543. "description": "URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)",
  11544. "type": "array",
  11545. "items": {
  11546. "type": "string"
  11547. }
  11548. }
  11549. }
  11550. },
  11551. "watcher": {
  11552. "type": "object",
  11553. "properties": {
  11554. "ignore": {
  11555. "type": "array",
  11556. "items": {
  11557. "type": "string"
  11558. }
  11559. }
  11560. }
  11561. },
  11562. "snapshot": {
  11563. "description": "Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.",
  11564. "type": "boolean"
  11565. },
  11566. "plugin": {
  11567. "type": "array",
  11568. "items": {
  11569. "anyOf": [
  11570. {
  11571. "type": "string"
  11572. },
  11573. {
  11574. "type": "array",
  11575. "prefixItems": [
  11576. {
  11577. "type": "string"
  11578. },
  11579. {
  11580. "type": "object",
  11581. "propertyNames": {
  11582. "type": "string"
  11583. },
  11584. "additionalProperties": {}
  11585. }
  11586. ]
  11587. }
  11588. ]
  11589. }
  11590. },
  11591. "share": {
  11592. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  11593. "type": "string",
  11594. "enum": ["manual", "auto", "disabled"]
  11595. },
  11596. "autoshare": {
  11597. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  11598. "type": "boolean"
  11599. },
  11600. "autoupdate": {
  11601. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  11602. "anyOf": [
  11603. {
  11604. "type": "boolean"
  11605. },
  11606. {
  11607. "type": "string",
  11608. "const": "notify"
  11609. }
  11610. ]
  11611. },
  11612. "disabled_providers": {
  11613. "description": "Disable providers that are loaded automatically",
  11614. "type": "array",
  11615. "items": {
  11616. "type": "string"
  11617. }
  11618. },
  11619. "enabled_providers": {
  11620. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  11621. "type": "array",
  11622. "items": {
  11623. "type": "string"
  11624. }
  11625. },
  11626. "model": {
  11627. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  11628. "type": "string"
  11629. },
  11630. "small_model": {
  11631. "description": "Small model to use for tasks like title generation in the format of provider/model",
  11632. "type": "string"
  11633. },
  11634. "default_agent": {
  11635. "description": "Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.",
  11636. "type": "string"
  11637. },
  11638. "username": {
  11639. "description": "Custom username to display in conversations instead of system username",
  11640. "type": "string"
  11641. },
  11642. "mode": {
  11643. "description": "@deprecated Use `agent` field instead.",
  11644. "type": "object",
  11645. "properties": {
  11646. "build": {
  11647. "$ref": "#/components/schemas/AgentConfig"
  11648. },
  11649. "plan": {
  11650. "$ref": "#/components/schemas/AgentConfig"
  11651. }
  11652. },
  11653. "additionalProperties": {
  11654. "$ref": "#/components/schemas/AgentConfig"
  11655. }
  11656. },
  11657. "agent": {
  11658. "description": "Agent configuration, see https://opencode.ai/docs/agents",
  11659. "type": "object",
  11660. "properties": {
  11661. "plan": {
  11662. "$ref": "#/components/schemas/AgentConfig"
  11663. },
  11664. "build": {
  11665. "$ref": "#/components/schemas/AgentConfig"
  11666. },
  11667. "general": {
  11668. "$ref": "#/components/schemas/AgentConfig"
  11669. },
  11670. "explore": {
  11671. "$ref": "#/components/schemas/AgentConfig"
  11672. },
  11673. "title": {
  11674. "$ref": "#/components/schemas/AgentConfig"
  11675. },
  11676. "summary": {
  11677. "$ref": "#/components/schemas/AgentConfig"
  11678. },
  11679. "compaction": {
  11680. "$ref": "#/components/schemas/AgentConfig"
  11681. }
  11682. },
  11683. "additionalProperties": {
  11684. "$ref": "#/components/schemas/AgentConfig"
  11685. }
  11686. },
  11687. "provider": {
  11688. "description": "Custom provider configurations and model overrides",
  11689. "type": "object",
  11690. "propertyNames": {
  11691. "type": "string"
  11692. },
  11693. "additionalProperties": {
  11694. "$ref": "#/components/schemas/ProviderConfig"
  11695. }
  11696. },
  11697. "mcp": {
  11698. "description": "MCP (Model Context Protocol) server configurations",
  11699. "type": "object",
  11700. "propertyNames": {
  11701. "type": "string"
  11702. },
  11703. "additionalProperties": {
  11704. "anyOf": [
  11705. {
  11706. "anyOf": [
  11707. {
  11708. "$ref": "#/components/schemas/McpLocalConfig"
  11709. },
  11710. {
  11711. "$ref": "#/components/schemas/McpRemoteConfig"
  11712. }
  11713. ]
  11714. },
  11715. {
  11716. "type": "object",
  11717. "properties": {
  11718. "enabled": {
  11719. "type": "boolean"
  11720. }
  11721. },
  11722. "required": ["enabled"],
  11723. "additionalProperties": false
  11724. }
  11725. ]
  11726. }
  11727. },
  11728. "formatter": {
  11729. "anyOf": [
  11730. {
  11731. "type": "boolean"
  11732. },
  11733. {
  11734. "type": "object",
  11735. "propertyNames": {
  11736. "type": "string"
  11737. },
  11738. "additionalProperties": {
  11739. "type": "object",
  11740. "properties": {
  11741. "disabled": {
  11742. "type": "boolean"
  11743. },
  11744. "command": {
  11745. "type": "array",
  11746. "items": {
  11747. "type": "string"
  11748. }
  11749. },
  11750. "environment": {
  11751. "type": "object",
  11752. "propertyNames": {
  11753. "type": "string"
  11754. },
  11755. "additionalProperties": {
  11756. "type": "string"
  11757. }
  11758. },
  11759. "extensions": {
  11760. "type": "array",
  11761. "items": {
  11762. "type": "string"
  11763. }
  11764. }
  11765. }
  11766. }
  11767. }
  11768. ]
  11769. },
  11770. "lsp": {
  11771. "anyOf": [
  11772. {
  11773. "type": "boolean"
  11774. },
  11775. {
  11776. "type": "object",
  11777. "propertyNames": {
  11778. "type": "string"
  11779. },
  11780. "additionalProperties": {
  11781. "anyOf": [
  11782. {
  11783. "type": "object",
  11784. "properties": {
  11785. "disabled": {
  11786. "type": "boolean",
  11787. "const": true
  11788. }
  11789. },
  11790. "required": ["disabled"]
  11791. },
  11792. {
  11793. "type": "object",
  11794. "properties": {
  11795. "command": {
  11796. "type": "array",
  11797. "items": {
  11798. "type": "string"
  11799. }
  11800. },
  11801. "extensions": {
  11802. "type": "array",
  11803. "items": {
  11804. "type": "string"
  11805. }
  11806. },
  11807. "disabled": {
  11808. "type": "boolean"
  11809. },
  11810. "env": {
  11811. "type": "object",
  11812. "propertyNames": {
  11813. "type": "string"
  11814. },
  11815. "additionalProperties": {
  11816. "type": "string"
  11817. }
  11818. },
  11819. "initialization": {
  11820. "type": "object",
  11821. "propertyNames": {
  11822. "type": "string"
  11823. },
  11824. "additionalProperties": {}
  11825. }
  11826. },
  11827. "required": ["command"]
  11828. }
  11829. ]
  11830. }
  11831. }
  11832. ]
  11833. },
  11834. "instructions": {
  11835. "description": "Additional instruction files or patterns to include",
  11836. "type": "array",
  11837. "items": {
  11838. "type": "string"
  11839. }
  11840. },
  11841. "layout": {
  11842. "$ref": "#/components/schemas/LayoutConfig"
  11843. },
  11844. "permission": {
  11845. "$ref": "#/components/schemas/PermissionConfig"
  11846. },
  11847. "tools": {
  11848. "type": "object",
  11849. "propertyNames": {
  11850. "type": "string"
  11851. },
  11852. "additionalProperties": {
  11853. "type": "boolean"
  11854. }
  11855. },
  11856. "enterprise": {
  11857. "type": "object",
  11858. "properties": {
  11859. "url": {
  11860. "description": "Enterprise URL",
  11861. "type": "string"
  11862. }
  11863. }
  11864. },
  11865. "compaction": {
  11866. "type": "object",
  11867. "properties": {
  11868. "auto": {
  11869. "description": "Enable automatic compaction when context is full (default: true)",
  11870. "type": "boolean"
  11871. },
  11872. "prune": {
  11873. "description": "Enable pruning of old tool outputs (default: true)",
  11874. "type": "boolean"
  11875. },
  11876. "reserved": {
  11877. "description": "Token buffer for compaction. Leaves enough window to avoid overflow during compaction.",
  11878. "type": "integer",
  11879. "minimum": 0,
  11880. "maximum": 9007199254740991
  11881. }
  11882. }
  11883. },
  11884. "experimental": {
  11885. "type": "object",
  11886. "properties": {
  11887. "disable_paste_summary": {
  11888. "type": "boolean"
  11889. },
  11890. "batch_tool": {
  11891. "description": "Enable the batch tool",
  11892. "type": "boolean"
  11893. },
  11894. "openTelemetry": {
  11895. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  11896. "type": "boolean"
  11897. },
  11898. "primary_tools": {
  11899. "description": "Tools that should only be available to primary agents.",
  11900. "type": "array",
  11901. "items": {
  11902. "type": "string"
  11903. }
  11904. },
  11905. "continue_loop_on_deny": {
  11906. "description": "Continue the agent loop when a tool call is denied",
  11907. "type": "boolean"
  11908. },
  11909. "mcp_timeout": {
  11910. "description": "Timeout in milliseconds for model context protocol (MCP) requests",
  11911. "type": "integer",
  11912. "exclusiveMinimum": 0,
  11913. "maximum": 9007199254740991
  11914. }
  11915. }
  11916. }
  11917. },
  11918. "additionalProperties": false
  11919. },
  11920. "BadRequestError": {
  11921. "type": "object",
  11922. "properties": {
  11923. "data": {},
  11924. "errors": {
  11925. "type": "array",
  11926. "items": {
  11927. "type": "object",
  11928. "propertyNames": {
  11929. "type": "string"
  11930. },
  11931. "additionalProperties": {}
  11932. }
  11933. },
  11934. "success": {
  11935. "type": "boolean",
  11936. "const": false
  11937. }
  11938. },
  11939. "required": ["data", "errors", "success"]
  11940. },
  11941. "OAuth": {
  11942. "type": "object",
  11943. "properties": {
  11944. "type": {
  11945. "type": "string",
  11946. "const": "oauth"
  11947. },
  11948. "refresh": {
  11949. "type": "string"
  11950. },
  11951. "access": {
  11952. "type": "string"
  11953. },
  11954. "expires": {
  11955. "type": "number"
  11956. },
  11957. "accountId": {
  11958. "type": "string"
  11959. },
  11960. "enterpriseUrl": {
  11961. "type": "string"
  11962. }
  11963. },
  11964. "required": ["type", "refresh", "access", "expires"]
  11965. },
  11966. "ApiAuth": {
  11967. "type": "object",
  11968. "properties": {
  11969. "type": {
  11970. "type": "string",
  11971. "const": "api"
  11972. },
  11973. "key": {
  11974. "type": "string"
  11975. },
  11976. "metadata": {
  11977. "type": "object",
  11978. "propertyNames": {
  11979. "type": "string"
  11980. },
  11981. "additionalProperties": {
  11982. "type": "string"
  11983. }
  11984. }
  11985. },
  11986. "required": ["type", "key"]
  11987. },
  11988. "WellKnownAuth": {
  11989. "type": "object",
  11990. "properties": {
  11991. "type": {
  11992. "type": "string",
  11993. "const": "wellknown"
  11994. },
  11995. "key": {
  11996. "type": "string"
  11997. },
  11998. "token": {
  11999. "type": "string"
  12000. }
  12001. },
  12002. "required": ["type", "key", "token"]
  12003. },
  12004. "Auth": {
  12005. "anyOf": [
  12006. {
  12007. "$ref": "#/components/schemas/OAuth"
  12008. },
  12009. {
  12010. "$ref": "#/components/schemas/ApiAuth"
  12011. },
  12012. {
  12013. "$ref": "#/components/schemas/WellKnownAuth"
  12014. }
  12015. ]
  12016. },
  12017. "Workspace": {
  12018. "type": "object",
  12019. "properties": {
  12020. "id": {
  12021. "type": "string",
  12022. "pattern": "^wrk.*"
  12023. },
  12024. "type": {
  12025. "type": "string"
  12026. },
  12027. "name": {
  12028. "type": "string"
  12029. },
  12030. "branch": {
  12031. "anyOf": [
  12032. {
  12033. "type": "string"
  12034. },
  12035. {
  12036. "type": "null"
  12037. }
  12038. ]
  12039. },
  12040. "directory": {
  12041. "anyOf": [
  12042. {
  12043. "type": "string"
  12044. },
  12045. {
  12046. "type": "null"
  12047. }
  12048. ]
  12049. },
  12050. "extra": {
  12051. "anyOf": [
  12052. {},
  12053. {
  12054. "type": "null"
  12055. }
  12056. ]
  12057. },
  12058. "projectID": {
  12059. "type": "string"
  12060. }
  12061. },
  12062. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"]
  12063. },
  12064. "NotFoundError": {
  12065. "type": "object",
  12066. "properties": {
  12067. "name": {
  12068. "type": "string",
  12069. "const": "NotFoundError"
  12070. },
  12071. "data": {
  12072. "type": "object",
  12073. "properties": {
  12074. "message": {
  12075. "type": "string"
  12076. }
  12077. },
  12078. "required": ["message"]
  12079. }
  12080. },
  12081. "required": ["name", "data"]
  12082. },
  12083. "Model": {
  12084. "type": "object",
  12085. "properties": {
  12086. "id": {
  12087. "type": "string"
  12088. },
  12089. "providerID": {
  12090. "type": "string"
  12091. },
  12092. "api": {
  12093. "type": "object",
  12094. "properties": {
  12095. "id": {
  12096. "type": "string"
  12097. },
  12098. "url": {
  12099. "type": "string"
  12100. },
  12101. "npm": {
  12102. "type": "string"
  12103. }
  12104. },
  12105. "required": ["id", "url", "npm"]
  12106. },
  12107. "name": {
  12108. "type": "string"
  12109. },
  12110. "family": {
  12111. "type": "string"
  12112. },
  12113. "capabilities": {
  12114. "type": "object",
  12115. "properties": {
  12116. "temperature": {
  12117. "type": "boolean"
  12118. },
  12119. "reasoning": {
  12120. "type": "boolean"
  12121. },
  12122. "attachment": {
  12123. "type": "boolean"
  12124. },
  12125. "toolcall": {
  12126. "type": "boolean"
  12127. },
  12128. "input": {
  12129. "type": "object",
  12130. "properties": {
  12131. "text": {
  12132. "type": "boolean"
  12133. },
  12134. "audio": {
  12135. "type": "boolean"
  12136. },
  12137. "image": {
  12138. "type": "boolean"
  12139. },
  12140. "video": {
  12141. "type": "boolean"
  12142. },
  12143. "pdf": {
  12144. "type": "boolean"
  12145. }
  12146. },
  12147. "required": ["text", "audio", "image", "video", "pdf"]
  12148. },
  12149. "output": {
  12150. "type": "object",
  12151. "properties": {
  12152. "text": {
  12153. "type": "boolean"
  12154. },
  12155. "audio": {
  12156. "type": "boolean"
  12157. },
  12158. "image": {
  12159. "type": "boolean"
  12160. },
  12161. "video": {
  12162. "type": "boolean"
  12163. },
  12164. "pdf": {
  12165. "type": "boolean"
  12166. }
  12167. },
  12168. "required": ["text", "audio", "image", "video", "pdf"]
  12169. },
  12170. "interleaved": {
  12171. "anyOf": [
  12172. {
  12173. "type": "boolean"
  12174. },
  12175. {
  12176. "type": "object",
  12177. "properties": {
  12178. "field": {
  12179. "type": "string",
  12180. "enum": ["reasoning_content", "reasoning_details"]
  12181. }
  12182. },
  12183. "required": ["field"]
  12184. }
  12185. ]
  12186. }
  12187. },
  12188. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  12189. },
  12190. "cost": {
  12191. "type": "object",
  12192. "properties": {
  12193. "input": {
  12194. "type": "number"
  12195. },
  12196. "output": {
  12197. "type": "number"
  12198. },
  12199. "cache": {
  12200. "type": "object",
  12201. "properties": {
  12202. "read": {
  12203. "type": "number"
  12204. },
  12205. "write": {
  12206. "type": "number"
  12207. }
  12208. },
  12209. "required": ["read", "write"]
  12210. },
  12211. "experimentalOver200K": {
  12212. "type": "object",
  12213. "properties": {
  12214. "input": {
  12215. "type": "number"
  12216. },
  12217. "output": {
  12218. "type": "number"
  12219. },
  12220. "cache": {
  12221. "type": "object",
  12222. "properties": {
  12223. "read": {
  12224. "type": "number"
  12225. },
  12226. "write": {
  12227. "type": "number"
  12228. }
  12229. },
  12230. "required": ["read", "write"]
  12231. }
  12232. },
  12233. "required": ["input", "output", "cache"]
  12234. }
  12235. },
  12236. "required": ["input", "output", "cache"]
  12237. },
  12238. "limit": {
  12239. "type": "object",
  12240. "properties": {
  12241. "context": {
  12242. "type": "number"
  12243. },
  12244. "input": {
  12245. "type": "number"
  12246. },
  12247. "output": {
  12248. "type": "number"
  12249. }
  12250. },
  12251. "required": ["context", "output"]
  12252. },
  12253. "status": {
  12254. "type": "string",
  12255. "enum": ["alpha", "beta", "deprecated", "active"]
  12256. },
  12257. "options": {
  12258. "type": "object",
  12259. "propertyNames": {
  12260. "type": "string"
  12261. },
  12262. "additionalProperties": {}
  12263. },
  12264. "headers": {
  12265. "type": "object",
  12266. "propertyNames": {
  12267. "type": "string"
  12268. },
  12269. "additionalProperties": {
  12270. "type": "string"
  12271. }
  12272. },
  12273. "release_date": {
  12274. "type": "string"
  12275. },
  12276. "variants": {
  12277. "type": "object",
  12278. "propertyNames": {
  12279. "type": "string"
  12280. },
  12281. "additionalProperties": {
  12282. "type": "object",
  12283. "propertyNames": {
  12284. "type": "string"
  12285. },
  12286. "additionalProperties": {}
  12287. }
  12288. }
  12289. },
  12290. "required": [
  12291. "id",
  12292. "providerID",
  12293. "api",
  12294. "name",
  12295. "capabilities",
  12296. "cost",
  12297. "limit",
  12298. "status",
  12299. "options",
  12300. "headers",
  12301. "release_date"
  12302. ]
  12303. },
  12304. "Provider": {
  12305. "type": "object",
  12306. "properties": {
  12307. "id": {
  12308. "type": "string"
  12309. },
  12310. "name": {
  12311. "type": "string"
  12312. },
  12313. "source": {
  12314. "type": "string",
  12315. "enum": ["env", "config", "custom", "api"]
  12316. },
  12317. "env": {
  12318. "type": "array",
  12319. "items": {
  12320. "type": "string"
  12321. }
  12322. },
  12323. "key": {
  12324. "type": "string"
  12325. },
  12326. "options": {
  12327. "type": "object",
  12328. "propertyNames": {
  12329. "type": "string"
  12330. },
  12331. "additionalProperties": {}
  12332. },
  12333. "models": {
  12334. "type": "object",
  12335. "propertyNames": {
  12336. "type": "string"
  12337. },
  12338. "additionalProperties": {
  12339. "$ref": "#/components/schemas/Model"
  12340. }
  12341. }
  12342. },
  12343. "required": ["id", "name", "source", "env", "options", "models"]
  12344. },
  12345. "ConsoleState": {
  12346. "type": "object",
  12347. "properties": {
  12348. "consoleManagedProviders": {
  12349. "type": "array",
  12350. "items": {
  12351. "type": "string"
  12352. }
  12353. },
  12354. "activeOrgName": {
  12355. "type": "string"
  12356. },
  12357. "switchableOrgCount": {
  12358. "type": "number"
  12359. }
  12360. },
  12361. "required": ["consoleManagedProviders", "switchableOrgCount"]
  12362. },
  12363. "ToolIDs": {
  12364. "type": "array",
  12365. "items": {
  12366. "type": "string"
  12367. }
  12368. },
  12369. "ToolListItem": {
  12370. "type": "object",
  12371. "properties": {
  12372. "id": {
  12373. "type": "string"
  12374. },
  12375. "description": {
  12376. "type": "string"
  12377. },
  12378. "parameters": {}
  12379. },
  12380. "required": ["id", "description", "parameters"]
  12381. },
  12382. "ToolList": {
  12383. "type": "array",
  12384. "items": {
  12385. "$ref": "#/components/schemas/ToolListItem"
  12386. }
  12387. },
  12388. "Worktree": {
  12389. "type": "object",
  12390. "properties": {
  12391. "name": {
  12392. "type": "string"
  12393. },
  12394. "branch": {
  12395. "type": "string"
  12396. },
  12397. "directory": {
  12398. "type": "string"
  12399. }
  12400. },
  12401. "required": ["name", "branch", "directory"]
  12402. },
  12403. "WorktreeCreateInput": {
  12404. "type": "object",
  12405. "properties": {
  12406. "name": {
  12407. "type": "string"
  12408. },
  12409. "startCommand": {
  12410. "description": "Additional startup script to run after the project's start command",
  12411. "type": "string"
  12412. }
  12413. }
  12414. },
  12415. "WorktreeRemoveInput": {
  12416. "type": "object",
  12417. "properties": {
  12418. "directory": {
  12419. "type": "string"
  12420. }
  12421. },
  12422. "required": ["directory"]
  12423. },
  12424. "WorktreeResetInput": {
  12425. "type": "object",
  12426. "properties": {
  12427. "directory": {
  12428. "type": "string"
  12429. }
  12430. },
  12431. "required": ["directory"]
  12432. },
  12433. "ProjectSummary": {
  12434. "type": "object",
  12435. "properties": {
  12436. "id": {
  12437. "type": "string"
  12438. },
  12439. "name": {
  12440. "type": "string"
  12441. },
  12442. "worktree": {
  12443. "type": "string"
  12444. }
  12445. },
  12446. "required": ["id", "worktree"]
  12447. },
  12448. "GlobalSession": {
  12449. "type": "object",
  12450. "properties": {
  12451. "id": {
  12452. "type": "string",
  12453. "pattern": "^ses.*"
  12454. },
  12455. "slug": {
  12456. "type": "string"
  12457. },
  12458. "projectID": {
  12459. "type": "string"
  12460. },
  12461. "workspaceID": {
  12462. "type": "string",
  12463. "pattern": "^wrk.*"
  12464. },
  12465. "directory": {
  12466. "type": "string"
  12467. },
  12468. "parentID": {
  12469. "type": "string",
  12470. "pattern": "^ses.*"
  12471. },
  12472. "summary": {
  12473. "type": "object",
  12474. "properties": {
  12475. "additions": {
  12476. "type": "number"
  12477. },
  12478. "deletions": {
  12479. "type": "number"
  12480. },
  12481. "files": {
  12482. "type": "number"
  12483. },
  12484. "diffs": {
  12485. "type": "array",
  12486. "items": {
  12487. "$ref": "#/components/schemas/SnapshotFileDiff"
  12488. }
  12489. }
  12490. },
  12491. "required": ["additions", "deletions", "files"]
  12492. },
  12493. "share": {
  12494. "type": "object",
  12495. "properties": {
  12496. "url": {
  12497. "type": "string"
  12498. }
  12499. },
  12500. "required": ["url"]
  12501. },
  12502. "title": {
  12503. "type": "string"
  12504. },
  12505. "version": {
  12506. "type": "string"
  12507. },
  12508. "time": {
  12509. "type": "object",
  12510. "properties": {
  12511. "created": {
  12512. "type": "number"
  12513. },
  12514. "updated": {
  12515. "type": "number"
  12516. },
  12517. "compacting": {
  12518. "type": "number"
  12519. },
  12520. "archived": {
  12521. "type": "number"
  12522. }
  12523. },
  12524. "required": ["created", "updated"]
  12525. },
  12526. "permission": {
  12527. "$ref": "#/components/schemas/PermissionRuleset"
  12528. },
  12529. "revert": {
  12530. "type": "object",
  12531. "properties": {
  12532. "messageID": {
  12533. "type": "string",
  12534. "pattern": "^msg.*"
  12535. },
  12536. "partID": {
  12537. "type": "string",
  12538. "pattern": "^prt.*"
  12539. },
  12540. "snapshot": {
  12541. "type": "string"
  12542. },
  12543. "diff": {
  12544. "type": "string"
  12545. }
  12546. },
  12547. "required": ["messageID"]
  12548. },
  12549. "project": {
  12550. "anyOf": [
  12551. {
  12552. "$ref": "#/components/schemas/ProjectSummary"
  12553. },
  12554. {
  12555. "type": "null"
  12556. }
  12557. ]
  12558. }
  12559. },
  12560. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"]
  12561. },
  12562. "McpResource": {
  12563. "type": "object",
  12564. "properties": {
  12565. "name": {
  12566. "type": "string"
  12567. },
  12568. "uri": {
  12569. "type": "string"
  12570. },
  12571. "description": {
  12572. "type": "string"
  12573. },
  12574. "mimeType": {
  12575. "type": "string"
  12576. },
  12577. "client": {
  12578. "type": "string"
  12579. }
  12580. },
  12581. "required": ["name", "uri", "client"]
  12582. },
  12583. "TextPartInput": {
  12584. "type": "object",
  12585. "properties": {
  12586. "id": {
  12587. "type": "string",
  12588. "pattern": "^prt.*"
  12589. },
  12590. "type": {
  12591. "type": "string",
  12592. "const": "text"
  12593. },
  12594. "text": {
  12595. "type": "string"
  12596. },
  12597. "synthetic": {
  12598. "type": "boolean"
  12599. },
  12600. "ignored": {
  12601. "type": "boolean"
  12602. },
  12603. "time": {
  12604. "type": "object",
  12605. "properties": {
  12606. "start": {
  12607. "type": "number"
  12608. },
  12609. "end": {
  12610. "type": "number"
  12611. }
  12612. },
  12613. "required": ["start"]
  12614. },
  12615. "metadata": {
  12616. "type": "object",
  12617. "propertyNames": {
  12618. "type": "string"
  12619. },
  12620. "additionalProperties": {}
  12621. }
  12622. },
  12623. "required": ["type", "text"]
  12624. },
  12625. "FilePartInput": {
  12626. "type": "object",
  12627. "properties": {
  12628. "id": {
  12629. "type": "string",
  12630. "pattern": "^prt.*"
  12631. },
  12632. "type": {
  12633. "type": "string",
  12634. "const": "file"
  12635. },
  12636. "mime": {
  12637. "type": "string"
  12638. },
  12639. "filename": {
  12640. "type": "string"
  12641. },
  12642. "url": {
  12643. "type": "string"
  12644. },
  12645. "source": {
  12646. "$ref": "#/components/schemas/FilePartSource"
  12647. }
  12648. },
  12649. "required": ["type", "mime", "url"]
  12650. },
  12651. "AgentPartInput": {
  12652. "type": "object",
  12653. "properties": {
  12654. "id": {
  12655. "type": "string",
  12656. "pattern": "^prt.*"
  12657. },
  12658. "type": {
  12659. "type": "string",
  12660. "const": "agent"
  12661. },
  12662. "name": {
  12663. "type": "string"
  12664. },
  12665. "source": {
  12666. "type": "object",
  12667. "properties": {
  12668. "value": {
  12669. "type": "string"
  12670. },
  12671. "start": {
  12672. "type": "integer",
  12673. "minimum": -9007199254740991,
  12674. "maximum": 9007199254740991
  12675. },
  12676. "end": {
  12677. "type": "integer",
  12678. "minimum": -9007199254740991,
  12679. "maximum": 9007199254740991
  12680. }
  12681. },
  12682. "required": ["value", "start", "end"]
  12683. }
  12684. },
  12685. "required": ["type", "name"]
  12686. },
  12687. "SubtaskPartInput": {
  12688. "type": "object",
  12689. "properties": {
  12690. "id": {
  12691. "type": "string",
  12692. "pattern": "^prt.*"
  12693. },
  12694. "type": {
  12695. "type": "string",
  12696. "const": "subtask"
  12697. },
  12698. "prompt": {
  12699. "type": "string"
  12700. },
  12701. "description": {
  12702. "type": "string"
  12703. },
  12704. "agent": {
  12705. "type": "string"
  12706. },
  12707. "model": {
  12708. "type": "object",
  12709. "properties": {
  12710. "providerID": {
  12711. "type": "string"
  12712. },
  12713. "modelID": {
  12714. "type": "string"
  12715. }
  12716. },
  12717. "required": ["providerID", "modelID"]
  12718. },
  12719. "command": {
  12720. "type": "string"
  12721. }
  12722. },
  12723. "required": ["type", "prompt", "description", "agent"]
  12724. },
  12725. "ProviderAuthMethod": {
  12726. "type": "object",
  12727. "properties": {
  12728. "type": {
  12729. "type": "string",
  12730. "enum": ["oauth", "api"]
  12731. },
  12732. "label": {
  12733. "type": "string"
  12734. },
  12735. "prompts": {
  12736. "type": "array",
  12737. "items": {
  12738. "anyOf": [
  12739. {
  12740. "type": "object",
  12741. "properties": {
  12742. "type": {
  12743. "type": "string",
  12744. "const": "text"
  12745. },
  12746. "key": {
  12747. "type": "string"
  12748. },
  12749. "message": {
  12750. "type": "string"
  12751. },
  12752. "placeholder": {
  12753. "type": "string"
  12754. },
  12755. "when": {
  12756. "type": "object",
  12757. "properties": {
  12758. "key": {
  12759. "type": "string"
  12760. },
  12761. "op": {
  12762. "type": "string",
  12763. "enum": ["eq", "neq"]
  12764. },
  12765. "value": {
  12766. "type": "string"
  12767. }
  12768. },
  12769. "required": ["key", "op", "value"]
  12770. }
  12771. },
  12772. "required": ["type", "key", "message"]
  12773. },
  12774. {
  12775. "type": "object",
  12776. "properties": {
  12777. "type": {
  12778. "type": "string",
  12779. "const": "select"
  12780. },
  12781. "key": {
  12782. "type": "string"
  12783. },
  12784. "message": {
  12785. "type": "string"
  12786. },
  12787. "options": {
  12788. "type": "array",
  12789. "items": {
  12790. "type": "object",
  12791. "properties": {
  12792. "label": {
  12793. "type": "string"
  12794. },
  12795. "value": {
  12796. "type": "string"
  12797. },
  12798. "hint": {
  12799. "type": "string"
  12800. }
  12801. },
  12802. "required": ["label", "value"]
  12803. }
  12804. },
  12805. "when": {
  12806. "type": "object",
  12807. "properties": {
  12808. "key": {
  12809. "type": "string"
  12810. },
  12811. "op": {
  12812. "type": "string",
  12813. "enum": ["eq", "neq"]
  12814. },
  12815. "value": {
  12816. "type": "string"
  12817. }
  12818. },
  12819. "required": ["key", "op", "value"]
  12820. }
  12821. },
  12822. "required": ["type", "key", "message", "options"]
  12823. }
  12824. ]
  12825. }
  12826. }
  12827. },
  12828. "required": ["type", "label"]
  12829. },
  12830. "ProviderAuthAuthorization": {
  12831. "type": "object",
  12832. "properties": {
  12833. "url": {
  12834. "type": "string"
  12835. },
  12836. "method": {
  12837. "type": "string",
  12838. "enum": ["auto", "code"]
  12839. },
  12840. "instructions": {
  12841. "type": "string"
  12842. }
  12843. },
  12844. "required": ["url", "method", "instructions"]
  12845. },
  12846. "Symbol": {
  12847. "type": "object",
  12848. "properties": {
  12849. "name": {
  12850. "type": "string"
  12851. },
  12852. "kind": {
  12853. "type": "number"
  12854. },
  12855. "location": {
  12856. "type": "object",
  12857. "properties": {
  12858. "uri": {
  12859. "type": "string"
  12860. },
  12861. "range": {
  12862. "$ref": "#/components/schemas/Range"
  12863. }
  12864. },
  12865. "required": ["uri", "range"]
  12866. }
  12867. },
  12868. "required": ["name", "kind", "location"]
  12869. },
  12870. "FileNode": {
  12871. "type": "object",
  12872. "properties": {
  12873. "name": {
  12874. "type": "string"
  12875. },
  12876. "path": {
  12877. "type": "string"
  12878. },
  12879. "absolute": {
  12880. "type": "string"
  12881. },
  12882. "type": {
  12883. "type": "string",
  12884. "enum": ["file", "directory"]
  12885. },
  12886. "ignored": {
  12887. "type": "boolean"
  12888. }
  12889. },
  12890. "required": ["name", "path", "absolute", "type", "ignored"]
  12891. },
  12892. "FileContent": {
  12893. "type": "object",
  12894. "properties": {
  12895. "type": {
  12896. "type": "string",
  12897. "enum": ["text", "binary"]
  12898. },
  12899. "content": {
  12900. "type": "string"
  12901. },
  12902. "diff": {
  12903. "type": "string"
  12904. },
  12905. "patch": {
  12906. "type": "object",
  12907. "properties": {
  12908. "oldFileName": {
  12909. "type": "string"
  12910. },
  12911. "newFileName": {
  12912. "type": "string"
  12913. },
  12914. "oldHeader": {
  12915. "type": "string"
  12916. },
  12917. "newHeader": {
  12918. "type": "string"
  12919. },
  12920. "hunks": {
  12921. "type": "array",
  12922. "items": {
  12923. "type": "object",
  12924. "properties": {
  12925. "oldStart": {
  12926. "type": "number"
  12927. },
  12928. "oldLines": {
  12929. "type": "number"
  12930. },
  12931. "newStart": {
  12932. "type": "number"
  12933. },
  12934. "newLines": {
  12935. "type": "number"
  12936. },
  12937. "lines": {
  12938. "type": "array",
  12939. "items": {
  12940. "type": "string"
  12941. }
  12942. }
  12943. },
  12944. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  12945. }
  12946. },
  12947. "index": {
  12948. "type": "string"
  12949. }
  12950. },
  12951. "required": ["oldFileName", "newFileName", "hunks"]
  12952. },
  12953. "encoding": {
  12954. "type": "string",
  12955. "const": "base64"
  12956. },
  12957. "mimeType": {
  12958. "type": "string"
  12959. }
  12960. },
  12961. "required": ["type", "content"]
  12962. },
  12963. "File": {
  12964. "type": "object",
  12965. "properties": {
  12966. "path": {
  12967. "type": "string"
  12968. },
  12969. "added": {
  12970. "type": "integer",
  12971. "minimum": -9007199254740991,
  12972. "maximum": 9007199254740991
  12973. },
  12974. "removed": {
  12975. "type": "integer",
  12976. "minimum": -9007199254740991,
  12977. "maximum": 9007199254740991
  12978. },
  12979. "status": {
  12980. "type": "string",
  12981. "enum": ["added", "deleted", "modified"]
  12982. }
  12983. },
  12984. "required": ["path", "added", "removed", "status"]
  12985. },
  12986. "Event": {
  12987. "anyOf": [
  12988. {
  12989. "$ref": "#/components/schemas/Event.project.updated"
  12990. },
  12991. {
  12992. "$ref": "#/components/schemas/Event.server.instance.disposed"
  12993. },
  12994. {
  12995. "$ref": "#/components/schemas/Event.server.connected"
  12996. },
  12997. {
  12998. "$ref": "#/components/schemas/Event.global.disposed"
  12999. },
  13000. {
  13001. "$ref": "#/components/schemas/Event.file.edited"
  13002. },
  13003. {
  13004. "$ref": "#/components/schemas/Event.file.watcher.updated"
  13005. },
  13006. {
  13007. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  13008. },
  13009. {
  13010. "$ref": "#/components/schemas/Event.lsp.updated"
  13011. },
  13012. {
  13013. "$ref": "#/components/schemas/Event.installation.updated"
  13014. },
  13015. {
  13016. "$ref": "#/components/schemas/Event.installation.update-available"
  13017. },
  13018. {
  13019. "$ref": "#/components/schemas/Event.message.part.delta"
  13020. },
  13021. {
  13022. "$ref": "#/components/schemas/Event.permission.asked"
  13023. },
  13024. {
  13025. "$ref": "#/components/schemas/Event.permission.replied"
  13026. },
  13027. {
  13028. "$ref": "#/components/schemas/Event.session.diff"
  13029. },
  13030. {
  13031. "$ref": "#/components/schemas/Event.session.error"
  13032. },
  13033. {
  13034. "$ref": "#/components/schemas/Event.question.asked"
  13035. },
  13036. {
  13037. "$ref": "#/components/schemas/Event.question.replied"
  13038. },
  13039. {
  13040. "$ref": "#/components/schemas/Event.question.rejected"
  13041. },
  13042. {
  13043. "$ref": "#/components/schemas/Event.todo.updated"
  13044. },
  13045. {
  13046. "$ref": "#/components/schemas/Event.session.status"
  13047. },
  13048. {
  13049. "$ref": "#/components/schemas/Event.session.idle"
  13050. },
  13051. {
  13052. "$ref": "#/components/schemas/Event.session.compacted"
  13053. },
  13054. {
  13055. "$ref": "#/components/schemas/Event.tui.prompt.append"
  13056. },
  13057. {
  13058. "$ref": "#/components/schemas/Event.tui.command.execute"
  13059. },
  13060. {
  13061. "$ref": "#/components/schemas/Event.tui.toast.show"
  13062. },
  13063. {
  13064. "$ref": "#/components/schemas/Event.tui.session.select"
  13065. },
  13066. {
  13067. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  13068. },
  13069. {
  13070. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  13071. },
  13072. {
  13073. "$ref": "#/components/schemas/Event.command.executed"
  13074. },
  13075. {
  13076. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  13077. },
  13078. {
  13079. "$ref": "#/components/schemas/Event.worktree.ready"
  13080. },
  13081. {
  13082. "$ref": "#/components/schemas/Event.worktree.failed"
  13083. },
  13084. {
  13085. "$ref": "#/components/schemas/Event.pty.created"
  13086. },
  13087. {
  13088. "$ref": "#/components/schemas/Event.pty.updated"
  13089. },
  13090. {
  13091. "$ref": "#/components/schemas/Event.pty.exited"
  13092. },
  13093. {
  13094. "$ref": "#/components/schemas/Event.pty.deleted"
  13095. },
  13096. {
  13097. "$ref": "#/components/schemas/Event.workspace.ready"
  13098. },
  13099. {
  13100. "$ref": "#/components/schemas/Event.workspace.failed"
  13101. },
  13102. {
  13103. "$ref": "#/components/schemas/Event.workspace.restore"
  13104. },
  13105. {
  13106. "$ref": "#/components/schemas/Event.workspace.status"
  13107. },
  13108. {
  13109. "$ref": "#/components/schemas/Event.message.updated"
  13110. },
  13111. {
  13112. "$ref": "#/components/schemas/Event.message.removed"
  13113. },
  13114. {
  13115. "$ref": "#/components/schemas/Event.message.part.updated"
  13116. },
  13117. {
  13118. "$ref": "#/components/schemas/Event.message.part.removed"
  13119. },
  13120. {
  13121. "$ref": "#/components/schemas/Event.session.created"
  13122. },
  13123. {
  13124. "$ref": "#/components/schemas/Event.session.updated"
  13125. },
  13126. {
  13127. "$ref": "#/components/schemas/Event.session.deleted"
  13128. }
  13129. ]
  13130. },
  13131. "MCPStatusConnected": {
  13132. "type": "object",
  13133. "properties": {
  13134. "status": {
  13135. "type": "string",
  13136. "const": "connected"
  13137. }
  13138. },
  13139. "required": ["status"]
  13140. },
  13141. "MCPStatusDisabled": {
  13142. "type": "object",
  13143. "properties": {
  13144. "status": {
  13145. "type": "string",
  13146. "const": "disabled"
  13147. }
  13148. },
  13149. "required": ["status"]
  13150. },
  13151. "MCPStatusFailed": {
  13152. "type": "object",
  13153. "properties": {
  13154. "status": {
  13155. "type": "string",
  13156. "const": "failed"
  13157. },
  13158. "error": {
  13159. "type": "string"
  13160. }
  13161. },
  13162. "required": ["status", "error"]
  13163. },
  13164. "MCPStatusNeedsAuth": {
  13165. "type": "object",
  13166. "properties": {
  13167. "status": {
  13168. "type": "string",
  13169. "const": "needs_auth"
  13170. }
  13171. },
  13172. "required": ["status"]
  13173. },
  13174. "MCPStatusNeedsClientRegistration": {
  13175. "type": "object",
  13176. "properties": {
  13177. "status": {
  13178. "type": "string",
  13179. "const": "needs_client_registration"
  13180. },
  13181. "error": {
  13182. "type": "string"
  13183. }
  13184. },
  13185. "required": ["status", "error"]
  13186. },
  13187. "MCPStatus": {
  13188. "anyOf": [
  13189. {
  13190. "$ref": "#/components/schemas/MCPStatusConnected"
  13191. },
  13192. {
  13193. "$ref": "#/components/schemas/MCPStatusDisabled"
  13194. },
  13195. {
  13196. "$ref": "#/components/schemas/MCPStatusFailed"
  13197. },
  13198. {
  13199. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13200. },
  13201. {
  13202. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13203. }
  13204. ]
  13205. },
  13206. "Path": {
  13207. "type": "object",
  13208. "properties": {
  13209. "home": {
  13210. "type": "string"
  13211. },
  13212. "state": {
  13213. "type": "string"
  13214. },
  13215. "config": {
  13216. "type": "string"
  13217. },
  13218. "worktree": {
  13219. "type": "string"
  13220. },
  13221. "directory": {
  13222. "type": "string"
  13223. }
  13224. },
  13225. "required": ["home", "state", "config", "worktree", "directory"]
  13226. },
  13227. "VcsInfo": {
  13228. "type": "object",
  13229. "properties": {
  13230. "branch": {
  13231. "type": "string"
  13232. },
  13233. "default_branch": {
  13234. "type": "string"
  13235. }
  13236. }
  13237. },
  13238. "VcsFileDiff": {
  13239. "type": "object",
  13240. "properties": {
  13241. "file": {
  13242. "type": "string"
  13243. },
  13244. "patch": {
  13245. "type": "string"
  13246. },
  13247. "additions": {
  13248. "type": "number"
  13249. },
  13250. "deletions": {
  13251. "type": "number"
  13252. },
  13253. "status": {
  13254. "type": "string",
  13255. "enum": ["added", "deleted", "modified"]
  13256. }
  13257. },
  13258. "required": ["file", "patch", "additions", "deletions"]
  13259. },
  13260. "Command": {
  13261. "type": "object",
  13262. "properties": {
  13263. "name": {
  13264. "type": "string"
  13265. },
  13266. "description": {
  13267. "type": "string"
  13268. },
  13269. "agent": {
  13270. "type": "string"
  13271. },
  13272. "model": {
  13273. "type": "string"
  13274. },
  13275. "source": {
  13276. "type": "string",
  13277. "enum": ["command", "mcp", "skill"]
  13278. },
  13279. "template": {
  13280. "anyOf": [
  13281. {
  13282. "type": "string"
  13283. },
  13284. {
  13285. "type": "string"
  13286. }
  13287. ]
  13288. },
  13289. "subtask": {
  13290. "type": "boolean"
  13291. },
  13292. "hints": {
  13293. "type": "array",
  13294. "items": {
  13295. "type": "string"
  13296. }
  13297. }
  13298. },
  13299. "required": ["name", "template", "hints"]
  13300. },
  13301. "Agent": {
  13302. "type": "object",
  13303. "properties": {
  13304. "name": {
  13305. "type": "string"
  13306. },
  13307. "description": {
  13308. "type": "string"
  13309. },
  13310. "mode": {
  13311. "type": "string",
  13312. "enum": ["subagent", "primary", "all"]
  13313. },
  13314. "native": {
  13315. "type": "boolean"
  13316. },
  13317. "hidden": {
  13318. "type": "boolean"
  13319. },
  13320. "topP": {
  13321. "type": "number"
  13322. },
  13323. "temperature": {
  13324. "type": "number"
  13325. },
  13326. "color": {
  13327. "type": "string"
  13328. },
  13329. "permission": {
  13330. "$ref": "#/components/schemas/PermissionRuleset"
  13331. },
  13332. "model": {
  13333. "type": "object",
  13334. "properties": {
  13335. "modelID": {
  13336. "type": "string"
  13337. },
  13338. "providerID": {
  13339. "type": "string"
  13340. }
  13341. },
  13342. "required": ["modelID", "providerID"]
  13343. },
  13344. "variant": {
  13345. "type": "string"
  13346. },
  13347. "prompt": {
  13348. "type": "string"
  13349. },
  13350. "options": {
  13351. "type": "object",
  13352. "propertyNames": {
  13353. "type": "string"
  13354. },
  13355. "additionalProperties": {}
  13356. },
  13357. "steps": {
  13358. "type": "integer",
  13359. "exclusiveMinimum": 0,
  13360. "maximum": 9007199254740991
  13361. }
  13362. },
  13363. "required": ["name", "mode", "permission", "options"]
  13364. },
  13365. "LSPStatus": {
  13366. "type": "object",
  13367. "properties": {
  13368. "id": {
  13369. "type": "string"
  13370. },
  13371. "name": {
  13372. "type": "string"
  13373. },
  13374. "root": {
  13375. "type": "string"
  13376. },
  13377. "status": {
  13378. "anyOf": [
  13379. {
  13380. "type": "string",
  13381. "const": "connected"
  13382. },
  13383. {
  13384. "type": "string",
  13385. "const": "error"
  13386. }
  13387. ]
  13388. }
  13389. },
  13390. "required": ["id", "name", "root", "status"]
  13391. },
  13392. "FormatterStatus": {
  13393. "type": "object",
  13394. "properties": {
  13395. "name": {
  13396. "type": "string"
  13397. },
  13398. "extensions": {
  13399. "type": "array",
  13400. "items": {
  13401. "type": "string"
  13402. }
  13403. },
  13404. "enabled": {
  13405. "type": "boolean"
  13406. }
  13407. },
  13408. "required": ["name", "extensions", "enabled"]
  13409. }
  13410. }
  13411. }
  13412. }