openapi.json 304 KB

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