openapi.json 301 KB

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