openapi.json 269 KB

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