openapi.json 259 KB

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