openapi.json 506 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "Bad request",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "$ref": "#/components/schemas/BadRequestError"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "description": "Set authentication credentials",
  47. "summary": "Set auth credentials",
  48. "requestBody": {
  49. "content": {
  50. "application/json": {
  51. "schema": {
  52. "$ref": "#/components/schemas/Auth"
  53. }
  54. }
  55. }
  56. },
  57. "x-codeSamples": [
  58. {
  59. "lang": "js",
  60. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  61. }
  62. ]
  63. },
  64. "delete": {
  65. "tags": ["control"],
  66. "operationId": "auth.remove",
  67. "parameters": [
  68. {
  69. "name": "providerID",
  70. "in": "path",
  71. "schema": {
  72. "type": "string"
  73. },
  74. "required": true
  75. }
  76. ],
  77. "responses": {
  78. "200": {
  79. "description": "Successfully removed authentication credentials",
  80. "content": {
  81. "application/json": {
  82. "schema": {
  83. "type": "boolean",
  84. "description": "Successfully removed authentication credentials"
  85. }
  86. }
  87. }
  88. },
  89. "400": {
  90. "description": "Bad request",
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "$ref": "#/components/schemas/BadRequestError"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "description": "Remove authentication credentials",
  101. "summary": "Remove auth credentials",
  102. "x-codeSamples": [
  103. {
  104. "lang": "js",
  105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  106. }
  107. ]
  108. }
  109. },
  110. "/log": {
  111. "post": {
  112. "tags": ["control"],
  113. "operationId": "app.log",
  114. "parameters": [
  115. {
  116. "name": "directory",
  117. "in": "query",
  118. "schema": {
  119. "type": "string"
  120. },
  121. "required": false
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "schema": {
  127. "type": "string"
  128. },
  129. "required": false
  130. }
  131. ],
  132. "responses": {
  133. "200": {
  134. "description": "Log entry written successfully",
  135. "content": {
  136. "application/json": {
  137. "schema": {
  138. "type": "boolean",
  139. "description": "Log entry written successfully"
  140. }
  141. }
  142. }
  143. },
  144. "400": {
  145. "description": "Bad request",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "#/components/schemas/BadRequestError"
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "description": "Write a log entry to the server logs with specified level and metadata.",
  156. "summary": "Write log",
  157. "requestBody": {
  158. "content": {
  159. "application/json": {
  160. "schema": {
  161. "type": "object",
  162. "properties": {
  163. "service": {
  164. "type": "string",
  165. "description": "Service name for the log entry"
  166. },
  167. "level": {
  168. "type": "string",
  169. "enum": ["debug", "info", "error", "warn"],
  170. "description": "Log level"
  171. },
  172. "message": {
  173. "type": "string",
  174. "description": "Log message"
  175. },
  176. "extra": {
  177. "type": "object"
  178. }
  179. },
  180. "required": ["service", "level", "message"],
  181. "additionalProperties": false
  182. }
  183. }
  184. }
  185. },
  186. "x-codeSamples": [
  187. {
  188. "lang": "js",
  189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  190. }
  191. ]
  192. }
  193. },
  194. "/global/health": {
  195. "get": {
  196. "tags": ["global"],
  197. "operationId": "global.health",
  198. "parameters": [],
  199. "responses": {
  200. "200": {
  201. "description": "Health information",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "properties": {
  207. "healthy": {
  208. "type": "boolean",
  209. "enum": [true]
  210. },
  211. "version": {
  212. "type": "string"
  213. }
  214. },
  215. "required": ["healthy", "version"],
  216. "additionalProperties": false,
  217. "description": "Health information"
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "description": "Get health information about the OpenCode server.",
  224. "summary": "Get health",
  225. "x-codeSamples": [
  226. {
  227. "lang": "js",
  228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  229. }
  230. ]
  231. }
  232. },
  233. "/global/event": {
  234. "get": {
  235. "tags": ["global"],
  236. "operationId": "global.event",
  237. "parameters": [],
  238. "responses": {
  239. "200": {
  240. "description": "Event stream",
  241. "content": {
  242. "text/event-stream": {
  243. "schema": {
  244. "$ref": "#/components/schemas/GlobalEvent"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  251. "summary": "Get global events",
  252. "x-codeSamples": [
  253. {
  254. "lang": "js",
  255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  256. }
  257. ]
  258. }
  259. },
  260. "/global/config": {
  261. "get": {
  262. "tags": ["global"],
  263. "operationId": "global.config.get",
  264. "parameters": [],
  265. "responses": {
  266. "200": {
  267. "description": "Get global config info",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "$ref": "#/components/schemas/Config"
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  278. "summary": "Get global configuration",
  279. "x-codeSamples": [
  280. {
  281. "lang": "js",
  282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  283. }
  284. ]
  285. },
  286. "patch": {
  287. "tags": ["global"],
  288. "operationId": "global.config.update",
  289. "parameters": [],
  290. "responses": {
  291. "200": {
  292. "description": "Successfully updated global config",
  293. "content": {
  294. "application/json": {
  295. "schema": {
  296. "$ref": "#/components/schemas/Config"
  297. }
  298. }
  299. }
  300. },
  301. "400": {
  302. "description": "Bad request",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "$ref": "#/components/schemas/BadRequestError"
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "description": "Update global OpenCode configuration settings and preferences.",
  313. "summary": "Update global configuration",
  314. "requestBody": {
  315. "content": {
  316. "application/json": {
  317. "schema": {
  318. "$ref": "#/components/schemas/Config"
  319. }
  320. }
  321. }
  322. },
  323. "x-codeSamples": [
  324. {
  325. "lang": "js",
  326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  327. }
  328. ]
  329. }
  330. },
  331. "/global/dispose": {
  332. "post": {
  333. "tags": ["global"],
  334. "operationId": "global.dispose",
  335. "parameters": [],
  336. "responses": {
  337. "200": {
  338. "description": "Global disposed",
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "boolean",
  343. "description": "Global disposed"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  350. "summary": "Dispose instance",
  351. "x-codeSamples": [
  352. {
  353. "lang": "js",
  354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  355. }
  356. ]
  357. }
  358. },
  359. "/global/upgrade": {
  360. "post": {
  361. "tags": ["global"],
  362. "operationId": "global.upgrade",
  363. "parameters": [],
  364. "responses": {
  365. "200": {
  366. "description": "Upgrade result",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "anyOf": [
  371. {
  372. "type": "object",
  373. "properties": {
  374. "success": {
  375. "type": "boolean",
  376. "enum": [true]
  377. },
  378. "version": {
  379. "type": "string"
  380. }
  381. },
  382. "required": ["success", "version"],
  383. "additionalProperties": false
  384. },
  385. {
  386. "type": "object",
  387. "properties": {
  388. "success": {
  389. "type": "boolean",
  390. "enum": [false]
  391. },
  392. "error": {
  393. "type": "string"
  394. }
  395. },
  396. "required": ["success", "error"],
  397. "additionalProperties": false
  398. }
  399. ],
  400. "description": "Upgrade result"
  401. }
  402. }
  403. }
  404. },
  405. "400": {
  406. "description": "Bad request",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "$ref": "#/components/schemas/BadRequestError"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "description": "Upgrade opencode to the specified version or latest if not specified.",
  417. "summary": "Upgrade opencode",
  418. "requestBody": {
  419. "content": {
  420. "application/json": {
  421. "schema": {
  422. "type": "object",
  423. "properties": {
  424. "target": {
  425. "type": "string"
  426. }
  427. },
  428. "additionalProperties": false
  429. }
  430. }
  431. }
  432. },
  433. "x-codeSamples": [
  434. {
  435. "lang": "js",
  436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  437. }
  438. ]
  439. }
  440. },
  441. "/event": {
  442. "get": {
  443. "tags": ["event"],
  444. "operationId": "event.subscribe",
  445. "parameters": [
  446. {
  447. "name": "directory",
  448. "in": "query",
  449. "schema": {
  450. "type": "string"
  451. },
  452. "required": false
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "schema": {
  458. "type": "string"
  459. },
  460. "required": false
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "Event stream",
  466. "content": {
  467. "text/event-stream": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Event"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "description": "Get events",
  476. "summary": "Subscribe to events",
  477. "x-codeSamples": [
  478. {
  479. "lang": "js",
  480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  481. }
  482. ]
  483. }
  484. },
  485. "/config": {
  486. "get": {
  487. "tags": ["config"],
  488. "operationId": "config.get",
  489. "parameters": [
  490. {
  491. "name": "directory",
  492. "in": "query",
  493. "schema": {
  494. "type": "string"
  495. },
  496. "required": false
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "schema": {
  502. "type": "string"
  503. },
  504. "required": false
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "Get config info",
  510. "content": {
  511. "application/json": {
  512. "schema": {
  513. "$ref": "#/components/schemas/Config"
  514. }
  515. }
  516. }
  517. }
  518. },
  519. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  520. "summary": "Get configuration",
  521. "x-codeSamples": [
  522. {
  523. "lang": "js",
  524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  525. }
  526. ]
  527. },
  528. "patch": {
  529. "tags": ["config"],
  530. "operationId": "config.update",
  531. "parameters": [
  532. {
  533. "name": "directory",
  534. "in": "query",
  535. "schema": {
  536. "type": "string"
  537. },
  538. "required": false
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "schema": {
  544. "type": "string"
  545. },
  546. "required": false
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "Successfully updated config",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "$ref": "#/components/schemas/Config"
  556. }
  557. }
  558. }
  559. },
  560. "400": {
  561. "description": "Bad request",
  562. "content": {
  563. "application/json": {
  564. "schema": {
  565. "$ref": "#/components/schemas/BadRequestError"
  566. }
  567. }
  568. }
  569. }
  570. },
  571. "description": "Update OpenCode configuration settings and preferences.",
  572. "summary": "Update configuration",
  573. "requestBody": {
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/Config"
  578. }
  579. }
  580. }
  581. },
  582. "x-codeSamples": [
  583. {
  584. "lang": "js",
  585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  586. }
  587. ]
  588. }
  589. },
  590. "/config/providers": {
  591. "get": {
  592. "tags": ["config"],
  593. "operationId": "config.providers",
  594. "parameters": [
  595. {
  596. "name": "directory",
  597. "in": "query",
  598. "schema": {
  599. "type": "string"
  600. },
  601. "required": false
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "schema": {
  607. "type": "string"
  608. },
  609. "required": false
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "List of providers",
  615. "content": {
  616. "application/json": {
  617. "schema": {
  618. "type": "object",
  619. "properties": {
  620. "providers": {
  621. "type": "array",
  622. "items": {
  623. "$ref": "#/components/schemas/Provider"
  624. }
  625. },
  626. "default": {
  627. "type": "object",
  628. "additionalProperties": {
  629. "type": "string"
  630. }
  631. }
  632. },
  633. "required": ["providers", "default"],
  634. "additionalProperties": false,
  635. "description": "List of providers"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "description": "Get a list of all configured AI providers and their default models.",
  642. "summary": "List config providers",
  643. "x-codeSamples": [
  644. {
  645. "lang": "js",
  646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  647. }
  648. ]
  649. }
  650. },
  651. "/experimental/console": {
  652. "get": {
  653. "tags": ["experimental"],
  654. "operationId": "experimental.console.get",
  655. "parameters": [
  656. {
  657. "name": "directory",
  658. "in": "query",
  659. "schema": {
  660. "type": "string"
  661. },
  662. "required": false
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "schema": {
  668. "type": "string"
  669. },
  670. "required": false
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "Active Console provider metadata",
  676. "content": {
  677. "application/json": {
  678. "schema": {
  679. "$ref": "#/components/schemas/ConsoleState"
  680. }
  681. }
  682. }
  683. },
  684. "500": {
  685. "description": "InternalServerError",
  686. "content": {
  687. "application/json": {
  688. "schema": {
  689. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  696. "summary": "Get active Console provider metadata",
  697. "x-codeSamples": [
  698. {
  699. "lang": "js",
  700. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  701. }
  702. ]
  703. }
  704. },
  705. "/experimental/console/orgs": {
  706. "get": {
  707. "tags": ["experimental"],
  708. "operationId": "experimental.console.listOrgs",
  709. "parameters": [
  710. {
  711. "name": "directory",
  712. "in": "query",
  713. "schema": {
  714. "type": "string"
  715. },
  716. "required": false
  717. },
  718. {
  719. "name": "workspace",
  720. "in": "query",
  721. "schema": {
  722. "type": "string"
  723. },
  724. "required": false
  725. }
  726. ],
  727. "responses": {
  728. "200": {
  729. "description": "Switchable Console orgs",
  730. "content": {
  731. "application/json": {
  732. "schema": {
  733. "type": "object",
  734. "properties": {
  735. "orgs": {
  736. "type": "array",
  737. "items": {
  738. "type": "object",
  739. "properties": {
  740. "accountID": {
  741. "type": "string"
  742. },
  743. "accountEmail": {
  744. "type": "string"
  745. },
  746. "accountUrl": {
  747. "type": "string"
  748. },
  749. "orgID": {
  750. "type": "string"
  751. },
  752. "orgName": {
  753. "type": "string"
  754. },
  755. "active": {
  756. "type": "boolean"
  757. }
  758. },
  759. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  760. "additionalProperties": false
  761. }
  762. }
  763. },
  764. "required": ["orgs"],
  765. "additionalProperties": false,
  766. "description": "Switchable Console orgs"
  767. }
  768. }
  769. }
  770. },
  771. "500": {
  772. "description": "InternalServerError",
  773. "content": {
  774. "application/json": {
  775. "schema": {
  776. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  777. }
  778. }
  779. }
  780. }
  781. },
  782. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  783. "summary": "List switchable Console orgs",
  784. "x-codeSamples": [
  785. {
  786. "lang": "js",
  787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  788. }
  789. ]
  790. }
  791. },
  792. "/experimental/console/switch": {
  793. "post": {
  794. "tags": ["experimental"],
  795. "operationId": "experimental.console.switchOrg",
  796. "parameters": [
  797. {
  798. "name": "directory",
  799. "in": "query",
  800. "schema": {
  801. "type": "string"
  802. },
  803. "required": false
  804. },
  805. {
  806. "name": "workspace",
  807. "in": "query",
  808. "schema": {
  809. "type": "string"
  810. },
  811. "required": false
  812. }
  813. ],
  814. "responses": {
  815. "200": {
  816. "description": "Switch success",
  817. "content": {
  818. "application/json": {
  819. "schema": {
  820. "type": "boolean",
  821. "description": "Switch success"
  822. }
  823. }
  824. }
  825. }
  826. },
  827. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  828. "summary": "Switch active Console org",
  829. "requestBody": {
  830. "content": {
  831. "application/json": {
  832. "schema": {
  833. "type": "object",
  834. "properties": {
  835. "accountID": {
  836. "type": "string"
  837. },
  838. "orgID": {
  839. "type": "string"
  840. }
  841. },
  842. "required": ["accountID", "orgID"],
  843. "additionalProperties": false
  844. }
  845. }
  846. }
  847. },
  848. "x-codeSamples": [
  849. {
  850. "lang": "js",
  851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  852. }
  853. ]
  854. }
  855. },
  856. "/experimental/tool": {
  857. "get": {
  858. "tags": ["experimental"],
  859. "operationId": "tool.list",
  860. "parameters": [
  861. {
  862. "name": "directory",
  863. "in": "query",
  864. "schema": {
  865. "type": "string"
  866. },
  867. "required": false
  868. },
  869. {
  870. "name": "workspace",
  871. "in": "query",
  872. "schema": {
  873. "type": "string"
  874. },
  875. "required": false
  876. },
  877. {
  878. "name": "provider",
  879. "in": "query",
  880. "schema": {
  881. "type": "string"
  882. },
  883. "required": true
  884. },
  885. {
  886. "name": "model",
  887. "in": "query",
  888. "schema": {
  889. "type": "string"
  890. },
  891. "required": true
  892. }
  893. ],
  894. "responses": {
  895. "200": {
  896. "description": "Tools",
  897. "content": {
  898. "application/json": {
  899. "schema": {
  900. "$ref": "#/components/schemas/ToolList"
  901. }
  902. }
  903. }
  904. },
  905. "400": {
  906. "description": "Bad request",
  907. "content": {
  908. "application/json": {
  909. "schema": {
  910. "$ref": "#/components/schemas/BadRequestError"
  911. }
  912. }
  913. }
  914. }
  915. },
  916. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  917. "summary": "List tools",
  918. "x-codeSamples": [
  919. {
  920. "lang": "js",
  921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  922. }
  923. ]
  924. }
  925. },
  926. "/experimental/tool/ids": {
  927. "get": {
  928. "tags": ["experimental"],
  929. "operationId": "tool.ids",
  930. "parameters": [
  931. {
  932. "name": "directory",
  933. "in": "query",
  934. "schema": {
  935. "type": "string"
  936. },
  937. "required": false
  938. },
  939. {
  940. "name": "workspace",
  941. "in": "query",
  942. "schema": {
  943. "type": "string"
  944. },
  945. "required": false
  946. }
  947. ],
  948. "responses": {
  949. "200": {
  950. "description": "Tool IDs",
  951. "content": {
  952. "application/json": {
  953. "schema": {
  954. "$ref": "#/components/schemas/ToolIDs"
  955. }
  956. }
  957. }
  958. },
  959. "400": {
  960. "description": "Bad request",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/BadRequestError"
  965. }
  966. }
  967. }
  968. }
  969. },
  970. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  971. "summary": "List tool IDs",
  972. "x-codeSamples": [
  973. {
  974. "lang": "js",
  975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  976. }
  977. ]
  978. }
  979. },
  980. "/experimental/worktree": {
  981. "get": {
  982. "tags": ["experimental"],
  983. "operationId": "worktree.list",
  984. "parameters": [
  985. {
  986. "name": "directory",
  987. "in": "query",
  988. "schema": {
  989. "type": "string"
  990. },
  991. "required": false
  992. },
  993. {
  994. "name": "workspace",
  995. "in": "query",
  996. "schema": {
  997. "type": "string"
  998. },
  999. "required": false
  1000. }
  1001. ],
  1002. "responses": {
  1003. "200": {
  1004. "description": "List of worktree directories",
  1005. "content": {
  1006. "application/json": {
  1007. "schema": {
  1008. "type": "array",
  1009. "items": {
  1010. "type": "string"
  1011. },
  1012. "description": "List of worktree directories"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "List all sandbox worktrees for the current project.",
  1019. "summary": "List worktrees",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1024. }
  1025. ]
  1026. },
  1027. "post": {
  1028. "tags": ["experimental"],
  1029. "operationId": "worktree.create",
  1030. "parameters": [
  1031. {
  1032. "name": "directory",
  1033. "in": "query",
  1034. "schema": {
  1035. "type": "string"
  1036. },
  1037. "required": false
  1038. },
  1039. {
  1040. "name": "workspace",
  1041. "in": "query",
  1042. "schema": {
  1043. "type": "string"
  1044. },
  1045. "required": false
  1046. }
  1047. ],
  1048. "responses": {
  1049. "200": {
  1050. "description": "Worktree created",
  1051. "content": {
  1052. "application/json": {
  1053. "schema": {
  1054. "$ref": "#/components/schemas/Worktree"
  1055. }
  1056. }
  1057. }
  1058. },
  1059. "400": {
  1060. "description": "Bad request",
  1061. "content": {
  1062. "application/json": {
  1063. "schema": {
  1064. "$ref": "#/components/schemas/BadRequestError"
  1065. }
  1066. }
  1067. }
  1068. }
  1069. },
  1070. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1071. "summary": "Create worktree",
  1072. "requestBody": {
  1073. "content": {
  1074. "application/json": {
  1075. "schema": {
  1076. "$ref": "#/components/schemas/WorktreeCreateInput"
  1077. }
  1078. }
  1079. }
  1080. },
  1081. "x-codeSamples": [
  1082. {
  1083. "lang": "js",
  1084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1085. }
  1086. ]
  1087. },
  1088. "delete": {
  1089. "tags": ["experimental"],
  1090. "operationId": "worktree.remove",
  1091. "parameters": [
  1092. {
  1093. "name": "directory",
  1094. "in": "query",
  1095. "schema": {
  1096. "type": "string"
  1097. },
  1098. "required": false
  1099. },
  1100. {
  1101. "name": "workspace",
  1102. "in": "query",
  1103. "schema": {
  1104. "type": "string"
  1105. },
  1106. "required": false
  1107. }
  1108. ],
  1109. "responses": {
  1110. "200": {
  1111. "description": "Worktree removed",
  1112. "content": {
  1113. "application/json": {
  1114. "schema": {
  1115. "type": "boolean",
  1116. "description": "Worktree removed"
  1117. }
  1118. }
  1119. }
  1120. },
  1121. "400": {
  1122. "description": "Bad request",
  1123. "content": {
  1124. "application/json": {
  1125. "schema": {
  1126. "$ref": "#/components/schemas/BadRequestError"
  1127. }
  1128. }
  1129. }
  1130. }
  1131. },
  1132. "description": "Remove a git worktree and delete its branch.",
  1133. "summary": "Remove worktree",
  1134. "requestBody": {
  1135. "content": {
  1136. "application/json": {
  1137. "schema": {
  1138. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1139. }
  1140. }
  1141. }
  1142. },
  1143. "x-codeSamples": [
  1144. {
  1145. "lang": "js",
  1146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1147. }
  1148. ]
  1149. }
  1150. },
  1151. "/experimental/worktree/reset": {
  1152. "post": {
  1153. "tags": ["experimental"],
  1154. "operationId": "worktree.reset",
  1155. "parameters": [
  1156. {
  1157. "name": "directory",
  1158. "in": "query",
  1159. "schema": {
  1160. "type": "string"
  1161. },
  1162. "required": false
  1163. },
  1164. {
  1165. "name": "workspace",
  1166. "in": "query",
  1167. "schema": {
  1168. "type": "string"
  1169. },
  1170. "required": false
  1171. }
  1172. ],
  1173. "responses": {
  1174. "200": {
  1175. "description": "Worktree reset",
  1176. "content": {
  1177. "application/json": {
  1178. "schema": {
  1179. "type": "boolean",
  1180. "description": "Worktree reset"
  1181. }
  1182. }
  1183. }
  1184. },
  1185. "400": {
  1186. "description": "Bad request",
  1187. "content": {
  1188. "application/json": {
  1189. "schema": {
  1190. "$ref": "#/components/schemas/BadRequestError"
  1191. }
  1192. }
  1193. }
  1194. }
  1195. },
  1196. "description": "Reset a worktree branch to the primary default branch.",
  1197. "summary": "Reset worktree",
  1198. "requestBody": {
  1199. "content": {
  1200. "application/json": {
  1201. "schema": {
  1202. "$ref": "#/components/schemas/WorktreeResetInput"
  1203. }
  1204. }
  1205. }
  1206. },
  1207. "x-codeSamples": [
  1208. {
  1209. "lang": "js",
  1210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1211. }
  1212. ]
  1213. }
  1214. },
  1215. "/experimental/session": {
  1216. "get": {
  1217. "tags": ["experimental"],
  1218. "operationId": "experimental.session.list",
  1219. "parameters": [
  1220. {
  1221. "name": "directory",
  1222. "in": "query",
  1223. "schema": {
  1224. "type": "string"
  1225. },
  1226. "required": false
  1227. },
  1228. {
  1229. "name": "workspace",
  1230. "in": "query",
  1231. "schema": {
  1232. "type": "string"
  1233. },
  1234. "required": false
  1235. },
  1236. {
  1237. "name": "roots",
  1238. "in": "query",
  1239. "schema": {
  1240. "anyOf": [
  1241. {
  1242. "type": "boolean"
  1243. },
  1244. {
  1245. "type": "string",
  1246. "enum": ["true", "false"]
  1247. }
  1248. ]
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "start",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "number"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "cursor",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "number"
  1265. },
  1266. "required": false
  1267. },
  1268. {
  1269. "name": "search",
  1270. "in": "query",
  1271. "schema": {
  1272. "type": "string"
  1273. },
  1274. "required": false
  1275. },
  1276. {
  1277. "name": "limit",
  1278. "in": "query",
  1279. "schema": {
  1280. "type": "number"
  1281. },
  1282. "required": false
  1283. },
  1284. {
  1285. "name": "archived",
  1286. "in": "query",
  1287. "schema": {
  1288. "anyOf": [
  1289. {
  1290. "type": "boolean"
  1291. },
  1292. {
  1293. "type": "string",
  1294. "enum": ["true", "false"]
  1295. }
  1296. ]
  1297. },
  1298. "required": false
  1299. }
  1300. ],
  1301. "responses": {
  1302. "200": {
  1303. "description": "List of sessions",
  1304. "content": {
  1305. "application/json": {
  1306. "schema": {
  1307. "type": "array",
  1308. "items": {
  1309. "$ref": "#/components/schemas/GlobalSession"
  1310. },
  1311. "description": "List of sessions"
  1312. }
  1313. }
  1314. }
  1315. }
  1316. },
  1317. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1318. "summary": "List sessions",
  1319. "x-codeSamples": [
  1320. {
  1321. "lang": "js",
  1322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1323. }
  1324. ]
  1325. }
  1326. },
  1327. "/experimental/resource": {
  1328. "get": {
  1329. "tags": ["experimental"],
  1330. "operationId": "experimental.resource.list",
  1331. "parameters": [
  1332. {
  1333. "name": "directory",
  1334. "in": "query",
  1335. "schema": {
  1336. "type": "string"
  1337. },
  1338. "required": false
  1339. },
  1340. {
  1341. "name": "workspace",
  1342. "in": "query",
  1343. "schema": {
  1344. "type": "string"
  1345. },
  1346. "required": false
  1347. }
  1348. ],
  1349. "responses": {
  1350. "200": {
  1351. "description": "MCP resources",
  1352. "content": {
  1353. "application/json": {
  1354. "schema": {
  1355. "type": "object",
  1356. "additionalProperties": {
  1357. "$ref": "#/components/schemas/McpResource"
  1358. },
  1359. "description": "MCP resources"
  1360. }
  1361. }
  1362. }
  1363. }
  1364. },
  1365. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1366. "summary": "Get MCP resources",
  1367. "x-codeSamples": [
  1368. {
  1369. "lang": "js",
  1370. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1371. }
  1372. ]
  1373. }
  1374. },
  1375. "/find": {
  1376. "get": {
  1377. "tags": ["file"],
  1378. "operationId": "find.text",
  1379. "parameters": [
  1380. {
  1381. "name": "directory",
  1382. "in": "query",
  1383. "schema": {
  1384. "type": "string"
  1385. },
  1386. "required": false
  1387. },
  1388. {
  1389. "name": "workspace",
  1390. "in": "query",
  1391. "schema": {
  1392. "type": "string"
  1393. },
  1394. "required": false
  1395. },
  1396. {
  1397. "name": "pattern",
  1398. "in": "query",
  1399. "schema": {
  1400. "type": "string"
  1401. },
  1402. "required": true
  1403. }
  1404. ],
  1405. "responses": {
  1406. "200": {
  1407. "description": "Matches",
  1408. "content": {
  1409. "application/json": {
  1410. "schema": {
  1411. "type": "array",
  1412. "items": {
  1413. "type": "object",
  1414. "properties": {
  1415. "path": {
  1416. "type": "object",
  1417. "properties": {
  1418. "text": {
  1419. "type": "string"
  1420. }
  1421. },
  1422. "required": ["text"],
  1423. "additionalProperties": false
  1424. },
  1425. "lines": {
  1426. "type": "object",
  1427. "properties": {
  1428. "text": {
  1429. "type": "string"
  1430. }
  1431. },
  1432. "required": ["text"],
  1433. "additionalProperties": false
  1434. },
  1435. "line_number": {
  1436. "type": "integer",
  1437. "minimum": 0
  1438. },
  1439. "absolute_offset": {
  1440. "type": "integer",
  1441. "minimum": 0
  1442. },
  1443. "submatches": {
  1444. "type": "array",
  1445. "items": {
  1446. "type": "object",
  1447. "properties": {
  1448. "match": {
  1449. "type": "object",
  1450. "properties": {
  1451. "text": {
  1452. "type": "string"
  1453. }
  1454. },
  1455. "required": ["text"],
  1456. "additionalProperties": false
  1457. },
  1458. "start": {
  1459. "type": "integer",
  1460. "minimum": 0
  1461. },
  1462. "end": {
  1463. "type": "integer",
  1464. "minimum": 0
  1465. }
  1466. },
  1467. "required": ["match", "start", "end"],
  1468. "additionalProperties": false
  1469. }
  1470. }
  1471. },
  1472. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1473. "additionalProperties": false
  1474. },
  1475. "description": "Matches"
  1476. }
  1477. }
  1478. }
  1479. }
  1480. },
  1481. "description": "Search for text patterns across files in the project using ripgrep.",
  1482. "summary": "Find text",
  1483. "x-codeSamples": [
  1484. {
  1485. "lang": "js",
  1486. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1487. }
  1488. ]
  1489. }
  1490. },
  1491. "/find/file": {
  1492. "get": {
  1493. "tags": ["file"],
  1494. "operationId": "find.files",
  1495. "parameters": [
  1496. {
  1497. "name": "directory",
  1498. "in": "query",
  1499. "schema": {
  1500. "type": "string"
  1501. },
  1502. "required": false
  1503. },
  1504. {
  1505. "name": "workspace",
  1506. "in": "query",
  1507. "schema": {
  1508. "type": "string"
  1509. },
  1510. "required": false
  1511. },
  1512. {
  1513. "name": "query",
  1514. "in": "query",
  1515. "schema": {
  1516. "type": "string"
  1517. },
  1518. "required": true
  1519. },
  1520. {
  1521. "name": "dirs",
  1522. "in": "query",
  1523. "schema": {
  1524. "type": "string",
  1525. "enum": ["true", "false"]
  1526. },
  1527. "required": false
  1528. },
  1529. {
  1530. "name": "type",
  1531. "in": "query",
  1532. "schema": {
  1533. "type": "string",
  1534. "enum": ["file", "directory"]
  1535. },
  1536. "required": false
  1537. },
  1538. {
  1539. "name": "limit",
  1540. "in": "query",
  1541. "schema": {
  1542. "type": "integer",
  1543. "minimum": 1,
  1544. "maximum": 200
  1545. },
  1546. "required": false
  1547. }
  1548. ],
  1549. "responses": {
  1550. "200": {
  1551. "description": "File paths",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "type": "array",
  1556. "items": {
  1557. "type": "string"
  1558. },
  1559. "description": "File paths"
  1560. }
  1561. }
  1562. }
  1563. }
  1564. },
  1565. "description": "Search for files or directories by name or pattern in the project directory.",
  1566. "summary": "Find files",
  1567. "x-codeSamples": [
  1568. {
  1569. "lang": "js",
  1570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1571. }
  1572. ]
  1573. }
  1574. },
  1575. "/find/symbol": {
  1576. "get": {
  1577. "tags": ["file"],
  1578. "operationId": "find.symbols",
  1579. "parameters": [
  1580. {
  1581. "name": "directory",
  1582. "in": "query",
  1583. "schema": {
  1584. "type": "string"
  1585. },
  1586. "required": false
  1587. },
  1588. {
  1589. "name": "workspace",
  1590. "in": "query",
  1591. "schema": {
  1592. "type": "string"
  1593. },
  1594. "required": false
  1595. },
  1596. {
  1597. "name": "query",
  1598. "in": "query",
  1599. "schema": {
  1600. "type": "string"
  1601. },
  1602. "required": true
  1603. }
  1604. ],
  1605. "responses": {
  1606. "200": {
  1607. "description": "Symbols",
  1608. "content": {
  1609. "application/json": {
  1610. "schema": {
  1611. "type": "array",
  1612. "items": {
  1613. "$ref": "#/components/schemas/Symbol"
  1614. },
  1615. "description": "Symbols"
  1616. }
  1617. }
  1618. }
  1619. }
  1620. },
  1621. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1622. "summary": "Find symbols",
  1623. "x-codeSamples": [
  1624. {
  1625. "lang": "js",
  1626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1627. }
  1628. ]
  1629. }
  1630. },
  1631. "/file": {
  1632. "get": {
  1633. "tags": ["file"],
  1634. "operationId": "file.list",
  1635. "parameters": [
  1636. {
  1637. "name": "directory",
  1638. "in": "query",
  1639. "schema": {
  1640. "type": "string"
  1641. },
  1642. "required": false
  1643. },
  1644. {
  1645. "name": "workspace",
  1646. "in": "query",
  1647. "schema": {
  1648. "type": "string"
  1649. },
  1650. "required": false
  1651. },
  1652. {
  1653. "name": "path",
  1654. "in": "query",
  1655. "schema": {
  1656. "type": "string"
  1657. },
  1658. "required": true
  1659. }
  1660. ],
  1661. "responses": {
  1662. "200": {
  1663. "description": "Files and directories",
  1664. "content": {
  1665. "application/json": {
  1666. "schema": {
  1667. "type": "array",
  1668. "items": {
  1669. "$ref": "#/components/schemas/FileNode"
  1670. },
  1671. "description": "Files and directories"
  1672. }
  1673. }
  1674. }
  1675. }
  1676. },
  1677. "description": "List files and directories in a specified path.",
  1678. "summary": "List files",
  1679. "x-codeSamples": [
  1680. {
  1681. "lang": "js",
  1682. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1683. }
  1684. ]
  1685. }
  1686. },
  1687. "/file/content": {
  1688. "get": {
  1689. "tags": ["file"],
  1690. "operationId": "file.read",
  1691. "parameters": [
  1692. {
  1693. "name": "directory",
  1694. "in": "query",
  1695. "schema": {
  1696. "type": "string"
  1697. },
  1698. "required": false
  1699. },
  1700. {
  1701. "name": "workspace",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "path",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": true
  1715. }
  1716. ],
  1717. "responses": {
  1718. "200": {
  1719. "description": "File content",
  1720. "content": {
  1721. "application/json": {
  1722. "schema": {
  1723. "$ref": "#/components/schemas/FileContent"
  1724. }
  1725. }
  1726. }
  1727. }
  1728. },
  1729. "description": "Read the content of a specified file.",
  1730. "summary": "Read file",
  1731. "x-codeSamples": [
  1732. {
  1733. "lang": "js",
  1734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1735. }
  1736. ]
  1737. }
  1738. },
  1739. "/file/status": {
  1740. "get": {
  1741. "tags": ["file"],
  1742. "operationId": "file.status",
  1743. "parameters": [
  1744. {
  1745. "name": "directory",
  1746. "in": "query",
  1747. "schema": {
  1748. "type": "string"
  1749. },
  1750. "required": false
  1751. },
  1752. {
  1753. "name": "workspace",
  1754. "in": "query",
  1755. "schema": {
  1756. "type": "string"
  1757. },
  1758. "required": false
  1759. }
  1760. ],
  1761. "responses": {
  1762. "200": {
  1763. "description": "File status",
  1764. "content": {
  1765. "application/json": {
  1766. "schema": {
  1767. "type": "array",
  1768. "items": {
  1769. "$ref": "#/components/schemas/File"
  1770. },
  1771. "description": "File status"
  1772. }
  1773. }
  1774. }
  1775. }
  1776. },
  1777. "description": "Get the git status of all files in the project.",
  1778. "summary": "Get file status",
  1779. "x-codeSamples": [
  1780. {
  1781. "lang": "js",
  1782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1783. }
  1784. ]
  1785. }
  1786. },
  1787. "/instance/dispose": {
  1788. "post": {
  1789. "tags": ["instance"],
  1790. "operationId": "instance.dispose",
  1791. "parameters": [
  1792. {
  1793. "name": "directory",
  1794. "in": "query",
  1795. "schema": {
  1796. "type": "string"
  1797. },
  1798. "required": false
  1799. },
  1800. {
  1801. "name": "workspace",
  1802. "in": "query",
  1803. "schema": {
  1804. "type": "string"
  1805. },
  1806. "required": false
  1807. }
  1808. ],
  1809. "responses": {
  1810. "200": {
  1811. "description": "Instance disposed",
  1812. "content": {
  1813. "application/json": {
  1814. "schema": {
  1815. "type": "boolean",
  1816. "description": "Instance disposed"
  1817. }
  1818. }
  1819. }
  1820. }
  1821. },
  1822. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1823. "summary": "Dispose instance",
  1824. "x-codeSamples": [
  1825. {
  1826. "lang": "js",
  1827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1828. }
  1829. ]
  1830. }
  1831. },
  1832. "/path": {
  1833. "get": {
  1834. "tags": ["instance"],
  1835. "operationId": "path.get",
  1836. "parameters": [
  1837. {
  1838. "name": "directory",
  1839. "in": "query",
  1840. "schema": {
  1841. "type": "string"
  1842. },
  1843. "required": false
  1844. },
  1845. {
  1846. "name": "workspace",
  1847. "in": "query",
  1848. "schema": {
  1849. "type": "string"
  1850. },
  1851. "required": false
  1852. }
  1853. ],
  1854. "responses": {
  1855. "200": {
  1856. "description": "Path",
  1857. "content": {
  1858. "application/json": {
  1859. "schema": {
  1860. "$ref": "#/components/schemas/Path"
  1861. }
  1862. }
  1863. }
  1864. }
  1865. },
  1866. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1867. "summary": "Get paths",
  1868. "x-codeSamples": [
  1869. {
  1870. "lang": "js",
  1871. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1872. }
  1873. ]
  1874. }
  1875. },
  1876. "/vcs": {
  1877. "get": {
  1878. "tags": ["instance"],
  1879. "operationId": "vcs.get",
  1880. "parameters": [
  1881. {
  1882. "name": "directory",
  1883. "in": "query",
  1884. "schema": {
  1885. "type": "string"
  1886. },
  1887. "required": false
  1888. },
  1889. {
  1890. "name": "workspace",
  1891. "in": "query",
  1892. "schema": {
  1893. "type": "string"
  1894. },
  1895. "required": false
  1896. }
  1897. ],
  1898. "responses": {
  1899. "200": {
  1900. "description": "VCS info",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/VcsInfo"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1911. "summary": "Get VCS info",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/vcs/status": {
  1921. "get": {
  1922. "tags": ["instance"],
  1923. "operationId": "vcs.status",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. }
  1941. ],
  1942. "responses": {
  1943. "200": {
  1944. "description": "VCS status",
  1945. "content": {
  1946. "application/json": {
  1947. "schema": {
  1948. "type": "array",
  1949. "items": {
  1950. "$ref": "#/components/schemas/VcsFileStatus"
  1951. },
  1952. "description": "VCS status"
  1953. }
  1954. }
  1955. }
  1956. }
  1957. },
  1958. "description": "Retrieve changed files in the current working tree without patches.",
  1959. "summary": "Get VCS status",
  1960. "x-codeSamples": [
  1961. {
  1962. "lang": "js",
  1963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1964. }
  1965. ]
  1966. }
  1967. },
  1968. "/vcs/diff": {
  1969. "get": {
  1970. "tags": ["instance"],
  1971. "operationId": "vcs.diff",
  1972. "parameters": [
  1973. {
  1974. "name": "directory",
  1975. "in": "query",
  1976. "schema": {
  1977. "type": "string"
  1978. },
  1979. "required": false
  1980. },
  1981. {
  1982. "name": "workspace",
  1983. "in": "query",
  1984. "schema": {
  1985. "type": "string"
  1986. },
  1987. "required": false
  1988. },
  1989. {
  1990. "name": "mode",
  1991. "in": "query",
  1992. "schema": {
  1993. "type": "string",
  1994. "enum": ["git", "branch"]
  1995. },
  1996. "required": true
  1997. }
  1998. ],
  1999. "responses": {
  2000. "200": {
  2001. "description": "VCS diff",
  2002. "content": {
  2003. "application/json": {
  2004. "schema": {
  2005. "type": "array",
  2006. "items": {
  2007. "$ref": "#/components/schemas/VcsFileDiff"
  2008. },
  2009. "description": "VCS diff"
  2010. }
  2011. }
  2012. }
  2013. }
  2014. },
  2015. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2016. "summary": "Get VCS diff",
  2017. "x-codeSamples": [
  2018. {
  2019. "lang": "js",
  2020. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2021. }
  2022. ]
  2023. }
  2024. },
  2025. "/vcs/diff/raw": {
  2026. "get": {
  2027. "tags": ["instance"],
  2028. "operationId": "vcs.diff.raw",
  2029. "parameters": [
  2030. {
  2031. "name": "directory",
  2032. "in": "query",
  2033. "schema": {
  2034. "type": "string"
  2035. },
  2036. "required": false
  2037. },
  2038. {
  2039. "name": "workspace",
  2040. "in": "query",
  2041. "schema": {
  2042. "type": "string"
  2043. },
  2044. "required": false
  2045. }
  2046. ],
  2047. "responses": {
  2048. "200": {
  2049. "description": "Raw VCS diff",
  2050. "content": {
  2051. "text/x-diff; charset=utf-8": {
  2052. "schema": {
  2053. "type": "string"
  2054. }
  2055. }
  2056. }
  2057. }
  2058. },
  2059. "description": "Retrieve a raw patch for current uncommitted changes.",
  2060. "summary": "Get raw VCS diff",
  2061. "x-codeSamples": [
  2062. {
  2063. "lang": "js",
  2064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2065. }
  2066. ]
  2067. }
  2068. },
  2069. "/vcs/apply": {
  2070. "post": {
  2071. "tags": ["instance"],
  2072. "operationId": "vcs.apply",
  2073. "parameters": [
  2074. {
  2075. "name": "directory",
  2076. "in": "query",
  2077. "schema": {
  2078. "type": "string"
  2079. },
  2080. "required": false
  2081. },
  2082. {
  2083. "name": "workspace",
  2084. "in": "query",
  2085. "schema": {
  2086. "type": "string"
  2087. },
  2088. "required": false
  2089. }
  2090. ],
  2091. "responses": {
  2092. "200": {
  2093. "description": "VCS patch applied",
  2094. "content": {
  2095. "application/json": {
  2096. "schema": {
  2097. "type": "object",
  2098. "properties": {
  2099. "applied": {
  2100. "type": "boolean"
  2101. }
  2102. },
  2103. "required": ["applied"],
  2104. "additionalProperties": false,
  2105. "description": "VCS patch applied"
  2106. }
  2107. }
  2108. }
  2109. },
  2110. "400": {
  2111. "description": "VcsApplyError",
  2112. "content": {
  2113. "application/json": {
  2114. "schema": {
  2115. "$ref": "#/components/schemas/VcsApplyError"
  2116. }
  2117. }
  2118. }
  2119. }
  2120. },
  2121. "description": "Apply a raw patch to the current working tree.",
  2122. "summary": "Apply VCS patch",
  2123. "requestBody": {
  2124. "content": {
  2125. "application/json": {
  2126. "schema": {
  2127. "type": "object",
  2128. "properties": {
  2129. "patch": {
  2130. "type": "string"
  2131. }
  2132. },
  2133. "required": ["patch"],
  2134. "additionalProperties": false
  2135. }
  2136. }
  2137. }
  2138. },
  2139. "x-codeSamples": [
  2140. {
  2141. "lang": "js",
  2142. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2143. }
  2144. ]
  2145. }
  2146. },
  2147. "/command": {
  2148. "get": {
  2149. "tags": ["instance"],
  2150. "operationId": "command.list",
  2151. "parameters": [
  2152. {
  2153. "name": "directory",
  2154. "in": "query",
  2155. "schema": {
  2156. "type": "string"
  2157. },
  2158. "required": false
  2159. },
  2160. {
  2161. "name": "workspace",
  2162. "in": "query",
  2163. "schema": {
  2164. "type": "string"
  2165. },
  2166. "required": false
  2167. }
  2168. ],
  2169. "responses": {
  2170. "200": {
  2171. "description": "List of commands",
  2172. "content": {
  2173. "application/json": {
  2174. "schema": {
  2175. "type": "array",
  2176. "items": {
  2177. "$ref": "#/components/schemas/Command"
  2178. },
  2179. "description": "List of commands"
  2180. }
  2181. }
  2182. }
  2183. }
  2184. },
  2185. "description": "Get a list of all available commands in the OpenCode system.",
  2186. "summary": "List commands",
  2187. "x-codeSamples": [
  2188. {
  2189. "lang": "js",
  2190. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2191. }
  2192. ]
  2193. }
  2194. },
  2195. "/agent": {
  2196. "get": {
  2197. "tags": ["instance"],
  2198. "operationId": "app.agents",
  2199. "parameters": [
  2200. {
  2201. "name": "directory",
  2202. "in": "query",
  2203. "schema": {
  2204. "type": "string"
  2205. },
  2206. "required": false
  2207. },
  2208. {
  2209. "name": "workspace",
  2210. "in": "query",
  2211. "schema": {
  2212. "type": "string"
  2213. },
  2214. "required": false
  2215. }
  2216. ],
  2217. "responses": {
  2218. "200": {
  2219. "description": "List of agents",
  2220. "content": {
  2221. "application/json": {
  2222. "schema": {
  2223. "type": "array",
  2224. "items": {
  2225. "$ref": "#/components/schemas/Agent"
  2226. },
  2227. "description": "List of agents"
  2228. }
  2229. }
  2230. }
  2231. }
  2232. },
  2233. "description": "Get a list of all available AI agents in the OpenCode system.",
  2234. "summary": "List agents",
  2235. "x-codeSamples": [
  2236. {
  2237. "lang": "js",
  2238. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2239. }
  2240. ]
  2241. }
  2242. },
  2243. "/skill": {
  2244. "get": {
  2245. "tags": ["instance"],
  2246. "operationId": "app.skills",
  2247. "parameters": [
  2248. {
  2249. "name": "directory",
  2250. "in": "query",
  2251. "schema": {
  2252. "type": "string"
  2253. },
  2254. "required": false
  2255. },
  2256. {
  2257. "name": "workspace",
  2258. "in": "query",
  2259. "schema": {
  2260. "type": "string"
  2261. },
  2262. "required": false
  2263. }
  2264. ],
  2265. "responses": {
  2266. "200": {
  2267. "description": "List of skills",
  2268. "content": {
  2269. "application/json": {
  2270. "schema": {
  2271. "type": "array",
  2272. "items": {
  2273. "type": "object",
  2274. "properties": {
  2275. "name": {
  2276. "type": "string"
  2277. },
  2278. "description": {
  2279. "type": "string"
  2280. },
  2281. "location": {
  2282. "type": "string"
  2283. },
  2284. "content": {
  2285. "type": "string"
  2286. }
  2287. },
  2288. "required": ["name", "location", "content"],
  2289. "additionalProperties": false
  2290. },
  2291. "description": "List of skills"
  2292. }
  2293. }
  2294. }
  2295. }
  2296. },
  2297. "description": "Get a list of all available skills in the OpenCode system.",
  2298. "summary": "List skills",
  2299. "x-codeSamples": [
  2300. {
  2301. "lang": "js",
  2302. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2303. }
  2304. ]
  2305. }
  2306. },
  2307. "/lsp": {
  2308. "get": {
  2309. "tags": ["instance"],
  2310. "operationId": "lsp.status",
  2311. "parameters": [
  2312. {
  2313. "name": "directory",
  2314. "in": "query",
  2315. "schema": {
  2316. "type": "string"
  2317. },
  2318. "required": false
  2319. },
  2320. {
  2321. "name": "workspace",
  2322. "in": "query",
  2323. "schema": {
  2324. "type": "string"
  2325. },
  2326. "required": false
  2327. }
  2328. ],
  2329. "responses": {
  2330. "200": {
  2331. "description": "LSP server status",
  2332. "content": {
  2333. "application/json": {
  2334. "schema": {
  2335. "type": "array",
  2336. "items": {
  2337. "$ref": "#/components/schemas/LSPStatus"
  2338. },
  2339. "description": "LSP server status"
  2340. }
  2341. }
  2342. }
  2343. }
  2344. },
  2345. "description": "Get LSP server status",
  2346. "summary": "Get LSP status",
  2347. "x-codeSamples": [
  2348. {
  2349. "lang": "js",
  2350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2351. }
  2352. ]
  2353. }
  2354. },
  2355. "/formatter": {
  2356. "get": {
  2357. "tags": ["instance"],
  2358. "operationId": "formatter.status",
  2359. "parameters": [
  2360. {
  2361. "name": "directory",
  2362. "in": "query",
  2363. "schema": {
  2364. "type": "string"
  2365. },
  2366. "required": false
  2367. },
  2368. {
  2369. "name": "workspace",
  2370. "in": "query",
  2371. "schema": {
  2372. "type": "string"
  2373. },
  2374. "required": false
  2375. }
  2376. ],
  2377. "responses": {
  2378. "200": {
  2379. "description": "Formatter status",
  2380. "content": {
  2381. "application/json": {
  2382. "schema": {
  2383. "type": "array",
  2384. "items": {
  2385. "$ref": "#/components/schemas/FormatterStatus"
  2386. },
  2387. "description": "Formatter status"
  2388. }
  2389. }
  2390. }
  2391. }
  2392. },
  2393. "description": "Get formatter status",
  2394. "summary": "Get formatter status",
  2395. "x-codeSamples": [
  2396. {
  2397. "lang": "js",
  2398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2399. }
  2400. ]
  2401. }
  2402. },
  2403. "/mcp": {
  2404. "get": {
  2405. "tags": ["mcp"],
  2406. "operationId": "mcp.status",
  2407. "parameters": [
  2408. {
  2409. "name": "directory",
  2410. "in": "query",
  2411. "schema": {
  2412. "type": "string"
  2413. },
  2414. "required": false
  2415. },
  2416. {
  2417. "name": "workspace",
  2418. "in": "query",
  2419. "schema": {
  2420. "type": "string"
  2421. },
  2422. "required": false
  2423. }
  2424. ],
  2425. "responses": {
  2426. "200": {
  2427. "description": "MCP server status",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "type": "object",
  2432. "additionalProperties": {
  2433. "$ref": "#/components/schemas/MCPStatus"
  2434. },
  2435. "description": "MCP server status"
  2436. }
  2437. }
  2438. }
  2439. }
  2440. },
  2441. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2442. "summary": "Get MCP status",
  2443. "x-codeSamples": [
  2444. {
  2445. "lang": "js",
  2446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2447. }
  2448. ]
  2449. },
  2450. "post": {
  2451. "tags": ["mcp"],
  2452. "operationId": "mcp.add",
  2453. "parameters": [
  2454. {
  2455. "name": "directory",
  2456. "in": "query",
  2457. "schema": {
  2458. "type": "string"
  2459. },
  2460. "required": false
  2461. },
  2462. {
  2463. "name": "workspace",
  2464. "in": "query",
  2465. "schema": {
  2466. "type": "string"
  2467. },
  2468. "required": false
  2469. }
  2470. ],
  2471. "responses": {
  2472. "200": {
  2473. "description": "MCP server added successfully",
  2474. "content": {
  2475. "application/json": {
  2476. "schema": {
  2477. "type": "object",
  2478. "additionalProperties": {
  2479. "$ref": "#/components/schemas/MCPStatus"
  2480. },
  2481. "description": "MCP server added successfully"
  2482. }
  2483. }
  2484. }
  2485. },
  2486. "400": {
  2487. "description": "Bad request",
  2488. "content": {
  2489. "application/json": {
  2490. "schema": {
  2491. "$ref": "#/components/schemas/BadRequestError"
  2492. }
  2493. }
  2494. }
  2495. }
  2496. },
  2497. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2498. "summary": "Add MCP server",
  2499. "requestBody": {
  2500. "content": {
  2501. "application/json": {
  2502. "schema": {
  2503. "type": "object",
  2504. "properties": {
  2505. "name": {
  2506. "type": "string"
  2507. },
  2508. "config": {
  2509. "anyOf": [
  2510. {
  2511. "$ref": "#/components/schemas/McpLocalConfig"
  2512. },
  2513. {
  2514. "$ref": "#/components/schemas/McpRemoteConfig"
  2515. }
  2516. ]
  2517. }
  2518. },
  2519. "required": ["name", "config"],
  2520. "additionalProperties": false
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "x-codeSamples": [
  2526. {
  2527. "lang": "js",
  2528. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2529. }
  2530. ]
  2531. }
  2532. },
  2533. "/mcp/{name}/auth": {
  2534. "post": {
  2535. "tags": ["mcp"],
  2536. "operationId": "mcp.auth.start",
  2537. "parameters": [
  2538. {
  2539. "name": "name",
  2540. "in": "path",
  2541. "schema": {
  2542. "type": "string"
  2543. },
  2544. "required": true
  2545. },
  2546. {
  2547. "name": "directory",
  2548. "in": "query",
  2549. "schema": {
  2550. "type": "string"
  2551. },
  2552. "required": false
  2553. },
  2554. {
  2555. "name": "workspace",
  2556. "in": "query",
  2557. "schema": {
  2558. "type": "string"
  2559. },
  2560. "required": false
  2561. }
  2562. ],
  2563. "responses": {
  2564. "200": {
  2565. "description": "OAuth flow started",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "type": "object",
  2570. "properties": {
  2571. "authorizationUrl": {
  2572. "type": "string"
  2573. },
  2574. "oauthState": {
  2575. "type": "string"
  2576. }
  2577. },
  2578. "required": ["authorizationUrl", "oauthState"],
  2579. "additionalProperties": false,
  2580. "description": "OAuth flow started"
  2581. }
  2582. }
  2583. }
  2584. },
  2585. "400": {
  2586. "description": "McpUnsupportedOAuthError",
  2587. "content": {
  2588. "application/json": {
  2589. "schema": {
  2590. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2591. }
  2592. }
  2593. }
  2594. },
  2595. "404": {
  2596. "description": "Not found",
  2597. "content": {
  2598. "application/json": {
  2599. "schema": {
  2600. "$ref": "#/components/schemas/NotFoundError"
  2601. }
  2602. }
  2603. }
  2604. }
  2605. },
  2606. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2607. "summary": "Start MCP OAuth",
  2608. "x-codeSamples": [
  2609. {
  2610. "lang": "js",
  2611. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2612. }
  2613. ]
  2614. },
  2615. "delete": {
  2616. "tags": ["mcp"],
  2617. "operationId": "mcp.auth.remove",
  2618. "parameters": [
  2619. {
  2620. "name": "name",
  2621. "in": "path",
  2622. "schema": {
  2623. "type": "string"
  2624. },
  2625. "required": true
  2626. },
  2627. {
  2628. "name": "directory",
  2629. "in": "query",
  2630. "schema": {
  2631. "type": "string"
  2632. },
  2633. "required": false
  2634. },
  2635. {
  2636. "name": "workspace",
  2637. "in": "query",
  2638. "schema": {
  2639. "type": "string"
  2640. },
  2641. "required": false
  2642. }
  2643. ],
  2644. "responses": {
  2645. "200": {
  2646. "description": "OAuth credentials removed",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "type": "object",
  2651. "properties": {
  2652. "success": {
  2653. "type": "boolean",
  2654. "enum": [true]
  2655. }
  2656. },
  2657. "required": ["success"],
  2658. "additionalProperties": false,
  2659. "description": "OAuth credentials removed"
  2660. }
  2661. }
  2662. }
  2663. },
  2664. "404": {
  2665. "description": "Not found",
  2666. "content": {
  2667. "application/json": {
  2668. "schema": {
  2669. "$ref": "#/components/schemas/NotFoundError"
  2670. }
  2671. }
  2672. }
  2673. }
  2674. },
  2675. "description": "Remove OAuth credentials for an MCP server.",
  2676. "summary": "Remove MCP OAuth",
  2677. "x-codeSamples": [
  2678. {
  2679. "lang": "js",
  2680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2681. }
  2682. ]
  2683. }
  2684. },
  2685. "/mcp/{name}/auth/callback": {
  2686. "post": {
  2687. "tags": ["mcp"],
  2688. "operationId": "mcp.auth.callback",
  2689. "parameters": [
  2690. {
  2691. "name": "name",
  2692. "in": "path",
  2693. "schema": {
  2694. "type": "string"
  2695. },
  2696. "required": true
  2697. },
  2698. {
  2699. "name": "directory",
  2700. "in": "query",
  2701. "schema": {
  2702. "type": "string"
  2703. },
  2704. "required": false
  2705. },
  2706. {
  2707. "name": "workspace",
  2708. "in": "query",
  2709. "schema": {
  2710. "type": "string"
  2711. },
  2712. "required": false
  2713. }
  2714. ],
  2715. "responses": {
  2716. "200": {
  2717. "description": "OAuth authentication completed",
  2718. "content": {
  2719. "application/json": {
  2720. "schema": {
  2721. "$ref": "#/components/schemas/MCPStatus"
  2722. }
  2723. }
  2724. }
  2725. },
  2726. "400": {
  2727. "description": "Bad request",
  2728. "content": {
  2729. "application/json": {
  2730. "schema": {
  2731. "$ref": "#/components/schemas/BadRequestError"
  2732. }
  2733. }
  2734. }
  2735. },
  2736. "404": {
  2737. "description": "Not found",
  2738. "content": {
  2739. "application/json": {
  2740. "schema": {
  2741. "$ref": "#/components/schemas/NotFoundError"
  2742. }
  2743. }
  2744. }
  2745. }
  2746. },
  2747. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2748. "summary": "Complete MCP OAuth",
  2749. "requestBody": {
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "object",
  2754. "properties": {
  2755. "code": {
  2756. "type": "string"
  2757. }
  2758. },
  2759. "required": ["code"],
  2760. "additionalProperties": false
  2761. }
  2762. }
  2763. }
  2764. },
  2765. "x-codeSamples": [
  2766. {
  2767. "lang": "js",
  2768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2769. }
  2770. ]
  2771. }
  2772. },
  2773. "/mcp/{name}/auth/authenticate": {
  2774. "post": {
  2775. "tags": ["mcp"],
  2776. "operationId": "mcp.auth.authenticate",
  2777. "parameters": [
  2778. {
  2779. "name": "name",
  2780. "in": "path",
  2781. "schema": {
  2782. "type": "string"
  2783. },
  2784. "required": true
  2785. },
  2786. {
  2787. "name": "directory",
  2788. "in": "query",
  2789. "schema": {
  2790. "type": "string"
  2791. },
  2792. "required": false
  2793. },
  2794. {
  2795. "name": "workspace",
  2796. "in": "query",
  2797. "schema": {
  2798. "type": "string"
  2799. },
  2800. "required": false
  2801. }
  2802. ],
  2803. "responses": {
  2804. "200": {
  2805. "description": "OAuth authentication completed",
  2806. "content": {
  2807. "application/json": {
  2808. "schema": {
  2809. "$ref": "#/components/schemas/MCPStatus"
  2810. }
  2811. }
  2812. }
  2813. },
  2814. "400": {
  2815. "description": "McpUnsupportedOAuthError",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "404": {
  2825. "description": "Not found",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/NotFoundError"
  2830. }
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "description": "Start OAuth flow and wait for callback (opens browser).",
  2836. "summary": "Authenticate MCP OAuth",
  2837. "x-codeSamples": [
  2838. {
  2839. "lang": "js",
  2840. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2841. }
  2842. ]
  2843. }
  2844. },
  2845. "/mcp/{name}/connect": {
  2846. "post": {
  2847. "tags": ["mcp"],
  2848. "operationId": "mcp.connect",
  2849. "parameters": [
  2850. {
  2851. "name": "name",
  2852. "in": "path",
  2853. "schema": {
  2854. "type": "string"
  2855. },
  2856. "required": true
  2857. },
  2858. {
  2859. "name": "directory",
  2860. "in": "query",
  2861. "schema": {
  2862. "type": "string"
  2863. },
  2864. "required": false
  2865. },
  2866. {
  2867. "name": "workspace",
  2868. "in": "query",
  2869. "schema": {
  2870. "type": "string"
  2871. },
  2872. "required": false
  2873. }
  2874. ],
  2875. "responses": {
  2876. "200": {
  2877. "description": "MCP server connected successfully",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "type": "boolean",
  2882. "description": "MCP server connected successfully"
  2883. }
  2884. }
  2885. }
  2886. }
  2887. },
  2888. "description": "Connect an MCP server.",
  2889. "x-codeSamples": [
  2890. {
  2891. "lang": "js",
  2892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2893. }
  2894. ]
  2895. }
  2896. },
  2897. "/mcp/{name}/disconnect": {
  2898. "post": {
  2899. "tags": ["mcp"],
  2900. "operationId": "mcp.disconnect",
  2901. "parameters": [
  2902. {
  2903. "name": "name",
  2904. "in": "path",
  2905. "schema": {
  2906. "type": "string"
  2907. },
  2908. "required": true
  2909. },
  2910. {
  2911. "name": "directory",
  2912. "in": "query",
  2913. "schema": {
  2914. "type": "string"
  2915. },
  2916. "required": false
  2917. },
  2918. {
  2919. "name": "workspace",
  2920. "in": "query",
  2921. "schema": {
  2922. "type": "string"
  2923. },
  2924. "required": false
  2925. }
  2926. ],
  2927. "responses": {
  2928. "200": {
  2929. "description": "MCP server disconnected successfully",
  2930. "content": {
  2931. "application/json": {
  2932. "schema": {
  2933. "type": "boolean",
  2934. "description": "MCP server disconnected successfully"
  2935. }
  2936. }
  2937. }
  2938. }
  2939. },
  2940. "description": "Disconnect an MCP server.",
  2941. "x-codeSamples": [
  2942. {
  2943. "lang": "js",
  2944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2945. }
  2946. ]
  2947. }
  2948. },
  2949. "/project": {
  2950. "get": {
  2951. "tags": ["project"],
  2952. "operationId": "project.list",
  2953. "parameters": [
  2954. {
  2955. "name": "directory",
  2956. "in": "query",
  2957. "schema": {
  2958. "type": "string"
  2959. },
  2960. "required": false
  2961. },
  2962. {
  2963. "name": "workspace",
  2964. "in": "query",
  2965. "schema": {
  2966. "type": "string"
  2967. },
  2968. "required": false
  2969. }
  2970. ],
  2971. "responses": {
  2972. "200": {
  2973. "description": "List of projects",
  2974. "content": {
  2975. "application/json": {
  2976. "schema": {
  2977. "type": "array",
  2978. "items": {
  2979. "$ref": "#/components/schemas/Project"
  2980. },
  2981. "description": "List of projects"
  2982. }
  2983. }
  2984. }
  2985. }
  2986. },
  2987. "description": "Get a list of projects that have been opened with OpenCode.",
  2988. "summary": "List all projects",
  2989. "x-codeSamples": [
  2990. {
  2991. "lang": "js",
  2992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  2993. }
  2994. ]
  2995. }
  2996. },
  2997. "/project/current": {
  2998. "get": {
  2999. "tags": ["project"],
  3000. "operationId": "project.current",
  3001. "parameters": [
  3002. {
  3003. "name": "directory",
  3004. "in": "query",
  3005. "schema": {
  3006. "type": "string"
  3007. },
  3008. "required": false
  3009. },
  3010. {
  3011. "name": "workspace",
  3012. "in": "query",
  3013. "schema": {
  3014. "type": "string"
  3015. },
  3016. "required": false
  3017. }
  3018. ],
  3019. "responses": {
  3020. "200": {
  3021. "description": "Current project information",
  3022. "content": {
  3023. "application/json": {
  3024. "schema": {
  3025. "$ref": "#/components/schemas/Project"
  3026. }
  3027. }
  3028. }
  3029. }
  3030. },
  3031. "description": "Retrieve the currently active project that OpenCode is working with.",
  3032. "summary": "Get current project",
  3033. "x-codeSamples": [
  3034. {
  3035. "lang": "js",
  3036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3037. }
  3038. ]
  3039. }
  3040. },
  3041. "/project/git/init": {
  3042. "post": {
  3043. "tags": ["project"],
  3044. "operationId": "project.initGit",
  3045. "parameters": [
  3046. {
  3047. "name": "directory",
  3048. "in": "query",
  3049. "schema": {
  3050. "type": "string"
  3051. },
  3052. "required": false
  3053. },
  3054. {
  3055. "name": "workspace",
  3056. "in": "query",
  3057. "schema": {
  3058. "type": "string"
  3059. },
  3060. "required": false
  3061. }
  3062. ],
  3063. "responses": {
  3064. "200": {
  3065. "description": "Project information after git initialization",
  3066. "content": {
  3067. "application/json": {
  3068. "schema": {
  3069. "$ref": "#/components/schemas/Project"
  3070. }
  3071. }
  3072. }
  3073. }
  3074. },
  3075. "description": "Create a git repository for the current project and return the refreshed project info.",
  3076. "summary": "Initialize git repository",
  3077. "x-codeSamples": [
  3078. {
  3079. "lang": "js",
  3080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3081. }
  3082. ]
  3083. }
  3084. },
  3085. "/project/{projectID}": {
  3086. "patch": {
  3087. "tags": ["project"],
  3088. "operationId": "project.update",
  3089. "parameters": [
  3090. {
  3091. "name": "projectID",
  3092. "in": "path",
  3093. "schema": {
  3094. "type": "string"
  3095. },
  3096. "required": true
  3097. },
  3098. {
  3099. "name": "directory",
  3100. "in": "query",
  3101. "schema": {
  3102. "type": "string"
  3103. },
  3104. "required": false
  3105. },
  3106. {
  3107. "name": "workspace",
  3108. "in": "query",
  3109. "schema": {
  3110. "type": "string"
  3111. },
  3112. "required": false
  3113. }
  3114. ],
  3115. "responses": {
  3116. "200": {
  3117. "description": "Updated project information",
  3118. "content": {
  3119. "application/json": {
  3120. "schema": {
  3121. "$ref": "#/components/schemas/Project"
  3122. }
  3123. }
  3124. }
  3125. },
  3126. "400": {
  3127. "description": "Bad request",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/BadRequestError"
  3132. }
  3133. }
  3134. }
  3135. },
  3136. "404": {
  3137. "description": "Not found",
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "$ref": "#/components/schemas/NotFoundError"
  3142. }
  3143. }
  3144. }
  3145. }
  3146. },
  3147. "description": "Update project properties such as name, icon, and commands.",
  3148. "summary": "Update project",
  3149. "requestBody": {
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "type": "object",
  3154. "properties": {
  3155. "name": {
  3156. "type": "string"
  3157. },
  3158. "icon": {
  3159. "type": "object",
  3160. "properties": {
  3161. "url": {
  3162. "type": "string"
  3163. },
  3164. "override": {
  3165. "type": "string"
  3166. },
  3167. "color": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "additionalProperties": false
  3172. },
  3173. "commands": {
  3174. "type": "object",
  3175. "properties": {
  3176. "start": {
  3177. "type": "string",
  3178. "description": "Startup script to run when creating a new workspace (worktree)"
  3179. }
  3180. },
  3181. "additionalProperties": false
  3182. }
  3183. },
  3184. "additionalProperties": false
  3185. }
  3186. }
  3187. }
  3188. },
  3189. "x-codeSamples": [
  3190. {
  3191. "lang": "js",
  3192. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3193. }
  3194. ]
  3195. }
  3196. },
  3197. "/pty/shells": {
  3198. "get": {
  3199. "tags": ["pty"],
  3200. "operationId": "pty.shells",
  3201. "parameters": [
  3202. {
  3203. "name": "directory",
  3204. "in": "query",
  3205. "schema": {
  3206. "type": "string"
  3207. },
  3208. "required": false
  3209. },
  3210. {
  3211. "name": "workspace",
  3212. "in": "query",
  3213. "schema": {
  3214. "type": "string"
  3215. },
  3216. "required": false
  3217. }
  3218. ],
  3219. "responses": {
  3220. "200": {
  3221. "description": "List of shells",
  3222. "content": {
  3223. "application/json": {
  3224. "schema": {
  3225. "type": "array",
  3226. "items": {
  3227. "type": "object",
  3228. "properties": {
  3229. "path": {
  3230. "type": "string"
  3231. },
  3232. "name": {
  3233. "type": "string"
  3234. },
  3235. "acceptable": {
  3236. "type": "boolean"
  3237. }
  3238. },
  3239. "required": ["path", "name", "acceptable"],
  3240. "additionalProperties": false
  3241. },
  3242. "description": "List of shells"
  3243. }
  3244. }
  3245. }
  3246. }
  3247. },
  3248. "description": "Get a list of available shells on the system.",
  3249. "summary": "List available shells",
  3250. "x-codeSamples": [
  3251. {
  3252. "lang": "js",
  3253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3254. }
  3255. ]
  3256. }
  3257. },
  3258. "/pty": {
  3259. "get": {
  3260. "tags": ["pty"],
  3261. "operationId": "pty.list",
  3262. "parameters": [
  3263. {
  3264. "name": "directory",
  3265. "in": "query",
  3266. "schema": {
  3267. "type": "string"
  3268. },
  3269. "required": false
  3270. },
  3271. {
  3272. "name": "workspace",
  3273. "in": "query",
  3274. "schema": {
  3275. "type": "string"
  3276. },
  3277. "required": false
  3278. }
  3279. ],
  3280. "responses": {
  3281. "200": {
  3282. "description": "List of sessions",
  3283. "content": {
  3284. "application/json": {
  3285. "schema": {
  3286. "type": "array",
  3287. "items": {
  3288. "$ref": "#/components/schemas/Pty"
  3289. },
  3290. "description": "List of sessions"
  3291. }
  3292. }
  3293. }
  3294. }
  3295. },
  3296. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3297. "summary": "List PTY sessions",
  3298. "x-codeSamples": [
  3299. {
  3300. "lang": "js",
  3301. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3302. }
  3303. ]
  3304. },
  3305. "post": {
  3306. "tags": ["pty"],
  3307. "operationId": "pty.create",
  3308. "parameters": [
  3309. {
  3310. "name": "directory",
  3311. "in": "query",
  3312. "schema": {
  3313. "type": "string"
  3314. },
  3315. "required": false
  3316. },
  3317. {
  3318. "name": "workspace",
  3319. "in": "query",
  3320. "schema": {
  3321. "type": "string"
  3322. },
  3323. "required": false
  3324. }
  3325. ],
  3326. "responses": {
  3327. "200": {
  3328. "description": "Created session",
  3329. "content": {
  3330. "application/json": {
  3331. "schema": {
  3332. "$ref": "#/components/schemas/Pty"
  3333. }
  3334. }
  3335. }
  3336. },
  3337. "400": {
  3338. "description": "Bad request",
  3339. "content": {
  3340. "application/json": {
  3341. "schema": {
  3342. "$ref": "#/components/schemas/BadRequestError"
  3343. }
  3344. }
  3345. }
  3346. }
  3347. },
  3348. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3349. "summary": "Create PTY session",
  3350. "requestBody": {
  3351. "content": {
  3352. "application/json": {
  3353. "schema": {
  3354. "type": "object",
  3355. "properties": {
  3356. "command": {
  3357. "type": "string"
  3358. },
  3359. "args": {
  3360. "type": "array",
  3361. "items": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "cwd": {
  3366. "type": "string"
  3367. },
  3368. "title": {
  3369. "type": "string"
  3370. },
  3371. "env": {
  3372. "type": "object",
  3373. "additionalProperties": {
  3374. "type": "string"
  3375. }
  3376. }
  3377. },
  3378. "additionalProperties": false
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "x-codeSamples": [
  3384. {
  3385. "lang": "js",
  3386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3387. }
  3388. ]
  3389. }
  3390. },
  3391. "/pty/{ptyID}": {
  3392. "get": {
  3393. "tags": ["pty"],
  3394. "operationId": "pty.get",
  3395. "parameters": [
  3396. {
  3397. "name": "ptyID",
  3398. "in": "path",
  3399. "schema": {
  3400. "type": "string",
  3401. "pattern": "^pty.*"
  3402. },
  3403. "required": true
  3404. },
  3405. {
  3406. "name": "directory",
  3407. "in": "query",
  3408. "schema": {
  3409. "type": "string"
  3410. },
  3411. "required": false
  3412. },
  3413. {
  3414. "name": "workspace",
  3415. "in": "query",
  3416. "schema": {
  3417. "type": "string"
  3418. },
  3419. "required": false
  3420. }
  3421. ],
  3422. "responses": {
  3423. "200": {
  3424. "description": "Session info",
  3425. "content": {
  3426. "application/json": {
  3427. "schema": {
  3428. "$ref": "#/components/schemas/Pty"
  3429. }
  3430. }
  3431. }
  3432. },
  3433. "404": {
  3434. "description": "NotFoundError",
  3435. "content": {
  3436. "application/json": {
  3437. "schema": {
  3438. "$ref": "#/components/schemas/NotFoundError"
  3439. }
  3440. }
  3441. }
  3442. }
  3443. },
  3444. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3445. "summary": "Get PTY session",
  3446. "x-codeSamples": [
  3447. {
  3448. "lang": "js",
  3449. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3450. }
  3451. ]
  3452. },
  3453. "put": {
  3454. "tags": ["pty"],
  3455. "operationId": "pty.update",
  3456. "parameters": [
  3457. {
  3458. "name": "ptyID",
  3459. "in": "path",
  3460. "schema": {
  3461. "type": "string",
  3462. "pattern": "^pty.*"
  3463. },
  3464. "required": true
  3465. },
  3466. {
  3467. "name": "directory",
  3468. "in": "query",
  3469. "schema": {
  3470. "type": "string"
  3471. },
  3472. "required": false
  3473. },
  3474. {
  3475. "name": "workspace",
  3476. "in": "query",
  3477. "schema": {
  3478. "type": "string"
  3479. },
  3480. "required": false
  3481. }
  3482. ],
  3483. "responses": {
  3484. "200": {
  3485. "description": "Updated session",
  3486. "content": {
  3487. "application/json": {
  3488. "schema": {
  3489. "$ref": "#/components/schemas/Pty"
  3490. }
  3491. }
  3492. }
  3493. },
  3494. "400": {
  3495. "description": "Bad request",
  3496. "content": {
  3497. "application/json": {
  3498. "schema": {
  3499. "$ref": "#/components/schemas/BadRequestError"
  3500. }
  3501. }
  3502. }
  3503. }
  3504. },
  3505. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3506. "summary": "Update PTY session",
  3507. "requestBody": {
  3508. "content": {
  3509. "application/json": {
  3510. "schema": {
  3511. "type": "object",
  3512. "properties": {
  3513. "title": {
  3514. "type": "string"
  3515. },
  3516. "size": {
  3517. "type": "object",
  3518. "properties": {
  3519. "rows": {
  3520. "type": "integer",
  3521. "exclusiveMinimum": 0
  3522. },
  3523. "cols": {
  3524. "type": "integer",
  3525. "exclusiveMinimum": 0
  3526. }
  3527. },
  3528. "required": ["rows", "cols"],
  3529. "additionalProperties": false
  3530. }
  3531. },
  3532. "additionalProperties": false
  3533. }
  3534. }
  3535. }
  3536. },
  3537. "x-codeSamples": [
  3538. {
  3539. "lang": "js",
  3540. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3541. }
  3542. ]
  3543. },
  3544. "delete": {
  3545. "tags": ["pty"],
  3546. "operationId": "pty.remove",
  3547. "parameters": [
  3548. {
  3549. "name": "ptyID",
  3550. "in": "path",
  3551. "schema": {
  3552. "type": "string",
  3553. "pattern": "^pty.*"
  3554. },
  3555. "required": true
  3556. },
  3557. {
  3558. "name": "directory",
  3559. "in": "query",
  3560. "schema": {
  3561. "type": "string"
  3562. },
  3563. "required": false
  3564. },
  3565. {
  3566. "name": "workspace",
  3567. "in": "query",
  3568. "schema": {
  3569. "type": "string"
  3570. },
  3571. "required": false
  3572. }
  3573. ],
  3574. "responses": {
  3575. "200": {
  3576. "description": "Session removed",
  3577. "content": {
  3578. "application/json": {
  3579. "schema": {
  3580. "type": "boolean",
  3581. "description": "Session removed"
  3582. }
  3583. }
  3584. }
  3585. },
  3586. "404": {
  3587. "description": "NotFoundError",
  3588. "content": {
  3589. "application/json": {
  3590. "schema": {
  3591. "$ref": "#/components/schemas/NotFoundError"
  3592. }
  3593. }
  3594. }
  3595. }
  3596. },
  3597. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3598. "summary": "Remove PTY session",
  3599. "x-codeSamples": [
  3600. {
  3601. "lang": "js",
  3602. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3603. }
  3604. ]
  3605. }
  3606. },
  3607. "/pty/{ptyID}/connect-token": {
  3608. "post": {
  3609. "tags": ["pty"],
  3610. "operationId": "pty.connectToken",
  3611. "parameters": [
  3612. {
  3613. "name": "ptyID",
  3614. "in": "path",
  3615. "schema": {
  3616. "type": "string",
  3617. "pattern": "^pty.*"
  3618. },
  3619. "required": true
  3620. },
  3621. {
  3622. "name": "directory",
  3623. "in": "query",
  3624. "schema": {
  3625. "type": "string"
  3626. },
  3627. "required": false
  3628. },
  3629. {
  3630. "name": "workspace",
  3631. "in": "query",
  3632. "schema": {
  3633. "type": "string"
  3634. },
  3635. "required": false
  3636. }
  3637. ],
  3638. "responses": {
  3639. "200": {
  3640. "description": "WebSocket connect token",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "type": "object",
  3645. "properties": {
  3646. "ticket": {
  3647. "type": "string"
  3648. },
  3649. "expires_in": {
  3650. "type": "integer",
  3651. "exclusiveMinimum": 0
  3652. }
  3653. },
  3654. "required": ["ticket", "expires_in"],
  3655. "additionalProperties": false,
  3656. "description": "WebSocket connect token"
  3657. }
  3658. }
  3659. }
  3660. },
  3661. "403": {
  3662. "description": "Forbidden",
  3663. "content": {
  3664. "application/json": {
  3665. "schema": {
  3666. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3667. }
  3668. }
  3669. }
  3670. },
  3671. "404": {
  3672. "description": "NotFoundError",
  3673. "content": {
  3674. "application/json": {
  3675. "schema": {
  3676. "$ref": "#/components/schemas/NotFoundError"
  3677. }
  3678. }
  3679. }
  3680. }
  3681. },
  3682. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3683. "summary": "Create PTY WebSocket token",
  3684. "x-codeSamples": [
  3685. {
  3686. "lang": "js",
  3687. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3688. }
  3689. ]
  3690. }
  3691. },
  3692. "/question": {
  3693. "get": {
  3694. "tags": ["question"],
  3695. "operationId": "question.list",
  3696. "parameters": [
  3697. {
  3698. "name": "directory",
  3699. "in": "query",
  3700. "schema": {
  3701. "type": "string"
  3702. },
  3703. "required": false
  3704. },
  3705. {
  3706. "name": "workspace",
  3707. "in": "query",
  3708. "schema": {
  3709. "type": "string"
  3710. },
  3711. "required": false
  3712. }
  3713. ],
  3714. "responses": {
  3715. "200": {
  3716. "description": "List of pending questions",
  3717. "content": {
  3718. "application/json": {
  3719. "schema": {
  3720. "type": "array",
  3721. "items": {
  3722. "$ref": "#/components/schemas/QuestionRequest"
  3723. },
  3724. "description": "List of pending questions"
  3725. }
  3726. }
  3727. }
  3728. }
  3729. },
  3730. "description": "Get all pending question requests across all sessions.",
  3731. "summary": "List pending questions",
  3732. "x-codeSamples": [
  3733. {
  3734. "lang": "js",
  3735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3736. }
  3737. ]
  3738. }
  3739. },
  3740. "/question/{requestID}/reply": {
  3741. "post": {
  3742. "tags": ["question"],
  3743. "operationId": "question.reply",
  3744. "parameters": [
  3745. {
  3746. "name": "requestID",
  3747. "in": "path",
  3748. "schema": {
  3749. "type": "string",
  3750. "pattern": "^que.*"
  3751. },
  3752. "required": true
  3753. },
  3754. {
  3755. "name": "directory",
  3756. "in": "query",
  3757. "schema": {
  3758. "type": "string"
  3759. },
  3760. "required": false
  3761. },
  3762. {
  3763. "name": "workspace",
  3764. "in": "query",
  3765. "schema": {
  3766. "type": "string"
  3767. },
  3768. "required": false
  3769. }
  3770. ],
  3771. "responses": {
  3772. "200": {
  3773. "description": "Question answered successfully",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "type": "boolean",
  3778. "description": "Question answered successfully"
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "400": {
  3784. "description": "Bad request",
  3785. "content": {
  3786. "application/json": {
  3787. "schema": {
  3788. "$ref": "#/components/schemas/BadRequestError"
  3789. }
  3790. }
  3791. }
  3792. },
  3793. "404": {
  3794. "description": "Not found",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/NotFoundError"
  3799. }
  3800. }
  3801. }
  3802. }
  3803. },
  3804. "description": "Provide answers to a question request from the AI assistant.",
  3805. "summary": "Reply to question request",
  3806. "requestBody": {
  3807. "content": {
  3808. "application/json": {
  3809. "schema": {
  3810. "type": "object",
  3811. "properties": {
  3812. "answers": {
  3813. "type": "array",
  3814. "items": {
  3815. "$ref": "#/components/schemas/QuestionAnswer"
  3816. },
  3817. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3818. }
  3819. },
  3820. "required": ["answers"],
  3821. "additionalProperties": false
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "x-codeSamples": [
  3827. {
  3828. "lang": "js",
  3829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3830. }
  3831. ]
  3832. }
  3833. },
  3834. "/question/{requestID}/reject": {
  3835. "post": {
  3836. "tags": ["question"],
  3837. "operationId": "question.reject",
  3838. "parameters": [
  3839. {
  3840. "name": "requestID",
  3841. "in": "path",
  3842. "schema": {
  3843. "type": "string",
  3844. "pattern": "^que.*"
  3845. },
  3846. "required": true
  3847. },
  3848. {
  3849. "name": "directory",
  3850. "in": "query",
  3851. "schema": {
  3852. "type": "string"
  3853. },
  3854. "required": false
  3855. },
  3856. {
  3857. "name": "workspace",
  3858. "in": "query",
  3859. "schema": {
  3860. "type": "string"
  3861. },
  3862. "required": false
  3863. }
  3864. ],
  3865. "responses": {
  3866. "200": {
  3867. "description": "Question rejected successfully",
  3868. "content": {
  3869. "application/json": {
  3870. "schema": {
  3871. "type": "boolean",
  3872. "description": "Question rejected successfully"
  3873. }
  3874. }
  3875. }
  3876. },
  3877. "400": {
  3878. "description": "Bad request",
  3879. "content": {
  3880. "application/json": {
  3881. "schema": {
  3882. "$ref": "#/components/schemas/BadRequestError"
  3883. }
  3884. }
  3885. }
  3886. },
  3887. "404": {
  3888. "description": "Not found",
  3889. "content": {
  3890. "application/json": {
  3891. "schema": {
  3892. "$ref": "#/components/schemas/NotFoundError"
  3893. }
  3894. }
  3895. }
  3896. }
  3897. },
  3898. "description": "Reject a question request from the AI assistant.",
  3899. "summary": "Reject question request",
  3900. "x-codeSamples": [
  3901. {
  3902. "lang": "js",
  3903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3904. }
  3905. ]
  3906. }
  3907. },
  3908. "/permission": {
  3909. "get": {
  3910. "tags": ["permission"],
  3911. "operationId": "permission.list",
  3912. "parameters": [
  3913. {
  3914. "name": "directory",
  3915. "in": "query",
  3916. "schema": {
  3917. "type": "string"
  3918. },
  3919. "required": false
  3920. },
  3921. {
  3922. "name": "workspace",
  3923. "in": "query",
  3924. "schema": {
  3925. "type": "string"
  3926. },
  3927. "required": false
  3928. }
  3929. ],
  3930. "responses": {
  3931. "200": {
  3932. "description": "List of pending permissions",
  3933. "content": {
  3934. "application/json": {
  3935. "schema": {
  3936. "type": "array",
  3937. "items": {
  3938. "$ref": "#/components/schemas/PermissionRequest"
  3939. },
  3940. "description": "List of pending permissions"
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Get all pending permission requests across all sessions.",
  3947. "summary": "List pending permissions",
  3948. "x-codeSamples": [
  3949. {
  3950. "lang": "js",
  3951. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3952. }
  3953. ]
  3954. }
  3955. },
  3956. "/permission/{requestID}/reply": {
  3957. "post": {
  3958. "tags": ["permission"],
  3959. "operationId": "permission.reply",
  3960. "parameters": [
  3961. {
  3962. "name": "requestID",
  3963. "in": "path",
  3964. "schema": {
  3965. "type": "string",
  3966. "pattern": "^per.*"
  3967. },
  3968. "required": true
  3969. },
  3970. {
  3971. "name": "directory",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. },
  3978. {
  3979. "name": "workspace",
  3980. "in": "query",
  3981. "schema": {
  3982. "type": "string"
  3983. },
  3984. "required": false
  3985. }
  3986. ],
  3987. "responses": {
  3988. "200": {
  3989. "description": "Permission processed successfully",
  3990. "content": {
  3991. "application/json": {
  3992. "schema": {
  3993. "type": "boolean",
  3994. "description": "Permission processed successfully"
  3995. }
  3996. }
  3997. }
  3998. },
  3999. "400": {
  4000. "description": "Bad request",
  4001. "content": {
  4002. "application/json": {
  4003. "schema": {
  4004. "$ref": "#/components/schemas/BadRequestError"
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "404": {
  4010. "description": "Not found",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "$ref": "#/components/schemas/NotFoundError"
  4015. }
  4016. }
  4017. }
  4018. }
  4019. },
  4020. "description": "Approve or deny a permission request from the AI assistant.",
  4021. "summary": "Respond to permission request",
  4022. "requestBody": {
  4023. "content": {
  4024. "application/json": {
  4025. "schema": {
  4026. "type": "object",
  4027. "properties": {
  4028. "reply": {
  4029. "type": "string",
  4030. "enum": ["once", "always", "reject"]
  4031. },
  4032. "message": {
  4033. "type": "string"
  4034. }
  4035. },
  4036. "required": ["reply"],
  4037. "additionalProperties": false
  4038. }
  4039. }
  4040. }
  4041. },
  4042. "x-codeSamples": [
  4043. {
  4044. "lang": "js",
  4045. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4046. }
  4047. ]
  4048. }
  4049. },
  4050. "/provider": {
  4051. "get": {
  4052. "tags": ["provider"],
  4053. "operationId": "provider.list",
  4054. "parameters": [
  4055. {
  4056. "name": "directory",
  4057. "in": "query",
  4058. "schema": {
  4059. "type": "string"
  4060. },
  4061. "required": false
  4062. },
  4063. {
  4064. "name": "workspace",
  4065. "in": "query",
  4066. "schema": {
  4067. "type": "string"
  4068. },
  4069. "required": false
  4070. }
  4071. ],
  4072. "responses": {
  4073. "200": {
  4074. "description": "List of providers",
  4075. "content": {
  4076. "application/json": {
  4077. "schema": {
  4078. "type": "object",
  4079. "properties": {
  4080. "all": {
  4081. "type": "array",
  4082. "items": {
  4083. "$ref": "#/components/schemas/Provider"
  4084. }
  4085. },
  4086. "default": {
  4087. "type": "object",
  4088. "additionalProperties": {
  4089. "type": "string"
  4090. }
  4091. },
  4092. "connected": {
  4093. "type": "array",
  4094. "items": {
  4095. "type": "string"
  4096. }
  4097. }
  4098. },
  4099. "required": ["all", "default", "connected"],
  4100. "additionalProperties": false,
  4101. "description": "List of providers"
  4102. }
  4103. }
  4104. }
  4105. }
  4106. },
  4107. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4108. "summary": "List providers",
  4109. "x-codeSamples": [
  4110. {
  4111. "lang": "js",
  4112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4113. }
  4114. ]
  4115. }
  4116. },
  4117. "/provider/auth": {
  4118. "get": {
  4119. "tags": ["provider"],
  4120. "operationId": "provider.auth",
  4121. "parameters": [
  4122. {
  4123. "name": "directory",
  4124. "in": "query",
  4125. "schema": {
  4126. "type": "string"
  4127. },
  4128. "required": false
  4129. },
  4130. {
  4131. "name": "workspace",
  4132. "in": "query",
  4133. "schema": {
  4134. "type": "string"
  4135. },
  4136. "required": false
  4137. }
  4138. ],
  4139. "responses": {
  4140. "200": {
  4141. "description": "Provider auth methods",
  4142. "content": {
  4143. "application/json": {
  4144. "schema": {
  4145. "type": "object",
  4146. "additionalProperties": {
  4147. "type": "array",
  4148. "items": {
  4149. "$ref": "#/components/schemas/ProviderAuthMethod"
  4150. }
  4151. },
  4152. "description": "Provider auth methods"
  4153. }
  4154. }
  4155. }
  4156. }
  4157. },
  4158. "description": "Retrieve available authentication methods for all AI providers.",
  4159. "summary": "Get provider auth methods",
  4160. "x-codeSamples": [
  4161. {
  4162. "lang": "js",
  4163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4164. }
  4165. ]
  4166. }
  4167. },
  4168. "/provider/{providerID}/oauth/authorize": {
  4169. "post": {
  4170. "tags": ["provider"],
  4171. "operationId": "provider.oauth.authorize",
  4172. "parameters": [
  4173. {
  4174. "name": "providerID",
  4175. "in": "path",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": true
  4180. },
  4181. {
  4182. "name": "directory",
  4183. "in": "query",
  4184. "schema": {
  4185. "type": "string"
  4186. },
  4187. "required": false
  4188. },
  4189. {
  4190. "name": "workspace",
  4191. "in": "query",
  4192. "schema": {
  4193. "type": "string"
  4194. },
  4195. "required": false
  4196. }
  4197. ],
  4198. "responses": {
  4199. "200": {
  4200. "description": "Authorization URL and method",
  4201. "content": {
  4202. "application/json": {
  4203. "schema": {
  4204. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4205. }
  4206. }
  4207. }
  4208. },
  4209. "400": {
  4210. "description": "Bad request",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "$ref": "#/components/schemas/BadRequestError"
  4215. }
  4216. }
  4217. }
  4218. }
  4219. },
  4220. "description": "Start the OAuth authorization flow for a provider.",
  4221. "summary": "Start OAuth authorization",
  4222. "requestBody": {
  4223. "content": {
  4224. "application/json": {
  4225. "schema": {
  4226. "type": "object",
  4227. "properties": {
  4228. "method": {
  4229. "type": "number",
  4230. "description": "Auth method index"
  4231. },
  4232. "inputs": {
  4233. "type": "object",
  4234. "additionalProperties": {
  4235. "type": "string"
  4236. }
  4237. }
  4238. },
  4239. "required": ["method"],
  4240. "additionalProperties": false
  4241. }
  4242. }
  4243. }
  4244. },
  4245. "x-codeSamples": [
  4246. {
  4247. "lang": "js",
  4248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4249. }
  4250. ]
  4251. }
  4252. },
  4253. "/provider/{providerID}/oauth/callback": {
  4254. "post": {
  4255. "tags": ["provider"],
  4256. "operationId": "provider.oauth.callback",
  4257. "parameters": [
  4258. {
  4259. "name": "providerID",
  4260. "in": "path",
  4261. "schema": {
  4262. "type": "string"
  4263. },
  4264. "required": true
  4265. },
  4266. {
  4267. "name": "directory",
  4268. "in": "query",
  4269. "schema": {
  4270. "type": "string"
  4271. },
  4272. "required": false
  4273. },
  4274. {
  4275. "name": "workspace",
  4276. "in": "query",
  4277. "schema": {
  4278. "type": "string"
  4279. },
  4280. "required": false
  4281. }
  4282. ],
  4283. "responses": {
  4284. "200": {
  4285. "description": "OAuth callback processed successfully",
  4286. "content": {
  4287. "application/json": {
  4288. "schema": {
  4289. "type": "boolean",
  4290. "description": "OAuth callback processed successfully"
  4291. }
  4292. }
  4293. }
  4294. },
  4295. "400": {
  4296. "description": "Bad request",
  4297. "content": {
  4298. "application/json": {
  4299. "schema": {
  4300. "$ref": "#/components/schemas/BadRequestError"
  4301. }
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "description": "Handle the OAuth callback from a provider after user authorization.",
  4307. "summary": "Handle OAuth callback",
  4308. "requestBody": {
  4309. "content": {
  4310. "application/json": {
  4311. "schema": {
  4312. "type": "object",
  4313. "properties": {
  4314. "method": {
  4315. "type": "number",
  4316. "description": "Auth method index"
  4317. },
  4318. "code": {
  4319. "type": "string"
  4320. }
  4321. },
  4322. "required": ["method"],
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/session": {
  4337. "get": {
  4338. "tags": ["session"],
  4339. "operationId": "session.list",
  4340. "parameters": [
  4341. {
  4342. "name": "directory",
  4343. "in": "query",
  4344. "schema": {
  4345. "type": "string"
  4346. },
  4347. "required": false
  4348. },
  4349. {
  4350. "name": "workspace",
  4351. "in": "query",
  4352. "schema": {
  4353. "type": "string"
  4354. },
  4355. "required": false
  4356. },
  4357. {
  4358. "name": "scope",
  4359. "in": "query",
  4360. "schema": {
  4361. "type": "string",
  4362. "enum": ["project"]
  4363. },
  4364. "required": false
  4365. },
  4366. {
  4367. "name": "path",
  4368. "in": "query",
  4369. "schema": {
  4370. "type": "string"
  4371. },
  4372. "required": false
  4373. },
  4374. {
  4375. "name": "roots",
  4376. "in": "query",
  4377. "schema": {
  4378. "anyOf": [
  4379. {
  4380. "type": "boolean"
  4381. },
  4382. {
  4383. "type": "string",
  4384. "enum": ["true", "false"]
  4385. }
  4386. ]
  4387. },
  4388. "required": false
  4389. },
  4390. {
  4391. "name": "start",
  4392. "in": "query",
  4393. "schema": {
  4394. "type": "number"
  4395. },
  4396. "required": false
  4397. },
  4398. {
  4399. "name": "search",
  4400. "in": "query",
  4401. "schema": {
  4402. "type": "string"
  4403. },
  4404. "required": false
  4405. },
  4406. {
  4407. "name": "limit",
  4408. "in": "query",
  4409. "schema": {
  4410. "type": "number"
  4411. },
  4412. "required": false
  4413. }
  4414. ],
  4415. "responses": {
  4416. "200": {
  4417. "description": "List of sessions",
  4418. "content": {
  4419. "application/json": {
  4420. "schema": {
  4421. "type": "array",
  4422. "items": {
  4423. "$ref": "#/components/schemas/Session"
  4424. },
  4425. "description": "List of sessions"
  4426. }
  4427. }
  4428. }
  4429. }
  4430. },
  4431. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4432. "summary": "List sessions",
  4433. "x-codeSamples": [
  4434. {
  4435. "lang": "js",
  4436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4437. }
  4438. ]
  4439. },
  4440. "post": {
  4441. "tags": ["session"],
  4442. "operationId": "session.create",
  4443. "parameters": [
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Successfully created session",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "$ref": "#/components/schemas/Session"
  4468. }
  4469. }
  4470. }
  4471. },
  4472. "400": {
  4473. "description": "Bad request",
  4474. "content": {
  4475. "application/json": {
  4476. "schema": {
  4477. "$ref": "#/components/schemas/BadRequestError"
  4478. }
  4479. }
  4480. }
  4481. }
  4482. },
  4483. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4484. "summary": "Create session",
  4485. "requestBody": {
  4486. "content": {
  4487. "application/json": {
  4488. "schema": {
  4489. "type": "object",
  4490. "properties": {
  4491. "parentID": {
  4492. "type": "string"
  4493. },
  4494. "title": {
  4495. "type": "string"
  4496. },
  4497. "agent": {
  4498. "type": "string"
  4499. },
  4500. "model": {
  4501. "type": "object",
  4502. "properties": {
  4503. "id": {
  4504. "type": "string"
  4505. },
  4506. "providerID": {
  4507. "type": "string"
  4508. },
  4509. "variant": {
  4510. "type": "string"
  4511. }
  4512. },
  4513. "required": ["id", "providerID"],
  4514. "additionalProperties": false
  4515. },
  4516. "permission": {
  4517. "$ref": "#/components/schemas/PermissionRuleset"
  4518. },
  4519. "workspaceID": {
  4520. "type": "string"
  4521. }
  4522. },
  4523. "additionalProperties": false
  4524. }
  4525. }
  4526. }
  4527. },
  4528. "x-codeSamples": [
  4529. {
  4530. "lang": "js",
  4531. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4532. }
  4533. ]
  4534. }
  4535. },
  4536. "/session/status": {
  4537. "get": {
  4538. "tags": ["session"],
  4539. "operationId": "session.status",
  4540. "parameters": [
  4541. {
  4542. "name": "directory",
  4543. "in": "query",
  4544. "schema": {
  4545. "type": "string"
  4546. },
  4547. "required": false
  4548. },
  4549. {
  4550. "name": "workspace",
  4551. "in": "query",
  4552. "schema": {
  4553. "type": "string"
  4554. },
  4555. "required": false
  4556. }
  4557. ],
  4558. "responses": {
  4559. "200": {
  4560. "description": "Get session status",
  4561. "content": {
  4562. "application/json": {
  4563. "schema": {
  4564. "type": "object",
  4565. "additionalProperties": {
  4566. "$ref": "#/components/schemas/SessionStatus"
  4567. },
  4568. "description": "Get session status"
  4569. }
  4570. }
  4571. }
  4572. },
  4573. "400": {
  4574. "description": "Bad request",
  4575. "content": {
  4576. "application/json": {
  4577. "schema": {
  4578. "$ref": "#/components/schemas/BadRequestError"
  4579. }
  4580. }
  4581. }
  4582. }
  4583. },
  4584. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4585. "summary": "Get session status",
  4586. "x-codeSamples": [
  4587. {
  4588. "lang": "js",
  4589. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4590. }
  4591. ]
  4592. }
  4593. },
  4594. "/session/{sessionID}": {
  4595. "get": {
  4596. "tags": ["session"],
  4597. "operationId": "session.get",
  4598. "parameters": [
  4599. {
  4600. "name": "sessionID",
  4601. "in": "path",
  4602. "schema": {
  4603. "type": "string",
  4604. "pattern": "^ses.*"
  4605. },
  4606. "required": true
  4607. },
  4608. {
  4609. "name": "directory",
  4610. "in": "query",
  4611. "schema": {
  4612. "type": "string"
  4613. },
  4614. "required": false
  4615. },
  4616. {
  4617. "name": "workspace",
  4618. "in": "query",
  4619. "schema": {
  4620. "type": "string"
  4621. },
  4622. "required": false
  4623. }
  4624. ],
  4625. "responses": {
  4626. "200": {
  4627. "description": "Get session",
  4628. "content": {
  4629. "application/json": {
  4630. "schema": {
  4631. "$ref": "#/components/schemas/Session"
  4632. }
  4633. }
  4634. }
  4635. },
  4636. "400": {
  4637. "description": "Bad request",
  4638. "content": {
  4639. "application/json": {
  4640. "schema": {
  4641. "$ref": "#/components/schemas/BadRequestError"
  4642. }
  4643. }
  4644. }
  4645. },
  4646. "404": {
  4647. "description": "NotFoundError",
  4648. "content": {
  4649. "application/json": {
  4650. "schema": {
  4651. "$ref": "#/components/schemas/NotFoundError"
  4652. }
  4653. }
  4654. }
  4655. }
  4656. },
  4657. "description": "Retrieve detailed information about a specific OpenCode session.",
  4658. "summary": "Get session",
  4659. "x-codeSamples": [
  4660. {
  4661. "lang": "js",
  4662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4663. }
  4664. ]
  4665. },
  4666. "delete": {
  4667. "tags": ["session"],
  4668. "operationId": "session.delete",
  4669. "parameters": [
  4670. {
  4671. "name": "sessionID",
  4672. "in": "path",
  4673. "schema": {
  4674. "type": "string",
  4675. "pattern": "^ses.*"
  4676. },
  4677. "required": true
  4678. },
  4679. {
  4680. "name": "directory",
  4681. "in": "query",
  4682. "schema": {
  4683. "type": "string"
  4684. },
  4685. "required": false
  4686. },
  4687. {
  4688. "name": "workspace",
  4689. "in": "query",
  4690. "schema": {
  4691. "type": "string"
  4692. },
  4693. "required": false
  4694. }
  4695. ],
  4696. "responses": {
  4697. "200": {
  4698. "description": "Successfully deleted session",
  4699. "content": {
  4700. "application/json": {
  4701. "schema": {
  4702. "type": "boolean",
  4703. "description": "Successfully deleted session"
  4704. }
  4705. }
  4706. }
  4707. },
  4708. "400": {
  4709. "description": "Bad request",
  4710. "content": {
  4711. "application/json": {
  4712. "schema": {
  4713. "$ref": "#/components/schemas/BadRequestError"
  4714. }
  4715. }
  4716. }
  4717. },
  4718. "404": {
  4719. "description": "NotFoundError",
  4720. "content": {
  4721. "application/json": {
  4722. "schema": {
  4723. "$ref": "#/components/schemas/NotFoundError"
  4724. }
  4725. }
  4726. }
  4727. }
  4728. },
  4729. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4730. "summary": "Delete session",
  4731. "x-codeSamples": [
  4732. {
  4733. "lang": "js",
  4734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4735. }
  4736. ]
  4737. },
  4738. "patch": {
  4739. "tags": ["session"],
  4740. "operationId": "session.update",
  4741. "parameters": [
  4742. {
  4743. "name": "sessionID",
  4744. "in": "path",
  4745. "schema": {
  4746. "type": "string",
  4747. "pattern": "^ses.*"
  4748. },
  4749. "required": true
  4750. },
  4751. {
  4752. "name": "directory",
  4753. "in": "query",
  4754. "schema": {
  4755. "type": "string"
  4756. },
  4757. "required": false
  4758. },
  4759. {
  4760. "name": "workspace",
  4761. "in": "query",
  4762. "schema": {
  4763. "type": "string"
  4764. },
  4765. "required": false
  4766. }
  4767. ],
  4768. "responses": {
  4769. "200": {
  4770. "description": "Successfully updated session",
  4771. "content": {
  4772. "application/json": {
  4773. "schema": {
  4774. "$ref": "#/components/schemas/Session"
  4775. }
  4776. }
  4777. }
  4778. },
  4779. "400": {
  4780. "description": "Bad request",
  4781. "content": {
  4782. "application/json": {
  4783. "schema": {
  4784. "$ref": "#/components/schemas/BadRequestError"
  4785. }
  4786. }
  4787. }
  4788. },
  4789. "404": {
  4790. "description": "NotFoundError",
  4791. "content": {
  4792. "application/json": {
  4793. "schema": {
  4794. "$ref": "#/components/schemas/NotFoundError"
  4795. }
  4796. }
  4797. }
  4798. }
  4799. },
  4800. "description": "Update properties of an existing session, such as title or other metadata.",
  4801. "summary": "Update session",
  4802. "requestBody": {
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "type": "object",
  4807. "properties": {
  4808. "title": {
  4809. "type": "string"
  4810. },
  4811. "permission": {
  4812. "$ref": "#/components/schemas/PermissionRuleset"
  4813. },
  4814. "time": {
  4815. "type": "object",
  4816. "properties": {
  4817. "archived": {
  4818. "type": "number"
  4819. }
  4820. },
  4821. "additionalProperties": false
  4822. }
  4823. },
  4824. "additionalProperties": false
  4825. }
  4826. }
  4827. }
  4828. },
  4829. "x-codeSamples": [
  4830. {
  4831. "lang": "js",
  4832. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4833. }
  4834. ]
  4835. }
  4836. },
  4837. "/session/{sessionID}/children": {
  4838. "get": {
  4839. "tags": ["session"],
  4840. "operationId": "session.children",
  4841. "parameters": [
  4842. {
  4843. "name": "sessionID",
  4844. "in": "path",
  4845. "schema": {
  4846. "type": "string",
  4847. "pattern": "^ses.*"
  4848. },
  4849. "required": true
  4850. },
  4851. {
  4852. "name": "directory",
  4853. "in": "query",
  4854. "schema": {
  4855. "type": "string"
  4856. },
  4857. "required": false
  4858. },
  4859. {
  4860. "name": "workspace",
  4861. "in": "query",
  4862. "schema": {
  4863. "type": "string"
  4864. },
  4865. "required": false
  4866. }
  4867. ],
  4868. "responses": {
  4869. "200": {
  4870. "description": "List of children",
  4871. "content": {
  4872. "application/json": {
  4873. "schema": {
  4874. "type": "array",
  4875. "items": {
  4876. "$ref": "#/components/schemas/Session"
  4877. },
  4878. "description": "List of children"
  4879. }
  4880. }
  4881. }
  4882. },
  4883. "400": {
  4884. "description": "Bad request",
  4885. "content": {
  4886. "application/json": {
  4887. "schema": {
  4888. "$ref": "#/components/schemas/BadRequestError"
  4889. }
  4890. }
  4891. }
  4892. },
  4893. "404": {
  4894. "description": "Not found",
  4895. "content": {
  4896. "application/json": {
  4897. "schema": {
  4898. "$ref": "#/components/schemas/NotFoundError"
  4899. }
  4900. }
  4901. }
  4902. }
  4903. },
  4904. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4905. "summary": "Get session children",
  4906. "x-codeSamples": [
  4907. {
  4908. "lang": "js",
  4909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4910. }
  4911. ]
  4912. }
  4913. },
  4914. "/session/{sessionID}/todo": {
  4915. "get": {
  4916. "tags": ["session"],
  4917. "operationId": "session.todo",
  4918. "parameters": [
  4919. {
  4920. "name": "sessionID",
  4921. "in": "path",
  4922. "schema": {
  4923. "type": "string",
  4924. "pattern": "^ses.*"
  4925. },
  4926. "required": true
  4927. },
  4928. {
  4929. "name": "directory",
  4930. "in": "query",
  4931. "schema": {
  4932. "type": "string"
  4933. },
  4934. "required": false
  4935. },
  4936. {
  4937. "name": "workspace",
  4938. "in": "query",
  4939. "schema": {
  4940. "type": "string"
  4941. },
  4942. "required": false
  4943. }
  4944. ],
  4945. "responses": {
  4946. "200": {
  4947. "description": "Todo list",
  4948. "content": {
  4949. "application/json": {
  4950. "schema": {
  4951. "type": "array",
  4952. "items": {
  4953. "$ref": "#/components/schemas/Todo"
  4954. },
  4955. "description": "Todo list"
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "400": {
  4961. "description": "Bad request",
  4962. "content": {
  4963. "application/json": {
  4964. "schema": {
  4965. "$ref": "#/components/schemas/BadRequestError"
  4966. }
  4967. }
  4968. }
  4969. },
  4970. "404": {
  4971. "description": "Not found",
  4972. "content": {
  4973. "application/json": {
  4974. "schema": {
  4975. "$ref": "#/components/schemas/NotFoundError"
  4976. }
  4977. }
  4978. }
  4979. }
  4980. },
  4981. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4982. "summary": "Get session todos",
  4983. "x-codeSamples": [
  4984. {
  4985. "lang": "js",
  4986. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4987. }
  4988. ]
  4989. }
  4990. },
  4991. "/session/{sessionID}/diff": {
  4992. "get": {
  4993. "tags": ["session"],
  4994. "operationId": "session.diff",
  4995. "parameters": [
  4996. {
  4997. "name": "sessionID",
  4998. "in": "path",
  4999. "schema": {
  5000. "type": "string",
  5001. "pattern": "^ses.*"
  5002. },
  5003. "required": true
  5004. },
  5005. {
  5006. "name": "directory",
  5007. "in": "query",
  5008. "schema": {
  5009. "type": "string"
  5010. },
  5011. "required": false
  5012. },
  5013. {
  5014. "name": "workspace",
  5015. "in": "query",
  5016. "schema": {
  5017. "type": "string"
  5018. },
  5019. "required": false
  5020. },
  5021. {
  5022. "name": "messageID",
  5023. "in": "query",
  5024. "schema": {
  5025. "type": "string",
  5026. "pattern": "^msg.*"
  5027. },
  5028. "required": false
  5029. }
  5030. ],
  5031. "responses": {
  5032. "200": {
  5033. "description": "Successfully retrieved diff",
  5034. "content": {
  5035. "application/json": {
  5036. "schema": {
  5037. "type": "array",
  5038. "items": {
  5039. "$ref": "#/components/schemas/SnapshotFileDiff"
  5040. },
  5041. "description": "Successfully retrieved diff"
  5042. }
  5043. }
  5044. }
  5045. }
  5046. },
  5047. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5048. "summary": "Get message diff",
  5049. "x-codeSamples": [
  5050. {
  5051. "lang": "js",
  5052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5053. }
  5054. ]
  5055. }
  5056. },
  5057. "/session/{sessionID}/message": {
  5058. "get": {
  5059. "tags": ["session"],
  5060. "operationId": "session.messages",
  5061. "parameters": [
  5062. {
  5063. "name": "sessionID",
  5064. "in": "path",
  5065. "schema": {
  5066. "type": "string",
  5067. "pattern": "^ses.*"
  5068. },
  5069. "required": true
  5070. },
  5071. {
  5072. "name": "directory",
  5073. "in": "query",
  5074. "schema": {
  5075. "type": "string"
  5076. },
  5077. "required": false
  5078. },
  5079. {
  5080. "name": "workspace",
  5081. "in": "query",
  5082. "schema": {
  5083. "type": "string"
  5084. },
  5085. "required": false
  5086. },
  5087. {
  5088. "name": "limit",
  5089. "in": "query",
  5090. "schema": {
  5091. "type": "integer",
  5092. "minimum": 0,
  5093. "maximum": 9007199254740991
  5094. },
  5095. "required": false
  5096. },
  5097. {
  5098. "name": "before",
  5099. "in": "query",
  5100. "schema": {
  5101. "type": "string"
  5102. },
  5103. "required": false
  5104. }
  5105. ],
  5106. "responses": {
  5107. "200": {
  5108. "description": "List of messages",
  5109. "content": {
  5110. "application/json": {
  5111. "schema": {
  5112. "type": "array",
  5113. "items": {
  5114. "type": "object",
  5115. "properties": {
  5116. "info": {
  5117. "$ref": "#/components/schemas/Message"
  5118. },
  5119. "parts": {
  5120. "type": "array",
  5121. "items": {
  5122. "$ref": "#/components/schemas/Part"
  5123. }
  5124. }
  5125. },
  5126. "required": ["info", "parts"],
  5127. "additionalProperties": false
  5128. },
  5129. "description": "List of messages"
  5130. }
  5131. }
  5132. }
  5133. },
  5134. "400": {
  5135. "description": "Bad request",
  5136. "content": {
  5137. "application/json": {
  5138. "schema": {
  5139. "$ref": "#/components/schemas/BadRequestError"
  5140. }
  5141. }
  5142. }
  5143. },
  5144. "404": {
  5145. "description": "NotFoundError",
  5146. "content": {
  5147. "application/json": {
  5148. "schema": {
  5149. "$ref": "#/components/schemas/NotFoundError"
  5150. }
  5151. }
  5152. }
  5153. }
  5154. },
  5155. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5156. "summary": "Get session messages",
  5157. "x-codeSamples": [
  5158. {
  5159. "lang": "js",
  5160. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5161. }
  5162. ]
  5163. },
  5164. "post": {
  5165. "tags": ["session"],
  5166. "operationId": "session.prompt",
  5167. "parameters": [
  5168. {
  5169. "name": "sessionID",
  5170. "in": "path",
  5171. "schema": {
  5172. "type": "string",
  5173. "pattern": "^ses.*"
  5174. },
  5175. "required": true
  5176. },
  5177. {
  5178. "name": "directory",
  5179. "in": "query",
  5180. "schema": {
  5181. "type": "string"
  5182. },
  5183. "required": false
  5184. },
  5185. {
  5186. "name": "workspace",
  5187. "in": "query",
  5188. "schema": {
  5189. "type": "string"
  5190. },
  5191. "required": false
  5192. }
  5193. ],
  5194. "responses": {
  5195. "200": {
  5196. "description": "Created message",
  5197. "content": {
  5198. "application/json": {
  5199. "schema": {
  5200. "type": "object",
  5201. "required": ["info", "parts"],
  5202. "properties": {
  5203. "info": {
  5204. "$ref": "#/components/schemas/AssistantMessage"
  5205. },
  5206. "parts": {
  5207. "type": "array",
  5208. "items": {
  5209. "$ref": "#/components/schemas/Part"
  5210. }
  5211. }
  5212. }
  5213. }
  5214. }
  5215. }
  5216. },
  5217. "400": {
  5218. "description": "Bad request",
  5219. "content": {
  5220. "application/json": {
  5221. "schema": {
  5222. "$ref": "#/components/schemas/BadRequestError"
  5223. }
  5224. }
  5225. }
  5226. },
  5227. "404": {
  5228. "description": "Not found",
  5229. "content": {
  5230. "application/json": {
  5231. "schema": {
  5232. "$ref": "#/components/schemas/NotFoundError"
  5233. }
  5234. }
  5235. }
  5236. }
  5237. },
  5238. "description": "Create and send a new message to a session, streaming the AI response.",
  5239. "summary": "Send message",
  5240. "requestBody": {
  5241. "content": {
  5242. "application/json": {
  5243. "schema": {
  5244. "type": "object",
  5245. "properties": {
  5246. "messageID": {
  5247. "type": "string"
  5248. },
  5249. "model": {
  5250. "type": "object",
  5251. "properties": {
  5252. "providerID": {
  5253. "type": "string"
  5254. },
  5255. "modelID": {
  5256. "type": "string"
  5257. }
  5258. },
  5259. "required": ["providerID", "modelID"],
  5260. "additionalProperties": false
  5261. },
  5262. "agent": {
  5263. "type": "string"
  5264. },
  5265. "noReply": {
  5266. "type": "boolean"
  5267. },
  5268. "tools": {
  5269. "type": "object",
  5270. "additionalProperties": {
  5271. "type": "boolean"
  5272. }
  5273. },
  5274. "format": {
  5275. "$ref": "#/components/schemas/OutputFormat"
  5276. },
  5277. "system": {
  5278. "type": "string"
  5279. },
  5280. "variant": {
  5281. "type": "string"
  5282. },
  5283. "parts": {
  5284. "type": "array",
  5285. "items": {
  5286. "anyOf": [
  5287. {
  5288. "$ref": "#/components/schemas/TextPartInput"
  5289. },
  5290. {
  5291. "$ref": "#/components/schemas/FilePartInput"
  5292. },
  5293. {
  5294. "$ref": "#/components/schemas/AgentPartInput"
  5295. },
  5296. {
  5297. "$ref": "#/components/schemas/SubtaskPartInput"
  5298. }
  5299. ]
  5300. }
  5301. }
  5302. },
  5303. "required": ["parts"],
  5304. "additionalProperties": false
  5305. }
  5306. }
  5307. }
  5308. },
  5309. "x-codeSamples": [
  5310. {
  5311. "lang": "js",
  5312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5313. }
  5314. ]
  5315. }
  5316. },
  5317. "/session/{sessionID}/message/{messageID}": {
  5318. "get": {
  5319. "tags": ["session"],
  5320. "operationId": "session.message",
  5321. "parameters": [
  5322. {
  5323. "name": "sessionID",
  5324. "in": "path",
  5325. "schema": {
  5326. "type": "string",
  5327. "pattern": "^ses.*"
  5328. },
  5329. "required": true
  5330. },
  5331. {
  5332. "name": "messageID",
  5333. "in": "path",
  5334. "schema": {
  5335. "type": "string",
  5336. "pattern": "^msg.*"
  5337. },
  5338. "required": true
  5339. },
  5340. {
  5341. "name": "directory",
  5342. "in": "query",
  5343. "schema": {
  5344. "type": "string"
  5345. },
  5346. "required": false
  5347. },
  5348. {
  5349. "name": "workspace",
  5350. "in": "query",
  5351. "schema": {
  5352. "type": "string"
  5353. },
  5354. "required": false
  5355. }
  5356. ],
  5357. "responses": {
  5358. "200": {
  5359. "description": "Message",
  5360. "content": {
  5361. "application/json": {
  5362. "schema": {
  5363. "type": "object",
  5364. "properties": {
  5365. "info": {
  5366. "$ref": "#/components/schemas/Message"
  5367. },
  5368. "parts": {
  5369. "type": "array",
  5370. "items": {
  5371. "$ref": "#/components/schemas/Part"
  5372. }
  5373. }
  5374. },
  5375. "required": ["info", "parts"],
  5376. "additionalProperties": false,
  5377. "description": "Message"
  5378. }
  5379. }
  5380. }
  5381. },
  5382. "400": {
  5383. "description": "Bad request",
  5384. "content": {
  5385. "application/json": {
  5386. "schema": {
  5387. "$ref": "#/components/schemas/BadRequestError"
  5388. }
  5389. }
  5390. }
  5391. },
  5392. "404": {
  5393. "description": "NotFoundError",
  5394. "content": {
  5395. "application/json": {
  5396. "schema": {
  5397. "$ref": "#/components/schemas/NotFoundError"
  5398. }
  5399. }
  5400. }
  5401. }
  5402. },
  5403. "description": "Retrieve a specific message from a session by its message ID.",
  5404. "summary": "Get message",
  5405. "x-codeSamples": [
  5406. {
  5407. "lang": "js",
  5408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5409. }
  5410. ]
  5411. },
  5412. "delete": {
  5413. "tags": ["session"],
  5414. "operationId": "session.deleteMessage",
  5415. "parameters": [
  5416. {
  5417. "name": "sessionID",
  5418. "in": "path",
  5419. "schema": {
  5420. "type": "string",
  5421. "pattern": "^ses.*"
  5422. },
  5423. "required": true
  5424. },
  5425. {
  5426. "name": "messageID",
  5427. "in": "path",
  5428. "schema": {
  5429. "type": "string",
  5430. "pattern": "^msg.*"
  5431. },
  5432. "required": true
  5433. },
  5434. {
  5435. "name": "directory",
  5436. "in": "query",
  5437. "schema": {
  5438. "type": "string"
  5439. },
  5440. "required": false
  5441. },
  5442. {
  5443. "name": "workspace",
  5444. "in": "query",
  5445. "schema": {
  5446. "type": "string"
  5447. },
  5448. "required": false
  5449. }
  5450. ],
  5451. "responses": {
  5452. "200": {
  5453. "description": "Successfully deleted message",
  5454. "content": {
  5455. "application/json": {
  5456. "schema": {
  5457. "type": "boolean",
  5458. "description": "Successfully deleted message"
  5459. }
  5460. }
  5461. }
  5462. },
  5463. "400": {
  5464. "description": "Bad request",
  5465. "content": {
  5466. "application/json": {
  5467. "schema": {
  5468. "$ref": "#/components/schemas/BadRequestError"
  5469. }
  5470. }
  5471. }
  5472. },
  5473. "404": {
  5474. "description": "Not found",
  5475. "content": {
  5476. "application/json": {
  5477. "schema": {
  5478. "$ref": "#/components/schemas/NotFoundError"
  5479. }
  5480. }
  5481. }
  5482. }
  5483. },
  5484. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5485. "summary": "Delete message",
  5486. "x-codeSamples": [
  5487. {
  5488. "lang": "js",
  5489. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5490. }
  5491. ]
  5492. }
  5493. },
  5494. "/session/{sessionID}/fork": {
  5495. "post": {
  5496. "tags": ["session"],
  5497. "operationId": "session.fork",
  5498. "parameters": [
  5499. {
  5500. "name": "sessionID",
  5501. "in": "path",
  5502. "schema": {
  5503. "type": "string",
  5504. "pattern": "^ses.*"
  5505. },
  5506. "required": true
  5507. },
  5508. {
  5509. "name": "directory",
  5510. "in": "query",
  5511. "schema": {
  5512. "type": "string"
  5513. },
  5514. "required": false
  5515. },
  5516. {
  5517. "name": "workspace",
  5518. "in": "query",
  5519. "schema": {
  5520. "type": "string"
  5521. },
  5522. "required": false
  5523. }
  5524. ],
  5525. "responses": {
  5526. "200": {
  5527. "description": "200",
  5528. "content": {
  5529. "application/json": {
  5530. "schema": {
  5531. "$ref": "#/components/schemas/Session"
  5532. }
  5533. }
  5534. }
  5535. },
  5536. "404": {
  5537. "description": "NotFoundError",
  5538. "content": {
  5539. "application/json": {
  5540. "schema": {
  5541. "$ref": "#/components/schemas/NotFoundError"
  5542. }
  5543. }
  5544. }
  5545. }
  5546. },
  5547. "description": "Create a new session by forking an existing session at a specific message point.",
  5548. "summary": "Fork session",
  5549. "requestBody": {
  5550. "content": {
  5551. "application/json": {
  5552. "schema": {
  5553. "type": "object",
  5554. "properties": {
  5555. "messageID": {
  5556. "type": "string"
  5557. }
  5558. },
  5559. "additionalProperties": false
  5560. }
  5561. }
  5562. }
  5563. },
  5564. "x-codeSamples": [
  5565. {
  5566. "lang": "js",
  5567. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5568. }
  5569. ]
  5570. }
  5571. },
  5572. "/session/{sessionID}/abort": {
  5573. "post": {
  5574. "tags": ["session"],
  5575. "operationId": "session.abort",
  5576. "parameters": [
  5577. {
  5578. "name": "sessionID",
  5579. "in": "path",
  5580. "schema": {
  5581. "type": "string",
  5582. "pattern": "^ses.*"
  5583. },
  5584. "required": true
  5585. },
  5586. {
  5587. "name": "directory",
  5588. "in": "query",
  5589. "schema": {
  5590. "type": "string"
  5591. },
  5592. "required": false
  5593. },
  5594. {
  5595. "name": "workspace",
  5596. "in": "query",
  5597. "schema": {
  5598. "type": "string"
  5599. },
  5600. "required": false
  5601. }
  5602. ],
  5603. "responses": {
  5604. "200": {
  5605. "description": "Aborted session",
  5606. "content": {
  5607. "application/json": {
  5608. "schema": {
  5609. "type": "boolean",
  5610. "description": "Aborted session"
  5611. }
  5612. }
  5613. }
  5614. },
  5615. "400": {
  5616. "description": "Bad request",
  5617. "content": {
  5618. "application/json": {
  5619. "schema": {
  5620. "$ref": "#/components/schemas/BadRequestError"
  5621. }
  5622. }
  5623. }
  5624. },
  5625. "404": {
  5626. "description": "Not found",
  5627. "content": {
  5628. "application/json": {
  5629. "schema": {
  5630. "$ref": "#/components/schemas/NotFoundError"
  5631. }
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5637. "summary": "Abort session",
  5638. "x-codeSamples": [
  5639. {
  5640. "lang": "js",
  5641. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5642. }
  5643. ]
  5644. }
  5645. },
  5646. "/session/{sessionID}/init": {
  5647. "post": {
  5648. "tags": ["session"],
  5649. "operationId": "session.init",
  5650. "parameters": [
  5651. {
  5652. "name": "sessionID",
  5653. "in": "path",
  5654. "schema": {
  5655. "type": "string",
  5656. "pattern": "^ses.*"
  5657. },
  5658. "required": true
  5659. },
  5660. {
  5661. "name": "directory",
  5662. "in": "query",
  5663. "schema": {
  5664. "type": "string"
  5665. },
  5666. "required": false
  5667. },
  5668. {
  5669. "name": "workspace",
  5670. "in": "query",
  5671. "schema": {
  5672. "type": "string"
  5673. },
  5674. "required": false
  5675. }
  5676. ],
  5677. "responses": {
  5678. "200": {
  5679. "description": "200",
  5680. "content": {
  5681. "application/json": {
  5682. "schema": {
  5683. "type": "boolean",
  5684. "description": "200"
  5685. }
  5686. }
  5687. }
  5688. },
  5689. "400": {
  5690. "description": "Bad request",
  5691. "content": {
  5692. "application/json": {
  5693. "schema": {
  5694. "$ref": "#/components/schemas/BadRequestError"
  5695. }
  5696. }
  5697. }
  5698. },
  5699. "404": {
  5700. "description": "Not found",
  5701. "content": {
  5702. "application/json": {
  5703. "schema": {
  5704. "$ref": "#/components/schemas/NotFoundError"
  5705. }
  5706. }
  5707. }
  5708. }
  5709. },
  5710. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5711. "summary": "Initialize session",
  5712. "requestBody": {
  5713. "content": {
  5714. "application/json": {
  5715. "schema": {
  5716. "type": "object",
  5717. "properties": {
  5718. "modelID": {
  5719. "type": "string"
  5720. },
  5721. "providerID": {
  5722. "type": "string"
  5723. },
  5724. "messageID": {
  5725. "type": "string"
  5726. }
  5727. },
  5728. "required": ["modelID", "providerID", "messageID"],
  5729. "additionalProperties": false
  5730. }
  5731. }
  5732. }
  5733. },
  5734. "x-codeSamples": [
  5735. {
  5736. "lang": "js",
  5737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5738. }
  5739. ]
  5740. }
  5741. },
  5742. "/session/{sessionID}/share": {
  5743. "post": {
  5744. "tags": ["session"],
  5745. "operationId": "session.share",
  5746. "parameters": [
  5747. {
  5748. "name": "sessionID",
  5749. "in": "path",
  5750. "schema": {
  5751. "type": "string",
  5752. "pattern": "^ses.*"
  5753. },
  5754. "required": true
  5755. },
  5756. {
  5757. "name": "directory",
  5758. "in": "query",
  5759. "schema": {
  5760. "type": "string"
  5761. },
  5762. "required": false
  5763. },
  5764. {
  5765. "name": "workspace",
  5766. "in": "query",
  5767. "schema": {
  5768. "type": "string"
  5769. },
  5770. "required": false
  5771. }
  5772. ],
  5773. "responses": {
  5774. "200": {
  5775. "description": "Successfully shared session",
  5776. "content": {
  5777. "application/json": {
  5778. "schema": {
  5779. "$ref": "#/components/schemas/Session"
  5780. }
  5781. }
  5782. }
  5783. },
  5784. "404": {
  5785. "description": "NotFoundError",
  5786. "content": {
  5787. "application/json": {
  5788. "schema": {
  5789. "$ref": "#/components/schemas/NotFoundError"
  5790. }
  5791. }
  5792. }
  5793. },
  5794. "500": {
  5795. "description": "InternalServerError",
  5796. "content": {
  5797. "application/json": {
  5798. "schema": {
  5799. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5800. }
  5801. }
  5802. }
  5803. }
  5804. },
  5805. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5806. "summary": "Share session",
  5807. "x-codeSamples": [
  5808. {
  5809. "lang": "js",
  5810. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5811. }
  5812. ]
  5813. },
  5814. "delete": {
  5815. "tags": ["session"],
  5816. "operationId": "session.unshare",
  5817. "parameters": [
  5818. {
  5819. "name": "sessionID",
  5820. "in": "path",
  5821. "schema": {
  5822. "type": "string",
  5823. "pattern": "^ses.*"
  5824. },
  5825. "required": true
  5826. },
  5827. {
  5828. "name": "directory",
  5829. "in": "query",
  5830. "schema": {
  5831. "type": "string"
  5832. },
  5833. "required": false
  5834. },
  5835. {
  5836. "name": "workspace",
  5837. "in": "query",
  5838. "schema": {
  5839. "type": "string"
  5840. },
  5841. "required": false
  5842. }
  5843. ],
  5844. "responses": {
  5845. "200": {
  5846. "description": "Successfully unshared session",
  5847. "content": {
  5848. "application/json": {
  5849. "schema": {
  5850. "$ref": "#/components/schemas/Session"
  5851. }
  5852. }
  5853. }
  5854. },
  5855. "404": {
  5856. "description": "NotFoundError",
  5857. "content": {
  5858. "application/json": {
  5859. "schema": {
  5860. "$ref": "#/components/schemas/NotFoundError"
  5861. }
  5862. }
  5863. }
  5864. },
  5865. "500": {
  5866. "description": "InternalServerError",
  5867. "content": {
  5868. "application/json": {
  5869. "schema": {
  5870. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5871. }
  5872. }
  5873. }
  5874. }
  5875. },
  5876. "description": "Remove the shareable link for a session, making it private again.",
  5877. "summary": "Unshare session",
  5878. "x-codeSamples": [
  5879. {
  5880. "lang": "js",
  5881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5882. }
  5883. ]
  5884. }
  5885. },
  5886. "/session/{sessionID}/summarize": {
  5887. "post": {
  5888. "tags": ["session"],
  5889. "operationId": "session.summarize",
  5890. "parameters": [
  5891. {
  5892. "name": "sessionID",
  5893. "in": "path",
  5894. "schema": {
  5895. "type": "string",
  5896. "pattern": "^ses.*"
  5897. },
  5898. "required": true
  5899. },
  5900. {
  5901. "name": "directory",
  5902. "in": "query",
  5903. "schema": {
  5904. "type": "string"
  5905. },
  5906. "required": false
  5907. },
  5908. {
  5909. "name": "workspace",
  5910. "in": "query",
  5911. "schema": {
  5912. "type": "string"
  5913. },
  5914. "required": false
  5915. }
  5916. ],
  5917. "responses": {
  5918. "200": {
  5919. "description": "Summarized session",
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "boolean",
  5924. "description": "Summarized session"
  5925. }
  5926. }
  5927. }
  5928. },
  5929. "400": {
  5930. "description": "Bad request",
  5931. "content": {
  5932. "application/json": {
  5933. "schema": {
  5934. "$ref": "#/components/schemas/BadRequestError"
  5935. }
  5936. }
  5937. }
  5938. },
  5939. "404": {
  5940. "description": "NotFoundError",
  5941. "content": {
  5942. "application/json": {
  5943. "schema": {
  5944. "$ref": "#/components/schemas/NotFoundError"
  5945. }
  5946. }
  5947. }
  5948. }
  5949. },
  5950. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5951. "summary": "Summarize session",
  5952. "requestBody": {
  5953. "content": {
  5954. "application/json": {
  5955. "schema": {
  5956. "type": "object",
  5957. "properties": {
  5958. "providerID": {
  5959. "type": "string"
  5960. },
  5961. "modelID": {
  5962. "type": "string"
  5963. },
  5964. "auto": {
  5965. "type": "boolean"
  5966. }
  5967. },
  5968. "required": ["providerID", "modelID"],
  5969. "additionalProperties": false
  5970. }
  5971. }
  5972. }
  5973. },
  5974. "x-codeSamples": [
  5975. {
  5976. "lang": "js",
  5977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5978. }
  5979. ]
  5980. }
  5981. },
  5982. "/session/{sessionID}/prompt_async": {
  5983. "post": {
  5984. "tags": ["session"],
  5985. "operationId": "session.prompt_async",
  5986. "parameters": [
  5987. {
  5988. "name": "sessionID",
  5989. "in": "path",
  5990. "schema": {
  5991. "type": "string",
  5992. "pattern": "^ses.*"
  5993. },
  5994. "required": true
  5995. },
  5996. {
  5997. "name": "directory",
  5998. "in": "query",
  5999. "schema": {
  6000. "type": "string"
  6001. },
  6002. "required": false
  6003. },
  6004. {
  6005. "name": "workspace",
  6006. "in": "query",
  6007. "schema": {
  6008. "type": "string"
  6009. },
  6010. "required": false
  6011. }
  6012. ],
  6013. "responses": {
  6014. "204": {
  6015. "description": "Prompt accepted"
  6016. },
  6017. "400": {
  6018. "description": "Bad request",
  6019. "content": {
  6020. "application/json": {
  6021. "schema": {
  6022. "$ref": "#/components/schemas/BadRequestError"
  6023. }
  6024. }
  6025. }
  6026. },
  6027. "404": {
  6028. "description": "Not found",
  6029. "content": {
  6030. "application/json": {
  6031. "schema": {
  6032. "$ref": "#/components/schemas/NotFoundError"
  6033. }
  6034. }
  6035. }
  6036. }
  6037. },
  6038. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6039. "summary": "Send async message",
  6040. "requestBody": {
  6041. "content": {
  6042. "application/json": {
  6043. "schema": {
  6044. "type": "object",
  6045. "properties": {
  6046. "messageID": {
  6047. "type": "string"
  6048. },
  6049. "model": {
  6050. "type": "object",
  6051. "properties": {
  6052. "providerID": {
  6053. "type": "string"
  6054. },
  6055. "modelID": {
  6056. "type": "string"
  6057. }
  6058. },
  6059. "required": ["providerID", "modelID"],
  6060. "additionalProperties": false
  6061. },
  6062. "agent": {
  6063. "type": "string"
  6064. },
  6065. "noReply": {
  6066. "type": "boolean"
  6067. },
  6068. "tools": {
  6069. "type": "object",
  6070. "additionalProperties": {
  6071. "type": "boolean"
  6072. }
  6073. },
  6074. "format": {
  6075. "$ref": "#/components/schemas/OutputFormat"
  6076. },
  6077. "system": {
  6078. "type": "string"
  6079. },
  6080. "variant": {
  6081. "type": "string"
  6082. },
  6083. "parts": {
  6084. "type": "array",
  6085. "items": {
  6086. "anyOf": [
  6087. {
  6088. "$ref": "#/components/schemas/TextPartInput"
  6089. },
  6090. {
  6091. "$ref": "#/components/schemas/FilePartInput"
  6092. },
  6093. {
  6094. "$ref": "#/components/schemas/AgentPartInput"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/SubtaskPartInput"
  6098. }
  6099. ]
  6100. }
  6101. }
  6102. },
  6103. "required": ["parts"],
  6104. "additionalProperties": false
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "x-codeSamples": [
  6110. {
  6111. "lang": "js",
  6112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6113. }
  6114. ]
  6115. }
  6116. },
  6117. "/session/{sessionID}/command": {
  6118. "post": {
  6119. "tags": ["session"],
  6120. "operationId": "session.command",
  6121. "parameters": [
  6122. {
  6123. "name": "sessionID",
  6124. "in": "path",
  6125. "schema": {
  6126. "type": "string",
  6127. "pattern": "^ses.*"
  6128. },
  6129. "required": true
  6130. },
  6131. {
  6132. "name": "directory",
  6133. "in": "query",
  6134. "schema": {
  6135. "type": "string"
  6136. },
  6137. "required": false
  6138. },
  6139. {
  6140. "name": "workspace",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  6146. }
  6147. ],
  6148. "responses": {
  6149. "200": {
  6150. "description": "Created message",
  6151. "content": {
  6152. "application/json": {
  6153. "schema": {
  6154. "type": "object",
  6155. "required": ["info", "parts"],
  6156. "properties": {
  6157. "info": {
  6158. "$ref": "#/components/schemas/AssistantMessage"
  6159. },
  6160. "parts": {
  6161. "type": "array",
  6162. "items": {
  6163. "$ref": "#/components/schemas/Part"
  6164. }
  6165. }
  6166. }
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "400": {
  6172. "description": "Bad request",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "$ref": "#/components/schemas/BadRequestError"
  6177. }
  6178. }
  6179. }
  6180. },
  6181. "404": {
  6182. "description": "Not found",
  6183. "content": {
  6184. "application/json": {
  6185. "schema": {
  6186. "$ref": "#/components/schemas/NotFoundError"
  6187. }
  6188. }
  6189. }
  6190. }
  6191. },
  6192. "description": "Send a new command to a session for execution by the AI assistant.",
  6193. "summary": "Send command",
  6194. "requestBody": {
  6195. "content": {
  6196. "application/json": {
  6197. "schema": {
  6198. "type": "object",
  6199. "properties": {
  6200. "messageID": {
  6201. "type": "string"
  6202. },
  6203. "agent": {
  6204. "type": "string"
  6205. },
  6206. "model": {
  6207. "type": "string"
  6208. },
  6209. "arguments": {
  6210. "type": "string"
  6211. },
  6212. "command": {
  6213. "type": "string"
  6214. },
  6215. "variant": {
  6216. "type": "string"
  6217. },
  6218. "parts": {
  6219. "type": "array",
  6220. "items": {
  6221. "type": "object",
  6222. "properties": {
  6223. "id": {
  6224. "type": "string"
  6225. },
  6226. "type": {
  6227. "type": "string",
  6228. "enum": ["file"]
  6229. },
  6230. "mime": {
  6231. "type": "string"
  6232. },
  6233. "filename": {
  6234. "type": "string"
  6235. },
  6236. "url": {
  6237. "type": "string"
  6238. },
  6239. "source": {
  6240. "$ref": "#/components/schemas/FilePartSource"
  6241. }
  6242. },
  6243. "required": ["type", "mime", "url"],
  6244. "additionalProperties": false
  6245. }
  6246. }
  6247. },
  6248. "required": ["arguments", "command"],
  6249. "additionalProperties": false
  6250. }
  6251. }
  6252. }
  6253. },
  6254. "x-codeSamples": [
  6255. {
  6256. "lang": "js",
  6257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6258. }
  6259. ]
  6260. }
  6261. },
  6262. "/session/{sessionID}/shell": {
  6263. "post": {
  6264. "tags": ["session"],
  6265. "operationId": "session.shell",
  6266. "parameters": [
  6267. {
  6268. "name": "sessionID",
  6269. "in": "path",
  6270. "schema": {
  6271. "type": "string",
  6272. "pattern": "^ses.*"
  6273. },
  6274. "required": true
  6275. },
  6276. {
  6277. "name": "directory",
  6278. "in": "query",
  6279. "schema": {
  6280. "type": "string"
  6281. },
  6282. "required": false
  6283. },
  6284. {
  6285. "name": "workspace",
  6286. "in": "query",
  6287. "schema": {
  6288. "type": "string"
  6289. },
  6290. "required": false
  6291. }
  6292. ],
  6293. "responses": {
  6294. "200": {
  6295. "description": "Created message",
  6296. "content": {
  6297. "application/json": {
  6298. "schema": {
  6299. "type": "object",
  6300. "properties": {
  6301. "info": {
  6302. "$ref": "#/components/schemas/Message"
  6303. },
  6304. "parts": {
  6305. "type": "array",
  6306. "items": {
  6307. "$ref": "#/components/schemas/Part"
  6308. }
  6309. }
  6310. },
  6311. "required": ["info", "parts"],
  6312. "additionalProperties": false,
  6313. "description": "Created message"
  6314. }
  6315. }
  6316. }
  6317. },
  6318. "400": {
  6319. "description": "Bad request",
  6320. "content": {
  6321. "application/json": {
  6322. "schema": {
  6323. "$ref": "#/components/schemas/BadRequestError"
  6324. }
  6325. }
  6326. }
  6327. },
  6328. "404": {
  6329. "description": "Not found",
  6330. "content": {
  6331. "application/json": {
  6332. "schema": {
  6333. "$ref": "#/components/schemas/NotFoundError"
  6334. }
  6335. }
  6336. }
  6337. }
  6338. },
  6339. "description": "Execute a shell command within the session context and return the AI's response.",
  6340. "summary": "Run shell command",
  6341. "requestBody": {
  6342. "content": {
  6343. "application/json": {
  6344. "schema": {
  6345. "type": "object",
  6346. "properties": {
  6347. "messageID": {
  6348. "type": "string"
  6349. },
  6350. "agent": {
  6351. "type": "string"
  6352. },
  6353. "model": {
  6354. "type": "object",
  6355. "properties": {
  6356. "providerID": {
  6357. "type": "string"
  6358. },
  6359. "modelID": {
  6360. "type": "string"
  6361. }
  6362. },
  6363. "required": ["providerID", "modelID"],
  6364. "additionalProperties": false
  6365. },
  6366. "command": {
  6367. "type": "string"
  6368. }
  6369. },
  6370. "required": ["agent", "command"],
  6371. "additionalProperties": false
  6372. }
  6373. }
  6374. }
  6375. },
  6376. "x-codeSamples": [
  6377. {
  6378. "lang": "js",
  6379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6380. }
  6381. ]
  6382. }
  6383. },
  6384. "/session/{sessionID}/revert": {
  6385. "post": {
  6386. "tags": ["session"],
  6387. "operationId": "session.revert",
  6388. "parameters": [
  6389. {
  6390. "name": "sessionID",
  6391. "in": "path",
  6392. "schema": {
  6393. "type": "string",
  6394. "pattern": "^ses.*"
  6395. },
  6396. "required": true
  6397. },
  6398. {
  6399. "name": "directory",
  6400. "in": "query",
  6401. "schema": {
  6402. "type": "string"
  6403. },
  6404. "required": false
  6405. },
  6406. {
  6407. "name": "workspace",
  6408. "in": "query",
  6409. "schema": {
  6410. "type": "string"
  6411. },
  6412. "required": false
  6413. }
  6414. ],
  6415. "responses": {
  6416. "200": {
  6417. "description": "Updated session",
  6418. "content": {
  6419. "application/json": {
  6420. "schema": {
  6421. "$ref": "#/components/schemas/Session"
  6422. }
  6423. }
  6424. }
  6425. },
  6426. "400": {
  6427. "description": "Bad request",
  6428. "content": {
  6429. "application/json": {
  6430. "schema": {
  6431. "$ref": "#/components/schemas/BadRequestError"
  6432. }
  6433. }
  6434. }
  6435. },
  6436. "404": {
  6437. "description": "Not found",
  6438. "content": {
  6439. "application/json": {
  6440. "schema": {
  6441. "$ref": "#/components/schemas/NotFoundError"
  6442. }
  6443. }
  6444. }
  6445. }
  6446. },
  6447. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6448. "summary": "Revert message",
  6449. "requestBody": {
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "type": "object",
  6454. "properties": {
  6455. "messageID": {
  6456. "type": "string"
  6457. },
  6458. "partID": {
  6459. "type": "string"
  6460. }
  6461. },
  6462. "required": ["messageID"],
  6463. "additionalProperties": false
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "x-codeSamples": [
  6469. {
  6470. "lang": "js",
  6471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6472. }
  6473. ]
  6474. }
  6475. },
  6476. "/session/{sessionID}/unrevert": {
  6477. "post": {
  6478. "tags": ["session"],
  6479. "operationId": "session.unrevert",
  6480. "parameters": [
  6481. {
  6482. "name": "sessionID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^ses.*"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "directory",
  6492. "in": "query",
  6493. "schema": {
  6494. "type": "string"
  6495. },
  6496. "required": false
  6497. },
  6498. {
  6499. "name": "workspace",
  6500. "in": "query",
  6501. "schema": {
  6502. "type": "string"
  6503. },
  6504. "required": false
  6505. }
  6506. ],
  6507. "responses": {
  6508. "200": {
  6509. "description": "Updated session",
  6510. "content": {
  6511. "application/json": {
  6512. "schema": {
  6513. "$ref": "#/components/schemas/Session"
  6514. }
  6515. }
  6516. }
  6517. },
  6518. "400": {
  6519. "description": "Bad request",
  6520. "content": {
  6521. "application/json": {
  6522. "schema": {
  6523. "$ref": "#/components/schemas/BadRequestError"
  6524. }
  6525. }
  6526. }
  6527. },
  6528. "404": {
  6529. "description": "Not found",
  6530. "content": {
  6531. "application/json": {
  6532. "schema": {
  6533. "$ref": "#/components/schemas/NotFoundError"
  6534. }
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "description": "Restore all previously reverted messages in a session.",
  6540. "summary": "Restore reverted messages",
  6541. "x-codeSamples": [
  6542. {
  6543. "lang": "js",
  6544. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6545. }
  6546. ]
  6547. }
  6548. },
  6549. "/session/{sessionID}/permissions/{permissionID}": {
  6550. "post": {
  6551. "tags": ["session"],
  6552. "operationId": "permission.respond",
  6553. "parameters": [
  6554. {
  6555. "name": "sessionID",
  6556. "in": "path",
  6557. "schema": {
  6558. "type": "string",
  6559. "pattern": "^ses.*"
  6560. },
  6561. "required": true
  6562. },
  6563. {
  6564. "name": "permissionID",
  6565. "in": "path",
  6566. "schema": {
  6567. "type": "string",
  6568. "pattern": "^per.*"
  6569. },
  6570. "required": true
  6571. },
  6572. {
  6573. "name": "directory",
  6574. "in": "query",
  6575. "schema": {
  6576. "type": "string"
  6577. },
  6578. "required": false
  6579. },
  6580. {
  6581. "name": "workspace",
  6582. "in": "query",
  6583. "schema": {
  6584. "type": "string"
  6585. },
  6586. "required": false
  6587. }
  6588. ],
  6589. "responses": {
  6590. "200": {
  6591. "description": "Permission processed successfully",
  6592. "content": {
  6593. "application/json": {
  6594. "schema": {
  6595. "type": "boolean",
  6596. "description": "Permission processed successfully"
  6597. }
  6598. }
  6599. }
  6600. },
  6601. "400": {
  6602. "description": "Bad request",
  6603. "content": {
  6604. "application/json": {
  6605. "schema": {
  6606. "$ref": "#/components/schemas/BadRequestError"
  6607. }
  6608. }
  6609. }
  6610. },
  6611. "404": {
  6612. "description": "Not found",
  6613. "content": {
  6614. "application/json": {
  6615. "schema": {
  6616. "$ref": "#/components/schemas/NotFoundError"
  6617. }
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "description": "Approve or deny a permission request from the AI assistant.",
  6623. "summary": "Respond to permission",
  6624. "deprecated": true,
  6625. "requestBody": {
  6626. "content": {
  6627. "application/json": {
  6628. "schema": {
  6629. "type": "object",
  6630. "properties": {
  6631. "response": {
  6632. "type": "string",
  6633. "enum": ["once", "always", "reject"]
  6634. }
  6635. },
  6636. "required": ["response"],
  6637. "additionalProperties": false
  6638. }
  6639. }
  6640. }
  6641. },
  6642. "x-codeSamples": [
  6643. {
  6644. "lang": "js",
  6645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6646. }
  6647. ]
  6648. }
  6649. },
  6650. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6651. "delete": {
  6652. "tags": ["session"],
  6653. "operationId": "part.delete",
  6654. "parameters": [
  6655. {
  6656. "name": "sessionID",
  6657. "in": "path",
  6658. "schema": {
  6659. "type": "string",
  6660. "pattern": "^ses.*"
  6661. },
  6662. "required": true
  6663. },
  6664. {
  6665. "name": "messageID",
  6666. "in": "path",
  6667. "schema": {
  6668. "type": "string",
  6669. "pattern": "^msg.*"
  6670. },
  6671. "required": true
  6672. },
  6673. {
  6674. "name": "partID",
  6675. "in": "path",
  6676. "schema": {
  6677. "type": "string",
  6678. "pattern": "^prt.*"
  6679. },
  6680. "required": true
  6681. },
  6682. {
  6683. "name": "directory",
  6684. "in": "query",
  6685. "schema": {
  6686. "type": "string"
  6687. },
  6688. "required": false
  6689. },
  6690. {
  6691. "name": "workspace",
  6692. "in": "query",
  6693. "schema": {
  6694. "type": "string"
  6695. },
  6696. "required": false
  6697. }
  6698. ],
  6699. "responses": {
  6700. "200": {
  6701. "description": "Successfully deleted part",
  6702. "content": {
  6703. "application/json": {
  6704. "schema": {
  6705. "type": "boolean",
  6706. "description": "Successfully deleted part"
  6707. }
  6708. }
  6709. }
  6710. },
  6711. "400": {
  6712. "description": "Bad request",
  6713. "content": {
  6714. "application/json": {
  6715. "schema": {
  6716. "$ref": "#/components/schemas/BadRequestError"
  6717. }
  6718. }
  6719. }
  6720. },
  6721. "404": {
  6722. "description": "Not found",
  6723. "content": {
  6724. "application/json": {
  6725. "schema": {
  6726. "$ref": "#/components/schemas/NotFoundError"
  6727. }
  6728. }
  6729. }
  6730. }
  6731. },
  6732. "description": "Delete a part from a message.",
  6733. "x-codeSamples": [
  6734. {
  6735. "lang": "js",
  6736. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6737. }
  6738. ]
  6739. },
  6740. "patch": {
  6741. "tags": ["session"],
  6742. "operationId": "part.update",
  6743. "parameters": [
  6744. {
  6745. "name": "sessionID",
  6746. "in": "path",
  6747. "schema": {
  6748. "type": "string",
  6749. "pattern": "^ses.*"
  6750. },
  6751. "required": true
  6752. },
  6753. {
  6754. "name": "messageID",
  6755. "in": "path",
  6756. "schema": {
  6757. "type": "string",
  6758. "pattern": "^msg.*"
  6759. },
  6760. "required": true
  6761. },
  6762. {
  6763. "name": "partID",
  6764. "in": "path",
  6765. "schema": {
  6766. "type": "string",
  6767. "pattern": "^prt.*"
  6768. },
  6769. "required": true
  6770. },
  6771. {
  6772. "name": "directory",
  6773. "in": "query",
  6774. "schema": {
  6775. "type": "string"
  6776. },
  6777. "required": false
  6778. },
  6779. {
  6780. "name": "workspace",
  6781. "in": "query",
  6782. "schema": {
  6783. "type": "string"
  6784. },
  6785. "required": false
  6786. }
  6787. ],
  6788. "responses": {
  6789. "200": {
  6790. "description": "Successfully updated part",
  6791. "content": {
  6792. "application/json": {
  6793. "schema": {
  6794. "$ref": "#/components/schemas/Part"
  6795. }
  6796. }
  6797. }
  6798. },
  6799. "400": {
  6800. "description": "Bad request",
  6801. "content": {
  6802. "application/json": {
  6803. "schema": {
  6804. "$ref": "#/components/schemas/BadRequestError"
  6805. }
  6806. }
  6807. }
  6808. },
  6809. "404": {
  6810. "description": "Not found",
  6811. "content": {
  6812. "application/json": {
  6813. "schema": {
  6814. "$ref": "#/components/schemas/NotFoundError"
  6815. }
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "description": "Update a part in a message.",
  6821. "requestBody": {
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/Part"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "x-codeSamples": [
  6831. {
  6832. "lang": "js",
  6833. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6834. }
  6835. ]
  6836. }
  6837. },
  6838. "/sync/start": {
  6839. "post": {
  6840. "tags": ["sync"],
  6841. "operationId": "sync.start",
  6842. "parameters": [
  6843. {
  6844. "name": "directory",
  6845. "in": "query",
  6846. "schema": {
  6847. "type": "string"
  6848. },
  6849. "required": false
  6850. },
  6851. {
  6852. "name": "workspace",
  6853. "in": "query",
  6854. "schema": {
  6855. "type": "string"
  6856. },
  6857. "required": false
  6858. }
  6859. ],
  6860. "responses": {
  6861. "200": {
  6862. "description": "Workspace sync started",
  6863. "content": {
  6864. "application/json": {
  6865. "schema": {
  6866. "type": "boolean",
  6867. "description": "Workspace sync started"
  6868. }
  6869. }
  6870. }
  6871. }
  6872. },
  6873. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6874. "summary": "Start workspace sync",
  6875. "x-codeSamples": [
  6876. {
  6877. "lang": "js",
  6878. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6879. }
  6880. ]
  6881. }
  6882. },
  6883. "/sync/replay": {
  6884. "post": {
  6885. "tags": ["sync"],
  6886. "operationId": "sync.replay",
  6887. "parameters": [
  6888. {
  6889. "name": "directory",
  6890. "in": "query",
  6891. "schema": {
  6892. "type": "string"
  6893. },
  6894. "required": false
  6895. },
  6896. {
  6897. "name": "workspace",
  6898. "in": "query",
  6899. "schema": {
  6900. "type": "string"
  6901. },
  6902. "required": false
  6903. }
  6904. ],
  6905. "responses": {
  6906. "200": {
  6907. "description": "Replayed sync events",
  6908. "content": {
  6909. "application/json": {
  6910. "schema": {
  6911. "type": "object",
  6912. "properties": {
  6913. "sessionID": {
  6914. "type": "string"
  6915. }
  6916. },
  6917. "required": ["sessionID"],
  6918. "additionalProperties": false,
  6919. "description": "Replayed sync events"
  6920. }
  6921. }
  6922. }
  6923. },
  6924. "400": {
  6925. "description": "Bad request",
  6926. "content": {
  6927. "application/json": {
  6928. "schema": {
  6929. "$ref": "#/components/schemas/BadRequestError"
  6930. }
  6931. }
  6932. }
  6933. }
  6934. },
  6935. "description": "Validate and replay a complete sync event history.",
  6936. "summary": "Replay sync events",
  6937. "requestBody": {
  6938. "content": {
  6939. "application/json": {
  6940. "schema": {
  6941. "type": "object",
  6942. "properties": {
  6943. "directory": {
  6944. "type": "string"
  6945. },
  6946. "events": {
  6947. "type": "array",
  6948. "minItems": 1,
  6949. "items": {
  6950. "type": "object",
  6951. "properties": {
  6952. "id": {
  6953. "type": "string"
  6954. },
  6955. "aggregateID": {
  6956. "type": "string"
  6957. },
  6958. "seq": {
  6959. "type": "integer",
  6960. "minimum": 0
  6961. },
  6962. "type": {
  6963. "type": "string"
  6964. },
  6965. "data": {
  6966. "type": "object"
  6967. }
  6968. },
  6969. "required": ["id", "aggregateID", "seq", "type", "data"],
  6970. "additionalProperties": false
  6971. }
  6972. }
  6973. },
  6974. "required": ["directory", "events"],
  6975. "additionalProperties": false
  6976. }
  6977. }
  6978. }
  6979. },
  6980. "x-codeSamples": [
  6981. {
  6982. "lang": "js",
  6983. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  6984. }
  6985. ]
  6986. }
  6987. },
  6988. "/sync/steal": {
  6989. "post": {
  6990. "tags": ["sync"],
  6991. "operationId": "sync.steal",
  6992. "parameters": [
  6993. {
  6994. "name": "directory",
  6995. "in": "query",
  6996. "schema": {
  6997. "type": "string"
  6998. },
  6999. "required": false
  7000. },
  7001. {
  7002. "name": "workspace",
  7003. "in": "query",
  7004. "schema": {
  7005. "type": "string"
  7006. },
  7007. "required": false
  7008. }
  7009. ],
  7010. "responses": {
  7011. "200": {
  7012. "description": "Session stolen into workspace",
  7013. "content": {
  7014. "application/json": {
  7015. "schema": {
  7016. "type": "object",
  7017. "properties": {
  7018. "sessionID": {
  7019. "type": "string"
  7020. }
  7021. },
  7022. "required": ["sessionID"],
  7023. "additionalProperties": false,
  7024. "description": "Session stolen into workspace"
  7025. }
  7026. }
  7027. }
  7028. },
  7029. "400": {
  7030. "description": "Bad request",
  7031. "content": {
  7032. "application/json": {
  7033. "schema": {
  7034. "$ref": "#/components/schemas/BadRequestError"
  7035. }
  7036. }
  7037. }
  7038. }
  7039. },
  7040. "description": "Update a session to belong to the current workspace through the sync event system.",
  7041. "summary": "Steal session into workspace",
  7042. "requestBody": {
  7043. "content": {
  7044. "application/json": {
  7045. "schema": {
  7046. "type": "object",
  7047. "properties": {
  7048. "sessionID": {
  7049. "type": "string"
  7050. }
  7051. },
  7052. "required": ["sessionID"],
  7053. "additionalProperties": false
  7054. }
  7055. }
  7056. }
  7057. },
  7058. "x-codeSamples": [
  7059. {
  7060. "lang": "js",
  7061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7062. }
  7063. ]
  7064. }
  7065. },
  7066. "/sync/history": {
  7067. "post": {
  7068. "tags": ["sync"],
  7069. "operationId": "sync.history.list",
  7070. "parameters": [
  7071. {
  7072. "name": "directory",
  7073. "in": "query",
  7074. "schema": {
  7075. "type": "string"
  7076. },
  7077. "required": false
  7078. },
  7079. {
  7080. "name": "workspace",
  7081. "in": "query",
  7082. "schema": {
  7083. "type": "string"
  7084. },
  7085. "required": false
  7086. }
  7087. ],
  7088. "responses": {
  7089. "200": {
  7090. "description": "Sync events",
  7091. "content": {
  7092. "application/json": {
  7093. "schema": {
  7094. "type": "array",
  7095. "items": {
  7096. "type": "object",
  7097. "properties": {
  7098. "id": {
  7099. "type": "string"
  7100. },
  7101. "aggregate_id": {
  7102. "type": "string"
  7103. },
  7104. "seq": {
  7105. "type": "integer",
  7106. "minimum": 0
  7107. },
  7108. "type": {
  7109. "type": "string"
  7110. },
  7111. "data": {
  7112. "type": "object"
  7113. }
  7114. },
  7115. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7116. "additionalProperties": false
  7117. },
  7118. "description": "Sync events"
  7119. }
  7120. }
  7121. }
  7122. },
  7123. "400": {
  7124. "description": "Bad request",
  7125. "content": {
  7126. "application/json": {
  7127. "schema": {
  7128. "$ref": "#/components/schemas/BadRequestError"
  7129. }
  7130. }
  7131. }
  7132. }
  7133. },
  7134. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  7135. "summary": "List sync events",
  7136. "requestBody": {
  7137. "content": {
  7138. "application/json": {
  7139. "schema": {
  7140. "type": "object",
  7141. "additionalProperties": {
  7142. "type": "integer",
  7143. "minimum": 0
  7144. }
  7145. }
  7146. }
  7147. }
  7148. },
  7149. "x-codeSamples": [
  7150. {
  7151. "lang": "js",
  7152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7153. }
  7154. ]
  7155. }
  7156. },
  7157. "/api/session": {
  7158. "get": {
  7159. "tags": ["v2"],
  7160. "operationId": "v2.session.list",
  7161. "parameters": [
  7162. {
  7163. "name": "directory",
  7164. "in": "query",
  7165. "schema": {
  7166. "type": "string"
  7167. },
  7168. "required": false
  7169. },
  7170. {
  7171. "name": "workspace",
  7172. "in": "query",
  7173. "schema": {
  7174. "type": "string"
  7175. },
  7176. "required": false
  7177. },
  7178. {
  7179. "name": "limit",
  7180. "in": "query",
  7181. "schema": {
  7182. "type": "number"
  7183. },
  7184. "required": false
  7185. },
  7186. {
  7187. "name": "order",
  7188. "in": "query",
  7189. "schema": {
  7190. "type": "string",
  7191. "enum": ["asc", "desc"]
  7192. },
  7193. "required": false
  7194. },
  7195. {
  7196. "name": "path",
  7197. "in": "query",
  7198. "schema": {
  7199. "type": "string"
  7200. },
  7201. "required": false
  7202. },
  7203. {
  7204. "name": "roots",
  7205. "in": "query",
  7206. "schema": {
  7207. "anyOf": [
  7208. {
  7209. "type": "boolean"
  7210. },
  7211. {
  7212. "type": "string",
  7213. "enum": ["true", "false"]
  7214. }
  7215. ]
  7216. },
  7217. "required": false
  7218. },
  7219. {
  7220. "name": "start",
  7221. "in": "query",
  7222. "schema": {
  7223. "type": "number"
  7224. },
  7225. "required": false
  7226. },
  7227. {
  7228. "name": "search",
  7229. "in": "query",
  7230. "schema": {
  7231. "type": "string"
  7232. },
  7233. "required": false
  7234. },
  7235. {
  7236. "name": "cursor",
  7237. "in": "query",
  7238. "schema": {
  7239. "type": "string",
  7240. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7241. },
  7242. "required": false
  7243. }
  7244. ],
  7245. "responses": {
  7246. "200": {
  7247. "description": "V2SessionsResponse",
  7248. "content": {
  7249. "application/json": {
  7250. "schema": {
  7251. "$ref": "#/components/schemas/V2SessionsResponse"
  7252. }
  7253. }
  7254. }
  7255. },
  7256. "400": {
  7257. "description": "Bad request",
  7258. "content": {
  7259. "application/json": {
  7260. "schema": {
  7261. "$ref": "#/components/schemas/BadRequestError"
  7262. }
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  7268. "summary": "List v2 sessions",
  7269. "x-codeSamples": [
  7270. {
  7271. "lang": "js",
  7272. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7273. }
  7274. ]
  7275. }
  7276. },
  7277. "/api/session/{sessionID}/prompt": {
  7278. "post": {
  7279. "tags": ["v2"],
  7280. "operationId": "v2.session.prompt",
  7281. "parameters": [
  7282. {
  7283. "name": "sessionID",
  7284. "in": "path",
  7285. "schema": {
  7286. "type": "string",
  7287. "pattern": "^ses.*"
  7288. },
  7289. "required": true
  7290. },
  7291. {
  7292. "name": "directory",
  7293. "in": "query",
  7294. "schema": {
  7295. "type": "string"
  7296. },
  7297. "required": false
  7298. },
  7299. {
  7300. "name": "workspace",
  7301. "in": "query",
  7302. "schema": {
  7303. "type": "string"
  7304. },
  7305. "required": false
  7306. }
  7307. ],
  7308. "responses": {
  7309. "200": {
  7310. "description": "Session.Message",
  7311. "content": {
  7312. "application/json": {
  7313. "schema": {
  7314. "$ref": "#/components/schemas/SessionMessage"
  7315. }
  7316. }
  7317. }
  7318. }
  7319. },
  7320. "description": "Create a v2 session message and queue it for the agent loop.",
  7321. "summary": "Send v2 message",
  7322. "requestBody": {
  7323. "content": {
  7324. "application/json": {
  7325. "schema": {
  7326. "type": "object",
  7327. "properties": {
  7328. "prompt": {
  7329. "$ref": "#/components/schemas/Prompt"
  7330. },
  7331. "delivery": {
  7332. "$ref": "#/components/schemas/SessionDelivery"
  7333. }
  7334. },
  7335. "required": ["prompt"],
  7336. "additionalProperties": false
  7337. }
  7338. }
  7339. }
  7340. },
  7341. "x-codeSamples": [
  7342. {
  7343. "lang": "js",
  7344. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7345. }
  7346. ]
  7347. }
  7348. },
  7349. "/api/session/{sessionID}/compact": {
  7350. "post": {
  7351. "tags": ["v2"],
  7352. "operationId": "v2.session.compact",
  7353. "parameters": [
  7354. {
  7355. "name": "sessionID",
  7356. "in": "path",
  7357. "schema": {
  7358. "type": "string",
  7359. "pattern": "^ses.*"
  7360. },
  7361. "required": true
  7362. },
  7363. {
  7364. "name": "directory",
  7365. "in": "query",
  7366. "schema": {
  7367. "type": "string"
  7368. },
  7369. "required": false
  7370. },
  7371. {
  7372. "name": "workspace",
  7373. "in": "query",
  7374. "schema": {
  7375. "type": "string"
  7376. },
  7377. "required": false
  7378. }
  7379. ],
  7380. "responses": {
  7381. "204": {
  7382. "description": "<No Content>"
  7383. }
  7384. },
  7385. "description": "Compact a v2 session conversation.",
  7386. "summary": "Compact v2 session",
  7387. "x-codeSamples": [
  7388. {
  7389. "lang": "js",
  7390. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7391. }
  7392. ]
  7393. }
  7394. },
  7395. "/api/session/{sessionID}/wait": {
  7396. "post": {
  7397. "tags": ["v2"],
  7398. "operationId": "v2.session.wait",
  7399. "parameters": [
  7400. {
  7401. "name": "sessionID",
  7402. "in": "path",
  7403. "schema": {
  7404. "type": "string",
  7405. "pattern": "^ses.*"
  7406. },
  7407. "required": true
  7408. },
  7409. {
  7410. "name": "directory",
  7411. "in": "query",
  7412. "schema": {
  7413. "type": "string"
  7414. },
  7415. "required": false
  7416. },
  7417. {
  7418. "name": "workspace",
  7419. "in": "query",
  7420. "schema": {
  7421. "type": "string"
  7422. },
  7423. "required": false
  7424. }
  7425. ],
  7426. "responses": {
  7427. "204": {
  7428. "description": "<No Content>"
  7429. }
  7430. },
  7431. "description": "Wait for a v2 session agent loop to become idle.",
  7432. "summary": "Wait for v2 session",
  7433. "x-codeSamples": [
  7434. {
  7435. "lang": "js",
  7436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7437. }
  7438. ]
  7439. }
  7440. },
  7441. "/api/session/{sessionID}/context": {
  7442. "get": {
  7443. "tags": ["v2"],
  7444. "operationId": "v2.session.context",
  7445. "parameters": [
  7446. {
  7447. "name": "sessionID",
  7448. "in": "path",
  7449. "schema": {
  7450. "type": "string",
  7451. "pattern": "^ses.*"
  7452. },
  7453. "required": true
  7454. },
  7455. {
  7456. "name": "directory",
  7457. "in": "query",
  7458. "schema": {
  7459. "type": "string"
  7460. },
  7461. "required": false
  7462. },
  7463. {
  7464. "name": "workspace",
  7465. "in": "query",
  7466. "schema": {
  7467. "type": "string"
  7468. },
  7469. "required": false
  7470. }
  7471. ],
  7472. "responses": {
  7473. "200": {
  7474. "description": "Success",
  7475. "content": {
  7476. "application/json": {
  7477. "schema": {
  7478. "type": "array",
  7479. "items": {
  7480. "$ref": "#/components/schemas/SessionMessage"
  7481. }
  7482. }
  7483. }
  7484. }
  7485. }
  7486. },
  7487. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7488. "summary": "Get v2 session context",
  7489. "x-codeSamples": [
  7490. {
  7491. "lang": "js",
  7492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7493. }
  7494. ]
  7495. }
  7496. },
  7497. "/api/session/{sessionID}/message": {
  7498. "get": {
  7499. "tags": ["v2 messages"],
  7500. "operationId": "v2.session.messages",
  7501. "parameters": [
  7502. {
  7503. "name": "sessionID",
  7504. "in": "path",
  7505. "schema": {
  7506. "type": "string",
  7507. "pattern": "^ses.*"
  7508. },
  7509. "required": true
  7510. },
  7511. {
  7512. "name": "directory",
  7513. "in": "query",
  7514. "schema": {
  7515. "type": "string"
  7516. },
  7517. "required": false
  7518. },
  7519. {
  7520. "name": "workspace",
  7521. "in": "query",
  7522. "schema": {
  7523. "type": "string"
  7524. },
  7525. "required": false
  7526. },
  7527. {
  7528. "name": "limit",
  7529. "in": "query",
  7530. "schema": {
  7531. "type": "number"
  7532. },
  7533. "required": false
  7534. },
  7535. {
  7536. "name": "order",
  7537. "in": "query",
  7538. "schema": {
  7539. "type": "string",
  7540. "enum": ["asc", "desc"]
  7541. },
  7542. "required": false
  7543. },
  7544. {
  7545. "name": "cursor",
  7546. "in": "query",
  7547. "schema": {
  7548. "type": "string",
  7549. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7550. },
  7551. "required": false
  7552. }
  7553. ],
  7554. "responses": {
  7555. "200": {
  7556. "description": "V2SessionMessagesResponse",
  7557. "content": {
  7558. "application/json": {
  7559. "schema": {
  7560. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7561. }
  7562. }
  7563. }
  7564. },
  7565. "400": {
  7566. "description": "Bad request",
  7567. "content": {
  7568. "application/json": {
  7569. "schema": {
  7570. "$ref": "#/components/schemas/BadRequestError"
  7571. }
  7572. }
  7573. }
  7574. }
  7575. },
  7576. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  7577. "summary": "Get v2 session messages",
  7578. "x-codeSamples": [
  7579. {
  7580. "lang": "js",
  7581. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7582. }
  7583. ]
  7584. }
  7585. },
  7586. "/tui/append-prompt": {
  7587. "post": {
  7588. "tags": ["tui"],
  7589. "operationId": "tui.appendPrompt",
  7590. "parameters": [
  7591. {
  7592. "name": "directory",
  7593. "in": "query",
  7594. "schema": {
  7595. "type": "string"
  7596. },
  7597. "required": false
  7598. },
  7599. {
  7600. "name": "workspace",
  7601. "in": "query",
  7602. "schema": {
  7603. "type": "string"
  7604. },
  7605. "required": false
  7606. }
  7607. ],
  7608. "responses": {
  7609. "200": {
  7610. "description": "Prompt processed successfully",
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "type": "boolean",
  7615. "description": "Prompt processed successfully"
  7616. }
  7617. }
  7618. }
  7619. },
  7620. "400": {
  7621. "description": "Bad request",
  7622. "content": {
  7623. "application/json": {
  7624. "schema": {
  7625. "$ref": "#/components/schemas/BadRequestError"
  7626. }
  7627. }
  7628. }
  7629. }
  7630. },
  7631. "description": "Append prompt to the TUI.",
  7632. "summary": "Append TUI prompt",
  7633. "requestBody": {
  7634. "content": {
  7635. "application/json": {
  7636. "schema": {
  7637. "type": "object",
  7638. "properties": {
  7639. "text": {
  7640. "type": "string"
  7641. }
  7642. },
  7643. "required": ["text"],
  7644. "additionalProperties": false
  7645. }
  7646. }
  7647. }
  7648. },
  7649. "x-codeSamples": [
  7650. {
  7651. "lang": "js",
  7652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7653. }
  7654. ]
  7655. }
  7656. },
  7657. "/tui/open-help": {
  7658. "post": {
  7659. "tags": ["tui"],
  7660. "operationId": "tui.openHelp",
  7661. "parameters": [
  7662. {
  7663. "name": "directory",
  7664. "in": "query",
  7665. "schema": {
  7666. "type": "string"
  7667. },
  7668. "required": false
  7669. },
  7670. {
  7671. "name": "workspace",
  7672. "in": "query",
  7673. "schema": {
  7674. "type": "string"
  7675. },
  7676. "required": false
  7677. }
  7678. ],
  7679. "responses": {
  7680. "200": {
  7681. "description": "Help dialog opened successfully",
  7682. "content": {
  7683. "application/json": {
  7684. "schema": {
  7685. "type": "boolean",
  7686. "description": "Help dialog opened successfully"
  7687. }
  7688. }
  7689. }
  7690. }
  7691. },
  7692. "description": "Open the help dialog in the TUI to display user assistance information.",
  7693. "summary": "Open help dialog",
  7694. "x-codeSamples": [
  7695. {
  7696. "lang": "js",
  7697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7698. }
  7699. ]
  7700. }
  7701. },
  7702. "/tui/open-sessions": {
  7703. "post": {
  7704. "tags": ["tui"],
  7705. "operationId": "tui.openSessions",
  7706. "parameters": [
  7707. {
  7708. "name": "directory",
  7709. "in": "query",
  7710. "schema": {
  7711. "type": "string"
  7712. },
  7713. "required": false
  7714. },
  7715. {
  7716. "name": "workspace",
  7717. "in": "query",
  7718. "schema": {
  7719. "type": "string"
  7720. },
  7721. "required": false
  7722. }
  7723. ],
  7724. "responses": {
  7725. "200": {
  7726. "description": "Session dialog opened successfully",
  7727. "content": {
  7728. "application/json": {
  7729. "schema": {
  7730. "type": "boolean",
  7731. "description": "Session dialog opened successfully"
  7732. }
  7733. }
  7734. }
  7735. }
  7736. },
  7737. "description": "Open the session dialog.",
  7738. "summary": "Open sessions dialog",
  7739. "x-codeSamples": [
  7740. {
  7741. "lang": "js",
  7742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7743. }
  7744. ]
  7745. }
  7746. },
  7747. "/tui/open-themes": {
  7748. "post": {
  7749. "tags": ["tui"],
  7750. "operationId": "tui.openThemes",
  7751. "parameters": [
  7752. {
  7753. "name": "directory",
  7754. "in": "query",
  7755. "schema": {
  7756. "type": "string"
  7757. },
  7758. "required": false
  7759. },
  7760. {
  7761. "name": "workspace",
  7762. "in": "query",
  7763. "schema": {
  7764. "type": "string"
  7765. },
  7766. "required": false
  7767. }
  7768. ],
  7769. "responses": {
  7770. "200": {
  7771. "description": "Theme dialog opened successfully",
  7772. "content": {
  7773. "application/json": {
  7774. "schema": {
  7775. "type": "boolean",
  7776. "description": "Theme dialog opened successfully"
  7777. }
  7778. }
  7779. }
  7780. }
  7781. },
  7782. "description": "Open the theme dialog.",
  7783. "summary": "Open themes dialog",
  7784. "x-codeSamples": [
  7785. {
  7786. "lang": "js",
  7787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7788. }
  7789. ]
  7790. }
  7791. },
  7792. "/tui/open-models": {
  7793. "post": {
  7794. "tags": ["tui"],
  7795. "operationId": "tui.openModels",
  7796. "parameters": [
  7797. {
  7798. "name": "directory",
  7799. "in": "query",
  7800. "schema": {
  7801. "type": "string"
  7802. },
  7803. "required": false
  7804. },
  7805. {
  7806. "name": "workspace",
  7807. "in": "query",
  7808. "schema": {
  7809. "type": "string"
  7810. },
  7811. "required": false
  7812. }
  7813. ],
  7814. "responses": {
  7815. "200": {
  7816. "description": "Model dialog opened successfully",
  7817. "content": {
  7818. "application/json": {
  7819. "schema": {
  7820. "type": "boolean",
  7821. "description": "Model dialog opened successfully"
  7822. }
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "description": "Open the model dialog.",
  7828. "summary": "Open models dialog",
  7829. "x-codeSamples": [
  7830. {
  7831. "lang": "js",
  7832. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7833. }
  7834. ]
  7835. }
  7836. },
  7837. "/tui/submit-prompt": {
  7838. "post": {
  7839. "tags": ["tui"],
  7840. "operationId": "tui.submitPrompt",
  7841. "parameters": [
  7842. {
  7843. "name": "directory",
  7844. "in": "query",
  7845. "schema": {
  7846. "type": "string"
  7847. },
  7848. "required": false
  7849. },
  7850. {
  7851. "name": "workspace",
  7852. "in": "query",
  7853. "schema": {
  7854. "type": "string"
  7855. },
  7856. "required": false
  7857. }
  7858. ],
  7859. "responses": {
  7860. "200": {
  7861. "description": "Prompt submitted successfully",
  7862. "content": {
  7863. "application/json": {
  7864. "schema": {
  7865. "type": "boolean",
  7866. "description": "Prompt submitted successfully"
  7867. }
  7868. }
  7869. }
  7870. }
  7871. },
  7872. "description": "Submit the prompt.",
  7873. "summary": "Submit TUI prompt",
  7874. "x-codeSamples": [
  7875. {
  7876. "lang": "js",
  7877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7878. }
  7879. ]
  7880. }
  7881. },
  7882. "/tui/clear-prompt": {
  7883. "post": {
  7884. "tags": ["tui"],
  7885. "operationId": "tui.clearPrompt",
  7886. "parameters": [
  7887. {
  7888. "name": "directory",
  7889. "in": "query",
  7890. "schema": {
  7891. "type": "string"
  7892. },
  7893. "required": false
  7894. },
  7895. {
  7896. "name": "workspace",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. }
  7903. ],
  7904. "responses": {
  7905. "200": {
  7906. "description": "Prompt cleared successfully",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "type": "boolean",
  7911. "description": "Prompt cleared successfully"
  7912. }
  7913. }
  7914. }
  7915. }
  7916. },
  7917. "description": "Clear the prompt.",
  7918. "summary": "Clear TUI prompt",
  7919. "x-codeSamples": [
  7920. {
  7921. "lang": "js",
  7922. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7923. }
  7924. ]
  7925. }
  7926. },
  7927. "/tui/execute-command": {
  7928. "post": {
  7929. "tags": ["tui"],
  7930. "operationId": "tui.executeCommand",
  7931. "parameters": [
  7932. {
  7933. "name": "directory",
  7934. "in": "query",
  7935. "schema": {
  7936. "type": "string"
  7937. },
  7938. "required": false
  7939. },
  7940. {
  7941. "name": "workspace",
  7942. "in": "query",
  7943. "schema": {
  7944. "type": "string"
  7945. },
  7946. "required": false
  7947. }
  7948. ],
  7949. "responses": {
  7950. "200": {
  7951. "description": "Command executed successfully",
  7952. "content": {
  7953. "application/json": {
  7954. "schema": {
  7955. "type": "boolean",
  7956. "description": "Command executed successfully"
  7957. }
  7958. }
  7959. }
  7960. },
  7961. "400": {
  7962. "description": "Bad request",
  7963. "content": {
  7964. "application/json": {
  7965. "schema": {
  7966. "$ref": "#/components/schemas/BadRequestError"
  7967. }
  7968. }
  7969. }
  7970. }
  7971. },
  7972. "description": "Execute a TUI command.",
  7973. "summary": "Execute TUI command",
  7974. "requestBody": {
  7975. "content": {
  7976. "application/json": {
  7977. "schema": {
  7978. "type": "object",
  7979. "properties": {
  7980. "command": {
  7981. "type": "string"
  7982. }
  7983. },
  7984. "required": ["command"],
  7985. "additionalProperties": false
  7986. }
  7987. }
  7988. }
  7989. },
  7990. "x-codeSamples": [
  7991. {
  7992. "lang": "js",
  7993. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  7994. }
  7995. ]
  7996. }
  7997. },
  7998. "/tui/show-toast": {
  7999. "post": {
  8000. "tags": ["tui"],
  8001. "operationId": "tui.showToast",
  8002. "parameters": [
  8003. {
  8004. "name": "directory",
  8005. "in": "query",
  8006. "schema": {
  8007. "type": "string"
  8008. },
  8009. "required": false
  8010. },
  8011. {
  8012. "name": "workspace",
  8013. "in": "query",
  8014. "schema": {
  8015. "type": "string"
  8016. },
  8017. "required": false
  8018. }
  8019. ],
  8020. "responses": {
  8021. "200": {
  8022. "description": "Toast notification shown successfully",
  8023. "content": {
  8024. "application/json": {
  8025. "schema": {
  8026. "type": "boolean",
  8027. "description": "Toast notification shown successfully"
  8028. }
  8029. }
  8030. }
  8031. }
  8032. },
  8033. "description": "Show a toast notification in the TUI.",
  8034. "summary": "Show TUI toast",
  8035. "requestBody": {
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "type": "object",
  8040. "properties": {
  8041. "title": {
  8042. "type": "string"
  8043. },
  8044. "message": {
  8045. "type": "string"
  8046. },
  8047. "variant": {
  8048. "type": "string",
  8049. "enum": ["info", "success", "warning", "error"]
  8050. },
  8051. "duration": {
  8052. "type": "integer",
  8053. "exclusiveMinimum": 0
  8054. }
  8055. },
  8056. "required": ["message", "variant"],
  8057. "additionalProperties": false
  8058. }
  8059. }
  8060. }
  8061. },
  8062. "x-codeSamples": [
  8063. {
  8064. "lang": "js",
  8065. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8066. }
  8067. ]
  8068. }
  8069. },
  8070. "/tui/publish": {
  8071. "post": {
  8072. "tags": ["tui"],
  8073. "operationId": "tui.publish",
  8074. "parameters": [
  8075. {
  8076. "name": "directory",
  8077. "in": "query",
  8078. "schema": {
  8079. "type": "string"
  8080. },
  8081. "required": false
  8082. },
  8083. {
  8084. "name": "workspace",
  8085. "in": "query",
  8086. "schema": {
  8087. "type": "string"
  8088. },
  8089. "required": false
  8090. }
  8091. ],
  8092. "responses": {
  8093. "200": {
  8094. "description": "Event published successfully",
  8095. "content": {
  8096. "application/json": {
  8097. "schema": {
  8098. "type": "boolean",
  8099. "description": "Event published successfully"
  8100. }
  8101. }
  8102. }
  8103. },
  8104. "400": {
  8105. "description": "Bad request",
  8106. "content": {
  8107. "application/json": {
  8108. "schema": {
  8109. "$ref": "#/components/schemas/BadRequestError"
  8110. }
  8111. }
  8112. }
  8113. }
  8114. },
  8115. "description": "Publish a TUI event.",
  8116. "summary": "Publish TUI event",
  8117. "requestBody": {
  8118. "content": {
  8119. "application/json": {
  8120. "schema": {
  8121. "anyOf": [
  8122. {
  8123. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8124. },
  8125. {
  8126. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8127. },
  8128. {
  8129. "$ref": "#/components/schemas/EventTuiToastShow"
  8130. },
  8131. {
  8132. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8133. }
  8134. ]
  8135. }
  8136. }
  8137. }
  8138. },
  8139. "x-codeSamples": [
  8140. {
  8141. "lang": "js",
  8142. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8143. }
  8144. ]
  8145. }
  8146. },
  8147. "/tui/select-session": {
  8148. "post": {
  8149. "tags": ["tui"],
  8150. "operationId": "tui.selectSession",
  8151. "parameters": [
  8152. {
  8153. "name": "directory",
  8154. "in": "query",
  8155. "schema": {
  8156. "type": "string"
  8157. },
  8158. "required": false
  8159. },
  8160. {
  8161. "name": "workspace",
  8162. "in": "query",
  8163. "schema": {
  8164. "type": "string"
  8165. },
  8166. "required": false
  8167. }
  8168. ],
  8169. "responses": {
  8170. "200": {
  8171. "description": "Session selected successfully",
  8172. "content": {
  8173. "application/json": {
  8174. "schema": {
  8175. "type": "boolean",
  8176. "description": "Session selected successfully"
  8177. }
  8178. }
  8179. }
  8180. },
  8181. "400": {
  8182. "description": "Bad request",
  8183. "content": {
  8184. "application/json": {
  8185. "schema": {
  8186. "$ref": "#/components/schemas/BadRequestError"
  8187. }
  8188. }
  8189. }
  8190. },
  8191. "404": {
  8192. "description": "NotFoundError",
  8193. "content": {
  8194. "application/json": {
  8195. "schema": {
  8196. "$ref": "#/components/schemas/NotFoundError"
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. "description": "Navigate the TUI to display the specified session.",
  8203. "summary": "Select session",
  8204. "requestBody": {
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "object",
  8209. "properties": {
  8210. "sessionID": {
  8211. "type": "string",
  8212. "description": "Session ID to navigate to"
  8213. }
  8214. },
  8215. "required": ["sessionID"],
  8216. "additionalProperties": false
  8217. }
  8218. }
  8219. }
  8220. },
  8221. "x-codeSamples": [
  8222. {
  8223. "lang": "js",
  8224. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8225. }
  8226. ]
  8227. }
  8228. },
  8229. "/tui/control/next": {
  8230. "get": {
  8231. "tags": ["tui"],
  8232. "operationId": "tui.control.next",
  8233. "parameters": [
  8234. {
  8235. "name": "directory",
  8236. "in": "query",
  8237. "schema": {
  8238. "type": "string"
  8239. },
  8240. "required": false
  8241. },
  8242. {
  8243. "name": "workspace",
  8244. "in": "query",
  8245. "schema": {
  8246. "type": "string"
  8247. },
  8248. "required": false
  8249. }
  8250. ],
  8251. "responses": {
  8252. "200": {
  8253. "description": "Next TUI request",
  8254. "content": {
  8255. "application/json": {
  8256. "schema": {
  8257. "type": "object",
  8258. "properties": {
  8259. "path": {
  8260. "type": "string"
  8261. },
  8262. "body": {}
  8263. },
  8264. "required": ["path", "body"],
  8265. "additionalProperties": false,
  8266. "description": "Next TUI request"
  8267. }
  8268. }
  8269. }
  8270. }
  8271. },
  8272. "description": "Retrieve the next TUI request from the queue for processing.",
  8273. "summary": "Get next TUI request",
  8274. "x-codeSamples": [
  8275. {
  8276. "lang": "js",
  8277. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8278. }
  8279. ]
  8280. }
  8281. },
  8282. "/tui/control/response": {
  8283. "post": {
  8284. "tags": ["tui"],
  8285. "operationId": "tui.control.response",
  8286. "parameters": [
  8287. {
  8288. "name": "directory",
  8289. "in": "query",
  8290. "schema": {
  8291. "type": "string"
  8292. },
  8293. "required": false
  8294. },
  8295. {
  8296. "name": "workspace",
  8297. "in": "query",
  8298. "schema": {
  8299. "type": "string"
  8300. },
  8301. "required": false
  8302. }
  8303. ],
  8304. "responses": {
  8305. "200": {
  8306. "description": "Response submitted successfully",
  8307. "content": {
  8308. "application/json": {
  8309. "schema": {
  8310. "type": "boolean",
  8311. "description": "Response submitted successfully"
  8312. }
  8313. }
  8314. }
  8315. }
  8316. },
  8317. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8318. "summary": "Submit TUI response",
  8319. "requestBody": {
  8320. "content": {
  8321. "application/json": {
  8322. "schema": {}
  8323. }
  8324. }
  8325. },
  8326. "x-codeSamples": [
  8327. {
  8328. "lang": "js",
  8329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8330. }
  8331. ]
  8332. }
  8333. },
  8334. "/experimental/workspace/adapter": {
  8335. "get": {
  8336. "tags": ["workspace"],
  8337. "operationId": "experimental.workspace.adapter.list",
  8338. "parameters": [
  8339. {
  8340. "name": "directory",
  8341. "in": "query",
  8342. "schema": {
  8343. "type": "string"
  8344. },
  8345. "required": false
  8346. },
  8347. {
  8348. "name": "workspace",
  8349. "in": "query",
  8350. "schema": {
  8351. "type": "string"
  8352. },
  8353. "required": false
  8354. }
  8355. ],
  8356. "responses": {
  8357. "200": {
  8358. "description": "Workspace adapters",
  8359. "content": {
  8360. "application/json": {
  8361. "schema": {
  8362. "type": "array",
  8363. "items": {
  8364. "type": "object",
  8365. "properties": {
  8366. "type": {
  8367. "type": "string"
  8368. },
  8369. "name": {
  8370. "type": "string"
  8371. },
  8372. "description": {
  8373. "type": "string"
  8374. }
  8375. },
  8376. "required": ["type", "name", "description"],
  8377. "additionalProperties": false
  8378. },
  8379. "description": "Workspace adapters"
  8380. }
  8381. }
  8382. }
  8383. }
  8384. },
  8385. "description": "List all available workspace adapters for the current project.",
  8386. "summary": "List workspace adapters",
  8387. "x-codeSamples": [
  8388. {
  8389. "lang": "js",
  8390. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8391. }
  8392. ]
  8393. }
  8394. },
  8395. "/experimental/workspace": {
  8396. "get": {
  8397. "tags": ["workspace"],
  8398. "operationId": "experimental.workspace.list",
  8399. "parameters": [
  8400. {
  8401. "name": "directory",
  8402. "in": "query",
  8403. "schema": {
  8404. "type": "string"
  8405. },
  8406. "required": false
  8407. },
  8408. {
  8409. "name": "workspace",
  8410. "in": "query",
  8411. "schema": {
  8412. "type": "string"
  8413. },
  8414. "required": false
  8415. }
  8416. ],
  8417. "responses": {
  8418. "200": {
  8419. "description": "Workspaces",
  8420. "content": {
  8421. "application/json": {
  8422. "schema": {
  8423. "type": "array",
  8424. "items": {
  8425. "$ref": "#/components/schemas/Workspace"
  8426. },
  8427. "description": "Workspaces"
  8428. }
  8429. }
  8430. }
  8431. }
  8432. },
  8433. "description": "List all workspaces.",
  8434. "summary": "List workspaces",
  8435. "x-codeSamples": [
  8436. {
  8437. "lang": "js",
  8438. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8439. }
  8440. ]
  8441. },
  8442. "post": {
  8443. "tags": ["workspace"],
  8444. "operationId": "experimental.workspace.create",
  8445. "parameters": [
  8446. {
  8447. "name": "directory",
  8448. "in": "query",
  8449. "schema": {
  8450. "type": "string"
  8451. },
  8452. "required": false
  8453. },
  8454. {
  8455. "name": "workspace",
  8456. "in": "query",
  8457. "schema": {
  8458. "type": "string"
  8459. },
  8460. "required": false
  8461. }
  8462. ],
  8463. "responses": {
  8464. "200": {
  8465. "description": "Workspace created",
  8466. "content": {
  8467. "application/json": {
  8468. "schema": {
  8469. "$ref": "#/components/schemas/Workspace"
  8470. }
  8471. }
  8472. }
  8473. },
  8474. "400": {
  8475. "description": "Bad request",
  8476. "content": {
  8477. "application/json": {
  8478. "schema": {
  8479. "$ref": "#/components/schemas/BadRequestError"
  8480. }
  8481. }
  8482. }
  8483. }
  8484. },
  8485. "description": "Create a workspace for the current project.",
  8486. "summary": "Create workspace",
  8487. "requestBody": {
  8488. "content": {
  8489. "application/json": {
  8490. "schema": {
  8491. "type": "object",
  8492. "properties": {
  8493. "id": {
  8494. "type": "string"
  8495. },
  8496. "type": {
  8497. "type": "string"
  8498. },
  8499. "branch": {
  8500. "anyOf": [
  8501. {
  8502. "type": "string"
  8503. },
  8504. {
  8505. "type": "null"
  8506. }
  8507. ]
  8508. },
  8509. "extra": {
  8510. "anyOf": [
  8511. {},
  8512. {
  8513. "type": "null"
  8514. }
  8515. ]
  8516. }
  8517. },
  8518. "required": ["type", "branch"],
  8519. "additionalProperties": false
  8520. }
  8521. }
  8522. }
  8523. },
  8524. "x-codeSamples": [
  8525. {
  8526. "lang": "js",
  8527. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8528. }
  8529. ]
  8530. }
  8531. },
  8532. "/experimental/workspace/sync-list": {
  8533. "post": {
  8534. "tags": ["workspace"],
  8535. "operationId": "experimental.workspace.syncList",
  8536. "parameters": [
  8537. {
  8538. "name": "directory",
  8539. "in": "query",
  8540. "schema": {
  8541. "type": "string"
  8542. },
  8543. "required": false
  8544. },
  8545. {
  8546. "name": "workspace",
  8547. "in": "query",
  8548. "schema": {
  8549. "type": "string"
  8550. },
  8551. "required": false
  8552. }
  8553. ],
  8554. "responses": {
  8555. "204": {
  8556. "description": "Workspace list synced"
  8557. }
  8558. },
  8559. "description": "Register missing workspaces returned by workspace adapters.",
  8560. "summary": "Sync workspace list",
  8561. "x-codeSamples": [
  8562. {
  8563. "lang": "js",
  8564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8565. }
  8566. ]
  8567. }
  8568. },
  8569. "/experimental/workspace/status": {
  8570. "get": {
  8571. "tags": ["workspace"],
  8572. "operationId": "experimental.workspace.status",
  8573. "parameters": [
  8574. {
  8575. "name": "directory",
  8576. "in": "query",
  8577. "schema": {
  8578. "type": "string"
  8579. },
  8580. "required": false
  8581. },
  8582. {
  8583. "name": "workspace",
  8584. "in": "query",
  8585. "schema": {
  8586. "type": "string"
  8587. },
  8588. "required": false
  8589. }
  8590. ],
  8591. "responses": {
  8592. "200": {
  8593. "description": "Workspace status",
  8594. "content": {
  8595. "application/json": {
  8596. "schema": {
  8597. "type": "array",
  8598. "items": {
  8599. "type": "object",
  8600. "properties": {
  8601. "workspaceID": {
  8602. "type": "string"
  8603. },
  8604. "status": {
  8605. "type": "string",
  8606. "enum": ["connected", "connecting", "disconnected", "error"]
  8607. }
  8608. },
  8609. "required": ["workspaceID", "status"],
  8610. "additionalProperties": false
  8611. },
  8612. "description": "Workspace status"
  8613. }
  8614. }
  8615. }
  8616. }
  8617. },
  8618. "description": "Get connection status for workspaces in the current project.",
  8619. "summary": "Workspace status",
  8620. "x-codeSamples": [
  8621. {
  8622. "lang": "js",
  8623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8624. }
  8625. ]
  8626. }
  8627. },
  8628. "/experimental/workspace/{id}": {
  8629. "delete": {
  8630. "tags": ["workspace"],
  8631. "operationId": "experimental.workspace.remove",
  8632. "parameters": [
  8633. {
  8634. "name": "id",
  8635. "in": "path",
  8636. "schema": {
  8637. "type": "string",
  8638. "pattern": "^wrk.*"
  8639. },
  8640. "required": true
  8641. },
  8642. {
  8643. "name": "directory",
  8644. "in": "query",
  8645. "schema": {
  8646. "type": "string"
  8647. },
  8648. "required": false
  8649. },
  8650. {
  8651. "name": "workspace",
  8652. "in": "query",
  8653. "schema": {
  8654. "type": "string"
  8655. },
  8656. "required": false
  8657. }
  8658. ],
  8659. "responses": {
  8660. "200": {
  8661. "description": "Workspace removed",
  8662. "content": {
  8663. "application/json": {
  8664. "schema": {
  8665. "$ref": "#/components/schemas/Workspace"
  8666. }
  8667. }
  8668. }
  8669. },
  8670. "400": {
  8671. "description": "Bad request",
  8672. "content": {
  8673. "application/json": {
  8674. "schema": {
  8675. "$ref": "#/components/schemas/BadRequestError"
  8676. }
  8677. }
  8678. }
  8679. }
  8680. },
  8681. "description": "Remove an existing workspace.",
  8682. "summary": "Remove workspace",
  8683. "x-codeSamples": [
  8684. {
  8685. "lang": "js",
  8686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8687. }
  8688. ]
  8689. }
  8690. },
  8691. "/experimental/workspace/warp": {
  8692. "post": {
  8693. "tags": ["workspace"],
  8694. "operationId": "experimental.workspace.warp",
  8695. "parameters": [
  8696. {
  8697. "name": "directory",
  8698. "in": "query",
  8699. "schema": {
  8700. "type": "string"
  8701. },
  8702. "required": false
  8703. },
  8704. {
  8705. "name": "workspace",
  8706. "in": "query",
  8707. "schema": {
  8708. "type": "string"
  8709. },
  8710. "required": false
  8711. }
  8712. ],
  8713. "responses": {
  8714. "204": {
  8715. "description": "Session warped"
  8716. },
  8717. "400": {
  8718. "description": "WorkspaceWarpError | VcsApplyError",
  8719. "content": {
  8720. "application/json": {
  8721. "schema": {
  8722. "anyOf": [
  8723. {
  8724. "$ref": "#/components/schemas/WorkspaceWarpError"
  8725. },
  8726. {
  8727. "$ref": "#/components/schemas/VcsApplyError"
  8728. }
  8729. ]
  8730. }
  8731. }
  8732. }
  8733. }
  8734. },
  8735. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8736. "summary": "Warp session into workspace",
  8737. "requestBody": {
  8738. "content": {
  8739. "application/json": {
  8740. "schema": {
  8741. "type": "object",
  8742. "properties": {
  8743. "id": {
  8744. "anyOf": [
  8745. {
  8746. "type": "string"
  8747. },
  8748. {
  8749. "type": "null"
  8750. }
  8751. ]
  8752. },
  8753. "sessionID": {
  8754. "type": "string"
  8755. },
  8756. "copyChanges": {
  8757. "type": "boolean"
  8758. }
  8759. },
  8760. "required": ["id", "sessionID"],
  8761. "additionalProperties": false
  8762. }
  8763. }
  8764. }
  8765. },
  8766. "x-codeSamples": [
  8767. {
  8768. "lang": "js",
  8769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8770. }
  8771. ]
  8772. }
  8773. },
  8774. "/pty/{ptyID}/connect": {
  8775. "get": {
  8776. "tags": ["pty"],
  8777. "operationId": "pty.connect",
  8778. "parameters": [
  8779. {
  8780. "name": "ptyID",
  8781. "in": "path",
  8782. "schema": {
  8783. "type": "string",
  8784. "pattern": "^pty.*"
  8785. },
  8786. "required": true
  8787. },
  8788. {
  8789. "name": "directory",
  8790. "in": "query",
  8791. "schema": {
  8792. "type": "string"
  8793. },
  8794. "required": false
  8795. },
  8796. {
  8797. "name": "workspace",
  8798. "in": "query",
  8799. "schema": {
  8800. "type": "string"
  8801. },
  8802. "required": false
  8803. }
  8804. ],
  8805. "responses": {
  8806. "200": {
  8807. "description": "Connected session",
  8808. "content": {
  8809. "application/json": {
  8810. "schema": {
  8811. "type": "boolean",
  8812. "description": "Connected session"
  8813. }
  8814. }
  8815. }
  8816. },
  8817. "403": {
  8818. "description": "Forbidden",
  8819. "content": {
  8820. "application/json": {
  8821. "schema": {
  8822. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8823. }
  8824. }
  8825. }
  8826. },
  8827. "404": {
  8828. "description": "Not found",
  8829. "content": {
  8830. "application/json": {
  8831. "schema": {
  8832. "$ref": "#/components/schemas/NotFoundError"
  8833. }
  8834. }
  8835. }
  8836. }
  8837. },
  8838. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8839. "summary": "Connect to PTY session",
  8840. "x-codeSamples": [
  8841. {
  8842. "lang": "js",
  8843. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8844. }
  8845. ]
  8846. }
  8847. }
  8848. },
  8849. "components": {
  8850. "schemas": {
  8851. "Event": {
  8852. "anyOf": [
  8853. {
  8854. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8855. },
  8856. {
  8857. "$ref": "#/components/schemas/EventFileEdited"
  8858. },
  8859. {
  8860. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8861. },
  8862. {
  8863. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8864. },
  8865. {
  8866. "$ref": "#/components/schemas/EventLspUpdated"
  8867. },
  8868. {
  8869. "$ref": "#/components/schemas/EventMessagePartDelta"
  8870. },
  8871. {
  8872. "$ref": "#/components/schemas/EventPermissionAsked"
  8873. },
  8874. {
  8875. "$ref": "#/components/schemas/EventPermissionReplied"
  8876. },
  8877. {
  8878. "$ref": "#/components/schemas/EventSessionDiff"
  8879. },
  8880. {
  8881. "$ref": "#/components/schemas/EventSessionError"
  8882. },
  8883. {
  8884. "$ref": "#/components/schemas/EventInstallationUpdated"
  8885. },
  8886. {
  8887. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8888. },
  8889. {
  8890. "$ref": "#/components/schemas/EventQuestionAsked"
  8891. },
  8892. {
  8893. "$ref": "#/components/schemas/EventQuestionReplied"
  8894. },
  8895. {
  8896. "$ref": "#/components/schemas/EventQuestionRejected"
  8897. },
  8898. {
  8899. "$ref": "#/components/schemas/EventTodoUpdated"
  8900. },
  8901. {
  8902. "$ref": "#/components/schemas/EventSessionStatus"
  8903. },
  8904. {
  8905. "$ref": "#/components/schemas/EventSessionIdle"
  8906. },
  8907. {
  8908. "$ref": "#/components/schemas/EventSessionCompacted"
  8909. },
  8910. {
  8911. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8912. },
  8913. {
  8914. "$ref": "#/components/schemas/Event.tui.command.execute"
  8915. },
  8916. {
  8917. "$ref": "#/components/schemas/EventTuiToastShow1"
  8918. },
  8919. {
  8920. "$ref": "#/components/schemas/Event.tui.session.select"
  8921. },
  8922. {
  8923. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8924. },
  8925. {
  8926. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8927. },
  8928. {
  8929. "$ref": "#/components/schemas/EventCommandExecuted"
  8930. },
  8931. {
  8932. "$ref": "#/components/schemas/EventProjectUpdated"
  8933. },
  8934. {
  8935. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8936. },
  8937. {
  8938. "$ref": "#/components/schemas/EventWorkspaceReady"
  8939. },
  8940. {
  8941. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8942. },
  8943. {
  8944. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8945. },
  8946. {
  8947. "$ref": "#/components/schemas/EventWorktreeReady"
  8948. },
  8949. {
  8950. "$ref": "#/components/schemas/EventWorktreeFailed"
  8951. },
  8952. {
  8953. "$ref": "#/components/schemas/EventPtyCreated"
  8954. },
  8955. {
  8956. "$ref": "#/components/schemas/EventPtyUpdated"
  8957. },
  8958. {
  8959. "$ref": "#/components/schemas/EventPtyExited"
  8960. },
  8961. {
  8962. "$ref": "#/components/schemas/EventPtyDeleted"
  8963. },
  8964. {
  8965. "$ref": "#/components/schemas/EventMessageUpdated"
  8966. },
  8967. {
  8968. "$ref": "#/components/schemas/EventMessageRemoved"
  8969. },
  8970. {
  8971. "$ref": "#/components/schemas/EventMessagePartUpdated"
  8972. },
  8973. {
  8974. "$ref": "#/components/schemas/EventMessagePartRemoved"
  8975. },
  8976. {
  8977. "$ref": "#/components/schemas/EventSessionCreated"
  8978. },
  8979. {
  8980. "$ref": "#/components/schemas/EventSessionUpdated"
  8981. },
  8982. {
  8983. "$ref": "#/components/schemas/EventSessionDeleted"
  8984. },
  8985. {
  8986. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  8987. },
  8988. {
  8989. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  8990. },
  8991. {
  8992. "$ref": "#/components/schemas/EventSessionNextPrompted"
  8993. },
  8994. {
  8995. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  8996. },
  8997. {
  8998. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  8999. },
  9000. {
  9001. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9002. },
  9003. {
  9004. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9005. },
  9006. {
  9007. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9008. },
  9009. {
  9010. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9011. },
  9012. {
  9013. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9014. },
  9015. {
  9016. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9017. },
  9018. {
  9019. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9020. },
  9021. {
  9022. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9023. },
  9024. {
  9025. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9026. },
  9027. {
  9028. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9029. },
  9030. {
  9031. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9032. },
  9033. {
  9034. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9035. },
  9036. {
  9037. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9038. },
  9039. {
  9040. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9041. },
  9042. {
  9043. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9044. },
  9045. {
  9046. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9047. },
  9048. {
  9049. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9050. },
  9051. {
  9052. "$ref": "#/components/schemas/EventSessionNextRetried"
  9053. },
  9054. {
  9055. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9056. },
  9057. {
  9058. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9059. },
  9060. {
  9061. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9062. },
  9063. {
  9064. "$ref": "#/components/schemas/EventServerConnected"
  9065. },
  9066. {
  9067. "$ref": "#/components/schemas/EventGlobalDisposed"
  9068. }
  9069. ]
  9070. },
  9071. "OAuth": {
  9072. "type": "object",
  9073. "properties": {
  9074. "type": {
  9075. "type": "string",
  9076. "enum": ["oauth"]
  9077. },
  9078. "refresh": {
  9079. "type": "string"
  9080. },
  9081. "access": {
  9082. "type": "string"
  9083. },
  9084. "expires": {
  9085. "type": "integer",
  9086. "minimum": 0
  9087. },
  9088. "accountId": {
  9089. "type": "string"
  9090. },
  9091. "enterpriseUrl": {
  9092. "type": "string"
  9093. }
  9094. },
  9095. "required": ["type", "refresh", "access", "expires"],
  9096. "additionalProperties": false
  9097. },
  9098. "ApiAuth": {
  9099. "type": "object",
  9100. "properties": {
  9101. "type": {
  9102. "type": "string",
  9103. "enum": ["api"]
  9104. },
  9105. "key": {
  9106. "type": "string"
  9107. },
  9108. "metadata": {
  9109. "type": "object",
  9110. "additionalProperties": {
  9111. "type": "string"
  9112. }
  9113. }
  9114. },
  9115. "required": ["type", "key"],
  9116. "additionalProperties": false
  9117. },
  9118. "WellKnownAuth": {
  9119. "type": "object",
  9120. "properties": {
  9121. "type": {
  9122. "type": "string",
  9123. "enum": ["wellknown"]
  9124. },
  9125. "key": {
  9126. "type": "string"
  9127. },
  9128. "token": {
  9129. "type": "string"
  9130. }
  9131. },
  9132. "required": ["type", "key", "token"],
  9133. "additionalProperties": false
  9134. },
  9135. "Auth": {
  9136. "anyOf": [
  9137. {
  9138. "$ref": "#/components/schemas/OAuth"
  9139. },
  9140. {
  9141. "$ref": "#/components/schemas/ApiAuth"
  9142. },
  9143. {
  9144. "$ref": "#/components/schemas/WellKnownAuth"
  9145. }
  9146. ]
  9147. },
  9148. "PermissionRequest": {
  9149. "type": "object",
  9150. "properties": {
  9151. "id": {
  9152. "type": "string",
  9153. "pattern": "^per"
  9154. },
  9155. "sessionID": {
  9156. "type": "string"
  9157. },
  9158. "permission": {
  9159. "type": "string"
  9160. },
  9161. "patterns": {
  9162. "type": "array",
  9163. "items": {
  9164. "type": "string"
  9165. }
  9166. },
  9167. "metadata": {
  9168. "type": "object"
  9169. },
  9170. "always": {
  9171. "type": "array",
  9172. "items": {
  9173. "type": "string"
  9174. }
  9175. },
  9176. "tool": {
  9177. "type": "object",
  9178. "properties": {
  9179. "messageID": {
  9180. "type": "string"
  9181. },
  9182. "callID": {
  9183. "type": "string"
  9184. }
  9185. },
  9186. "required": ["messageID", "callID"],
  9187. "additionalProperties": false
  9188. }
  9189. },
  9190. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9191. "additionalProperties": false
  9192. },
  9193. "SnapshotFileDiff": {
  9194. "type": "object",
  9195. "properties": {
  9196. "file": {
  9197. "type": "string"
  9198. },
  9199. "patch": {
  9200. "type": "string"
  9201. },
  9202. "additions": {
  9203. "type": "integer",
  9204. "minimum": 0
  9205. },
  9206. "deletions": {
  9207. "type": "integer",
  9208. "minimum": 0
  9209. },
  9210. "status": {
  9211. "type": "string",
  9212. "enum": ["added", "deleted", "modified"]
  9213. }
  9214. },
  9215. "required": ["additions", "deletions"],
  9216. "additionalProperties": false
  9217. },
  9218. "ProviderAuthError": {
  9219. "type": "object",
  9220. "properties": {
  9221. "name": {
  9222. "type": "string",
  9223. "enum": ["ProviderAuthError"]
  9224. },
  9225. "data": {
  9226. "type": "object",
  9227. "properties": {
  9228. "providerID": {
  9229. "type": "string"
  9230. },
  9231. "message": {
  9232. "type": "string"
  9233. }
  9234. },
  9235. "required": ["providerID", "message"],
  9236. "additionalProperties": false
  9237. }
  9238. },
  9239. "required": ["name", "data"],
  9240. "additionalProperties": false
  9241. },
  9242. "UnknownError": {
  9243. "type": "object",
  9244. "properties": {
  9245. "name": {
  9246. "type": "string",
  9247. "enum": ["UnknownError"]
  9248. },
  9249. "data": {
  9250. "type": "object",
  9251. "properties": {
  9252. "message": {
  9253. "type": "string"
  9254. }
  9255. },
  9256. "required": ["message"],
  9257. "additionalProperties": false
  9258. }
  9259. },
  9260. "required": ["name", "data"],
  9261. "additionalProperties": false
  9262. },
  9263. "MessageOutputLengthError": {
  9264. "type": "object",
  9265. "properties": {
  9266. "name": {
  9267. "type": "string",
  9268. "enum": ["MessageOutputLengthError"]
  9269. },
  9270. "data": {
  9271. "type": "object",
  9272. "properties": {}
  9273. }
  9274. },
  9275. "required": ["name", "data"],
  9276. "additionalProperties": false
  9277. },
  9278. "MessageAbortedError": {
  9279. "type": "object",
  9280. "properties": {
  9281. "name": {
  9282. "type": "string",
  9283. "enum": ["MessageAbortedError"]
  9284. },
  9285. "data": {
  9286. "type": "object",
  9287. "properties": {
  9288. "message": {
  9289. "type": "string"
  9290. }
  9291. },
  9292. "required": ["message"],
  9293. "additionalProperties": false
  9294. }
  9295. },
  9296. "required": ["name", "data"],
  9297. "additionalProperties": false
  9298. },
  9299. "StructuredOutputError": {
  9300. "type": "object",
  9301. "properties": {
  9302. "name": {
  9303. "type": "string",
  9304. "enum": ["StructuredOutputError"]
  9305. },
  9306. "data": {
  9307. "type": "object",
  9308. "properties": {
  9309. "message": {
  9310. "type": "string"
  9311. },
  9312. "retries": {
  9313. "type": "integer",
  9314. "minimum": 0
  9315. }
  9316. },
  9317. "required": ["message", "retries"],
  9318. "additionalProperties": false
  9319. }
  9320. },
  9321. "required": ["name", "data"],
  9322. "additionalProperties": false
  9323. },
  9324. "ContextOverflowError": {
  9325. "type": "object",
  9326. "properties": {
  9327. "name": {
  9328. "type": "string",
  9329. "enum": ["ContextOverflowError"]
  9330. },
  9331. "data": {
  9332. "type": "object",
  9333. "properties": {
  9334. "message": {
  9335. "type": "string"
  9336. },
  9337. "responseBody": {
  9338. "type": "string"
  9339. }
  9340. },
  9341. "required": ["message"],
  9342. "additionalProperties": false
  9343. }
  9344. },
  9345. "required": ["name", "data"],
  9346. "additionalProperties": false
  9347. },
  9348. "APIError": {
  9349. "type": "object",
  9350. "properties": {
  9351. "name": {
  9352. "type": "string",
  9353. "enum": ["APIError"]
  9354. },
  9355. "data": {
  9356. "type": "object",
  9357. "properties": {
  9358. "message": {
  9359. "type": "string"
  9360. },
  9361. "statusCode": {
  9362. "type": "integer",
  9363. "minimum": 0
  9364. },
  9365. "isRetryable": {
  9366. "type": "boolean"
  9367. },
  9368. "responseHeaders": {
  9369. "type": "object",
  9370. "additionalProperties": {
  9371. "type": "string"
  9372. }
  9373. },
  9374. "responseBody": {
  9375. "type": "string"
  9376. },
  9377. "metadata": {
  9378. "type": "object",
  9379. "additionalProperties": {
  9380. "type": "string"
  9381. }
  9382. }
  9383. },
  9384. "required": ["message", "isRetryable"],
  9385. "additionalProperties": false
  9386. }
  9387. },
  9388. "required": ["name", "data"],
  9389. "additionalProperties": false
  9390. },
  9391. "QuestionOption": {
  9392. "type": "object",
  9393. "properties": {
  9394. "label": {
  9395. "type": "string",
  9396. "description": "Display text (1-5 words, concise)"
  9397. },
  9398. "description": {
  9399. "type": "string",
  9400. "description": "Explanation of choice"
  9401. }
  9402. },
  9403. "required": ["label", "description"],
  9404. "additionalProperties": false
  9405. },
  9406. "QuestionInfo": {
  9407. "type": "object",
  9408. "properties": {
  9409. "question": {
  9410. "type": "string",
  9411. "description": "Complete question"
  9412. },
  9413. "header": {
  9414. "type": "string",
  9415. "description": "Very short label (max 30 chars)"
  9416. },
  9417. "options": {
  9418. "type": "array",
  9419. "items": {
  9420. "$ref": "#/components/schemas/QuestionOption"
  9421. },
  9422. "description": "Available choices"
  9423. },
  9424. "multiple": {
  9425. "type": "boolean"
  9426. },
  9427. "custom": {
  9428. "type": "boolean"
  9429. }
  9430. },
  9431. "required": ["question", "header", "options"],
  9432. "additionalProperties": false
  9433. },
  9434. "QuestionTool": {
  9435. "type": "object",
  9436. "properties": {
  9437. "messageID": {
  9438. "type": "string"
  9439. },
  9440. "callID": {
  9441. "type": "string"
  9442. }
  9443. },
  9444. "required": ["messageID", "callID"],
  9445. "additionalProperties": false
  9446. },
  9447. "QuestionRequest": {
  9448. "type": "object",
  9449. "properties": {
  9450. "id": {
  9451. "type": "string",
  9452. "pattern": "^que"
  9453. },
  9454. "sessionID": {
  9455. "type": "string"
  9456. },
  9457. "questions": {
  9458. "type": "array",
  9459. "items": {
  9460. "$ref": "#/components/schemas/QuestionInfo"
  9461. },
  9462. "description": "Questions to ask"
  9463. },
  9464. "tool": {
  9465. "$ref": "#/components/schemas/QuestionTool"
  9466. }
  9467. },
  9468. "required": ["id", "sessionID", "questions"],
  9469. "additionalProperties": false
  9470. },
  9471. "QuestionAnswer": {
  9472. "type": "array",
  9473. "items": {
  9474. "type": "string"
  9475. }
  9476. },
  9477. "QuestionReplied": {
  9478. "type": "object",
  9479. "properties": {
  9480. "sessionID": {
  9481. "type": "string"
  9482. },
  9483. "requestID": {
  9484. "type": "string",
  9485. "pattern": "^que"
  9486. },
  9487. "answers": {
  9488. "type": "array",
  9489. "items": {
  9490. "$ref": "#/components/schemas/QuestionAnswer"
  9491. }
  9492. }
  9493. },
  9494. "required": ["sessionID", "requestID", "answers"],
  9495. "additionalProperties": false
  9496. },
  9497. "QuestionRejected": {
  9498. "type": "object",
  9499. "properties": {
  9500. "sessionID": {
  9501. "type": "string"
  9502. },
  9503. "requestID": {
  9504. "type": "string",
  9505. "pattern": "^que"
  9506. }
  9507. },
  9508. "required": ["sessionID", "requestID"],
  9509. "additionalProperties": false
  9510. },
  9511. "Todo": {
  9512. "type": "object",
  9513. "properties": {
  9514. "content": {
  9515. "type": "string",
  9516. "description": "Brief description of the task"
  9517. },
  9518. "status": {
  9519. "type": "string",
  9520. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9521. },
  9522. "priority": {
  9523. "type": "string",
  9524. "description": "Priority level of the task: high, medium, low"
  9525. }
  9526. },
  9527. "required": ["content", "status", "priority"],
  9528. "additionalProperties": false
  9529. },
  9530. "SessionStatus": {
  9531. "anyOf": [
  9532. {
  9533. "type": "object",
  9534. "properties": {
  9535. "type": {
  9536. "type": "string",
  9537. "enum": ["idle"]
  9538. }
  9539. },
  9540. "required": ["type"],
  9541. "additionalProperties": false
  9542. },
  9543. {
  9544. "type": "object",
  9545. "properties": {
  9546. "type": {
  9547. "type": "string",
  9548. "enum": ["retry"]
  9549. },
  9550. "attempt": {
  9551. "type": "integer",
  9552. "minimum": 0
  9553. },
  9554. "message": {
  9555. "type": "string"
  9556. },
  9557. "action": {
  9558. "type": "object",
  9559. "properties": {
  9560. "reason": {
  9561. "type": "string"
  9562. },
  9563. "provider": {
  9564. "type": "string"
  9565. },
  9566. "title": {
  9567. "type": "string"
  9568. },
  9569. "message": {
  9570. "type": "string"
  9571. },
  9572. "label": {
  9573. "type": "string"
  9574. },
  9575. "link": {
  9576. "type": "string"
  9577. }
  9578. },
  9579. "required": ["reason", "provider", "title", "message", "label"],
  9580. "additionalProperties": false
  9581. },
  9582. "next": {
  9583. "type": "integer",
  9584. "minimum": 0
  9585. }
  9586. },
  9587. "required": ["type", "attempt", "message", "next"],
  9588. "additionalProperties": false
  9589. },
  9590. {
  9591. "type": "object",
  9592. "properties": {
  9593. "type": {
  9594. "type": "string",
  9595. "enum": ["busy"]
  9596. }
  9597. },
  9598. "required": ["type"],
  9599. "additionalProperties": false
  9600. }
  9601. ]
  9602. },
  9603. "Event.tui.prompt.append": {
  9604. "type": "object",
  9605. "properties": {
  9606. "id": {
  9607. "type": "string"
  9608. },
  9609. "type": {
  9610. "type": "string",
  9611. "enum": ["tui.prompt.append"]
  9612. },
  9613. "properties": {
  9614. "type": "object",
  9615. "properties": {
  9616. "text": {
  9617. "type": "string"
  9618. }
  9619. },
  9620. "required": ["text"],
  9621. "additionalProperties": false
  9622. }
  9623. },
  9624. "required": ["id", "type", "properties"],
  9625. "additionalProperties": false
  9626. },
  9627. "Event.tui.command.execute": {
  9628. "type": "object",
  9629. "properties": {
  9630. "id": {
  9631. "type": "string"
  9632. },
  9633. "type": {
  9634. "type": "string",
  9635. "enum": ["tui.command.execute"]
  9636. },
  9637. "properties": {
  9638. "type": "object",
  9639. "properties": {
  9640. "command": {
  9641. "anyOf": [
  9642. {
  9643. "type": "string",
  9644. "enum": [
  9645. "session.list",
  9646. "session.new",
  9647. "session.share",
  9648. "session.interrupt",
  9649. "session.compact",
  9650. "session.page.up",
  9651. "session.page.down",
  9652. "session.line.up",
  9653. "session.line.down",
  9654. "session.half.page.up",
  9655. "session.half.page.down",
  9656. "session.first",
  9657. "session.last",
  9658. "prompt.clear",
  9659. "prompt.submit",
  9660. "agent.cycle"
  9661. ]
  9662. },
  9663. {
  9664. "type": "string"
  9665. }
  9666. ]
  9667. }
  9668. },
  9669. "required": ["command"],
  9670. "additionalProperties": false
  9671. }
  9672. },
  9673. "required": ["id", "type", "properties"],
  9674. "additionalProperties": false
  9675. },
  9676. "Event.tui.toast.show": {
  9677. "type": "object",
  9678. "properties": {
  9679. "id": {
  9680. "type": "string"
  9681. },
  9682. "type": {
  9683. "type": "string",
  9684. "enum": ["tui.toast.show"]
  9685. },
  9686. "properties": {
  9687. "type": "object",
  9688. "properties": {
  9689. "title": {
  9690. "type": "string"
  9691. },
  9692. "message": {
  9693. "type": "string"
  9694. },
  9695. "variant": {
  9696. "type": "string",
  9697. "enum": ["info", "success", "warning", "error"]
  9698. },
  9699. "duration": {
  9700. "type": "integer",
  9701. "exclusiveMinimum": 0
  9702. }
  9703. },
  9704. "required": ["message", "variant"],
  9705. "additionalProperties": false
  9706. }
  9707. },
  9708. "required": ["id", "type", "properties"],
  9709. "additionalProperties": false
  9710. },
  9711. "Event.tui.session.select": {
  9712. "type": "object",
  9713. "properties": {
  9714. "id": {
  9715. "type": "string"
  9716. },
  9717. "type": {
  9718. "type": "string",
  9719. "enum": ["tui.session.select"]
  9720. },
  9721. "properties": {
  9722. "type": "object",
  9723. "properties": {
  9724. "sessionID": {
  9725. "type": "string",
  9726. "description": "Session ID to navigate to"
  9727. }
  9728. },
  9729. "required": ["sessionID"],
  9730. "additionalProperties": false
  9731. }
  9732. },
  9733. "required": ["id", "type", "properties"],
  9734. "additionalProperties": false
  9735. },
  9736. "Project": {
  9737. "type": "object",
  9738. "properties": {
  9739. "id": {
  9740. "type": "string"
  9741. },
  9742. "worktree": {
  9743. "type": "string"
  9744. },
  9745. "vcs": {
  9746. "type": "string",
  9747. "enum": ["git"]
  9748. },
  9749. "name": {
  9750. "type": "string"
  9751. },
  9752. "icon": {
  9753. "type": "object",
  9754. "properties": {
  9755. "url": {
  9756. "type": "string"
  9757. },
  9758. "override": {
  9759. "type": "string"
  9760. },
  9761. "color": {
  9762. "type": "string"
  9763. }
  9764. },
  9765. "additionalProperties": false
  9766. },
  9767. "commands": {
  9768. "type": "object",
  9769. "properties": {
  9770. "start": {
  9771. "type": "string",
  9772. "description": "Startup script to run when creating a new workspace (worktree)"
  9773. }
  9774. },
  9775. "additionalProperties": false
  9776. },
  9777. "time": {
  9778. "type": "object",
  9779. "properties": {
  9780. "created": {
  9781. "type": "integer",
  9782. "minimum": 0
  9783. },
  9784. "updated": {
  9785. "type": "integer",
  9786. "minimum": 0
  9787. },
  9788. "initialized": {
  9789. "type": "integer",
  9790. "minimum": 0
  9791. }
  9792. },
  9793. "required": ["created", "updated"],
  9794. "additionalProperties": false
  9795. },
  9796. "sandboxes": {
  9797. "type": "array",
  9798. "items": {
  9799. "type": "string"
  9800. }
  9801. }
  9802. },
  9803. "required": ["id", "worktree", "time", "sandboxes"],
  9804. "additionalProperties": false
  9805. },
  9806. "Pty": {
  9807. "type": "object",
  9808. "properties": {
  9809. "id": {
  9810. "type": "string"
  9811. },
  9812. "title": {
  9813. "type": "string"
  9814. },
  9815. "command": {
  9816. "type": "string"
  9817. },
  9818. "args": {
  9819. "type": "array",
  9820. "items": {
  9821. "type": "string"
  9822. }
  9823. },
  9824. "cwd": {
  9825. "type": "string"
  9826. },
  9827. "status": {
  9828. "type": "string",
  9829. "enum": ["running", "exited"]
  9830. },
  9831. "pid": {
  9832. "type": "integer",
  9833. "exclusiveMinimum": 0
  9834. }
  9835. },
  9836. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9837. "additionalProperties": false
  9838. },
  9839. "OutputFormatText": {
  9840. "type": "object",
  9841. "properties": {
  9842. "type": {
  9843. "type": "string",
  9844. "enum": ["text"]
  9845. }
  9846. },
  9847. "required": ["type"],
  9848. "additionalProperties": false
  9849. },
  9850. "JSONSchema": {
  9851. "type": "object"
  9852. },
  9853. "OutputFormatJsonSchema": {
  9854. "type": "object",
  9855. "properties": {
  9856. "type": {
  9857. "type": "string",
  9858. "enum": ["json_schema"]
  9859. },
  9860. "schema": {
  9861. "$ref": "#/components/schemas/JSONSchema"
  9862. },
  9863. "retryCount": {
  9864. "type": "integer",
  9865. "minimum": 0
  9866. }
  9867. },
  9868. "required": ["type", "schema"],
  9869. "additionalProperties": false
  9870. },
  9871. "OutputFormat": {
  9872. "anyOf": [
  9873. {
  9874. "$ref": "#/components/schemas/OutputFormatText"
  9875. },
  9876. {
  9877. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9878. }
  9879. ]
  9880. },
  9881. "UserMessage": {
  9882. "type": "object",
  9883. "properties": {
  9884. "id": {
  9885. "type": "string"
  9886. },
  9887. "sessionID": {
  9888. "type": "string"
  9889. },
  9890. "role": {
  9891. "type": "string",
  9892. "enum": ["user"]
  9893. },
  9894. "time": {
  9895. "type": "object",
  9896. "properties": {
  9897. "created": {
  9898. "type": "integer",
  9899. "minimum": 0
  9900. }
  9901. },
  9902. "required": ["created"],
  9903. "additionalProperties": false
  9904. },
  9905. "format": {
  9906. "$ref": "#/components/schemas/OutputFormat"
  9907. },
  9908. "summary": {
  9909. "type": "object",
  9910. "properties": {
  9911. "title": {
  9912. "type": "string"
  9913. },
  9914. "body": {
  9915. "type": "string"
  9916. },
  9917. "diffs": {
  9918. "type": "array",
  9919. "items": {
  9920. "$ref": "#/components/schemas/SnapshotFileDiff"
  9921. }
  9922. }
  9923. },
  9924. "required": ["diffs"],
  9925. "additionalProperties": false
  9926. },
  9927. "agent": {
  9928. "type": "string"
  9929. },
  9930. "model": {
  9931. "type": "object",
  9932. "properties": {
  9933. "providerID": {
  9934. "type": "string"
  9935. },
  9936. "modelID": {
  9937. "type": "string"
  9938. },
  9939. "variant": {
  9940. "type": "string"
  9941. }
  9942. },
  9943. "required": ["providerID", "modelID"],
  9944. "additionalProperties": false
  9945. },
  9946. "system": {
  9947. "type": "string"
  9948. },
  9949. "tools": {
  9950. "type": "object",
  9951. "additionalProperties": {
  9952. "type": "boolean"
  9953. }
  9954. }
  9955. },
  9956. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  9957. "additionalProperties": false
  9958. },
  9959. "AssistantMessage": {
  9960. "type": "object",
  9961. "properties": {
  9962. "id": {
  9963. "type": "string"
  9964. },
  9965. "sessionID": {
  9966. "type": "string"
  9967. },
  9968. "role": {
  9969. "type": "string",
  9970. "enum": ["assistant"]
  9971. },
  9972. "time": {
  9973. "type": "object",
  9974. "properties": {
  9975. "created": {
  9976. "type": "integer",
  9977. "minimum": 0
  9978. },
  9979. "completed": {
  9980. "type": "integer",
  9981. "minimum": 0
  9982. }
  9983. },
  9984. "required": ["created"],
  9985. "additionalProperties": false
  9986. },
  9987. "error": {
  9988. "anyOf": [
  9989. {
  9990. "$ref": "#/components/schemas/ProviderAuthError"
  9991. },
  9992. {
  9993. "$ref": "#/components/schemas/UnknownError"
  9994. },
  9995. {
  9996. "$ref": "#/components/schemas/MessageOutputLengthError"
  9997. },
  9998. {
  9999. "$ref": "#/components/schemas/MessageAbortedError"
  10000. },
  10001. {
  10002. "$ref": "#/components/schemas/StructuredOutputError"
  10003. },
  10004. {
  10005. "$ref": "#/components/schemas/ContextOverflowError"
  10006. },
  10007. {
  10008. "$ref": "#/components/schemas/APIError"
  10009. }
  10010. ]
  10011. },
  10012. "parentID": {
  10013. "type": "string"
  10014. },
  10015. "modelID": {
  10016. "type": "string"
  10017. },
  10018. "providerID": {
  10019. "type": "string"
  10020. },
  10021. "mode": {
  10022. "type": "string"
  10023. },
  10024. "agent": {
  10025. "type": "string"
  10026. },
  10027. "path": {
  10028. "type": "object",
  10029. "properties": {
  10030. "cwd": {
  10031. "type": "string"
  10032. },
  10033. "root": {
  10034. "type": "string"
  10035. }
  10036. },
  10037. "required": ["cwd", "root"],
  10038. "additionalProperties": false
  10039. },
  10040. "summary": {
  10041. "type": "boolean"
  10042. },
  10043. "cost": {
  10044. "type": "number"
  10045. },
  10046. "tokens": {
  10047. "type": "object",
  10048. "properties": {
  10049. "total": {
  10050. "type": "integer",
  10051. "minimum": 0
  10052. },
  10053. "input": {
  10054. "type": "integer",
  10055. "minimum": 0
  10056. },
  10057. "output": {
  10058. "type": "integer",
  10059. "minimum": 0
  10060. },
  10061. "reasoning": {
  10062. "type": "integer",
  10063. "minimum": 0
  10064. },
  10065. "cache": {
  10066. "type": "object",
  10067. "properties": {
  10068. "read": {
  10069. "type": "integer",
  10070. "minimum": 0
  10071. },
  10072. "write": {
  10073. "type": "integer",
  10074. "minimum": 0
  10075. }
  10076. },
  10077. "required": ["read", "write"],
  10078. "additionalProperties": false
  10079. }
  10080. },
  10081. "required": ["input", "output", "reasoning", "cache"],
  10082. "additionalProperties": false
  10083. },
  10084. "structured": {},
  10085. "variant": {
  10086. "type": "string"
  10087. },
  10088. "finish": {
  10089. "type": "string"
  10090. }
  10091. },
  10092. "required": [
  10093. "id",
  10094. "sessionID",
  10095. "role",
  10096. "time",
  10097. "parentID",
  10098. "modelID",
  10099. "providerID",
  10100. "mode",
  10101. "agent",
  10102. "path",
  10103. "cost",
  10104. "tokens"
  10105. ],
  10106. "additionalProperties": false
  10107. },
  10108. "Message": {
  10109. "anyOf": [
  10110. {
  10111. "$ref": "#/components/schemas/UserMessage"
  10112. },
  10113. {
  10114. "$ref": "#/components/schemas/AssistantMessage"
  10115. }
  10116. ]
  10117. },
  10118. "TextPart": {
  10119. "type": "object",
  10120. "properties": {
  10121. "id": {
  10122. "type": "string"
  10123. },
  10124. "sessionID": {
  10125. "type": "string"
  10126. },
  10127. "messageID": {
  10128. "type": "string"
  10129. },
  10130. "type": {
  10131. "type": "string",
  10132. "enum": ["text"]
  10133. },
  10134. "text": {
  10135. "type": "string"
  10136. },
  10137. "synthetic": {
  10138. "type": "boolean"
  10139. },
  10140. "ignored": {
  10141. "type": "boolean"
  10142. },
  10143. "time": {
  10144. "type": "object",
  10145. "properties": {
  10146. "start": {
  10147. "type": "integer",
  10148. "minimum": 0
  10149. },
  10150. "end": {
  10151. "type": "integer",
  10152. "minimum": 0
  10153. }
  10154. },
  10155. "required": ["start"],
  10156. "additionalProperties": false
  10157. },
  10158. "metadata": {
  10159. "type": "object"
  10160. }
  10161. },
  10162. "required": ["id", "sessionID", "messageID", "type", "text"],
  10163. "additionalProperties": false
  10164. },
  10165. "SubtaskPart": {
  10166. "type": "object",
  10167. "properties": {
  10168. "id": {
  10169. "type": "string"
  10170. },
  10171. "sessionID": {
  10172. "type": "string"
  10173. },
  10174. "messageID": {
  10175. "type": "string"
  10176. },
  10177. "type": {
  10178. "type": "string",
  10179. "enum": ["subtask"]
  10180. },
  10181. "prompt": {
  10182. "type": "string"
  10183. },
  10184. "description": {
  10185. "type": "string"
  10186. },
  10187. "agent": {
  10188. "type": "string"
  10189. },
  10190. "model": {
  10191. "type": "object",
  10192. "properties": {
  10193. "providerID": {
  10194. "type": "string"
  10195. },
  10196. "modelID": {
  10197. "type": "string"
  10198. }
  10199. },
  10200. "required": ["providerID", "modelID"],
  10201. "additionalProperties": false
  10202. },
  10203. "command": {
  10204. "type": "string"
  10205. }
  10206. },
  10207. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10208. "additionalProperties": false
  10209. },
  10210. "ReasoningPart": {
  10211. "type": "object",
  10212. "properties": {
  10213. "id": {
  10214. "type": "string"
  10215. },
  10216. "sessionID": {
  10217. "type": "string"
  10218. },
  10219. "messageID": {
  10220. "type": "string"
  10221. },
  10222. "type": {
  10223. "type": "string",
  10224. "enum": ["reasoning"]
  10225. },
  10226. "text": {
  10227. "type": "string"
  10228. },
  10229. "metadata": {
  10230. "type": "object"
  10231. },
  10232. "time": {
  10233. "type": "object",
  10234. "properties": {
  10235. "start": {
  10236. "type": "integer",
  10237. "minimum": 0
  10238. },
  10239. "end": {
  10240. "type": "integer",
  10241. "minimum": 0
  10242. }
  10243. },
  10244. "required": ["start"],
  10245. "additionalProperties": false
  10246. }
  10247. },
  10248. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10249. "additionalProperties": false
  10250. },
  10251. "FilePartSourceText": {
  10252. "type": "object",
  10253. "properties": {
  10254. "value": {
  10255. "type": "string"
  10256. },
  10257. "start": {
  10258. "type": "integer",
  10259. "minimum": 0
  10260. },
  10261. "end": {
  10262. "type": "integer",
  10263. "minimum": 0
  10264. }
  10265. },
  10266. "required": ["value", "start", "end"],
  10267. "additionalProperties": false
  10268. },
  10269. "FileSource": {
  10270. "type": "object",
  10271. "properties": {
  10272. "text": {
  10273. "$ref": "#/components/schemas/FilePartSourceText"
  10274. },
  10275. "type": {
  10276. "type": "string",
  10277. "enum": ["file"]
  10278. },
  10279. "path": {
  10280. "type": "string"
  10281. }
  10282. },
  10283. "required": ["text", "type", "path"],
  10284. "additionalProperties": false
  10285. },
  10286. "Range": {
  10287. "type": "object",
  10288. "properties": {
  10289. "start": {
  10290. "type": "object",
  10291. "properties": {
  10292. "line": {
  10293. "type": "integer",
  10294. "minimum": 0
  10295. },
  10296. "character": {
  10297. "type": "integer",
  10298. "minimum": 0
  10299. }
  10300. },
  10301. "required": ["line", "character"],
  10302. "additionalProperties": false
  10303. },
  10304. "end": {
  10305. "type": "object",
  10306. "properties": {
  10307. "line": {
  10308. "type": "integer",
  10309. "minimum": 0
  10310. },
  10311. "character": {
  10312. "type": "integer",
  10313. "minimum": 0
  10314. }
  10315. },
  10316. "required": ["line", "character"],
  10317. "additionalProperties": false
  10318. }
  10319. },
  10320. "required": ["start", "end"],
  10321. "additionalProperties": false
  10322. },
  10323. "SymbolSource": {
  10324. "type": "object",
  10325. "properties": {
  10326. "text": {
  10327. "$ref": "#/components/schemas/FilePartSourceText"
  10328. },
  10329. "type": {
  10330. "type": "string",
  10331. "enum": ["symbol"]
  10332. },
  10333. "path": {
  10334. "type": "string"
  10335. },
  10336. "range": {
  10337. "$ref": "#/components/schemas/Range"
  10338. },
  10339. "name": {
  10340. "type": "string"
  10341. },
  10342. "kind": {
  10343. "type": "integer",
  10344. "minimum": 0
  10345. }
  10346. },
  10347. "required": ["text", "type", "path", "range", "name", "kind"],
  10348. "additionalProperties": false
  10349. },
  10350. "ResourceSource": {
  10351. "type": "object",
  10352. "properties": {
  10353. "text": {
  10354. "$ref": "#/components/schemas/FilePartSourceText"
  10355. },
  10356. "type": {
  10357. "type": "string",
  10358. "enum": ["resource"]
  10359. },
  10360. "clientName": {
  10361. "type": "string"
  10362. },
  10363. "uri": {
  10364. "type": "string"
  10365. }
  10366. },
  10367. "required": ["text", "type", "clientName", "uri"],
  10368. "additionalProperties": false
  10369. },
  10370. "FilePartSource": {
  10371. "anyOf": [
  10372. {
  10373. "$ref": "#/components/schemas/FileSource"
  10374. },
  10375. {
  10376. "$ref": "#/components/schemas/SymbolSource"
  10377. },
  10378. {
  10379. "$ref": "#/components/schemas/ResourceSource"
  10380. }
  10381. ]
  10382. },
  10383. "FilePart": {
  10384. "type": "object",
  10385. "properties": {
  10386. "id": {
  10387. "type": "string"
  10388. },
  10389. "sessionID": {
  10390. "type": "string"
  10391. },
  10392. "messageID": {
  10393. "type": "string"
  10394. },
  10395. "type": {
  10396. "type": "string",
  10397. "enum": ["file"]
  10398. },
  10399. "mime": {
  10400. "type": "string"
  10401. },
  10402. "filename": {
  10403. "type": "string"
  10404. },
  10405. "url": {
  10406. "type": "string"
  10407. },
  10408. "source": {
  10409. "$ref": "#/components/schemas/FilePartSource"
  10410. }
  10411. },
  10412. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10413. "additionalProperties": false
  10414. },
  10415. "ToolStatePending": {
  10416. "type": "object",
  10417. "properties": {
  10418. "status": {
  10419. "type": "string",
  10420. "enum": ["pending"]
  10421. },
  10422. "input": {
  10423. "type": "object"
  10424. },
  10425. "raw": {
  10426. "type": "string"
  10427. }
  10428. },
  10429. "required": ["status", "input", "raw"],
  10430. "additionalProperties": false
  10431. },
  10432. "ToolStateRunning": {
  10433. "type": "object",
  10434. "properties": {
  10435. "status": {
  10436. "type": "string",
  10437. "enum": ["running"]
  10438. },
  10439. "input": {
  10440. "type": "object"
  10441. },
  10442. "title": {
  10443. "type": "string"
  10444. },
  10445. "metadata": {
  10446. "type": "object"
  10447. },
  10448. "time": {
  10449. "type": "object",
  10450. "properties": {
  10451. "start": {
  10452. "type": "integer",
  10453. "minimum": 0
  10454. }
  10455. },
  10456. "required": ["start"],
  10457. "additionalProperties": false
  10458. }
  10459. },
  10460. "required": ["status", "input", "time"],
  10461. "additionalProperties": false
  10462. },
  10463. "ToolStateCompleted": {
  10464. "type": "object",
  10465. "properties": {
  10466. "status": {
  10467. "type": "string",
  10468. "enum": ["completed"]
  10469. },
  10470. "input": {
  10471. "type": "object"
  10472. },
  10473. "output": {
  10474. "type": "string"
  10475. },
  10476. "title": {
  10477. "type": "string"
  10478. },
  10479. "metadata": {
  10480. "type": "object"
  10481. },
  10482. "time": {
  10483. "type": "object",
  10484. "properties": {
  10485. "start": {
  10486. "type": "integer",
  10487. "minimum": 0
  10488. },
  10489. "end": {
  10490. "type": "integer",
  10491. "minimum": 0
  10492. },
  10493. "compacted": {
  10494. "type": "integer",
  10495. "minimum": 0
  10496. }
  10497. },
  10498. "required": ["start", "end"],
  10499. "additionalProperties": false
  10500. },
  10501. "attachments": {
  10502. "type": "array",
  10503. "items": {
  10504. "$ref": "#/components/schemas/FilePart"
  10505. }
  10506. }
  10507. },
  10508. "required": ["status", "input", "output", "title", "metadata", "time"],
  10509. "additionalProperties": false
  10510. },
  10511. "ToolStateError": {
  10512. "type": "object",
  10513. "properties": {
  10514. "status": {
  10515. "type": "string",
  10516. "enum": ["error"]
  10517. },
  10518. "input": {
  10519. "type": "object"
  10520. },
  10521. "error": {
  10522. "type": "string"
  10523. },
  10524. "metadata": {
  10525. "type": "object"
  10526. },
  10527. "time": {
  10528. "type": "object",
  10529. "properties": {
  10530. "start": {
  10531. "type": "integer",
  10532. "minimum": 0
  10533. },
  10534. "end": {
  10535. "type": "integer",
  10536. "minimum": 0
  10537. }
  10538. },
  10539. "required": ["start", "end"],
  10540. "additionalProperties": false
  10541. }
  10542. },
  10543. "required": ["status", "input", "error", "time"],
  10544. "additionalProperties": false
  10545. },
  10546. "ToolState": {
  10547. "anyOf": [
  10548. {
  10549. "$ref": "#/components/schemas/ToolStatePending"
  10550. },
  10551. {
  10552. "$ref": "#/components/schemas/ToolStateRunning"
  10553. },
  10554. {
  10555. "$ref": "#/components/schemas/ToolStateCompleted"
  10556. },
  10557. {
  10558. "$ref": "#/components/schemas/ToolStateError"
  10559. }
  10560. ]
  10561. },
  10562. "ToolPart": {
  10563. "type": "object",
  10564. "properties": {
  10565. "id": {
  10566. "type": "string"
  10567. },
  10568. "sessionID": {
  10569. "type": "string"
  10570. },
  10571. "messageID": {
  10572. "type": "string"
  10573. },
  10574. "type": {
  10575. "type": "string",
  10576. "enum": ["tool"]
  10577. },
  10578. "callID": {
  10579. "type": "string"
  10580. },
  10581. "tool": {
  10582. "type": "string"
  10583. },
  10584. "state": {
  10585. "$ref": "#/components/schemas/ToolState"
  10586. },
  10587. "metadata": {
  10588. "type": "object"
  10589. }
  10590. },
  10591. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10592. "additionalProperties": false
  10593. },
  10594. "StepStartPart": {
  10595. "type": "object",
  10596. "properties": {
  10597. "id": {
  10598. "type": "string"
  10599. },
  10600. "sessionID": {
  10601. "type": "string"
  10602. },
  10603. "messageID": {
  10604. "type": "string"
  10605. },
  10606. "type": {
  10607. "type": "string",
  10608. "enum": ["step-start"]
  10609. },
  10610. "snapshot": {
  10611. "type": "string"
  10612. }
  10613. },
  10614. "required": ["id", "sessionID", "messageID", "type"],
  10615. "additionalProperties": false
  10616. },
  10617. "StepFinishPart": {
  10618. "type": "object",
  10619. "properties": {
  10620. "id": {
  10621. "type": "string"
  10622. },
  10623. "sessionID": {
  10624. "type": "string"
  10625. },
  10626. "messageID": {
  10627. "type": "string"
  10628. },
  10629. "type": {
  10630. "type": "string",
  10631. "enum": ["step-finish"]
  10632. },
  10633. "reason": {
  10634. "type": "string"
  10635. },
  10636. "snapshot": {
  10637. "type": "string"
  10638. },
  10639. "cost": {
  10640. "type": "number"
  10641. },
  10642. "tokens": {
  10643. "type": "object",
  10644. "properties": {
  10645. "total": {
  10646. "type": "integer",
  10647. "minimum": 0
  10648. },
  10649. "input": {
  10650. "type": "integer",
  10651. "minimum": 0
  10652. },
  10653. "output": {
  10654. "type": "integer",
  10655. "minimum": 0
  10656. },
  10657. "reasoning": {
  10658. "type": "integer",
  10659. "minimum": 0
  10660. },
  10661. "cache": {
  10662. "type": "object",
  10663. "properties": {
  10664. "read": {
  10665. "type": "integer",
  10666. "minimum": 0
  10667. },
  10668. "write": {
  10669. "type": "integer",
  10670. "minimum": 0
  10671. }
  10672. },
  10673. "required": ["read", "write"],
  10674. "additionalProperties": false
  10675. }
  10676. },
  10677. "required": ["input", "output", "reasoning", "cache"],
  10678. "additionalProperties": false
  10679. }
  10680. },
  10681. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10682. "additionalProperties": false
  10683. },
  10684. "SnapshotPart": {
  10685. "type": "object",
  10686. "properties": {
  10687. "id": {
  10688. "type": "string"
  10689. },
  10690. "sessionID": {
  10691. "type": "string"
  10692. },
  10693. "messageID": {
  10694. "type": "string"
  10695. },
  10696. "type": {
  10697. "type": "string",
  10698. "enum": ["snapshot"]
  10699. },
  10700. "snapshot": {
  10701. "type": "string"
  10702. }
  10703. },
  10704. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10705. "additionalProperties": false
  10706. },
  10707. "PatchPart": {
  10708. "type": "object",
  10709. "properties": {
  10710. "id": {
  10711. "type": "string"
  10712. },
  10713. "sessionID": {
  10714. "type": "string"
  10715. },
  10716. "messageID": {
  10717. "type": "string"
  10718. },
  10719. "type": {
  10720. "type": "string",
  10721. "enum": ["patch"]
  10722. },
  10723. "hash": {
  10724. "type": "string"
  10725. },
  10726. "files": {
  10727. "type": "array",
  10728. "items": {
  10729. "type": "string"
  10730. }
  10731. }
  10732. },
  10733. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10734. "additionalProperties": false
  10735. },
  10736. "AgentPart": {
  10737. "type": "object",
  10738. "properties": {
  10739. "id": {
  10740. "type": "string"
  10741. },
  10742. "sessionID": {
  10743. "type": "string"
  10744. },
  10745. "messageID": {
  10746. "type": "string"
  10747. },
  10748. "type": {
  10749. "type": "string",
  10750. "enum": ["agent"]
  10751. },
  10752. "name": {
  10753. "type": "string"
  10754. },
  10755. "source": {
  10756. "type": "object",
  10757. "properties": {
  10758. "value": {
  10759. "type": "string"
  10760. },
  10761. "start": {
  10762. "type": "integer",
  10763. "minimum": 0
  10764. },
  10765. "end": {
  10766. "type": "integer",
  10767. "minimum": 0
  10768. }
  10769. },
  10770. "required": ["value", "start", "end"],
  10771. "additionalProperties": false
  10772. }
  10773. },
  10774. "required": ["id", "sessionID", "messageID", "type", "name"],
  10775. "additionalProperties": false
  10776. },
  10777. "RetryPart": {
  10778. "type": "object",
  10779. "properties": {
  10780. "id": {
  10781. "type": "string"
  10782. },
  10783. "sessionID": {
  10784. "type": "string"
  10785. },
  10786. "messageID": {
  10787. "type": "string"
  10788. },
  10789. "type": {
  10790. "type": "string",
  10791. "enum": ["retry"]
  10792. },
  10793. "attempt": {
  10794. "type": "integer",
  10795. "minimum": 0
  10796. },
  10797. "error": {
  10798. "$ref": "#/components/schemas/APIError"
  10799. },
  10800. "time": {
  10801. "type": "object",
  10802. "properties": {
  10803. "created": {
  10804. "type": "integer",
  10805. "minimum": 0
  10806. }
  10807. },
  10808. "required": ["created"],
  10809. "additionalProperties": false
  10810. }
  10811. },
  10812. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10813. "additionalProperties": false
  10814. },
  10815. "CompactionPart": {
  10816. "type": "object",
  10817. "properties": {
  10818. "id": {
  10819. "type": "string"
  10820. },
  10821. "sessionID": {
  10822. "type": "string"
  10823. },
  10824. "messageID": {
  10825. "type": "string"
  10826. },
  10827. "type": {
  10828. "type": "string",
  10829. "enum": ["compaction"]
  10830. },
  10831. "auto": {
  10832. "type": "boolean"
  10833. },
  10834. "overflow": {
  10835. "type": "boolean"
  10836. },
  10837. "tail_start_id": {
  10838. "type": "string"
  10839. }
  10840. },
  10841. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10842. "additionalProperties": false
  10843. },
  10844. "Part": {
  10845. "anyOf": [
  10846. {
  10847. "$ref": "#/components/schemas/TextPart"
  10848. },
  10849. {
  10850. "$ref": "#/components/schemas/SubtaskPart"
  10851. },
  10852. {
  10853. "$ref": "#/components/schemas/ReasoningPart"
  10854. },
  10855. {
  10856. "$ref": "#/components/schemas/FilePart"
  10857. },
  10858. {
  10859. "$ref": "#/components/schemas/ToolPart"
  10860. },
  10861. {
  10862. "$ref": "#/components/schemas/StepStartPart"
  10863. },
  10864. {
  10865. "$ref": "#/components/schemas/StepFinishPart"
  10866. },
  10867. {
  10868. "$ref": "#/components/schemas/SnapshotPart"
  10869. },
  10870. {
  10871. "$ref": "#/components/schemas/PatchPart"
  10872. },
  10873. {
  10874. "$ref": "#/components/schemas/AgentPart"
  10875. },
  10876. {
  10877. "$ref": "#/components/schemas/RetryPart"
  10878. },
  10879. {
  10880. "$ref": "#/components/schemas/CompactionPart"
  10881. }
  10882. ]
  10883. },
  10884. "PermissionAction": {
  10885. "type": "string",
  10886. "enum": ["allow", "deny", "ask"]
  10887. },
  10888. "PermissionRule": {
  10889. "type": "object",
  10890. "properties": {
  10891. "permission": {
  10892. "type": "string"
  10893. },
  10894. "pattern": {
  10895. "type": "string"
  10896. },
  10897. "action": {
  10898. "$ref": "#/components/schemas/PermissionAction"
  10899. }
  10900. },
  10901. "required": ["permission", "pattern", "action"],
  10902. "additionalProperties": false
  10903. },
  10904. "PermissionRuleset": {
  10905. "type": "array",
  10906. "items": {
  10907. "$ref": "#/components/schemas/PermissionRule"
  10908. }
  10909. },
  10910. "Session": {
  10911. "type": "object",
  10912. "properties": {
  10913. "id": {
  10914. "type": "string"
  10915. },
  10916. "slug": {
  10917. "type": "string"
  10918. },
  10919. "projectID": {
  10920. "type": "string"
  10921. },
  10922. "workspaceID": {
  10923. "type": "string"
  10924. },
  10925. "directory": {
  10926. "type": "string"
  10927. },
  10928. "path": {
  10929. "type": "string"
  10930. },
  10931. "parentID": {
  10932. "type": "string"
  10933. },
  10934. "summary": {
  10935. "type": "object",
  10936. "properties": {
  10937. "additions": {
  10938. "type": "integer",
  10939. "minimum": 0
  10940. },
  10941. "deletions": {
  10942. "type": "integer",
  10943. "minimum": 0
  10944. },
  10945. "files": {
  10946. "type": "integer",
  10947. "minimum": 0
  10948. },
  10949. "diffs": {
  10950. "type": "array",
  10951. "items": {
  10952. "$ref": "#/components/schemas/SnapshotFileDiff"
  10953. }
  10954. }
  10955. },
  10956. "required": ["additions", "deletions", "files"],
  10957. "additionalProperties": false
  10958. },
  10959. "share": {
  10960. "type": "object",
  10961. "properties": {
  10962. "url": {
  10963. "type": "string"
  10964. }
  10965. },
  10966. "required": ["url"],
  10967. "additionalProperties": false
  10968. },
  10969. "title": {
  10970. "type": "string"
  10971. },
  10972. "agent": {
  10973. "type": "string"
  10974. },
  10975. "model": {
  10976. "type": "object",
  10977. "properties": {
  10978. "id": {
  10979. "type": "string"
  10980. },
  10981. "providerID": {
  10982. "type": "string"
  10983. },
  10984. "variant": {
  10985. "type": "string"
  10986. }
  10987. },
  10988. "required": ["id", "providerID"],
  10989. "additionalProperties": false
  10990. },
  10991. "version": {
  10992. "type": "string"
  10993. },
  10994. "time": {
  10995. "type": "object",
  10996. "properties": {
  10997. "created": {
  10998. "type": "integer",
  10999. "minimum": 0
  11000. },
  11001. "updated": {
  11002. "type": "integer",
  11003. "minimum": 0
  11004. },
  11005. "compacting": {
  11006. "type": "integer",
  11007. "minimum": 0
  11008. },
  11009. "archived": {
  11010. "type": "number"
  11011. }
  11012. },
  11013. "required": ["created", "updated"],
  11014. "additionalProperties": false
  11015. },
  11016. "permission": {
  11017. "$ref": "#/components/schemas/PermissionRuleset"
  11018. },
  11019. "revert": {
  11020. "type": "object",
  11021. "properties": {
  11022. "messageID": {
  11023. "type": "string"
  11024. },
  11025. "partID": {
  11026. "type": "string"
  11027. },
  11028. "snapshot": {
  11029. "type": "string"
  11030. },
  11031. "diff": {
  11032. "type": "string"
  11033. }
  11034. },
  11035. "required": ["messageID"],
  11036. "additionalProperties": false
  11037. }
  11038. },
  11039. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11040. "additionalProperties": false
  11041. },
  11042. "Prompt": {
  11043. "type": "object",
  11044. "properties": {
  11045. "text": {
  11046. "type": "string"
  11047. },
  11048. "files": {
  11049. "type": "array",
  11050. "items": {
  11051. "$ref": "#/components/schemas/PromptFileAttachment"
  11052. }
  11053. },
  11054. "agents": {
  11055. "type": "array",
  11056. "items": {
  11057. "$ref": "#/components/schemas/PromptAgentAttachment"
  11058. }
  11059. }
  11060. },
  11061. "required": ["text"],
  11062. "additionalProperties": false
  11063. },
  11064. "GlobalEvent": {
  11065. "type": "object",
  11066. "properties": {
  11067. "directory": {
  11068. "type": "string"
  11069. },
  11070. "project": {
  11071. "type": "string"
  11072. },
  11073. "workspace": {
  11074. "type": "string"
  11075. },
  11076. "payload": {
  11077. "anyOf": [
  11078. {
  11079. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11080. },
  11081. {
  11082. "$ref": "#/components/schemas/EventFileEdited"
  11083. },
  11084. {
  11085. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11086. },
  11087. {
  11088. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11089. },
  11090. {
  11091. "$ref": "#/components/schemas/EventLspUpdated"
  11092. },
  11093. {
  11094. "$ref": "#/components/schemas/EventMessagePartDelta"
  11095. },
  11096. {
  11097. "$ref": "#/components/schemas/EventPermissionAsked"
  11098. },
  11099. {
  11100. "$ref": "#/components/schemas/EventPermissionReplied"
  11101. },
  11102. {
  11103. "$ref": "#/components/schemas/EventSessionDiff"
  11104. },
  11105. {
  11106. "$ref": "#/components/schemas/EventSessionError"
  11107. },
  11108. {
  11109. "$ref": "#/components/schemas/EventInstallationUpdated"
  11110. },
  11111. {
  11112. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11113. },
  11114. {
  11115. "$ref": "#/components/schemas/EventQuestionAsked"
  11116. },
  11117. {
  11118. "$ref": "#/components/schemas/EventQuestionReplied"
  11119. },
  11120. {
  11121. "$ref": "#/components/schemas/EventQuestionRejected"
  11122. },
  11123. {
  11124. "$ref": "#/components/schemas/EventTodoUpdated"
  11125. },
  11126. {
  11127. "$ref": "#/components/schemas/EventSessionStatus"
  11128. },
  11129. {
  11130. "$ref": "#/components/schemas/EventSessionIdle"
  11131. },
  11132. {
  11133. "$ref": "#/components/schemas/EventSessionCompacted"
  11134. },
  11135. {
  11136. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11137. },
  11138. {
  11139. "$ref": "#/components/schemas/Event.tui.command.execute"
  11140. },
  11141. {
  11142. "$ref": "#/components/schemas/Event.tui.toast.show"
  11143. },
  11144. {
  11145. "$ref": "#/components/schemas/Event.tui.session.select"
  11146. },
  11147. {
  11148. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11149. },
  11150. {
  11151. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11152. },
  11153. {
  11154. "$ref": "#/components/schemas/EventCommandExecuted"
  11155. },
  11156. {
  11157. "$ref": "#/components/schemas/EventProjectUpdated"
  11158. },
  11159. {
  11160. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11161. },
  11162. {
  11163. "$ref": "#/components/schemas/EventWorkspaceReady"
  11164. },
  11165. {
  11166. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11167. },
  11168. {
  11169. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11170. },
  11171. {
  11172. "$ref": "#/components/schemas/EventWorktreeReady"
  11173. },
  11174. {
  11175. "$ref": "#/components/schemas/EventWorktreeFailed"
  11176. },
  11177. {
  11178. "$ref": "#/components/schemas/EventPtyCreated"
  11179. },
  11180. {
  11181. "$ref": "#/components/schemas/EventPtyUpdated"
  11182. },
  11183. {
  11184. "$ref": "#/components/schemas/EventPtyExited"
  11185. },
  11186. {
  11187. "$ref": "#/components/schemas/EventPtyDeleted"
  11188. },
  11189. {
  11190. "$ref": "#/components/schemas/EventMessageUpdated"
  11191. },
  11192. {
  11193. "$ref": "#/components/schemas/EventMessageRemoved"
  11194. },
  11195. {
  11196. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11197. },
  11198. {
  11199. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11200. },
  11201. {
  11202. "$ref": "#/components/schemas/EventSessionCreated"
  11203. },
  11204. {
  11205. "$ref": "#/components/schemas/EventSessionUpdated"
  11206. },
  11207. {
  11208. "$ref": "#/components/schemas/EventSessionDeleted"
  11209. },
  11210. {
  11211. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11212. },
  11213. {
  11214. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11215. },
  11216. {
  11217. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11218. },
  11219. {
  11220. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11221. },
  11222. {
  11223. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11224. },
  11225. {
  11226. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11227. },
  11228. {
  11229. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11230. },
  11231. {
  11232. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11233. },
  11234. {
  11235. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11236. },
  11237. {
  11238. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11239. },
  11240. {
  11241. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11242. },
  11243. {
  11244. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11245. },
  11246. {
  11247. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11248. },
  11249. {
  11250. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11251. },
  11252. {
  11253. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11254. },
  11255. {
  11256. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11257. },
  11258. {
  11259. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11260. },
  11261. {
  11262. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11263. },
  11264. {
  11265. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11266. },
  11267. {
  11268. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11269. },
  11270. {
  11271. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11272. },
  11273. {
  11274. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11275. },
  11276. {
  11277. "$ref": "#/components/schemas/EventSessionNextRetried"
  11278. },
  11279. {
  11280. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11281. },
  11282. {
  11283. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11284. },
  11285. {
  11286. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11287. },
  11288. {
  11289. "$ref": "#/components/schemas/EventServerConnected"
  11290. },
  11291. {
  11292. "$ref": "#/components/schemas/EventGlobalDisposed"
  11293. },
  11294. {
  11295. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11296. },
  11297. {
  11298. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11299. },
  11300. {
  11301. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11302. },
  11303. {
  11304. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11305. },
  11306. {
  11307. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11308. },
  11309. {
  11310. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11311. },
  11312. {
  11313. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11314. },
  11315. {
  11316. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11317. },
  11318. {
  11319. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11320. },
  11321. {
  11322. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11323. },
  11324. {
  11325. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11326. },
  11327. {
  11328. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11329. },
  11330. {
  11331. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11332. },
  11333. {
  11334. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11335. },
  11336. {
  11337. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11338. },
  11339. {
  11340. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11341. },
  11342. {
  11343. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11344. },
  11345. {
  11346. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11347. },
  11348. {
  11349. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11350. },
  11351. {
  11352. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11353. },
  11354. {
  11355. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11356. },
  11357. {
  11358. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11359. },
  11360. {
  11361. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11362. },
  11363. {
  11364. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11365. },
  11366. {
  11367. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11368. },
  11369. {
  11370. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11371. },
  11372. {
  11373. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11374. },
  11375. {
  11376. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11380. },
  11381. {
  11382. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11383. },
  11384. {
  11385. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11386. },
  11387. {
  11388. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11389. },
  11390. {
  11391. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11392. }
  11393. ]
  11394. }
  11395. },
  11396. "required": ["directory", "payload"],
  11397. "additionalProperties": false
  11398. },
  11399. "LogLevel": {
  11400. "type": "string",
  11401. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11402. "description": "Log level"
  11403. },
  11404. "ServerConfig": {
  11405. "type": "object",
  11406. "properties": {
  11407. "port": {
  11408. "type": "integer",
  11409. "exclusiveMinimum": 0
  11410. },
  11411. "hostname": {
  11412. "type": "string"
  11413. },
  11414. "mdns": {
  11415. "type": "boolean"
  11416. },
  11417. "mdnsDomain": {
  11418. "type": "string"
  11419. },
  11420. "cors": {
  11421. "type": "array",
  11422. "items": {
  11423. "type": "string"
  11424. }
  11425. }
  11426. },
  11427. "additionalProperties": false,
  11428. "description": "Server configuration for opencode serve and web commands"
  11429. },
  11430. "ReferenceConfigEntry": {
  11431. "anyOf": [
  11432. {
  11433. "type": "string"
  11434. },
  11435. {
  11436. "type": "object",
  11437. "properties": {
  11438. "repository": {
  11439. "type": "string",
  11440. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11441. },
  11442. "branch": {
  11443. "type": "string"
  11444. }
  11445. },
  11446. "required": ["repository"],
  11447. "additionalProperties": false
  11448. },
  11449. {
  11450. "type": "object",
  11451. "properties": {
  11452. "path": {
  11453. "type": "string",
  11454. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11455. }
  11456. },
  11457. "required": ["path"],
  11458. "additionalProperties": false
  11459. }
  11460. ]
  11461. },
  11462. "ReferenceConfig": {
  11463. "type": "object",
  11464. "additionalProperties": {
  11465. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11466. }
  11467. },
  11468. "PermissionActionConfig": {
  11469. "type": "string",
  11470. "enum": ["ask", "allow", "deny"]
  11471. },
  11472. "PermissionObjectConfig": {
  11473. "type": "object",
  11474. "additionalProperties": {
  11475. "$ref": "#/components/schemas/PermissionActionConfig"
  11476. }
  11477. },
  11478. "PermissionRuleConfig": {
  11479. "anyOf": [
  11480. {
  11481. "$ref": "#/components/schemas/PermissionActionConfig"
  11482. },
  11483. {
  11484. "$ref": "#/components/schemas/PermissionObjectConfig"
  11485. }
  11486. ]
  11487. },
  11488. "PermissionConfig": {
  11489. "anyOf": [
  11490. {
  11491. "$ref": "#/components/schemas/PermissionActionConfig"
  11492. },
  11493. {
  11494. "type": "object",
  11495. "properties": {
  11496. "read": {
  11497. "$ref": "#/components/schemas/PermissionRuleConfig"
  11498. },
  11499. "edit": {
  11500. "$ref": "#/components/schemas/PermissionRuleConfig"
  11501. },
  11502. "glob": {
  11503. "$ref": "#/components/schemas/PermissionRuleConfig"
  11504. },
  11505. "grep": {
  11506. "$ref": "#/components/schemas/PermissionRuleConfig"
  11507. },
  11508. "list": {
  11509. "$ref": "#/components/schemas/PermissionRuleConfig"
  11510. },
  11511. "bash": {
  11512. "$ref": "#/components/schemas/PermissionRuleConfig"
  11513. },
  11514. "task": {
  11515. "$ref": "#/components/schemas/PermissionRuleConfig"
  11516. },
  11517. "external_directory": {
  11518. "$ref": "#/components/schemas/PermissionRuleConfig"
  11519. },
  11520. "todowrite": {
  11521. "$ref": "#/components/schemas/PermissionActionConfig"
  11522. },
  11523. "question": {
  11524. "$ref": "#/components/schemas/PermissionActionConfig"
  11525. },
  11526. "webfetch": {
  11527. "$ref": "#/components/schemas/PermissionActionConfig"
  11528. },
  11529. "websearch": {
  11530. "$ref": "#/components/schemas/PermissionActionConfig"
  11531. },
  11532. "codesearch": {
  11533. "$ref": "#/components/schemas/PermissionActionConfig"
  11534. },
  11535. "repo_clone": {
  11536. "$ref": "#/components/schemas/PermissionRuleConfig"
  11537. },
  11538. "repo_overview": {
  11539. "$ref": "#/components/schemas/PermissionRuleConfig"
  11540. },
  11541. "lsp": {
  11542. "$ref": "#/components/schemas/PermissionRuleConfig"
  11543. },
  11544. "doom_loop": {
  11545. "$ref": "#/components/schemas/PermissionActionConfig"
  11546. },
  11547. "skill": {
  11548. "$ref": "#/components/schemas/PermissionRuleConfig"
  11549. }
  11550. },
  11551. "additionalProperties": {
  11552. "$ref": "#/components/schemas/PermissionRuleConfig"
  11553. }
  11554. }
  11555. ]
  11556. },
  11557. "AgentConfig": {
  11558. "type": "object",
  11559. "properties": {
  11560. "model": {
  11561. "type": "string"
  11562. },
  11563. "variant": {
  11564. "type": "string"
  11565. },
  11566. "temperature": {
  11567. "type": "number"
  11568. },
  11569. "top_p": {
  11570. "type": "number"
  11571. },
  11572. "prompt": {
  11573. "type": "string"
  11574. },
  11575. "tools": {
  11576. "type": "object",
  11577. "additionalProperties": {
  11578. "type": "boolean"
  11579. }
  11580. },
  11581. "disable": {
  11582. "type": "boolean"
  11583. },
  11584. "description": {
  11585. "type": "string"
  11586. },
  11587. "mode": {
  11588. "type": "string",
  11589. "enum": ["subagent", "primary", "all"]
  11590. },
  11591. "hidden": {
  11592. "type": "boolean"
  11593. },
  11594. "options": {
  11595. "type": "object"
  11596. },
  11597. "color": {
  11598. "anyOf": [
  11599. {
  11600. "type": "string",
  11601. "pattern": "^#[0-9a-fA-F]{6}$"
  11602. },
  11603. {
  11604. "type": "string",
  11605. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11606. }
  11607. ],
  11608. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11609. },
  11610. "steps": {
  11611. "type": "integer",
  11612. "exclusiveMinimum": 0
  11613. },
  11614. "maxSteps": {
  11615. "type": "integer",
  11616. "exclusiveMinimum": 0
  11617. },
  11618. "permission": {
  11619. "$ref": "#/components/schemas/PermissionConfig"
  11620. }
  11621. },
  11622. "additionalProperties": {}
  11623. },
  11624. "ProviderConfig": {
  11625. "type": "object",
  11626. "properties": {
  11627. "api": {
  11628. "type": "string"
  11629. },
  11630. "name": {
  11631. "type": "string"
  11632. },
  11633. "env": {
  11634. "type": "array",
  11635. "items": {
  11636. "type": "string"
  11637. }
  11638. },
  11639. "id": {
  11640. "type": "string"
  11641. },
  11642. "npm": {
  11643. "type": "string"
  11644. },
  11645. "whitelist": {
  11646. "type": "array",
  11647. "items": {
  11648. "type": "string"
  11649. }
  11650. },
  11651. "blacklist": {
  11652. "type": "array",
  11653. "items": {
  11654. "type": "string"
  11655. }
  11656. },
  11657. "options": {
  11658. "type": "object",
  11659. "properties": {
  11660. "apiKey": {
  11661. "type": "string"
  11662. },
  11663. "baseURL": {
  11664. "type": "string"
  11665. },
  11666. "enterpriseUrl": {
  11667. "type": "string"
  11668. },
  11669. "setCacheKey": {
  11670. "type": "boolean"
  11671. },
  11672. "timeout": {
  11673. "anyOf": [
  11674. {
  11675. "type": "integer",
  11676. "exclusiveMinimum": 0
  11677. },
  11678. {
  11679. "type": "boolean",
  11680. "enum": [false]
  11681. }
  11682. ],
  11683. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11684. },
  11685. "chunkTimeout": {
  11686. "type": "integer",
  11687. "exclusiveMinimum": 0
  11688. }
  11689. },
  11690. "additionalProperties": {}
  11691. },
  11692. "models": {
  11693. "type": "object",
  11694. "additionalProperties": {
  11695. "type": "object",
  11696. "properties": {
  11697. "id": {
  11698. "type": "string"
  11699. },
  11700. "name": {
  11701. "type": "string"
  11702. },
  11703. "family": {
  11704. "type": "string"
  11705. },
  11706. "release_date": {
  11707. "type": "string"
  11708. },
  11709. "attachment": {
  11710. "type": "boolean"
  11711. },
  11712. "reasoning": {
  11713. "type": "boolean"
  11714. },
  11715. "temperature": {
  11716. "type": "boolean"
  11717. },
  11718. "tool_call": {
  11719. "type": "boolean"
  11720. },
  11721. "interleaved": {
  11722. "anyOf": [
  11723. {
  11724. "type": "boolean",
  11725. "enum": [true]
  11726. },
  11727. {
  11728. "type": "object",
  11729. "properties": {
  11730. "field": {
  11731. "type": "string",
  11732. "enum": ["reasoning_content", "reasoning_details"]
  11733. }
  11734. },
  11735. "required": ["field"],
  11736. "additionalProperties": false
  11737. }
  11738. ]
  11739. },
  11740. "cost": {
  11741. "type": "object",
  11742. "properties": {
  11743. "input": {
  11744. "type": "number"
  11745. },
  11746. "output": {
  11747. "type": "number"
  11748. },
  11749. "cache_read": {
  11750. "type": "number"
  11751. },
  11752. "cache_write": {
  11753. "type": "number"
  11754. },
  11755. "context_over_200k": {
  11756. "type": "object",
  11757. "properties": {
  11758. "input": {
  11759. "type": "number"
  11760. },
  11761. "output": {
  11762. "type": "number"
  11763. },
  11764. "cache_read": {
  11765. "type": "number"
  11766. },
  11767. "cache_write": {
  11768. "type": "number"
  11769. }
  11770. },
  11771. "required": ["input", "output"],
  11772. "additionalProperties": false
  11773. }
  11774. },
  11775. "required": ["input", "output"],
  11776. "additionalProperties": false
  11777. },
  11778. "limit": {
  11779. "type": "object",
  11780. "properties": {
  11781. "context": {
  11782. "type": "number"
  11783. },
  11784. "input": {
  11785. "type": "number"
  11786. },
  11787. "output": {
  11788. "type": "number"
  11789. }
  11790. },
  11791. "required": ["context", "output"],
  11792. "additionalProperties": false
  11793. },
  11794. "modalities": {
  11795. "type": "object",
  11796. "properties": {
  11797. "input": {
  11798. "type": "array",
  11799. "items": {
  11800. "type": "string",
  11801. "enum": ["text", "audio", "image", "video", "pdf"]
  11802. }
  11803. },
  11804. "output": {
  11805. "type": "array",
  11806. "items": {
  11807. "type": "string",
  11808. "enum": ["text", "audio", "image", "video", "pdf"]
  11809. }
  11810. }
  11811. },
  11812. "required": ["input", "output"],
  11813. "additionalProperties": false
  11814. },
  11815. "experimental": {
  11816. "type": "boolean"
  11817. },
  11818. "status": {
  11819. "type": "string",
  11820. "enum": ["alpha", "beta", "deprecated", "active"]
  11821. },
  11822. "provider": {
  11823. "type": "object",
  11824. "properties": {
  11825. "npm": {
  11826. "type": "string"
  11827. },
  11828. "api": {
  11829. "type": "string"
  11830. }
  11831. },
  11832. "additionalProperties": false
  11833. },
  11834. "options": {
  11835. "type": "object"
  11836. },
  11837. "headers": {
  11838. "type": "object",
  11839. "additionalProperties": {
  11840. "type": "string"
  11841. }
  11842. },
  11843. "variants": {
  11844. "type": "object",
  11845. "additionalProperties": {
  11846. "type": "object",
  11847. "properties": {
  11848. "disabled": {
  11849. "type": "boolean"
  11850. }
  11851. },
  11852. "additionalProperties": {}
  11853. },
  11854. "description": "Variant-specific configuration"
  11855. }
  11856. },
  11857. "additionalProperties": false
  11858. }
  11859. }
  11860. },
  11861. "additionalProperties": false
  11862. },
  11863. "McpLocalConfig": {
  11864. "type": "object",
  11865. "properties": {
  11866. "type": {
  11867. "type": "string",
  11868. "enum": ["local"],
  11869. "description": "Type of MCP server connection"
  11870. },
  11871. "command": {
  11872. "type": "array",
  11873. "items": {
  11874. "type": "string"
  11875. },
  11876. "description": "Command and arguments to run the MCP server"
  11877. },
  11878. "environment": {
  11879. "type": "object",
  11880. "additionalProperties": {
  11881. "type": "string"
  11882. }
  11883. },
  11884. "enabled": {
  11885. "type": "boolean"
  11886. },
  11887. "timeout": {
  11888. "type": "integer",
  11889. "exclusiveMinimum": 0
  11890. }
  11891. },
  11892. "required": ["type", "command"],
  11893. "additionalProperties": false
  11894. },
  11895. "McpOAuthConfig": {
  11896. "type": "object",
  11897. "properties": {
  11898. "clientId": {
  11899. "type": "string"
  11900. },
  11901. "clientSecret": {
  11902. "type": "string"
  11903. },
  11904. "scope": {
  11905. "type": "string"
  11906. },
  11907. "redirectUri": {
  11908. "type": "string"
  11909. }
  11910. },
  11911. "additionalProperties": false
  11912. },
  11913. "McpRemoteConfig": {
  11914. "type": "object",
  11915. "properties": {
  11916. "type": {
  11917. "type": "string",
  11918. "enum": ["remote"],
  11919. "description": "Type of MCP server connection"
  11920. },
  11921. "url": {
  11922. "type": "string",
  11923. "description": "URL of the remote MCP server"
  11924. },
  11925. "enabled": {
  11926. "type": "boolean"
  11927. },
  11928. "headers": {
  11929. "type": "object",
  11930. "additionalProperties": {
  11931. "type": "string"
  11932. }
  11933. },
  11934. "oauth": {
  11935. "anyOf": [
  11936. {
  11937. "$ref": "#/components/schemas/McpOAuthConfig"
  11938. },
  11939. {
  11940. "type": "boolean",
  11941. "enum": [false]
  11942. }
  11943. ],
  11944. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  11945. },
  11946. "timeout": {
  11947. "type": "integer",
  11948. "exclusiveMinimum": 0
  11949. }
  11950. },
  11951. "required": ["type", "url"],
  11952. "additionalProperties": false
  11953. },
  11954. "LayoutConfig": {
  11955. "type": "string",
  11956. "enum": ["auto", "stretch"],
  11957. "description": "@deprecated Always uses stretch layout."
  11958. },
  11959. "Config": {
  11960. "type": "object",
  11961. "properties": {
  11962. "$schema": {
  11963. "type": "string"
  11964. },
  11965. "shell": {
  11966. "type": "string"
  11967. },
  11968. "logLevel": {
  11969. "$ref": "#/components/schemas/LogLevel"
  11970. },
  11971. "server": {
  11972. "$ref": "#/components/schemas/ServerConfig"
  11973. },
  11974. "command": {
  11975. "type": "object",
  11976. "additionalProperties": {
  11977. "type": "object",
  11978. "properties": {
  11979. "template": {
  11980. "type": "string"
  11981. },
  11982. "description": {
  11983. "type": "string"
  11984. },
  11985. "agent": {
  11986. "type": "string"
  11987. },
  11988. "model": {
  11989. "type": "string"
  11990. },
  11991. "subtask": {
  11992. "type": "boolean"
  11993. }
  11994. },
  11995. "required": ["template"],
  11996. "additionalProperties": false
  11997. }
  11998. },
  11999. "skills": {
  12000. "type": "object",
  12001. "properties": {
  12002. "paths": {
  12003. "type": "array",
  12004. "items": {
  12005. "type": "string"
  12006. }
  12007. },
  12008. "urls": {
  12009. "type": "array",
  12010. "items": {
  12011. "type": "string"
  12012. }
  12013. }
  12014. },
  12015. "additionalProperties": false
  12016. },
  12017. "reference": {
  12018. "$ref": "#/components/schemas/ReferenceConfig"
  12019. },
  12020. "watcher": {
  12021. "type": "object",
  12022. "properties": {
  12023. "ignore": {
  12024. "type": "array",
  12025. "items": {
  12026. "type": "string"
  12027. }
  12028. }
  12029. },
  12030. "additionalProperties": false
  12031. },
  12032. "snapshot": {
  12033. "type": "boolean"
  12034. },
  12035. "plugin": {
  12036. "type": "array",
  12037. "items": {
  12038. "anyOf": [
  12039. {
  12040. "type": "string"
  12041. },
  12042. {
  12043. "type": "array",
  12044. "prefixItems": [
  12045. {
  12046. "type": "string"
  12047. },
  12048. {
  12049. "type": "object"
  12050. }
  12051. ],
  12052. "maxItems": 2,
  12053. "minItems": 2
  12054. }
  12055. ]
  12056. }
  12057. },
  12058. "share": {
  12059. "type": "string",
  12060. "enum": ["manual", "auto", "disabled"]
  12061. },
  12062. "autoshare": {
  12063. "type": "boolean"
  12064. },
  12065. "autoupdate": {
  12066. "anyOf": [
  12067. {
  12068. "type": "boolean"
  12069. },
  12070. {
  12071. "type": "string",
  12072. "enum": ["notify"]
  12073. }
  12074. ],
  12075. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12076. },
  12077. "disabled_providers": {
  12078. "type": "array",
  12079. "items": {
  12080. "type": "string"
  12081. }
  12082. },
  12083. "enabled_providers": {
  12084. "type": "array",
  12085. "items": {
  12086. "type": "string"
  12087. }
  12088. },
  12089. "model": {
  12090. "type": "string"
  12091. },
  12092. "small_model": {
  12093. "type": "string"
  12094. },
  12095. "default_agent": {
  12096. "type": "string"
  12097. },
  12098. "username": {
  12099. "type": "string"
  12100. },
  12101. "mode": {
  12102. "type": "object",
  12103. "properties": {
  12104. "build": {
  12105. "$ref": "#/components/schemas/AgentConfig"
  12106. },
  12107. "plan": {
  12108. "$ref": "#/components/schemas/AgentConfig"
  12109. }
  12110. },
  12111. "additionalProperties": {
  12112. "$ref": "#/components/schemas/AgentConfig"
  12113. }
  12114. },
  12115. "agent": {
  12116. "type": "object",
  12117. "properties": {
  12118. "plan": {
  12119. "$ref": "#/components/schemas/AgentConfig"
  12120. },
  12121. "build": {
  12122. "$ref": "#/components/schemas/AgentConfig"
  12123. },
  12124. "general": {
  12125. "$ref": "#/components/schemas/AgentConfig"
  12126. },
  12127. "explore": {
  12128. "$ref": "#/components/schemas/AgentConfig"
  12129. },
  12130. "scout": {
  12131. "$ref": "#/components/schemas/AgentConfig"
  12132. },
  12133. "title": {
  12134. "$ref": "#/components/schemas/AgentConfig"
  12135. },
  12136. "summary": {
  12137. "$ref": "#/components/schemas/AgentConfig"
  12138. },
  12139. "compaction": {
  12140. "$ref": "#/components/schemas/AgentConfig"
  12141. }
  12142. },
  12143. "additionalProperties": {
  12144. "$ref": "#/components/schemas/AgentConfig"
  12145. }
  12146. },
  12147. "provider": {
  12148. "type": "object",
  12149. "additionalProperties": {
  12150. "$ref": "#/components/schemas/ProviderConfig"
  12151. }
  12152. },
  12153. "mcp": {
  12154. "type": "object",
  12155. "additionalProperties": {
  12156. "anyOf": [
  12157. {
  12158. "$ref": "#/components/schemas/McpLocalConfig"
  12159. },
  12160. {
  12161. "$ref": "#/components/schemas/McpRemoteConfig"
  12162. },
  12163. {
  12164. "type": "object",
  12165. "properties": {
  12166. "enabled": {
  12167. "type": "boolean"
  12168. }
  12169. },
  12170. "required": ["enabled"],
  12171. "additionalProperties": false
  12172. }
  12173. ]
  12174. }
  12175. },
  12176. "formatter": {
  12177. "anyOf": [
  12178. {
  12179. "type": "boolean"
  12180. },
  12181. {
  12182. "type": "object",
  12183. "additionalProperties": {
  12184. "type": "object",
  12185. "properties": {
  12186. "disabled": {
  12187. "type": "boolean"
  12188. },
  12189. "command": {
  12190. "type": "array",
  12191. "items": {
  12192. "type": "string"
  12193. }
  12194. },
  12195. "environment": {
  12196. "type": "object",
  12197. "additionalProperties": {
  12198. "type": "string"
  12199. }
  12200. },
  12201. "extensions": {
  12202. "type": "array",
  12203. "items": {
  12204. "type": "string"
  12205. }
  12206. }
  12207. },
  12208. "additionalProperties": false
  12209. }
  12210. }
  12211. ],
  12212. "description": "Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  12213. },
  12214. "lsp": {
  12215. "anyOf": [
  12216. {
  12217. "type": "boolean"
  12218. },
  12219. {
  12220. "type": "object",
  12221. "additionalProperties": {
  12222. "anyOf": [
  12223. {
  12224. "type": "object",
  12225. "properties": {
  12226. "disabled": {
  12227. "type": "boolean",
  12228. "enum": [true]
  12229. }
  12230. },
  12231. "required": ["disabled"],
  12232. "additionalProperties": false
  12233. },
  12234. {
  12235. "type": "object",
  12236. "properties": {
  12237. "command": {
  12238. "type": "array",
  12239. "items": {
  12240. "type": "string"
  12241. }
  12242. },
  12243. "extensions": {
  12244. "type": "array",
  12245. "items": {
  12246. "type": "string"
  12247. }
  12248. },
  12249. "disabled": {
  12250. "type": "boolean"
  12251. },
  12252. "env": {
  12253. "type": "object",
  12254. "additionalProperties": {
  12255. "type": "string"
  12256. }
  12257. },
  12258. "initialization": {
  12259. "type": "object"
  12260. }
  12261. },
  12262. "required": ["command"],
  12263. "additionalProperties": false
  12264. }
  12265. ]
  12266. }
  12267. }
  12268. ],
  12269. "description": "Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
  12270. },
  12271. "instructions": {
  12272. "type": "array",
  12273. "items": {
  12274. "type": "string"
  12275. }
  12276. },
  12277. "layout": {
  12278. "$ref": "#/components/schemas/LayoutConfig"
  12279. },
  12280. "permission": {
  12281. "$ref": "#/components/schemas/PermissionConfig"
  12282. },
  12283. "tools": {
  12284. "type": "object",
  12285. "additionalProperties": {
  12286. "type": "boolean"
  12287. }
  12288. },
  12289. "enterprise": {
  12290. "type": "object",
  12291. "properties": {
  12292. "url": {
  12293. "type": "string"
  12294. }
  12295. },
  12296. "additionalProperties": false
  12297. },
  12298. "tool_output": {
  12299. "type": "object",
  12300. "properties": {
  12301. "max_lines": {
  12302. "type": "integer",
  12303. "exclusiveMinimum": 0
  12304. },
  12305. "max_bytes": {
  12306. "type": "integer",
  12307. "exclusiveMinimum": 0
  12308. }
  12309. },
  12310. "additionalProperties": false
  12311. },
  12312. "compaction": {
  12313. "type": "object",
  12314. "properties": {
  12315. "auto": {
  12316. "type": "boolean"
  12317. },
  12318. "prune": {
  12319. "type": "boolean"
  12320. },
  12321. "tail_turns": {
  12322. "type": "integer",
  12323. "minimum": 0
  12324. },
  12325. "preserve_recent_tokens": {
  12326. "type": "integer",
  12327. "minimum": 0
  12328. },
  12329. "reserved": {
  12330. "type": "integer",
  12331. "minimum": 0
  12332. }
  12333. },
  12334. "additionalProperties": false
  12335. },
  12336. "experimental": {
  12337. "type": "object",
  12338. "properties": {
  12339. "disable_paste_summary": {
  12340. "type": "boolean"
  12341. },
  12342. "batch_tool": {
  12343. "type": "boolean"
  12344. },
  12345. "openTelemetry": {
  12346. "type": "boolean"
  12347. },
  12348. "primary_tools": {
  12349. "type": "array",
  12350. "items": {
  12351. "type": "string"
  12352. }
  12353. },
  12354. "continue_loop_on_deny": {
  12355. "type": "boolean"
  12356. },
  12357. "mcp_timeout": {
  12358. "type": "integer",
  12359. "exclusiveMinimum": 0
  12360. }
  12361. },
  12362. "additionalProperties": false
  12363. }
  12364. },
  12365. "additionalProperties": false
  12366. },
  12367. "Model": {
  12368. "type": "object",
  12369. "properties": {
  12370. "id": {
  12371. "type": "string"
  12372. },
  12373. "providerID": {
  12374. "type": "string"
  12375. },
  12376. "api": {
  12377. "type": "object",
  12378. "properties": {
  12379. "id": {
  12380. "type": "string"
  12381. },
  12382. "url": {
  12383. "type": "string"
  12384. },
  12385. "npm": {
  12386. "type": "string"
  12387. }
  12388. },
  12389. "required": ["id", "url", "npm"],
  12390. "additionalProperties": false
  12391. },
  12392. "name": {
  12393. "type": "string"
  12394. },
  12395. "family": {
  12396. "type": "string"
  12397. },
  12398. "capabilities": {
  12399. "type": "object",
  12400. "properties": {
  12401. "temperature": {
  12402. "type": "boolean"
  12403. },
  12404. "reasoning": {
  12405. "type": "boolean"
  12406. },
  12407. "attachment": {
  12408. "type": "boolean"
  12409. },
  12410. "toolcall": {
  12411. "type": "boolean"
  12412. },
  12413. "input": {
  12414. "type": "object",
  12415. "properties": {
  12416. "text": {
  12417. "type": "boolean"
  12418. },
  12419. "audio": {
  12420. "type": "boolean"
  12421. },
  12422. "image": {
  12423. "type": "boolean"
  12424. },
  12425. "video": {
  12426. "type": "boolean"
  12427. },
  12428. "pdf": {
  12429. "type": "boolean"
  12430. }
  12431. },
  12432. "required": ["text", "audio", "image", "video", "pdf"],
  12433. "additionalProperties": false
  12434. },
  12435. "output": {
  12436. "type": "object",
  12437. "properties": {
  12438. "text": {
  12439. "type": "boolean"
  12440. },
  12441. "audio": {
  12442. "type": "boolean"
  12443. },
  12444. "image": {
  12445. "type": "boolean"
  12446. },
  12447. "video": {
  12448. "type": "boolean"
  12449. },
  12450. "pdf": {
  12451. "type": "boolean"
  12452. }
  12453. },
  12454. "required": ["text", "audio", "image", "video", "pdf"],
  12455. "additionalProperties": false
  12456. },
  12457. "interleaved": {
  12458. "anyOf": [
  12459. {
  12460. "type": "boolean"
  12461. },
  12462. {
  12463. "type": "object",
  12464. "properties": {
  12465. "field": {
  12466. "type": "string",
  12467. "enum": ["reasoning_content", "reasoning_details"]
  12468. }
  12469. },
  12470. "required": ["field"],
  12471. "additionalProperties": false
  12472. }
  12473. ]
  12474. }
  12475. },
  12476. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12477. "additionalProperties": false
  12478. },
  12479. "cost": {
  12480. "type": "object",
  12481. "properties": {
  12482. "input": {
  12483. "type": "number"
  12484. },
  12485. "output": {
  12486. "type": "number"
  12487. },
  12488. "cache": {
  12489. "type": "object",
  12490. "properties": {
  12491. "read": {
  12492. "type": "number"
  12493. },
  12494. "write": {
  12495. "type": "number"
  12496. }
  12497. },
  12498. "required": ["read", "write"],
  12499. "additionalProperties": false
  12500. },
  12501. "experimentalOver200K": {
  12502. "type": "object",
  12503. "properties": {
  12504. "input": {
  12505. "type": "number"
  12506. },
  12507. "output": {
  12508. "type": "number"
  12509. },
  12510. "cache": {
  12511. "type": "object",
  12512. "properties": {
  12513. "read": {
  12514. "type": "number"
  12515. },
  12516. "write": {
  12517. "type": "number"
  12518. }
  12519. },
  12520. "required": ["read", "write"],
  12521. "additionalProperties": false
  12522. }
  12523. },
  12524. "required": ["input", "output", "cache"],
  12525. "additionalProperties": false
  12526. }
  12527. },
  12528. "required": ["input", "output", "cache"],
  12529. "additionalProperties": false
  12530. },
  12531. "limit": {
  12532. "type": "object",
  12533. "properties": {
  12534. "context": {
  12535. "type": "number"
  12536. },
  12537. "input": {
  12538. "type": "number"
  12539. },
  12540. "output": {
  12541. "type": "number"
  12542. }
  12543. },
  12544. "required": ["context", "output"],
  12545. "additionalProperties": false
  12546. },
  12547. "status": {
  12548. "type": "string",
  12549. "enum": ["alpha", "beta", "deprecated", "active"]
  12550. },
  12551. "options": {
  12552. "type": "object"
  12553. },
  12554. "headers": {
  12555. "type": "object",
  12556. "additionalProperties": {
  12557. "type": "string"
  12558. }
  12559. },
  12560. "release_date": {
  12561. "type": "string"
  12562. },
  12563. "variants": {
  12564. "type": "object",
  12565. "additionalProperties": {
  12566. "type": "object"
  12567. }
  12568. }
  12569. },
  12570. "required": [
  12571. "id",
  12572. "providerID",
  12573. "api",
  12574. "name",
  12575. "capabilities",
  12576. "cost",
  12577. "limit",
  12578. "status",
  12579. "options",
  12580. "headers",
  12581. "release_date"
  12582. ],
  12583. "additionalProperties": false
  12584. },
  12585. "Provider": {
  12586. "type": "object",
  12587. "properties": {
  12588. "id": {
  12589. "type": "string"
  12590. },
  12591. "name": {
  12592. "type": "string"
  12593. },
  12594. "source": {
  12595. "type": "string",
  12596. "enum": ["env", "config", "custom", "api"]
  12597. },
  12598. "env": {
  12599. "type": "array",
  12600. "items": {
  12601. "type": "string"
  12602. }
  12603. },
  12604. "key": {
  12605. "type": "string"
  12606. },
  12607. "options": {
  12608. "type": "object"
  12609. },
  12610. "models": {
  12611. "type": "object",
  12612. "additionalProperties": {
  12613. "$ref": "#/components/schemas/Model"
  12614. }
  12615. }
  12616. },
  12617. "required": ["id", "name", "source", "env", "options", "models"],
  12618. "additionalProperties": false
  12619. },
  12620. "ConsoleState": {
  12621. "type": "object",
  12622. "properties": {
  12623. "consoleManagedProviders": {
  12624. "type": "array",
  12625. "items": {
  12626. "type": "string"
  12627. }
  12628. },
  12629. "activeOrgName": {
  12630. "type": "string"
  12631. },
  12632. "switchableOrgCount": {
  12633. "type": "integer",
  12634. "minimum": 0
  12635. }
  12636. },
  12637. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12638. "additionalProperties": false
  12639. },
  12640. "effect_HttpApiError_InternalServerError": {
  12641. "type": "object",
  12642. "properties": {
  12643. "_tag": {
  12644. "type": "string",
  12645. "enum": ["InternalServerError"]
  12646. }
  12647. },
  12648. "required": ["_tag"],
  12649. "additionalProperties": false
  12650. },
  12651. "ToolListItem": {
  12652. "type": "object",
  12653. "properties": {
  12654. "id": {
  12655. "type": "string"
  12656. },
  12657. "description": {
  12658. "type": "string"
  12659. },
  12660. "parameters": {}
  12661. },
  12662. "required": ["id", "description", "parameters"],
  12663. "additionalProperties": false
  12664. },
  12665. "ToolList": {
  12666. "type": "array",
  12667. "items": {
  12668. "$ref": "#/components/schemas/ToolListItem"
  12669. }
  12670. },
  12671. "ToolIDs": {
  12672. "type": "array",
  12673. "items": {
  12674. "type": "string"
  12675. }
  12676. },
  12677. "WorktreeCreateInput": {
  12678. "type": "object",
  12679. "properties": {
  12680. "name": {
  12681. "type": "string"
  12682. },
  12683. "startCommand": {
  12684. "type": "string",
  12685. "description": "Additional startup script to run after the project's start command"
  12686. }
  12687. },
  12688. "additionalProperties": false
  12689. },
  12690. "Worktree": {
  12691. "type": "object",
  12692. "properties": {
  12693. "name": {
  12694. "type": "string"
  12695. },
  12696. "branch": {
  12697. "type": "string"
  12698. },
  12699. "directory": {
  12700. "type": "string"
  12701. }
  12702. },
  12703. "required": ["name", "branch", "directory"],
  12704. "additionalProperties": false
  12705. },
  12706. "WorktreeRemoveInput": {
  12707. "type": "object",
  12708. "properties": {
  12709. "directory": {
  12710. "type": "string"
  12711. }
  12712. },
  12713. "required": ["directory"],
  12714. "additionalProperties": false
  12715. },
  12716. "WorktreeResetInput": {
  12717. "type": "object",
  12718. "properties": {
  12719. "directory": {
  12720. "type": "string"
  12721. }
  12722. },
  12723. "required": ["directory"],
  12724. "additionalProperties": false
  12725. },
  12726. "ProjectSummary": {
  12727. "type": "object",
  12728. "properties": {
  12729. "id": {
  12730. "type": "string"
  12731. },
  12732. "name": {
  12733. "type": "string"
  12734. },
  12735. "worktree": {
  12736. "type": "string"
  12737. }
  12738. },
  12739. "required": ["id", "worktree"],
  12740. "additionalProperties": false
  12741. },
  12742. "GlobalSession": {
  12743. "type": "object",
  12744. "properties": {
  12745. "id": {
  12746. "type": "string"
  12747. },
  12748. "slug": {
  12749. "type": "string"
  12750. },
  12751. "projectID": {
  12752. "type": "string"
  12753. },
  12754. "workspaceID": {
  12755. "type": "string"
  12756. },
  12757. "directory": {
  12758. "type": "string"
  12759. },
  12760. "path": {
  12761. "type": "string"
  12762. },
  12763. "parentID": {
  12764. "type": "string"
  12765. },
  12766. "summary": {
  12767. "type": "object",
  12768. "properties": {
  12769. "additions": {
  12770. "type": "integer",
  12771. "minimum": 0
  12772. },
  12773. "deletions": {
  12774. "type": "integer",
  12775. "minimum": 0
  12776. },
  12777. "files": {
  12778. "type": "integer",
  12779. "minimum": 0
  12780. },
  12781. "diffs": {
  12782. "type": "array",
  12783. "items": {
  12784. "$ref": "#/components/schemas/SnapshotFileDiff"
  12785. }
  12786. }
  12787. },
  12788. "required": ["additions", "deletions", "files"],
  12789. "additionalProperties": false
  12790. },
  12791. "share": {
  12792. "type": "object",
  12793. "properties": {
  12794. "url": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "required": ["url"],
  12799. "additionalProperties": false
  12800. },
  12801. "title": {
  12802. "type": "string"
  12803. },
  12804. "agent": {
  12805. "type": "string"
  12806. },
  12807. "model": {
  12808. "type": "object",
  12809. "properties": {
  12810. "id": {
  12811. "type": "string"
  12812. },
  12813. "providerID": {
  12814. "type": "string"
  12815. },
  12816. "variant": {
  12817. "type": "string"
  12818. }
  12819. },
  12820. "required": ["id", "providerID"],
  12821. "additionalProperties": false
  12822. },
  12823. "version": {
  12824. "type": "string"
  12825. },
  12826. "time": {
  12827. "type": "object",
  12828. "properties": {
  12829. "created": {
  12830. "type": "integer",
  12831. "minimum": 0
  12832. },
  12833. "updated": {
  12834. "type": "integer",
  12835. "minimum": 0
  12836. },
  12837. "compacting": {
  12838. "type": "integer",
  12839. "minimum": 0
  12840. },
  12841. "archived": {
  12842. "type": "number"
  12843. }
  12844. },
  12845. "required": ["created", "updated"],
  12846. "additionalProperties": false
  12847. },
  12848. "permission": {
  12849. "$ref": "#/components/schemas/PermissionRuleset"
  12850. },
  12851. "revert": {
  12852. "type": "object",
  12853. "properties": {
  12854. "messageID": {
  12855. "type": "string"
  12856. },
  12857. "partID": {
  12858. "type": "string"
  12859. },
  12860. "snapshot": {
  12861. "type": "string"
  12862. },
  12863. "diff": {
  12864. "type": "string"
  12865. }
  12866. },
  12867. "required": ["messageID"],
  12868. "additionalProperties": false
  12869. },
  12870. "project": {
  12871. "anyOf": [
  12872. {
  12873. "$ref": "#/components/schemas/ProjectSummary"
  12874. },
  12875. {
  12876. "type": "null"
  12877. }
  12878. ]
  12879. }
  12880. },
  12881. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  12882. "additionalProperties": false
  12883. },
  12884. "McpResource": {
  12885. "type": "object",
  12886. "properties": {
  12887. "name": {
  12888. "type": "string"
  12889. },
  12890. "uri": {
  12891. "type": "string"
  12892. },
  12893. "description": {
  12894. "type": "string"
  12895. },
  12896. "mimeType": {
  12897. "type": "string"
  12898. },
  12899. "client": {
  12900. "type": "string"
  12901. }
  12902. },
  12903. "required": ["name", "uri", "client"],
  12904. "additionalProperties": false
  12905. },
  12906. "Symbol": {
  12907. "type": "object",
  12908. "properties": {
  12909. "name": {
  12910. "type": "string"
  12911. },
  12912. "kind": {
  12913. "type": "integer",
  12914. "minimum": 0
  12915. },
  12916. "location": {
  12917. "type": "object",
  12918. "properties": {
  12919. "uri": {
  12920. "type": "string"
  12921. },
  12922. "range": {
  12923. "$ref": "#/components/schemas/Range"
  12924. }
  12925. },
  12926. "required": ["uri", "range"],
  12927. "additionalProperties": false
  12928. }
  12929. },
  12930. "required": ["name", "kind", "location"],
  12931. "additionalProperties": false
  12932. },
  12933. "FileNode": {
  12934. "type": "object",
  12935. "properties": {
  12936. "name": {
  12937. "type": "string"
  12938. },
  12939. "path": {
  12940. "type": "string"
  12941. },
  12942. "absolute": {
  12943. "type": "string"
  12944. },
  12945. "type": {
  12946. "type": "string",
  12947. "enum": ["file", "directory"]
  12948. },
  12949. "ignored": {
  12950. "type": "boolean"
  12951. }
  12952. },
  12953. "required": ["name", "path", "absolute", "type", "ignored"],
  12954. "additionalProperties": false
  12955. },
  12956. "FileContent": {
  12957. "type": "object",
  12958. "properties": {
  12959. "type": {
  12960. "type": "string",
  12961. "enum": ["text", "binary"]
  12962. },
  12963. "content": {
  12964. "type": "string"
  12965. },
  12966. "diff": {
  12967. "type": "string"
  12968. },
  12969. "patch": {
  12970. "type": "object",
  12971. "properties": {
  12972. "oldFileName": {
  12973. "type": "string"
  12974. },
  12975. "newFileName": {
  12976. "type": "string"
  12977. },
  12978. "oldHeader": {
  12979. "type": "string"
  12980. },
  12981. "newHeader": {
  12982. "type": "string"
  12983. },
  12984. "hunks": {
  12985. "type": "array",
  12986. "items": {
  12987. "type": "object",
  12988. "properties": {
  12989. "oldStart": {
  12990. "type": "integer",
  12991. "minimum": 0
  12992. },
  12993. "oldLines": {
  12994. "type": "integer",
  12995. "minimum": 0
  12996. },
  12997. "newStart": {
  12998. "type": "integer",
  12999. "minimum": 0
  13000. },
  13001. "newLines": {
  13002. "type": "integer",
  13003. "minimum": 0
  13004. },
  13005. "lines": {
  13006. "type": "array",
  13007. "items": {
  13008. "type": "string"
  13009. }
  13010. }
  13011. },
  13012. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13013. "additionalProperties": false
  13014. }
  13015. },
  13016. "index": {
  13017. "type": "string"
  13018. }
  13019. },
  13020. "required": ["oldFileName", "newFileName", "hunks"],
  13021. "additionalProperties": false
  13022. },
  13023. "encoding": {
  13024. "type": "string",
  13025. "enum": ["base64"]
  13026. },
  13027. "mimeType": {
  13028. "type": "string"
  13029. }
  13030. },
  13031. "required": ["type", "content"],
  13032. "additionalProperties": false
  13033. },
  13034. "File": {
  13035. "type": "object",
  13036. "properties": {
  13037. "path": {
  13038. "type": "string"
  13039. },
  13040. "added": {
  13041. "type": "integer",
  13042. "minimum": 0
  13043. },
  13044. "removed": {
  13045. "type": "integer",
  13046. "minimum": 0
  13047. },
  13048. "status": {
  13049. "type": "string",
  13050. "enum": ["added", "deleted", "modified"]
  13051. }
  13052. },
  13053. "required": ["path", "added", "removed", "status"],
  13054. "additionalProperties": false
  13055. },
  13056. "Path": {
  13057. "type": "object",
  13058. "properties": {
  13059. "home": {
  13060. "type": "string"
  13061. },
  13062. "state": {
  13063. "type": "string"
  13064. },
  13065. "config": {
  13066. "type": "string"
  13067. },
  13068. "worktree": {
  13069. "type": "string"
  13070. },
  13071. "directory": {
  13072. "type": "string"
  13073. }
  13074. },
  13075. "required": ["home", "state", "config", "worktree", "directory"],
  13076. "additionalProperties": false
  13077. },
  13078. "VcsInfo": {
  13079. "type": "object",
  13080. "properties": {
  13081. "branch": {
  13082. "type": "string"
  13083. },
  13084. "default_branch": {
  13085. "type": "string"
  13086. }
  13087. },
  13088. "additionalProperties": false
  13089. },
  13090. "VcsFileStatus": {
  13091. "type": "object",
  13092. "properties": {
  13093. "file": {
  13094. "type": "string"
  13095. },
  13096. "additions": {
  13097. "type": "integer",
  13098. "minimum": 0
  13099. },
  13100. "deletions": {
  13101. "type": "integer",
  13102. "minimum": 0
  13103. },
  13104. "status": {
  13105. "type": "string",
  13106. "enum": ["added", "deleted", "modified"]
  13107. }
  13108. },
  13109. "required": ["file", "additions", "deletions", "status"],
  13110. "additionalProperties": false
  13111. },
  13112. "VcsFileDiff": {
  13113. "type": "object",
  13114. "properties": {
  13115. "file": {
  13116. "type": "string"
  13117. },
  13118. "patch": {
  13119. "type": "string"
  13120. },
  13121. "additions": {
  13122. "type": "integer",
  13123. "minimum": 0
  13124. },
  13125. "deletions": {
  13126. "type": "integer",
  13127. "minimum": 0
  13128. },
  13129. "status": {
  13130. "type": "string",
  13131. "enum": ["added", "deleted", "modified"]
  13132. }
  13133. },
  13134. "required": ["file", "additions", "deletions"],
  13135. "additionalProperties": false
  13136. },
  13137. "VcsApplyError": {
  13138. "type": "object",
  13139. "properties": {
  13140. "name": {
  13141. "type": "string",
  13142. "enum": ["VcsApplyError"]
  13143. },
  13144. "data": {
  13145. "type": "object",
  13146. "properties": {
  13147. "message": {
  13148. "type": "string"
  13149. },
  13150. "reason": {
  13151. "type": "string",
  13152. "enum": ["non-git", "not-clean"]
  13153. }
  13154. },
  13155. "required": ["message", "reason"],
  13156. "additionalProperties": false
  13157. }
  13158. },
  13159. "required": ["name", "data"],
  13160. "additionalProperties": false
  13161. },
  13162. "Command": {
  13163. "type": "object",
  13164. "properties": {
  13165. "name": {
  13166. "type": "string"
  13167. },
  13168. "description": {
  13169. "type": "string"
  13170. },
  13171. "agent": {
  13172. "type": "string"
  13173. },
  13174. "model": {
  13175. "type": "string"
  13176. },
  13177. "source": {
  13178. "type": "string",
  13179. "enum": ["command", "mcp", "skill"]
  13180. },
  13181. "template": {
  13182. "type": "string"
  13183. },
  13184. "subtask": {
  13185. "type": "boolean"
  13186. },
  13187. "hints": {
  13188. "type": "array",
  13189. "items": {
  13190. "type": "string"
  13191. }
  13192. }
  13193. },
  13194. "required": ["name", "template", "hints"],
  13195. "additionalProperties": false
  13196. },
  13197. "Agent": {
  13198. "type": "object",
  13199. "properties": {
  13200. "name": {
  13201. "type": "string"
  13202. },
  13203. "description": {
  13204. "type": "string"
  13205. },
  13206. "mode": {
  13207. "type": "string",
  13208. "enum": ["subagent", "primary", "all"]
  13209. },
  13210. "native": {
  13211. "type": "boolean"
  13212. },
  13213. "hidden": {
  13214. "type": "boolean"
  13215. },
  13216. "topP": {
  13217. "type": "number"
  13218. },
  13219. "temperature": {
  13220. "type": "number"
  13221. },
  13222. "color": {
  13223. "type": "string"
  13224. },
  13225. "permission": {
  13226. "$ref": "#/components/schemas/PermissionRuleset"
  13227. },
  13228. "model": {
  13229. "type": "object",
  13230. "properties": {
  13231. "modelID": {
  13232. "type": "string"
  13233. },
  13234. "providerID": {
  13235. "type": "string"
  13236. }
  13237. },
  13238. "required": ["modelID", "providerID"],
  13239. "additionalProperties": false
  13240. },
  13241. "variant": {
  13242. "type": "string"
  13243. },
  13244. "prompt": {
  13245. "type": "string"
  13246. },
  13247. "options": {
  13248. "type": "object"
  13249. },
  13250. "steps": {
  13251. "type": "number"
  13252. }
  13253. },
  13254. "required": ["name", "mode", "permission", "options"],
  13255. "additionalProperties": false
  13256. },
  13257. "LSPStatus": {
  13258. "type": "object",
  13259. "properties": {
  13260. "id": {
  13261. "type": "string"
  13262. },
  13263. "name": {
  13264. "type": "string"
  13265. },
  13266. "root": {
  13267. "type": "string"
  13268. },
  13269. "status": {
  13270. "type": "string",
  13271. "enum": ["connected", "error"]
  13272. }
  13273. },
  13274. "required": ["id", "name", "root", "status"],
  13275. "additionalProperties": false
  13276. },
  13277. "FormatterStatus": {
  13278. "type": "object",
  13279. "properties": {
  13280. "name": {
  13281. "type": "string"
  13282. },
  13283. "extensions": {
  13284. "type": "array",
  13285. "items": {
  13286. "type": "string"
  13287. }
  13288. },
  13289. "enabled": {
  13290. "type": "boolean"
  13291. }
  13292. },
  13293. "required": ["name", "extensions", "enabled"],
  13294. "additionalProperties": false
  13295. },
  13296. "MCPStatusConnected": {
  13297. "type": "object",
  13298. "properties": {
  13299. "status": {
  13300. "type": "string",
  13301. "enum": ["connected"]
  13302. }
  13303. },
  13304. "required": ["status"],
  13305. "additionalProperties": false
  13306. },
  13307. "MCPStatusDisabled": {
  13308. "type": "object",
  13309. "properties": {
  13310. "status": {
  13311. "type": "string",
  13312. "enum": ["disabled"]
  13313. }
  13314. },
  13315. "required": ["status"],
  13316. "additionalProperties": false
  13317. },
  13318. "MCPStatusFailed": {
  13319. "type": "object",
  13320. "properties": {
  13321. "status": {
  13322. "type": "string",
  13323. "enum": ["failed"]
  13324. },
  13325. "error": {
  13326. "type": "string"
  13327. }
  13328. },
  13329. "required": ["status", "error"],
  13330. "additionalProperties": false
  13331. },
  13332. "MCPStatusNeedsAuth": {
  13333. "type": "object",
  13334. "properties": {
  13335. "status": {
  13336. "type": "string",
  13337. "enum": ["needs_auth"]
  13338. }
  13339. },
  13340. "required": ["status"],
  13341. "additionalProperties": false
  13342. },
  13343. "MCPStatusNeedsClientRegistration": {
  13344. "type": "object",
  13345. "properties": {
  13346. "status": {
  13347. "type": "string",
  13348. "enum": ["needs_client_registration"]
  13349. },
  13350. "error": {
  13351. "type": "string"
  13352. }
  13353. },
  13354. "required": ["status", "error"],
  13355. "additionalProperties": false
  13356. },
  13357. "MCPStatus": {
  13358. "anyOf": [
  13359. {
  13360. "$ref": "#/components/schemas/MCPStatusConnected"
  13361. },
  13362. {
  13363. "$ref": "#/components/schemas/MCPStatusDisabled"
  13364. },
  13365. {
  13366. "$ref": "#/components/schemas/MCPStatusFailed"
  13367. },
  13368. {
  13369. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13370. },
  13371. {
  13372. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13373. }
  13374. ]
  13375. },
  13376. "McpUnsupportedOAuthError": {
  13377. "type": "object",
  13378. "properties": {
  13379. "error": {
  13380. "type": "string"
  13381. }
  13382. },
  13383. "required": ["error"],
  13384. "additionalProperties": false
  13385. },
  13386. "NotFoundError": {
  13387. "type": "object",
  13388. "required": ["name", "data"],
  13389. "properties": {
  13390. "name": {
  13391. "type": "string",
  13392. "enum": ["NotFoundError"]
  13393. },
  13394. "data": {
  13395. "type": "object",
  13396. "required": ["message"],
  13397. "properties": {
  13398. "message": {
  13399. "type": "string"
  13400. }
  13401. }
  13402. }
  13403. }
  13404. },
  13405. "effect_HttpApiError_Forbidden": {
  13406. "type": "object",
  13407. "properties": {
  13408. "_tag": {
  13409. "type": "string",
  13410. "enum": ["Forbidden"]
  13411. }
  13412. },
  13413. "required": ["_tag"],
  13414. "additionalProperties": false
  13415. },
  13416. "ProviderAuthMethod": {
  13417. "type": "object",
  13418. "properties": {
  13419. "type": {
  13420. "type": "string",
  13421. "enum": ["oauth", "api"]
  13422. },
  13423. "label": {
  13424. "type": "string"
  13425. },
  13426. "prompts": {
  13427. "type": "array",
  13428. "items": {
  13429. "anyOf": [
  13430. {
  13431. "type": "object",
  13432. "properties": {
  13433. "type": {
  13434. "type": "string",
  13435. "enum": ["text"]
  13436. },
  13437. "key": {
  13438. "type": "string"
  13439. },
  13440. "message": {
  13441. "type": "string"
  13442. },
  13443. "placeholder": {
  13444. "type": "string"
  13445. },
  13446. "when": {
  13447. "type": "object",
  13448. "properties": {
  13449. "key": {
  13450. "type": "string"
  13451. },
  13452. "op": {
  13453. "type": "string",
  13454. "enum": ["eq", "neq"]
  13455. },
  13456. "value": {
  13457. "type": "string"
  13458. }
  13459. },
  13460. "required": ["key", "op", "value"],
  13461. "additionalProperties": false
  13462. }
  13463. },
  13464. "required": ["type", "key", "message"],
  13465. "additionalProperties": false
  13466. },
  13467. {
  13468. "type": "object",
  13469. "properties": {
  13470. "type": {
  13471. "type": "string",
  13472. "enum": ["select"]
  13473. },
  13474. "key": {
  13475. "type": "string"
  13476. },
  13477. "message": {
  13478. "type": "string"
  13479. },
  13480. "options": {
  13481. "type": "array",
  13482. "items": {
  13483. "type": "object",
  13484. "properties": {
  13485. "label": {
  13486. "type": "string"
  13487. },
  13488. "value": {
  13489. "type": "string"
  13490. },
  13491. "hint": {
  13492. "type": "string"
  13493. }
  13494. },
  13495. "required": ["label", "value"],
  13496. "additionalProperties": false
  13497. }
  13498. },
  13499. "when": {
  13500. "type": "object",
  13501. "properties": {
  13502. "key": {
  13503. "type": "string"
  13504. },
  13505. "op": {
  13506. "type": "string",
  13507. "enum": ["eq", "neq"]
  13508. },
  13509. "value": {
  13510. "type": "string"
  13511. }
  13512. },
  13513. "required": ["key", "op", "value"],
  13514. "additionalProperties": false
  13515. }
  13516. },
  13517. "required": ["type", "key", "message", "options"],
  13518. "additionalProperties": false
  13519. }
  13520. ]
  13521. }
  13522. }
  13523. },
  13524. "required": ["type", "label"],
  13525. "additionalProperties": false
  13526. },
  13527. "ProviderAuthAuthorization": {
  13528. "type": "object",
  13529. "properties": {
  13530. "url": {
  13531. "type": "string"
  13532. },
  13533. "method": {
  13534. "type": "string",
  13535. "enum": ["auto", "code"]
  13536. },
  13537. "instructions": {
  13538. "type": "string"
  13539. }
  13540. },
  13541. "required": ["url", "method", "instructions"],
  13542. "additionalProperties": false
  13543. },
  13544. "TextPartInput": {
  13545. "type": "object",
  13546. "properties": {
  13547. "id": {
  13548. "type": "string"
  13549. },
  13550. "type": {
  13551. "type": "string",
  13552. "enum": ["text"]
  13553. },
  13554. "text": {
  13555. "type": "string"
  13556. },
  13557. "synthetic": {
  13558. "type": "boolean"
  13559. },
  13560. "ignored": {
  13561. "type": "boolean"
  13562. },
  13563. "time": {
  13564. "type": "object",
  13565. "properties": {
  13566. "start": {
  13567. "type": "integer",
  13568. "minimum": 0
  13569. },
  13570. "end": {
  13571. "type": "integer",
  13572. "minimum": 0
  13573. }
  13574. },
  13575. "required": ["start"],
  13576. "additionalProperties": false
  13577. },
  13578. "metadata": {
  13579. "type": "object"
  13580. }
  13581. },
  13582. "required": ["type", "text"],
  13583. "additionalProperties": false
  13584. },
  13585. "FilePartInput": {
  13586. "type": "object",
  13587. "properties": {
  13588. "id": {
  13589. "type": "string"
  13590. },
  13591. "type": {
  13592. "type": "string",
  13593. "enum": ["file"]
  13594. },
  13595. "mime": {
  13596. "type": "string"
  13597. },
  13598. "filename": {
  13599. "type": "string"
  13600. },
  13601. "url": {
  13602. "type": "string"
  13603. },
  13604. "source": {
  13605. "$ref": "#/components/schemas/FilePartSource"
  13606. }
  13607. },
  13608. "required": ["type", "mime", "url"],
  13609. "additionalProperties": false
  13610. },
  13611. "AgentPartInput": {
  13612. "type": "object",
  13613. "properties": {
  13614. "id": {
  13615. "type": "string"
  13616. },
  13617. "type": {
  13618. "type": "string",
  13619. "enum": ["agent"]
  13620. },
  13621. "name": {
  13622. "type": "string"
  13623. },
  13624. "source": {
  13625. "type": "object",
  13626. "properties": {
  13627. "value": {
  13628. "type": "string"
  13629. },
  13630. "start": {
  13631. "type": "integer",
  13632. "minimum": 0
  13633. },
  13634. "end": {
  13635. "type": "integer",
  13636. "minimum": 0
  13637. }
  13638. },
  13639. "required": ["value", "start", "end"],
  13640. "additionalProperties": false
  13641. }
  13642. },
  13643. "required": ["type", "name"],
  13644. "additionalProperties": false
  13645. },
  13646. "SubtaskPartInput": {
  13647. "type": "object",
  13648. "properties": {
  13649. "id": {
  13650. "type": "string"
  13651. },
  13652. "type": {
  13653. "type": "string",
  13654. "enum": ["subtask"]
  13655. },
  13656. "prompt": {
  13657. "type": "string"
  13658. },
  13659. "description": {
  13660. "type": "string"
  13661. },
  13662. "agent": {
  13663. "type": "string"
  13664. },
  13665. "model": {
  13666. "type": "object",
  13667. "properties": {
  13668. "providerID": {
  13669. "type": "string"
  13670. },
  13671. "modelID": {
  13672. "type": "string"
  13673. }
  13674. },
  13675. "required": ["providerID", "modelID"],
  13676. "additionalProperties": false
  13677. },
  13678. "command": {
  13679. "type": "string"
  13680. }
  13681. },
  13682. "required": ["type", "prompt", "description", "agent"],
  13683. "additionalProperties": false
  13684. },
  13685. "V2SessionsResponse": {
  13686. "type": "object",
  13687. "properties": {
  13688. "items": {
  13689. "type": "array",
  13690. "items": {
  13691. "$ref": "#/components/schemas/SessionInfo"
  13692. }
  13693. },
  13694. "cursor": {
  13695. "type": "object",
  13696. "properties": {
  13697. "previous": {
  13698. "type": "string"
  13699. },
  13700. "next": {
  13701. "type": "string"
  13702. }
  13703. },
  13704. "additionalProperties": false
  13705. }
  13706. },
  13707. "required": ["items", "cursor"],
  13708. "additionalProperties": false
  13709. },
  13710. "V2SessionMessagesResponse": {
  13711. "type": "object",
  13712. "properties": {
  13713. "items": {
  13714. "type": "array",
  13715. "items": {
  13716. "$ref": "#/components/schemas/SessionMessage"
  13717. }
  13718. },
  13719. "cursor": {
  13720. "type": "object",
  13721. "properties": {
  13722. "previous": {
  13723. "type": "string"
  13724. },
  13725. "next": {
  13726. "type": "string"
  13727. }
  13728. },
  13729. "additionalProperties": false
  13730. }
  13731. },
  13732. "required": ["items", "cursor"],
  13733. "additionalProperties": false
  13734. },
  13735. "EventTuiPromptAppend": {
  13736. "type": "object",
  13737. "properties": {
  13738. "type": {
  13739. "type": "string",
  13740. "enum": ["tui.prompt.append"]
  13741. },
  13742. "properties": {
  13743. "type": "object",
  13744. "properties": {
  13745. "text": {
  13746. "type": "string"
  13747. }
  13748. },
  13749. "required": ["text"],
  13750. "additionalProperties": false
  13751. }
  13752. },
  13753. "required": ["type", "properties"],
  13754. "additionalProperties": false
  13755. },
  13756. "EventTuiCommandExecute": {
  13757. "type": "object",
  13758. "properties": {
  13759. "type": {
  13760. "type": "string",
  13761. "enum": ["tui.command.execute"]
  13762. },
  13763. "properties": {
  13764. "type": "object",
  13765. "properties": {
  13766. "command": {
  13767. "anyOf": [
  13768. {
  13769. "type": "string",
  13770. "enum": [
  13771. "session.list",
  13772. "session.new",
  13773. "session.share",
  13774. "session.interrupt",
  13775. "session.compact",
  13776. "session.page.up",
  13777. "session.page.down",
  13778. "session.line.up",
  13779. "session.line.down",
  13780. "session.half.page.up",
  13781. "session.half.page.down",
  13782. "session.first",
  13783. "session.last",
  13784. "prompt.clear",
  13785. "prompt.submit",
  13786. "agent.cycle"
  13787. ]
  13788. },
  13789. {
  13790. "type": "string"
  13791. }
  13792. ]
  13793. }
  13794. },
  13795. "required": ["command"],
  13796. "additionalProperties": false
  13797. }
  13798. },
  13799. "required": ["type", "properties"],
  13800. "additionalProperties": false
  13801. },
  13802. "EventTuiToastShow": {
  13803. "type": "object",
  13804. "properties": {
  13805. "type": {
  13806. "type": "string",
  13807. "enum": ["tui.toast.show"]
  13808. },
  13809. "properties": {
  13810. "type": "object",
  13811. "properties": {
  13812. "title": {
  13813. "type": "string"
  13814. },
  13815. "message": {
  13816. "type": "string"
  13817. },
  13818. "variant": {
  13819. "type": "string",
  13820. "enum": ["info", "success", "warning", "error"]
  13821. },
  13822. "duration": {
  13823. "type": "integer",
  13824. "exclusiveMinimum": 0
  13825. }
  13826. },
  13827. "required": ["message", "variant"],
  13828. "additionalProperties": false
  13829. }
  13830. },
  13831. "required": ["type", "properties"],
  13832. "additionalProperties": false
  13833. },
  13834. "EventTuiSessionSelect": {
  13835. "type": "object",
  13836. "properties": {
  13837. "type": {
  13838. "type": "string",
  13839. "enum": ["tui.session.select"]
  13840. },
  13841. "properties": {
  13842. "type": "object",
  13843. "properties": {
  13844. "sessionID": {
  13845. "type": "string",
  13846. "description": "Session ID to navigate to"
  13847. }
  13848. },
  13849. "required": ["sessionID"],
  13850. "additionalProperties": false
  13851. }
  13852. },
  13853. "required": ["type", "properties"],
  13854. "additionalProperties": false
  13855. },
  13856. "Workspace": {
  13857. "type": "object",
  13858. "properties": {
  13859. "id": {
  13860. "type": "string"
  13861. },
  13862. "type": {
  13863. "type": "string"
  13864. },
  13865. "name": {
  13866. "type": "string"
  13867. },
  13868. "branch": {
  13869. "anyOf": [
  13870. {
  13871. "type": "string"
  13872. },
  13873. {
  13874. "type": "null"
  13875. }
  13876. ]
  13877. },
  13878. "directory": {
  13879. "anyOf": [
  13880. {
  13881. "type": "string"
  13882. },
  13883. {
  13884. "type": "null"
  13885. }
  13886. ]
  13887. },
  13888. "extra": {
  13889. "anyOf": [
  13890. {},
  13891. {
  13892. "type": "null"
  13893. }
  13894. ]
  13895. },
  13896. "projectID": {
  13897. "type": "string"
  13898. },
  13899. "timeUsed": {
  13900. "anyOf": [
  13901. {
  13902. "type": "number"
  13903. },
  13904. {
  13905. "type": "string",
  13906. "enum": ["NaN"]
  13907. },
  13908. {
  13909. "type": "string",
  13910. "enum": ["Infinity"]
  13911. },
  13912. {
  13913. "type": "string",
  13914. "enum": ["-Infinity"]
  13915. },
  13916. {
  13917. "type": "string",
  13918. "enum": ["Infinity", "-Infinity", "NaN"]
  13919. }
  13920. ]
  13921. }
  13922. },
  13923. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID", "timeUsed"],
  13924. "additionalProperties": false
  13925. },
  13926. "WorkspaceWarpError": {
  13927. "type": "object",
  13928. "properties": {
  13929. "name": {
  13930. "type": "string",
  13931. "enum": ["WorkspaceWarpError"]
  13932. },
  13933. "data": {
  13934. "type": "object",
  13935. "properties": {
  13936. "message": {
  13937. "type": "string"
  13938. }
  13939. },
  13940. "required": ["message"],
  13941. "additionalProperties": false
  13942. }
  13943. },
  13944. "required": ["name", "data"],
  13945. "additionalProperties": false
  13946. },
  13947. "SyncEventMessageUpdated": {
  13948. "type": "object",
  13949. "properties": {
  13950. "type": {
  13951. "type": "string",
  13952. "enum": ["sync"]
  13953. },
  13954. "name": {
  13955. "type": "string",
  13956. "enum": ["message.updated.1"]
  13957. },
  13958. "id": {
  13959. "type": "string"
  13960. },
  13961. "seq": {
  13962. "type": "number"
  13963. },
  13964. "aggregateID": {
  13965. "type": "string",
  13966. "enum": ["sessionID"]
  13967. },
  13968. "data": {
  13969. "type": "object",
  13970. "properties": {
  13971. "sessionID": {
  13972. "type": "string"
  13973. },
  13974. "info": {
  13975. "$ref": "#/components/schemas/Message"
  13976. }
  13977. },
  13978. "required": ["sessionID", "info"],
  13979. "additionalProperties": false
  13980. }
  13981. },
  13982. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13983. "additionalProperties": false
  13984. },
  13985. "SyncEventMessageRemoved": {
  13986. "type": "object",
  13987. "properties": {
  13988. "type": {
  13989. "type": "string",
  13990. "enum": ["sync"]
  13991. },
  13992. "name": {
  13993. "type": "string",
  13994. "enum": ["message.removed.1"]
  13995. },
  13996. "id": {
  13997. "type": "string"
  13998. },
  13999. "seq": {
  14000. "type": "number"
  14001. },
  14002. "aggregateID": {
  14003. "type": "string",
  14004. "enum": ["sessionID"]
  14005. },
  14006. "data": {
  14007. "type": "object",
  14008. "properties": {
  14009. "sessionID": {
  14010. "type": "string"
  14011. },
  14012. "messageID": {
  14013. "type": "string"
  14014. }
  14015. },
  14016. "required": ["sessionID", "messageID"],
  14017. "additionalProperties": false
  14018. }
  14019. },
  14020. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14021. "additionalProperties": false
  14022. },
  14023. "SyncEventMessagePartUpdated": {
  14024. "type": "object",
  14025. "properties": {
  14026. "type": {
  14027. "type": "string",
  14028. "enum": ["sync"]
  14029. },
  14030. "name": {
  14031. "type": "string",
  14032. "enum": ["message.part.updated.1"]
  14033. },
  14034. "id": {
  14035. "type": "string"
  14036. },
  14037. "seq": {
  14038. "type": "number"
  14039. },
  14040. "aggregateID": {
  14041. "type": "string",
  14042. "enum": ["sessionID"]
  14043. },
  14044. "data": {
  14045. "type": "object",
  14046. "properties": {
  14047. "sessionID": {
  14048. "type": "string"
  14049. },
  14050. "part": {
  14051. "$ref": "#/components/schemas/Part"
  14052. },
  14053. "time": {
  14054. "type": "integer",
  14055. "minimum": 0
  14056. }
  14057. },
  14058. "required": ["sessionID", "part", "time"],
  14059. "additionalProperties": false
  14060. }
  14061. },
  14062. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14063. "additionalProperties": false
  14064. },
  14065. "SyncEventMessagePartRemoved": {
  14066. "type": "object",
  14067. "properties": {
  14068. "type": {
  14069. "type": "string",
  14070. "enum": ["sync"]
  14071. },
  14072. "name": {
  14073. "type": "string",
  14074. "enum": ["message.part.removed.1"]
  14075. },
  14076. "id": {
  14077. "type": "string"
  14078. },
  14079. "seq": {
  14080. "type": "number"
  14081. },
  14082. "aggregateID": {
  14083. "type": "string",
  14084. "enum": ["sessionID"]
  14085. },
  14086. "data": {
  14087. "type": "object",
  14088. "properties": {
  14089. "sessionID": {
  14090. "type": "string"
  14091. },
  14092. "messageID": {
  14093. "type": "string"
  14094. },
  14095. "partID": {
  14096. "type": "string"
  14097. }
  14098. },
  14099. "required": ["sessionID", "messageID", "partID"],
  14100. "additionalProperties": false
  14101. }
  14102. },
  14103. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14104. "additionalProperties": false
  14105. },
  14106. "SyncEventSessionCreated": {
  14107. "type": "object",
  14108. "properties": {
  14109. "type": {
  14110. "type": "string",
  14111. "enum": ["sync"]
  14112. },
  14113. "name": {
  14114. "type": "string",
  14115. "enum": ["session.created.1"]
  14116. },
  14117. "id": {
  14118. "type": "string"
  14119. },
  14120. "seq": {
  14121. "type": "number"
  14122. },
  14123. "aggregateID": {
  14124. "type": "string",
  14125. "enum": ["sessionID"]
  14126. },
  14127. "data": {
  14128. "type": "object",
  14129. "properties": {
  14130. "sessionID": {
  14131. "type": "string"
  14132. },
  14133. "info": {
  14134. "$ref": "#/components/schemas/Session"
  14135. }
  14136. },
  14137. "required": ["sessionID", "info"],
  14138. "additionalProperties": false
  14139. }
  14140. },
  14141. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14142. "additionalProperties": false
  14143. },
  14144. "SyncEventSessionUpdated": {
  14145. "type": "object",
  14146. "properties": {
  14147. "type": {
  14148. "type": "string",
  14149. "enum": ["sync"]
  14150. },
  14151. "name": {
  14152. "type": "string",
  14153. "enum": ["session.updated.1"]
  14154. },
  14155. "id": {
  14156. "type": "string"
  14157. },
  14158. "seq": {
  14159. "type": "number"
  14160. },
  14161. "aggregateID": {
  14162. "type": "string",
  14163. "enum": ["sessionID"]
  14164. },
  14165. "data": {
  14166. "type": "object",
  14167. "properties": {
  14168. "sessionID": {
  14169. "type": "string"
  14170. },
  14171. "info": {
  14172. "type": "object",
  14173. "properties": {
  14174. "id": {
  14175. "anyOf": [
  14176. {
  14177. "type": "string"
  14178. },
  14179. {
  14180. "type": "null"
  14181. }
  14182. ]
  14183. },
  14184. "slug": {
  14185. "anyOf": [
  14186. {
  14187. "type": "string"
  14188. },
  14189. {
  14190. "type": "null"
  14191. }
  14192. ]
  14193. },
  14194. "projectID": {
  14195. "anyOf": [
  14196. {
  14197. "type": "string"
  14198. },
  14199. {
  14200. "type": "null"
  14201. }
  14202. ]
  14203. },
  14204. "workspaceID": {
  14205. "anyOf": [
  14206. {
  14207. "type": "string"
  14208. },
  14209. {
  14210. "type": "null"
  14211. }
  14212. ]
  14213. },
  14214. "directory": {
  14215. "anyOf": [
  14216. {
  14217. "type": "string"
  14218. },
  14219. {
  14220. "type": "null"
  14221. }
  14222. ]
  14223. },
  14224. "path": {
  14225. "anyOf": [
  14226. {
  14227. "type": "string"
  14228. },
  14229. {
  14230. "type": "null"
  14231. }
  14232. ]
  14233. },
  14234. "parentID": {
  14235. "anyOf": [
  14236. {
  14237. "type": "string"
  14238. },
  14239. {
  14240. "type": "null"
  14241. }
  14242. ]
  14243. },
  14244. "summary": {
  14245. "anyOf": [
  14246. {
  14247. "type": "object",
  14248. "properties": {
  14249. "additions": {
  14250. "type": "integer",
  14251. "minimum": 0
  14252. },
  14253. "deletions": {
  14254. "type": "integer",
  14255. "minimum": 0
  14256. },
  14257. "files": {
  14258. "type": "integer",
  14259. "minimum": 0
  14260. },
  14261. "diffs": {
  14262. "type": "array",
  14263. "items": {
  14264. "$ref": "#/components/schemas/SnapshotFileDiff"
  14265. }
  14266. }
  14267. },
  14268. "required": ["additions", "deletions", "files"],
  14269. "additionalProperties": false
  14270. },
  14271. {
  14272. "type": "null"
  14273. }
  14274. ]
  14275. },
  14276. "share": {
  14277. "type": "object",
  14278. "properties": {
  14279. "url": {
  14280. "anyOf": [
  14281. {
  14282. "type": "string"
  14283. },
  14284. {
  14285. "type": "null"
  14286. }
  14287. ]
  14288. }
  14289. },
  14290. "additionalProperties": false
  14291. },
  14292. "title": {
  14293. "anyOf": [
  14294. {
  14295. "type": "string"
  14296. },
  14297. {
  14298. "type": "null"
  14299. }
  14300. ]
  14301. },
  14302. "agent": {
  14303. "anyOf": [
  14304. {
  14305. "type": "string"
  14306. },
  14307. {
  14308. "type": "null"
  14309. }
  14310. ]
  14311. },
  14312. "model": {
  14313. "anyOf": [
  14314. {
  14315. "type": "object",
  14316. "properties": {
  14317. "id": {
  14318. "type": "string"
  14319. },
  14320. "providerID": {
  14321. "type": "string"
  14322. },
  14323. "variant": {
  14324. "type": "string"
  14325. }
  14326. },
  14327. "required": ["id", "providerID"],
  14328. "additionalProperties": false
  14329. },
  14330. {
  14331. "type": "null"
  14332. }
  14333. ]
  14334. },
  14335. "version": {
  14336. "anyOf": [
  14337. {
  14338. "type": "string"
  14339. },
  14340. {
  14341. "type": "null"
  14342. }
  14343. ]
  14344. },
  14345. "time": {
  14346. "type": "object",
  14347. "properties": {
  14348. "created": {
  14349. "anyOf": [
  14350. {
  14351. "type": "integer",
  14352. "minimum": 0
  14353. },
  14354. {
  14355. "type": "null"
  14356. }
  14357. ]
  14358. },
  14359. "updated": {
  14360. "anyOf": [
  14361. {
  14362. "type": "integer",
  14363. "minimum": 0
  14364. },
  14365. {
  14366. "type": "null"
  14367. }
  14368. ]
  14369. },
  14370. "compacting": {
  14371. "anyOf": [
  14372. {
  14373. "type": "integer",
  14374. "minimum": 0
  14375. },
  14376. {
  14377. "type": "null"
  14378. }
  14379. ]
  14380. },
  14381. "archived": {
  14382. "anyOf": [
  14383. {
  14384. "type": "number"
  14385. },
  14386. {
  14387. "type": "null"
  14388. }
  14389. ]
  14390. }
  14391. },
  14392. "additionalProperties": false
  14393. },
  14394. "permission": {
  14395. "anyOf": [
  14396. {
  14397. "$ref": "#/components/schemas/PermissionRuleset"
  14398. },
  14399. {
  14400. "type": "null"
  14401. }
  14402. ]
  14403. },
  14404. "revert": {
  14405. "anyOf": [
  14406. {
  14407. "type": "object",
  14408. "properties": {
  14409. "messageID": {
  14410. "type": "string"
  14411. },
  14412. "partID": {
  14413. "type": "string"
  14414. },
  14415. "snapshot": {
  14416. "type": "string"
  14417. },
  14418. "diff": {
  14419. "type": "string"
  14420. }
  14421. },
  14422. "required": ["messageID"],
  14423. "additionalProperties": false
  14424. },
  14425. {
  14426. "type": "null"
  14427. }
  14428. ]
  14429. }
  14430. },
  14431. "additionalProperties": false
  14432. }
  14433. },
  14434. "required": ["sessionID", "info"],
  14435. "additionalProperties": false
  14436. }
  14437. },
  14438. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14439. "additionalProperties": false
  14440. },
  14441. "SyncEventSessionDeleted": {
  14442. "type": "object",
  14443. "properties": {
  14444. "type": {
  14445. "type": "string",
  14446. "enum": ["sync"]
  14447. },
  14448. "name": {
  14449. "type": "string",
  14450. "enum": ["session.deleted.1"]
  14451. },
  14452. "id": {
  14453. "type": "string"
  14454. },
  14455. "seq": {
  14456. "type": "number"
  14457. },
  14458. "aggregateID": {
  14459. "type": "string",
  14460. "enum": ["sessionID"]
  14461. },
  14462. "data": {
  14463. "type": "object",
  14464. "properties": {
  14465. "sessionID": {
  14466. "type": "string"
  14467. },
  14468. "info": {
  14469. "$ref": "#/components/schemas/Session"
  14470. }
  14471. },
  14472. "required": ["sessionID", "info"],
  14473. "additionalProperties": false
  14474. }
  14475. },
  14476. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14477. "additionalProperties": false
  14478. },
  14479. "SyncEventSessionNextAgentSwitched": {
  14480. "type": "object",
  14481. "properties": {
  14482. "type": {
  14483. "type": "string",
  14484. "enum": ["sync"]
  14485. },
  14486. "name": {
  14487. "type": "string",
  14488. "enum": ["session.next.agent.switched.1"]
  14489. },
  14490. "id": {
  14491. "type": "string"
  14492. },
  14493. "seq": {
  14494. "type": "number"
  14495. },
  14496. "aggregateID": {
  14497. "type": "string",
  14498. "enum": ["sessionID"]
  14499. },
  14500. "data": {
  14501. "type": "object",
  14502. "properties": {
  14503. "timestamp": {
  14504. "type": "number"
  14505. },
  14506. "sessionID": {
  14507. "type": "string"
  14508. },
  14509. "agent": {
  14510. "type": "string"
  14511. }
  14512. },
  14513. "required": ["timestamp", "sessionID", "agent"],
  14514. "additionalProperties": false
  14515. }
  14516. },
  14517. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14518. "additionalProperties": false
  14519. },
  14520. "SyncEventSessionNextModelSwitched": {
  14521. "type": "object",
  14522. "properties": {
  14523. "type": {
  14524. "type": "string",
  14525. "enum": ["sync"]
  14526. },
  14527. "name": {
  14528. "type": "string",
  14529. "enum": ["session.next.model.switched.1"]
  14530. },
  14531. "id": {
  14532. "type": "string"
  14533. },
  14534. "seq": {
  14535. "type": "number"
  14536. },
  14537. "aggregateID": {
  14538. "type": "string",
  14539. "enum": ["sessionID"]
  14540. },
  14541. "data": {
  14542. "type": "object",
  14543. "properties": {
  14544. "timestamp": {
  14545. "type": "number"
  14546. },
  14547. "sessionID": {
  14548. "type": "string"
  14549. },
  14550. "model": {
  14551. "type": "object",
  14552. "properties": {
  14553. "id": {
  14554. "type": "string"
  14555. },
  14556. "providerID": {
  14557. "type": "string"
  14558. },
  14559. "variant": {
  14560. "type": "string"
  14561. }
  14562. },
  14563. "required": ["id", "providerID", "variant"],
  14564. "additionalProperties": false
  14565. }
  14566. },
  14567. "required": ["timestamp", "sessionID", "model"],
  14568. "additionalProperties": false
  14569. }
  14570. },
  14571. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14572. "additionalProperties": false
  14573. },
  14574. "SyncEventSessionNextPrompted": {
  14575. "type": "object",
  14576. "properties": {
  14577. "type": {
  14578. "type": "string",
  14579. "enum": ["sync"]
  14580. },
  14581. "name": {
  14582. "type": "string",
  14583. "enum": ["session.next.prompted.1"]
  14584. },
  14585. "id": {
  14586. "type": "string"
  14587. },
  14588. "seq": {
  14589. "type": "number"
  14590. },
  14591. "aggregateID": {
  14592. "type": "string",
  14593. "enum": ["sessionID"]
  14594. },
  14595. "data": {
  14596. "type": "object",
  14597. "properties": {
  14598. "timestamp": {
  14599. "type": "number"
  14600. },
  14601. "sessionID": {
  14602. "type": "string"
  14603. },
  14604. "prompt": {
  14605. "$ref": "#/components/schemas/Prompt"
  14606. }
  14607. },
  14608. "required": ["timestamp", "sessionID", "prompt"],
  14609. "additionalProperties": false
  14610. }
  14611. },
  14612. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14613. "additionalProperties": false
  14614. },
  14615. "SyncEventSessionNextSynthetic": {
  14616. "type": "object",
  14617. "properties": {
  14618. "type": {
  14619. "type": "string",
  14620. "enum": ["sync"]
  14621. },
  14622. "name": {
  14623. "type": "string",
  14624. "enum": ["session.next.synthetic.1"]
  14625. },
  14626. "id": {
  14627. "type": "string"
  14628. },
  14629. "seq": {
  14630. "type": "number"
  14631. },
  14632. "aggregateID": {
  14633. "type": "string",
  14634. "enum": ["sessionID"]
  14635. },
  14636. "data": {
  14637. "type": "object",
  14638. "properties": {
  14639. "timestamp": {
  14640. "type": "number"
  14641. },
  14642. "sessionID": {
  14643. "type": "string"
  14644. },
  14645. "text": {
  14646. "type": "string"
  14647. }
  14648. },
  14649. "required": ["timestamp", "sessionID", "text"],
  14650. "additionalProperties": false
  14651. }
  14652. },
  14653. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14654. "additionalProperties": false
  14655. },
  14656. "SyncEventSessionNextShellStarted": {
  14657. "type": "object",
  14658. "properties": {
  14659. "type": {
  14660. "type": "string",
  14661. "enum": ["sync"]
  14662. },
  14663. "name": {
  14664. "type": "string",
  14665. "enum": ["session.next.shell.started.1"]
  14666. },
  14667. "id": {
  14668. "type": "string"
  14669. },
  14670. "seq": {
  14671. "type": "number"
  14672. },
  14673. "aggregateID": {
  14674. "type": "string",
  14675. "enum": ["sessionID"]
  14676. },
  14677. "data": {
  14678. "type": "object",
  14679. "properties": {
  14680. "timestamp": {
  14681. "type": "number"
  14682. },
  14683. "sessionID": {
  14684. "type": "string"
  14685. },
  14686. "callID": {
  14687. "type": "string"
  14688. },
  14689. "command": {
  14690. "type": "string"
  14691. }
  14692. },
  14693. "required": ["timestamp", "sessionID", "callID", "command"],
  14694. "additionalProperties": false
  14695. }
  14696. },
  14697. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14698. "additionalProperties": false
  14699. },
  14700. "SyncEventSessionNextShellEnded": {
  14701. "type": "object",
  14702. "properties": {
  14703. "type": {
  14704. "type": "string",
  14705. "enum": ["sync"]
  14706. },
  14707. "name": {
  14708. "type": "string",
  14709. "enum": ["session.next.shell.ended.1"]
  14710. },
  14711. "id": {
  14712. "type": "string"
  14713. },
  14714. "seq": {
  14715. "type": "number"
  14716. },
  14717. "aggregateID": {
  14718. "type": "string",
  14719. "enum": ["sessionID"]
  14720. },
  14721. "data": {
  14722. "type": "object",
  14723. "properties": {
  14724. "timestamp": {
  14725. "type": "number"
  14726. },
  14727. "sessionID": {
  14728. "type": "string"
  14729. },
  14730. "callID": {
  14731. "type": "string"
  14732. },
  14733. "output": {
  14734. "type": "string"
  14735. }
  14736. },
  14737. "required": ["timestamp", "sessionID", "callID", "output"],
  14738. "additionalProperties": false
  14739. }
  14740. },
  14741. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14742. "additionalProperties": false
  14743. },
  14744. "SyncEventSessionNextStepStarted": {
  14745. "type": "object",
  14746. "properties": {
  14747. "type": {
  14748. "type": "string",
  14749. "enum": ["sync"]
  14750. },
  14751. "name": {
  14752. "type": "string",
  14753. "enum": ["session.next.step.started.1"]
  14754. },
  14755. "id": {
  14756. "type": "string"
  14757. },
  14758. "seq": {
  14759. "type": "number"
  14760. },
  14761. "aggregateID": {
  14762. "type": "string",
  14763. "enum": ["sessionID"]
  14764. },
  14765. "data": {
  14766. "type": "object",
  14767. "properties": {
  14768. "timestamp": {
  14769. "type": "number"
  14770. },
  14771. "sessionID": {
  14772. "type": "string"
  14773. },
  14774. "agent": {
  14775. "type": "string"
  14776. },
  14777. "model": {
  14778. "type": "object",
  14779. "properties": {
  14780. "id": {
  14781. "type": "string"
  14782. },
  14783. "providerID": {
  14784. "type": "string"
  14785. },
  14786. "variant": {
  14787. "type": "string"
  14788. }
  14789. },
  14790. "required": ["id", "providerID", "variant"],
  14791. "additionalProperties": false
  14792. },
  14793. "snapshot": {
  14794. "type": "string"
  14795. }
  14796. },
  14797. "required": ["timestamp", "sessionID", "agent", "model"],
  14798. "additionalProperties": false
  14799. }
  14800. },
  14801. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14802. "additionalProperties": false
  14803. },
  14804. "SyncEventSessionNextStepEnded": {
  14805. "type": "object",
  14806. "properties": {
  14807. "type": {
  14808. "type": "string",
  14809. "enum": ["sync"]
  14810. },
  14811. "name": {
  14812. "type": "string",
  14813. "enum": ["session.next.step.ended.1"]
  14814. },
  14815. "id": {
  14816. "type": "string"
  14817. },
  14818. "seq": {
  14819. "type": "number"
  14820. },
  14821. "aggregateID": {
  14822. "type": "string",
  14823. "enum": ["sessionID"]
  14824. },
  14825. "data": {
  14826. "type": "object",
  14827. "properties": {
  14828. "timestamp": {
  14829. "type": "number"
  14830. },
  14831. "sessionID": {
  14832. "type": "string"
  14833. },
  14834. "finish": {
  14835. "type": "string"
  14836. },
  14837. "cost": {
  14838. "type": "number"
  14839. },
  14840. "tokens": {
  14841. "type": "object",
  14842. "properties": {
  14843. "input": {
  14844. "type": "integer",
  14845. "minimum": 0
  14846. },
  14847. "output": {
  14848. "type": "integer",
  14849. "minimum": 0
  14850. },
  14851. "reasoning": {
  14852. "type": "integer",
  14853. "minimum": 0
  14854. },
  14855. "cache": {
  14856. "type": "object",
  14857. "properties": {
  14858. "read": {
  14859. "type": "integer",
  14860. "minimum": 0
  14861. },
  14862. "write": {
  14863. "type": "integer",
  14864. "minimum": 0
  14865. }
  14866. },
  14867. "required": ["read", "write"],
  14868. "additionalProperties": false
  14869. }
  14870. },
  14871. "required": ["input", "output", "reasoning", "cache"],
  14872. "additionalProperties": false
  14873. },
  14874. "snapshot": {
  14875. "type": "string"
  14876. }
  14877. },
  14878. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  14879. "additionalProperties": false
  14880. }
  14881. },
  14882. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14883. "additionalProperties": false
  14884. },
  14885. "SyncEventSessionNextStepFailed": {
  14886. "type": "object",
  14887. "properties": {
  14888. "type": {
  14889. "type": "string",
  14890. "enum": ["sync"]
  14891. },
  14892. "name": {
  14893. "type": "string",
  14894. "enum": ["session.next.step.failed.1"]
  14895. },
  14896. "id": {
  14897. "type": "string"
  14898. },
  14899. "seq": {
  14900. "type": "number"
  14901. },
  14902. "aggregateID": {
  14903. "type": "string",
  14904. "enum": ["sessionID"]
  14905. },
  14906. "data": {
  14907. "type": "object",
  14908. "properties": {
  14909. "timestamp": {
  14910. "type": "number"
  14911. },
  14912. "sessionID": {
  14913. "type": "string"
  14914. },
  14915. "error": {
  14916. "$ref": "#/components/schemas/SessionErrorUnknown"
  14917. }
  14918. },
  14919. "required": ["timestamp", "sessionID", "error"],
  14920. "additionalProperties": false
  14921. }
  14922. },
  14923. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14924. "additionalProperties": false
  14925. },
  14926. "SyncEventSessionNextTextStarted": {
  14927. "type": "object",
  14928. "properties": {
  14929. "type": {
  14930. "type": "string",
  14931. "enum": ["sync"]
  14932. },
  14933. "name": {
  14934. "type": "string",
  14935. "enum": ["session.next.text.started.1"]
  14936. },
  14937. "id": {
  14938. "type": "string"
  14939. },
  14940. "seq": {
  14941. "type": "number"
  14942. },
  14943. "aggregateID": {
  14944. "type": "string",
  14945. "enum": ["sessionID"]
  14946. },
  14947. "data": {
  14948. "type": "object",
  14949. "properties": {
  14950. "timestamp": {
  14951. "type": "number"
  14952. },
  14953. "sessionID": {
  14954. "type": "string"
  14955. }
  14956. },
  14957. "required": ["timestamp", "sessionID"],
  14958. "additionalProperties": false
  14959. }
  14960. },
  14961. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14962. "additionalProperties": false
  14963. },
  14964. "SyncEventSessionNextTextDelta": {
  14965. "type": "object",
  14966. "properties": {
  14967. "type": {
  14968. "type": "string",
  14969. "enum": ["sync"]
  14970. },
  14971. "name": {
  14972. "type": "string",
  14973. "enum": ["session.next.text.delta.1"]
  14974. },
  14975. "id": {
  14976. "type": "string"
  14977. },
  14978. "seq": {
  14979. "type": "number"
  14980. },
  14981. "aggregateID": {
  14982. "type": "string",
  14983. "enum": ["sessionID"]
  14984. },
  14985. "data": {
  14986. "type": "object",
  14987. "properties": {
  14988. "timestamp": {
  14989. "type": "number"
  14990. },
  14991. "sessionID": {
  14992. "type": "string"
  14993. },
  14994. "delta": {
  14995. "type": "string"
  14996. }
  14997. },
  14998. "required": ["timestamp", "sessionID", "delta"],
  14999. "additionalProperties": false
  15000. }
  15001. },
  15002. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15003. "additionalProperties": false
  15004. },
  15005. "SyncEventSessionNextTextEnded": {
  15006. "type": "object",
  15007. "properties": {
  15008. "type": {
  15009. "type": "string",
  15010. "enum": ["sync"]
  15011. },
  15012. "name": {
  15013. "type": "string",
  15014. "enum": ["session.next.text.ended.1"]
  15015. },
  15016. "id": {
  15017. "type": "string"
  15018. },
  15019. "seq": {
  15020. "type": "number"
  15021. },
  15022. "aggregateID": {
  15023. "type": "string",
  15024. "enum": ["sessionID"]
  15025. },
  15026. "data": {
  15027. "type": "object",
  15028. "properties": {
  15029. "timestamp": {
  15030. "type": "number"
  15031. },
  15032. "sessionID": {
  15033. "type": "string"
  15034. },
  15035. "text": {
  15036. "type": "string"
  15037. }
  15038. },
  15039. "required": ["timestamp", "sessionID", "text"],
  15040. "additionalProperties": false
  15041. }
  15042. },
  15043. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15044. "additionalProperties": false
  15045. },
  15046. "SyncEventSessionNextReasoningStarted": {
  15047. "type": "object",
  15048. "properties": {
  15049. "type": {
  15050. "type": "string",
  15051. "enum": ["sync"]
  15052. },
  15053. "name": {
  15054. "type": "string",
  15055. "enum": ["session.next.reasoning.started.1"]
  15056. },
  15057. "id": {
  15058. "type": "string"
  15059. },
  15060. "seq": {
  15061. "type": "number"
  15062. },
  15063. "aggregateID": {
  15064. "type": "string",
  15065. "enum": ["sessionID"]
  15066. },
  15067. "data": {
  15068. "type": "object",
  15069. "properties": {
  15070. "timestamp": {
  15071. "type": "number"
  15072. },
  15073. "sessionID": {
  15074. "type": "string"
  15075. },
  15076. "reasoningID": {
  15077. "type": "string"
  15078. }
  15079. },
  15080. "required": ["timestamp", "sessionID", "reasoningID"],
  15081. "additionalProperties": false
  15082. }
  15083. },
  15084. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15085. "additionalProperties": false
  15086. },
  15087. "SyncEventSessionNextReasoningDelta": {
  15088. "type": "object",
  15089. "properties": {
  15090. "type": {
  15091. "type": "string",
  15092. "enum": ["sync"]
  15093. },
  15094. "name": {
  15095. "type": "string",
  15096. "enum": ["session.next.reasoning.delta.1"]
  15097. },
  15098. "id": {
  15099. "type": "string"
  15100. },
  15101. "seq": {
  15102. "type": "number"
  15103. },
  15104. "aggregateID": {
  15105. "type": "string",
  15106. "enum": ["sessionID"]
  15107. },
  15108. "data": {
  15109. "type": "object",
  15110. "properties": {
  15111. "timestamp": {
  15112. "type": "number"
  15113. },
  15114. "sessionID": {
  15115. "type": "string"
  15116. },
  15117. "reasoningID": {
  15118. "type": "string"
  15119. },
  15120. "delta": {
  15121. "type": "string"
  15122. }
  15123. },
  15124. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15125. "additionalProperties": false
  15126. }
  15127. },
  15128. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15129. "additionalProperties": false
  15130. },
  15131. "SyncEventSessionNextReasoningEnded": {
  15132. "type": "object",
  15133. "properties": {
  15134. "type": {
  15135. "type": "string",
  15136. "enum": ["sync"]
  15137. },
  15138. "name": {
  15139. "type": "string",
  15140. "enum": ["session.next.reasoning.ended.1"]
  15141. },
  15142. "id": {
  15143. "type": "string"
  15144. },
  15145. "seq": {
  15146. "type": "number"
  15147. },
  15148. "aggregateID": {
  15149. "type": "string",
  15150. "enum": ["sessionID"]
  15151. },
  15152. "data": {
  15153. "type": "object",
  15154. "properties": {
  15155. "timestamp": {
  15156. "type": "number"
  15157. },
  15158. "sessionID": {
  15159. "type": "string"
  15160. },
  15161. "reasoningID": {
  15162. "type": "string"
  15163. },
  15164. "text": {
  15165. "type": "string"
  15166. }
  15167. },
  15168. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15169. "additionalProperties": false
  15170. }
  15171. },
  15172. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15173. "additionalProperties": false
  15174. },
  15175. "SyncEventSessionNextToolInputStarted": {
  15176. "type": "object",
  15177. "properties": {
  15178. "type": {
  15179. "type": "string",
  15180. "enum": ["sync"]
  15181. },
  15182. "name": {
  15183. "type": "string",
  15184. "enum": ["session.next.tool.input.started.1"]
  15185. },
  15186. "id": {
  15187. "type": "string"
  15188. },
  15189. "seq": {
  15190. "type": "number"
  15191. },
  15192. "aggregateID": {
  15193. "type": "string",
  15194. "enum": ["sessionID"]
  15195. },
  15196. "data": {
  15197. "type": "object",
  15198. "properties": {
  15199. "timestamp": {
  15200. "type": "number"
  15201. },
  15202. "sessionID": {
  15203. "type": "string"
  15204. },
  15205. "callID": {
  15206. "type": "string"
  15207. },
  15208. "name": {
  15209. "type": "string"
  15210. }
  15211. },
  15212. "required": ["timestamp", "sessionID", "callID", "name"],
  15213. "additionalProperties": false
  15214. }
  15215. },
  15216. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15217. "additionalProperties": false
  15218. },
  15219. "SyncEventSessionNextToolInputDelta": {
  15220. "type": "object",
  15221. "properties": {
  15222. "type": {
  15223. "type": "string",
  15224. "enum": ["sync"]
  15225. },
  15226. "name": {
  15227. "type": "string",
  15228. "enum": ["session.next.tool.input.delta.1"]
  15229. },
  15230. "id": {
  15231. "type": "string"
  15232. },
  15233. "seq": {
  15234. "type": "number"
  15235. },
  15236. "aggregateID": {
  15237. "type": "string",
  15238. "enum": ["sessionID"]
  15239. },
  15240. "data": {
  15241. "type": "object",
  15242. "properties": {
  15243. "timestamp": {
  15244. "type": "number"
  15245. },
  15246. "sessionID": {
  15247. "type": "string"
  15248. },
  15249. "callID": {
  15250. "type": "string"
  15251. },
  15252. "delta": {
  15253. "type": "string"
  15254. }
  15255. },
  15256. "required": ["timestamp", "sessionID", "callID", "delta"],
  15257. "additionalProperties": false
  15258. }
  15259. },
  15260. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15261. "additionalProperties": false
  15262. },
  15263. "SyncEventSessionNextToolInputEnded": {
  15264. "type": "object",
  15265. "properties": {
  15266. "type": {
  15267. "type": "string",
  15268. "enum": ["sync"]
  15269. },
  15270. "name": {
  15271. "type": "string",
  15272. "enum": ["session.next.tool.input.ended.1"]
  15273. },
  15274. "id": {
  15275. "type": "string"
  15276. },
  15277. "seq": {
  15278. "type": "number"
  15279. },
  15280. "aggregateID": {
  15281. "type": "string",
  15282. "enum": ["sessionID"]
  15283. },
  15284. "data": {
  15285. "type": "object",
  15286. "properties": {
  15287. "timestamp": {
  15288. "type": "number"
  15289. },
  15290. "sessionID": {
  15291. "type": "string"
  15292. },
  15293. "callID": {
  15294. "type": "string"
  15295. },
  15296. "text": {
  15297. "type": "string"
  15298. }
  15299. },
  15300. "required": ["timestamp", "sessionID", "callID", "text"],
  15301. "additionalProperties": false
  15302. }
  15303. },
  15304. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15305. "additionalProperties": false
  15306. },
  15307. "SyncEventSessionNextToolCalled": {
  15308. "type": "object",
  15309. "properties": {
  15310. "type": {
  15311. "type": "string",
  15312. "enum": ["sync"]
  15313. },
  15314. "name": {
  15315. "type": "string",
  15316. "enum": ["session.next.tool.called.1"]
  15317. },
  15318. "id": {
  15319. "type": "string"
  15320. },
  15321. "seq": {
  15322. "type": "number"
  15323. },
  15324. "aggregateID": {
  15325. "type": "string",
  15326. "enum": ["sessionID"]
  15327. },
  15328. "data": {
  15329. "type": "object",
  15330. "properties": {
  15331. "timestamp": {
  15332. "type": "number"
  15333. },
  15334. "sessionID": {
  15335. "type": "string"
  15336. },
  15337. "callID": {
  15338. "type": "string"
  15339. },
  15340. "tool": {
  15341. "type": "string"
  15342. },
  15343. "input": {
  15344. "type": "object"
  15345. },
  15346. "provider": {
  15347. "type": "object",
  15348. "properties": {
  15349. "executed": {
  15350. "type": "boolean"
  15351. },
  15352. "metadata": {
  15353. "type": "object"
  15354. }
  15355. },
  15356. "required": ["executed"],
  15357. "additionalProperties": false
  15358. }
  15359. },
  15360. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15361. "additionalProperties": false
  15362. }
  15363. },
  15364. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15365. "additionalProperties": false
  15366. },
  15367. "SyncEventSessionNextToolProgress": {
  15368. "type": "object",
  15369. "properties": {
  15370. "type": {
  15371. "type": "string",
  15372. "enum": ["sync"]
  15373. },
  15374. "name": {
  15375. "type": "string",
  15376. "enum": ["session.next.tool.progress.1"]
  15377. },
  15378. "id": {
  15379. "type": "string"
  15380. },
  15381. "seq": {
  15382. "type": "number"
  15383. },
  15384. "aggregateID": {
  15385. "type": "string",
  15386. "enum": ["sessionID"]
  15387. },
  15388. "data": {
  15389. "type": "object",
  15390. "properties": {
  15391. "timestamp": {
  15392. "type": "number"
  15393. },
  15394. "sessionID": {
  15395. "type": "string"
  15396. },
  15397. "callID": {
  15398. "type": "string"
  15399. },
  15400. "structured": {
  15401. "type": "object"
  15402. },
  15403. "content": {
  15404. "type": "array",
  15405. "items": {
  15406. "anyOf": [
  15407. {
  15408. "$ref": "#/components/schemas/ToolTextContent"
  15409. },
  15410. {
  15411. "$ref": "#/components/schemas/ToolFileContent"
  15412. }
  15413. ]
  15414. }
  15415. }
  15416. },
  15417. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15418. "additionalProperties": false
  15419. }
  15420. },
  15421. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15422. "additionalProperties": false
  15423. },
  15424. "SyncEventSessionNextToolSuccess": {
  15425. "type": "object",
  15426. "properties": {
  15427. "type": {
  15428. "type": "string",
  15429. "enum": ["sync"]
  15430. },
  15431. "name": {
  15432. "type": "string",
  15433. "enum": ["session.next.tool.success.1"]
  15434. },
  15435. "id": {
  15436. "type": "string"
  15437. },
  15438. "seq": {
  15439. "type": "number"
  15440. },
  15441. "aggregateID": {
  15442. "type": "string",
  15443. "enum": ["sessionID"]
  15444. },
  15445. "data": {
  15446. "type": "object",
  15447. "properties": {
  15448. "timestamp": {
  15449. "type": "number"
  15450. },
  15451. "sessionID": {
  15452. "type": "string"
  15453. },
  15454. "callID": {
  15455. "type": "string"
  15456. },
  15457. "structured": {
  15458. "type": "object"
  15459. },
  15460. "content": {
  15461. "type": "array",
  15462. "items": {
  15463. "anyOf": [
  15464. {
  15465. "$ref": "#/components/schemas/ToolTextContent"
  15466. },
  15467. {
  15468. "$ref": "#/components/schemas/ToolFileContent"
  15469. }
  15470. ]
  15471. }
  15472. },
  15473. "provider": {
  15474. "type": "object",
  15475. "properties": {
  15476. "executed": {
  15477. "type": "boolean"
  15478. },
  15479. "metadata": {
  15480. "type": "object"
  15481. }
  15482. },
  15483. "required": ["executed"],
  15484. "additionalProperties": false
  15485. }
  15486. },
  15487. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15488. "additionalProperties": false
  15489. }
  15490. },
  15491. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15492. "additionalProperties": false
  15493. },
  15494. "SyncEventSessionNextToolFailed": {
  15495. "type": "object",
  15496. "properties": {
  15497. "type": {
  15498. "type": "string",
  15499. "enum": ["sync"]
  15500. },
  15501. "name": {
  15502. "type": "string",
  15503. "enum": ["session.next.tool.failed.1"]
  15504. },
  15505. "id": {
  15506. "type": "string"
  15507. },
  15508. "seq": {
  15509. "type": "number"
  15510. },
  15511. "aggregateID": {
  15512. "type": "string",
  15513. "enum": ["sessionID"]
  15514. },
  15515. "data": {
  15516. "type": "object",
  15517. "properties": {
  15518. "timestamp": {
  15519. "type": "number"
  15520. },
  15521. "sessionID": {
  15522. "type": "string"
  15523. },
  15524. "callID": {
  15525. "type": "string"
  15526. },
  15527. "error": {
  15528. "$ref": "#/components/schemas/SessionErrorUnknown"
  15529. },
  15530. "provider": {
  15531. "type": "object",
  15532. "properties": {
  15533. "executed": {
  15534. "type": "boolean"
  15535. },
  15536. "metadata": {
  15537. "type": "object"
  15538. }
  15539. },
  15540. "required": ["executed"],
  15541. "additionalProperties": false
  15542. }
  15543. },
  15544. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15545. "additionalProperties": false
  15546. }
  15547. },
  15548. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15549. "additionalProperties": false
  15550. },
  15551. "SyncEventSessionNextRetried": {
  15552. "type": "object",
  15553. "properties": {
  15554. "type": {
  15555. "type": "string",
  15556. "enum": ["sync"]
  15557. },
  15558. "name": {
  15559. "type": "string",
  15560. "enum": ["session.next.retried.1"]
  15561. },
  15562. "id": {
  15563. "type": "string"
  15564. },
  15565. "seq": {
  15566. "type": "number"
  15567. },
  15568. "aggregateID": {
  15569. "type": "string",
  15570. "enum": ["sessionID"]
  15571. },
  15572. "data": {
  15573. "type": "object",
  15574. "properties": {
  15575. "timestamp": {
  15576. "type": "number"
  15577. },
  15578. "sessionID": {
  15579. "type": "string"
  15580. },
  15581. "attempt": {
  15582. "type": "integer",
  15583. "minimum": 0
  15584. },
  15585. "error": {
  15586. "$ref": "#/components/schemas/SessionNextRetry_error"
  15587. }
  15588. },
  15589. "required": ["timestamp", "sessionID", "attempt", "error"],
  15590. "additionalProperties": false
  15591. }
  15592. },
  15593. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15594. "additionalProperties": false
  15595. },
  15596. "SyncEventSessionNextCompactionStarted": {
  15597. "type": "object",
  15598. "properties": {
  15599. "type": {
  15600. "type": "string",
  15601. "enum": ["sync"]
  15602. },
  15603. "name": {
  15604. "type": "string",
  15605. "enum": ["session.next.compaction.started.1"]
  15606. },
  15607. "id": {
  15608. "type": "string"
  15609. },
  15610. "seq": {
  15611. "type": "number"
  15612. },
  15613. "aggregateID": {
  15614. "type": "string",
  15615. "enum": ["sessionID"]
  15616. },
  15617. "data": {
  15618. "type": "object",
  15619. "properties": {
  15620. "timestamp": {
  15621. "type": "number"
  15622. },
  15623. "sessionID": {
  15624. "type": "string"
  15625. },
  15626. "reason": {
  15627. "type": "string",
  15628. "enum": ["auto", "manual"]
  15629. }
  15630. },
  15631. "required": ["timestamp", "sessionID", "reason"],
  15632. "additionalProperties": false
  15633. }
  15634. },
  15635. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15636. "additionalProperties": false
  15637. },
  15638. "SyncEventSessionNextCompactionDelta": {
  15639. "type": "object",
  15640. "properties": {
  15641. "type": {
  15642. "type": "string",
  15643. "enum": ["sync"]
  15644. },
  15645. "name": {
  15646. "type": "string",
  15647. "enum": ["session.next.compaction.delta.1"]
  15648. },
  15649. "id": {
  15650. "type": "string"
  15651. },
  15652. "seq": {
  15653. "type": "number"
  15654. },
  15655. "aggregateID": {
  15656. "type": "string",
  15657. "enum": ["sessionID"]
  15658. },
  15659. "data": {
  15660. "type": "object",
  15661. "properties": {
  15662. "timestamp": {
  15663. "type": "number"
  15664. },
  15665. "sessionID": {
  15666. "type": "string"
  15667. },
  15668. "text": {
  15669. "type": "string"
  15670. }
  15671. },
  15672. "required": ["timestamp", "sessionID", "text"],
  15673. "additionalProperties": false
  15674. }
  15675. },
  15676. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15677. "additionalProperties": false
  15678. },
  15679. "SyncEventSessionNextCompactionEnded": {
  15680. "type": "object",
  15681. "properties": {
  15682. "type": {
  15683. "type": "string",
  15684. "enum": ["sync"]
  15685. },
  15686. "name": {
  15687. "type": "string",
  15688. "enum": ["session.next.compaction.ended.1"]
  15689. },
  15690. "id": {
  15691. "type": "string"
  15692. },
  15693. "seq": {
  15694. "type": "number"
  15695. },
  15696. "aggregateID": {
  15697. "type": "string",
  15698. "enum": ["sessionID"]
  15699. },
  15700. "data": {
  15701. "type": "object",
  15702. "properties": {
  15703. "timestamp": {
  15704. "type": "number"
  15705. },
  15706. "sessionID": {
  15707. "type": "string"
  15708. },
  15709. "text": {
  15710. "type": "string"
  15711. },
  15712. "include": {
  15713. "type": "string"
  15714. }
  15715. },
  15716. "required": ["timestamp", "sessionID", "text"],
  15717. "additionalProperties": false
  15718. }
  15719. },
  15720. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15721. "additionalProperties": false
  15722. },
  15723. "EventServerInstanceDisposed": {
  15724. "type": "object",
  15725. "properties": {
  15726. "id": {
  15727. "type": "string"
  15728. },
  15729. "type": {
  15730. "type": "string",
  15731. "enum": ["server.instance.disposed"]
  15732. },
  15733. "properties": {
  15734. "type": "object",
  15735. "properties": {
  15736. "directory": {
  15737. "type": "string"
  15738. }
  15739. },
  15740. "required": ["directory"],
  15741. "additionalProperties": false
  15742. }
  15743. },
  15744. "required": ["id", "type", "properties"],
  15745. "additionalProperties": false
  15746. },
  15747. "EventFileEdited": {
  15748. "type": "object",
  15749. "properties": {
  15750. "id": {
  15751. "type": "string"
  15752. },
  15753. "type": {
  15754. "type": "string",
  15755. "enum": ["file.edited"]
  15756. },
  15757. "properties": {
  15758. "type": "object",
  15759. "properties": {
  15760. "file": {
  15761. "type": "string"
  15762. }
  15763. },
  15764. "required": ["file"],
  15765. "additionalProperties": false
  15766. }
  15767. },
  15768. "required": ["id", "type", "properties"],
  15769. "additionalProperties": false
  15770. },
  15771. "EventFileWatcherUpdated": {
  15772. "type": "object",
  15773. "properties": {
  15774. "id": {
  15775. "type": "string"
  15776. },
  15777. "type": {
  15778. "type": "string",
  15779. "enum": ["file.watcher.updated"]
  15780. },
  15781. "properties": {
  15782. "type": "object",
  15783. "properties": {
  15784. "file": {
  15785. "type": "string"
  15786. },
  15787. "event": {
  15788. "type": "string",
  15789. "enum": ["add", "change", "unlink"]
  15790. }
  15791. },
  15792. "required": ["file", "event"],
  15793. "additionalProperties": false
  15794. }
  15795. },
  15796. "required": ["id", "type", "properties"],
  15797. "additionalProperties": false
  15798. },
  15799. "EventLspClientDiagnostics": {
  15800. "type": "object",
  15801. "properties": {
  15802. "id": {
  15803. "type": "string"
  15804. },
  15805. "type": {
  15806. "type": "string",
  15807. "enum": ["lsp.client.diagnostics"]
  15808. },
  15809. "properties": {
  15810. "type": "object",
  15811. "properties": {
  15812. "serverID": {
  15813. "type": "string"
  15814. },
  15815. "path": {
  15816. "type": "string"
  15817. }
  15818. },
  15819. "required": ["serverID", "path"],
  15820. "additionalProperties": false
  15821. }
  15822. },
  15823. "required": ["id", "type", "properties"],
  15824. "additionalProperties": false
  15825. },
  15826. "EventLspUpdated": {
  15827. "type": "object",
  15828. "properties": {
  15829. "id": {
  15830. "type": "string"
  15831. },
  15832. "type": {
  15833. "type": "string",
  15834. "enum": ["lsp.updated"]
  15835. },
  15836. "properties": {
  15837. "type": "object",
  15838. "properties": {}
  15839. }
  15840. },
  15841. "required": ["id", "type", "properties"],
  15842. "additionalProperties": false
  15843. },
  15844. "EventMessagePartDelta": {
  15845. "type": "object",
  15846. "properties": {
  15847. "id": {
  15848. "type": "string"
  15849. },
  15850. "type": {
  15851. "type": "string",
  15852. "enum": ["message.part.delta"]
  15853. },
  15854. "properties": {
  15855. "type": "object",
  15856. "properties": {
  15857. "sessionID": {
  15858. "type": "string"
  15859. },
  15860. "messageID": {
  15861. "type": "string"
  15862. },
  15863. "partID": {
  15864. "type": "string"
  15865. },
  15866. "field": {
  15867. "type": "string"
  15868. },
  15869. "delta": {
  15870. "type": "string"
  15871. }
  15872. },
  15873. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15874. "additionalProperties": false
  15875. }
  15876. },
  15877. "required": ["id", "type", "properties"],
  15878. "additionalProperties": false
  15879. },
  15880. "EventPermissionAsked": {
  15881. "type": "object",
  15882. "properties": {
  15883. "id": {
  15884. "type": "string"
  15885. },
  15886. "type": {
  15887. "type": "string",
  15888. "enum": ["permission.asked"]
  15889. },
  15890. "properties": {
  15891. "$ref": "#/components/schemas/PermissionRequest"
  15892. }
  15893. },
  15894. "required": ["id", "type", "properties"],
  15895. "additionalProperties": false
  15896. },
  15897. "EventPermissionReplied": {
  15898. "type": "object",
  15899. "properties": {
  15900. "id": {
  15901. "type": "string"
  15902. },
  15903. "type": {
  15904. "type": "string",
  15905. "enum": ["permission.replied"]
  15906. },
  15907. "properties": {
  15908. "type": "object",
  15909. "properties": {
  15910. "sessionID": {
  15911. "type": "string"
  15912. },
  15913. "requestID": {
  15914. "type": "string",
  15915. "pattern": "^per"
  15916. },
  15917. "reply": {
  15918. "type": "string",
  15919. "enum": ["once", "always", "reject"]
  15920. }
  15921. },
  15922. "required": ["sessionID", "requestID", "reply"],
  15923. "additionalProperties": false
  15924. }
  15925. },
  15926. "required": ["id", "type", "properties"],
  15927. "additionalProperties": false
  15928. },
  15929. "EventSessionDiff": {
  15930. "type": "object",
  15931. "properties": {
  15932. "id": {
  15933. "type": "string"
  15934. },
  15935. "type": {
  15936. "type": "string",
  15937. "enum": ["session.diff"]
  15938. },
  15939. "properties": {
  15940. "type": "object",
  15941. "properties": {
  15942. "sessionID": {
  15943. "type": "string"
  15944. },
  15945. "diff": {
  15946. "type": "array",
  15947. "items": {
  15948. "$ref": "#/components/schemas/SnapshotFileDiff"
  15949. }
  15950. }
  15951. },
  15952. "required": ["sessionID", "diff"],
  15953. "additionalProperties": false
  15954. }
  15955. },
  15956. "required": ["id", "type", "properties"],
  15957. "additionalProperties": false
  15958. },
  15959. "EventSessionError": {
  15960. "type": "object",
  15961. "properties": {
  15962. "id": {
  15963. "type": "string"
  15964. },
  15965. "type": {
  15966. "type": "string",
  15967. "enum": ["session.error"]
  15968. },
  15969. "properties": {
  15970. "type": "object",
  15971. "properties": {
  15972. "sessionID": {
  15973. "type": "string"
  15974. },
  15975. "error": {
  15976. "anyOf": [
  15977. {
  15978. "$ref": "#/components/schemas/ProviderAuthError"
  15979. },
  15980. {
  15981. "$ref": "#/components/schemas/UnknownError"
  15982. },
  15983. {
  15984. "$ref": "#/components/schemas/MessageOutputLengthError"
  15985. },
  15986. {
  15987. "$ref": "#/components/schemas/MessageAbortedError"
  15988. },
  15989. {
  15990. "$ref": "#/components/schemas/StructuredOutputError"
  15991. },
  15992. {
  15993. "$ref": "#/components/schemas/ContextOverflowError"
  15994. },
  15995. {
  15996. "$ref": "#/components/schemas/APIError"
  15997. }
  15998. ]
  15999. }
  16000. },
  16001. "additionalProperties": false
  16002. }
  16003. },
  16004. "required": ["id", "type", "properties"],
  16005. "additionalProperties": false
  16006. },
  16007. "EventInstallationUpdated": {
  16008. "type": "object",
  16009. "properties": {
  16010. "id": {
  16011. "type": "string"
  16012. },
  16013. "type": {
  16014. "type": "string",
  16015. "enum": ["installation.updated"]
  16016. },
  16017. "properties": {
  16018. "type": "object",
  16019. "properties": {
  16020. "version": {
  16021. "type": "string"
  16022. }
  16023. },
  16024. "required": ["version"],
  16025. "additionalProperties": false
  16026. }
  16027. },
  16028. "required": ["id", "type", "properties"],
  16029. "additionalProperties": false
  16030. },
  16031. "EventInstallationUpdate-available": {
  16032. "type": "object",
  16033. "properties": {
  16034. "id": {
  16035. "type": "string"
  16036. },
  16037. "type": {
  16038. "type": "string",
  16039. "enum": ["installation.update-available"]
  16040. },
  16041. "properties": {
  16042. "type": "object",
  16043. "properties": {
  16044. "version": {
  16045. "type": "string"
  16046. }
  16047. },
  16048. "required": ["version"],
  16049. "additionalProperties": false
  16050. }
  16051. },
  16052. "required": ["id", "type", "properties"],
  16053. "additionalProperties": false
  16054. },
  16055. "EventQuestionAsked": {
  16056. "type": "object",
  16057. "properties": {
  16058. "id": {
  16059. "type": "string"
  16060. },
  16061. "type": {
  16062. "type": "string",
  16063. "enum": ["question.asked"]
  16064. },
  16065. "properties": {
  16066. "$ref": "#/components/schemas/QuestionRequest"
  16067. }
  16068. },
  16069. "required": ["id", "type", "properties"],
  16070. "additionalProperties": false
  16071. },
  16072. "EventQuestionReplied": {
  16073. "type": "object",
  16074. "properties": {
  16075. "id": {
  16076. "type": "string"
  16077. },
  16078. "type": {
  16079. "type": "string",
  16080. "enum": ["question.replied"]
  16081. },
  16082. "properties": {
  16083. "$ref": "#/components/schemas/QuestionReplied"
  16084. }
  16085. },
  16086. "required": ["id", "type", "properties"],
  16087. "additionalProperties": false
  16088. },
  16089. "EventQuestionRejected": {
  16090. "type": "object",
  16091. "properties": {
  16092. "id": {
  16093. "type": "string"
  16094. },
  16095. "type": {
  16096. "type": "string",
  16097. "enum": ["question.rejected"]
  16098. },
  16099. "properties": {
  16100. "$ref": "#/components/schemas/QuestionRejected"
  16101. }
  16102. },
  16103. "required": ["id", "type", "properties"],
  16104. "additionalProperties": false
  16105. },
  16106. "EventTodoUpdated": {
  16107. "type": "object",
  16108. "properties": {
  16109. "id": {
  16110. "type": "string"
  16111. },
  16112. "type": {
  16113. "type": "string",
  16114. "enum": ["todo.updated"]
  16115. },
  16116. "properties": {
  16117. "type": "object",
  16118. "properties": {
  16119. "sessionID": {
  16120. "type": "string"
  16121. },
  16122. "todos": {
  16123. "type": "array",
  16124. "items": {
  16125. "$ref": "#/components/schemas/Todo"
  16126. }
  16127. }
  16128. },
  16129. "required": ["sessionID", "todos"],
  16130. "additionalProperties": false
  16131. }
  16132. },
  16133. "required": ["id", "type", "properties"],
  16134. "additionalProperties": false
  16135. },
  16136. "EventSessionStatus": {
  16137. "type": "object",
  16138. "properties": {
  16139. "id": {
  16140. "type": "string"
  16141. },
  16142. "type": {
  16143. "type": "string",
  16144. "enum": ["session.status"]
  16145. },
  16146. "properties": {
  16147. "type": "object",
  16148. "properties": {
  16149. "sessionID": {
  16150. "type": "string"
  16151. },
  16152. "status": {
  16153. "$ref": "#/components/schemas/SessionStatus"
  16154. }
  16155. },
  16156. "required": ["sessionID", "status"],
  16157. "additionalProperties": false
  16158. }
  16159. },
  16160. "required": ["id", "type", "properties"],
  16161. "additionalProperties": false
  16162. },
  16163. "EventSessionIdle": {
  16164. "type": "object",
  16165. "properties": {
  16166. "id": {
  16167. "type": "string"
  16168. },
  16169. "type": {
  16170. "type": "string",
  16171. "enum": ["session.idle"]
  16172. },
  16173. "properties": {
  16174. "type": "object",
  16175. "properties": {
  16176. "sessionID": {
  16177. "type": "string"
  16178. }
  16179. },
  16180. "required": ["sessionID"],
  16181. "additionalProperties": false
  16182. }
  16183. },
  16184. "required": ["id", "type", "properties"],
  16185. "additionalProperties": false
  16186. },
  16187. "EventSessionCompacted": {
  16188. "type": "object",
  16189. "properties": {
  16190. "id": {
  16191. "type": "string"
  16192. },
  16193. "type": {
  16194. "type": "string",
  16195. "enum": ["session.compacted"]
  16196. },
  16197. "properties": {
  16198. "type": "object",
  16199. "properties": {
  16200. "sessionID": {
  16201. "type": "string"
  16202. }
  16203. },
  16204. "required": ["sessionID"],
  16205. "additionalProperties": false
  16206. }
  16207. },
  16208. "required": ["id", "type", "properties"],
  16209. "additionalProperties": false
  16210. },
  16211. "EventMcpToolsChanged": {
  16212. "type": "object",
  16213. "properties": {
  16214. "id": {
  16215. "type": "string"
  16216. },
  16217. "type": {
  16218. "type": "string",
  16219. "enum": ["mcp.tools.changed"]
  16220. },
  16221. "properties": {
  16222. "type": "object",
  16223. "properties": {
  16224. "server": {
  16225. "type": "string"
  16226. }
  16227. },
  16228. "required": ["server"],
  16229. "additionalProperties": false
  16230. }
  16231. },
  16232. "required": ["id", "type", "properties"],
  16233. "additionalProperties": false
  16234. },
  16235. "EventMcpBrowserOpenFailed": {
  16236. "type": "object",
  16237. "properties": {
  16238. "id": {
  16239. "type": "string"
  16240. },
  16241. "type": {
  16242. "type": "string",
  16243. "enum": ["mcp.browser.open.failed"]
  16244. },
  16245. "properties": {
  16246. "type": "object",
  16247. "properties": {
  16248. "mcpName": {
  16249. "type": "string"
  16250. },
  16251. "url": {
  16252. "type": "string"
  16253. }
  16254. },
  16255. "required": ["mcpName", "url"],
  16256. "additionalProperties": false
  16257. }
  16258. },
  16259. "required": ["id", "type", "properties"],
  16260. "additionalProperties": false
  16261. },
  16262. "EventCommandExecuted": {
  16263. "type": "object",
  16264. "properties": {
  16265. "id": {
  16266. "type": "string"
  16267. },
  16268. "type": {
  16269. "type": "string",
  16270. "enum": ["command.executed"]
  16271. },
  16272. "properties": {
  16273. "type": "object",
  16274. "properties": {
  16275. "name": {
  16276. "type": "string"
  16277. },
  16278. "sessionID": {
  16279. "type": "string"
  16280. },
  16281. "arguments": {
  16282. "type": "string"
  16283. },
  16284. "messageID": {
  16285. "type": "string"
  16286. }
  16287. },
  16288. "required": ["name", "sessionID", "arguments", "messageID"],
  16289. "additionalProperties": false
  16290. }
  16291. },
  16292. "required": ["id", "type", "properties"],
  16293. "additionalProperties": false
  16294. },
  16295. "EventProjectUpdated": {
  16296. "type": "object",
  16297. "properties": {
  16298. "id": {
  16299. "type": "string"
  16300. },
  16301. "type": {
  16302. "type": "string",
  16303. "enum": ["project.updated"]
  16304. },
  16305. "properties": {
  16306. "$ref": "#/components/schemas/Project"
  16307. }
  16308. },
  16309. "required": ["id", "type", "properties"],
  16310. "additionalProperties": false
  16311. },
  16312. "EventVcsBranchUpdated": {
  16313. "type": "object",
  16314. "properties": {
  16315. "id": {
  16316. "type": "string"
  16317. },
  16318. "type": {
  16319. "type": "string",
  16320. "enum": ["vcs.branch.updated"]
  16321. },
  16322. "properties": {
  16323. "type": "object",
  16324. "properties": {
  16325. "branch": {
  16326. "type": "string"
  16327. }
  16328. },
  16329. "additionalProperties": false
  16330. }
  16331. },
  16332. "required": ["id", "type", "properties"],
  16333. "additionalProperties": false
  16334. },
  16335. "EventWorkspaceReady": {
  16336. "type": "object",
  16337. "properties": {
  16338. "id": {
  16339. "type": "string"
  16340. },
  16341. "type": {
  16342. "type": "string",
  16343. "enum": ["workspace.ready"]
  16344. },
  16345. "properties": {
  16346. "type": "object",
  16347. "properties": {
  16348. "name": {
  16349. "type": "string"
  16350. }
  16351. },
  16352. "required": ["name"],
  16353. "additionalProperties": false
  16354. }
  16355. },
  16356. "required": ["id", "type", "properties"],
  16357. "additionalProperties": false
  16358. },
  16359. "EventWorkspaceFailed": {
  16360. "type": "object",
  16361. "properties": {
  16362. "id": {
  16363. "type": "string"
  16364. },
  16365. "type": {
  16366. "type": "string",
  16367. "enum": ["workspace.failed"]
  16368. },
  16369. "properties": {
  16370. "type": "object",
  16371. "properties": {
  16372. "message": {
  16373. "type": "string"
  16374. }
  16375. },
  16376. "required": ["message"],
  16377. "additionalProperties": false
  16378. }
  16379. },
  16380. "required": ["id", "type", "properties"],
  16381. "additionalProperties": false
  16382. },
  16383. "EventWorkspaceStatus": {
  16384. "type": "object",
  16385. "properties": {
  16386. "id": {
  16387. "type": "string"
  16388. },
  16389. "type": {
  16390. "type": "string",
  16391. "enum": ["workspace.status"]
  16392. },
  16393. "properties": {
  16394. "type": "object",
  16395. "properties": {
  16396. "workspaceID": {
  16397. "type": "string"
  16398. },
  16399. "status": {
  16400. "type": "string",
  16401. "enum": ["connected", "connecting", "disconnected", "error"]
  16402. }
  16403. },
  16404. "required": ["workspaceID", "status"],
  16405. "additionalProperties": false
  16406. }
  16407. },
  16408. "required": ["id", "type", "properties"],
  16409. "additionalProperties": false
  16410. },
  16411. "EventWorktreeReady": {
  16412. "type": "object",
  16413. "properties": {
  16414. "id": {
  16415. "type": "string"
  16416. },
  16417. "type": {
  16418. "type": "string",
  16419. "enum": ["worktree.ready"]
  16420. },
  16421. "properties": {
  16422. "type": "object",
  16423. "properties": {
  16424. "name": {
  16425. "type": "string"
  16426. },
  16427. "branch": {
  16428. "type": "string"
  16429. }
  16430. },
  16431. "required": ["name", "branch"],
  16432. "additionalProperties": false
  16433. }
  16434. },
  16435. "required": ["id", "type", "properties"],
  16436. "additionalProperties": false
  16437. },
  16438. "EventWorktreeFailed": {
  16439. "type": "object",
  16440. "properties": {
  16441. "id": {
  16442. "type": "string"
  16443. },
  16444. "type": {
  16445. "type": "string",
  16446. "enum": ["worktree.failed"]
  16447. },
  16448. "properties": {
  16449. "type": "object",
  16450. "properties": {
  16451. "message": {
  16452. "type": "string"
  16453. }
  16454. },
  16455. "required": ["message"],
  16456. "additionalProperties": false
  16457. }
  16458. },
  16459. "required": ["id", "type", "properties"],
  16460. "additionalProperties": false
  16461. },
  16462. "EventPtyCreated": {
  16463. "type": "object",
  16464. "properties": {
  16465. "id": {
  16466. "type": "string"
  16467. },
  16468. "type": {
  16469. "type": "string",
  16470. "enum": ["pty.created"]
  16471. },
  16472. "properties": {
  16473. "type": "object",
  16474. "properties": {
  16475. "info": {
  16476. "$ref": "#/components/schemas/Pty"
  16477. }
  16478. },
  16479. "required": ["info"],
  16480. "additionalProperties": false
  16481. }
  16482. },
  16483. "required": ["id", "type", "properties"],
  16484. "additionalProperties": false
  16485. },
  16486. "EventPtyUpdated": {
  16487. "type": "object",
  16488. "properties": {
  16489. "id": {
  16490. "type": "string"
  16491. },
  16492. "type": {
  16493. "type": "string",
  16494. "enum": ["pty.updated"]
  16495. },
  16496. "properties": {
  16497. "type": "object",
  16498. "properties": {
  16499. "info": {
  16500. "$ref": "#/components/schemas/Pty"
  16501. }
  16502. },
  16503. "required": ["info"],
  16504. "additionalProperties": false
  16505. }
  16506. },
  16507. "required": ["id", "type", "properties"],
  16508. "additionalProperties": false
  16509. },
  16510. "EventPtyExited": {
  16511. "type": "object",
  16512. "properties": {
  16513. "id": {
  16514. "type": "string"
  16515. },
  16516. "type": {
  16517. "type": "string",
  16518. "enum": ["pty.exited"]
  16519. },
  16520. "properties": {
  16521. "type": "object",
  16522. "properties": {
  16523. "id": {
  16524. "type": "string"
  16525. },
  16526. "exitCode": {
  16527. "type": "integer",
  16528. "minimum": 0
  16529. }
  16530. },
  16531. "required": ["id", "exitCode"],
  16532. "additionalProperties": false
  16533. }
  16534. },
  16535. "required": ["id", "type", "properties"],
  16536. "additionalProperties": false
  16537. },
  16538. "EventPtyDeleted": {
  16539. "type": "object",
  16540. "properties": {
  16541. "id": {
  16542. "type": "string"
  16543. },
  16544. "type": {
  16545. "type": "string",
  16546. "enum": ["pty.deleted"]
  16547. },
  16548. "properties": {
  16549. "type": "object",
  16550. "properties": {
  16551. "id": {
  16552. "type": "string"
  16553. }
  16554. },
  16555. "required": ["id"],
  16556. "additionalProperties": false
  16557. }
  16558. },
  16559. "required": ["id", "type", "properties"],
  16560. "additionalProperties": false
  16561. },
  16562. "EventMessageUpdated": {
  16563. "type": "object",
  16564. "properties": {
  16565. "id": {
  16566. "type": "string"
  16567. },
  16568. "type": {
  16569. "type": "string",
  16570. "enum": ["message.updated"]
  16571. },
  16572. "properties": {
  16573. "type": "object",
  16574. "properties": {
  16575. "sessionID": {
  16576. "type": "string"
  16577. },
  16578. "info": {
  16579. "$ref": "#/components/schemas/Message"
  16580. }
  16581. },
  16582. "required": ["sessionID", "info"],
  16583. "additionalProperties": false
  16584. }
  16585. },
  16586. "required": ["id", "type", "properties"],
  16587. "additionalProperties": false
  16588. },
  16589. "EventMessageRemoved": {
  16590. "type": "object",
  16591. "properties": {
  16592. "id": {
  16593. "type": "string"
  16594. },
  16595. "type": {
  16596. "type": "string",
  16597. "enum": ["message.removed"]
  16598. },
  16599. "properties": {
  16600. "type": "object",
  16601. "properties": {
  16602. "sessionID": {
  16603. "type": "string"
  16604. },
  16605. "messageID": {
  16606. "type": "string"
  16607. }
  16608. },
  16609. "required": ["sessionID", "messageID"],
  16610. "additionalProperties": false
  16611. }
  16612. },
  16613. "required": ["id", "type", "properties"],
  16614. "additionalProperties": false
  16615. },
  16616. "EventMessagePartUpdated": {
  16617. "type": "object",
  16618. "properties": {
  16619. "id": {
  16620. "type": "string"
  16621. },
  16622. "type": {
  16623. "type": "string",
  16624. "enum": ["message.part.updated"]
  16625. },
  16626. "properties": {
  16627. "type": "object",
  16628. "properties": {
  16629. "sessionID": {
  16630. "type": "string"
  16631. },
  16632. "part": {
  16633. "$ref": "#/components/schemas/Part"
  16634. },
  16635. "time": {
  16636. "type": "integer",
  16637. "minimum": 0
  16638. }
  16639. },
  16640. "required": ["sessionID", "part", "time"],
  16641. "additionalProperties": false
  16642. }
  16643. },
  16644. "required": ["id", "type", "properties"],
  16645. "additionalProperties": false
  16646. },
  16647. "EventMessagePartRemoved": {
  16648. "type": "object",
  16649. "properties": {
  16650. "id": {
  16651. "type": "string"
  16652. },
  16653. "type": {
  16654. "type": "string",
  16655. "enum": ["message.part.removed"]
  16656. },
  16657. "properties": {
  16658. "type": "object",
  16659. "properties": {
  16660. "sessionID": {
  16661. "type": "string"
  16662. },
  16663. "messageID": {
  16664. "type": "string"
  16665. },
  16666. "partID": {
  16667. "type": "string"
  16668. }
  16669. },
  16670. "required": ["sessionID", "messageID", "partID"],
  16671. "additionalProperties": false
  16672. }
  16673. },
  16674. "required": ["id", "type", "properties"],
  16675. "additionalProperties": false
  16676. },
  16677. "EventSessionCreated": {
  16678. "type": "object",
  16679. "properties": {
  16680. "id": {
  16681. "type": "string"
  16682. },
  16683. "type": {
  16684. "type": "string",
  16685. "enum": ["session.created"]
  16686. },
  16687. "properties": {
  16688. "type": "object",
  16689. "properties": {
  16690. "sessionID": {
  16691. "type": "string"
  16692. },
  16693. "info": {
  16694. "$ref": "#/components/schemas/Session"
  16695. }
  16696. },
  16697. "required": ["sessionID", "info"],
  16698. "additionalProperties": false
  16699. }
  16700. },
  16701. "required": ["id", "type", "properties"],
  16702. "additionalProperties": false
  16703. },
  16704. "EventSessionUpdated": {
  16705. "type": "object",
  16706. "properties": {
  16707. "id": {
  16708. "type": "string"
  16709. },
  16710. "type": {
  16711. "type": "string",
  16712. "enum": ["session.updated"]
  16713. },
  16714. "properties": {
  16715. "type": "object",
  16716. "properties": {
  16717. "sessionID": {
  16718. "type": "string"
  16719. },
  16720. "info": {
  16721. "$ref": "#/components/schemas/Session"
  16722. }
  16723. },
  16724. "required": ["sessionID", "info"],
  16725. "additionalProperties": false
  16726. }
  16727. },
  16728. "required": ["id", "type", "properties"],
  16729. "additionalProperties": false
  16730. },
  16731. "EventSessionDeleted": {
  16732. "type": "object",
  16733. "properties": {
  16734. "id": {
  16735. "type": "string"
  16736. },
  16737. "type": {
  16738. "type": "string",
  16739. "enum": ["session.deleted"]
  16740. },
  16741. "properties": {
  16742. "type": "object",
  16743. "properties": {
  16744. "sessionID": {
  16745. "type": "string"
  16746. },
  16747. "info": {
  16748. "$ref": "#/components/schemas/Session"
  16749. }
  16750. },
  16751. "required": ["sessionID", "info"],
  16752. "additionalProperties": false
  16753. }
  16754. },
  16755. "required": ["id", "type", "properties"],
  16756. "additionalProperties": false
  16757. },
  16758. "EventSessionNextAgentSwitched": {
  16759. "type": "object",
  16760. "properties": {
  16761. "id": {
  16762. "type": "string"
  16763. },
  16764. "type": {
  16765. "type": "string",
  16766. "enum": ["session.next.agent.switched"]
  16767. },
  16768. "properties": {
  16769. "type": "object",
  16770. "properties": {
  16771. "timestamp": {
  16772. "type": "number"
  16773. },
  16774. "sessionID": {
  16775. "type": "string"
  16776. },
  16777. "agent": {
  16778. "type": "string"
  16779. }
  16780. },
  16781. "required": ["timestamp", "sessionID", "agent"],
  16782. "additionalProperties": false
  16783. }
  16784. },
  16785. "required": ["id", "type", "properties"],
  16786. "additionalProperties": false
  16787. },
  16788. "EventSessionNextModelSwitched": {
  16789. "type": "object",
  16790. "properties": {
  16791. "id": {
  16792. "type": "string"
  16793. },
  16794. "type": {
  16795. "type": "string",
  16796. "enum": ["session.next.model.switched"]
  16797. },
  16798. "properties": {
  16799. "type": "object",
  16800. "properties": {
  16801. "timestamp": {
  16802. "type": "number"
  16803. },
  16804. "sessionID": {
  16805. "type": "string"
  16806. },
  16807. "model": {
  16808. "type": "object",
  16809. "properties": {
  16810. "id": {
  16811. "type": "string"
  16812. },
  16813. "providerID": {
  16814. "type": "string"
  16815. },
  16816. "variant": {
  16817. "type": "string"
  16818. }
  16819. },
  16820. "required": ["id", "providerID", "variant"],
  16821. "additionalProperties": false
  16822. }
  16823. },
  16824. "required": ["timestamp", "sessionID", "model"],
  16825. "additionalProperties": false
  16826. }
  16827. },
  16828. "required": ["id", "type", "properties"],
  16829. "additionalProperties": false
  16830. },
  16831. "PromptSource": {
  16832. "type": "object",
  16833. "properties": {
  16834. "start": {
  16835. "type": "number"
  16836. },
  16837. "end": {
  16838. "type": "number"
  16839. },
  16840. "text": {
  16841. "type": "string"
  16842. }
  16843. },
  16844. "required": ["start", "end", "text"],
  16845. "additionalProperties": false
  16846. },
  16847. "PromptFileAttachment": {
  16848. "type": "object",
  16849. "properties": {
  16850. "uri": {
  16851. "type": "string"
  16852. },
  16853. "mime": {
  16854. "type": "string"
  16855. },
  16856. "name": {
  16857. "type": "string"
  16858. },
  16859. "description": {
  16860. "type": "string"
  16861. },
  16862. "source": {
  16863. "$ref": "#/components/schemas/PromptSource"
  16864. }
  16865. },
  16866. "required": ["uri", "mime"],
  16867. "additionalProperties": false
  16868. },
  16869. "PromptAgentAttachment": {
  16870. "type": "object",
  16871. "properties": {
  16872. "name": {
  16873. "type": "string"
  16874. },
  16875. "source": {
  16876. "$ref": "#/components/schemas/PromptSource"
  16877. }
  16878. },
  16879. "required": ["name"],
  16880. "additionalProperties": false
  16881. },
  16882. "EventSessionNextPrompted": {
  16883. "type": "object",
  16884. "properties": {
  16885. "id": {
  16886. "type": "string"
  16887. },
  16888. "type": {
  16889. "type": "string",
  16890. "enum": ["session.next.prompted"]
  16891. },
  16892. "properties": {
  16893. "type": "object",
  16894. "properties": {
  16895. "timestamp": {
  16896. "type": "number"
  16897. },
  16898. "sessionID": {
  16899. "type": "string"
  16900. },
  16901. "prompt": {
  16902. "$ref": "#/components/schemas/Prompt"
  16903. }
  16904. },
  16905. "required": ["timestamp", "sessionID", "prompt"],
  16906. "additionalProperties": false
  16907. }
  16908. },
  16909. "required": ["id", "type", "properties"],
  16910. "additionalProperties": false
  16911. },
  16912. "EventSessionNextSynthetic": {
  16913. "type": "object",
  16914. "properties": {
  16915. "id": {
  16916. "type": "string"
  16917. },
  16918. "type": {
  16919. "type": "string",
  16920. "enum": ["session.next.synthetic"]
  16921. },
  16922. "properties": {
  16923. "type": "object",
  16924. "properties": {
  16925. "timestamp": {
  16926. "type": "number"
  16927. },
  16928. "sessionID": {
  16929. "type": "string"
  16930. },
  16931. "text": {
  16932. "type": "string"
  16933. }
  16934. },
  16935. "required": ["timestamp", "sessionID", "text"],
  16936. "additionalProperties": false
  16937. }
  16938. },
  16939. "required": ["id", "type", "properties"],
  16940. "additionalProperties": false
  16941. },
  16942. "EventSessionNextShellStarted": {
  16943. "type": "object",
  16944. "properties": {
  16945. "id": {
  16946. "type": "string"
  16947. },
  16948. "type": {
  16949. "type": "string",
  16950. "enum": ["session.next.shell.started"]
  16951. },
  16952. "properties": {
  16953. "type": "object",
  16954. "properties": {
  16955. "timestamp": {
  16956. "type": "number"
  16957. },
  16958. "sessionID": {
  16959. "type": "string"
  16960. },
  16961. "callID": {
  16962. "type": "string"
  16963. },
  16964. "command": {
  16965. "type": "string"
  16966. }
  16967. },
  16968. "required": ["timestamp", "sessionID", "callID", "command"],
  16969. "additionalProperties": false
  16970. }
  16971. },
  16972. "required": ["id", "type", "properties"],
  16973. "additionalProperties": false
  16974. },
  16975. "EventSessionNextShellEnded": {
  16976. "type": "object",
  16977. "properties": {
  16978. "id": {
  16979. "type": "string"
  16980. },
  16981. "type": {
  16982. "type": "string",
  16983. "enum": ["session.next.shell.ended"]
  16984. },
  16985. "properties": {
  16986. "type": "object",
  16987. "properties": {
  16988. "timestamp": {
  16989. "type": "number"
  16990. },
  16991. "sessionID": {
  16992. "type": "string"
  16993. },
  16994. "callID": {
  16995. "type": "string"
  16996. },
  16997. "output": {
  16998. "type": "string"
  16999. }
  17000. },
  17001. "required": ["timestamp", "sessionID", "callID", "output"],
  17002. "additionalProperties": false
  17003. }
  17004. },
  17005. "required": ["id", "type", "properties"],
  17006. "additionalProperties": false
  17007. },
  17008. "EventSessionNextStepStarted": {
  17009. "type": "object",
  17010. "properties": {
  17011. "id": {
  17012. "type": "string"
  17013. },
  17014. "type": {
  17015. "type": "string",
  17016. "enum": ["session.next.step.started"]
  17017. },
  17018. "properties": {
  17019. "type": "object",
  17020. "properties": {
  17021. "timestamp": {
  17022. "type": "number"
  17023. },
  17024. "sessionID": {
  17025. "type": "string"
  17026. },
  17027. "agent": {
  17028. "type": "string"
  17029. },
  17030. "model": {
  17031. "type": "object",
  17032. "properties": {
  17033. "id": {
  17034. "type": "string"
  17035. },
  17036. "providerID": {
  17037. "type": "string"
  17038. },
  17039. "variant": {
  17040. "type": "string"
  17041. }
  17042. },
  17043. "required": ["id", "providerID", "variant"],
  17044. "additionalProperties": false
  17045. },
  17046. "snapshot": {
  17047. "type": "string"
  17048. }
  17049. },
  17050. "required": ["timestamp", "sessionID", "agent", "model"],
  17051. "additionalProperties": false
  17052. }
  17053. },
  17054. "required": ["id", "type", "properties"],
  17055. "additionalProperties": false
  17056. },
  17057. "EventSessionNextStepEnded": {
  17058. "type": "object",
  17059. "properties": {
  17060. "id": {
  17061. "type": "string"
  17062. },
  17063. "type": {
  17064. "type": "string",
  17065. "enum": ["session.next.step.ended"]
  17066. },
  17067. "properties": {
  17068. "type": "object",
  17069. "properties": {
  17070. "timestamp": {
  17071. "type": "number"
  17072. },
  17073. "sessionID": {
  17074. "type": "string"
  17075. },
  17076. "finish": {
  17077. "type": "string"
  17078. },
  17079. "cost": {
  17080. "type": "number"
  17081. },
  17082. "tokens": {
  17083. "type": "object",
  17084. "properties": {
  17085. "input": {
  17086. "type": "integer",
  17087. "minimum": 0
  17088. },
  17089. "output": {
  17090. "type": "integer",
  17091. "minimum": 0
  17092. },
  17093. "reasoning": {
  17094. "type": "integer",
  17095. "minimum": 0
  17096. },
  17097. "cache": {
  17098. "type": "object",
  17099. "properties": {
  17100. "read": {
  17101. "type": "integer",
  17102. "minimum": 0
  17103. },
  17104. "write": {
  17105. "type": "integer",
  17106. "minimum": 0
  17107. }
  17108. },
  17109. "required": ["read", "write"],
  17110. "additionalProperties": false
  17111. }
  17112. },
  17113. "required": ["input", "output", "reasoning", "cache"],
  17114. "additionalProperties": false
  17115. },
  17116. "snapshot": {
  17117. "type": "string"
  17118. }
  17119. },
  17120. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17121. "additionalProperties": false
  17122. }
  17123. },
  17124. "required": ["id", "type", "properties"],
  17125. "additionalProperties": false
  17126. },
  17127. "SessionErrorUnknown": {
  17128. "type": "object",
  17129. "properties": {
  17130. "type": {
  17131. "type": "string",
  17132. "enum": ["unknown"]
  17133. },
  17134. "message": {
  17135. "type": "string"
  17136. }
  17137. },
  17138. "required": ["type", "message"],
  17139. "additionalProperties": false
  17140. },
  17141. "EventSessionNextStepFailed": {
  17142. "type": "object",
  17143. "properties": {
  17144. "id": {
  17145. "type": "string"
  17146. },
  17147. "type": {
  17148. "type": "string",
  17149. "enum": ["session.next.step.failed"]
  17150. },
  17151. "properties": {
  17152. "type": "object",
  17153. "properties": {
  17154. "timestamp": {
  17155. "type": "number"
  17156. },
  17157. "sessionID": {
  17158. "type": "string"
  17159. },
  17160. "error": {
  17161. "$ref": "#/components/schemas/SessionErrorUnknown"
  17162. }
  17163. },
  17164. "required": ["timestamp", "sessionID", "error"],
  17165. "additionalProperties": false
  17166. }
  17167. },
  17168. "required": ["id", "type", "properties"],
  17169. "additionalProperties": false
  17170. },
  17171. "EventSessionNextTextStarted": {
  17172. "type": "object",
  17173. "properties": {
  17174. "id": {
  17175. "type": "string"
  17176. },
  17177. "type": {
  17178. "type": "string",
  17179. "enum": ["session.next.text.started"]
  17180. },
  17181. "properties": {
  17182. "type": "object",
  17183. "properties": {
  17184. "timestamp": {
  17185. "type": "number"
  17186. },
  17187. "sessionID": {
  17188. "type": "string"
  17189. }
  17190. },
  17191. "required": ["timestamp", "sessionID"],
  17192. "additionalProperties": false
  17193. }
  17194. },
  17195. "required": ["id", "type", "properties"],
  17196. "additionalProperties": false
  17197. },
  17198. "EventSessionNextTextDelta": {
  17199. "type": "object",
  17200. "properties": {
  17201. "id": {
  17202. "type": "string"
  17203. },
  17204. "type": {
  17205. "type": "string",
  17206. "enum": ["session.next.text.delta"]
  17207. },
  17208. "properties": {
  17209. "type": "object",
  17210. "properties": {
  17211. "timestamp": {
  17212. "type": "number"
  17213. },
  17214. "sessionID": {
  17215. "type": "string"
  17216. },
  17217. "delta": {
  17218. "type": "string"
  17219. }
  17220. },
  17221. "required": ["timestamp", "sessionID", "delta"],
  17222. "additionalProperties": false
  17223. }
  17224. },
  17225. "required": ["id", "type", "properties"],
  17226. "additionalProperties": false
  17227. },
  17228. "EventSessionNextTextEnded": {
  17229. "type": "object",
  17230. "properties": {
  17231. "id": {
  17232. "type": "string"
  17233. },
  17234. "type": {
  17235. "type": "string",
  17236. "enum": ["session.next.text.ended"]
  17237. },
  17238. "properties": {
  17239. "type": "object",
  17240. "properties": {
  17241. "timestamp": {
  17242. "type": "number"
  17243. },
  17244. "sessionID": {
  17245. "type": "string"
  17246. },
  17247. "text": {
  17248. "type": "string"
  17249. }
  17250. },
  17251. "required": ["timestamp", "sessionID", "text"],
  17252. "additionalProperties": false
  17253. }
  17254. },
  17255. "required": ["id", "type", "properties"],
  17256. "additionalProperties": false
  17257. },
  17258. "EventSessionNextReasoningStarted": {
  17259. "type": "object",
  17260. "properties": {
  17261. "id": {
  17262. "type": "string"
  17263. },
  17264. "type": {
  17265. "type": "string",
  17266. "enum": ["session.next.reasoning.started"]
  17267. },
  17268. "properties": {
  17269. "type": "object",
  17270. "properties": {
  17271. "timestamp": {
  17272. "type": "number"
  17273. },
  17274. "sessionID": {
  17275. "type": "string"
  17276. },
  17277. "reasoningID": {
  17278. "type": "string"
  17279. }
  17280. },
  17281. "required": ["timestamp", "sessionID", "reasoningID"],
  17282. "additionalProperties": false
  17283. }
  17284. },
  17285. "required": ["id", "type", "properties"],
  17286. "additionalProperties": false
  17287. },
  17288. "EventSessionNextReasoningDelta": {
  17289. "type": "object",
  17290. "properties": {
  17291. "id": {
  17292. "type": "string"
  17293. },
  17294. "type": {
  17295. "type": "string",
  17296. "enum": ["session.next.reasoning.delta"]
  17297. },
  17298. "properties": {
  17299. "type": "object",
  17300. "properties": {
  17301. "timestamp": {
  17302. "type": "number"
  17303. },
  17304. "sessionID": {
  17305. "type": "string"
  17306. },
  17307. "reasoningID": {
  17308. "type": "string"
  17309. },
  17310. "delta": {
  17311. "type": "string"
  17312. }
  17313. },
  17314. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17315. "additionalProperties": false
  17316. }
  17317. },
  17318. "required": ["id", "type", "properties"],
  17319. "additionalProperties": false
  17320. },
  17321. "EventSessionNextReasoningEnded": {
  17322. "type": "object",
  17323. "properties": {
  17324. "id": {
  17325. "type": "string"
  17326. },
  17327. "type": {
  17328. "type": "string",
  17329. "enum": ["session.next.reasoning.ended"]
  17330. },
  17331. "properties": {
  17332. "type": "object",
  17333. "properties": {
  17334. "timestamp": {
  17335. "type": "number"
  17336. },
  17337. "sessionID": {
  17338. "type": "string"
  17339. },
  17340. "reasoningID": {
  17341. "type": "string"
  17342. },
  17343. "text": {
  17344. "type": "string"
  17345. }
  17346. },
  17347. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17348. "additionalProperties": false
  17349. }
  17350. },
  17351. "required": ["id", "type", "properties"],
  17352. "additionalProperties": false
  17353. },
  17354. "EventSessionNextToolInputStarted": {
  17355. "type": "object",
  17356. "properties": {
  17357. "id": {
  17358. "type": "string"
  17359. },
  17360. "type": {
  17361. "type": "string",
  17362. "enum": ["session.next.tool.input.started"]
  17363. },
  17364. "properties": {
  17365. "type": "object",
  17366. "properties": {
  17367. "timestamp": {
  17368. "type": "number"
  17369. },
  17370. "sessionID": {
  17371. "type": "string"
  17372. },
  17373. "callID": {
  17374. "type": "string"
  17375. },
  17376. "name": {
  17377. "type": "string"
  17378. }
  17379. },
  17380. "required": ["timestamp", "sessionID", "callID", "name"],
  17381. "additionalProperties": false
  17382. }
  17383. },
  17384. "required": ["id", "type", "properties"],
  17385. "additionalProperties": false
  17386. },
  17387. "EventSessionNextToolInputDelta": {
  17388. "type": "object",
  17389. "properties": {
  17390. "id": {
  17391. "type": "string"
  17392. },
  17393. "type": {
  17394. "type": "string",
  17395. "enum": ["session.next.tool.input.delta"]
  17396. },
  17397. "properties": {
  17398. "type": "object",
  17399. "properties": {
  17400. "timestamp": {
  17401. "type": "number"
  17402. },
  17403. "sessionID": {
  17404. "type": "string"
  17405. },
  17406. "callID": {
  17407. "type": "string"
  17408. },
  17409. "delta": {
  17410. "type": "string"
  17411. }
  17412. },
  17413. "required": ["timestamp", "sessionID", "callID", "delta"],
  17414. "additionalProperties": false
  17415. }
  17416. },
  17417. "required": ["id", "type", "properties"],
  17418. "additionalProperties": false
  17419. },
  17420. "EventSessionNextToolInputEnded": {
  17421. "type": "object",
  17422. "properties": {
  17423. "id": {
  17424. "type": "string"
  17425. },
  17426. "type": {
  17427. "type": "string",
  17428. "enum": ["session.next.tool.input.ended"]
  17429. },
  17430. "properties": {
  17431. "type": "object",
  17432. "properties": {
  17433. "timestamp": {
  17434. "type": "number"
  17435. },
  17436. "sessionID": {
  17437. "type": "string"
  17438. },
  17439. "callID": {
  17440. "type": "string"
  17441. },
  17442. "text": {
  17443. "type": "string"
  17444. }
  17445. },
  17446. "required": ["timestamp", "sessionID", "callID", "text"],
  17447. "additionalProperties": false
  17448. }
  17449. },
  17450. "required": ["id", "type", "properties"],
  17451. "additionalProperties": false
  17452. },
  17453. "EventSessionNextToolCalled": {
  17454. "type": "object",
  17455. "properties": {
  17456. "id": {
  17457. "type": "string"
  17458. },
  17459. "type": {
  17460. "type": "string",
  17461. "enum": ["session.next.tool.called"]
  17462. },
  17463. "properties": {
  17464. "type": "object",
  17465. "properties": {
  17466. "timestamp": {
  17467. "type": "number"
  17468. },
  17469. "sessionID": {
  17470. "type": "string"
  17471. },
  17472. "callID": {
  17473. "type": "string"
  17474. },
  17475. "tool": {
  17476. "type": "string"
  17477. },
  17478. "input": {
  17479. "type": "object"
  17480. },
  17481. "provider": {
  17482. "type": "object",
  17483. "properties": {
  17484. "executed": {
  17485. "type": "boolean"
  17486. },
  17487. "metadata": {
  17488. "type": "object"
  17489. }
  17490. },
  17491. "required": ["executed"],
  17492. "additionalProperties": false
  17493. }
  17494. },
  17495. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17496. "additionalProperties": false
  17497. }
  17498. },
  17499. "required": ["id", "type", "properties"],
  17500. "additionalProperties": false
  17501. },
  17502. "ToolTextContent": {
  17503. "type": "object",
  17504. "properties": {
  17505. "type": {
  17506. "type": "string",
  17507. "enum": ["text"]
  17508. },
  17509. "text": {
  17510. "type": "string"
  17511. }
  17512. },
  17513. "required": ["type", "text"],
  17514. "additionalProperties": false
  17515. },
  17516. "ToolFileContent": {
  17517. "type": "object",
  17518. "properties": {
  17519. "type": {
  17520. "type": "string",
  17521. "enum": ["file"]
  17522. },
  17523. "uri": {
  17524. "type": "string"
  17525. },
  17526. "mime": {
  17527. "type": "string"
  17528. },
  17529. "name": {
  17530. "type": "string"
  17531. }
  17532. },
  17533. "required": ["type", "uri", "mime"],
  17534. "additionalProperties": false
  17535. },
  17536. "EventSessionNextToolProgress": {
  17537. "type": "object",
  17538. "properties": {
  17539. "id": {
  17540. "type": "string"
  17541. },
  17542. "type": {
  17543. "type": "string",
  17544. "enum": ["session.next.tool.progress"]
  17545. },
  17546. "properties": {
  17547. "type": "object",
  17548. "properties": {
  17549. "timestamp": {
  17550. "type": "number"
  17551. },
  17552. "sessionID": {
  17553. "type": "string"
  17554. },
  17555. "callID": {
  17556. "type": "string"
  17557. },
  17558. "structured": {
  17559. "type": "object"
  17560. },
  17561. "content": {
  17562. "type": "array",
  17563. "items": {
  17564. "anyOf": [
  17565. {
  17566. "$ref": "#/components/schemas/ToolTextContent"
  17567. },
  17568. {
  17569. "$ref": "#/components/schemas/ToolFileContent"
  17570. }
  17571. ]
  17572. }
  17573. }
  17574. },
  17575. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17576. "additionalProperties": false
  17577. }
  17578. },
  17579. "required": ["id", "type", "properties"],
  17580. "additionalProperties": false
  17581. },
  17582. "EventSessionNextToolSuccess": {
  17583. "type": "object",
  17584. "properties": {
  17585. "id": {
  17586. "type": "string"
  17587. },
  17588. "type": {
  17589. "type": "string",
  17590. "enum": ["session.next.tool.success"]
  17591. },
  17592. "properties": {
  17593. "type": "object",
  17594. "properties": {
  17595. "timestamp": {
  17596. "type": "number"
  17597. },
  17598. "sessionID": {
  17599. "type": "string"
  17600. },
  17601. "callID": {
  17602. "type": "string"
  17603. },
  17604. "structured": {
  17605. "type": "object"
  17606. },
  17607. "content": {
  17608. "type": "array",
  17609. "items": {
  17610. "anyOf": [
  17611. {
  17612. "$ref": "#/components/schemas/ToolTextContent"
  17613. },
  17614. {
  17615. "$ref": "#/components/schemas/ToolFileContent"
  17616. }
  17617. ]
  17618. }
  17619. },
  17620. "provider": {
  17621. "type": "object",
  17622. "properties": {
  17623. "executed": {
  17624. "type": "boolean"
  17625. },
  17626. "metadata": {
  17627. "type": "object"
  17628. }
  17629. },
  17630. "required": ["executed"],
  17631. "additionalProperties": false
  17632. }
  17633. },
  17634. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17635. "additionalProperties": false
  17636. }
  17637. },
  17638. "required": ["id", "type", "properties"],
  17639. "additionalProperties": false
  17640. },
  17641. "EventSessionNextToolFailed": {
  17642. "type": "object",
  17643. "properties": {
  17644. "id": {
  17645. "type": "string"
  17646. },
  17647. "type": {
  17648. "type": "string",
  17649. "enum": ["session.next.tool.failed"]
  17650. },
  17651. "properties": {
  17652. "type": "object",
  17653. "properties": {
  17654. "timestamp": {
  17655. "type": "number"
  17656. },
  17657. "sessionID": {
  17658. "type": "string"
  17659. },
  17660. "callID": {
  17661. "type": "string"
  17662. },
  17663. "error": {
  17664. "$ref": "#/components/schemas/SessionErrorUnknown"
  17665. },
  17666. "provider": {
  17667. "type": "object",
  17668. "properties": {
  17669. "executed": {
  17670. "type": "boolean"
  17671. },
  17672. "metadata": {
  17673. "type": "object"
  17674. }
  17675. },
  17676. "required": ["executed"],
  17677. "additionalProperties": false
  17678. }
  17679. },
  17680. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17681. "additionalProperties": false
  17682. }
  17683. },
  17684. "required": ["id", "type", "properties"],
  17685. "additionalProperties": false
  17686. },
  17687. "SessionNextRetry_error": {
  17688. "type": "object",
  17689. "properties": {
  17690. "message": {
  17691. "type": "string"
  17692. },
  17693. "statusCode": {
  17694. "type": "integer",
  17695. "minimum": 0
  17696. },
  17697. "isRetryable": {
  17698. "type": "boolean"
  17699. },
  17700. "responseHeaders": {
  17701. "type": "object",
  17702. "additionalProperties": {
  17703. "type": "string"
  17704. }
  17705. },
  17706. "responseBody": {
  17707. "type": "string"
  17708. },
  17709. "metadata": {
  17710. "type": "object",
  17711. "additionalProperties": {
  17712. "type": "string"
  17713. }
  17714. }
  17715. },
  17716. "required": ["message", "isRetryable"],
  17717. "additionalProperties": false
  17718. },
  17719. "EventSessionNextRetried": {
  17720. "type": "object",
  17721. "properties": {
  17722. "id": {
  17723. "type": "string"
  17724. },
  17725. "type": {
  17726. "type": "string",
  17727. "enum": ["session.next.retried"]
  17728. },
  17729. "properties": {
  17730. "type": "object",
  17731. "properties": {
  17732. "timestamp": {
  17733. "type": "number"
  17734. },
  17735. "sessionID": {
  17736. "type": "string"
  17737. },
  17738. "attempt": {
  17739. "type": "integer",
  17740. "minimum": 0
  17741. },
  17742. "error": {
  17743. "$ref": "#/components/schemas/SessionNextRetry_error"
  17744. }
  17745. },
  17746. "required": ["timestamp", "sessionID", "attempt", "error"],
  17747. "additionalProperties": false
  17748. }
  17749. },
  17750. "required": ["id", "type", "properties"],
  17751. "additionalProperties": false
  17752. },
  17753. "EventSessionNextCompactionStarted": {
  17754. "type": "object",
  17755. "properties": {
  17756. "id": {
  17757. "type": "string"
  17758. },
  17759. "type": {
  17760. "type": "string",
  17761. "enum": ["session.next.compaction.started"]
  17762. },
  17763. "properties": {
  17764. "type": "object",
  17765. "properties": {
  17766. "timestamp": {
  17767. "type": "number"
  17768. },
  17769. "sessionID": {
  17770. "type": "string"
  17771. },
  17772. "reason": {
  17773. "type": "string",
  17774. "enum": ["auto", "manual"]
  17775. }
  17776. },
  17777. "required": ["timestamp", "sessionID", "reason"],
  17778. "additionalProperties": false
  17779. }
  17780. },
  17781. "required": ["id", "type", "properties"],
  17782. "additionalProperties": false
  17783. },
  17784. "EventSessionNextCompactionDelta": {
  17785. "type": "object",
  17786. "properties": {
  17787. "id": {
  17788. "type": "string"
  17789. },
  17790. "type": {
  17791. "type": "string",
  17792. "enum": ["session.next.compaction.delta"]
  17793. },
  17794. "properties": {
  17795. "type": "object",
  17796. "properties": {
  17797. "timestamp": {
  17798. "type": "number"
  17799. },
  17800. "sessionID": {
  17801. "type": "string"
  17802. },
  17803. "text": {
  17804. "type": "string"
  17805. }
  17806. },
  17807. "required": ["timestamp", "sessionID", "text"],
  17808. "additionalProperties": false
  17809. }
  17810. },
  17811. "required": ["id", "type", "properties"],
  17812. "additionalProperties": false
  17813. },
  17814. "EventSessionNextCompactionEnded": {
  17815. "type": "object",
  17816. "properties": {
  17817. "id": {
  17818. "type": "string"
  17819. },
  17820. "type": {
  17821. "type": "string",
  17822. "enum": ["session.next.compaction.ended"]
  17823. },
  17824. "properties": {
  17825. "type": "object",
  17826. "properties": {
  17827. "timestamp": {
  17828. "type": "number"
  17829. },
  17830. "sessionID": {
  17831. "type": "string"
  17832. },
  17833. "text": {
  17834. "type": "string"
  17835. },
  17836. "include": {
  17837. "type": "string"
  17838. }
  17839. },
  17840. "required": ["timestamp", "sessionID", "text"],
  17841. "additionalProperties": false
  17842. }
  17843. },
  17844. "required": ["id", "type", "properties"],
  17845. "additionalProperties": false
  17846. },
  17847. "EventServerConnected": {
  17848. "type": "object",
  17849. "properties": {
  17850. "id": {
  17851. "type": "string"
  17852. },
  17853. "type": {
  17854. "type": "string",
  17855. "enum": ["server.connected"]
  17856. },
  17857. "properties": {
  17858. "type": "object",
  17859. "properties": {}
  17860. }
  17861. },
  17862. "required": ["id", "type", "properties"],
  17863. "additionalProperties": false
  17864. },
  17865. "EventGlobalDisposed": {
  17866. "type": "object",
  17867. "properties": {
  17868. "id": {
  17869. "type": "string"
  17870. },
  17871. "type": {
  17872. "type": "string",
  17873. "enum": ["global.disposed"]
  17874. },
  17875. "properties": {
  17876. "type": "object",
  17877. "properties": {}
  17878. }
  17879. },
  17880. "required": ["id", "type", "properties"],
  17881. "additionalProperties": false
  17882. },
  17883. "SessionInfo": {
  17884. "type": "object",
  17885. "properties": {
  17886. "id": {
  17887. "type": "string"
  17888. },
  17889. "parentID": {
  17890. "type": "string"
  17891. },
  17892. "projectID": {
  17893. "type": "string"
  17894. },
  17895. "workspaceID": {
  17896. "type": "string"
  17897. },
  17898. "path": {
  17899. "type": "string"
  17900. },
  17901. "agent": {
  17902. "type": "string"
  17903. },
  17904. "model": {
  17905. "type": "object",
  17906. "properties": {
  17907. "id": {
  17908. "type": "string"
  17909. },
  17910. "providerID": {
  17911. "type": "string"
  17912. },
  17913. "variant": {
  17914. "type": "string"
  17915. }
  17916. },
  17917. "required": ["id", "providerID", "variant"],
  17918. "additionalProperties": false
  17919. },
  17920. "time": {
  17921. "type": "object",
  17922. "properties": {
  17923. "created": {
  17924. "type": "number"
  17925. },
  17926. "updated": {
  17927. "type": "number"
  17928. },
  17929. "archived": {
  17930. "type": "number"
  17931. }
  17932. },
  17933. "required": ["created", "updated"],
  17934. "additionalProperties": false
  17935. },
  17936. "title": {
  17937. "type": "string"
  17938. }
  17939. },
  17940. "required": ["id", "projectID", "time", "title"],
  17941. "additionalProperties": false
  17942. },
  17943. "SessionDelivery": {
  17944. "type": "string",
  17945. "enum": ["immediate", "deferred"]
  17946. },
  17947. "SessionMessageAgentSwitched": {
  17948. "type": "object",
  17949. "properties": {
  17950. "id": {
  17951. "type": "string"
  17952. },
  17953. "metadata": {
  17954. "type": "object"
  17955. },
  17956. "time": {
  17957. "type": "object",
  17958. "properties": {
  17959. "created": {
  17960. "type": "number"
  17961. }
  17962. },
  17963. "required": ["created"],
  17964. "additionalProperties": false
  17965. },
  17966. "type": {
  17967. "type": "string",
  17968. "enum": ["agent-switched"]
  17969. },
  17970. "agent": {
  17971. "type": "string"
  17972. }
  17973. },
  17974. "required": ["id", "time", "type", "agent"],
  17975. "additionalProperties": false
  17976. },
  17977. "SessionMessageModelSwitched": {
  17978. "type": "object",
  17979. "properties": {
  17980. "id": {
  17981. "type": "string"
  17982. },
  17983. "metadata": {
  17984. "type": "object"
  17985. },
  17986. "time": {
  17987. "type": "object",
  17988. "properties": {
  17989. "created": {
  17990. "type": "number"
  17991. }
  17992. },
  17993. "required": ["created"],
  17994. "additionalProperties": false
  17995. },
  17996. "type": {
  17997. "type": "string",
  17998. "enum": ["model-switched"]
  17999. },
  18000. "model": {
  18001. "type": "object",
  18002. "properties": {
  18003. "id": {
  18004. "type": "string"
  18005. },
  18006. "providerID": {
  18007. "type": "string"
  18008. },
  18009. "variant": {
  18010. "type": "string"
  18011. }
  18012. },
  18013. "required": ["id", "providerID", "variant"],
  18014. "additionalProperties": false
  18015. }
  18016. },
  18017. "required": ["id", "time", "type", "model"],
  18018. "additionalProperties": false
  18019. },
  18020. "SessionMessageUser": {
  18021. "type": "object",
  18022. "properties": {
  18023. "id": {
  18024. "type": "string"
  18025. },
  18026. "metadata": {
  18027. "type": "object"
  18028. },
  18029. "time": {
  18030. "type": "object",
  18031. "properties": {
  18032. "created": {
  18033. "type": "number"
  18034. }
  18035. },
  18036. "required": ["created"],
  18037. "additionalProperties": false
  18038. },
  18039. "text": {
  18040. "type": "string"
  18041. },
  18042. "files": {
  18043. "type": "array",
  18044. "items": {
  18045. "$ref": "#/components/schemas/PromptFileAttachment"
  18046. }
  18047. },
  18048. "agents": {
  18049. "type": "array",
  18050. "items": {
  18051. "$ref": "#/components/schemas/PromptAgentAttachment"
  18052. }
  18053. },
  18054. "type": {
  18055. "type": "string",
  18056. "enum": ["user"]
  18057. }
  18058. },
  18059. "required": ["id", "time", "text", "type"],
  18060. "additionalProperties": false
  18061. },
  18062. "SessionMessageSynthetic": {
  18063. "type": "object",
  18064. "properties": {
  18065. "id": {
  18066. "type": "string"
  18067. },
  18068. "metadata": {
  18069. "type": "object"
  18070. },
  18071. "time": {
  18072. "type": "object",
  18073. "properties": {
  18074. "created": {
  18075. "type": "number"
  18076. }
  18077. },
  18078. "required": ["created"],
  18079. "additionalProperties": false
  18080. },
  18081. "sessionID": {
  18082. "type": "string"
  18083. },
  18084. "text": {
  18085. "type": "string"
  18086. },
  18087. "type": {
  18088. "type": "string",
  18089. "enum": ["synthetic"]
  18090. }
  18091. },
  18092. "required": ["id", "time", "sessionID", "text", "type"],
  18093. "additionalProperties": false
  18094. },
  18095. "SessionMessageShell": {
  18096. "type": "object",
  18097. "properties": {
  18098. "id": {
  18099. "type": "string"
  18100. },
  18101. "metadata": {
  18102. "type": "object"
  18103. },
  18104. "time": {
  18105. "type": "object",
  18106. "properties": {
  18107. "created": {
  18108. "type": "number"
  18109. },
  18110. "completed": {
  18111. "type": "number"
  18112. }
  18113. },
  18114. "required": ["created"],
  18115. "additionalProperties": false
  18116. },
  18117. "type": {
  18118. "type": "string",
  18119. "enum": ["shell"]
  18120. },
  18121. "callID": {
  18122. "type": "string"
  18123. },
  18124. "command": {
  18125. "type": "string"
  18126. },
  18127. "output": {
  18128. "type": "string"
  18129. }
  18130. },
  18131. "required": ["id", "time", "type", "callID", "command", "output"],
  18132. "additionalProperties": false
  18133. },
  18134. "SessionMessageAssistantText": {
  18135. "type": "object",
  18136. "properties": {
  18137. "type": {
  18138. "type": "string",
  18139. "enum": ["text"]
  18140. },
  18141. "text": {
  18142. "type": "string"
  18143. }
  18144. },
  18145. "required": ["type", "text"],
  18146. "additionalProperties": false
  18147. },
  18148. "SessionMessageAssistantReasoning": {
  18149. "type": "object",
  18150. "properties": {
  18151. "type": {
  18152. "type": "string",
  18153. "enum": ["reasoning"]
  18154. },
  18155. "id": {
  18156. "type": "string"
  18157. },
  18158. "text": {
  18159. "type": "string"
  18160. }
  18161. },
  18162. "required": ["type", "id", "text"],
  18163. "additionalProperties": false
  18164. },
  18165. "SessionMessageToolStatePending": {
  18166. "type": "object",
  18167. "properties": {
  18168. "status": {
  18169. "type": "string",
  18170. "enum": ["pending"]
  18171. },
  18172. "input": {
  18173. "type": "string"
  18174. }
  18175. },
  18176. "required": ["status", "input"],
  18177. "additionalProperties": false
  18178. },
  18179. "SessionMessageToolStateRunning": {
  18180. "type": "object",
  18181. "properties": {
  18182. "status": {
  18183. "type": "string",
  18184. "enum": ["running"]
  18185. },
  18186. "input": {
  18187. "type": "object"
  18188. },
  18189. "structured": {
  18190. "type": "object"
  18191. },
  18192. "content": {
  18193. "type": "array",
  18194. "items": {
  18195. "anyOf": [
  18196. {
  18197. "$ref": "#/components/schemas/ToolTextContent"
  18198. },
  18199. {
  18200. "$ref": "#/components/schemas/ToolFileContent"
  18201. }
  18202. ]
  18203. }
  18204. }
  18205. },
  18206. "required": ["status", "input", "structured", "content"],
  18207. "additionalProperties": false
  18208. },
  18209. "SessionMessageToolStateCompleted": {
  18210. "type": "object",
  18211. "properties": {
  18212. "status": {
  18213. "type": "string",
  18214. "enum": ["completed"]
  18215. },
  18216. "input": {
  18217. "type": "object"
  18218. },
  18219. "attachments": {
  18220. "type": "array",
  18221. "items": {
  18222. "$ref": "#/components/schemas/PromptFileAttachment"
  18223. }
  18224. },
  18225. "content": {
  18226. "type": "array",
  18227. "items": {
  18228. "anyOf": [
  18229. {
  18230. "$ref": "#/components/schemas/ToolTextContent"
  18231. },
  18232. {
  18233. "$ref": "#/components/schemas/ToolFileContent"
  18234. }
  18235. ]
  18236. }
  18237. },
  18238. "structured": {
  18239. "type": "object"
  18240. }
  18241. },
  18242. "required": ["status", "input", "content", "structured"],
  18243. "additionalProperties": false
  18244. },
  18245. "SessionMessageToolStateError": {
  18246. "type": "object",
  18247. "properties": {
  18248. "status": {
  18249. "type": "string",
  18250. "enum": ["error"]
  18251. },
  18252. "input": {
  18253. "type": "object"
  18254. },
  18255. "content": {
  18256. "type": "array",
  18257. "items": {
  18258. "anyOf": [
  18259. {
  18260. "$ref": "#/components/schemas/ToolTextContent"
  18261. },
  18262. {
  18263. "$ref": "#/components/schemas/ToolFileContent"
  18264. }
  18265. ]
  18266. }
  18267. },
  18268. "structured": {
  18269. "type": "object"
  18270. },
  18271. "error": {
  18272. "$ref": "#/components/schemas/SessionErrorUnknown"
  18273. }
  18274. },
  18275. "required": ["status", "input", "content", "structured", "error"],
  18276. "additionalProperties": false
  18277. },
  18278. "SessionMessageAssistantTool": {
  18279. "type": "object",
  18280. "properties": {
  18281. "type": {
  18282. "type": "string",
  18283. "enum": ["tool"]
  18284. },
  18285. "id": {
  18286. "type": "string"
  18287. },
  18288. "name": {
  18289. "type": "string"
  18290. },
  18291. "provider": {
  18292. "type": "object",
  18293. "properties": {
  18294. "executed": {
  18295. "type": "boolean"
  18296. },
  18297. "metadata": {
  18298. "type": "object"
  18299. }
  18300. },
  18301. "required": ["executed"],
  18302. "additionalProperties": false
  18303. },
  18304. "state": {
  18305. "anyOf": [
  18306. {
  18307. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18308. },
  18309. {
  18310. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18311. },
  18312. {
  18313. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18314. },
  18315. {
  18316. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18317. }
  18318. ]
  18319. },
  18320. "time": {
  18321. "type": "object",
  18322. "properties": {
  18323. "created": {
  18324. "type": "number"
  18325. },
  18326. "ran": {
  18327. "type": "number"
  18328. },
  18329. "completed": {
  18330. "type": "number"
  18331. },
  18332. "pruned": {
  18333. "type": "number"
  18334. }
  18335. },
  18336. "required": ["created"],
  18337. "additionalProperties": false
  18338. }
  18339. },
  18340. "required": ["type", "id", "name", "state", "time"],
  18341. "additionalProperties": false
  18342. },
  18343. "SessionMessageAssistant": {
  18344. "type": "object",
  18345. "properties": {
  18346. "id": {
  18347. "type": "string"
  18348. },
  18349. "metadata": {
  18350. "type": "object"
  18351. },
  18352. "time": {
  18353. "type": "object",
  18354. "properties": {
  18355. "created": {
  18356. "type": "number"
  18357. },
  18358. "completed": {
  18359. "type": "number"
  18360. }
  18361. },
  18362. "required": ["created"],
  18363. "additionalProperties": false
  18364. },
  18365. "type": {
  18366. "type": "string",
  18367. "enum": ["assistant"]
  18368. },
  18369. "agent": {
  18370. "type": "string"
  18371. },
  18372. "model": {
  18373. "type": "object",
  18374. "properties": {
  18375. "id": {
  18376. "type": "string"
  18377. },
  18378. "providerID": {
  18379. "type": "string"
  18380. },
  18381. "variant": {
  18382. "type": "string"
  18383. }
  18384. },
  18385. "required": ["id", "providerID", "variant"],
  18386. "additionalProperties": false
  18387. },
  18388. "content": {
  18389. "type": "array",
  18390. "items": {
  18391. "anyOf": [
  18392. {
  18393. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18394. },
  18395. {
  18396. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18397. },
  18398. {
  18399. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18400. }
  18401. ]
  18402. }
  18403. },
  18404. "snapshot": {
  18405. "type": "object",
  18406. "properties": {
  18407. "start": {
  18408. "type": "string"
  18409. },
  18410. "end": {
  18411. "type": "string"
  18412. }
  18413. },
  18414. "additionalProperties": false
  18415. },
  18416. "finish": {
  18417. "type": "string"
  18418. },
  18419. "cost": {
  18420. "type": "number"
  18421. },
  18422. "tokens": {
  18423. "type": "object",
  18424. "properties": {
  18425. "input": {
  18426. "type": "number"
  18427. },
  18428. "output": {
  18429. "type": "number"
  18430. },
  18431. "reasoning": {
  18432. "type": "number"
  18433. },
  18434. "cache": {
  18435. "type": "object",
  18436. "properties": {
  18437. "read": {
  18438. "type": "number"
  18439. },
  18440. "write": {
  18441. "type": "number"
  18442. }
  18443. },
  18444. "required": ["read", "write"],
  18445. "additionalProperties": false
  18446. }
  18447. },
  18448. "required": ["input", "output", "reasoning", "cache"],
  18449. "additionalProperties": false
  18450. },
  18451. "error": {
  18452. "$ref": "#/components/schemas/SessionErrorUnknown"
  18453. }
  18454. },
  18455. "required": ["id", "time", "type", "agent", "model", "content"],
  18456. "additionalProperties": false
  18457. },
  18458. "SessionMessageCompaction": {
  18459. "type": "object",
  18460. "properties": {
  18461. "type": {
  18462. "type": "string",
  18463. "enum": ["compaction"]
  18464. },
  18465. "reason": {
  18466. "type": "string",
  18467. "enum": ["auto", "manual"]
  18468. },
  18469. "summary": {
  18470. "type": "string"
  18471. },
  18472. "include": {
  18473. "type": "string"
  18474. },
  18475. "id": {
  18476. "type": "string"
  18477. },
  18478. "metadata": {
  18479. "type": "object"
  18480. },
  18481. "time": {
  18482. "type": "object",
  18483. "properties": {
  18484. "created": {
  18485. "type": "number"
  18486. }
  18487. },
  18488. "required": ["created"],
  18489. "additionalProperties": false
  18490. }
  18491. },
  18492. "required": ["type", "reason", "summary", "id", "time"],
  18493. "additionalProperties": false
  18494. },
  18495. "SessionMessage": {
  18496. "anyOf": [
  18497. {
  18498. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18499. },
  18500. {
  18501. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18502. },
  18503. {
  18504. "$ref": "#/components/schemas/SessionMessageUser"
  18505. },
  18506. {
  18507. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18508. },
  18509. {
  18510. "$ref": "#/components/schemas/SessionMessageShell"
  18511. },
  18512. {
  18513. "$ref": "#/components/schemas/SessionMessageAssistant"
  18514. },
  18515. {
  18516. "$ref": "#/components/schemas/SessionMessageCompaction"
  18517. }
  18518. ]
  18519. },
  18520. "EventTuiToastShow1": {
  18521. "type": "object",
  18522. "properties": {
  18523. "id": {
  18524. "type": "string"
  18525. },
  18526. "type": {
  18527. "type": "string",
  18528. "enum": ["tui.toast.show"]
  18529. },
  18530. "properties": {
  18531. "type": "object",
  18532. "properties": {
  18533. "title": {
  18534. "type": "string"
  18535. },
  18536. "message": {
  18537. "type": "string"
  18538. },
  18539. "variant": {
  18540. "type": "string",
  18541. "enum": ["info", "success", "warning", "error"]
  18542. },
  18543. "duration": {
  18544. "type": "integer",
  18545. "exclusiveMinimum": 0
  18546. }
  18547. },
  18548. "required": ["message", "variant"],
  18549. "additionalProperties": false
  18550. }
  18551. },
  18552. "required": ["id", "type", "properties"],
  18553. "additionalProperties": false
  18554. },
  18555. "BadRequestError": {
  18556. "type": "object",
  18557. "required": ["data", "errors", "success"],
  18558. "properties": {
  18559. "data": {},
  18560. "errors": {
  18561. "type": "array",
  18562. "items": {
  18563. "type": "object",
  18564. "additionalProperties": {}
  18565. }
  18566. },
  18567. "success": {
  18568. "type": "boolean",
  18569. "enum": [false]
  18570. }
  18571. }
  18572. }
  18573. }
  18574. },
  18575. "security": [],
  18576. "tags": [
  18577. {
  18578. "name": "control",
  18579. "description": "Control plane routes."
  18580. },
  18581. {
  18582. "name": "global",
  18583. "description": "Global server routes."
  18584. },
  18585. {
  18586. "name": "event",
  18587. "description": "Instance event stream route."
  18588. },
  18589. {
  18590. "name": "config",
  18591. "description": "Experimental HttpApi config routes."
  18592. },
  18593. {
  18594. "name": "experimental",
  18595. "description": "Experimental HttpApi read-only routes."
  18596. },
  18597. {
  18598. "name": "file",
  18599. "description": "Experimental HttpApi file routes."
  18600. },
  18601. {
  18602. "name": "instance",
  18603. "description": "Experimental HttpApi instance read routes."
  18604. },
  18605. {
  18606. "name": "mcp",
  18607. "description": "Experimental HttpApi MCP routes."
  18608. },
  18609. {
  18610. "name": "project",
  18611. "description": "Experimental HttpApi project routes."
  18612. },
  18613. {
  18614. "name": "pty",
  18615. "description": "Experimental HttpApi PTY routes."
  18616. },
  18617. {
  18618. "name": "question",
  18619. "description": "Question routes."
  18620. },
  18621. {
  18622. "name": "permission",
  18623. "description": "Experimental HttpApi permission routes."
  18624. },
  18625. {
  18626. "name": "provider",
  18627. "description": "Experimental HttpApi provider routes."
  18628. },
  18629. {
  18630. "name": "session",
  18631. "description": "Experimental HttpApi session routes."
  18632. },
  18633. {
  18634. "name": "sync",
  18635. "description": "Experimental HttpApi sync routes."
  18636. },
  18637. {
  18638. "name": "v2",
  18639. "description": "Experimental v2 routes."
  18640. },
  18641. {
  18642. "name": "v2 messages",
  18643. "description": "Experimental v2 message routes."
  18644. },
  18645. {
  18646. "name": "tui",
  18647. "description": "Experimental HttpApi TUI routes."
  18648. },
  18649. {
  18650. "name": "workspace",
  18651. "description": "Experimental HttpApi workspace routes."
  18652. },
  18653. {
  18654. "name": "pty",
  18655. "description": "PTY websocket route."
  18656. }
  18657. ]
  18658. }