openapi.json 260 KB

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