openapi.json 321 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870
  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. "/auth/{providerID}": {
  162. "put": {
  163. "operationId": "auth.set",
  164. "summary": "Set auth credentials",
  165. "description": "Set authentication credentials",
  166. "responses": {
  167. "200": {
  168. "description": "Successfully set authentication credentials",
  169. "content": {
  170. "application/json": {
  171. "schema": {
  172. "type": "boolean"
  173. }
  174. }
  175. }
  176. },
  177. "400": {
  178. "description": "Bad request",
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "$ref": "#/components/schemas/BadRequestError"
  183. }
  184. }
  185. }
  186. }
  187. },
  188. "parameters": [
  189. {
  190. "in": "path",
  191. "name": "providerID",
  192. "schema": {
  193. "type": "string"
  194. },
  195. "required": true
  196. }
  197. ],
  198. "requestBody": {
  199. "content": {
  200. "application/json": {
  201. "schema": {
  202. "$ref": "#/components/schemas/Auth"
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  211. }
  212. ]
  213. },
  214. "delete": {
  215. "operationId": "auth.remove",
  216. "summary": "Remove auth credentials",
  217. "description": "Remove authentication credentials",
  218. "responses": {
  219. "200": {
  220. "description": "Successfully removed authentication credentials",
  221. "content": {
  222. "application/json": {
  223. "schema": {
  224. "type": "boolean"
  225. }
  226. }
  227. }
  228. },
  229. "400": {
  230. "description": "Bad request",
  231. "content": {
  232. "application/json": {
  233. "schema": {
  234. "$ref": "#/components/schemas/BadRequestError"
  235. }
  236. }
  237. }
  238. }
  239. },
  240. "parameters": [
  241. {
  242. "in": "path",
  243. "name": "providerID",
  244. "schema": {
  245. "type": "string"
  246. },
  247. "required": true
  248. }
  249. ],
  250. "x-codeSamples": [
  251. {
  252. "lang": "js",
  253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  254. }
  255. ]
  256. }
  257. },
  258. "/project": {
  259. "get": {
  260. "operationId": "project.list",
  261. "parameters": [
  262. {
  263. "in": "query",
  264. "name": "directory",
  265. "schema": {
  266. "type": "string"
  267. }
  268. },
  269. {
  270. "in": "query",
  271. "name": "workspace",
  272. "schema": {
  273. "type": "string"
  274. }
  275. }
  276. ],
  277. "summary": "List all projects",
  278. "description": "Get a list of projects that have been opened with OpenCode.",
  279. "responses": {
  280. "200": {
  281. "description": "List of projects",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "type": "array",
  286. "items": {
  287. "$ref": "#/components/schemas/Project"
  288. }
  289. }
  290. }
  291. }
  292. }
  293. },
  294. "x-codeSamples": [
  295. {
  296. "lang": "js",
  297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  298. }
  299. ]
  300. }
  301. },
  302. "/project/current": {
  303. "get": {
  304. "operationId": "project.current",
  305. "parameters": [
  306. {
  307. "in": "query",
  308. "name": "directory",
  309. "schema": {
  310. "type": "string"
  311. }
  312. },
  313. {
  314. "in": "query",
  315. "name": "workspace",
  316. "schema": {
  317. "type": "string"
  318. }
  319. }
  320. ],
  321. "summary": "Get current project",
  322. "description": "Retrieve the currently active project that OpenCode is working with.",
  323. "responses": {
  324. "200": {
  325. "description": "Current project information",
  326. "content": {
  327. "application/json": {
  328. "schema": {
  329. "$ref": "#/components/schemas/Project"
  330. }
  331. }
  332. }
  333. }
  334. },
  335. "x-codeSamples": [
  336. {
  337. "lang": "js",
  338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  339. }
  340. ]
  341. }
  342. },
  343. "/project/git/init": {
  344. "post": {
  345. "operationId": "project.initGit",
  346. "parameters": [
  347. {
  348. "in": "query",
  349. "name": "directory",
  350. "schema": {
  351. "type": "string"
  352. }
  353. },
  354. {
  355. "in": "query",
  356. "name": "workspace",
  357. "schema": {
  358. "type": "string"
  359. }
  360. }
  361. ],
  362. "summary": "Initialize git repository",
  363. "description": "Create a git repository for the current project and return the refreshed project info.",
  364. "responses": {
  365. "200": {
  366. "description": "Project information after git initialization",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "$ref": "#/components/schemas/Project"
  371. }
  372. }
  373. }
  374. }
  375. },
  376. "x-codeSamples": [
  377. {
  378. "lang": "js",
  379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  380. }
  381. ]
  382. }
  383. },
  384. "/project/{projectID}": {
  385. "patch": {
  386. "operationId": "project.update",
  387. "parameters": [
  388. {
  389. "in": "query",
  390. "name": "directory",
  391. "schema": {
  392. "type": "string"
  393. }
  394. },
  395. {
  396. "in": "query",
  397. "name": "workspace",
  398. "schema": {
  399. "type": "string"
  400. }
  401. },
  402. {
  403. "in": "path",
  404. "name": "projectID",
  405. "schema": {
  406. "type": "string"
  407. },
  408. "required": true
  409. }
  410. ],
  411. "summary": "Update project",
  412. "description": "Update project properties such as name, icon, and commands.",
  413. "responses": {
  414. "200": {
  415. "description": "Updated project information",
  416. "content": {
  417. "application/json": {
  418. "schema": {
  419. "$ref": "#/components/schemas/Project"
  420. }
  421. }
  422. }
  423. },
  424. "400": {
  425. "description": "Bad request",
  426. "content": {
  427. "application/json": {
  428. "schema": {
  429. "$ref": "#/components/schemas/BadRequestError"
  430. }
  431. }
  432. }
  433. },
  434. "404": {
  435. "description": "Not found",
  436. "content": {
  437. "application/json": {
  438. "schema": {
  439. "$ref": "#/components/schemas/NotFoundError"
  440. }
  441. }
  442. }
  443. }
  444. },
  445. "requestBody": {
  446. "content": {
  447. "application/json": {
  448. "schema": {
  449. "type": "object",
  450. "properties": {
  451. "name": {
  452. "type": "string"
  453. },
  454. "icon": {
  455. "type": "object",
  456. "properties": {
  457. "url": {
  458. "type": "string"
  459. },
  460. "override": {
  461. "type": "string"
  462. },
  463. "color": {
  464. "type": "string"
  465. }
  466. }
  467. },
  468. "commands": {
  469. "type": "object",
  470. "properties": {
  471. "start": {
  472. "description": "Startup script to run when creating a new workspace (worktree)",
  473. "type": "string"
  474. }
  475. }
  476. }
  477. }
  478. }
  479. }
  480. }
  481. },
  482. "x-codeSamples": [
  483. {
  484. "lang": "js",
  485. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  486. }
  487. ]
  488. }
  489. },
  490. "/pty": {
  491. "get": {
  492. "operationId": "pty.list",
  493. "parameters": [
  494. {
  495. "in": "query",
  496. "name": "directory",
  497. "schema": {
  498. "type": "string"
  499. }
  500. },
  501. {
  502. "in": "query",
  503. "name": "workspace",
  504. "schema": {
  505. "type": "string"
  506. }
  507. }
  508. ],
  509. "summary": "List PTY sessions",
  510. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  511. "responses": {
  512. "200": {
  513. "description": "List of sessions",
  514. "content": {
  515. "application/json": {
  516. "schema": {
  517. "type": "array",
  518. "items": {
  519. "$ref": "#/components/schemas/Pty"
  520. }
  521. }
  522. }
  523. }
  524. }
  525. },
  526. "x-codeSamples": [
  527. {
  528. "lang": "js",
  529. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  530. }
  531. ]
  532. },
  533. "post": {
  534. "operationId": "pty.create",
  535. "parameters": [
  536. {
  537. "in": "query",
  538. "name": "directory",
  539. "schema": {
  540. "type": "string"
  541. }
  542. },
  543. {
  544. "in": "query",
  545. "name": "workspace",
  546. "schema": {
  547. "type": "string"
  548. }
  549. }
  550. ],
  551. "summary": "Create PTY session",
  552. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  553. "responses": {
  554. "200": {
  555. "description": "Created session",
  556. "content": {
  557. "application/json": {
  558. "schema": {
  559. "$ref": "#/components/schemas/Pty"
  560. }
  561. }
  562. }
  563. },
  564. "400": {
  565. "description": "Bad request",
  566. "content": {
  567. "application/json": {
  568. "schema": {
  569. "$ref": "#/components/schemas/BadRequestError"
  570. }
  571. }
  572. }
  573. }
  574. },
  575. "requestBody": {
  576. "content": {
  577. "application/json": {
  578. "schema": {
  579. "type": "object",
  580. "properties": {
  581. "command": {
  582. "type": "string"
  583. },
  584. "args": {
  585. "type": "array",
  586. "items": {
  587. "type": "string"
  588. }
  589. },
  590. "cwd": {
  591. "type": "string"
  592. },
  593. "title": {
  594. "type": "string"
  595. },
  596. "env": {
  597. "type": "object",
  598. "propertyNames": {
  599. "type": "string"
  600. },
  601. "additionalProperties": {
  602. "type": "string"
  603. }
  604. }
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "x-codeSamples": [
  611. {
  612. "lang": "js",
  613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  614. }
  615. ]
  616. }
  617. },
  618. "/pty/{ptyID}": {
  619. "get": {
  620. "operationId": "pty.get",
  621. "parameters": [
  622. {
  623. "in": "query",
  624. "name": "directory",
  625. "schema": {
  626. "type": "string"
  627. }
  628. },
  629. {
  630. "in": "query",
  631. "name": "workspace",
  632. "schema": {
  633. "type": "string"
  634. }
  635. },
  636. {
  637. "in": "path",
  638. "name": "ptyID",
  639. "schema": {
  640. "type": "string"
  641. },
  642. "required": true
  643. }
  644. ],
  645. "summary": "Get PTY session",
  646. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  647. "responses": {
  648. "200": {
  649. "description": "Session info",
  650. "content": {
  651. "application/json": {
  652. "schema": {
  653. "$ref": "#/components/schemas/Pty"
  654. }
  655. }
  656. }
  657. },
  658. "404": {
  659. "description": "Not found",
  660. "content": {
  661. "application/json": {
  662. "schema": {
  663. "$ref": "#/components/schemas/NotFoundError"
  664. }
  665. }
  666. }
  667. }
  668. },
  669. "x-codeSamples": [
  670. {
  671. "lang": "js",
  672. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  673. }
  674. ]
  675. },
  676. "put": {
  677. "operationId": "pty.update",
  678. "parameters": [
  679. {
  680. "in": "query",
  681. "name": "directory",
  682. "schema": {
  683. "type": "string"
  684. }
  685. },
  686. {
  687. "in": "query",
  688. "name": "workspace",
  689. "schema": {
  690. "type": "string"
  691. }
  692. },
  693. {
  694. "in": "path",
  695. "name": "ptyID",
  696. "schema": {
  697. "type": "string"
  698. },
  699. "required": true
  700. }
  701. ],
  702. "summary": "Update PTY session",
  703. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  704. "responses": {
  705. "200": {
  706. "description": "Updated session",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "$ref": "#/components/schemas/Pty"
  711. }
  712. }
  713. }
  714. },
  715. "400": {
  716. "description": "Bad request",
  717. "content": {
  718. "application/json": {
  719. "schema": {
  720. "$ref": "#/components/schemas/BadRequestError"
  721. }
  722. }
  723. }
  724. }
  725. },
  726. "requestBody": {
  727. "content": {
  728. "application/json": {
  729. "schema": {
  730. "type": "object",
  731. "properties": {
  732. "title": {
  733. "type": "string"
  734. },
  735. "size": {
  736. "type": "object",
  737. "properties": {
  738. "rows": {
  739. "type": "number"
  740. },
  741. "cols": {
  742. "type": "number"
  743. }
  744. },
  745. "required": ["rows", "cols"]
  746. }
  747. }
  748. }
  749. }
  750. }
  751. },
  752. "x-codeSamples": [
  753. {
  754. "lang": "js",
  755. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  756. }
  757. ]
  758. },
  759. "delete": {
  760. "operationId": "pty.remove",
  761. "parameters": [
  762. {
  763. "in": "query",
  764. "name": "directory",
  765. "schema": {
  766. "type": "string"
  767. }
  768. },
  769. {
  770. "in": "query",
  771. "name": "workspace",
  772. "schema": {
  773. "type": "string"
  774. }
  775. },
  776. {
  777. "in": "path",
  778. "name": "ptyID",
  779. "schema": {
  780. "type": "string"
  781. },
  782. "required": true
  783. }
  784. ],
  785. "summary": "Remove PTY session",
  786. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  787. "responses": {
  788. "200": {
  789. "description": "Session removed",
  790. "content": {
  791. "application/json": {
  792. "schema": {
  793. "type": "boolean"
  794. }
  795. }
  796. }
  797. },
  798. "404": {
  799. "description": "Not found",
  800. "content": {
  801. "application/json": {
  802. "schema": {
  803. "$ref": "#/components/schemas/NotFoundError"
  804. }
  805. }
  806. }
  807. }
  808. },
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/pty/{ptyID}/connect": {
  818. "get": {
  819. "operationId": "pty.connect",
  820. "parameters": [
  821. {
  822. "in": "query",
  823. "name": "directory",
  824. "schema": {
  825. "type": "string"
  826. }
  827. },
  828. {
  829. "in": "query",
  830. "name": "workspace",
  831. "schema": {
  832. "type": "string"
  833. }
  834. },
  835. {
  836. "in": "path",
  837. "name": "ptyID",
  838. "schema": {
  839. "type": "string"
  840. },
  841. "required": true
  842. }
  843. ],
  844. "summary": "Connect to PTY session",
  845. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  846. "responses": {
  847. "200": {
  848. "description": "Connected session",
  849. "content": {
  850. "application/json": {
  851. "schema": {
  852. "type": "boolean"
  853. }
  854. }
  855. }
  856. },
  857. "404": {
  858. "description": "Not found",
  859. "content": {
  860. "application/json": {
  861. "schema": {
  862. "$ref": "#/components/schemas/NotFoundError"
  863. }
  864. }
  865. }
  866. }
  867. },
  868. "x-codeSamples": [
  869. {
  870. "lang": "js",
  871. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  872. }
  873. ]
  874. }
  875. },
  876. "/config": {
  877. "get": {
  878. "operationId": "config.get",
  879. "parameters": [
  880. {
  881. "in": "query",
  882. "name": "directory",
  883. "schema": {
  884. "type": "string"
  885. }
  886. },
  887. {
  888. "in": "query",
  889. "name": "workspace",
  890. "schema": {
  891. "type": "string"
  892. }
  893. }
  894. ],
  895. "summary": "Get configuration",
  896. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  897. "responses": {
  898. "200": {
  899. "description": "Get config info",
  900. "content": {
  901. "application/json": {
  902. "schema": {
  903. "$ref": "#/components/schemas/Config"
  904. }
  905. }
  906. }
  907. }
  908. },
  909. "x-codeSamples": [
  910. {
  911. "lang": "js",
  912. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  913. }
  914. ]
  915. },
  916. "patch": {
  917. "operationId": "config.update",
  918. "parameters": [
  919. {
  920. "in": "query",
  921. "name": "directory",
  922. "schema": {
  923. "type": "string"
  924. }
  925. },
  926. {
  927. "in": "query",
  928. "name": "workspace",
  929. "schema": {
  930. "type": "string"
  931. }
  932. }
  933. ],
  934. "summary": "Update configuration",
  935. "description": "Update OpenCode configuration settings and preferences.",
  936. "responses": {
  937. "200": {
  938. "description": "Successfully updated config",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "$ref": "#/components/schemas/Config"
  943. }
  944. }
  945. }
  946. },
  947. "400": {
  948. "description": "Bad request",
  949. "content": {
  950. "application/json": {
  951. "schema": {
  952. "$ref": "#/components/schemas/BadRequestError"
  953. }
  954. }
  955. }
  956. }
  957. },
  958. "requestBody": {
  959. "content": {
  960. "application/json": {
  961. "schema": {
  962. "$ref": "#/components/schemas/Config"
  963. }
  964. }
  965. }
  966. },
  967. "x-codeSamples": [
  968. {
  969. "lang": "js",
  970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  971. }
  972. ]
  973. }
  974. },
  975. "/config/providers": {
  976. "get": {
  977. "operationId": "config.providers",
  978. "parameters": [
  979. {
  980. "in": "query",
  981. "name": "directory",
  982. "schema": {
  983. "type": "string"
  984. }
  985. },
  986. {
  987. "in": "query",
  988. "name": "workspace",
  989. "schema": {
  990. "type": "string"
  991. }
  992. }
  993. ],
  994. "summary": "List config providers",
  995. "description": "Get a list of all configured AI providers and their default models.",
  996. "responses": {
  997. "200": {
  998. "description": "List of providers",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "object",
  1003. "properties": {
  1004. "providers": {
  1005. "type": "array",
  1006. "items": {
  1007. "$ref": "#/components/schemas/Provider"
  1008. }
  1009. },
  1010. "default": {
  1011. "type": "object",
  1012. "propertyNames": {
  1013. "type": "string"
  1014. },
  1015. "additionalProperties": {
  1016. "type": "string"
  1017. }
  1018. }
  1019. },
  1020. "required": ["providers", "default"]
  1021. }
  1022. }
  1023. }
  1024. }
  1025. },
  1026. "x-codeSamples": [
  1027. {
  1028. "lang": "js",
  1029. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  1030. }
  1031. ]
  1032. }
  1033. },
  1034. "/experimental/tool/ids": {
  1035. "get": {
  1036. "operationId": "tool.ids",
  1037. "parameters": [
  1038. {
  1039. "in": "query",
  1040. "name": "directory",
  1041. "schema": {
  1042. "type": "string"
  1043. }
  1044. },
  1045. {
  1046. "in": "query",
  1047. "name": "workspace",
  1048. "schema": {
  1049. "type": "string"
  1050. }
  1051. }
  1052. ],
  1053. "summary": "List tool IDs",
  1054. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1055. "responses": {
  1056. "200": {
  1057. "description": "Tool IDs",
  1058. "content": {
  1059. "application/json": {
  1060. "schema": {
  1061. "$ref": "#/components/schemas/ToolIDs"
  1062. }
  1063. }
  1064. }
  1065. },
  1066. "400": {
  1067. "description": "Bad request",
  1068. "content": {
  1069. "application/json": {
  1070. "schema": {
  1071. "$ref": "#/components/schemas/BadRequestError"
  1072. }
  1073. }
  1074. }
  1075. }
  1076. },
  1077. "x-codeSamples": [
  1078. {
  1079. "lang": "js",
  1080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1081. }
  1082. ]
  1083. }
  1084. },
  1085. "/experimental/tool": {
  1086. "get": {
  1087. "operationId": "tool.list",
  1088. "parameters": [
  1089. {
  1090. "in": "query",
  1091. "name": "directory",
  1092. "schema": {
  1093. "type": "string"
  1094. }
  1095. },
  1096. {
  1097. "in": "query",
  1098. "name": "workspace",
  1099. "schema": {
  1100. "type": "string"
  1101. }
  1102. },
  1103. {
  1104. "in": "query",
  1105. "name": "provider",
  1106. "schema": {
  1107. "type": "string"
  1108. },
  1109. "required": true
  1110. },
  1111. {
  1112. "in": "query",
  1113. "name": "model",
  1114. "schema": {
  1115. "type": "string"
  1116. },
  1117. "required": true
  1118. }
  1119. ],
  1120. "summary": "List tools",
  1121. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1122. "responses": {
  1123. "200": {
  1124. "description": "Tools",
  1125. "content": {
  1126. "application/json": {
  1127. "schema": {
  1128. "$ref": "#/components/schemas/ToolList"
  1129. }
  1130. }
  1131. }
  1132. },
  1133. "400": {
  1134. "description": "Bad request",
  1135. "content": {
  1136. "application/json": {
  1137. "schema": {
  1138. "$ref": "#/components/schemas/BadRequestError"
  1139. }
  1140. }
  1141. }
  1142. }
  1143. },
  1144. "x-codeSamples": [
  1145. {
  1146. "lang": "js",
  1147. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1148. }
  1149. ]
  1150. }
  1151. },
  1152. "/experimental/workspace": {
  1153. "post": {
  1154. "operationId": "experimental.workspace.create",
  1155. "parameters": [
  1156. {
  1157. "in": "query",
  1158. "name": "directory",
  1159. "schema": {
  1160. "type": "string"
  1161. }
  1162. },
  1163. {
  1164. "in": "query",
  1165. "name": "workspace",
  1166. "schema": {
  1167. "type": "string"
  1168. }
  1169. }
  1170. ],
  1171. "summary": "Create workspace",
  1172. "description": "Create a workspace for the current project.",
  1173. "responses": {
  1174. "200": {
  1175. "description": "Workspace created",
  1176. "content": {
  1177. "application/json": {
  1178. "schema": {
  1179. "$ref": "#/components/schemas/Workspace"
  1180. }
  1181. }
  1182. }
  1183. },
  1184. "400": {
  1185. "description": "Bad request",
  1186. "content": {
  1187. "application/json": {
  1188. "schema": {
  1189. "$ref": "#/components/schemas/BadRequestError"
  1190. }
  1191. }
  1192. }
  1193. }
  1194. },
  1195. "requestBody": {
  1196. "content": {
  1197. "application/json": {
  1198. "schema": {
  1199. "type": "object",
  1200. "properties": {
  1201. "id": {
  1202. "type": "string",
  1203. "pattern": "^wrk.*"
  1204. },
  1205. "type": {
  1206. "type": "string"
  1207. },
  1208. "branch": {
  1209. "anyOf": [
  1210. {
  1211. "type": "string"
  1212. },
  1213. {
  1214. "type": "null"
  1215. }
  1216. ]
  1217. },
  1218. "extra": {
  1219. "anyOf": [
  1220. {},
  1221. {
  1222. "type": "null"
  1223. }
  1224. ]
  1225. }
  1226. },
  1227. "required": ["type", "branch", "extra"]
  1228. }
  1229. }
  1230. }
  1231. },
  1232. "x-codeSamples": [
  1233. {
  1234. "lang": "js",
  1235. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  1236. }
  1237. ]
  1238. },
  1239. "get": {
  1240. "operationId": "experimental.workspace.list",
  1241. "parameters": [
  1242. {
  1243. "in": "query",
  1244. "name": "directory",
  1245. "schema": {
  1246. "type": "string"
  1247. }
  1248. },
  1249. {
  1250. "in": "query",
  1251. "name": "workspace",
  1252. "schema": {
  1253. "type": "string"
  1254. }
  1255. }
  1256. ],
  1257. "summary": "List workspaces",
  1258. "description": "List all workspaces.",
  1259. "responses": {
  1260. "200": {
  1261. "description": "Workspaces",
  1262. "content": {
  1263. "application/json": {
  1264. "schema": {
  1265. "type": "array",
  1266. "items": {
  1267. "$ref": "#/components/schemas/Workspace"
  1268. }
  1269. }
  1270. }
  1271. }
  1272. }
  1273. },
  1274. "x-codeSamples": [
  1275. {
  1276. "lang": "js",
  1277. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  1278. }
  1279. ]
  1280. }
  1281. },
  1282. "/experimental/workspace/{id}": {
  1283. "delete": {
  1284. "operationId": "experimental.workspace.remove",
  1285. "parameters": [
  1286. {
  1287. "in": "query",
  1288. "name": "directory",
  1289. "schema": {
  1290. "type": "string"
  1291. }
  1292. },
  1293. {
  1294. "in": "query",
  1295. "name": "workspace",
  1296. "schema": {
  1297. "type": "string"
  1298. }
  1299. },
  1300. {
  1301. "in": "path",
  1302. "name": "id",
  1303. "schema": {
  1304. "type": "string",
  1305. "pattern": "^wrk.*"
  1306. },
  1307. "required": true
  1308. }
  1309. ],
  1310. "summary": "Remove workspace",
  1311. "description": "Remove an existing workspace.",
  1312. "responses": {
  1313. "200": {
  1314. "description": "Workspace removed",
  1315. "content": {
  1316. "application/json": {
  1317. "schema": {
  1318. "$ref": "#/components/schemas/Workspace"
  1319. }
  1320. }
  1321. }
  1322. },
  1323. "400": {
  1324. "description": "Bad request",
  1325. "content": {
  1326. "application/json": {
  1327. "schema": {
  1328. "$ref": "#/components/schemas/BadRequestError"
  1329. }
  1330. }
  1331. }
  1332. }
  1333. },
  1334. "x-codeSamples": [
  1335. {
  1336. "lang": "js",
  1337. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  1338. }
  1339. ]
  1340. }
  1341. },
  1342. "/experimental/worktree": {
  1343. "post": {
  1344. "operationId": "worktree.create",
  1345. "parameters": [
  1346. {
  1347. "in": "query",
  1348. "name": "directory",
  1349. "schema": {
  1350. "type": "string"
  1351. }
  1352. },
  1353. {
  1354. "in": "query",
  1355. "name": "workspace",
  1356. "schema": {
  1357. "type": "string"
  1358. }
  1359. }
  1360. ],
  1361. "summary": "Create worktree",
  1362. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1363. "responses": {
  1364. "200": {
  1365. "description": "Worktree created",
  1366. "content": {
  1367. "application/json": {
  1368. "schema": {
  1369. "$ref": "#/components/schemas/Worktree"
  1370. }
  1371. }
  1372. }
  1373. },
  1374. "400": {
  1375. "description": "Bad request",
  1376. "content": {
  1377. "application/json": {
  1378. "schema": {
  1379. "$ref": "#/components/schemas/BadRequestError"
  1380. }
  1381. }
  1382. }
  1383. }
  1384. },
  1385. "requestBody": {
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "$ref": "#/components/schemas/WorktreeCreateInput"
  1390. }
  1391. }
  1392. }
  1393. },
  1394. "x-codeSamples": [
  1395. {
  1396. "lang": "js",
  1397. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1398. }
  1399. ]
  1400. },
  1401. "get": {
  1402. "operationId": "worktree.list",
  1403. "parameters": [
  1404. {
  1405. "in": "query",
  1406. "name": "directory",
  1407. "schema": {
  1408. "type": "string"
  1409. }
  1410. },
  1411. {
  1412. "in": "query",
  1413. "name": "workspace",
  1414. "schema": {
  1415. "type": "string"
  1416. }
  1417. }
  1418. ],
  1419. "summary": "List worktrees",
  1420. "description": "List all sandbox worktrees for the current project.",
  1421. "responses": {
  1422. "200": {
  1423. "description": "List of worktree directories",
  1424. "content": {
  1425. "application/json": {
  1426. "schema": {
  1427. "type": "array",
  1428. "items": {
  1429. "type": "string"
  1430. }
  1431. }
  1432. }
  1433. }
  1434. }
  1435. },
  1436. "x-codeSamples": [
  1437. {
  1438. "lang": "js",
  1439. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1440. }
  1441. ]
  1442. },
  1443. "delete": {
  1444. "operationId": "worktree.remove",
  1445. "parameters": [
  1446. {
  1447. "in": "query",
  1448. "name": "directory",
  1449. "schema": {
  1450. "type": "string"
  1451. }
  1452. },
  1453. {
  1454. "in": "query",
  1455. "name": "workspace",
  1456. "schema": {
  1457. "type": "string"
  1458. }
  1459. }
  1460. ],
  1461. "summary": "Remove worktree",
  1462. "description": "Remove a git worktree and delete its branch.",
  1463. "responses": {
  1464. "200": {
  1465. "description": "Worktree removed",
  1466. "content": {
  1467. "application/json": {
  1468. "schema": {
  1469. "type": "boolean"
  1470. }
  1471. }
  1472. }
  1473. },
  1474. "400": {
  1475. "description": "Bad request",
  1476. "content": {
  1477. "application/json": {
  1478. "schema": {
  1479. "$ref": "#/components/schemas/BadRequestError"
  1480. }
  1481. }
  1482. }
  1483. }
  1484. },
  1485. "requestBody": {
  1486. "content": {
  1487. "application/json": {
  1488. "schema": {
  1489. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1490. }
  1491. }
  1492. }
  1493. },
  1494. "x-codeSamples": [
  1495. {
  1496. "lang": "js",
  1497. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1498. }
  1499. ]
  1500. }
  1501. },
  1502. "/experimental/worktree/reset": {
  1503. "post": {
  1504. "operationId": "worktree.reset",
  1505. "parameters": [
  1506. {
  1507. "in": "query",
  1508. "name": "directory",
  1509. "schema": {
  1510. "type": "string"
  1511. }
  1512. },
  1513. {
  1514. "in": "query",
  1515. "name": "workspace",
  1516. "schema": {
  1517. "type": "string"
  1518. }
  1519. }
  1520. ],
  1521. "summary": "Reset worktree",
  1522. "description": "Reset a worktree branch to the primary default branch.",
  1523. "responses": {
  1524. "200": {
  1525. "description": "Worktree reset",
  1526. "content": {
  1527. "application/json": {
  1528. "schema": {
  1529. "type": "boolean"
  1530. }
  1531. }
  1532. }
  1533. },
  1534. "400": {
  1535. "description": "Bad request",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "$ref": "#/components/schemas/BadRequestError"
  1540. }
  1541. }
  1542. }
  1543. }
  1544. },
  1545. "requestBody": {
  1546. "content": {
  1547. "application/json": {
  1548. "schema": {
  1549. "$ref": "#/components/schemas/WorktreeResetInput"
  1550. }
  1551. }
  1552. }
  1553. },
  1554. "x-codeSamples": [
  1555. {
  1556. "lang": "js",
  1557. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1558. }
  1559. ]
  1560. }
  1561. },
  1562. "/experimental/session": {
  1563. "get": {
  1564. "operationId": "experimental.session.list",
  1565. "parameters": [
  1566. {
  1567. "in": "query",
  1568. "name": "directory",
  1569. "schema": {
  1570. "type": "string"
  1571. },
  1572. "description": "Filter sessions by project directory"
  1573. },
  1574. {
  1575. "in": "query",
  1576. "name": "workspace",
  1577. "schema": {
  1578. "type": "string"
  1579. }
  1580. },
  1581. {
  1582. "in": "query",
  1583. "name": "roots",
  1584. "schema": {
  1585. "type": "boolean"
  1586. },
  1587. "description": "Only return root sessions (no parentID)"
  1588. },
  1589. {
  1590. "in": "query",
  1591. "name": "start",
  1592. "schema": {
  1593. "type": "number"
  1594. },
  1595. "description": "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
  1596. },
  1597. {
  1598. "in": "query",
  1599. "name": "cursor",
  1600. "schema": {
  1601. "type": "number"
  1602. },
  1603. "description": "Return sessions updated before this timestamp (milliseconds since epoch)"
  1604. },
  1605. {
  1606. "in": "query",
  1607. "name": "search",
  1608. "schema": {
  1609. "type": "string"
  1610. },
  1611. "description": "Filter sessions by title (case-insensitive)"
  1612. },
  1613. {
  1614. "in": "query",
  1615. "name": "limit",
  1616. "schema": {
  1617. "type": "number"
  1618. },
  1619. "description": "Maximum number of sessions to return"
  1620. },
  1621. {
  1622. "in": "query",
  1623. "name": "archived",
  1624. "schema": {
  1625. "type": "boolean"
  1626. },
  1627. "description": "Include archived sessions (default false)"
  1628. }
  1629. ],
  1630. "summary": "List sessions",
  1631. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1632. "responses": {
  1633. "200": {
  1634. "description": "List of sessions",
  1635. "content": {
  1636. "application/json": {
  1637. "schema": {
  1638. "type": "array",
  1639. "items": {
  1640. "$ref": "#/components/schemas/GlobalSession"
  1641. }
  1642. }
  1643. }
  1644. }
  1645. }
  1646. },
  1647. "x-codeSamples": [
  1648. {
  1649. "lang": "js",
  1650. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1651. }
  1652. ]
  1653. }
  1654. },
  1655. "/experimental/resource": {
  1656. "get": {
  1657. "operationId": "experimental.resource.list",
  1658. "parameters": [
  1659. {
  1660. "in": "query",
  1661. "name": "directory",
  1662. "schema": {
  1663. "type": "string"
  1664. }
  1665. },
  1666. {
  1667. "in": "query",
  1668. "name": "workspace",
  1669. "schema": {
  1670. "type": "string"
  1671. }
  1672. }
  1673. ],
  1674. "summary": "Get MCP resources",
  1675. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1676. "responses": {
  1677. "200": {
  1678. "description": "MCP resources",
  1679. "content": {
  1680. "application/json": {
  1681. "schema": {
  1682. "type": "object",
  1683. "propertyNames": {
  1684. "type": "string"
  1685. },
  1686. "additionalProperties": {
  1687. "$ref": "#/components/schemas/McpResource"
  1688. }
  1689. }
  1690. }
  1691. }
  1692. }
  1693. },
  1694. "x-codeSamples": [
  1695. {
  1696. "lang": "js",
  1697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1698. }
  1699. ]
  1700. }
  1701. },
  1702. "/session": {
  1703. "get": {
  1704. "operationId": "session.list",
  1705. "parameters": [
  1706. {
  1707. "in": "query",
  1708. "name": "directory",
  1709. "schema": {
  1710. "type": "string"
  1711. },
  1712. "description": "Filter sessions by project directory"
  1713. },
  1714. {
  1715. "in": "query",
  1716. "name": "workspace",
  1717. "schema": {
  1718. "type": "string"
  1719. }
  1720. },
  1721. {
  1722. "in": "query",
  1723. "name": "roots",
  1724. "schema": {
  1725. "type": "boolean"
  1726. },
  1727. "description": "Only return root sessions (no parentID)"
  1728. },
  1729. {
  1730. "in": "query",
  1731. "name": "start",
  1732. "schema": {
  1733. "type": "number"
  1734. },
  1735. "description": "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
  1736. },
  1737. {
  1738. "in": "query",
  1739. "name": "search",
  1740. "schema": {
  1741. "type": "string"
  1742. },
  1743. "description": "Filter sessions by title (case-insensitive)"
  1744. },
  1745. {
  1746. "in": "query",
  1747. "name": "limit",
  1748. "schema": {
  1749. "type": "number"
  1750. },
  1751. "description": "Maximum number of sessions to return"
  1752. }
  1753. ],
  1754. "summary": "List sessions",
  1755. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  1756. "responses": {
  1757. "200": {
  1758. "description": "List of sessions",
  1759. "content": {
  1760. "application/json": {
  1761. "schema": {
  1762. "type": "array",
  1763. "items": {
  1764. "$ref": "#/components/schemas/Session"
  1765. }
  1766. }
  1767. }
  1768. }
  1769. }
  1770. },
  1771. "x-codeSamples": [
  1772. {
  1773. "lang": "js",
  1774. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  1775. }
  1776. ]
  1777. },
  1778. "post": {
  1779. "operationId": "session.create",
  1780. "parameters": [
  1781. {
  1782. "in": "query",
  1783. "name": "directory",
  1784. "schema": {
  1785. "type": "string"
  1786. }
  1787. },
  1788. {
  1789. "in": "query",
  1790. "name": "workspace",
  1791. "schema": {
  1792. "type": "string"
  1793. }
  1794. }
  1795. ],
  1796. "summary": "Create session",
  1797. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  1798. "responses": {
  1799. "200": {
  1800. "description": "Successfully created session",
  1801. "content": {
  1802. "application/json": {
  1803. "schema": {
  1804. "$ref": "#/components/schemas/Session"
  1805. }
  1806. }
  1807. }
  1808. },
  1809. "400": {
  1810. "description": "Bad request",
  1811. "content": {
  1812. "application/json": {
  1813. "schema": {
  1814. "$ref": "#/components/schemas/BadRequestError"
  1815. }
  1816. }
  1817. }
  1818. }
  1819. },
  1820. "requestBody": {
  1821. "content": {
  1822. "application/json": {
  1823. "schema": {
  1824. "type": "object",
  1825. "properties": {
  1826. "parentID": {
  1827. "type": "string",
  1828. "pattern": "^ses.*"
  1829. },
  1830. "title": {
  1831. "type": "string"
  1832. },
  1833. "permission": {
  1834. "$ref": "#/components/schemas/PermissionRuleset"
  1835. },
  1836. "workspaceID": {
  1837. "type": "string",
  1838. "pattern": "^wrk.*"
  1839. }
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "x-codeSamples": [
  1846. {
  1847. "lang": "js",
  1848. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  1849. }
  1850. ]
  1851. }
  1852. },
  1853. "/session/status": {
  1854. "get": {
  1855. "operationId": "session.status",
  1856. "parameters": [
  1857. {
  1858. "in": "query",
  1859. "name": "directory",
  1860. "schema": {
  1861. "type": "string"
  1862. }
  1863. },
  1864. {
  1865. "in": "query",
  1866. "name": "workspace",
  1867. "schema": {
  1868. "type": "string"
  1869. }
  1870. }
  1871. ],
  1872. "summary": "Get session status",
  1873. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  1874. "responses": {
  1875. "200": {
  1876. "description": "Get session status",
  1877. "content": {
  1878. "application/json": {
  1879. "schema": {
  1880. "type": "object",
  1881. "propertyNames": {
  1882. "type": "string"
  1883. },
  1884. "additionalProperties": {
  1885. "$ref": "#/components/schemas/SessionStatus"
  1886. }
  1887. }
  1888. }
  1889. }
  1890. },
  1891. "400": {
  1892. "description": "Bad request",
  1893. "content": {
  1894. "application/json": {
  1895. "schema": {
  1896. "$ref": "#/components/schemas/BadRequestError"
  1897. }
  1898. }
  1899. }
  1900. }
  1901. },
  1902. "x-codeSamples": [
  1903. {
  1904. "lang": "js",
  1905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  1906. }
  1907. ]
  1908. }
  1909. },
  1910. "/session/{sessionID}": {
  1911. "get": {
  1912. "operationId": "session.get",
  1913. "parameters": [
  1914. {
  1915. "in": "query",
  1916. "name": "directory",
  1917. "schema": {
  1918. "type": "string"
  1919. }
  1920. },
  1921. {
  1922. "in": "query",
  1923. "name": "workspace",
  1924. "schema": {
  1925. "type": "string"
  1926. }
  1927. },
  1928. {
  1929. "in": "path",
  1930. "name": "sessionID",
  1931. "schema": {
  1932. "type": "string",
  1933. "pattern": "^ses.*"
  1934. },
  1935. "required": true
  1936. }
  1937. ],
  1938. "summary": "Get session",
  1939. "description": "Retrieve detailed information about a specific OpenCode session.",
  1940. "tags": ["Session"],
  1941. "responses": {
  1942. "200": {
  1943. "description": "Get session",
  1944. "content": {
  1945. "application/json": {
  1946. "schema": {
  1947. "$ref": "#/components/schemas/Session"
  1948. }
  1949. }
  1950. }
  1951. },
  1952. "400": {
  1953. "description": "Bad request",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/BadRequestError"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "404": {
  1963. "description": "Not found",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/NotFoundError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "x-codeSamples": [
  1974. {
  1975. "lang": "js",
  1976. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  1977. }
  1978. ]
  1979. },
  1980. "delete": {
  1981. "operationId": "session.delete",
  1982. "parameters": [
  1983. {
  1984. "in": "query",
  1985. "name": "directory",
  1986. "schema": {
  1987. "type": "string"
  1988. }
  1989. },
  1990. {
  1991. "in": "query",
  1992. "name": "workspace",
  1993. "schema": {
  1994. "type": "string"
  1995. }
  1996. },
  1997. {
  1998. "in": "path",
  1999. "name": "sessionID",
  2000. "schema": {
  2001. "type": "string",
  2002. "pattern": "^ses.*"
  2003. },
  2004. "required": true
  2005. }
  2006. ],
  2007. "summary": "Delete session",
  2008. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  2009. "responses": {
  2010. "200": {
  2011. "description": "Successfully deleted session",
  2012. "content": {
  2013. "application/json": {
  2014. "schema": {
  2015. "type": "boolean"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "404": {
  2031. "description": "Not found",
  2032. "content": {
  2033. "application/json": {
  2034. "schema": {
  2035. "$ref": "#/components/schemas/NotFoundError"
  2036. }
  2037. }
  2038. }
  2039. }
  2040. },
  2041. "x-codeSamples": [
  2042. {
  2043. "lang": "js",
  2044. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  2045. }
  2046. ]
  2047. },
  2048. "patch": {
  2049. "operationId": "session.update",
  2050. "parameters": [
  2051. {
  2052. "in": "query",
  2053. "name": "directory",
  2054. "schema": {
  2055. "type": "string"
  2056. }
  2057. },
  2058. {
  2059. "in": "query",
  2060. "name": "workspace",
  2061. "schema": {
  2062. "type": "string"
  2063. }
  2064. },
  2065. {
  2066. "in": "path",
  2067. "name": "sessionID",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": true
  2072. }
  2073. ],
  2074. "summary": "Update session",
  2075. "description": "Update properties of an existing session, such as title or other metadata.",
  2076. "responses": {
  2077. "200": {
  2078. "description": "Successfully updated session",
  2079. "content": {
  2080. "application/json": {
  2081. "schema": {
  2082. "$ref": "#/components/schemas/Session"
  2083. }
  2084. }
  2085. }
  2086. },
  2087. "400": {
  2088. "description": "Bad request",
  2089. "content": {
  2090. "application/json": {
  2091. "schema": {
  2092. "$ref": "#/components/schemas/BadRequestError"
  2093. }
  2094. }
  2095. }
  2096. },
  2097. "404": {
  2098. "description": "Not found",
  2099. "content": {
  2100. "application/json": {
  2101. "schema": {
  2102. "$ref": "#/components/schemas/NotFoundError"
  2103. }
  2104. }
  2105. }
  2106. }
  2107. },
  2108. "requestBody": {
  2109. "content": {
  2110. "application/json": {
  2111. "schema": {
  2112. "type": "object",
  2113. "properties": {
  2114. "title": {
  2115. "type": "string"
  2116. },
  2117. "time": {
  2118. "type": "object",
  2119. "properties": {
  2120. "archived": {
  2121. "type": "number"
  2122. }
  2123. }
  2124. }
  2125. }
  2126. }
  2127. }
  2128. }
  2129. },
  2130. "x-codeSamples": [
  2131. {
  2132. "lang": "js",
  2133. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  2134. }
  2135. ]
  2136. }
  2137. },
  2138. "/session/{sessionID}/children": {
  2139. "get": {
  2140. "operationId": "session.children",
  2141. "parameters": [
  2142. {
  2143. "in": "query",
  2144. "name": "directory",
  2145. "schema": {
  2146. "type": "string"
  2147. }
  2148. },
  2149. {
  2150. "in": "query",
  2151. "name": "workspace",
  2152. "schema": {
  2153. "type": "string"
  2154. }
  2155. },
  2156. {
  2157. "in": "path",
  2158. "name": "sessionID",
  2159. "schema": {
  2160. "type": "string",
  2161. "pattern": "^ses.*"
  2162. },
  2163. "required": true
  2164. }
  2165. ],
  2166. "summary": "Get session children",
  2167. "tags": ["Session"],
  2168. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  2169. "responses": {
  2170. "200": {
  2171. "description": "List of children",
  2172. "content": {
  2173. "application/json": {
  2174. "schema": {
  2175. "type": "array",
  2176. "items": {
  2177. "$ref": "#/components/schemas/Session"
  2178. }
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. },
  2193. "404": {
  2194. "description": "Not found",
  2195. "content": {
  2196. "application/json": {
  2197. "schema": {
  2198. "$ref": "#/components/schemas/NotFoundError"
  2199. }
  2200. }
  2201. }
  2202. }
  2203. },
  2204. "x-codeSamples": [
  2205. {
  2206. "lang": "js",
  2207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  2208. }
  2209. ]
  2210. }
  2211. },
  2212. "/session/{sessionID}/todo": {
  2213. "get": {
  2214. "operationId": "session.todo",
  2215. "parameters": [
  2216. {
  2217. "in": "query",
  2218. "name": "directory",
  2219. "schema": {
  2220. "type": "string"
  2221. }
  2222. },
  2223. {
  2224. "in": "query",
  2225. "name": "workspace",
  2226. "schema": {
  2227. "type": "string"
  2228. }
  2229. },
  2230. {
  2231. "in": "path",
  2232. "name": "sessionID",
  2233. "schema": {
  2234. "type": "string"
  2235. },
  2236. "required": true,
  2237. "description": "Session ID"
  2238. }
  2239. ],
  2240. "summary": "Get session todos",
  2241. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  2242. "responses": {
  2243. "200": {
  2244. "description": "Todo list",
  2245. "content": {
  2246. "application/json": {
  2247. "schema": {
  2248. "type": "array",
  2249. "items": {
  2250. "$ref": "#/components/schemas/Todo"
  2251. }
  2252. }
  2253. }
  2254. }
  2255. },
  2256. "400": {
  2257. "description": "Bad request",
  2258. "content": {
  2259. "application/json": {
  2260. "schema": {
  2261. "$ref": "#/components/schemas/BadRequestError"
  2262. }
  2263. }
  2264. }
  2265. },
  2266. "404": {
  2267. "description": "Not found",
  2268. "content": {
  2269. "application/json": {
  2270. "schema": {
  2271. "$ref": "#/components/schemas/NotFoundError"
  2272. }
  2273. }
  2274. }
  2275. }
  2276. },
  2277. "x-codeSamples": [
  2278. {
  2279. "lang": "js",
  2280. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  2281. }
  2282. ]
  2283. }
  2284. },
  2285. "/session/{sessionID}/init": {
  2286. "post": {
  2287. "operationId": "session.init",
  2288. "parameters": [
  2289. {
  2290. "in": "query",
  2291. "name": "directory",
  2292. "schema": {
  2293. "type": "string"
  2294. }
  2295. },
  2296. {
  2297. "in": "query",
  2298. "name": "workspace",
  2299. "schema": {
  2300. "type": "string"
  2301. }
  2302. },
  2303. {
  2304. "in": "path",
  2305. "name": "sessionID",
  2306. "schema": {
  2307. "type": "string"
  2308. },
  2309. "required": true,
  2310. "description": "Session ID"
  2311. }
  2312. ],
  2313. "summary": "Initialize session",
  2314. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  2315. "responses": {
  2316. "200": {
  2317. "description": "200",
  2318. "content": {
  2319. "application/json": {
  2320. "schema": {
  2321. "type": "boolean"
  2322. }
  2323. }
  2324. }
  2325. },
  2326. "400": {
  2327. "description": "Bad request",
  2328. "content": {
  2329. "application/json": {
  2330. "schema": {
  2331. "$ref": "#/components/schemas/BadRequestError"
  2332. }
  2333. }
  2334. }
  2335. },
  2336. "404": {
  2337. "description": "Not found",
  2338. "content": {
  2339. "application/json": {
  2340. "schema": {
  2341. "$ref": "#/components/schemas/NotFoundError"
  2342. }
  2343. }
  2344. }
  2345. }
  2346. },
  2347. "requestBody": {
  2348. "content": {
  2349. "application/json": {
  2350. "schema": {
  2351. "type": "object",
  2352. "properties": {
  2353. "modelID": {
  2354. "type": "string"
  2355. },
  2356. "providerID": {
  2357. "type": "string"
  2358. },
  2359. "messageID": {
  2360. "type": "string",
  2361. "pattern": "^msg.*"
  2362. }
  2363. },
  2364. "required": ["modelID", "providerID", "messageID"]
  2365. }
  2366. }
  2367. }
  2368. },
  2369. "x-codeSamples": [
  2370. {
  2371. "lang": "js",
  2372. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  2373. }
  2374. ]
  2375. }
  2376. },
  2377. "/session/{sessionID}/fork": {
  2378. "post": {
  2379. "operationId": "session.fork",
  2380. "parameters": [
  2381. {
  2382. "in": "query",
  2383. "name": "directory",
  2384. "schema": {
  2385. "type": "string"
  2386. }
  2387. },
  2388. {
  2389. "in": "query",
  2390. "name": "workspace",
  2391. "schema": {
  2392. "type": "string"
  2393. }
  2394. },
  2395. {
  2396. "in": "path",
  2397. "name": "sessionID",
  2398. "schema": {
  2399. "type": "string",
  2400. "pattern": "^ses.*"
  2401. },
  2402. "required": true
  2403. }
  2404. ],
  2405. "summary": "Fork session",
  2406. "description": "Create a new session by forking an existing session at a specific message point.",
  2407. "responses": {
  2408. "200": {
  2409. "description": "200",
  2410. "content": {
  2411. "application/json": {
  2412. "schema": {
  2413. "$ref": "#/components/schemas/Session"
  2414. }
  2415. }
  2416. }
  2417. }
  2418. },
  2419. "requestBody": {
  2420. "content": {
  2421. "application/json": {
  2422. "schema": {
  2423. "type": "object",
  2424. "properties": {
  2425. "messageID": {
  2426. "type": "string",
  2427. "pattern": "^msg.*"
  2428. }
  2429. }
  2430. }
  2431. }
  2432. }
  2433. },
  2434. "x-codeSamples": [
  2435. {
  2436. "lang": "js",
  2437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  2438. }
  2439. ]
  2440. }
  2441. },
  2442. "/session/{sessionID}/abort": {
  2443. "post": {
  2444. "operationId": "session.abort",
  2445. "parameters": [
  2446. {
  2447. "in": "query",
  2448. "name": "directory",
  2449. "schema": {
  2450. "type": "string"
  2451. }
  2452. },
  2453. {
  2454. "in": "query",
  2455. "name": "workspace",
  2456. "schema": {
  2457. "type": "string"
  2458. }
  2459. },
  2460. {
  2461. "in": "path",
  2462. "name": "sessionID",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": true
  2467. }
  2468. ],
  2469. "summary": "Abort session",
  2470. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  2471. "responses": {
  2472. "200": {
  2473. "description": "Aborted session",
  2474. "content": {
  2475. "application/json": {
  2476. "schema": {
  2477. "type": "boolean"
  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.abort({\n ...\n})"
  2507. }
  2508. ]
  2509. }
  2510. },
  2511. "/session/{sessionID}/share": {
  2512. "post": {
  2513. "operationId": "session.share",
  2514. "parameters": [
  2515. {
  2516. "in": "query",
  2517. "name": "directory",
  2518. "schema": {
  2519. "type": "string"
  2520. }
  2521. },
  2522. {
  2523. "in": "query",
  2524. "name": "workspace",
  2525. "schema": {
  2526. "type": "string"
  2527. }
  2528. },
  2529. {
  2530. "in": "path",
  2531. "name": "sessionID",
  2532. "schema": {
  2533. "type": "string"
  2534. },
  2535. "required": true
  2536. }
  2537. ],
  2538. "summary": "Share session",
  2539. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  2540. "responses": {
  2541. "200": {
  2542. "description": "Successfully shared session",
  2543. "content": {
  2544. "application/json": {
  2545. "schema": {
  2546. "$ref": "#/components/schemas/Session"
  2547. }
  2548. }
  2549. }
  2550. },
  2551. "400": {
  2552. "description": "Bad request",
  2553. "content": {
  2554. "application/json": {
  2555. "schema": {
  2556. "$ref": "#/components/schemas/BadRequestError"
  2557. }
  2558. }
  2559. }
  2560. },
  2561. "404": {
  2562. "description": "Not found",
  2563. "content": {
  2564. "application/json": {
  2565. "schema": {
  2566. "$ref": "#/components/schemas/NotFoundError"
  2567. }
  2568. }
  2569. }
  2570. }
  2571. },
  2572. "x-codeSamples": [
  2573. {
  2574. "lang": "js",
  2575. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  2576. }
  2577. ]
  2578. },
  2579. "delete": {
  2580. "operationId": "session.unshare",
  2581. "parameters": [
  2582. {
  2583. "in": "query",
  2584. "name": "directory",
  2585. "schema": {
  2586. "type": "string"
  2587. }
  2588. },
  2589. {
  2590. "in": "query",
  2591. "name": "workspace",
  2592. "schema": {
  2593. "type": "string"
  2594. }
  2595. },
  2596. {
  2597. "in": "path",
  2598. "name": "sessionID",
  2599. "schema": {
  2600. "type": "string",
  2601. "pattern": "^ses.*"
  2602. },
  2603. "required": true
  2604. }
  2605. ],
  2606. "summary": "Unshare session",
  2607. "description": "Remove the shareable link for a session, making it private again.",
  2608. "responses": {
  2609. "200": {
  2610. "description": "Successfully unshared session",
  2611. "content": {
  2612. "application/json": {
  2613. "schema": {
  2614. "$ref": "#/components/schemas/Session"
  2615. }
  2616. }
  2617. }
  2618. },
  2619. "400": {
  2620. "description": "Bad request",
  2621. "content": {
  2622. "application/json": {
  2623. "schema": {
  2624. "$ref": "#/components/schemas/BadRequestError"
  2625. }
  2626. }
  2627. }
  2628. },
  2629. "404": {
  2630. "description": "Not found",
  2631. "content": {
  2632. "application/json": {
  2633. "schema": {
  2634. "$ref": "#/components/schemas/NotFoundError"
  2635. }
  2636. }
  2637. }
  2638. }
  2639. },
  2640. "x-codeSamples": [
  2641. {
  2642. "lang": "js",
  2643. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  2644. }
  2645. ]
  2646. }
  2647. },
  2648. "/session/{sessionID}/diff": {
  2649. "get": {
  2650. "operationId": "session.diff",
  2651. "parameters": [
  2652. {
  2653. "in": "query",
  2654. "name": "directory",
  2655. "schema": {
  2656. "type": "string"
  2657. }
  2658. },
  2659. {
  2660. "in": "query",
  2661. "name": "workspace",
  2662. "schema": {
  2663. "type": "string"
  2664. }
  2665. },
  2666. {
  2667. "in": "path",
  2668. "name": "sessionID",
  2669. "schema": {
  2670. "type": "string",
  2671. "pattern": "^ses.*"
  2672. },
  2673. "required": true
  2674. },
  2675. {
  2676. "in": "query",
  2677. "name": "messageID",
  2678. "schema": {
  2679. "type": "string",
  2680. "pattern": "^msg.*"
  2681. }
  2682. }
  2683. ],
  2684. "summary": "Get message diff",
  2685. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  2686. "responses": {
  2687. "200": {
  2688. "description": "Successfully retrieved diff",
  2689. "content": {
  2690. "application/json": {
  2691. "schema": {
  2692. "type": "array",
  2693. "items": {
  2694. "$ref": "#/components/schemas/FileDiff"
  2695. }
  2696. }
  2697. }
  2698. }
  2699. }
  2700. },
  2701. "x-codeSamples": [
  2702. {
  2703. "lang": "js",
  2704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  2705. }
  2706. ]
  2707. }
  2708. },
  2709. "/session/{sessionID}/summarize": {
  2710. "post": {
  2711. "operationId": "session.summarize",
  2712. "parameters": [
  2713. {
  2714. "in": "query",
  2715. "name": "directory",
  2716. "schema": {
  2717. "type": "string"
  2718. }
  2719. },
  2720. {
  2721. "in": "query",
  2722. "name": "workspace",
  2723. "schema": {
  2724. "type": "string"
  2725. }
  2726. },
  2727. {
  2728. "in": "path",
  2729. "name": "sessionID",
  2730. "schema": {
  2731. "type": "string"
  2732. },
  2733. "required": true,
  2734. "description": "Session ID"
  2735. }
  2736. ],
  2737. "summary": "Summarize session",
  2738. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  2739. "responses": {
  2740. "200": {
  2741. "description": "Summarized session",
  2742. "content": {
  2743. "application/json": {
  2744. "schema": {
  2745. "type": "boolean"
  2746. }
  2747. }
  2748. }
  2749. },
  2750. "400": {
  2751. "description": "Bad request",
  2752. "content": {
  2753. "application/json": {
  2754. "schema": {
  2755. "$ref": "#/components/schemas/BadRequestError"
  2756. }
  2757. }
  2758. }
  2759. },
  2760. "404": {
  2761. "description": "Not found",
  2762. "content": {
  2763. "application/json": {
  2764. "schema": {
  2765. "$ref": "#/components/schemas/NotFoundError"
  2766. }
  2767. }
  2768. }
  2769. }
  2770. },
  2771. "requestBody": {
  2772. "content": {
  2773. "application/json": {
  2774. "schema": {
  2775. "type": "object",
  2776. "properties": {
  2777. "providerID": {
  2778. "type": "string"
  2779. },
  2780. "modelID": {
  2781. "type": "string"
  2782. },
  2783. "auto": {
  2784. "default": false,
  2785. "type": "boolean"
  2786. }
  2787. },
  2788. "required": ["providerID", "modelID"]
  2789. }
  2790. }
  2791. }
  2792. },
  2793. "x-codeSamples": [
  2794. {
  2795. "lang": "js",
  2796. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  2797. }
  2798. ]
  2799. }
  2800. },
  2801. "/session/{sessionID}/message": {
  2802. "get": {
  2803. "operationId": "session.messages",
  2804. "parameters": [
  2805. {
  2806. "in": "query",
  2807. "name": "directory",
  2808. "schema": {
  2809. "type": "string"
  2810. }
  2811. },
  2812. {
  2813. "in": "query",
  2814. "name": "workspace",
  2815. "schema": {
  2816. "type": "string"
  2817. }
  2818. },
  2819. {
  2820. "in": "path",
  2821. "name": "sessionID",
  2822. "schema": {
  2823. "type": "string"
  2824. },
  2825. "required": true,
  2826. "description": "Session ID"
  2827. },
  2828. {
  2829. "in": "query",
  2830. "name": "limit",
  2831. "schema": {
  2832. "type": "number"
  2833. }
  2834. }
  2835. ],
  2836. "summary": "Get session messages",
  2837. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  2838. "responses": {
  2839. "200": {
  2840. "description": "List of messages",
  2841. "content": {
  2842. "application/json": {
  2843. "schema": {
  2844. "type": "array",
  2845. "items": {
  2846. "type": "object",
  2847. "properties": {
  2848. "info": {
  2849. "$ref": "#/components/schemas/Message"
  2850. },
  2851. "parts": {
  2852. "type": "array",
  2853. "items": {
  2854. "$ref": "#/components/schemas/Part"
  2855. }
  2856. }
  2857. },
  2858. "required": ["info", "parts"]
  2859. }
  2860. }
  2861. }
  2862. }
  2863. },
  2864. "400": {
  2865. "description": "Bad request",
  2866. "content": {
  2867. "application/json": {
  2868. "schema": {
  2869. "$ref": "#/components/schemas/BadRequestError"
  2870. }
  2871. }
  2872. }
  2873. },
  2874. "404": {
  2875. "description": "Not found",
  2876. "content": {
  2877. "application/json": {
  2878. "schema": {
  2879. "$ref": "#/components/schemas/NotFoundError"
  2880. }
  2881. }
  2882. }
  2883. }
  2884. },
  2885. "x-codeSamples": [
  2886. {
  2887. "lang": "js",
  2888. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  2889. }
  2890. ]
  2891. },
  2892. "post": {
  2893. "operationId": "session.prompt",
  2894. "parameters": [
  2895. {
  2896. "in": "query",
  2897. "name": "directory",
  2898. "schema": {
  2899. "type": "string"
  2900. }
  2901. },
  2902. {
  2903. "in": "query",
  2904. "name": "workspace",
  2905. "schema": {
  2906. "type": "string"
  2907. }
  2908. },
  2909. {
  2910. "in": "path",
  2911. "name": "sessionID",
  2912. "schema": {
  2913. "type": "string"
  2914. },
  2915. "required": true,
  2916. "description": "Session ID"
  2917. }
  2918. ],
  2919. "summary": "Send message",
  2920. "description": "Create and send a new message to a session, streaming the AI response.",
  2921. "responses": {
  2922. "200": {
  2923. "description": "Created message",
  2924. "content": {
  2925. "application/json": {
  2926. "schema": {
  2927. "type": "object",
  2928. "properties": {
  2929. "info": {
  2930. "$ref": "#/components/schemas/AssistantMessage"
  2931. },
  2932. "parts": {
  2933. "type": "array",
  2934. "items": {
  2935. "$ref": "#/components/schemas/Part"
  2936. }
  2937. }
  2938. },
  2939. "required": ["info", "parts"]
  2940. }
  2941. }
  2942. }
  2943. },
  2944. "400": {
  2945. "description": "Bad request",
  2946. "content": {
  2947. "application/json": {
  2948. "schema": {
  2949. "$ref": "#/components/schemas/BadRequestError"
  2950. }
  2951. }
  2952. }
  2953. },
  2954. "404": {
  2955. "description": "Not found",
  2956. "content": {
  2957. "application/json": {
  2958. "schema": {
  2959. "$ref": "#/components/schemas/NotFoundError"
  2960. }
  2961. }
  2962. }
  2963. }
  2964. },
  2965. "requestBody": {
  2966. "content": {
  2967. "application/json": {
  2968. "schema": {
  2969. "type": "object",
  2970. "properties": {
  2971. "messageID": {
  2972. "type": "string",
  2973. "pattern": "^msg.*"
  2974. },
  2975. "model": {
  2976. "type": "object",
  2977. "properties": {
  2978. "providerID": {
  2979. "type": "string"
  2980. },
  2981. "modelID": {
  2982. "type": "string"
  2983. }
  2984. },
  2985. "required": ["providerID", "modelID"]
  2986. },
  2987. "agent": {
  2988. "type": "string"
  2989. },
  2990. "noReply": {
  2991. "type": "boolean"
  2992. },
  2993. "tools": {
  2994. "description": "@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
  2995. "type": "object",
  2996. "propertyNames": {
  2997. "type": "string"
  2998. },
  2999. "additionalProperties": {
  3000. "type": "boolean"
  3001. }
  3002. },
  3003. "format": {
  3004. "$ref": "#/components/schemas/OutputFormat"
  3005. },
  3006. "system": {
  3007. "type": "string"
  3008. },
  3009. "variant": {
  3010. "type": "string"
  3011. },
  3012. "parts": {
  3013. "type": "array",
  3014. "items": {
  3015. "anyOf": [
  3016. {
  3017. "$ref": "#/components/schemas/TextPartInput"
  3018. },
  3019. {
  3020. "$ref": "#/components/schemas/FilePartInput"
  3021. },
  3022. {
  3023. "$ref": "#/components/schemas/AgentPartInput"
  3024. },
  3025. {
  3026. "$ref": "#/components/schemas/SubtaskPartInput"
  3027. }
  3028. ]
  3029. }
  3030. }
  3031. },
  3032. "required": ["parts"]
  3033. }
  3034. }
  3035. }
  3036. },
  3037. "x-codeSamples": [
  3038. {
  3039. "lang": "js",
  3040. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  3041. }
  3042. ]
  3043. }
  3044. },
  3045. "/session/{sessionID}/message/{messageID}": {
  3046. "get": {
  3047. "operationId": "session.message",
  3048. "parameters": [
  3049. {
  3050. "in": "query",
  3051. "name": "directory",
  3052. "schema": {
  3053. "type": "string"
  3054. }
  3055. },
  3056. {
  3057. "in": "query",
  3058. "name": "workspace",
  3059. "schema": {
  3060. "type": "string"
  3061. }
  3062. },
  3063. {
  3064. "in": "path",
  3065. "name": "sessionID",
  3066. "schema": {
  3067. "type": "string"
  3068. },
  3069. "required": true,
  3070. "description": "Session ID"
  3071. },
  3072. {
  3073. "in": "path",
  3074. "name": "messageID",
  3075. "schema": {
  3076. "type": "string"
  3077. },
  3078. "required": true,
  3079. "description": "Message ID"
  3080. }
  3081. ],
  3082. "summary": "Get message",
  3083. "description": "Retrieve a specific message from a session by its message ID.",
  3084. "responses": {
  3085. "200": {
  3086. "description": "Message",
  3087. "content": {
  3088. "application/json": {
  3089. "schema": {
  3090. "type": "object",
  3091. "properties": {
  3092. "info": {
  3093. "$ref": "#/components/schemas/Message"
  3094. },
  3095. "parts": {
  3096. "type": "array",
  3097. "items": {
  3098. "$ref": "#/components/schemas/Part"
  3099. }
  3100. }
  3101. },
  3102. "required": ["info", "parts"]
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "400": {
  3108. "description": "Bad request",
  3109. "content": {
  3110. "application/json": {
  3111. "schema": {
  3112. "$ref": "#/components/schemas/BadRequestError"
  3113. }
  3114. }
  3115. }
  3116. },
  3117. "404": {
  3118. "description": "Not found",
  3119. "content": {
  3120. "application/json": {
  3121. "schema": {
  3122. "$ref": "#/components/schemas/NotFoundError"
  3123. }
  3124. }
  3125. }
  3126. }
  3127. },
  3128. "x-codeSamples": [
  3129. {
  3130. "lang": "js",
  3131. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  3132. }
  3133. ]
  3134. },
  3135. "delete": {
  3136. "operationId": "session.deleteMessage",
  3137. "parameters": [
  3138. {
  3139. "in": "query",
  3140. "name": "directory",
  3141. "schema": {
  3142. "type": "string"
  3143. }
  3144. },
  3145. {
  3146. "in": "query",
  3147. "name": "workspace",
  3148. "schema": {
  3149. "type": "string"
  3150. }
  3151. },
  3152. {
  3153. "in": "path",
  3154. "name": "sessionID",
  3155. "schema": {
  3156. "type": "string"
  3157. },
  3158. "required": true,
  3159. "description": "Session ID"
  3160. },
  3161. {
  3162. "in": "path",
  3163. "name": "messageID",
  3164. "schema": {
  3165. "type": "string"
  3166. },
  3167. "required": true,
  3168. "description": "Message ID"
  3169. }
  3170. ],
  3171. "summary": "Delete message",
  3172. "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.",
  3173. "responses": {
  3174. "200": {
  3175. "description": "Successfully deleted message",
  3176. "content": {
  3177. "application/json": {
  3178. "schema": {
  3179. "type": "boolean"
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "400": {
  3185. "description": "Bad request",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/BadRequestError"
  3190. }
  3191. }
  3192. }
  3193. },
  3194. "404": {
  3195. "description": "Not found",
  3196. "content": {
  3197. "application/json": {
  3198. "schema": {
  3199. "$ref": "#/components/schemas/NotFoundError"
  3200. }
  3201. }
  3202. }
  3203. }
  3204. },
  3205. "x-codeSamples": [
  3206. {
  3207. "lang": "js",
  3208. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  3209. }
  3210. ]
  3211. }
  3212. },
  3213. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  3214. "delete": {
  3215. "operationId": "part.delete",
  3216. "parameters": [
  3217. {
  3218. "in": "query",
  3219. "name": "directory",
  3220. "schema": {
  3221. "type": "string"
  3222. }
  3223. },
  3224. {
  3225. "in": "query",
  3226. "name": "workspace",
  3227. "schema": {
  3228. "type": "string"
  3229. }
  3230. },
  3231. {
  3232. "in": "path",
  3233. "name": "sessionID",
  3234. "schema": {
  3235. "type": "string"
  3236. },
  3237. "required": true,
  3238. "description": "Session ID"
  3239. },
  3240. {
  3241. "in": "path",
  3242. "name": "messageID",
  3243. "schema": {
  3244. "type": "string"
  3245. },
  3246. "required": true,
  3247. "description": "Message ID"
  3248. },
  3249. {
  3250. "in": "path",
  3251. "name": "partID",
  3252. "schema": {
  3253. "type": "string"
  3254. },
  3255. "required": true,
  3256. "description": "Part ID"
  3257. }
  3258. ],
  3259. "description": "Delete a part from a message",
  3260. "responses": {
  3261. "200": {
  3262. "description": "Successfully deleted part",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "type": "boolean"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "Bad request",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "$ref": "#/components/schemas/BadRequestError"
  3277. }
  3278. }
  3279. }
  3280. },
  3281. "404": {
  3282. "description": "Not found",
  3283. "content": {
  3284. "application/json": {
  3285. "schema": {
  3286. "$ref": "#/components/schemas/NotFoundError"
  3287. }
  3288. }
  3289. }
  3290. }
  3291. },
  3292. "x-codeSamples": [
  3293. {
  3294. "lang": "js",
  3295. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  3296. }
  3297. ]
  3298. },
  3299. "patch": {
  3300. "operationId": "part.update",
  3301. "parameters": [
  3302. {
  3303. "in": "query",
  3304. "name": "directory",
  3305. "schema": {
  3306. "type": "string"
  3307. }
  3308. },
  3309. {
  3310. "in": "query",
  3311. "name": "workspace",
  3312. "schema": {
  3313. "type": "string"
  3314. }
  3315. },
  3316. {
  3317. "in": "path",
  3318. "name": "sessionID",
  3319. "schema": {
  3320. "type": "string"
  3321. },
  3322. "required": true,
  3323. "description": "Session ID"
  3324. },
  3325. {
  3326. "in": "path",
  3327. "name": "messageID",
  3328. "schema": {
  3329. "type": "string"
  3330. },
  3331. "required": true,
  3332. "description": "Message ID"
  3333. },
  3334. {
  3335. "in": "path",
  3336. "name": "partID",
  3337. "schema": {
  3338. "type": "string"
  3339. },
  3340. "required": true,
  3341. "description": "Part ID"
  3342. }
  3343. ],
  3344. "description": "Update a part in a message",
  3345. "responses": {
  3346. "200": {
  3347. "description": "Successfully updated part",
  3348. "content": {
  3349. "application/json": {
  3350. "schema": {
  3351. "$ref": "#/components/schemas/Part"
  3352. }
  3353. }
  3354. }
  3355. },
  3356. "400": {
  3357. "description": "Bad request",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/BadRequestError"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "404": {
  3367. "description": "Not found",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "$ref": "#/components/schemas/NotFoundError"
  3372. }
  3373. }
  3374. }
  3375. }
  3376. },
  3377. "requestBody": {
  3378. "content": {
  3379. "application/json": {
  3380. "schema": {
  3381. "$ref": "#/components/schemas/Part"
  3382. }
  3383. }
  3384. }
  3385. },
  3386. "x-codeSamples": [
  3387. {
  3388. "lang": "js",
  3389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  3390. }
  3391. ]
  3392. }
  3393. },
  3394. "/session/{sessionID}/prompt_async": {
  3395. "post": {
  3396. "operationId": "session.prompt_async",
  3397. "parameters": [
  3398. {
  3399. "in": "query",
  3400. "name": "directory",
  3401. "schema": {
  3402. "type": "string"
  3403. }
  3404. },
  3405. {
  3406. "in": "query",
  3407. "name": "workspace",
  3408. "schema": {
  3409. "type": "string"
  3410. }
  3411. },
  3412. {
  3413. "in": "path",
  3414. "name": "sessionID",
  3415. "schema": {
  3416. "type": "string"
  3417. },
  3418. "required": true,
  3419. "description": "Session ID"
  3420. }
  3421. ],
  3422. "summary": "Send async message",
  3423. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  3424. "responses": {
  3425. "204": {
  3426. "description": "Prompt accepted"
  3427. },
  3428. "400": {
  3429. "description": "Bad request",
  3430. "content": {
  3431. "application/json": {
  3432. "schema": {
  3433. "$ref": "#/components/schemas/BadRequestError"
  3434. }
  3435. }
  3436. }
  3437. },
  3438. "404": {
  3439. "description": "Not found",
  3440. "content": {
  3441. "application/json": {
  3442. "schema": {
  3443. "$ref": "#/components/schemas/NotFoundError"
  3444. }
  3445. }
  3446. }
  3447. }
  3448. },
  3449. "requestBody": {
  3450. "content": {
  3451. "application/json": {
  3452. "schema": {
  3453. "type": "object",
  3454. "properties": {
  3455. "messageID": {
  3456. "type": "string",
  3457. "pattern": "^msg.*"
  3458. },
  3459. "model": {
  3460. "type": "object",
  3461. "properties": {
  3462. "providerID": {
  3463. "type": "string"
  3464. },
  3465. "modelID": {
  3466. "type": "string"
  3467. }
  3468. },
  3469. "required": ["providerID", "modelID"]
  3470. },
  3471. "agent": {
  3472. "type": "string"
  3473. },
  3474. "noReply": {
  3475. "type": "boolean"
  3476. },
  3477. "tools": {
  3478. "description": "@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
  3479. "type": "object",
  3480. "propertyNames": {
  3481. "type": "string"
  3482. },
  3483. "additionalProperties": {
  3484. "type": "boolean"
  3485. }
  3486. },
  3487. "format": {
  3488. "$ref": "#/components/schemas/OutputFormat"
  3489. },
  3490. "system": {
  3491. "type": "string"
  3492. },
  3493. "variant": {
  3494. "type": "string"
  3495. },
  3496. "parts": {
  3497. "type": "array",
  3498. "items": {
  3499. "anyOf": [
  3500. {
  3501. "$ref": "#/components/schemas/TextPartInput"
  3502. },
  3503. {
  3504. "$ref": "#/components/schemas/FilePartInput"
  3505. },
  3506. {
  3507. "$ref": "#/components/schemas/AgentPartInput"
  3508. },
  3509. {
  3510. "$ref": "#/components/schemas/SubtaskPartInput"
  3511. }
  3512. ]
  3513. }
  3514. }
  3515. },
  3516. "required": ["parts"]
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "x-codeSamples": [
  3522. {
  3523. "lang": "js",
  3524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  3525. }
  3526. ]
  3527. }
  3528. },
  3529. "/session/{sessionID}/command": {
  3530. "post": {
  3531. "operationId": "session.command",
  3532. "parameters": [
  3533. {
  3534. "in": "query",
  3535. "name": "directory",
  3536. "schema": {
  3537. "type": "string"
  3538. }
  3539. },
  3540. {
  3541. "in": "query",
  3542. "name": "workspace",
  3543. "schema": {
  3544. "type": "string"
  3545. }
  3546. },
  3547. {
  3548. "in": "path",
  3549. "name": "sessionID",
  3550. "schema": {
  3551. "type": "string"
  3552. },
  3553. "required": true,
  3554. "description": "Session ID"
  3555. }
  3556. ],
  3557. "summary": "Send command",
  3558. "description": "Send a new command to a session for execution by the AI assistant.",
  3559. "responses": {
  3560. "200": {
  3561. "description": "Created message",
  3562. "content": {
  3563. "application/json": {
  3564. "schema": {
  3565. "type": "object",
  3566. "properties": {
  3567. "info": {
  3568. "$ref": "#/components/schemas/AssistantMessage"
  3569. },
  3570. "parts": {
  3571. "type": "array",
  3572. "items": {
  3573. "$ref": "#/components/schemas/Part"
  3574. }
  3575. }
  3576. },
  3577. "required": ["info", "parts"]
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "400": {
  3583. "description": "Bad request",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/BadRequestError"
  3588. }
  3589. }
  3590. }
  3591. },
  3592. "404": {
  3593. "description": "Not found",
  3594. "content": {
  3595. "application/json": {
  3596. "schema": {
  3597. "$ref": "#/components/schemas/NotFoundError"
  3598. }
  3599. }
  3600. }
  3601. }
  3602. },
  3603. "requestBody": {
  3604. "content": {
  3605. "application/json": {
  3606. "schema": {
  3607. "type": "object",
  3608. "properties": {
  3609. "messageID": {
  3610. "type": "string",
  3611. "pattern": "^msg.*"
  3612. },
  3613. "agent": {
  3614. "type": "string"
  3615. },
  3616. "model": {
  3617. "type": "string"
  3618. },
  3619. "arguments": {
  3620. "type": "string"
  3621. },
  3622. "command": {
  3623. "type": "string"
  3624. },
  3625. "variant": {
  3626. "type": "string"
  3627. },
  3628. "parts": {
  3629. "type": "array",
  3630. "items": {
  3631. "anyOf": [
  3632. {
  3633. "type": "object",
  3634. "properties": {
  3635. "id": {
  3636. "type": "string"
  3637. },
  3638. "type": {
  3639. "type": "string",
  3640. "const": "file"
  3641. },
  3642. "mime": {
  3643. "type": "string"
  3644. },
  3645. "filename": {
  3646. "type": "string"
  3647. },
  3648. "url": {
  3649. "type": "string"
  3650. },
  3651. "source": {
  3652. "$ref": "#/components/schemas/FilePartSource"
  3653. }
  3654. },
  3655. "required": ["type", "mime", "url"]
  3656. }
  3657. ]
  3658. }
  3659. }
  3660. },
  3661. "required": ["arguments", "command"]
  3662. }
  3663. }
  3664. }
  3665. },
  3666. "x-codeSamples": [
  3667. {
  3668. "lang": "js",
  3669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  3670. }
  3671. ]
  3672. }
  3673. },
  3674. "/session/{sessionID}/shell": {
  3675. "post": {
  3676. "operationId": "session.shell",
  3677. "parameters": [
  3678. {
  3679. "in": "query",
  3680. "name": "directory",
  3681. "schema": {
  3682. "type": "string"
  3683. }
  3684. },
  3685. {
  3686. "in": "query",
  3687. "name": "workspace",
  3688. "schema": {
  3689. "type": "string"
  3690. }
  3691. },
  3692. {
  3693. "in": "path",
  3694. "name": "sessionID",
  3695. "schema": {
  3696. "type": "string"
  3697. },
  3698. "required": true,
  3699. "description": "Session ID"
  3700. }
  3701. ],
  3702. "summary": "Run shell command",
  3703. "description": "Execute a shell command within the session context and return the AI's response.",
  3704. "responses": {
  3705. "200": {
  3706. "description": "Created message",
  3707. "content": {
  3708. "application/json": {
  3709. "schema": {
  3710. "$ref": "#/components/schemas/AssistantMessage"
  3711. }
  3712. }
  3713. }
  3714. },
  3715. "400": {
  3716. "description": "Bad request",
  3717. "content": {
  3718. "application/json": {
  3719. "schema": {
  3720. "$ref": "#/components/schemas/BadRequestError"
  3721. }
  3722. }
  3723. }
  3724. },
  3725. "404": {
  3726. "description": "Not found",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "$ref": "#/components/schemas/NotFoundError"
  3731. }
  3732. }
  3733. }
  3734. }
  3735. },
  3736. "requestBody": {
  3737. "content": {
  3738. "application/json": {
  3739. "schema": {
  3740. "type": "object",
  3741. "properties": {
  3742. "agent": {
  3743. "type": "string"
  3744. },
  3745. "model": {
  3746. "type": "object",
  3747. "properties": {
  3748. "providerID": {
  3749. "type": "string"
  3750. },
  3751. "modelID": {
  3752. "type": "string"
  3753. }
  3754. },
  3755. "required": ["providerID", "modelID"]
  3756. },
  3757. "command": {
  3758. "type": "string"
  3759. }
  3760. },
  3761. "required": ["agent", "command"]
  3762. }
  3763. }
  3764. }
  3765. },
  3766. "x-codeSamples": [
  3767. {
  3768. "lang": "js",
  3769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  3770. }
  3771. ]
  3772. }
  3773. },
  3774. "/session/{sessionID}/revert": {
  3775. "post": {
  3776. "operationId": "session.revert",
  3777. "parameters": [
  3778. {
  3779. "in": "query",
  3780. "name": "directory",
  3781. "schema": {
  3782. "type": "string"
  3783. }
  3784. },
  3785. {
  3786. "in": "query",
  3787. "name": "workspace",
  3788. "schema": {
  3789. "type": "string"
  3790. }
  3791. },
  3792. {
  3793. "in": "path",
  3794. "name": "sessionID",
  3795. "schema": {
  3796. "type": "string"
  3797. },
  3798. "required": true
  3799. }
  3800. ],
  3801. "summary": "Revert message",
  3802. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  3803. "responses": {
  3804. "200": {
  3805. "description": "Updated session",
  3806. "content": {
  3807. "application/json": {
  3808. "schema": {
  3809. "$ref": "#/components/schemas/Session"
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "400": {
  3815. "description": "Bad request",
  3816. "content": {
  3817. "application/json": {
  3818. "schema": {
  3819. "$ref": "#/components/schemas/BadRequestError"
  3820. }
  3821. }
  3822. }
  3823. },
  3824. "404": {
  3825. "description": "Not found",
  3826. "content": {
  3827. "application/json": {
  3828. "schema": {
  3829. "$ref": "#/components/schemas/NotFoundError"
  3830. }
  3831. }
  3832. }
  3833. }
  3834. },
  3835. "requestBody": {
  3836. "content": {
  3837. "application/json": {
  3838. "schema": {
  3839. "type": "object",
  3840. "properties": {
  3841. "messageID": {
  3842. "type": "string",
  3843. "pattern": "^msg.*"
  3844. },
  3845. "partID": {
  3846. "type": "string",
  3847. "pattern": "^prt.*"
  3848. }
  3849. },
  3850. "required": ["messageID"]
  3851. }
  3852. }
  3853. }
  3854. },
  3855. "x-codeSamples": [
  3856. {
  3857. "lang": "js",
  3858. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  3859. }
  3860. ]
  3861. }
  3862. },
  3863. "/session/{sessionID}/unrevert": {
  3864. "post": {
  3865. "operationId": "session.unrevert",
  3866. "parameters": [
  3867. {
  3868. "in": "query",
  3869. "name": "directory",
  3870. "schema": {
  3871. "type": "string"
  3872. }
  3873. },
  3874. {
  3875. "in": "query",
  3876. "name": "workspace",
  3877. "schema": {
  3878. "type": "string"
  3879. }
  3880. },
  3881. {
  3882. "in": "path",
  3883. "name": "sessionID",
  3884. "schema": {
  3885. "type": "string"
  3886. },
  3887. "required": true
  3888. }
  3889. ],
  3890. "summary": "Restore reverted messages",
  3891. "description": "Restore all previously reverted messages in a session.",
  3892. "responses": {
  3893. "200": {
  3894. "description": "Updated session",
  3895. "content": {
  3896. "application/json": {
  3897. "schema": {
  3898. "$ref": "#/components/schemas/Session"
  3899. }
  3900. }
  3901. }
  3902. },
  3903. "400": {
  3904. "description": "Bad request",
  3905. "content": {
  3906. "application/json": {
  3907. "schema": {
  3908. "$ref": "#/components/schemas/BadRequestError"
  3909. }
  3910. }
  3911. }
  3912. },
  3913. "404": {
  3914. "description": "Not found",
  3915. "content": {
  3916. "application/json": {
  3917. "schema": {
  3918. "$ref": "#/components/schemas/NotFoundError"
  3919. }
  3920. }
  3921. }
  3922. }
  3923. },
  3924. "x-codeSamples": [
  3925. {
  3926. "lang": "js",
  3927. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  3928. }
  3929. ]
  3930. }
  3931. },
  3932. "/session/{sessionID}/permissions/{permissionID}": {
  3933. "post": {
  3934. "operationId": "permission.respond",
  3935. "parameters": [
  3936. {
  3937. "in": "query",
  3938. "name": "directory",
  3939. "schema": {
  3940. "type": "string"
  3941. }
  3942. },
  3943. {
  3944. "in": "query",
  3945. "name": "workspace",
  3946. "schema": {
  3947. "type": "string"
  3948. }
  3949. },
  3950. {
  3951. "in": "path",
  3952. "name": "sessionID",
  3953. "schema": {
  3954. "type": "string"
  3955. },
  3956. "required": true
  3957. },
  3958. {
  3959. "in": "path",
  3960. "name": "permissionID",
  3961. "schema": {
  3962. "type": "string"
  3963. },
  3964. "required": true
  3965. }
  3966. ],
  3967. "summary": "Respond to permission",
  3968. "deprecated": true,
  3969. "description": "Approve or deny a permission request from the AI assistant.",
  3970. "responses": {
  3971. "200": {
  3972. "description": "Permission processed successfully",
  3973. "content": {
  3974. "application/json": {
  3975. "schema": {
  3976. "type": "boolean"
  3977. }
  3978. }
  3979. }
  3980. },
  3981. "400": {
  3982. "description": "Bad request",
  3983. "content": {
  3984. "application/json": {
  3985. "schema": {
  3986. "$ref": "#/components/schemas/BadRequestError"
  3987. }
  3988. }
  3989. }
  3990. },
  3991. "404": {
  3992. "description": "Not found",
  3993. "content": {
  3994. "application/json": {
  3995. "schema": {
  3996. "$ref": "#/components/schemas/NotFoundError"
  3997. }
  3998. }
  3999. }
  4000. }
  4001. },
  4002. "requestBody": {
  4003. "content": {
  4004. "application/json": {
  4005. "schema": {
  4006. "type": "object",
  4007. "properties": {
  4008. "response": {
  4009. "type": "string",
  4010. "enum": ["once", "always", "reject"]
  4011. }
  4012. },
  4013. "required": ["response"]
  4014. }
  4015. }
  4016. }
  4017. },
  4018. "x-codeSamples": [
  4019. {
  4020. "lang": "js",
  4021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  4022. }
  4023. ]
  4024. }
  4025. },
  4026. "/permission/{requestID}/reply": {
  4027. "post": {
  4028. "operationId": "permission.reply",
  4029. "parameters": [
  4030. {
  4031. "in": "query",
  4032. "name": "directory",
  4033. "schema": {
  4034. "type": "string"
  4035. }
  4036. },
  4037. {
  4038. "in": "query",
  4039. "name": "workspace",
  4040. "schema": {
  4041. "type": "string"
  4042. }
  4043. },
  4044. {
  4045. "in": "path",
  4046. "name": "requestID",
  4047. "schema": {
  4048. "type": "string"
  4049. },
  4050. "required": true
  4051. }
  4052. ],
  4053. "summary": "Respond to permission request",
  4054. "description": "Approve or deny a permission request from the AI assistant.",
  4055. "responses": {
  4056. "200": {
  4057. "description": "Permission processed successfully",
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "boolean"
  4062. }
  4063. }
  4064. }
  4065. },
  4066. "400": {
  4067. "description": "Bad request",
  4068. "content": {
  4069. "application/json": {
  4070. "schema": {
  4071. "$ref": "#/components/schemas/BadRequestError"
  4072. }
  4073. }
  4074. }
  4075. },
  4076. "404": {
  4077. "description": "Not found",
  4078. "content": {
  4079. "application/json": {
  4080. "schema": {
  4081. "$ref": "#/components/schemas/NotFoundError"
  4082. }
  4083. }
  4084. }
  4085. }
  4086. },
  4087. "requestBody": {
  4088. "content": {
  4089. "application/json": {
  4090. "schema": {
  4091. "type": "object",
  4092. "properties": {
  4093. "reply": {
  4094. "type": "string",
  4095. "enum": ["once", "always", "reject"]
  4096. },
  4097. "message": {
  4098. "type": "string"
  4099. }
  4100. },
  4101. "required": ["reply"]
  4102. }
  4103. }
  4104. }
  4105. },
  4106. "x-codeSamples": [
  4107. {
  4108. "lang": "js",
  4109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4110. }
  4111. ]
  4112. }
  4113. },
  4114. "/permission": {
  4115. "get": {
  4116. "operationId": "permission.list",
  4117. "parameters": [
  4118. {
  4119. "in": "query",
  4120. "name": "directory",
  4121. "schema": {
  4122. "type": "string"
  4123. }
  4124. },
  4125. {
  4126. "in": "query",
  4127. "name": "workspace",
  4128. "schema": {
  4129. "type": "string"
  4130. }
  4131. }
  4132. ],
  4133. "summary": "List pending permissions",
  4134. "description": "Get all pending permission requests across all sessions.",
  4135. "responses": {
  4136. "200": {
  4137. "description": "List of pending permissions",
  4138. "content": {
  4139. "application/json": {
  4140. "schema": {
  4141. "type": "array",
  4142. "items": {
  4143. "$ref": "#/components/schemas/PermissionRequest"
  4144. }
  4145. }
  4146. }
  4147. }
  4148. }
  4149. },
  4150. "x-codeSamples": [
  4151. {
  4152. "lang": "js",
  4153. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4154. }
  4155. ]
  4156. }
  4157. },
  4158. "/question": {
  4159. "get": {
  4160. "operationId": "question.list",
  4161. "parameters": [
  4162. {
  4163. "in": "query",
  4164. "name": "directory",
  4165. "schema": {
  4166. "type": "string"
  4167. }
  4168. },
  4169. {
  4170. "in": "query",
  4171. "name": "workspace",
  4172. "schema": {
  4173. "type": "string"
  4174. }
  4175. }
  4176. ],
  4177. "summary": "List pending questions",
  4178. "description": "Get all pending question requests across all sessions.",
  4179. "responses": {
  4180. "200": {
  4181. "description": "List of pending questions",
  4182. "content": {
  4183. "application/json": {
  4184. "schema": {
  4185. "type": "array",
  4186. "items": {
  4187. "$ref": "#/components/schemas/QuestionRequest"
  4188. }
  4189. }
  4190. }
  4191. }
  4192. }
  4193. },
  4194. "x-codeSamples": [
  4195. {
  4196. "lang": "js",
  4197. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4198. }
  4199. ]
  4200. }
  4201. },
  4202. "/question/{requestID}/reply": {
  4203. "post": {
  4204. "operationId": "question.reply",
  4205. "parameters": [
  4206. {
  4207. "in": "query",
  4208. "name": "directory",
  4209. "schema": {
  4210. "type": "string"
  4211. }
  4212. },
  4213. {
  4214. "in": "query",
  4215. "name": "workspace",
  4216. "schema": {
  4217. "type": "string"
  4218. }
  4219. },
  4220. {
  4221. "in": "path",
  4222. "name": "requestID",
  4223. "schema": {
  4224. "type": "string"
  4225. },
  4226. "required": true
  4227. }
  4228. ],
  4229. "summary": "Reply to question request",
  4230. "description": "Provide answers to a question request from the AI assistant.",
  4231. "responses": {
  4232. "200": {
  4233. "description": "Question answered successfully",
  4234. "content": {
  4235. "application/json": {
  4236. "schema": {
  4237. "type": "boolean"
  4238. }
  4239. }
  4240. }
  4241. },
  4242. "400": {
  4243. "description": "Bad request",
  4244. "content": {
  4245. "application/json": {
  4246. "schema": {
  4247. "$ref": "#/components/schemas/BadRequestError"
  4248. }
  4249. }
  4250. }
  4251. },
  4252. "404": {
  4253. "description": "Not found",
  4254. "content": {
  4255. "application/json": {
  4256. "schema": {
  4257. "$ref": "#/components/schemas/NotFoundError"
  4258. }
  4259. }
  4260. }
  4261. }
  4262. },
  4263. "requestBody": {
  4264. "content": {
  4265. "application/json": {
  4266. "schema": {
  4267. "type": "object",
  4268. "properties": {
  4269. "answers": {
  4270. "description": "User answers in order of questions (each answer is an array of selected labels)",
  4271. "type": "array",
  4272. "items": {
  4273. "$ref": "#/components/schemas/QuestionAnswer"
  4274. }
  4275. }
  4276. },
  4277. "required": ["answers"]
  4278. }
  4279. }
  4280. }
  4281. },
  4282. "x-codeSamples": [
  4283. {
  4284. "lang": "js",
  4285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4286. }
  4287. ]
  4288. }
  4289. },
  4290. "/question/{requestID}/reject": {
  4291. "post": {
  4292. "operationId": "question.reject",
  4293. "parameters": [
  4294. {
  4295. "in": "query",
  4296. "name": "directory",
  4297. "schema": {
  4298. "type": "string"
  4299. }
  4300. },
  4301. {
  4302. "in": "query",
  4303. "name": "workspace",
  4304. "schema": {
  4305. "type": "string"
  4306. }
  4307. },
  4308. {
  4309. "in": "path",
  4310. "name": "requestID",
  4311. "schema": {
  4312. "type": "string"
  4313. },
  4314. "required": true
  4315. }
  4316. ],
  4317. "summary": "Reject question request",
  4318. "description": "Reject a question request from the AI assistant.",
  4319. "responses": {
  4320. "200": {
  4321. "description": "Question rejected successfully",
  4322. "content": {
  4323. "application/json": {
  4324. "schema": {
  4325. "type": "boolean"
  4326. }
  4327. }
  4328. }
  4329. },
  4330. "400": {
  4331. "description": "Bad request",
  4332. "content": {
  4333. "application/json": {
  4334. "schema": {
  4335. "$ref": "#/components/schemas/BadRequestError"
  4336. }
  4337. }
  4338. }
  4339. },
  4340. "404": {
  4341. "description": "Not found",
  4342. "content": {
  4343. "application/json": {
  4344. "schema": {
  4345. "$ref": "#/components/schemas/NotFoundError"
  4346. }
  4347. }
  4348. }
  4349. }
  4350. },
  4351. "x-codeSamples": [
  4352. {
  4353. "lang": "js",
  4354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4355. }
  4356. ]
  4357. }
  4358. },
  4359. "/provider": {
  4360. "get": {
  4361. "operationId": "provider.list",
  4362. "parameters": [
  4363. {
  4364. "in": "query",
  4365. "name": "directory",
  4366. "schema": {
  4367. "type": "string"
  4368. }
  4369. },
  4370. {
  4371. "in": "query",
  4372. "name": "workspace",
  4373. "schema": {
  4374. "type": "string"
  4375. }
  4376. }
  4377. ],
  4378. "summary": "List providers",
  4379. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4380. "responses": {
  4381. "200": {
  4382. "description": "List of providers",
  4383. "content": {
  4384. "application/json": {
  4385. "schema": {
  4386. "type": "object",
  4387. "properties": {
  4388. "all": {
  4389. "type": "array",
  4390. "items": {
  4391. "type": "object",
  4392. "properties": {
  4393. "api": {
  4394. "type": "string"
  4395. },
  4396. "name": {
  4397. "type": "string"
  4398. },
  4399. "env": {
  4400. "type": "array",
  4401. "items": {
  4402. "type": "string"
  4403. }
  4404. },
  4405. "id": {
  4406. "type": "string"
  4407. },
  4408. "npm": {
  4409. "type": "string"
  4410. },
  4411. "models": {
  4412. "type": "object",
  4413. "propertyNames": {
  4414. "type": "string"
  4415. },
  4416. "additionalProperties": {
  4417. "type": "object",
  4418. "properties": {
  4419. "id": {
  4420. "type": "string"
  4421. },
  4422. "name": {
  4423. "type": "string"
  4424. },
  4425. "family": {
  4426. "type": "string"
  4427. },
  4428. "release_date": {
  4429. "type": "string"
  4430. },
  4431. "attachment": {
  4432. "type": "boolean"
  4433. },
  4434. "reasoning": {
  4435. "type": "boolean"
  4436. },
  4437. "temperature": {
  4438. "type": "boolean"
  4439. },
  4440. "tool_call": {
  4441. "type": "boolean"
  4442. },
  4443. "interleaved": {
  4444. "anyOf": [
  4445. {
  4446. "type": "boolean",
  4447. "const": true
  4448. },
  4449. {
  4450. "type": "object",
  4451. "properties": {
  4452. "field": {
  4453. "type": "string",
  4454. "enum": ["reasoning_content", "reasoning_details"]
  4455. }
  4456. },
  4457. "required": ["field"],
  4458. "additionalProperties": false
  4459. }
  4460. ]
  4461. },
  4462. "cost": {
  4463. "type": "object",
  4464. "properties": {
  4465. "input": {
  4466. "type": "number"
  4467. },
  4468. "output": {
  4469. "type": "number"
  4470. },
  4471. "cache_read": {
  4472. "type": "number"
  4473. },
  4474. "cache_write": {
  4475. "type": "number"
  4476. },
  4477. "context_over_200k": {
  4478. "type": "object",
  4479. "properties": {
  4480. "input": {
  4481. "type": "number"
  4482. },
  4483. "output": {
  4484. "type": "number"
  4485. },
  4486. "cache_read": {
  4487. "type": "number"
  4488. },
  4489. "cache_write": {
  4490. "type": "number"
  4491. }
  4492. },
  4493. "required": ["input", "output"]
  4494. }
  4495. },
  4496. "required": ["input", "output"]
  4497. },
  4498. "limit": {
  4499. "type": "object",
  4500. "properties": {
  4501. "context": {
  4502. "type": "number"
  4503. },
  4504. "input": {
  4505. "type": "number"
  4506. },
  4507. "output": {
  4508. "type": "number"
  4509. }
  4510. },
  4511. "required": ["context", "output"]
  4512. },
  4513. "modalities": {
  4514. "type": "object",
  4515. "properties": {
  4516. "input": {
  4517. "type": "array",
  4518. "items": {
  4519. "type": "string",
  4520. "enum": ["text", "audio", "image", "video", "pdf"]
  4521. }
  4522. },
  4523. "output": {
  4524. "type": "array",
  4525. "items": {
  4526. "type": "string",
  4527. "enum": ["text", "audio", "image", "video", "pdf"]
  4528. }
  4529. }
  4530. },
  4531. "required": ["input", "output"]
  4532. },
  4533. "experimental": {
  4534. "type": "boolean"
  4535. },
  4536. "status": {
  4537. "type": "string",
  4538. "enum": ["alpha", "beta", "deprecated"]
  4539. },
  4540. "options": {
  4541. "type": "object",
  4542. "propertyNames": {
  4543. "type": "string"
  4544. },
  4545. "additionalProperties": {}
  4546. },
  4547. "headers": {
  4548. "type": "object",
  4549. "propertyNames": {
  4550. "type": "string"
  4551. },
  4552. "additionalProperties": {
  4553. "type": "string"
  4554. }
  4555. },
  4556. "provider": {
  4557. "type": "object",
  4558. "properties": {
  4559. "npm": {
  4560. "type": "string"
  4561. },
  4562. "api": {
  4563. "type": "string"
  4564. }
  4565. }
  4566. },
  4567. "variants": {
  4568. "type": "object",
  4569. "propertyNames": {
  4570. "type": "string"
  4571. },
  4572. "additionalProperties": {
  4573. "type": "object",
  4574. "propertyNames": {
  4575. "type": "string"
  4576. },
  4577. "additionalProperties": {}
  4578. }
  4579. }
  4580. },
  4581. "required": [
  4582. "id",
  4583. "name",
  4584. "release_date",
  4585. "attachment",
  4586. "reasoning",
  4587. "temperature",
  4588. "tool_call",
  4589. "limit",
  4590. "options"
  4591. ]
  4592. }
  4593. }
  4594. },
  4595. "required": ["name", "env", "id", "models"]
  4596. }
  4597. },
  4598. "default": {
  4599. "type": "object",
  4600. "propertyNames": {
  4601. "type": "string"
  4602. },
  4603. "additionalProperties": {
  4604. "type": "string"
  4605. }
  4606. },
  4607. "connected": {
  4608. "type": "array",
  4609. "items": {
  4610. "type": "string"
  4611. }
  4612. }
  4613. },
  4614. "required": ["all", "default", "connected"]
  4615. }
  4616. }
  4617. }
  4618. }
  4619. },
  4620. "x-codeSamples": [
  4621. {
  4622. "lang": "js",
  4623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4624. }
  4625. ]
  4626. }
  4627. },
  4628. "/provider/auth": {
  4629. "get": {
  4630. "operationId": "provider.auth",
  4631. "parameters": [
  4632. {
  4633. "in": "query",
  4634. "name": "directory",
  4635. "schema": {
  4636. "type": "string"
  4637. }
  4638. },
  4639. {
  4640. "in": "query",
  4641. "name": "workspace",
  4642. "schema": {
  4643. "type": "string"
  4644. }
  4645. }
  4646. ],
  4647. "summary": "Get provider auth methods",
  4648. "description": "Retrieve available authentication methods for all AI providers.",
  4649. "responses": {
  4650. "200": {
  4651. "description": "Provider auth methods",
  4652. "content": {
  4653. "application/json": {
  4654. "schema": {
  4655. "type": "object",
  4656. "propertyNames": {
  4657. "type": "string"
  4658. },
  4659. "additionalProperties": {
  4660. "type": "array",
  4661. "items": {
  4662. "$ref": "#/components/schemas/ProviderAuthMethod"
  4663. }
  4664. }
  4665. }
  4666. }
  4667. }
  4668. }
  4669. },
  4670. "x-codeSamples": [
  4671. {
  4672. "lang": "js",
  4673. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4674. }
  4675. ]
  4676. }
  4677. },
  4678. "/provider/{providerID}/oauth/authorize": {
  4679. "post": {
  4680. "operationId": "provider.oauth.authorize",
  4681. "parameters": [
  4682. {
  4683. "in": "query",
  4684. "name": "directory",
  4685. "schema": {
  4686. "type": "string"
  4687. }
  4688. },
  4689. {
  4690. "in": "query",
  4691. "name": "workspace",
  4692. "schema": {
  4693. "type": "string"
  4694. }
  4695. },
  4696. {
  4697. "in": "path",
  4698. "name": "providerID",
  4699. "schema": {
  4700. "type": "string"
  4701. },
  4702. "required": true,
  4703. "description": "Provider ID"
  4704. }
  4705. ],
  4706. "summary": "OAuth authorize",
  4707. "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
  4708. "responses": {
  4709. "200": {
  4710. "description": "Authorization URL and method",
  4711. "content": {
  4712. "application/json": {
  4713. "schema": {
  4714. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4715. }
  4716. }
  4717. }
  4718. },
  4719. "400": {
  4720. "description": "Bad request",
  4721. "content": {
  4722. "application/json": {
  4723. "schema": {
  4724. "$ref": "#/components/schemas/BadRequestError"
  4725. }
  4726. }
  4727. }
  4728. }
  4729. },
  4730. "requestBody": {
  4731. "content": {
  4732. "application/json": {
  4733. "schema": {
  4734. "type": "object",
  4735. "properties": {
  4736. "method": {
  4737. "description": "Auth method index",
  4738. "type": "number"
  4739. }
  4740. },
  4741. "required": ["method"]
  4742. }
  4743. }
  4744. }
  4745. },
  4746. "x-codeSamples": [
  4747. {
  4748. "lang": "js",
  4749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4750. }
  4751. ]
  4752. }
  4753. },
  4754. "/provider/{providerID}/oauth/callback": {
  4755. "post": {
  4756. "operationId": "provider.oauth.callback",
  4757. "parameters": [
  4758. {
  4759. "in": "query",
  4760. "name": "directory",
  4761. "schema": {
  4762. "type": "string"
  4763. }
  4764. },
  4765. {
  4766. "in": "query",
  4767. "name": "workspace",
  4768. "schema": {
  4769. "type": "string"
  4770. }
  4771. },
  4772. {
  4773. "in": "path",
  4774. "name": "providerID",
  4775. "schema": {
  4776. "type": "string"
  4777. },
  4778. "required": true,
  4779. "description": "Provider ID"
  4780. }
  4781. ],
  4782. "summary": "OAuth callback",
  4783. "description": "Handle the OAuth callback from a provider after user authorization.",
  4784. "responses": {
  4785. "200": {
  4786. "description": "OAuth callback processed successfully",
  4787. "content": {
  4788. "application/json": {
  4789. "schema": {
  4790. "type": "boolean"
  4791. }
  4792. }
  4793. }
  4794. },
  4795. "400": {
  4796. "description": "Bad request",
  4797. "content": {
  4798. "application/json": {
  4799. "schema": {
  4800. "$ref": "#/components/schemas/BadRequestError"
  4801. }
  4802. }
  4803. }
  4804. }
  4805. },
  4806. "requestBody": {
  4807. "content": {
  4808. "application/json": {
  4809. "schema": {
  4810. "type": "object",
  4811. "properties": {
  4812. "method": {
  4813. "description": "Auth method index",
  4814. "type": "number"
  4815. },
  4816. "code": {
  4817. "description": "OAuth authorization code",
  4818. "type": "string"
  4819. }
  4820. },
  4821. "required": ["method"]
  4822. }
  4823. }
  4824. }
  4825. },
  4826. "x-codeSamples": [
  4827. {
  4828. "lang": "js",
  4829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4830. }
  4831. ]
  4832. }
  4833. },
  4834. "/find": {
  4835. "get": {
  4836. "operationId": "find.text",
  4837. "parameters": [
  4838. {
  4839. "in": "query",
  4840. "name": "directory",
  4841. "schema": {
  4842. "type": "string"
  4843. }
  4844. },
  4845. {
  4846. "in": "query",
  4847. "name": "workspace",
  4848. "schema": {
  4849. "type": "string"
  4850. }
  4851. },
  4852. {
  4853. "in": "query",
  4854. "name": "pattern",
  4855. "schema": {
  4856. "type": "string"
  4857. },
  4858. "required": true
  4859. }
  4860. ],
  4861. "summary": "Find text",
  4862. "description": "Search for text patterns across files in the project using ripgrep.",
  4863. "responses": {
  4864. "200": {
  4865. "description": "Matches",
  4866. "content": {
  4867. "application/json": {
  4868. "schema": {
  4869. "type": "array",
  4870. "items": {
  4871. "type": "object",
  4872. "properties": {
  4873. "path": {
  4874. "type": "object",
  4875. "properties": {
  4876. "text": {
  4877. "type": "string"
  4878. }
  4879. },
  4880. "required": ["text"]
  4881. },
  4882. "lines": {
  4883. "type": "object",
  4884. "properties": {
  4885. "text": {
  4886. "type": "string"
  4887. }
  4888. },
  4889. "required": ["text"]
  4890. },
  4891. "line_number": {
  4892. "type": "number"
  4893. },
  4894. "absolute_offset": {
  4895. "type": "number"
  4896. },
  4897. "submatches": {
  4898. "type": "array",
  4899. "items": {
  4900. "type": "object",
  4901. "properties": {
  4902. "match": {
  4903. "type": "object",
  4904. "properties": {
  4905. "text": {
  4906. "type": "string"
  4907. }
  4908. },
  4909. "required": ["text"]
  4910. },
  4911. "start": {
  4912. "type": "number"
  4913. },
  4914. "end": {
  4915. "type": "number"
  4916. }
  4917. },
  4918. "required": ["match", "start", "end"]
  4919. }
  4920. }
  4921. },
  4922. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
  4923. }
  4924. }
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "x-codeSamples": [
  4930. {
  4931. "lang": "js",
  4932. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  4933. }
  4934. ]
  4935. }
  4936. },
  4937. "/find/file": {
  4938. "get": {
  4939. "operationId": "find.files",
  4940. "parameters": [
  4941. {
  4942. "in": "query",
  4943. "name": "directory",
  4944. "schema": {
  4945. "type": "string"
  4946. }
  4947. },
  4948. {
  4949. "in": "query",
  4950. "name": "workspace",
  4951. "schema": {
  4952. "type": "string"
  4953. }
  4954. },
  4955. {
  4956. "in": "query",
  4957. "name": "query",
  4958. "schema": {
  4959. "type": "string"
  4960. },
  4961. "required": true
  4962. },
  4963. {
  4964. "in": "query",
  4965. "name": "dirs",
  4966. "schema": {
  4967. "type": "string",
  4968. "enum": ["true", "false"]
  4969. }
  4970. },
  4971. {
  4972. "in": "query",
  4973. "name": "type",
  4974. "schema": {
  4975. "type": "string",
  4976. "enum": ["file", "directory"]
  4977. }
  4978. },
  4979. {
  4980. "in": "query",
  4981. "name": "limit",
  4982. "schema": {
  4983. "type": "integer",
  4984. "minimum": 1,
  4985. "maximum": 200
  4986. }
  4987. }
  4988. ],
  4989. "summary": "Find files",
  4990. "description": "Search for files or directories by name or pattern in the project directory.",
  4991. "responses": {
  4992. "200": {
  4993. "description": "File paths",
  4994. "content": {
  4995. "application/json": {
  4996. "schema": {
  4997. "type": "array",
  4998. "items": {
  4999. "type": "string"
  5000. }
  5001. }
  5002. }
  5003. }
  5004. }
  5005. },
  5006. "x-codeSamples": [
  5007. {
  5008. "lang": "js",
  5009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  5010. }
  5011. ]
  5012. }
  5013. },
  5014. "/find/symbol": {
  5015. "get": {
  5016. "operationId": "find.symbols",
  5017. "parameters": [
  5018. {
  5019. "in": "query",
  5020. "name": "directory",
  5021. "schema": {
  5022. "type": "string"
  5023. }
  5024. },
  5025. {
  5026. "in": "query",
  5027. "name": "workspace",
  5028. "schema": {
  5029. "type": "string"
  5030. }
  5031. },
  5032. {
  5033. "in": "query",
  5034. "name": "query",
  5035. "schema": {
  5036. "type": "string"
  5037. },
  5038. "required": true
  5039. }
  5040. ],
  5041. "summary": "Find symbols",
  5042. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  5043. "responses": {
  5044. "200": {
  5045. "description": "Symbols",
  5046. "content": {
  5047. "application/json": {
  5048. "schema": {
  5049. "type": "array",
  5050. "items": {
  5051. "$ref": "#/components/schemas/Symbol"
  5052. }
  5053. }
  5054. }
  5055. }
  5056. }
  5057. },
  5058. "x-codeSamples": [
  5059. {
  5060. "lang": "js",
  5061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  5062. }
  5063. ]
  5064. }
  5065. },
  5066. "/file": {
  5067. "get": {
  5068. "operationId": "file.list",
  5069. "parameters": [
  5070. {
  5071. "in": "query",
  5072. "name": "directory",
  5073. "schema": {
  5074. "type": "string"
  5075. }
  5076. },
  5077. {
  5078. "in": "query",
  5079. "name": "workspace",
  5080. "schema": {
  5081. "type": "string"
  5082. }
  5083. },
  5084. {
  5085. "in": "query",
  5086. "name": "path",
  5087. "schema": {
  5088. "type": "string"
  5089. },
  5090. "required": true
  5091. }
  5092. ],
  5093. "summary": "List files",
  5094. "description": "List files and directories in a specified path.",
  5095. "responses": {
  5096. "200": {
  5097. "description": "Files and directories",
  5098. "content": {
  5099. "application/json": {
  5100. "schema": {
  5101. "type": "array",
  5102. "items": {
  5103. "$ref": "#/components/schemas/FileNode"
  5104. }
  5105. }
  5106. }
  5107. }
  5108. }
  5109. },
  5110. "x-codeSamples": [
  5111. {
  5112. "lang": "js",
  5113. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  5114. }
  5115. ]
  5116. }
  5117. },
  5118. "/file/content": {
  5119. "get": {
  5120. "operationId": "file.read",
  5121. "parameters": [
  5122. {
  5123. "in": "query",
  5124. "name": "directory",
  5125. "schema": {
  5126. "type": "string"
  5127. }
  5128. },
  5129. {
  5130. "in": "query",
  5131. "name": "workspace",
  5132. "schema": {
  5133. "type": "string"
  5134. }
  5135. },
  5136. {
  5137. "in": "query",
  5138. "name": "path",
  5139. "schema": {
  5140. "type": "string"
  5141. },
  5142. "required": true
  5143. }
  5144. ],
  5145. "summary": "Read file",
  5146. "description": "Read the content of a specified file.",
  5147. "responses": {
  5148. "200": {
  5149. "description": "File content",
  5150. "content": {
  5151. "application/json": {
  5152. "schema": {
  5153. "$ref": "#/components/schemas/FileContent"
  5154. }
  5155. }
  5156. }
  5157. }
  5158. },
  5159. "x-codeSamples": [
  5160. {
  5161. "lang": "js",
  5162. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  5163. }
  5164. ]
  5165. }
  5166. },
  5167. "/file/status": {
  5168. "get": {
  5169. "operationId": "file.status",
  5170. "parameters": [
  5171. {
  5172. "in": "query",
  5173. "name": "directory",
  5174. "schema": {
  5175. "type": "string"
  5176. }
  5177. },
  5178. {
  5179. "in": "query",
  5180. "name": "workspace",
  5181. "schema": {
  5182. "type": "string"
  5183. }
  5184. }
  5185. ],
  5186. "summary": "Get file status",
  5187. "description": "Get the git status of all files in the project.",
  5188. "responses": {
  5189. "200": {
  5190. "description": "File status",
  5191. "content": {
  5192. "application/json": {
  5193. "schema": {
  5194. "type": "array",
  5195. "items": {
  5196. "$ref": "#/components/schemas/File"
  5197. }
  5198. }
  5199. }
  5200. }
  5201. }
  5202. },
  5203. "x-codeSamples": [
  5204. {
  5205. "lang": "js",
  5206. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  5207. }
  5208. ]
  5209. }
  5210. },
  5211. "/mcp": {
  5212. "get": {
  5213. "operationId": "mcp.status",
  5214. "parameters": [
  5215. {
  5216. "in": "query",
  5217. "name": "directory",
  5218. "schema": {
  5219. "type": "string"
  5220. }
  5221. },
  5222. {
  5223. "in": "query",
  5224. "name": "workspace",
  5225. "schema": {
  5226. "type": "string"
  5227. }
  5228. }
  5229. ],
  5230. "summary": "Get MCP status",
  5231. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  5232. "responses": {
  5233. "200": {
  5234. "description": "MCP server status",
  5235. "content": {
  5236. "application/json": {
  5237. "schema": {
  5238. "type": "object",
  5239. "propertyNames": {
  5240. "type": "string"
  5241. },
  5242. "additionalProperties": {
  5243. "$ref": "#/components/schemas/MCPStatus"
  5244. }
  5245. }
  5246. }
  5247. }
  5248. }
  5249. },
  5250. "x-codeSamples": [
  5251. {
  5252. "lang": "js",
  5253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  5254. }
  5255. ]
  5256. },
  5257. "post": {
  5258. "operationId": "mcp.add",
  5259. "parameters": [
  5260. {
  5261. "in": "query",
  5262. "name": "directory",
  5263. "schema": {
  5264. "type": "string"
  5265. }
  5266. },
  5267. {
  5268. "in": "query",
  5269. "name": "workspace",
  5270. "schema": {
  5271. "type": "string"
  5272. }
  5273. }
  5274. ],
  5275. "summary": "Add MCP server",
  5276. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  5277. "responses": {
  5278. "200": {
  5279. "description": "MCP server added successfully",
  5280. "content": {
  5281. "application/json": {
  5282. "schema": {
  5283. "type": "object",
  5284. "propertyNames": {
  5285. "type": "string"
  5286. },
  5287. "additionalProperties": {
  5288. "$ref": "#/components/schemas/MCPStatus"
  5289. }
  5290. }
  5291. }
  5292. }
  5293. },
  5294. "400": {
  5295. "description": "Bad request",
  5296. "content": {
  5297. "application/json": {
  5298. "schema": {
  5299. "$ref": "#/components/schemas/BadRequestError"
  5300. }
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "requestBody": {
  5306. "content": {
  5307. "application/json": {
  5308. "schema": {
  5309. "type": "object",
  5310. "properties": {
  5311. "name": {
  5312. "type": "string"
  5313. },
  5314. "config": {
  5315. "anyOf": [
  5316. {
  5317. "$ref": "#/components/schemas/McpLocalConfig"
  5318. },
  5319. {
  5320. "$ref": "#/components/schemas/McpRemoteConfig"
  5321. }
  5322. ]
  5323. }
  5324. },
  5325. "required": ["name", "config"]
  5326. }
  5327. }
  5328. }
  5329. },
  5330. "x-codeSamples": [
  5331. {
  5332. "lang": "js",
  5333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  5334. }
  5335. ]
  5336. }
  5337. },
  5338. "/mcp/{name}/auth": {
  5339. "post": {
  5340. "operationId": "mcp.auth.start",
  5341. "parameters": [
  5342. {
  5343. "in": "query",
  5344. "name": "directory",
  5345. "schema": {
  5346. "type": "string"
  5347. }
  5348. },
  5349. {
  5350. "in": "query",
  5351. "name": "workspace",
  5352. "schema": {
  5353. "type": "string"
  5354. }
  5355. },
  5356. {
  5357. "schema": {
  5358. "type": "string"
  5359. },
  5360. "in": "path",
  5361. "name": "name",
  5362. "required": true
  5363. }
  5364. ],
  5365. "summary": "Start MCP OAuth",
  5366. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  5367. "responses": {
  5368. "200": {
  5369. "description": "OAuth flow started",
  5370. "content": {
  5371. "application/json": {
  5372. "schema": {
  5373. "type": "object",
  5374. "properties": {
  5375. "authorizationUrl": {
  5376. "description": "URL to open in browser for authorization",
  5377. "type": "string"
  5378. }
  5379. },
  5380. "required": ["authorizationUrl"]
  5381. }
  5382. }
  5383. }
  5384. },
  5385. "400": {
  5386. "description": "Bad request",
  5387. "content": {
  5388. "application/json": {
  5389. "schema": {
  5390. "$ref": "#/components/schemas/BadRequestError"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "404": {
  5396. "description": "Not found",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "$ref": "#/components/schemas/NotFoundError"
  5401. }
  5402. }
  5403. }
  5404. }
  5405. },
  5406. "x-codeSamples": [
  5407. {
  5408. "lang": "js",
  5409. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  5410. }
  5411. ]
  5412. },
  5413. "delete": {
  5414. "operationId": "mcp.auth.remove",
  5415. "parameters": [
  5416. {
  5417. "in": "query",
  5418. "name": "directory",
  5419. "schema": {
  5420. "type": "string"
  5421. }
  5422. },
  5423. {
  5424. "in": "query",
  5425. "name": "workspace",
  5426. "schema": {
  5427. "type": "string"
  5428. }
  5429. },
  5430. {
  5431. "schema": {
  5432. "type": "string"
  5433. },
  5434. "in": "path",
  5435. "name": "name",
  5436. "required": true
  5437. }
  5438. ],
  5439. "summary": "Remove MCP OAuth",
  5440. "description": "Remove OAuth credentials for an MCP server",
  5441. "responses": {
  5442. "200": {
  5443. "description": "OAuth credentials removed",
  5444. "content": {
  5445. "application/json": {
  5446. "schema": {
  5447. "type": "object",
  5448. "properties": {
  5449. "success": {
  5450. "type": "boolean",
  5451. "const": true
  5452. }
  5453. },
  5454. "required": ["success"]
  5455. }
  5456. }
  5457. }
  5458. },
  5459. "404": {
  5460. "description": "Not found",
  5461. "content": {
  5462. "application/json": {
  5463. "schema": {
  5464. "$ref": "#/components/schemas/NotFoundError"
  5465. }
  5466. }
  5467. }
  5468. }
  5469. },
  5470. "x-codeSamples": [
  5471. {
  5472. "lang": "js",
  5473. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  5474. }
  5475. ]
  5476. }
  5477. },
  5478. "/mcp/{name}/auth/callback": {
  5479. "post": {
  5480. "operationId": "mcp.auth.callback",
  5481. "parameters": [
  5482. {
  5483. "in": "query",
  5484. "name": "directory",
  5485. "schema": {
  5486. "type": "string"
  5487. }
  5488. },
  5489. {
  5490. "in": "query",
  5491. "name": "workspace",
  5492. "schema": {
  5493. "type": "string"
  5494. }
  5495. },
  5496. {
  5497. "schema": {
  5498. "type": "string"
  5499. },
  5500. "in": "path",
  5501. "name": "name",
  5502. "required": true
  5503. }
  5504. ],
  5505. "summary": "Complete MCP OAuth",
  5506. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  5507. "responses": {
  5508. "200": {
  5509. "description": "OAuth authentication completed",
  5510. "content": {
  5511. "application/json": {
  5512. "schema": {
  5513. "$ref": "#/components/schemas/MCPStatus"
  5514. }
  5515. }
  5516. }
  5517. },
  5518. "400": {
  5519. "description": "Bad request",
  5520. "content": {
  5521. "application/json": {
  5522. "schema": {
  5523. "$ref": "#/components/schemas/BadRequestError"
  5524. }
  5525. }
  5526. }
  5527. },
  5528. "404": {
  5529. "description": "Not found",
  5530. "content": {
  5531. "application/json": {
  5532. "schema": {
  5533. "$ref": "#/components/schemas/NotFoundError"
  5534. }
  5535. }
  5536. }
  5537. }
  5538. },
  5539. "requestBody": {
  5540. "content": {
  5541. "application/json": {
  5542. "schema": {
  5543. "type": "object",
  5544. "properties": {
  5545. "code": {
  5546. "description": "Authorization code from OAuth callback",
  5547. "type": "string"
  5548. }
  5549. },
  5550. "required": ["code"]
  5551. }
  5552. }
  5553. }
  5554. },
  5555. "x-codeSamples": [
  5556. {
  5557. "lang": "js",
  5558. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  5559. }
  5560. ]
  5561. }
  5562. },
  5563. "/mcp/{name}/auth/authenticate": {
  5564. "post": {
  5565. "operationId": "mcp.auth.authenticate",
  5566. "parameters": [
  5567. {
  5568. "in": "query",
  5569. "name": "directory",
  5570. "schema": {
  5571. "type": "string"
  5572. }
  5573. },
  5574. {
  5575. "in": "query",
  5576. "name": "workspace",
  5577. "schema": {
  5578. "type": "string"
  5579. }
  5580. },
  5581. {
  5582. "schema": {
  5583. "type": "string"
  5584. },
  5585. "in": "path",
  5586. "name": "name",
  5587. "required": true
  5588. }
  5589. ],
  5590. "summary": "Authenticate MCP OAuth",
  5591. "description": "Start OAuth flow and wait for callback (opens browser)",
  5592. "responses": {
  5593. "200": {
  5594. "description": "OAuth authentication completed",
  5595. "content": {
  5596. "application/json": {
  5597. "schema": {
  5598. "$ref": "#/components/schemas/MCPStatus"
  5599. }
  5600. }
  5601. }
  5602. },
  5603. "400": {
  5604. "description": "Bad request",
  5605. "content": {
  5606. "application/json": {
  5607. "schema": {
  5608. "$ref": "#/components/schemas/BadRequestError"
  5609. }
  5610. }
  5611. }
  5612. },
  5613. "404": {
  5614. "description": "Not found",
  5615. "content": {
  5616. "application/json": {
  5617. "schema": {
  5618. "$ref": "#/components/schemas/NotFoundError"
  5619. }
  5620. }
  5621. }
  5622. }
  5623. },
  5624. "x-codeSamples": [
  5625. {
  5626. "lang": "js",
  5627. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  5628. }
  5629. ]
  5630. }
  5631. },
  5632. "/mcp/{name}/connect": {
  5633. "post": {
  5634. "operationId": "mcp.connect",
  5635. "parameters": [
  5636. {
  5637. "in": "query",
  5638. "name": "directory",
  5639. "schema": {
  5640. "type": "string"
  5641. }
  5642. },
  5643. {
  5644. "in": "query",
  5645. "name": "workspace",
  5646. "schema": {
  5647. "type": "string"
  5648. }
  5649. },
  5650. {
  5651. "in": "path",
  5652. "name": "name",
  5653. "schema": {
  5654. "type": "string"
  5655. },
  5656. "required": true
  5657. }
  5658. ],
  5659. "description": "Connect an MCP server",
  5660. "responses": {
  5661. "200": {
  5662. "description": "MCP server connected successfully",
  5663. "content": {
  5664. "application/json": {
  5665. "schema": {
  5666. "type": "boolean"
  5667. }
  5668. }
  5669. }
  5670. }
  5671. },
  5672. "x-codeSamples": [
  5673. {
  5674. "lang": "js",
  5675. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  5676. }
  5677. ]
  5678. }
  5679. },
  5680. "/mcp/{name}/disconnect": {
  5681. "post": {
  5682. "operationId": "mcp.disconnect",
  5683. "parameters": [
  5684. {
  5685. "in": "query",
  5686. "name": "directory",
  5687. "schema": {
  5688. "type": "string"
  5689. }
  5690. },
  5691. {
  5692. "in": "query",
  5693. "name": "workspace",
  5694. "schema": {
  5695. "type": "string"
  5696. }
  5697. },
  5698. {
  5699. "in": "path",
  5700. "name": "name",
  5701. "schema": {
  5702. "type": "string"
  5703. },
  5704. "required": true
  5705. }
  5706. ],
  5707. "description": "Disconnect an MCP server",
  5708. "responses": {
  5709. "200": {
  5710. "description": "MCP server disconnected successfully",
  5711. "content": {
  5712. "application/json": {
  5713. "schema": {
  5714. "type": "boolean"
  5715. }
  5716. }
  5717. }
  5718. }
  5719. },
  5720. "x-codeSamples": [
  5721. {
  5722. "lang": "js",
  5723. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  5724. }
  5725. ]
  5726. }
  5727. },
  5728. "/tui/append-prompt": {
  5729. "post": {
  5730. "operationId": "tui.appendPrompt",
  5731. "parameters": [
  5732. {
  5733. "in": "query",
  5734. "name": "directory",
  5735. "schema": {
  5736. "type": "string"
  5737. }
  5738. },
  5739. {
  5740. "in": "query",
  5741. "name": "workspace",
  5742. "schema": {
  5743. "type": "string"
  5744. }
  5745. }
  5746. ],
  5747. "summary": "Append TUI prompt",
  5748. "description": "Append prompt to the TUI",
  5749. "responses": {
  5750. "200": {
  5751. "description": "Prompt processed successfully",
  5752. "content": {
  5753. "application/json": {
  5754. "schema": {
  5755. "type": "boolean"
  5756. }
  5757. }
  5758. }
  5759. },
  5760. "400": {
  5761. "description": "Bad request",
  5762. "content": {
  5763. "application/json": {
  5764. "schema": {
  5765. "$ref": "#/components/schemas/BadRequestError"
  5766. }
  5767. }
  5768. }
  5769. }
  5770. },
  5771. "requestBody": {
  5772. "content": {
  5773. "application/json": {
  5774. "schema": {
  5775. "type": "object",
  5776. "properties": {
  5777. "text": {
  5778. "type": "string"
  5779. }
  5780. },
  5781. "required": ["text"]
  5782. }
  5783. }
  5784. }
  5785. },
  5786. "x-codeSamples": [
  5787. {
  5788. "lang": "js",
  5789. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  5790. }
  5791. ]
  5792. }
  5793. },
  5794. "/tui/open-help": {
  5795. "post": {
  5796. "operationId": "tui.openHelp",
  5797. "parameters": [
  5798. {
  5799. "in": "query",
  5800. "name": "directory",
  5801. "schema": {
  5802. "type": "string"
  5803. }
  5804. },
  5805. {
  5806. "in": "query",
  5807. "name": "workspace",
  5808. "schema": {
  5809. "type": "string"
  5810. }
  5811. }
  5812. ],
  5813. "summary": "Open help dialog",
  5814. "description": "Open the help dialog in the TUI to display user assistance information.",
  5815. "responses": {
  5816. "200": {
  5817. "description": "Help dialog opened successfully",
  5818. "content": {
  5819. "application/json": {
  5820. "schema": {
  5821. "type": "boolean"
  5822. }
  5823. }
  5824. }
  5825. }
  5826. },
  5827. "x-codeSamples": [
  5828. {
  5829. "lang": "js",
  5830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  5831. }
  5832. ]
  5833. }
  5834. },
  5835. "/tui/open-sessions": {
  5836. "post": {
  5837. "operationId": "tui.openSessions",
  5838. "parameters": [
  5839. {
  5840. "in": "query",
  5841. "name": "directory",
  5842. "schema": {
  5843. "type": "string"
  5844. }
  5845. },
  5846. {
  5847. "in": "query",
  5848. "name": "workspace",
  5849. "schema": {
  5850. "type": "string"
  5851. }
  5852. }
  5853. ],
  5854. "summary": "Open sessions dialog",
  5855. "description": "Open the session dialog",
  5856. "responses": {
  5857. "200": {
  5858. "description": "Session dialog opened successfully",
  5859. "content": {
  5860. "application/json": {
  5861. "schema": {
  5862. "type": "boolean"
  5863. }
  5864. }
  5865. }
  5866. }
  5867. },
  5868. "x-codeSamples": [
  5869. {
  5870. "lang": "js",
  5871. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  5872. }
  5873. ]
  5874. }
  5875. },
  5876. "/tui/open-themes": {
  5877. "post": {
  5878. "operationId": "tui.openThemes",
  5879. "parameters": [
  5880. {
  5881. "in": "query",
  5882. "name": "directory",
  5883. "schema": {
  5884. "type": "string"
  5885. }
  5886. },
  5887. {
  5888. "in": "query",
  5889. "name": "workspace",
  5890. "schema": {
  5891. "type": "string"
  5892. }
  5893. }
  5894. ],
  5895. "summary": "Open themes dialog",
  5896. "description": "Open the theme dialog",
  5897. "responses": {
  5898. "200": {
  5899. "description": "Theme dialog opened successfully",
  5900. "content": {
  5901. "application/json": {
  5902. "schema": {
  5903. "type": "boolean"
  5904. }
  5905. }
  5906. }
  5907. }
  5908. },
  5909. "x-codeSamples": [
  5910. {
  5911. "lang": "js",
  5912. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  5913. }
  5914. ]
  5915. }
  5916. },
  5917. "/tui/open-models": {
  5918. "post": {
  5919. "operationId": "tui.openModels",
  5920. "parameters": [
  5921. {
  5922. "in": "query",
  5923. "name": "directory",
  5924. "schema": {
  5925. "type": "string"
  5926. }
  5927. },
  5928. {
  5929. "in": "query",
  5930. "name": "workspace",
  5931. "schema": {
  5932. "type": "string"
  5933. }
  5934. }
  5935. ],
  5936. "summary": "Open models dialog",
  5937. "description": "Open the model dialog",
  5938. "responses": {
  5939. "200": {
  5940. "description": "Model dialog opened successfully",
  5941. "content": {
  5942. "application/json": {
  5943. "schema": {
  5944. "type": "boolean"
  5945. }
  5946. }
  5947. }
  5948. }
  5949. },
  5950. "x-codeSamples": [
  5951. {
  5952. "lang": "js",
  5953. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  5954. }
  5955. ]
  5956. }
  5957. },
  5958. "/tui/submit-prompt": {
  5959. "post": {
  5960. "operationId": "tui.submitPrompt",
  5961. "parameters": [
  5962. {
  5963. "in": "query",
  5964. "name": "directory",
  5965. "schema": {
  5966. "type": "string"
  5967. }
  5968. },
  5969. {
  5970. "in": "query",
  5971. "name": "workspace",
  5972. "schema": {
  5973. "type": "string"
  5974. }
  5975. }
  5976. ],
  5977. "summary": "Submit TUI prompt",
  5978. "description": "Submit the prompt",
  5979. "responses": {
  5980. "200": {
  5981. "description": "Prompt submitted successfully",
  5982. "content": {
  5983. "application/json": {
  5984. "schema": {
  5985. "type": "boolean"
  5986. }
  5987. }
  5988. }
  5989. }
  5990. },
  5991. "x-codeSamples": [
  5992. {
  5993. "lang": "js",
  5994. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  5995. }
  5996. ]
  5997. }
  5998. },
  5999. "/tui/clear-prompt": {
  6000. "post": {
  6001. "operationId": "tui.clearPrompt",
  6002. "parameters": [
  6003. {
  6004. "in": "query",
  6005. "name": "directory",
  6006. "schema": {
  6007. "type": "string"
  6008. }
  6009. },
  6010. {
  6011. "in": "query",
  6012. "name": "workspace",
  6013. "schema": {
  6014. "type": "string"
  6015. }
  6016. }
  6017. ],
  6018. "summary": "Clear TUI prompt",
  6019. "description": "Clear the prompt",
  6020. "responses": {
  6021. "200": {
  6022. "description": "Prompt cleared successfully",
  6023. "content": {
  6024. "application/json": {
  6025. "schema": {
  6026. "type": "boolean"
  6027. }
  6028. }
  6029. }
  6030. }
  6031. },
  6032. "x-codeSamples": [
  6033. {
  6034. "lang": "js",
  6035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  6036. }
  6037. ]
  6038. }
  6039. },
  6040. "/tui/execute-command": {
  6041. "post": {
  6042. "operationId": "tui.executeCommand",
  6043. "parameters": [
  6044. {
  6045. "in": "query",
  6046. "name": "directory",
  6047. "schema": {
  6048. "type": "string"
  6049. }
  6050. },
  6051. {
  6052. "in": "query",
  6053. "name": "workspace",
  6054. "schema": {
  6055. "type": "string"
  6056. }
  6057. }
  6058. ],
  6059. "summary": "Execute TUI command",
  6060. "description": "Execute a TUI command (e.g. agent_cycle)",
  6061. "responses": {
  6062. "200": {
  6063. "description": "Command executed successfully",
  6064. "content": {
  6065. "application/json": {
  6066. "schema": {
  6067. "type": "boolean"
  6068. }
  6069. }
  6070. }
  6071. },
  6072. "400": {
  6073. "description": "Bad request",
  6074. "content": {
  6075. "application/json": {
  6076. "schema": {
  6077. "$ref": "#/components/schemas/BadRequestError"
  6078. }
  6079. }
  6080. }
  6081. }
  6082. },
  6083. "requestBody": {
  6084. "content": {
  6085. "application/json": {
  6086. "schema": {
  6087. "type": "object",
  6088. "properties": {
  6089. "command": {
  6090. "type": "string"
  6091. }
  6092. },
  6093. "required": ["command"]
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "x-codeSamples": [
  6099. {
  6100. "lang": "js",
  6101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  6102. }
  6103. ]
  6104. }
  6105. },
  6106. "/tui/show-toast": {
  6107. "post": {
  6108. "operationId": "tui.showToast",
  6109. "parameters": [
  6110. {
  6111. "in": "query",
  6112. "name": "directory",
  6113. "schema": {
  6114. "type": "string"
  6115. }
  6116. },
  6117. {
  6118. "in": "query",
  6119. "name": "workspace",
  6120. "schema": {
  6121. "type": "string"
  6122. }
  6123. }
  6124. ],
  6125. "summary": "Show TUI toast",
  6126. "description": "Show a toast notification in the TUI",
  6127. "responses": {
  6128. "200": {
  6129. "description": "Toast notification shown successfully",
  6130. "content": {
  6131. "application/json": {
  6132. "schema": {
  6133. "type": "boolean"
  6134. }
  6135. }
  6136. }
  6137. }
  6138. },
  6139. "requestBody": {
  6140. "content": {
  6141. "application/json": {
  6142. "schema": {
  6143. "type": "object",
  6144. "properties": {
  6145. "title": {
  6146. "type": "string"
  6147. },
  6148. "message": {
  6149. "type": "string"
  6150. },
  6151. "variant": {
  6152. "type": "string",
  6153. "enum": ["info", "success", "warning", "error"]
  6154. },
  6155. "duration": {
  6156. "description": "Duration in milliseconds",
  6157. "default": 5000,
  6158. "type": "number"
  6159. }
  6160. },
  6161. "required": ["message", "variant"]
  6162. }
  6163. }
  6164. }
  6165. },
  6166. "x-codeSamples": [
  6167. {
  6168. "lang": "js",
  6169. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  6170. }
  6171. ]
  6172. }
  6173. },
  6174. "/tui/publish": {
  6175. "post": {
  6176. "operationId": "tui.publish",
  6177. "parameters": [
  6178. {
  6179. "in": "query",
  6180. "name": "directory",
  6181. "schema": {
  6182. "type": "string"
  6183. }
  6184. },
  6185. {
  6186. "in": "query",
  6187. "name": "workspace",
  6188. "schema": {
  6189. "type": "string"
  6190. }
  6191. }
  6192. ],
  6193. "summary": "Publish TUI event",
  6194. "description": "Publish a TUI event",
  6195. "responses": {
  6196. "200": {
  6197. "description": "Event published successfully",
  6198. "content": {
  6199. "application/json": {
  6200. "schema": {
  6201. "type": "boolean"
  6202. }
  6203. }
  6204. }
  6205. },
  6206. "400": {
  6207. "description": "Bad request",
  6208. "content": {
  6209. "application/json": {
  6210. "schema": {
  6211. "$ref": "#/components/schemas/BadRequestError"
  6212. }
  6213. }
  6214. }
  6215. }
  6216. },
  6217. "requestBody": {
  6218. "content": {
  6219. "application/json": {
  6220. "schema": {
  6221. "anyOf": [
  6222. {
  6223. "$ref": "#/components/schemas/Event.tui.prompt.append"
  6224. },
  6225. {
  6226. "$ref": "#/components/schemas/Event.tui.command.execute"
  6227. },
  6228. {
  6229. "$ref": "#/components/schemas/Event.tui.toast.show"
  6230. },
  6231. {
  6232. "$ref": "#/components/schemas/Event.tui.session.select"
  6233. }
  6234. ]
  6235. }
  6236. }
  6237. }
  6238. },
  6239. "x-codeSamples": [
  6240. {
  6241. "lang": "js",
  6242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  6243. }
  6244. ]
  6245. }
  6246. },
  6247. "/tui/select-session": {
  6248. "post": {
  6249. "operationId": "tui.selectSession",
  6250. "parameters": [
  6251. {
  6252. "in": "query",
  6253. "name": "directory",
  6254. "schema": {
  6255. "type": "string"
  6256. }
  6257. },
  6258. {
  6259. "in": "query",
  6260. "name": "workspace",
  6261. "schema": {
  6262. "type": "string"
  6263. }
  6264. }
  6265. ],
  6266. "summary": "Select session",
  6267. "description": "Navigate the TUI to display the specified session.",
  6268. "responses": {
  6269. "200": {
  6270. "description": "Session selected successfully",
  6271. "content": {
  6272. "application/json": {
  6273. "schema": {
  6274. "type": "boolean"
  6275. }
  6276. }
  6277. }
  6278. },
  6279. "400": {
  6280. "description": "Bad request",
  6281. "content": {
  6282. "application/json": {
  6283. "schema": {
  6284. "$ref": "#/components/schemas/BadRequestError"
  6285. }
  6286. }
  6287. }
  6288. },
  6289. "404": {
  6290. "description": "Not found",
  6291. "content": {
  6292. "application/json": {
  6293. "schema": {
  6294. "$ref": "#/components/schemas/NotFoundError"
  6295. }
  6296. }
  6297. }
  6298. }
  6299. },
  6300. "requestBody": {
  6301. "content": {
  6302. "application/json": {
  6303. "schema": {
  6304. "type": "object",
  6305. "properties": {
  6306. "sessionID": {
  6307. "description": "Session ID to navigate to",
  6308. "type": "string",
  6309. "pattern": "^ses"
  6310. }
  6311. },
  6312. "required": ["sessionID"]
  6313. }
  6314. }
  6315. }
  6316. },
  6317. "x-codeSamples": [
  6318. {
  6319. "lang": "js",
  6320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  6321. }
  6322. ]
  6323. }
  6324. },
  6325. "/tui/control/next": {
  6326. "get": {
  6327. "operationId": "tui.control.next",
  6328. "parameters": [
  6329. {
  6330. "in": "query",
  6331. "name": "directory",
  6332. "schema": {
  6333. "type": "string"
  6334. }
  6335. },
  6336. {
  6337. "in": "query",
  6338. "name": "workspace",
  6339. "schema": {
  6340. "type": "string"
  6341. }
  6342. }
  6343. ],
  6344. "summary": "Get next TUI request",
  6345. "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
  6346. "responses": {
  6347. "200": {
  6348. "description": "Next TUI request",
  6349. "content": {
  6350. "application/json": {
  6351. "schema": {
  6352. "type": "object",
  6353. "properties": {
  6354. "path": {
  6355. "type": "string"
  6356. },
  6357. "body": {}
  6358. },
  6359. "required": ["path", "body"]
  6360. }
  6361. }
  6362. }
  6363. }
  6364. },
  6365. "x-codeSamples": [
  6366. {
  6367. "lang": "js",
  6368. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  6369. }
  6370. ]
  6371. }
  6372. },
  6373. "/tui/control/response": {
  6374. "post": {
  6375. "operationId": "tui.control.response",
  6376. "parameters": [
  6377. {
  6378. "in": "query",
  6379. "name": "directory",
  6380. "schema": {
  6381. "type": "string"
  6382. }
  6383. },
  6384. {
  6385. "in": "query",
  6386. "name": "workspace",
  6387. "schema": {
  6388. "type": "string"
  6389. }
  6390. }
  6391. ],
  6392. "summary": "Submit TUI response",
  6393. "description": "Submit a response to the TUI request queue to complete a pending request.",
  6394. "responses": {
  6395. "200": {
  6396. "description": "Response submitted successfully",
  6397. "content": {
  6398. "application/json": {
  6399. "schema": {
  6400. "type": "boolean"
  6401. }
  6402. }
  6403. }
  6404. }
  6405. },
  6406. "requestBody": {
  6407. "content": {
  6408. "application/json": {
  6409. "schema": {}
  6410. }
  6411. }
  6412. },
  6413. "x-codeSamples": [
  6414. {
  6415. "lang": "js",
  6416. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  6417. }
  6418. ]
  6419. }
  6420. },
  6421. "/instance/dispose": {
  6422. "post": {
  6423. "operationId": "instance.dispose",
  6424. "parameters": [
  6425. {
  6426. "in": "query",
  6427. "name": "directory",
  6428. "schema": {
  6429. "type": "string"
  6430. }
  6431. },
  6432. {
  6433. "in": "query",
  6434. "name": "workspace",
  6435. "schema": {
  6436. "type": "string"
  6437. }
  6438. }
  6439. ],
  6440. "summary": "Dispose instance",
  6441. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  6442. "responses": {
  6443. "200": {
  6444. "description": "Instance disposed",
  6445. "content": {
  6446. "application/json": {
  6447. "schema": {
  6448. "type": "boolean"
  6449. }
  6450. }
  6451. }
  6452. }
  6453. },
  6454. "x-codeSamples": [
  6455. {
  6456. "lang": "js",
  6457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  6458. }
  6459. ]
  6460. }
  6461. },
  6462. "/path": {
  6463. "get": {
  6464. "operationId": "path.get",
  6465. "parameters": [
  6466. {
  6467. "in": "query",
  6468. "name": "directory",
  6469. "schema": {
  6470. "type": "string"
  6471. }
  6472. },
  6473. {
  6474. "in": "query",
  6475. "name": "workspace",
  6476. "schema": {
  6477. "type": "string"
  6478. }
  6479. }
  6480. ],
  6481. "summary": "Get paths",
  6482. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  6483. "responses": {
  6484. "200": {
  6485. "description": "Path",
  6486. "content": {
  6487. "application/json": {
  6488. "schema": {
  6489. "$ref": "#/components/schemas/Path"
  6490. }
  6491. }
  6492. }
  6493. }
  6494. },
  6495. "x-codeSamples": [
  6496. {
  6497. "lang": "js",
  6498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  6499. }
  6500. ]
  6501. }
  6502. },
  6503. "/vcs": {
  6504. "get": {
  6505. "operationId": "vcs.get",
  6506. "parameters": [
  6507. {
  6508. "in": "query",
  6509. "name": "directory",
  6510. "schema": {
  6511. "type": "string"
  6512. }
  6513. },
  6514. {
  6515. "in": "query",
  6516. "name": "workspace",
  6517. "schema": {
  6518. "type": "string"
  6519. }
  6520. }
  6521. ],
  6522. "summary": "Get VCS info",
  6523. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  6524. "responses": {
  6525. "200": {
  6526. "description": "VCS info",
  6527. "content": {
  6528. "application/json": {
  6529. "schema": {
  6530. "$ref": "#/components/schemas/VcsInfo"
  6531. }
  6532. }
  6533. }
  6534. }
  6535. },
  6536. "x-codeSamples": [
  6537. {
  6538. "lang": "js",
  6539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  6540. }
  6541. ]
  6542. }
  6543. },
  6544. "/command": {
  6545. "get": {
  6546. "operationId": "command.list",
  6547. "parameters": [
  6548. {
  6549. "in": "query",
  6550. "name": "directory",
  6551. "schema": {
  6552. "type": "string"
  6553. }
  6554. },
  6555. {
  6556. "in": "query",
  6557. "name": "workspace",
  6558. "schema": {
  6559. "type": "string"
  6560. }
  6561. }
  6562. ],
  6563. "summary": "List commands",
  6564. "description": "Get a list of all available commands in the OpenCode system.",
  6565. "responses": {
  6566. "200": {
  6567. "description": "List of commands",
  6568. "content": {
  6569. "application/json": {
  6570. "schema": {
  6571. "type": "array",
  6572. "items": {
  6573. "$ref": "#/components/schemas/Command"
  6574. }
  6575. }
  6576. }
  6577. }
  6578. }
  6579. },
  6580. "x-codeSamples": [
  6581. {
  6582. "lang": "js",
  6583. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  6584. }
  6585. ]
  6586. }
  6587. },
  6588. "/log": {
  6589. "post": {
  6590. "operationId": "app.log",
  6591. "parameters": [
  6592. {
  6593. "in": "query",
  6594. "name": "directory",
  6595. "schema": {
  6596. "type": "string"
  6597. }
  6598. },
  6599. {
  6600. "in": "query",
  6601. "name": "workspace",
  6602. "schema": {
  6603. "type": "string"
  6604. }
  6605. }
  6606. ],
  6607. "summary": "Write log",
  6608. "description": "Write a log entry to the server logs with specified level and metadata.",
  6609. "responses": {
  6610. "200": {
  6611. "description": "Log entry written successfully",
  6612. "content": {
  6613. "application/json": {
  6614. "schema": {
  6615. "type": "boolean"
  6616. }
  6617. }
  6618. }
  6619. },
  6620. "400": {
  6621. "description": "Bad request",
  6622. "content": {
  6623. "application/json": {
  6624. "schema": {
  6625. "$ref": "#/components/schemas/BadRequestError"
  6626. }
  6627. }
  6628. }
  6629. }
  6630. },
  6631. "requestBody": {
  6632. "content": {
  6633. "application/json": {
  6634. "schema": {
  6635. "type": "object",
  6636. "properties": {
  6637. "service": {
  6638. "description": "Service name for the log entry",
  6639. "type": "string"
  6640. },
  6641. "level": {
  6642. "description": "Log level",
  6643. "type": "string",
  6644. "enum": ["debug", "info", "error", "warn"]
  6645. },
  6646. "message": {
  6647. "description": "Log message",
  6648. "type": "string"
  6649. },
  6650. "extra": {
  6651. "description": "Additional metadata for the log entry",
  6652. "type": "object",
  6653. "propertyNames": {
  6654. "type": "string"
  6655. },
  6656. "additionalProperties": {}
  6657. }
  6658. },
  6659. "required": ["service", "level", "message"]
  6660. }
  6661. }
  6662. }
  6663. },
  6664. "x-codeSamples": [
  6665. {
  6666. "lang": "js",
  6667. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  6668. }
  6669. ]
  6670. }
  6671. },
  6672. "/agent": {
  6673. "get": {
  6674. "operationId": "app.agents",
  6675. "parameters": [
  6676. {
  6677. "in": "query",
  6678. "name": "directory",
  6679. "schema": {
  6680. "type": "string"
  6681. }
  6682. },
  6683. {
  6684. "in": "query",
  6685. "name": "workspace",
  6686. "schema": {
  6687. "type": "string"
  6688. }
  6689. }
  6690. ],
  6691. "summary": "List agents",
  6692. "description": "Get a list of all available AI agents in the OpenCode system.",
  6693. "responses": {
  6694. "200": {
  6695. "description": "List of agents",
  6696. "content": {
  6697. "application/json": {
  6698. "schema": {
  6699. "type": "array",
  6700. "items": {
  6701. "$ref": "#/components/schemas/Agent"
  6702. }
  6703. }
  6704. }
  6705. }
  6706. }
  6707. },
  6708. "x-codeSamples": [
  6709. {
  6710. "lang": "js",
  6711. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  6712. }
  6713. ]
  6714. }
  6715. },
  6716. "/skill": {
  6717. "get": {
  6718. "operationId": "app.skills",
  6719. "parameters": [
  6720. {
  6721. "in": "query",
  6722. "name": "directory",
  6723. "schema": {
  6724. "type": "string"
  6725. }
  6726. },
  6727. {
  6728. "in": "query",
  6729. "name": "workspace",
  6730. "schema": {
  6731. "type": "string"
  6732. }
  6733. }
  6734. ],
  6735. "summary": "List skills",
  6736. "description": "Get a list of all available skills in the OpenCode system.",
  6737. "responses": {
  6738. "200": {
  6739. "description": "List of skills",
  6740. "content": {
  6741. "application/json": {
  6742. "schema": {
  6743. "type": "array",
  6744. "items": {
  6745. "type": "object",
  6746. "properties": {
  6747. "name": {
  6748. "type": "string"
  6749. },
  6750. "description": {
  6751. "type": "string"
  6752. },
  6753. "location": {
  6754. "type": "string"
  6755. },
  6756. "content": {
  6757. "type": "string"
  6758. }
  6759. },
  6760. "required": ["name", "description", "location", "content"]
  6761. }
  6762. }
  6763. }
  6764. }
  6765. }
  6766. },
  6767. "x-codeSamples": [
  6768. {
  6769. "lang": "js",
  6770. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  6771. }
  6772. ]
  6773. }
  6774. },
  6775. "/lsp": {
  6776. "get": {
  6777. "operationId": "lsp.status",
  6778. "parameters": [
  6779. {
  6780. "in": "query",
  6781. "name": "directory",
  6782. "schema": {
  6783. "type": "string"
  6784. }
  6785. },
  6786. {
  6787. "in": "query",
  6788. "name": "workspace",
  6789. "schema": {
  6790. "type": "string"
  6791. }
  6792. }
  6793. ],
  6794. "summary": "Get LSP status",
  6795. "description": "Get LSP server status",
  6796. "responses": {
  6797. "200": {
  6798. "description": "LSP server status",
  6799. "content": {
  6800. "application/json": {
  6801. "schema": {
  6802. "type": "array",
  6803. "items": {
  6804. "$ref": "#/components/schemas/LSPStatus"
  6805. }
  6806. }
  6807. }
  6808. }
  6809. }
  6810. },
  6811. "x-codeSamples": [
  6812. {
  6813. "lang": "js",
  6814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  6815. }
  6816. ]
  6817. }
  6818. },
  6819. "/formatter": {
  6820. "get": {
  6821. "operationId": "formatter.status",
  6822. "parameters": [
  6823. {
  6824. "in": "query",
  6825. "name": "directory",
  6826. "schema": {
  6827. "type": "string"
  6828. }
  6829. },
  6830. {
  6831. "in": "query",
  6832. "name": "workspace",
  6833. "schema": {
  6834. "type": "string"
  6835. }
  6836. }
  6837. ],
  6838. "summary": "Get formatter status",
  6839. "description": "Get formatter status",
  6840. "responses": {
  6841. "200": {
  6842. "description": "Formatter status",
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "type": "array",
  6847. "items": {
  6848. "$ref": "#/components/schemas/FormatterStatus"
  6849. }
  6850. }
  6851. }
  6852. }
  6853. }
  6854. },
  6855. "x-codeSamples": [
  6856. {
  6857. "lang": "js",
  6858. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  6859. }
  6860. ]
  6861. }
  6862. },
  6863. "/event": {
  6864. "get": {
  6865. "operationId": "event.subscribe",
  6866. "parameters": [
  6867. {
  6868. "in": "query",
  6869. "name": "directory",
  6870. "schema": {
  6871. "type": "string"
  6872. }
  6873. },
  6874. {
  6875. "in": "query",
  6876. "name": "workspace",
  6877. "schema": {
  6878. "type": "string"
  6879. }
  6880. }
  6881. ],
  6882. "summary": "Subscribe to events",
  6883. "description": "Get events",
  6884. "responses": {
  6885. "200": {
  6886. "description": "Event stream",
  6887. "content": {
  6888. "text/event-stream": {
  6889. "schema": {
  6890. "$ref": "#/components/schemas/Event"
  6891. }
  6892. }
  6893. }
  6894. }
  6895. },
  6896. "x-codeSamples": [
  6897. {
  6898. "lang": "js",
  6899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  6900. }
  6901. ]
  6902. }
  6903. }
  6904. },
  6905. "components": {
  6906. "schemas": {
  6907. "Event.installation.updated": {
  6908. "type": "object",
  6909. "properties": {
  6910. "type": {
  6911. "type": "string",
  6912. "const": "installation.updated"
  6913. },
  6914. "properties": {
  6915. "type": "object",
  6916. "properties": {
  6917. "version": {
  6918. "type": "string"
  6919. }
  6920. },
  6921. "required": ["version"]
  6922. }
  6923. },
  6924. "required": ["type", "properties"]
  6925. },
  6926. "Event.installation.update-available": {
  6927. "type": "object",
  6928. "properties": {
  6929. "type": {
  6930. "type": "string",
  6931. "const": "installation.update-available"
  6932. },
  6933. "properties": {
  6934. "type": "object",
  6935. "properties": {
  6936. "version": {
  6937. "type": "string"
  6938. }
  6939. },
  6940. "required": ["version"]
  6941. }
  6942. },
  6943. "required": ["type", "properties"]
  6944. },
  6945. "Project": {
  6946. "type": "object",
  6947. "properties": {
  6948. "id": {
  6949. "type": "string"
  6950. },
  6951. "worktree": {
  6952. "type": "string"
  6953. },
  6954. "vcs": {
  6955. "type": "string",
  6956. "const": "git"
  6957. },
  6958. "name": {
  6959. "type": "string"
  6960. },
  6961. "icon": {
  6962. "type": "object",
  6963. "properties": {
  6964. "url": {
  6965. "type": "string"
  6966. },
  6967. "override": {
  6968. "type": "string"
  6969. },
  6970. "color": {
  6971. "type": "string"
  6972. }
  6973. }
  6974. },
  6975. "commands": {
  6976. "type": "object",
  6977. "properties": {
  6978. "start": {
  6979. "description": "Startup script to run when creating a new workspace (worktree)",
  6980. "type": "string"
  6981. }
  6982. }
  6983. },
  6984. "time": {
  6985. "type": "object",
  6986. "properties": {
  6987. "created": {
  6988. "type": "number"
  6989. },
  6990. "updated": {
  6991. "type": "number"
  6992. },
  6993. "initialized": {
  6994. "type": "number"
  6995. }
  6996. },
  6997. "required": ["created", "updated"]
  6998. },
  6999. "sandboxes": {
  7000. "type": "array",
  7001. "items": {
  7002. "type": "string"
  7003. }
  7004. }
  7005. },
  7006. "required": ["id", "worktree", "time", "sandboxes"]
  7007. },
  7008. "Event.project.updated": {
  7009. "type": "object",
  7010. "properties": {
  7011. "type": {
  7012. "type": "string",
  7013. "const": "project.updated"
  7014. },
  7015. "properties": {
  7016. "$ref": "#/components/schemas/Project"
  7017. }
  7018. },
  7019. "required": ["type", "properties"]
  7020. },
  7021. "Event.server.instance.disposed": {
  7022. "type": "object",
  7023. "properties": {
  7024. "type": {
  7025. "type": "string",
  7026. "const": "server.instance.disposed"
  7027. },
  7028. "properties": {
  7029. "type": "object",
  7030. "properties": {
  7031. "directory": {
  7032. "type": "string"
  7033. }
  7034. },
  7035. "required": ["directory"]
  7036. }
  7037. },
  7038. "required": ["type", "properties"]
  7039. },
  7040. "Event.server.connected": {
  7041. "type": "object",
  7042. "properties": {
  7043. "type": {
  7044. "type": "string",
  7045. "const": "server.connected"
  7046. },
  7047. "properties": {
  7048. "type": "object",
  7049. "properties": {}
  7050. }
  7051. },
  7052. "required": ["type", "properties"]
  7053. },
  7054. "Event.global.disposed": {
  7055. "type": "object",
  7056. "properties": {
  7057. "type": {
  7058. "type": "string",
  7059. "const": "global.disposed"
  7060. },
  7061. "properties": {
  7062. "type": "object",
  7063. "properties": {}
  7064. }
  7065. },
  7066. "required": ["type", "properties"]
  7067. },
  7068. "Event.lsp.client.diagnostics": {
  7069. "type": "object",
  7070. "properties": {
  7071. "type": {
  7072. "type": "string",
  7073. "const": "lsp.client.diagnostics"
  7074. },
  7075. "properties": {
  7076. "type": "object",
  7077. "properties": {
  7078. "serverID": {
  7079. "type": "string"
  7080. },
  7081. "path": {
  7082. "type": "string"
  7083. }
  7084. },
  7085. "required": ["serverID", "path"]
  7086. }
  7087. },
  7088. "required": ["type", "properties"]
  7089. },
  7090. "Event.lsp.updated": {
  7091. "type": "object",
  7092. "properties": {
  7093. "type": {
  7094. "type": "string",
  7095. "const": "lsp.updated"
  7096. },
  7097. "properties": {
  7098. "type": "object",
  7099. "properties": {}
  7100. }
  7101. },
  7102. "required": ["type", "properties"]
  7103. },
  7104. "Event.file.edited": {
  7105. "type": "object",
  7106. "properties": {
  7107. "type": {
  7108. "type": "string",
  7109. "const": "file.edited"
  7110. },
  7111. "properties": {
  7112. "type": "object",
  7113. "properties": {
  7114. "file": {
  7115. "type": "string"
  7116. }
  7117. },
  7118. "required": ["file"]
  7119. }
  7120. },
  7121. "required": ["type", "properties"]
  7122. },
  7123. "OutputFormatText": {
  7124. "type": "object",
  7125. "properties": {
  7126. "type": {
  7127. "type": "string",
  7128. "const": "text"
  7129. }
  7130. },
  7131. "required": ["type"]
  7132. },
  7133. "JSONSchema": {
  7134. "type": "object",
  7135. "propertyNames": {
  7136. "type": "string"
  7137. },
  7138. "additionalProperties": {}
  7139. },
  7140. "OutputFormatJsonSchema": {
  7141. "type": "object",
  7142. "properties": {
  7143. "type": {
  7144. "type": "string",
  7145. "const": "json_schema"
  7146. },
  7147. "schema": {
  7148. "$ref": "#/components/schemas/JSONSchema"
  7149. },
  7150. "retryCount": {
  7151. "default": 2,
  7152. "type": "integer",
  7153. "minimum": 0,
  7154. "maximum": 9007199254740991
  7155. }
  7156. },
  7157. "required": ["type", "schema"]
  7158. },
  7159. "OutputFormat": {
  7160. "anyOf": [
  7161. {
  7162. "$ref": "#/components/schemas/OutputFormatText"
  7163. },
  7164. {
  7165. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  7166. }
  7167. ]
  7168. },
  7169. "FileDiff": {
  7170. "type": "object",
  7171. "properties": {
  7172. "file": {
  7173. "type": "string"
  7174. },
  7175. "before": {
  7176. "type": "string"
  7177. },
  7178. "after": {
  7179. "type": "string"
  7180. },
  7181. "additions": {
  7182. "type": "number"
  7183. },
  7184. "deletions": {
  7185. "type": "number"
  7186. },
  7187. "status": {
  7188. "type": "string",
  7189. "enum": ["added", "deleted", "modified"]
  7190. }
  7191. },
  7192. "required": ["file", "before", "after", "additions", "deletions"]
  7193. },
  7194. "UserMessage": {
  7195. "type": "object",
  7196. "properties": {
  7197. "id": {
  7198. "type": "string"
  7199. },
  7200. "sessionID": {
  7201. "type": "string"
  7202. },
  7203. "role": {
  7204. "type": "string",
  7205. "const": "user"
  7206. },
  7207. "time": {
  7208. "type": "object",
  7209. "properties": {
  7210. "created": {
  7211. "type": "number"
  7212. }
  7213. },
  7214. "required": ["created"]
  7215. },
  7216. "format": {
  7217. "$ref": "#/components/schemas/OutputFormat"
  7218. },
  7219. "summary": {
  7220. "type": "object",
  7221. "properties": {
  7222. "title": {
  7223. "type": "string"
  7224. },
  7225. "body": {
  7226. "type": "string"
  7227. },
  7228. "diffs": {
  7229. "type": "array",
  7230. "items": {
  7231. "$ref": "#/components/schemas/FileDiff"
  7232. }
  7233. }
  7234. },
  7235. "required": ["diffs"]
  7236. },
  7237. "agent": {
  7238. "type": "string"
  7239. },
  7240. "model": {
  7241. "type": "object",
  7242. "properties": {
  7243. "providerID": {
  7244. "type": "string"
  7245. },
  7246. "modelID": {
  7247. "type": "string"
  7248. }
  7249. },
  7250. "required": ["providerID", "modelID"]
  7251. },
  7252. "system": {
  7253. "type": "string"
  7254. },
  7255. "tools": {
  7256. "type": "object",
  7257. "propertyNames": {
  7258. "type": "string"
  7259. },
  7260. "additionalProperties": {
  7261. "type": "boolean"
  7262. }
  7263. },
  7264. "variant": {
  7265. "type": "string"
  7266. }
  7267. },
  7268. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  7269. },
  7270. "ProviderAuthError": {
  7271. "type": "object",
  7272. "properties": {
  7273. "name": {
  7274. "type": "string",
  7275. "const": "ProviderAuthError"
  7276. },
  7277. "data": {
  7278. "type": "object",
  7279. "properties": {
  7280. "providerID": {
  7281. "type": "string"
  7282. },
  7283. "message": {
  7284. "type": "string"
  7285. }
  7286. },
  7287. "required": ["providerID", "message"]
  7288. }
  7289. },
  7290. "required": ["name", "data"]
  7291. },
  7292. "UnknownError": {
  7293. "type": "object",
  7294. "properties": {
  7295. "name": {
  7296. "type": "string",
  7297. "const": "UnknownError"
  7298. },
  7299. "data": {
  7300. "type": "object",
  7301. "properties": {
  7302. "message": {
  7303. "type": "string"
  7304. }
  7305. },
  7306. "required": ["message"]
  7307. }
  7308. },
  7309. "required": ["name", "data"]
  7310. },
  7311. "MessageOutputLengthError": {
  7312. "type": "object",
  7313. "properties": {
  7314. "name": {
  7315. "type": "string",
  7316. "const": "MessageOutputLengthError"
  7317. },
  7318. "data": {
  7319. "type": "object",
  7320. "properties": {}
  7321. }
  7322. },
  7323. "required": ["name", "data"]
  7324. },
  7325. "MessageAbortedError": {
  7326. "type": "object",
  7327. "properties": {
  7328. "name": {
  7329. "type": "string",
  7330. "const": "MessageAbortedError"
  7331. },
  7332. "data": {
  7333. "type": "object",
  7334. "properties": {
  7335. "message": {
  7336. "type": "string"
  7337. }
  7338. },
  7339. "required": ["message"]
  7340. }
  7341. },
  7342. "required": ["name", "data"]
  7343. },
  7344. "StructuredOutputError": {
  7345. "type": "object",
  7346. "properties": {
  7347. "name": {
  7348. "type": "string",
  7349. "const": "StructuredOutputError"
  7350. },
  7351. "data": {
  7352. "type": "object",
  7353. "properties": {
  7354. "message": {
  7355. "type": "string"
  7356. },
  7357. "retries": {
  7358. "type": "number"
  7359. }
  7360. },
  7361. "required": ["message", "retries"]
  7362. }
  7363. },
  7364. "required": ["name", "data"]
  7365. },
  7366. "ContextOverflowError": {
  7367. "type": "object",
  7368. "properties": {
  7369. "name": {
  7370. "type": "string",
  7371. "const": "ContextOverflowError"
  7372. },
  7373. "data": {
  7374. "type": "object",
  7375. "properties": {
  7376. "message": {
  7377. "type": "string"
  7378. },
  7379. "responseBody": {
  7380. "type": "string"
  7381. }
  7382. },
  7383. "required": ["message"]
  7384. }
  7385. },
  7386. "required": ["name", "data"]
  7387. },
  7388. "APIError": {
  7389. "type": "object",
  7390. "properties": {
  7391. "name": {
  7392. "type": "string",
  7393. "const": "APIError"
  7394. },
  7395. "data": {
  7396. "type": "object",
  7397. "properties": {
  7398. "message": {
  7399. "type": "string"
  7400. },
  7401. "statusCode": {
  7402. "type": "number"
  7403. },
  7404. "isRetryable": {
  7405. "type": "boolean"
  7406. },
  7407. "responseHeaders": {
  7408. "type": "object",
  7409. "propertyNames": {
  7410. "type": "string"
  7411. },
  7412. "additionalProperties": {
  7413. "type": "string"
  7414. }
  7415. },
  7416. "responseBody": {
  7417. "type": "string"
  7418. },
  7419. "metadata": {
  7420. "type": "object",
  7421. "propertyNames": {
  7422. "type": "string"
  7423. },
  7424. "additionalProperties": {
  7425. "type": "string"
  7426. }
  7427. }
  7428. },
  7429. "required": ["message", "isRetryable"]
  7430. }
  7431. },
  7432. "required": ["name", "data"]
  7433. },
  7434. "AssistantMessage": {
  7435. "type": "object",
  7436. "properties": {
  7437. "id": {
  7438. "type": "string"
  7439. },
  7440. "sessionID": {
  7441. "type": "string"
  7442. },
  7443. "role": {
  7444. "type": "string",
  7445. "const": "assistant"
  7446. },
  7447. "time": {
  7448. "type": "object",
  7449. "properties": {
  7450. "created": {
  7451. "type": "number"
  7452. },
  7453. "completed": {
  7454. "type": "number"
  7455. }
  7456. },
  7457. "required": ["created"]
  7458. },
  7459. "error": {
  7460. "anyOf": [
  7461. {
  7462. "$ref": "#/components/schemas/ProviderAuthError"
  7463. },
  7464. {
  7465. "$ref": "#/components/schemas/UnknownError"
  7466. },
  7467. {
  7468. "$ref": "#/components/schemas/MessageOutputLengthError"
  7469. },
  7470. {
  7471. "$ref": "#/components/schemas/MessageAbortedError"
  7472. },
  7473. {
  7474. "$ref": "#/components/schemas/StructuredOutputError"
  7475. },
  7476. {
  7477. "$ref": "#/components/schemas/ContextOverflowError"
  7478. },
  7479. {
  7480. "$ref": "#/components/schemas/APIError"
  7481. }
  7482. ]
  7483. },
  7484. "parentID": {
  7485. "type": "string"
  7486. },
  7487. "modelID": {
  7488. "type": "string"
  7489. },
  7490. "providerID": {
  7491. "type": "string"
  7492. },
  7493. "mode": {
  7494. "type": "string"
  7495. },
  7496. "agent": {
  7497. "type": "string"
  7498. },
  7499. "path": {
  7500. "type": "object",
  7501. "properties": {
  7502. "cwd": {
  7503. "type": "string"
  7504. },
  7505. "root": {
  7506. "type": "string"
  7507. }
  7508. },
  7509. "required": ["cwd", "root"]
  7510. },
  7511. "summary": {
  7512. "type": "boolean"
  7513. },
  7514. "cost": {
  7515. "type": "number"
  7516. },
  7517. "tokens": {
  7518. "type": "object",
  7519. "properties": {
  7520. "total": {
  7521. "type": "number"
  7522. },
  7523. "input": {
  7524. "type": "number"
  7525. },
  7526. "output": {
  7527. "type": "number"
  7528. },
  7529. "reasoning": {
  7530. "type": "number"
  7531. },
  7532. "cache": {
  7533. "type": "object",
  7534. "properties": {
  7535. "read": {
  7536. "type": "number"
  7537. },
  7538. "write": {
  7539. "type": "number"
  7540. }
  7541. },
  7542. "required": ["read", "write"]
  7543. }
  7544. },
  7545. "required": ["input", "output", "reasoning", "cache"]
  7546. },
  7547. "structured": {},
  7548. "variant": {
  7549. "type": "string"
  7550. },
  7551. "finish": {
  7552. "type": "string"
  7553. }
  7554. },
  7555. "required": [
  7556. "id",
  7557. "sessionID",
  7558. "role",
  7559. "time",
  7560. "parentID",
  7561. "modelID",
  7562. "providerID",
  7563. "mode",
  7564. "agent",
  7565. "path",
  7566. "cost",
  7567. "tokens"
  7568. ]
  7569. },
  7570. "Message": {
  7571. "anyOf": [
  7572. {
  7573. "$ref": "#/components/schemas/UserMessage"
  7574. },
  7575. {
  7576. "$ref": "#/components/schemas/AssistantMessage"
  7577. }
  7578. ]
  7579. },
  7580. "Event.message.updated": {
  7581. "type": "object",
  7582. "properties": {
  7583. "type": {
  7584. "type": "string",
  7585. "const": "message.updated"
  7586. },
  7587. "properties": {
  7588. "type": "object",
  7589. "properties": {
  7590. "info": {
  7591. "$ref": "#/components/schemas/Message"
  7592. }
  7593. },
  7594. "required": ["info"]
  7595. }
  7596. },
  7597. "required": ["type", "properties"]
  7598. },
  7599. "Event.message.removed": {
  7600. "type": "object",
  7601. "properties": {
  7602. "type": {
  7603. "type": "string",
  7604. "const": "message.removed"
  7605. },
  7606. "properties": {
  7607. "type": "object",
  7608. "properties": {
  7609. "sessionID": {
  7610. "type": "string"
  7611. },
  7612. "messageID": {
  7613. "type": "string"
  7614. }
  7615. },
  7616. "required": ["sessionID", "messageID"]
  7617. }
  7618. },
  7619. "required": ["type", "properties"]
  7620. },
  7621. "TextPart": {
  7622. "type": "object",
  7623. "properties": {
  7624. "id": {
  7625. "type": "string"
  7626. },
  7627. "sessionID": {
  7628. "type": "string"
  7629. },
  7630. "messageID": {
  7631. "type": "string"
  7632. },
  7633. "type": {
  7634. "type": "string",
  7635. "const": "text"
  7636. },
  7637. "text": {
  7638. "type": "string"
  7639. },
  7640. "synthetic": {
  7641. "type": "boolean"
  7642. },
  7643. "ignored": {
  7644. "type": "boolean"
  7645. },
  7646. "time": {
  7647. "type": "object",
  7648. "properties": {
  7649. "start": {
  7650. "type": "number"
  7651. },
  7652. "end": {
  7653. "type": "number"
  7654. }
  7655. },
  7656. "required": ["start"]
  7657. },
  7658. "metadata": {
  7659. "type": "object",
  7660. "propertyNames": {
  7661. "type": "string"
  7662. },
  7663. "additionalProperties": {}
  7664. }
  7665. },
  7666. "required": ["id", "sessionID", "messageID", "type", "text"]
  7667. },
  7668. "SubtaskPart": {
  7669. "type": "object",
  7670. "properties": {
  7671. "id": {
  7672. "type": "string"
  7673. },
  7674. "sessionID": {
  7675. "type": "string"
  7676. },
  7677. "messageID": {
  7678. "type": "string"
  7679. },
  7680. "type": {
  7681. "type": "string",
  7682. "const": "subtask"
  7683. },
  7684. "prompt": {
  7685. "type": "string"
  7686. },
  7687. "description": {
  7688. "type": "string"
  7689. },
  7690. "agent": {
  7691. "type": "string"
  7692. },
  7693. "model": {
  7694. "type": "object",
  7695. "properties": {
  7696. "providerID": {
  7697. "type": "string"
  7698. },
  7699. "modelID": {
  7700. "type": "string"
  7701. }
  7702. },
  7703. "required": ["providerID", "modelID"]
  7704. },
  7705. "command": {
  7706. "type": "string"
  7707. }
  7708. },
  7709. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  7710. },
  7711. "ReasoningPart": {
  7712. "type": "object",
  7713. "properties": {
  7714. "id": {
  7715. "type": "string"
  7716. },
  7717. "sessionID": {
  7718. "type": "string"
  7719. },
  7720. "messageID": {
  7721. "type": "string"
  7722. },
  7723. "type": {
  7724. "type": "string",
  7725. "const": "reasoning"
  7726. },
  7727. "text": {
  7728. "type": "string"
  7729. },
  7730. "metadata": {
  7731. "type": "object",
  7732. "propertyNames": {
  7733. "type": "string"
  7734. },
  7735. "additionalProperties": {}
  7736. },
  7737. "time": {
  7738. "type": "object",
  7739. "properties": {
  7740. "start": {
  7741. "type": "number"
  7742. },
  7743. "end": {
  7744. "type": "number"
  7745. }
  7746. },
  7747. "required": ["start"]
  7748. }
  7749. },
  7750. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  7751. },
  7752. "FilePartSourceText": {
  7753. "type": "object",
  7754. "properties": {
  7755. "value": {
  7756. "type": "string"
  7757. },
  7758. "start": {
  7759. "type": "integer",
  7760. "minimum": -9007199254740991,
  7761. "maximum": 9007199254740991
  7762. },
  7763. "end": {
  7764. "type": "integer",
  7765. "minimum": -9007199254740991,
  7766. "maximum": 9007199254740991
  7767. }
  7768. },
  7769. "required": ["value", "start", "end"]
  7770. },
  7771. "FileSource": {
  7772. "type": "object",
  7773. "properties": {
  7774. "text": {
  7775. "$ref": "#/components/schemas/FilePartSourceText"
  7776. },
  7777. "type": {
  7778. "type": "string",
  7779. "const": "file"
  7780. },
  7781. "path": {
  7782. "type": "string"
  7783. }
  7784. },
  7785. "required": ["text", "type", "path"]
  7786. },
  7787. "Range": {
  7788. "type": "object",
  7789. "properties": {
  7790. "start": {
  7791. "type": "object",
  7792. "properties": {
  7793. "line": {
  7794. "type": "number"
  7795. },
  7796. "character": {
  7797. "type": "number"
  7798. }
  7799. },
  7800. "required": ["line", "character"]
  7801. },
  7802. "end": {
  7803. "type": "object",
  7804. "properties": {
  7805. "line": {
  7806. "type": "number"
  7807. },
  7808. "character": {
  7809. "type": "number"
  7810. }
  7811. },
  7812. "required": ["line", "character"]
  7813. }
  7814. },
  7815. "required": ["start", "end"]
  7816. },
  7817. "SymbolSource": {
  7818. "type": "object",
  7819. "properties": {
  7820. "text": {
  7821. "$ref": "#/components/schemas/FilePartSourceText"
  7822. },
  7823. "type": {
  7824. "type": "string",
  7825. "const": "symbol"
  7826. },
  7827. "path": {
  7828. "type": "string"
  7829. },
  7830. "range": {
  7831. "$ref": "#/components/schemas/Range"
  7832. },
  7833. "name": {
  7834. "type": "string"
  7835. },
  7836. "kind": {
  7837. "type": "integer",
  7838. "minimum": -9007199254740991,
  7839. "maximum": 9007199254740991
  7840. }
  7841. },
  7842. "required": ["text", "type", "path", "range", "name", "kind"]
  7843. },
  7844. "ResourceSource": {
  7845. "type": "object",
  7846. "properties": {
  7847. "text": {
  7848. "$ref": "#/components/schemas/FilePartSourceText"
  7849. },
  7850. "type": {
  7851. "type": "string",
  7852. "const": "resource"
  7853. },
  7854. "clientName": {
  7855. "type": "string"
  7856. },
  7857. "uri": {
  7858. "type": "string"
  7859. }
  7860. },
  7861. "required": ["text", "type", "clientName", "uri"]
  7862. },
  7863. "FilePartSource": {
  7864. "anyOf": [
  7865. {
  7866. "$ref": "#/components/schemas/FileSource"
  7867. },
  7868. {
  7869. "$ref": "#/components/schemas/SymbolSource"
  7870. },
  7871. {
  7872. "$ref": "#/components/schemas/ResourceSource"
  7873. }
  7874. ]
  7875. },
  7876. "FilePart": {
  7877. "type": "object",
  7878. "properties": {
  7879. "id": {
  7880. "type": "string"
  7881. },
  7882. "sessionID": {
  7883. "type": "string"
  7884. },
  7885. "messageID": {
  7886. "type": "string"
  7887. },
  7888. "type": {
  7889. "type": "string",
  7890. "const": "file"
  7891. },
  7892. "mime": {
  7893. "type": "string"
  7894. },
  7895. "filename": {
  7896. "type": "string"
  7897. },
  7898. "url": {
  7899. "type": "string"
  7900. },
  7901. "source": {
  7902. "$ref": "#/components/schemas/FilePartSource"
  7903. }
  7904. },
  7905. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  7906. },
  7907. "ToolStatePending": {
  7908. "type": "object",
  7909. "properties": {
  7910. "status": {
  7911. "type": "string",
  7912. "const": "pending"
  7913. },
  7914. "input": {
  7915. "type": "object",
  7916. "propertyNames": {
  7917. "type": "string"
  7918. },
  7919. "additionalProperties": {}
  7920. },
  7921. "raw": {
  7922. "type": "string"
  7923. }
  7924. },
  7925. "required": ["status", "input", "raw"]
  7926. },
  7927. "ToolStateRunning": {
  7928. "type": "object",
  7929. "properties": {
  7930. "status": {
  7931. "type": "string",
  7932. "const": "running"
  7933. },
  7934. "input": {
  7935. "type": "object",
  7936. "propertyNames": {
  7937. "type": "string"
  7938. },
  7939. "additionalProperties": {}
  7940. },
  7941. "title": {
  7942. "type": "string"
  7943. },
  7944. "metadata": {
  7945. "type": "object",
  7946. "propertyNames": {
  7947. "type": "string"
  7948. },
  7949. "additionalProperties": {}
  7950. },
  7951. "time": {
  7952. "type": "object",
  7953. "properties": {
  7954. "start": {
  7955. "type": "number"
  7956. }
  7957. },
  7958. "required": ["start"]
  7959. }
  7960. },
  7961. "required": ["status", "input", "time"]
  7962. },
  7963. "ToolStateCompleted": {
  7964. "type": "object",
  7965. "properties": {
  7966. "status": {
  7967. "type": "string",
  7968. "const": "completed"
  7969. },
  7970. "input": {
  7971. "type": "object",
  7972. "propertyNames": {
  7973. "type": "string"
  7974. },
  7975. "additionalProperties": {}
  7976. },
  7977. "output": {
  7978. "type": "string"
  7979. },
  7980. "title": {
  7981. "type": "string"
  7982. },
  7983. "metadata": {
  7984. "type": "object",
  7985. "propertyNames": {
  7986. "type": "string"
  7987. },
  7988. "additionalProperties": {}
  7989. },
  7990. "time": {
  7991. "type": "object",
  7992. "properties": {
  7993. "start": {
  7994. "type": "number"
  7995. },
  7996. "end": {
  7997. "type": "number"
  7998. },
  7999. "compacted": {
  8000. "type": "number"
  8001. }
  8002. },
  8003. "required": ["start", "end"]
  8004. },
  8005. "attachments": {
  8006. "type": "array",
  8007. "items": {
  8008. "$ref": "#/components/schemas/FilePart"
  8009. }
  8010. }
  8011. },
  8012. "required": ["status", "input", "output", "title", "metadata", "time"]
  8013. },
  8014. "ToolStateError": {
  8015. "type": "object",
  8016. "properties": {
  8017. "status": {
  8018. "type": "string",
  8019. "const": "error"
  8020. },
  8021. "input": {
  8022. "type": "object",
  8023. "propertyNames": {
  8024. "type": "string"
  8025. },
  8026. "additionalProperties": {}
  8027. },
  8028. "error": {
  8029. "type": "string"
  8030. },
  8031. "metadata": {
  8032. "type": "object",
  8033. "propertyNames": {
  8034. "type": "string"
  8035. },
  8036. "additionalProperties": {}
  8037. },
  8038. "time": {
  8039. "type": "object",
  8040. "properties": {
  8041. "start": {
  8042. "type": "number"
  8043. },
  8044. "end": {
  8045. "type": "number"
  8046. }
  8047. },
  8048. "required": ["start", "end"]
  8049. }
  8050. },
  8051. "required": ["status", "input", "error", "time"]
  8052. },
  8053. "ToolState": {
  8054. "anyOf": [
  8055. {
  8056. "$ref": "#/components/schemas/ToolStatePending"
  8057. },
  8058. {
  8059. "$ref": "#/components/schemas/ToolStateRunning"
  8060. },
  8061. {
  8062. "$ref": "#/components/schemas/ToolStateCompleted"
  8063. },
  8064. {
  8065. "$ref": "#/components/schemas/ToolStateError"
  8066. }
  8067. ]
  8068. },
  8069. "ToolPart": {
  8070. "type": "object",
  8071. "properties": {
  8072. "id": {
  8073. "type": "string"
  8074. },
  8075. "sessionID": {
  8076. "type": "string"
  8077. },
  8078. "messageID": {
  8079. "type": "string"
  8080. },
  8081. "type": {
  8082. "type": "string",
  8083. "const": "tool"
  8084. },
  8085. "callID": {
  8086. "type": "string"
  8087. },
  8088. "tool": {
  8089. "type": "string"
  8090. },
  8091. "state": {
  8092. "$ref": "#/components/schemas/ToolState"
  8093. },
  8094. "metadata": {
  8095. "type": "object",
  8096. "propertyNames": {
  8097. "type": "string"
  8098. },
  8099. "additionalProperties": {}
  8100. }
  8101. },
  8102. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  8103. },
  8104. "StepStartPart": {
  8105. "type": "object",
  8106. "properties": {
  8107. "id": {
  8108. "type": "string"
  8109. },
  8110. "sessionID": {
  8111. "type": "string"
  8112. },
  8113. "messageID": {
  8114. "type": "string"
  8115. },
  8116. "type": {
  8117. "type": "string",
  8118. "const": "step-start"
  8119. },
  8120. "snapshot": {
  8121. "type": "string"
  8122. }
  8123. },
  8124. "required": ["id", "sessionID", "messageID", "type"]
  8125. },
  8126. "StepFinishPart": {
  8127. "type": "object",
  8128. "properties": {
  8129. "id": {
  8130. "type": "string"
  8131. },
  8132. "sessionID": {
  8133. "type": "string"
  8134. },
  8135. "messageID": {
  8136. "type": "string"
  8137. },
  8138. "type": {
  8139. "type": "string",
  8140. "const": "step-finish"
  8141. },
  8142. "reason": {
  8143. "type": "string"
  8144. },
  8145. "snapshot": {
  8146. "type": "string"
  8147. },
  8148. "cost": {
  8149. "type": "number"
  8150. },
  8151. "tokens": {
  8152. "type": "object",
  8153. "properties": {
  8154. "total": {
  8155. "type": "number"
  8156. },
  8157. "input": {
  8158. "type": "number"
  8159. },
  8160. "output": {
  8161. "type": "number"
  8162. },
  8163. "reasoning": {
  8164. "type": "number"
  8165. },
  8166. "cache": {
  8167. "type": "object",
  8168. "properties": {
  8169. "read": {
  8170. "type": "number"
  8171. },
  8172. "write": {
  8173. "type": "number"
  8174. }
  8175. },
  8176. "required": ["read", "write"]
  8177. }
  8178. },
  8179. "required": ["input", "output", "reasoning", "cache"]
  8180. }
  8181. },
  8182. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  8183. },
  8184. "SnapshotPart": {
  8185. "type": "object",
  8186. "properties": {
  8187. "id": {
  8188. "type": "string"
  8189. },
  8190. "sessionID": {
  8191. "type": "string"
  8192. },
  8193. "messageID": {
  8194. "type": "string"
  8195. },
  8196. "type": {
  8197. "type": "string",
  8198. "const": "snapshot"
  8199. },
  8200. "snapshot": {
  8201. "type": "string"
  8202. }
  8203. },
  8204. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  8205. },
  8206. "PatchPart": {
  8207. "type": "object",
  8208. "properties": {
  8209. "id": {
  8210. "type": "string"
  8211. },
  8212. "sessionID": {
  8213. "type": "string"
  8214. },
  8215. "messageID": {
  8216. "type": "string"
  8217. },
  8218. "type": {
  8219. "type": "string",
  8220. "const": "patch"
  8221. },
  8222. "hash": {
  8223. "type": "string"
  8224. },
  8225. "files": {
  8226. "type": "array",
  8227. "items": {
  8228. "type": "string"
  8229. }
  8230. }
  8231. },
  8232. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  8233. },
  8234. "AgentPart": {
  8235. "type": "object",
  8236. "properties": {
  8237. "id": {
  8238. "type": "string"
  8239. },
  8240. "sessionID": {
  8241. "type": "string"
  8242. },
  8243. "messageID": {
  8244. "type": "string"
  8245. },
  8246. "type": {
  8247. "type": "string",
  8248. "const": "agent"
  8249. },
  8250. "name": {
  8251. "type": "string"
  8252. },
  8253. "source": {
  8254. "type": "object",
  8255. "properties": {
  8256. "value": {
  8257. "type": "string"
  8258. },
  8259. "start": {
  8260. "type": "integer",
  8261. "minimum": -9007199254740991,
  8262. "maximum": 9007199254740991
  8263. },
  8264. "end": {
  8265. "type": "integer",
  8266. "minimum": -9007199254740991,
  8267. "maximum": 9007199254740991
  8268. }
  8269. },
  8270. "required": ["value", "start", "end"]
  8271. }
  8272. },
  8273. "required": ["id", "sessionID", "messageID", "type", "name"]
  8274. },
  8275. "RetryPart": {
  8276. "type": "object",
  8277. "properties": {
  8278. "id": {
  8279. "type": "string"
  8280. },
  8281. "sessionID": {
  8282. "type": "string"
  8283. },
  8284. "messageID": {
  8285. "type": "string"
  8286. },
  8287. "type": {
  8288. "type": "string",
  8289. "const": "retry"
  8290. },
  8291. "attempt": {
  8292. "type": "number"
  8293. },
  8294. "error": {
  8295. "$ref": "#/components/schemas/APIError"
  8296. },
  8297. "time": {
  8298. "type": "object",
  8299. "properties": {
  8300. "created": {
  8301. "type": "number"
  8302. }
  8303. },
  8304. "required": ["created"]
  8305. }
  8306. },
  8307. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  8308. },
  8309. "CompactionPart": {
  8310. "type": "object",
  8311. "properties": {
  8312. "id": {
  8313. "type": "string"
  8314. },
  8315. "sessionID": {
  8316. "type": "string"
  8317. },
  8318. "messageID": {
  8319. "type": "string"
  8320. },
  8321. "type": {
  8322. "type": "string",
  8323. "const": "compaction"
  8324. },
  8325. "auto": {
  8326. "type": "boolean"
  8327. },
  8328. "overflow": {
  8329. "type": "boolean"
  8330. }
  8331. },
  8332. "required": ["id", "sessionID", "messageID", "type", "auto"]
  8333. },
  8334. "Part": {
  8335. "anyOf": [
  8336. {
  8337. "$ref": "#/components/schemas/TextPart"
  8338. },
  8339. {
  8340. "$ref": "#/components/schemas/SubtaskPart"
  8341. },
  8342. {
  8343. "$ref": "#/components/schemas/ReasoningPart"
  8344. },
  8345. {
  8346. "$ref": "#/components/schemas/FilePart"
  8347. },
  8348. {
  8349. "$ref": "#/components/schemas/ToolPart"
  8350. },
  8351. {
  8352. "$ref": "#/components/schemas/StepStartPart"
  8353. },
  8354. {
  8355. "$ref": "#/components/schemas/StepFinishPart"
  8356. },
  8357. {
  8358. "$ref": "#/components/schemas/SnapshotPart"
  8359. },
  8360. {
  8361. "$ref": "#/components/schemas/PatchPart"
  8362. },
  8363. {
  8364. "$ref": "#/components/schemas/AgentPart"
  8365. },
  8366. {
  8367. "$ref": "#/components/schemas/RetryPart"
  8368. },
  8369. {
  8370. "$ref": "#/components/schemas/CompactionPart"
  8371. }
  8372. ]
  8373. },
  8374. "Event.message.part.updated": {
  8375. "type": "object",
  8376. "properties": {
  8377. "type": {
  8378. "type": "string",
  8379. "const": "message.part.updated"
  8380. },
  8381. "properties": {
  8382. "type": "object",
  8383. "properties": {
  8384. "part": {
  8385. "$ref": "#/components/schemas/Part"
  8386. }
  8387. },
  8388. "required": ["part"]
  8389. }
  8390. },
  8391. "required": ["type", "properties"]
  8392. },
  8393. "Event.message.part.delta": {
  8394. "type": "object",
  8395. "properties": {
  8396. "type": {
  8397. "type": "string",
  8398. "const": "message.part.delta"
  8399. },
  8400. "properties": {
  8401. "type": "object",
  8402. "properties": {
  8403. "sessionID": {
  8404. "type": "string"
  8405. },
  8406. "messageID": {
  8407. "type": "string"
  8408. },
  8409. "partID": {
  8410. "type": "string"
  8411. },
  8412. "field": {
  8413. "type": "string"
  8414. },
  8415. "delta": {
  8416. "type": "string"
  8417. }
  8418. },
  8419. "required": ["sessionID", "messageID", "partID", "field", "delta"]
  8420. }
  8421. },
  8422. "required": ["type", "properties"]
  8423. },
  8424. "Event.message.part.removed": {
  8425. "type": "object",
  8426. "properties": {
  8427. "type": {
  8428. "type": "string",
  8429. "const": "message.part.removed"
  8430. },
  8431. "properties": {
  8432. "type": "object",
  8433. "properties": {
  8434. "sessionID": {
  8435. "type": "string"
  8436. },
  8437. "messageID": {
  8438. "type": "string"
  8439. },
  8440. "partID": {
  8441. "type": "string"
  8442. }
  8443. },
  8444. "required": ["sessionID", "messageID", "partID"]
  8445. }
  8446. },
  8447. "required": ["type", "properties"]
  8448. },
  8449. "PermissionRequest": {
  8450. "type": "object",
  8451. "properties": {
  8452. "id": {
  8453. "type": "string",
  8454. "pattern": "^per.*"
  8455. },
  8456. "sessionID": {
  8457. "type": "string",
  8458. "pattern": "^ses.*"
  8459. },
  8460. "permission": {
  8461. "type": "string"
  8462. },
  8463. "patterns": {
  8464. "type": "array",
  8465. "items": {
  8466. "type": "string"
  8467. }
  8468. },
  8469. "metadata": {
  8470. "type": "object",
  8471. "propertyNames": {
  8472. "type": "string"
  8473. },
  8474. "additionalProperties": {}
  8475. },
  8476. "always": {
  8477. "type": "array",
  8478. "items": {
  8479. "type": "string"
  8480. }
  8481. },
  8482. "tool": {
  8483. "type": "object",
  8484. "properties": {
  8485. "messageID": {
  8486. "type": "string"
  8487. },
  8488. "callID": {
  8489. "type": "string"
  8490. }
  8491. },
  8492. "required": ["messageID", "callID"]
  8493. }
  8494. },
  8495. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"]
  8496. },
  8497. "Event.permission.asked": {
  8498. "type": "object",
  8499. "properties": {
  8500. "type": {
  8501. "type": "string",
  8502. "const": "permission.asked"
  8503. },
  8504. "properties": {
  8505. "$ref": "#/components/schemas/PermissionRequest"
  8506. }
  8507. },
  8508. "required": ["type", "properties"]
  8509. },
  8510. "Event.permission.replied": {
  8511. "type": "object",
  8512. "properties": {
  8513. "type": {
  8514. "type": "string",
  8515. "const": "permission.replied"
  8516. },
  8517. "properties": {
  8518. "type": "object",
  8519. "properties": {
  8520. "sessionID": {
  8521. "type": "string"
  8522. },
  8523. "requestID": {
  8524. "type": "string"
  8525. },
  8526. "reply": {
  8527. "type": "string",
  8528. "enum": ["once", "always", "reject"]
  8529. }
  8530. },
  8531. "required": ["sessionID", "requestID", "reply"]
  8532. }
  8533. },
  8534. "required": ["type", "properties"]
  8535. },
  8536. "SessionStatus": {
  8537. "anyOf": [
  8538. {
  8539. "type": "object",
  8540. "properties": {
  8541. "type": {
  8542. "type": "string",
  8543. "const": "idle"
  8544. }
  8545. },
  8546. "required": ["type"]
  8547. },
  8548. {
  8549. "type": "object",
  8550. "properties": {
  8551. "type": {
  8552. "type": "string",
  8553. "const": "retry"
  8554. },
  8555. "attempt": {
  8556. "type": "number"
  8557. },
  8558. "message": {
  8559. "type": "string"
  8560. },
  8561. "next": {
  8562. "type": "number"
  8563. }
  8564. },
  8565. "required": ["type", "attempt", "message", "next"]
  8566. },
  8567. {
  8568. "type": "object",
  8569. "properties": {
  8570. "type": {
  8571. "type": "string",
  8572. "const": "busy"
  8573. }
  8574. },
  8575. "required": ["type"]
  8576. }
  8577. ]
  8578. },
  8579. "Event.session.status": {
  8580. "type": "object",
  8581. "properties": {
  8582. "type": {
  8583. "type": "string",
  8584. "const": "session.status"
  8585. },
  8586. "properties": {
  8587. "type": "object",
  8588. "properties": {
  8589. "sessionID": {
  8590. "type": "string"
  8591. },
  8592. "status": {
  8593. "$ref": "#/components/schemas/SessionStatus"
  8594. }
  8595. },
  8596. "required": ["sessionID", "status"]
  8597. }
  8598. },
  8599. "required": ["type", "properties"]
  8600. },
  8601. "Event.session.idle": {
  8602. "type": "object",
  8603. "properties": {
  8604. "type": {
  8605. "type": "string",
  8606. "const": "session.idle"
  8607. },
  8608. "properties": {
  8609. "type": "object",
  8610. "properties": {
  8611. "sessionID": {
  8612. "type": "string"
  8613. }
  8614. },
  8615. "required": ["sessionID"]
  8616. }
  8617. },
  8618. "required": ["type", "properties"]
  8619. },
  8620. "QuestionOption": {
  8621. "type": "object",
  8622. "properties": {
  8623. "label": {
  8624. "description": "Display text (1-5 words, concise)",
  8625. "type": "string"
  8626. },
  8627. "description": {
  8628. "description": "Explanation of choice",
  8629. "type": "string"
  8630. }
  8631. },
  8632. "required": ["label", "description"]
  8633. },
  8634. "QuestionInfo": {
  8635. "type": "object",
  8636. "properties": {
  8637. "question": {
  8638. "description": "Complete question",
  8639. "type": "string"
  8640. },
  8641. "header": {
  8642. "description": "Very short label (max 30 chars)",
  8643. "type": "string"
  8644. },
  8645. "options": {
  8646. "description": "Available choices",
  8647. "type": "array",
  8648. "items": {
  8649. "$ref": "#/components/schemas/QuestionOption"
  8650. }
  8651. },
  8652. "multiple": {
  8653. "description": "Allow selecting multiple choices",
  8654. "type": "boolean"
  8655. },
  8656. "custom": {
  8657. "description": "Allow typing a custom answer (default: true)",
  8658. "type": "boolean"
  8659. }
  8660. },
  8661. "required": ["question", "header", "options"]
  8662. },
  8663. "QuestionRequest": {
  8664. "type": "object",
  8665. "properties": {
  8666. "id": {
  8667. "type": "string",
  8668. "pattern": "^que.*"
  8669. },
  8670. "sessionID": {
  8671. "type": "string",
  8672. "pattern": "^ses.*"
  8673. },
  8674. "questions": {
  8675. "description": "Questions to ask",
  8676. "type": "array",
  8677. "items": {
  8678. "$ref": "#/components/schemas/QuestionInfo"
  8679. }
  8680. },
  8681. "tool": {
  8682. "type": "object",
  8683. "properties": {
  8684. "messageID": {
  8685. "type": "string"
  8686. },
  8687. "callID": {
  8688. "type": "string"
  8689. }
  8690. },
  8691. "required": ["messageID", "callID"]
  8692. }
  8693. },
  8694. "required": ["id", "sessionID", "questions"]
  8695. },
  8696. "Event.question.asked": {
  8697. "type": "object",
  8698. "properties": {
  8699. "type": {
  8700. "type": "string",
  8701. "const": "question.asked"
  8702. },
  8703. "properties": {
  8704. "$ref": "#/components/schemas/QuestionRequest"
  8705. }
  8706. },
  8707. "required": ["type", "properties"]
  8708. },
  8709. "QuestionAnswer": {
  8710. "type": "array",
  8711. "items": {
  8712. "type": "string"
  8713. }
  8714. },
  8715. "Event.question.replied": {
  8716. "type": "object",
  8717. "properties": {
  8718. "type": {
  8719. "type": "string",
  8720. "const": "question.replied"
  8721. },
  8722. "properties": {
  8723. "type": "object",
  8724. "properties": {
  8725. "sessionID": {
  8726. "type": "string"
  8727. },
  8728. "requestID": {
  8729. "type": "string"
  8730. },
  8731. "answers": {
  8732. "type": "array",
  8733. "items": {
  8734. "$ref": "#/components/schemas/QuestionAnswer"
  8735. }
  8736. }
  8737. },
  8738. "required": ["sessionID", "requestID", "answers"]
  8739. }
  8740. },
  8741. "required": ["type", "properties"]
  8742. },
  8743. "Event.question.rejected": {
  8744. "type": "object",
  8745. "properties": {
  8746. "type": {
  8747. "type": "string",
  8748. "const": "question.rejected"
  8749. },
  8750. "properties": {
  8751. "type": "object",
  8752. "properties": {
  8753. "sessionID": {
  8754. "type": "string"
  8755. },
  8756. "requestID": {
  8757. "type": "string"
  8758. }
  8759. },
  8760. "required": ["sessionID", "requestID"]
  8761. }
  8762. },
  8763. "required": ["type", "properties"]
  8764. },
  8765. "Event.session.compacted": {
  8766. "type": "object",
  8767. "properties": {
  8768. "type": {
  8769. "type": "string",
  8770. "const": "session.compacted"
  8771. },
  8772. "properties": {
  8773. "type": "object",
  8774. "properties": {
  8775. "sessionID": {
  8776. "type": "string"
  8777. }
  8778. },
  8779. "required": ["sessionID"]
  8780. }
  8781. },
  8782. "required": ["type", "properties"]
  8783. },
  8784. "Event.file.watcher.updated": {
  8785. "type": "object",
  8786. "properties": {
  8787. "type": {
  8788. "type": "string",
  8789. "const": "file.watcher.updated"
  8790. },
  8791. "properties": {
  8792. "type": "object",
  8793. "properties": {
  8794. "file": {
  8795. "type": "string"
  8796. },
  8797. "event": {
  8798. "anyOf": [
  8799. {
  8800. "type": "string",
  8801. "const": "add"
  8802. },
  8803. {
  8804. "type": "string",
  8805. "const": "change"
  8806. },
  8807. {
  8808. "type": "string",
  8809. "const": "unlink"
  8810. }
  8811. ]
  8812. }
  8813. },
  8814. "required": ["file", "event"]
  8815. }
  8816. },
  8817. "required": ["type", "properties"]
  8818. },
  8819. "Todo": {
  8820. "type": "object",
  8821. "properties": {
  8822. "content": {
  8823. "description": "Brief description of the task",
  8824. "type": "string"
  8825. },
  8826. "status": {
  8827. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  8828. "type": "string"
  8829. },
  8830. "priority": {
  8831. "description": "Priority level of the task: high, medium, low",
  8832. "type": "string"
  8833. }
  8834. },
  8835. "required": ["content", "status", "priority"]
  8836. },
  8837. "Event.todo.updated": {
  8838. "type": "object",
  8839. "properties": {
  8840. "type": {
  8841. "type": "string",
  8842. "const": "todo.updated"
  8843. },
  8844. "properties": {
  8845. "type": "object",
  8846. "properties": {
  8847. "sessionID": {
  8848. "type": "string"
  8849. },
  8850. "todos": {
  8851. "type": "array",
  8852. "items": {
  8853. "$ref": "#/components/schemas/Todo"
  8854. }
  8855. }
  8856. },
  8857. "required": ["sessionID", "todos"]
  8858. }
  8859. },
  8860. "required": ["type", "properties"]
  8861. },
  8862. "Event.tui.prompt.append": {
  8863. "type": "object",
  8864. "properties": {
  8865. "type": {
  8866. "type": "string",
  8867. "const": "tui.prompt.append"
  8868. },
  8869. "properties": {
  8870. "type": "object",
  8871. "properties": {
  8872. "text": {
  8873. "type": "string"
  8874. }
  8875. },
  8876. "required": ["text"]
  8877. }
  8878. },
  8879. "required": ["type", "properties"]
  8880. },
  8881. "Event.tui.command.execute": {
  8882. "type": "object",
  8883. "properties": {
  8884. "type": {
  8885. "type": "string",
  8886. "const": "tui.command.execute"
  8887. },
  8888. "properties": {
  8889. "type": "object",
  8890. "properties": {
  8891. "command": {
  8892. "anyOf": [
  8893. {
  8894. "type": "string",
  8895. "enum": [
  8896. "session.list",
  8897. "session.new",
  8898. "session.share",
  8899. "session.interrupt",
  8900. "session.compact",
  8901. "session.page.up",
  8902. "session.page.down",
  8903. "session.line.up",
  8904. "session.line.down",
  8905. "session.half.page.up",
  8906. "session.half.page.down",
  8907. "session.first",
  8908. "session.last",
  8909. "prompt.clear",
  8910. "prompt.submit",
  8911. "agent.cycle"
  8912. ]
  8913. },
  8914. {
  8915. "type": "string"
  8916. }
  8917. ]
  8918. }
  8919. },
  8920. "required": ["command"]
  8921. }
  8922. },
  8923. "required": ["type", "properties"]
  8924. },
  8925. "Event.tui.toast.show": {
  8926. "type": "object",
  8927. "properties": {
  8928. "type": {
  8929. "type": "string",
  8930. "const": "tui.toast.show"
  8931. },
  8932. "properties": {
  8933. "type": "object",
  8934. "properties": {
  8935. "title": {
  8936. "type": "string"
  8937. },
  8938. "message": {
  8939. "type": "string"
  8940. },
  8941. "variant": {
  8942. "type": "string",
  8943. "enum": ["info", "success", "warning", "error"]
  8944. },
  8945. "duration": {
  8946. "description": "Duration in milliseconds",
  8947. "default": 5000,
  8948. "type": "number"
  8949. }
  8950. },
  8951. "required": ["message", "variant"]
  8952. }
  8953. },
  8954. "required": ["type", "properties"]
  8955. },
  8956. "Event.tui.session.select": {
  8957. "type": "object",
  8958. "properties": {
  8959. "type": {
  8960. "type": "string",
  8961. "const": "tui.session.select"
  8962. },
  8963. "properties": {
  8964. "type": "object",
  8965. "properties": {
  8966. "sessionID": {
  8967. "description": "Session ID to navigate to",
  8968. "type": "string",
  8969. "pattern": "^ses"
  8970. }
  8971. },
  8972. "required": ["sessionID"]
  8973. }
  8974. },
  8975. "required": ["type", "properties"]
  8976. },
  8977. "Event.mcp.tools.changed": {
  8978. "type": "object",
  8979. "properties": {
  8980. "type": {
  8981. "type": "string",
  8982. "const": "mcp.tools.changed"
  8983. },
  8984. "properties": {
  8985. "type": "object",
  8986. "properties": {
  8987. "server": {
  8988. "type": "string"
  8989. }
  8990. },
  8991. "required": ["server"]
  8992. }
  8993. },
  8994. "required": ["type", "properties"]
  8995. },
  8996. "Event.mcp.browser.open.failed": {
  8997. "type": "object",
  8998. "properties": {
  8999. "type": {
  9000. "type": "string",
  9001. "const": "mcp.browser.open.failed"
  9002. },
  9003. "properties": {
  9004. "type": "object",
  9005. "properties": {
  9006. "mcpName": {
  9007. "type": "string"
  9008. },
  9009. "url": {
  9010. "type": "string"
  9011. }
  9012. },
  9013. "required": ["mcpName", "url"]
  9014. }
  9015. },
  9016. "required": ["type", "properties"]
  9017. },
  9018. "Event.command.executed": {
  9019. "type": "object",
  9020. "properties": {
  9021. "type": {
  9022. "type": "string",
  9023. "const": "command.executed"
  9024. },
  9025. "properties": {
  9026. "type": "object",
  9027. "properties": {
  9028. "name": {
  9029. "type": "string"
  9030. },
  9031. "sessionID": {
  9032. "type": "string",
  9033. "pattern": "^ses.*"
  9034. },
  9035. "arguments": {
  9036. "type": "string"
  9037. },
  9038. "messageID": {
  9039. "type": "string",
  9040. "pattern": "^msg.*"
  9041. }
  9042. },
  9043. "required": ["name", "sessionID", "arguments", "messageID"]
  9044. }
  9045. },
  9046. "required": ["type", "properties"]
  9047. },
  9048. "PermissionAction": {
  9049. "type": "string",
  9050. "enum": ["allow", "deny", "ask"]
  9051. },
  9052. "PermissionRule": {
  9053. "type": "object",
  9054. "properties": {
  9055. "permission": {
  9056. "type": "string"
  9057. },
  9058. "pattern": {
  9059. "type": "string"
  9060. },
  9061. "action": {
  9062. "$ref": "#/components/schemas/PermissionAction"
  9063. }
  9064. },
  9065. "required": ["permission", "pattern", "action"]
  9066. },
  9067. "PermissionRuleset": {
  9068. "type": "array",
  9069. "items": {
  9070. "$ref": "#/components/schemas/PermissionRule"
  9071. }
  9072. },
  9073. "Session": {
  9074. "type": "object",
  9075. "properties": {
  9076. "id": {
  9077. "type": "string",
  9078. "pattern": "^ses.*"
  9079. },
  9080. "slug": {
  9081. "type": "string"
  9082. },
  9083. "projectID": {
  9084. "type": "string"
  9085. },
  9086. "workspaceID": {
  9087. "type": "string"
  9088. },
  9089. "directory": {
  9090. "type": "string"
  9091. },
  9092. "parentID": {
  9093. "type": "string",
  9094. "pattern": "^ses.*"
  9095. },
  9096. "summary": {
  9097. "type": "object",
  9098. "properties": {
  9099. "additions": {
  9100. "type": "number"
  9101. },
  9102. "deletions": {
  9103. "type": "number"
  9104. },
  9105. "files": {
  9106. "type": "number"
  9107. },
  9108. "diffs": {
  9109. "type": "array",
  9110. "items": {
  9111. "$ref": "#/components/schemas/FileDiff"
  9112. }
  9113. }
  9114. },
  9115. "required": ["additions", "deletions", "files"]
  9116. },
  9117. "share": {
  9118. "type": "object",
  9119. "properties": {
  9120. "url": {
  9121. "type": "string"
  9122. }
  9123. },
  9124. "required": ["url"]
  9125. },
  9126. "title": {
  9127. "type": "string"
  9128. },
  9129. "version": {
  9130. "type": "string"
  9131. },
  9132. "time": {
  9133. "type": "object",
  9134. "properties": {
  9135. "created": {
  9136. "type": "number"
  9137. },
  9138. "updated": {
  9139. "type": "number"
  9140. },
  9141. "compacting": {
  9142. "type": "number"
  9143. },
  9144. "archived": {
  9145. "type": "number"
  9146. }
  9147. },
  9148. "required": ["created", "updated"]
  9149. },
  9150. "permission": {
  9151. "$ref": "#/components/schemas/PermissionRuleset"
  9152. },
  9153. "revert": {
  9154. "type": "object",
  9155. "properties": {
  9156. "messageID": {
  9157. "type": "string"
  9158. },
  9159. "partID": {
  9160. "type": "string"
  9161. },
  9162. "snapshot": {
  9163. "type": "string"
  9164. },
  9165. "diff": {
  9166. "type": "string"
  9167. }
  9168. },
  9169. "required": ["messageID"]
  9170. }
  9171. },
  9172. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"]
  9173. },
  9174. "Event.session.created": {
  9175. "type": "object",
  9176. "properties": {
  9177. "type": {
  9178. "type": "string",
  9179. "const": "session.created"
  9180. },
  9181. "properties": {
  9182. "type": "object",
  9183. "properties": {
  9184. "info": {
  9185. "$ref": "#/components/schemas/Session"
  9186. }
  9187. },
  9188. "required": ["info"]
  9189. }
  9190. },
  9191. "required": ["type", "properties"]
  9192. },
  9193. "Event.session.updated": {
  9194. "type": "object",
  9195. "properties": {
  9196. "type": {
  9197. "type": "string",
  9198. "const": "session.updated"
  9199. },
  9200. "properties": {
  9201. "type": "object",
  9202. "properties": {
  9203. "info": {
  9204. "$ref": "#/components/schemas/Session"
  9205. }
  9206. },
  9207. "required": ["info"]
  9208. }
  9209. },
  9210. "required": ["type", "properties"]
  9211. },
  9212. "Event.session.deleted": {
  9213. "type": "object",
  9214. "properties": {
  9215. "type": {
  9216. "type": "string",
  9217. "const": "session.deleted"
  9218. },
  9219. "properties": {
  9220. "type": "object",
  9221. "properties": {
  9222. "info": {
  9223. "$ref": "#/components/schemas/Session"
  9224. }
  9225. },
  9226. "required": ["info"]
  9227. }
  9228. },
  9229. "required": ["type", "properties"]
  9230. },
  9231. "Event.session.diff": {
  9232. "type": "object",
  9233. "properties": {
  9234. "type": {
  9235. "type": "string",
  9236. "const": "session.diff"
  9237. },
  9238. "properties": {
  9239. "type": "object",
  9240. "properties": {
  9241. "sessionID": {
  9242. "type": "string"
  9243. },
  9244. "diff": {
  9245. "type": "array",
  9246. "items": {
  9247. "$ref": "#/components/schemas/FileDiff"
  9248. }
  9249. }
  9250. },
  9251. "required": ["sessionID", "diff"]
  9252. }
  9253. },
  9254. "required": ["type", "properties"]
  9255. },
  9256. "Event.session.error": {
  9257. "type": "object",
  9258. "properties": {
  9259. "type": {
  9260. "type": "string",
  9261. "const": "session.error"
  9262. },
  9263. "properties": {
  9264. "type": "object",
  9265. "properties": {
  9266. "sessionID": {
  9267. "type": "string"
  9268. },
  9269. "error": {
  9270. "anyOf": [
  9271. {
  9272. "$ref": "#/components/schemas/ProviderAuthError"
  9273. },
  9274. {
  9275. "$ref": "#/components/schemas/UnknownError"
  9276. },
  9277. {
  9278. "$ref": "#/components/schemas/MessageOutputLengthError"
  9279. },
  9280. {
  9281. "$ref": "#/components/schemas/MessageAbortedError"
  9282. },
  9283. {
  9284. "$ref": "#/components/schemas/StructuredOutputError"
  9285. },
  9286. {
  9287. "$ref": "#/components/schemas/ContextOverflowError"
  9288. },
  9289. {
  9290. "$ref": "#/components/schemas/APIError"
  9291. }
  9292. ]
  9293. }
  9294. }
  9295. }
  9296. },
  9297. "required": ["type", "properties"]
  9298. },
  9299. "Event.vcs.branch.updated": {
  9300. "type": "object",
  9301. "properties": {
  9302. "type": {
  9303. "type": "string",
  9304. "const": "vcs.branch.updated"
  9305. },
  9306. "properties": {
  9307. "type": "object",
  9308. "properties": {
  9309. "branch": {
  9310. "type": "string"
  9311. }
  9312. }
  9313. }
  9314. },
  9315. "required": ["type", "properties"]
  9316. },
  9317. "Event.workspace.ready": {
  9318. "type": "object",
  9319. "properties": {
  9320. "type": {
  9321. "type": "string",
  9322. "const": "workspace.ready"
  9323. },
  9324. "properties": {
  9325. "type": "object",
  9326. "properties": {
  9327. "name": {
  9328. "type": "string"
  9329. }
  9330. },
  9331. "required": ["name"]
  9332. }
  9333. },
  9334. "required": ["type", "properties"]
  9335. },
  9336. "Event.workspace.failed": {
  9337. "type": "object",
  9338. "properties": {
  9339. "type": {
  9340. "type": "string",
  9341. "const": "workspace.failed"
  9342. },
  9343. "properties": {
  9344. "type": "object",
  9345. "properties": {
  9346. "message": {
  9347. "type": "string"
  9348. }
  9349. },
  9350. "required": ["message"]
  9351. }
  9352. },
  9353. "required": ["type", "properties"]
  9354. },
  9355. "Pty": {
  9356. "type": "object",
  9357. "properties": {
  9358. "id": {
  9359. "type": "string",
  9360. "pattern": "^pty.*"
  9361. },
  9362. "title": {
  9363. "type": "string"
  9364. },
  9365. "command": {
  9366. "type": "string"
  9367. },
  9368. "args": {
  9369. "type": "array",
  9370. "items": {
  9371. "type": "string"
  9372. }
  9373. },
  9374. "cwd": {
  9375. "type": "string"
  9376. },
  9377. "status": {
  9378. "type": "string",
  9379. "enum": ["running", "exited"]
  9380. },
  9381. "pid": {
  9382. "type": "number"
  9383. }
  9384. },
  9385. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  9386. },
  9387. "Event.pty.created": {
  9388. "type": "object",
  9389. "properties": {
  9390. "type": {
  9391. "type": "string",
  9392. "const": "pty.created"
  9393. },
  9394. "properties": {
  9395. "type": "object",
  9396. "properties": {
  9397. "info": {
  9398. "$ref": "#/components/schemas/Pty"
  9399. }
  9400. },
  9401. "required": ["info"]
  9402. }
  9403. },
  9404. "required": ["type", "properties"]
  9405. },
  9406. "Event.pty.updated": {
  9407. "type": "object",
  9408. "properties": {
  9409. "type": {
  9410. "type": "string",
  9411. "const": "pty.updated"
  9412. },
  9413. "properties": {
  9414. "type": "object",
  9415. "properties": {
  9416. "info": {
  9417. "$ref": "#/components/schemas/Pty"
  9418. }
  9419. },
  9420. "required": ["info"]
  9421. }
  9422. },
  9423. "required": ["type", "properties"]
  9424. },
  9425. "Event.pty.exited": {
  9426. "type": "object",
  9427. "properties": {
  9428. "type": {
  9429. "type": "string",
  9430. "const": "pty.exited"
  9431. },
  9432. "properties": {
  9433. "type": "object",
  9434. "properties": {
  9435. "id": {
  9436. "type": "string",
  9437. "pattern": "^pty.*"
  9438. },
  9439. "exitCode": {
  9440. "type": "number"
  9441. }
  9442. },
  9443. "required": ["id", "exitCode"]
  9444. }
  9445. },
  9446. "required": ["type", "properties"]
  9447. },
  9448. "Event.pty.deleted": {
  9449. "type": "object",
  9450. "properties": {
  9451. "type": {
  9452. "type": "string",
  9453. "const": "pty.deleted"
  9454. },
  9455. "properties": {
  9456. "type": "object",
  9457. "properties": {
  9458. "id": {
  9459. "type": "string",
  9460. "pattern": "^pty.*"
  9461. }
  9462. },
  9463. "required": ["id"]
  9464. }
  9465. },
  9466. "required": ["type", "properties"]
  9467. },
  9468. "Event.worktree.ready": {
  9469. "type": "object",
  9470. "properties": {
  9471. "type": {
  9472. "type": "string",
  9473. "const": "worktree.ready"
  9474. },
  9475. "properties": {
  9476. "type": "object",
  9477. "properties": {
  9478. "name": {
  9479. "type": "string"
  9480. },
  9481. "branch": {
  9482. "type": "string"
  9483. }
  9484. },
  9485. "required": ["name", "branch"]
  9486. }
  9487. },
  9488. "required": ["type", "properties"]
  9489. },
  9490. "Event.worktree.failed": {
  9491. "type": "object",
  9492. "properties": {
  9493. "type": {
  9494. "type": "string",
  9495. "const": "worktree.failed"
  9496. },
  9497. "properties": {
  9498. "type": "object",
  9499. "properties": {
  9500. "message": {
  9501. "type": "string"
  9502. }
  9503. },
  9504. "required": ["message"]
  9505. }
  9506. },
  9507. "required": ["type", "properties"]
  9508. },
  9509. "Event": {
  9510. "anyOf": [
  9511. {
  9512. "$ref": "#/components/schemas/Event.installation.updated"
  9513. },
  9514. {
  9515. "$ref": "#/components/schemas/Event.installation.update-available"
  9516. },
  9517. {
  9518. "$ref": "#/components/schemas/Event.project.updated"
  9519. },
  9520. {
  9521. "$ref": "#/components/schemas/Event.server.instance.disposed"
  9522. },
  9523. {
  9524. "$ref": "#/components/schemas/Event.server.connected"
  9525. },
  9526. {
  9527. "$ref": "#/components/schemas/Event.global.disposed"
  9528. },
  9529. {
  9530. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  9531. },
  9532. {
  9533. "$ref": "#/components/schemas/Event.lsp.updated"
  9534. },
  9535. {
  9536. "$ref": "#/components/schemas/Event.file.edited"
  9537. },
  9538. {
  9539. "$ref": "#/components/schemas/Event.message.updated"
  9540. },
  9541. {
  9542. "$ref": "#/components/schemas/Event.message.removed"
  9543. },
  9544. {
  9545. "$ref": "#/components/schemas/Event.message.part.updated"
  9546. },
  9547. {
  9548. "$ref": "#/components/schemas/Event.message.part.delta"
  9549. },
  9550. {
  9551. "$ref": "#/components/schemas/Event.message.part.removed"
  9552. },
  9553. {
  9554. "$ref": "#/components/schemas/Event.permission.asked"
  9555. },
  9556. {
  9557. "$ref": "#/components/schemas/Event.permission.replied"
  9558. },
  9559. {
  9560. "$ref": "#/components/schemas/Event.session.status"
  9561. },
  9562. {
  9563. "$ref": "#/components/schemas/Event.session.idle"
  9564. },
  9565. {
  9566. "$ref": "#/components/schemas/Event.question.asked"
  9567. },
  9568. {
  9569. "$ref": "#/components/schemas/Event.question.replied"
  9570. },
  9571. {
  9572. "$ref": "#/components/schemas/Event.question.rejected"
  9573. },
  9574. {
  9575. "$ref": "#/components/schemas/Event.session.compacted"
  9576. },
  9577. {
  9578. "$ref": "#/components/schemas/Event.file.watcher.updated"
  9579. },
  9580. {
  9581. "$ref": "#/components/schemas/Event.todo.updated"
  9582. },
  9583. {
  9584. "$ref": "#/components/schemas/Event.tui.prompt.append"
  9585. },
  9586. {
  9587. "$ref": "#/components/schemas/Event.tui.command.execute"
  9588. },
  9589. {
  9590. "$ref": "#/components/schemas/Event.tui.toast.show"
  9591. },
  9592. {
  9593. "$ref": "#/components/schemas/Event.tui.session.select"
  9594. },
  9595. {
  9596. "$ref": "#/components/schemas/Event.mcp.tools.changed"
  9597. },
  9598. {
  9599. "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
  9600. },
  9601. {
  9602. "$ref": "#/components/schemas/Event.command.executed"
  9603. },
  9604. {
  9605. "$ref": "#/components/schemas/Event.session.created"
  9606. },
  9607. {
  9608. "$ref": "#/components/schemas/Event.session.updated"
  9609. },
  9610. {
  9611. "$ref": "#/components/schemas/Event.session.deleted"
  9612. },
  9613. {
  9614. "$ref": "#/components/schemas/Event.session.diff"
  9615. },
  9616. {
  9617. "$ref": "#/components/schemas/Event.session.error"
  9618. },
  9619. {
  9620. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  9621. },
  9622. {
  9623. "$ref": "#/components/schemas/Event.workspace.ready"
  9624. },
  9625. {
  9626. "$ref": "#/components/schemas/Event.workspace.failed"
  9627. },
  9628. {
  9629. "$ref": "#/components/schemas/Event.pty.created"
  9630. },
  9631. {
  9632. "$ref": "#/components/schemas/Event.pty.updated"
  9633. },
  9634. {
  9635. "$ref": "#/components/schemas/Event.pty.exited"
  9636. },
  9637. {
  9638. "$ref": "#/components/schemas/Event.pty.deleted"
  9639. },
  9640. {
  9641. "$ref": "#/components/schemas/Event.worktree.ready"
  9642. },
  9643. {
  9644. "$ref": "#/components/schemas/Event.worktree.failed"
  9645. }
  9646. ]
  9647. },
  9648. "GlobalEvent": {
  9649. "type": "object",
  9650. "properties": {
  9651. "directory": {
  9652. "type": "string"
  9653. },
  9654. "payload": {
  9655. "$ref": "#/components/schemas/Event"
  9656. }
  9657. },
  9658. "required": ["directory", "payload"]
  9659. },
  9660. "LogLevel": {
  9661. "description": "Log level",
  9662. "type": "string",
  9663. "enum": ["DEBUG", "INFO", "WARN", "ERROR"]
  9664. },
  9665. "ServerConfig": {
  9666. "description": "Server configuration for opencode serve and web commands",
  9667. "type": "object",
  9668. "properties": {
  9669. "port": {
  9670. "description": "Port to listen on",
  9671. "type": "integer",
  9672. "exclusiveMinimum": 0,
  9673. "maximum": 9007199254740991
  9674. },
  9675. "hostname": {
  9676. "description": "Hostname to listen on",
  9677. "type": "string"
  9678. },
  9679. "mdns": {
  9680. "description": "Enable mDNS service discovery",
  9681. "type": "boolean"
  9682. },
  9683. "mdnsDomain": {
  9684. "description": "Custom domain name for mDNS service (default: opencode.local)",
  9685. "type": "string"
  9686. },
  9687. "cors": {
  9688. "description": "Additional domains to allow for CORS",
  9689. "type": "array",
  9690. "items": {
  9691. "type": "string"
  9692. }
  9693. }
  9694. },
  9695. "additionalProperties": false
  9696. },
  9697. "PermissionActionConfig": {
  9698. "type": "string",
  9699. "enum": ["ask", "allow", "deny"]
  9700. },
  9701. "PermissionObjectConfig": {
  9702. "type": "object",
  9703. "propertyNames": {
  9704. "type": "string"
  9705. },
  9706. "additionalProperties": {
  9707. "$ref": "#/components/schemas/PermissionActionConfig"
  9708. }
  9709. },
  9710. "PermissionRuleConfig": {
  9711. "anyOf": [
  9712. {
  9713. "$ref": "#/components/schemas/PermissionActionConfig"
  9714. },
  9715. {
  9716. "$ref": "#/components/schemas/PermissionObjectConfig"
  9717. }
  9718. ]
  9719. },
  9720. "PermissionConfig": {
  9721. "anyOf": [
  9722. {
  9723. "type": "object",
  9724. "properties": {
  9725. "__originalKeys": {
  9726. "type": "array",
  9727. "items": {
  9728. "type": "string"
  9729. }
  9730. },
  9731. "read": {
  9732. "$ref": "#/components/schemas/PermissionRuleConfig"
  9733. },
  9734. "edit": {
  9735. "$ref": "#/components/schemas/PermissionRuleConfig"
  9736. },
  9737. "glob": {
  9738. "$ref": "#/components/schemas/PermissionRuleConfig"
  9739. },
  9740. "grep": {
  9741. "$ref": "#/components/schemas/PermissionRuleConfig"
  9742. },
  9743. "list": {
  9744. "$ref": "#/components/schemas/PermissionRuleConfig"
  9745. },
  9746. "bash": {
  9747. "$ref": "#/components/schemas/PermissionRuleConfig"
  9748. },
  9749. "task": {
  9750. "$ref": "#/components/schemas/PermissionRuleConfig"
  9751. },
  9752. "external_directory": {
  9753. "$ref": "#/components/schemas/PermissionRuleConfig"
  9754. },
  9755. "todowrite": {
  9756. "$ref": "#/components/schemas/PermissionActionConfig"
  9757. },
  9758. "todoread": {
  9759. "$ref": "#/components/schemas/PermissionActionConfig"
  9760. },
  9761. "question": {
  9762. "$ref": "#/components/schemas/PermissionActionConfig"
  9763. },
  9764. "webfetch": {
  9765. "$ref": "#/components/schemas/PermissionActionConfig"
  9766. },
  9767. "websearch": {
  9768. "$ref": "#/components/schemas/PermissionActionConfig"
  9769. },
  9770. "codesearch": {
  9771. "$ref": "#/components/schemas/PermissionActionConfig"
  9772. },
  9773. "lsp": {
  9774. "$ref": "#/components/schemas/PermissionRuleConfig"
  9775. },
  9776. "doom_loop": {
  9777. "$ref": "#/components/schemas/PermissionActionConfig"
  9778. },
  9779. "skill": {
  9780. "$ref": "#/components/schemas/PermissionRuleConfig"
  9781. }
  9782. },
  9783. "additionalProperties": {
  9784. "$ref": "#/components/schemas/PermissionRuleConfig"
  9785. }
  9786. },
  9787. {
  9788. "$ref": "#/components/schemas/PermissionActionConfig"
  9789. }
  9790. ]
  9791. },
  9792. "AgentConfig": {
  9793. "type": "object",
  9794. "properties": {
  9795. "model": {
  9796. "type": "string"
  9797. },
  9798. "variant": {
  9799. "description": "Default model variant for this agent (applies only when using the agent's configured model).",
  9800. "type": "string"
  9801. },
  9802. "temperature": {
  9803. "type": "number"
  9804. },
  9805. "top_p": {
  9806. "type": "number"
  9807. },
  9808. "prompt": {
  9809. "type": "string"
  9810. },
  9811. "tools": {
  9812. "description": "@deprecated Use 'permission' field instead",
  9813. "type": "object",
  9814. "propertyNames": {
  9815. "type": "string"
  9816. },
  9817. "additionalProperties": {
  9818. "type": "boolean"
  9819. }
  9820. },
  9821. "disable": {
  9822. "type": "boolean"
  9823. },
  9824. "description": {
  9825. "description": "Description of when to use the agent",
  9826. "type": "string"
  9827. },
  9828. "mode": {
  9829. "type": "string",
  9830. "enum": ["subagent", "primary", "all"]
  9831. },
  9832. "hidden": {
  9833. "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
  9834. "type": "boolean"
  9835. },
  9836. "options": {
  9837. "type": "object",
  9838. "propertyNames": {
  9839. "type": "string"
  9840. },
  9841. "additionalProperties": {}
  9842. },
  9843. "color": {
  9844. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
  9845. "anyOf": [
  9846. {
  9847. "type": "string",
  9848. "pattern": "^#[0-9a-fA-F]{6}$"
  9849. },
  9850. {
  9851. "type": "string",
  9852. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  9853. }
  9854. ]
  9855. },
  9856. "steps": {
  9857. "description": "Maximum number of agentic iterations before forcing text-only response",
  9858. "type": "integer",
  9859. "exclusiveMinimum": 0,
  9860. "maximum": 9007199254740991
  9861. },
  9862. "maxSteps": {
  9863. "description": "@deprecated Use 'steps' field instead.",
  9864. "type": "integer",
  9865. "exclusiveMinimum": 0,
  9866. "maximum": 9007199254740991
  9867. },
  9868. "permission": {
  9869. "$ref": "#/components/schemas/PermissionConfig"
  9870. }
  9871. },
  9872. "additionalProperties": {}
  9873. },
  9874. "ProviderConfig": {
  9875. "type": "object",
  9876. "properties": {
  9877. "api": {
  9878. "type": "string"
  9879. },
  9880. "name": {
  9881. "type": "string"
  9882. },
  9883. "env": {
  9884. "type": "array",
  9885. "items": {
  9886. "type": "string"
  9887. }
  9888. },
  9889. "id": {
  9890. "type": "string"
  9891. },
  9892. "npm": {
  9893. "type": "string"
  9894. },
  9895. "models": {
  9896. "type": "object",
  9897. "propertyNames": {
  9898. "type": "string"
  9899. },
  9900. "additionalProperties": {
  9901. "type": "object",
  9902. "properties": {
  9903. "id": {
  9904. "type": "string"
  9905. },
  9906. "name": {
  9907. "type": "string"
  9908. },
  9909. "family": {
  9910. "type": "string"
  9911. },
  9912. "release_date": {
  9913. "type": "string"
  9914. },
  9915. "attachment": {
  9916. "type": "boolean"
  9917. },
  9918. "reasoning": {
  9919. "type": "boolean"
  9920. },
  9921. "temperature": {
  9922. "type": "boolean"
  9923. },
  9924. "tool_call": {
  9925. "type": "boolean"
  9926. },
  9927. "interleaved": {
  9928. "anyOf": [
  9929. {
  9930. "type": "boolean",
  9931. "const": true
  9932. },
  9933. {
  9934. "type": "object",
  9935. "properties": {
  9936. "field": {
  9937. "type": "string",
  9938. "enum": ["reasoning_content", "reasoning_details"]
  9939. }
  9940. },
  9941. "required": ["field"],
  9942. "additionalProperties": false
  9943. }
  9944. ]
  9945. },
  9946. "cost": {
  9947. "type": "object",
  9948. "properties": {
  9949. "input": {
  9950. "type": "number"
  9951. },
  9952. "output": {
  9953. "type": "number"
  9954. },
  9955. "cache_read": {
  9956. "type": "number"
  9957. },
  9958. "cache_write": {
  9959. "type": "number"
  9960. },
  9961. "context_over_200k": {
  9962. "type": "object",
  9963. "properties": {
  9964. "input": {
  9965. "type": "number"
  9966. },
  9967. "output": {
  9968. "type": "number"
  9969. },
  9970. "cache_read": {
  9971. "type": "number"
  9972. },
  9973. "cache_write": {
  9974. "type": "number"
  9975. }
  9976. },
  9977. "required": ["input", "output"]
  9978. }
  9979. },
  9980. "required": ["input", "output"]
  9981. },
  9982. "limit": {
  9983. "type": "object",
  9984. "properties": {
  9985. "context": {
  9986. "type": "number"
  9987. },
  9988. "input": {
  9989. "type": "number"
  9990. },
  9991. "output": {
  9992. "type": "number"
  9993. }
  9994. },
  9995. "required": ["context", "output"]
  9996. },
  9997. "modalities": {
  9998. "type": "object",
  9999. "properties": {
  10000. "input": {
  10001. "type": "array",
  10002. "items": {
  10003. "type": "string",
  10004. "enum": ["text", "audio", "image", "video", "pdf"]
  10005. }
  10006. },
  10007. "output": {
  10008. "type": "array",
  10009. "items": {
  10010. "type": "string",
  10011. "enum": ["text", "audio", "image", "video", "pdf"]
  10012. }
  10013. }
  10014. },
  10015. "required": ["input", "output"]
  10016. },
  10017. "experimental": {
  10018. "type": "boolean"
  10019. },
  10020. "status": {
  10021. "type": "string",
  10022. "enum": ["alpha", "beta", "deprecated"]
  10023. },
  10024. "options": {
  10025. "type": "object",
  10026. "propertyNames": {
  10027. "type": "string"
  10028. },
  10029. "additionalProperties": {}
  10030. },
  10031. "headers": {
  10032. "type": "object",
  10033. "propertyNames": {
  10034. "type": "string"
  10035. },
  10036. "additionalProperties": {
  10037. "type": "string"
  10038. }
  10039. },
  10040. "provider": {
  10041. "type": "object",
  10042. "properties": {
  10043. "npm": {
  10044. "type": "string"
  10045. },
  10046. "api": {
  10047. "type": "string"
  10048. }
  10049. }
  10050. },
  10051. "variants": {
  10052. "description": "Variant-specific configuration",
  10053. "type": "object",
  10054. "propertyNames": {
  10055. "type": "string"
  10056. },
  10057. "additionalProperties": {
  10058. "type": "object",
  10059. "properties": {
  10060. "disabled": {
  10061. "description": "Disable this variant for the model",
  10062. "type": "boolean"
  10063. }
  10064. },
  10065. "additionalProperties": {}
  10066. }
  10067. }
  10068. }
  10069. }
  10070. },
  10071. "whitelist": {
  10072. "type": "array",
  10073. "items": {
  10074. "type": "string"
  10075. }
  10076. },
  10077. "blacklist": {
  10078. "type": "array",
  10079. "items": {
  10080. "type": "string"
  10081. }
  10082. },
  10083. "options": {
  10084. "type": "object",
  10085. "properties": {
  10086. "apiKey": {
  10087. "type": "string"
  10088. },
  10089. "baseURL": {
  10090. "type": "string"
  10091. },
  10092. "enterpriseUrl": {
  10093. "description": "GitHub Enterprise URL for copilot authentication",
  10094. "type": "string"
  10095. },
  10096. "setCacheKey": {
  10097. "description": "Enable promptCacheKey for this provider (default false)",
  10098. "type": "boolean"
  10099. },
  10100. "timeout": {
  10101. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  10102. "anyOf": [
  10103. {
  10104. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  10105. "type": "integer",
  10106. "exclusiveMinimum": 0,
  10107. "maximum": 9007199254740991
  10108. },
  10109. {
  10110. "description": "Disable timeout for this provider entirely.",
  10111. "type": "boolean",
  10112. "const": false
  10113. }
  10114. ]
  10115. },
  10116. "chunkTimeout": {
  10117. "description": "Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.",
  10118. "type": "integer",
  10119. "exclusiveMinimum": 0,
  10120. "maximum": 9007199254740991
  10121. }
  10122. },
  10123. "additionalProperties": {}
  10124. }
  10125. },
  10126. "additionalProperties": false
  10127. },
  10128. "McpLocalConfig": {
  10129. "type": "object",
  10130. "properties": {
  10131. "type": {
  10132. "description": "Type of MCP server connection",
  10133. "type": "string",
  10134. "const": "local"
  10135. },
  10136. "command": {
  10137. "description": "Command and arguments to run the MCP server",
  10138. "type": "array",
  10139. "items": {
  10140. "type": "string"
  10141. }
  10142. },
  10143. "environment": {
  10144. "description": "Environment variables to set when running the MCP server",
  10145. "type": "object",
  10146. "propertyNames": {
  10147. "type": "string"
  10148. },
  10149. "additionalProperties": {
  10150. "type": "string"
  10151. }
  10152. },
  10153. "enabled": {
  10154. "description": "Enable or disable the MCP server on startup",
  10155. "type": "boolean"
  10156. },
  10157. "timeout": {
  10158. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  10159. "type": "integer",
  10160. "exclusiveMinimum": 0,
  10161. "maximum": 9007199254740991
  10162. }
  10163. },
  10164. "required": ["type", "command"],
  10165. "additionalProperties": false
  10166. },
  10167. "McpOAuthConfig": {
  10168. "type": "object",
  10169. "properties": {
  10170. "clientId": {
  10171. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  10172. "type": "string"
  10173. },
  10174. "clientSecret": {
  10175. "description": "OAuth client secret (if required by the authorization server)",
  10176. "type": "string"
  10177. },
  10178. "scope": {
  10179. "description": "OAuth scopes to request during authorization",
  10180. "type": "string"
  10181. }
  10182. },
  10183. "additionalProperties": false
  10184. },
  10185. "McpRemoteConfig": {
  10186. "type": "object",
  10187. "properties": {
  10188. "type": {
  10189. "description": "Type of MCP server connection",
  10190. "type": "string",
  10191. "const": "remote"
  10192. },
  10193. "url": {
  10194. "description": "URL of the remote MCP server",
  10195. "type": "string"
  10196. },
  10197. "enabled": {
  10198. "description": "Enable or disable the MCP server on startup",
  10199. "type": "boolean"
  10200. },
  10201. "headers": {
  10202. "description": "Headers to send with the request",
  10203. "type": "object",
  10204. "propertyNames": {
  10205. "type": "string"
  10206. },
  10207. "additionalProperties": {
  10208. "type": "string"
  10209. }
  10210. },
  10211. "oauth": {
  10212. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  10213. "anyOf": [
  10214. {
  10215. "$ref": "#/components/schemas/McpOAuthConfig"
  10216. },
  10217. {
  10218. "type": "boolean",
  10219. "const": false
  10220. }
  10221. ]
  10222. },
  10223. "timeout": {
  10224. "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
  10225. "type": "integer",
  10226. "exclusiveMinimum": 0,
  10227. "maximum": 9007199254740991
  10228. }
  10229. },
  10230. "required": ["type", "url"],
  10231. "additionalProperties": false
  10232. },
  10233. "LayoutConfig": {
  10234. "description": "@deprecated Always uses stretch layout.",
  10235. "type": "string",
  10236. "enum": ["auto", "stretch"]
  10237. },
  10238. "Config": {
  10239. "type": "object",
  10240. "properties": {
  10241. "$schema": {
  10242. "description": "JSON schema reference for configuration validation",
  10243. "type": "string"
  10244. },
  10245. "logLevel": {
  10246. "$ref": "#/components/schemas/LogLevel"
  10247. },
  10248. "server": {
  10249. "$ref": "#/components/schemas/ServerConfig"
  10250. },
  10251. "command": {
  10252. "description": "Command configuration, see https://opencode.ai/docs/commands",
  10253. "type": "object",
  10254. "propertyNames": {
  10255. "type": "string"
  10256. },
  10257. "additionalProperties": {
  10258. "type": "object",
  10259. "properties": {
  10260. "template": {
  10261. "type": "string"
  10262. },
  10263. "description": {
  10264. "type": "string"
  10265. },
  10266. "agent": {
  10267. "type": "string"
  10268. },
  10269. "model": {
  10270. "type": "string"
  10271. },
  10272. "subtask": {
  10273. "type": "boolean"
  10274. }
  10275. },
  10276. "required": ["template"]
  10277. }
  10278. },
  10279. "skills": {
  10280. "description": "Additional skill folder paths",
  10281. "type": "object",
  10282. "properties": {
  10283. "paths": {
  10284. "description": "Additional paths to skill folders",
  10285. "type": "array",
  10286. "items": {
  10287. "type": "string"
  10288. }
  10289. },
  10290. "urls": {
  10291. "description": "URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)",
  10292. "type": "array",
  10293. "items": {
  10294. "type": "string"
  10295. }
  10296. }
  10297. }
  10298. },
  10299. "watcher": {
  10300. "type": "object",
  10301. "properties": {
  10302. "ignore": {
  10303. "type": "array",
  10304. "items": {
  10305. "type": "string"
  10306. }
  10307. }
  10308. }
  10309. },
  10310. "plugin": {
  10311. "type": "array",
  10312. "items": {
  10313. "type": "string"
  10314. }
  10315. },
  10316. "snapshot": {
  10317. "type": "boolean"
  10318. },
  10319. "share": {
  10320. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  10321. "type": "string",
  10322. "enum": ["manual", "auto", "disabled"]
  10323. },
  10324. "autoshare": {
  10325. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  10326. "type": "boolean"
  10327. },
  10328. "autoupdate": {
  10329. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  10330. "anyOf": [
  10331. {
  10332. "type": "boolean"
  10333. },
  10334. {
  10335. "type": "string",
  10336. "const": "notify"
  10337. }
  10338. ]
  10339. },
  10340. "disabled_providers": {
  10341. "description": "Disable providers that are loaded automatically",
  10342. "type": "array",
  10343. "items": {
  10344. "type": "string"
  10345. }
  10346. },
  10347. "enabled_providers": {
  10348. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  10349. "type": "array",
  10350. "items": {
  10351. "type": "string"
  10352. }
  10353. },
  10354. "model": {
  10355. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  10356. "type": "string"
  10357. },
  10358. "small_model": {
  10359. "description": "Small model to use for tasks like title generation in the format of provider/model",
  10360. "type": "string"
  10361. },
  10362. "default_agent": {
  10363. "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.",
  10364. "type": "string"
  10365. },
  10366. "username": {
  10367. "description": "Custom username to display in conversations instead of system username",
  10368. "type": "string"
  10369. },
  10370. "mode": {
  10371. "description": "@deprecated Use `agent` field instead.",
  10372. "type": "object",
  10373. "properties": {
  10374. "build": {
  10375. "$ref": "#/components/schemas/AgentConfig"
  10376. },
  10377. "plan": {
  10378. "$ref": "#/components/schemas/AgentConfig"
  10379. }
  10380. },
  10381. "additionalProperties": {
  10382. "$ref": "#/components/schemas/AgentConfig"
  10383. }
  10384. },
  10385. "agent": {
  10386. "description": "Agent configuration, see https://opencode.ai/docs/agents",
  10387. "type": "object",
  10388. "properties": {
  10389. "plan": {
  10390. "$ref": "#/components/schemas/AgentConfig"
  10391. },
  10392. "build": {
  10393. "$ref": "#/components/schemas/AgentConfig"
  10394. },
  10395. "general": {
  10396. "$ref": "#/components/schemas/AgentConfig"
  10397. },
  10398. "explore": {
  10399. "$ref": "#/components/schemas/AgentConfig"
  10400. },
  10401. "title": {
  10402. "$ref": "#/components/schemas/AgentConfig"
  10403. },
  10404. "summary": {
  10405. "$ref": "#/components/schemas/AgentConfig"
  10406. },
  10407. "compaction": {
  10408. "$ref": "#/components/schemas/AgentConfig"
  10409. }
  10410. },
  10411. "additionalProperties": {
  10412. "$ref": "#/components/schemas/AgentConfig"
  10413. }
  10414. },
  10415. "provider": {
  10416. "description": "Custom provider configurations and model overrides",
  10417. "type": "object",
  10418. "propertyNames": {
  10419. "type": "string"
  10420. },
  10421. "additionalProperties": {
  10422. "$ref": "#/components/schemas/ProviderConfig"
  10423. }
  10424. },
  10425. "mcp": {
  10426. "description": "MCP (Model Context Protocol) server configurations",
  10427. "type": "object",
  10428. "propertyNames": {
  10429. "type": "string"
  10430. },
  10431. "additionalProperties": {
  10432. "anyOf": [
  10433. {
  10434. "anyOf": [
  10435. {
  10436. "$ref": "#/components/schemas/McpLocalConfig"
  10437. },
  10438. {
  10439. "$ref": "#/components/schemas/McpRemoteConfig"
  10440. }
  10441. ]
  10442. },
  10443. {
  10444. "type": "object",
  10445. "properties": {
  10446. "enabled": {
  10447. "type": "boolean"
  10448. }
  10449. },
  10450. "required": ["enabled"],
  10451. "additionalProperties": false
  10452. }
  10453. ]
  10454. }
  10455. },
  10456. "formatter": {
  10457. "anyOf": [
  10458. {
  10459. "type": "boolean",
  10460. "const": false
  10461. },
  10462. {
  10463. "type": "object",
  10464. "propertyNames": {
  10465. "type": "string"
  10466. },
  10467. "additionalProperties": {
  10468. "type": "object",
  10469. "properties": {
  10470. "disabled": {
  10471. "type": "boolean"
  10472. },
  10473. "command": {
  10474. "type": "array",
  10475. "items": {
  10476. "type": "string"
  10477. }
  10478. },
  10479. "environment": {
  10480. "type": "object",
  10481. "propertyNames": {
  10482. "type": "string"
  10483. },
  10484. "additionalProperties": {
  10485. "type": "string"
  10486. }
  10487. },
  10488. "extensions": {
  10489. "type": "array",
  10490. "items": {
  10491. "type": "string"
  10492. }
  10493. }
  10494. }
  10495. }
  10496. }
  10497. ]
  10498. },
  10499. "lsp": {
  10500. "anyOf": [
  10501. {
  10502. "type": "boolean",
  10503. "const": false
  10504. },
  10505. {
  10506. "type": "object",
  10507. "propertyNames": {
  10508. "type": "string"
  10509. },
  10510. "additionalProperties": {
  10511. "anyOf": [
  10512. {
  10513. "type": "object",
  10514. "properties": {
  10515. "disabled": {
  10516. "type": "boolean",
  10517. "const": true
  10518. }
  10519. },
  10520. "required": ["disabled"]
  10521. },
  10522. {
  10523. "type": "object",
  10524. "properties": {
  10525. "command": {
  10526. "type": "array",
  10527. "items": {
  10528. "type": "string"
  10529. }
  10530. },
  10531. "extensions": {
  10532. "type": "array",
  10533. "items": {
  10534. "type": "string"
  10535. }
  10536. },
  10537. "disabled": {
  10538. "type": "boolean"
  10539. },
  10540. "env": {
  10541. "type": "object",
  10542. "propertyNames": {
  10543. "type": "string"
  10544. },
  10545. "additionalProperties": {
  10546. "type": "string"
  10547. }
  10548. },
  10549. "initialization": {
  10550. "type": "object",
  10551. "propertyNames": {
  10552. "type": "string"
  10553. },
  10554. "additionalProperties": {}
  10555. }
  10556. },
  10557. "required": ["command"]
  10558. }
  10559. ]
  10560. }
  10561. }
  10562. ]
  10563. },
  10564. "instructions": {
  10565. "description": "Additional instruction files or patterns to include",
  10566. "type": "array",
  10567. "items": {
  10568. "type": "string"
  10569. }
  10570. },
  10571. "layout": {
  10572. "$ref": "#/components/schemas/LayoutConfig"
  10573. },
  10574. "permission": {
  10575. "$ref": "#/components/schemas/PermissionConfig"
  10576. },
  10577. "tools": {
  10578. "type": "object",
  10579. "propertyNames": {
  10580. "type": "string"
  10581. },
  10582. "additionalProperties": {
  10583. "type": "boolean"
  10584. }
  10585. },
  10586. "enterprise": {
  10587. "type": "object",
  10588. "properties": {
  10589. "url": {
  10590. "description": "Enterprise URL",
  10591. "type": "string"
  10592. }
  10593. }
  10594. },
  10595. "compaction": {
  10596. "type": "object",
  10597. "properties": {
  10598. "auto": {
  10599. "description": "Enable automatic compaction when context is full (default: true)",
  10600. "type": "boolean"
  10601. },
  10602. "prune": {
  10603. "description": "Enable pruning of old tool outputs (default: true)",
  10604. "type": "boolean"
  10605. },
  10606. "reserved": {
  10607. "description": "Token buffer for compaction. Leaves enough window to avoid overflow during compaction.",
  10608. "type": "integer",
  10609. "minimum": 0,
  10610. "maximum": 9007199254740991
  10611. }
  10612. }
  10613. },
  10614. "experimental": {
  10615. "type": "object",
  10616. "properties": {
  10617. "disable_paste_summary": {
  10618. "type": "boolean"
  10619. },
  10620. "batch_tool": {
  10621. "description": "Enable the batch tool",
  10622. "type": "boolean"
  10623. },
  10624. "openTelemetry": {
  10625. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  10626. "type": "boolean"
  10627. },
  10628. "primary_tools": {
  10629. "description": "Tools that should only be available to primary agents.",
  10630. "type": "array",
  10631. "items": {
  10632. "type": "string"
  10633. }
  10634. },
  10635. "continue_loop_on_deny": {
  10636. "description": "Continue the agent loop when a tool call is denied",
  10637. "type": "boolean"
  10638. },
  10639. "mcp_timeout": {
  10640. "description": "Timeout in milliseconds for model context protocol (MCP) requests",
  10641. "type": "integer",
  10642. "exclusiveMinimum": 0,
  10643. "maximum": 9007199254740991
  10644. }
  10645. }
  10646. }
  10647. },
  10648. "additionalProperties": false
  10649. },
  10650. "BadRequestError": {
  10651. "type": "object",
  10652. "properties": {
  10653. "data": {},
  10654. "errors": {
  10655. "type": "array",
  10656. "items": {
  10657. "type": "object",
  10658. "propertyNames": {
  10659. "type": "string"
  10660. },
  10661. "additionalProperties": {}
  10662. }
  10663. },
  10664. "success": {
  10665. "type": "boolean",
  10666. "const": false
  10667. }
  10668. },
  10669. "required": ["data", "errors", "success"]
  10670. },
  10671. "OAuth": {
  10672. "type": "object",
  10673. "properties": {
  10674. "type": {
  10675. "type": "string",
  10676. "const": "oauth"
  10677. },
  10678. "refresh": {
  10679. "type": "string"
  10680. },
  10681. "access": {
  10682. "type": "string"
  10683. },
  10684. "expires": {
  10685. "type": "number"
  10686. },
  10687. "accountId": {
  10688. "type": "string"
  10689. },
  10690. "enterpriseUrl": {
  10691. "type": "string"
  10692. }
  10693. },
  10694. "required": ["type", "refresh", "access", "expires"]
  10695. },
  10696. "ApiAuth": {
  10697. "type": "object",
  10698. "properties": {
  10699. "type": {
  10700. "type": "string",
  10701. "const": "api"
  10702. },
  10703. "key": {
  10704. "type": "string"
  10705. }
  10706. },
  10707. "required": ["type", "key"]
  10708. },
  10709. "WellKnownAuth": {
  10710. "type": "object",
  10711. "properties": {
  10712. "type": {
  10713. "type": "string",
  10714. "const": "wellknown"
  10715. },
  10716. "key": {
  10717. "type": "string"
  10718. },
  10719. "token": {
  10720. "type": "string"
  10721. }
  10722. },
  10723. "required": ["type", "key", "token"]
  10724. },
  10725. "Auth": {
  10726. "anyOf": [
  10727. {
  10728. "$ref": "#/components/schemas/OAuth"
  10729. },
  10730. {
  10731. "$ref": "#/components/schemas/ApiAuth"
  10732. },
  10733. {
  10734. "$ref": "#/components/schemas/WellKnownAuth"
  10735. }
  10736. ]
  10737. },
  10738. "NotFoundError": {
  10739. "type": "object",
  10740. "properties": {
  10741. "name": {
  10742. "type": "string",
  10743. "const": "NotFoundError"
  10744. },
  10745. "data": {
  10746. "type": "object",
  10747. "properties": {
  10748. "message": {
  10749. "type": "string"
  10750. }
  10751. },
  10752. "required": ["message"]
  10753. }
  10754. },
  10755. "required": ["name", "data"]
  10756. },
  10757. "Model": {
  10758. "type": "object",
  10759. "properties": {
  10760. "id": {
  10761. "type": "string"
  10762. },
  10763. "providerID": {
  10764. "type": "string"
  10765. },
  10766. "api": {
  10767. "type": "object",
  10768. "properties": {
  10769. "id": {
  10770. "type": "string"
  10771. },
  10772. "url": {
  10773. "type": "string"
  10774. },
  10775. "npm": {
  10776. "type": "string"
  10777. }
  10778. },
  10779. "required": ["id", "url", "npm"]
  10780. },
  10781. "name": {
  10782. "type": "string"
  10783. },
  10784. "family": {
  10785. "type": "string"
  10786. },
  10787. "capabilities": {
  10788. "type": "object",
  10789. "properties": {
  10790. "temperature": {
  10791. "type": "boolean"
  10792. },
  10793. "reasoning": {
  10794. "type": "boolean"
  10795. },
  10796. "attachment": {
  10797. "type": "boolean"
  10798. },
  10799. "toolcall": {
  10800. "type": "boolean"
  10801. },
  10802. "input": {
  10803. "type": "object",
  10804. "properties": {
  10805. "text": {
  10806. "type": "boolean"
  10807. },
  10808. "audio": {
  10809. "type": "boolean"
  10810. },
  10811. "image": {
  10812. "type": "boolean"
  10813. },
  10814. "video": {
  10815. "type": "boolean"
  10816. },
  10817. "pdf": {
  10818. "type": "boolean"
  10819. }
  10820. },
  10821. "required": ["text", "audio", "image", "video", "pdf"]
  10822. },
  10823. "output": {
  10824. "type": "object",
  10825. "properties": {
  10826. "text": {
  10827. "type": "boolean"
  10828. },
  10829. "audio": {
  10830. "type": "boolean"
  10831. },
  10832. "image": {
  10833. "type": "boolean"
  10834. },
  10835. "video": {
  10836. "type": "boolean"
  10837. },
  10838. "pdf": {
  10839. "type": "boolean"
  10840. }
  10841. },
  10842. "required": ["text", "audio", "image", "video", "pdf"]
  10843. },
  10844. "interleaved": {
  10845. "anyOf": [
  10846. {
  10847. "type": "boolean"
  10848. },
  10849. {
  10850. "type": "object",
  10851. "properties": {
  10852. "field": {
  10853. "type": "string",
  10854. "enum": ["reasoning_content", "reasoning_details"]
  10855. }
  10856. },
  10857. "required": ["field"]
  10858. }
  10859. ]
  10860. }
  10861. },
  10862. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  10863. },
  10864. "cost": {
  10865. "type": "object",
  10866. "properties": {
  10867. "input": {
  10868. "type": "number"
  10869. },
  10870. "output": {
  10871. "type": "number"
  10872. },
  10873. "cache": {
  10874. "type": "object",
  10875. "properties": {
  10876. "read": {
  10877. "type": "number"
  10878. },
  10879. "write": {
  10880. "type": "number"
  10881. }
  10882. },
  10883. "required": ["read", "write"]
  10884. },
  10885. "experimentalOver200K": {
  10886. "type": "object",
  10887. "properties": {
  10888. "input": {
  10889. "type": "number"
  10890. },
  10891. "output": {
  10892. "type": "number"
  10893. },
  10894. "cache": {
  10895. "type": "object",
  10896. "properties": {
  10897. "read": {
  10898. "type": "number"
  10899. },
  10900. "write": {
  10901. "type": "number"
  10902. }
  10903. },
  10904. "required": ["read", "write"]
  10905. }
  10906. },
  10907. "required": ["input", "output", "cache"]
  10908. }
  10909. },
  10910. "required": ["input", "output", "cache"]
  10911. },
  10912. "limit": {
  10913. "type": "object",
  10914. "properties": {
  10915. "context": {
  10916. "type": "number"
  10917. },
  10918. "input": {
  10919. "type": "number"
  10920. },
  10921. "output": {
  10922. "type": "number"
  10923. }
  10924. },
  10925. "required": ["context", "output"]
  10926. },
  10927. "status": {
  10928. "type": "string",
  10929. "enum": ["alpha", "beta", "deprecated", "active"]
  10930. },
  10931. "options": {
  10932. "type": "object",
  10933. "propertyNames": {
  10934. "type": "string"
  10935. },
  10936. "additionalProperties": {}
  10937. },
  10938. "headers": {
  10939. "type": "object",
  10940. "propertyNames": {
  10941. "type": "string"
  10942. },
  10943. "additionalProperties": {
  10944. "type": "string"
  10945. }
  10946. },
  10947. "release_date": {
  10948. "type": "string"
  10949. },
  10950. "variants": {
  10951. "type": "object",
  10952. "propertyNames": {
  10953. "type": "string"
  10954. },
  10955. "additionalProperties": {
  10956. "type": "object",
  10957. "propertyNames": {
  10958. "type": "string"
  10959. },
  10960. "additionalProperties": {}
  10961. }
  10962. }
  10963. },
  10964. "required": [
  10965. "id",
  10966. "providerID",
  10967. "api",
  10968. "name",
  10969. "capabilities",
  10970. "cost",
  10971. "limit",
  10972. "status",
  10973. "options",
  10974. "headers",
  10975. "release_date"
  10976. ]
  10977. },
  10978. "Provider": {
  10979. "type": "object",
  10980. "properties": {
  10981. "id": {
  10982. "type": "string"
  10983. },
  10984. "name": {
  10985. "type": "string"
  10986. },
  10987. "source": {
  10988. "type": "string",
  10989. "enum": ["env", "config", "custom", "api"]
  10990. },
  10991. "env": {
  10992. "type": "array",
  10993. "items": {
  10994. "type": "string"
  10995. }
  10996. },
  10997. "key": {
  10998. "type": "string"
  10999. },
  11000. "options": {
  11001. "type": "object",
  11002. "propertyNames": {
  11003. "type": "string"
  11004. },
  11005. "additionalProperties": {}
  11006. },
  11007. "models": {
  11008. "type": "object",
  11009. "propertyNames": {
  11010. "type": "string"
  11011. },
  11012. "additionalProperties": {
  11013. "$ref": "#/components/schemas/Model"
  11014. }
  11015. }
  11016. },
  11017. "required": ["id", "name", "source", "env", "options", "models"]
  11018. },
  11019. "ToolIDs": {
  11020. "type": "array",
  11021. "items": {
  11022. "type": "string"
  11023. }
  11024. },
  11025. "ToolListItem": {
  11026. "type": "object",
  11027. "properties": {
  11028. "id": {
  11029. "type": "string"
  11030. },
  11031. "description": {
  11032. "type": "string"
  11033. },
  11034. "parameters": {}
  11035. },
  11036. "required": ["id", "description", "parameters"]
  11037. },
  11038. "ToolList": {
  11039. "type": "array",
  11040. "items": {
  11041. "$ref": "#/components/schemas/ToolListItem"
  11042. }
  11043. },
  11044. "Workspace": {
  11045. "type": "object",
  11046. "properties": {
  11047. "id": {
  11048. "type": "string",
  11049. "pattern": "^wrk.*"
  11050. },
  11051. "type": {
  11052. "type": "string"
  11053. },
  11054. "branch": {
  11055. "anyOf": [
  11056. {
  11057. "type": "string"
  11058. },
  11059. {
  11060. "type": "null"
  11061. }
  11062. ]
  11063. },
  11064. "name": {
  11065. "anyOf": [
  11066. {
  11067. "type": "string"
  11068. },
  11069. {
  11070. "type": "null"
  11071. }
  11072. ]
  11073. },
  11074. "directory": {
  11075. "anyOf": [
  11076. {
  11077. "type": "string"
  11078. },
  11079. {
  11080. "type": "null"
  11081. }
  11082. ]
  11083. },
  11084. "extra": {
  11085. "anyOf": [
  11086. {},
  11087. {
  11088. "type": "null"
  11089. }
  11090. ]
  11091. },
  11092. "projectID": {
  11093. "type": "string"
  11094. }
  11095. },
  11096. "required": ["id", "type", "branch", "name", "directory", "extra", "projectID"]
  11097. },
  11098. "Worktree": {
  11099. "type": "object",
  11100. "properties": {
  11101. "name": {
  11102. "type": "string"
  11103. },
  11104. "branch": {
  11105. "type": "string"
  11106. },
  11107. "directory": {
  11108. "type": "string"
  11109. }
  11110. },
  11111. "required": ["name", "branch", "directory"]
  11112. },
  11113. "WorktreeCreateInput": {
  11114. "type": "object",
  11115. "properties": {
  11116. "name": {
  11117. "type": "string"
  11118. },
  11119. "startCommand": {
  11120. "description": "Additional startup script to run after the project's start command",
  11121. "type": "string"
  11122. }
  11123. }
  11124. },
  11125. "WorktreeRemoveInput": {
  11126. "type": "object",
  11127. "properties": {
  11128. "directory": {
  11129. "type": "string"
  11130. }
  11131. },
  11132. "required": ["directory"]
  11133. },
  11134. "WorktreeResetInput": {
  11135. "type": "object",
  11136. "properties": {
  11137. "directory": {
  11138. "type": "string"
  11139. }
  11140. },
  11141. "required": ["directory"]
  11142. },
  11143. "ProjectSummary": {
  11144. "type": "object",
  11145. "properties": {
  11146. "id": {
  11147. "type": "string"
  11148. },
  11149. "name": {
  11150. "type": "string"
  11151. },
  11152. "worktree": {
  11153. "type": "string"
  11154. }
  11155. },
  11156. "required": ["id", "worktree"]
  11157. },
  11158. "GlobalSession": {
  11159. "type": "object",
  11160. "properties": {
  11161. "id": {
  11162. "type": "string",
  11163. "pattern": "^ses.*"
  11164. },
  11165. "slug": {
  11166. "type": "string"
  11167. },
  11168. "projectID": {
  11169. "type": "string"
  11170. },
  11171. "workspaceID": {
  11172. "type": "string"
  11173. },
  11174. "directory": {
  11175. "type": "string"
  11176. },
  11177. "parentID": {
  11178. "type": "string",
  11179. "pattern": "^ses.*"
  11180. },
  11181. "summary": {
  11182. "type": "object",
  11183. "properties": {
  11184. "additions": {
  11185. "type": "number"
  11186. },
  11187. "deletions": {
  11188. "type": "number"
  11189. },
  11190. "files": {
  11191. "type": "number"
  11192. },
  11193. "diffs": {
  11194. "type": "array",
  11195. "items": {
  11196. "$ref": "#/components/schemas/FileDiff"
  11197. }
  11198. }
  11199. },
  11200. "required": ["additions", "deletions", "files"]
  11201. },
  11202. "share": {
  11203. "type": "object",
  11204. "properties": {
  11205. "url": {
  11206. "type": "string"
  11207. }
  11208. },
  11209. "required": ["url"]
  11210. },
  11211. "title": {
  11212. "type": "string"
  11213. },
  11214. "version": {
  11215. "type": "string"
  11216. },
  11217. "time": {
  11218. "type": "object",
  11219. "properties": {
  11220. "created": {
  11221. "type": "number"
  11222. },
  11223. "updated": {
  11224. "type": "number"
  11225. },
  11226. "compacting": {
  11227. "type": "number"
  11228. },
  11229. "archived": {
  11230. "type": "number"
  11231. }
  11232. },
  11233. "required": ["created", "updated"]
  11234. },
  11235. "permission": {
  11236. "$ref": "#/components/schemas/PermissionRuleset"
  11237. },
  11238. "revert": {
  11239. "type": "object",
  11240. "properties": {
  11241. "messageID": {
  11242. "type": "string"
  11243. },
  11244. "partID": {
  11245. "type": "string"
  11246. },
  11247. "snapshot": {
  11248. "type": "string"
  11249. },
  11250. "diff": {
  11251. "type": "string"
  11252. }
  11253. },
  11254. "required": ["messageID"]
  11255. },
  11256. "project": {
  11257. "anyOf": [
  11258. {
  11259. "$ref": "#/components/schemas/ProjectSummary"
  11260. },
  11261. {
  11262. "type": "null"
  11263. }
  11264. ]
  11265. }
  11266. },
  11267. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"]
  11268. },
  11269. "McpResource": {
  11270. "type": "object",
  11271. "properties": {
  11272. "name": {
  11273. "type": "string"
  11274. },
  11275. "uri": {
  11276. "type": "string"
  11277. },
  11278. "description": {
  11279. "type": "string"
  11280. },
  11281. "mimeType": {
  11282. "type": "string"
  11283. },
  11284. "client": {
  11285. "type": "string"
  11286. }
  11287. },
  11288. "required": ["name", "uri", "client"]
  11289. },
  11290. "TextPartInput": {
  11291. "type": "object",
  11292. "properties": {
  11293. "id": {
  11294. "type": "string"
  11295. },
  11296. "type": {
  11297. "type": "string",
  11298. "const": "text"
  11299. },
  11300. "text": {
  11301. "type": "string"
  11302. },
  11303. "synthetic": {
  11304. "type": "boolean"
  11305. },
  11306. "ignored": {
  11307. "type": "boolean"
  11308. },
  11309. "time": {
  11310. "type": "object",
  11311. "properties": {
  11312. "start": {
  11313. "type": "number"
  11314. },
  11315. "end": {
  11316. "type": "number"
  11317. }
  11318. },
  11319. "required": ["start"]
  11320. },
  11321. "metadata": {
  11322. "type": "object",
  11323. "propertyNames": {
  11324. "type": "string"
  11325. },
  11326. "additionalProperties": {}
  11327. }
  11328. },
  11329. "required": ["type", "text"]
  11330. },
  11331. "FilePartInput": {
  11332. "type": "object",
  11333. "properties": {
  11334. "id": {
  11335. "type": "string"
  11336. },
  11337. "type": {
  11338. "type": "string",
  11339. "const": "file"
  11340. },
  11341. "mime": {
  11342. "type": "string"
  11343. },
  11344. "filename": {
  11345. "type": "string"
  11346. },
  11347. "url": {
  11348. "type": "string"
  11349. },
  11350. "source": {
  11351. "$ref": "#/components/schemas/FilePartSource"
  11352. }
  11353. },
  11354. "required": ["type", "mime", "url"]
  11355. },
  11356. "AgentPartInput": {
  11357. "type": "object",
  11358. "properties": {
  11359. "id": {
  11360. "type": "string"
  11361. },
  11362. "type": {
  11363. "type": "string",
  11364. "const": "agent"
  11365. },
  11366. "name": {
  11367. "type": "string"
  11368. },
  11369. "source": {
  11370. "type": "object",
  11371. "properties": {
  11372. "value": {
  11373. "type": "string"
  11374. },
  11375. "start": {
  11376. "type": "integer",
  11377. "minimum": -9007199254740991,
  11378. "maximum": 9007199254740991
  11379. },
  11380. "end": {
  11381. "type": "integer",
  11382. "minimum": -9007199254740991,
  11383. "maximum": 9007199254740991
  11384. }
  11385. },
  11386. "required": ["value", "start", "end"]
  11387. }
  11388. },
  11389. "required": ["type", "name"]
  11390. },
  11391. "SubtaskPartInput": {
  11392. "type": "object",
  11393. "properties": {
  11394. "id": {
  11395. "type": "string"
  11396. },
  11397. "type": {
  11398. "type": "string",
  11399. "const": "subtask"
  11400. },
  11401. "prompt": {
  11402. "type": "string"
  11403. },
  11404. "description": {
  11405. "type": "string"
  11406. },
  11407. "agent": {
  11408. "type": "string"
  11409. },
  11410. "model": {
  11411. "type": "object",
  11412. "properties": {
  11413. "providerID": {
  11414. "type": "string"
  11415. },
  11416. "modelID": {
  11417. "type": "string"
  11418. }
  11419. },
  11420. "required": ["providerID", "modelID"]
  11421. },
  11422. "command": {
  11423. "type": "string"
  11424. }
  11425. },
  11426. "required": ["type", "prompt", "description", "agent"]
  11427. },
  11428. "ProviderAuthMethod": {
  11429. "type": "object",
  11430. "properties": {
  11431. "type": {
  11432. "anyOf": [
  11433. {
  11434. "type": "string",
  11435. "const": "oauth"
  11436. },
  11437. {
  11438. "type": "string",
  11439. "const": "api"
  11440. }
  11441. ]
  11442. },
  11443. "label": {
  11444. "type": "string"
  11445. }
  11446. },
  11447. "required": ["type", "label"]
  11448. },
  11449. "ProviderAuthAuthorization": {
  11450. "type": "object",
  11451. "properties": {
  11452. "url": {
  11453. "type": "string"
  11454. },
  11455. "method": {
  11456. "anyOf": [
  11457. {
  11458. "type": "string",
  11459. "const": "auto"
  11460. },
  11461. {
  11462. "type": "string",
  11463. "const": "code"
  11464. }
  11465. ]
  11466. },
  11467. "instructions": {
  11468. "type": "string"
  11469. }
  11470. },
  11471. "required": ["url", "method", "instructions"]
  11472. },
  11473. "Symbol": {
  11474. "type": "object",
  11475. "properties": {
  11476. "name": {
  11477. "type": "string"
  11478. },
  11479. "kind": {
  11480. "type": "number"
  11481. },
  11482. "location": {
  11483. "type": "object",
  11484. "properties": {
  11485. "uri": {
  11486. "type": "string"
  11487. },
  11488. "range": {
  11489. "$ref": "#/components/schemas/Range"
  11490. }
  11491. },
  11492. "required": ["uri", "range"]
  11493. }
  11494. },
  11495. "required": ["name", "kind", "location"]
  11496. },
  11497. "FileNode": {
  11498. "type": "object",
  11499. "properties": {
  11500. "name": {
  11501. "type": "string"
  11502. },
  11503. "path": {
  11504. "type": "string"
  11505. },
  11506. "absolute": {
  11507. "type": "string"
  11508. },
  11509. "type": {
  11510. "type": "string",
  11511. "enum": ["file", "directory"]
  11512. },
  11513. "ignored": {
  11514. "type": "boolean"
  11515. }
  11516. },
  11517. "required": ["name", "path", "absolute", "type", "ignored"]
  11518. },
  11519. "FileContent": {
  11520. "type": "object",
  11521. "properties": {
  11522. "type": {
  11523. "type": "string",
  11524. "enum": ["text", "binary"]
  11525. },
  11526. "content": {
  11527. "type": "string"
  11528. },
  11529. "diff": {
  11530. "type": "string"
  11531. },
  11532. "patch": {
  11533. "type": "object",
  11534. "properties": {
  11535. "oldFileName": {
  11536. "type": "string"
  11537. },
  11538. "newFileName": {
  11539. "type": "string"
  11540. },
  11541. "oldHeader": {
  11542. "type": "string"
  11543. },
  11544. "newHeader": {
  11545. "type": "string"
  11546. },
  11547. "hunks": {
  11548. "type": "array",
  11549. "items": {
  11550. "type": "object",
  11551. "properties": {
  11552. "oldStart": {
  11553. "type": "number"
  11554. },
  11555. "oldLines": {
  11556. "type": "number"
  11557. },
  11558. "newStart": {
  11559. "type": "number"
  11560. },
  11561. "newLines": {
  11562. "type": "number"
  11563. },
  11564. "lines": {
  11565. "type": "array",
  11566. "items": {
  11567. "type": "string"
  11568. }
  11569. }
  11570. },
  11571. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  11572. }
  11573. },
  11574. "index": {
  11575. "type": "string"
  11576. }
  11577. },
  11578. "required": ["oldFileName", "newFileName", "hunks"]
  11579. },
  11580. "encoding": {
  11581. "type": "string",
  11582. "const": "base64"
  11583. },
  11584. "mimeType": {
  11585. "type": "string"
  11586. }
  11587. },
  11588. "required": ["type", "content"]
  11589. },
  11590. "File": {
  11591. "type": "object",
  11592. "properties": {
  11593. "path": {
  11594. "type": "string"
  11595. },
  11596. "added": {
  11597. "type": "integer",
  11598. "minimum": -9007199254740991,
  11599. "maximum": 9007199254740991
  11600. },
  11601. "removed": {
  11602. "type": "integer",
  11603. "minimum": -9007199254740991,
  11604. "maximum": 9007199254740991
  11605. },
  11606. "status": {
  11607. "type": "string",
  11608. "enum": ["added", "deleted", "modified"]
  11609. }
  11610. },
  11611. "required": ["path", "added", "removed", "status"]
  11612. },
  11613. "MCPStatusConnected": {
  11614. "type": "object",
  11615. "properties": {
  11616. "status": {
  11617. "type": "string",
  11618. "const": "connected"
  11619. }
  11620. },
  11621. "required": ["status"]
  11622. },
  11623. "MCPStatusDisabled": {
  11624. "type": "object",
  11625. "properties": {
  11626. "status": {
  11627. "type": "string",
  11628. "const": "disabled"
  11629. }
  11630. },
  11631. "required": ["status"]
  11632. },
  11633. "MCPStatusFailed": {
  11634. "type": "object",
  11635. "properties": {
  11636. "status": {
  11637. "type": "string",
  11638. "const": "failed"
  11639. },
  11640. "error": {
  11641. "type": "string"
  11642. }
  11643. },
  11644. "required": ["status", "error"]
  11645. },
  11646. "MCPStatusNeedsAuth": {
  11647. "type": "object",
  11648. "properties": {
  11649. "status": {
  11650. "type": "string",
  11651. "const": "needs_auth"
  11652. }
  11653. },
  11654. "required": ["status"]
  11655. },
  11656. "MCPStatusNeedsClientRegistration": {
  11657. "type": "object",
  11658. "properties": {
  11659. "status": {
  11660. "type": "string",
  11661. "const": "needs_client_registration"
  11662. },
  11663. "error": {
  11664. "type": "string"
  11665. }
  11666. },
  11667. "required": ["status", "error"]
  11668. },
  11669. "MCPStatus": {
  11670. "anyOf": [
  11671. {
  11672. "$ref": "#/components/schemas/MCPStatusConnected"
  11673. },
  11674. {
  11675. "$ref": "#/components/schemas/MCPStatusDisabled"
  11676. },
  11677. {
  11678. "$ref": "#/components/schemas/MCPStatusFailed"
  11679. },
  11680. {
  11681. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  11682. },
  11683. {
  11684. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  11685. }
  11686. ]
  11687. },
  11688. "Path": {
  11689. "type": "object",
  11690. "properties": {
  11691. "home": {
  11692. "type": "string"
  11693. },
  11694. "state": {
  11695. "type": "string"
  11696. },
  11697. "config": {
  11698. "type": "string"
  11699. },
  11700. "worktree": {
  11701. "type": "string"
  11702. },
  11703. "directory": {
  11704. "type": "string"
  11705. }
  11706. },
  11707. "required": ["home", "state", "config", "worktree", "directory"]
  11708. },
  11709. "VcsInfo": {
  11710. "type": "object",
  11711. "properties": {
  11712. "branch": {
  11713. "type": "string"
  11714. }
  11715. },
  11716. "required": ["branch"]
  11717. },
  11718. "Command": {
  11719. "type": "object",
  11720. "properties": {
  11721. "name": {
  11722. "type": "string"
  11723. },
  11724. "description": {
  11725. "type": "string"
  11726. },
  11727. "agent": {
  11728. "type": "string"
  11729. },
  11730. "model": {
  11731. "type": "string"
  11732. },
  11733. "source": {
  11734. "type": "string",
  11735. "enum": ["command", "mcp", "skill"]
  11736. },
  11737. "template": {
  11738. "anyOf": [
  11739. {
  11740. "type": "string"
  11741. },
  11742. {
  11743. "type": "string"
  11744. }
  11745. ]
  11746. },
  11747. "subtask": {
  11748. "type": "boolean"
  11749. },
  11750. "hints": {
  11751. "type": "array",
  11752. "items": {
  11753. "type": "string"
  11754. }
  11755. }
  11756. },
  11757. "required": ["name", "template", "hints"]
  11758. },
  11759. "Agent": {
  11760. "type": "object",
  11761. "properties": {
  11762. "name": {
  11763. "type": "string"
  11764. },
  11765. "description": {
  11766. "type": "string"
  11767. },
  11768. "mode": {
  11769. "type": "string",
  11770. "enum": ["subagent", "primary", "all"]
  11771. },
  11772. "native": {
  11773. "type": "boolean"
  11774. },
  11775. "hidden": {
  11776. "type": "boolean"
  11777. },
  11778. "topP": {
  11779. "type": "number"
  11780. },
  11781. "temperature": {
  11782. "type": "number"
  11783. },
  11784. "color": {
  11785. "type": "string"
  11786. },
  11787. "permission": {
  11788. "$ref": "#/components/schemas/PermissionRuleset"
  11789. },
  11790. "model": {
  11791. "type": "object",
  11792. "properties": {
  11793. "modelID": {
  11794. "type": "string"
  11795. },
  11796. "providerID": {
  11797. "type": "string"
  11798. }
  11799. },
  11800. "required": ["modelID", "providerID"]
  11801. },
  11802. "variant": {
  11803. "type": "string"
  11804. },
  11805. "prompt": {
  11806. "type": "string"
  11807. },
  11808. "options": {
  11809. "type": "object",
  11810. "propertyNames": {
  11811. "type": "string"
  11812. },
  11813. "additionalProperties": {}
  11814. },
  11815. "steps": {
  11816. "type": "integer",
  11817. "exclusiveMinimum": 0,
  11818. "maximum": 9007199254740991
  11819. }
  11820. },
  11821. "required": ["name", "mode", "permission", "options"]
  11822. },
  11823. "LSPStatus": {
  11824. "type": "object",
  11825. "properties": {
  11826. "id": {
  11827. "type": "string"
  11828. },
  11829. "name": {
  11830. "type": "string"
  11831. },
  11832. "root": {
  11833. "type": "string"
  11834. },
  11835. "status": {
  11836. "anyOf": [
  11837. {
  11838. "type": "string",
  11839. "const": "connected"
  11840. },
  11841. {
  11842. "type": "string",
  11843. "const": "error"
  11844. }
  11845. ]
  11846. }
  11847. },
  11848. "required": ["id", "name", "root", "status"]
  11849. },
  11850. "FormatterStatus": {
  11851. "type": "object",
  11852. "properties": {
  11853. "name": {
  11854. "type": "string"
  11855. },
  11856. "extensions": {
  11857. "type": "array",
  11858. "items": {
  11859. "type": "string"
  11860. }
  11861. },
  11862. "enabled": {
  11863. "type": "boolean"
  11864. }
  11865. },
  11866. "required": ["name", "extensions", "enabled"]
  11867. }
  11868. }
  11869. }
  11870. }