openapi.json 260 KB

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