openapi.json 254 KB

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