openapi.json 267 KB

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