openapi.json 261 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493
  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. },
  5198. "required": ["id", "sessionID", "role", "time", "agent", "model"]
  5199. },
  5200. "ProviderAuthError": {
  5201. "type": "object",
  5202. "properties": {
  5203. "name": {
  5204. "type": "string",
  5205. "const": "ProviderAuthError"
  5206. },
  5207. "data": {
  5208. "type": "object",
  5209. "properties": {
  5210. "providerID": {
  5211. "type": "string"
  5212. },
  5213. "message": {
  5214. "type": "string"
  5215. }
  5216. },
  5217. "required": ["providerID", "message"]
  5218. }
  5219. },
  5220. "required": ["name", "data"]
  5221. },
  5222. "UnknownError": {
  5223. "type": "object",
  5224. "properties": {
  5225. "name": {
  5226. "type": "string",
  5227. "const": "UnknownError"
  5228. },
  5229. "data": {
  5230. "type": "object",
  5231. "properties": {
  5232. "message": {
  5233. "type": "string"
  5234. }
  5235. },
  5236. "required": ["message"]
  5237. }
  5238. },
  5239. "required": ["name", "data"]
  5240. },
  5241. "MessageOutputLengthError": {
  5242. "type": "object",
  5243. "properties": {
  5244. "name": {
  5245. "type": "string",
  5246. "const": "MessageOutputLengthError"
  5247. },
  5248. "data": {
  5249. "type": "object",
  5250. "properties": {}
  5251. }
  5252. },
  5253. "required": ["name", "data"]
  5254. },
  5255. "MessageAbortedError": {
  5256. "type": "object",
  5257. "properties": {
  5258. "name": {
  5259. "type": "string",
  5260. "const": "MessageAbortedError"
  5261. },
  5262. "data": {
  5263. "type": "object",
  5264. "properties": {
  5265. "message": {
  5266. "type": "string"
  5267. }
  5268. },
  5269. "required": ["message"]
  5270. }
  5271. },
  5272. "required": ["name", "data"]
  5273. },
  5274. "APIError": {
  5275. "type": "object",
  5276. "properties": {
  5277. "name": {
  5278. "type": "string",
  5279. "const": "APIError"
  5280. },
  5281. "data": {
  5282. "type": "object",
  5283. "properties": {
  5284. "message": {
  5285. "type": "string"
  5286. },
  5287. "statusCode": {
  5288. "type": "number"
  5289. },
  5290. "isRetryable": {
  5291. "type": "boolean"
  5292. },
  5293. "responseHeaders": {
  5294. "type": "object",
  5295. "propertyNames": {
  5296. "type": "string"
  5297. },
  5298. "additionalProperties": {
  5299. "type": "string"
  5300. }
  5301. },
  5302. "responseBody": {
  5303. "type": "string"
  5304. }
  5305. },
  5306. "required": ["message", "isRetryable"]
  5307. }
  5308. },
  5309. "required": ["name", "data"]
  5310. },
  5311. "AssistantMessage": {
  5312. "type": "object",
  5313. "properties": {
  5314. "id": {
  5315. "type": "string"
  5316. },
  5317. "sessionID": {
  5318. "type": "string"
  5319. },
  5320. "role": {
  5321. "type": "string",
  5322. "const": "assistant"
  5323. },
  5324. "time": {
  5325. "type": "object",
  5326. "properties": {
  5327. "created": {
  5328. "type": "number"
  5329. },
  5330. "completed": {
  5331. "type": "number"
  5332. }
  5333. },
  5334. "required": ["created"]
  5335. },
  5336. "error": {
  5337. "anyOf": [
  5338. {
  5339. "$ref": "#/components/schemas/ProviderAuthError"
  5340. },
  5341. {
  5342. "$ref": "#/components/schemas/UnknownError"
  5343. },
  5344. {
  5345. "$ref": "#/components/schemas/MessageOutputLengthError"
  5346. },
  5347. {
  5348. "$ref": "#/components/schemas/MessageAbortedError"
  5349. },
  5350. {
  5351. "$ref": "#/components/schemas/APIError"
  5352. }
  5353. ]
  5354. },
  5355. "parentID": {
  5356. "type": "string"
  5357. },
  5358. "modelID": {
  5359. "type": "string"
  5360. },
  5361. "providerID": {
  5362. "type": "string"
  5363. },
  5364. "mode": {
  5365. "type": "string"
  5366. },
  5367. "agent": {
  5368. "type": "string"
  5369. },
  5370. "path": {
  5371. "type": "object",
  5372. "properties": {
  5373. "cwd": {
  5374. "type": "string"
  5375. },
  5376. "root": {
  5377. "type": "string"
  5378. }
  5379. },
  5380. "required": ["cwd", "root"]
  5381. },
  5382. "summary": {
  5383. "type": "boolean"
  5384. },
  5385. "cost": {
  5386. "type": "number"
  5387. },
  5388. "tokens": {
  5389. "type": "object",
  5390. "properties": {
  5391. "input": {
  5392. "type": "number"
  5393. },
  5394. "output": {
  5395. "type": "number"
  5396. },
  5397. "reasoning": {
  5398. "type": "number"
  5399. },
  5400. "cache": {
  5401. "type": "object",
  5402. "properties": {
  5403. "read": {
  5404. "type": "number"
  5405. },
  5406. "write": {
  5407. "type": "number"
  5408. }
  5409. },
  5410. "required": ["read", "write"]
  5411. }
  5412. },
  5413. "required": ["input", "output", "reasoning", "cache"]
  5414. },
  5415. "finish": {
  5416. "type": "string"
  5417. }
  5418. },
  5419. "required": [
  5420. "id",
  5421. "sessionID",
  5422. "role",
  5423. "time",
  5424. "parentID",
  5425. "modelID",
  5426. "providerID",
  5427. "mode",
  5428. "agent",
  5429. "path",
  5430. "cost",
  5431. "tokens"
  5432. ]
  5433. },
  5434. "Message": {
  5435. "anyOf": [
  5436. {
  5437. "$ref": "#/components/schemas/UserMessage"
  5438. },
  5439. {
  5440. "$ref": "#/components/schemas/AssistantMessage"
  5441. }
  5442. ]
  5443. },
  5444. "Event.message.updated": {
  5445. "type": "object",
  5446. "properties": {
  5447. "type": {
  5448. "type": "string",
  5449. "const": "message.updated"
  5450. },
  5451. "properties": {
  5452. "type": "object",
  5453. "properties": {
  5454. "info": {
  5455. "$ref": "#/components/schemas/Message"
  5456. }
  5457. },
  5458. "required": ["info"]
  5459. }
  5460. },
  5461. "required": ["type", "properties"]
  5462. },
  5463. "Event.message.removed": {
  5464. "type": "object",
  5465. "properties": {
  5466. "type": {
  5467. "type": "string",
  5468. "const": "message.removed"
  5469. },
  5470. "properties": {
  5471. "type": "object",
  5472. "properties": {
  5473. "sessionID": {
  5474. "type": "string"
  5475. },
  5476. "messageID": {
  5477. "type": "string"
  5478. }
  5479. },
  5480. "required": ["sessionID", "messageID"]
  5481. }
  5482. },
  5483. "required": ["type", "properties"]
  5484. },
  5485. "TextPart": {
  5486. "type": "object",
  5487. "properties": {
  5488. "id": {
  5489. "type": "string"
  5490. },
  5491. "sessionID": {
  5492. "type": "string"
  5493. },
  5494. "messageID": {
  5495. "type": "string"
  5496. },
  5497. "type": {
  5498. "type": "string",
  5499. "const": "text"
  5500. },
  5501. "text": {
  5502. "type": "string"
  5503. },
  5504. "synthetic": {
  5505. "type": "boolean"
  5506. },
  5507. "ignored": {
  5508. "type": "boolean"
  5509. },
  5510. "time": {
  5511. "type": "object",
  5512. "properties": {
  5513. "start": {
  5514. "type": "number"
  5515. },
  5516. "end": {
  5517. "type": "number"
  5518. }
  5519. },
  5520. "required": ["start"]
  5521. },
  5522. "metadata": {
  5523. "type": "object",
  5524. "propertyNames": {
  5525. "type": "string"
  5526. },
  5527. "additionalProperties": {}
  5528. }
  5529. },
  5530. "required": ["id", "sessionID", "messageID", "type", "text"]
  5531. },
  5532. "ReasoningPart": {
  5533. "type": "object",
  5534. "properties": {
  5535. "id": {
  5536. "type": "string"
  5537. },
  5538. "sessionID": {
  5539. "type": "string"
  5540. },
  5541. "messageID": {
  5542. "type": "string"
  5543. },
  5544. "type": {
  5545. "type": "string",
  5546. "const": "reasoning"
  5547. },
  5548. "text": {
  5549. "type": "string"
  5550. },
  5551. "metadata": {
  5552. "type": "object",
  5553. "propertyNames": {
  5554. "type": "string"
  5555. },
  5556. "additionalProperties": {}
  5557. },
  5558. "time": {
  5559. "type": "object",
  5560. "properties": {
  5561. "start": {
  5562. "type": "number"
  5563. },
  5564. "end": {
  5565. "type": "number"
  5566. }
  5567. },
  5568. "required": ["start"]
  5569. }
  5570. },
  5571. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  5572. },
  5573. "FilePartSourceText": {
  5574. "type": "object",
  5575. "properties": {
  5576. "value": {
  5577. "type": "string"
  5578. },
  5579. "start": {
  5580. "type": "integer",
  5581. "minimum": -9007199254740991,
  5582. "maximum": 9007199254740991
  5583. },
  5584. "end": {
  5585. "type": "integer",
  5586. "minimum": -9007199254740991,
  5587. "maximum": 9007199254740991
  5588. }
  5589. },
  5590. "required": ["value", "start", "end"]
  5591. },
  5592. "FileSource": {
  5593. "type": "object",
  5594. "properties": {
  5595. "text": {
  5596. "$ref": "#/components/schemas/FilePartSourceText"
  5597. },
  5598. "type": {
  5599. "type": "string",
  5600. "const": "file"
  5601. },
  5602. "path": {
  5603. "type": "string"
  5604. }
  5605. },
  5606. "required": ["text", "type", "path"]
  5607. },
  5608. "Range": {
  5609. "type": "object",
  5610. "properties": {
  5611. "start": {
  5612. "type": "object",
  5613. "properties": {
  5614. "line": {
  5615. "type": "number"
  5616. },
  5617. "character": {
  5618. "type": "number"
  5619. }
  5620. },
  5621. "required": ["line", "character"]
  5622. },
  5623. "end": {
  5624. "type": "object",
  5625. "properties": {
  5626. "line": {
  5627. "type": "number"
  5628. },
  5629. "character": {
  5630. "type": "number"
  5631. }
  5632. },
  5633. "required": ["line", "character"]
  5634. }
  5635. },
  5636. "required": ["start", "end"]
  5637. },
  5638. "SymbolSource": {
  5639. "type": "object",
  5640. "properties": {
  5641. "text": {
  5642. "$ref": "#/components/schemas/FilePartSourceText"
  5643. },
  5644. "type": {
  5645. "type": "string",
  5646. "const": "symbol"
  5647. },
  5648. "path": {
  5649. "type": "string"
  5650. },
  5651. "range": {
  5652. "$ref": "#/components/schemas/Range"
  5653. },
  5654. "name": {
  5655. "type": "string"
  5656. },
  5657. "kind": {
  5658. "type": "integer",
  5659. "minimum": -9007199254740991,
  5660. "maximum": 9007199254740991
  5661. }
  5662. },
  5663. "required": ["text", "type", "path", "range", "name", "kind"]
  5664. },
  5665. "FilePartSource": {
  5666. "anyOf": [
  5667. {
  5668. "$ref": "#/components/schemas/FileSource"
  5669. },
  5670. {
  5671. "$ref": "#/components/schemas/SymbolSource"
  5672. }
  5673. ]
  5674. },
  5675. "FilePart": {
  5676. "type": "object",
  5677. "properties": {
  5678. "id": {
  5679. "type": "string"
  5680. },
  5681. "sessionID": {
  5682. "type": "string"
  5683. },
  5684. "messageID": {
  5685. "type": "string"
  5686. },
  5687. "type": {
  5688. "type": "string",
  5689. "const": "file"
  5690. },
  5691. "mime": {
  5692. "type": "string"
  5693. },
  5694. "filename": {
  5695. "type": "string"
  5696. },
  5697. "url": {
  5698. "type": "string"
  5699. },
  5700. "source": {
  5701. "$ref": "#/components/schemas/FilePartSource"
  5702. }
  5703. },
  5704. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  5705. },
  5706. "ToolStatePending": {
  5707. "type": "object",
  5708. "properties": {
  5709. "status": {
  5710. "type": "string",
  5711. "const": "pending"
  5712. },
  5713. "input": {
  5714. "type": "object",
  5715. "propertyNames": {
  5716. "type": "string"
  5717. },
  5718. "additionalProperties": {}
  5719. },
  5720. "raw": {
  5721. "type": "string"
  5722. }
  5723. },
  5724. "required": ["status", "input", "raw"]
  5725. },
  5726. "ToolStateRunning": {
  5727. "type": "object",
  5728. "properties": {
  5729. "status": {
  5730. "type": "string",
  5731. "const": "running"
  5732. },
  5733. "input": {
  5734. "type": "object",
  5735. "propertyNames": {
  5736. "type": "string"
  5737. },
  5738. "additionalProperties": {}
  5739. },
  5740. "title": {
  5741. "type": "string"
  5742. },
  5743. "metadata": {
  5744. "type": "object",
  5745. "propertyNames": {
  5746. "type": "string"
  5747. },
  5748. "additionalProperties": {}
  5749. },
  5750. "time": {
  5751. "type": "object",
  5752. "properties": {
  5753. "start": {
  5754. "type": "number"
  5755. }
  5756. },
  5757. "required": ["start"]
  5758. }
  5759. },
  5760. "required": ["status", "input", "time"]
  5761. },
  5762. "ToolStateCompleted": {
  5763. "type": "object",
  5764. "properties": {
  5765. "status": {
  5766. "type": "string",
  5767. "const": "completed"
  5768. },
  5769. "input": {
  5770. "type": "object",
  5771. "propertyNames": {
  5772. "type": "string"
  5773. },
  5774. "additionalProperties": {}
  5775. },
  5776. "output": {
  5777. "type": "string"
  5778. },
  5779. "title": {
  5780. "type": "string"
  5781. },
  5782. "metadata": {
  5783. "type": "object",
  5784. "propertyNames": {
  5785. "type": "string"
  5786. },
  5787. "additionalProperties": {}
  5788. },
  5789. "time": {
  5790. "type": "object",
  5791. "properties": {
  5792. "start": {
  5793. "type": "number"
  5794. },
  5795. "end": {
  5796. "type": "number"
  5797. },
  5798. "compacted": {
  5799. "type": "number"
  5800. }
  5801. },
  5802. "required": ["start", "end"]
  5803. },
  5804. "attachments": {
  5805. "type": "array",
  5806. "items": {
  5807. "$ref": "#/components/schemas/FilePart"
  5808. }
  5809. }
  5810. },
  5811. "required": ["status", "input", "output", "title", "metadata", "time"]
  5812. },
  5813. "ToolStateError": {
  5814. "type": "object",
  5815. "properties": {
  5816. "status": {
  5817. "type": "string",
  5818. "const": "error"
  5819. },
  5820. "input": {
  5821. "type": "object",
  5822. "propertyNames": {
  5823. "type": "string"
  5824. },
  5825. "additionalProperties": {}
  5826. },
  5827. "error": {
  5828. "type": "string"
  5829. },
  5830. "metadata": {
  5831. "type": "object",
  5832. "propertyNames": {
  5833. "type": "string"
  5834. },
  5835. "additionalProperties": {}
  5836. },
  5837. "time": {
  5838. "type": "object",
  5839. "properties": {
  5840. "start": {
  5841. "type": "number"
  5842. },
  5843. "end": {
  5844. "type": "number"
  5845. }
  5846. },
  5847. "required": ["start", "end"]
  5848. }
  5849. },
  5850. "required": ["status", "input", "error", "time"]
  5851. },
  5852. "ToolState": {
  5853. "anyOf": [
  5854. {
  5855. "$ref": "#/components/schemas/ToolStatePending"
  5856. },
  5857. {
  5858. "$ref": "#/components/schemas/ToolStateRunning"
  5859. },
  5860. {
  5861. "$ref": "#/components/schemas/ToolStateCompleted"
  5862. },
  5863. {
  5864. "$ref": "#/components/schemas/ToolStateError"
  5865. }
  5866. ]
  5867. },
  5868. "ToolPart": {
  5869. "type": "object",
  5870. "properties": {
  5871. "id": {
  5872. "type": "string"
  5873. },
  5874. "sessionID": {
  5875. "type": "string"
  5876. },
  5877. "messageID": {
  5878. "type": "string"
  5879. },
  5880. "type": {
  5881. "type": "string",
  5882. "const": "tool"
  5883. },
  5884. "callID": {
  5885. "type": "string"
  5886. },
  5887. "tool": {
  5888. "type": "string"
  5889. },
  5890. "state": {
  5891. "$ref": "#/components/schemas/ToolState"
  5892. },
  5893. "metadata": {
  5894. "type": "object",
  5895. "propertyNames": {
  5896. "type": "string"
  5897. },
  5898. "additionalProperties": {}
  5899. }
  5900. },
  5901. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  5902. },
  5903. "StepStartPart": {
  5904. "type": "object",
  5905. "properties": {
  5906. "id": {
  5907. "type": "string"
  5908. },
  5909. "sessionID": {
  5910. "type": "string"
  5911. },
  5912. "messageID": {
  5913. "type": "string"
  5914. },
  5915. "type": {
  5916. "type": "string",
  5917. "const": "step-start"
  5918. },
  5919. "snapshot": {
  5920. "type": "string"
  5921. }
  5922. },
  5923. "required": ["id", "sessionID", "messageID", "type"]
  5924. },
  5925. "StepFinishPart": {
  5926. "type": "object",
  5927. "properties": {
  5928. "id": {
  5929. "type": "string"
  5930. },
  5931. "sessionID": {
  5932. "type": "string"
  5933. },
  5934. "messageID": {
  5935. "type": "string"
  5936. },
  5937. "type": {
  5938. "type": "string",
  5939. "const": "step-finish"
  5940. },
  5941. "reason": {
  5942. "type": "string"
  5943. },
  5944. "snapshot": {
  5945. "type": "string"
  5946. },
  5947. "cost": {
  5948. "type": "number"
  5949. },
  5950. "tokens": {
  5951. "type": "object",
  5952. "properties": {
  5953. "input": {
  5954. "type": "number"
  5955. },
  5956. "output": {
  5957. "type": "number"
  5958. },
  5959. "reasoning": {
  5960. "type": "number"
  5961. },
  5962. "cache": {
  5963. "type": "object",
  5964. "properties": {
  5965. "read": {
  5966. "type": "number"
  5967. },
  5968. "write": {
  5969. "type": "number"
  5970. }
  5971. },
  5972. "required": ["read", "write"]
  5973. }
  5974. },
  5975. "required": ["input", "output", "reasoning", "cache"]
  5976. }
  5977. },
  5978. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  5979. },
  5980. "SnapshotPart": {
  5981. "type": "object",
  5982. "properties": {
  5983. "id": {
  5984. "type": "string"
  5985. },
  5986. "sessionID": {
  5987. "type": "string"
  5988. },
  5989. "messageID": {
  5990. "type": "string"
  5991. },
  5992. "type": {
  5993. "type": "string",
  5994. "const": "snapshot"
  5995. },
  5996. "snapshot": {
  5997. "type": "string"
  5998. }
  5999. },
  6000. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  6001. },
  6002. "PatchPart": {
  6003. "type": "object",
  6004. "properties": {
  6005. "id": {
  6006. "type": "string"
  6007. },
  6008. "sessionID": {
  6009. "type": "string"
  6010. },
  6011. "messageID": {
  6012. "type": "string"
  6013. },
  6014. "type": {
  6015. "type": "string",
  6016. "const": "patch"
  6017. },
  6018. "hash": {
  6019. "type": "string"
  6020. },
  6021. "files": {
  6022. "type": "array",
  6023. "items": {
  6024. "type": "string"
  6025. }
  6026. }
  6027. },
  6028. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  6029. },
  6030. "AgentPart": {
  6031. "type": "object",
  6032. "properties": {
  6033. "id": {
  6034. "type": "string"
  6035. },
  6036. "sessionID": {
  6037. "type": "string"
  6038. },
  6039. "messageID": {
  6040. "type": "string"
  6041. },
  6042. "type": {
  6043. "type": "string",
  6044. "const": "agent"
  6045. },
  6046. "name": {
  6047. "type": "string"
  6048. },
  6049. "source": {
  6050. "type": "object",
  6051. "properties": {
  6052. "value": {
  6053. "type": "string"
  6054. },
  6055. "start": {
  6056. "type": "integer",
  6057. "minimum": -9007199254740991,
  6058. "maximum": 9007199254740991
  6059. },
  6060. "end": {
  6061. "type": "integer",
  6062. "minimum": -9007199254740991,
  6063. "maximum": 9007199254740991
  6064. }
  6065. },
  6066. "required": ["value", "start", "end"]
  6067. }
  6068. },
  6069. "required": ["id", "sessionID", "messageID", "type", "name"]
  6070. },
  6071. "RetryPart": {
  6072. "type": "object",
  6073. "properties": {
  6074. "id": {
  6075. "type": "string"
  6076. },
  6077. "sessionID": {
  6078. "type": "string"
  6079. },
  6080. "messageID": {
  6081. "type": "string"
  6082. },
  6083. "type": {
  6084. "type": "string",
  6085. "const": "retry"
  6086. },
  6087. "attempt": {
  6088. "type": "number"
  6089. },
  6090. "error": {
  6091. "$ref": "#/components/schemas/APIError"
  6092. },
  6093. "time": {
  6094. "type": "object",
  6095. "properties": {
  6096. "created": {
  6097. "type": "number"
  6098. }
  6099. },
  6100. "required": ["created"]
  6101. }
  6102. },
  6103. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  6104. },
  6105. "CompactionPart": {
  6106. "type": "object",
  6107. "properties": {
  6108. "id": {
  6109. "type": "string"
  6110. },
  6111. "sessionID": {
  6112. "type": "string"
  6113. },
  6114. "messageID": {
  6115. "type": "string"
  6116. },
  6117. "type": {
  6118. "type": "string",
  6119. "const": "compaction"
  6120. },
  6121. "auto": {
  6122. "type": "boolean"
  6123. }
  6124. },
  6125. "required": ["id", "sessionID", "messageID", "type", "auto"]
  6126. },
  6127. "Part": {
  6128. "anyOf": [
  6129. {
  6130. "$ref": "#/components/schemas/TextPart"
  6131. },
  6132. {
  6133. "type": "object",
  6134. "properties": {
  6135. "id": {
  6136. "type": "string"
  6137. },
  6138. "sessionID": {
  6139. "type": "string"
  6140. },
  6141. "messageID": {
  6142. "type": "string"
  6143. },
  6144. "type": {
  6145. "type": "string",
  6146. "const": "subtask"
  6147. },
  6148. "prompt": {
  6149. "type": "string"
  6150. },
  6151. "description": {
  6152. "type": "string"
  6153. },
  6154. "agent": {
  6155. "type": "string"
  6156. },
  6157. "command": {
  6158. "type": "string"
  6159. }
  6160. },
  6161. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
  6162. },
  6163. {
  6164. "$ref": "#/components/schemas/ReasoningPart"
  6165. },
  6166. {
  6167. "$ref": "#/components/schemas/FilePart"
  6168. },
  6169. {
  6170. "$ref": "#/components/schemas/ToolPart"
  6171. },
  6172. {
  6173. "$ref": "#/components/schemas/StepStartPart"
  6174. },
  6175. {
  6176. "$ref": "#/components/schemas/StepFinishPart"
  6177. },
  6178. {
  6179. "$ref": "#/components/schemas/SnapshotPart"
  6180. },
  6181. {
  6182. "$ref": "#/components/schemas/PatchPart"
  6183. },
  6184. {
  6185. "$ref": "#/components/schemas/AgentPart"
  6186. },
  6187. {
  6188. "$ref": "#/components/schemas/RetryPart"
  6189. },
  6190. {
  6191. "$ref": "#/components/schemas/CompactionPart"
  6192. }
  6193. ]
  6194. },
  6195. "Event.message.part.updated": {
  6196. "type": "object",
  6197. "properties": {
  6198. "type": {
  6199. "type": "string",
  6200. "const": "message.part.updated"
  6201. },
  6202. "properties": {
  6203. "type": "object",
  6204. "properties": {
  6205. "part": {
  6206. "$ref": "#/components/schemas/Part"
  6207. },
  6208. "delta": {
  6209. "type": "string"
  6210. }
  6211. },
  6212. "required": ["part"]
  6213. }
  6214. },
  6215. "required": ["type", "properties"]
  6216. },
  6217. "Event.message.part.removed": {
  6218. "type": "object",
  6219. "properties": {
  6220. "type": {
  6221. "type": "string",
  6222. "const": "message.part.removed"
  6223. },
  6224. "properties": {
  6225. "type": "object",
  6226. "properties": {
  6227. "sessionID": {
  6228. "type": "string"
  6229. },
  6230. "messageID": {
  6231. "type": "string"
  6232. },
  6233. "partID": {
  6234. "type": "string"
  6235. }
  6236. },
  6237. "required": ["sessionID", "messageID", "partID"]
  6238. }
  6239. },
  6240. "required": ["type", "properties"]
  6241. },
  6242. "Permission": {
  6243. "type": "object",
  6244. "properties": {
  6245. "id": {
  6246. "type": "string"
  6247. },
  6248. "type": {
  6249. "type": "string"
  6250. },
  6251. "pattern": {
  6252. "anyOf": [
  6253. {
  6254. "type": "string"
  6255. },
  6256. {
  6257. "type": "array",
  6258. "items": {
  6259. "type": "string"
  6260. }
  6261. }
  6262. ]
  6263. },
  6264. "sessionID": {
  6265. "type": "string"
  6266. },
  6267. "messageID": {
  6268. "type": "string"
  6269. },
  6270. "callID": {
  6271. "type": "string"
  6272. },
  6273. "title": {
  6274. "type": "string"
  6275. },
  6276. "metadata": {
  6277. "type": "object",
  6278. "propertyNames": {
  6279. "type": "string"
  6280. },
  6281. "additionalProperties": {}
  6282. },
  6283. "time": {
  6284. "type": "object",
  6285. "properties": {
  6286. "created": {
  6287. "type": "number"
  6288. }
  6289. },
  6290. "required": ["created"]
  6291. }
  6292. },
  6293. "required": ["id", "type", "sessionID", "messageID", "title", "metadata", "time"]
  6294. },
  6295. "Event.permission.updated": {
  6296. "type": "object",
  6297. "properties": {
  6298. "type": {
  6299. "type": "string",
  6300. "const": "permission.updated"
  6301. },
  6302. "properties": {
  6303. "$ref": "#/components/schemas/Permission"
  6304. }
  6305. },
  6306. "required": ["type", "properties"]
  6307. },
  6308. "Event.permission.replied": {
  6309. "type": "object",
  6310. "properties": {
  6311. "type": {
  6312. "type": "string",
  6313. "const": "permission.replied"
  6314. },
  6315. "properties": {
  6316. "type": "object",
  6317. "properties": {
  6318. "sessionID": {
  6319. "type": "string"
  6320. },
  6321. "permissionID": {
  6322. "type": "string"
  6323. },
  6324. "response": {
  6325. "type": "string"
  6326. }
  6327. },
  6328. "required": ["sessionID", "permissionID", "response"]
  6329. }
  6330. },
  6331. "required": ["type", "properties"]
  6332. },
  6333. "Event.file.edited": {
  6334. "type": "object",
  6335. "properties": {
  6336. "type": {
  6337. "type": "string",
  6338. "const": "file.edited"
  6339. },
  6340. "properties": {
  6341. "type": "object",
  6342. "properties": {
  6343. "file": {
  6344. "type": "string"
  6345. }
  6346. },
  6347. "required": ["file"]
  6348. }
  6349. },
  6350. "required": ["type", "properties"]
  6351. },
  6352. "Todo": {
  6353. "type": "object",
  6354. "properties": {
  6355. "content": {
  6356. "description": "Brief description of the task",
  6357. "type": "string"
  6358. },
  6359. "status": {
  6360. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  6361. "type": "string"
  6362. },
  6363. "priority": {
  6364. "description": "Priority level of the task: high, medium, low",
  6365. "type": "string"
  6366. },
  6367. "id": {
  6368. "description": "Unique identifier for the todo item",
  6369. "type": "string"
  6370. }
  6371. },
  6372. "required": ["content", "status", "priority", "id"]
  6373. },
  6374. "Event.todo.updated": {
  6375. "type": "object",
  6376. "properties": {
  6377. "type": {
  6378. "type": "string",
  6379. "const": "todo.updated"
  6380. },
  6381. "properties": {
  6382. "type": "object",
  6383. "properties": {
  6384. "sessionID": {
  6385. "type": "string"
  6386. },
  6387. "todos": {
  6388. "type": "array",
  6389. "items": {
  6390. "$ref": "#/components/schemas/Todo"
  6391. }
  6392. }
  6393. },
  6394. "required": ["sessionID", "todos"]
  6395. }
  6396. },
  6397. "required": ["type", "properties"]
  6398. },
  6399. "SessionStatus": {
  6400. "anyOf": [
  6401. {
  6402. "type": "object",
  6403. "properties": {
  6404. "type": {
  6405. "type": "string",
  6406. "const": "idle"
  6407. }
  6408. },
  6409. "required": ["type"]
  6410. },
  6411. {
  6412. "type": "object",
  6413. "properties": {
  6414. "type": {
  6415. "type": "string",
  6416. "const": "retry"
  6417. },
  6418. "attempt": {
  6419. "type": "number"
  6420. },
  6421. "message": {
  6422. "type": "string"
  6423. },
  6424. "next": {
  6425. "type": "number"
  6426. }
  6427. },
  6428. "required": ["type", "attempt", "message", "next"]
  6429. },
  6430. {
  6431. "type": "object",
  6432. "properties": {
  6433. "type": {
  6434. "type": "string",
  6435. "const": "busy"
  6436. }
  6437. },
  6438. "required": ["type"]
  6439. }
  6440. ]
  6441. },
  6442. "Event.session.status": {
  6443. "type": "object",
  6444. "properties": {
  6445. "type": {
  6446. "type": "string",
  6447. "const": "session.status"
  6448. },
  6449. "properties": {
  6450. "type": "object",
  6451. "properties": {
  6452. "sessionID": {
  6453. "type": "string"
  6454. },
  6455. "status": {
  6456. "$ref": "#/components/schemas/SessionStatus"
  6457. }
  6458. },
  6459. "required": ["sessionID", "status"]
  6460. }
  6461. },
  6462. "required": ["type", "properties"]
  6463. },
  6464. "Event.session.idle": {
  6465. "type": "object",
  6466. "properties": {
  6467. "type": {
  6468. "type": "string",
  6469. "const": "session.idle"
  6470. },
  6471. "properties": {
  6472. "type": "object",
  6473. "properties": {
  6474. "sessionID": {
  6475. "type": "string"
  6476. }
  6477. },
  6478. "required": ["sessionID"]
  6479. }
  6480. },
  6481. "required": ["type", "properties"]
  6482. },
  6483. "Event.session.compacted": {
  6484. "type": "object",
  6485. "properties": {
  6486. "type": {
  6487. "type": "string",
  6488. "const": "session.compacted"
  6489. },
  6490. "properties": {
  6491. "type": "object",
  6492. "properties": {
  6493. "sessionID": {
  6494. "type": "string"
  6495. }
  6496. },
  6497. "required": ["sessionID"]
  6498. }
  6499. },
  6500. "required": ["type", "properties"]
  6501. },
  6502. "Event.command.executed": {
  6503. "type": "object",
  6504. "properties": {
  6505. "type": {
  6506. "type": "string",
  6507. "const": "command.executed"
  6508. },
  6509. "properties": {
  6510. "type": "object",
  6511. "properties": {
  6512. "name": {
  6513. "type": "string"
  6514. },
  6515. "sessionID": {
  6516. "type": "string",
  6517. "pattern": "^ses.*"
  6518. },
  6519. "arguments": {
  6520. "type": "string"
  6521. },
  6522. "messageID": {
  6523. "type": "string",
  6524. "pattern": "^msg.*"
  6525. }
  6526. },
  6527. "required": ["name", "sessionID", "arguments", "messageID"]
  6528. }
  6529. },
  6530. "required": ["type", "properties"]
  6531. },
  6532. "Session": {
  6533. "type": "object",
  6534. "properties": {
  6535. "id": {
  6536. "type": "string",
  6537. "pattern": "^ses.*"
  6538. },
  6539. "projectID": {
  6540. "type": "string"
  6541. },
  6542. "directory": {
  6543. "type": "string"
  6544. },
  6545. "parentID": {
  6546. "type": "string",
  6547. "pattern": "^ses.*"
  6548. },
  6549. "summary": {
  6550. "type": "object",
  6551. "properties": {
  6552. "additions": {
  6553. "type": "number"
  6554. },
  6555. "deletions": {
  6556. "type": "number"
  6557. },
  6558. "files": {
  6559. "type": "number"
  6560. },
  6561. "diffs": {
  6562. "type": "array",
  6563. "items": {
  6564. "$ref": "#/components/schemas/FileDiff"
  6565. }
  6566. }
  6567. },
  6568. "required": ["additions", "deletions", "files"]
  6569. },
  6570. "share": {
  6571. "type": "object",
  6572. "properties": {
  6573. "url": {
  6574. "type": "string"
  6575. }
  6576. },
  6577. "required": ["url"]
  6578. },
  6579. "title": {
  6580. "type": "string"
  6581. },
  6582. "version": {
  6583. "type": "string"
  6584. },
  6585. "time": {
  6586. "type": "object",
  6587. "properties": {
  6588. "created": {
  6589. "type": "number"
  6590. },
  6591. "updated": {
  6592. "type": "number"
  6593. },
  6594. "compacting": {
  6595. "type": "number"
  6596. },
  6597. "archived": {
  6598. "type": "number"
  6599. }
  6600. },
  6601. "required": ["created", "updated"]
  6602. },
  6603. "revert": {
  6604. "type": "object",
  6605. "properties": {
  6606. "messageID": {
  6607. "type": "string"
  6608. },
  6609. "partID": {
  6610. "type": "string"
  6611. },
  6612. "snapshot": {
  6613. "type": "string"
  6614. },
  6615. "diff": {
  6616. "type": "string"
  6617. }
  6618. },
  6619. "required": ["messageID"]
  6620. }
  6621. },
  6622. "required": ["id", "projectID", "directory", "title", "version", "time"]
  6623. },
  6624. "Event.session.created": {
  6625. "type": "object",
  6626. "properties": {
  6627. "type": {
  6628. "type": "string",
  6629. "const": "session.created"
  6630. },
  6631. "properties": {
  6632. "type": "object",
  6633. "properties": {
  6634. "info": {
  6635. "$ref": "#/components/schemas/Session"
  6636. }
  6637. },
  6638. "required": ["info"]
  6639. }
  6640. },
  6641. "required": ["type", "properties"]
  6642. },
  6643. "Event.session.updated": {
  6644. "type": "object",
  6645. "properties": {
  6646. "type": {
  6647. "type": "string",
  6648. "const": "session.updated"
  6649. },
  6650. "properties": {
  6651. "type": "object",
  6652. "properties": {
  6653. "info": {
  6654. "$ref": "#/components/schemas/Session"
  6655. }
  6656. },
  6657. "required": ["info"]
  6658. }
  6659. },
  6660. "required": ["type", "properties"]
  6661. },
  6662. "Event.session.deleted": {
  6663. "type": "object",
  6664. "properties": {
  6665. "type": {
  6666. "type": "string",
  6667. "const": "session.deleted"
  6668. },
  6669. "properties": {
  6670. "type": "object",
  6671. "properties": {
  6672. "info": {
  6673. "$ref": "#/components/schemas/Session"
  6674. }
  6675. },
  6676. "required": ["info"]
  6677. }
  6678. },
  6679. "required": ["type", "properties"]
  6680. },
  6681. "Event.session.diff": {
  6682. "type": "object",
  6683. "properties": {
  6684. "type": {
  6685. "type": "string",
  6686. "const": "session.diff"
  6687. },
  6688. "properties": {
  6689. "type": "object",
  6690. "properties": {
  6691. "sessionID": {
  6692. "type": "string"
  6693. },
  6694. "diff": {
  6695. "type": "array",
  6696. "items": {
  6697. "$ref": "#/components/schemas/FileDiff"
  6698. }
  6699. }
  6700. },
  6701. "required": ["sessionID", "diff"]
  6702. }
  6703. },
  6704. "required": ["type", "properties"]
  6705. },
  6706. "Event.session.error": {
  6707. "type": "object",
  6708. "properties": {
  6709. "type": {
  6710. "type": "string",
  6711. "const": "session.error"
  6712. },
  6713. "properties": {
  6714. "type": "object",
  6715. "properties": {
  6716. "sessionID": {
  6717. "type": "string"
  6718. },
  6719. "error": {
  6720. "anyOf": [
  6721. {
  6722. "$ref": "#/components/schemas/ProviderAuthError"
  6723. },
  6724. {
  6725. "$ref": "#/components/schemas/UnknownError"
  6726. },
  6727. {
  6728. "$ref": "#/components/schemas/MessageOutputLengthError"
  6729. },
  6730. {
  6731. "$ref": "#/components/schemas/MessageAbortedError"
  6732. },
  6733. {
  6734. "$ref": "#/components/schemas/APIError"
  6735. }
  6736. ]
  6737. }
  6738. }
  6739. }
  6740. },
  6741. "required": ["type", "properties"]
  6742. },
  6743. "Event.file.watcher.updated": {
  6744. "type": "object",
  6745. "properties": {
  6746. "type": {
  6747. "type": "string",
  6748. "const": "file.watcher.updated"
  6749. },
  6750. "properties": {
  6751. "type": "object",
  6752. "properties": {
  6753. "file": {
  6754. "type": "string"
  6755. },
  6756. "event": {
  6757. "anyOf": [
  6758. {
  6759. "type": "string",
  6760. "const": "add"
  6761. },
  6762. {
  6763. "type": "string",
  6764. "const": "change"
  6765. },
  6766. {
  6767. "type": "string",
  6768. "const": "unlink"
  6769. }
  6770. ]
  6771. }
  6772. },
  6773. "required": ["file", "event"]
  6774. }
  6775. },
  6776. "required": ["type", "properties"]
  6777. },
  6778. "Event.vcs.branch.updated": {
  6779. "type": "object",
  6780. "properties": {
  6781. "type": {
  6782. "type": "string",
  6783. "const": "vcs.branch.updated"
  6784. },
  6785. "properties": {
  6786. "type": "object",
  6787. "properties": {
  6788. "branch": {
  6789. "type": "string"
  6790. }
  6791. }
  6792. }
  6793. },
  6794. "required": ["type", "properties"]
  6795. },
  6796. "Event.tui.prompt.append": {
  6797. "type": "object",
  6798. "properties": {
  6799. "type": {
  6800. "type": "string",
  6801. "const": "tui.prompt.append"
  6802. },
  6803. "properties": {
  6804. "type": "object",
  6805. "properties": {
  6806. "text": {
  6807. "type": "string"
  6808. }
  6809. },
  6810. "required": ["text"]
  6811. }
  6812. },
  6813. "required": ["type", "properties"]
  6814. },
  6815. "Event.tui.command.execute": {
  6816. "type": "object",
  6817. "properties": {
  6818. "type": {
  6819. "type": "string",
  6820. "const": "tui.command.execute"
  6821. },
  6822. "properties": {
  6823. "type": "object",
  6824. "properties": {
  6825. "command": {
  6826. "anyOf": [
  6827. {
  6828. "type": "string",
  6829. "enum": [
  6830. "session.list",
  6831. "session.new",
  6832. "session.share",
  6833. "session.interrupt",
  6834. "session.compact",
  6835. "session.page.up",
  6836. "session.page.down",
  6837. "session.half.page.up",
  6838. "session.half.page.down",
  6839. "session.first",
  6840. "session.last",
  6841. "prompt.clear",
  6842. "prompt.submit",
  6843. "agent.cycle"
  6844. ]
  6845. },
  6846. {
  6847. "type": "string"
  6848. }
  6849. ]
  6850. }
  6851. },
  6852. "required": ["command"]
  6853. }
  6854. },
  6855. "required": ["type", "properties"]
  6856. },
  6857. "Event.tui.toast.show": {
  6858. "type": "object",
  6859. "properties": {
  6860. "type": {
  6861. "type": "string",
  6862. "const": "tui.toast.show"
  6863. },
  6864. "properties": {
  6865. "type": "object",
  6866. "properties": {
  6867. "title": {
  6868. "type": "string"
  6869. },
  6870. "message": {
  6871. "type": "string"
  6872. },
  6873. "variant": {
  6874. "type": "string",
  6875. "enum": ["info", "success", "warning", "error"]
  6876. },
  6877. "duration": {
  6878. "description": "Duration in milliseconds",
  6879. "default": 5000,
  6880. "type": "number"
  6881. }
  6882. },
  6883. "required": ["message", "variant"]
  6884. }
  6885. },
  6886. "required": ["type", "properties"]
  6887. },
  6888. "Pty": {
  6889. "type": "object",
  6890. "properties": {
  6891. "id": {
  6892. "type": "string",
  6893. "pattern": "^pty.*"
  6894. },
  6895. "title": {
  6896. "type": "string"
  6897. },
  6898. "command": {
  6899. "type": "string"
  6900. },
  6901. "args": {
  6902. "type": "array",
  6903. "items": {
  6904. "type": "string"
  6905. }
  6906. },
  6907. "cwd": {
  6908. "type": "string"
  6909. },
  6910. "status": {
  6911. "type": "string",
  6912. "enum": ["running", "exited"]
  6913. },
  6914. "pid": {
  6915. "type": "number"
  6916. }
  6917. },
  6918. "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
  6919. },
  6920. "Event.pty.created": {
  6921. "type": "object",
  6922. "properties": {
  6923. "type": {
  6924. "type": "string",
  6925. "const": "pty.created"
  6926. },
  6927. "properties": {
  6928. "type": "object",
  6929. "properties": {
  6930. "info": {
  6931. "$ref": "#/components/schemas/Pty"
  6932. }
  6933. },
  6934. "required": ["info"]
  6935. }
  6936. },
  6937. "required": ["type", "properties"]
  6938. },
  6939. "Event.pty.updated": {
  6940. "type": "object",
  6941. "properties": {
  6942. "type": {
  6943. "type": "string",
  6944. "const": "pty.updated"
  6945. },
  6946. "properties": {
  6947. "type": "object",
  6948. "properties": {
  6949. "info": {
  6950. "$ref": "#/components/schemas/Pty"
  6951. }
  6952. },
  6953. "required": ["info"]
  6954. }
  6955. },
  6956. "required": ["type", "properties"]
  6957. },
  6958. "Event.pty.exited": {
  6959. "type": "object",
  6960. "properties": {
  6961. "type": {
  6962. "type": "string",
  6963. "const": "pty.exited"
  6964. },
  6965. "properties": {
  6966. "type": "object",
  6967. "properties": {
  6968. "id": {
  6969. "type": "string",
  6970. "pattern": "^pty.*"
  6971. },
  6972. "exitCode": {
  6973. "type": "number"
  6974. }
  6975. },
  6976. "required": ["id", "exitCode"]
  6977. }
  6978. },
  6979. "required": ["type", "properties"]
  6980. },
  6981. "Event.pty.deleted": {
  6982. "type": "object",
  6983. "properties": {
  6984. "type": {
  6985. "type": "string",
  6986. "const": "pty.deleted"
  6987. },
  6988. "properties": {
  6989. "type": "object",
  6990. "properties": {
  6991. "id": {
  6992. "type": "string",
  6993. "pattern": "^pty.*"
  6994. }
  6995. },
  6996. "required": ["id"]
  6997. }
  6998. },
  6999. "required": ["type", "properties"]
  7000. },
  7001. "Event.server.connected": {
  7002. "type": "object",
  7003. "properties": {
  7004. "type": {
  7005. "type": "string",
  7006. "const": "server.connected"
  7007. },
  7008. "properties": {
  7009. "type": "object",
  7010. "properties": {}
  7011. }
  7012. },
  7013. "required": ["type", "properties"]
  7014. },
  7015. "Event.global.disposed": {
  7016. "type": "object",
  7017. "properties": {
  7018. "type": {
  7019. "type": "string",
  7020. "const": "global.disposed"
  7021. },
  7022. "properties": {
  7023. "type": "object",
  7024. "properties": {}
  7025. }
  7026. },
  7027. "required": ["type", "properties"]
  7028. },
  7029. "Event": {
  7030. "anyOf": [
  7031. {
  7032. "$ref": "#/components/schemas/Event.installation.updated"
  7033. },
  7034. {
  7035. "$ref": "#/components/schemas/Event.installation.update-available"
  7036. },
  7037. {
  7038. "$ref": "#/components/schemas/Event.project.updated"
  7039. },
  7040. {
  7041. "$ref": "#/components/schemas/Event.server.instance.disposed"
  7042. },
  7043. {
  7044. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  7045. },
  7046. {
  7047. "$ref": "#/components/schemas/Event.lsp.updated"
  7048. },
  7049. {
  7050. "$ref": "#/components/schemas/Event.message.updated"
  7051. },
  7052. {
  7053. "$ref": "#/components/schemas/Event.message.removed"
  7054. },
  7055. {
  7056. "$ref": "#/components/schemas/Event.message.part.updated"
  7057. },
  7058. {
  7059. "$ref": "#/components/schemas/Event.message.part.removed"
  7060. },
  7061. {
  7062. "$ref": "#/components/schemas/Event.permission.updated"
  7063. },
  7064. {
  7065. "$ref": "#/components/schemas/Event.permission.replied"
  7066. },
  7067. {
  7068. "$ref": "#/components/schemas/Event.file.edited"
  7069. },
  7070. {
  7071. "$ref": "#/components/schemas/Event.todo.updated"
  7072. },
  7073. {
  7074. "$ref": "#/components/schemas/Event.session.status"
  7075. },
  7076. {
  7077. "$ref": "#/components/schemas/Event.session.idle"
  7078. },
  7079. {
  7080. "$ref": "#/components/schemas/Event.session.compacted"
  7081. },
  7082. {
  7083. "$ref": "#/components/schemas/Event.command.executed"
  7084. },
  7085. {
  7086. "$ref": "#/components/schemas/Event.session.created"
  7087. },
  7088. {
  7089. "$ref": "#/components/schemas/Event.session.updated"
  7090. },
  7091. {
  7092. "$ref": "#/components/schemas/Event.session.deleted"
  7093. },
  7094. {
  7095. "$ref": "#/components/schemas/Event.session.diff"
  7096. },
  7097. {
  7098. "$ref": "#/components/schemas/Event.session.error"
  7099. },
  7100. {
  7101. "$ref": "#/components/schemas/Event.file.watcher.updated"
  7102. },
  7103. {
  7104. "$ref": "#/components/schemas/Event.vcs.branch.updated"
  7105. },
  7106. {
  7107. "$ref": "#/components/schemas/Event.tui.prompt.append"
  7108. },
  7109. {
  7110. "$ref": "#/components/schemas/Event.tui.command.execute"
  7111. },
  7112. {
  7113. "$ref": "#/components/schemas/Event.tui.toast.show"
  7114. },
  7115. {
  7116. "$ref": "#/components/schemas/Event.pty.created"
  7117. },
  7118. {
  7119. "$ref": "#/components/schemas/Event.pty.updated"
  7120. },
  7121. {
  7122. "$ref": "#/components/schemas/Event.pty.exited"
  7123. },
  7124. {
  7125. "$ref": "#/components/schemas/Event.pty.deleted"
  7126. },
  7127. {
  7128. "$ref": "#/components/schemas/Event.server.connected"
  7129. },
  7130. {
  7131. "$ref": "#/components/schemas/Event.global.disposed"
  7132. }
  7133. ]
  7134. },
  7135. "GlobalEvent": {
  7136. "type": "object",
  7137. "properties": {
  7138. "directory": {
  7139. "type": "string"
  7140. },
  7141. "payload": {
  7142. "$ref": "#/components/schemas/Event"
  7143. }
  7144. },
  7145. "required": ["directory", "payload"]
  7146. },
  7147. "BadRequestError": {
  7148. "type": "object",
  7149. "properties": {
  7150. "data": {},
  7151. "errors": {
  7152. "type": "array",
  7153. "items": {
  7154. "type": "object",
  7155. "propertyNames": {
  7156. "type": "string"
  7157. },
  7158. "additionalProperties": {}
  7159. }
  7160. },
  7161. "success": {
  7162. "type": "boolean",
  7163. "const": false
  7164. }
  7165. },
  7166. "required": ["data", "errors", "success"]
  7167. },
  7168. "NotFoundError": {
  7169. "type": "object",
  7170. "properties": {
  7171. "name": {
  7172. "type": "string",
  7173. "const": "NotFoundError"
  7174. },
  7175. "data": {
  7176. "type": "object",
  7177. "properties": {
  7178. "message": {
  7179. "type": "string"
  7180. }
  7181. },
  7182. "required": ["message"]
  7183. }
  7184. },
  7185. "required": ["name", "data"]
  7186. },
  7187. "KeybindsConfig": {
  7188. "description": "Custom keybind configurations",
  7189. "type": "object",
  7190. "properties": {
  7191. "leader": {
  7192. "description": "Leader key for keybind combinations",
  7193. "default": "ctrl+x",
  7194. "type": "string"
  7195. },
  7196. "app_exit": {
  7197. "description": "Exit the application",
  7198. "default": "ctrl+c,ctrl+d,<leader>q",
  7199. "type": "string"
  7200. },
  7201. "editor_open": {
  7202. "description": "Open external editor",
  7203. "default": "<leader>e",
  7204. "type": "string"
  7205. },
  7206. "theme_list": {
  7207. "description": "List available themes",
  7208. "default": "<leader>t",
  7209. "type": "string"
  7210. },
  7211. "sidebar_toggle": {
  7212. "description": "Toggle sidebar",
  7213. "default": "<leader>b",
  7214. "type": "string"
  7215. },
  7216. "scrollbar_toggle": {
  7217. "description": "Toggle session scrollbar",
  7218. "default": "none",
  7219. "type": "string"
  7220. },
  7221. "username_toggle": {
  7222. "description": "Toggle username visibility",
  7223. "default": "none",
  7224. "type": "string"
  7225. },
  7226. "status_view": {
  7227. "description": "View status",
  7228. "default": "<leader>s",
  7229. "type": "string"
  7230. },
  7231. "session_export": {
  7232. "description": "Export session to editor",
  7233. "default": "<leader>x",
  7234. "type": "string"
  7235. },
  7236. "session_new": {
  7237. "description": "Create a new session",
  7238. "default": "<leader>n",
  7239. "type": "string"
  7240. },
  7241. "session_list": {
  7242. "description": "List all sessions",
  7243. "default": "<leader>l",
  7244. "type": "string"
  7245. },
  7246. "session_timeline": {
  7247. "description": "Show session timeline",
  7248. "default": "<leader>g",
  7249. "type": "string"
  7250. },
  7251. "session_fork": {
  7252. "description": "Fork session from message",
  7253. "default": "none",
  7254. "type": "string"
  7255. },
  7256. "session_rename": {
  7257. "description": "Rename session",
  7258. "default": "none",
  7259. "type": "string"
  7260. },
  7261. "session_share": {
  7262. "description": "Share current session",
  7263. "default": "none",
  7264. "type": "string"
  7265. },
  7266. "session_unshare": {
  7267. "description": "Unshare current session",
  7268. "default": "none",
  7269. "type": "string"
  7270. },
  7271. "session_interrupt": {
  7272. "description": "Interrupt current session",
  7273. "default": "escape",
  7274. "type": "string"
  7275. },
  7276. "session_compact": {
  7277. "description": "Compact the session",
  7278. "default": "<leader>c",
  7279. "type": "string"
  7280. },
  7281. "messages_page_up": {
  7282. "description": "Scroll messages up by one page",
  7283. "default": "pageup",
  7284. "type": "string"
  7285. },
  7286. "messages_page_down": {
  7287. "description": "Scroll messages down by one page",
  7288. "default": "pagedown",
  7289. "type": "string"
  7290. },
  7291. "messages_half_page_up": {
  7292. "description": "Scroll messages up by half page",
  7293. "default": "ctrl+alt+u",
  7294. "type": "string"
  7295. },
  7296. "messages_half_page_down": {
  7297. "description": "Scroll messages down by half page",
  7298. "default": "ctrl+alt+d",
  7299. "type": "string"
  7300. },
  7301. "messages_first": {
  7302. "description": "Navigate to first message",
  7303. "default": "ctrl+g,home",
  7304. "type": "string"
  7305. },
  7306. "messages_last": {
  7307. "description": "Navigate to last message",
  7308. "default": "ctrl+alt+g,end",
  7309. "type": "string"
  7310. },
  7311. "messages_next": {
  7312. "description": "Navigate to next message",
  7313. "default": "none",
  7314. "type": "string"
  7315. },
  7316. "messages_previous": {
  7317. "description": "Navigate to previous message",
  7318. "default": "none",
  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. "session_parent": {
  7602. "description": "Go to parent session",
  7603. "default": "<leader>up",
  7604. "type": "string"
  7605. },
  7606. "terminal_suspend": {
  7607. "description": "Suspend terminal",
  7608. "default": "ctrl+z",
  7609. "type": "string"
  7610. },
  7611. "terminal_title_toggle": {
  7612. "description": "Toggle terminal title",
  7613. "default": "none",
  7614. "type": "string"
  7615. }
  7616. },
  7617. "additionalProperties": false
  7618. },
  7619. "AgentConfig": {
  7620. "type": "object",
  7621. "properties": {
  7622. "model": {
  7623. "type": "string"
  7624. },
  7625. "temperature": {
  7626. "type": "number"
  7627. },
  7628. "top_p": {
  7629. "type": "number"
  7630. },
  7631. "prompt": {
  7632. "type": "string"
  7633. },
  7634. "tools": {
  7635. "type": "object",
  7636. "propertyNames": {
  7637. "type": "string"
  7638. },
  7639. "additionalProperties": {
  7640. "type": "boolean"
  7641. }
  7642. },
  7643. "disable": {
  7644. "type": "boolean"
  7645. },
  7646. "description": {
  7647. "description": "Description of when to use the agent",
  7648. "type": "string"
  7649. },
  7650. "mode": {
  7651. "type": "string",
  7652. "enum": ["subagent", "primary", "all"]
  7653. },
  7654. "color": {
  7655. "description": "Hex color code for the agent (e.g., #FF5733)",
  7656. "type": "string",
  7657. "pattern": "^#[0-9a-fA-F]{6}$"
  7658. },
  7659. "maxSteps": {
  7660. "description": "Maximum number of agentic iterations before forcing text-only response",
  7661. "type": "integer",
  7662. "exclusiveMinimum": 0,
  7663. "maximum": 9007199254740991
  7664. },
  7665. "permission": {
  7666. "type": "object",
  7667. "properties": {
  7668. "edit": {
  7669. "type": "string",
  7670. "enum": ["ask", "allow", "deny"]
  7671. },
  7672. "bash": {
  7673. "anyOf": [
  7674. {
  7675. "type": "string",
  7676. "enum": ["ask", "allow", "deny"]
  7677. },
  7678. {
  7679. "type": "object",
  7680. "propertyNames": {
  7681. "type": "string"
  7682. },
  7683. "additionalProperties": {
  7684. "type": "string",
  7685. "enum": ["ask", "allow", "deny"]
  7686. }
  7687. }
  7688. ]
  7689. },
  7690. "skill": {
  7691. "anyOf": [
  7692. {
  7693. "type": "string",
  7694. "enum": ["ask", "allow", "deny"]
  7695. },
  7696. {
  7697. "type": "object",
  7698. "propertyNames": {
  7699. "type": "string"
  7700. },
  7701. "additionalProperties": {
  7702. "type": "string",
  7703. "enum": ["ask", "allow", "deny"]
  7704. }
  7705. }
  7706. ]
  7707. },
  7708. "webfetch": {
  7709. "type": "string",
  7710. "enum": ["ask", "allow", "deny"]
  7711. },
  7712. "doom_loop": {
  7713. "type": "string",
  7714. "enum": ["ask", "allow", "deny"]
  7715. },
  7716. "external_directory": {
  7717. "type": "string",
  7718. "enum": ["ask", "allow", "deny"]
  7719. }
  7720. }
  7721. }
  7722. },
  7723. "additionalProperties": {}
  7724. },
  7725. "ProviderConfig": {
  7726. "type": "object",
  7727. "properties": {
  7728. "api": {
  7729. "type": "string"
  7730. },
  7731. "name": {
  7732. "type": "string"
  7733. },
  7734. "env": {
  7735. "type": "array",
  7736. "items": {
  7737. "type": "string"
  7738. }
  7739. },
  7740. "id": {
  7741. "type": "string"
  7742. },
  7743. "npm": {
  7744. "type": "string"
  7745. },
  7746. "models": {
  7747. "type": "object",
  7748. "propertyNames": {
  7749. "type": "string"
  7750. },
  7751. "additionalProperties": {
  7752. "type": "object",
  7753. "properties": {
  7754. "id": {
  7755. "type": "string"
  7756. },
  7757. "name": {
  7758. "type": "string"
  7759. },
  7760. "family": {
  7761. "type": "string"
  7762. },
  7763. "release_date": {
  7764. "type": "string"
  7765. },
  7766. "attachment": {
  7767. "type": "boolean"
  7768. },
  7769. "reasoning": {
  7770. "type": "boolean"
  7771. },
  7772. "temperature": {
  7773. "type": "boolean"
  7774. },
  7775. "tool_call": {
  7776. "type": "boolean"
  7777. },
  7778. "interleaved": {
  7779. "anyOf": [
  7780. {
  7781. "type": "boolean",
  7782. "const": true
  7783. },
  7784. {
  7785. "type": "object",
  7786. "properties": {
  7787. "field": {
  7788. "type": "string",
  7789. "enum": ["reasoning_content", "reasoning_details"]
  7790. }
  7791. },
  7792. "required": ["field"],
  7793. "additionalProperties": false
  7794. }
  7795. ]
  7796. },
  7797. "cost": {
  7798. "type": "object",
  7799. "properties": {
  7800. "input": {
  7801. "type": "number"
  7802. },
  7803. "output": {
  7804. "type": "number"
  7805. },
  7806. "cache_read": {
  7807. "type": "number"
  7808. },
  7809. "cache_write": {
  7810. "type": "number"
  7811. },
  7812. "context_over_200k": {
  7813. "type": "object",
  7814. "properties": {
  7815. "input": {
  7816. "type": "number"
  7817. },
  7818. "output": {
  7819. "type": "number"
  7820. },
  7821. "cache_read": {
  7822. "type": "number"
  7823. },
  7824. "cache_write": {
  7825. "type": "number"
  7826. }
  7827. },
  7828. "required": ["input", "output"]
  7829. }
  7830. },
  7831. "required": ["input", "output"]
  7832. },
  7833. "limit": {
  7834. "type": "object",
  7835. "properties": {
  7836. "context": {
  7837. "type": "number"
  7838. },
  7839. "output": {
  7840. "type": "number"
  7841. }
  7842. },
  7843. "required": ["context", "output"]
  7844. },
  7845. "modalities": {
  7846. "type": "object",
  7847. "properties": {
  7848. "input": {
  7849. "type": "array",
  7850. "items": {
  7851. "type": "string",
  7852. "enum": ["text", "audio", "image", "video", "pdf"]
  7853. }
  7854. },
  7855. "output": {
  7856. "type": "array",
  7857. "items": {
  7858. "type": "string",
  7859. "enum": ["text", "audio", "image", "video", "pdf"]
  7860. }
  7861. }
  7862. },
  7863. "required": ["input", "output"]
  7864. },
  7865. "experimental": {
  7866. "type": "boolean"
  7867. },
  7868. "status": {
  7869. "type": "string",
  7870. "enum": ["alpha", "beta", "deprecated"]
  7871. },
  7872. "options": {
  7873. "type": "object",
  7874. "propertyNames": {
  7875. "type": "string"
  7876. },
  7877. "additionalProperties": {}
  7878. },
  7879. "headers": {
  7880. "type": "object",
  7881. "propertyNames": {
  7882. "type": "string"
  7883. },
  7884. "additionalProperties": {
  7885. "type": "string"
  7886. }
  7887. },
  7888. "provider": {
  7889. "type": "object",
  7890. "properties": {
  7891. "npm": {
  7892. "type": "string"
  7893. }
  7894. },
  7895. "required": ["npm"]
  7896. }
  7897. }
  7898. }
  7899. },
  7900. "whitelist": {
  7901. "type": "array",
  7902. "items": {
  7903. "type": "string"
  7904. }
  7905. },
  7906. "blacklist": {
  7907. "type": "array",
  7908. "items": {
  7909. "type": "string"
  7910. }
  7911. },
  7912. "options": {
  7913. "type": "object",
  7914. "properties": {
  7915. "apiKey": {
  7916. "type": "string"
  7917. },
  7918. "baseURL": {
  7919. "type": "string"
  7920. },
  7921. "enterpriseUrl": {
  7922. "description": "GitHub Enterprise URL for copilot authentication",
  7923. "type": "string"
  7924. },
  7925. "setCacheKey": {
  7926. "description": "Enable promptCacheKey for this provider (default false)",
  7927. "type": "boolean"
  7928. },
  7929. "timeout": {
  7930. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  7931. "anyOf": [
  7932. {
  7933. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  7934. "type": "integer",
  7935. "exclusiveMinimum": 0,
  7936. "maximum": 9007199254740991
  7937. },
  7938. {
  7939. "description": "Disable timeout for this provider entirely.",
  7940. "type": "boolean",
  7941. "const": false
  7942. }
  7943. ]
  7944. }
  7945. },
  7946. "additionalProperties": {}
  7947. }
  7948. },
  7949. "additionalProperties": false
  7950. },
  7951. "McpLocalConfig": {
  7952. "type": "object",
  7953. "properties": {
  7954. "type": {
  7955. "description": "Type of MCP server connection",
  7956. "type": "string",
  7957. "const": "local"
  7958. },
  7959. "command": {
  7960. "description": "Command and arguments to run the MCP server",
  7961. "type": "array",
  7962. "items": {
  7963. "type": "string"
  7964. }
  7965. },
  7966. "environment": {
  7967. "description": "Environment variables to set when running the MCP server",
  7968. "type": "object",
  7969. "propertyNames": {
  7970. "type": "string"
  7971. },
  7972. "additionalProperties": {
  7973. "type": "string"
  7974. }
  7975. },
  7976. "enabled": {
  7977. "description": "Enable or disable the MCP server on startup",
  7978. "type": "boolean"
  7979. },
  7980. "timeout": {
  7981. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  7982. "type": "integer",
  7983. "exclusiveMinimum": 0,
  7984. "maximum": 9007199254740991
  7985. }
  7986. },
  7987. "required": ["type", "command"],
  7988. "additionalProperties": false
  7989. },
  7990. "McpOAuthConfig": {
  7991. "type": "object",
  7992. "properties": {
  7993. "clientId": {
  7994. "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
  7995. "type": "string"
  7996. },
  7997. "clientSecret": {
  7998. "description": "OAuth client secret (if required by the authorization server)",
  7999. "type": "string"
  8000. },
  8001. "scope": {
  8002. "description": "OAuth scopes to request during authorization",
  8003. "type": "string"
  8004. }
  8005. },
  8006. "additionalProperties": false
  8007. },
  8008. "McpRemoteConfig": {
  8009. "type": "object",
  8010. "properties": {
  8011. "type": {
  8012. "description": "Type of MCP server connection",
  8013. "type": "string",
  8014. "const": "remote"
  8015. },
  8016. "url": {
  8017. "description": "URL of the remote MCP server",
  8018. "type": "string"
  8019. },
  8020. "enabled": {
  8021. "description": "Enable or disable the MCP server on startup",
  8022. "type": "boolean"
  8023. },
  8024. "headers": {
  8025. "description": "Headers to send with the request",
  8026. "type": "object",
  8027. "propertyNames": {
  8028. "type": "string"
  8029. },
  8030. "additionalProperties": {
  8031. "type": "string"
  8032. }
  8033. },
  8034. "oauth": {
  8035. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
  8036. "anyOf": [
  8037. {
  8038. "$ref": "#/components/schemas/McpOAuthConfig"
  8039. },
  8040. {
  8041. "type": "boolean",
  8042. "const": false
  8043. }
  8044. ]
  8045. },
  8046. "timeout": {
  8047. "description": "Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.",
  8048. "type": "integer",
  8049. "exclusiveMinimum": 0,
  8050. "maximum": 9007199254740991
  8051. }
  8052. },
  8053. "required": ["type", "url"],
  8054. "additionalProperties": false
  8055. },
  8056. "LayoutConfig": {
  8057. "description": "@deprecated Always uses stretch layout.",
  8058. "type": "string",
  8059. "enum": ["auto", "stretch"]
  8060. },
  8061. "Config": {
  8062. "type": "object",
  8063. "properties": {
  8064. "$schema": {
  8065. "description": "JSON schema reference for configuration validation",
  8066. "type": "string"
  8067. },
  8068. "theme": {
  8069. "description": "Theme name to use for the interface",
  8070. "type": "string"
  8071. },
  8072. "keybinds": {
  8073. "$ref": "#/components/schemas/KeybindsConfig"
  8074. },
  8075. "tui": {
  8076. "description": "TUI specific settings",
  8077. "type": "object",
  8078. "properties": {
  8079. "scroll_speed": {
  8080. "description": "TUI scroll speed",
  8081. "type": "number",
  8082. "minimum": 0.001
  8083. },
  8084. "scroll_acceleration": {
  8085. "description": "Scroll acceleration settings",
  8086. "type": "object",
  8087. "properties": {
  8088. "enabled": {
  8089. "description": "Enable scroll acceleration",
  8090. "type": "boolean"
  8091. }
  8092. },
  8093. "required": ["enabled"]
  8094. },
  8095. "diff_style": {
  8096. "description": "Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column",
  8097. "type": "string",
  8098. "enum": ["auto", "stacked"]
  8099. }
  8100. }
  8101. },
  8102. "command": {
  8103. "description": "Command configuration, see https://opencode.ai/docs/commands",
  8104. "type": "object",
  8105. "propertyNames": {
  8106. "type": "string"
  8107. },
  8108. "additionalProperties": {
  8109. "type": "object",
  8110. "properties": {
  8111. "template": {
  8112. "type": "string"
  8113. },
  8114. "description": {
  8115. "type": "string"
  8116. },
  8117. "agent": {
  8118. "type": "string"
  8119. },
  8120. "model": {
  8121. "type": "string"
  8122. },
  8123. "subtask": {
  8124. "type": "boolean"
  8125. }
  8126. },
  8127. "required": ["template"]
  8128. }
  8129. },
  8130. "watcher": {
  8131. "type": "object",
  8132. "properties": {
  8133. "ignore": {
  8134. "type": "array",
  8135. "items": {
  8136. "type": "string"
  8137. }
  8138. }
  8139. }
  8140. },
  8141. "plugin": {
  8142. "type": "array",
  8143. "items": {
  8144. "type": "string"
  8145. }
  8146. },
  8147. "snapshot": {
  8148. "type": "boolean"
  8149. },
  8150. "share": {
  8151. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  8152. "type": "string",
  8153. "enum": ["manual", "auto", "disabled"]
  8154. },
  8155. "autoshare": {
  8156. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  8157. "type": "boolean"
  8158. },
  8159. "autoupdate": {
  8160. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
  8161. "anyOf": [
  8162. {
  8163. "type": "boolean"
  8164. },
  8165. {
  8166. "type": "string",
  8167. "const": "notify"
  8168. }
  8169. ]
  8170. },
  8171. "disabled_providers": {
  8172. "description": "Disable providers that are loaded automatically",
  8173. "type": "array",
  8174. "items": {
  8175. "type": "string"
  8176. }
  8177. },
  8178. "enabled_providers": {
  8179. "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
  8180. "type": "array",
  8181. "items": {
  8182. "type": "string"
  8183. }
  8184. },
  8185. "model": {
  8186. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  8187. "type": "string"
  8188. },
  8189. "small_model": {
  8190. "description": "Small model to use for tasks like title generation in the format of provider/model",
  8191. "type": "string"
  8192. },
  8193. "default_agent": {
  8194. "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.",
  8195. "type": "string"
  8196. },
  8197. "username": {
  8198. "description": "Custom username to display in conversations instead of system username",
  8199. "type": "string"
  8200. },
  8201. "mode": {
  8202. "description": "@deprecated Use `agent` field instead.",
  8203. "type": "object",
  8204. "properties": {
  8205. "build": {
  8206. "$ref": "#/components/schemas/AgentConfig"
  8207. },
  8208. "plan": {
  8209. "$ref": "#/components/schemas/AgentConfig"
  8210. }
  8211. },
  8212. "additionalProperties": {
  8213. "$ref": "#/components/schemas/AgentConfig"
  8214. }
  8215. },
  8216. "agent": {
  8217. "description": "Agent configuration, see https://opencode.ai/docs/agent",
  8218. "type": "object",
  8219. "properties": {
  8220. "plan": {
  8221. "$ref": "#/components/schemas/AgentConfig"
  8222. },
  8223. "build": {
  8224. "$ref": "#/components/schemas/AgentConfig"
  8225. },
  8226. "general": {
  8227. "$ref": "#/components/schemas/AgentConfig"
  8228. },
  8229. "explore": {
  8230. "$ref": "#/components/schemas/AgentConfig"
  8231. },
  8232. "title": {
  8233. "$ref": "#/components/schemas/AgentConfig"
  8234. },
  8235. "summary": {
  8236. "$ref": "#/components/schemas/AgentConfig"
  8237. },
  8238. "compaction": {
  8239. "$ref": "#/components/schemas/AgentConfig"
  8240. }
  8241. },
  8242. "additionalProperties": {
  8243. "$ref": "#/components/schemas/AgentConfig"
  8244. }
  8245. },
  8246. "provider": {
  8247. "description": "Custom provider configurations and model overrides",
  8248. "type": "object",
  8249. "propertyNames": {
  8250. "type": "string"
  8251. },
  8252. "additionalProperties": {
  8253. "$ref": "#/components/schemas/ProviderConfig"
  8254. }
  8255. },
  8256. "mcp": {
  8257. "description": "MCP (Model Context Protocol) server configurations",
  8258. "type": "object",
  8259. "propertyNames": {
  8260. "type": "string"
  8261. },
  8262. "additionalProperties": {
  8263. "anyOf": [
  8264. {
  8265. "$ref": "#/components/schemas/McpLocalConfig"
  8266. },
  8267. {
  8268. "$ref": "#/components/schemas/McpRemoteConfig"
  8269. }
  8270. ]
  8271. }
  8272. },
  8273. "formatter": {
  8274. "anyOf": [
  8275. {
  8276. "type": "boolean",
  8277. "const": false
  8278. },
  8279. {
  8280. "type": "object",
  8281. "propertyNames": {
  8282. "type": "string"
  8283. },
  8284. "additionalProperties": {
  8285. "type": "object",
  8286. "properties": {
  8287. "disabled": {
  8288. "type": "boolean"
  8289. },
  8290. "command": {
  8291. "type": "array",
  8292. "items": {
  8293. "type": "string"
  8294. }
  8295. },
  8296. "environment": {
  8297. "type": "object",
  8298. "propertyNames": {
  8299. "type": "string"
  8300. },
  8301. "additionalProperties": {
  8302. "type": "string"
  8303. }
  8304. },
  8305. "extensions": {
  8306. "type": "array",
  8307. "items": {
  8308. "type": "string"
  8309. }
  8310. }
  8311. }
  8312. }
  8313. }
  8314. ]
  8315. },
  8316. "lsp": {
  8317. "anyOf": [
  8318. {
  8319. "type": "boolean",
  8320. "const": false
  8321. },
  8322. {
  8323. "type": "object",
  8324. "propertyNames": {
  8325. "type": "string"
  8326. },
  8327. "additionalProperties": {
  8328. "anyOf": [
  8329. {
  8330. "type": "object",
  8331. "properties": {
  8332. "disabled": {
  8333. "type": "boolean",
  8334. "const": true
  8335. }
  8336. },
  8337. "required": ["disabled"]
  8338. },
  8339. {
  8340. "type": "object",
  8341. "properties": {
  8342. "command": {
  8343. "type": "array",
  8344. "items": {
  8345. "type": "string"
  8346. }
  8347. },
  8348. "extensions": {
  8349. "type": "array",
  8350. "items": {
  8351. "type": "string"
  8352. }
  8353. },
  8354. "disabled": {
  8355. "type": "boolean"
  8356. },
  8357. "env": {
  8358. "type": "object",
  8359. "propertyNames": {
  8360. "type": "string"
  8361. },
  8362. "additionalProperties": {
  8363. "type": "string"
  8364. }
  8365. },
  8366. "initialization": {
  8367. "type": "object",
  8368. "propertyNames": {
  8369. "type": "string"
  8370. },
  8371. "additionalProperties": {}
  8372. }
  8373. },
  8374. "required": ["command"]
  8375. }
  8376. ]
  8377. }
  8378. }
  8379. ]
  8380. },
  8381. "instructions": {
  8382. "description": "Additional instruction files or patterns to include",
  8383. "type": "array",
  8384. "items": {
  8385. "type": "string"
  8386. }
  8387. },
  8388. "layout": {
  8389. "$ref": "#/components/schemas/LayoutConfig"
  8390. },
  8391. "permission": {
  8392. "type": "object",
  8393. "properties": {
  8394. "edit": {
  8395. "type": "string",
  8396. "enum": ["ask", "allow", "deny"]
  8397. },
  8398. "bash": {
  8399. "anyOf": [
  8400. {
  8401. "type": "string",
  8402. "enum": ["ask", "allow", "deny"]
  8403. },
  8404. {
  8405. "type": "object",
  8406. "propertyNames": {
  8407. "type": "string"
  8408. },
  8409. "additionalProperties": {
  8410. "type": "string",
  8411. "enum": ["ask", "allow", "deny"]
  8412. }
  8413. }
  8414. ]
  8415. },
  8416. "skill": {
  8417. "anyOf": [
  8418. {
  8419. "type": "string",
  8420. "enum": ["ask", "allow", "deny"]
  8421. },
  8422. {
  8423. "type": "object",
  8424. "propertyNames": {
  8425. "type": "string"
  8426. },
  8427. "additionalProperties": {
  8428. "type": "string",
  8429. "enum": ["ask", "allow", "deny"]
  8430. }
  8431. }
  8432. ]
  8433. },
  8434. "webfetch": {
  8435. "type": "string",
  8436. "enum": ["ask", "allow", "deny"]
  8437. },
  8438. "doom_loop": {
  8439. "type": "string",
  8440. "enum": ["ask", "allow", "deny"]
  8441. },
  8442. "external_directory": {
  8443. "type": "string",
  8444. "enum": ["ask", "allow", "deny"]
  8445. }
  8446. }
  8447. },
  8448. "tools": {
  8449. "type": "object",
  8450. "propertyNames": {
  8451. "type": "string"
  8452. },
  8453. "additionalProperties": {
  8454. "type": "boolean"
  8455. }
  8456. },
  8457. "enterprise": {
  8458. "type": "object",
  8459. "properties": {
  8460. "url": {
  8461. "description": "Enterprise URL",
  8462. "type": "string"
  8463. }
  8464. }
  8465. },
  8466. "experimental": {
  8467. "type": "object",
  8468. "properties": {
  8469. "hook": {
  8470. "type": "object",
  8471. "properties": {
  8472. "file_edited": {
  8473. "type": "object",
  8474. "propertyNames": {
  8475. "type": "string"
  8476. },
  8477. "additionalProperties": {
  8478. "type": "array",
  8479. "items": {
  8480. "type": "object",
  8481. "properties": {
  8482. "command": {
  8483. "type": "array",
  8484. "items": {
  8485. "type": "string"
  8486. }
  8487. },
  8488. "environment": {
  8489. "type": "object",
  8490. "propertyNames": {
  8491. "type": "string"
  8492. },
  8493. "additionalProperties": {
  8494. "type": "string"
  8495. }
  8496. }
  8497. },
  8498. "required": ["command"]
  8499. }
  8500. }
  8501. },
  8502. "session_completed": {
  8503. "type": "array",
  8504. "items": {
  8505. "type": "object",
  8506. "properties": {
  8507. "command": {
  8508. "type": "array",
  8509. "items": {
  8510. "type": "string"
  8511. }
  8512. },
  8513. "environment": {
  8514. "type": "object",
  8515. "propertyNames": {
  8516. "type": "string"
  8517. },
  8518. "additionalProperties": {
  8519. "type": "string"
  8520. }
  8521. }
  8522. },
  8523. "required": ["command"]
  8524. }
  8525. }
  8526. }
  8527. },
  8528. "chatMaxRetries": {
  8529. "description": "Number of retries for chat completions on failure",
  8530. "type": "number"
  8531. },
  8532. "disable_paste_summary": {
  8533. "type": "boolean"
  8534. },
  8535. "batch_tool": {
  8536. "description": "Enable the batch tool",
  8537. "type": "boolean"
  8538. },
  8539. "openTelemetry": {
  8540. "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
  8541. "type": "boolean"
  8542. },
  8543. "primary_tools": {
  8544. "description": "Tools that should only be available to primary agents.",
  8545. "type": "array",
  8546. "items": {
  8547. "type": "string"
  8548. }
  8549. },
  8550. "continue_loop_on_deny": {
  8551. "description": "Continue the agent loop when a tool call is denied",
  8552. "type": "boolean"
  8553. }
  8554. }
  8555. }
  8556. },
  8557. "additionalProperties": false
  8558. },
  8559. "ToolIDs": {
  8560. "type": "array",
  8561. "items": {
  8562. "type": "string"
  8563. }
  8564. },
  8565. "ToolListItem": {
  8566. "type": "object",
  8567. "properties": {
  8568. "id": {
  8569. "type": "string"
  8570. },
  8571. "description": {
  8572. "type": "string"
  8573. },
  8574. "parameters": {}
  8575. },
  8576. "required": ["id", "description", "parameters"]
  8577. },
  8578. "ToolList": {
  8579. "type": "array",
  8580. "items": {
  8581. "$ref": "#/components/schemas/ToolListItem"
  8582. }
  8583. },
  8584. "Path": {
  8585. "type": "object",
  8586. "properties": {
  8587. "home": {
  8588. "type": "string"
  8589. },
  8590. "state": {
  8591. "type": "string"
  8592. },
  8593. "config": {
  8594. "type": "string"
  8595. },
  8596. "worktree": {
  8597. "type": "string"
  8598. },
  8599. "directory": {
  8600. "type": "string"
  8601. }
  8602. },
  8603. "required": ["home", "state", "config", "worktree", "directory"]
  8604. },
  8605. "VcsInfo": {
  8606. "type": "object",
  8607. "properties": {
  8608. "branch": {
  8609. "type": "string"
  8610. }
  8611. },
  8612. "required": ["branch"]
  8613. },
  8614. "TextPartInput": {
  8615. "type": "object",
  8616. "properties": {
  8617. "id": {
  8618. "type": "string"
  8619. },
  8620. "type": {
  8621. "type": "string",
  8622. "const": "text"
  8623. },
  8624. "text": {
  8625. "type": "string"
  8626. },
  8627. "synthetic": {
  8628. "type": "boolean"
  8629. },
  8630. "ignored": {
  8631. "type": "boolean"
  8632. },
  8633. "time": {
  8634. "type": "object",
  8635. "properties": {
  8636. "start": {
  8637. "type": "number"
  8638. },
  8639. "end": {
  8640. "type": "number"
  8641. }
  8642. },
  8643. "required": ["start"]
  8644. },
  8645. "metadata": {
  8646. "type": "object",
  8647. "propertyNames": {
  8648. "type": "string"
  8649. },
  8650. "additionalProperties": {}
  8651. }
  8652. },
  8653. "required": ["type", "text"]
  8654. },
  8655. "FilePartInput": {
  8656. "type": "object",
  8657. "properties": {
  8658. "id": {
  8659. "type": "string"
  8660. },
  8661. "type": {
  8662. "type": "string",
  8663. "const": "file"
  8664. },
  8665. "mime": {
  8666. "type": "string"
  8667. },
  8668. "filename": {
  8669. "type": "string"
  8670. },
  8671. "url": {
  8672. "type": "string"
  8673. },
  8674. "source": {
  8675. "$ref": "#/components/schemas/FilePartSource"
  8676. }
  8677. },
  8678. "required": ["type", "mime", "url"]
  8679. },
  8680. "AgentPartInput": {
  8681. "type": "object",
  8682. "properties": {
  8683. "id": {
  8684. "type": "string"
  8685. },
  8686. "type": {
  8687. "type": "string",
  8688. "const": "agent"
  8689. },
  8690. "name": {
  8691. "type": "string"
  8692. },
  8693. "source": {
  8694. "type": "object",
  8695. "properties": {
  8696. "value": {
  8697. "type": "string"
  8698. },
  8699. "start": {
  8700. "type": "integer",
  8701. "minimum": -9007199254740991,
  8702. "maximum": 9007199254740991
  8703. },
  8704. "end": {
  8705. "type": "integer",
  8706. "minimum": -9007199254740991,
  8707. "maximum": 9007199254740991
  8708. }
  8709. },
  8710. "required": ["value", "start", "end"]
  8711. }
  8712. },
  8713. "required": ["type", "name"]
  8714. },
  8715. "SubtaskPartInput": {
  8716. "type": "object",
  8717. "properties": {
  8718. "id": {
  8719. "type": "string"
  8720. },
  8721. "type": {
  8722. "type": "string",
  8723. "const": "subtask"
  8724. },
  8725. "prompt": {
  8726. "type": "string"
  8727. },
  8728. "description": {
  8729. "type": "string"
  8730. },
  8731. "agent": {
  8732. "type": "string"
  8733. },
  8734. "command": {
  8735. "type": "string"
  8736. }
  8737. },
  8738. "required": ["type", "prompt", "description", "agent"]
  8739. },
  8740. "Command": {
  8741. "type": "object",
  8742. "properties": {
  8743. "name": {
  8744. "type": "string"
  8745. },
  8746. "description": {
  8747. "type": "string"
  8748. },
  8749. "agent": {
  8750. "type": "string"
  8751. },
  8752. "model": {
  8753. "type": "string"
  8754. },
  8755. "template": {
  8756. "type": "string"
  8757. },
  8758. "subtask": {
  8759. "type": "boolean"
  8760. }
  8761. },
  8762. "required": ["name", "template"]
  8763. },
  8764. "Model": {
  8765. "type": "object",
  8766. "properties": {
  8767. "id": {
  8768. "type": "string"
  8769. },
  8770. "providerID": {
  8771. "type": "string"
  8772. },
  8773. "api": {
  8774. "type": "object",
  8775. "properties": {
  8776. "id": {
  8777. "type": "string"
  8778. },
  8779. "url": {
  8780. "type": "string"
  8781. },
  8782. "npm": {
  8783. "type": "string"
  8784. }
  8785. },
  8786. "required": ["id", "url", "npm"]
  8787. },
  8788. "name": {
  8789. "type": "string"
  8790. },
  8791. "family": {
  8792. "type": "string"
  8793. },
  8794. "capabilities": {
  8795. "type": "object",
  8796. "properties": {
  8797. "temperature": {
  8798. "type": "boolean"
  8799. },
  8800. "reasoning": {
  8801. "type": "boolean"
  8802. },
  8803. "attachment": {
  8804. "type": "boolean"
  8805. },
  8806. "toolcall": {
  8807. "type": "boolean"
  8808. },
  8809. "input": {
  8810. "type": "object",
  8811. "properties": {
  8812. "text": {
  8813. "type": "boolean"
  8814. },
  8815. "audio": {
  8816. "type": "boolean"
  8817. },
  8818. "image": {
  8819. "type": "boolean"
  8820. },
  8821. "video": {
  8822. "type": "boolean"
  8823. },
  8824. "pdf": {
  8825. "type": "boolean"
  8826. }
  8827. },
  8828. "required": ["text", "audio", "image", "video", "pdf"]
  8829. },
  8830. "output": {
  8831. "type": "object",
  8832. "properties": {
  8833. "text": {
  8834. "type": "boolean"
  8835. },
  8836. "audio": {
  8837. "type": "boolean"
  8838. },
  8839. "image": {
  8840. "type": "boolean"
  8841. },
  8842. "video": {
  8843. "type": "boolean"
  8844. },
  8845. "pdf": {
  8846. "type": "boolean"
  8847. }
  8848. },
  8849. "required": ["text", "audio", "image", "video", "pdf"]
  8850. },
  8851. "interleaved": {
  8852. "anyOf": [
  8853. {
  8854. "type": "boolean"
  8855. },
  8856. {
  8857. "type": "object",
  8858. "properties": {
  8859. "field": {
  8860. "type": "string",
  8861. "enum": ["reasoning_content", "reasoning_details"]
  8862. }
  8863. },
  8864. "required": ["field"]
  8865. }
  8866. ]
  8867. }
  8868. },
  8869. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
  8870. },
  8871. "cost": {
  8872. "type": "object",
  8873. "properties": {
  8874. "input": {
  8875. "type": "number"
  8876. },
  8877. "output": {
  8878. "type": "number"
  8879. },
  8880. "cache": {
  8881. "type": "object",
  8882. "properties": {
  8883. "read": {
  8884. "type": "number"
  8885. },
  8886. "write": {
  8887. "type": "number"
  8888. }
  8889. },
  8890. "required": ["read", "write"]
  8891. },
  8892. "experimentalOver200K": {
  8893. "type": "object",
  8894. "properties": {
  8895. "input": {
  8896. "type": "number"
  8897. },
  8898. "output": {
  8899. "type": "number"
  8900. },
  8901. "cache": {
  8902. "type": "object",
  8903. "properties": {
  8904. "read": {
  8905. "type": "number"
  8906. },
  8907. "write": {
  8908. "type": "number"
  8909. }
  8910. },
  8911. "required": ["read", "write"]
  8912. }
  8913. },
  8914. "required": ["input", "output", "cache"]
  8915. }
  8916. },
  8917. "required": ["input", "output", "cache"]
  8918. },
  8919. "limit": {
  8920. "type": "object",
  8921. "properties": {
  8922. "context": {
  8923. "type": "number"
  8924. },
  8925. "output": {
  8926. "type": "number"
  8927. }
  8928. },
  8929. "required": ["context", "output"]
  8930. },
  8931. "status": {
  8932. "type": "string",
  8933. "enum": ["alpha", "beta", "deprecated", "active"]
  8934. },
  8935. "options": {
  8936. "type": "object",
  8937. "propertyNames": {
  8938. "type": "string"
  8939. },
  8940. "additionalProperties": {}
  8941. },
  8942. "headers": {
  8943. "type": "object",
  8944. "propertyNames": {
  8945. "type": "string"
  8946. },
  8947. "additionalProperties": {
  8948. "type": "string"
  8949. }
  8950. },
  8951. "release_date": {
  8952. "type": "string"
  8953. }
  8954. },
  8955. "required": [
  8956. "id",
  8957. "providerID",
  8958. "api",
  8959. "name",
  8960. "capabilities",
  8961. "cost",
  8962. "limit",
  8963. "status",
  8964. "options",
  8965. "headers",
  8966. "release_date"
  8967. ]
  8968. },
  8969. "Provider": {
  8970. "type": "object",
  8971. "properties": {
  8972. "id": {
  8973. "type": "string"
  8974. },
  8975. "name": {
  8976. "type": "string"
  8977. },
  8978. "source": {
  8979. "type": "string",
  8980. "enum": ["env", "config", "custom", "api"]
  8981. },
  8982. "env": {
  8983. "type": "array",
  8984. "items": {
  8985. "type": "string"
  8986. }
  8987. },
  8988. "key": {
  8989. "type": "string"
  8990. },
  8991. "options": {
  8992. "type": "object",
  8993. "propertyNames": {
  8994. "type": "string"
  8995. },
  8996. "additionalProperties": {}
  8997. },
  8998. "models": {
  8999. "type": "object",
  9000. "propertyNames": {
  9001. "type": "string"
  9002. },
  9003. "additionalProperties": {
  9004. "$ref": "#/components/schemas/Model"
  9005. }
  9006. }
  9007. },
  9008. "required": ["id", "name", "source", "env", "options", "models"]
  9009. },
  9010. "ProviderAuthMethod": {
  9011. "type": "object",
  9012. "properties": {
  9013. "type": {
  9014. "anyOf": [
  9015. {
  9016. "type": "string",
  9017. "const": "oauth"
  9018. },
  9019. {
  9020. "type": "string",
  9021. "const": "api"
  9022. }
  9023. ]
  9024. },
  9025. "label": {
  9026. "type": "string"
  9027. }
  9028. },
  9029. "required": ["type", "label"]
  9030. },
  9031. "ProviderAuthAuthorization": {
  9032. "type": "object",
  9033. "properties": {
  9034. "url": {
  9035. "type": "string"
  9036. },
  9037. "method": {
  9038. "anyOf": [
  9039. {
  9040. "type": "string",
  9041. "const": "auto"
  9042. },
  9043. {
  9044. "type": "string",
  9045. "const": "code"
  9046. }
  9047. ]
  9048. },
  9049. "instructions": {
  9050. "type": "string"
  9051. }
  9052. },
  9053. "required": ["url", "method", "instructions"]
  9054. },
  9055. "Symbol": {
  9056. "type": "object",
  9057. "properties": {
  9058. "name": {
  9059. "type": "string"
  9060. },
  9061. "kind": {
  9062. "type": "number"
  9063. },
  9064. "location": {
  9065. "type": "object",
  9066. "properties": {
  9067. "uri": {
  9068. "type": "string"
  9069. },
  9070. "range": {
  9071. "$ref": "#/components/schemas/Range"
  9072. }
  9073. },
  9074. "required": ["uri", "range"]
  9075. }
  9076. },
  9077. "required": ["name", "kind", "location"]
  9078. },
  9079. "FileNode": {
  9080. "type": "object",
  9081. "properties": {
  9082. "name": {
  9083. "type": "string"
  9084. },
  9085. "path": {
  9086. "type": "string"
  9087. },
  9088. "absolute": {
  9089. "type": "string"
  9090. },
  9091. "type": {
  9092. "type": "string",
  9093. "enum": ["file", "directory"]
  9094. },
  9095. "ignored": {
  9096. "type": "boolean"
  9097. }
  9098. },
  9099. "required": ["name", "path", "absolute", "type", "ignored"]
  9100. },
  9101. "FileContent": {
  9102. "type": "object",
  9103. "properties": {
  9104. "type": {
  9105. "type": "string",
  9106. "const": "text"
  9107. },
  9108. "content": {
  9109. "type": "string"
  9110. },
  9111. "diff": {
  9112. "type": "string"
  9113. },
  9114. "patch": {
  9115. "type": "object",
  9116. "properties": {
  9117. "oldFileName": {
  9118. "type": "string"
  9119. },
  9120. "newFileName": {
  9121. "type": "string"
  9122. },
  9123. "oldHeader": {
  9124. "type": "string"
  9125. },
  9126. "newHeader": {
  9127. "type": "string"
  9128. },
  9129. "hunks": {
  9130. "type": "array",
  9131. "items": {
  9132. "type": "object",
  9133. "properties": {
  9134. "oldStart": {
  9135. "type": "number"
  9136. },
  9137. "oldLines": {
  9138. "type": "number"
  9139. },
  9140. "newStart": {
  9141. "type": "number"
  9142. },
  9143. "newLines": {
  9144. "type": "number"
  9145. },
  9146. "lines": {
  9147. "type": "array",
  9148. "items": {
  9149. "type": "string"
  9150. }
  9151. }
  9152. },
  9153. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  9154. }
  9155. },
  9156. "index": {
  9157. "type": "string"
  9158. }
  9159. },
  9160. "required": ["oldFileName", "newFileName", "hunks"]
  9161. },
  9162. "encoding": {
  9163. "type": "string",
  9164. "const": "base64"
  9165. },
  9166. "mimeType": {
  9167. "type": "string"
  9168. }
  9169. },
  9170. "required": ["type", "content"]
  9171. },
  9172. "File": {
  9173. "type": "object",
  9174. "properties": {
  9175. "path": {
  9176. "type": "string"
  9177. },
  9178. "added": {
  9179. "type": "integer",
  9180. "minimum": -9007199254740991,
  9181. "maximum": 9007199254740991
  9182. },
  9183. "removed": {
  9184. "type": "integer",
  9185. "minimum": -9007199254740991,
  9186. "maximum": 9007199254740991
  9187. },
  9188. "status": {
  9189. "type": "string",
  9190. "enum": ["added", "deleted", "modified"]
  9191. }
  9192. },
  9193. "required": ["path", "added", "removed", "status"]
  9194. },
  9195. "Agent": {
  9196. "type": "object",
  9197. "properties": {
  9198. "name": {
  9199. "type": "string"
  9200. },
  9201. "description": {
  9202. "type": "string"
  9203. },
  9204. "mode": {
  9205. "type": "string",
  9206. "enum": ["subagent", "primary", "all"]
  9207. },
  9208. "native": {
  9209. "type": "boolean"
  9210. },
  9211. "hidden": {
  9212. "type": "boolean"
  9213. },
  9214. "default": {
  9215. "type": "boolean"
  9216. },
  9217. "topP": {
  9218. "type": "number"
  9219. },
  9220. "temperature": {
  9221. "type": "number"
  9222. },
  9223. "color": {
  9224. "type": "string"
  9225. },
  9226. "permission": {
  9227. "type": "object",
  9228. "properties": {
  9229. "edit": {
  9230. "type": "string",
  9231. "enum": ["ask", "allow", "deny"]
  9232. },
  9233. "bash": {
  9234. "type": "object",
  9235. "propertyNames": {
  9236. "type": "string"
  9237. },
  9238. "additionalProperties": {
  9239. "type": "string",
  9240. "enum": ["ask", "allow", "deny"]
  9241. }
  9242. },
  9243. "skill": {
  9244. "type": "object",
  9245. "propertyNames": {
  9246. "type": "string"
  9247. },
  9248. "additionalProperties": {
  9249. "type": "string",
  9250. "enum": ["ask", "allow", "deny"]
  9251. }
  9252. },
  9253. "webfetch": {
  9254. "type": "string",
  9255. "enum": ["ask", "allow", "deny"]
  9256. },
  9257. "doom_loop": {
  9258. "type": "string",
  9259. "enum": ["ask", "allow", "deny"]
  9260. },
  9261. "external_directory": {
  9262. "type": "string",
  9263. "enum": ["ask", "allow", "deny"]
  9264. }
  9265. },
  9266. "required": ["edit", "bash", "skill"]
  9267. },
  9268. "model": {
  9269. "type": "object",
  9270. "properties": {
  9271. "modelID": {
  9272. "type": "string"
  9273. },
  9274. "providerID": {
  9275. "type": "string"
  9276. }
  9277. },
  9278. "required": ["modelID", "providerID"]
  9279. },
  9280. "prompt": {
  9281. "type": "string"
  9282. },
  9283. "tools": {
  9284. "type": "object",
  9285. "propertyNames": {
  9286. "type": "string"
  9287. },
  9288. "additionalProperties": {
  9289. "type": "boolean"
  9290. }
  9291. },
  9292. "options": {
  9293. "type": "object",
  9294. "propertyNames": {
  9295. "type": "string"
  9296. },
  9297. "additionalProperties": {}
  9298. },
  9299. "maxSteps": {
  9300. "type": "integer",
  9301. "exclusiveMinimum": 0,
  9302. "maximum": 9007199254740991
  9303. }
  9304. },
  9305. "required": ["name", "mode", "permission", "tools", "options"]
  9306. },
  9307. "MCPStatusConnected": {
  9308. "type": "object",
  9309. "properties": {
  9310. "status": {
  9311. "type": "string",
  9312. "const": "connected"
  9313. }
  9314. },
  9315. "required": ["status"]
  9316. },
  9317. "MCPStatusDisabled": {
  9318. "type": "object",
  9319. "properties": {
  9320. "status": {
  9321. "type": "string",
  9322. "const": "disabled"
  9323. }
  9324. },
  9325. "required": ["status"]
  9326. },
  9327. "MCPStatusFailed": {
  9328. "type": "object",
  9329. "properties": {
  9330. "status": {
  9331. "type": "string",
  9332. "const": "failed"
  9333. },
  9334. "error": {
  9335. "type": "string"
  9336. }
  9337. },
  9338. "required": ["status", "error"]
  9339. },
  9340. "MCPStatusNeedsAuth": {
  9341. "type": "object",
  9342. "properties": {
  9343. "status": {
  9344. "type": "string",
  9345. "const": "needs_auth"
  9346. }
  9347. },
  9348. "required": ["status"]
  9349. },
  9350. "MCPStatusNeedsClientRegistration": {
  9351. "type": "object",
  9352. "properties": {
  9353. "status": {
  9354. "type": "string",
  9355. "const": "needs_client_registration"
  9356. },
  9357. "error": {
  9358. "type": "string"
  9359. }
  9360. },
  9361. "required": ["status", "error"]
  9362. },
  9363. "MCPStatus": {
  9364. "anyOf": [
  9365. {
  9366. "$ref": "#/components/schemas/MCPStatusConnected"
  9367. },
  9368. {
  9369. "$ref": "#/components/schemas/MCPStatusDisabled"
  9370. },
  9371. {
  9372. "$ref": "#/components/schemas/MCPStatusFailed"
  9373. },
  9374. {
  9375. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  9376. },
  9377. {
  9378. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  9379. }
  9380. ]
  9381. },
  9382. "LSPStatus": {
  9383. "type": "object",
  9384. "properties": {
  9385. "id": {
  9386. "type": "string"
  9387. },
  9388. "name": {
  9389. "type": "string"
  9390. },
  9391. "root": {
  9392. "type": "string"
  9393. },
  9394. "status": {
  9395. "anyOf": [
  9396. {
  9397. "type": "string",
  9398. "const": "connected"
  9399. },
  9400. {
  9401. "type": "string",
  9402. "const": "error"
  9403. }
  9404. ]
  9405. }
  9406. },
  9407. "required": ["id", "name", "root", "status"]
  9408. },
  9409. "FormatterStatus": {
  9410. "type": "object",
  9411. "properties": {
  9412. "name": {
  9413. "type": "string"
  9414. },
  9415. "extensions": {
  9416. "type": "array",
  9417. "items": {
  9418. "type": "string"
  9419. }
  9420. },
  9421. "enabled": {
  9422. "type": "boolean"
  9423. }
  9424. },
  9425. "required": ["name", "extensions", "enabled"]
  9426. },
  9427. "OAuth": {
  9428. "type": "object",
  9429. "properties": {
  9430. "type": {
  9431. "type": "string",
  9432. "const": "oauth"
  9433. },
  9434. "refresh": {
  9435. "type": "string"
  9436. },
  9437. "access": {
  9438. "type": "string"
  9439. },
  9440. "expires": {
  9441. "type": "number"
  9442. },
  9443. "enterpriseUrl": {
  9444. "type": "string"
  9445. }
  9446. },
  9447. "required": ["type", "refresh", "access", "expires"]
  9448. },
  9449. "ApiAuth": {
  9450. "type": "object",
  9451. "properties": {
  9452. "type": {
  9453. "type": "string",
  9454. "const": "api"
  9455. },
  9456. "key": {
  9457. "type": "string"
  9458. }
  9459. },
  9460. "required": ["type", "key"]
  9461. },
  9462. "WellKnownAuth": {
  9463. "type": "object",
  9464. "properties": {
  9465. "type": {
  9466. "type": "string",
  9467. "const": "wellknown"
  9468. },
  9469. "key": {
  9470. "type": "string"
  9471. },
  9472. "token": {
  9473. "type": "string"
  9474. }
  9475. },
  9476. "required": ["type", "key", "token"]
  9477. },
  9478. "Auth": {
  9479. "anyOf": [
  9480. {
  9481. "$ref": "#/components/schemas/OAuth"
  9482. },
  9483. {
  9484. "$ref": "#/components/schemas/ApiAuth"
  9485. },
  9486. {
  9487. "$ref": "#/components/schemas/WellKnownAuth"
  9488. }
  9489. ]
  9490. }
  9491. }
  9492. }
  9493. }