openapi.json 257 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841
  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. "cost": {
  2863. "type": "object",
  2864. "properties": {
  2865. "input": {
  2866. "type": "number"
  2867. },
  2868. "output": {
  2869. "type": "number"
  2870. },
  2871. "cache_read": {
  2872. "type": "number"
  2873. },
  2874. "cache_write": {
  2875. "type": "number"
  2876. },
  2877. "context_over_200k": {
  2878. "type": "object",
  2879. "properties": {
  2880. "input": {
  2881. "type": "number"
  2882. },
  2883. "output": {
  2884. "type": "number"
  2885. },
  2886. "cache_read": {
  2887. "type": "number"
  2888. },
  2889. "cache_write": {
  2890. "type": "number"
  2891. }
  2892. },
  2893. "required": [
  2894. "input",
  2895. "output"
  2896. ]
  2897. }
  2898. },
  2899. "required": [
  2900. "input",
  2901. "output"
  2902. ]
  2903. },
  2904. "limit": {
  2905. "type": "object",
  2906. "properties": {
  2907. "context": {
  2908. "type": "number"
  2909. },
  2910. "output": {
  2911. "type": "number"
  2912. }
  2913. },
  2914. "required": [
  2915. "context",
  2916. "output"
  2917. ]
  2918. },
  2919. "modalities": {
  2920. "type": "object",
  2921. "properties": {
  2922. "input": {
  2923. "type": "array",
  2924. "items": {
  2925. "type": "string",
  2926. "enum": [
  2927. "text",
  2928. "audio",
  2929. "image",
  2930. "video",
  2931. "pdf"
  2932. ]
  2933. }
  2934. },
  2935. "output": {
  2936. "type": "array",
  2937. "items": {
  2938. "type": "string",
  2939. "enum": [
  2940. "text",
  2941. "audio",
  2942. "image",
  2943. "video",
  2944. "pdf"
  2945. ]
  2946. }
  2947. }
  2948. },
  2949. "required": [
  2950. "input",
  2951. "output"
  2952. ]
  2953. },
  2954. "experimental": {
  2955. "type": "boolean"
  2956. },
  2957. "status": {
  2958. "type": "string",
  2959. "enum": [
  2960. "alpha",
  2961. "beta",
  2962. "deprecated"
  2963. ]
  2964. },
  2965. "options": {
  2966. "type": "object",
  2967. "propertyNames": {
  2968. "type": "string"
  2969. },
  2970. "additionalProperties": {}
  2971. },
  2972. "headers": {
  2973. "type": "object",
  2974. "propertyNames": {
  2975. "type": "string"
  2976. },
  2977. "additionalProperties": {
  2978. "type": "string"
  2979. }
  2980. },
  2981. "provider": {
  2982. "type": "object",
  2983. "properties": {
  2984. "npm": {
  2985. "type": "string"
  2986. }
  2987. },
  2988. "required": [
  2989. "npm"
  2990. ]
  2991. }
  2992. },
  2993. "required": [
  2994. "id",
  2995. "name",
  2996. "release_date",
  2997. "attachment",
  2998. "reasoning",
  2999. "temperature",
  3000. "tool_call",
  3001. "limit",
  3002. "options"
  3003. ]
  3004. }
  3005. }
  3006. },
  3007. "required": [
  3008. "name",
  3009. "env",
  3010. "id",
  3011. "models"
  3012. ]
  3013. }
  3014. },
  3015. "default": {
  3016. "type": "object",
  3017. "propertyNames": {
  3018. "type": "string"
  3019. },
  3020. "additionalProperties": {
  3021. "type": "string"
  3022. }
  3023. },
  3024. "connected": {
  3025. "type": "array",
  3026. "items": {
  3027. "type": "string"
  3028. }
  3029. }
  3030. },
  3031. "required": [
  3032. "all",
  3033. "default",
  3034. "connected"
  3035. ]
  3036. }
  3037. }
  3038. }
  3039. }
  3040. },
  3041. "x-codeSamples": [
  3042. {
  3043. "lang": "js",
  3044. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  3045. }
  3046. ]
  3047. }
  3048. },
  3049. "/provider/auth": {
  3050. "get": {
  3051. "operationId": "provider.auth",
  3052. "parameters": [
  3053. {
  3054. "in": "query",
  3055. "name": "directory",
  3056. "schema": {
  3057. "type": "string"
  3058. }
  3059. }
  3060. ],
  3061. "summary": "Get provider auth methods",
  3062. "description": "Retrieve available authentication methods for all AI providers.",
  3063. "responses": {
  3064. "200": {
  3065. "description": "Provider auth methods",
  3066. "content": {
  3067. "application/json": {
  3068. "schema": {
  3069. "type": "object",
  3070. "propertyNames": {
  3071. "type": "string"
  3072. },
  3073. "additionalProperties": {
  3074. "type": "array",
  3075. "items": {
  3076. "$ref": "#/components/schemas/ProviderAuthMethod"
  3077. }
  3078. }
  3079. }
  3080. }
  3081. }
  3082. }
  3083. },
  3084. "x-codeSamples": [
  3085. {
  3086. "lang": "js",
  3087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  3088. }
  3089. ]
  3090. }
  3091. },
  3092. "/provider/{providerID}/oauth/authorize": {
  3093. "post": {
  3094. "operationId": "provider.oauth.authorize",
  3095. "parameters": [
  3096. {
  3097. "in": "query",
  3098. "name": "directory",
  3099. "schema": {
  3100. "type": "string"
  3101. }
  3102. },
  3103. {
  3104. "in": "path",
  3105. "name": "providerID",
  3106. "schema": {
  3107. "type": "string"
  3108. },
  3109. "required": true,
  3110. "description": "Provider ID"
  3111. }
  3112. ],
  3113. "summary": "OAuth authorize",
  3114. "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
  3115. "responses": {
  3116. "200": {
  3117. "description": "Authorization URL and method",
  3118. "content": {
  3119. "application/json": {
  3120. "schema": {
  3121. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  3122. }
  3123. }
  3124. }
  3125. },
  3126. "400": {
  3127. "description": "Bad request",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/BadRequestError"
  3132. }
  3133. }
  3134. }
  3135. }
  3136. },
  3137. "requestBody": {
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "type": "object",
  3142. "properties": {
  3143. "method": {
  3144. "description": "Auth method index",
  3145. "type": "number"
  3146. }
  3147. },
  3148. "required": [
  3149. "method"
  3150. ]
  3151. }
  3152. }
  3153. }
  3154. },
  3155. "x-codeSamples": [
  3156. {
  3157. "lang": "js",
  3158. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  3159. }
  3160. ]
  3161. }
  3162. },
  3163. "/provider/{providerID}/oauth/callback": {
  3164. "post": {
  3165. "operationId": "provider.oauth.callback",
  3166. "parameters": [
  3167. {
  3168. "in": "query",
  3169. "name": "directory",
  3170. "schema": {
  3171. "type": "string"
  3172. }
  3173. },
  3174. {
  3175. "in": "path",
  3176. "name": "providerID",
  3177. "schema": {
  3178. "type": "string"
  3179. },
  3180. "required": true,
  3181. "description": "Provider ID"
  3182. }
  3183. ],
  3184. "summary": "OAuth callback",
  3185. "description": "Handle the OAuth callback from a provider after user authorization.",
  3186. "responses": {
  3187. "200": {
  3188. "description": "OAuth callback processed successfully",
  3189. "content": {
  3190. "application/json": {
  3191. "schema": {
  3192. "type": "boolean"
  3193. }
  3194. }
  3195. }
  3196. },
  3197. "400": {
  3198. "description": "Bad request",
  3199. "content": {
  3200. "application/json": {
  3201. "schema": {
  3202. "$ref": "#/components/schemas/BadRequestError"
  3203. }
  3204. }
  3205. }
  3206. }
  3207. },
  3208. "requestBody": {
  3209. "content": {
  3210. "application/json": {
  3211. "schema": {
  3212. "type": "object",
  3213. "properties": {
  3214. "method": {
  3215. "description": "Auth method index",
  3216. "type": "number"
  3217. },
  3218. "code": {
  3219. "description": "OAuth authorization code",
  3220. "type": "string"
  3221. }
  3222. },
  3223. "required": [
  3224. "method"
  3225. ]
  3226. }
  3227. }
  3228. }
  3229. },
  3230. "x-codeSamples": [
  3231. {
  3232. "lang": "js",
  3233. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  3234. }
  3235. ]
  3236. }
  3237. },
  3238. "/find": {
  3239. "get": {
  3240. "operationId": "find.text",
  3241. "parameters": [
  3242. {
  3243. "in": "query",
  3244. "name": "directory",
  3245. "schema": {
  3246. "type": "string"
  3247. }
  3248. },
  3249. {
  3250. "in": "query",
  3251. "name": "pattern",
  3252. "schema": {
  3253. "type": "string"
  3254. },
  3255. "required": true
  3256. }
  3257. ],
  3258. "summary": "Find text",
  3259. "description": "Search for text patterns across files in the project using ripgrep.",
  3260. "responses": {
  3261. "200": {
  3262. "description": "Matches",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "type": "array",
  3267. "items": {
  3268. "type": "object",
  3269. "properties": {
  3270. "path": {
  3271. "type": "object",
  3272. "properties": {
  3273. "text": {
  3274. "type": "string"
  3275. }
  3276. },
  3277. "required": [
  3278. "text"
  3279. ]
  3280. },
  3281. "lines": {
  3282. "type": "object",
  3283. "properties": {
  3284. "text": {
  3285. "type": "string"
  3286. }
  3287. },
  3288. "required": [
  3289. "text"
  3290. ]
  3291. },
  3292. "line_number": {
  3293. "type": "number"
  3294. },
  3295. "absolute_offset": {
  3296. "type": "number"
  3297. },
  3298. "submatches": {
  3299. "type": "array",
  3300. "items": {
  3301. "type": "object",
  3302. "properties": {
  3303. "match": {
  3304. "type": "object",
  3305. "properties": {
  3306. "text": {
  3307. "type": "string"
  3308. }
  3309. },
  3310. "required": [
  3311. "text"
  3312. ]
  3313. },
  3314. "start": {
  3315. "type": "number"
  3316. },
  3317. "end": {
  3318. "type": "number"
  3319. }
  3320. },
  3321. "required": [
  3322. "match",
  3323. "start",
  3324. "end"
  3325. ]
  3326. }
  3327. }
  3328. },
  3329. "required": [
  3330. "path",
  3331. "lines",
  3332. "line_number",
  3333. "absolute_offset",
  3334. "submatches"
  3335. ]
  3336. }
  3337. }
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "x-codeSamples": [
  3343. {
  3344. "lang": "js",
  3345. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  3346. }
  3347. ]
  3348. }
  3349. },
  3350. "/find/file": {
  3351. "get": {
  3352. "operationId": "find.files",
  3353. "parameters": [
  3354. {
  3355. "in": "query",
  3356. "name": "directory",
  3357. "schema": {
  3358. "type": "string"
  3359. }
  3360. },
  3361. {
  3362. "in": "query",
  3363. "name": "query",
  3364. "schema": {
  3365. "type": "string"
  3366. },
  3367. "required": true
  3368. },
  3369. {
  3370. "in": "query",
  3371. "name": "dirs",
  3372. "schema": {
  3373. "type": "string",
  3374. "enum": [
  3375. "true",
  3376. "false"
  3377. ]
  3378. }
  3379. }
  3380. ],
  3381. "summary": "Find files",
  3382. "description": "Search for files by name or pattern in the project directory.",
  3383. "responses": {
  3384. "200": {
  3385. "description": "File paths",
  3386. "content": {
  3387. "application/json": {
  3388. "schema": {
  3389. "type": "array",
  3390. "items": {
  3391. "type": "string"
  3392. }
  3393. }
  3394. }
  3395. }
  3396. }
  3397. },
  3398. "x-codeSamples": [
  3399. {
  3400. "lang": "js",
  3401. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  3402. }
  3403. ]
  3404. }
  3405. },
  3406. "/find/symbol": {
  3407. "get": {
  3408. "operationId": "find.symbols",
  3409. "parameters": [
  3410. {
  3411. "in": "query",
  3412. "name": "directory",
  3413. "schema": {
  3414. "type": "string"
  3415. }
  3416. },
  3417. {
  3418. "in": "query",
  3419. "name": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": true
  3424. }
  3425. ],
  3426. "summary": "Find symbols",
  3427. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  3428. "responses": {
  3429. "200": {
  3430. "description": "Symbols",
  3431. "content": {
  3432. "application/json": {
  3433. "schema": {
  3434. "type": "array",
  3435. "items": {
  3436. "$ref": "#/components/schemas/Symbol"
  3437. }
  3438. }
  3439. }
  3440. }
  3441. }
  3442. },
  3443. "x-codeSamples": [
  3444. {
  3445. "lang": "js",
  3446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  3447. }
  3448. ]
  3449. }
  3450. },
  3451. "/file": {
  3452. "get": {
  3453. "operationId": "file.list",
  3454. "parameters": [
  3455. {
  3456. "in": "query",
  3457. "name": "directory",
  3458. "schema": {
  3459. "type": "string"
  3460. }
  3461. },
  3462. {
  3463. "in": "query",
  3464. "name": "path",
  3465. "schema": {
  3466. "type": "string"
  3467. },
  3468. "required": true
  3469. }
  3470. ],
  3471. "summary": "List files",
  3472. "description": "List files and directories in a specified path.",
  3473. "responses": {
  3474. "200": {
  3475. "description": "Files and directories",
  3476. "content": {
  3477. "application/json": {
  3478. "schema": {
  3479. "type": "array",
  3480. "items": {
  3481. "$ref": "#/components/schemas/FileNode"
  3482. }
  3483. }
  3484. }
  3485. }
  3486. }
  3487. },
  3488. "x-codeSamples": [
  3489. {
  3490. "lang": "js",
  3491. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  3492. }
  3493. ]
  3494. }
  3495. },
  3496. "/file/content": {
  3497. "get": {
  3498. "operationId": "file.read",
  3499. "parameters": [
  3500. {
  3501. "in": "query",
  3502. "name": "directory",
  3503. "schema": {
  3504. "type": "string"
  3505. }
  3506. },
  3507. {
  3508. "in": "query",
  3509. "name": "path",
  3510. "schema": {
  3511. "type": "string"
  3512. },
  3513. "required": true
  3514. }
  3515. ],
  3516. "summary": "Read file",
  3517. "description": "Read the content of a specified file.",
  3518. "responses": {
  3519. "200": {
  3520. "description": "File content",
  3521. "content": {
  3522. "application/json": {
  3523. "schema": {
  3524. "$ref": "#/components/schemas/FileContent"
  3525. }
  3526. }
  3527. }
  3528. }
  3529. },
  3530. "x-codeSamples": [
  3531. {
  3532. "lang": "js",
  3533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  3534. }
  3535. ]
  3536. }
  3537. },
  3538. "/file/status": {
  3539. "get": {
  3540. "operationId": "file.status",
  3541. "parameters": [
  3542. {
  3543. "in": "query",
  3544. "name": "directory",
  3545. "schema": {
  3546. "type": "string"
  3547. }
  3548. }
  3549. ],
  3550. "summary": "Get file status",
  3551. "description": "Get the git status of all files in the project.",
  3552. "responses": {
  3553. "200": {
  3554. "description": "File status",
  3555. "content": {
  3556. "application/json": {
  3557. "schema": {
  3558. "type": "array",
  3559. "items": {
  3560. "$ref": "#/components/schemas/File"
  3561. }
  3562. }
  3563. }
  3564. }
  3565. }
  3566. },
  3567. "x-codeSamples": [
  3568. {
  3569. "lang": "js",
  3570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  3571. }
  3572. ]
  3573. }
  3574. },
  3575. "/log": {
  3576. "post": {
  3577. "operationId": "app.log",
  3578. "parameters": [
  3579. {
  3580. "in": "query",
  3581. "name": "directory",
  3582. "schema": {
  3583. "type": "string"
  3584. }
  3585. }
  3586. ],
  3587. "summary": "Write log",
  3588. "description": "Write a log entry to the server logs with specified level and metadata.",
  3589. "responses": {
  3590. "200": {
  3591. "description": "Log entry written successfully",
  3592. "content": {
  3593. "application/json": {
  3594. "schema": {
  3595. "type": "boolean"
  3596. }
  3597. }
  3598. }
  3599. },
  3600. "400": {
  3601. "description": "Bad request",
  3602. "content": {
  3603. "application/json": {
  3604. "schema": {
  3605. "$ref": "#/components/schemas/BadRequestError"
  3606. }
  3607. }
  3608. }
  3609. }
  3610. },
  3611. "requestBody": {
  3612. "content": {
  3613. "application/json": {
  3614. "schema": {
  3615. "type": "object",
  3616. "properties": {
  3617. "service": {
  3618. "description": "Service name for the log entry",
  3619. "type": "string"
  3620. },
  3621. "level": {
  3622. "description": "Log level",
  3623. "type": "string",
  3624. "enum": [
  3625. "debug",
  3626. "info",
  3627. "error",
  3628. "warn"
  3629. ]
  3630. },
  3631. "message": {
  3632. "description": "Log message",
  3633. "type": "string"
  3634. },
  3635. "extra": {
  3636. "description": "Additional metadata for the log entry",
  3637. "type": "object",
  3638. "propertyNames": {
  3639. "type": "string"
  3640. },
  3641. "additionalProperties": {}
  3642. }
  3643. },
  3644. "required": [
  3645. "service",
  3646. "level",
  3647. "message"
  3648. ]
  3649. }
  3650. }
  3651. }
  3652. },
  3653. "x-codeSamples": [
  3654. {
  3655. "lang": "js",
  3656. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  3657. }
  3658. ]
  3659. }
  3660. },
  3661. "/agent": {
  3662. "get": {
  3663. "operationId": "app.agents",
  3664. "parameters": [
  3665. {
  3666. "in": "query",
  3667. "name": "directory",
  3668. "schema": {
  3669. "type": "string"
  3670. }
  3671. }
  3672. ],
  3673. "summary": "List agents",
  3674. "description": "Get a list of all available AI agents in the OpenCode system.",
  3675. "responses": {
  3676. "200": {
  3677. "description": "List of agents",
  3678. "content": {
  3679. "application/json": {
  3680. "schema": {
  3681. "type": "array",
  3682. "items": {
  3683. "$ref": "#/components/schemas/Agent"
  3684. }
  3685. }
  3686. }
  3687. }
  3688. }
  3689. },
  3690. "x-codeSamples": [
  3691. {
  3692. "lang": "js",
  3693. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  3694. }
  3695. ]
  3696. }
  3697. },
  3698. "/mcp": {
  3699. "get": {
  3700. "operationId": "mcp.status",
  3701. "parameters": [
  3702. {
  3703. "in": "query",
  3704. "name": "directory",
  3705. "schema": {
  3706. "type": "string"
  3707. }
  3708. }
  3709. ],
  3710. "summary": "Get MCP status",
  3711. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3712. "responses": {
  3713. "200": {
  3714. "description": "MCP server status",
  3715. "content": {
  3716. "application/json": {
  3717. "schema": {
  3718. "type": "object",
  3719. "propertyNames": {
  3720. "type": "string"
  3721. },
  3722. "additionalProperties": {
  3723. "$ref": "#/components/schemas/MCPStatus"
  3724. }
  3725. }
  3726. }
  3727. }
  3728. }
  3729. },
  3730. "x-codeSamples": [
  3731. {
  3732. "lang": "js",
  3733. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3734. }
  3735. ]
  3736. },
  3737. "post": {
  3738. "operationId": "mcp.add",
  3739. "parameters": [
  3740. {
  3741. "in": "query",
  3742. "name": "directory",
  3743. "schema": {
  3744. "type": "string"
  3745. }
  3746. }
  3747. ],
  3748. "summary": "Add MCP server",
  3749. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3750. "responses": {
  3751. "200": {
  3752. "description": "MCP server added successfully",
  3753. "content": {
  3754. "application/json": {
  3755. "schema": {
  3756. "type": "object",
  3757. "propertyNames": {
  3758. "type": "string"
  3759. },
  3760. "additionalProperties": {
  3761. "$ref": "#/components/schemas/MCPStatus"
  3762. }
  3763. }
  3764. }
  3765. }
  3766. },
  3767. "400": {
  3768. "description": "Bad request",
  3769. "content": {
  3770. "application/json": {
  3771. "schema": {
  3772. "$ref": "#/components/schemas/BadRequestError"
  3773. }
  3774. }
  3775. }
  3776. }
  3777. },
  3778. "requestBody": {
  3779. "content": {
  3780. "application/json": {
  3781. "schema": {
  3782. "type": "object",
  3783. "properties": {
  3784. "name": {
  3785. "type": "string"
  3786. },
  3787. "config": {
  3788. "anyOf": [
  3789. {
  3790. "$ref": "#/components/schemas/McpLocalConfig"
  3791. },
  3792. {
  3793. "$ref": "#/components/schemas/McpRemoteConfig"
  3794. }
  3795. ]
  3796. }
  3797. },
  3798. "required": [
  3799. "name",
  3800. "config"
  3801. ]
  3802. }
  3803. }
  3804. }
  3805. },
  3806. "x-codeSamples": [
  3807. {
  3808. "lang": "js",
  3809. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3810. }
  3811. ]
  3812. }
  3813. },
  3814. "/mcp/{name}/auth": {
  3815. "post": {
  3816. "operationId": "mcp.auth.start",
  3817. "parameters": [
  3818. {
  3819. "in": "query",
  3820. "name": "directory",
  3821. "schema": {
  3822. "type": "string"
  3823. }
  3824. },
  3825. {
  3826. "schema": {
  3827. "type": "string"
  3828. },
  3829. "in": "path",
  3830. "name": "name",
  3831. "required": true
  3832. }
  3833. ],
  3834. "summary": "Start MCP OAuth",
  3835. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3836. "responses": {
  3837. "200": {
  3838. "description": "OAuth flow started",
  3839. "content": {
  3840. "application/json": {
  3841. "schema": {
  3842. "type": "object",
  3843. "properties": {
  3844. "authorizationUrl": {
  3845. "description": "URL to open in browser for authorization",
  3846. "type": "string"
  3847. }
  3848. },
  3849. "required": [
  3850. "authorizationUrl"
  3851. ]
  3852. }
  3853. }
  3854. }
  3855. },
  3856. "400": {
  3857. "description": "Bad request",
  3858. "content": {
  3859. "application/json": {
  3860. "schema": {
  3861. "$ref": "#/components/schemas/BadRequestError"
  3862. }
  3863. }
  3864. }
  3865. },
  3866. "404": {
  3867. "description": "Not found",
  3868. "content": {
  3869. "application/json": {
  3870. "schema": {
  3871. "$ref": "#/components/schemas/NotFoundError"
  3872. }
  3873. }
  3874. }
  3875. }
  3876. },
  3877. "x-codeSamples": [
  3878. {
  3879. "lang": "js",
  3880. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3881. }
  3882. ]
  3883. },
  3884. "delete": {
  3885. "operationId": "mcp.auth.remove",
  3886. "parameters": [
  3887. {
  3888. "in": "query",
  3889. "name": "directory",
  3890. "schema": {
  3891. "type": "string"
  3892. }
  3893. },
  3894. {
  3895. "schema": {
  3896. "type": "string"
  3897. },
  3898. "in": "path",
  3899. "name": "name",
  3900. "required": true
  3901. }
  3902. ],
  3903. "summary": "Remove MCP OAuth",
  3904. "description": "Remove OAuth credentials for an MCP server",
  3905. "responses": {
  3906. "200": {
  3907. "description": "OAuth credentials removed",
  3908. "content": {
  3909. "application/json": {
  3910. "schema": {
  3911. "type": "object",
  3912. "properties": {
  3913. "success": {
  3914. "type": "boolean",
  3915. "const": true
  3916. }
  3917. },
  3918. "required": [
  3919. "success"
  3920. ]
  3921. }
  3922. }
  3923. }
  3924. },
  3925. "404": {
  3926. "description": "Not found",
  3927. "content": {
  3928. "application/json": {
  3929. "schema": {
  3930. "$ref": "#/components/schemas/NotFoundError"
  3931. }
  3932. }
  3933. }
  3934. }
  3935. },
  3936. "x-codeSamples": [
  3937. {
  3938. "lang": "js",
  3939. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3940. }
  3941. ]
  3942. }
  3943. },
  3944. "/mcp/{name}/auth/callback": {
  3945. "post": {
  3946. "operationId": "mcp.auth.callback",
  3947. "parameters": [
  3948. {
  3949. "in": "query",
  3950. "name": "directory",
  3951. "schema": {
  3952. "type": "string"
  3953. }
  3954. },
  3955. {
  3956. "schema": {
  3957. "type": "string"
  3958. },
  3959. "in": "path",
  3960. "name": "name",
  3961. "required": true
  3962. }
  3963. ],
  3964. "summary": "Complete MCP OAuth",
  3965. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3966. "responses": {
  3967. "200": {
  3968. "description": "OAuth authentication completed",
  3969. "content": {
  3970. "application/json": {
  3971. "schema": {
  3972. "$ref": "#/components/schemas/MCPStatus"
  3973. }
  3974. }
  3975. }
  3976. },
  3977. "400": {
  3978. "description": "Bad request",
  3979. "content": {
  3980. "application/json": {
  3981. "schema": {
  3982. "$ref": "#/components/schemas/BadRequestError"
  3983. }
  3984. }
  3985. }
  3986. },
  3987. "404": {
  3988. "description": "Not found",
  3989. "content": {
  3990. "application/json": {
  3991. "schema": {
  3992. "$ref": "#/components/schemas/NotFoundError"
  3993. }
  3994. }
  3995. }
  3996. }
  3997. },
  3998. "requestBody": {
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "type": "object",
  4003. "properties": {
  4004. "code": {
  4005. "description": "Authorization code from OAuth callback",
  4006. "type": "string"
  4007. }
  4008. },
  4009. "required": [
  4010. "code"
  4011. ]
  4012. }
  4013. }
  4014. }
  4015. },
  4016. "x-codeSamples": [
  4017. {
  4018. "lang": "js",
  4019. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  4020. }
  4021. ]
  4022. }
  4023. },
  4024. "/mcp/{name}/auth/authenticate": {
  4025. "post": {
  4026. "operationId": "mcp.auth.authenticate",
  4027. "parameters": [
  4028. {
  4029. "in": "query",
  4030. "name": "directory",
  4031. "schema": {
  4032. "type": "string"
  4033. }
  4034. },
  4035. {
  4036. "schema": {
  4037. "type": "string"
  4038. },
  4039. "in": "path",
  4040. "name": "name",
  4041. "required": true
  4042. }
  4043. ],
  4044. "summary": "Authenticate MCP OAuth",
  4045. "description": "Start OAuth flow and wait for callback (opens browser)",
  4046. "responses": {
  4047. "200": {
  4048. "description": "OAuth authentication completed",
  4049. "content": {
  4050. "application/json": {
  4051. "schema": {
  4052. "$ref": "#/components/schemas/MCPStatus"
  4053. }
  4054. }
  4055. }
  4056. },
  4057. "400": {
  4058. "description": "Bad request",
  4059. "content": {
  4060. "application/json": {
  4061. "schema": {
  4062. "$ref": "#/components/schemas/BadRequestError"
  4063. }
  4064. }
  4065. }
  4066. },
  4067. "404": {
  4068. "description": "Not found",
  4069. "content": {
  4070. "application/json": {
  4071. "schema": {
  4072. "$ref": "#/components/schemas/NotFoundError"
  4073. }
  4074. }
  4075. }
  4076. }
  4077. },
  4078. "x-codeSamples": [
  4079. {
  4080. "lang": "js",
  4081. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  4082. }
  4083. ]
  4084. }
  4085. },
  4086. "/mcp/{name}/connect": {
  4087. "post": {
  4088. "operationId": "mcp.connect",
  4089. "parameters": [
  4090. {
  4091. "in": "query",
  4092. "name": "directory",
  4093. "schema": {
  4094. "type": "string"
  4095. }
  4096. },
  4097. {
  4098. "in": "path",
  4099. "name": "name",
  4100. "schema": {
  4101. "type": "string"
  4102. },
  4103. "required": true
  4104. }
  4105. ],
  4106. "description": "Connect an MCP server",
  4107. "responses": {
  4108. "200": {
  4109. "description": "MCP server connected successfully",
  4110. "content": {
  4111. "application/json": {
  4112. "schema": {
  4113. "type": "boolean"
  4114. }
  4115. }
  4116. }
  4117. }
  4118. },
  4119. "x-codeSamples": [
  4120. {
  4121. "lang": "js",
  4122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  4123. }
  4124. ]
  4125. }
  4126. },
  4127. "/mcp/{name}/disconnect": {
  4128. "post": {
  4129. "operationId": "mcp.disconnect",
  4130. "parameters": [
  4131. {
  4132. "in": "query",
  4133. "name": "directory",
  4134. "schema": {
  4135. "type": "string"
  4136. }
  4137. },
  4138. {
  4139. "in": "path",
  4140. "name": "name",
  4141. "schema": {
  4142. "type": "string"
  4143. },
  4144. "required": true
  4145. }
  4146. ],
  4147. "description": "Disconnect an MCP server",
  4148. "responses": {
  4149. "200": {
  4150. "description": "MCP server disconnected successfully",
  4151. "content": {
  4152. "application/json": {
  4153. "schema": {
  4154. "type": "boolean"
  4155. }
  4156. }
  4157. }
  4158. }
  4159. },
  4160. "x-codeSamples": [
  4161. {
  4162. "lang": "js",
  4163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  4164. }
  4165. ]
  4166. }
  4167. },
  4168. "/lsp": {
  4169. "get": {
  4170. "operationId": "lsp.status",
  4171. "parameters": [
  4172. {
  4173. "in": "query",
  4174. "name": "directory",
  4175. "schema": {
  4176. "type": "string"
  4177. }
  4178. }
  4179. ],
  4180. "summary": "Get LSP status",
  4181. "description": "Get LSP server status",
  4182. "responses": {
  4183. "200": {
  4184. "description": "LSP server status",
  4185. "content": {
  4186. "application/json": {
  4187. "schema": {
  4188. "type": "array",
  4189. "items": {
  4190. "$ref": "#/components/schemas/LSPStatus"
  4191. }
  4192. }
  4193. }
  4194. }
  4195. }
  4196. },
  4197. "x-codeSamples": [
  4198. {
  4199. "lang": "js",
  4200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  4201. }
  4202. ]
  4203. }
  4204. },
  4205. "/formatter": {
  4206. "get": {
  4207. "operationId": "formatter.status",
  4208. "parameters": [
  4209. {
  4210. "in": "query",
  4211. "name": "directory",
  4212. "schema": {
  4213. "type": "string"
  4214. }
  4215. }
  4216. ],
  4217. "summary": "Get formatter status",
  4218. "description": "Get formatter status",
  4219. "responses": {
  4220. "200": {
  4221. "description": "Formatter status",
  4222. "content": {
  4223. "application/json": {
  4224. "schema": {
  4225. "type": "array",
  4226. "items": {
  4227. "$ref": "#/components/schemas/FormatterStatus"
  4228. }
  4229. }
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "x-codeSamples": [
  4235. {
  4236. "lang": "js",
  4237. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  4238. }
  4239. ]
  4240. }
  4241. },
  4242. "/tui/append-prompt": {
  4243. "post": {
  4244. "operationId": "tui.appendPrompt",
  4245. "parameters": [
  4246. {
  4247. "in": "query",
  4248. "name": "directory",
  4249. "schema": {
  4250. "type": "string"
  4251. }
  4252. }
  4253. ],
  4254. "summary": "Append TUI prompt",
  4255. "description": "Append prompt to the TUI",
  4256. "responses": {
  4257. "200": {
  4258. "description": "Prompt processed successfully",
  4259. "content": {
  4260. "application/json": {
  4261. "schema": {
  4262. "type": "boolean"
  4263. }
  4264. }
  4265. }
  4266. },
  4267. "400": {
  4268. "description": "Bad request",
  4269. "content": {
  4270. "application/json": {
  4271. "schema": {
  4272. "$ref": "#/components/schemas/BadRequestError"
  4273. }
  4274. }
  4275. }
  4276. }
  4277. },
  4278. "requestBody": {
  4279. "content": {
  4280. "application/json": {
  4281. "schema": {
  4282. "type": "object",
  4283. "properties": {
  4284. "text": {
  4285. "type": "string"
  4286. }
  4287. },
  4288. "required": [
  4289. "text"
  4290. ]
  4291. }
  4292. }
  4293. }
  4294. },
  4295. "x-codeSamples": [
  4296. {
  4297. "lang": "js",
  4298. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  4299. }
  4300. ]
  4301. }
  4302. },
  4303. "/tui/open-help": {
  4304. "post": {
  4305. "operationId": "tui.openHelp",
  4306. "parameters": [
  4307. {
  4308. "in": "query",
  4309. "name": "directory",
  4310. "schema": {
  4311. "type": "string"
  4312. }
  4313. }
  4314. ],
  4315. "summary": "Open help dialog",
  4316. "description": "Open the help dialog in the TUI to display user assistance information.",
  4317. "responses": {
  4318. "200": {
  4319. "description": "Help dialog opened successfully",
  4320. "content": {
  4321. "application/json": {
  4322. "schema": {
  4323. "type": "boolean"
  4324. }
  4325. }
  4326. }
  4327. }
  4328. },
  4329. "x-codeSamples": [
  4330. {
  4331. "lang": "js",
  4332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  4333. }
  4334. ]
  4335. }
  4336. },
  4337. "/tui/open-sessions": {
  4338. "post": {
  4339. "operationId": "tui.openSessions",
  4340. "parameters": [
  4341. {
  4342. "in": "query",
  4343. "name": "directory",
  4344. "schema": {
  4345. "type": "string"
  4346. }
  4347. }
  4348. ],
  4349. "summary": "Open sessions dialog",
  4350. "description": "Open the session dialog",
  4351. "responses": {
  4352. "200": {
  4353. "description": "Session dialog opened successfully",
  4354. "content": {
  4355. "application/json": {
  4356. "schema": {
  4357. "type": "boolean"
  4358. }
  4359. }
  4360. }
  4361. }
  4362. },
  4363. "x-codeSamples": [
  4364. {
  4365. "lang": "js",
  4366. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  4367. }
  4368. ]
  4369. }
  4370. },
  4371. "/tui/open-themes": {
  4372. "post": {
  4373. "operationId": "tui.openThemes",
  4374. "parameters": [
  4375. {
  4376. "in": "query",
  4377. "name": "directory",
  4378. "schema": {
  4379. "type": "string"
  4380. }
  4381. }
  4382. ],
  4383. "summary": "Open themes dialog",
  4384. "description": "Open the theme dialog",
  4385. "responses": {
  4386. "200": {
  4387. "description": "Theme dialog opened successfully",
  4388. "content": {
  4389. "application/json": {
  4390. "schema": {
  4391. "type": "boolean"
  4392. }
  4393. }
  4394. }
  4395. }
  4396. },
  4397. "x-codeSamples": [
  4398. {
  4399. "lang": "js",
  4400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  4401. }
  4402. ]
  4403. }
  4404. },
  4405. "/tui/open-models": {
  4406. "post": {
  4407. "operationId": "tui.openModels",
  4408. "parameters": [
  4409. {
  4410. "in": "query",
  4411. "name": "directory",
  4412. "schema": {
  4413. "type": "string"
  4414. }
  4415. }
  4416. ],
  4417. "summary": "Open models dialog",
  4418. "description": "Open the model dialog",
  4419. "responses": {
  4420. "200": {
  4421. "description": "Model dialog opened successfully",
  4422. "content": {
  4423. "application/json": {
  4424. "schema": {
  4425. "type": "boolean"
  4426. }
  4427. }
  4428. }
  4429. }
  4430. },
  4431. "x-codeSamples": [
  4432. {
  4433. "lang": "js",
  4434. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  4435. }
  4436. ]
  4437. }
  4438. },
  4439. "/tui/submit-prompt": {
  4440. "post": {
  4441. "operationId": "tui.submitPrompt",
  4442. "parameters": [
  4443. {
  4444. "in": "query",
  4445. "name": "directory",
  4446. "schema": {
  4447. "type": "string"
  4448. }
  4449. }
  4450. ],
  4451. "summary": "Submit TUI prompt",
  4452. "description": "Submit the prompt",
  4453. "responses": {
  4454. "200": {
  4455. "description": "Prompt submitted successfully",
  4456. "content": {
  4457. "application/json": {
  4458. "schema": {
  4459. "type": "boolean"
  4460. }
  4461. }
  4462. }
  4463. }
  4464. },
  4465. "x-codeSamples": [
  4466. {
  4467. "lang": "js",
  4468. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  4469. }
  4470. ]
  4471. }
  4472. },
  4473. "/tui/clear-prompt": {
  4474. "post": {
  4475. "operationId": "tui.clearPrompt",
  4476. "parameters": [
  4477. {
  4478. "in": "query",
  4479. "name": "directory",
  4480. "schema": {
  4481. "type": "string"
  4482. }
  4483. }
  4484. ],
  4485. "summary": "Clear TUI prompt",
  4486. "description": "Clear the prompt",
  4487. "responses": {
  4488. "200": {
  4489. "description": "Prompt cleared successfully",
  4490. "content": {
  4491. "application/json": {
  4492. "schema": {
  4493. "type": "boolean"
  4494. }
  4495. }
  4496. }
  4497. }
  4498. },
  4499. "x-codeSamples": [
  4500. {
  4501. "lang": "js",
  4502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  4503. }
  4504. ]
  4505. }
  4506. },
  4507. "/tui/execute-command": {
  4508. "post": {
  4509. "operationId": "tui.executeCommand",
  4510. "parameters": [
  4511. {
  4512. "in": "query",
  4513. "name": "directory",
  4514. "schema": {
  4515. "type": "string"
  4516. }
  4517. }
  4518. ],
  4519. "summary": "Execute TUI command",
  4520. "description": "Execute a TUI command (e.g. agent_cycle)",
  4521. "responses": {
  4522. "200": {
  4523. "description": "Command executed successfully",
  4524. "content": {
  4525. "application/json": {
  4526. "schema": {
  4527. "type": "boolean"
  4528. }
  4529. }
  4530. }
  4531. },
  4532. "400": {
  4533. "description": "Bad request",
  4534. "content": {
  4535. "application/json": {
  4536. "schema": {
  4537. "$ref": "#/components/schemas/BadRequestError"
  4538. }
  4539. }
  4540. }
  4541. }
  4542. },
  4543. "requestBody": {
  4544. "content": {
  4545. "application/json": {
  4546. "schema": {
  4547. "type": "object",
  4548. "properties": {
  4549. "command": {
  4550. "type": "string"
  4551. }
  4552. },
  4553. "required": [
  4554. "command"
  4555. ]
  4556. }
  4557. }
  4558. }
  4559. },
  4560. "x-codeSamples": [
  4561. {
  4562. "lang": "js",
  4563. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  4564. }
  4565. ]
  4566. }
  4567. },
  4568. "/tui/show-toast": {
  4569. "post": {
  4570. "operationId": "tui.showToast",
  4571. "parameters": [
  4572. {
  4573. "in": "query",
  4574. "name": "directory",
  4575. "schema": {
  4576. "type": "string"
  4577. }
  4578. }
  4579. ],
  4580. "summary": "Show TUI toast",
  4581. "description": "Show a toast notification in the TUI",
  4582. "responses": {
  4583. "200": {
  4584. "description": "Toast notification shown successfully",
  4585. "content": {
  4586. "application/json": {
  4587. "schema": {
  4588. "type": "boolean"
  4589. }
  4590. }
  4591. }
  4592. }
  4593. },
  4594. "requestBody": {
  4595. "content": {
  4596. "application/json": {
  4597. "schema": {
  4598. "type": "object",
  4599. "properties": {
  4600. "title": {
  4601. "type": "string"
  4602. },
  4603. "message": {
  4604. "type": "string"
  4605. },
  4606. "variant": {
  4607. "type": "string",
  4608. "enum": [
  4609. "info",
  4610. "success",
  4611. "warning",
  4612. "error"
  4613. ]
  4614. },
  4615. "duration": {
  4616. "description": "Duration in milliseconds",
  4617. "default": 5000,
  4618. "type": "number"
  4619. }
  4620. },
  4621. "required": [
  4622. "message",
  4623. "variant"
  4624. ]
  4625. }
  4626. }
  4627. }
  4628. },
  4629. "x-codeSamples": [
  4630. {
  4631. "lang": "js",
  4632. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  4633. }
  4634. ]
  4635. }
  4636. },
  4637. "/tui/publish": {
  4638. "post": {
  4639. "operationId": "tui.publish",
  4640. "parameters": [
  4641. {
  4642. "in": "query",
  4643. "name": "directory",
  4644. "schema": {
  4645. "type": "string"
  4646. }
  4647. }
  4648. ],
  4649. "summary": "Publish TUI event",
  4650. "description": "Publish a TUI event",
  4651. "responses": {
  4652. "200": {
  4653. "description": "Event published successfully",
  4654. "content": {
  4655. "application/json": {
  4656. "schema": {
  4657. "type": "boolean"
  4658. }
  4659. }
  4660. }
  4661. },
  4662. "400": {
  4663. "description": "Bad request",
  4664. "content": {
  4665. "application/json": {
  4666. "schema": {
  4667. "$ref": "#/components/schemas/BadRequestError"
  4668. }
  4669. }
  4670. }
  4671. }
  4672. },
  4673. "requestBody": {
  4674. "content": {
  4675. "application/json": {
  4676. "schema": {
  4677. "anyOf": [
  4678. {
  4679. "$ref": "#/components/schemas/Event.tui.prompt.append"
  4680. },
  4681. {
  4682. "$ref": "#/components/schemas/Event.tui.command.execute"
  4683. },
  4684. {
  4685. "$ref": "#/components/schemas/Event.tui.toast.show"
  4686. }
  4687. ]
  4688. }
  4689. }
  4690. }
  4691. },
  4692. "x-codeSamples": [
  4693. {
  4694. "lang": "js",
  4695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  4696. }
  4697. ]
  4698. }
  4699. },
  4700. "/tui/control/next": {
  4701. "get": {
  4702. "operationId": "tui.control.next",
  4703. "parameters": [
  4704. {
  4705. "in": "query",
  4706. "name": "directory",
  4707. "schema": {
  4708. "type": "string"
  4709. }
  4710. }
  4711. ],
  4712. "summary": "Get next TUI request",
  4713. "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
  4714. "responses": {
  4715. "200": {
  4716. "description": "Next TUI request",
  4717. "content": {
  4718. "application/json": {
  4719. "schema": {
  4720. "type": "object",
  4721. "properties": {
  4722. "path": {
  4723. "type": "string"
  4724. },
  4725. "body": {}
  4726. },
  4727. "required": [
  4728. "path",
  4729. "body"
  4730. ]
  4731. }
  4732. }
  4733. }
  4734. }
  4735. },
  4736. "x-codeSamples": [
  4737. {
  4738. "lang": "js",
  4739. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  4740. }
  4741. ]
  4742. }
  4743. },
  4744. "/tui/control/response": {
  4745. "post": {
  4746. "operationId": "tui.control.response",
  4747. "parameters": [
  4748. {
  4749. "in": "query",
  4750. "name": "directory",
  4751. "schema": {
  4752. "type": "string"
  4753. }
  4754. }
  4755. ],
  4756. "summary": "Submit TUI response",
  4757. "description": "Submit a response to the TUI request queue to complete a pending request.",
  4758. "responses": {
  4759. "200": {
  4760. "description": "Response submitted successfully",
  4761. "content": {
  4762. "application/json": {
  4763. "schema": {
  4764. "type": "boolean"
  4765. }
  4766. }
  4767. }
  4768. }
  4769. },
  4770. "requestBody": {
  4771. "content": {
  4772. "application/json": {
  4773. "schema": {}
  4774. }
  4775. }
  4776. },
  4777. "x-codeSamples": [
  4778. {
  4779. "lang": "js",
  4780. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  4781. }
  4782. ]
  4783. }
  4784. },
  4785. "/auth/{providerID}": {
  4786. "put": {
  4787. "operationId": "auth.set",
  4788. "parameters": [
  4789. {
  4790. "in": "query",
  4791. "name": "directory",
  4792. "schema": {
  4793. "type": "string"
  4794. }
  4795. },
  4796. {
  4797. "in": "path",
  4798. "name": "providerID",
  4799. "schema": {
  4800. "type": "string"
  4801. },
  4802. "required": true
  4803. }
  4804. ],
  4805. "summary": "Set auth credentials",
  4806. "description": "Set authentication credentials",
  4807. "responses": {
  4808. "200": {
  4809. "description": "Successfully set authentication credentials",
  4810. "content": {
  4811. "application/json": {
  4812. "schema": {
  4813. "type": "boolean"
  4814. }
  4815. }
  4816. }
  4817. },
  4818. "400": {
  4819. "description": "Bad request",
  4820. "content": {
  4821. "application/json": {
  4822. "schema": {
  4823. "$ref": "#/components/schemas/BadRequestError"
  4824. }
  4825. }
  4826. }
  4827. }
  4828. },
  4829. "requestBody": {
  4830. "content": {
  4831. "application/json": {
  4832. "schema": {
  4833. "$ref": "#/components/schemas/Auth"
  4834. }
  4835. }
  4836. }
  4837. },
  4838. "x-codeSamples": [
  4839. {
  4840. "lang": "js",
  4841. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  4842. }
  4843. ]
  4844. }
  4845. },
  4846. "/event": {
  4847. "get": {
  4848. "operationId": "event.subscribe",
  4849. "parameters": [
  4850. {
  4851. "in": "query",
  4852. "name": "directory",
  4853. "schema": {
  4854. "type": "string"
  4855. }
  4856. }
  4857. ],
  4858. "summary": "Subscribe to events",
  4859. "description": "Get events",
  4860. "responses": {
  4861. "200": {
  4862. "description": "Event stream",
  4863. "content": {
  4864. "text/event-stream": {
  4865. "schema": {
  4866. "$ref": "#/components/schemas/Event"
  4867. }
  4868. }
  4869. }
  4870. }
  4871. },
  4872. "x-codeSamples": [
  4873. {
  4874. "lang": "js",
  4875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  4876. }
  4877. ]
  4878. }
  4879. }
  4880. },
  4881. "components": {
  4882. "schemas": {
  4883. "Event.installation.updated": {
  4884. "type": "object",
  4885. "properties": {
  4886. "type": {
  4887. "type": "string",
  4888. "const": "installation.updated"
  4889. },
  4890. "properties": {
  4891. "type": "object",
  4892. "properties": {
  4893. "version": {
  4894. "type": "string"
  4895. }
  4896. },
  4897. "required": [
  4898. "version"
  4899. ]
  4900. }
  4901. },
  4902. "required": [
  4903. "type",
  4904. "properties"
  4905. ]
  4906. },
  4907. "Event.installation.update-available": {
  4908. "type": "object",
  4909. "properties": {
  4910. "type": {
  4911. "type": "string",
  4912. "const": "installation.update-available"
  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. "Project": {
  4932. "type": "object",
  4933. "properties": {
  4934. "id": {
  4935. "type": "string"
  4936. },
  4937. "worktree": {
  4938. "type": "string"
  4939. },
  4940. "vcs": {
  4941. "type": "string",
  4942. "const": "git"
  4943. },
  4944. "name": {
  4945. "type": "string"
  4946. },
  4947. "icon": {
  4948. "type": "object",
  4949. "properties": {
  4950. "url": {
  4951. "type": "string"
  4952. },
  4953. "color": {
  4954. "type": "string"
  4955. }
  4956. }
  4957. },
  4958. "time": {
  4959. "type": "object",
  4960. "properties": {
  4961. "created": {
  4962. "type": "number"
  4963. },
  4964. "updated": {
  4965. "type": "number"
  4966. },
  4967. "initialized": {
  4968. "type": "number"
  4969. }
  4970. },
  4971. "required": [
  4972. "created"
  4973. ]
  4974. }
  4975. },
  4976. "required": [
  4977. "id",
  4978. "worktree",
  4979. "time"
  4980. ]
  4981. },
  4982. "Event.project.updated": {
  4983. "type": "object",
  4984. "properties": {
  4985. "type": {
  4986. "type": "string",
  4987. "const": "project.updated"
  4988. },
  4989. "properties": {
  4990. "$ref": "#/components/schemas/Project"
  4991. }
  4992. },
  4993. "required": [
  4994. "type",
  4995. "properties"
  4996. ]
  4997. },
  4998. "Event.server.instance.disposed": {
  4999. "type": "object",
  5000. "properties": {
  5001. "type": {
  5002. "type": "string",
  5003. "const": "server.instance.disposed"
  5004. },
  5005. "properties": {
  5006. "type": "object",
  5007. "properties": {
  5008. "directory": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. "required": [
  5013. "directory"
  5014. ]
  5015. }
  5016. },
  5017. "required": [
  5018. "type",
  5019. "properties"
  5020. ]
  5021. },
  5022. "Event.lsp.client.diagnostics": {
  5023. "type": "object",
  5024. "properties": {
  5025. "type": {
  5026. "type": "string",
  5027. "const": "lsp.client.diagnostics"
  5028. },
  5029. "properties": {
  5030. "type": "object",
  5031. "properties": {
  5032. "serverID": {
  5033. "type": "string"
  5034. },
  5035. "path": {
  5036. "type": "string"
  5037. }
  5038. },
  5039. "required": [
  5040. "serverID",
  5041. "path"
  5042. ]
  5043. }
  5044. },
  5045. "required": [
  5046. "type",
  5047. "properties"
  5048. ]
  5049. },
  5050. "Event.lsp.updated": {
  5051. "type": "object",
  5052. "properties": {
  5053. "type": {
  5054. "type": "string",
  5055. "const": "lsp.updated"
  5056. },
  5057. "properties": {
  5058. "type": "object",
  5059. "properties": {}
  5060. }
  5061. },
  5062. "required": [
  5063. "type",
  5064. "properties"
  5065. ]
  5066. },
  5067. "FileDiff": {
  5068. "type": "object",
  5069. "properties": {
  5070. "file": {
  5071. "type": "string"
  5072. },
  5073. "before": {
  5074. "type": "string"
  5075. },
  5076. "after": {
  5077. "type": "string"
  5078. },
  5079. "additions": {
  5080. "type": "number"
  5081. },
  5082. "deletions": {
  5083. "type": "number"
  5084. }
  5085. },
  5086. "required": [
  5087. "file",
  5088. "before",
  5089. "after",
  5090. "additions",
  5091. "deletions"
  5092. ]
  5093. },
  5094. "UserMessage": {
  5095. "type": "object",
  5096. "properties": {
  5097. "id": {
  5098. "type": "string"
  5099. },
  5100. "sessionID": {
  5101. "type": "string"
  5102. },
  5103. "role": {
  5104. "type": "string",
  5105. "const": "user"
  5106. },
  5107. "time": {
  5108. "type": "object",
  5109. "properties": {
  5110. "created": {
  5111. "type": "number"
  5112. }
  5113. },
  5114. "required": [
  5115. "created"
  5116. ]
  5117. },
  5118. "summary": {
  5119. "type": "object",
  5120. "properties": {
  5121. "title": {
  5122. "type": "string"
  5123. },
  5124. "body": {
  5125. "type": "string"
  5126. },
  5127. "diffs": {
  5128. "type": "array",
  5129. "items": {
  5130. "$ref": "#/components/schemas/FileDiff"
  5131. }
  5132. }
  5133. },
  5134. "required": [
  5135. "diffs"
  5136. ]
  5137. },
  5138. "agent": {
  5139. "type": "string"
  5140. },
  5141. "model": {
  5142. "type": "object",
  5143. "properties": {
  5144. "providerID": {
  5145. "type": "string"
  5146. },
  5147. "modelID": {
  5148. "type": "string"
  5149. }
  5150. },
  5151. "required": [
  5152. "providerID",
  5153. "modelID"
  5154. ]
  5155. },
  5156. "system": {
  5157. "type": "string"
  5158. },
  5159. "tools": {
  5160. "type": "object",
  5161. "propertyNames": {
  5162. "type": "string"
  5163. },
  5164. "additionalProperties": {
  5165. "type": "boolean"
  5166. }
  5167. }
  5168. },
  5169. "required": [
  5170. "id",
  5171. "sessionID",
  5172. "role",
  5173. "time",
  5174. "agent",
  5175. "model"
  5176. ]
  5177. },
  5178. "ProviderAuthError": {
  5179. "type": "object",
  5180. "properties": {
  5181. "name": {
  5182. "type": "string",
  5183. "const": "ProviderAuthError"
  5184. },
  5185. "data": {
  5186. "type": "object",
  5187. "properties": {
  5188. "providerID": {
  5189. "type": "string"
  5190. },
  5191. "message": {
  5192. "type": "string"
  5193. }
  5194. },
  5195. "required": [
  5196. "providerID",
  5197. "message"
  5198. ]
  5199. }
  5200. },
  5201. "required": [
  5202. "name",
  5203. "data"
  5204. ]
  5205. },
  5206. "UnknownError": {
  5207. "type": "object",
  5208. "properties": {
  5209. "name": {
  5210. "type": "string",
  5211. "const": "UnknownError"
  5212. },
  5213. "data": {
  5214. "type": "object",
  5215. "properties": {
  5216. "message": {
  5217. "type": "string"
  5218. }
  5219. },
  5220. "required": [
  5221. "message"
  5222. ]
  5223. }
  5224. },
  5225. "required": [
  5226. "name",
  5227. "data"
  5228. ]
  5229. },
  5230. "MessageOutputLengthError": {
  5231. "type": "object",
  5232. "properties": {
  5233. "name": {
  5234. "type": "string",
  5235. "const": "MessageOutputLengthError"
  5236. },
  5237. "data": {
  5238. "type": "object",
  5239. "properties": {}
  5240. }
  5241. },
  5242. "required": [
  5243. "name",
  5244. "data"
  5245. ]
  5246. },
  5247. "MessageAbortedError": {
  5248. "type": "object",
  5249. "properties": {
  5250. "name": {
  5251. "type": "string",
  5252. "const": "MessageAbortedError"
  5253. },
  5254. "data": {
  5255. "type": "object",
  5256. "properties": {
  5257. "message": {
  5258. "type": "string"
  5259. }
  5260. },
  5261. "required": [
  5262. "message"
  5263. ]
  5264. }
  5265. },
  5266. "required": [
  5267. "name",
  5268. "data"
  5269. ]
  5270. },
  5271. "APIError": {
  5272. "type": "object",
  5273. "properties": {
  5274. "name": {
  5275. "type": "string",
  5276. "const": "APIError"
  5277. },
  5278. "data": {
  5279. "type": "object",
  5280. "properties": {
  5281. "message": {
  5282. "type": "string"
  5283. },
  5284. "statusCode": {
  5285. "type": "number"
  5286. },
  5287. "isRetryable": {
  5288. "type": "boolean"
  5289. },
  5290. "responseHeaders": {
  5291. "type": "object",
  5292. "propertyNames": {
  5293. "type": "string"
  5294. },
  5295. "additionalProperties": {
  5296. "type": "string"
  5297. }
  5298. },
  5299. "responseBody": {
  5300. "type": "string"
  5301. }
  5302. },
  5303. "required": [
  5304. "message",
  5305. "isRetryable"
  5306. ]
  5307. }
  5308. },
  5309. "required": [
  5310. "name",
  5311. "data"
  5312. ]
  5313. },
  5314. "AssistantMessage": {
  5315. "type": "object",
  5316. "properties": {
  5317. "id": {
  5318. "type": "string"
  5319. },
  5320. "sessionID": {
  5321. "type": "string"
  5322. },
  5323. "role": {
  5324. "type": "string",
  5325. "const": "assistant"
  5326. },
  5327. "time": {
  5328. "type": "object",
  5329. "properties": {
  5330. "created": {
  5331. "type": "number"
  5332. },
  5333. "completed": {
  5334. "type": "number"
  5335. }
  5336. },
  5337. "required": [
  5338. "created"
  5339. ]
  5340. },
  5341. "error": {
  5342. "anyOf": [
  5343. {
  5344. "$ref": "#/components/schemas/ProviderAuthError"
  5345. },
  5346. {
  5347. "$ref": "#/components/schemas/UnknownError"
  5348. },
  5349. {
  5350. "$ref": "#/components/schemas/MessageOutputLengthError"
  5351. },
  5352. {
  5353. "$ref": "#/components/schemas/MessageAbortedError"
  5354. },
  5355. {
  5356. "$ref": "#/components/schemas/APIError"
  5357. }
  5358. ]
  5359. },
  5360. "parentID": {
  5361. "type": "string"
  5362. },
  5363. "modelID": {
  5364. "type": "string"
  5365. },
  5366. "providerID": {
  5367. "type": "string"
  5368. },
  5369. "mode": {
  5370. "type": "string"
  5371. },
  5372. "path": {
  5373. "type": "object",
  5374. "properties": {
  5375. "cwd": {
  5376. "type": "string"
  5377. },
  5378. "root": {
  5379. "type": "string"
  5380. }
  5381. },
  5382. "required": [
  5383. "cwd",
  5384. "root"
  5385. ]
  5386. },
  5387. "summary": {
  5388. "type": "boolean"
  5389. },
  5390. "cost": {
  5391. "type": "number"
  5392. },
  5393. "tokens": {
  5394. "type": "object",
  5395. "properties": {
  5396. "input": {
  5397. "type": "number"
  5398. },
  5399. "output": {
  5400. "type": "number"
  5401. },
  5402. "reasoning": {
  5403. "type": "number"
  5404. },
  5405. "cache": {
  5406. "type": "object",
  5407. "properties": {
  5408. "read": {
  5409. "type": "number"
  5410. },
  5411. "write": {
  5412. "type": "number"
  5413. }
  5414. },
  5415. "required": [
  5416. "read",
  5417. "write"
  5418. ]
  5419. }
  5420. },
  5421. "required": [
  5422. "input",
  5423. "output",
  5424. "reasoning",
  5425. "cache"
  5426. ]
  5427. },
  5428. "finish": {
  5429. "type": "string"
  5430. }
  5431. },
  5432. "required": [
  5433. "id",
  5434. "sessionID",
  5435. "role",
  5436. "time",
  5437. "parentID",
  5438. "modelID",
  5439. "providerID",
  5440. "mode",
  5441. "path",
  5442. "cost",
  5443. "tokens"
  5444. ]
  5445. },
  5446. "Message": {
  5447. "anyOf": [
  5448. {
  5449. "$ref": "#/components/schemas/UserMessage"
  5450. },
  5451. {
  5452. "$ref": "#/components/schemas/AssistantMessage"
  5453. }
  5454. ]
  5455. },
  5456. "Event.message.updated": {
  5457. "type": "object",
  5458. "properties": {
  5459. "type": {
  5460. "type": "string",
  5461. "const": "message.updated"
  5462. },
  5463. "properties": {
  5464. "type": "object",
  5465. "properties": {
  5466. "info": {
  5467. "$ref": "#/components/schemas/Message"
  5468. }
  5469. },
  5470. "required": [
  5471. "info"
  5472. ]
  5473. }
  5474. },
  5475. "required": [
  5476. "type",
  5477. "properties"
  5478. ]
  5479. },
  5480. "Event.message.removed": {
  5481. "type": "object",
  5482. "properties": {
  5483. "type": {
  5484. "type": "string",
  5485. "const": "message.removed"
  5486. },
  5487. "properties": {
  5488. "type": "object",
  5489. "properties": {
  5490. "sessionID": {
  5491. "type": "string"
  5492. },
  5493. "messageID": {
  5494. "type": "string"
  5495. }
  5496. },
  5497. "required": [
  5498. "sessionID",
  5499. "messageID"
  5500. ]
  5501. }
  5502. },
  5503. "required": [
  5504. "type",
  5505. "properties"
  5506. ]
  5507. },
  5508. "TextPart": {
  5509. "type": "object",
  5510. "properties": {
  5511. "id": {
  5512. "type": "string"
  5513. },
  5514. "sessionID": {
  5515. "type": "string"
  5516. },
  5517. "messageID": {
  5518. "type": "string"
  5519. },
  5520. "type": {
  5521. "type": "string",
  5522. "const": "text"
  5523. },
  5524. "text": {
  5525. "type": "string"
  5526. },
  5527. "synthetic": {
  5528. "type": "boolean"
  5529. },
  5530. "ignored": {
  5531. "type": "boolean"
  5532. },
  5533. "time": {
  5534. "type": "object",
  5535. "properties": {
  5536. "start": {
  5537. "type": "number"
  5538. },
  5539. "end": {
  5540. "type": "number"
  5541. }
  5542. },
  5543. "required": [
  5544. "start"
  5545. ]
  5546. },
  5547. "metadata": {
  5548. "type": "object",
  5549. "propertyNames": {
  5550. "type": "string"
  5551. },
  5552. "additionalProperties": {}
  5553. }
  5554. },
  5555. "required": [
  5556. "id",
  5557. "sessionID",
  5558. "messageID",
  5559. "type",
  5560. "text"
  5561. ]
  5562. },
  5563. "ReasoningPart": {
  5564. "type": "object",
  5565. "properties": {
  5566. "id": {
  5567. "type": "string"
  5568. },
  5569. "sessionID": {
  5570. "type": "string"
  5571. },
  5572. "messageID": {
  5573. "type": "string"
  5574. },
  5575. "type": {
  5576. "type": "string",
  5577. "const": "reasoning"
  5578. },
  5579. "text": {
  5580. "type": "string"
  5581. },
  5582. "metadata": {
  5583. "type": "object",
  5584. "propertyNames": {
  5585. "type": "string"
  5586. },
  5587. "additionalProperties": {}
  5588. },
  5589. "time": {
  5590. "type": "object",
  5591. "properties": {
  5592. "start": {
  5593. "type": "number"
  5594. },
  5595. "end": {
  5596. "type": "number"
  5597. }
  5598. },
  5599. "required": [
  5600. "start"
  5601. ]
  5602. }
  5603. },
  5604. "required": [
  5605. "id",
  5606. "sessionID",
  5607. "messageID",
  5608. "type",
  5609. "text",
  5610. "time"
  5611. ]
  5612. },
  5613. "FilePartSourceText": {
  5614. "type": "object",
  5615. "properties": {
  5616. "value": {
  5617. "type": "string"
  5618. },
  5619. "start": {
  5620. "type": "integer",
  5621. "minimum": -9007199254740991,
  5622. "maximum": 9007199254740991
  5623. },
  5624. "end": {
  5625. "type": "integer",
  5626. "minimum": -9007199254740991,
  5627. "maximum": 9007199254740991
  5628. }
  5629. },
  5630. "required": [
  5631. "value",
  5632. "start",
  5633. "end"
  5634. ]
  5635. },
  5636. "FileSource": {
  5637. "type": "object",
  5638. "properties": {
  5639. "text": {
  5640. "$ref": "#/components/schemas/FilePartSourceText"
  5641. },
  5642. "type": {
  5643. "type": "string",
  5644. "const": "file"
  5645. },
  5646. "path": {
  5647. "type": "string"
  5648. }
  5649. },
  5650. "required": [
  5651. "text",
  5652. "type",
  5653. "path"
  5654. ]
  5655. },
  5656. "Range": {
  5657. "type": "object",
  5658. "properties": {
  5659. "start": {
  5660. "type": "object",
  5661. "properties": {
  5662. "line": {
  5663. "type": "number"
  5664. },
  5665. "character": {
  5666. "type": "number"
  5667. }
  5668. },
  5669. "required": [
  5670. "line",
  5671. "character"
  5672. ]
  5673. },
  5674. "end": {
  5675. "type": "object",
  5676. "properties": {
  5677. "line": {
  5678. "type": "number"
  5679. },
  5680. "character": {
  5681. "type": "number"
  5682. }
  5683. },
  5684. "required": [
  5685. "line",
  5686. "character"
  5687. ]
  5688. }
  5689. },
  5690. "required": [
  5691. "start",
  5692. "end"
  5693. ]
  5694. },
  5695. "SymbolSource": {
  5696. "type": "object",
  5697. "properties": {
  5698. "text": {
  5699. "$ref": "#/components/schemas/FilePartSourceText"
  5700. },
  5701. "type": {
  5702. "type": "string",
  5703. "const": "symbol"
  5704. },
  5705. "path": {
  5706. "type": "string"
  5707. },
  5708. "range": {
  5709. "$ref": "#/components/schemas/Range"
  5710. },
  5711. "name": {
  5712. "type": "string"
  5713. },
  5714. "kind": {
  5715. "type": "integer",
  5716. "minimum": -9007199254740991,
  5717. "maximum": 9007199254740991
  5718. }
  5719. },
  5720. "required": [
  5721. "text",
  5722. "type",
  5723. "path",
  5724. "range",
  5725. "name",
  5726. "kind"
  5727. ]
  5728. },
  5729. "FilePartSource": {
  5730. "anyOf": [
  5731. {
  5732. "$ref": "#/components/schemas/FileSource"
  5733. },
  5734. {
  5735. "$ref": "#/components/schemas/SymbolSource"
  5736. }
  5737. ]
  5738. },
  5739. "FilePart": {
  5740. "type": "object",
  5741. "properties": {
  5742. "id": {
  5743. "type": "string"
  5744. },
  5745. "sessionID": {
  5746. "type": "string"
  5747. },
  5748. "messageID": {
  5749. "type": "string"
  5750. },
  5751. "type": {
  5752. "type": "string",
  5753. "const": "file"
  5754. },
  5755. "mime": {
  5756. "type": "string"
  5757. },
  5758. "filename": {
  5759. "type": "string"
  5760. },
  5761. "url": {
  5762. "type": "string"
  5763. },
  5764. "source": {
  5765. "$ref": "#/components/schemas/FilePartSource"
  5766. }
  5767. },
  5768. "required": [
  5769. "id",
  5770. "sessionID",
  5771. "messageID",
  5772. "type",
  5773. "mime",
  5774. "url"
  5775. ]
  5776. },
  5777. "ToolStatePending": {
  5778. "type": "object",
  5779. "properties": {
  5780. "status": {
  5781. "type": "string",
  5782. "const": "pending"
  5783. },
  5784. "input": {
  5785. "type": "object",
  5786. "propertyNames": {
  5787. "type": "string"
  5788. },
  5789. "additionalProperties": {}
  5790. },
  5791. "raw": {
  5792. "type": "string"
  5793. }
  5794. },
  5795. "required": [
  5796. "status",
  5797. "input",
  5798. "raw"
  5799. ]
  5800. },
  5801. "ToolStateRunning": {
  5802. "type": "object",
  5803. "properties": {
  5804. "status": {
  5805. "type": "string",
  5806. "const": "running"
  5807. },
  5808. "input": {
  5809. "type": "object",
  5810. "propertyNames": {
  5811. "type": "string"
  5812. },
  5813. "additionalProperties": {}
  5814. },
  5815. "title": {
  5816. "type": "string"
  5817. },
  5818. "metadata": {
  5819. "type": "object",
  5820. "propertyNames": {
  5821. "type": "string"
  5822. },
  5823. "additionalProperties": {}
  5824. },
  5825. "time": {
  5826. "type": "object",
  5827. "properties": {
  5828. "start": {
  5829. "type": "number"
  5830. }
  5831. },
  5832. "required": [
  5833. "start"
  5834. ]
  5835. }
  5836. },
  5837. "required": [
  5838. "status",
  5839. "input",
  5840. "time"
  5841. ]
  5842. },
  5843. "ToolStateCompleted": {
  5844. "type": "object",
  5845. "properties": {
  5846. "status": {
  5847. "type": "string",
  5848. "const": "completed"
  5849. },
  5850. "input": {
  5851. "type": "object",
  5852. "propertyNames": {
  5853. "type": "string"
  5854. },
  5855. "additionalProperties": {}
  5856. },
  5857. "output": {
  5858. "type": "string"
  5859. },
  5860. "title": {
  5861. "type": "string"
  5862. },
  5863. "metadata": {
  5864. "type": "object",
  5865. "propertyNames": {
  5866. "type": "string"
  5867. },
  5868. "additionalProperties": {}
  5869. },
  5870. "time": {
  5871. "type": "object",
  5872. "properties": {
  5873. "start": {
  5874. "type": "number"
  5875. },
  5876. "end": {
  5877. "type": "number"
  5878. },
  5879. "compacted": {
  5880. "type": "number"
  5881. }
  5882. },
  5883. "required": [
  5884. "start",
  5885. "end"
  5886. ]
  5887. },
  5888. "attachments": {
  5889. "type": "array",
  5890. "items": {
  5891. "$ref": "#/components/schemas/FilePart"
  5892. }
  5893. }
  5894. },
  5895. "required": [
  5896. "status",
  5897. "input",
  5898. "output",
  5899. "title",
  5900. "metadata",
  5901. "time"
  5902. ]
  5903. },
  5904. "ToolStateError": {
  5905. "type": "object",
  5906. "properties": {
  5907. "status": {
  5908. "type": "string",
  5909. "const": "error"
  5910. },
  5911. "input": {
  5912. "type": "object",
  5913. "propertyNames": {
  5914. "type": "string"
  5915. },
  5916. "additionalProperties": {}
  5917. },
  5918. "error": {
  5919. "type": "string"
  5920. },
  5921. "metadata": {
  5922. "type": "object",
  5923. "propertyNames": {
  5924. "type": "string"
  5925. },
  5926. "additionalProperties": {}
  5927. },
  5928. "time": {
  5929. "type": "object",
  5930. "properties": {
  5931. "start": {
  5932. "type": "number"
  5933. },
  5934. "end": {
  5935. "type": "number"
  5936. }
  5937. },
  5938. "required": [
  5939. "start",
  5940. "end"
  5941. ]
  5942. }
  5943. },
  5944. "required": [
  5945. "status",
  5946. "input",
  5947. "error",
  5948. "time"
  5949. ]
  5950. },
  5951. "ToolState": {
  5952. "anyOf": [
  5953. {
  5954. "$ref": "#/components/schemas/ToolStatePending"
  5955. },
  5956. {
  5957. "$ref": "#/components/schemas/ToolStateRunning"
  5958. },
  5959. {
  5960. "$ref": "#/components/schemas/ToolStateCompleted"
  5961. },
  5962. {
  5963. "$ref": "#/components/schemas/ToolStateError"
  5964. }
  5965. ]
  5966. },
  5967. "ToolPart": {
  5968. "type": "object",
  5969. "properties": {
  5970. "id": {
  5971. "type": "string"
  5972. },
  5973. "sessionID": {
  5974. "type": "string"
  5975. },
  5976. "messageID": {
  5977. "type": "string"
  5978. },
  5979. "type": {
  5980. "type": "string",
  5981. "const": "tool"
  5982. },
  5983. "callID": {
  5984. "type": "string"
  5985. },
  5986. "tool": {
  5987. "type": "string"
  5988. },
  5989. "state": {
  5990. "$ref": "#/components/schemas/ToolState"
  5991. },
  5992. "metadata": {
  5993. "type": "object",
  5994. "propertyNames": {
  5995. "type": "string"
  5996. },
  5997. "additionalProperties": {}
  5998. }
  5999. },
  6000. "required": [
  6001. "id",
  6002. "sessionID",
  6003. "messageID",
  6004. "type",
  6005. "callID",
  6006. "tool",
  6007. "state"
  6008. ]
  6009. },
  6010. "StepStartPart": {
  6011. "type": "object",
  6012. "properties": {
  6013. "id": {
  6014. "type": "string"
  6015. },
  6016. "sessionID": {
  6017. "type": "string"
  6018. },
  6019. "messageID": {
  6020. "type": "string"
  6021. },
  6022. "type": {
  6023. "type": "string",
  6024. "const": "step-start"
  6025. },
  6026. "snapshot": {
  6027. "type": "string"
  6028. }
  6029. },
  6030. "required": [
  6031. "id",
  6032. "sessionID",
  6033. "messageID",
  6034. "type"
  6035. ]
  6036. },
  6037. "StepFinishPart": {
  6038. "type": "object",
  6039. "properties": {
  6040. "id": {
  6041. "type": "string"
  6042. },
  6043. "sessionID": {
  6044. "type": "string"
  6045. },
  6046. "messageID": {
  6047. "type": "string"
  6048. },
  6049. "type": {
  6050. "type": "string",
  6051. "const": "step-finish"
  6052. },
  6053. "reason": {
  6054. "type": "string"
  6055. },
  6056. "snapshot": {
  6057. "type": "string"
  6058. },
  6059. "cost": {
  6060. "type": "number"
  6061. },
  6062. "tokens": {
  6063. "type": "object",
  6064. "properties": {
  6065. "input": {
  6066. "type": "number"
  6067. },
  6068. "output": {
  6069. "type": "number"
  6070. },
  6071. "reasoning": {
  6072. "type": "number"
  6073. },
  6074. "cache": {
  6075. "type": "object",
  6076. "properties": {
  6077. "read": {
  6078. "type": "number"
  6079. },
  6080. "write": {
  6081. "type": "number"
  6082. }
  6083. },
  6084. "required": [
  6085. "read",
  6086. "write"
  6087. ]
  6088. }
  6089. },
  6090. "required": [
  6091. "input",
  6092. "output",
  6093. "reasoning",
  6094. "cache"
  6095. ]
  6096. }
  6097. },
  6098. "required": [
  6099. "id",
  6100. "sessionID",
  6101. "messageID",
  6102. "type",
  6103. "reason",
  6104. "cost",
  6105. "tokens"
  6106. ]
  6107. },
  6108. "SnapshotPart": {
  6109. "type": "object",
  6110. "properties": {
  6111. "id": {
  6112. "type": "string"
  6113. },
  6114. "sessionID": {
  6115. "type": "string"
  6116. },
  6117. "messageID": {
  6118. "type": "string"
  6119. },
  6120. "type": {
  6121. "type": "string",
  6122. "const": "snapshot"
  6123. },
  6124. "snapshot": {
  6125. "type": "string"
  6126. }
  6127. },
  6128. "required": [
  6129. "id",
  6130. "sessionID",
  6131. "messageID",
  6132. "type",
  6133. "snapshot"
  6134. ]
  6135. },
  6136. "PatchPart": {
  6137. "type": "object",
  6138. "properties": {
  6139. "id": {
  6140. "type": "string"
  6141. },
  6142. "sessionID": {
  6143. "type": "string"
  6144. },
  6145. "messageID": {
  6146. "type": "string"
  6147. },
  6148. "type": {
  6149. "type": "string",
  6150. "const": "patch"
  6151. },
  6152. "hash": {
  6153. "type": "string"
  6154. },
  6155. "files": {
  6156. "type": "array",
  6157. "items": {
  6158. "type": "string"
  6159. }
  6160. }
  6161. },
  6162. "required": [
  6163. "id",
  6164. "sessionID",
  6165. "messageID",
  6166. "type",
  6167. "hash",
  6168. "files"
  6169. ]
  6170. },
  6171. "AgentPart": {
  6172. "type": "object",
  6173. "properties": {
  6174. "id": {
  6175. "type": "string"
  6176. },
  6177. "sessionID": {
  6178. "type": "string"
  6179. },
  6180. "messageID": {
  6181. "type": "string"
  6182. },
  6183. "type": {
  6184. "type": "string",
  6185. "const": "agent"
  6186. },
  6187. "name": {
  6188. "type": "string"
  6189. },
  6190. "source": {
  6191. "type": "object",
  6192. "properties": {
  6193. "value": {
  6194. "type": "string"
  6195. },
  6196. "start": {
  6197. "type": "integer",
  6198. "minimum": -9007199254740991,
  6199. "maximum": 9007199254740991
  6200. },
  6201. "end": {
  6202. "type": "integer",
  6203. "minimum": -9007199254740991,
  6204. "maximum": 9007199254740991
  6205. }
  6206. },
  6207. "required": [
  6208. "value",
  6209. "start",
  6210. "end"
  6211. ]
  6212. }
  6213. },
  6214. "required": [
  6215. "id",
  6216. "sessionID",
  6217. "messageID",
  6218. "type",
  6219. "name"
  6220. ]
  6221. },
  6222. "RetryPart": {
  6223. "type": "object",
  6224. "properties": {
  6225. "id": {
  6226. "type": "string"
  6227. },
  6228. "sessionID": {
  6229. "type": "string"
  6230. },
  6231. "messageID": {
  6232. "type": "string"
  6233. },
  6234. "type": {
  6235. "type": "string",
  6236. "const": "retry"
  6237. },
  6238. "attempt": {
  6239. "type": "number"
  6240. },
  6241. "error": {
  6242. "$ref": "#/components/schemas/APIError"
  6243. },
  6244. "time": {
  6245. "type": "object",
  6246. "properties": {
  6247. "created": {
  6248. "type": "number"
  6249. }
  6250. },
  6251. "required": [
  6252. "created"
  6253. ]
  6254. }
  6255. },
  6256. "required": [
  6257. "id",
  6258. "sessionID",
  6259. "messageID",
  6260. "type",
  6261. "attempt",
  6262. "error",
  6263. "time"
  6264. ]
  6265. },
  6266. "CompactionPart": {
  6267. "type": "object",
  6268. "properties": {
  6269. "id": {
  6270. "type": "string"
  6271. },
  6272. "sessionID": {
  6273. "type": "string"
  6274. },
  6275. "messageID": {
  6276. "type": "string"
  6277. },
  6278. "type": {
  6279. "type": "string",
  6280. "const": "compaction"
  6281. },
  6282. "auto": {
  6283. "type": "boolean"
  6284. }
  6285. },
  6286. "required": [
  6287. "id",
  6288. "sessionID",
  6289. "messageID",
  6290. "type",
  6291. "auto"
  6292. ]
  6293. },
  6294. "Part": {
  6295. "anyOf": [
  6296. {
  6297. "$ref": "#/components/schemas/TextPart"
  6298. },
  6299. {
  6300. "type": "object",
  6301. "properties": {
  6302. "id": {
  6303. "type": "string"
  6304. },
  6305. "sessionID": {
  6306. "type": "string"
  6307. },
  6308. "messageID": {
  6309. "type": "string"
  6310. },
  6311. "type": {
  6312. "type": "string",
  6313. "const": "subtask"
  6314. },
  6315. "prompt": {
  6316. "type": "string"
  6317. },
  6318. "description": {
  6319. "type": "string"
  6320. },
  6321. "agent": {
  6322. "type": "string"
  6323. }
  6324. },
  6325. "required": [
  6326. "id",
  6327. "sessionID",
  6328. "messageID",
  6329. "type",
  6330. "prompt",
  6331. "description",
  6332. "agent"
  6333. ]
  6334. },
  6335. {
  6336. "$ref": "#/components/schemas/ReasoningPart"
  6337. },
  6338. {
  6339. "$ref": "#/components/schemas/FilePart"
  6340. },
  6341. {
  6342. "$ref": "#/components/schemas/ToolPart"
  6343. },
  6344. {
  6345. "$ref": "#/components/schemas/StepStartPart"
  6346. },
  6347. {
  6348. "$ref": "#/components/schemas/StepFinishPart"
  6349. },
  6350. {
  6351. "$ref": "#/components/schemas/SnapshotPart"
  6352. },
  6353. {
  6354. "$ref": "#/components/schemas/PatchPart"
  6355. },
  6356. {
  6357. "$ref": "#/components/schemas/AgentPart"
  6358. },
  6359. {
  6360. "$ref": "#/components/schemas/RetryPart"
  6361. },
  6362. {
  6363. "$ref": "#/components/schemas/CompactionPart"
  6364. }
  6365. ]
  6366. },
  6367. "Event.message.part.updated": {
  6368. "type": "object",
  6369. "properties": {
  6370. "type": {
  6371. "type": "string",
  6372. "const": "message.part.updated"
  6373. },
  6374. "properties": {
  6375. "type": "object",
  6376. "properties": {
  6377. "part": {
  6378. "$ref": "#/components/schemas/Part"
  6379. },
  6380. "delta": {
  6381. "type": "string"
  6382. }
  6383. },
  6384. "required": [
  6385. "part"
  6386. ]
  6387. }
  6388. },
  6389. "required": [
  6390. "type",
  6391. "properties"
  6392. ]
  6393. },
  6394. "Event.message.part.removed": {
  6395. "type": "object",
  6396. "properties": {
  6397. "type": {
  6398. "type": "string",
  6399. "const": "message.part.removed"
  6400. },
  6401. "properties": {
  6402. "type": "object",
  6403. "properties": {
  6404. "sessionID": {
  6405. "type": "string"
  6406. },
  6407. "messageID": {
  6408. "type": "string"
  6409. },
  6410. "partID": {
  6411. "type": "string"
  6412. }
  6413. },
  6414. "required": [
  6415. "sessionID",
  6416. "messageID",
  6417. "partID"
  6418. ]
  6419. }
  6420. },
  6421. "required": [
  6422. "type",
  6423. "properties"
  6424. ]
  6425. },
  6426. "Permission": {
  6427. "type": "object",
  6428. "properties": {
  6429. "id": {
  6430. "type": "string"
  6431. },
  6432. "type": {
  6433. "type": "string"
  6434. },
  6435. "pattern": {
  6436. "anyOf": [
  6437. {
  6438. "type": "string"
  6439. },
  6440. {
  6441. "type": "array",
  6442. "items": {
  6443. "type": "string"
  6444. }
  6445. }
  6446. ]
  6447. },
  6448. "sessionID": {
  6449. "type": "string"
  6450. },
  6451. "messageID": {
  6452. "type": "string"
  6453. },
  6454. "callID": {
  6455. "type": "string"
  6456. },
  6457. "title": {
  6458. "type": "string"
  6459. },
  6460. "metadata": {
  6461. "type": "object",
  6462. "propertyNames": {
  6463. "type": "string"
  6464. },
  6465. "additionalProperties": {}
  6466. },
  6467. "time": {
  6468. "type": "object",
  6469. "properties": {
  6470. "created": {
  6471. "type": "number"
  6472. }
  6473. },
  6474. "required": [
  6475. "created"
  6476. ]
  6477. }
  6478. },
  6479. "required": [
  6480. "id",
  6481. "type",
  6482. "sessionID",
  6483. "messageID",
  6484. "title",
  6485. "metadata",
  6486. "time"
  6487. ]
  6488. },
  6489. "Event.permission.updated": {
  6490. "type": "object",
  6491. "properties": {
  6492. "type": {
  6493. "type": "string",
  6494. "const": "permission.updated"
  6495. },
  6496. "properties": {
  6497. "$ref": "#/components/schemas/Permission"
  6498. }
  6499. },
  6500. "required": [
  6501. "type",
  6502. "properties"
  6503. ]
  6504. },
  6505. "Event.permission.replied": {
  6506. "type": "object",
  6507. "properties": {
  6508. "type": {
  6509. "type": "string",
  6510. "const": "permission.replied"
  6511. },
  6512. "properties": {
  6513. "type": "object",
  6514. "properties": {
  6515. "sessionID": {
  6516. "type": "string"
  6517. },
  6518. "permissionID": {
  6519. "type": "string"
  6520. },
  6521. "response": {
  6522. "type": "string"
  6523. }
  6524. },
  6525. "required": [
  6526. "sessionID",
  6527. "permissionID",
  6528. "response"
  6529. ]
  6530. }
  6531. },
  6532. "required": [
  6533. "type",
  6534. "properties"
  6535. ]
  6536. },
  6537. "SessionStatus": {
  6538. "anyOf": [
  6539. {
  6540. "type": "object",
  6541. "properties": {
  6542. "type": {
  6543. "type": "string",
  6544. "const": "idle"
  6545. }
  6546. },
  6547. "required": [
  6548. "type"
  6549. ]
  6550. },
  6551. {
  6552. "type": "object",
  6553. "properties": {
  6554. "type": {
  6555. "type": "string",
  6556. "const": "retry"
  6557. },
  6558. "attempt": {
  6559. "type": "number"
  6560. },
  6561. "message": {
  6562. "type": "string"
  6563. },
  6564. "next": {
  6565. "type": "number"
  6566. }
  6567. },
  6568. "required": [
  6569. "type",
  6570. "attempt",
  6571. "message",
  6572. "next"
  6573. ]
  6574. },
  6575. {
  6576. "type": "object",
  6577. "properties": {
  6578. "type": {
  6579. "type": "string",
  6580. "const": "busy"
  6581. }
  6582. },
  6583. "required": [
  6584. "type"
  6585. ]
  6586. }
  6587. ]
  6588. },
  6589. "Event.session.status": {
  6590. "type": "object",
  6591. "properties": {
  6592. "type": {
  6593. "type": "string",
  6594. "const": "session.status"
  6595. },
  6596. "properties": {
  6597. "type": "object",
  6598. "properties": {
  6599. "sessionID": {
  6600. "type": "string"
  6601. },
  6602. "status": {
  6603. "$ref": "#/components/schemas/SessionStatus"
  6604. }
  6605. },
  6606. "required": [
  6607. "sessionID",
  6608. "status"
  6609. ]
  6610. }
  6611. },
  6612. "required": [
  6613. "type",
  6614. "properties"
  6615. ]
  6616. },
  6617. "Event.session.idle": {
  6618. "type": "object",
  6619. "properties": {
  6620. "type": {
  6621. "type": "string",
  6622. "const": "session.idle"
  6623. },
  6624. "properties": {
  6625. "type": "object",
  6626. "properties": {
  6627. "sessionID": {
  6628. "type": "string"
  6629. }
  6630. },
  6631. "required": [
  6632. "sessionID"
  6633. ]
  6634. }
  6635. },
  6636. "required": [
  6637. "type",
  6638. "properties"
  6639. ]
  6640. },
  6641. "Event.session.compacted": {
  6642. "type": "object",
  6643. "properties": {
  6644. "type": {
  6645. "type": "string",
  6646. "const": "session.compacted"
  6647. },
  6648. "properties": {
  6649. "type": "object",
  6650. "properties": {
  6651. "sessionID": {
  6652. "type": "string"
  6653. }
  6654. },
  6655. "required": [
  6656. "sessionID"
  6657. ]
  6658. }
  6659. },
  6660. "required": [
  6661. "type",
  6662. "properties"
  6663. ]
  6664. },
  6665. "Event.file.edited": {
  6666. "type": "object",
  6667. "properties": {
  6668. "type": {
  6669. "type": "string",
  6670. "const": "file.edited"
  6671. },
  6672. "properties": {
  6673. "type": "object",
  6674. "properties": {
  6675. "file": {
  6676. "type": "string"
  6677. }
  6678. },
  6679. "required": [
  6680. "file"
  6681. ]
  6682. }
  6683. },
  6684. "required": [
  6685. "type",
  6686. "properties"
  6687. ]
  6688. },
  6689. "Todo": {
  6690. "type": "object",
  6691. "properties": {
  6692. "content": {
  6693. "description": "Brief description of the task",
  6694. "type": "string"
  6695. },
  6696. "status": {
  6697. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  6698. "type": "string"
  6699. },
  6700. "priority": {
  6701. "description": "Priority level of the task: high, medium, low",
  6702. "type": "string"
  6703. },
  6704. "id": {
  6705. "description": "Unique identifier for the todo item",
  6706. "type": "string"
  6707. }
  6708. },
  6709. "required": [
  6710. "content",
  6711. "status",
  6712. "priority",
  6713. "id"
  6714. ]
  6715. },
  6716. "Event.todo.updated": {
  6717. "type": "object",
  6718. "properties": {
  6719. "type": {
  6720. "type": "string",
  6721. "const": "todo.updated"
  6722. },
  6723. "properties": {
  6724. "type": "object",
  6725. "properties": {
  6726. "sessionID": {
  6727. "type": "string"
  6728. },
  6729. "todos": {
  6730. "type": "array",
  6731. "items": {
  6732. "$ref": "#/components/schemas/Todo"
  6733. }
  6734. }
  6735. },
  6736. "required": [
  6737. "sessionID",
  6738. "todos"
  6739. ]
  6740. }
  6741. },
  6742. "required": [
  6743. "type",
  6744. "properties"
  6745. ]
  6746. },
  6747. "Event.command.executed": {
  6748. "type": "object",
  6749. "properties": {
  6750. "type": {
  6751. "type": "string",
  6752. "const": "command.executed"
  6753. },
  6754. "properties": {
  6755. "type": "object",
  6756. "properties": {
  6757. "name": {
  6758. "type": "string"
  6759. },
  6760. "sessionID": {
  6761. "type": "string",
  6762. "pattern": "^ses.*"
  6763. },
  6764. "arguments": {
  6765. "type": "string"
  6766. },
  6767. "messageID": {
  6768. "type": "string",
  6769. "pattern": "^msg.*"
  6770. }
  6771. },
  6772. "required": [
  6773. "name",
  6774. "sessionID",
  6775. "arguments",
  6776. "messageID"
  6777. ]
  6778. }
  6779. },
  6780. "required": [
  6781. "type",
  6782. "properties"
  6783. ]
  6784. },
  6785. "Session": {
  6786. "type": "object",
  6787. "properties": {
  6788. "id": {
  6789. "type": "string",
  6790. "pattern": "^ses.*"
  6791. },
  6792. "projectID": {
  6793. "type": "string"
  6794. },
  6795. "directory": {
  6796. "type": "string"
  6797. },
  6798. "parentID": {
  6799. "type": "string",
  6800. "pattern": "^ses.*"
  6801. },
  6802. "summary": {
  6803. "type": "object",
  6804. "properties": {
  6805. "additions": {
  6806. "type": "number"
  6807. },
  6808. "deletions": {
  6809. "type": "number"
  6810. },
  6811. "files": {
  6812. "type": "number"
  6813. },
  6814. "diffs": {
  6815. "type": "array",
  6816. "items": {
  6817. "$ref": "#/components/schemas/FileDiff"
  6818. }
  6819. }
  6820. },
  6821. "required": [
  6822. "additions",
  6823. "deletions",
  6824. "files"
  6825. ]
  6826. },
  6827. "share": {
  6828. "type": "object",
  6829. "properties": {
  6830. "url": {
  6831. "type": "string"
  6832. }
  6833. },
  6834. "required": [
  6835. "url"
  6836. ]
  6837. },
  6838. "title": {
  6839. "type": "string"
  6840. },
  6841. "version": {
  6842. "type": "string"
  6843. },
  6844. "time": {
  6845. "type": "object",
  6846. "properties": {
  6847. "created": {
  6848. "type": "number"
  6849. },
  6850. "updated": {
  6851. "type": "number"
  6852. },
  6853. "compacting": {
  6854. "type": "number"
  6855. }
  6856. },
  6857. "required": [
  6858. "created",
  6859. "updated"
  6860. ]
  6861. },
  6862. "revert": {
  6863. "type": "object",
  6864. "properties": {
  6865. "messageID": {
  6866. "type": "string"
  6867. },
  6868. "partID": {
  6869. "type": "string"
  6870. },
  6871. "snapshot": {
  6872. "type": "string"
  6873. },
  6874. "diff": {
  6875. "type": "string"
  6876. }
  6877. },
  6878. "required": [
  6879. "messageID"
  6880. ]
  6881. }
  6882. },
  6883. "required": [
  6884. "id",
  6885. "projectID",
  6886. "directory",
  6887. "title",
  6888. "version",
  6889. "time"
  6890. ]
  6891. },
  6892. "Event.session.created": {
  6893. "type": "object",
  6894. "properties": {
  6895. "type": {
  6896. "type": "string",
  6897. "const": "session.created"
  6898. },
  6899. "properties": {
  6900. "type": "object",
  6901. "properties": {
  6902. "info": {
  6903. "$ref": "#/components/schemas/Session"
  6904. }
  6905. },
  6906. "required": [
  6907. "info"
  6908. ]
  6909. }
  6910. },
  6911. "required": [
  6912. "type",
  6913. "properties"
  6914. ]
  6915. },
  6916. "Event.session.updated": {
  6917. "type": "object",
  6918. "properties": {
  6919. "type": {
  6920. "type": "string",
  6921. "const": "session.updated"
  6922. },
  6923. "properties": {
  6924. "type": "object",
  6925. "properties": {
  6926. "info": {
  6927. "$ref": "#/components/schemas/Session"
  6928. }
  6929. },
  6930. "required": [
  6931. "info"
  6932. ]
  6933. }
  6934. },
  6935. "required": [
  6936. "type",
  6937. "properties"
  6938. ]
  6939. },
  6940. "Event.session.deleted": {
  6941. "type": "object",
  6942. "properties": {
  6943. "type": {
  6944. "type": "string",
  6945. "const": "session.deleted"
  6946. },
  6947. "properties": {
  6948. "type": "object",
  6949. "properties": {
  6950. "info": {
  6951. "$ref": "#/components/schemas/Session"
  6952. }
  6953. },
  6954. "required": [
  6955. "info"
  6956. ]
  6957. }
  6958. },
  6959. "required": [
  6960. "type",
  6961. "properties"
  6962. ]
  6963. },
  6964. "Event.session.diff": {
  6965. "type": "object",
  6966. "properties": {
  6967. "type": {
  6968. "type": "string",
  6969. "const": "session.diff"
  6970. },
  6971. "properties": {
  6972. "type": "object",
  6973. "properties": {
  6974. "sessionID": {
  6975. "type": "string"
  6976. },
  6977. "diff": {
  6978. "type": "array",
  6979. "items": {
  6980. "$ref": "#/components/schemas/FileDiff"
  6981. }
  6982. }
  6983. },
  6984. "required": [
  6985. "sessionID",
  6986. "diff"
  6987. ]
  6988. }
  6989. },
  6990. "required": [
  6991. "type",
  6992. "properties"
  6993. ]
  6994. },
  6995. "Event.session.error": {
  6996. "type": "object",
  6997. "properties": {
  6998. "type": {
  6999. "type": "string",
  7000. "const": "session.error"
  7001. },
  7002. "properties": {
  7003. "type": "object",
  7004. "properties": {
  7005. "sessionID": {
  7006. "type": "string"
  7007. },
  7008. "error": {
  7009. "anyOf": [
  7010. {
  7011. "$ref": "#/components/schemas/ProviderAuthError"
  7012. },
  7013. {
  7014. "$ref": "#/components/schemas/UnknownError"
  7015. },
  7016. {
  7017. "$ref": "#/components/schemas/MessageOutputLengthError"
  7018. },
  7019. {
  7020. "$ref": "#/components/schemas/MessageAbortedError"
  7021. },
  7022. {
  7023. "$ref": "#/components/schemas/APIError"
  7024. }
  7025. ]
  7026. }
  7027. }
  7028. }
  7029. },
  7030. "required": [
  7031. "type",
  7032. "properties"
  7033. ]
  7034. },
  7035. "Event.file.watcher.updated": {
  7036. "type": "object",
  7037. "properties": {
  7038. "type": {
  7039. "type": "string",
  7040. "const": "file.watcher.updated"
  7041. },
  7042. "properties": {
  7043. "type": "object",
  7044. "properties": {
  7045. "file": {
  7046. "type": "string"
  7047. },
  7048. "event": {
  7049. "anyOf": [
  7050. {
  7051. "type": "string",
  7052. "const": "add"
  7053. },
  7054. {
  7055. "type": "string",
  7056. "const": "change"
  7057. },
  7058. {
  7059. "type": "string",
  7060. "const": "unlink"
  7061. }
  7062. ]
  7063. }
  7064. },
  7065. "required": [
  7066. "file",
  7067. "event"
  7068. ]
  7069. }
  7070. },
  7071. "required": [
  7072. "type",
  7073. "properties"
  7074. ]
  7075. },
  7076. "Event.vcs.branch.updated": {
  7077. "type": "object",
  7078. "properties": {
  7079. "type": {
  7080. "type": "string",
  7081. "const": "vcs.branch.updated"
  7082. },
  7083. "properties": {
  7084. "type": "object",
  7085. "properties": {
  7086. "branch": {
  7087. "type": "string"
  7088. }
  7089. }
  7090. }
  7091. },
  7092. "required": [
  7093. "type",
  7094. "properties"
  7095. ]
  7096. },
  7097. "Event.tui.prompt.append": {
  7098. "type": "object",
  7099. "properties": {
  7100. "type": {
  7101. "type": "string",
  7102. "const": "tui.prompt.append"
  7103. },
  7104. "properties": {
  7105. "type": "object",
  7106. "properties": {
  7107. "text": {
  7108. "type": "string"
  7109. }
  7110. },
  7111. "required": [
  7112. "text"
  7113. ]
  7114. }
  7115. },
  7116. "required": [
  7117. "type",
  7118. "properties"
  7119. ]
  7120. },
  7121. "Event.tui.command.execute": {
  7122. "type": "object",
  7123. "properties": {
  7124. "type": {
  7125. "type": "string",
  7126. "const": "tui.command.execute"
  7127. },
  7128. "properties": {
  7129. "type": "object",
  7130. "properties": {
  7131. "command": {
  7132. "anyOf": [
  7133. {
  7134. "type": "string",
  7135. "enum": [
  7136. "session.list",
  7137. "session.new",
  7138. "session.share",
  7139. "session.interrupt",
  7140. "session.compact",
  7141. "session.page.up",
  7142. "session.page.down",
  7143. "session.half.page.up",
  7144. "session.half.page.down",
  7145. "session.first",
  7146. "session.last",
  7147. "prompt.clear",
  7148. "prompt.submit",
  7149. "agent.cycle"
  7150. ]
  7151. },
  7152. {
  7153. "type": "string"
  7154. }
  7155. ]
  7156. }
  7157. },
  7158. "required": [
  7159. "command"
  7160. ]
  7161. }
  7162. },
  7163. "required": [
  7164. "type",
  7165. "properties"
  7166. ]
  7167. },
  7168. "Event.tui.toast.show": {
  7169. "type": "object",
  7170. "properties": {
  7171. "type": {
  7172. "type": "string",
  7173. "const": "tui.toast.show"
  7174. },
  7175. "properties": {
  7176. "type": "object",
  7177. "properties": {
  7178. "title": {
  7179. "type": "string"
  7180. },
  7181. "message": {
  7182. "type": "string"
  7183. },
  7184. "variant": {
  7185. "type": "string",
  7186. "enum": [
  7187. "info",
  7188. "success",
  7189. "warning",
  7190. "error"
  7191. ]
  7192. },
  7193. "duration": {
  7194. "description": "Duration in milliseconds",
  7195. "default": 5000,
  7196. "type": "number"
  7197. }
  7198. },
  7199. "required": [
  7200. "message",
  7201. "variant"
  7202. ]
  7203. }
  7204. },
  7205. "required": [
  7206. "type",
  7207. "properties"
  7208. ]
  7209. },
  7210. "Pty": {
  7211. "type": "object",
  7212. "properties": {
  7213. "id": {
  7214. "type": "string",
  7215. "pattern": "^pty.*"
  7216. },
  7217. "title": {
  7218. "type": "string"
  7219. },
  7220. "command": {
  7221. "type": "string"
  7222. },
  7223. "args": {
  7224. "type": "array",
  7225. "items": {
  7226. "type": "string"
  7227. }
  7228. },
  7229. "cwd": {
  7230. "type": "string"
  7231. },
  7232. "status": {
  7233. "type": "string",
  7234. "enum": [
  7235. "running",
  7236. "exited"
  7237. ]
  7238. },
  7239. "pid": {
  7240. "type": "number"
  7241. }
  7242. },
  7243. "required": [
  7244. "id",
  7245. "title",
  7246. "command",
  7247. "args",
  7248. "cwd",
  7249. "status",
  7250. "pid"
  7251. ]
  7252. },
  7253. "Event.pty.created": {
  7254. "type": "object",
  7255. "properties": {
  7256. "type": {
  7257. "type": "string",
  7258. "const": "pty.created"
  7259. },
  7260. "properties": {
  7261. "type": "object",
  7262. "properties": {
  7263. "info": {
  7264. "$ref": "#/components/schemas/Pty"
  7265. }
  7266. },
  7267. "required": [
  7268. "info"
  7269. ]
  7270. }
  7271. },
  7272. "required": [
  7273. "type",
  7274. "properties"
  7275. ]
  7276. },
  7277. "Event.pty.updated": {
  7278. "type": "object",
  7279. "properties": {
  7280. "type": {
  7281. "type": "string",
  7282. "const": "pty.updated"
  7283. },
  7284. "properties": {
  7285. "type": "object",
  7286. "properties": {
  7287. "info": {
  7288. "$ref": "#/components/schemas/Pty"
  7289. }
  7290. },
  7291. "required": [
  7292. "info"
  7293. ]
  7294. }
  7295. },
  7296. "required": [
  7297. "type",
  7298. "properties"
  7299. ]
  7300. },
  7301. "Event.pty.exited": {
  7302. "type": "object",
  7303. "properties": {
  7304. "type": {
  7305. "type": "string",
  7306. "const": "pty.exited"
  7307. },
  7308. "properties": {
  7309. "type": "object",
  7310. "properties": {
  7311. "id": {
  7312. "type": "string",
  7313. "pattern": "^pty.*"
  7314. },
  7315. "exitCode": {
  7316. "type": "number"
  7317. }
  7318. },
  7319. "required": [
  7320. "id",
  7321. "exitCode"
  7322. ]
  7323. }
  7324. },
  7325. "required": [
  7326. "type",
  7327. "properties"
  7328. ]
  7329. },
  7330. "Event.pty.deleted": {
  7331. "type": "object",
  7332. "properties": {
  7333. "type": {
  7334. "type": "string",
  7335. "const": "pty.deleted"
  7336. },
  7337. "properties": {
  7338. "type": "object",
  7339. "properties": {
  7340. "id": {
  7341. "type": "string",
  7342. "pattern": "^pty.*"
  7343. }
  7344. },
  7345. "required": [
  7346. "id"
  7347. ]
  7348. }
  7349. },
  7350. "required": [
  7351. "type",
  7352. "properties"
  7353. ]
  7354. },
  7355. "Event.server.connected": {
  7356. "type": "object",
  7357. "properties": {
  7358. "type": {
  7359. "type": "string",
  7360. "const": "server.connected"
  7361. },
  7362. "properties": {
  7363. "type": "object",
  7364. "properties": {}
  7365. }
  7366. },
  7367. "required": [
  7368. "type",
  7369. "properties"
  7370. ]
  7371. },
  7372. "Event": {
  7373. "anyOf": [
  7374. {
  7375. "$ref": "#/components/schemas/Event.installation.updated"
  7376. },
  7377. {
  7378. "$ref": "#/components/schemas/Event.installation.update-available"
  7379. },
  7380. {
  7381. "$ref": "#/components/schemas/Event.project.updated"
  7382. },
  7383. {
  7384. "$ref": "#/components/schemas/Event.server.instance.disposed"
  7385. },
  7386. {
  7387. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  7388. },
  7389. {
  7390. "$ref": "#/components/schemas/Event.lsp.updated"
  7391. },
  7392. {
  7393. "$ref": "#/components/schemas/Event.message.updated"
  7394. },
  7395. {
  7396. "$ref": "#/components/schemas/Event.message.removed"
  7397. },
  7398. {
  7399. "$ref": "#/components/schemas/Event.message.part.updated"
  7400. },
  7401. {
  7402. "$ref": "#/components/schemas/Event.message.part.removed"
  7403. },
  7404. {
  7405. "$ref": "#/components/schemas/Event.permission.updated"
  7406. },
  7407. {
  7408. "$ref": "#/components/schemas/Event.permission.replied"
  7409. },
  7410. {
  7411. "$ref": "#/components/schemas/Event.session.status"
  7412. },
  7413. {
  7414. "$ref": "#/components/schemas/Event.session.idle"
  7415. },
  7416. {
  7417. "$ref": "#/components/schemas/Event.session.compacted"
  7418. },
  7419. {
  7420. "$ref": "#/components/schemas/Event.file.edited"
  7421. },
  7422. {
  7423. "$ref": "#/components/schemas/Event.todo.updated"
  7424. },
  7425. {
  7426. "$ref": "#/components/schemas/Event.command.executed"
  7427. },
  7428. {
  7429. "$ref": "#/components/schemas/Event.session.created"
  7430. },
  7431. {
  7432. "$ref": "#/components/schemas/Event.session.updated"
  7433. },
  7434. {
  7435. "$ref": "#/components/schemas/Event.session.deleted"
  7436. },
  7437. {
  7438. "$ref": "#/components/schemas/Event.session.diff"
  7439. },
  7440. {
  7441. "$ref": "#/components/schemas/Event.session.error"
  7442. },
  7443. {
  7444. "$ref": "#/components/schemas/Event.file.watcher.updated"
  7445. },
  7446. {
  7447. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  7448. },
  7449. {
  7450. "$ref": "#/components/schemas/Event.tui.prompt.append"
  7451. },
  7452. {
  7453. "$ref": "#/components/schemas/Event.tui.command.execute"
  7454. },
  7455. {
  7456. "$ref": "#/components/schemas/Event.tui.toast.show"
  7457. },
  7458. {
  7459. "$ref": "#/components/schemas/Event.pty.created"
  7460. },
  7461. {
  7462. "$ref": "#/components/schemas/Event.pty.updated"
  7463. },
  7464. {
  7465. "$ref": "#/components/schemas/Event.pty.exited"
  7466. },
  7467. {
  7468. "$ref": "#/components/schemas/Event.pty.deleted"
  7469. },
  7470. {
  7471. "$ref": "#/components/schemas/Event.server.connected"
  7472. }
  7473. ]
  7474. },
  7475. "GlobalEvent": {
  7476. "type": "object",
  7477. "properties": {
  7478. "directory": {
  7479. "type": "string"
  7480. },
  7481. "payload": {
  7482. "$ref": "#/components/schemas/Event"
  7483. }
  7484. },
  7485. "required": [
  7486. "directory",
  7487. "payload"
  7488. ]
  7489. },
  7490. "BadRequestError": {
  7491. "type": "object",
  7492. "properties": {
  7493. "data": {},
  7494. "errors": {
  7495. "type": "array",
  7496. "items": {
  7497. "type": "object",
  7498. "propertyNames": {
  7499. "type": "string"
  7500. },
  7501. "additionalProperties": {}
  7502. }
  7503. },
  7504. "success": {
  7505. "type": "boolean",
  7506. "const": false
  7507. }
  7508. },
  7509. "required": [
  7510. "data",
  7511. "errors",
  7512. "success"
  7513. ]
  7514. },
  7515. "NotFoundError": {
  7516. "type": "object",
  7517. "properties": {
  7518. "name": {
  7519. "type": "string",
  7520. "const": "NotFoundError"
  7521. },
  7522. "data": {
  7523. "type": "object",
  7524. "properties": {
  7525. "message": {
  7526. "type": "string"
  7527. }
  7528. },
  7529. "required": [
  7530. "message"
  7531. ]
  7532. }
  7533. },
  7534. "required": [
  7535. "name",
  7536. "data"
  7537. ]
  7538. },
  7539. "KeybindsConfig": {
  7540. "description": "Custom keybind configurations",
  7541. "type": "object",
  7542. "properties": {
  7543. "leader": {
  7544. "description": "Leader key for keybind combinations",
  7545. "default": "ctrl+x",
  7546. "type": "string"
  7547. },
  7548. "app_exit": {
  7549. "description": "Exit the application",
  7550. "default": "ctrl+c,ctrl+d,<leader>q",
  7551. "type": "string"
  7552. },
  7553. "editor_open": {
  7554. "description": "Open external editor",
  7555. "default": "<leader>e",
  7556. "type": "string"
  7557. },
  7558. "theme_list": {
  7559. "description": "List available themes",
  7560. "default": "<leader>t",
  7561. "type": "string"
  7562. },
  7563. "sidebar_toggle": {
  7564. "description": "Toggle sidebar",
  7565. "default": "<leader>b",
  7566. "type": "string"
  7567. },
  7568. "scrollbar_toggle": {
  7569. "description": "Toggle session scrollbar",
  7570. "default": "none",
  7571. "type": "string"
  7572. },
  7573. "username_toggle": {
  7574. "description": "Toggle username visibility",
  7575. "default": "none",
  7576. "type": "string"
  7577. },
  7578. "status_view": {
  7579. "description": "View status",
  7580. "default": "<leader>s",
  7581. "type": "string"
  7582. },
  7583. "session_export": {
  7584. "description": "Export session to editor",
  7585. "default": "<leader>x",
  7586. "type": "string"
  7587. },
  7588. "session_new": {
  7589. "description": "Create a new session",
  7590. "default": "<leader>n",
  7591. "type": "string"
  7592. },
  7593. "session_list": {
  7594. "description": "List all sessions",
  7595. "default": "<leader>l",
  7596. "type": "string"
  7597. },
  7598. "session_timeline": {
  7599. "description": "Show session timeline",
  7600. "default": "<leader>g",
  7601. "type": "string"
  7602. },
  7603. "session_share": {
  7604. "description": "Share current session",
  7605. "default": "none",
  7606. "type": "string"
  7607. },
  7608. "session_unshare": {
  7609. "description": "Unshare current session",
  7610. "default": "none",
  7611. "type": "string"
  7612. },
  7613. "session_interrupt": {
  7614. "description": "Interrupt current session",
  7615. "default": "escape",
  7616. "type": "string"
  7617. },
  7618. "session_compact": {
  7619. "description": "Compact the session",
  7620. "default": "<leader>c",
  7621. "type": "string"
  7622. },
  7623. "messages_page_up": {
  7624. "description": "Scroll messages up by one page",
  7625. "default": "pageup",
  7626. "type": "string"
  7627. },
  7628. "messages_page_down": {
  7629. "description": "Scroll messages down by one page",
  7630. "default": "pagedown",
  7631. "type": "string"
  7632. },
  7633. "messages_half_page_up": {
  7634. "description": "Scroll messages up by half page",
  7635. "default": "ctrl+alt+u",
  7636. "type": "string"
  7637. },
  7638. "messages_half_page_down": {
  7639. "description": "Scroll messages down by half page",
  7640. "default": "ctrl+alt+d",
  7641. "type": "string"
  7642. },
  7643. "messages_first": {
  7644. "description": "Navigate to first message",
  7645. "default": "ctrl+g,home",
  7646. "type": "string"
  7647. },
  7648. "messages_last": {
  7649. "description": "Navigate to last message",
  7650. "default": "ctrl+alt+g,end",
  7651. "type": "string"
  7652. },
  7653. "messages_last_user": {
  7654. "description": "Navigate to last user message",
  7655. "default": "none",
  7656. "type": "string"
  7657. },
  7658. "messages_copy": {
  7659. "description": "Copy message",
  7660. "default": "<leader>y",
  7661. "type": "string"
  7662. },
  7663. "messages_undo": {
  7664. "description": "Undo message",
  7665. "default": "<leader>u",
  7666. "type": "string"
  7667. },
  7668. "messages_redo": {
  7669. "description": "Redo message",
  7670. "default": "<leader>r",
  7671. "type": "string"
  7672. },
  7673. "messages_toggle_conceal": {
  7674. "description": "Toggle code block concealment in messages",
  7675. "default": "<leader>h",
  7676. "type": "string"
  7677. },
  7678. "tool_details": {
  7679. "description": "Toggle tool details visibility",
  7680. "default": "none",
  7681. "type": "string"
  7682. },
  7683. "model_list": {
  7684. "description": "List available models",
  7685. "default": "<leader>m",
  7686. "type": "string"
  7687. },
  7688. "model_cycle_recent": {
  7689. "description": "Next recently used model",
  7690. "default": "f2",
  7691. "type": "string"
  7692. },
  7693. "model_cycle_recent_reverse": {
  7694. "description": "Previous recently used model",
  7695. "default": "shift+f2",
  7696. "type": "string"
  7697. },
  7698. "command_list": {
  7699. "description": "List available commands",
  7700. "default": "ctrl+p",
  7701. "type": "string"
  7702. },
  7703. "agent_list": {
  7704. "description": "List agents",
  7705. "default": "<leader>a",
  7706. "type": "string"
  7707. },
  7708. "agent_cycle": {
  7709. "description": "Next agent",
  7710. "default": "tab",
  7711. "type": "string"
  7712. },
  7713. "agent_cycle_reverse": {
  7714. "description": "Previous agent",
  7715. "default": "shift+tab",
  7716. "type": "string"
  7717. },
  7718. "input_clear": {
  7719. "description": "Clear input field",
  7720. "default": "ctrl+c",
  7721. "type": "string"
  7722. },
  7723. "input_forward_delete": {
  7724. "description": "Forward delete",
  7725. "default": "ctrl+d",
  7726. "type": "string"
  7727. },
  7728. "input_paste": {
  7729. "description": "Paste from clipboard",
  7730. "default": "ctrl+v",
  7731. "type": "string"
  7732. },
  7733. "input_submit": {
  7734. "description": "Submit input",
  7735. "default": "return",
  7736. "type": "string"
  7737. },
  7738. "input_newline": {
  7739. "description": "Insert newline in input",
  7740. "default": "shift+return,ctrl+j",
  7741. "type": "string"
  7742. },
  7743. "history_previous": {
  7744. "description": "Previous history item",
  7745. "default": "up",
  7746. "type": "string"
  7747. },
  7748. "history_next": {
  7749. "description": "Next history item",
  7750. "default": "down",
  7751. "type": "string"
  7752. },
  7753. "session_child_cycle": {
  7754. "description": "Next child session",
  7755. "default": "<leader>right",
  7756. "type": "string"
  7757. },
  7758. "session_child_cycle_reverse": {
  7759. "description": "Previous child session",
  7760. "default": "<leader>left",
  7761. "type": "string"
  7762. },
  7763. "terminal_suspend": {
  7764. "description": "Suspend terminal",
  7765. "default": "ctrl+z",
  7766. "type": "string"
  7767. }
  7768. },
  7769. "additionalProperties": false
  7770. },
  7771. "AgentConfig": {
  7772. "type": "object",
  7773. "properties": {
  7774. "model": {
  7775. "type": "string"
  7776. },
  7777. "temperature": {
  7778. "type": "number"
  7779. },
  7780. "top_p": {
  7781. "type": "number"
  7782. },
  7783. "prompt": {
  7784. "type": "string"
  7785. },
  7786. "tools": {
  7787. "type": "object",
  7788. "propertyNames": {
  7789. "type": "string"
  7790. },
  7791. "additionalProperties": {
  7792. "type": "boolean"
  7793. }
  7794. },
  7795. "disable": {
  7796. "type": "boolean"
  7797. },
  7798. "description": {
  7799. "description": "Description of when to use the agent",
  7800. "type": "string"
  7801. },
  7802. "mode": {
  7803. "type": "string",
  7804. "enum": [
  7805. "subagent",
  7806. "primary",
  7807. "all"
  7808. ]
  7809. },
  7810. "color": {
  7811. "description": "Hex color code for the agent (e.g., #FF5733)",
  7812. "type": "string",
  7813. "pattern": "^#[0-9a-fA-F]{6}$"
  7814. },
  7815. "maxSteps": {
  7816. "description": "Maximum number of agentic iterations before forcing text-only response",
  7817. "type": "integer",
  7818. "exclusiveMinimum": 0,
  7819. "maximum": 9007199254740991
  7820. },
  7821. "permission": {
  7822. "type": "object",
  7823. "properties": {
  7824. "edit": {
  7825. "type": "string",
  7826. "enum": [
  7827. "ask",
  7828. "allow",
  7829. "deny"
  7830. ]
  7831. },
  7832. "bash": {
  7833. "anyOf": [
  7834. {
  7835. "type": "string",
  7836. "enum": [
  7837. "ask",
  7838. "allow",
  7839. "deny"
  7840. ]
  7841. },
  7842. {
  7843. "type": "object",
  7844. "propertyNames": {
  7845. "type": "string"
  7846. },
  7847. "additionalProperties": {
  7848. "type": "string",
  7849. "enum": [
  7850. "ask",
  7851. "allow",
  7852. "deny"
  7853. ]
  7854. }
  7855. }
  7856. ]
  7857. },
  7858. "webfetch": {
  7859. "type": "string",
  7860. "enum": [
  7861. "ask",
  7862. "allow",
  7863. "deny"
  7864. ]
  7865. },
  7866. "doom_loop": {
  7867. "type": "string",
  7868. "enum": [
  7869. "ask",
  7870. "allow",
  7871. "deny"
  7872. ]
  7873. },
  7874. "external_directory": {
  7875. "type": "string",
  7876. "enum": [
  7877. "ask",
  7878. "allow",
  7879. "deny"
  7880. ]
  7881. }
  7882. }
  7883. }
  7884. },
  7885. "additionalProperties": {}
  7886. },
  7887. "ProviderConfig": {
  7888. "type": "object",
  7889. "properties": {
  7890. "api": {
  7891. "type": "string"
  7892. },
  7893. "name": {
  7894. "type": "string"
  7895. },
  7896. "env": {
  7897. "type": "array",
  7898. "items": {
  7899. "type": "string"
  7900. }
  7901. },
  7902. "id": {
  7903. "type": "string"
  7904. },
  7905. "npm": {
  7906. "type": "string"
  7907. },
  7908. "models": {
  7909. "type": "object",
  7910. "propertyNames": {
  7911. "type": "string"
  7912. },
  7913. "additionalProperties": {
  7914. "type": "object",
  7915. "properties": {
  7916. "id": {
  7917. "type": "string"
  7918. },
  7919. "name": {
  7920. "type": "string"
  7921. },
  7922. "release_date": {
  7923. "type": "string"
  7924. },
  7925. "attachment": {
  7926. "type": "boolean"
  7927. },
  7928. "reasoning": {
  7929. "type": "boolean"
  7930. },
  7931. "temperature": {
  7932. "type": "boolean"
  7933. },
  7934. "tool_call": {
  7935. "type": "boolean"
  7936. },
  7937. "cost": {
  7938. "type": "object",
  7939. "properties": {
  7940. "input": {
  7941. "type": "number"
  7942. },
  7943. "output": {
  7944. "type": "number"
  7945. },
  7946. "cache_read": {
  7947. "type": "number"
  7948. },
  7949. "cache_write": {
  7950. "type": "number"
  7951. },
  7952. "context_over_200k": {
  7953. "type": "object",
  7954. "properties": {
  7955. "input": {
  7956. "type": "number"
  7957. },
  7958. "output": {
  7959. "type": "number"
  7960. },
  7961. "cache_read": {
  7962. "type": "number"
  7963. },
  7964. "cache_write": {
  7965. "type": "number"
  7966. }
  7967. },
  7968. "required": [
  7969. "input",
  7970. "output"
  7971. ]
  7972. }
  7973. },
  7974. "required": [
  7975. "input",
  7976. "output"
  7977. ]
  7978. },
  7979. "limit": {
  7980. "type": "object",
  7981. "properties": {
  7982. "context": {
  7983. "type": "number"
  7984. },
  7985. "output": {
  7986. "type": "number"
  7987. }
  7988. },
  7989. "required": [
  7990. "context",
  7991. "output"
  7992. ]
  7993. },
  7994. "modalities": {
  7995. "type": "object",
  7996. "properties": {
  7997. "input": {
  7998. "type": "array",
  7999. "items": {
  8000. "type": "string",
  8001. "enum": [
  8002. "text",
  8003. "audio",
  8004. "image",
  8005. "video",
  8006. "pdf"
  8007. ]
  8008. }
  8009. },
  8010. "output": {
  8011. "type": "array",
  8012. "items": {
  8013. "type": "string",
  8014. "enum": [
  8015. "text",
  8016. "audio",
  8017. "image",
  8018. "video",
  8019. "pdf"
  8020. ]
  8021. }
  8022. }
  8023. },
  8024. "required": [
  8025. "input",
  8026. "output"
  8027. ]
  8028. },
  8029. "experimental": {
  8030. "type": "boolean"
  8031. },
  8032. "status": {
  8033. "type": "string",
  8034. "enum": [
  8035. "alpha",
  8036. "beta",
  8037. "deprecated"
  8038. ]
  8039. },
  8040. "options": {
  8041. "type": "object",
  8042. "propertyNames": {
  8043. "type": "string"
  8044. },
  8045. "additionalProperties": {}
  8046. },
  8047. "headers": {
  8048. "type": "object",
  8049. "propertyNames": {
  8050. "type": "string"
  8051. },
  8052. "additionalProperties": {
  8053. "type": "string"
  8054. }
  8055. },
  8056. "provider": {
  8057. "type": "object",
  8058. "properties": {
  8059. "npm": {
  8060. "type": "string"
  8061. }
  8062. },
  8063. "required": [
  8064. "npm"
  8065. ]
  8066. }
  8067. }
  8068. }
  8069. },
  8070. "whitelist": {
  8071. "type": "array",
  8072. "items": {
  8073. "type": "string"
  8074. }
  8075. },
  8076. "blacklist": {
  8077. "type": "array",
  8078. "items": {
  8079. "type": "string"
  8080. }
  8081. },
  8082. "options": {
  8083. "type": "object",
  8084. "properties": {
  8085. "apiKey": {
  8086. "type": "string"
  8087. },
  8088. "baseURL": {
  8089. "type": "string"
  8090. },
  8091. "enterpriseUrl": {
  8092. "description": "GitHub Enterprise URL for copilot authentication",
  8093. "type": "string"
  8094. },
  8095. "setCacheKey": {
  8096. "description": "Enable promptCacheKey for this provider (default false)",
  8097. "type": "boolean"
  8098. },
  8099. "timeout": {
  8100. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  8101. "anyOf": [
  8102. {
  8103. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  8104. "type": "integer",
  8105. "exclusiveMinimum": 0,
  8106. "maximum": 9007199254740991
  8107. },
  8108. {
  8109. "description": "Disable timeout for this provider entirely.",
  8110. "type": "boolean",
  8111. "const": false
  8112. }
  8113. ]
  8114. }
  8115. },
  8116. "additionalProperties": {}
  8117. }
  8118. },
  8119. "additionalProperties": false
  8120. },
  8121. "McpLocalConfig": {
  8122. "type": "object",
  8123. "properties": {
  8124. "type": {
  8125. "description": "Type of MCP server connection",
  8126. "type": "string",
  8127. "const": "local"
  8128. },
  8129. "command": {
  8130. "description": "Command and arguments to run the MCP server",
  8131. "type": "array",
  8132. "items": {
  8133. "type": "string"
  8134. }
  8135. },
  8136. "environment": {
  8137. "description": "Environment variables to set when running the MCP server",
  8138. "type": "object",
  8139. "propertyNames": {
  8140. "type": "string"
  8141. },
  8142. "additionalProperties": {
  8143. "type": "string"
  8144. }
  8145. },
  8146. "enabled": {
  8147. "description": "Enable or disable the MCP server on startup",
  8148. "type": "boolean"
  8149. },
  8150. "timeout": {
  8151. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  8152. "type": "integer",
  8153. "exclusiveMinimum": 0,
  8154. "maximum": 9007199254740991
  8155. }
  8156. },
  8157. "required": [
  8158. "type",
  8159. "command"
  8160. ],
  8161. "additionalProperties": false
  8162. },
  8163. "McpOAuthConfig": {
  8164. "type": "object",
  8165. "properties": {
  8166. "clientId": {
  8167. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  8168. "type": "string"
  8169. },
  8170. "clientSecret": {
  8171. "description": "OAuth client secret (if required by the authorization server)",
  8172. "type": "string"
  8173. },
  8174. "scope": {
  8175. "description": "OAuth scopes to request during authorization",
  8176. "type": "string"
  8177. }
  8178. },
  8179. "additionalProperties": false
  8180. },
  8181. "McpRemoteConfig": {
  8182. "type": "object",
  8183. "properties": {
  8184. "type": {
  8185. "description": "Type of MCP server connection",
  8186. "type": "string",
  8187. "const": "remote"
  8188. },
  8189. "url": {
  8190. "description": "URL of the remote MCP server",
  8191. "type": "string"
  8192. },
  8193. "enabled": {
  8194. "description": "Enable or disable the MCP server on startup",
  8195. "type": "boolean"
  8196. },
  8197. "headers": {
  8198. "description": "Headers to send with the request",
  8199. "type": "object",
  8200. "propertyNames": {
  8201. "type": "string"
  8202. },
  8203. "additionalProperties": {
  8204. "type": "string"
  8205. }
  8206. },
  8207. "oauth": {
  8208. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  8209. "anyOf": [
  8210. {
  8211. "$ref": "#/components/schemas/McpOAuthConfig"
  8212. },
  8213. {
  8214. "type": "boolean",
  8215. "const": false
  8216. }
  8217. ]
  8218. },
  8219. "timeout": {
  8220. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  8221. "type": "integer",
  8222. "exclusiveMinimum": 0,
  8223. "maximum": 9007199254740991
  8224. }
  8225. },
  8226. "required": [
  8227. "type",
  8228. "url"
  8229. ],
  8230. "additionalProperties": false
  8231. },
  8232. "LayoutConfig": {
  8233. "description": "@deprecated Always uses stretch layout.",
  8234. "type": "string",
  8235. "enum": [
  8236. "auto",
  8237. "stretch"
  8238. ]
  8239. },
  8240. "Config": {
  8241. "type": "object",
  8242. "properties": {
  8243. "$schema": {
  8244. "description": "JSON schema reference for configuration validation",
  8245. "type": "string"
  8246. },
  8247. "theme": {
  8248. "description": "Theme name to use for the interface",
  8249. "type": "string"
  8250. },
  8251. "keybinds": {
  8252. "$ref": "#/components/schemas/KeybindsConfig"
  8253. },
  8254. "tui": {
  8255. "description": "TUI specific settings",
  8256. "type": "object",
  8257. "properties": {
  8258. "scroll_speed": {
  8259. "description": "TUI scroll speed",
  8260. "type": "number",
  8261. "minimum": 0.001
  8262. },
  8263. "scroll_acceleration": {
  8264. "description": "Scroll acceleration settings",
  8265. "type": "object",
  8266. "properties": {
  8267. "enabled": {
  8268. "description": "Enable scroll acceleration",
  8269. "type": "boolean"
  8270. }
  8271. },
  8272. "required": [
  8273. "enabled"
  8274. ]
  8275. },
  8276. "diff_style": {
  8277. "description": "Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column",
  8278. "type": "string",
  8279. "enum": [
  8280. "auto",
  8281. "stacked"
  8282. ]
  8283. }
  8284. }
  8285. },
  8286. "command": {
  8287. "description": "Command configuration, see https://opencode.ai/docs/commands",
  8288. "type": "object",
  8289. "propertyNames": {
  8290. "type": "string"
  8291. },
  8292. "additionalProperties": {
  8293. "type": "object",
  8294. "properties": {
  8295. "template": {
  8296. "type": "string"
  8297. },
  8298. "description": {
  8299. "type": "string"
  8300. },
  8301. "agent": {
  8302. "type": "string"
  8303. },
  8304. "model": {
  8305. "type": "string"
  8306. },
  8307. "subtask": {
  8308. "type": "boolean"
  8309. }
  8310. },
  8311. "required": [
  8312. "template"
  8313. ]
  8314. }
  8315. },
  8316. "watcher": {
  8317. "type": "object",
  8318. "properties": {
  8319. "ignore": {
  8320. "type": "array",
  8321. "items": {
  8322. "type": "string"
  8323. }
  8324. }
  8325. }
  8326. },
  8327. "plugin": {
  8328. "type": "array",
  8329. "items": {
  8330. "type": "string"
  8331. }
  8332. },
  8333. "snapshot": {
  8334. "type": "boolean"
  8335. },
  8336. "share": {
  8337. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  8338. "type": "string",
  8339. "enum": [
  8340. "manual",
  8341. "auto",
  8342. "disabled"
  8343. ]
  8344. },
  8345. "autoshare": {
  8346. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  8347. "type": "boolean"
  8348. },
  8349. "autoupdate": {
  8350. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  8351. "anyOf": [
  8352. {
  8353. "type": "boolean"
  8354. },
  8355. {
  8356. "type": "string",
  8357. "const": "notify"
  8358. }
  8359. ]
  8360. },
  8361. "disabled_providers": {
  8362. "description": "Disable providers that are loaded automatically",
  8363. "type": "array",
  8364. "items": {
  8365. "type": "string"
  8366. }
  8367. },
  8368. "enabled_providers": {
  8369. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  8370. "type": "array",
  8371. "items": {
  8372. "type": "string"
  8373. }
  8374. },
  8375. "model": {
  8376. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  8377. "type": "string"
  8378. },
  8379. "small_model": {
  8380. "description": "Small model to use for tasks like title generation in the format of provider/model",
  8381. "type": "string"
  8382. },
  8383. "username": {
  8384. "description": "Custom username to display in conversations instead of system username",
  8385. "type": "string"
  8386. },
  8387. "mode": {
  8388. "description": "@deprecated Use `agent` field instead.",
  8389. "type": "object",
  8390. "properties": {
  8391. "build": {
  8392. "$ref": "#/components/schemas/AgentConfig"
  8393. },
  8394. "plan": {
  8395. "$ref": "#/components/schemas/AgentConfig"
  8396. }
  8397. },
  8398. "additionalProperties": {
  8399. "$ref": "#/components/schemas/AgentConfig"
  8400. }
  8401. },
  8402. "agent": {
  8403. "description": "Agent configuration, see https://opencode.ai/docs/agent",
  8404. "type": "object",
  8405. "properties": {
  8406. "plan": {
  8407. "$ref": "#/components/schemas/AgentConfig"
  8408. },
  8409. "build": {
  8410. "$ref": "#/components/schemas/AgentConfig"
  8411. },
  8412. "general": {
  8413. "$ref": "#/components/schemas/AgentConfig"
  8414. },
  8415. "explore": {
  8416. "$ref": "#/components/schemas/AgentConfig"
  8417. }
  8418. },
  8419. "additionalProperties": {
  8420. "$ref": "#/components/schemas/AgentConfig"
  8421. }
  8422. },
  8423. "provider": {
  8424. "description": "Custom provider configurations and model overrides",
  8425. "type": "object",
  8426. "propertyNames": {
  8427. "type": "string"
  8428. },
  8429. "additionalProperties": {
  8430. "$ref": "#/components/schemas/ProviderConfig"
  8431. }
  8432. },
  8433. "mcp": {
  8434. "description": "MCP (Model Context Protocol) server configurations",
  8435. "type": "object",
  8436. "propertyNames": {
  8437. "type": "string"
  8438. },
  8439. "additionalProperties": {
  8440. "anyOf": [
  8441. {
  8442. "$ref": "#/components/schemas/McpLocalConfig"
  8443. },
  8444. {
  8445. "$ref": "#/components/schemas/McpRemoteConfig"
  8446. }
  8447. ]
  8448. }
  8449. },
  8450. "formatter": {
  8451. "anyOf": [
  8452. {
  8453. "type": "boolean",
  8454. "const": false
  8455. },
  8456. {
  8457. "type": "object",
  8458. "propertyNames": {
  8459. "type": "string"
  8460. },
  8461. "additionalProperties": {
  8462. "type": "object",
  8463. "properties": {
  8464. "disabled": {
  8465. "type": "boolean"
  8466. },
  8467. "command": {
  8468. "type": "array",
  8469. "items": {
  8470. "type": "string"
  8471. }
  8472. },
  8473. "environment": {
  8474. "type": "object",
  8475. "propertyNames": {
  8476. "type": "string"
  8477. },
  8478. "additionalProperties": {
  8479. "type": "string"
  8480. }
  8481. },
  8482. "extensions": {
  8483. "type": "array",
  8484. "items": {
  8485. "type": "string"
  8486. }
  8487. }
  8488. }
  8489. }
  8490. }
  8491. ]
  8492. },
  8493. "lsp": {
  8494. "anyOf": [
  8495. {
  8496. "type": "boolean",
  8497. "const": false
  8498. },
  8499. {
  8500. "type": "object",
  8501. "propertyNames": {
  8502. "type": "string"
  8503. },
  8504. "additionalProperties": {
  8505. "anyOf": [
  8506. {
  8507. "type": "object",
  8508. "properties": {
  8509. "disabled": {
  8510. "type": "boolean",
  8511. "const": true
  8512. }
  8513. },
  8514. "required": [
  8515. "disabled"
  8516. ]
  8517. },
  8518. {
  8519. "type": "object",
  8520. "properties": {
  8521. "command": {
  8522. "type": "array",
  8523. "items": {
  8524. "type": "string"
  8525. }
  8526. },
  8527. "extensions": {
  8528. "type": "array",
  8529. "items": {
  8530. "type": "string"
  8531. }
  8532. },
  8533. "disabled": {
  8534. "type": "boolean"
  8535. },
  8536. "env": {
  8537. "type": "object",
  8538. "propertyNames": {
  8539. "type": "string"
  8540. },
  8541. "additionalProperties": {
  8542. "type": "string"
  8543. }
  8544. },
  8545. "initialization": {
  8546. "type": "object",
  8547. "propertyNames": {
  8548. "type": "string"
  8549. },
  8550. "additionalProperties": {}
  8551. }
  8552. },
  8553. "required": [
  8554. "command"
  8555. ]
  8556. }
  8557. ]
  8558. }
  8559. }
  8560. ]
  8561. },
  8562. "instructions": {
  8563. "description": "Additional instruction files or patterns to include",
  8564. "type": "array",
  8565. "items": {
  8566. "type": "string"
  8567. }
  8568. },
  8569. "layout": {
  8570. "$ref": "#/components/schemas/LayoutConfig"
  8571. },
  8572. "permission": {
  8573. "type": "object",
  8574. "properties": {
  8575. "edit": {
  8576. "type": "string",
  8577. "enum": [
  8578. "ask",
  8579. "allow",
  8580. "deny"
  8581. ]
  8582. },
  8583. "bash": {
  8584. "anyOf": [
  8585. {
  8586. "type": "string",
  8587. "enum": [
  8588. "ask",
  8589. "allow",
  8590. "deny"
  8591. ]
  8592. },
  8593. {
  8594. "type": "object",
  8595. "propertyNames": {
  8596. "type": "string"
  8597. },
  8598. "additionalProperties": {
  8599. "type": "string",
  8600. "enum": [
  8601. "ask",
  8602. "allow",
  8603. "deny"
  8604. ]
  8605. }
  8606. }
  8607. ]
  8608. },
  8609. "webfetch": {
  8610. "type": "string",
  8611. "enum": [
  8612. "ask",
  8613. "allow",
  8614. "deny"
  8615. ]
  8616. },
  8617. "doom_loop": {
  8618. "type": "string",
  8619. "enum": [
  8620. "ask",
  8621. "allow",
  8622. "deny"
  8623. ]
  8624. },
  8625. "external_directory": {
  8626. "type": "string",
  8627. "enum": [
  8628. "ask",
  8629. "allow",
  8630. "deny"
  8631. ]
  8632. }
  8633. }
  8634. },
  8635. "tools": {
  8636. "type": "object",
  8637. "propertyNames": {
  8638. "type": "string"
  8639. },
  8640. "additionalProperties": {
  8641. "type": "boolean"
  8642. }
  8643. },
  8644. "enterprise": {
  8645. "type": "object",
  8646. "properties": {
  8647. "url": {
  8648. "description": "Enterprise URL",
  8649. "type": "string"
  8650. }
  8651. }
  8652. },
  8653. "experimental": {
  8654. "type": "object",
  8655. "properties": {
  8656. "hook": {
  8657. "type": "object",
  8658. "properties": {
  8659. "file_edited": {
  8660. "type": "object",
  8661. "propertyNames": {
  8662. "type": "string"
  8663. },
  8664. "additionalProperties": {
  8665. "type": "array",
  8666. "items": {
  8667. "type": "object",
  8668. "properties": {
  8669. "command": {
  8670. "type": "array",
  8671. "items": {
  8672. "type": "string"
  8673. }
  8674. },
  8675. "environment": {
  8676. "type": "object",
  8677. "propertyNames": {
  8678. "type": "string"
  8679. },
  8680. "additionalProperties": {
  8681. "type": "string"
  8682. }
  8683. }
  8684. },
  8685. "required": [
  8686. "command"
  8687. ]
  8688. }
  8689. }
  8690. },
  8691. "session_completed": {
  8692. "type": "array",
  8693. "items": {
  8694. "type": "object",
  8695. "properties": {
  8696. "command": {
  8697. "type": "array",
  8698. "items": {
  8699. "type": "string"
  8700. }
  8701. },
  8702. "environment": {
  8703. "type": "object",
  8704. "propertyNames": {
  8705. "type": "string"
  8706. },
  8707. "additionalProperties": {
  8708. "type": "string"
  8709. }
  8710. }
  8711. },
  8712. "required": [
  8713. "command"
  8714. ]
  8715. }
  8716. }
  8717. }
  8718. },
  8719. "chatMaxRetries": {
  8720. "description": "Number of retries for chat completions on failure",
  8721. "type": "number"
  8722. },
  8723. "disable_paste_summary": {
  8724. "type": "boolean"
  8725. },
  8726. "batch_tool": {
  8727. "description": "Enable the batch tool",
  8728. "type": "boolean"
  8729. },
  8730. "openTelemetry": {
  8731. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  8732. "type": "boolean"
  8733. },
  8734. "primary_tools": {
  8735. "description": "Tools that should only be available to primary agents.",
  8736. "type": "array",
  8737. "items": {
  8738. "type": "string"
  8739. }
  8740. }
  8741. }
  8742. }
  8743. },
  8744. "additionalProperties": false
  8745. },
  8746. "ToolIDs": {
  8747. "type": "array",
  8748. "items": {
  8749. "type": "string"
  8750. }
  8751. },
  8752. "ToolListItem": {
  8753. "type": "object",
  8754. "properties": {
  8755. "id": {
  8756. "type": "string"
  8757. },
  8758. "description": {
  8759. "type": "string"
  8760. },
  8761. "parameters": {}
  8762. },
  8763. "required": [
  8764. "id",
  8765. "description",
  8766. "parameters"
  8767. ]
  8768. },
  8769. "ToolList": {
  8770. "type": "array",
  8771. "items": {
  8772. "$ref": "#/components/schemas/ToolListItem"
  8773. }
  8774. },
  8775. "Path": {
  8776. "type": "object",
  8777. "properties": {
  8778. "state": {
  8779. "type": "string"
  8780. },
  8781. "config": {
  8782. "type": "string"
  8783. },
  8784. "worktree": {
  8785. "type": "string"
  8786. },
  8787. "directory": {
  8788. "type": "string"
  8789. }
  8790. },
  8791. "required": [
  8792. "state",
  8793. "config",
  8794. "worktree",
  8795. "directory"
  8796. ]
  8797. },
  8798. "VcsInfo": {
  8799. "type": "object",
  8800. "properties": {
  8801. "branch": {
  8802. "type": "string"
  8803. }
  8804. },
  8805. "required": [
  8806. "branch"
  8807. ]
  8808. },
  8809. "TextPartInput": {
  8810. "type": "object",
  8811. "properties": {
  8812. "id": {
  8813. "type": "string"
  8814. },
  8815. "type": {
  8816. "type": "string",
  8817. "const": "text"
  8818. },
  8819. "text": {
  8820. "type": "string"
  8821. },
  8822. "synthetic": {
  8823. "type": "boolean"
  8824. },
  8825. "ignored": {
  8826. "type": "boolean"
  8827. },
  8828. "time": {
  8829. "type": "object",
  8830. "properties": {
  8831. "start": {
  8832. "type": "number"
  8833. },
  8834. "end": {
  8835. "type": "number"
  8836. }
  8837. },
  8838. "required": [
  8839. "start"
  8840. ]
  8841. },
  8842. "metadata": {
  8843. "type": "object",
  8844. "propertyNames": {
  8845. "type": "string"
  8846. },
  8847. "additionalProperties": {}
  8848. }
  8849. },
  8850. "required": [
  8851. "type",
  8852. "text"
  8853. ]
  8854. },
  8855. "FilePartInput": {
  8856. "type": "object",
  8857. "properties": {
  8858. "id": {
  8859. "type": "string"
  8860. },
  8861. "type": {
  8862. "type": "string",
  8863. "const": "file"
  8864. },
  8865. "mime": {
  8866. "type": "string"
  8867. },
  8868. "filename": {
  8869. "type": "string"
  8870. },
  8871. "url": {
  8872. "type": "string"
  8873. },
  8874. "source": {
  8875. "$ref": "#/components/schemas/FilePartSource"
  8876. }
  8877. },
  8878. "required": [
  8879. "type",
  8880. "mime",
  8881. "url"
  8882. ]
  8883. },
  8884. "AgentPartInput": {
  8885. "type": "object",
  8886. "properties": {
  8887. "id": {
  8888. "type": "string"
  8889. },
  8890. "type": {
  8891. "type": "string",
  8892. "const": "agent"
  8893. },
  8894. "name": {
  8895. "type": "string"
  8896. },
  8897. "source": {
  8898. "type": "object",
  8899. "properties": {
  8900. "value": {
  8901. "type": "string"
  8902. },
  8903. "start": {
  8904. "type": "integer",
  8905. "minimum": -9007199254740991,
  8906. "maximum": 9007199254740991
  8907. },
  8908. "end": {
  8909. "type": "integer",
  8910. "minimum": -9007199254740991,
  8911. "maximum": 9007199254740991
  8912. }
  8913. },
  8914. "required": [
  8915. "value",
  8916. "start",
  8917. "end"
  8918. ]
  8919. }
  8920. },
  8921. "required": [
  8922. "type",
  8923. "name"
  8924. ]
  8925. },
  8926. "SubtaskPartInput": {
  8927. "type": "object",
  8928. "properties": {
  8929. "id": {
  8930. "type": "string"
  8931. },
  8932. "type": {
  8933. "type": "string",
  8934. "const": "subtask"
  8935. },
  8936. "prompt": {
  8937. "type": "string"
  8938. },
  8939. "description": {
  8940. "type": "string"
  8941. },
  8942. "agent": {
  8943. "type": "string"
  8944. }
  8945. },
  8946. "required": [
  8947. "type",
  8948. "prompt",
  8949. "description",
  8950. "agent"
  8951. ]
  8952. },
  8953. "Command": {
  8954. "type": "object",
  8955. "properties": {
  8956. "name": {
  8957. "type": "string"
  8958. },
  8959. "description": {
  8960. "type": "string"
  8961. },
  8962. "agent": {
  8963. "type": "string"
  8964. },
  8965. "model": {
  8966. "type": "string"
  8967. },
  8968. "template": {
  8969. "type": "string"
  8970. },
  8971. "subtask": {
  8972. "type": "boolean"
  8973. }
  8974. },
  8975. "required": [
  8976. "name",
  8977. "template"
  8978. ]
  8979. },
  8980. "Model": {
  8981. "type": "object",
  8982. "properties": {
  8983. "id": {
  8984. "type": "string"
  8985. },
  8986. "providerID": {
  8987. "type": "string"
  8988. },
  8989. "api": {
  8990. "type": "object",
  8991. "properties": {
  8992. "id": {
  8993. "type": "string"
  8994. },
  8995. "url": {
  8996. "type": "string"
  8997. },
  8998. "npm": {
  8999. "type": "string"
  9000. }
  9001. },
  9002. "required": [
  9003. "id",
  9004. "url",
  9005. "npm"
  9006. ]
  9007. },
  9008. "name": {
  9009. "type": "string"
  9010. },
  9011. "capabilities": {
  9012. "type": "object",
  9013. "properties": {
  9014. "temperature": {
  9015. "type": "boolean"
  9016. },
  9017. "reasoning": {
  9018. "type": "boolean"
  9019. },
  9020. "attachment": {
  9021. "type": "boolean"
  9022. },
  9023. "toolcall": {
  9024. "type": "boolean"
  9025. },
  9026. "input": {
  9027. "type": "object",
  9028. "properties": {
  9029. "text": {
  9030. "type": "boolean"
  9031. },
  9032. "audio": {
  9033. "type": "boolean"
  9034. },
  9035. "image": {
  9036. "type": "boolean"
  9037. },
  9038. "video": {
  9039. "type": "boolean"
  9040. },
  9041. "pdf": {
  9042. "type": "boolean"
  9043. }
  9044. },
  9045. "required": [
  9046. "text",
  9047. "audio",
  9048. "image",
  9049. "video",
  9050. "pdf"
  9051. ]
  9052. },
  9053. "output": {
  9054. "type": "object",
  9055. "properties": {
  9056. "text": {
  9057. "type": "boolean"
  9058. },
  9059. "audio": {
  9060. "type": "boolean"
  9061. },
  9062. "image": {
  9063. "type": "boolean"
  9064. },
  9065. "video": {
  9066. "type": "boolean"
  9067. },
  9068. "pdf": {
  9069. "type": "boolean"
  9070. }
  9071. },
  9072. "required": [
  9073. "text",
  9074. "audio",
  9075. "image",
  9076. "video",
  9077. "pdf"
  9078. ]
  9079. }
  9080. },
  9081. "required": [
  9082. "temperature",
  9083. "reasoning",
  9084. "attachment",
  9085. "toolcall",
  9086. "input",
  9087. "output"
  9088. ]
  9089. },
  9090. "cost": {
  9091. "type": "object",
  9092. "properties": {
  9093. "input": {
  9094. "type": "number"
  9095. },
  9096. "output": {
  9097. "type": "number"
  9098. },
  9099. "cache": {
  9100. "type": "object",
  9101. "properties": {
  9102. "read": {
  9103. "type": "number"
  9104. },
  9105. "write": {
  9106. "type": "number"
  9107. }
  9108. },
  9109. "required": [
  9110. "read",
  9111. "write"
  9112. ]
  9113. },
  9114. "experimentalOver200K": {
  9115. "type": "object",
  9116. "properties": {
  9117. "input": {
  9118. "type": "number"
  9119. },
  9120. "output": {
  9121. "type": "number"
  9122. },
  9123. "cache": {
  9124. "type": "object",
  9125. "properties": {
  9126. "read": {
  9127. "type": "number"
  9128. },
  9129. "write": {
  9130. "type": "number"
  9131. }
  9132. },
  9133. "required": [
  9134. "read",
  9135. "write"
  9136. ]
  9137. }
  9138. },
  9139. "required": [
  9140. "input",
  9141. "output",
  9142. "cache"
  9143. ]
  9144. }
  9145. },
  9146. "required": [
  9147. "input",
  9148. "output",
  9149. "cache"
  9150. ]
  9151. },
  9152. "limit": {
  9153. "type": "object",
  9154. "properties": {
  9155. "context": {
  9156. "type": "number"
  9157. },
  9158. "output": {
  9159. "type": "number"
  9160. }
  9161. },
  9162. "required": [
  9163. "context",
  9164. "output"
  9165. ]
  9166. },
  9167. "status": {
  9168. "type": "string",
  9169. "enum": [
  9170. "alpha",
  9171. "beta",
  9172. "deprecated",
  9173. "active"
  9174. ]
  9175. },
  9176. "options": {
  9177. "type": "object",
  9178. "propertyNames": {
  9179. "type": "string"
  9180. },
  9181. "additionalProperties": {}
  9182. },
  9183. "headers": {
  9184. "type": "object",
  9185. "propertyNames": {
  9186. "type": "string"
  9187. },
  9188. "additionalProperties": {
  9189. "type": "string"
  9190. }
  9191. }
  9192. },
  9193. "required": [
  9194. "id",
  9195. "providerID",
  9196. "api",
  9197. "name",
  9198. "capabilities",
  9199. "cost",
  9200. "limit",
  9201. "status",
  9202. "options",
  9203. "headers"
  9204. ]
  9205. },
  9206. "Provider": {
  9207. "type": "object",
  9208. "properties": {
  9209. "id": {
  9210. "type": "string"
  9211. },
  9212. "name": {
  9213. "type": "string"
  9214. },
  9215. "source": {
  9216. "type": "string",
  9217. "enum": [
  9218. "env",
  9219. "config",
  9220. "custom",
  9221. "api"
  9222. ]
  9223. },
  9224. "env": {
  9225. "type": "array",
  9226. "items": {
  9227. "type": "string"
  9228. }
  9229. },
  9230. "key": {
  9231. "type": "string"
  9232. },
  9233. "options": {
  9234. "type": "object",
  9235. "propertyNames": {
  9236. "type": "string"
  9237. },
  9238. "additionalProperties": {}
  9239. },
  9240. "models": {
  9241. "type": "object",
  9242. "propertyNames": {
  9243. "type": "string"
  9244. },
  9245. "additionalProperties": {
  9246. "$ref": "#/components/schemas/Model"
  9247. }
  9248. }
  9249. },
  9250. "required": [
  9251. "id",
  9252. "name",
  9253. "source",
  9254. "env",
  9255. "options",
  9256. "models"
  9257. ]
  9258. },
  9259. "ProviderAuthMethod": {
  9260. "type": "object",
  9261. "properties": {
  9262. "type": {
  9263. "anyOf": [
  9264. {
  9265. "type": "string",
  9266. "const": "oauth"
  9267. },
  9268. {
  9269. "type": "string",
  9270. "const": "api"
  9271. }
  9272. ]
  9273. },
  9274. "label": {
  9275. "type": "string"
  9276. }
  9277. },
  9278. "required": [
  9279. "type",
  9280. "label"
  9281. ]
  9282. },
  9283. "ProviderAuthAuthorization": {
  9284. "type": "object",
  9285. "properties": {
  9286. "url": {
  9287. "type": "string"
  9288. },
  9289. "method": {
  9290. "anyOf": [
  9291. {
  9292. "type": "string",
  9293. "const": "auto"
  9294. },
  9295. {
  9296. "type": "string",
  9297. "const": "code"
  9298. }
  9299. ]
  9300. },
  9301. "instructions": {
  9302. "type": "string"
  9303. }
  9304. },
  9305. "required": [
  9306. "url",
  9307. "method",
  9308. "instructions"
  9309. ]
  9310. },
  9311. "Symbol": {
  9312. "type": "object",
  9313. "properties": {
  9314. "name": {
  9315. "type": "string"
  9316. },
  9317. "kind": {
  9318. "type": "number"
  9319. },
  9320. "location": {
  9321. "type": "object",
  9322. "properties": {
  9323. "uri": {
  9324. "type": "string"
  9325. },
  9326. "range": {
  9327. "$ref": "#/components/schemas/Range"
  9328. }
  9329. },
  9330. "required": [
  9331. "uri",
  9332. "range"
  9333. ]
  9334. }
  9335. },
  9336. "required": [
  9337. "name",
  9338. "kind",
  9339. "location"
  9340. ]
  9341. },
  9342. "FileNode": {
  9343. "type": "object",
  9344. "properties": {
  9345. "name": {
  9346. "type": "string"
  9347. },
  9348. "path": {
  9349. "type": "string"
  9350. },
  9351. "absolute": {
  9352. "type": "string"
  9353. },
  9354. "type": {
  9355. "type": "string",
  9356. "enum": [
  9357. "file",
  9358. "directory"
  9359. ]
  9360. },
  9361. "ignored": {
  9362. "type": "boolean"
  9363. }
  9364. },
  9365. "required": [
  9366. "name",
  9367. "path",
  9368. "absolute",
  9369. "type",
  9370. "ignored"
  9371. ]
  9372. },
  9373. "FileContent": {
  9374. "type": "object",
  9375. "properties": {
  9376. "type": {
  9377. "type": "string",
  9378. "const": "text"
  9379. },
  9380. "content": {
  9381. "type": "string"
  9382. },
  9383. "diff": {
  9384. "type": "string"
  9385. },
  9386. "patch": {
  9387. "type": "object",
  9388. "properties": {
  9389. "oldFileName": {
  9390. "type": "string"
  9391. },
  9392. "newFileName": {
  9393. "type": "string"
  9394. },
  9395. "oldHeader": {
  9396. "type": "string"
  9397. },
  9398. "newHeader": {
  9399. "type": "string"
  9400. },
  9401. "hunks": {
  9402. "type": "array",
  9403. "items": {
  9404. "type": "object",
  9405. "properties": {
  9406. "oldStart": {
  9407. "type": "number"
  9408. },
  9409. "oldLines": {
  9410. "type": "number"
  9411. },
  9412. "newStart": {
  9413. "type": "number"
  9414. },
  9415. "newLines": {
  9416. "type": "number"
  9417. },
  9418. "lines": {
  9419. "type": "array",
  9420. "items": {
  9421. "type": "string"
  9422. }
  9423. }
  9424. },
  9425. "required": [
  9426. "oldStart",
  9427. "oldLines",
  9428. "newStart",
  9429. "newLines",
  9430. "lines"
  9431. ]
  9432. }
  9433. },
  9434. "index": {
  9435. "type": "string"
  9436. }
  9437. },
  9438. "required": [
  9439. "oldFileName",
  9440. "newFileName",
  9441. "hunks"
  9442. ]
  9443. },
  9444. "encoding": {
  9445. "type": "string",
  9446. "const": "base64"
  9447. },
  9448. "mimeType": {
  9449. "type": "string"
  9450. }
  9451. },
  9452. "required": [
  9453. "type",
  9454. "content"
  9455. ]
  9456. },
  9457. "File": {
  9458. "type": "object",
  9459. "properties": {
  9460. "path": {
  9461. "type": "string"
  9462. },
  9463. "added": {
  9464. "type": "integer",
  9465. "minimum": -9007199254740991,
  9466. "maximum": 9007199254740991
  9467. },
  9468. "removed": {
  9469. "type": "integer",
  9470. "minimum": -9007199254740991,
  9471. "maximum": 9007199254740991
  9472. },
  9473. "status": {
  9474. "type": "string",
  9475. "enum": [
  9476. "added",
  9477. "deleted",
  9478. "modified"
  9479. ]
  9480. }
  9481. },
  9482. "required": [
  9483. "path",
  9484. "added",
  9485. "removed",
  9486. "status"
  9487. ]
  9488. },
  9489. "Agent": {
  9490. "type": "object",
  9491. "properties": {
  9492. "name": {
  9493. "type": "string"
  9494. },
  9495. "description": {
  9496. "type": "string"
  9497. },
  9498. "mode": {
  9499. "type": "string",
  9500. "enum": [
  9501. "subagent",
  9502. "primary",
  9503. "all"
  9504. ]
  9505. },
  9506. "builtIn": {
  9507. "type": "boolean"
  9508. },
  9509. "topP": {
  9510. "type": "number"
  9511. },
  9512. "temperature": {
  9513. "type": "number"
  9514. },
  9515. "color": {
  9516. "type": "string"
  9517. },
  9518. "permission": {
  9519. "type": "object",
  9520. "properties": {
  9521. "edit": {
  9522. "type": "string",
  9523. "enum": [
  9524. "ask",
  9525. "allow",
  9526. "deny"
  9527. ]
  9528. },
  9529. "bash": {
  9530. "type": "object",
  9531. "propertyNames": {
  9532. "type": "string"
  9533. },
  9534. "additionalProperties": {
  9535. "type": "string",
  9536. "enum": [
  9537. "ask",
  9538. "allow",
  9539. "deny"
  9540. ]
  9541. }
  9542. },
  9543. "webfetch": {
  9544. "type": "string",
  9545. "enum": [
  9546. "ask",
  9547. "allow",
  9548. "deny"
  9549. ]
  9550. },
  9551. "doom_loop": {
  9552. "type": "string",
  9553. "enum": [
  9554. "ask",
  9555. "allow",
  9556. "deny"
  9557. ]
  9558. },
  9559. "external_directory": {
  9560. "type": "string",
  9561. "enum": [
  9562. "ask",
  9563. "allow",
  9564. "deny"
  9565. ]
  9566. }
  9567. },
  9568. "required": [
  9569. "edit",
  9570. "bash"
  9571. ]
  9572. },
  9573. "model": {
  9574. "type": "object",
  9575. "properties": {
  9576. "modelID": {
  9577. "type": "string"
  9578. },
  9579. "providerID": {
  9580. "type": "string"
  9581. }
  9582. },
  9583. "required": [
  9584. "modelID",
  9585. "providerID"
  9586. ]
  9587. },
  9588. "prompt": {
  9589. "type": "string"
  9590. },
  9591. "tools": {
  9592. "type": "object",
  9593. "propertyNames": {
  9594. "type": "string"
  9595. },
  9596. "additionalProperties": {
  9597. "type": "boolean"
  9598. }
  9599. },
  9600. "options": {
  9601. "type": "object",
  9602. "propertyNames": {
  9603. "type": "string"
  9604. },
  9605. "additionalProperties": {}
  9606. },
  9607. "maxSteps": {
  9608. "type": "integer",
  9609. "exclusiveMinimum": 0,
  9610. "maximum": 9007199254740991
  9611. }
  9612. },
  9613. "required": [
  9614. "name",
  9615. "mode",
  9616. "builtIn",
  9617. "permission",
  9618. "tools",
  9619. "options"
  9620. ]
  9621. },
  9622. "MCPStatusConnected": {
  9623. "type": "object",
  9624. "properties": {
  9625. "status": {
  9626. "type": "string",
  9627. "const": "connected"
  9628. }
  9629. },
  9630. "required": [
  9631. "status"
  9632. ]
  9633. },
  9634. "MCPStatusDisabled": {
  9635. "type": "object",
  9636. "properties": {
  9637. "status": {
  9638. "type": "string",
  9639. "const": "disabled"
  9640. }
  9641. },
  9642. "required": [
  9643. "status"
  9644. ]
  9645. },
  9646. "MCPStatusFailed": {
  9647. "type": "object",
  9648. "properties": {
  9649. "status": {
  9650. "type": "string",
  9651. "const": "failed"
  9652. },
  9653. "error": {
  9654. "type": "string"
  9655. }
  9656. },
  9657. "required": [
  9658. "status",
  9659. "error"
  9660. ]
  9661. },
  9662. "MCPStatusNeedsAuth": {
  9663. "type": "object",
  9664. "properties": {
  9665. "status": {
  9666. "type": "string",
  9667. "const": "needs_auth"
  9668. }
  9669. },
  9670. "required": [
  9671. "status"
  9672. ]
  9673. },
  9674. "MCPStatusNeedsClientRegistration": {
  9675. "type": "object",
  9676. "properties": {
  9677. "status": {
  9678. "type": "string",
  9679. "const": "needs_client_registration"
  9680. },
  9681. "error": {
  9682. "type": "string"
  9683. }
  9684. },
  9685. "required": [
  9686. "status",
  9687. "error"
  9688. ]
  9689. },
  9690. "MCPStatus": {
  9691. "anyOf": [
  9692. {
  9693. "$ref": "#/components/schemas/MCPStatusConnected"
  9694. },
  9695. {
  9696. "$ref": "#/components/schemas/MCPStatusDisabled"
  9697. },
  9698. {
  9699. "$ref": "#/components/schemas/MCPStatusFailed"
  9700. },
  9701. {
  9702. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  9703. },
  9704. {
  9705. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  9706. }
  9707. ]
  9708. },
  9709. "LSPStatus": {
  9710. "type": "object",
  9711. "properties": {
  9712. "id": {
  9713. "type": "string"
  9714. },
  9715. "name": {
  9716. "type": "string"
  9717. },
  9718. "root": {
  9719. "type": "string"
  9720. },
  9721. "status": {
  9722. "anyOf": [
  9723. {
  9724. "type": "string",
  9725. "const": "connected"
  9726. },
  9727. {
  9728. "type": "string",
  9729. "const": "error"
  9730. }
  9731. ]
  9732. }
  9733. },
  9734. "required": [
  9735. "id",
  9736. "name",
  9737. "root",
  9738. "status"
  9739. ]
  9740. },
  9741. "FormatterStatus": {
  9742. "type": "object",
  9743. "properties": {
  9744. "name": {
  9745. "type": "string"
  9746. },
  9747. "extensions": {
  9748. "type": "array",
  9749. "items": {
  9750. "type": "string"
  9751. }
  9752. },
  9753. "enabled": {
  9754. "type": "boolean"
  9755. }
  9756. },
  9757. "required": [
  9758. "name",
  9759. "extensions",
  9760. "enabled"
  9761. ]
  9762. },
  9763. "OAuth": {
  9764. "type": "object",
  9765. "properties": {
  9766. "type": {
  9767. "type": "string",
  9768. "const": "oauth"
  9769. },
  9770. "refresh": {
  9771. "type": "string"
  9772. },
  9773. "access": {
  9774. "type": "string"
  9775. },
  9776. "expires": {
  9777. "type": "number"
  9778. },
  9779. "enterpriseUrl": {
  9780. "type": "string"
  9781. }
  9782. },
  9783. "required": [
  9784. "type",
  9785. "refresh",
  9786. "access",
  9787. "expires"
  9788. ]
  9789. },
  9790. "ApiAuth": {
  9791. "type": "object",
  9792. "properties": {
  9793. "type": {
  9794. "type": "string",
  9795. "const": "api"
  9796. },
  9797. "key": {
  9798. "type": "string"
  9799. }
  9800. },
  9801. "required": [
  9802. "type",
  9803. "key"
  9804. ]
  9805. },
  9806. "WellKnownAuth": {
  9807. "type": "object",
  9808. "properties": {
  9809. "type": {
  9810. "type": "string",
  9811. "const": "wellknown"
  9812. },
  9813. "key": {
  9814. "type": "string"
  9815. },
  9816. "token": {
  9817. "type": "string"
  9818. }
  9819. },
  9820. "required": [
  9821. "type",
  9822. "key",
  9823. "token"
  9824. ]
  9825. },
  9826. "Auth": {
  9827. "anyOf": [
  9828. {
  9829. "$ref": "#/components/schemas/OAuth"
  9830. },
  9831. {
  9832. "$ref": "#/components/schemas/ApiAuth"
  9833. },
  9834. {
  9835. "$ref": "#/components/schemas/WellKnownAuth"
  9836. }
  9837. ]
  9838. }
  9839. }
  9840. }
  9841. }