openapi.json 499 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411
  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. "required": false,
  119. "schema": {
  120. "type": "string"
  121. }
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "required": false,
  127. "schema": {
  128. "type": "string"
  129. }
  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. "required": false,
  450. "schema": {
  451. "type": "string"
  452. }
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "required": false,
  458. "schema": {
  459. "type": "string"
  460. }
  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. "required": false,
  494. "schema": {
  495. "type": "string"
  496. }
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "required": false,
  502. "schema": {
  503. "type": "string"
  504. }
  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. "required": false,
  536. "schema": {
  537. "type": "string"
  538. }
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "required": false,
  544. "schema": {
  545. "type": "string"
  546. }
  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. "required": false,
  599. "schema": {
  600. "type": "string"
  601. }
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "required": false,
  607. "schema": {
  608. "type": "string"
  609. }
  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. "required": false,
  660. "schema": {
  661. "type": "string"
  662. }
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "required": false,
  668. "schema": {
  669. "type": "string"
  670. }
  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. },
  685. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  686. "summary": "Get active Console provider metadata",
  687. "x-codeSamples": [
  688. {
  689. "lang": "js",
  690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  691. }
  692. ]
  693. }
  694. },
  695. "/experimental/console/orgs": {
  696. "get": {
  697. "tags": ["experimental"],
  698. "operationId": "experimental.console.listOrgs",
  699. "parameters": [
  700. {
  701. "name": "directory",
  702. "in": "query",
  703. "required": false,
  704. "schema": {
  705. "type": "string"
  706. }
  707. },
  708. {
  709. "name": "workspace",
  710. "in": "query",
  711. "required": false,
  712. "schema": {
  713. "type": "string"
  714. }
  715. }
  716. ],
  717. "responses": {
  718. "200": {
  719. "description": "Switchable Console orgs",
  720. "content": {
  721. "application/json": {
  722. "schema": {
  723. "type": "object",
  724. "properties": {
  725. "orgs": {
  726. "type": "array",
  727. "items": {
  728. "type": "object",
  729. "properties": {
  730. "accountID": {
  731. "type": "string"
  732. },
  733. "accountEmail": {
  734. "type": "string"
  735. },
  736. "accountUrl": {
  737. "type": "string"
  738. },
  739. "orgID": {
  740. "type": "string"
  741. },
  742. "orgName": {
  743. "type": "string"
  744. },
  745. "active": {
  746. "type": "boolean"
  747. }
  748. },
  749. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  750. "additionalProperties": false
  751. }
  752. }
  753. },
  754. "required": ["orgs"],
  755. "additionalProperties": false,
  756. "description": "Switchable Console orgs"
  757. }
  758. }
  759. }
  760. }
  761. },
  762. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  763. "summary": "List switchable Console orgs",
  764. "x-codeSamples": [
  765. {
  766. "lang": "js",
  767. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  768. }
  769. ]
  770. }
  771. },
  772. "/experimental/console/switch": {
  773. "post": {
  774. "tags": ["experimental"],
  775. "operationId": "experimental.console.switchOrg",
  776. "parameters": [
  777. {
  778. "name": "directory",
  779. "in": "query",
  780. "required": false,
  781. "schema": {
  782. "type": "string"
  783. }
  784. },
  785. {
  786. "name": "workspace",
  787. "in": "query",
  788. "required": false,
  789. "schema": {
  790. "type": "string"
  791. }
  792. }
  793. ],
  794. "responses": {
  795. "200": {
  796. "description": "Switch success",
  797. "content": {
  798. "application/json": {
  799. "schema": {
  800. "type": "boolean",
  801. "description": "Switch success"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  808. "summary": "Switch active Console org",
  809. "requestBody": {
  810. "content": {
  811. "application/json": {
  812. "schema": {
  813. "type": "object",
  814. "properties": {
  815. "accountID": {
  816. "type": "string"
  817. },
  818. "orgID": {
  819. "type": "string"
  820. }
  821. },
  822. "required": ["accountID", "orgID"],
  823. "additionalProperties": false
  824. }
  825. }
  826. }
  827. },
  828. "x-codeSamples": [
  829. {
  830. "lang": "js",
  831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  832. }
  833. ]
  834. }
  835. },
  836. "/experimental/tool": {
  837. "get": {
  838. "tags": ["experimental"],
  839. "operationId": "tool.list",
  840. "parameters": [
  841. {
  842. "name": "directory",
  843. "in": "query",
  844. "required": false,
  845. "schema": {
  846. "type": "string"
  847. }
  848. },
  849. {
  850. "name": "workspace",
  851. "in": "query",
  852. "required": false,
  853. "schema": {
  854. "type": "string"
  855. }
  856. },
  857. {
  858. "name": "provider",
  859. "in": "query",
  860. "schema": {
  861. "type": "string"
  862. },
  863. "required": true
  864. },
  865. {
  866. "name": "model",
  867. "in": "query",
  868. "schema": {
  869. "type": "string"
  870. },
  871. "required": true
  872. }
  873. ],
  874. "responses": {
  875. "200": {
  876. "description": "Tools",
  877. "content": {
  878. "application/json": {
  879. "schema": {
  880. "$ref": "#/components/schemas/ToolList"
  881. }
  882. }
  883. }
  884. },
  885. "400": {
  886. "description": "Bad request",
  887. "content": {
  888. "application/json": {
  889. "schema": {
  890. "$ref": "#/components/schemas/BadRequestError"
  891. }
  892. }
  893. }
  894. }
  895. },
  896. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  897. "summary": "List tools",
  898. "x-codeSamples": [
  899. {
  900. "lang": "js",
  901. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  902. }
  903. ]
  904. }
  905. },
  906. "/experimental/tool/ids": {
  907. "get": {
  908. "tags": ["experimental"],
  909. "operationId": "tool.ids",
  910. "parameters": [
  911. {
  912. "name": "directory",
  913. "in": "query",
  914. "required": false,
  915. "schema": {
  916. "type": "string"
  917. }
  918. },
  919. {
  920. "name": "workspace",
  921. "in": "query",
  922. "required": false,
  923. "schema": {
  924. "type": "string"
  925. }
  926. }
  927. ],
  928. "responses": {
  929. "200": {
  930. "description": "Tool IDs",
  931. "content": {
  932. "application/json": {
  933. "schema": {
  934. "$ref": "#/components/schemas/ToolIDs"
  935. }
  936. }
  937. }
  938. },
  939. "400": {
  940. "description": "Bad request",
  941. "content": {
  942. "application/json": {
  943. "schema": {
  944. "$ref": "#/components/schemas/BadRequestError"
  945. }
  946. }
  947. }
  948. }
  949. },
  950. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  951. "summary": "List tool IDs",
  952. "x-codeSamples": [
  953. {
  954. "lang": "js",
  955. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  956. }
  957. ]
  958. }
  959. },
  960. "/experimental/worktree": {
  961. "get": {
  962. "tags": ["experimental"],
  963. "operationId": "worktree.list",
  964. "parameters": [
  965. {
  966. "name": "directory",
  967. "in": "query",
  968. "required": false,
  969. "schema": {
  970. "type": "string"
  971. }
  972. },
  973. {
  974. "name": "workspace",
  975. "in": "query",
  976. "required": false,
  977. "schema": {
  978. "type": "string"
  979. }
  980. }
  981. ],
  982. "responses": {
  983. "200": {
  984. "description": "List of worktree directories",
  985. "content": {
  986. "application/json": {
  987. "schema": {
  988. "type": "array",
  989. "items": {
  990. "type": "string"
  991. },
  992. "description": "List of worktree directories"
  993. }
  994. }
  995. }
  996. }
  997. },
  998. "description": "List all sandbox worktrees for the current project.",
  999. "summary": "List worktrees",
  1000. "x-codeSamples": [
  1001. {
  1002. "lang": "js",
  1003. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1004. }
  1005. ]
  1006. },
  1007. "post": {
  1008. "tags": ["experimental"],
  1009. "operationId": "worktree.create",
  1010. "parameters": [
  1011. {
  1012. "name": "directory",
  1013. "in": "query",
  1014. "required": false,
  1015. "schema": {
  1016. "type": "string"
  1017. }
  1018. },
  1019. {
  1020. "name": "workspace",
  1021. "in": "query",
  1022. "required": false,
  1023. "schema": {
  1024. "type": "string"
  1025. }
  1026. }
  1027. ],
  1028. "responses": {
  1029. "200": {
  1030. "description": "Worktree created",
  1031. "content": {
  1032. "application/json": {
  1033. "schema": {
  1034. "$ref": "#/components/schemas/Worktree"
  1035. }
  1036. }
  1037. }
  1038. },
  1039. "400": {
  1040. "description": "Bad request",
  1041. "content": {
  1042. "application/json": {
  1043. "schema": {
  1044. "$ref": "#/components/schemas/BadRequestError"
  1045. }
  1046. }
  1047. }
  1048. }
  1049. },
  1050. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1051. "summary": "Create worktree",
  1052. "requestBody": {
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "$ref": "#/components/schemas/WorktreeCreateInput"
  1057. }
  1058. }
  1059. }
  1060. },
  1061. "x-codeSamples": [
  1062. {
  1063. "lang": "js",
  1064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1065. }
  1066. ]
  1067. },
  1068. "delete": {
  1069. "tags": ["experimental"],
  1070. "operationId": "worktree.remove",
  1071. "parameters": [
  1072. {
  1073. "name": "directory",
  1074. "in": "query",
  1075. "required": false,
  1076. "schema": {
  1077. "type": "string"
  1078. }
  1079. },
  1080. {
  1081. "name": "workspace",
  1082. "in": "query",
  1083. "required": false,
  1084. "schema": {
  1085. "type": "string"
  1086. }
  1087. }
  1088. ],
  1089. "responses": {
  1090. "200": {
  1091. "description": "Worktree removed",
  1092. "content": {
  1093. "application/json": {
  1094. "schema": {
  1095. "type": "boolean",
  1096. "description": "Worktree removed"
  1097. }
  1098. }
  1099. }
  1100. },
  1101. "400": {
  1102. "description": "Bad request",
  1103. "content": {
  1104. "application/json": {
  1105. "schema": {
  1106. "$ref": "#/components/schemas/BadRequestError"
  1107. }
  1108. }
  1109. }
  1110. }
  1111. },
  1112. "description": "Remove a git worktree and delete its branch.",
  1113. "summary": "Remove worktree",
  1114. "requestBody": {
  1115. "content": {
  1116. "application/json": {
  1117. "schema": {
  1118. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1119. }
  1120. }
  1121. }
  1122. },
  1123. "x-codeSamples": [
  1124. {
  1125. "lang": "js",
  1126. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1127. }
  1128. ]
  1129. }
  1130. },
  1131. "/experimental/worktree/reset": {
  1132. "post": {
  1133. "tags": ["experimental"],
  1134. "operationId": "worktree.reset",
  1135. "parameters": [
  1136. {
  1137. "name": "directory",
  1138. "in": "query",
  1139. "required": false,
  1140. "schema": {
  1141. "type": "string"
  1142. }
  1143. },
  1144. {
  1145. "name": "workspace",
  1146. "in": "query",
  1147. "required": false,
  1148. "schema": {
  1149. "type": "string"
  1150. }
  1151. }
  1152. ],
  1153. "responses": {
  1154. "200": {
  1155. "description": "Worktree reset",
  1156. "content": {
  1157. "application/json": {
  1158. "schema": {
  1159. "type": "boolean",
  1160. "description": "Worktree reset"
  1161. }
  1162. }
  1163. }
  1164. },
  1165. "400": {
  1166. "description": "Bad request",
  1167. "content": {
  1168. "application/json": {
  1169. "schema": {
  1170. "$ref": "#/components/schemas/BadRequestError"
  1171. }
  1172. }
  1173. }
  1174. }
  1175. },
  1176. "description": "Reset a worktree branch to the primary default branch.",
  1177. "summary": "Reset worktree",
  1178. "requestBody": {
  1179. "content": {
  1180. "application/json": {
  1181. "schema": {
  1182. "$ref": "#/components/schemas/WorktreeResetInput"
  1183. }
  1184. }
  1185. }
  1186. },
  1187. "x-codeSamples": [
  1188. {
  1189. "lang": "js",
  1190. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1191. }
  1192. ]
  1193. }
  1194. },
  1195. "/experimental/session": {
  1196. "get": {
  1197. "tags": ["experimental"],
  1198. "operationId": "experimental.session.list",
  1199. "parameters": [
  1200. {
  1201. "name": "directory",
  1202. "in": "query",
  1203. "required": false,
  1204. "schema": {
  1205. "type": "string"
  1206. }
  1207. },
  1208. {
  1209. "name": "workspace",
  1210. "in": "query",
  1211. "required": false,
  1212. "schema": {
  1213. "type": "string"
  1214. }
  1215. },
  1216. {
  1217. "name": "roots",
  1218. "in": "query",
  1219. "schema": {
  1220. "anyOf": [
  1221. {
  1222. "type": "boolean"
  1223. },
  1224. {
  1225. "type": "string",
  1226. "enum": ["true", "false"]
  1227. }
  1228. ]
  1229. },
  1230. "required": false
  1231. },
  1232. {
  1233. "name": "start",
  1234. "in": "query",
  1235. "schema": {
  1236. "type": "number"
  1237. },
  1238. "required": false
  1239. },
  1240. {
  1241. "name": "cursor",
  1242. "in": "query",
  1243. "schema": {
  1244. "type": "number"
  1245. },
  1246. "required": false
  1247. },
  1248. {
  1249. "name": "search",
  1250. "in": "query",
  1251. "schema": {
  1252. "type": "string"
  1253. },
  1254. "required": false
  1255. },
  1256. {
  1257. "name": "limit",
  1258. "in": "query",
  1259. "schema": {
  1260. "type": "number"
  1261. },
  1262. "required": false
  1263. },
  1264. {
  1265. "name": "archived",
  1266. "in": "query",
  1267. "schema": {
  1268. "anyOf": [
  1269. {
  1270. "type": "boolean"
  1271. },
  1272. {
  1273. "type": "string",
  1274. "enum": ["true", "false"]
  1275. }
  1276. ]
  1277. },
  1278. "required": false
  1279. }
  1280. ],
  1281. "responses": {
  1282. "200": {
  1283. "description": "List of sessions",
  1284. "content": {
  1285. "application/json": {
  1286. "schema": {
  1287. "type": "array",
  1288. "items": {
  1289. "$ref": "#/components/schemas/GlobalSession"
  1290. },
  1291. "description": "List of sessions"
  1292. }
  1293. }
  1294. }
  1295. }
  1296. },
  1297. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1298. "summary": "List sessions",
  1299. "x-codeSamples": [
  1300. {
  1301. "lang": "js",
  1302. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1303. }
  1304. ]
  1305. }
  1306. },
  1307. "/experimental/resource": {
  1308. "get": {
  1309. "tags": ["experimental"],
  1310. "operationId": "experimental.resource.list",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "required": false,
  1316. "schema": {
  1317. "type": "string"
  1318. }
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "required": false,
  1324. "schema": {
  1325. "type": "string"
  1326. }
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "MCP resources",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "object",
  1336. "additionalProperties": {
  1337. "$ref": "#/components/schemas/McpResource"
  1338. },
  1339. "description": "MCP resources"
  1340. }
  1341. }
  1342. }
  1343. }
  1344. },
  1345. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1346. "summary": "Get MCP resources",
  1347. "x-codeSamples": [
  1348. {
  1349. "lang": "js",
  1350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1351. }
  1352. ]
  1353. }
  1354. },
  1355. "/find": {
  1356. "get": {
  1357. "tags": ["file"],
  1358. "operationId": "find.text",
  1359. "parameters": [
  1360. {
  1361. "name": "directory",
  1362. "in": "query",
  1363. "required": false,
  1364. "schema": {
  1365. "type": "string"
  1366. }
  1367. },
  1368. {
  1369. "name": "workspace",
  1370. "in": "query",
  1371. "required": false,
  1372. "schema": {
  1373. "type": "string"
  1374. }
  1375. },
  1376. {
  1377. "name": "pattern",
  1378. "in": "query",
  1379. "schema": {
  1380. "type": "string"
  1381. },
  1382. "required": true
  1383. }
  1384. ],
  1385. "responses": {
  1386. "200": {
  1387. "description": "Matches",
  1388. "content": {
  1389. "application/json": {
  1390. "schema": {
  1391. "type": "array",
  1392. "items": {
  1393. "type": "object",
  1394. "properties": {
  1395. "path": {
  1396. "type": "object",
  1397. "properties": {
  1398. "text": {
  1399. "type": "string"
  1400. }
  1401. },
  1402. "required": ["text"],
  1403. "additionalProperties": false
  1404. },
  1405. "lines": {
  1406. "type": "object",
  1407. "properties": {
  1408. "text": {
  1409. "type": "string"
  1410. }
  1411. },
  1412. "required": ["text"],
  1413. "additionalProperties": false
  1414. },
  1415. "line_number": {
  1416. "type": "integer",
  1417. "minimum": 0
  1418. },
  1419. "absolute_offset": {
  1420. "type": "integer",
  1421. "minimum": 0
  1422. },
  1423. "submatches": {
  1424. "type": "array",
  1425. "items": {
  1426. "type": "object",
  1427. "properties": {
  1428. "match": {
  1429. "type": "object",
  1430. "properties": {
  1431. "text": {
  1432. "type": "string"
  1433. }
  1434. },
  1435. "required": ["text"],
  1436. "additionalProperties": false
  1437. },
  1438. "start": {
  1439. "type": "integer",
  1440. "minimum": 0
  1441. },
  1442. "end": {
  1443. "type": "integer",
  1444. "minimum": 0
  1445. }
  1446. },
  1447. "required": ["match", "start", "end"],
  1448. "additionalProperties": false
  1449. }
  1450. }
  1451. },
  1452. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1453. "additionalProperties": false
  1454. },
  1455. "description": "Matches"
  1456. }
  1457. }
  1458. }
  1459. }
  1460. },
  1461. "description": "Search for text patterns across files in the project using ripgrep.",
  1462. "summary": "Find text",
  1463. "x-codeSamples": [
  1464. {
  1465. "lang": "js",
  1466. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1467. }
  1468. ]
  1469. }
  1470. },
  1471. "/find/file": {
  1472. "get": {
  1473. "tags": ["file"],
  1474. "operationId": "find.files",
  1475. "parameters": [
  1476. {
  1477. "name": "directory",
  1478. "in": "query",
  1479. "required": false,
  1480. "schema": {
  1481. "type": "string"
  1482. }
  1483. },
  1484. {
  1485. "name": "workspace",
  1486. "in": "query",
  1487. "required": false,
  1488. "schema": {
  1489. "type": "string"
  1490. }
  1491. },
  1492. {
  1493. "name": "query",
  1494. "in": "query",
  1495. "schema": {
  1496. "type": "string"
  1497. },
  1498. "required": true
  1499. },
  1500. {
  1501. "name": "dirs",
  1502. "in": "query",
  1503. "schema": {
  1504. "type": "string",
  1505. "enum": ["true", "false"]
  1506. },
  1507. "required": false
  1508. },
  1509. {
  1510. "name": "type",
  1511. "in": "query",
  1512. "schema": {
  1513. "type": "string",
  1514. "enum": ["file", "directory"]
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "limit",
  1520. "in": "query",
  1521. "schema": {
  1522. "type": "integer",
  1523. "minimum": 1,
  1524. "maximum": 200
  1525. },
  1526. "required": false
  1527. }
  1528. ],
  1529. "responses": {
  1530. "200": {
  1531. "description": "File paths",
  1532. "content": {
  1533. "application/json": {
  1534. "schema": {
  1535. "type": "array",
  1536. "items": {
  1537. "type": "string"
  1538. },
  1539. "description": "File paths"
  1540. }
  1541. }
  1542. }
  1543. }
  1544. },
  1545. "description": "Search for files or directories by name or pattern in the project directory.",
  1546. "summary": "Find files",
  1547. "x-codeSamples": [
  1548. {
  1549. "lang": "js",
  1550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1551. }
  1552. ]
  1553. }
  1554. },
  1555. "/find/symbol": {
  1556. "get": {
  1557. "tags": ["file"],
  1558. "operationId": "find.symbols",
  1559. "parameters": [
  1560. {
  1561. "name": "directory",
  1562. "in": "query",
  1563. "required": false,
  1564. "schema": {
  1565. "type": "string"
  1566. }
  1567. },
  1568. {
  1569. "name": "workspace",
  1570. "in": "query",
  1571. "required": false,
  1572. "schema": {
  1573. "type": "string"
  1574. }
  1575. },
  1576. {
  1577. "name": "query",
  1578. "in": "query",
  1579. "schema": {
  1580. "type": "string"
  1581. },
  1582. "required": true
  1583. }
  1584. ],
  1585. "responses": {
  1586. "200": {
  1587. "description": "Symbols",
  1588. "content": {
  1589. "application/json": {
  1590. "schema": {
  1591. "type": "array",
  1592. "items": {
  1593. "$ref": "#/components/schemas/Symbol"
  1594. },
  1595. "description": "Symbols"
  1596. }
  1597. }
  1598. }
  1599. }
  1600. },
  1601. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1602. "summary": "Find symbols",
  1603. "x-codeSamples": [
  1604. {
  1605. "lang": "js",
  1606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1607. }
  1608. ]
  1609. }
  1610. },
  1611. "/file": {
  1612. "get": {
  1613. "tags": ["file"],
  1614. "operationId": "file.list",
  1615. "parameters": [
  1616. {
  1617. "name": "directory",
  1618. "in": "query",
  1619. "required": false,
  1620. "schema": {
  1621. "type": "string"
  1622. }
  1623. },
  1624. {
  1625. "name": "workspace",
  1626. "in": "query",
  1627. "required": false,
  1628. "schema": {
  1629. "type": "string"
  1630. }
  1631. },
  1632. {
  1633. "name": "path",
  1634. "in": "query",
  1635. "schema": {
  1636. "type": "string"
  1637. },
  1638. "required": true
  1639. }
  1640. ],
  1641. "responses": {
  1642. "200": {
  1643. "description": "Files and directories",
  1644. "content": {
  1645. "application/json": {
  1646. "schema": {
  1647. "type": "array",
  1648. "items": {
  1649. "$ref": "#/components/schemas/FileNode"
  1650. },
  1651. "description": "Files and directories"
  1652. }
  1653. }
  1654. }
  1655. }
  1656. },
  1657. "description": "List files and directories in a specified path.",
  1658. "summary": "List files",
  1659. "x-codeSamples": [
  1660. {
  1661. "lang": "js",
  1662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1663. }
  1664. ]
  1665. }
  1666. },
  1667. "/file/content": {
  1668. "get": {
  1669. "tags": ["file"],
  1670. "operationId": "file.read",
  1671. "parameters": [
  1672. {
  1673. "name": "directory",
  1674. "in": "query",
  1675. "required": false,
  1676. "schema": {
  1677. "type": "string"
  1678. }
  1679. },
  1680. {
  1681. "name": "workspace",
  1682. "in": "query",
  1683. "required": false,
  1684. "schema": {
  1685. "type": "string"
  1686. }
  1687. },
  1688. {
  1689. "name": "path",
  1690. "in": "query",
  1691. "schema": {
  1692. "type": "string"
  1693. },
  1694. "required": true
  1695. }
  1696. ],
  1697. "responses": {
  1698. "200": {
  1699. "description": "File content",
  1700. "content": {
  1701. "application/json": {
  1702. "schema": {
  1703. "$ref": "#/components/schemas/FileContent"
  1704. }
  1705. }
  1706. }
  1707. }
  1708. },
  1709. "description": "Read the content of a specified file.",
  1710. "summary": "Read file",
  1711. "x-codeSamples": [
  1712. {
  1713. "lang": "js",
  1714. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1715. }
  1716. ]
  1717. }
  1718. },
  1719. "/file/status": {
  1720. "get": {
  1721. "tags": ["file"],
  1722. "operationId": "file.status",
  1723. "parameters": [
  1724. {
  1725. "name": "directory",
  1726. "in": "query",
  1727. "required": false,
  1728. "schema": {
  1729. "type": "string"
  1730. }
  1731. },
  1732. {
  1733. "name": "workspace",
  1734. "in": "query",
  1735. "required": false,
  1736. "schema": {
  1737. "type": "string"
  1738. }
  1739. }
  1740. ],
  1741. "responses": {
  1742. "200": {
  1743. "description": "File status",
  1744. "content": {
  1745. "application/json": {
  1746. "schema": {
  1747. "type": "array",
  1748. "items": {
  1749. "$ref": "#/components/schemas/File"
  1750. },
  1751. "description": "File status"
  1752. }
  1753. }
  1754. }
  1755. }
  1756. },
  1757. "description": "Get the git status of all files in the project.",
  1758. "summary": "Get file status",
  1759. "x-codeSamples": [
  1760. {
  1761. "lang": "js",
  1762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1763. }
  1764. ]
  1765. }
  1766. },
  1767. "/instance/dispose": {
  1768. "post": {
  1769. "tags": ["instance"],
  1770. "operationId": "instance.dispose",
  1771. "parameters": [
  1772. {
  1773. "name": "directory",
  1774. "in": "query",
  1775. "required": false,
  1776. "schema": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. {
  1781. "name": "workspace",
  1782. "in": "query",
  1783. "required": false,
  1784. "schema": {
  1785. "type": "string"
  1786. }
  1787. }
  1788. ],
  1789. "responses": {
  1790. "200": {
  1791. "description": "Instance disposed",
  1792. "content": {
  1793. "application/json": {
  1794. "schema": {
  1795. "type": "boolean",
  1796. "description": "Instance disposed"
  1797. }
  1798. }
  1799. }
  1800. }
  1801. },
  1802. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1803. "summary": "Dispose instance",
  1804. "x-codeSamples": [
  1805. {
  1806. "lang": "js",
  1807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1808. }
  1809. ]
  1810. }
  1811. },
  1812. "/path": {
  1813. "get": {
  1814. "tags": ["instance"],
  1815. "operationId": "path.get",
  1816. "parameters": [
  1817. {
  1818. "name": "directory",
  1819. "in": "query",
  1820. "required": false,
  1821. "schema": {
  1822. "type": "string"
  1823. }
  1824. },
  1825. {
  1826. "name": "workspace",
  1827. "in": "query",
  1828. "required": false,
  1829. "schema": {
  1830. "type": "string"
  1831. }
  1832. }
  1833. ],
  1834. "responses": {
  1835. "200": {
  1836. "description": "Path",
  1837. "content": {
  1838. "application/json": {
  1839. "schema": {
  1840. "$ref": "#/components/schemas/Path"
  1841. }
  1842. }
  1843. }
  1844. }
  1845. },
  1846. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1847. "summary": "Get paths",
  1848. "x-codeSamples": [
  1849. {
  1850. "lang": "js",
  1851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1852. }
  1853. ]
  1854. }
  1855. },
  1856. "/vcs": {
  1857. "get": {
  1858. "tags": ["instance"],
  1859. "operationId": "vcs.get",
  1860. "parameters": [
  1861. {
  1862. "name": "directory",
  1863. "in": "query",
  1864. "required": false,
  1865. "schema": {
  1866. "type": "string"
  1867. }
  1868. },
  1869. {
  1870. "name": "workspace",
  1871. "in": "query",
  1872. "required": false,
  1873. "schema": {
  1874. "type": "string"
  1875. }
  1876. }
  1877. ],
  1878. "responses": {
  1879. "200": {
  1880. "description": "VCS info",
  1881. "content": {
  1882. "application/json": {
  1883. "schema": {
  1884. "$ref": "#/components/schemas/VcsInfo"
  1885. }
  1886. }
  1887. }
  1888. }
  1889. },
  1890. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1891. "summary": "Get VCS info",
  1892. "x-codeSamples": [
  1893. {
  1894. "lang": "js",
  1895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1896. }
  1897. ]
  1898. }
  1899. },
  1900. "/vcs/status": {
  1901. "get": {
  1902. "tags": ["instance"],
  1903. "operationId": "vcs.status",
  1904. "parameters": [
  1905. {
  1906. "name": "directory",
  1907. "in": "query",
  1908. "required": false,
  1909. "schema": {
  1910. "type": "string"
  1911. }
  1912. },
  1913. {
  1914. "name": "workspace",
  1915. "in": "query",
  1916. "required": false,
  1917. "schema": {
  1918. "type": "string"
  1919. }
  1920. }
  1921. ],
  1922. "responses": {
  1923. "200": {
  1924. "description": "VCS status",
  1925. "content": {
  1926. "application/json": {
  1927. "schema": {
  1928. "type": "array",
  1929. "items": {
  1930. "$ref": "#/components/schemas/VcsFileStatus"
  1931. },
  1932. "description": "VCS status"
  1933. }
  1934. }
  1935. }
  1936. }
  1937. },
  1938. "description": "Retrieve changed files in the current working tree without patches.",
  1939. "summary": "Get VCS status",
  1940. "x-codeSamples": [
  1941. {
  1942. "lang": "js",
  1943. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1944. }
  1945. ]
  1946. }
  1947. },
  1948. "/vcs/diff": {
  1949. "get": {
  1950. "tags": ["instance"],
  1951. "operationId": "vcs.diff",
  1952. "parameters": [
  1953. {
  1954. "name": "directory",
  1955. "in": "query",
  1956. "required": false,
  1957. "schema": {
  1958. "type": "string"
  1959. }
  1960. },
  1961. {
  1962. "name": "workspace",
  1963. "in": "query",
  1964. "required": false,
  1965. "schema": {
  1966. "type": "string"
  1967. }
  1968. },
  1969. {
  1970. "name": "mode",
  1971. "in": "query",
  1972. "schema": {
  1973. "type": "string",
  1974. "enum": ["git", "branch"]
  1975. },
  1976. "required": true
  1977. }
  1978. ],
  1979. "responses": {
  1980. "200": {
  1981. "description": "VCS diff",
  1982. "content": {
  1983. "application/json": {
  1984. "schema": {
  1985. "type": "array",
  1986. "items": {
  1987. "$ref": "#/components/schemas/VcsFileDiff"
  1988. },
  1989. "description": "VCS diff"
  1990. }
  1991. }
  1992. }
  1993. }
  1994. },
  1995. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  1996. "summary": "Get VCS diff",
  1997. "x-codeSamples": [
  1998. {
  1999. "lang": "js",
  2000. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2001. }
  2002. ]
  2003. }
  2004. },
  2005. "/vcs/diff/raw": {
  2006. "get": {
  2007. "tags": ["instance"],
  2008. "operationId": "vcs.diff.raw",
  2009. "parameters": [
  2010. {
  2011. "name": "directory",
  2012. "in": "query",
  2013. "required": false,
  2014. "schema": {
  2015. "type": "string"
  2016. }
  2017. },
  2018. {
  2019. "name": "workspace",
  2020. "in": "query",
  2021. "required": false,
  2022. "schema": {
  2023. "type": "string"
  2024. }
  2025. }
  2026. ],
  2027. "responses": {
  2028. "200": {
  2029. "description": "Raw VCS diff",
  2030. "content": {
  2031. "text/x-diff; charset=utf-8": {
  2032. "schema": {
  2033. "type": "string"
  2034. }
  2035. }
  2036. }
  2037. }
  2038. },
  2039. "description": "Retrieve a raw patch for current uncommitted changes.",
  2040. "summary": "Get raw VCS diff",
  2041. "x-codeSamples": [
  2042. {
  2043. "lang": "js",
  2044. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2045. }
  2046. ]
  2047. }
  2048. },
  2049. "/vcs/apply": {
  2050. "post": {
  2051. "tags": ["instance"],
  2052. "operationId": "vcs.apply",
  2053. "parameters": [
  2054. {
  2055. "name": "directory",
  2056. "in": "query",
  2057. "required": false,
  2058. "schema": {
  2059. "type": "string"
  2060. }
  2061. },
  2062. {
  2063. "name": "workspace",
  2064. "in": "query",
  2065. "required": false,
  2066. "schema": {
  2067. "type": "string"
  2068. }
  2069. }
  2070. ],
  2071. "responses": {
  2072. "200": {
  2073. "description": "VCS patch applied",
  2074. "content": {
  2075. "application/json": {
  2076. "schema": {
  2077. "type": "object",
  2078. "properties": {
  2079. "applied": {
  2080. "type": "boolean"
  2081. }
  2082. },
  2083. "required": ["applied"],
  2084. "additionalProperties": false,
  2085. "description": "VCS patch applied"
  2086. }
  2087. }
  2088. }
  2089. },
  2090. "400": {
  2091. "description": "VcsApplyError",
  2092. "content": {
  2093. "application/json": {
  2094. "schema": {
  2095. "$ref": "#/components/schemas/VcsApplyError"
  2096. }
  2097. }
  2098. }
  2099. }
  2100. },
  2101. "description": "Apply a raw patch to the current working tree.",
  2102. "summary": "Apply VCS patch",
  2103. "requestBody": {
  2104. "content": {
  2105. "application/json": {
  2106. "schema": {
  2107. "type": "object",
  2108. "properties": {
  2109. "patch": {
  2110. "type": "string"
  2111. }
  2112. },
  2113. "required": ["patch"],
  2114. "additionalProperties": false
  2115. }
  2116. }
  2117. }
  2118. },
  2119. "x-codeSamples": [
  2120. {
  2121. "lang": "js",
  2122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2123. }
  2124. ]
  2125. }
  2126. },
  2127. "/command": {
  2128. "get": {
  2129. "tags": ["instance"],
  2130. "operationId": "command.list",
  2131. "parameters": [
  2132. {
  2133. "name": "directory",
  2134. "in": "query",
  2135. "required": false,
  2136. "schema": {
  2137. "type": "string"
  2138. }
  2139. },
  2140. {
  2141. "name": "workspace",
  2142. "in": "query",
  2143. "required": false,
  2144. "schema": {
  2145. "type": "string"
  2146. }
  2147. }
  2148. ],
  2149. "responses": {
  2150. "200": {
  2151. "description": "List of commands",
  2152. "content": {
  2153. "application/json": {
  2154. "schema": {
  2155. "type": "array",
  2156. "items": {
  2157. "$ref": "#/components/schemas/Command"
  2158. },
  2159. "description": "List of commands"
  2160. }
  2161. }
  2162. }
  2163. }
  2164. },
  2165. "description": "Get a list of all available commands in the OpenCode system.",
  2166. "summary": "List commands",
  2167. "x-codeSamples": [
  2168. {
  2169. "lang": "js",
  2170. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2171. }
  2172. ]
  2173. }
  2174. },
  2175. "/agent": {
  2176. "get": {
  2177. "tags": ["instance"],
  2178. "operationId": "app.agents",
  2179. "parameters": [
  2180. {
  2181. "name": "directory",
  2182. "in": "query",
  2183. "required": false,
  2184. "schema": {
  2185. "type": "string"
  2186. }
  2187. },
  2188. {
  2189. "name": "workspace",
  2190. "in": "query",
  2191. "required": false,
  2192. "schema": {
  2193. "type": "string"
  2194. }
  2195. }
  2196. ],
  2197. "responses": {
  2198. "200": {
  2199. "description": "List of agents",
  2200. "content": {
  2201. "application/json": {
  2202. "schema": {
  2203. "type": "array",
  2204. "items": {
  2205. "$ref": "#/components/schemas/Agent"
  2206. },
  2207. "description": "List of agents"
  2208. }
  2209. }
  2210. }
  2211. }
  2212. },
  2213. "description": "Get a list of all available AI agents in the OpenCode system.",
  2214. "summary": "List agents",
  2215. "x-codeSamples": [
  2216. {
  2217. "lang": "js",
  2218. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2219. }
  2220. ]
  2221. }
  2222. },
  2223. "/skill": {
  2224. "get": {
  2225. "tags": ["instance"],
  2226. "operationId": "app.skills",
  2227. "parameters": [
  2228. {
  2229. "name": "directory",
  2230. "in": "query",
  2231. "required": false,
  2232. "schema": {
  2233. "type": "string"
  2234. }
  2235. },
  2236. {
  2237. "name": "workspace",
  2238. "in": "query",
  2239. "required": false,
  2240. "schema": {
  2241. "type": "string"
  2242. }
  2243. }
  2244. ],
  2245. "responses": {
  2246. "200": {
  2247. "description": "List of skills",
  2248. "content": {
  2249. "application/json": {
  2250. "schema": {
  2251. "type": "array",
  2252. "items": {
  2253. "type": "object",
  2254. "properties": {
  2255. "name": {
  2256. "type": "string"
  2257. },
  2258. "description": {
  2259. "type": "string"
  2260. },
  2261. "location": {
  2262. "type": "string"
  2263. },
  2264. "content": {
  2265. "type": "string"
  2266. }
  2267. },
  2268. "required": ["name", "description", "location", "content"],
  2269. "additionalProperties": false
  2270. },
  2271. "description": "List of skills"
  2272. }
  2273. }
  2274. }
  2275. }
  2276. },
  2277. "description": "Get a list of all available skills in the OpenCode system.",
  2278. "summary": "List skills",
  2279. "x-codeSamples": [
  2280. {
  2281. "lang": "js",
  2282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2283. }
  2284. ]
  2285. }
  2286. },
  2287. "/lsp": {
  2288. "get": {
  2289. "tags": ["instance"],
  2290. "operationId": "lsp.status",
  2291. "parameters": [
  2292. {
  2293. "name": "directory",
  2294. "in": "query",
  2295. "required": false,
  2296. "schema": {
  2297. "type": "string"
  2298. }
  2299. },
  2300. {
  2301. "name": "workspace",
  2302. "in": "query",
  2303. "required": false,
  2304. "schema": {
  2305. "type": "string"
  2306. }
  2307. }
  2308. ],
  2309. "responses": {
  2310. "200": {
  2311. "description": "LSP server status",
  2312. "content": {
  2313. "application/json": {
  2314. "schema": {
  2315. "type": "array",
  2316. "items": {
  2317. "$ref": "#/components/schemas/LSPStatus"
  2318. },
  2319. "description": "LSP server status"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Get LSP server status",
  2326. "summary": "Get LSP status",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/formatter": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "formatter.status",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "required": false,
  2344. "schema": {
  2345. "type": "string"
  2346. }
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "required": false,
  2352. "schema": {
  2353. "type": "string"
  2354. }
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "Formatter status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/FormatterStatus"
  2366. },
  2367. "description": "Formatter status"
  2368. }
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "description": "Get formatter status",
  2374. "summary": "Get formatter status",
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/mcp": {
  2384. "get": {
  2385. "tags": ["mcp"],
  2386. "operationId": "mcp.status",
  2387. "parameters": [
  2388. {
  2389. "name": "directory",
  2390. "in": "query",
  2391. "required": false,
  2392. "schema": {
  2393. "type": "string"
  2394. }
  2395. },
  2396. {
  2397. "name": "workspace",
  2398. "in": "query",
  2399. "required": false,
  2400. "schema": {
  2401. "type": "string"
  2402. }
  2403. }
  2404. ],
  2405. "responses": {
  2406. "200": {
  2407. "description": "MCP server status",
  2408. "content": {
  2409. "application/json": {
  2410. "schema": {
  2411. "type": "object",
  2412. "additionalProperties": {
  2413. "$ref": "#/components/schemas/MCPStatus"
  2414. },
  2415. "description": "MCP server status"
  2416. }
  2417. }
  2418. }
  2419. }
  2420. },
  2421. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2422. "summary": "Get MCP status",
  2423. "x-codeSamples": [
  2424. {
  2425. "lang": "js",
  2426. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2427. }
  2428. ]
  2429. },
  2430. "post": {
  2431. "tags": ["mcp"],
  2432. "operationId": "mcp.add",
  2433. "parameters": [
  2434. {
  2435. "name": "directory",
  2436. "in": "query",
  2437. "required": false,
  2438. "schema": {
  2439. "type": "string"
  2440. }
  2441. },
  2442. {
  2443. "name": "workspace",
  2444. "in": "query",
  2445. "required": false,
  2446. "schema": {
  2447. "type": "string"
  2448. }
  2449. }
  2450. ],
  2451. "responses": {
  2452. "200": {
  2453. "description": "MCP server added successfully",
  2454. "content": {
  2455. "application/json": {
  2456. "schema": {
  2457. "type": "object",
  2458. "additionalProperties": {
  2459. "$ref": "#/components/schemas/MCPStatus"
  2460. },
  2461. "description": "MCP server added successfully"
  2462. }
  2463. }
  2464. }
  2465. },
  2466. "400": {
  2467. "description": "Bad request",
  2468. "content": {
  2469. "application/json": {
  2470. "schema": {
  2471. "$ref": "#/components/schemas/BadRequestError"
  2472. }
  2473. }
  2474. }
  2475. }
  2476. },
  2477. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2478. "summary": "Add MCP server",
  2479. "requestBody": {
  2480. "content": {
  2481. "application/json": {
  2482. "schema": {
  2483. "type": "object",
  2484. "properties": {
  2485. "name": {
  2486. "type": "string"
  2487. },
  2488. "config": {
  2489. "anyOf": [
  2490. {
  2491. "$ref": "#/components/schemas/McpLocalConfig"
  2492. },
  2493. {
  2494. "$ref": "#/components/schemas/McpRemoteConfig"
  2495. }
  2496. ]
  2497. }
  2498. },
  2499. "required": ["name", "config"],
  2500. "additionalProperties": false
  2501. }
  2502. }
  2503. }
  2504. },
  2505. "x-codeSamples": [
  2506. {
  2507. "lang": "js",
  2508. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2509. }
  2510. ]
  2511. }
  2512. },
  2513. "/mcp/{name}/auth": {
  2514. "post": {
  2515. "tags": ["mcp"],
  2516. "operationId": "mcp.auth.start",
  2517. "parameters": [
  2518. {
  2519. "name": "directory",
  2520. "in": "query",
  2521. "required": false,
  2522. "schema": {
  2523. "type": "string"
  2524. }
  2525. },
  2526. {
  2527. "name": "workspace",
  2528. "in": "query",
  2529. "required": false,
  2530. "schema": {
  2531. "type": "string"
  2532. }
  2533. },
  2534. {
  2535. "name": "name",
  2536. "in": "path",
  2537. "schema": {
  2538. "type": "string"
  2539. },
  2540. "required": true
  2541. }
  2542. ],
  2543. "responses": {
  2544. "200": {
  2545. "description": "OAuth flow started",
  2546. "content": {
  2547. "application/json": {
  2548. "schema": {
  2549. "type": "object",
  2550. "properties": {
  2551. "authorizationUrl": {
  2552. "type": "string"
  2553. },
  2554. "oauthState": {
  2555. "type": "string"
  2556. }
  2557. },
  2558. "required": ["authorizationUrl", "oauthState"],
  2559. "additionalProperties": false,
  2560. "description": "OAuth flow started"
  2561. }
  2562. }
  2563. }
  2564. },
  2565. "400": {
  2566. "description": "McpUnsupportedOAuthError",
  2567. "content": {
  2568. "application/json": {
  2569. "schema": {
  2570. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2571. }
  2572. }
  2573. }
  2574. },
  2575. "404": {
  2576. "description": "Not found",
  2577. "content": {
  2578. "application/json": {
  2579. "schema": {
  2580. "$ref": "#/components/schemas/NotFoundError"
  2581. }
  2582. }
  2583. }
  2584. }
  2585. },
  2586. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2587. "summary": "Start MCP OAuth",
  2588. "x-codeSamples": [
  2589. {
  2590. "lang": "js",
  2591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2592. }
  2593. ]
  2594. },
  2595. "delete": {
  2596. "tags": ["mcp"],
  2597. "operationId": "mcp.auth.remove",
  2598. "parameters": [
  2599. {
  2600. "name": "directory",
  2601. "in": "query",
  2602. "required": false,
  2603. "schema": {
  2604. "type": "string"
  2605. }
  2606. },
  2607. {
  2608. "name": "workspace",
  2609. "in": "query",
  2610. "required": false,
  2611. "schema": {
  2612. "type": "string"
  2613. }
  2614. },
  2615. {
  2616. "name": "name",
  2617. "in": "path",
  2618. "schema": {
  2619. "type": "string"
  2620. },
  2621. "required": true
  2622. }
  2623. ],
  2624. "responses": {
  2625. "200": {
  2626. "description": "OAuth credentials removed",
  2627. "content": {
  2628. "application/json": {
  2629. "schema": {
  2630. "type": "object",
  2631. "properties": {
  2632. "success": {
  2633. "type": "boolean",
  2634. "enum": [true]
  2635. }
  2636. },
  2637. "required": ["success"],
  2638. "additionalProperties": false,
  2639. "description": "OAuth credentials removed"
  2640. }
  2641. }
  2642. }
  2643. },
  2644. "404": {
  2645. "description": "Not found",
  2646. "content": {
  2647. "application/json": {
  2648. "schema": {
  2649. "$ref": "#/components/schemas/NotFoundError"
  2650. }
  2651. }
  2652. }
  2653. }
  2654. },
  2655. "description": "Remove OAuth credentials for an MCP server.",
  2656. "summary": "Remove MCP OAuth",
  2657. "x-codeSamples": [
  2658. {
  2659. "lang": "js",
  2660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2661. }
  2662. ]
  2663. }
  2664. },
  2665. "/mcp/{name}/auth/callback": {
  2666. "post": {
  2667. "tags": ["mcp"],
  2668. "operationId": "mcp.auth.callback",
  2669. "parameters": [
  2670. {
  2671. "name": "directory",
  2672. "in": "query",
  2673. "required": false,
  2674. "schema": {
  2675. "type": "string"
  2676. }
  2677. },
  2678. {
  2679. "name": "workspace",
  2680. "in": "query",
  2681. "required": false,
  2682. "schema": {
  2683. "type": "string"
  2684. }
  2685. },
  2686. {
  2687. "name": "name",
  2688. "in": "path",
  2689. "schema": {
  2690. "type": "string"
  2691. },
  2692. "required": true
  2693. }
  2694. ],
  2695. "responses": {
  2696. "200": {
  2697. "description": "OAuth authentication completed",
  2698. "content": {
  2699. "application/json": {
  2700. "schema": {
  2701. "$ref": "#/components/schemas/MCPStatus"
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "400": {
  2707. "description": "Bad request",
  2708. "content": {
  2709. "application/json": {
  2710. "schema": {
  2711. "$ref": "#/components/schemas/BadRequestError"
  2712. }
  2713. }
  2714. }
  2715. },
  2716. "404": {
  2717. "description": "Not found",
  2718. "content": {
  2719. "application/json": {
  2720. "schema": {
  2721. "$ref": "#/components/schemas/NotFoundError"
  2722. }
  2723. }
  2724. }
  2725. }
  2726. },
  2727. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2728. "summary": "Complete MCP OAuth",
  2729. "requestBody": {
  2730. "content": {
  2731. "application/json": {
  2732. "schema": {
  2733. "type": "object",
  2734. "properties": {
  2735. "code": {
  2736. "type": "string"
  2737. }
  2738. },
  2739. "required": ["code"],
  2740. "additionalProperties": false
  2741. }
  2742. }
  2743. }
  2744. },
  2745. "x-codeSamples": [
  2746. {
  2747. "lang": "js",
  2748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2749. }
  2750. ]
  2751. }
  2752. },
  2753. "/mcp/{name}/auth/authenticate": {
  2754. "post": {
  2755. "tags": ["mcp"],
  2756. "operationId": "mcp.auth.authenticate",
  2757. "parameters": [
  2758. {
  2759. "name": "directory",
  2760. "in": "query",
  2761. "required": false,
  2762. "schema": {
  2763. "type": "string"
  2764. }
  2765. },
  2766. {
  2767. "name": "workspace",
  2768. "in": "query",
  2769. "required": false,
  2770. "schema": {
  2771. "type": "string"
  2772. }
  2773. },
  2774. {
  2775. "name": "name",
  2776. "in": "path",
  2777. "schema": {
  2778. "type": "string"
  2779. },
  2780. "required": true
  2781. }
  2782. ],
  2783. "responses": {
  2784. "200": {
  2785. "description": "OAuth authentication completed",
  2786. "content": {
  2787. "application/json": {
  2788. "schema": {
  2789. "$ref": "#/components/schemas/MCPStatus"
  2790. }
  2791. }
  2792. }
  2793. },
  2794. "400": {
  2795. "description": "McpUnsupportedOAuthError",
  2796. "content": {
  2797. "application/json": {
  2798. "schema": {
  2799. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2800. }
  2801. }
  2802. }
  2803. },
  2804. "404": {
  2805. "description": "Not found",
  2806. "content": {
  2807. "application/json": {
  2808. "schema": {
  2809. "$ref": "#/components/schemas/NotFoundError"
  2810. }
  2811. }
  2812. }
  2813. }
  2814. },
  2815. "description": "Start OAuth flow and wait for callback (opens browser).",
  2816. "summary": "Authenticate MCP OAuth",
  2817. "x-codeSamples": [
  2818. {
  2819. "lang": "js",
  2820. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2821. }
  2822. ]
  2823. }
  2824. },
  2825. "/mcp/{name}/connect": {
  2826. "post": {
  2827. "tags": ["mcp"],
  2828. "operationId": "mcp.connect",
  2829. "parameters": [
  2830. {
  2831. "name": "directory",
  2832. "in": "query",
  2833. "required": false,
  2834. "schema": {
  2835. "type": "string"
  2836. }
  2837. },
  2838. {
  2839. "name": "workspace",
  2840. "in": "query",
  2841. "required": false,
  2842. "schema": {
  2843. "type": "string"
  2844. }
  2845. },
  2846. {
  2847. "name": "name",
  2848. "in": "path",
  2849. "schema": {
  2850. "type": "string"
  2851. },
  2852. "required": true
  2853. }
  2854. ],
  2855. "responses": {
  2856. "200": {
  2857. "description": "MCP server connected successfully",
  2858. "content": {
  2859. "application/json": {
  2860. "schema": {
  2861. "type": "boolean",
  2862. "description": "MCP server connected successfully"
  2863. }
  2864. }
  2865. }
  2866. }
  2867. },
  2868. "description": "Connect an MCP server.",
  2869. "x-codeSamples": [
  2870. {
  2871. "lang": "js",
  2872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2873. }
  2874. ]
  2875. }
  2876. },
  2877. "/mcp/{name}/disconnect": {
  2878. "post": {
  2879. "tags": ["mcp"],
  2880. "operationId": "mcp.disconnect",
  2881. "parameters": [
  2882. {
  2883. "name": "directory",
  2884. "in": "query",
  2885. "required": false,
  2886. "schema": {
  2887. "type": "string"
  2888. }
  2889. },
  2890. {
  2891. "name": "workspace",
  2892. "in": "query",
  2893. "required": false,
  2894. "schema": {
  2895. "type": "string"
  2896. }
  2897. },
  2898. {
  2899. "name": "name",
  2900. "in": "path",
  2901. "schema": {
  2902. "type": "string"
  2903. },
  2904. "required": true
  2905. }
  2906. ],
  2907. "responses": {
  2908. "200": {
  2909. "description": "MCP server disconnected successfully",
  2910. "content": {
  2911. "application/json": {
  2912. "schema": {
  2913. "type": "boolean",
  2914. "description": "MCP server disconnected successfully"
  2915. }
  2916. }
  2917. }
  2918. }
  2919. },
  2920. "description": "Disconnect an MCP server.",
  2921. "x-codeSamples": [
  2922. {
  2923. "lang": "js",
  2924. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2925. }
  2926. ]
  2927. }
  2928. },
  2929. "/project": {
  2930. "get": {
  2931. "tags": ["project"],
  2932. "operationId": "project.list",
  2933. "parameters": [
  2934. {
  2935. "name": "directory",
  2936. "in": "query",
  2937. "required": false,
  2938. "schema": {
  2939. "type": "string"
  2940. }
  2941. },
  2942. {
  2943. "name": "workspace",
  2944. "in": "query",
  2945. "required": false,
  2946. "schema": {
  2947. "type": "string"
  2948. }
  2949. }
  2950. ],
  2951. "responses": {
  2952. "200": {
  2953. "description": "List of projects",
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "array",
  2958. "items": {
  2959. "$ref": "#/components/schemas/Project"
  2960. },
  2961. "description": "List of projects"
  2962. }
  2963. }
  2964. }
  2965. }
  2966. },
  2967. "description": "Get a list of projects that have been opened with OpenCode.",
  2968. "summary": "List all projects",
  2969. "x-codeSamples": [
  2970. {
  2971. "lang": "js",
  2972. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  2973. }
  2974. ]
  2975. }
  2976. },
  2977. "/project/current": {
  2978. "get": {
  2979. "tags": ["project"],
  2980. "operationId": "project.current",
  2981. "parameters": [
  2982. {
  2983. "name": "directory",
  2984. "in": "query",
  2985. "required": false,
  2986. "schema": {
  2987. "type": "string"
  2988. }
  2989. },
  2990. {
  2991. "name": "workspace",
  2992. "in": "query",
  2993. "required": false,
  2994. "schema": {
  2995. "type": "string"
  2996. }
  2997. }
  2998. ],
  2999. "responses": {
  3000. "200": {
  3001. "description": "Current project information",
  3002. "content": {
  3003. "application/json": {
  3004. "schema": {
  3005. "$ref": "#/components/schemas/Project"
  3006. }
  3007. }
  3008. }
  3009. }
  3010. },
  3011. "description": "Retrieve the currently active project that OpenCode is working with.",
  3012. "summary": "Get current project",
  3013. "x-codeSamples": [
  3014. {
  3015. "lang": "js",
  3016. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3017. }
  3018. ]
  3019. }
  3020. },
  3021. "/project/git/init": {
  3022. "post": {
  3023. "tags": ["project"],
  3024. "operationId": "project.initGit",
  3025. "parameters": [
  3026. {
  3027. "name": "directory",
  3028. "in": "query",
  3029. "required": false,
  3030. "schema": {
  3031. "type": "string"
  3032. }
  3033. },
  3034. {
  3035. "name": "workspace",
  3036. "in": "query",
  3037. "required": false,
  3038. "schema": {
  3039. "type": "string"
  3040. }
  3041. }
  3042. ],
  3043. "responses": {
  3044. "200": {
  3045. "description": "Project information after git initialization",
  3046. "content": {
  3047. "application/json": {
  3048. "schema": {
  3049. "$ref": "#/components/schemas/Project"
  3050. }
  3051. }
  3052. }
  3053. }
  3054. },
  3055. "description": "Create a git repository for the current project and return the refreshed project info.",
  3056. "summary": "Initialize git repository",
  3057. "x-codeSamples": [
  3058. {
  3059. "lang": "js",
  3060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3061. }
  3062. ]
  3063. }
  3064. },
  3065. "/project/{projectID}": {
  3066. "patch": {
  3067. "tags": ["project"],
  3068. "operationId": "project.update",
  3069. "parameters": [
  3070. {
  3071. "name": "directory",
  3072. "in": "query",
  3073. "required": false,
  3074. "schema": {
  3075. "type": "string"
  3076. }
  3077. },
  3078. {
  3079. "name": "workspace",
  3080. "in": "query",
  3081. "required": false,
  3082. "schema": {
  3083. "type": "string"
  3084. }
  3085. },
  3086. {
  3087. "name": "projectID",
  3088. "in": "path",
  3089. "schema": {
  3090. "type": "string"
  3091. },
  3092. "required": true
  3093. }
  3094. ],
  3095. "responses": {
  3096. "200": {
  3097. "description": "Updated project information",
  3098. "content": {
  3099. "application/json": {
  3100. "schema": {
  3101. "$ref": "#/components/schemas/Project"
  3102. }
  3103. }
  3104. }
  3105. },
  3106. "400": {
  3107. "description": "Bad request",
  3108. "content": {
  3109. "application/json": {
  3110. "schema": {
  3111. "$ref": "#/components/schemas/BadRequestError"
  3112. }
  3113. }
  3114. }
  3115. },
  3116. "404": {
  3117. "description": "Not found",
  3118. "content": {
  3119. "application/json": {
  3120. "schema": {
  3121. "$ref": "#/components/schemas/NotFoundError"
  3122. }
  3123. }
  3124. }
  3125. }
  3126. },
  3127. "description": "Update project properties such as name, icon, and commands.",
  3128. "summary": "Update project",
  3129. "requestBody": {
  3130. "content": {
  3131. "application/json": {
  3132. "schema": {
  3133. "type": "object",
  3134. "properties": {
  3135. "name": {
  3136. "type": "string"
  3137. },
  3138. "icon": {
  3139. "type": "object",
  3140. "properties": {
  3141. "url": {
  3142. "type": "string"
  3143. },
  3144. "override": {
  3145. "type": "string"
  3146. },
  3147. "color": {
  3148. "type": "string"
  3149. }
  3150. },
  3151. "additionalProperties": false
  3152. },
  3153. "commands": {
  3154. "type": "object",
  3155. "properties": {
  3156. "start": {
  3157. "type": "string",
  3158. "description": "Startup script to run when creating a new workspace (worktree)"
  3159. }
  3160. },
  3161. "additionalProperties": false
  3162. }
  3163. },
  3164. "additionalProperties": false
  3165. }
  3166. }
  3167. }
  3168. },
  3169. "x-codeSamples": [
  3170. {
  3171. "lang": "js",
  3172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3173. }
  3174. ]
  3175. }
  3176. },
  3177. "/pty/shells": {
  3178. "get": {
  3179. "tags": ["pty"],
  3180. "operationId": "pty.shells",
  3181. "parameters": [
  3182. {
  3183. "name": "directory",
  3184. "in": "query",
  3185. "required": false,
  3186. "schema": {
  3187. "type": "string"
  3188. }
  3189. },
  3190. {
  3191. "name": "workspace",
  3192. "in": "query",
  3193. "required": false,
  3194. "schema": {
  3195. "type": "string"
  3196. }
  3197. }
  3198. ],
  3199. "responses": {
  3200. "200": {
  3201. "description": "List of shells",
  3202. "content": {
  3203. "application/json": {
  3204. "schema": {
  3205. "type": "array",
  3206. "items": {
  3207. "type": "object",
  3208. "properties": {
  3209. "path": {
  3210. "type": "string"
  3211. },
  3212. "name": {
  3213. "type": "string"
  3214. },
  3215. "acceptable": {
  3216. "type": "boolean"
  3217. }
  3218. },
  3219. "required": ["path", "name", "acceptable"],
  3220. "additionalProperties": false
  3221. },
  3222. "description": "List of shells"
  3223. }
  3224. }
  3225. }
  3226. }
  3227. },
  3228. "description": "Get a list of available shells on the system.",
  3229. "summary": "List available shells",
  3230. "x-codeSamples": [
  3231. {
  3232. "lang": "js",
  3233. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3234. }
  3235. ]
  3236. }
  3237. },
  3238. "/pty": {
  3239. "get": {
  3240. "tags": ["pty"],
  3241. "operationId": "pty.list",
  3242. "parameters": [
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "required": false,
  3247. "schema": {
  3248. "type": "string"
  3249. }
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "required": false,
  3255. "schema": {
  3256. "type": "string"
  3257. }
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "List of sessions",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "type": "array",
  3267. "items": {
  3268. "$ref": "#/components/schemas/Pty"
  3269. },
  3270. "description": "List of sessions"
  3271. }
  3272. }
  3273. }
  3274. }
  3275. },
  3276. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3277. "summary": "List PTY sessions",
  3278. "x-codeSamples": [
  3279. {
  3280. "lang": "js",
  3281. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3282. }
  3283. ]
  3284. },
  3285. "post": {
  3286. "tags": ["pty"],
  3287. "operationId": "pty.create",
  3288. "parameters": [
  3289. {
  3290. "name": "directory",
  3291. "in": "query",
  3292. "required": false,
  3293. "schema": {
  3294. "type": "string"
  3295. }
  3296. },
  3297. {
  3298. "name": "workspace",
  3299. "in": "query",
  3300. "required": false,
  3301. "schema": {
  3302. "type": "string"
  3303. }
  3304. }
  3305. ],
  3306. "responses": {
  3307. "200": {
  3308. "description": "Created session",
  3309. "content": {
  3310. "application/json": {
  3311. "schema": {
  3312. "$ref": "#/components/schemas/Pty"
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "400": {
  3318. "description": "Bad request",
  3319. "content": {
  3320. "application/json": {
  3321. "schema": {
  3322. "$ref": "#/components/schemas/BadRequestError"
  3323. }
  3324. }
  3325. }
  3326. }
  3327. },
  3328. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3329. "summary": "Create PTY session",
  3330. "requestBody": {
  3331. "content": {
  3332. "application/json": {
  3333. "schema": {
  3334. "type": "object",
  3335. "properties": {
  3336. "command": {
  3337. "type": "string"
  3338. },
  3339. "args": {
  3340. "type": "array",
  3341. "items": {
  3342. "type": "string"
  3343. }
  3344. },
  3345. "cwd": {
  3346. "type": "string"
  3347. },
  3348. "title": {
  3349. "type": "string"
  3350. },
  3351. "env": {
  3352. "type": "object",
  3353. "additionalProperties": {
  3354. "type": "string"
  3355. }
  3356. }
  3357. },
  3358. "additionalProperties": false
  3359. }
  3360. }
  3361. }
  3362. },
  3363. "x-codeSamples": [
  3364. {
  3365. "lang": "js",
  3366. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3367. }
  3368. ]
  3369. }
  3370. },
  3371. "/pty/{ptyID}": {
  3372. "get": {
  3373. "tags": ["pty"],
  3374. "operationId": "pty.get",
  3375. "parameters": [
  3376. {
  3377. "name": "directory",
  3378. "in": "query",
  3379. "required": false,
  3380. "schema": {
  3381. "type": "string"
  3382. }
  3383. },
  3384. {
  3385. "name": "workspace",
  3386. "in": "query",
  3387. "required": false,
  3388. "schema": {
  3389. "type": "string"
  3390. }
  3391. },
  3392. {
  3393. "name": "ptyID",
  3394. "in": "path",
  3395. "schema": {
  3396. "type": "string",
  3397. "pattern": "^pty.*"
  3398. },
  3399. "required": true
  3400. }
  3401. ],
  3402. "responses": {
  3403. "200": {
  3404. "description": "Session info",
  3405. "content": {
  3406. "application/json": {
  3407. "schema": {
  3408. "$ref": "#/components/schemas/Pty"
  3409. }
  3410. }
  3411. }
  3412. },
  3413. "404": {
  3414. "description": "NotFoundError",
  3415. "content": {
  3416. "application/json": {
  3417. "schema": {
  3418. "$ref": "#/components/schemas/NotFoundError"
  3419. }
  3420. }
  3421. }
  3422. }
  3423. },
  3424. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3425. "summary": "Get PTY session",
  3426. "x-codeSamples": [
  3427. {
  3428. "lang": "js",
  3429. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3430. }
  3431. ]
  3432. },
  3433. "put": {
  3434. "tags": ["pty"],
  3435. "operationId": "pty.update",
  3436. "parameters": [
  3437. {
  3438. "name": "directory",
  3439. "in": "query",
  3440. "required": false,
  3441. "schema": {
  3442. "type": "string"
  3443. }
  3444. },
  3445. {
  3446. "name": "workspace",
  3447. "in": "query",
  3448. "required": false,
  3449. "schema": {
  3450. "type": "string"
  3451. }
  3452. },
  3453. {
  3454. "name": "ptyID",
  3455. "in": "path",
  3456. "schema": {
  3457. "type": "string",
  3458. "pattern": "^pty.*"
  3459. },
  3460. "required": true
  3461. }
  3462. ],
  3463. "responses": {
  3464. "200": {
  3465. "description": "Updated session",
  3466. "content": {
  3467. "application/json": {
  3468. "schema": {
  3469. "$ref": "#/components/schemas/Pty"
  3470. }
  3471. }
  3472. }
  3473. },
  3474. "400": {
  3475. "description": "Bad request",
  3476. "content": {
  3477. "application/json": {
  3478. "schema": {
  3479. "$ref": "#/components/schemas/BadRequestError"
  3480. }
  3481. }
  3482. }
  3483. }
  3484. },
  3485. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3486. "summary": "Update PTY session",
  3487. "requestBody": {
  3488. "content": {
  3489. "application/json": {
  3490. "schema": {
  3491. "type": "object",
  3492. "properties": {
  3493. "title": {
  3494. "type": "string"
  3495. },
  3496. "size": {
  3497. "type": "object",
  3498. "properties": {
  3499. "rows": {
  3500. "type": "integer",
  3501. "exclusiveMinimum": 0
  3502. },
  3503. "cols": {
  3504. "type": "integer",
  3505. "exclusiveMinimum": 0
  3506. }
  3507. },
  3508. "required": ["rows", "cols"],
  3509. "additionalProperties": false
  3510. }
  3511. },
  3512. "additionalProperties": false
  3513. }
  3514. }
  3515. }
  3516. },
  3517. "x-codeSamples": [
  3518. {
  3519. "lang": "js",
  3520. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3521. }
  3522. ]
  3523. },
  3524. "delete": {
  3525. "tags": ["pty"],
  3526. "operationId": "pty.remove",
  3527. "parameters": [
  3528. {
  3529. "name": "directory",
  3530. "in": "query",
  3531. "required": false,
  3532. "schema": {
  3533. "type": "string"
  3534. }
  3535. },
  3536. {
  3537. "name": "workspace",
  3538. "in": "query",
  3539. "required": false,
  3540. "schema": {
  3541. "type": "string"
  3542. }
  3543. },
  3544. {
  3545. "name": "ptyID",
  3546. "in": "path",
  3547. "schema": {
  3548. "type": "string",
  3549. "pattern": "^pty.*"
  3550. },
  3551. "required": true
  3552. }
  3553. ],
  3554. "responses": {
  3555. "200": {
  3556. "description": "Session removed",
  3557. "content": {
  3558. "application/json": {
  3559. "schema": {
  3560. "type": "boolean",
  3561. "description": "Session removed"
  3562. }
  3563. }
  3564. }
  3565. },
  3566. "404": {
  3567. "description": "NotFoundError",
  3568. "content": {
  3569. "application/json": {
  3570. "schema": {
  3571. "$ref": "#/components/schemas/NotFoundError"
  3572. }
  3573. }
  3574. }
  3575. }
  3576. },
  3577. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3578. "summary": "Remove PTY session",
  3579. "x-codeSamples": [
  3580. {
  3581. "lang": "js",
  3582. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3583. }
  3584. ]
  3585. }
  3586. },
  3587. "/pty/{ptyID}/connect-token": {
  3588. "post": {
  3589. "tags": ["pty"],
  3590. "operationId": "pty.connectToken",
  3591. "parameters": [
  3592. {
  3593. "name": "directory",
  3594. "in": "query",
  3595. "required": false,
  3596. "schema": {
  3597. "type": "string"
  3598. }
  3599. },
  3600. {
  3601. "name": "workspace",
  3602. "in": "query",
  3603. "required": false,
  3604. "schema": {
  3605. "type": "string"
  3606. }
  3607. },
  3608. {
  3609. "name": "ptyID",
  3610. "in": "path",
  3611. "schema": {
  3612. "type": "string",
  3613. "pattern": "^pty.*"
  3614. },
  3615. "required": true
  3616. }
  3617. ],
  3618. "responses": {
  3619. "200": {
  3620. "description": "WebSocket connect token",
  3621. "content": {
  3622. "application/json": {
  3623. "schema": {
  3624. "type": "object",
  3625. "properties": {
  3626. "ticket": {
  3627. "type": "string"
  3628. },
  3629. "expires_in": {
  3630. "type": "integer",
  3631. "exclusiveMinimum": 0
  3632. }
  3633. },
  3634. "required": ["ticket", "expires_in"],
  3635. "additionalProperties": false,
  3636. "description": "WebSocket connect token"
  3637. }
  3638. }
  3639. }
  3640. },
  3641. "403": {
  3642. "description": "Forbidden",
  3643. "content": {
  3644. "application/json": {
  3645. "schema": {
  3646. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3647. }
  3648. }
  3649. }
  3650. },
  3651. "404": {
  3652. "description": "NotFoundError",
  3653. "content": {
  3654. "application/json": {
  3655. "schema": {
  3656. "$ref": "#/components/schemas/NotFoundError"
  3657. }
  3658. }
  3659. }
  3660. }
  3661. },
  3662. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3663. "summary": "Create PTY WebSocket token",
  3664. "x-codeSamples": [
  3665. {
  3666. "lang": "js",
  3667. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3668. }
  3669. ]
  3670. }
  3671. },
  3672. "/question": {
  3673. "get": {
  3674. "tags": ["question"],
  3675. "operationId": "question.list",
  3676. "parameters": [
  3677. {
  3678. "name": "directory",
  3679. "in": "query",
  3680. "required": false,
  3681. "schema": {
  3682. "type": "string"
  3683. }
  3684. },
  3685. {
  3686. "name": "workspace",
  3687. "in": "query",
  3688. "required": false,
  3689. "schema": {
  3690. "type": "string"
  3691. }
  3692. }
  3693. ],
  3694. "responses": {
  3695. "200": {
  3696. "description": "List of pending questions",
  3697. "content": {
  3698. "application/json": {
  3699. "schema": {
  3700. "type": "array",
  3701. "items": {
  3702. "$ref": "#/components/schemas/QuestionRequest"
  3703. },
  3704. "description": "List of pending questions"
  3705. }
  3706. }
  3707. }
  3708. }
  3709. },
  3710. "description": "Get all pending question requests across all sessions.",
  3711. "summary": "List pending questions",
  3712. "x-codeSamples": [
  3713. {
  3714. "lang": "js",
  3715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3716. }
  3717. ]
  3718. }
  3719. },
  3720. "/question/{requestID}/reply": {
  3721. "post": {
  3722. "tags": ["question"],
  3723. "operationId": "question.reply",
  3724. "parameters": [
  3725. {
  3726. "name": "directory",
  3727. "in": "query",
  3728. "required": false,
  3729. "schema": {
  3730. "type": "string"
  3731. }
  3732. },
  3733. {
  3734. "name": "workspace",
  3735. "in": "query",
  3736. "required": false,
  3737. "schema": {
  3738. "type": "string"
  3739. }
  3740. },
  3741. {
  3742. "name": "requestID",
  3743. "in": "path",
  3744. "schema": {
  3745. "type": "string",
  3746. "pattern": "^que.*"
  3747. },
  3748. "required": true
  3749. }
  3750. ],
  3751. "responses": {
  3752. "200": {
  3753. "description": "Question answered successfully",
  3754. "content": {
  3755. "application/json": {
  3756. "schema": {
  3757. "type": "boolean",
  3758. "description": "Question answered successfully"
  3759. }
  3760. }
  3761. }
  3762. },
  3763. "400": {
  3764. "description": "Bad request",
  3765. "content": {
  3766. "application/json": {
  3767. "schema": {
  3768. "$ref": "#/components/schemas/BadRequestError"
  3769. }
  3770. }
  3771. }
  3772. },
  3773. "404": {
  3774. "description": "Not found",
  3775. "content": {
  3776. "application/json": {
  3777. "schema": {
  3778. "$ref": "#/components/schemas/NotFoundError"
  3779. }
  3780. }
  3781. }
  3782. }
  3783. },
  3784. "description": "Provide answers to a question request from the AI assistant.",
  3785. "summary": "Reply to question request",
  3786. "requestBody": {
  3787. "content": {
  3788. "application/json": {
  3789. "schema": {
  3790. "type": "object",
  3791. "properties": {
  3792. "answers": {
  3793. "type": "array",
  3794. "items": {
  3795. "$ref": "#/components/schemas/QuestionAnswer"
  3796. },
  3797. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3798. }
  3799. },
  3800. "required": ["answers"],
  3801. "additionalProperties": false
  3802. }
  3803. }
  3804. }
  3805. },
  3806. "x-codeSamples": [
  3807. {
  3808. "lang": "js",
  3809. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3810. }
  3811. ]
  3812. }
  3813. },
  3814. "/question/{requestID}/reject": {
  3815. "post": {
  3816. "tags": ["question"],
  3817. "operationId": "question.reject",
  3818. "parameters": [
  3819. {
  3820. "name": "directory",
  3821. "in": "query",
  3822. "required": false,
  3823. "schema": {
  3824. "type": "string"
  3825. }
  3826. },
  3827. {
  3828. "name": "workspace",
  3829. "in": "query",
  3830. "required": false,
  3831. "schema": {
  3832. "type": "string"
  3833. }
  3834. },
  3835. {
  3836. "name": "requestID",
  3837. "in": "path",
  3838. "schema": {
  3839. "type": "string",
  3840. "pattern": "^que.*"
  3841. },
  3842. "required": true
  3843. }
  3844. ],
  3845. "responses": {
  3846. "200": {
  3847. "description": "Question rejected successfully",
  3848. "content": {
  3849. "application/json": {
  3850. "schema": {
  3851. "type": "boolean",
  3852. "description": "Question rejected successfully"
  3853. }
  3854. }
  3855. }
  3856. },
  3857. "400": {
  3858. "description": "Bad request",
  3859. "content": {
  3860. "application/json": {
  3861. "schema": {
  3862. "$ref": "#/components/schemas/BadRequestError"
  3863. }
  3864. }
  3865. }
  3866. },
  3867. "404": {
  3868. "description": "Not found",
  3869. "content": {
  3870. "application/json": {
  3871. "schema": {
  3872. "$ref": "#/components/schemas/NotFoundError"
  3873. }
  3874. }
  3875. }
  3876. }
  3877. },
  3878. "description": "Reject a question request from the AI assistant.",
  3879. "summary": "Reject question request",
  3880. "x-codeSamples": [
  3881. {
  3882. "lang": "js",
  3883. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3884. }
  3885. ]
  3886. }
  3887. },
  3888. "/permission": {
  3889. "get": {
  3890. "tags": ["permission"],
  3891. "operationId": "permission.list",
  3892. "parameters": [
  3893. {
  3894. "name": "directory",
  3895. "in": "query",
  3896. "required": false,
  3897. "schema": {
  3898. "type": "string"
  3899. }
  3900. },
  3901. {
  3902. "name": "workspace",
  3903. "in": "query",
  3904. "required": false,
  3905. "schema": {
  3906. "type": "string"
  3907. }
  3908. }
  3909. ],
  3910. "responses": {
  3911. "200": {
  3912. "description": "List of pending permissions",
  3913. "content": {
  3914. "application/json": {
  3915. "schema": {
  3916. "type": "array",
  3917. "items": {
  3918. "$ref": "#/components/schemas/PermissionRequest"
  3919. },
  3920. "description": "List of pending permissions"
  3921. }
  3922. }
  3923. }
  3924. }
  3925. },
  3926. "description": "Get all pending permission requests across all sessions.",
  3927. "summary": "List pending permissions",
  3928. "x-codeSamples": [
  3929. {
  3930. "lang": "js",
  3931. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3932. }
  3933. ]
  3934. }
  3935. },
  3936. "/permission/{requestID}/reply": {
  3937. "post": {
  3938. "tags": ["permission"],
  3939. "operationId": "permission.reply",
  3940. "parameters": [
  3941. {
  3942. "name": "directory",
  3943. "in": "query",
  3944. "required": false,
  3945. "schema": {
  3946. "type": "string"
  3947. }
  3948. },
  3949. {
  3950. "name": "workspace",
  3951. "in": "query",
  3952. "required": false,
  3953. "schema": {
  3954. "type": "string"
  3955. }
  3956. },
  3957. {
  3958. "name": "requestID",
  3959. "in": "path",
  3960. "schema": {
  3961. "type": "string",
  3962. "pattern": "^per.*"
  3963. },
  3964. "required": true
  3965. }
  3966. ],
  3967. "responses": {
  3968. "200": {
  3969. "description": "Permission processed successfully",
  3970. "content": {
  3971. "application/json": {
  3972. "schema": {
  3973. "type": "boolean",
  3974. "description": "Permission processed successfully"
  3975. }
  3976. }
  3977. }
  3978. },
  3979. "400": {
  3980. "description": "Bad request",
  3981. "content": {
  3982. "application/json": {
  3983. "schema": {
  3984. "$ref": "#/components/schemas/BadRequestError"
  3985. }
  3986. }
  3987. }
  3988. },
  3989. "404": {
  3990. "description": "Not found",
  3991. "content": {
  3992. "application/json": {
  3993. "schema": {
  3994. "$ref": "#/components/schemas/NotFoundError"
  3995. }
  3996. }
  3997. }
  3998. }
  3999. },
  4000. "description": "Approve or deny a permission request from the AI assistant.",
  4001. "summary": "Respond to permission request",
  4002. "requestBody": {
  4003. "content": {
  4004. "application/json": {
  4005. "schema": {
  4006. "type": "object",
  4007. "properties": {
  4008. "reply": {
  4009. "type": "string",
  4010. "enum": ["once", "always", "reject"]
  4011. },
  4012. "message": {
  4013. "type": "string"
  4014. }
  4015. },
  4016. "required": ["reply"],
  4017. "additionalProperties": false
  4018. }
  4019. }
  4020. }
  4021. },
  4022. "x-codeSamples": [
  4023. {
  4024. "lang": "js",
  4025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4026. }
  4027. ]
  4028. }
  4029. },
  4030. "/provider": {
  4031. "get": {
  4032. "tags": ["provider"],
  4033. "operationId": "provider.list",
  4034. "parameters": [
  4035. {
  4036. "name": "directory",
  4037. "in": "query",
  4038. "required": false,
  4039. "schema": {
  4040. "type": "string"
  4041. }
  4042. },
  4043. {
  4044. "name": "workspace",
  4045. "in": "query",
  4046. "required": false,
  4047. "schema": {
  4048. "type": "string"
  4049. }
  4050. }
  4051. ],
  4052. "responses": {
  4053. "200": {
  4054. "description": "List of providers",
  4055. "content": {
  4056. "application/json": {
  4057. "schema": {
  4058. "type": "object",
  4059. "properties": {
  4060. "all": {
  4061. "type": "array",
  4062. "items": {
  4063. "$ref": "#/components/schemas/Provider"
  4064. }
  4065. },
  4066. "default": {
  4067. "type": "object",
  4068. "additionalProperties": {
  4069. "type": "string"
  4070. }
  4071. },
  4072. "connected": {
  4073. "type": "array",
  4074. "items": {
  4075. "type": "string"
  4076. }
  4077. }
  4078. },
  4079. "required": ["all", "default", "connected"],
  4080. "additionalProperties": false,
  4081. "description": "List of providers"
  4082. }
  4083. }
  4084. }
  4085. }
  4086. },
  4087. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4088. "summary": "List providers",
  4089. "x-codeSamples": [
  4090. {
  4091. "lang": "js",
  4092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4093. }
  4094. ]
  4095. }
  4096. },
  4097. "/provider/auth": {
  4098. "get": {
  4099. "tags": ["provider"],
  4100. "operationId": "provider.auth",
  4101. "parameters": [
  4102. {
  4103. "name": "directory",
  4104. "in": "query",
  4105. "required": false,
  4106. "schema": {
  4107. "type": "string"
  4108. }
  4109. },
  4110. {
  4111. "name": "workspace",
  4112. "in": "query",
  4113. "required": false,
  4114. "schema": {
  4115. "type": "string"
  4116. }
  4117. }
  4118. ],
  4119. "responses": {
  4120. "200": {
  4121. "description": "Provider auth methods",
  4122. "content": {
  4123. "application/json": {
  4124. "schema": {
  4125. "type": "object",
  4126. "additionalProperties": {
  4127. "type": "array",
  4128. "items": {
  4129. "$ref": "#/components/schemas/ProviderAuthMethod"
  4130. }
  4131. },
  4132. "description": "Provider auth methods"
  4133. }
  4134. }
  4135. }
  4136. }
  4137. },
  4138. "description": "Retrieve available authentication methods for all AI providers.",
  4139. "summary": "Get provider auth methods",
  4140. "x-codeSamples": [
  4141. {
  4142. "lang": "js",
  4143. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4144. }
  4145. ]
  4146. }
  4147. },
  4148. "/provider/{providerID}/oauth/authorize": {
  4149. "post": {
  4150. "tags": ["provider"],
  4151. "operationId": "provider.oauth.authorize",
  4152. "parameters": [
  4153. {
  4154. "name": "directory",
  4155. "in": "query",
  4156. "required": false,
  4157. "schema": {
  4158. "type": "string"
  4159. }
  4160. },
  4161. {
  4162. "name": "workspace",
  4163. "in": "query",
  4164. "required": false,
  4165. "schema": {
  4166. "type": "string"
  4167. }
  4168. },
  4169. {
  4170. "name": "providerID",
  4171. "in": "path",
  4172. "schema": {
  4173. "type": "string"
  4174. },
  4175. "required": true
  4176. }
  4177. ],
  4178. "responses": {
  4179. "200": {
  4180. "description": "Authorization URL and method",
  4181. "content": {
  4182. "application/json": {
  4183. "schema": {
  4184. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4185. }
  4186. }
  4187. }
  4188. },
  4189. "400": {
  4190. "description": "Bad request",
  4191. "content": {
  4192. "application/json": {
  4193. "schema": {
  4194. "$ref": "#/components/schemas/BadRequestError"
  4195. }
  4196. }
  4197. }
  4198. }
  4199. },
  4200. "description": "Start the OAuth authorization flow for a provider.",
  4201. "summary": "Start OAuth authorization",
  4202. "requestBody": {
  4203. "content": {
  4204. "application/json": {
  4205. "schema": {
  4206. "type": "object",
  4207. "properties": {
  4208. "method": {
  4209. "type": "number",
  4210. "description": "Auth method index"
  4211. },
  4212. "inputs": {
  4213. "type": "object",
  4214. "additionalProperties": {
  4215. "type": "string"
  4216. }
  4217. }
  4218. },
  4219. "required": ["method"],
  4220. "additionalProperties": false
  4221. }
  4222. }
  4223. }
  4224. },
  4225. "x-codeSamples": [
  4226. {
  4227. "lang": "js",
  4228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4229. }
  4230. ]
  4231. }
  4232. },
  4233. "/provider/{providerID}/oauth/callback": {
  4234. "post": {
  4235. "tags": ["provider"],
  4236. "operationId": "provider.oauth.callback",
  4237. "parameters": [
  4238. {
  4239. "name": "directory",
  4240. "in": "query",
  4241. "required": false,
  4242. "schema": {
  4243. "type": "string"
  4244. }
  4245. },
  4246. {
  4247. "name": "workspace",
  4248. "in": "query",
  4249. "required": false,
  4250. "schema": {
  4251. "type": "string"
  4252. }
  4253. },
  4254. {
  4255. "name": "providerID",
  4256. "in": "path",
  4257. "schema": {
  4258. "type": "string"
  4259. },
  4260. "required": true
  4261. }
  4262. ],
  4263. "responses": {
  4264. "200": {
  4265. "description": "OAuth callback processed successfully",
  4266. "content": {
  4267. "application/json": {
  4268. "schema": {
  4269. "type": "boolean",
  4270. "description": "OAuth callback processed successfully"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "description": "Bad request",
  4277. "content": {
  4278. "application/json": {
  4279. "schema": {
  4280. "$ref": "#/components/schemas/BadRequestError"
  4281. }
  4282. }
  4283. }
  4284. }
  4285. },
  4286. "description": "Handle the OAuth callback from a provider after user authorization.",
  4287. "summary": "Handle OAuth callback",
  4288. "requestBody": {
  4289. "content": {
  4290. "application/json": {
  4291. "schema": {
  4292. "type": "object",
  4293. "properties": {
  4294. "method": {
  4295. "type": "number",
  4296. "description": "Auth method index"
  4297. },
  4298. "code": {
  4299. "type": "string"
  4300. }
  4301. },
  4302. "required": ["method"],
  4303. "additionalProperties": false
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "x-codeSamples": [
  4309. {
  4310. "lang": "js",
  4311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4312. }
  4313. ]
  4314. }
  4315. },
  4316. "/session": {
  4317. "get": {
  4318. "tags": ["session"],
  4319. "operationId": "session.list",
  4320. "parameters": [
  4321. {
  4322. "name": "directory",
  4323. "in": "query",
  4324. "required": false,
  4325. "schema": {
  4326. "type": "string"
  4327. }
  4328. },
  4329. {
  4330. "name": "workspace",
  4331. "in": "query",
  4332. "required": false,
  4333. "schema": {
  4334. "type": "string"
  4335. }
  4336. },
  4337. {
  4338. "name": "scope",
  4339. "in": "query",
  4340. "schema": {
  4341. "type": "string",
  4342. "enum": ["project"]
  4343. },
  4344. "required": false
  4345. },
  4346. {
  4347. "name": "path",
  4348. "in": "query",
  4349. "schema": {
  4350. "type": "string"
  4351. },
  4352. "required": false
  4353. },
  4354. {
  4355. "name": "roots",
  4356. "in": "query",
  4357. "schema": {
  4358. "anyOf": [
  4359. {
  4360. "type": "boolean"
  4361. },
  4362. {
  4363. "type": "string",
  4364. "enum": ["true", "false"]
  4365. }
  4366. ]
  4367. },
  4368. "required": false
  4369. },
  4370. {
  4371. "name": "start",
  4372. "in": "query",
  4373. "schema": {
  4374. "type": "number"
  4375. },
  4376. "required": false
  4377. },
  4378. {
  4379. "name": "search",
  4380. "in": "query",
  4381. "schema": {
  4382. "type": "string"
  4383. },
  4384. "required": false
  4385. },
  4386. {
  4387. "name": "limit",
  4388. "in": "query",
  4389. "schema": {
  4390. "type": "number"
  4391. },
  4392. "required": false
  4393. }
  4394. ],
  4395. "responses": {
  4396. "200": {
  4397. "description": "List of sessions",
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "array",
  4402. "items": {
  4403. "$ref": "#/components/schemas/Session"
  4404. },
  4405. "description": "List of sessions"
  4406. }
  4407. }
  4408. }
  4409. }
  4410. },
  4411. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4412. "summary": "List sessions",
  4413. "x-codeSamples": [
  4414. {
  4415. "lang": "js",
  4416. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4417. }
  4418. ]
  4419. },
  4420. "post": {
  4421. "tags": ["session"],
  4422. "operationId": "session.create",
  4423. "parameters": [
  4424. {
  4425. "name": "directory",
  4426. "in": "query",
  4427. "required": false,
  4428. "schema": {
  4429. "type": "string"
  4430. }
  4431. },
  4432. {
  4433. "name": "workspace",
  4434. "in": "query",
  4435. "required": false,
  4436. "schema": {
  4437. "type": "string"
  4438. }
  4439. }
  4440. ],
  4441. "responses": {
  4442. "200": {
  4443. "description": "Successfully created session",
  4444. "content": {
  4445. "application/json": {
  4446. "schema": {
  4447. "$ref": "#/components/schemas/Session"
  4448. }
  4449. }
  4450. }
  4451. },
  4452. "400": {
  4453. "description": "Bad request",
  4454. "content": {
  4455. "application/json": {
  4456. "schema": {
  4457. "$ref": "#/components/schemas/BadRequestError"
  4458. }
  4459. }
  4460. }
  4461. }
  4462. },
  4463. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4464. "summary": "Create session",
  4465. "requestBody": {
  4466. "content": {
  4467. "application/json": {
  4468. "schema": {
  4469. "type": "object",
  4470. "properties": {
  4471. "parentID": {
  4472. "type": "string"
  4473. },
  4474. "title": {
  4475. "type": "string"
  4476. },
  4477. "agent": {
  4478. "type": "string"
  4479. },
  4480. "model": {
  4481. "type": "object",
  4482. "properties": {
  4483. "id": {
  4484. "type": "string"
  4485. },
  4486. "providerID": {
  4487. "type": "string"
  4488. },
  4489. "variant": {
  4490. "type": "string"
  4491. }
  4492. },
  4493. "required": ["id", "providerID"],
  4494. "additionalProperties": false
  4495. },
  4496. "permission": {
  4497. "$ref": "#/components/schemas/PermissionRuleset"
  4498. },
  4499. "workspaceID": {
  4500. "type": "string"
  4501. }
  4502. },
  4503. "additionalProperties": false
  4504. }
  4505. }
  4506. }
  4507. },
  4508. "x-codeSamples": [
  4509. {
  4510. "lang": "js",
  4511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4512. }
  4513. ]
  4514. }
  4515. },
  4516. "/session/status": {
  4517. "get": {
  4518. "tags": ["session"],
  4519. "operationId": "session.status",
  4520. "parameters": [
  4521. {
  4522. "name": "directory",
  4523. "in": "query",
  4524. "required": false,
  4525. "schema": {
  4526. "type": "string"
  4527. }
  4528. },
  4529. {
  4530. "name": "workspace",
  4531. "in": "query",
  4532. "required": false,
  4533. "schema": {
  4534. "type": "string"
  4535. }
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "description": "Get session status",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "type": "object",
  4545. "additionalProperties": {
  4546. "$ref": "#/components/schemas/SessionStatus"
  4547. },
  4548. "description": "Get session status"
  4549. }
  4550. }
  4551. }
  4552. },
  4553. "400": {
  4554. "description": "Bad request",
  4555. "content": {
  4556. "application/json": {
  4557. "schema": {
  4558. "$ref": "#/components/schemas/BadRequestError"
  4559. }
  4560. }
  4561. }
  4562. }
  4563. },
  4564. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4565. "summary": "Get session status",
  4566. "x-codeSamples": [
  4567. {
  4568. "lang": "js",
  4569. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4570. }
  4571. ]
  4572. }
  4573. },
  4574. "/session/{sessionID}": {
  4575. "get": {
  4576. "tags": ["session"],
  4577. "operationId": "session.get",
  4578. "parameters": [
  4579. {
  4580. "name": "directory",
  4581. "in": "query",
  4582. "required": false,
  4583. "schema": {
  4584. "type": "string"
  4585. }
  4586. },
  4587. {
  4588. "name": "workspace",
  4589. "in": "query",
  4590. "required": false,
  4591. "schema": {
  4592. "type": "string"
  4593. }
  4594. },
  4595. {
  4596. "name": "sessionID",
  4597. "in": "path",
  4598. "schema": {
  4599. "type": "string",
  4600. "pattern": "^ses.*"
  4601. },
  4602. "required": true
  4603. }
  4604. ],
  4605. "responses": {
  4606. "200": {
  4607. "description": "Get session",
  4608. "content": {
  4609. "application/json": {
  4610. "schema": {
  4611. "$ref": "#/components/schemas/Session"
  4612. }
  4613. }
  4614. }
  4615. },
  4616. "400": {
  4617. "description": "Bad request",
  4618. "content": {
  4619. "application/json": {
  4620. "schema": {
  4621. "$ref": "#/components/schemas/BadRequestError"
  4622. }
  4623. }
  4624. }
  4625. },
  4626. "404": {
  4627. "description": "NotFoundError",
  4628. "content": {
  4629. "application/json": {
  4630. "schema": {
  4631. "$ref": "#/components/schemas/NotFoundError"
  4632. }
  4633. }
  4634. }
  4635. }
  4636. },
  4637. "description": "Retrieve detailed information about a specific OpenCode session.",
  4638. "summary": "Get session",
  4639. "x-codeSamples": [
  4640. {
  4641. "lang": "js",
  4642. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4643. }
  4644. ]
  4645. },
  4646. "delete": {
  4647. "tags": ["session"],
  4648. "operationId": "session.delete",
  4649. "parameters": [
  4650. {
  4651. "name": "directory",
  4652. "in": "query",
  4653. "required": false,
  4654. "schema": {
  4655. "type": "string"
  4656. }
  4657. },
  4658. {
  4659. "name": "workspace",
  4660. "in": "query",
  4661. "required": false,
  4662. "schema": {
  4663. "type": "string"
  4664. }
  4665. },
  4666. {
  4667. "name": "sessionID",
  4668. "in": "path",
  4669. "schema": {
  4670. "type": "string",
  4671. "pattern": "^ses.*"
  4672. },
  4673. "required": true
  4674. }
  4675. ],
  4676. "responses": {
  4677. "200": {
  4678. "description": "Successfully deleted session",
  4679. "content": {
  4680. "application/json": {
  4681. "schema": {
  4682. "type": "boolean",
  4683. "description": "Successfully deleted session"
  4684. }
  4685. }
  4686. }
  4687. },
  4688. "400": {
  4689. "description": "Bad request",
  4690. "content": {
  4691. "application/json": {
  4692. "schema": {
  4693. "$ref": "#/components/schemas/BadRequestError"
  4694. }
  4695. }
  4696. }
  4697. },
  4698. "404": {
  4699. "description": "NotFoundError",
  4700. "content": {
  4701. "application/json": {
  4702. "schema": {
  4703. "$ref": "#/components/schemas/NotFoundError"
  4704. }
  4705. }
  4706. }
  4707. }
  4708. },
  4709. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4710. "summary": "Delete session",
  4711. "x-codeSamples": [
  4712. {
  4713. "lang": "js",
  4714. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4715. }
  4716. ]
  4717. },
  4718. "patch": {
  4719. "tags": ["session"],
  4720. "operationId": "session.update",
  4721. "parameters": [
  4722. {
  4723. "name": "directory",
  4724. "in": "query",
  4725. "required": false,
  4726. "schema": {
  4727. "type": "string"
  4728. }
  4729. },
  4730. {
  4731. "name": "workspace",
  4732. "in": "query",
  4733. "required": false,
  4734. "schema": {
  4735. "type": "string"
  4736. }
  4737. },
  4738. {
  4739. "name": "sessionID",
  4740. "in": "path",
  4741. "schema": {
  4742. "type": "string",
  4743. "pattern": "^ses.*"
  4744. },
  4745. "required": true
  4746. }
  4747. ],
  4748. "responses": {
  4749. "200": {
  4750. "description": "Successfully updated session",
  4751. "content": {
  4752. "application/json": {
  4753. "schema": {
  4754. "$ref": "#/components/schemas/Session"
  4755. }
  4756. }
  4757. }
  4758. },
  4759. "400": {
  4760. "description": "Bad request",
  4761. "content": {
  4762. "application/json": {
  4763. "schema": {
  4764. "$ref": "#/components/schemas/BadRequestError"
  4765. }
  4766. }
  4767. }
  4768. },
  4769. "404": {
  4770. "description": "NotFoundError",
  4771. "content": {
  4772. "application/json": {
  4773. "schema": {
  4774. "$ref": "#/components/schemas/NotFoundError"
  4775. }
  4776. }
  4777. }
  4778. }
  4779. },
  4780. "description": "Update properties of an existing session, such as title or other metadata.",
  4781. "summary": "Update session",
  4782. "requestBody": {
  4783. "content": {
  4784. "application/json": {
  4785. "schema": {
  4786. "type": "object",
  4787. "properties": {
  4788. "title": {
  4789. "type": "string"
  4790. },
  4791. "permission": {
  4792. "$ref": "#/components/schemas/PermissionRuleset"
  4793. },
  4794. "time": {
  4795. "type": "object",
  4796. "properties": {
  4797. "archived": {
  4798. "type": "number"
  4799. }
  4800. },
  4801. "additionalProperties": false
  4802. }
  4803. },
  4804. "additionalProperties": false
  4805. }
  4806. }
  4807. }
  4808. },
  4809. "x-codeSamples": [
  4810. {
  4811. "lang": "js",
  4812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4813. }
  4814. ]
  4815. }
  4816. },
  4817. "/session/{sessionID}/children": {
  4818. "get": {
  4819. "tags": ["session"],
  4820. "operationId": "session.children",
  4821. "parameters": [
  4822. {
  4823. "name": "directory",
  4824. "in": "query",
  4825. "required": false,
  4826. "schema": {
  4827. "type": "string"
  4828. }
  4829. },
  4830. {
  4831. "name": "workspace",
  4832. "in": "query",
  4833. "required": false,
  4834. "schema": {
  4835. "type": "string"
  4836. }
  4837. },
  4838. {
  4839. "name": "sessionID",
  4840. "in": "path",
  4841. "schema": {
  4842. "type": "string",
  4843. "pattern": "^ses.*"
  4844. },
  4845. "required": true
  4846. }
  4847. ],
  4848. "responses": {
  4849. "200": {
  4850. "description": "List of children",
  4851. "content": {
  4852. "application/json": {
  4853. "schema": {
  4854. "type": "array",
  4855. "items": {
  4856. "$ref": "#/components/schemas/Session"
  4857. },
  4858. "description": "List of children"
  4859. }
  4860. }
  4861. }
  4862. },
  4863. "400": {
  4864. "description": "Bad request",
  4865. "content": {
  4866. "application/json": {
  4867. "schema": {
  4868. "$ref": "#/components/schemas/BadRequestError"
  4869. }
  4870. }
  4871. }
  4872. },
  4873. "404": {
  4874. "description": "Not found",
  4875. "content": {
  4876. "application/json": {
  4877. "schema": {
  4878. "$ref": "#/components/schemas/NotFoundError"
  4879. }
  4880. }
  4881. }
  4882. }
  4883. },
  4884. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4885. "summary": "Get session children",
  4886. "x-codeSamples": [
  4887. {
  4888. "lang": "js",
  4889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4890. }
  4891. ]
  4892. }
  4893. },
  4894. "/session/{sessionID}/todo": {
  4895. "get": {
  4896. "tags": ["session"],
  4897. "operationId": "session.todo",
  4898. "parameters": [
  4899. {
  4900. "name": "directory",
  4901. "in": "query",
  4902. "required": false,
  4903. "schema": {
  4904. "type": "string"
  4905. }
  4906. },
  4907. {
  4908. "name": "workspace",
  4909. "in": "query",
  4910. "required": false,
  4911. "schema": {
  4912. "type": "string"
  4913. }
  4914. },
  4915. {
  4916. "name": "sessionID",
  4917. "in": "path",
  4918. "schema": {
  4919. "type": "string",
  4920. "pattern": "^ses.*"
  4921. },
  4922. "required": true
  4923. }
  4924. ],
  4925. "responses": {
  4926. "200": {
  4927. "description": "Todo list",
  4928. "content": {
  4929. "application/json": {
  4930. "schema": {
  4931. "type": "array",
  4932. "items": {
  4933. "$ref": "#/components/schemas/Todo"
  4934. },
  4935. "description": "Todo list"
  4936. }
  4937. }
  4938. }
  4939. },
  4940. "400": {
  4941. "description": "Bad request",
  4942. "content": {
  4943. "application/json": {
  4944. "schema": {
  4945. "$ref": "#/components/schemas/BadRequestError"
  4946. }
  4947. }
  4948. }
  4949. },
  4950. "404": {
  4951. "description": "Not found",
  4952. "content": {
  4953. "application/json": {
  4954. "schema": {
  4955. "$ref": "#/components/schemas/NotFoundError"
  4956. }
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4962. "summary": "Get session todos",
  4963. "x-codeSamples": [
  4964. {
  4965. "lang": "js",
  4966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4967. }
  4968. ]
  4969. }
  4970. },
  4971. "/session/{sessionID}/diff": {
  4972. "get": {
  4973. "tags": ["session"],
  4974. "operationId": "session.diff",
  4975. "parameters": [
  4976. {
  4977. "name": "directory",
  4978. "in": "query",
  4979. "required": false,
  4980. "schema": {
  4981. "type": "string"
  4982. }
  4983. },
  4984. {
  4985. "name": "workspace",
  4986. "in": "query",
  4987. "required": false,
  4988. "schema": {
  4989. "type": "string"
  4990. }
  4991. },
  4992. {
  4993. "name": "sessionID",
  4994. "in": "path",
  4995. "schema": {
  4996. "type": "string",
  4997. "pattern": "^ses.*"
  4998. },
  4999. "required": true
  5000. },
  5001. {
  5002. "name": "messageID",
  5003. "in": "query",
  5004. "schema": {
  5005. "type": "string",
  5006. "pattern": "^msg.*"
  5007. },
  5008. "required": false
  5009. }
  5010. ],
  5011. "responses": {
  5012. "200": {
  5013. "description": "Successfully retrieved diff",
  5014. "content": {
  5015. "application/json": {
  5016. "schema": {
  5017. "type": "array",
  5018. "items": {
  5019. "$ref": "#/components/schemas/SnapshotFileDiff"
  5020. },
  5021. "description": "Successfully retrieved diff"
  5022. }
  5023. }
  5024. }
  5025. }
  5026. },
  5027. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5028. "summary": "Get message diff",
  5029. "x-codeSamples": [
  5030. {
  5031. "lang": "js",
  5032. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5033. }
  5034. ]
  5035. }
  5036. },
  5037. "/session/{sessionID}/message": {
  5038. "get": {
  5039. "tags": ["session"],
  5040. "operationId": "session.messages",
  5041. "parameters": [
  5042. {
  5043. "name": "directory",
  5044. "in": "query",
  5045. "required": false,
  5046. "schema": {
  5047. "type": "string"
  5048. }
  5049. },
  5050. {
  5051. "name": "workspace",
  5052. "in": "query",
  5053. "required": false,
  5054. "schema": {
  5055. "type": "string"
  5056. }
  5057. },
  5058. {
  5059. "name": "sessionID",
  5060. "in": "path",
  5061. "schema": {
  5062. "type": "string",
  5063. "pattern": "^ses.*"
  5064. },
  5065. "required": true
  5066. },
  5067. {
  5068. "name": "limit",
  5069. "in": "query",
  5070. "schema": {
  5071. "type": "integer",
  5072. "minimum": 0,
  5073. "maximum": 9007199254740991
  5074. },
  5075. "required": false
  5076. },
  5077. {
  5078. "name": "before",
  5079. "in": "query",
  5080. "schema": {
  5081. "type": "string"
  5082. },
  5083. "required": false
  5084. }
  5085. ],
  5086. "responses": {
  5087. "200": {
  5088. "description": "List of messages",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "type": "array",
  5093. "items": {
  5094. "type": "object",
  5095. "properties": {
  5096. "info": {
  5097. "$ref": "#/components/schemas/Message"
  5098. },
  5099. "parts": {
  5100. "type": "array",
  5101. "items": {
  5102. "$ref": "#/components/schemas/Part"
  5103. }
  5104. }
  5105. },
  5106. "required": ["info", "parts"],
  5107. "additionalProperties": false
  5108. },
  5109. "description": "List of messages"
  5110. }
  5111. }
  5112. }
  5113. },
  5114. "400": {
  5115. "description": "Bad request",
  5116. "content": {
  5117. "application/json": {
  5118. "schema": {
  5119. "$ref": "#/components/schemas/BadRequestError"
  5120. }
  5121. }
  5122. }
  5123. },
  5124. "404": {
  5125. "description": "NotFoundError",
  5126. "content": {
  5127. "application/json": {
  5128. "schema": {
  5129. "$ref": "#/components/schemas/NotFoundError"
  5130. }
  5131. }
  5132. }
  5133. }
  5134. },
  5135. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5136. "summary": "Get session messages",
  5137. "x-codeSamples": [
  5138. {
  5139. "lang": "js",
  5140. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5141. }
  5142. ]
  5143. },
  5144. "post": {
  5145. "tags": ["session"],
  5146. "operationId": "session.prompt",
  5147. "parameters": [
  5148. {
  5149. "name": "directory",
  5150. "in": "query",
  5151. "required": false,
  5152. "schema": {
  5153. "type": "string"
  5154. }
  5155. },
  5156. {
  5157. "name": "workspace",
  5158. "in": "query",
  5159. "required": false,
  5160. "schema": {
  5161. "type": "string"
  5162. }
  5163. },
  5164. {
  5165. "name": "sessionID",
  5166. "in": "path",
  5167. "schema": {
  5168. "type": "string",
  5169. "pattern": "^ses.*"
  5170. },
  5171. "required": true
  5172. }
  5173. ],
  5174. "responses": {
  5175. "200": {
  5176. "description": "Created message",
  5177. "content": {
  5178. "application/json": {
  5179. "schema": {
  5180. "type": "object",
  5181. "required": ["info", "parts"],
  5182. "properties": {
  5183. "info": {
  5184. "$ref": "#/components/schemas/AssistantMessage"
  5185. },
  5186. "parts": {
  5187. "type": "array",
  5188. "items": {
  5189. "$ref": "#/components/schemas/Part"
  5190. }
  5191. }
  5192. }
  5193. }
  5194. }
  5195. }
  5196. },
  5197. "400": {
  5198. "description": "Bad request",
  5199. "content": {
  5200. "application/json": {
  5201. "schema": {
  5202. "$ref": "#/components/schemas/BadRequestError"
  5203. }
  5204. }
  5205. }
  5206. },
  5207. "404": {
  5208. "description": "Not found",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "$ref": "#/components/schemas/NotFoundError"
  5213. }
  5214. }
  5215. }
  5216. }
  5217. },
  5218. "description": "Create and send a new message to a session, streaming the AI response.",
  5219. "summary": "Send message",
  5220. "requestBody": {
  5221. "content": {
  5222. "application/json": {
  5223. "schema": {
  5224. "type": "object",
  5225. "properties": {
  5226. "messageID": {
  5227. "type": "string"
  5228. },
  5229. "model": {
  5230. "type": "object",
  5231. "properties": {
  5232. "providerID": {
  5233. "type": "string"
  5234. },
  5235. "modelID": {
  5236. "type": "string"
  5237. }
  5238. },
  5239. "required": ["providerID", "modelID"],
  5240. "additionalProperties": false
  5241. },
  5242. "agent": {
  5243. "type": "string"
  5244. },
  5245. "noReply": {
  5246. "type": "boolean"
  5247. },
  5248. "tools": {
  5249. "type": "object",
  5250. "additionalProperties": {
  5251. "type": "boolean"
  5252. }
  5253. },
  5254. "format": {
  5255. "$ref": "#/components/schemas/OutputFormat"
  5256. },
  5257. "system": {
  5258. "type": "string"
  5259. },
  5260. "variant": {
  5261. "type": "string"
  5262. },
  5263. "parts": {
  5264. "type": "array",
  5265. "items": {
  5266. "anyOf": [
  5267. {
  5268. "$ref": "#/components/schemas/TextPartInput"
  5269. },
  5270. {
  5271. "$ref": "#/components/schemas/FilePartInput"
  5272. },
  5273. {
  5274. "$ref": "#/components/schemas/AgentPartInput"
  5275. },
  5276. {
  5277. "$ref": "#/components/schemas/SubtaskPartInput"
  5278. }
  5279. ]
  5280. }
  5281. }
  5282. },
  5283. "required": ["parts"],
  5284. "additionalProperties": false
  5285. }
  5286. }
  5287. }
  5288. },
  5289. "x-codeSamples": [
  5290. {
  5291. "lang": "js",
  5292. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5293. }
  5294. ]
  5295. }
  5296. },
  5297. "/session/{sessionID}/message/{messageID}": {
  5298. "get": {
  5299. "tags": ["session"],
  5300. "operationId": "session.message",
  5301. "parameters": [
  5302. {
  5303. "name": "directory",
  5304. "in": "query",
  5305. "required": false,
  5306. "schema": {
  5307. "type": "string"
  5308. }
  5309. },
  5310. {
  5311. "name": "workspace",
  5312. "in": "query",
  5313. "required": false,
  5314. "schema": {
  5315. "type": "string"
  5316. }
  5317. },
  5318. {
  5319. "name": "sessionID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string",
  5323. "pattern": "^ses.*"
  5324. },
  5325. "required": true
  5326. },
  5327. {
  5328. "name": "messageID",
  5329. "in": "path",
  5330. "schema": {
  5331. "type": "string",
  5332. "pattern": "^msg.*"
  5333. },
  5334. "required": true
  5335. }
  5336. ],
  5337. "responses": {
  5338. "200": {
  5339. "description": "Message",
  5340. "content": {
  5341. "application/json": {
  5342. "schema": {
  5343. "type": "object",
  5344. "properties": {
  5345. "info": {
  5346. "$ref": "#/components/schemas/Message"
  5347. },
  5348. "parts": {
  5349. "type": "array",
  5350. "items": {
  5351. "$ref": "#/components/schemas/Part"
  5352. }
  5353. }
  5354. },
  5355. "required": ["info", "parts"],
  5356. "additionalProperties": false,
  5357. "description": "Message"
  5358. }
  5359. }
  5360. }
  5361. },
  5362. "400": {
  5363. "description": "Bad request",
  5364. "content": {
  5365. "application/json": {
  5366. "schema": {
  5367. "$ref": "#/components/schemas/BadRequestError"
  5368. }
  5369. }
  5370. }
  5371. },
  5372. "404": {
  5373. "description": "NotFoundError",
  5374. "content": {
  5375. "application/json": {
  5376. "schema": {
  5377. "$ref": "#/components/schemas/NotFoundError"
  5378. }
  5379. }
  5380. }
  5381. }
  5382. },
  5383. "description": "Retrieve a specific message from a session by its message ID.",
  5384. "summary": "Get message",
  5385. "x-codeSamples": [
  5386. {
  5387. "lang": "js",
  5388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5389. }
  5390. ]
  5391. },
  5392. "delete": {
  5393. "tags": ["session"],
  5394. "operationId": "session.deleteMessage",
  5395. "parameters": [
  5396. {
  5397. "name": "directory",
  5398. "in": "query",
  5399. "required": false,
  5400. "schema": {
  5401. "type": "string"
  5402. }
  5403. },
  5404. {
  5405. "name": "workspace",
  5406. "in": "query",
  5407. "required": false,
  5408. "schema": {
  5409. "type": "string"
  5410. }
  5411. },
  5412. {
  5413. "name": "sessionID",
  5414. "in": "path",
  5415. "schema": {
  5416. "type": "string",
  5417. "pattern": "^ses.*"
  5418. },
  5419. "required": true
  5420. },
  5421. {
  5422. "name": "messageID",
  5423. "in": "path",
  5424. "schema": {
  5425. "type": "string",
  5426. "pattern": "^msg.*"
  5427. },
  5428. "required": true
  5429. }
  5430. ],
  5431. "responses": {
  5432. "200": {
  5433. "description": "Successfully deleted message",
  5434. "content": {
  5435. "application/json": {
  5436. "schema": {
  5437. "type": "boolean",
  5438. "description": "Successfully deleted message"
  5439. }
  5440. }
  5441. }
  5442. },
  5443. "400": {
  5444. "description": "Bad request",
  5445. "content": {
  5446. "application/json": {
  5447. "schema": {
  5448. "$ref": "#/components/schemas/BadRequestError"
  5449. }
  5450. }
  5451. }
  5452. },
  5453. "404": {
  5454. "description": "Not found",
  5455. "content": {
  5456. "application/json": {
  5457. "schema": {
  5458. "$ref": "#/components/schemas/NotFoundError"
  5459. }
  5460. }
  5461. }
  5462. }
  5463. },
  5464. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5465. "summary": "Delete message",
  5466. "x-codeSamples": [
  5467. {
  5468. "lang": "js",
  5469. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5470. }
  5471. ]
  5472. }
  5473. },
  5474. "/session/{sessionID}/fork": {
  5475. "post": {
  5476. "tags": ["session"],
  5477. "operationId": "session.fork",
  5478. "parameters": [
  5479. {
  5480. "name": "directory",
  5481. "in": "query",
  5482. "required": false,
  5483. "schema": {
  5484. "type": "string"
  5485. }
  5486. },
  5487. {
  5488. "name": "workspace",
  5489. "in": "query",
  5490. "required": false,
  5491. "schema": {
  5492. "type": "string"
  5493. }
  5494. },
  5495. {
  5496. "name": "sessionID",
  5497. "in": "path",
  5498. "schema": {
  5499. "type": "string",
  5500. "pattern": "^ses.*"
  5501. },
  5502. "required": true
  5503. }
  5504. ],
  5505. "responses": {
  5506. "200": {
  5507. "description": "200",
  5508. "content": {
  5509. "application/json": {
  5510. "schema": {
  5511. "$ref": "#/components/schemas/Session"
  5512. }
  5513. }
  5514. }
  5515. },
  5516. "404": {
  5517. "description": "NotFoundError",
  5518. "content": {
  5519. "application/json": {
  5520. "schema": {
  5521. "$ref": "#/components/schemas/NotFoundError"
  5522. }
  5523. }
  5524. }
  5525. }
  5526. },
  5527. "description": "Create a new session by forking an existing session at a specific message point.",
  5528. "summary": "Fork session",
  5529. "requestBody": {
  5530. "content": {
  5531. "application/json": {
  5532. "schema": {
  5533. "type": "object",
  5534. "properties": {
  5535. "messageID": {
  5536. "type": "string"
  5537. }
  5538. },
  5539. "additionalProperties": false
  5540. }
  5541. }
  5542. }
  5543. },
  5544. "x-codeSamples": [
  5545. {
  5546. "lang": "js",
  5547. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5548. }
  5549. ]
  5550. }
  5551. },
  5552. "/session/{sessionID}/abort": {
  5553. "post": {
  5554. "tags": ["session"],
  5555. "operationId": "session.abort",
  5556. "parameters": [
  5557. {
  5558. "name": "directory",
  5559. "in": "query",
  5560. "required": false,
  5561. "schema": {
  5562. "type": "string"
  5563. }
  5564. },
  5565. {
  5566. "name": "workspace",
  5567. "in": "query",
  5568. "required": false,
  5569. "schema": {
  5570. "type": "string"
  5571. }
  5572. },
  5573. {
  5574. "name": "sessionID",
  5575. "in": "path",
  5576. "schema": {
  5577. "type": "string",
  5578. "pattern": "^ses.*"
  5579. },
  5580. "required": true
  5581. }
  5582. ],
  5583. "responses": {
  5584. "200": {
  5585. "description": "Aborted session",
  5586. "content": {
  5587. "application/json": {
  5588. "schema": {
  5589. "type": "boolean",
  5590. "description": "Aborted session"
  5591. }
  5592. }
  5593. }
  5594. },
  5595. "400": {
  5596. "description": "Bad request",
  5597. "content": {
  5598. "application/json": {
  5599. "schema": {
  5600. "$ref": "#/components/schemas/BadRequestError"
  5601. }
  5602. }
  5603. }
  5604. },
  5605. "404": {
  5606. "description": "Not found",
  5607. "content": {
  5608. "application/json": {
  5609. "schema": {
  5610. "$ref": "#/components/schemas/NotFoundError"
  5611. }
  5612. }
  5613. }
  5614. }
  5615. },
  5616. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5617. "summary": "Abort session",
  5618. "x-codeSamples": [
  5619. {
  5620. "lang": "js",
  5621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5622. }
  5623. ]
  5624. }
  5625. },
  5626. "/session/{sessionID}/init": {
  5627. "post": {
  5628. "tags": ["session"],
  5629. "operationId": "session.init",
  5630. "parameters": [
  5631. {
  5632. "name": "directory",
  5633. "in": "query",
  5634. "required": false,
  5635. "schema": {
  5636. "type": "string"
  5637. }
  5638. },
  5639. {
  5640. "name": "workspace",
  5641. "in": "query",
  5642. "required": false,
  5643. "schema": {
  5644. "type": "string"
  5645. }
  5646. },
  5647. {
  5648. "name": "sessionID",
  5649. "in": "path",
  5650. "schema": {
  5651. "type": "string",
  5652. "pattern": "^ses.*"
  5653. },
  5654. "required": true
  5655. }
  5656. ],
  5657. "responses": {
  5658. "200": {
  5659. "description": "200",
  5660. "content": {
  5661. "application/json": {
  5662. "schema": {
  5663. "type": "boolean",
  5664. "description": "200"
  5665. }
  5666. }
  5667. }
  5668. },
  5669. "400": {
  5670. "description": "Bad request",
  5671. "content": {
  5672. "application/json": {
  5673. "schema": {
  5674. "$ref": "#/components/schemas/BadRequestError"
  5675. }
  5676. }
  5677. }
  5678. },
  5679. "404": {
  5680. "description": "Not found",
  5681. "content": {
  5682. "application/json": {
  5683. "schema": {
  5684. "$ref": "#/components/schemas/NotFoundError"
  5685. }
  5686. }
  5687. }
  5688. }
  5689. },
  5690. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5691. "summary": "Initialize session",
  5692. "requestBody": {
  5693. "content": {
  5694. "application/json": {
  5695. "schema": {
  5696. "type": "object",
  5697. "properties": {
  5698. "modelID": {
  5699. "type": "string"
  5700. },
  5701. "providerID": {
  5702. "type": "string"
  5703. },
  5704. "messageID": {
  5705. "type": "string"
  5706. }
  5707. },
  5708. "required": ["modelID", "providerID", "messageID"],
  5709. "additionalProperties": false
  5710. }
  5711. }
  5712. }
  5713. },
  5714. "x-codeSamples": [
  5715. {
  5716. "lang": "js",
  5717. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5718. }
  5719. ]
  5720. }
  5721. },
  5722. "/session/{sessionID}/share": {
  5723. "post": {
  5724. "tags": ["session"],
  5725. "operationId": "session.share",
  5726. "parameters": [
  5727. {
  5728. "name": "directory",
  5729. "in": "query",
  5730. "required": false,
  5731. "schema": {
  5732. "type": "string"
  5733. }
  5734. },
  5735. {
  5736. "name": "workspace",
  5737. "in": "query",
  5738. "required": false,
  5739. "schema": {
  5740. "type": "string"
  5741. }
  5742. },
  5743. {
  5744. "name": "sessionID",
  5745. "in": "path",
  5746. "schema": {
  5747. "type": "string",
  5748. "pattern": "^ses.*"
  5749. },
  5750. "required": true
  5751. }
  5752. ],
  5753. "responses": {
  5754. "200": {
  5755. "description": "Successfully shared session",
  5756. "content": {
  5757. "application/json": {
  5758. "schema": {
  5759. "$ref": "#/components/schemas/Session"
  5760. }
  5761. }
  5762. }
  5763. },
  5764. "400": {
  5765. "description": "Bad request",
  5766. "content": {
  5767. "application/json": {
  5768. "schema": {
  5769. "$ref": "#/components/schemas/BadRequestError"
  5770. }
  5771. }
  5772. }
  5773. },
  5774. "404": {
  5775. "description": "NotFoundError",
  5776. "content": {
  5777. "application/json": {
  5778. "schema": {
  5779. "$ref": "#/components/schemas/NotFoundError"
  5780. }
  5781. }
  5782. }
  5783. }
  5784. },
  5785. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5786. "summary": "Share session",
  5787. "x-codeSamples": [
  5788. {
  5789. "lang": "js",
  5790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5791. }
  5792. ]
  5793. },
  5794. "delete": {
  5795. "tags": ["session"],
  5796. "operationId": "session.unshare",
  5797. "parameters": [
  5798. {
  5799. "name": "directory",
  5800. "in": "query",
  5801. "required": false,
  5802. "schema": {
  5803. "type": "string"
  5804. }
  5805. },
  5806. {
  5807. "name": "workspace",
  5808. "in": "query",
  5809. "required": false,
  5810. "schema": {
  5811. "type": "string"
  5812. }
  5813. },
  5814. {
  5815. "name": "sessionID",
  5816. "in": "path",
  5817. "schema": {
  5818. "type": "string",
  5819. "pattern": "^ses.*"
  5820. },
  5821. "required": true
  5822. }
  5823. ],
  5824. "responses": {
  5825. "200": {
  5826. "description": "Successfully unshared session",
  5827. "content": {
  5828. "application/json": {
  5829. "schema": {
  5830. "$ref": "#/components/schemas/Session"
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "400": {
  5836. "description": "Bad request",
  5837. "content": {
  5838. "application/json": {
  5839. "schema": {
  5840. "$ref": "#/components/schemas/BadRequestError"
  5841. }
  5842. }
  5843. }
  5844. },
  5845. "404": {
  5846. "description": "NotFoundError",
  5847. "content": {
  5848. "application/json": {
  5849. "schema": {
  5850. "$ref": "#/components/schemas/NotFoundError"
  5851. }
  5852. }
  5853. }
  5854. }
  5855. },
  5856. "description": "Remove the shareable link for a session, making it private again.",
  5857. "summary": "Unshare session",
  5858. "x-codeSamples": [
  5859. {
  5860. "lang": "js",
  5861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5862. }
  5863. ]
  5864. }
  5865. },
  5866. "/session/{sessionID}/summarize": {
  5867. "post": {
  5868. "tags": ["session"],
  5869. "operationId": "session.summarize",
  5870. "parameters": [
  5871. {
  5872. "name": "directory",
  5873. "in": "query",
  5874. "required": false,
  5875. "schema": {
  5876. "type": "string"
  5877. }
  5878. },
  5879. {
  5880. "name": "workspace",
  5881. "in": "query",
  5882. "required": false,
  5883. "schema": {
  5884. "type": "string"
  5885. }
  5886. },
  5887. {
  5888. "name": "sessionID",
  5889. "in": "path",
  5890. "schema": {
  5891. "type": "string",
  5892. "pattern": "^ses.*"
  5893. },
  5894. "required": true
  5895. }
  5896. ],
  5897. "responses": {
  5898. "200": {
  5899. "description": "Summarized session",
  5900. "content": {
  5901. "application/json": {
  5902. "schema": {
  5903. "type": "boolean",
  5904. "description": "Summarized session"
  5905. }
  5906. }
  5907. }
  5908. },
  5909. "400": {
  5910. "description": "Bad request",
  5911. "content": {
  5912. "application/json": {
  5913. "schema": {
  5914. "$ref": "#/components/schemas/BadRequestError"
  5915. }
  5916. }
  5917. }
  5918. },
  5919. "404": {
  5920. "description": "NotFoundError",
  5921. "content": {
  5922. "application/json": {
  5923. "schema": {
  5924. "$ref": "#/components/schemas/NotFoundError"
  5925. }
  5926. }
  5927. }
  5928. }
  5929. },
  5930. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5931. "summary": "Summarize session",
  5932. "requestBody": {
  5933. "content": {
  5934. "application/json": {
  5935. "schema": {
  5936. "type": "object",
  5937. "properties": {
  5938. "providerID": {
  5939. "type": "string"
  5940. },
  5941. "modelID": {
  5942. "type": "string"
  5943. },
  5944. "auto": {
  5945. "type": "boolean"
  5946. }
  5947. },
  5948. "required": ["providerID", "modelID"],
  5949. "additionalProperties": false
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "x-codeSamples": [
  5955. {
  5956. "lang": "js",
  5957. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5958. }
  5959. ]
  5960. }
  5961. },
  5962. "/session/{sessionID}/prompt_async": {
  5963. "post": {
  5964. "tags": ["session"],
  5965. "operationId": "session.prompt_async",
  5966. "parameters": [
  5967. {
  5968. "name": "directory",
  5969. "in": "query",
  5970. "required": false,
  5971. "schema": {
  5972. "type": "string"
  5973. }
  5974. },
  5975. {
  5976. "name": "workspace",
  5977. "in": "query",
  5978. "required": false,
  5979. "schema": {
  5980. "type": "string"
  5981. }
  5982. },
  5983. {
  5984. "name": "sessionID",
  5985. "in": "path",
  5986. "schema": {
  5987. "type": "string",
  5988. "pattern": "^ses.*"
  5989. },
  5990. "required": true
  5991. }
  5992. ],
  5993. "responses": {
  5994. "204": {
  5995. "description": "Prompt accepted"
  5996. },
  5997. "400": {
  5998. "description": "Bad request",
  5999. "content": {
  6000. "application/json": {
  6001. "schema": {
  6002. "$ref": "#/components/schemas/BadRequestError"
  6003. }
  6004. }
  6005. }
  6006. },
  6007. "404": {
  6008. "description": "Not found",
  6009. "content": {
  6010. "application/json": {
  6011. "schema": {
  6012. "$ref": "#/components/schemas/NotFoundError"
  6013. }
  6014. }
  6015. }
  6016. }
  6017. },
  6018. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6019. "summary": "Send async message",
  6020. "requestBody": {
  6021. "content": {
  6022. "application/json": {
  6023. "schema": {
  6024. "type": "object",
  6025. "properties": {
  6026. "messageID": {
  6027. "type": "string"
  6028. },
  6029. "model": {
  6030. "type": "object",
  6031. "properties": {
  6032. "providerID": {
  6033. "type": "string"
  6034. },
  6035. "modelID": {
  6036. "type": "string"
  6037. }
  6038. },
  6039. "required": ["providerID", "modelID"],
  6040. "additionalProperties": false
  6041. },
  6042. "agent": {
  6043. "type": "string"
  6044. },
  6045. "noReply": {
  6046. "type": "boolean"
  6047. },
  6048. "tools": {
  6049. "type": "object",
  6050. "additionalProperties": {
  6051. "type": "boolean"
  6052. }
  6053. },
  6054. "format": {
  6055. "$ref": "#/components/schemas/OutputFormat"
  6056. },
  6057. "system": {
  6058. "type": "string"
  6059. },
  6060. "variant": {
  6061. "type": "string"
  6062. },
  6063. "parts": {
  6064. "type": "array",
  6065. "items": {
  6066. "anyOf": [
  6067. {
  6068. "$ref": "#/components/schemas/TextPartInput"
  6069. },
  6070. {
  6071. "$ref": "#/components/schemas/FilePartInput"
  6072. },
  6073. {
  6074. "$ref": "#/components/schemas/AgentPartInput"
  6075. },
  6076. {
  6077. "$ref": "#/components/schemas/SubtaskPartInput"
  6078. }
  6079. ]
  6080. }
  6081. }
  6082. },
  6083. "required": ["parts"],
  6084. "additionalProperties": false
  6085. }
  6086. }
  6087. }
  6088. },
  6089. "x-codeSamples": [
  6090. {
  6091. "lang": "js",
  6092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6093. }
  6094. ]
  6095. }
  6096. },
  6097. "/session/{sessionID}/command": {
  6098. "post": {
  6099. "tags": ["session"],
  6100. "operationId": "session.command",
  6101. "parameters": [
  6102. {
  6103. "name": "directory",
  6104. "in": "query",
  6105. "required": false,
  6106. "schema": {
  6107. "type": "string"
  6108. }
  6109. },
  6110. {
  6111. "name": "workspace",
  6112. "in": "query",
  6113. "required": false,
  6114. "schema": {
  6115. "type": "string"
  6116. }
  6117. },
  6118. {
  6119. "name": "sessionID",
  6120. "in": "path",
  6121. "schema": {
  6122. "type": "string",
  6123. "pattern": "^ses.*"
  6124. },
  6125. "required": true
  6126. }
  6127. ],
  6128. "responses": {
  6129. "200": {
  6130. "description": "Created message",
  6131. "content": {
  6132. "application/json": {
  6133. "schema": {
  6134. "type": "object",
  6135. "required": ["info", "parts"],
  6136. "properties": {
  6137. "info": {
  6138. "$ref": "#/components/schemas/AssistantMessage"
  6139. },
  6140. "parts": {
  6141. "type": "array",
  6142. "items": {
  6143. "$ref": "#/components/schemas/Part"
  6144. }
  6145. }
  6146. }
  6147. }
  6148. }
  6149. }
  6150. },
  6151. "400": {
  6152. "description": "Bad request",
  6153. "content": {
  6154. "application/json": {
  6155. "schema": {
  6156. "$ref": "#/components/schemas/BadRequestError"
  6157. }
  6158. }
  6159. }
  6160. },
  6161. "404": {
  6162. "description": "Not found",
  6163. "content": {
  6164. "application/json": {
  6165. "schema": {
  6166. "$ref": "#/components/schemas/NotFoundError"
  6167. }
  6168. }
  6169. }
  6170. }
  6171. },
  6172. "description": "Send a new command to a session for execution by the AI assistant.",
  6173. "summary": "Send command",
  6174. "requestBody": {
  6175. "content": {
  6176. "application/json": {
  6177. "schema": {
  6178. "type": "object",
  6179. "properties": {
  6180. "messageID": {
  6181. "type": "string"
  6182. },
  6183. "agent": {
  6184. "type": "string"
  6185. },
  6186. "model": {
  6187. "type": "string"
  6188. },
  6189. "arguments": {
  6190. "type": "string"
  6191. },
  6192. "command": {
  6193. "type": "string"
  6194. },
  6195. "variant": {
  6196. "type": "string"
  6197. },
  6198. "parts": {
  6199. "type": "array",
  6200. "items": {
  6201. "type": "object",
  6202. "properties": {
  6203. "id": {
  6204. "type": "string"
  6205. },
  6206. "type": {
  6207. "type": "string",
  6208. "enum": ["file"]
  6209. },
  6210. "mime": {
  6211. "type": "string"
  6212. },
  6213. "filename": {
  6214. "type": "string"
  6215. },
  6216. "url": {
  6217. "type": "string"
  6218. },
  6219. "source": {
  6220. "$ref": "#/components/schemas/FilePartSource"
  6221. }
  6222. },
  6223. "required": ["type", "mime", "url"],
  6224. "additionalProperties": false
  6225. }
  6226. }
  6227. },
  6228. "required": ["arguments", "command"],
  6229. "additionalProperties": false
  6230. }
  6231. }
  6232. }
  6233. },
  6234. "x-codeSamples": [
  6235. {
  6236. "lang": "js",
  6237. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6238. }
  6239. ]
  6240. }
  6241. },
  6242. "/session/{sessionID}/shell": {
  6243. "post": {
  6244. "tags": ["session"],
  6245. "operationId": "session.shell",
  6246. "parameters": [
  6247. {
  6248. "name": "directory",
  6249. "in": "query",
  6250. "required": false,
  6251. "schema": {
  6252. "type": "string"
  6253. }
  6254. },
  6255. {
  6256. "name": "workspace",
  6257. "in": "query",
  6258. "required": false,
  6259. "schema": {
  6260. "type": "string"
  6261. }
  6262. },
  6263. {
  6264. "name": "sessionID",
  6265. "in": "path",
  6266. "schema": {
  6267. "type": "string",
  6268. "pattern": "^ses.*"
  6269. },
  6270. "required": true
  6271. }
  6272. ],
  6273. "responses": {
  6274. "200": {
  6275. "description": "Created message",
  6276. "content": {
  6277. "application/json": {
  6278. "schema": {
  6279. "type": "object",
  6280. "properties": {
  6281. "info": {
  6282. "$ref": "#/components/schemas/Message"
  6283. },
  6284. "parts": {
  6285. "type": "array",
  6286. "items": {
  6287. "$ref": "#/components/schemas/Part"
  6288. }
  6289. }
  6290. },
  6291. "required": ["info", "parts"],
  6292. "additionalProperties": false,
  6293. "description": "Created message"
  6294. }
  6295. }
  6296. }
  6297. },
  6298. "400": {
  6299. "description": "Bad request",
  6300. "content": {
  6301. "application/json": {
  6302. "schema": {
  6303. "$ref": "#/components/schemas/BadRequestError"
  6304. }
  6305. }
  6306. }
  6307. },
  6308. "404": {
  6309. "description": "Not found",
  6310. "content": {
  6311. "application/json": {
  6312. "schema": {
  6313. "$ref": "#/components/schemas/NotFoundError"
  6314. }
  6315. }
  6316. }
  6317. }
  6318. },
  6319. "description": "Execute a shell command within the session context and return the AI's response.",
  6320. "summary": "Run shell command",
  6321. "requestBody": {
  6322. "content": {
  6323. "application/json": {
  6324. "schema": {
  6325. "type": "object",
  6326. "properties": {
  6327. "messageID": {
  6328. "type": "string"
  6329. },
  6330. "agent": {
  6331. "type": "string"
  6332. },
  6333. "model": {
  6334. "type": "object",
  6335. "properties": {
  6336. "providerID": {
  6337. "type": "string"
  6338. },
  6339. "modelID": {
  6340. "type": "string"
  6341. }
  6342. },
  6343. "required": ["providerID", "modelID"],
  6344. "additionalProperties": false
  6345. },
  6346. "command": {
  6347. "type": "string"
  6348. }
  6349. },
  6350. "required": ["agent", "command"],
  6351. "additionalProperties": false
  6352. }
  6353. }
  6354. }
  6355. },
  6356. "x-codeSamples": [
  6357. {
  6358. "lang": "js",
  6359. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6360. }
  6361. ]
  6362. }
  6363. },
  6364. "/session/{sessionID}/revert": {
  6365. "post": {
  6366. "tags": ["session"],
  6367. "operationId": "session.revert",
  6368. "parameters": [
  6369. {
  6370. "name": "directory",
  6371. "in": "query",
  6372. "required": false,
  6373. "schema": {
  6374. "type": "string"
  6375. }
  6376. },
  6377. {
  6378. "name": "workspace",
  6379. "in": "query",
  6380. "required": false,
  6381. "schema": {
  6382. "type": "string"
  6383. }
  6384. },
  6385. {
  6386. "name": "sessionID",
  6387. "in": "path",
  6388. "schema": {
  6389. "type": "string",
  6390. "pattern": "^ses.*"
  6391. },
  6392. "required": true
  6393. }
  6394. ],
  6395. "responses": {
  6396. "200": {
  6397. "description": "Updated session",
  6398. "content": {
  6399. "application/json": {
  6400. "schema": {
  6401. "$ref": "#/components/schemas/Session"
  6402. }
  6403. }
  6404. }
  6405. },
  6406. "400": {
  6407. "description": "Bad request",
  6408. "content": {
  6409. "application/json": {
  6410. "schema": {
  6411. "$ref": "#/components/schemas/BadRequestError"
  6412. }
  6413. }
  6414. }
  6415. },
  6416. "404": {
  6417. "description": "Not found",
  6418. "content": {
  6419. "application/json": {
  6420. "schema": {
  6421. "$ref": "#/components/schemas/NotFoundError"
  6422. }
  6423. }
  6424. }
  6425. }
  6426. },
  6427. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6428. "summary": "Revert message",
  6429. "requestBody": {
  6430. "content": {
  6431. "application/json": {
  6432. "schema": {
  6433. "type": "object",
  6434. "properties": {
  6435. "messageID": {
  6436. "type": "string"
  6437. },
  6438. "partID": {
  6439. "type": "string"
  6440. }
  6441. },
  6442. "required": ["messageID"],
  6443. "additionalProperties": false
  6444. }
  6445. }
  6446. }
  6447. },
  6448. "x-codeSamples": [
  6449. {
  6450. "lang": "js",
  6451. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6452. }
  6453. ]
  6454. }
  6455. },
  6456. "/session/{sessionID}/unrevert": {
  6457. "post": {
  6458. "tags": ["session"],
  6459. "operationId": "session.unrevert",
  6460. "parameters": [
  6461. {
  6462. "name": "directory",
  6463. "in": "query",
  6464. "required": false,
  6465. "schema": {
  6466. "type": "string"
  6467. }
  6468. },
  6469. {
  6470. "name": "workspace",
  6471. "in": "query",
  6472. "required": false,
  6473. "schema": {
  6474. "type": "string"
  6475. }
  6476. },
  6477. {
  6478. "name": "sessionID",
  6479. "in": "path",
  6480. "schema": {
  6481. "type": "string",
  6482. "pattern": "^ses.*"
  6483. },
  6484. "required": true
  6485. }
  6486. ],
  6487. "responses": {
  6488. "200": {
  6489. "description": "Updated session",
  6490. "content": {
  6491. "application/json": {
  6492. "schema": {
  6493. "$ref": "#/components/schemas/Session"
  6494. }
  6495. }
  6496. }
  6497. },
  6498. "400": {
  6499. "description": "Bad request",
  6500. "content": {
  6501. "application/json": {
  6502. "schema": {
  6503. "$ref": "#/components/schemas/BadRequestError"
  6504. }
  6505. }
  6506. }
  6507. },
  6508. "404": {
  6509. "description": "Not found",
  6510. "content": {
  6511. "application/json": {
  6512. "schema": {
  6513. "$ref": "#/components/schemas/NotFoundError"
  6514. }
  6515. }
  6516. }
  6517. }
  6518. },
  6519. "description": "Restore all previously reverted messages in a session.",
  6520. "summary": "Restore reverted messages",
  6521. "x-codeSamples": [
  6522. {
  6523. "lang": "js",
  6524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6525. }
  6526. ]
  6527. }
  6528. },
  6529. "/session/{sessionID}/permissions/{permissionID}": {
  6530. "post": {
  6531. "tags": ["session"],
  6532. "operationId": "permission.respond",
  6533. "parameters": [
  6534. {
  6535. "name": "directory",
  6536. "in": "query",
  6537. "required": false,
  6538. "schema": {
  6539. "type": "string"
  6540. }
  6541. },
  6542. {
  6543. "name": "workspace",
  6544. "in": "query",
  6545. "required": false,
  6546. "schema": {
  6547. "type": "string"
  6548. }
  6549. },
  6550. {
  6551. "name": "sessionID",
  6552. "in": "path",
  6553. "schema": {
  6554. "type": "string",
  6555. "pattern": "^ses.*"
  6556. },
  6557. "required": true
  6558. },
  6559. {
  6560. "name": "permissionID",
  6561. "in": "path",
  6562. "schema": {
  6563. "type": "string",
  6564. "pattern": "^per.*"
  6565. },
  6566. "required": true
  6567. }
  6568. ],
  6569. "responses": {
  6570. "200": {
  6571. "description": "Permission processed successfully",
  6572. "content": {
  6573. "application/json": {
  6574. "schema": {
  6575. "type": "boolean",
  6576. "description": "Permission processed successfully"
  6577. }
  6578. }
  6579. }
  6580. },
  6581. "400": {
  6582. "description": "Bad request",
  6583. "content": {
  6584. "application/json": {
  6585. "schema": {
  6586. "$ref": "#/components/schemas/BadRequestError"
  6587. }
  6588. }
  6589. }
  6590. },
  6591. "404": {
  6592. "description": "Not found",
  6593. "content": {
  6594. "application/json": {
  6595. "schema": {
  6596. "$ref": "#/components/schemas/NotFoundError"
  6597. }
  6598. }
  6599. }
  6600. }
  6601. },
  6602. "description": "Approve or deny a permission request from the AI assistant.",
  6603. "summary": "Respond to permission",
  6604. "deprecated": true,
  6605. "requestBody": {
  6606. "content": {
  6607. "application/json": {
  6608. "schema": {
  6609. "type": "object",
  6610. "properties": {
  6611. "response": {
  6612. "type": "string",
  6613. "enum": ["once", "always", "reject"]
  6614. }
  6615. },
  6616. "required": ["response"],
  6617. "additionalProperties": false
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "x-codeSamples": [
  6623. {
  6624. "lang": "js",
  6625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6626. }
  6627. ]
  6628. }
  6629. },
  6630. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6631. "delete": {
  6632. "tags": ["session"],
  6633. "operationId": "part.delete",
  6634. "parameters": [
  6635. {
  6636. "name": "directory",
  6637. "in": "query",
  6638. "required": false,
  6639. "schema": {
  6640. "type": "string"
  6641. }
  6642. },
  6643. {
  6644. "name": "workspace",
  6645. "in": "query",
  6646. "required": false,
  6647. "schema": {
  6648. "type": "string"
  6649. }
  6650. },
  6651. {
  6652. "name": "sessionID",
  6653. "in": "path",
  6654. "schema": {
  6655. "type": "string",
  6656. "pattern": "^ses.*"
  6657. },
  6658. "required": true
  6659. },
  6660. {
  6661. "name": "messageID",
  6662. "in": "path",
  6663. "schema": {
  6664. "type": "string",
  6665. "pattern": "^msg.*"
  6666. },
  6667. "required": true
  6668. },
  6669. {
  6670. "name": "partID",
  6671. "in": "path",
  6672. "schema": {
  6673. "type": "string",
  6674. "pattern": "^prt.*"
  6675. },
  6676. "required": true
  6677. }
  6678. ],
  6679. "responses": {
  6680. "200": {
  6681. "description": "Successfully deleted part",
  6682. "content": {
  6683. "application/json": {
  6684. "schema": {
  6685. "type": "boolean",
  6686. "description": "Successfully deleted part"
  6687. }
  6688. }
  6689. }
  6690. },
  6691. "400": {
  6692. "description": "Bad request",
  6693. "content": {
  6694. "application/json": {
  6695. "schema": {
  6696. "$ref": "#/components/schemas/BadRequestError"
  6697. }
  6698. }
  6699. }
  6700. },
  6701. "404": {
  6702. "description": "Not found",
  6703. "content": {
  6704. "application/json": {
  6705. "schema": {
  6706. "$ref": "#/components/schemas/NotFoundError"
  6707. }
  6708. }
  6709. }
  6710. }
  6711. },
  6712. "description": "Delete a part from a message.",
  6713. "x-codeSamples": [
  6714. {
  6715. "lang": "js",
  6716. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6717. }
  6718. ]
  6719. },
  6720. "patch": {
  6721. "tags": ["session"],
  6722. "operationId": "part.update",
  6723. "parameters": [
  6724. {
  6725. "name": "directory",
  6726. "in": "query",
  6727. "required": false,
  6728. "schema": {
  6729. "type": "string"
  6730. }
  6731. },
  6732. {
  6733. "name": "workspace",
  6734. "in": "query",
  6735. "required": false,
  6736. "schema": {
  6737. "type": "string"
  6738. }
  6739. },
  6740. {
  6741. "name": "sessionID",
  6742. "in": "path",
  6743. "schema": {
  6744. "type": "string",
  6745. "pattern": "^ses.*"
  6746. },
  6747. "required": true
  6748. },
  6749. {
  6750. "name": "messageID",
  6751. "in": "path",
  6752. "schema": {
  6753. "type": "string",
  6754. "pattern": "^msg.*"
  6755. },
  6756. "required": true
  6757. },
  6758. {
  6759. "name": "partID",
  6760. "in": "path",
  6761. "schema": {
  6762. "type": "string",
  6763. "pattern": "^prt.*"
  6764. },
  6765. "required": true
  6766. }
  6767. ],
  6768. "responses": {
  6769. "200": {
  6770. "description": "Successfully updated part",
  6771. "content": {
  6772. "application/json": {
  6773. "schema": {
  6774. "$ref": "#/components/schemas/Part"
  6775. }
  6776. }
  6777. }
  6778. },
  6779. "400": {
  6780. "description": "Bad request",
  6781. "content": {
  6782. "application/json": {
  6783. "schema": {
  6784. "$ref": "#/components/schemas/BadRequestError"
  6785. }
  6786. }
  6787. }
  6788. },
  6789. "404": {
  6790. "description": "Not found",
  6791. "content": {
  6792. "application/json": {
  6793. "schema": {
  6794. "$ref": "#/components/schemas/NotFoundError"
  6795. }
  6796. }
  6797. }
  6798. }
  6799. },
  6800. "description": "Update a part in a message.",
  6801. "requestBody": {
  6802. "content": {
  6803. "application/json": {
  6804. "schema": {
  6805. "$ref": "#/components/schemas/Part"
  6806. }
  6807. }
  6808. }
  6809. },
  6810. "x-codeSamples": [
  6811. {
  6812. "lang": "js",
  6813. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6814. }
  6815. ]
  6816. }
  6817. },
  6818. "/sync/start": {
  6819. "post": {
  6820. "tags": ["sync"],
  6821. "operationId": "sync.start",
  6822. "parameters": [
  6823. {
  6824. "name": "directory",
  6825. "in": "query",
  6826. "required": false,
  6827. "schema": {
  6828. "type": "string"
  6829. }
  6830. },
  6831. {
  6832. "name": "workspace",
  6833. "in": "query",
  6834. "required": false,
  6835. "schema": {
  6836. "type": "string"
  6837. }
  6838. }
  6839. ],
  6840. "responses": {
  6841. "200": {
  6842. "description": "Workspace sync started",
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "type": "boolean",
  6847. "description": "Workspace sync started"
  6848. }
  6849. }
  6850. }
  6851. }
  6852. },
  6853. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6854. "summary": "Start workspace sync",
  6855. "x-codeSamples": [
  6856. {
  6857. "lang": "js",
  6858. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6859. }
  6860. ]
  6861. }
  6862. },
  6863. "/sync/replay": {
  6864. "post": {
  6865. "tags": ["sync"],
  6866. "operationId": "sync.replay",
  6867. "parameters": [
  6868. {
  6869. "name": "directory",
  6870. "in": "query",
  6871. "required": false,
  6872. "schema": {
  6873. "type": "string"
  6874. }
  6875. },
  6876. {
  6877. "name": "workspace",
  6878. "in": "query",
  6879. "required": false,
  6880. "schema": {
  6881. "type": "string"
  6882. }
  6883. }
  6884. ],
  6885. "responses": {
  6886. "200": {
  6887. "description": "Replayed sync events",
  6888. "content": {
  6889. "application/json": {
  6890. "schema": {
  6891. "type": "object",
  6892. "properties": {
  6893. "sessionID": {
  6894. "type": "string"
  6895. }
  6896. },
  6897. "required": ["sessionID"],
  6898. "additionalProperties": false,
  6899. "description": "Replayed sync events"
  6900. }
  6901. }
  6902. }
  6903. },
  6904. "400": {
  6905. "description": "Bad request",
  6906. "content": {
  6907. "application/json": {
  6908. "schema": {
  6909. "$ref": "#/components/schemas/BadRequestError"
  6910. }
  6911. }
  6912. }
  6913. }
  6914. },
  6915. "description": "Validate and replay a complete sync event history.",
  6916. "summary": "Replay sync events",
  6917. "requestBody": {
  6918. "content": {
  6919. "application/json": {
  6920. "schema": {
  6921. "type": "object",
  6922. "properties": {
  6923. "directory": {
  6924. "type": "string"
  6925. },
  6926. "events": {
  6927. "type": "array",
  6928. "minItems": 1,
  6929. "items": {
  6930. "type": "object",
  6931. "properties": {
  6932. "id": {
  6933. "type": "string"
  6934. },
  6935. "aggregateID": {
  6936. "type": "string"
  6937. },
  6938. "seq": {
  6939. "type": "integer",
  6940. "minimum": 0
  6941. },
  6942. "type": {
  6943. "type": "string"
  6944. },
  6945. "data": {
  6946. "type": "object"
  6947. }
  6948. },
  6949. "required": ["id", "aggregateID", "seq", "type", "data"],
  6950. "additionalProperties": false
  6951. }
  6952. }
  6953. },
  6954. "required": ["directory", "events"],
  6955. "additionalProperties": false
  6956. }
  6957. }
  6958. }
  6959. },
  6960. "x-codeSamples": [
  6961. {
  6962. "lang": "js",
  6963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  6964. }
  6965. ]
  6966. }
  6967. },
  6968. "/sync/steal": {
  6969. "post": {
  6970. "tags": ["sync"],
  6971. "operationId": "sync.steal",
  6972. "parameters": [
  6973. {
  6974. "name": "directory",
  6975. "in": "query",
  6976. "required": false,
  6977. "schema": {
  6978. "type": "string"
  6979. }
  6980. },
  6981. {
  6982. "name": "workspace",
  6983. "in": "query",
  6984. "required": false,
  6985. "schema": {
  6986. "type": "string"
  6987. }
  6988. }
  6989. ],
  6990. "responses": {
  6991. "200": {
  6992. "description": "Session stolen into workspace",
  6993. "content": {
  6994. "application/json": {
  6995. "schema": {
  6996. "type": "object",
  6997. "properties": {
  6998. "sessionID": {
  6999. "type": "string"
  7000. }
  7001. },
  7002. "required": ["sessionID"],
  7003. "additionalProperties": false,
  7004. "description": "Session stolen into workspace"
  7005. }
  7006. }
  7007. }
  7008. },
  7009. "400": {
  7010. "description": "Bad request",
  7011. "content": {
  7012. "application/json": {
  7013. "schema": {
  7014. "$ref": "#/components/schemas/BadRequestError"
  7015. }
  7016. }
  7017. }
  7018. }
  7019. },
  7020. "description": "Update a session to belong to the current workspace through the sync event system.",
  7021. "summary": "Steal session into workspace",
  7022. "requestBody": {
  7023. "content": {
  7024. "application/json": {
  7025. "schema": {
  7026. "type": "object",
  7027. "properties": {
  7028. "sessionID": {
  7029. "type": "string"
  7030. }
  7031. },
  7032. "required": ["sessionID"],
  7033. "additionalProperties": false
  7034. }
  7035. }
  7036. }
  7037. },
  7038. "x-codeSamples": [
  7039. {
  7040. "lang": "js",
  7041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7042. }
  7043. ]
  7044. }
  7045. },
  7046. "/sync/history": {
  7047. "post": {
  7048. "tags": ["sync"],
  7049. "operationId": "sync.history.list",
  7050. "parameters": [
  7051. {
  7052. "name": "directory",
  7053. "in": "query",
  7054. "required": false,
  7055. "schema": {
  7056. "type": "string"
  7057. }
  7058. },
  7059. {
  7060. "name": "workspace",
  7061. "in": "query",
  7062. "required": false,
  7063. "schema": {
  7064. "type": "string"
  7065. }
  7066. }
  7067. ],
  7068. "responses": {
  7069. "200": {
  7070. "description": "Sync events",
  7071. "content": {
  7072. "application/json": {
  7073. "schema": {
  7074. "type": "array",
  7075. "items": {
  7076. "type": "object",
  7077. "properties": {
  7078. "id": {
  7079. "type": "string"
  7080. },
  7081. "aggregate_id": {
  7082. "type": "string"
  7083. },
  7084. "seq": {
  7085. "type": "integer",
  7086. "minimum": 0
  7087. },
  7088. "type": {
  7089. "type": "string"
  7090. },
  7091. "data": {
  7092. "type": "object"
  7093. }
  7094. },
  7095. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7096. "additionalProperties": false
  7097. },
  7098. "description": "Sync events"
  7099. }
  7100. }
  7101. }
  7102. },
  7103. "400": {
  7104. "description": "Bad request",
  7105. "content": {
  7106. "application/json": {
  7107. "schema": {
  7108. "$ref": "#/components/schemas/BadRequestError"
  7109. }
  7110. }
  7111. }
  7112. }
  7113. },
  7114. "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.",
  7115. "summary": "List sync events",
  7116. "requestBody": {
  7117. "content": {
  7118. "application/json": {
  7119. "schema": {
  7120. "type": "object",
  7121. "additionalProperties": {
  7122. "type": "integer",
  7123. "minimum": 0
  7124. }
  7125. }
  7126. }
  7127. }
  7128. },
  7129. "x-codeSamples": [
  7130. {
  7131. "lang": "js",
  7132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7133. }
  7134. ]
  7135. }
  7136. },
  7137. "/api/session": {
  7138. "get": {
  7139. "tags": ["v2"],
  7140. "operationId": "v2.session.list",
  7141. "parameters": [
  7142. {
  7143. "name": "directory",
  7144. "in": "query",
  7145. "required": false,
  7146. "schema": {
  7147. "type": "string"
  7148. }
  7149. },
  7150. {
  7151. "name": "workspace",
  7152. "in": "query",
  7153. "required": false,
  7154. "schema": {
  7155. "type": "string"
  7156. }
  7157. }
  7158. ],
  7159. "responses": {
  7160. "200": {
  7161. "description": "V2SessionsResponse",
  7162. "content": {
  7163. "application/json": {
  7164. "schema": {
  7165. "$ref": "#/components/schemas/V2SessionsResponse"
  7166. }
  7167. }
  7168. }
  7169. },
  7170. "400": {
  7171. "description": "Bad request",
  7172. "content": {
  7173. "application/json": {
  7174. "schema": {
  7175. "$ref": "#/components/schemas/BadRequestError"
  7176. }
  7177. }
  7178. }
  7179. }
  7180. },
  7181. "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.",
  7182. "summary": "List v2 sessions",
  7183. "x-codeSamples": [
  7184. {
  7185. "lang": "js",
  7186. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7187. }
  7188. ]
  7189. }
  7190. },
  7191. "/api/session/{sessionID}/prompt": {
  7192. "post": {
  7193. "tags": ["v2"],
  7194. "operationId": "v2.session.prompt",
  7195. "parameters": [
  7196. {
  7197. "name": "directory",
  7198. "in": "query",
  7199. "required": false,
  7200. "schema": {
  7201. "type": "string"
  7202. }
  7203. },
  7204. {
  7205. "name": "workspace",
  7206. "in": "query",
  7207. "required": false,
  7208. "schema": {
  7209. "type": "string"
  7210. }
  7211. },
  7212. {
  7213. "name": "sessionID",
  7214. "in": "path",
  7215. "schema": {
  7216. "type": "string",
  7217. "pattern": "^ses.*"
  7218. },
  7219. "required": true
  7220. }
  7221. ],
  7222. "responses": {
  7223. "200": {
  7224. "description": "Session.Message",
  7225. "content": {
  7226. "application/json": {
  7227. "schema": {
  7228. "$ref": "#/components/schemas/SessionMessage"
  7229. }
  7230. }
  7231. }
  7232. }
  7233. },
  7234. "description": "Create a v2 session message and queue it for the agent loop.",
  7235. "summary": "Send v2 message",
  7236. "requestBody": {
  7237. "content": {
  7238. "application/json": {
  7239. "schema": {
  7240. "type": "object",
  7241. "properties": {
  7242. "prompt": {
  7243. "$ref": "#/components/schemas/Prompt"
  7244. },
  7245. "delivery": {
  7246. "$ref": "#/components/schemas/SessionDelivery"
  7247. }
  7248. },
  7249. "required": ["prompt"],
  7250. "additionalProperties": false
  7251. }
  7252. }
  7253. }
  7254. },
  7255. "x-codeSamples": [
  7256. {
  7257. "lang": "js",
  7258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7259. }
  7260. ]
  7261. }
  7262. },
  7263. "/api/session/{sessionID}/compact": {
  7264. "post": {
  7265. "tags": ["v2"],
  7266. "operationId": "v2.session.compact",
  7267. "parameters": [
  7268. {
  7269. "name": "directory",
  7270. "in": "query",
  7271. "required": false,
  7272. "schema": {
  7273. "type": "string"
  7274. }
  7275. },
  7276. {
  7277. "name": "workspace",
  7278. "in": "query",
  7279. "required": false,
  7280. "schema": {
  7281. "type": "string"
  7282. }
  7283. },
  7284. {
  7285. "name": "sessionID",
  7286. "in": "path",
  7287. "schema": {
  7288. "type": "string",
  7289. "pattern": "^ses.*"
  7290. },
  7291. "required": true
  7292. }
  7293. ],
  7294. "responses": {
  7295. "204": {
  7296. "description": "<No Content>"
  7297. }
  7298. },
  7299. "description": "Compact a v2 session conversation.",
  7300. "summary": "Compact v2 session",
  7301. "x-codeSamples": [
  7302. {
  7303. "lang": "js",
  7304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7305. }
  7306. ]
  7307. }
  7308. },
  7309. "/api/session/{sessionID}/wait": {
  7310. "post": {
  7311. "tags": ["v2"],
  7312. "operationId": "v2.session.wait",
  7313. "parameters": [
  7314. {
  7315. "name": "directory",
  7316. "in": "query",
  7317. "required": false,
  7318. "schema": {
  7319. "type": "string"
  7320. }
  7321. },
  7322. {
  7323. "name": "workspace",
  7324. "in": "query",
  7325. "required": false,
  7326. "schema": {
  7327. "type": "string"
  7328. }
  7329. },
  7330. {
  7331. "name": "sessionID",
  7332. "in": "path",
  7333. "schema": {
  7334. "type": "string",
  7335. "pattern": "^ses.*"
  7336. },
  7337. "required": true
  7338. }
  7339. ],
  7340. "responses": {
  7341. "204": {
  7342. "description": "<No Content>"
  7343. }
  7344. },
  7345. "description": "Wait for a v2 session agent loop to become idle.",
  7346. "summary": "Wait for v2 session",
  7347. "x-codeSamples": [
  7348. {
  7349. "lang": "js",
  7350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7351. }
  7352. ]
  7353. }
  7354. },
  7355. "/api/session/{sessionID}/context": {
  7356. "get": {
  7357. "tags": ["v2"],
  7358. "operationId": "v2.session.context",
  7359. "parameters": [
  7360. {
  7361. "name": "directory",
  7362. "in": "query",
  7363. "required": false,
  7364. "schema": {
  7365. "type": "string"
  7366. }
  7367. },
  7368. {
  7369. "name": "workspace",
  7370. "in": "query",
  7371. "required": false,
  7372. "schema": {
  7373. "type": "string"
  7374. }
  7375. },
  7376. {
  7377. "name": "sessionID",
  7378. "in": "path",
  7379. "schema": {
  7380. "type": "string",
  7381. "pattern": "^ses.*"
  7382. },
  7383. "required": true
  7384. }
  7385. ],
  7386. "responses": {
  7387. "200": {
  7388. "description": "Success",
  7389. "content": {
  7390. "application/json": {
  7391. "schema": {
  7392. "type": "array",
  7393. "items": {
  7394. "$ref": "#/components/schemas/SessionMessage"
  7395. }
  7396. }
  7397. }
  7398. }
  7399. }
  7400. },
  7401. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7402. "summary": "Get v2 session context",
  7403. "x-codeSamples": [
  7404. {
  7405. "lang": "js",
  7406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7407. }
  7408. ]
  7409. }
  7410. },
  7411. "/api/session/{sessionID}/message": {
  7412. "get": {
  7413. "tags": ["v2 messages"],
  7414. "operationId": "v2.session.messages",
  7415. "parameters": [
  7416. {
  7417. "name": "directory",
  7418. "in": "query",
  7419. "required": false,
  7420. "schema": {
  7421. "type": "string"
  7422. }
  7423. },
  7424. {
  7425. "name": "workspace",
  7426. "in": "query",
  7427. "required": false,
  7428. "schema": {
  7429. "type": "string"
  7430. }
  7431. },
  7432. {
  7433. "name": "sessionID",
  7434. "in": "path",
  7435. "schema": {
  7436. "type": "string",
  7437. "pattern": "^ses.*"
  7438. },
  7439. "required": true
  7440. }
  7441. ],
  7442. "responses": {
  7443. "200": {
  7444. "description": "V2SessionMessagesResponse",
  7445. "content": {
  7446. "application/json": {
  7447. "schema": {
  7448. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7449. }
  7450. }
  7451. }
  7452. },
  7453. "400": {
  7454. "description": "Bad request",
  7455. "content": {
  7456. "application/json": {
  7457. "schema": {
  7458. "$ref": "#/components/schemas/BadRequestError"
  7459. }
  7460. }
  7461. }
  7462. }
  7463. },
  7464. "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.",
  7465. "summary": "Get v2 session messages",
  7466. "x-codeSamples": [
  7467. {
  7468. "lang": "js",
  7469. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7470. }
  7471. ]
  7472. }
  7473. },
  7474. "/tui/append-prompt": {
  7475. "post": {
  7476. "tags": ["tui"],
  7477. "operationId": "tui.appendPrompt",
  7478. "parameters": [
  7479. {
  7480. "name": "directory",
  7481. "in": "query",
  7482. "required": false,
  7483. "schema": {
  7484. "type": "string"
  7485. }
  7486. },
  7487. {
  7488. "name": "workspace",
  7489. "in": "query",
  7490. "required": false,
  7491. "schema": {
  7492. "type": "string"
  7493. }
  7494. }
  7495. ],
  7496. "responses": {
  7497. "200": {
  7498. "description": "Prompt processed successfully",
  7499. "content": {
  7500. "application/json": {
  7501. "schema": {
  7502. "type": "boolean",
  7503. "description": "Prompt processed successfully"
  7504. }
  7505. }
  7506. }
  7507. },
  7508. "400": {
  7509. "description": "Bad request",
  7510. "content": {
  7511. "application/json": {
  7512. "schema": {
  7513. "$ref": "#/components/schemas/BadRequestError"
  7514. }
  7515. }
  7516. }
  7517. }
  7518. },
  7519. "description": "Append prompt to the TUI.",
  7520. "summary": "Append TUI prompt",
  7521. "requestBody": {
  7522. "content": {
  7523. "application/json": {
  7524. "schema": {
  7525. "type": "object",
  7526. "properties": {
  7527. "text": {
  7528. "type": "string"
  7529. }
  7530. },
  7531. "required": ["text"],
  7532. "additionalProperties": false
  7533. }
  7534. }
  7535. }
  7536. },
  7537. "x-codeSamples": [
  7538. {
  7539. "lang": "js",
  7540. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7541. }
  7542. ]
  7543. }
  7544. },
  7545. "/tui/open-help": {
  7546. "post": {
  7547. "tags": ["tui"],
  7548. "operationId": "tui.openHelp",
  7549. "parameters": [
  7550. {
  7551. "name": "directory",
  7552. "in": "query",
  7553. "required": false,
  7554. "schema": {
  7555. "type": "string"
  7556. }
  7557. },
  7558. {
  7559. "name": "workspace",
  7560. "in": "query",
  7561. "required": false,
  7562. "schema": {
  7563. "type": "string"
  7564. }
  7565. }
  7566. ],
  7567. "responses": {
  7568. "200": {
  7569. "description": "Help dialog opened successfully",
  7570. "content": {
  7571. "application/json": {
  7572. "schema": {
  7573. "type": "boolean",
  7574. "description": "Help dialog opened successfully"
  7575. }
  7576. }
  7577. }
  7578. }
  7579. },
  7580. "description": "Open the help dialog in the TUI to display user assistance information.",
  7581. "summary": "Open help dialog",
  7582. "x-codeSamples": [
  7583. {
  7584. "lang": "js",
  7585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7586. }
  7587. ]
  7588. }
  7589. },
  7590. "/tui/open-sessions": {
  7591. "post": {
  7592. "tags": ["tui"],
  7593. "operationId": "tui.openSessions",
  7594. "parameters": [
  7595. {
  7596. "name": "directory",
  7597. "in": "query",
  7598. "required": false,
  7599. "schema": {
  7600. "type": "string"
  7601. }
  7602. },
  7603. {
  7604. "name": "workspace",
  7605. "in": "query",
  7606. "required": false,
  7607. "schema": {
  7608. "type": "string"
  7609. }
  7610. }
  7611. ],
  7612. "responses": {
  7613. "200": {
  7614. "description": "Session dialog opened successfully",
  7615. "content": {
  7616. "application/json": {
  7617. "schema": {
  7618. "type": "boolean",
  7619. "description": "Session dialog opened successfully"
  7620. }
  7621. }
  7622. }
  7623. }
  7624. },
  7625. "description": "Open the session dialog.",
  7626. "summary": "Open sessions dialog",
  7627. "x-codeSamples": [
  7628. {
  7629. "lang": "js",
  7630. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7631. }
  7632. ]
  7633. }
  7634. },
  7635. "/tui/open-themes": {
  7636. "post": {
  7637. "tags": ["tui"],
  7638. "operationId": "tui.openThemes",
  7639. "parameters": [
  7640. {
  7641. "name": "directory",
  7642. "in": "query",
  7643. "required": false,
  7644. "schema": {
  7645. "type": "string"
  7646. }
  7647. },
  7648. {
  7649. "name": "workspace",
  7650. "in": "query",
  7651. "required": false,
  7652. "schema": {
  7653. "type": "string"
  7654. }
  7655. }
  7656. ],
  7657. "responses": {
  7658. "200": {
  7659. "description": "Theme dialog opened successfully",
  7660. "content": {
  7661. "application/json": {
  7662. "schema": {
  7663. "type": "boolean",
  7664. "description": "Theme dialog opened successfully"
  7665. }
  7666. }
  7667. }
  7668. }
  7669. },
  7670. "description": "Open the theme dialog.",
  7671. "summary": "Open themes dialog",
  7672. "x-codeSamples": [
  7673. {
  7674. "lang": "js",
  7675. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7676. }
  7677. ]
  7678. }
  7679. },
  7680. "/tui/open-models": {
  7681. "post": {
  7682. "tags": ["tui"],
  7683. "operationId": "tui.openModels",
  7684. "parameters": [
  7685. {
  7686. "name": "directory",
  7687. "in": "query",
  7688. "required": false,
  7689. "schema": {
  7690. "type": "string"
  7691. }
  7692. },
  7693. {
  7694. "name": "workspace",
  7695. "in": "query",
  7696. "required": false,
  7697. "schema": {
  7698. "type": "string"
  7699. }
  7700. }
  7701. ],
  7702. "responses": {
  7703. "200": {
  7704. "description": "Model dialog opened successfully",
  7705. "content": {
  7706. "application/json": {
  7707. "schema": {
  7708. "type": "boolean",
  7709. "description": "Model dialog opened successfully"
  7710. }
  7711. }
  7712. }
  7713. }
  7714. },
  7715. "description": "Open the model dialog.",
  7716. "summary": "Open models dialog",
  7717. "x-codeSamples": [
  7718. {
  7719. "lang": "js",
  7720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7721. }
  7722. ]
  7723. }
  7724. },
  7725. "/tui/submit-prompt": {
  7726. "post": {
  7727. "tags": ["tui"],
  7728. "operationId": "tui.submitPrompt",
  7729. "parameters": [
  7730. {
  7731. "name": "directory",
  7732. "in": "query",
  7733. "required": false,
  7734. "schema": {
  7735. "type": "string"
  7736. }
  7737. },
  7738. {
  7739. "name": "workspace",
  7740. "in": "query",
  7741. "required": false,
  7742. "schema": {
  7743. "type": "string"
  7744. }
  7745. }
  7746. ],
  7747. "responses": {
  7748. "200": {
  7749. "description": "Prompt submitted successfully",
  7750. "content": {
  7751. "application/json": {
  7752. "schema": {
  7753. "type": "boolean",
  7754. "description": "Prompt submitted successfully"
  7755. }
  7756. }
  7757. }
  7758. }
  7759. },
  7760. "description": "Submit the prompt.",
  7761. "summary": "Submit TUI prompt",
  7762. "x-codeSamples": [
  7763. {
  7764. "lang": "js",
  7765. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7766. }
  7767. ]
  7768. }
  7769. },
  7770. "/tui/clear-prompt": {
  7771. "post": {
  7772. "tags": ["tui"],
  7773. "operationId": "tui.clearPrompt",
  7774. "parameters": [
  7775. {
  7776. "name": "directory",
  7777. "in": "query",
  7778. "required": false,
  7779. "schema": {
  7780. "type": "string"
  7781. }
  7782. },
  7783. {
  7784. "name": "workspace",
  7785. "in": "query",
  7786. "required": false,
  7787. "schema": {
  7788. "type": "string"
  7789. }
  7790. }
  7791. ],
  7792. "responses": {
  7793. "200": {
  7794. "description": "Prompt cleared successfully",
  7795. "content": {
  7796. "application/json": {
  7797. "schema": {
  7798. "type": "boolean",
  7799. "description": "Prompt cleared successfully"
  7800. }
  7801. }
  7802. }
  7803. }
  7804. },
  7805. "description": "Clear the prompt.",
  7806. "summary": "Clear TUI prompt",
  7807. "x-codeSamples": [
  7808. {
  7809. "lang": "js",
  7810. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7811. }
  7812. ]
  7813. }
  7814. },
  7815. "/tui/execute-command": {
  7816. "post": {
  7817. "tags": ["tui"],
  7818. "operationId": "tui.executeCommand",
  7819. "parameters": [
  7820. {
  7821. "name": "directory",
  7822. "in": "query",
  7823. "required": false,
  7824. "schema": {
  7825. "type": "string"
  7826. }
  7827. },
  7828. {
  7829. "name": "workspace",
  7830. "in": "query",
  7831. "required": false,
  7832. "schema": {
  7833. "type": "string"
  7834. }
  7835. }
  7836. ],
  7837. "responses": {
  7838. "200": {
  7839. "description": "Command executed successfully",
  7840. "content": {
  7841. "application/json": {
  7842. "schema": {
  7843. "type": "boolean",
  7844. "description": "Command executed successfully"
  7845. }
  7846. }
  7847. }
  7848. },
  7849. "400": {
  7850. "description": "Bad request",
  7851. "content": {
  7852. "application/json": {
  7853. "schema": {
  7854. "$ref": "#/components/schemas/BadRequestError"
  7855. }
  7856. }
  7857. }
  7858. }
  7859. },
  7860. "description": "Execute a TUI command.",
  7861. "summary": "Execute TUI command",
  7862. "requestBody": {
  7863. "content": {
  7864. "application/json": {
  7865. "schema": {
  7866. "type": "object",
  7867. "properties": {
  7868. "command": {
  7869. "type": "string"
  7870. }
  7871. },
  7872. "required": ["command"],
  7873. "additionalProperties": false
  7874. }
  7875. }
  7876. }
  7877. },
  7878. "x-codeSamples": [
  7879. {
  7880. "lang": "js",
  7881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  7882. }
  7883. ]
  7884. }
  7885. },
  7886. "/tui/show-toast": {
  7887. "post": {
  7888. "tags": ["tui"],
  7889. "operationId": "tui.showToast",
  7890. "parameters": [
  7891. {
  7892. "name": "directory",
  7893. "in": "query",
  7894. "required": false,
  7895. "schema": {
  7896. "type": "string"
  7897. }
  7898. },
  7899. {
  7900. "name": "workspace",
  7901. "in": "query",
  7902. "required": false,
  7903. "schema": {
  7904. "type": "string"
  7905. }
  7906. }
  7907. ],
  7908. "responses": {
  7909. "200": {
  7910. "description": "Toast notification shown successfully",
  7911. "content": {
  7912. "application/json": {
  7913. "schema": {
  7914. "type": "boolean",
  7915. "description": "Toast notification shown successfully"
  7916. }
  7917. }
  7918. }
  7919. }
  7920. },
  7921. "description": "Show a toast notification in the TUI.",
  7922. "summary": "Show TUI toast",
  7923. "requestBody": {
  7924. "content": {
  7925. "application/json": {
  7926. "schema": {
  7927. "type": "object",
  7928. "properties": {
  7929. "title": {
  7930. "type": "string"
  7931. },
  7932. "message": {
  7933. "type": "string"
  7934. },
  7935. "variant": {
  7936. "type": "string",
  7937. "enum": ["info", "success", "warning", "error"]
  7938. },
  7939. "duration": {
  7940. "type": "integer",
  7941. "exclusiveMinimum": 0
  7942. }
  7943. },
  7944. "required": ["message", "variant"],
  7945. "additionalProperties": false
  7946. }
  7947. }
  7948. }
  7949. },
  7950. "x-codeSamples": [
  7951. {
  7952. "lang": "js",
  7953. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  7954. }
  7955. ]
  7956. }
  7957. },
  7958. "/tui/publish": {
  7959. "post": {
  7960. "tags": ["tui"],
  7961. "operationId": "tui.publish",
  7962. "parameters": [
  7963. {
  7964. "name": "directory",
  7965. "in": "query",
  7966. "required": false,
  7967. "schema": {
  7968. "type": "string"
  7969. }
  7970. },
  7971. {
  7972. "name": "workspace",
  7973. "in": "query",
  7974. "required": false,
  7975. "schema": {
  7976. "type": "string"
  7977. }
  7978. }
  7979. ],
  7980. "responses": {
  7981. "200": {
  7982. "description": "Event published successfully",
  7983. "content": {
  7984. "application/json": {
  7985. "schema": {
  7986. "type": "boolean",
  7987. "description": "Event published successfully"
  7988. }
  7989. }
  7990. }
  7991. },
  7992. "400": {
  7993. "description": "Bad request",
  7994. "content": {
  7995. "application/json": {
  7996. "schema": {
  7997. "$ref": "#/components/schemas/BadRequestError"
  7998. }
  7999. }
  8000. }
  8001. }
  8002. },
  8003. "description": "Publish a TUI event.",
  8004. "summary": "Publish TUI event",
  8005. "requestBody": {
  8006. "content": {
  8007. "application/json": {
  8008. "schema": {
  8009. "anyOf": [
  8010. {
  8011. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8012. },
  8013. {
  8014. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8015. },
  8016. {
  8017. "$ref": "#/components/schemas/EventTuiToastShow"
  8018. },
  8019. {
  8020. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8021. }
  8022. ]
  8023. }
  8024. }
  8025. }
  8026. },
  8027. "x-codeSamples": [
  8028. {
  8029. "lang": "js",
  8030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8031. }
  8032. ]
  8033. }
  8034. },
  8035. "/tui/select-session": {
  8036. "post": {
  8037. "tags": ["tui"],
  8038. "operationId": "tui.selectSession",
  8039. "parameters": [
  8040. {
  8041. "name": "directory",
  8042. "in": "query",
  8043. "required": false,
  8044. "schema": {
  8045. "type": "string"
  8046. }
  8047. },
  8048. {
  8049. "name": "workspace",
  8050. "in": "query",
  8051. "required": false,
  8052. "schema": {
  8053. "type": "string"
  8054. }
  8055. }
  8056. ],
  8057. "responses": {
  8058. "200": {
  8059. "description": "Session selected successfully",
  8060. "content": {
  8061. "application/json": {
  8062. "schema": {
  8063. "type": "boolean",
  8064. "description": "Session selected successfully"
  8065. }
  8066. }
  8067. }
  8068. },
  8069. "400": {
  8070. "description": "Bad request",
  8071. "content": {
  8072. "application/json": {
  8073. "schema": {
  8074. "$ref": "#/components/schemas/BadRequestError"
  8075. }
  8076. }
  8077. }
  8078. },
  8079. "404": {
  8080. "description": "NotFoundError",
  8081. "content": {
  8082. "application/json": {
  8083. "schema": {
  8084. "$ref": "#/components/schemas/NotFoundError"
  8085. }
  8086. }
  8087. }
  8088. }
  8089. },
  8090. "description": "Navigate the TUI to display the specified session.",
  8091. "summary": "Select session",
  8092. "requestBody": {
  8093. "content": {
  8094. "application/json": {
  8095. "schema": {
  8096. "type": "object",
  8097. "properties": {
  8098. "sessionID": {
  8099. "type": "string",
  8100. "description": "Session ID to navigate to"
  8101. }
  8102. },
  8103. "required": ["sessionID"],
  8104. "additionalProperties": false
  8105. }
  8106. }
  8107. }
  8108. },
  8109. "x-codeSamples": [
  8110. {
  8111. "lang": "js",
  8112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8113. }
  8114. ]
  8115. }
  8116. },
  8117. "/tui/control/next": {
  8118. "get": {
  8119. "tags": ["tui"],
  8120. "operationId": "tui.control.next",
  8121. "parameters": [
  8122. {
  8123. "name": "directory",
  8124. "in": "query",
  8125. "required": false,
  8126. "schema": {
  8127. "type": "string"
  8128. }
  8129. },
  8130. {
  8131. "name": "workspace",
  8132. "in": "query",
  8133. "required": false,
  8134. "schema": {
  8135. "type": "string"
  8136. }
  8137. }
  8138. ],
  8139. "responses": {
  8140. "200": {
  8141. "description": "Next TUI request",
  8142. "content": {
  8143. "application/json": {
  8144. "schema": {
  8145. "type": "object",
  8146. "properties": {
  8147. "path": {
  8148. "type": "string"
  8149. },
  8150. "body": {}
  8151. },
  8152. "required": ["path", "body"],
  8153. "additionalProperties": false,
  8154. "description": "Next TUI request"
  8155. }
  8156. }
  8157. }
  8158. }
  8159. },
  8160. "description": "Retrieve the next TUI request from the queue for processing.",
  8161. "summary": "Get next TUI request",
  8162. "x-codeSamples": [
  8163. {
  8164. "lang": "js",
  8165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8166. }
  8167. ]
  8168. }
  8169. },
  8170. "/tui/control/response": {
  8171. "post": {
  8172. "tags": ["tui"],
  8173. "operationId": "tui.control.response",
  8174. "parameters": [
  8175. {
  8176. "name": "directory",
  8177. "in": "query",
  8178. "required": false,
  8179. "schema": {
  8180. "type": "string"
  8181. }
  8182. },
  8183. {
  8184. "name": "workspace",
  8185. "in": "query",
  8186. "required": false,
  8187. "schema": {
  8188. "type": "string"
  8189. }
  8190. }
  8191. ],
  8192. "responses": {
  8193. "200": {
  8194. "description": "Response submitted successfully",
  8195. "content": {
  8196. "application/json": {
  8197. "schema": {
  8198. "type": "boolean",
  8199. "description": "Response submitted successfully"
  8200. }
  8201. }
  8202. }
  8203. }
  8204. },
  8205. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8206. "summary": "Submit TUI response",
  8207. "requestBody": {
  8208. "content": {
  8209. "application/json": {
  8210. "schema": {}
  8211. }
  8212. }
  8213. },
  8214. "x-codeSamples": [
  8215. {
  8216. "lang": "js",
  8217. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8218. }
  8219. ]
  8220. }
  8221. },
  8222. "/experimental/workspace/adapter": {
  8223. "get": {
  8224. "tags": ["workspace"],
  8225. "operationId": "experimental.workspace.adapter.list",
  8226. "parameters": [
  8227. {
  8228. "name": "directory",
  8229. "in": "query",
  8230. "required": false,
  8231. "schema": {
  8232. "type": "string"
  8233. }
  8234. },
  8235. {
  8236. "name": "workspace",
  8237. "in": "query",
  8238. "required": false,
  8239. "schema": {
  8240. "type": "string"
  8241. }
  8242. }
  8243. ],
  8244. "responses": {
  8245. "200": {
  8246. "description": "Workspace adapters",
  8247. "content": {
  8248. "application/json": {
  8249. "schema": {
  8250. "type": "array",
  8251. "items": {
  8252. "type": "object",
  8253. "properties": {
  8254. "type": {
  8255. "type": "string"
  8256. },
  8257. "name": {
  8258. "type": "string"
  8259. },
  8260. "description": {
  8261. "type": "string"
  8262. }
  8263. },
  8264. "required": ["type", "name", "description"],
  8265. "additionalProperties": false
  8266. },
  8267. "description": "Workspace adapters"
  8268. }
  8269. }
  8270. }
  8271. }
  8272. },
  8273. "description": "List all available workspace adapters for the current project.",
  8274. "summary": "List workspace adapters",
  8275. "x-codeSamples": [
  8276. {
  8277. "lang": "js",
  8278. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8279. }
  8280. ]
  8281. }
  8282. },
  8283. "/experimental/workspace": {
  8284. "get": {
  8285. "tags": ["workspace"],
  8286. "operationId": "experimental.workspace.list",
  8287. "parameters": [
  8288. {
  8289. "name": "directory",
  8290. "in": "query",
  8291. "required": false,
  8292. "schema": {
  8293. "type": "string"
  8294. }
  8295. },
  8296. {
  8297. "name": "workspace",
  8298. "in": "query",
  8299. "required": false,
  8300. "schema": {
  8301. "type": "string"
  8302. }
  8303. }
  8304. ],
  8305. "responses": {
  8306. "200": {
  8307. "description": "Workspaces",
  8308. "content": {
  8309. "application/json": {
  8310. "schema": {
  8311. "type": "array",
  8312. "items": {
  8313. "$ref": "#/components/schemas/Workspace"
  8314. },
  8315. "description": "Workspaces"
  8316. }
  8317. }
  8318. }
  8319. }
  8320. },
  8321. "description": "List all workspaces.",
  8322. "summary": "List workspaces",
  8323. "x-codeSamples": [
  8324. {
  8325. "lang": "js",
  8326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8327. }
  8328. ]
  8329. },
  8330. "post": {
  8331. "tags": ["workspace"],
  8332. "operationId": "experimental.workspace.create",
  8333. "parameters": [
  8334. {
  8335. "name": "directory",
  8336. "in": "query",
  8337. "required": false,
  8338. "schema": {
  8339. "type": "string"
  8340. }
  8341. },
  8342. {
  8343. "name": "workspace",
  8344. "in": "query",
  8345. "required": false,
  8346. "schema": {
  8347. "type": "string"
  8348. }
  8349. }
  8350. ],
  8351. "responses": {
  8352. "200": {
  8353. "description": "Workspace created",
  8354. "content": {
  8355. "application/json": {
  8356. "schema": {
  8357. "$ref": "#/components/schemas/Workspace"
  8358. }
  8359. }
  8360. }
  8361. },
  8362. "400": {
  8363. "description": "Bad request",
  8364. "content": {
  8365. "application/json": {
  8366. "schema": {
  8367. "$ref": "#/components/schemas/BadRequestError"
  8368. }
  8369. }
  8370. }
  8371. }
  8372. },
  8373. "description": "Create a workspace for the current project.",
  8374. "summary": "Create workspace",
  8375. "requestBody": {
  8376. "content": {
  8377. "application/json": {
  8378. "schema": {
  8379. "type": "object",
  8380. "properties": {
  8381. "id": {
  8382. "type": "string"
  8383. },
  8384. "type": {
  8385. "type": "string"
  8386. },
  8387. "branch": {
  8388. "anyOf": [
  8389. {
  8390. "type": "string"
  8391. },
  8392. {
  8393. "type": "null"
  8394. }
  8395. ]
  8396. },
  8397. "extra": {
  8398. "anyOf": [
  8399. {},
  8400. {
  8401. "type": "null"
  8402. }
  8403. ]
  8404. }
  8405. },
  8406. "required": ["type", "branch"],
  8407. "additionalProperties": false
  8408. }
  8409. }
  8410. }
  8411. },
  8412. "x-codeSamples": [
  8413. {
  8414. "lang": "js",
  8415. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8416. }
  8417. ]
  8418. }
  8419. },
  8420. "/experimental/workspace/status": {
  8421. "get": {
  8422. "tags": ["workspace"],
  8423. "operationId": "experimental.workspace.status",
  8424. "parameters": [
  8425. {
  8426. "name": "directory",
  8427. "in": "query",
  8428. "required": false,
  8429. "schema": {
  8430. "type": "string"
  8431. }
  8432. },
  8433. {
  8434. "name": "workspace",
  8435. "in": "query",
  8436. "required": false,
  8437. "schema": {
  8438. "type": "string"
  8439. }
  8440. }
  8441. ],
  8442. "responses": {
  8443. "200": {
  8444. "description": "Workspace status",
  8445. "content": {
  8446. "application/json": {
  8447. "schema": {
  8448. "type": "array",
  8449. "items": {
  8450. "type": "object",
  8451. "properties": {
  8452. "workspaceID": {
  8453. "type": "string"
  8454. },
  8455. "status": {
  8456. "type": "string",
  8457. "enum": ["connected", "connecting", "disconnected", "error"]
  8458. }
  8459. },
  8460. "required": ["workspaceID", "status"],
  8461. "additionalProperties": false
  8462. },
  8463. "description": "Workspace status"
  8464. }
  8465. }
  8466. }
  8467. }
  8468. },
  8469. "description": "Get connection status for workspaces in the current project.",
  8470. "summary": "Workspace status",
  8471. "x-codeSamples": [
  8472. {
  8473. "lang": "js",
  8474. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8475. }
  8476. ]
  8477. }
  8478. },
  8479. "/experimental/workspace/{id}": {
  8480. "delete": {
  8481. "tags": ["workspace"],
  8482. "operationId": "experimental.workspace.remove",
  8483. "parameters": [
  8484. {
  8485. "name": "directory",
  8486. "in": "query",
  8487. "required": false,
  8488. "schema": {
  8489. "type": "string"
  8490. }
  8491. },
  8492. {
  8493. "name": "workspace",
  8494. "in": "query",
  8495. "required": false,
  8496. "schema": {
  8497. "type": "string"
  8498. }
  8499. },
  8500. {
  8501. "name": "id",
  8502. "in": "path",
  8503. "schema": {
  8504. "type": "string",
  8505. "pattern": "^wrk.*"
  8506. },
  8507. "required": true
  8508. }
  8509. ],
  8510. "responses": {
  8511. "200": {
  8512. "description": "Workspace removed",
  8513. "content": {
  8514. "application/json": {
  8515. "schema": {
  8516. "$ref": "#/components/schemas/Workspace"
  8517. }
  8518. }
  8519. }
  8520. },
  8521. "400": {
  8522. "description": "Bad request",
  8523. "content": {
  8524. "application/json": {
  8525. "schema": {
  8526. "$ref": "#/components/schemas/BadRequestError"
  8527. }
  8528. }
  8529. }
  8530. }
  8531. },
  8532. "description": "Remove an existing workspace.",
  8533. "summary": "Remove workspace",
  8534. "x-codeSamples": [
  8535. {
  8536. "lang": "js",
  8537. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8538. }
  8539. ]
  8540. }
  8541. },
  8542. "/experimental/workspace/warp": {
  8543. "post": {
  8544. "tags": ["workspace"],
  8545. "operationId": "experimental.workspace.warp",
  8546. "parameters": [
  8547. {
  8548. "name": "directory",
  8549. "in": "query",
  8550. "required": false,
  8551. "schema": {
  8552. "type": "string"
  8553. }
  8554. },
  8555. {
  8556. "name": "workspace",
  8557. "in": "query",
  8558. "required": false,
  8559. "schema": {
  8560. "type": "string"
  8561. }
  8562. }
  8563. ],
  8564. "responses": {
  8565. "204": {
  8566. "description": "Session warped"
  8567. },
  8568. "400": {
  8569. "description": "WorkspaceWarpError | VcsApplyError",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "anyOf": [
  8574. {
  8575. "$ref": "#/components/schemas/WorkspaceWarpError"
  8576. },
  8577. {
  8578. "$ref": "#/components/schemas/VcsApplyError"
  8579. }
  8580. ]
  8581. }
  8582. }
  8583. }
  8584. }
  8585. },
  8586. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8587. "summary": "Warp session into workspace",
  8588. "requestBody": {
  8589. "content": {
  8590. "application/json": {
  8591. "schema": {
  8592. "type": "object",
  8593. "properties": {
  8594. "id": {
  8595. "anyOf": [
  8596. {
  8597. "type": "string"
  8598. },
  8599. {
  8600. "type": "null"
  8601. }
  8602. ]
  8603. },
  8604. "sessionID": {
  8605. "type": "string"
  8606. },
  8607. "copyChanges": {
  8608. "type": "boolean"
  8609. }
  8610. },
  8611. "required": ["id", "sessionID"],
  8612. "additionalProperties": false
  8613. }
  8614. }
  8615. }
  8616. },
  8617. "x-codeSamples": [
  8618. {
  8619. "lang": "js",
  8620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8621. }
  8622. ]
  8623. }
  8624. },
  8625. "/pty/{ptyID}/connect": {
  8626. "get": {
  8627. "tags": ["pty"],
  8628. "operationId": "pty.connect",
  8629. "parameters": [
  8630. {
  8631. "name": "directory",
  8632. "in": "query",
  8633. "required": false,
  8634. "schema": {
  8635. "type": "string"
  8636. }
  8637. },
  8638. {
  8639. "name": "workspace",
  8640. "in": "query",
  8641. "required": false,
  8642. "schema": {
  8643. "type": "string"
  8644. }
  8645. },
  8646. {
  8647. "name": "ptyID",
  8648. "in": "path",
  8649. "schema": {
  8650. "type": "string",
  8651. "pattern": "^pty.*"
  8652. },
  8653. "required": true
  8654. }
  8655. ],
  8656. "responses": {
  8657. "200": {
  8658. "description": "Connected session",
  8659. "content": {
  8660. "application/json": {
  8661. "schema": {
  8662. "type": "boolean",
  8663. "description": "Connected session"
  8664. }
  8665. }
  8666. }
  8667. },
  8668. "403": {
  8669. "description": "Forbidden",
  8670. "content": {
  8671. "application/json": {
  8672. "schema": {
  8673. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8674. }
  8675. }
  8676. }
  8677. },
  8678. "404": {
  8679. "description": "Not found",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/NotFoundError"
  8684. }
  8685. }
  8686. }
  8687. }
  8688. },
  8689. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8690. "summary": "Connect to PTY session",
  8691. "x-codeSamples": [
  8692. {
  8693. "lang": "js",
  8694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8695. }
  8696. ]
  8697. }
  8698. }
  8699. },
  8700. "components": {
  8701. "schemas": {
  8702. "Event": {
  8703. "anyOf": [
  8704. {
  8705. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8706. },
  8707. {
  8708. "$ref": "#/components/schemas/EventFileEdited"
  8709. },
  8710. {
  8711. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8712. },
  8713. {
  8714. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8715. },
  8716. {
  8717. "$ref": "#/components/schemas/EventLspUpdated"
  8718. },
  8719. {
  8720. "$ref": "#/components/schemas/EventMessagePartDelta"
  8721. },
  8722. {
  8723. "$ref": "#/components/schemas/EventPermissionAsked"
  8724. },
  8725. {
  8726. "$ref": "#/components/schemas/EventPermissionReplied"
  8727. },
  8728. {
  8729. "$ref": "#/components/schemas/EventSessionDiff"
  8730. },
  8731. {
  8732. "$ref": "#/components/schemas/EventSessionError"
  8733. },
  8734. {
  8735. "$ref": "#/components/schemas/EventInstallationUpdated"
  8736. },
  8737. {
  8738. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8739. },
  8740. {
  8741. "$ref": "#/components/schemas/EventQuestionAsked"
  8742. },
  8743. {
  8744. "$ref": "#/components/schemas/EventQuestionReplied"
  8745. },
  8746. {
  8747. "$ref": "#/components/schemas/EventQuestionRejected"
  8748. },
  8749. {
  8750. "$ref": "#/components/schemas/EventTodoUpdated"
  8751. },
  8752. {
  8753. "$ref": "#/components/schemas/EventSessionStatus"
  8754. },
  8755. {
  8756. "$ref": "#/components/schemas/EventSessionIdle"
  8757. },
  8758. {
  8759. "$ref": "#/components/schemas/EventSessionCompacted"
  8760. },
  8761. {
  8762. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8763. },
  8764. {
  8765. "$ref": "#/components/schemas/Event.tui.command.execute"
  8766. },
  8767. {
  8768. "$ref": "#/components/schemas/EventTuiToastShow1"
  8769. },
  8770. {
  8771. "$ref": "#/components/schemas/Event.tui.session.select"
  8772. },
  8773. {
  8774. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8775. },
  8776. {
  8777. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8778. },
  8779. {
  8780. "$ref": "#/components/schemas/EventCommandExecuted"
  8781. },
  8782. {
  8783. "$ref": "#/components/schemas/EventProjectUpdated"
  8784. },
  8785. {
  8786. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8787. },
  8788. {
  8789. "$ref": "#/components/schemas/EventWorkspaceReady"
  8790. },
  8791. {
  8792. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8793. },
  8794. {
  8795. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8796. },
  8797. {
  8798. "$ref": "#/components/schemas/EventWorktreeReady"
  8799. },
  8800. {
  8801. "$ref": "#/components/schemas/EventWorktreeFailed"
  8802. },
  8803. {
  8804. "$ref": "#/components/schemas/EventPtyCreated"
  8805. },
  8806. {
  8807. "$ref": "#/components/schemas/EventPtyUpdated"
  8808. },
  8809. {
  8810. "$ref": "#/components/schemas/EventPtyExited"
  8811. },
  8812. {
  8813. "$ref": "#/components/schemas/EventPtyDeleted"
  8814. },
  8815. {
  8816. "$ref": "#/components/schemas/EventMessageUpdated"
  8817. },
  8818. {
  8819. "$ref": "#/components/schemas/EventMessageRemoved"
  8820. },
  8821. {
  8822. "$ref": "#/components/schemas/EventMessagePartUpdated"
  8823. },
  8824. {
  8825. "$ref": "#/components/schemas/EventMessagePartRemoved"
  8826. },
  8827. {
  8828. "$ref": "#/components/schemas/EventSessionCreated"
  8829. },
  8830. {
  8831. "$ref": "#/components/schemas/EventSessionUpdated"
  8832. },
  8833. {
  8834. "$ref": "#/components/schemas/EventSessionDeleted"
  8835. },
  8836. {
  8837. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  8838. },
  8839. {
  8840. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  8841. },
  8842. {
  8843. "$ref": "#/components/schemas/EventSessionNextPrompted"
  8844. },
  8845. {
  8846. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  8847. },
  8848. {
  8849. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  8850. },
  8851. {
  8852. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  8853. },
  8854. {
  8855. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  8856. },
  8857. {
  8858. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  8859. },
  8860. {
  8861. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  8862. },
  8863. {
  8864. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  8865. },
  8866. {
  8867. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  8868. },
  8869. {
  8870. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  8871. },
  8872. {
  8873. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  8874. },
  8875. {
  8876. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  8877. },
  8878. {
  8879. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  8880. },
  8881. {
  8882. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  8883. },
  8884. {
  8885. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  8886. },
  8887. {
  8888. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  8889. },
  8890. {
  8891. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  8895. },
  8896. {
  8897. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  8898. },
  8899. {
  8900. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  8901. },
  8902. {
  8903. "$ref": "#/components/schemas/EventSessionNextRetried"
  8904. },
  8905. {
  8906. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  8907. },
  8908. {
  8909. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  8910. },
  8911. {
  8912. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  8913. },
  8914. {
  8915. "$ref": "#/components/schemas/EventServerConnected"
  8916. },
  8917. {
  8918. "$ref": "#/components/schemas/EventGlobalDisposed"
  8919. }
  8920. ]
  8921. },
  8922. "OAuth": {
  8923. "type": "object",
  8924. "properties": {
  8925. "type": {
  8926. "type": "string",
  8927. "enum": ["oauth"]
  8928. },
  8929. "refresh": {
  8930. "type": "string"
  8931. },
  8932. "access": {
  8933. "type": "string"
  8934. },
  8935. "expires": {
  8936. "type": "integer",
  8937. "minimum": 0
  8938. },
  8939. "accountId": {
  8940. "type": "string"
  8941. },
  8942. "enterpriseUrl": {
  8943. "type": "string"
  8944. }
  8945. },
  8946. "required": ["type", "refresh", "access", "expires"],
  8947. "additionalProperties": false
  8948. },
  8949. "ApiAuth": {
  8950. "type": "object",
  8951. "properties": {
  8952. "type": {
  8953. "type": "string",
  8954. "enum": ["api"]
  8955. },
  8956. "key": {
  8957. "type": "string"
  8958. },
  8959. "metadata": {
  8960. "type": "object",
  8961. "additionalProperties": {
  8962. "type": "string"
  8963. }
  8964. }
  8965. },
  8966. "required": ["type", "key"],
  8967. "additionalProperties": false
  8968. },
  8969. "WellKnownAuth": {
  8970. "type": "object",
  8971. "properties": {
  8972. "type": {
  8973. "type": "string",
  8974. "enum": ["wellknown"]
  8975. },
  8976. "key": {
  8977. "type": "string"
  8978. },
  8979. "token": {
  8980. "type": "string"
  8981. }
  8982. },
  8983. "required": ["type", "key", "token"],
  8984. "additionalProperties": false
  8985. },
  8986. "Auth": {
  8987. "anyOf": [
  8988. {
  8989. "$ref": "#/components/schemas/OAuth"
  8990. },
  8991. {
  8992. "$ref": "#/components/schemas/ApiAuth"
  8993. },
  8994. {
  8995. "$ref": "#/components/schemas/WellKnownAuth"
  8996. }
  8997. ]
  8998. },
  8999. "PermissionRequest": {
  9000. "type": "object",
  9001. "properties": {
  9002. "id": {
  9003. "type": "string"
  9004. },
  9005. "sessionID": {
  9006. "type": "string"
  9007. },
  9008. "permission": {
  9009. "type": "string"
  9010. },
  9011. "patterns": {
  9012. "type": "array",
  9013. "items": {
  9014. "type": "string"
  9015. }
  9016. },
  9017. "metadata": {
  9018. "type": "object"
  9019. },
  9020. "always": {
  9021. "type": "array",
  9022. "items": {
  9023. "type": "string"
  9024. }
  9025. },
  9026. "tool": {
  9027. "type": "object",
  9028. "properties": {
  9029. "messageID": {
  9030. "type": "string"
  9031. },
  9032. "callID": {
  9033. "type": "string"
  9034. }
  9035. },
  9036. "required": ["messageID", "callID"],
  9037. "additionalProperties": false
  9038. }
  9039. },
  9040. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9041. "additionalProperties": false
  9042. },
  9043. "SnapshotFileDiff": {
  9044. "type": "object",
  9045. "properties": {
  9046. "file": {
  9047. "type": "string"
  9048. },
  9049. "patch": {
  9050. "type": "string"
  9051. },
  9052. "additions": {
  9053. "type": "integer",
  9054. "minimum": 0
  9055. },
  9056. "deletions": {
  9057. "type": "integer",
  9058. "minimum": 0
  9059. },
  9060. "status": {
  9061. "type": "string",
  9062. "enum": ["added", "deleted", "modified"]
  9063. }
  9064. },
  9065. "required": ["file", "patch", "additions", "deletions"],
  9066. "additionalProperties": false
  9067. },
  9068. "ProviderAuthError": {
  9069. "type": "object",
  9070. "properties": {
  9071. "name": {
  9072. "type": "string",
  9073. "enum": ["ProviderAuthError"]
  9074. },
  9075. "data": {
  9076. "type": "object",
  9077. "properties": {
  9078. "providerID": {
  9079. "type": "string"
  9080. },
  9081. "message": {
  9082. "type": "string"
  9083. }
  9084. },
  9085. "required": ["providerID", "message"],
  9086. "additionalProperties": false
  9087. }
  9088. },
  9089. "required": ["name", "data"],
  9090. "additionalProperties": false
  9091. },
  9092. "UnknownError": {
  9093. "type": "object",
  9094. "properties": {
  9095. "name": {
  9096. "type": "string",
  9097. "enum": ["UnknownError"]
  9098. },
  9099. "data": {
  9100. "type": "object",
  9101. "properties": {
  9102. "message": {
  9103. "type": "string"
  9104. }
  9105. },
  9106. "required": ["message"],
  9107. "additionalProperties": false
  9108. }
  9109. },
  9110. "required": ["name", "data"],
  9111. "additionalProperties": false
  9112. },
  9113. "MessageOutputLengthError": {
  9114. "type": "object",
  9115. "properties": {
  9116. "name": {
  9117. "type": "string",
  9118. "enum": ["MessageOutputLengthError"]
  9119. },
  9120. "data": {
  9121. "type": "object",
  9122. "properties": {}
  9123. }
  9124. },
  9125. "required": ["name", "data"],
  9126. "additionalProperties": false
  9127. },
  9128. "MessageAbortedError": {
  9129. "type": "object",
  9130. "properties": {
  9131. "name": {
  9132. "type": "string",
  9133. "enum": ["MessageAbortedError"]
  9134. },
  9135. "data": {
  9136. "type": "object",
  9137. "properties": {
  9138. "message": {
  9139. "type": "string"
  9140. }
  9141. },
  9142. "required": ["message"],
  9143. "additionalProperties": false
  9144. }
  9145. },
  9146. "required": ["name", "data"],
  9147. "additionalProperties": false
  9148. },
  9149. "StructuredOutputError": {
  9150. "type": "object",
  9151. "properties": {
  9152. "name": {
  9153. "type": "string",
  9154. "enum": ["StructuredOutputError"]
  9155. },
  9156. "data": {
  9157. "type": "object",
  9158. "properties": {
  9159. "message": {
  9160. "type": "string"
  9161. },
  9162. "retries": {
  9163. "type": "integer",
  9164. "minimum": 0
  9165. }
  9166. },
  9167. "required": ["message", "retries"],
  9168. "additionalProperties": false
  9169. }
  9170. },
  9171. "required": ["name", "data"],
  9172. "additionalProperties": false
  9173. },
  9174. "ContextOverflowError": {
  9175. "type": "object",
  9176. "properties": {
  9177. "name": {
  9178. "type": "string",
  9179. "enum": ["ContextOverflowError"]
  9180. },
  9181. "data": {
  9182. "type": "object",
  9183. "properties": {
  9184. "message": {
  9185. "type": "string"
  9186. },
  9187. "responseBody": {
  9188. "type": "string"
  9189. }
  9190. },
  9191. "required": ["message"],
  9192. "additionalProperties": false
  9193. }
  9194. },
  9195. "required": ["name", "data"],
  9196. "additionalProperties": false
  9197. },
  9198. "APIError": {
  9199. "type": "object",
  9200. "properties": {
  9201. "name": {
  9202. "type": "string",
  9203. "enum": ["APIError"]
  9204. },
  9205. "data": {
  9206. "type": "object",
  9207. "properties": {
  9208. "message": {
  9209. "type": "string"
  9210. },
  9211. "statusCode": {
  9212. "type": "integer",
  9213. "minimum": 0
  9214. },
  9215. "isRetryable": {
  9216. "type": "boolean"
  9217. },
  9218. "responseHeaders": {
  9219. "type": "object",
  9220. "additionalProperties": {
  9221. "type": "string"
  9222. }
  9223. },
  9224. "responseBody": {
  9225. "type": "string"
  9226. },
  9227. "metadata": {
  9228. "type": "object",
  9229. "additionalProperties": {
  9230. "type": "string"
  9231. }
  9232. }
  9233. },
  9234. "required": ["message", "isRetryable"],
  9235. "additionalProperties": false
  9236. }
  9237. },
  9238. "required": ["name", "data"],
  9239. "additionalProperties": false
  9240. },
  9241. "QuestionOption": {
  9242. "type": "object",
  9243. "properties": {
  9244. "label": {
  9245. "type": "string",
  9246. "description": "Display text (1-5 words, concise)"
  9247. },
  9248. "description": {
  9249. "type": "string",
  9250. "description": "Explanation of choice"
  9251. }
  9252. },
  9253. "required": ["label", "description"],
  9254. "additionalProperties": false
  9255. },
  9256. "QuestionInfo": {
  9257. "type": "object",
  9258. "properties": {
  9259. "question": {
  9260. "type": "string",
  9261. "description": "Complete question"
  9262. },
  9263. "header": {
  9264. "type": "string",
  9265. "description": "Very short label (max 30 chars)"
  9266. },
  9267. "options": {
  9268. "type": "array",
  9269. "items": {
  9270. "$ref": "#/components/schemas/QuestionOption"
  9271. },
  9272. "description": "Available choices"
  9273. },
  9274. "multiple": {
  9275. "type": "boolean"
  9276. },
  9277. "custom": {
  9278. "type": "boolean"
  9279. }
  9280. },
  9281. "required": ["question", "header", "options"],
  9282. "additionalProperties": false
  9283. },
  9284. "QuestionTool": {
  9285. "type": "object",
  9286. "properties": {
  9287. "messageID": {
  9288. "type": "string"
  9289. },
  9290. "callID": {
  9291. "type": "string"
  9292. }
  9293. },
  9294. "required": ["messageID", "callID"],
  9295. "additionalProperties": false
  9296. },
  9297. "QuestionRequest": {
  9298. "type": "object",
  9299. "properties": {
  9300. "id": {
  9301. "type": "string"
  9302. },
  9303. "sessionID": {
  9304. "type": "string"
  9305. },
  9306. "questions": {
  9307. "type": "array",
  9308. "items": {
  9309. "$ref": "#/components/schemas/QuestionInfo"
  9310. },
  9311. "description": "Questions to ask"
  9312. },
  9313. "tool": {
  9314. "$ref": "#/components/schemas/QuestionTool"
  9315. }
  9316. },
  9317. "required": ["id", "sessionID", "questions"],
  9318. "additionalProperties": false
  9319. },
  9320. "QuestionAnswer": {
  9321. "type": "array",
  9322. "items": {
  9323. "type": "string"
  9324. }
  9325. },
  9326. "QuestionReplied": {
  9327. "type": "object",
  9328. "properties": {
  9329. "sessionID": {
  9330. "type": "string"
  9331. },
  9332. "requestID": {
  9333. "type": "string"
  9334. },
  9335. "answers": {
  9336. "type": "array",
  9337. "items": {
  9338. "$ref": "#/components/schemas/QuestionAnswer"
  9339. }
  9340. }
  9341. },
  9342. "required": ["sessionID", "requestID", "answers"],
  9343. "additionalProperties": false
  9344. },
  9345. "QuestionRejected": {
  9346. "type": "object",
  9347. "properties": {
  9348. "sessionID": {
  9349. "type": "string"
  9350. },
  9351. "requestID": {
  9352. "type": "string"
  9353. }
  9354. },
  9355. "required": ["sessionID", "requestID"],
  9356. "additionalProperties": false
  9357. },
  9358. "Todo": {
  9359. "type": "object",
  9360. "properties": {
  9361. "content": {
  9362. "type": "string",
  9363. "description": "Brief description of the task"
  9364. },
  9365. "status": {
  9366. "type": "string",
  9367. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9368. },
  9369. "priority": {
  9370. "type": "string",
  9371. "description": "Priority level of the task: high, medium, low"
  9372. }
  9373. },
  9374. "required": ["content", "status", "priority"],
  9375. "additionalProperties": false
  9376. },
  9377. "SessionStatus": {
  9378. "anyOf": [
  9379. {
  9380. "type": "object",
  9381. "properties": {
  9382. "type": {
  9383. "type": "string",
  9384. "enum": ["idle"]
  9385. }
  9386. },
  9387. "required": ["type"],
  9388. "additionalProperties": false
  9389. },
  9390. {
  9391. "type": "object",
  9392. "properties": {
  9393. "type": {
  9394. "type": "string",
  9395. "enum": ["retry"]
  9396. },
  9397. "attempt": {
  9398. "type": "integer",
  9399. "minimum": 0
  9400. },
  9401. "message": {
  9402. "type": "string"
  9403. },
  9404. "action": {
  9405. "type": "object",
  9406. "properties": {
  9407. "title": {
  9408. "type": "string"
  9409. },
  9410. "message": {
  9411. "type": "string"
  9412. },
  9413. "label": {
  9414. "type": "string"
  9415. },
  9416. "link": {
  9417. "type": "string"
  9418. }
  9419. },
  9420. "required": ["title", "message", "label"],
  9421. "additionalProperties": false
  9422. },
  9423. "next": {
  9424. "type": "integer",
  9425. "minimum": 0
  9426. }
  9427. },
  9428. "required": ["type", "attempt", "message", "next"],
  9429. "additionalProperties": false
  9430. },
  9431. {
  9432. "type": "object",
  9433. "properties": {
  9434. "type": {
  9435. "type": "string",
  9436. "enum": ["busy"]
  9437. }
  9438. },
  9439. "required": ["type"],
  9440. "additionalProperties": false
  9441. }
  9442. ]
  9443. },
  9444. "Event.tui.prompt.append": {
  9445. "type": "object",
  9446. "properties": {
  9447. "id": {
  9448. "type": "string"
  9449. },
  9450. "type": {
  9451. "type": "string",
  9452. "enum": ["tui.prompt.append"]
  9453. },
  9454. "properties": {
  9455. "type": "object",
  9456. "properties": {
  9457. "text": {
  9458. "type": "string"
  9459. }
  9460. },
  9461. "required": ["text"],
  9462. "additionalProperties": false
  9463. }
  9464. },
  9465. "required": ["id", "type", "properties"],
  9466. "additionalProperties": false
  9467. },
  9468. "Event.tui.command.execute": {
  9469. "type": "object",
  9470. "properties": {
  9471. "id": {
  9472. "type": "string"
  9473. },
  9474. "type": {
  9475. "type": "string",
  9476. "enum": ["tui.command.execute"]
  9477. },
  9478. "properties": {
  9479. "type": "object",
  9480. "properties": {
  9481. "command": {
  9482. "anyOf": [
  9483. {
  9484. "type": "string",
  9485. "enum": [
  9486. "session.list",
  9487. "session.new",
  9488. "session.share",
  9489. "session.interrupt",
  9490. "session.compact",
  9491. "session.page.up",
  9492. "session.page.down",
  9493. "session.line.up",
  9494. "session.line.down",
  9495. "session.half.page.up",
  9496. "session.half.page.down",
  9497. "session.first",
  9498. "session.last",
  9499. "prompt.clear",
  9500. "prompt.submit",
  9501. "agent.cycle"
  9502. ]
  9503. },
  9504. {
  9505. "type": "string"
  9506. }
  9507. ]
  9508. }
  9509. },
  9510. "required": ["command"],
  9511. "additionalProperties": false
  9512. }
  9513. },
  9514. "required": ["id", "type", "properties"],
  9515. "additionalProperties": false
  9516. },
  9517. "Event.tui.toast.show": {
  9518. "type": "object",
  9519. "properties": {
  9520. "id": {
  9521. "type": "string"
  9522. },
  9523. "type": {
  9524. "type": "string",
  9525. "enum": ["tui.toast.show"]
  9526. },
  9527. "properties": {
  9528. "type": "object",
  9529. "properties": {
  9530. "title": {
  9531. "type": "string"
  9532. },
  9533. "message": {
  9534. "type": "string"
  9535. },
  9536. "variant": {
  9537. "type": "string",
  9538. "enum": ["info", "success", "warning", "error"]
  9539. },
  9540. "duration": {
  9541. "type": "integer",
  9542. "exclusiveMinimum": 0
  9543. }
  9544. },
  9545. "required": ["message", "variant"],
  9546. "additionalProperties": false
  9547. }
  9548. },
  9549. "required": ["id", "type", "properties"],
  9550. "additionalProperties": false
  9551. },
  9552. "Event.tui.session.select": {
  9553. "type": "object",
  9554. "properties": {
  9555. "id": {
  9556. "type": "string"
  9557. },
  9558. "type": {
  9559. "type": "string",
  9560. "enum": ["tui.session.select"]
  9561. },
  9562. "properties": {
  9563. "type": "object",
  9564. "properties": {
  9565. "sessionID": {
  9566. "type": "string",
  9567. "description": "Session ID to navigate to"
  9568. }
  9569. },
  9570. "required": ["sessionID"],
  9571. "additionalProperties": false
  9572. }
  9573. },
  9574. "required": ["id", "type", "properties"],
  9575. "additionalProperties": false
  9576. },
  9577. "Project": {
  9578. "type": "object",
  9579. "properties": {
  9580. "id": {
  9581. "type": "string"
  9582. },
  9583. "worktree": {
  9584. "type": "string"
  9585. },
  9586. "vcs": {
  9587. "type": "string",
  9588. "enum": ["git"]
  9589. },
  9590. "name": {
  9591. "type": "string"
  9592. },
  9593. "icon": {
  9594. "type": "object",
  9595. "properties": {
  9596. "url": {
  9597. "type": "string"
  9598. },
  9599. "override": {
  9600. "type": "string"
  9601. },
  9602. "color": {
  9603. "type": "string"
  9604. }
  9605. },
  9606. "additionalProperties": false
  9607. },
  9608. "commands": {
  9609. "type": "object",
  9610. "properties": {
  9611. "start": {
  9612. "type": "string",
  9613. "description": "Startup script to run when creating a new workspace (worktree)"
  9614. }
  9615. },
  9616. "additionalProperties": false
  9617. },
  9618. "time": {
  9619. "type": "object",
  9620. "properties": {
  9621. "created": {
  9622. "type": "integer",
  9623. "minimum": 0
  9624. },
  9625. "updated": {
  9626. "type": "integer",
  9627. "minimum": 0
  9628. },
  9629. "initialized": {
  9630. "type": "integer",
  9631. "minimum": 0
  9632. }
  9633. },
  9634. "required": ["created", "updated"],
  9635. "additionalProperties": false
  9636. },
  9637. "sandboxes": {
  9638. "type": "array",
  9639. "items": {
  9640. "type": "string"
  9641. }
  9642. }
  9643. },
  9644. "required": ["id", "worktree", "time", "sandboxes"],
  9645. "additionalProperties": false
  9646. },
  9647. "Pty": {
  9648. "type": "object",
  9649. "properties": {
  9650. "id": {
  9651. "type": "string"
  9652. },
  9653. "title": {
  9654. "type": "string"
  9655. },
  9656. "command": {
  9657. "type": "string"
  9658. },
  9659. "args": {
  9660. "type": "array",
  9661. "items": {
  9662. "type": "string"
  9663. }
  9664. },
  9665. "cwd": {
  9666. "type": "string"
  9667. },
  9668. "status": {
  9669. "type": "string",
  9670. "enum": ["running", "exited"]
  9671. },
  9672. "pid": {
  9673. "type": "integer",
  9674. "exclusiveMinimum": 0
  9675. }
  9676. },
  9677. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9678. "additionalProperties": false
  9679. },
  9680. "OutputFormatText": {
  9681. "type": "object",
  9682. "properties": {
  9683. "type": {
  9684. "type": "string",
  9685. "enum": ["text"]
  9686. }
  9687. },
  9688. "required": ["type"],
  9689. "additionalProperties": false
  9690. },
  9691. "JSONSchema": {
  9692. "type": "object"
  9693. },
  9694. "OutputFormatJsonSchema": {
  9695. "type": "object",
  9696. "properties": {
  9697. "type": {
  9698. "type": "string",
  9699. "enum": ["json_schema"]
  9700. },
  9701. "schema": {
  9702. "$ref": "#/components/schemas/JSONSchema"
  9703. },
  9704. "retryCount": {
  9705. "type": "integer",
  9706. "minimum": 0
  9707. }
  9708. },
  9709. "required": ["type", "schema"],
  9710. "additionalProperties": false
  9711. },
  9712. "OutputFormat": {
  9713. "anyOf": [
  9714. {
  9715. "$ref": "#/components/schemas/OutputFormatText"
  9716. },
  9717. {
  9718. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9719. }
  9720. ]
  9721. },
  9722. "UserMessage": {
  9723. "type": "object",
  9724. "properties": {
  9725. "id": {
  9726. "type": "string"
  9727. },
  9728. "sessionID": {
  9729. "type": "string"
  9730. },
  9731. "role": {
  9732. "type": "string",
  9733. "enum": ["user"]
  9734. },
  9735. "time": {
  9736. "type": "object",
  9737. "properties": {
  9738. "created": {
  9739. "type": "integer",
  9740. "minimum": 0
  9741. }
  9742. },
  9743. "required": ["created"],
  9744. "additionalProperties": false
  9745. },
  9746. "format": {
  9747. "$ref": "#/components/schemas/OutputFormat"
  9748. },
  9749. "summary": {
  9750. "type": "object",
  9751. "properties": {
  9752. "title": {
  9753. "type": "string"
  9754. },
  9755. "body": {
  9756. "type": "string"
  9757. },
  9758. "diffs": {
  9759. "type": "array",
  9760. "items": {
  9761. "$ref": "#/components/schemas/SnapshotFileDiff"
  9762. }
  9763. }
  9764. },
  9765. "required": ["diffs"],
  9766. "additionalProperties": false
  9767. },
  9768. "agent": {
  9769. "type": "string"
  9770. },
  9771. "model": {
  9772. "type": "object",
  9773. "properties": {
  9774. "providerID": {
  9775. "type": "string"
  9776. },
  9777. "modelID": {
  9778. "type": "string"
  9779. },
  9780. "variant": {
  9781. "type": "string"
  9782. }
  9783. },
  9784. "required": ["providerID", "modelID"],
  9785. "additionalProperties": false
  9786. },
  9787. "system": {
  9788. "type": "string"
  9789. },
  9790. "tools": {
  9791. "type": "object",
  9792. "additionalProperties": {
  9793. "type": "boolean"
  9794. }
  9795. }
  9796. },
  9797. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  9798. "additionalProperties": false
  9799. },
  9800. "AssistantMessage": {
  9801. "type": "object",
  9802. "properties": {
  9803. "id": {
  9804. "type": "string"
  9805. },
  9806. "sessionID": {
  9807. "type": "string"
  9808. },
  9809. "role": {
  9810. "type": "string",
  9811. "enum": ["assistant"]
  9812. },
  9813. "time": {
  9814. "type": "object",
  9815. "properties": {
  9816. "created": {
  9817. "type": "integer",
  9818. "minimum": 0
  9819. },
  9820. "completed": {
  9821. "type": "integer",
  9822. "minimum": 0
  9823. }
  9824. },
  9825. "required": ["created"],
  9826. "additionalProperties": false
  9827. },
  9828. "error": {
  9829. "anyOf": [
  9830. {
  9831. "$ref": "#/components/schemas/ProviderAuthError"
  9832. },
  9833. {
  9834. "$ref": "#/components/schemas/UnknownError"
  9835. },
  9836. {
  9837. "$ref": "#/components/schemas/MessageOutputLengthError"
  9838. },
  9839. {
  9840. "$ref": "#/components/schemas/MessageAbortedError"
  9841. },
  9842. {
  9843. "$ref": "#/components/schemas/StructuredOutputError"
  9844. },
  9845. {
  9846. "$ref": "#/components/schemas/ContextOverflowError"
  9847. },
  9848. {
  9849. "$ref": "#/components/schemas/APIError"
  9850. }
  9851. ]
  9852. },
  9853. "parentID": {
  9854. "type": "string"
  9855. },
  9856. "modelID": {
  9857. "type": "string"
  9858. },
  9859. "providerID": {
  9860. "type": "string"
  9861. },
  9862. "mode": {
  9863. "type": "string"
  9864. },
  9865. "agent": {
  9866. "type": "string"
  9867. },
  9868. "path": {
  9869. "type": "object",
  9870. "properties": {
  9871. "cwd": {
  9872. "type": "string"
  9873. },
  9874. "root": {
  9875. "type": "string"
  9876. }
  9877. },
  9878. "required": ["cwd", "root"],
  9879. "additionalProperties": false
  9880. },
  9881. "summary": {
  9882. "type": "boolean"
  9883. },
  9884. "cost": {
  9885. "type": "number"
  9886. },
  9887. "tokens": {
  9888. "type": "object",
  9889. "properties": {
  9890. "total": {
  9891. "type": "integer",
  9892. "minimum": 0
  9893. },
  9894. "input": {
  9895. "type": "integer",
  9896. "minimum": 0
  9897. },
  9898. "output": {
  9899. "type": "integer",
  9900. "minimum": 0
  9901. },
  9902. "reasoning": {
  9903. "type": "integer",
  9904. "minimum": 0
  9905. },
  9906. "cache": {
  9907. "type": "object",
  9908. "properties": {
  9909. "read": {
  9910. "type": "integer",
  9911. "minimum": 0
  9912. },
  9913. "write": {
  9914. "type": "integer",
  9915. "minimum": 0
  9916. }
  9917. },
  9918. "required": ["read", "write"],
  9919. "additionalProperties": false
  9920. }
  9921. },
  9922. "required": ["input", "output", "reasoning", "cache"],
  9923. "additionalProperties": false
  9924. },
  9925. "structured": {},
  9926. "variant": {
  9927. "type": "string"
  9928. },
  9929. "finish": {
  9930. "type": "string"
  9931. }
  9932. },
  9933. "required": [
  9934. "id",
  9935. "sessionID",
  9936. "role",
  9937. "time",
  9938. "parentID",
  9939. "modelID",
  9940. "providerID",
  9941. "mode",
  9942. "agent",
  9943. "path",
  9944. "cost",
  9945. "tokens"
  9946. ],
  9947. "additionalProperties": false
  9948. },
  9949. "Message": {
  9950. "anyOf": [
  9951. {
  9952. "$ref": "#/components/schemas/UserMessage"
  9953. },
  9954. {
  9955. "$ref": "#/components/schemas/AssistantMessage"
  9956. }
  9957. ]
  9958. },
  9959. "TextPart": {
  9960. "type": "object",
  9961. "properties": {
  9962. "id": {
  9963. "type": "string"
  9964. },
  9965. "sessionID": {
  9966. "type": "string"
  9967. },
  9968. "messageID": {
  9969. "type": "string"
  9970. },
  9971. "type": {
  9972. "type": "string",
  9973. "enum": ["text"]
  9974. },
  9975. "text": {
  9976. "type": "string"
  9977. },
  9978. "synthetic": {
  9979. "type": "boolean"
  9980. },
  9981. "ignored": {
  9982. "type": "boolean"
  9983. },
  9984. "time": {
  9985. "type": "object",
  9986. "properties": {
  9987. "start": {
  9988. "type": "integer",
  9989. "minimum": 0
  9990. },
  9991. "end": {
  9992. "type": "integer",
  9993. "minimum": 0
  9994. }
  9995. },
  9996. "required": ["start"],
  9997. "additionalProperties": false
  9998. },
  9999. "metadata": {
  10000. "type": "object"
  10001. }
  10002. },
  10003. "required": ["id", "sessionID", "messageID", "type", "text"],
  10004. "additionalProperties": false
  10005. },
  10006. "SubtaskPart": {
  10007. "type": "object",
  10008. "properties": {
  10009. "id": {
  10010. "type": "string"
  10011. },
  10012. "sessionID": {
  10013. "type": "string"
  10014. },
  10015. "messageID": {
  10016. "type": "string"
  10017. },
  10018. "type": {
  10019. "type": "string",
  10020. "enum": ["subtask"]
  10021. },
  10022. "prompt": {
  10023. "type": "string"
  10024. },
  10025. "description": {
  10026. "type": "string"
  10027. },
  10028. "agent": {
  10029. "type": "string"
  10030. },
  10031. "model": {
  10032. "type": "object",
  10033. "properties": {
  10034. "providerID": {
  10035. "type": "string"
  10036. },
  10037. "modelID": {
  10038. "type": "string"
  10039. }
  10040. },
  10041. "required": ["providerID", "modelID"],
  10042. "additionalProperties": false
  10043. },
  10044. "command": {
  10045. "type": "string"
  10046. }
  10047. },
  10048. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10049. "additionalProperties": false
  10050. },
  10051. "ReasoningPart": {
  10052. "type": "object",
  10053. "properties": {
  10054. "id": {
  10055. "type": "string"
  10056. },
  10057. "sessionID": {
  10058. "type": "string"
  10059. },
  10060. "messageID": {
  10061. "type": "string"
  10062. },
  10063. "type": {
  10064. "type": "string",
  10065. "enum": ["reasoning"]
  10066. },
  10067. "text": {
  10068. "type": "string"
  10069. },
  10070. "metadata": {
  10071. "type": "object"
  10072. },
  10073. "time": {
  10074. "type": "object",
  10075. "properties": {
  10076. "start": {
  10077. "type": "integer",
  10078. "minimum": 0
  10079. },
  10080. "end": {
  10081. "type": "integer",
  10082. "minimum": 0
  10083. }
  10084. },
  10085. "required": ["start"],
  10086. "additionalProperties": false
  10087. }
  10088. },
  10089. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10090. "additionalProperties": false
  10091. },
  10092. "FilePartSourceText": {
  10093. "type": "object",
  10094. "properties": {
  10095. "value": {
  10096. "type": "string"
  10097. },
  10098. "start": {
  10099. "type": "integer",
  10100. "minimum": 0
  10101. },
  10102. "end": {
  10103. "type": "integer",
  10104. "minimum": 0
  10105. }
  10106. },
  10107. "required": ["value", "start", "end"],
  10108. "additionalProperties": false
  10109. },
  10110. "FileSource": {
  10111. "type": "object",
  10112. "properties": {
  10113. "text": {
  10114. "$ref": "#/components/schemas/FilePartSourceText"
  10115. },
  10116. "type": {
  10117. "type": "string",
  10118. "enum": ["file"]
  10119. },
  10120. "path": {
  10121. "type": "string"
  10122. }
  10123. },
  10124. "required": ["text", "type", "path"],
  10125. "additionalProperties": false
  10126. },
  10127. "Range": {
  10128. "type": "object",
  10129. "properties": {
  10130. "start": {
  10131. "type": "object",
  10132. "properties": {
  10133. "line": {
  10134. "type": "integer",
  10135. "minimum": 0
  10136. },
  10137. "character": {
  10138. "type": "integer",
  10139. "minimum": 0
  10140. }
  10141. },
  10142. "required": ["line", "character"],
  10143. "additionalProperties": false
  10144. },
  10145. "end": {
  10146. "type": "object",
  10147. "properties": {
  10148. "line": {
  10149. "type": "integer",
  10150. "minimum": 0
  10151. },
  10152. "character": {
  10153. "type": "integer",
  10154. "minimum": 0
  10155. }
  10156. },
  10157. "required": ["line", "character"],
  10158. "additionalProperties": false
  10159. }
  10160. },
  10161. "required": ["start", "end"],
  10162. "additionalProperties": false
  10163. },
  10164. "SymbolSource": {
  10165. "type": "object",
  10166. "properties": {
  10167. "text": {
  10168. "$ref": "#/components/schemas/FilePartSourceText"
  10169. },
  10170. "type": {
  10171. "type": "string",
  10172. "enum": ["symbol"]
  10173. },
  10174. "path": {
  10175. "type": "string"
  10176. },
  10177. "range": {
  10178. "$ref": "#/components/schemas/Range"
  10179. },
  10180. "name": {
  10181. "type": "string"
  10182. },
  10183. "kind": {
  10184. "type": "integer",
  10185. "minimum": 0
  10186. }
  10187. },
  10188. "required": ["text", "type", "path", "range", "name", "kind"],
  10189. "additionalProperties": false
  10190. },
  10191. "ResourceSource": {
  10192. "type": "object",
  10193. "properties": {
  10194. "text": {
  10195. "$ref": "#/components/schemas/FilePartSourceText"
  10196. },
  10197. "type": {
  10198. "type": "string",
  10199. "enum": ["resource"]
  10200. },
  10201. "clientName": {
  10202. "type": "string"
  10203. },
  10204. "uri": {
  10205. "type": "string"
  10206. }
  10207. },
  10208. "required": ["text", "type", "clientName", "uri"],
  10209. "additionalProperties": false
  10210. },
  10211. "FilePartSource": {
  10212. "anyOf": [
  10213. {
  10214. "$ref": "#/components/schemas/FileSource"
  10215. },
  10216. {
  10217. "$ref": "#/components/schemas/SymbolSource"
  10218. },
  10219. {
  10220. "$ref": "#/components/schemas/ResourceSource"
  10221. }
  10222. ]
  10223. },
  10224. "FilePart": {
  10225. "type": "object",
  10226. "properties": {
  10227. "id": {
  10228. "type": "string"
  10229. },
  10230. "sessionID": {
  10231. "type": "string"
  10232. },
  10233. "messageID": {
  10234. "type": "string"
  10235. },
  10236. "type": {
  10237. "type": "string",
  10238. "enum": ["file"]
  10239. },
  10240. "mime": {
  10241. "type": "string"
  10242. },
  10243. "filename": {
  10244. "type": "string"
  10245. },
  10246. "url": {
  10247. "type": "string"
  10248. },
  10249. "source": {
  10250. "$ref": "#/components/schemas/FilePartSource"
  10251. }
  10252. },
  10253. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10254. "additionalProperties": false
  10255. },
  10256. "ToolStatePending": {
  10257. "type": "object",
  10258. "properties": {
  10259. "status": {
  10260. "type": "string",
  10261. "enum": ["pending"]
  10262. },
  10263. "input": {
  10264. "type": "object"
  10265. },
  10266. "raw": {
  10267. "type": "string"
  10268. }
  10269. },
  10270. "required": ["status", "input", "raw"],
  10271. "additionalProperties": false
  10272. },
  10273. "ToolStateRunning": {
  10274. "type": "object",
  10275. "properties": {
  10276. "status": {
  10277. "type": "string",
  10278. "enum": ["running"]
  10279. },
  10280. "input": {
  10281. "type": "object"
  10282. },
  10283. "title": {
  10284. "type": "string"
  10285. },
  10286. "metadata": {
  10287. "type": "object"
  10288. },
  10289. "time": {
  10290. "type": "object",
  10291. "properties": {
  10292. "start": {
  10293. "type": "integer",
  10294. "minimum": 0
  10295. }
  10296. },
  10297. "required": ["start"],
  10298. "additionalProperties": false
  10299. }
  10300. },
  10301. "required": ["status", "input", "time"],
  10302. "additionalProperties": false
  10303. },
  10304. "ToolStateCompleted": {
  10305. "type": "object",
  10306. "properties": {
  10307. "status": {
  10308. "type": "string",
  10309. "enum": ["completed"]
  10310. },
  10311. "input": {
  10312. "type": "object"
  10313. },
  10314. "output": {
  10315. "type": "string"
  10316. },
  10317. "title": {
  10318. "type": "string"
  10319. },
  10320. "metadata": {
  10321. "type": "object"
  10322. },
  10323. "time": {
  10324. "type": "object",
  10325. "properties": {
  10326. "start": {
  10327. "type": "integer",
  10328. "minimum": 0
  10329. },
  10330. "end": {
  10331. "type": "integer",
  10332. "minimum": 0
  10333. },
  10334. "compacted": {
  10335. "type": "integer",
  10336. "minimum": 0
  10337. }
  10338. },
  10339. "required": ["start", "end"],
  10340. "additionalProperties": false
  10341. },
  10342. "attachments": {
  10343. "type": "array",
  10344. "items": {
  10345. "$ref": "#/components/schemas/FilePart"
  10346. }
  10347. }
  10348. },
  10349. "required": ["status", "input", "output", "title", "metadata", "time"],
  10350. "additionalProperties": false
  10351. },
  10352. "ToolStateError": {
  10353. "type": "object",
  10354. "properties": {
  10355. "status": {
  10356. "type": "string",
  10357. "enum": ["error"]
  10358. },
  10359. "input": {
  10360. "type": "object"
  10361. },
  10362. "error": {
  10363. "type": "string"
  10364. },
  10365. "metadata": {
  10366. "type": "object"
  10367. },
  10368. "time": {
  10369. "type": "object",
  10370. "properties": {
  10371. "start": {
  10372. "type": "integer",
  10373. "minimum": 0
  10374. },
  10375. "end": {
  10376. "type": "integer",
  10377. "minimum": 0
  10378. }
  10379. },
  10380. "required": ["start", "end"],
  10381. "additionalProperties": false
  10382. }
  10383. },
  10384. "required": ["status", "input", "error", "time"],
  10385. "additionalProperties": false
  10386. },
  10387. "ToolState": {
  10388. "anyOf": [
  10389. {
  10390. "$ref": "#/components/schemas/ToolStatePending"
  10391. },
  10392. {
  10393. "$ref": "#/components/schemas/ToolStateRunning"
  10394. },
  10395. {
  10396. "$ref": "#/components/schemas/ToolStateCompleted"
  10397. },
  10398. {
  10399. "$ref": "#/components/schemas/ToolStateError"
  10400. }
  10401. ]
  10402. },
  10403. "ToolPart": {
  10404. "type": "object",
  10405. "properties": {
  10406. "id": {
  10407. "type": "string"
  10408. },
  10409. "sessionID": {
  10410. "type": "string"
  10411. },
  10412. "messageID": {
  10413. "type": "string"
  10414. },
  10415. "type": {
  10416. "type": "string",
  10417. "enum": ["tool"]
  10418. },
  10419. "callID": {
  10420. "type": "string"
  10421. },
  10422. "tool": {
  10423. "type": "string"
  10424. },
  10425. "state": {
  10426. "$ref": "#/components/schemas/ToolState"
  10427. },
  10428. "metadata": {
  10429. "type": "object"
  10430. }
  10431. },
  10432. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10433. "additionalProperties": false
  10434. },
  10435. "StepStartPart": {
  10436. "type": "object",
  10437. "properties": {
  10438. "id": {
  10439. "type": "string"
  10440. },
  10441. "sessionID": {
  10442. "type": "string"
  10443. },
  10444. "messageID": {
  10445. "type": "string"
  10446. },
  10447. "type": {
  10448. "type": "string",
  10449. "enum": ["step-start"]
  10450. },
  10451. "snapshot": {
  10452. "type": "string"
  10453. }
  10454. },
  10455. "required": ["id", "sessionID", "messageID", "type"],
  10456. "additionalProperties": false
  10457. },
  10458. "StepFinishPart": {
  10459. "type": "object",
  10460. "properties": {
  10461. "id": {
  10462. "type": "string"
  10463. },
  10464. "sessionID": {
  10465. "type": "string"
  10466. },
  10467. "messageID": {
  10468. "type": "string"
  10469. },
  10470. "type": {
  10471. "type": "string",
  10472. "enum": ["step-finish"]
  10473. },
  10474. "reason": {
  10475. "type": "string"
  10476. },
  10477. "snapshot": {
  10478. "type": "string"
  10479. },
  10480. "cost": {
  10481. "type": "number"
  10482. },
  10483. "tokens": {
  10484. "type": "object",
  10485. "properties": {
  10486. "total": {
  10487. "type": "integer",
  10488. "minimum": 0
  10489. },
  10490. "input": {
  10491. "type": "integer",
  10492. "minimum": 0
  10493. },
  10494. "output": {
  10495. "type": "integer",
  10496. "minimum": 0
  10497. },
  10498. "reasoning": {
  10499. "type": "integer",
  10500. "minimum": 0
  10501. },
  10502. "cache": {
  10503. "type": "object",
  10504. "properties": {
  10505. "read": {
  10506. "type": "integer",
  10507. "minimum": 0
  10508. },
  10509. "write": {
  10510. "type": "integer",
  10511. "minimum": 0
  10512. }
  10513. },
  10514. "required": ["read", "write"],
  10515. "additionalProperties": false
  10516. }
  10517. },
  10518. "required": ["input", "output", "reasoning", "cache"],
  10519. "additionalProperties": false
  10520. }
  10521. },
  10522. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10523. "additionalProperties": false
  10524. },
  10525. "SnapshotPart": {
  10526. "type": "object",
  10527. "properties": {
  10528. "id": {
  10529. "type": "string"
  10530. },
  10531. "sessionID": {
  10532. "type": "string"
  10533. },
  10534. "messageID": {
  10535. "type": "string"
  10536. },
  10537. "type": {
  10538. "type": "string",
  10539. "enum": ["snapshot"]
  10540. },
  10541. "snapshot": {
  10542. "type": "string"
  10543. }
  10544. },
  10545. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10546. "additionalProperties": false
  10547. },
  10548. "PatchPart": {
  10549. "type": "object",
  10550. "properties": {
  10551. "id": {
  10552. "type": "string"
  10553. },
  10554. "sessionID": {
  10555. "type": "string"
  10556. },
  10557. "messageID": {
  10558. "type": "string"
  10559. },
  10560. "type": {
  10561. "type": "string",
  10562. "enum": ["patch"]
  10563. },
  10564. "hash": {
  10565. "type": "string"
  10566. },
  10567. "files": {
  10568. "type": "array",
  10569. "items": {
  10570. "type": "string"
  10571. }
  10572. }
  10573. },
  10574. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10575. "additionalProperties": false
  10576. },
  10577. "AgentPart": {
  10578. "type": "object",
  10579. "properties": {
  10580. "id": {
  10581. "type": "string"
  10582. },
  10583. "sessionID": {
  10584. "type": "string"
  10585. },
  10586. "messageID": {
  10587. "type": "string"
  10588. },
  10589. "type": {
  10590. "type": "string",
  10591. "enum": ["agent"]
  10592. },
  10593. "name": {
  10594. "type": "string"
  10595. },
  10596. "source": {
  10597. "type": "object",
  10598. "properties": {
  10599. "value": {
  10600. "type": "string"
  10601. },
  10602. "start": {
  10603. "type": "integer",
  10604. "minimum": 0
  10605. },
  10606. "end": {
  10607. "type": "integer",
  10608. "minimum": 0
  10609. }
  10610. },
  10611. "required": ["value", "start", "end"],
  10612. "additionalProperties": false
  10613. }
  10614. },
  10615. "required": ["id", "sessionID", "messageID", "type", "name"],
  10616. "additionalProperties": false
  10617. },
  10618. "RetryPart": {
  10619. "type": "object",
  10620. "properties": {
  10621. "id": {
  10622. "type": "string"
  10623. },
  10624. "sessionID": {
  10625. "type": "string"
  10626. },
  10627. "messageID": {
  10628. "type": "string"
  10629. },
  10630. "type": {
  10631. "type": "string",
  10632. "enum": ["retry"]
  10633. },
  10634. "attempt": {
  10635. "type": "integer",
  10636. "minimum": 0
  10637. },
  10638. "error": {
  10639. "$ref": "#/components/schemas/APIError"
  10640. },
  10641. "time": {
  10642. "type": "object",
  10643. "properties": {
  10644. "created": {
  10645. "type": "integer",
  10646. "minimum": 0
  10647. }
  10648. },
  10649. "required": ["created"],
  10650. "additionalProperties": false
  10651. }
  10652. },
  10653. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10654. "additionalProperties": false
  10655. },
  10656. "CompactionPart": {
  10657. "type": "object",
  10658. "properties": {
  10659. "id": {
  10660. "type": "string"
  10661. },
  10662. "sessionID": {
  10663. "type": "string"
  10664. },
  10665. "messageID": {
  10666. "type": "string"
  10667. },
  10668. "type": {
  10669. "type": "string",
  10670. "enum": ["compaction"]
  10671. },
  10672. "auto": {
  10673. "type": "boolean"
  10674. },
  10675. "overflow": {
  10676. "type": "boolean"
  10677. },
  10678. "tail_start_id": {
  10679. "type": "string"
  10680. }
  10681. },
  10682. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10683. "additionalProperties": false
  10684. },
  10685. "Part": {
  10686. "anyOf": [
  10687. {
  10688. "$ref": "#/components/schemas/TextPart"
  10689. },
  10690. {
  10691. "$ref": "#/components/schemas/SubtaskPart"
  10692. },
  10693. {
  10694. "$ref": "#/components/schemas/ReasoningPart"
  10695. },
  10696. {
  10697. "$ref": "#/components/schemas/FilePart"
  10698. },
  10699. {
  10700. "$ref": "#/components/schemas/ToolPart"
  10701. },
  10702. {
  10703. "$ref": "#/components/schemas/StepStartPart"
  10704. },
  10705. {
  10706. "$ref": "#/components/schemas/StepFinishPart"
  10707. },
  10708. {
  10709. "$ref": "#/components/schemas/SnapshotPart"
  10710. },
  10711. {
  10712. "$ref": "#/components/schemas/PatchPart"
  10713. },
  10714. {
  10715. "$ref": "#/components/schemas/AgentPart"
  10716. },
  10717. {
  10718. "$ref": "#/components/schemas/RetryPart"
  10719. },
  10720. {
  10721. "$ref": "#/components/schemas/CompactionPart"
  10722. }
  10723. ]
  10724. },
  10725. "PermissionAction": {
  10726. "type": "string",
  10727. "enum": ["allow", "deny", "ask"]
  10728. },
  10729. "PermissionRule": {
  10730. "type": "object",
  10731. "properties": {
  10732. "permission": {
  10733. "type": "string"
  10734. },
  10735. "pattern": {
  10736. "type": "string"
  10737. },
  10738. "action": {
  10739. "$ref": "#/components/schemas/PermissionAction"
  10740. }
  10741. },
  10742. "required": ["permission", "pattern", "action"],
  10743. "additionalProperties": false
  10744. },
  10745. "PermissionRuleset": {
  10746. "type": "array",
  10747. "items": {
  10748. "$ref": "#/components/schemas/PermissionRule"
  10749. }
  10750. },
  10751. "Session": {
  10752. "type": "object",
  10753. "properties": {
  10754. "id": {
  10755. "type": "string"
  10756. },
  10757. "slug": {
  10758. "type": "string"
  10759. },
  10760. "projectID": {
  10761. "type": "string"
  10762. },
  10763. "workspaceID": {
  10764. "type": "string"
  10765. },
  10766. "directory": {
  10767. "type": "string"
  10768. },
  10769. "path": {
  10770. "type": "string"
  10771. },
  10772. "parentID": {
  10773. "type": "string"
  10774. },
  10775. "summary": {
  10776. "type": "object",
  10777. "properties": {
  10778. "additions": {
  10779. "type": "integer",
  10780. "minimum": 0
  10781. },
  10782. "deletions": {
  10783. "type": "integer",
  10784. "minimum": 0
  10785. },
  10786. "files": {
  10787. "type": "integer",
  10788. "minimum": 0
  10789. },
  10790. "diffs": {
  10791. "type": "array",
  10792. "items": {
  10793. "$ref": "#/components/schemas/SnapshotFileDiff"
  10794. }
  10795. }
  10796. },
  10797. "required": ["additions", "deletions", "files"],
  10798. "additionalProperties": false
  10799. },
  10800. "share": {
  10801. "type": "object",
  10802. "properties": {
  10803. "url": {
  10804. "type": "string"
  10805. }
  10806. },
  10807. "required": ["url"],
  10808. "additionalProperties": false
  10809. },
  10810. "title": {
  10811. "type": "string"
  10812. },
  10813. "agent": {
  10814. "type": "string"
  10815. },
  10816. "model": {
  10817. "type": "object",
  10818. "properties": {
  10819. "id": {
  10820. "type": "string"
  10821. },
  10822. "providerID": {
  10823. "type": "string"
  10824. },
  10825. "variant": {
  10826. "type": "string"
  10827. }
  10828. },
  10829. "required": ["id", "providerID"],
  10830. "additionalProperties": false
  10831. },
  10832. "version": {
  10833. "type": "string"
  10834. },
  10835. "time": {
  10836. "type": "object",
  10837. "properties": {
  10838. "created": {
  10839. "type": "integer",
  10840. "minimum": 0
  10841. },
  10842. "updated": {
  10843. "type": "integer",
  10844. "minimum": 0
  10845. },
  10846. "compacting": {
  10847. "type": "integer",
  10848. "minimum": 0
  10849. },
  10850. "archived": {
  10851. "type": "number"
  10852. }
  10853. },
  10854. "required": ["created", "updated"],
  10855. "additionalProperties": false
  10856. },
  10857. "permission": {
  10858. "$ref": "#/components/schemas/PermissionRuleset"
  10859. },
  10860. "revert": {
  10861. "type": "object",
  10862. "properties": {
  10863. "messageID": {
  10864. "type": "string"
  10865. },
  10866. "partID": {
  10867. "type": "string"
  10868. },
  10869. "snapshot": {
  10870. "type": "string"
  10871. },
  10872. "diff": {
  10873. "type": "string"
  10874. }
  10875. },
  10876. "required": ["messageID"],
  10877. "additionalProperties": false
  10878. }
  10879. },
  10880. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  10881. "additionalProperties": false
  10882. },
  10883. "Prompt": {
  10884. "type": "object",
  10885. "properties": {
  10886. "text": {
  10887. "type": "string"
  10888. },
  10889. "files": {
  10890. "type": "array",
  10891. "items": {
  10892. "$ref": "#/components/schemas/PromptFileAttachment"
  10893. }
  10894. },
  10895. "agents": {
  10896. "type": "array",
  10897. "items": {
  10898. "$ref": "#/components/schemas/PromptAgentAttachment"
  10899. }
  10900. }
  10901. },
  10902. "required": ["text"],
  10903. "additionalProperties": false
  10904. },
  10905. "GlobalEvent": {
  10906. "type": "object",
  10907. "properties": {
  10908. "directory": {
  10909. "type": "string"
  10910. },
  10911. "project": {
  10912. "type": "string"
  10913. },
  10914. "workspace": {
  10915. "type": "string"
  10916. },
  10917. "payload": {
  10918. "anyOf": [
  10919. {
  10920. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10921. },
  10922. {
  10923. "$ref": "#/components/schemas/EventFileEdited"
  10924. },
  10925. {
  10926. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10927. },
  10928. {
  10929. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10930. },
  10931. {
  10932. "$ref": "#/components/schemas/EventLspUpdated"
  10933. },
  10934. {
  10935. "$ref": "#/components/schemas/EventMessagePartDelta"
  10936. },
  10937. {
  10938. "$ref": "#/components/schemas/EventPermissionAsked"
  10939. },
  10940. {
  10941. "$ref": "#/components/schemas/EventPermissionReplied"
  10942. },
  10943. {
  10944. "$ref": "#/components/schemas/EventSessionDiff"
  10945. },
  10946. {
  10947. "$ref": "#/components/schemas/EventSessionError"
  10948. },
  10949. {
  10950. "$ref": "#/components/schemas/EventInstallationUpdated"
  10951. },
  10952. {
  10953. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10954. },
  10955. {
  10956. "$ref": "#/components/schemas/EventQuestionAsked"
  10957. },
  10958. {
  10959. "$ref": "#/components/schemas/EventQuestionReplied"
  10960. },
  10961. {
  10962. "$ref": "#/components/schemas/EventQuestionRejected"
  10963. },
  10964. {
  10965. "$ref": "#/components/schemas/EventTodoUpdated"
  10966. },
  10967. {
  10968. "$ref": "#/components/schemas/EventSessionStatus"
  10969. },
  10970. {
  10971. "$ref": "#/components/schemas/EventSessionIdle"
  10972. },
  10973. {
  10974. "$ref": "#/components/schemas/EventSessionCompacted"
  10975. },
  10976. {
  10977. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10978. },
  10979. {
  10980. "$ref": "#/components/schemas/Event.tui.command.execute"
  10981. },
  10982. {
  10983. "$ref": "#/components/schemas/Event.tui.toast.show"
  10984. },
  10985. {
  10986. "$ref": "#/components/schemas/Event.tui.session.select"
  10987. },
  10988. {
  10989. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10990. },
  10991. {
  10992. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10993. },
  10994. {
  10995. "$ref": "#/components/schemas/EventCommandExecuted"
  10996. },
  10997. {
  10998. "$ref": "#/components/schemas/EventProjectUpdated"
  10999. },
  11000. {
  11001. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11002. },
  11003. {
  11004. "$ref": "#/components/schemas/EventWorkspaceReady"
  11005. },
  11006. {
  11007. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11008. },
  11009. {
  11010. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11011. },
  11012. {
  11013. "$ref": "#/components/schemas/EventWorktreeReady"
  11014. },
  11015. {
  11016. "$ref": "#/components/schemas/EventWorktreeFailed"
  11017. },
  11018. {
  11019. "$ref": "#/components/schemas/EventPtyCreated"
  11020. },
  11021. {
  11022. "$ref": "#/components/schemas/EventPtyUpdated"
  11023. },
  11024. {
  11025. "$ref": "#/components/schemas/EventPtyExited"
  11026. },
  11027. {
  11028. "$ref": "#/components/schemas/EventPtyDeleted"
  11029. },
  11030. {
  11031. "$ref": "#/components/schemas/EventMessageUpdated"
  11032. },
  11033. {
  11034. "$ref": "#/components/schemas/EventMessageRemoved"
  11035. },
  11036. {
  11037. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11038. },
  11039. {
  11040. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11041. },
  11042. {
  11043. "$ref": "#/components/schemas/EventSessionCreated"
  11044. },
  11045. {
  11046. "$ref": "#/components/schemas/EventSessionUpdated"
  11047. },
  11048. {
  11049. "$ref": "#/components/schemas/EventSessionDeleted"
  11050. },
  11051. {
  11052. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11053. },
  11054. {
  11055. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11056. },
  11057. {
  11058. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11059. },
  11060. {
  11061. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11062. },
  11063. {
  11064. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11065. },
  11066. {
  11067. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11068. },
  11069. {
  11070. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11071. },
  11072. {
  11073. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11074. },
  11075. {
  11076. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11077. },
  11078. {
  11079. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11080. },
  11081. {
  11082. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11083. },
  11084. {
  11085. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11086. },
  11087. {
  11088. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11089. },
  11090. {
  11091. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11092. },
  11093. {
  11094. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11095. },
  11096. {
  11097. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11098. },
  11099. {
  11100. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11101. },
  11102. {
  11103. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11104. },
  11105. {
  11106. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11107. },
  11108. {
  11109. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11110. },
  11111. {
  11112. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11113. },
  11114. {
  11115. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11116. },
  11117. {
  11118. "$ref": "#/components/schemas/EventSessionNextRetried"
  11119. },
  11120. {
  11121. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11122. },
  11123. {
  11124. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11125. },
  11126. {
  11127. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11128. },
  11129. {
  11130. "$ref": "#/components/schemas/EventServerConnected"
  11131. },
  11132. {
  11133. "$ref": "#/components/schemas/EventGlobalDisposed"
  11134. },
  11135. {
  11136. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11137. },
  11138. {
  11139. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11140. },
  11141. {
  11142. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11143. },
  11144. {
  11145. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11146. },
  11147. {
  11148. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11149. },
  11150. {
  11151. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11152. },
  11153. {
  11154. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11155. },
  11156. {
  11157. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11158. },
  11159. {
  11160. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11161. },
  11162. {
  11163. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11164. },
  11165. {
  11166. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11167. },
  11168. {
  11169. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11170. },
  11171. {
  11172. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11173. },
  11174. {
  11175. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11176. },
  11177. {
  11178. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11179. },
  11180. {
  11181. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11182. },
  11183. {
  11184. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11185. },
  11186. {
  11187. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11188. },
  11189. {
  11190. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11191. },
  11192. {
  11193. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11194. },
  11195. {
  11196. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11197. },
  11198. {
  11199. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11200. },
  11201. {
  11202. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11203. },
  11204. {
  11205. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11206. },
  11207. {
  11208. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11209. },
  11210. {
  11211. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11212. },
  11213. {
  11214. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11215. },
  11216. {
  11217. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11218. },
  11219. {
  11220. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11221. },
  11222. {
  11223. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11224. },
  11225. {
  11226. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11227. },
  11228. {
  11229. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11230. },
  11231. {
  11232. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11233. }
  11234. ]
  11235. }
  11236. },
  11237. "required": ["directory", "payload"],
  11238. "additionalProperties": false
  11239. },
  11240. "LogLevel": {
  11241. "type": "string",
  11242. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11243. "description": "Log level"
  11244. },
  11245. "ServerConfig": {
  11246. "type": "object",
  11247. "properties": {
  11248. "port": {
  11249. "type": "integer",
  11250. "exclusiveMinimum": 0
  11251. },
  11252. "hostname": {
  11253. "type": "string"
  11254. },
  11255. "mdns": {
  11256. "type": "boolean"
  11257. },
  11258. "mdnsDomain": {
  11259. "type": "string"
  11260. },
  11261. "cors": {
  11262. "type": "array",
  11263. "items": {
  11264. "type": "string"
  11265. }
  11266. }
  11267. },
  11268. "additionalProperties": false,
  11269. "description": "Server configuration for opencode serve and web commands"
  11270. },
  11271. "PermissionActionConfig": {
  11272. "type": "string",
  11273. "enum": ["ask", "allow", "deny"]
  11274. },
  11275. "PermissionObjectConfig": {
  11276. "type": "object",
  11277. "additionalProperties": {
  11278. "$ref": "#/components/schemas/PermissionActionConfig"
  11279. }
  11280. },
  11281. "PermissionRuleConfig": {
  11282. "anyOf": [
  11283. {
  11284. "$ref": "#/components/schemas/PermissionActionConfig"
  11285. },
  11286. {
  11287. "$ref": "#/components/schemas/PermissionObjectConfig"
  11288. }
  11289. ]
  11290. },
  11291. "PermissionConfig": {
  11292. "anyOf": [
  11293. {
  11294. "$ref": "#/components/schemas/PermissionActionConfig"
  11295. },
  11296. {
  11297. "type": "object",
  11298. "properties": {
  11299. "read": {
  11300. "$ref": "#/components/schemas/PermissionRuleConfig"
  11301. },
  11302. "edit": {
  11303. "$ref": "#/components/schemas/PermissionRuleConfig"
  11304. },
  11305. "glob": {
  11306. "$ref": "#/components/schemas/PermissionRuleConfig"
  11307. },
  11308. "grep": {
  11309. "$ref": "#/components/schemas/PermissionRuleConfig"
  11310. },
  11311. "list": {
  11312. "$ref": "#/components/schemas/PermissionRuleConfig"
  11313. },
  11314. "bash": {
  11315. "$ref": "#/components/schemas/PermissionRuleConfig"
  11316. },
  11317. "task": {
  11318. "$ref": "#/components/schemas/PermissionRuleConfig"
  11319. },
  11320. "external_directory": {
  11321. "$ref": "#/components/schemas/PermissionRuleConfig"
  11322. },
  11323. "todowrite": {
  11324. "$ref": "#/components/schemas/PermissionActionConfig"
  11325. },
  11326. "question": {
  11327. "$ref": "#/components/schemas/PermissionActionConfig"
  11328. },
  11329. "webfetch": {
  11330. "$ref": "#/components/schemas/PermissionActionConfig"
  11331. },
  11332. "websearch": {
  11333. "$ref": "#/components/schemas/PermissionActionConfig"
  11334. },
  11335. "lsp": {
  11336. "$ref": "#/components/schemas/PermissionRuleConfig"
  11337. },
  11338. "doom_loop": {
  11339. "$ref": "#/components/schemas/PermissionActionConfig"
  11340. },
  11341. "skill": {
  11342. "$ref": "#/components/schemas/PermissionRuleConfig"
  11343. }
  11344. },
  11345. "additionalProperties": {
  11346. "$ref": "#/components/schemas/PermissionRuleConfig"
  11347. }
  11348. }
  11349. ]
  11350. },
  11351. "AgentConfig": {
  11352. "type": "object",
  11353. "properties": {
  11354. "model": {
  11355. "type": "string"
  11356. },
  11357. "variant": {
  11358. "type": "string"
  11359. },
  11360. "temperature": {
  11361. "type": "number"
  11362. },
  11363. "top_p": {
  11364. "type": "number"
  11365. },
  11366. "prompt": {
  11367. "type": "string"
  11368. },
  11369. "tools": {
  11370. "type": "object",
  11371. "additionalProperties": {
  11372. "type": "boolean"
  11373. }
  11374. },
  11375. "disable": {
  11376. "type": "boolean"
  11377. },
  11378. "description": {
  11379. "type": "string"
  11380. },
  11381. "mode": {
  11382. "type": "string",
  11383. "enum": ["subagent", "primary", "all"]
  11384. },
  11385. "hidden": {
  11386. "type": "boolean"
  11387. },
  11388. "options": {
  11389. "type": "object"
  11390. },
  11391. "color": {
  11392. "anyOf": [
  11393. {
  11394. "type": "string",
  11395. "pattern": "^#[0-9a-fA-F]{6}$"
  11396. },
  11397. {
  11398. "type": "string",
  11399. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11400. }
  11401. ],
  11402. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11403. },
  11404. "steps": {
  11405. "type": "integer",
  11406. "exclusiveMinimum": 0
  11407. },
  11408. "maxSteps": {
  11409. "type": "integer",
  11410. "exclusiveMinimum": 0
  11411. },
  11412. "permission": {
  11413. "$ref": "#/components/schemas/PermissionConfig"
  11414. }
  11415. },
  11416. "additionalProperties": {}
  11417. },
  11418. "ProviderConfig": {
  11419. "type": "object",
  11420. "properties": {
  11421. "api": {
  11422. "type": "string"
  11423. },
  11424. "name": {
  11425. "type": "string"
  11426. },
  11427. "env": {
  11428. "type": "array",
  11429. "items": {
  11430. "type": "string"
  11431. }
  11432. },
  11433. "id": {
  11434. "type": "string"
  11435. },
  11436. "npm": {
  11437. "type": "string"
  11438. },
  11439. "whitelist": {
  11440. "type": "array",
  11441. "items": {
  11442. "type": "string"
  11443. }
  11444. },
  11445. "blacklist": {
  11446. "type": "array",
  11447. "items": {
  11448. "type": "string"
  11449. }
  11450. },
  11451. "options": {
  11452. "type": "object",
  11453. "properties": {
  11454. "apiKey": {
  11455. "type": "string"
  11456. },
  11457. "baseURL": {
  11458. "type": "string"
  11459. },
  11460. "enterpriseUrl": {
  11461. "type": "string"
  11462. },
  11463. "setCacheKey": {
  11464. "type": "boolean"
  11465. },
  11466. "timeout": {
  11467. "anyOf": [
  11468. {
  11469. "type": "integer",
  11470. "exclusiveMinimum": 0
  11471. },
  11472. {
  11473. "type": "boolean",
  11474. "enum": [false]
  11475. }
  11476. ],
  11477. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11478. },
  11479. "chunkTimeout": {
  11480. "type": "integer",
  11481. "exclusiveMinimum": 0
  11482. }
  11483. },
  11484. "additionalProperties": {}
  11485. },
  11486. "models": {
  11487. "type": "object",
  11488. "additionalProperties": {
  11489. "type": "object",
  11490. "properties": {
  11491. "id": {
  11492. "type": "string"
  11493. },
  11494. "name": {
  11495. "type": "string"
  11496. },
  11497. "family": {
  11498. "type": "string"
  11499. },
  11500. "release_date": {
  11501. "type": "string"
  11502. },
  11503. "attachment": {
  11504. "type": "boolean"
  11505. },
  11506. "reasoning": {
  11507. "type": "boolean"
  11508. },
  11509. "temperature": {
  11510. "type": "boolean"
  11511. },
  11512. "tool_call": {
  11513. "type": "boolean"
  11514. },
  11515. "interleaved": {
  11516. "anyOf": [
  11517. {
  11518. "type": "boolean",
  11519. "enum": [true]
  11520. },
  11521. {
  11522. "type": "object",
  11523. "properties": {
  11524. "field": {
  11525. "type": "string",
  11526. "enum": ["reasoning_content", "reasoning_details"]
  11527. }
  11528. },
  11529. "required": ["field"],
  11530. "additionalProperties": false
  11531. }
  11532. ]
  11533. },
  11534. "cost": {
  11535. "type": "object",
  11536. "properties": {
  11537. "input": {
  11538. "type": "number"
  11539. },
  11540. "output": {
  11541. "type": "number"
  11542. },
  11543. "cache_read": {
  11544. "type": "number"
  11545. },
  11546. "cache_write": {
  11547. "type": "number"
  11548. },
  11549. "context_over_200k": {
  11550. "type": "object",
  11551. "properties": {
  11552. "input": {
  11553. "type": "number"
  11554. },
  11555. "output": {
  11556. "type": "number"
  11557. },
  11558. "cache_read": {
  11559. "type": "number"
  11560. },
  11561. "cache_write": {
  11562. "type": "number"
  11563. }
  11564. },
  11565. "required": ["input", "output"],
  11566. "additionalProperties": false
  11567. }
  11568. },
  11569. "required": ["input", "output"],
  11570. "additionalProperties": false
  11571. },
  11572. "limit": {
  11573. "type": "object",
  11574. "properties": {
  11575. "context": {
  11576. "type": "number"
  11577. },
  11578. "input": {
  11579. "type": "number"
  11580. },
  11581. "output": {
  11582. "type": "number"
  11583. }
  11584. },
  11585. "required": ["context", "output"],
  11586. "additionalProperties": false
  11587. },
  11588. "modalities": {
  11589. "type": "object",
  11590. "properties": {
  11591. "input": {
  11592. "type": "array",
  11593. "items": {
  11594. "type": "string",
  11595. "enum": ["text", "audio", "image", "video", "pdf"]
  11596. }
  11597. },
  11598. "output": {
  11599. "type": "array",
  11600. "items": {
  11601. "type": "string",
  11602. "enum": ["text", "audio", "image", "video", "pdf"]
  11603. }
  11604. }
  11605. },
  11606. "required": ["input", "output"],
  11607. "additionalProperties": false
  11608. },
  11609. "experimental": {
  11610. "type": "boolean"
  11611. },
  11612. "status": {
  11613. "type": "string",
  11614. "enum": ["alpha", "beta", "deprecated"]
  11615. },
  11616. "provider": {
  11617. "type": "object",
  11618. "properties": {
  11619. "npm": {
  11620. "type": "string"
  11621. },
  11622. "api": {
  11623. "type": "string"
  11624. }
  11625. },
  11626. "additionalProperties": false
  11627. },
  11628. "options": {
  11629. "type": "object"
  11630. },
  11631. "headers": {
  11632. "type": "object",
  11633. "additionalProperties": {
  11634. "type": "string"
  11635. }
  11636. },
  11637. "variants": {
  11638. "type": "object",
  11639. "additionalProperties": {
  11640. "type": "object",
  11641. "properties": {
  11642. "disabled": {
  11643. "type": "boolean"
  11644. }
  11645. },
  11646. "additionalProperties": {}
  11647. },
  11648. "description": "Variant-specific configuration"
  11649. }
  11650. },
  11651. "additionalProperties": false
  11652. }
  11653. }
  11654. },
  11655. "additionalProperties": false
  11656. },
  11657. "McpLocalConfig": {
  11658. "type": "object",
  11659. "properties": {
  11660. "type": {
  11661. "type": "string",
  11662. "enum": ["local"],
  11663. "description": "Type of MCP server connection"
  11664. },
  11665. "command": {
  11666. "type": "array",
  11667. "items": {
  11668. "type": "string"
  11669. },
  11670. "description": "Command and arguments to run the MCP server"
  11671. },
  11672. "environment": {
  11673. "type": "object",
  11674. "additionalProperties": {
  11675. "type": "string"
  11676. }
  11677. },
  11678. "enabled": {
  11679. "type": "boolean"
  11680. },
  11681. "timeout": {
  11682. "type": "integer",
  11683. "exclusiveMinimum": 0
  11684. }
  11685. },
  11686. "required": ["type", "command"],
  11687. "additionalProperties": false
  11688. },
  11689. "McpOAuthConfig": {
  11690. "type": "object",
  11691. "properties": {
  11692. "clientId": {
  11693. "type": "string"
  11694. },
  11695. "clientSecret": {
  11696. "type": "string"
  11697. },
  11698. "scope": {
  11699. "type": "string"
  11700. },
  11701. "redirectUri": {
  11702. "type": "string"
  11703. }
  11704. },
  11705. "additionalProperties": false
  11706. },
  11707. "McpRemoteConfig": {
  11708. "type": "object",
  11709. "properties": {
  11710. "type": {
  11711. "type": "string",
  11712. "enum": ["remote"],
  11713. "description": "Type of MCP server connection"
  11714. },
  11715. "url": {
  11716. "type": "string",
  11717. "description": "URL of the remote MCP server"
  11718. },
  11719. "enabled": {
  11720. "type": "boolean"
  11721. },
  11722. "headers": {
  11723. "type": "object",
  11724. "additionalProperties": {
  11725. "type": "string"
  11726. }
  11727. },
  11728. "oauth": {
  11729. "anyOf": [
  11730. {
  11731. "$ref": "#/components/schemas/McpOAuthConfig"
  11732. },
  11733. {
  11734. "type": "boolean",
  11735. "enum": [false]
  11736. }
  11737. ],
  11738. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  11739. },
  11740. "timeout": {
  11741. "type": "integer",
  11742. "exclusiveMinimum": 0
  11743. }
  11744. },
  11745. "required": ["type", "url"],
  11746. "additionalProperties": false
  11747. },
  11748. "LayoutConfig": {
  11749. "type": "string",
  11750. "enum": ["auto", "stretch"],
  11751. "description": "@deprecated Always uses stretch layout."
  11752. },
  11753. "Config": {
  11754. "type": "object",
  11755. "properties": {
  11756. "$schema": {
  11757. "type": "string"
  11758. },
  11759. "shell": {
  11760. "type": "string"
  11761. },
  11762. "logLevel": {
  11763. "$ref": "#/components/schemas/LogLevel"
  11764. },
  11765. "server": {
  11766. "$ref": "#/components/schemas/ServerConfig"
  11767. },
  11768. "command": {
  11769. "type": "object",
  11770. "additionalProperties": {
  11771. "type": "object",
  11772. "properties": {
  11773. "template": {
  11774. "type": "string"
  11775. },
  11776. "description": {
  11777. "type": "string"
  11778. },
  11779. "agent": {
  11780. "type": "string"
  11781. },
  11782. "model": {
  11783. "type": "string"
  11784. },
  11785. "subtask": {
  11786. "type": "boolean"
  11787. }
  11788. },
  11789. "required": ["template"],
  11790. "additionalProperties": false
  11791. }
  11792. },
  11793. "skills": {
  11794. "type": "object",
  11795. "properties": {
  11796. "paths": {
  11797. "type": "array",
  11798. "items": {
  11799. "type": "string"
  11800. }
  11801. },
  11802. "urls": {
  11803. "type": "array",
  11804. "items": {
  11805. "type": "string"
  11806. }
  11807. }
  11808. },
  11809. "additionalProperties": false
  11810. },
  11811. "watcher": {
  11812. "type": "object",
  11813. "properties": {
  11814. "ignore": {
  11815. "type": "array",
  11816. "items": {
  11817. "type": "string"
  11818. }
  11819. }
  11820. },
  11821. "additionalProperties": false
  11822. },
  11823. "snapshot": {
  11824. "type": "boolean"
  11825. },
  11826. "plugin": {
  11827. "type": "array",
  11828. "items": {
  11829. "anyOf": [
  11830. {
  11831. "type": "string"
  11832. },
  11833. {
  11834. "type": "array",
  11835. "prefixItems": [
  11836. {
  11837. "type": "string"
  11838. },
  11839. {
  11840. "type": "object"
  11841. }
  11842. ],
  11843. "maxItems": 2,
  11844. "minItems": 2
  11845. }
  11846. ]
  11847. }
  11848. },
  11849. "share": {
  11850. "type": "string",
  11851. "enum": ["manual", "auto", "disabled"]
  11852. },
  11853. "autoshare": {
  11854. "type": "boolean"
  11855. },
  11856. "autoupdate": {
  11857. "anyOf": [
  11858. {
  11859. "type": "boolean"
  11860. },
  11861. {
  11862. "type": "string",
  11863. "enum": ["notify"]
  11864. }
  11865. ],
  11866. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  11867. },
  11868. "disabled_providers": {
  11869. "type": "array",
  11870. "items": {
  11871. "type": "string"
  11872. }
  11873. },
  11874. "enabled_providers": {
  11875. "type": "array",
  11876. "items": {
  11877. "type": "string"
  11878. }
  11879. },
  11880. "model": {
  11881. "type": "string"
  11882. },
  11883. "small_model": {
  11884. "type": "string"
  11885. },
  11886. "default_agent": {
  11887. "type": "string"
  11888. },
  11889. "username": {
  11890. "type": "string"
  11891. },
  11892. "mode": {
  11893. "type": "object",
  11894. "properties": {
  11895. "build": {
  11896. "$ref": "#/components/schemas/AgentConfig"
  11897. },
  11898. "plan": {
  11899. "$ref": "#/components/schemas/AgentConfig"
  11900. }
  11901. },
  11902. "additionalProperties": {
  11903. "$ref": "#/components/schemas/AgentConfig"
  11904. }
  11905. },
  11906. "agent": {
  11907. "type": "object",
  11908. "properties": {
  11909. "plan": {
  11910. "$ref": "#/components/schemas/AgentConfig"
  11911. },
  11912. "build": {
  11913. "$ref": "#/components/schemas/AgentConfig"
  11914. },
  11915. "general": {
  11916. "$ref": "#/components/schemas/AgentConfig"
  11917. },
  11918. "explore": {
  11919. "$ref": "#/components/schemas/AgentConfig"
  11920. },
  11921. "title": {
  11922. "$ref": "#/components/schemas/AgentConfig"
  11923. },
  11924. "summary": {
  11925. "$ref": "#/components/schemas/AgentConfig"
  11926. },
  11927. "compaction": {
  11928. "$ref": "#/components/schemas/AgentConfig"
  11929. }
  11930. },
  11931. "additionalProperties": {
  11932. "$ref": "#/components/schemas/AgentConfig"
  11933. }
  11934. },
  11935. "provider": {
  11936. "type": "object",
  11937. "additionalProperties": {
  11938. "$ref": "#/components/schemas/ProviderConfig"
  11939. }
  11940. },
  11941. "mcp": {
  11942. "type": "object",
  11943. "additionalProperties": {
  11944. "anyOf": [
  11945. {
  11946. "$ref": "#/components/schemas/McpLocalConfig"
  11947. },
  11948. {
  11949. "$ref": "#/components/schemas/McpRemoteConfig"
  11950. },
  11951. {
  11952. "type": "object",
  11953. "properties": {
  11954. "enabled": {
  11955. "type": "boolean"
  11956. }
  11957. },
  11958. "required": ["enabled"],
  11959. "additionalProperties": false
  11960. }
  11961. ]
  11962. }
  11963. },
  11964. "formatter": {
  11965. "anyOf": [
  11966. {
  11967. "type": "boolean"
  11968. },
  11969. {
  11970. "type": "object",
  11971. "additionalProperties": {
  11972. "type": "object",
  11973. "properties": {
  11974. "disabled": {
  11975. "type": "boolean"
  11976. },
  11977. "command": {
  11978. "type": "array",
  11979. "items": {
  11980. "type": "string"
  11981. }
  11982. },
  11983. "environment": {
  11984. "type": "object",
  11985. "additionalProperties": {
  11986. "type": "string"
  11987. }
  11988. },
  11989. "extensions": {
  11990. "type": "array",
  11991. "items": {
  11992. "type": "string"
  11993. }
  11994. }
  11995. },
  11996. "additionalProperties": false
  11997. }
  11998. }
  11999. ],
  12000. "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."
  12001. },
  12002. "lsp": {
  12003. "anyOf": [
  12004. {
  12005. "type": "boolean"
  12006. },
  12007. {
  12008. "type": "object",
  12009. "additionalProperties": {
  12010. "anyOf": [
  12011. {
  12012. "type": "object",
  12013. "properties": {
  12014. "disabled": {
  12015. "type": "boolean",
  12016. "enum": [true]
  12017. }
  12018. },
  12019. "required": ["disabled"],
  12020. "additionalProperties": false
  12021. },
  12022. {
  12023. "type": "object",
  12024. "properties": {
  12025. "command": {
  12026. "type": "array",
  12027. "items": {
  12028. "type": "string"
  12029. }
  12030. },
  12031. "extensions": {
  12032. "type": "array",
  12033. "items": {
  12034. "type": "string"
  12035. }
  12036. },
  12037. "disabled": {
  12038. "type": "boolean"
  12039. },
  12040. "env": {
  12041. "type": "object",
  12042. "additionalProperties": {
  12043. "type": "string"
  12044. }
  12045. },
  12046. "initialization": {
  12047. "type": "object"
  12048. }
  12049. },
  12050. "required": ["command"],
  12051. "additionalProperties": false
  12052. }
  12053. ]
  12054. }
  12055. }
  12056. ],
  12057. "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."
  12058. },
  12059. "instructions": {
  12060. "type": "array",
  12061. "items": {
  12062. "type": "string"
  12063. }
  12064. },
  12065. "layout": {
  12066. "$ref": "#/components/schemas/LayoutConfig"
  12067. },
  12068. "permission": {
  12069. "$ref": "#/components/schemas/PermissionConfig"
  12070. },
  12071. "tools": {
  12072. "type": "object",
  12073. "additionalProperties": {
  12074. "type": "boolean"
  12075. }
  12076. },
  12077. "enterprise": {
  12078. "type": "object",
  12079. "properties": {
  12080. "url": {
  12081. "type": "string"
  12082. }
  12083. },
  12084. "additionalProperties": false
  12085. },
  12086. "tool_output": {
  12087. "type": "object",
  12088. "properties": {
  12089. "max_lines": {
  12090. "type": "integer",
  12091. "exclusiveMinimum": 0
  12092. },
  12093. "max_bytes": {
  12094. "type": "integer",
  12095. "exclusiveMinimum": 0
  12096. }
  12097. },
  12098. "additionalProperties": false
  12099. },
  12100. "compaction": {
  12101. "type": "object",
  12102. "properties": {
  12103. "auto": {
  12104. "type": "boolean"
  12105. },
  12106. "prune": {
  12107. "type": "boolean"
  12108. },
  12109. "tail_turns": {
  12110. "type": "integer",
  12111. "minimum": 0
  12112. },
  12113. "preserve_recent_tokens": {
  12114. "type": "integer",
  12115. "minimum": 0
  12116. },
  12117. "reserved": {
  12118. "type": "integer",
  12119. "minimum": 0
  12120. }
  12121. },
  12122. "additionalProperties": false
  12123. },
  12124. "experimental": {
  12125. "type": "object",
  12126. "properties": {
  12127. "disable_paste_summary": {
  12128. "type": "boolean"
  12129. },
  12130. "batch_tool": {
  12131. "type": "boolean"
  12132. },
  12133. "openTelemetry": {
  12134. "type": "boolean"
  12135. },
  12136. "primary_tools": {
  12137. "type": "array",
  12138. "items": {
  12139. "type": "string"
  12140. }
  12141. },
  12142. "continue_loop_on_deny": {
  12143. "type": "boolean"
  12144. },
  12145. "mcp_timeout": {
  12146. "type": "integer",
  12147. "exclusiveMinimum": 0
  12148. }
  12149. },
  12150. "additionalProperties": false
  12151. }
  12152. },
  12153. "additionalProperties": false
  12154. },
  12155. "Model": {
  12156. "type": "object",
  12157. "properties": {
  12158. "id": {
  12159. "type": "string"
  12160. },
  12161. "providerID": {
  12162. "type": "string"
  12163. },
  12164. "api": {
  12165. "type": "object",
  12166. "properties": {
  12167. "id": {
  12168. "type": "string"
  12169. },
  12170. "url": {
  12171. "type": "string"
  12172. },
  12173. "npm": {
  12174. "type": "string"
  12175. }
  12176. },
  12177. "required": ["id", "url", "npm"],
  12178. "additionalProperties": false
  12179. },
  12180. "name": {
  12181. "type": "string"
  12182. },
  12183. "family": {
  12184. "type": "string"
  12185. },
  12186. "capabilities": {
  12187. "type": "object",
  12188. "properties": {
  12189. "temperature": {
  12190. "type": "boolean"
  12191. },
  12192. "reasoning": {
  12193. "type": "boolean"
  12194. },
  12195. "attachment": {
  12196. "type": "boolean"
  12197. },
  12198. "toolcall": {
  12199. "type": "boolean"
  12200. },
  12201. "input": {
  12202. "type": "object",
  12203. "properties": {
  12204. "text": {
  12205. "type": "boolean"
  12206. },
  12207. "audio": {
  12208. "type": "boolean"
  12209. },
  12210. "image": {
  12211. "type": "boolean"
  12212. },
  12213. "video": {
  12214. "type": "boolean"
  12215. },
  12216. "pdf": {
  12217. "type": "boolean"
  12218. }
  12219. },
  12220. "required": ["text", "audio", "image", "video", "pdf"],
  12221. "additionalProperties": false
  12222. },
  12223. "output": {
  12224. "type": "object",
  12225. "properties": {
  12226. "text": {
  12227. "type": "boolean"
  12228. },
  12229. "audio": {
  12230. "type": "boolean"
  12231. },
  12232. "image": {
  12233. "type": "boolean"
  12234. },
  12235. "video": {
  12236. "type": "boolean"
  12237. },
  12238. "pdf": {
  12239. "type": "boolean"
  12240. }
  12241. },
  12242. "required": ["text", "audio", "image", "video", "pdf"],
  12243. "additionalProperties": false
  12244. },
  12245. "interleaved": {
  12246. "anyOf": [
  12247. {
  12248. "type": "boolean"
  12249. },
  12250. {
  12251. "type": "object",
  12252. "properties": {
  12253. "field": {
  12254. "type": "string",
  12255. "enum": ["reasoning_content", "reasoning_details"]
  12256. }
  12257. },
  12258. "required": ["field"],
  12259. "additionalProperties": false
  12260. }
  12261. ]
  12262. }
  12263. },
  12264. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12265. "additionalProperties": false
  12266. },
  12267. "cost": {
  12268. "type": "object",
  12269. "properties": {
  12270. "input": {
  12271. "type": "number"
  12272. },
  12273. "output": {
  12274. "type": "number"
  12275. },
  12276. "cache": {
  12277. "type": "object",
  12278. "properties": {
  12279. "read": {
  12280. "type": "number"
  12281. },
  12282. "write": {
  12283. "type": "number"
  12284. }
  12285. },
  12286. "required": ["read", "write"],
  12287. "additionalProperties": false
  12288. },
  12289. "experimentalOver200K": {
  12290. "type": "object",
  12291. "properties": {
  12292. "input": {
  12293. "type": "number"
  12294. },
  12295. "output": {
  12296. "type": "number"
  12297. },
  12298. "cache": {
  12299. "type": "object",
  12300. "properties": {
  12301. "read": {
  12302. "type": "number"
  12303. },
  12304. "write": {
  12305. "type": "number"
  12306. }
  12307. },
  12308. "required": ["read", "write"],
  12309. "additionalProperties": false
  12310. }
  12311. },
  12312. "required": ["input", "output", "cache"],
  12313. "additionalProperties": false
  12314. }
  12315. },
  12316. "required": ["input", "output", "cache"],
  12317. "additionalProperties": false
  12318. },
  12319. "limit": {
  12320. "type": "object",
  12321. "properties": {
  12322. "context": {
  12323. "type": "number"
  12324. },
  12325. "input": {
  12326. "type": "number"
  12327. },
  12328. "output": {
  12329. "type": "number"
  12330. }
  12331. },
  12332. "required": ["context", "output"],
  12333. "additionalProperties": false
  12334. },
  12335. "status": {
  12336. "type": "string",
  12337. "enum": ["alpha", "beta", "deprecated", "active"]
  12338. },
  12339. "options": {
  12340. "type": "object"
  12341. },
  12342. "headers": {
  12343. "type": "object",
  12344. "additionalProperties": {
  12345. "type": "string"
  12346. }
  12347. },
  12348. "release_date": {
  12349. "type": "string"
  12350. },
  12351. "variants": {
  12352. "type": "object",
  12353. "additionalProperties": {
  12354. "type": "object"
  12355. }
  12356. }
  12357. },
  12358. "required": [
  12359. "id",
  12360. "providerID",
  12361. "api",
  12362. "name",
  12363. "capabilities",
  12364. "cost",
  12365. "limit",
  12366. "status",
  12367. "options",
  12368. "headers",
  12369. "release_date"
  12370. ],
  12371. "additionalProperties": false
  12372. },
  12373. "Provider": {
  12374. "type": "object",
  12375. "properties": {
  12376. "id": {
  12377. "type": "string"
  12378. },
  12379. "name": {
  12380. "type": "string"
  12381. },
  12382. "source": {
  12383. "type": "string",
  12384. "enum": ["env", "config", "custom", "api"]
  12385. },
  12386. "env": {
  12387. "type": "array",
  12388. "items": {
  12389. "type": "string"
  12390. }
  12391. },
  12392. "key": {
  12393. "type": "string"
  12394. },
  12395. "options": {
  12396. "type": "object"
  12397. },
  12398. "models": {
  12399. "type": "object",
  12400. "additionalProperties": {
  12401. "$ref": "#/components/schemas/Model"
  12402. }
  12403. }
  12404. },
  12405. "required": ["id", "name", "source", "env", "options", "models"],
  12406. "additionalProperties": false
  12407. },
  12408. "ConsoleState": {
  12409. "type": "object",
  12410. "properties": {
  12411. "consoleManagedProviders": {
  12412. "type": "array",
  12413. "items": {
  12414. "type": "string"
  12415. }
  12416. },
  12417. "activeOrgName": {
  12418. "type": "string"
  12419. },
  12420. "switchableOrgCount": {
  12421. "type": "integer",
  12422. "minimum": 0
  12423. }
  12424. },
  12425. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12426. "additionalProperties": false
  12427. },
  12428. "ToolListItem": {
  12429. "type": "object",
  12430. "properties": {
  12431. "id": {
  12432. "type": "string"
  12433. },
  12434. "description": {
  12435. "type": "string"
  12436. },
  12437. "parameters": {}
  12438. },
  12439. "required": ["id", "description", "parameters"],
  12440. "additionalProperties": false
  12441. },
  12442. "ToolList": {
  12443. "type": "array",
  12444. "items": {
  12445. "$ref": "#/components/schemas/ToolListItem"
  12446. }
  12447. },
  12448. "ToolIDs": {
  12449. "type": "array",
  12450. "items": {
  12451. "type": "string"
  12452. }
  12453. },
  12454. "WorktreeCreateInput": {
  12455. "type": "object",
  12456. "properties": {
  12457. "name": {
  12458. "type": "string"
  12459. },
  12460. "startCommand": {
  12461. "type": "string",
  12462. "description": "Additional startup script to run after the project's start command"
  12463. }
  12464. },
  12465. "additionalProperties": false
  12466. },
  12467. "Worktree": {
  12468. "type": "object",
  12469. "properties": {
  12470. "name": {
  12471. "type": "string"
  12472. },
  12473. "branch": {
  12474. "type": "string"
  12475. },
  12476. "directory": {
  12477. "type": "string"
  12478. }
  12479. },
  12480. "required": ["name", "branch", "directory"],
  12481. "additionalProperties": false
  12482. },
  12483. "WorktreeRemoveInput": {
  12484. "type": "object",
  12485. "properties": {
  12486. "directory": {
  12487. "type": "string"
  12488. }
  12489. },
  12490. "required": ["directory"],
  12491. "additionalProperties": false
  12492. },
  12493. "WorktreeResetInput": {
  12494. "type": "object",
  12495. "properties": {
  12496. "directory": {
  12497. "type": "string"
  12498. }
  12499. },
  12500. "required": ["directory"],
  12501. "additionalProperties": false
  12502. },
  12503. "ProjectSummary": {
  12504. "type": "object",
  12505. "properties": {
  12506. "id": {
  12507. "type": "string"
  12508. },
  12509. "name": {
  12510. "type": "string"
  12511. },
  12512. "worktree": {
  12513. "type": "string"
  12514. }
  12515. },
  12516. "required": ["id", "worktree"],
  12517. "additionalProperties": false
  12518. },
  12519. "GlobalSession": {
  12520. "type": "object",
  12521. "properties": {
  12522. "id": {
  12523. "type": "string"
  12524. },
  12525. "slug": {
  12526. "type": "string"
  12527. },
  12528. "projectID": {
  12529. "type": "string"
  12530. },
  12531. "workspaceID": {
  12532. "type": "string"
  12533. },
  12534. "directory": {
  12535. "type": "string"
  12536. },
  12537. "path": {
  12538. "type": "string"
  12539. },
  12540. "parentID": {
  12541. "type": "string"
  12542. },
  12543. "summary": {
  12544. "type": "object",
  12545. "properties": {
  12546. "additions": {
  12547. "type": "integer",
  12548. "minimum": 0
  12549. },
  12550. "deletions": {
  12551. "type": "integer",
  12552. "minimum": 0
  12553. },
  12554. "files": {
  12555. "type": "integer",
  12556. "minimum": 0
  12557. },
  12558. "diffs": {
  12559. "type": "array",
  12560. "items": {
  12561. "$ref": "#/components/schemas/SnapshotFileDiff"
  12562. }
  12563. }
  12564. },
  12565. "required": ["additions", "deletions", "files"],
  12566. "additionalProperties": false
  12567. },
  12568. "share": {
  12569. "type": "object",
  12570. "properties": {
  12571. "url": {
  12572. "type": "string"
  12573. }
  12574. },
  12575. "required": ["url"],
  12576. "additionalProperties": false
  12577. },
  12578. "title": {
  12579. "type": "string"
  12580. },
  12581. "agent": {
  12582. "type": "string"
  12583. },
  12584. "model": {
  12585. "type": "object",
  12586. "properties": {
  12587. "id": {
  12588. "type": "string"
  12589. },
  12590. "providerID": {
  12591. "type": "string"
  12592. },
  12593. "variant": {
  12594. "type": "string"
  12595. }
  12596. },
  12597. "required": ["id", "providerID"],
  12598. "additionalProperties": false
  12599. },
  12600. "version": {
  12601. "type": "string"
  12602. },
  12603. "time": {
  12604. "type": "object",
  12605. "properties": {
  12606. "created": {
  12607. "type": "integer",
  12608. "minimum": 0
  12609. },
  12610. "updated": {
  12611. "type": "integer",
  12612. "minimum": 0
  12613. },
  12614. "compacting": {
  12615. "type": "integer",
  12616. "minimum": 0
  12617. },
  12618. "archived": {
  12619. "type": "number"
  12620. }
  12621. },
  12622. "required": ["created", "updated"],
  12623. "additionalProperties": false
  12624. },
  12625. "permission": {
  12626. "$ref": "#/components/schemas/PermissionRuleset"
  12627. },
  12628. "revert": {
  12629. "type": "object",
  12630. "properties": {
  12631. "messageID": {
  12632. "type": "string"
  12633. },
  12634. "partID": {
  12635. "type": "string"
  12636. },
  12637. "snapshot": {
  12638. "type": "string"
  12639. },
  12640. "diff": {
  12641. "type": "string"
  12642. }
  12643. },
  12644. "required": ["messageID"],
  12645. "additionalProperties": false
  12646. },
  12647. "project": {
  12648. "anyOf": [
  12649. {
  12650. "$ref": "#/components/schemas/ProjectSummary"
  12651. },
  12652. {
  12653. "type": "null"
  12654. }
  12655. ]
  12656. }
  12657. },
  12658. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  12659. "additionalProperties": false
  12660. },
  12661. "McpResource": {
  12662. "type": "object",
  12663. "properties": {
  12664. "name": {
  12665. "type": "string"
  12666. },
  12667. "uri": {
  12668. "type": "string"
  12669. },
  12670. "description": {
  12671. "type": "string"
  12672. },
  12673. "mimeType": {
  12674. "type": "string"
  12675. },
  12676. "client": {
  12677. "type": "string"
  12678. }
  12679. },
  12680. "required": ["name", "uri", "client"],
  12681. "additionalProperties": false
  12682. },
  12683. "Symbol": {
  12684. "type": "object",
  12685. "properties": {
  12686. "name": {
  12687. "type": "string"
  12688. },
  12689. "kind": {
  12690. "type": "integer",
  12691. "minimum": 0
  12692. },
  12693. "location": {
  12694. "type": "object",
  12695. "properties": {
  12696. "uri": {
  12697. "type": "string"
  12698. },
  12699. "range": {
  12700. "$ref": "#/components/schemas/Range"
  12701. }
  12702. },
  12703. "required": ["uri", "range"],
  12704. "additionalProperties": false
  12705. }
  12706. },
  12707. "required": ["name", "kind", "location"],
  12708. "additionalProperties": false
  12709. },
  12710. "FileNode": {
  12711. "type": "object",
  12712. "properties": {
  12713. "name": {
  12714. "type": "string"
  12715. },
  12716. "path": {
  12717. "type": "string"
  12718. },
  12719. "absolute": {
  12720. "type": "string"
  12721. },
  12722. "type": {
  12723. "type": "string",
  12724. "enum": ["file", "directory"]
  12725. },
  12726. "ignored": {
  12727. "type": "boolean"
  12728. }
  12729. },
  12730. "required": ["name", "path", "absolute", "type", "ignored"],
  12731. "additionalProperties": false
  12732. },
  12733. "FileContent": {
  12734. "type": "object",
  12735. "properties": {
  12736. "type": {
  12737. "type": "string",
  12738. "enum": ["text", "binary"]
  12739. },
  12740. "content": {
  12741. "type": "string"
  12742. },
  12743. "diff": {
  12744. "type": "string"
  12745. },
  12746. "patch": {
  12747. "type": "object",
  12748. "properties": {
  12749. "oldFileName": {
  12750. "type": "string"
  12751. },
  12752. "newFileName": {
  12753. "type": "string"
  12754. },
  12755. "oldHeader": {
  12756. "type": "string"
  12757. },
  12758. "newHeader": {
  12759. "type": "string"
  12760. },
  12761. "hunks": {
  12762. "type": "array",
  12763. "items": {
  12764. "type": "object",
  12765. "properties": {
  12766. "oldStart": {
  12767. "type": "integer",
  12768. "minimum": 0
  12769. },
  12770. "oldLines": {
  12771. "type": "integer",
  12772. "minimum": 0
  12773. },
  12774. "newStart": {
  12775. "type": "integer",
  12776. "minimum": 0
  12777. },
  12778. "newLines": {
  12779. "type": "integer",
  12780. "minimum": 0
  12781. },
  12782. "lines": {
  12783. "type": "array",
  12784. "items": {
  12785. "type": "string"
  12786. }
  12787. }
  12788. },
  12789. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  12790. "additionalProperties": false
  12791. }
  12792. },
  12793. "index": {
  12794. "type": "string"
  12795. }
  12796. },
  12797. "required": ["oldFileName", "newFileName", "hunks"],
  12798. "additionalProperties": false
  12799. },
  12800. "encoding": {
  12801. "type": "string",
  12802. "enum": ["base64"]
  12803. },
  12804. "mimeType": {
  12805. "type": "string"
  12806. }
  12807. },
  12808. "required": ["type", "content"],
  12809. "additionalProperties": false
  12810. },
  12811. "File": {
  12812. "type": "object",
  12813. "properties": {
  12814. "path": {
  12815. "type": "string"
  12816. },
  12817. "added": {
  12818. "type": "integer",
  12819. "minimum": 0
  12820. },
  12821. "removed": {
  12822. "type": "integer",
  12823. "minimum": 0
  12824. },
  12825. "status": {
  12826. "type": "string",
  12827. "enum": ["added", "deleted", "modified"]
  12828. }
  12829. },
  12830. "required": ["path", "added", "removed", "status"],
  12831. "additionalProperties": false
  12832. },
  12833. "Path": {
  12834. "type": "object",
  12835. "properties": {
  12836. "home": {
  12837. "type": "string"
  12838. },
  12839. "state": {
  12840. "type": "string"
  12841. },
  12842. "config": {
  12843. "type": "string"
  12844. },
  12845. "worktree": {
  12846. "type": "string"
  12847. },
  12848. "directory": {
  12849. "type": "string"
  12850. }
  12851. },
  12852. "required": ["home", "state", "config", "worktree", "directory"],
  12853. "additionalProperties": false
  12854. },
  12855. "VcsInfo": {
  12856. "type": "object",
  12857. "properties": {
  12858. "branch": {
  12859. "type": "string"
  12860. },
  12861. "default_branch": {
  12862. "type": "string"
  12863. }
  12864. },
  12865. "additionalProperties": false
  12866. },
  12867. "VcsFileStatus": {
  12868. "type": "object",
  12869. "properties": {
  12870. "file": {
  12871. "type": "string"
  12872. },
  12873. "additions": {
  12874. "type": "integer",
  12875. "minimum": 0
  12876. },
  12877. "deletions": {
  12878. "type": "integer",
  12879. "minimum": 0
  12880. },
  12881. "status": {
  12882. "type": "string",
  12883. "enum": ["added", "deleted", "modified"]
  12884. }
  12885. },
  12886. "required": ["file", "additions", "deletions", "status"],
  12887. "additionalProperties": false
  12888. },
  12889. "VcsFileDiff": {
  12890. "type": "object",
  12891. "properties": {
  12892. "file": {
  12893. "type": "string"
  12894. },
  12895. "patch": {
  12896. "type": "string"
  12897. },
  12898. "additions": {
  12899. "type": "integer",
  12900. "minimum": 0
  12901. },
  12902. "deletions": {
  12903. "type": "integer",
  12904. "minimum": 0
  12905. },
  12906. "status": {
  12907. "type": "string",
  12908. "enum": ["added", "deleted", "modified"]
  12909. }
  12910. },
  12911. "required": ["file", "patch", "additions", "deletions"],
  12912. "additionalProperties": false
  12913. },
  12914. "VcsApplyError": {
  12915. "type": "object",
  12916. "properties": {
  12917. "name": {
  12918. "type": "string",
  12919. "enum": ["VcsApplyError"]
  12920. },
  12921. "data": {
  12922. "type": "object",
  12923. "properties": {
  12924. "message": {
  12925. "type": "string"
  12926. },
  12927. "reason": {
  12928. "type": "string",
  12929. "enum": ["non-git", "not-clean"]
  12930. }
  12931. },
  12932. "required": ["message", "reason"],
  12933. "additionalProperties": false
  12934. }
  12935. },
  12936. "required": ["name", "data"],
  12937. "additionalProperties": false
  12938. },
  12939. "Command": {
  12940. "type": "object",
  12941. "properties": {
  12942. "name": {
  12943. "type": "string"
  12944. },
  12945. "description": {
  12946. "type": "string"
  12947. },
  12948. "agent": {
  12949. "type": "string"
  12950. },
  12951. "model": {
  12952. "type": "string"
  12953. },
  12954. "source": {
  12955. "type": "string",
  12956. "enum": ["command", "mcp", "skill"]
  12957. },
  12958. "template": {
  12959. "type": "string"
  12960. },
  12961. "subtask": {
  12962. "type": "boolean"
  12963. },
  12964. "hints": {
  12965. "type": "array",
  12966. "items": {
  12967. "type": "string"
  12968. }
  12969. }
  12970. },
  12971. "required": ["name", "template", "hints"],
  12972. "additionalProperties": false
  12973. },
  12974. "Agent": {
  12975. "type": "object",
  12976. "properties": {
  12977. "name": {
  12978. "type": "string"
  12979. },
  12980. "description": {
  12981. "type": "string"
  12982. },
  12983. "mode": {
  12984. "type": "string",
  12985. "enum": ["subagent", "primary", "all"]
  12986. },
  12987. "native": {
  12988. "type": "boolean"
  12989. },
  12990. "hidden": {
  12991. "type": "boolean"
  12992. },
  12993. "topP": {
  12994. "type": "number"
  12995. },
  12996. "temperature": {
  12997. "type": "number"
  12998. },
  12999. "color": {
  13000. "type": "string"
  13001. },
  13002. "permission": {
  13003. "$ref": "#/components/schemas/PermissionRuleset"
  13004. },
  13005. "model": {
  13006. "type": "object",
  13007. "properties": {
  13008. "modelID": {
  13009. "type": "string"
  13010. },
  13011. "providerID": {
  13012. "type": "string"
  13013. }
  13014. },
  13015. "required": ["modelID", "providerID"],
  13016. "additionalProperties": false
  13017. },
  13018. "variant": {
  13019. "type": "string"
  13020. },
  13021. "prompt": {
  13022. "type": "string"
  13023. },
  13024. "options": {
  13025. "type": "object"
  13026. },
  13027. "steps": {
  13028. "type": "number"
  13029. }
  13030. },
  13031. "required": ["name", "mode", "permission", "options"],
  13032. "additionalProperties": false
  13033. },
  13034. "LSPStatus": {
  13035. "type": "object",
  13036. "properties": {
  13037. "id": {
  13038. "type": "string"
  13039. },
  13040. "name": {
  13041. "type": "string"
  13042. },
  13043. "root": {
  13044. "type": "string"
  13045. },
  13046. "status": {
  13047. "type": "string",
  13048. "enum": ["connected", "error"]
  13049. }
  13050. },
  13051. "required": ["id", "name", "root", "status"],
  13052. "additionalProperties": false
  13053. },
  13054. "FormatterStatus": {
  13055. "type": "object",
  13056. "properties": {
  13057. "name": {
  13058. "type": "string"
  13059. },
  13060. "extensions": {
  13061. "type": "array",
  13062. "items": {
  13063. "type": "string"
  13064. }
  13065. },
  13066. "enabled": {
  13067. "type": "boolean"
  13068. }
  13069. },
  13070. "required": ["name", "extensions", "enabled"],
  13071. "additionalProperties": false
  13072. },
  13073. "MCPStatusConnected": {
  13074. "type": "object",
  13075. "properties": {
  13076. "status": {
  13077. "type": "string",
  13078. "enum": ["connected"]
  13079. }
  13080. },
  13081. "required": ["status"],
  13082. "additionalProperties": false
  13083. },
  13084. "MCPStatusDisabled": {
  13085. "type": "object",
  13086. "properties": {
  13087. "status": {
  13088. "type": "string",
  13089. "enum": ["disabled"]
  13090. }
  13091. },
  13092. "required": ["status"],
  13093. "additionalProperties": false
  13094. },
  13095. "MCPStatusFailed": {
  13096. "type": "object",
  13097. "properties": {
  13098. "status": {
  13099. "type": "string",
  13100. "enum": ["failed"]
  13101. },
  13102. "error": {
  13103. "type": "string"
  13104. }
  13105. },
  13106. "required": ["status", "error"],
  13107. "additionalProperties": false
  13108. },
  13109. "MCPStatusNeedsAuth": {
  13110. "type": "object",
  13111. "properties": {
  13112. "status": {
  13113. "type": "string",
  13114. "enum": ["needs_auth"]
  13115. }
  13116. },
  13117. "required": ["status"],
  13118. "additionalProperties": false
  13119. },
  13120. "MCPStatusNeedsClientRegistration": {
  13121. "type": "object",
  13122. "properties": {
  13123. "status": {
  13124. "type": "string",
  13125. "enum": ["needs_client_registration"]
  13126. },
  13127. "error": {
  13128. "type": "string"
  13129. }
  13130. },
  13131. "required": ["status", "error"],
  13132. "additionalProperties": false
  13133. },
  13134. "MCPStatus": {
  13135. "anyOf": [
  13136. {
  13137. "$ref": "#/components/schemas/MCPStatusConnected"
  13138. },
  13139. {
  13140. "$ref": "#/components/schemas/MCPStatusDisabled"
  13141. },
  13142. {
  13143. "$ref": "#/components/schemas/MCPStatusFailed"
  13144. },
  13145. {
  13146. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13147. },
  13148. {
  13149. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13150. }
  13151. ]
  13152. },
  13153. "McpUnsupportedOAuthError": {
  13154. "type": "object",
  13155. "properties": {
  13156. "error": {
  13157. "type": "string"
  13158. }
  13159. },
  13160. "required": ["error"],
  13161. "additionalProperties": false
  13162. },
  13163. "NotFoundError": {
  13164. "type": "object",
  13165. "required": ["name", "data"],
  13166. "properties": {
  13167. "name": {
  13168. "type": "string",
  13169. "enum": ["NotFoundError"]
  13170. },
  13171. "data": {
  13172. "type": "object",
  13173. "required": ["message"],
  13174. "properties": {
  13175. "message": {
  13176. "type": "string"
  13177. }
  13178. }
  13179. }
  13180. }
  13181. },
  13182. "effect_HttpApiError_Forbidden": {
  13183. "type": "object",
  13184. "properties": {
  13185. "_tag": {
  13186. "type": "string",
  13187. "enum": ["Forbidden"]
  13188. }
  13189. },
  13190. "required": ["_tag"],
  13191. "additionalProperties": false
  13192. },
  13193. "ProviderAuthMethod": {
  13194. "type": "object",
  13195. "properties": {
  13196. "type": {
  13197. "type": "string",
  13198. "enum": ["oauth", "api"]
  13199. },
  13200. "label": {
  13201. "type": "string"
  13202. },
  13203. "prompts": {
  13204. "type": "array",
  13205. "items": {
  13206. "anyOf": [
  13207. {
  13208. "type": "object",
  13209. "properties": {
  13210. "type": {
  13211. "type": "string",
  13212. "enum": ["text"]
  13213. },
  13214. "key": {
  13215. "type": "string"
  13216. },
  13217. "message": {
  13218. "type": "string"
  13219. },
  13220. "placeholder": {
  13221. "type": "string"
  13222. },
  13223. "when": {
  13224. "type": "object",
  13225. "properties": {
  13226. "key": {
  13227. "type": "string"
  13228. },
  13229. "op": {
  13230. "type": "string",
  13231. "enum": ["eq", "neq"]
  13232. },
  13233. "value": {
  13234. "type": "string"
  13235. }
  13236. },
  13237. "required": ["key", "op", "value"],
  13238. "additionalProperties": false
  13239. }
  13240. },
  13241. "required": ["type", "key", "message"],
  13242. "additionalProperties": false
  13243. },
  13244. {
  13245. "type": "object",
  13246. "properties": {
  13247. "type": {
  13248. "type": "string",
  13249. "enum": ["select"]
  13250. },
  13251. "key": {
  13252. "type": "string"
  13253. },
  13254. "message": {
  13255. "type": "string"
  13256. },
  13257. "options": {
  13258. "type": "array",
  13259. "items": {
  13260. "type": "object",
  13261. "properties": {
  13262. "label": {
  13263. "type": "string"
  13264. },
  13265. "value": {
  13266. "type": "string"
  13267. },
  13268. "hint": {
  13269. "type": "string"
  13270. }
  13271. },
  13272. "required": ["label", "value"],
  13273. "additionalProperties": false
  13274. }
  13275. },
  13276. "when": {
  13277. "type": "object",
  13278. "properties": {
  13279. "key": {
  13280. "type": "string"
  13281. },
  13282. "op": {
  13283. "type": "string",
  13284. "enum": ["eq", "neq"]
  13285. },
  13286. "value": {
  13287. "type": "string"
  13288. }
  13289. },
  13290. "required": ["key", "op", "value"],
  13291. "additionalProperties": false
  13292. }
  13293. },
  13294. "required": ["type", "key", "message", "options"],
  13295. "additionalProperties": false
  13296. }
  13297. ]
  13298. }
  13299. }
  13300. },
  13301. "required": ["type", "label"],
  13302. "additionalProperties": false
  13303. },
  13304. "ProviderAuthAuthorization": {
  13305. "type": "object",
  13306. "properties": {
  13307. "url": {
  13308. "type": "string"
  13309. },
  13310. "method": {
  13311. "type": "string",
  13312. "enum": ["auto", "code"]
  13313. },
  13314. "instructions": {
  13315. "type": "string"
  13316. }
  13317. },
  13318. "required": ["url", "method", "instructions"],
  13319. "additionalProperties": false
  13320. },
  13321. "TextPartInput": {
  13322. "type": "object",
  13323. "properties": {
  13324. "id": {
  13325. "type": "string"
  13326. },
  13327. "type": {
  13328. "type": "string",
  13329. "enum": ["text"]
  13330. },
  13331. "text": {
  13332. "type": "string"
  13333. },
  13334. "synthetic": {
  13335. "type": "boolean"
  13336. },
  13337. "ignored": {
  13338. "type": "boolean"
  13339. },
  13340. "time": {
  13341. "type": "object",
  13342. "properties": {
  13343. "start": {
  13344. "type": "integer",
  13345. "minimum": 0
  13346. },
  13347. "end": {
  13348. "type": "integer",
  13349. "minimum": 0
  13350. }
  13351. },
  13352. "required": ["start"],
  13353. "additionalProperties": false
  13354. },
  13355. "metadata": {
  13356. "type": "object"
  13357. }
  13358. },
  13359. "required": ["type", "text"],
  13360. "additionalProperties": false
  13361. },
  13362. "FilePartInput": {
  13363. "type": "object",
  13364. "properties": {
  13365. "id": {
  13366. "type": "string"
  13367. },
  13368. "type": {
  13369. "type": "string",
  13370. "enum": ["file"]
  13371. },
  13372. "mime": {
  13373. "type": "string"
  13374. },
  13375. "filename": {
  13376. "type": "string"
  13377. },
  13378. "url": {
  13379. "type": "string"
  13380. },
  13381. "source": {
  13382. "$ref": "#/components/schemas/FilePartSource"
  13383. }
  13384. },
  13385. "required": ["type", "mime", "url"],
  13386. "additionalProperties": false
  13387. },
  13388. "AgentPartInput": {
  13389. "type": "object",
  13390. "properties": {
  13391. "id": {
  13392. "type": "string"
  13393. },
  13394. "type": {
  13395. "type": "string",
  13396. "enum": ["agent"]
  13397. },
  13398. "name": {
  13399. "type": "string"
  13400. },
  13401. "source": {
  13402. "type": "object",
  13403. "properties": {
  13404. "value": {
  13405. "type": "string"
  13406. },
  13407. "start": {
  13408. "type": "integer",
  13409. "minimum": 0
  13410. },
  13411. "end": {
  13412. "type": "integer",
  13413. "minimum": 0
  13414. }
  13415. },
  13416. "required": ["value", "start", "end"],
  13417. "additionalProperties": false
  13418. }
  13419. },
  13420. "required": ["type", "name"],
  13421. "additionalProperties": false
  13422. },
  13423. "SubtaskPartInput": {
  13424. "type": "object",
  13425. "properties": {
  13426. "id": {
  13427. "type": "string"
  13428. },
  13429. "type": {
  13430. "type": "string",
  13431. "enum": ["subtask"]
  13432. },
  13433. "prompt": {
  13434. "type": "string"
  13435. },
  13436. "description": {
  13437. "type": "string"
  13438. },
  13439. "agent": {
  13440. "type": "string"
  13441. },
  13442. "model": {
  13443. "type": "object",
  13444. "properties": {
  13445. "providerID": {
  13446. "type": "string"
  13447. },
  13448. "modelID": {
  13449. "type": "string"
  13450. }
  13451. },
  13452. "required": ["providerID", "modelID"],
  13453. "additionalProperties": false
  13454. },
  13455. "command": {
  13456. "type": "string"
  13457. }
  13458. },
  13459. "required": ["type", "prompt", "description", "agent"],
  13460. "additionalProperties": false
  13461. },
  13462. "V2SessionsResponse": {
  13463. "type": "object",
  13464. "properties": {
  13465. "items": {
  13466. "type": "array",
  13467. "items": {
  13468. "$ref": "#/components/schemas/SessionInfo"
  13469. }
  13470. },
  13471. "cursor": {
  13472. "type": "object",
  13473. "properties": {
  13474. "previous": {
  13475. "type": "string"
  13476. },
  13477. "next": {
  13478. "type": "string"
  13479. }
  13480. },
  13481. "additionalProperties": false
  13482. }
  13483. },
  13484. "required": ["items", "cursor"],
  13485. "additionalProperties": false
  13486. },
  13487. "V2SessionMessagesResponse": {
  13488. "type": "object",
  13489. "properties": {
  13490. "items": {
  13491. "type": "array",
  13492. "items": {
  13493. "$ref": "#/components/schemas/SessionMessage"
  13494. }
  13495. },
  13496. "cursor": {
  13497. "type": "object",
  13498. "properties": {
  13499. "previous": {
  13500. "type": "string"
  13501. },
  13502. "next": {
  13503. "type": "string"
  13504. }
  13505. },
  13506. "additionalProperties": false
  13507. }
  13508. },
  13509. "required": ["items", "cursor"],
  13510. "additionalProperties": false
  13511. },
  13512. "EventTuiPromptAppend": {
  13513. "type": "object",
  13514. "properties": {
  13515. "type": {
  13516. "type": "string",
  13517. "enum": ["tui.prompt.append"]
  13518. },
  13519. "properties": {
  13520. "type": "object",
  13521. "properties": {
  13522. "text": {
  13523. "type": "string"
  13524. }
  13525. },
  13526. "required": ["text"],
  13527. "additionalProperties": false
  13528. }
  13529. },
  13530. "required": ["type", "properties"],
  13531. "additionalProperties": false
  13532. },
  13533. "EventTuiCommandExecute": {
  13534. "type": "object",
  13535. "properties": {
  13536. "type": {
  13537. "type": "string",
  13538. "enum": ["tui.command.execute"]
  13539. },
  13540. "properties": {
  13541. "type": "object",
  13542. "properties": {
  13543. "command": {
  13544. "anyOf": [
  13545. {
  13546. "type": "string",
  13547. "enum": [
  13548. "session.list",
  13549. "session.new",
  13550. "session.share",
  13551. "session.interrupt",
  13552. "session.compact",
  13553. "session.page.up",
  13554. "session.page.down",
  13555. "session.line.up",
  13556. "session.line.down",
  13557. "session.half.page.up",
  13558. "session.half.page.down",
  13559. "session.first",
  13560. "session.last",
  13561. "prompt.clear",
  13562. "prompt.submit",
  13563. "agent.cycle"
  13564. ]
  13565. },
  13566. {
  13567. "type": "string"
  13568. }
  13569. ]
  13570. }
  13571. },
  13572. "required": ["command"],
  13573. "additionalProperties": false
  13574. }
  13575. },
  13576. "required": ["type", "properties"],
  13577. "additionalProperties": false
  13578. },
  13579. "EventTuiToastShow": {
  13580. "type": "object",
  13581. "properties": {
  13582. "type": {
  13583. "type": "string",
  13584. "enum": ["tui.toast.show"]
  13585. },
  13586. "properties": {
  13587. "type": "object",
  13588. "properties": {
  13589. "title": {
  13590. "type": "string"
  13591. },
  13592. "message": {
  13593. "type": "string"
  13594. },
  13595. "variant": {
  13596. "type": "string",
  13597. "enum": ["info", "success", "warning", "error"]
  13598. },
  13599. "duration": {
  13600. "type": "integer",
  13601. "exclusiveMinimum": 0
  13602. }
  13603. },
  13604. "required": ["message", "variant"],
  13605. "additionalProperties": false
  13606. }
  13607. },
  13608. "required": ["type", "properties"],
  13609. "additionalProperties": false
  13610. },
  13611. "EventTuiSessionSelect": {
  13612. "type": "object",
  13613. "properties": {
  13614. "type": {
  13615. "type": "string",
  13616. "enum": ["tui.session.select"]
  13617. },
  13618. "properties": {
  13619. "type": "object",
  13620. "properties": {
  13621. "sessionID": {
  13622. "type": "string",
  13623. "description": "Session ID to navigate to"
  13624. }
  13625. },
  13626. "required": ["sessionID"],
  13627. "additionalProperties": false
  13628. }
  13629. },
  13630. "required": ["type", "properties"],
  13631. "additionalProperties": false
  13632. },
  13633. "Workspace": {
  13634. "type": "object",
  13635. "properties": {
  13636. "id": {
  13637. "type": "string"
  13638. },
  13639. "type": {
  13640. "type": "string"
  13641. },
  13642. "name": {
  13643. "type": "string"
  13644. },
  13645. "branch": {
  13646. "anyOf": [
  13647. {
  13648. "type": "string"
  13649. },
  13650. {
  13651. "type": "null"
  13652. }
  13653. ]
  13654. },
  13655. "directory": {
  13656. "anyOf": [
  13657. {
  13658. "type": "string"
  13659. },
  13660. {
  13661. "type": "null"
  13662. }
  13663. ]
  13664. },
  13665. "extra": {
  13666. "anyOf": [
  13667. {},
  13668. {
  13669. "type": "null"
  13670. }
  13671. ]
  13672. },
  13673. "projectID": {
  13674. "type": "string"
  13675. }
  13676. },
  13677. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"],
  13678. "additionalProperties": false
  13679. },
  13680. "WorkspaceWarpError": {
  13681. "type": "object",
  13682. "properties": {
  13683. "name": {
  13684. "type": "string",
  13685. "enum": ["WorkspaceWarpError"]
  13686. },
  13687. "data": {
  13688. "type": "object",
  13689. "properties": {
  13690. "message": {
  13691. "type": "string"
  13692. }
  13693. },
  13694. "required": ["message"],
  13695. "additionalProperties": false
  13696. }
  13697. },
  13698. "required": ["name", "data"],
  13699. "additionalProperties": false
  13700. },
  13701. "SyncEventMessageUpdated": {
  13702. "type": "object",
  13703. "properties": {
  13704. "type": {
  13705. "type": "string",
  13706. "enum": ["sync"]
  13707. },
  13708. "name": {
  13709. "type": "string",
  13710. "enum": ["message.updated.1"]
  13711. },
  13712. "id": {
  13713. "type": "string"
  13714. },
  13715. "seq": {
  13716. "type": "number"
  13717. },
  13718. "aggregateID": {
  13719. "type": "string",
  13720. "enum": ["sessionID"]
  13721. },
  13722. "data": {
  13723. "type": "object",
  13724. "properties": {
  13725. "sessionID": {
  13726. "type": "string"
  13727. },
  13728. "info": {
  13729. "$ref": "#/components/schemas/Message"
  13730. }
  13731. },
  13732. "required": ["sessionID", "info"],
  13733. "additionalProperties": false
  13734. }
  13735. },
  13736. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13737. "additionalProperties": false
  13738. },
  13739. "SyncEventMessageRemoved": {
  13740. "type": "object",
  13741. "properties": {
  13742. "type": {
  13743. "type": "string",
  13744. "enum": ["sync"]
  13745. },
  13746. "name": {
  13747. "type": "string",
  13748. "enum": ["message.removed.1"]
  13749. },
  13750. "id": {
  13751. "type": "string"
  13752. },
  13753. "seq": {
  13754. "type": "number"
  13755. },
  13756. "aggregateID": {
  13757. "type": "string",
  13758. "enum": ["sessionID"]
  13759. },
  13760. "data": {
  13761. "type": "object",
  13762. "properties": {
  13763. "sessionID": {
  13764. "type": "string"
  13765. },
  13766. "messageID": {
  13767. "type": "string"
  13768. }
  13769. },
  13770. "required": ["sessionID", "messageID"],
  13771. "additionalProperties": false
  13772. }
  13773. },
  13774. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13775. "additionalProperties": false
  13776. },
  13777. "SyncEventMessagePartUpdated": {
  13778. "type": "object",
  13779. "properties": {
  13780. "type": {
  13781. "type": "string",
  13782. "enum": ["sync"]
  13783. },
  13784. "name": {
  13785. "type": "string",
  13786. "enum": ["message.part.updated.1"]
  13787. },
  13788. "id": {
  13789. "type": "string"
  13790. },
  13791. "seq": {
  13792. "type": "number"
  13793. },
  13794. "aggregateID": {
  13795. "type": "string",
  13796. "enum": ["sessionID"]
  13797. },
  13798. "data": {
  13799. "type": "object",
  13800. "properties": {
  13801. "sessionID": {
  13802. "type": "string"
  13803. },
  13804. "part": {
  13805. "$ref": "#/components/schemas/Part"
  13806. },
  13807. "time": {
  13808. "type": "integer",
  13809. "minimum": 0
  13810. }
  13811. },
  13812. "required": ["sessionID", "part", "time"],
  13813. "additionalProperties": false
  13814. }
  13815. },
  13816. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13817. "additionalProperties": false
  13818. },
  13819. "SyncEventMessagePartRemoved": {
  13820. "type": "object",
  13821. "properties": {
  13822. "type": {
  13823. "type": "string",
  13824. "enum": ["sync"]
  13825. },
  13826. "name": {
  13827. "type": "string",
  13828. "enum": ["message.part.removed.1"]
  13829. },
  13830. "id": {
  13831. "type": "string"
  13832. },
  13833. "seq": {
  13834. "type": "number"
  13835. },
  13836. "aggregateID": {
  13837. "type": "string",
  13838. "enum": ["sessionID"]
  13839. },
  13840. "data": {
  13841. "type": "object",
  13842. "properties": {
  13843. "sessionID": {
  13844. "type": "string"
  13845. },
  13846. "messageID": {
  13847. "type": "string"
  13848. },
  13849. "partID": {
  13850. "type": "string"
  13851. }
  13852. },
  13853. "required": ["sessionID", "messageID", "partID"],
  13854. "additionalProperties": false
  13855. }
  13856. },
  13857. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13858. "additionalProperties": false
  13859. },
  13860. "SyncEventSessionCreated": {
  13861. "type": "object",
  13862. "properties": {
  13863. "type": {
  13864. "type": "string",
  13865. "enum": ["sync"]
  13866. },
  13867. "name": {
  13868. "type": "string",
  13869. "enum": ["session.created.1"]
  13870. },
  13871. "id": {
  13872. "type": "string"
  13873. },
  13874. "seq": {
  13875. "type": "number"
  13876. },
  13877. "aggregateID": {
  13878. "type": "string",
  13879. "enum": ["sessionID"]
  13880. },
  13881. "data": {
  13882. "type": "object",
  13883. "properties": {
  13884. "sessionID": {
  13885. "type": "string"
  13886. },
  13887. "info": {
  13888. "$ref": "#/components/schemas/Session"
  13889. }
  13890. },
  13891. "required": ["sessionID", "info"],
  13892. "additionalProperties": false
  13893. }
  13894. },
  13895. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13896. "additionalProperties": false
  13897. },
  13898. "SyncEventSessionUpdated": {
  13899. "type": "object",
  13900. "properties": {
  13901. "type": {
  13902. "type": "string",
  13903. "enum": ["sync"]
  13904. },
  13905. "name": {
  13906. "type": "string",
  13907. "enum": ["session.updated.1"]
  13908. },
  13909. "id": {
  13910. "type": "string"
  13911. },
  13912. "seq": {
  13913. "type": "number"
  13914. },
  13915. "aggregateID": {
  13916. "type": "string",
  13917. "enum": ["sessionID"]
  13918. },
  13919. "data": {
  13920. "type": "object",
  13921. "properties": {
  13922. "sessionID": {
  13923. "type": "string"
  13924. },
  13925. "info": {
  13926. "type": "object",
  13927. "properties": {
  13928. "id": {
  13929. "anyOf": [
  13930. {
  13931. "type": "string"
  13932. },
  13933. {
  13934. "type": "null"
  13935. }
  13936. ]
  13937. },
  13938. "slug": {
  13939. "anyOf": [
  13940. {
  13941. "type": "string"
  13942. },
  13943. {
  13944. "type": "null"
  13945. }
  13946. ]
  13947. },
  13948. "projectID": {
  13949. "anyOf": [
  13950. {
  13951. "type": "string"
  13952. },
  13953. {
  13954. "type": "null"
  13955. }
  13956. ]
  13957. },
  13958. "workspaceID": {
  13959. "anyOf": [
  13960. {
  13961. "type": "string"
  13962. },
  13963. {
  13964. "type": "null"
  13965. }
  13966. ]
  13967. },
  13968. "directory": {
  13969. "anyOf": [
  13970. {
  13971. "type": "string"
  13972. },
  13973. {
  13974. "type": "null"
  13975. }
  13976. ]
  13977. },
  13978. "path": {
  13979. "anyOf": [
  13980. {
  13981. "type": "string"
  13982. },
  13983. {
  13984. "type": "null"
  13985. }
  13986. ]
  13987. },
  13988. "parentID": {
  13989. "anyOf": [
  13990. {
  13991. "type": "string"
  13992. },
  13993. {
  13994. "type": "null"
  13995. }
  13996. ]
  13997. },
  13998. "summary": {
  13999. "anyOf": [
  14000. {
  14001. "type": "object",
  14002. "properties": {
  14003. "additions": {
  14004. "type": "integer",
  14005. "minimum": 0
  14006. },
  14007. "deletions": {
  14008. "type": "integer",
  14009. "minimum": 0
  14010. },
  14011. "files": {
  14012. "type": "integer",
  14013. "minimum": 0
  14014. },
  14015. "diffs": {
  14016. "type": "array",
  14017. "items": {
  14018. "$ref": "#/components/schemas/SnapshotFileDiff"
  14019. }
  14020. }
  14021. },
  14022. "required": ["additions", "deletions", "files"],
  14023. "additionalProperties": false
  14024. },
  14025. {
  14026. "type": "null"
  14027. }
  14028. ]
  14029. },
  14030. "share": {
  14031. "type": "object",
  14032. "properties": {
  14033. "url": {
  14034. "anyOf": [
  14035. {
  14036. "type": "string"
  14037. },
  14038. {
  14039. "type": "null"
  14040. }
  14041. ]
  14042. }
  14043. },
  14044. "additionalProperties": false
  14045. },
  14046. "title": {
  14047. "anyOf": [
  14048. {
  14049. "type": "string"
  14050. },
  14051. {
  14052. "type": "null"
  14053. }
  14054. ]
  14055. },
  14056. "agent": {
  14057. "anyOf": [
  14058. {
  14059. "type": "string"
  14060. },
  14061. {
  14062. "type": "null"
  14063. }
  14064. ]
  14065. },
  14066. "model": {
  14067. "anyOf": [
  14068. {
  14069. "type": "object",
  14070. "properties": {
  14071. "id": {
  14072. "type": "string"
  14073. },
  14074. "providerID": {
  14075. "type": "string"
  14076. },
  14077. "variant": {
  14078. "type": "string"
  14079. }
  14080. },
  14081. "required": ["id", "providerID"],
  14082. "additionalProperties": false
  14083. },
  14084. {
  14085. "type": "null"
  14086. }
  14087. ]
  14088. },
  14089. "version": {
  14090. "anyOf": [
  14091. {
  14092. "type": "string"
  14093. },
  14094. {
  14095. "type": "null"
  14096. }
  14097. ]
  14098. },
  14099. "time": {
  14100. "type": "object",
  14101. "properties": {
  14102. "created": {
  14103. "anyOf": [
  14104. {
  14105. "type": "integer",
  14106. "minimum": 0
  14107. },
  14108. {
  14109. "type": "null"
  14110. }
  14111. ]
  14112. },
  14113. "updated": {
  14114. "anyOf": [
  14115. {
  14116. "type": "integer",
  14117. "minimum": 0
  14118. },
  14119. {
  14120. "type": "null"
  14121. }
  14122. ]
  14123. },
  14124. "compacting": {
  14125. "anyOf": [
  14126. {
  14127. "type": "integer",
  14128. "minimum": 0
  14129. },
  14130. {
  14131. "type": "null"
  14132. }
  14133. ]
  14134. },
  14135. "archived": {
  14136. "anyOf": [
  14137. {
  14138. "type": "number"
  14139. },
  14140. {
  14141. "type": "null"
  14142. }
  14143. ]
  14144. }
  14145. },
  14146. "additionalProperties": false
  14147. },
  14148. "permission": {
  14149. "anyOf": [
  14150. {
  14151. "$ref": "#/components/schemas/PermissionRuleset"
  14152. },
  14153. {
  14154. "type": "null"
  14155. }
  14156. ]
  14157. },
  14158. "revert": {
  14159. "anyOf": [
  14160. {
  14161. "type": "object",
  14162. "properties": {
  14163. "messageID": {
  14164. "type": "string"
  14165. },
  14166. "partID": {
  14167. "type": "string"
  14168. },
  14169. "snapshot": {
  14170. "type": "string"
  14171. },
  14172. "diff": {
  14173. "type": "string"
  14174. }
  14175. },
  14176. "required": ["messageID"],
  14177. "additionalProperties": false
  14178. },
  14179. {
  14180. "type": "null"
  14181. }
  14182. ]
  14183. }
  14184. },
  14185. "additionalProperties": false
  14186. }
  14187. },
  14188. "required": ["sessionID", "info"],
  14189. "additionalProperties": false
  14190. }
  14191. },
  14192. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14193. "additionalProperties": false
  14194. },
  14195. "SyncEventSessionDeleted": {
  14196. "type": "object",
  14197. "properties": {
  14198. "type": {
  14199. "type": "string",
  14200. "enum": ["sync"]
  14201. },
  14202. "name": {
  14203. "type": "string",
  14204. "enum": ["session.deleted.1"]
  14205. },
  14206. "id": {
  14207. "type": "string"
  14208. },
  14209. "seq": {
  14210. "type": "number"
  14211. },
  14212. "aggregateID": {
  14213. "type": "string",
  14214. "enum": ["sessionID"]
  14215. },
  14216. "data": {
  14217. "type": "object",
  14218. "properties": {
  14219. "sessionID": {
  14220. "type": "string"
  14221. },
  14222. "info": {
  14223. "$ref": "#/components/schemas/Session"
  14224. }
  14225. },
  14226. "required": ["sessionID", "info"],
  14227. "additionalProperties": false
  14228. }
  14229. },
  14230. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14231. "additionalProperties": false
  14232. },
  14233. "SyncEventSessionNextAgentSwitched": {
  14234. "type": "object",
  14235. "properties": {
  14236. "type": {
  14237. "type": "string",
  14238. "enum": ["sync"]
  14239. },
  14240. "name": {
  14241. "type": "string",
  14242. "enum": ["session.next.agent.switched.1"]
  14243. },
  14244. "id": {
  14245. "type": "string"
  14246. },
  14247. "seq": {
  14248. "type": "number"
  14249. },
  14250. "aggregateID": {
  14251. "type": "string",
  14252. "enum": ["sessionID"]
  14253. },
  14254. "data": {
  14255. "type": "object",
  14256. "properties": {
  14257. "timestamp": {
  14258. "type": "number"
  14259. },
  14260. "sessionID": {
  14261. "type": "string"
  14262. },
  14263. "agent": {
  14264. "type": "string"
  14265. }
  14266. },
  14267. "required": ["timestamp", "sessionID", "agent"],
  14268. "additionalProperties": false
  14269. }
  14270. },
  14271. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14272. "additionalProperties": false
  14273. },
  14274. "SyncEventSessionNextModelSwitched": {
  14275. "type": "object",
  14276. "properties": {
  14277. "type": {
  14278. "type": "string",
  14279. "enum": ["sync"]
  14280. },
  14281. "name": {
  14282. "type": "string",
  14283. "enum": ["session.next.model.switched.1"]
  14284. },
  14285. "id": {
  14286. "type": "string"
  14287. },
  14288. "seq": {
  14289. "type": "number"
  14290. },
  14291. "aggregateID": {
  14292. "type": "string",
  14293. "enum": ["sessionID"]
  14294. },
  14295. "data": {
  14296. "type": "object",
  14297. "properties": {
  14298. "timestamp": {
  14299. "type": "number"
  14300. },
  14301. "sessionID": {
  14302. "type": "string"
  14303. },
  14304. "model": {
  14305. "type": "object",
  14306. "properties": {
  14307. "id": {
  14308. "type": "string"
  14309. },
  14310. "providerID": {
  14311. "type": "string"
  14312. },
  14313. "variant": {
  14314. "type": "string"
  14315. }
  14316. },
  14317. "required": ["id", "providerID", "variant"],
  14318. "additionalProperties": false
  14319. }
  14320. },
  14321. "required": ["timestamp", "sessionID", "model"],
  14322. "additionalProperties": false
  14323. }
  14324. },
  14325. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14326. "additionalProperties": false
  14327. },
  14328. "SyncEventSessionNextPrompted": {
  14329. "type": "object",
  14330. "properties": {
  14331. "type": {
  14332. "type": "string",
  14333. "enum": ["sync"]
  14334. },
  14335. "name": {
  14336. "type": "string",
  14337. "enum": ["session.next.prompted.1"]
  14338. },
  14339. "id": {
  14340. "type": "string"
  14341. },
  14342. "seq": {
  14343. "type": "number"
  14344. },
  14345. "aggregateID": {
  14346. "type": "string",
  14347. "enum": ["sessionID"]
  14348. },
  14349. "data": {
  14350. "type": "object",
  14351. "properties": {
  14352. "timestamp": {
  14353. "type": "number"
  14354. },
  14355. "sessionID": {
  14356. "type": "string"
  14357. },
  14358. "prompt": {
  14359. "$ref": "#/components/schemas/Prompt"
  14360. }
  14361. },
  14362. "required": ["timestamp", "sessionID", "prompt"],
  14363. "additionalProperties": false
  14364. }
  14365. },
  14366. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14367. "additionalProperties": false
  14368. },
  14369. "SyncEventSessionNextSynthetic": {
  14370. "type": "object",
  14371. "properties": {
  14372. "type": {
  14373. "type": "string",
  14374. "enum": ["sync"]
  14375. },
  14376. "name": {
  14377. "type": "string",
  14378. "enum": ["session.next.synthetic.1"]
  14379. },
  14380. "id": {
  14381. "type": "string"
  14382. },
  14383. "seq": {
  14384. "type": "number"
  14385. },
  14386. "aggregateID": {
  14387. "type": "string",
  14388. "enum": ["sessionID"]
  14389. },
  14390. "data": {
  14391. "type": "object",
  14392. "properties": {
  14393. "timestamp": {
  14394. "type": "number"
  14395. },
  14396. "sessionID": {
  14397. "type": "string"
  14398. },
  14399. "text": {
  14400. "type": "string"
  14401. }
  14402. },
  14403. "required": ["timestamp", "sessionID", "text"],
  14404. "additionalProperties": false
  14405. }
  14406. },
  14407. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14408. "additionalProperties": false
  14409. },
  14410. "SyncEventSessionNextShellStarted": {
  14411. "type": "object",
  14412. "properties": {
  14413. "type": {
  14414. "type": "string",
  14415. "enum": ["sync"]
  14416. },
  14417. "name": {
  14418. "type": "string",
  14419. "enum": ["session.next.shell.started.1"]
  14420. },
  14421. "id": {
  14422. "type": "string"
  14423. },
  14424. "seq": {
  14425. "type": "number"
  14426. },
  14427. "aggregateID": {
  14428. "type": "string",
  14429. "enum": ["sessionID"]
  14430. },
  14431. "data": {
  14432. "type": "object",
  14433. "properties": {
  14434. "timestamp": {
  14435. "type": "number"
  14436. },
  14437. "sessionID": {
  14438. "type": "string"
  14439. },
  14440. "callID": {
  14441. "type": "string"
  14442. },
  14443. "command": {
  14444. "type": "string"
  14445. }
  14446. },
  14447. "required": ["timestamp", "sessionID", "callID", "command"],
  14448. "additionalProperties": false
  14449. }
  14450. },
  14451. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14452. "additionalProperties": false
  14453. },
  14454. "SyncEventSessionNextShellEnded": {
  14455. "type": "object",
  14456. "properties": {
  14457. "type": {
  14458. "type": "string",
  14459. "enum": ["sync"]
  14460. },
  14461. "name": {
  14462. "type": "string",
  14463. "enum": ["session.next.shell.ended.1"]
  14464. },
  14465. "id": {
  14466. "type": "string"
  14467. },
  14468. "seq": {
  14469. "type": "number"
  14470. },
  14471. "aggregateID": {
  14472. "type": "string",
  14473. "enum": ["sessionID"]
  14474. },
  14475. "data": {
  14476. "type": "object",
  14477. "properties": {
  14478. "timestamp": {
  14479. "type": "number"
  14480. },
  14481. "sessionID": {
  14482. "type": "string"
  14483. },
  14484. "callID": {
  14485. "type": "string"
  14486. },
  14487. "output": {
  14488. "type": "string"
  14489. }
  14490. },
  14491. "required": ["timestamp", "sessionID", "callID", "output"],
  14492. "additionalProperties": false
  14493. }
  14494. },
  14495. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14496. "additionalProperties": false
  14497. },
  14498. "SyncEventSessionNextStepStarted": {
  14499. "type": "object",
  14500. "properties": {
  14501. "type": {
  14502. "type": "string",
  14503. "enum": ["sync"]
  14504. },
  14505. "name": {
  14506. "type": "string",
  14507. "enum": ["session.next.step.started.1"]
  14508. },
  14509. "id": {
  14510. "type": "string"
  14511. },
  14512. "seq": {
  14513. "type": "number"
  14514. },
  14515. "aggregateID": {
  14516. "type": "string",
  14517. "enum": ["sessionID"]
  14518. },
  14519. "data": {
  14520. "type": "object",
  14521. "properties": {
  14522. "timestamp": {
  14523. "type": "number"
  14524. },
  14525. "sessionID": {
  14526. "type": "string"
  14527. },
  14528. "agent": {
  14529. "type": "string"
  14530. },
  14531. "model": {
  14532. "type": "object",
  14533. "properties": {
  14534. "id": {
  14535. "type": "string"
  14536. },
  14537. "providerID": {
  14538. "type": "string"
  14539. },
  14540. "variant": {
  14541. "type": "string"
  14542. }
  14543. },
  14544. "required": ["id", "providerID", "variant"],
  14545. "additionalProperties": false
  14546. },
  14547. "snapshot": {
  14548. "type": "string"
  14549. }
  14550. },
  14551. "required": ["timestamp", "sessionID", "agent", "model"],
  14552. "additionalProperties": false
  14553. }
  14554. },
  14555. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14556. "additionalProperties": false
  14557. },
  14558. "SyncEventSessionNextStepEnded": {
  14559. "type": "object",
  14560. "properties": {
  14561. "type": {
  14562. "type": "string",
  14563. "enum": ["sync"]
  14564. },
  14565. "name": {
  14566. "type": "string",
  14567. "enum": ["session.next.step.ended.1"]
  14568. },
  14569. "id": {
  14570. "type": "string"
  14571. },
  14572. "seq": {
  14573. "type": "number"
  14574. },
  14575. "aggregateID": {
  14576. "type": "string",
  14577. "enum": ["sessionID"]
  14578. },
  14579. "data": {
  14580. "type": "object",
  14581. "properties": {
  14582. "timestamp": {
  14583. "type": "number"
  14584. },
  14585. "sessionID": {
  14586. "type": "string"
  14587. },
  14588. "finish": {
  14589. "type": "string"
  14590. },
  14591. "cost": {
  14592. "type": "number"
  14593. },
  14594. "tokens": {
  14595. "type": "object",
  14596. "properties": {
  14597. "input": {
  14598. "type": "integer",
  14599. "minimum": 0
  14600. },
  14601. "output": {
  14602. "type": "integer",
  14603. "minimum": 0
  14604. },
  14605. "reasoning": {
  14606. "type": "integer",
  14607. "minimum": 0
  14608. },
  14609. "cache": {
  14610. "type": "object",
  14611. "properties": {
  14612. "read": {
  14613. "type": "integer",
  14614. "minimum": 0
  14615. },
  14616. "write": {
  14617. "type": "integer",
  14618. "minimum": 0
  14619. }
  14620. },
  14621. "required": ["read", "write"],
  14622. "additionalProperties": false
  14623. }
  14624. },
  14625. "required": ["input", "output", "reasoning", "cache"],
  14626. "additionalProperties": false
  14627. },
  14628. "snapshot": {
  14629. "type": "string"
  14630. }
  14631. },
  14632. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  14633. "additionalProperties": false
  14634. }
  14635. },
  14636. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14637. "additionalProperties": false
  14638. },
  14639. "SyncEventSessionNextStepFailed": {
  14640. "type": "object",
  14641. "properties": {
  14642. "type": {
  14643. "type": "string",
  14644. "enum": ["sync"]
  14645. },
  14646. "name": {
  14647. "type": "string",
  14648. "enum": ["session.next.step.failed.1"]
  14649. },
  14650. "id": {
  14651. "type": "string"
  14652. },
  14653. "seq": {
  14654. "type": "number"
  14655. },
  14656. "aggregateID": {
  14657. "type": "string",
  14658. "enum": ["sessionID"]
  14659. },
  14660. "data": {
  14661. "type": "object",
  14662. "properties": {
  14663. "timestamp": {
  14664. "type": "number"
  14665. },
  14666. "sessionID": {
  14667. "type": "string"
  14668. },
  14669. "error": {
  14670. "$ref": "#/components/schemas/SessionErrorUnknown"
  14671. }
  14672. },
  14673. "required": ["timestamp", "sessionID", "error"],
  14674. "additionalProperties": false
  14675. }
  14676. },
  14677. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14678. "additionalProperties": false
  14679. },
  14680. "SyncEventSessionNextTextStarted": {
  14681. "type": "object",
  14682. "properties": {
  14683. "type": {
  14684. "type": "string",
  14685. "enum": ["sync"]
  14686. },
  14687. "name": {
  14688. "type": "string",
  14689. "enum": ["session.next.text.started.1"]
  14690. },
  14691. "id": {
  14692. "type": "string"
  14693. },
  14694. "seq": {
  14695. "type": "number"
  14696. },
  14697. "aggregateID": {
  14698. "type": "string",
  14699. "enum": ["sessionID"]
  14700. },
  14701. "data": {
  14702. "type": "object",
  14703. "properties": {
  14704. "timestamp": {
  14705. "type": "number"
  14706. },
  14707. "sessionID": {
  14708. "type": "string"
  14709. }
  14710. },
  14711. "required": ["timestamp", "sessionID"],
  14712. "additionalProperties": false
  14713. }
  14714. },
  14715. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14716. "additionalProperties": false
  14717. },
  14718. "SyncEventSessionNextTextDelta": {
  14719. "type": "object",
  14720. "properties": {
  14721. "type": {
  14722. "type": "string",
  14723. "enum": ["sync"]
  14724. },
  14725. "name": {
  14726. "type": "string",
  14727. "enum": ["session.next.text.delta.1"]
  14728. },
  14729. "id": {
  14730. "type": "string"
  14731. },
  14732. "seq": {
  14733. "type": "number"
  14734. },
  14735. "aggregateID": {
  14736. "type": "string",
  14737. "enum": ["sessionID"]
  14738. },
  14739. "data": {
  14740. "type": "object",
  14741. "properties": {
  14742. "timestamp": {
  14743. "type": "number"
  14744. },
  14745. "sessionID": {
  14746. "type": "string"
  14747. },
  14748. "delta": {
  14749. "type": "string"
  14750. }
  14751. },
  14752. "required": ["timestamp", "sessionID", "delta"],
  14753. "additionalProperties": false
  14754. }
  14755. },
  14756. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14757. "additionalProperties": false
  14758. },
  14759. "SyncEventSessionNextTextEnded": {
  14760. "type": "object",
  14761. "properties": {
  14762. "type": {
  14763. "type": "string",
  14764. "enum": ["sync"]
  14765. },
  14766. "name": {
  14767. "type": "string",
  14768. "enum": ["session.next.text.ended.1"]
  14769. },
  14770. "id": {
  14771. "type": "string"
  14772. },
  14773. "seq": {
  14774. "type": "number"
  14775. },
  14776. "aggregateID": {
  14777. "type": "string",
  14778. "enum": ["sessionID"]
  14779. },
  14780. "data": {
  14781. "type": "object",
  14782. "properties": {
  14783. "timestamp": {
  14784. "type": "number"
  14785. },
  14786. "sessionID": {
  14787. "type": "string"
  14788. },
  14789. "text": {
  14790. "type": "string"
  14791. }
  14792. },
  14793. "required": ["timestamp", "sessionID", "text"],
  14794. "additionalProperties": false
  14795. }
  14796. },
  14797. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14798. "additionalProperties": false
  14799. },
  14800. "SyncEventSessionNextReasoningStarted": {
  14801. "type": "object",
  14802. "properties": {
  14803. "type": {
  14804. "type": "string",
  14805. "enum": ["sync"]
  14806. },
  14807. "name": {
  14808. "type": "string",
  14809. "enum": ["session.next.reasoning.started.1"]
  14810. },
  14811. "id": {
  14812. "type": "string"
  14813. },
  14814. "seq": {
  14815. "type": "number"
  14816. },
  14817. "aggregateID": {
  14818. "type": "string",
  14819. "enum": ["sessionID"]
  14820. },
  14821. "data": {
  14822. "type": "object",
  14823. "properties": {
  14824. "timestamp": {
  14825. "type": "number"
  14826. },
  14827. "sessionID": {
  14828. "type": "string"
  14829. },
  14830. "reasoningID": {
  14831. "type": "string"
  14832. }
  14833. },
  14834. "required": ["timestamp", "sessionID", "reasoningID"],
  14835. "additionalProperties": false
  14836. }
  14837. },
  14838. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14839. "additionalProperties": false
  14840. },
  14841. "SyncEventSessionNextReasoningDelta": {
  14842. "type": "object",
  14843. "properties": {
  14844. "type": {
  14845. "type": "string",
  14846. "enum": ["sync"]
  14847. },
  14848. "name": {
  14849. "type": "string",
  14850. "enum": ["session.next.reasoning.delta.1"]
  14851. },
  14852. "id": {
  14853. "type": "string"
  14854. },
  14855. "seq": {
  14856. "type": "number"
  14857. },
  14858. "aggregateID": {
  14859. "type": "string",
  14860. "enum": ["sessionID"]
  14861. },
  14862. "data": {
  14863. "type": "object",
  14864. "properties": {
  14865. "timestamp": {
  14866. "type": "number"
  14867. },
  14868. "sessionID": {
  14869. "type": "string"
  14870. },
  14871. "reasoningID": {
  14872. "type": "string"
  14873. },
  14874. "delta": {
  14875. "type": "string"
  14876. }
  14877. },
  14878. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  14879. "additionalProperties": false
  14880. }
  14881. },
  14882. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14883. "additionalProperties": false
  14884. },
  14885. "SyncEventSessionNextReasoningEnded": {
  14886. "type": "object",
  14887. "properties": {
  14888. "type": {
  14889. "type": "string",
  14890. "enum": ["sync"]
  14891. },
  14892. "name": {
  14893. "type": "string",
  14894. "enum": ["session.next.reasoning.ended.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. "reasoningID": {
  14916. "type": "string"
  14917. },
  14918. "text": {
  14919. "type": "string"
  14920. }
  14921. },
  14922. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  14923. "additionalProperties": false
  14924. }
  14925. },
  14926. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14927. "additionalProperties": false
  14928. },
  14929. "SyncEventSessionNextToolInputStarted": {
  14930. "type": "object",
  14931. "properties": {
  14932. "type": {
  14933. "type": "string",
  14934. "enum": ["sync"]
  14935. },
  14936. "name": {
  14937. "type": "string",
  14938. "enum": ["session.next.tool.input.started.1"]
  14939. },
  14940. "id": {
  14941. "type": "string"
  14942. },
  14943. "seq": {
  14944. "type": "number"
  14945. },
  14946. "aggregateID": {
  14947. "type": "string",
  14948. "enum": ["sessionID"]
  14949. },
  14950. "data": {
  14951. "type": "object",
  14952. "properties": {
  14953. "timestamp": {
  14954. "type": "number"
  14955. },
  14956. "sessionID": {
  14957. "type": "string"
  14958. },
  14959. "callID": {
  14960. "type": "string"
  14961. },
  14962. "name": {
  14963. "type": "string"
  14964. }
  14965. },
  14966. "required": ["timestamp", "sessionID", "callID", "name"],
  14967. "additionalProperties": false
  14968. }
  14969. },
  14970. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14971. "additionalProperties": false
  14972. },
  14973. "SyncEventSessionNextToolInputDelta": {
  14974. "type": "object",
  14975. "properties": {
  14976. "type": {
  14977. "type": "string",
  14978. "enum": ["sync"]
  14979. },
  14980. "name": {
  14981. "type": "string",
  14982. "enum": ["session.next.tool.input.delta.1"]
  14983. },
  14984. "id": {
  14985. "type": "string"
  14986. },
  14987. "seq": {
  14988. "type": "number"
  14989. },
  14990. "aggregateID": {
  14991. "type": "string",
  14992. "enum": ["sessionID"]
  14993. },
  14994. "data": {
  14995. "type": "object",
  14996. "properties": {
  14997. "timestamp": {
  14998. "type": "number"
  14999. },
  15000. "sessionID": {
  15001. "type": "string"
  15002. },
  15003. "callID": {
  15004. "type": "string"
  15005. },
  15006. "delta": {
  15007. "type": "string"
  15008. }
  15009. },
  15010. "required": ["timestamp", "sessionID", "callID", "delta"],
  15011. "additionalProperties": false
  15012. }
  15013. },
  15014. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15015. "additionalProperties": false
  15016. },
  15017. "SyncEventSessionNextToolInputEnded": {
  15018. "type": "object",
  15019. "properties": {
  15020. "type": {
  15021. "type": "string",
  15022. "enum": ["sync"]
  15023. },
  15024. "name": {
  15025. "type": "string",
  15026. "enum": ["session.next.tool.input.ended.1"]
  15027. },
  15028. "id": {
  15029. "type": "string"
  15030. },
  15031. "seq": {
  15032. "type": "number"
  15033. },
  15034. "aggregateID": {
  15035. "type": "string",
  15036. "enum": ["sessionID"]
  15037. },
  15038. "data": {
  15039. "type": "object",
  15040. "properties": {
  15041. "timestamp": {
  15042. "type": "number"
  15043. },
  15044. "sessionID": {
  15045. "type": "string"
  15046. },
  15047. "callID": {
  15048. "type": "string"
  15049. },
  15050. "text": {
  15051. "type": "string"
  15052. }
  15053. },
  15054. "required": ["timestamp", "sessionID", "callID", "text"],
  15055. "additionalProperties": false
  15056. }
  15057. },
  15058. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15059. "additionalProperties": false
  15060. },
  15061. "SyncEventSessionNextToolCalled": {
  15062. "type": "object",
  15063. "properties": {
  15064. "type": {
  15065. "type": "string",
  15066. "enum": ["sync"]
  15067. },
  15068. "name": {
  15069. "type": "string",
  15070. "enum": ["session.next.tool.called.1"]
  15071. },
  15072. "id": {
  15073. "type": "string"
  15074. },
  15075. "seq": {
  15076. "type": "number"
  15077. },
  15078. "aggregateID": {
  15079. "type": "string",
  15080. "enum": ["sessionID"]
  15081. },
  15082. "data": {
  15083. "type": "object",
  15084. "properties": {
  15085. "timestamp": {
  15086. "type": "number"
  15087. },
  15088. "sessionID": {
  15089. "type": "string"
  15090. },
  15091. "callID": {
  15092. "type": "string"
  15093. },
  15094. "tool": {
  15095. "type": "string"
  15096. },
  15097. "input": {
  15098. "type": "object"
  15099. },
  15100. "provider": {
  15101. "type": "object",
  15102. "properties": {
  15103. "executed": {
  15104. "type": "boolean"
  15105. },
  15106. "metadata": {
  15107. "type": "object"
  15108. }
  15109. },
  15110. "required": ["executed"],
  15111. "additionalProperties": false
  15112. }
  15113. },
  15114. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15115. "additionalProperties": false
  15116. }
  15117. },
  15118. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15119. "additionalProperties": false
  15120. },
  15121. "SyncEventSessionNextToolProgress": {
  15122. "type": "object",
  15123. "properties": {
  15124. "type": {
  15125. "type": "string",
  15126. "enum": ["sync"]
  15127. },
  15128. "name": {
  15129. "type": "string",
  15130. "enum": ["session.next.tool.progress.1"]
  15131. },
  15132. "id": {
  15133. "type": "string"
  15134. },
  15135. "seq": {
  15136. "type": "number"
  15137. },
  15138. "aggregateID": {
  15139. "type": "string",
  15140. "enum": ["sessionID"]
  15141. },
  15142. "data": {
  15143. "type": "object",
  15144. "properties": {
  15145. "timestamp": {
  15146. "type": "number"
  15147. },
  15148. "sessionID": {
  15149. "type": "string"
  15150. },
  15151. "callID": {
  15152. "type": "string"
  15153. },
  15154. "structured": {
  15155. "type": "object"
  15156. },
  15157. "content": {
  15158. "type": "array",
  15159. "items": {
  15160. "anyOf": [
  15161. {
  15162. "$ref": "#/components/schemas/ToolTextContent"
  15163. },
  15164. {
  15165. "$ref": "#/components/schemas/ToolFileContent"
  15166. }
  15167. ]
  15168. }
  15169. }
  15170. },
  15171. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15172. "additionalProperties": false
  15173. }
  15174. },
  15175. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15176. "additionalProperties": false
  15177. },
  15178. "SyncEventSessionNextToolSuccess": {
  15179. "type": "object",
  15180. "properties": {
  15181. "type": {
  15182. "type": "string",
  15183. "enum": ["sync"]
  15184. },
  15185. "name": {
  15186. "type": "string",
  15187. "enum": ["session.next.tool.success.1"]
  15188. },
  15189. "id": {
  15190. "type": "string"
  15191. },
  15192. "seq": {
  15193. "type": "number"
  15194. },
  15195. "aggregateID": {
  15196. "type": "string",
  15197. "enum": ["sessionID"]
  15198. },
  15199. "data": {
  15200. "type": "object",
  15201. "properties": {
  15202. "timestamp": {
  15203. "type": "number"
  15204. },
  15205. "sessionID": {
  15206. "type": "string"
  15207. },
  15208. "callID": {
  15209. "type": "string"
  15210. },
  15211. "structured": {
  15212. "type": "object"
  15213. },
  15214. "content": {
  15215. "type": "array",
  15216. "items": {
  15217. "anyOf": [
  15218. {
  15219. "$ref": "#/components/schemas/ToolTextContent"
  15220. },
  15221. {
  15222. "$ref": "#/components/schemas/ToolFileContent"
  15223. }
  15224. ]
  15225. }
  15226. },
  15227. "provider": {
  15228. "type": "object",
  15229. "properties": {
  15230. "executed": {
  15231. "type": "boolean"
  15232. },
  15233. "metadata": {
  15234. "type": "object"
  15235. }
  15236. },
  15237. "required": ["executed"],
  15238. "additionalProperties": false
  15239. }
  15240. },
  15241. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15242. "additionalProperties": false
  15243. }
  15244. },
  15245. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15246. "additionalProperties": false
  15247. },
  15248. "SyncEventSessionNextToolFailed": {
  15249. "type": "object",
  15250. "properties": {
  15251. "type": {
  15252. "type": "string",
  15253. "enum": ["sync"]
  15254. },
  15255. "name": {
  15256. "type": "string",
  15257. "enum": ["session.next.tool.failed.1"]
  15258. },
  15259. "id": {
  15260. "type": "string"
  15261. },
  15262. "seq": {
  15263. "type": "number"
  15264. },
  15265. "aggregateID": {
  15266. "type": "string",
  15267. "enum": ["sessionID"]
  15268. },
  15269. "data": {
  15270. "type": "object",
  15271. "properties": {
  15272. "timestamp": {
  15273. "type": "number"
  15274. },
  15275. "sessionID": {
  15276. "type": "string"
  15277. },
  15278. "callID": {
  15279. "type": "string"
  15280. },
  15281. "error": {
  15282. "$ref": "#/components/schemas/SessionErrorUnknown"
  15283. },
  15284. "provider": {
  15285. "type": "object",
  15286. "properties": {
  15287. "executed": {
  15288. "type": "boolean"
  15289. },
  15290. "metadata": {
  15291. "type": "object"
  15292. }
  15293. },
  15294. "required": ["executed"],
  15295. "additionalProperties": false
  15296. }
  15297. },
  15298. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15299. "additionalProperties": false
  15300. }
  15301. },
  15302. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15303. "additionalProperties": false
  15304. },
  15305. "SyncEventSessionNextRetried": {
  15306. "type": "object",
  15307. "properties": {
  15308. "type": {
  15309. "type": "string",
  15310. "enum": ["sync"]
  15311. },
  15312. "name": {
  15313. "type": "string",
  15314. "enum": ["session.next.retried.1"]
  15315. },
  15316. "id": {
  15317. "type": "string"
  15318. },
  15319. "seq": {
  15320. "type": "number"
  15321. },
  15322. "aggregateID": {
  15323. "type": "string",
  15324. "enum": ["sessionID"]
  15325. },
  15326. "data": {
  15327. "type": "object",
  15328. "properties": {
  15329. "timestamp": {
  15330. "type": "number"
  15331. },
  15332. "sessionID": {
  15333. "type": "string"
  15334. },
  15335. "attempt": {
  15336. "type": "integer",
  15337. "minimum": 0
  15338. },
  15339. "error": {
  15340. "$ref": "#/components/schemas/SessionNextRetry_error"
  15341. }
  15342. },
  15343. "required": ["timestamp", "sessionID", "attempt", "error"],
  15344. "additionalProperties": false
  15345. }
  15346. },
  15347. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15348. "additionalProperties": false
  15349. },
  15350. "SyncEventSessionNextCompactionStarted": {
  15351. "type": "object",
  15352. "properties": {
  15353. "type": {
  15354. "type": "string",
  15355. "enum": ["sync"]
  15356. },
  15357. "name": {
  15358. "type": "string",
  15359. "enum": ["session.next.compaction.started.1"]
  15360. },
  15361. "id": {
  15362. "type": "string"
  15363. },
  15364. "seq": {
  15365. "type": "number"
  15366. },
  15367. "aggregateID": {
  15368. "type": "string",
  15369. "enum": ["sessionID"]
  15370. },
  15371. "data": {
  15372. "type": "object",
  15373. "properties": {
  15374. "timestamp": {
  15375. "type": "number"
  15376. },
  15377. "sessionID": {
  15378. "type": "string"
  15379. },
  15380. "reason": {
  15381. "type": "string",
  15382. "enum": ["auto", "manual"]
  15383. }
  15384. },
  15385. "required": ["timestamp", "sessionID", "reason"],
  15386. "additionalProperties": false
  15387. }
  15388. },
  15389. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15390. "additionalProperties": false
  15391. },
  15392. "SyncEventSessionNextCompactionDelta": {
  15393. "type": "object",
  15394. "properties": {
  15395. "type": {
  15396. "type": "string",
  15397. "enum": ["sync"]
  15398. },
  15399. "name": {
  15400. "type": "string",
  15401. "enum": ["session.next.compaction.delta.1"]
  15402. },
  15403. "id": {
  15404. "type": "string"
  15405. },
  15406. "seq": {
  15407. "type": "number"
  15408. },
  15409. "aggregateID": {
  15410. "type": "string",
  15411. "enum": ["sessionID"]
  15412. },
  15413. "data": {
  15414. "type": "object",
  15415. "properties": {
  15416. "timestamp": {
  15417. "type": "number"
  15418. },
  15419. "sessionID": {
  15420. "type": "string"
  15421. },
  15422. "text": {
  15423. "type": "string"
  15424. }
  15425. },
  15426. "required": ["timestamp", "sessionID", "text"],
  15427. "additionalProperties": false
  15428. }
  15429. },
  15430. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15431. "additionalProperties": false
  15432. },
  15433. "SyncEventSessionNextCompactionEnded": {
  15434. "type": "object",
  15435. "properties": {
  15436. "type": {
  15437. "type": "string",
  15438. "enum": ["sync"]
  15439. },
  15440. "name": {
  15441. "type": "string",
  15442. "enum": ["session.next.compaction.ended.1"]
  15443. },
  15444. "id": {
  15445. "type": "string"
  15446. },
  15447. "seq": {
  15448. "type": "number"
  15449. },
  15450. "aggregateID": {
  15451. "type": "string",
  15452. "enum": ["sessionID"]
  15453. },
  15454. "data": {
  15455. "type": "object",
  15456. "properties": {
  15457. "timestamp": {
  15458. "type": "number"
  15459. },
  15460. "sessionID": {
  15461. "type": "string"
  15462. },
  15463. "text": {
  15464. "type": "string"
  15465. },
  15466. "include": {
  15467. "type": "string"
  15468. }
  15469. },
  15470. "required": ["timestamp", "sessionID", "text"],
  15471. "additionalProperties": false
  15472. }
  15473. },
  15474. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15475. "additionalProperties": false
  15476. },
  15477. "EventServerInstanceDisposed": {
  15478. "type": "object",
  15479. "properties": {
  15480. "id": {
  15481. "type": "string"
  15482. },
  15483. "type": {
  15484. "type": "string",
  15485. "enum": ["server.instance.disposed"]
  15486. },
  15487. "properties": {
  15488. "type": "object",
  15489. "properties": {
  15490. "directory": {
  15491. "type": "string"
  15492. }
  15493. },
  15494. "required": ["directory"],
  15495. "additionalProperties": false
  15496. }
  15497. },
  15498. "required": ["id", "type", "properties"],
  15499. "additionalProperties": false
  15500. },
  15501. "EventFileEdited": {
  15502. "type": "object",
  15503. "properties": {
  15504. "id": {
  15505. "type": "string"
  15506. },
  15507. "type": {
  15508. "type": "string",
  15509. "enum": ["file.edited"]
  15510. },
  15511. "properties": {
  15512. "type": "object",
  15513. "properties": {
  15514. "file": {
  15515. "type": "string"
  15516. }
  15517. },
  15518. "required": ["file"],
  15519. "additionalProperties": false
  15520. }
  15521. },
  15522. "required": ["id", "type", "properties"],
  15523. "additionalProperties": false
  15524. },
  15525. "EventFileWatcherUpdated": {
  15526. "type": "object",
  15527. "properties": {
  15528. "id": {
  15529. "type": "string"
  15530. },
  15531. "type": {
  15532. "type": "string",
  15533. "enum": ["file.watcher.updated"]
  15534. },
  15535. "properties": {
  15536. "type": "object",
  15537. "properties": {
  15538. "file": {
  15539. "type": "string"
  15540. },
  15541. "event": {
  15542. "type": "string",
  15543. "enum": ["add", "change", "unlink"]
  15544. }
  15545. },
  15546. "required": ["file", "event"],
  15547. "additionalProperties": false
  15548. }
  15549. },
  15550. "required": ["id", "type", "properties"],
  15551. "additionalProperties": false
  15552. },
  15553. "EventLspClientDiagnostics": {
  15554. "type": "object",
  15555. "properties": {
  15556. "id": {
  15557. "type": "string"
  15558. },
  15559. "type": {
  15560. "type": "string",
  15561. "enum": ["lsp.client.diagnostics"]
  15562. },
  15563. "properties": {
  15564. "type": "object",
  15565. "properties": {
  15566. "serverID": {
  15567. "type": "string"
  15568. },
  15569. "path": {
  15570. "type": "string"
  15571. }
  15572. },
  15573. "required": ["serverID", "path"],
  15574. "additionalProperties": false
  15575. }
  15576. },
  15577. "required": ["id", "type", "properties"],
  15578. "additionalProperties": false
  15579. },
  15580. "EventLspUpdated": {
  15581. "type": "object",
  15582. "properties": {
  15583. "id": {
  15584. "type": "string"
  15585. },
  15586. "type": {
  15587. "type": "string",
  15588. "enum": ["lsp.updated"]
  15589. },
  15590. "properties": {
  15591. "type": "object",
  15592. "properties": {}
  15593. }
  15594. },
  15595. "required": ["id", "type", "properties"],
  15596. "additionalProperties": false
  15597. },
  15598. "EventMessagePartDelta": {
  15599. "type": "object",
  15600. "properties": {
  15601. "id": {
  15602. "type": "string"
  15603. },
  15604. "type": {
  15605. "type": "string",
  15606. "enum": ["message.part.delta"]
  15607. },
  15608. "properties": {
  15609. "type": "object",
  15610. "properties": {
  15611. "sessionID": {
  15612. "type": "string"
  15613. },
  15614. "messageID": {
  15615. "type": "string"
  15616. },
  15617. "partID": {
  15618. "type": "string"
  15619. },
  15620. "field": {
  15621. "type": "string"
  15622. },
  15623. "delta": {
  15624. "type": "string"
  15625. }
  15626. },
  15627. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15628. "additionalProperties": false
  15629. }
  15630. },
  15631. "required": ["id", "type", "properties"],
  15632. "additionalProperties": false
  15633. },
  15634. "EventPermissionAsked": {
  15635. "type": "object",
  15636. "properties": {
  15637. "id": {
  15638. "type": "string"
  15639. },
  15640. "type": {
  15641. "type": "string",
  15642. "enum": ["permission.asked"]
  15643. },
  15644. "properties": {
  15645. "$ref": "#/components/schemas/PermissionRequest"
  15646. }
  15647. },
  15648. "required": ["id", "type", "properties"],
  15649. "additionalProperties": false
  15650. },
  15651. "EventPermissionReplied": {
  15652. "type": "object",
  15653. "properties": {
  15654. "id": {
  15655. "type": "string"
  15656. },
  15657. "type": {
  15658. "type": "string",
  15659. "enum": ["permission.replied"]
  15660. },
  15661. "properties": {
  15662. "type": "object",
  15663. "properties": {
  15664. "sessionID": {
  15665. "type": "string"
  15666. },
  15667. "requestID": {
  15668. "type": "string"
  15669. },
  15670. "reply": {
  15671. "type": "string",
  15672. "enum": ["once", "always", "reject"]
  15673. }
  15674. },
  15675. "required": ["sessionID", "requestID", "reply"],
  15676. "additionalProperties": false
  15677. }
  15678. },
  15679. "required": ["id", "type", "properties"],
  15680. "additionalProperties": false
  15681. },
  15682. "EventSessionDiff": {
  15683. "type": "object",
  15684. "properties": {
  15685. "id": {
  15686. "type": "string"
  15687. },
  15688. "type": {
  15689. "type": "string",
  15690. "enum": ["session.diff"]
  15691. },
  15692. "properties": {
  15693. "type": "object",
  15694. "properties": {
  15695. "sessionID": {
  15696. "type": "string"
  15697. },
  15698. "diff": {
  15699. "type": "array",
  15700. "items": {
  15701. "$ref": "#/components/schemas/SnapshotFileDiff"
  15702. }
  15703. }
  15704. },
  15705. "required": ["sessionID", "diff"],
  15706. "additionalProperties": false
  15707. }
  15708. },
  15709. "required": ["id", "type", "properties"],
  15710. "additionalProperties": false
  15711. },
  15712. "EventSessionError": {
  15713. "type": "object",
  15714. "properties": {
  15715. "id": {
  15716. "type": "string"
  15717. },
  15718. "type": {
  15719. "type": "string",
  15720. "enum": ["session.error"]
  15721. },
  15722. "properties": {
  15723. "type": "object",
  15724. "properties": {
  15725. "sessionID": {
  15726. "type": "string"
  15727. },
  15728. "error": {
  15729. "anyOf": [
  15730. {
  15731. "$ref": "#/components/schemas/ProviderAuthError"
  15732. },
  15733. {
  15734. "$ref": "#/components/schemas/UnknownError"
  15735. },
  15736. {
  15737. "$ref": "#/components/schemas/MessageOutputLengthError"
  15738. },
  15739. {
  15740. "$ref": "#/components/schemas/MessageAbortedError"
  15741. },
  15742. {
  15743. "$ref": "#/components/schemas/StructuredOutputError"
  15744. },
  15745. {
  15746. "$ref": "#/components/schemas/ContextOverflowError"
  15747. },
  15748. {
  15749. "$ref": "#/components/schemas/APIError"
  15750. }
  15751. ]
  15752. }
  15753. },
  15754. "additionalProperties": false
  15755. }
  15756. },
  15757. "required": ["id", "type", "properties"],
  15758. "additionalProperties": false
  15759. },
  15760. "EventInstallationUpdated": {
  15761. "type": "object",
  15762. "properties": {
  15763. "id": {
  15764. "type": "string"
  15765. },
  15766. "type": {
  15767. "type": "string",
  15768. "enum": ["installation.updated"]
  15769. },
  15770. "properties": {
  15771. "type": "object",
  15772. "properties": {
  15773. "version": {
  15774. "type": "string"
  15775. }
  15776. },
  15777. "required": ["version"],
  15778. "additionalProperties": false
  15779. }
  15780. },
  15781. "required": ["id", "type", "properties"],
  15782. "additionalProperties": false
  15783. },
  15784. "EventInstallationUpdate-available": {
  15785. "type": "object",
  15786. "properties": {
  15787. "id": {
  15788. "type": "string"
  15789. },
  15790. "type": {
  15791. "type": "string",
  15792. "enum": ["installation.update-available"]
  15793. },
  15794. "properties": {
  15795. "type": "object",
  15796. "properties": {
  15797. "version": {
  15798. "type": "string"
  15799. }
  15800. },
  15801. "required": ["version"],
  15802. "additionalProperties": false
  15803. }
  15804. },
  15805. "required": ["id", "type", "properties"],
  15806. "additionalProperties": false
  15807. },
  15808. "EventQuestionAsked": {
  15809. "type": "object",
  15810. "properties": {
  15811. "id": {
  15812. "type": "string"
  15813. },
  15814. "type": {
  15815. "type": "string",
  15816. "enum": ["question.asked"]
  15817. },
  15818. "properties": {
  15819. "$ref": "#/components/schemas/QuestionRequest"
  15820. }
  15821. },
  15822. "required": ["id", "type", "properties"],
  15823. "additionalProperties": false
  15824. },
  15825. "EventQuestionReplied": {
  15826. "type": "object",
  15827. "properties": {
  15828. "id": {
  15829. "type": "string"
  15830. },
  15831. "type": {
  15832. "type": "string",
  15833. "enum": ["question.replied"]
  15834. },
  15835. "properties": {
  15836. "$ref": "#/components/schemas/QuestionReplied"
  15837. }
  15838. },
  15839. "required": ["id", "type", "properties"],
  15840. "additionalProperties": false
  15841. },
  15842. "EventQuestionRejected": {
  15843. "type": "object",
  15844. "properties": {
  15845. "id": {
  15846. "type": "string"
  15847. },
  15848. "type": {
  15849. "type": "string",
  15850. "enum": ["question.rejected"]
  15851. },
  15852. "properties": {
  15853. "$ref": "#/components/schemas/QuestionRejected"
  15854. }
  15855. },
  15856. "required": ["id", "type", "properties"],
  15857. "additionalProperties": false
  15858. },
  15859. "EventTodoUpdated": {
  15860. "type": "object",
  15861. "properties": {
  15862. "id": {
  15863. "type": "string"
  15864. },
  15865. "type": {
  15866. "type": "string",
  15867. "enum": ["todo.updated"]
  15868. },
  15869. "properties": {
  15870. "type": "object",
  15871. "properties": {
  15872. "sessionID": {
  15873. "type": "string"
  15874. },
  15875. "todos": {
  15876. "type": "array",
  15877. "items": {
  15878. "$ref": "#/components/schemas/Todo"
  15879. }
  15880. }
  15881. },
  15882. "required": ["sessionID", "todos"],
  15883. "additionalProperties": false
  15884. }
  15885. },
  15886. "required": ["id", "type", "properties"],
  15887. "additionalProperties": false
  15888. },
  15889. "EventSessionStatus": {
  15890. "type": "object",
  15891. "properties": {
  15892. "id": {
  15893. "type": "string"
  15894. },
  15895. "type": {
  15896. "type": "string",
  15897. "enum": ["session.status"]
  15898. },
  15899. "properties": {
  15900. "type": "object",
  15901. "properties": {
  15902. "sessionID": {
  15903. "type": "string"
  15904. },
  15905. "status": {
  15906. "$ref": "#/components/schemas/SessionStatus"
  15907. }
  15908. },
  15909. "required": ["sessionID", "status"],
  15910. "additionalProperties": false
  15911. }
  15912. },
  15913. "required": ["id", "type", "properties"],
  15914. "additionalProperties": false
  15915. },
  15916. "EventSessionIdle": {
  15917. "type": "object",
  15918. "properties": {
  15919. "id": {
  15920. "type": "string"
  15921. },
  15922. "type": {
  15923. "type": "string",
  15924. "enum": ["session.idle"]
  15925. },
  15926. "properties": {
  15927. "type": "object",
  15928. "properties": {
  15929. "sessionID": {
  15930. "type": "string"
  15931. }
  15932. },
  15933. "required": ["sessionID"],
  15934. "additionalProperties": false
  15935. }
  15936. },
  15937. "required": ["id", "type", "properties"],
  15938. "additionalProperties": false
  15939. },
  15940. "EventSessionCompacted": {
  15941. "type": "object",
  15942. "properties": {
  15943. "id": {
  15944. "type": "string"
  15945. },
  15946. "type": {
  15947. "type": "string",
  15948. "enum": ["session.compacted"]
  15949. },
  15950. "properties": {
  15951. "type": "object",
  15952. "properties": {
  15953. "sessionID": {
  15954. "type": "string"
  15955. }
  15956. },
  15957. "required": ["sessionID"],
  15958. "additionalProperties": false
  15959. }
  15960. },
  15961. "required": ["id", "type", "properties"],
  15962. "additionalProperties": false
  15963. },
  15964. "EventMcpToolsChanged": {
  15965. "type": "object",
  15966. "properties": {
  15967. "id": {
  15968. "type": "string"
  15969. },
  15970. "type": {
  15971. "type": "string",
  15972. "enum": ["mcp.tools.changed"]
  15973. },
  15974. "properties": {
  15975. "type": "object",
  15976. "properties": {
  15977. "server": {
  15978. "type": "string"
  15979. }
  15980. },
  15981. "required": ["server"],
  15982. "additionalProperties": false
  15983. }
  15984. },
  15985. "required": ["id", "type", "properties"],
  15986. "additionalProperties": false
  15987. },
  15988. "EventMcpBrowserOpenFailed": {
  15989. "type": "object",
  15990. "properties": {
  15991. "id": {
  15992. "type": "string"
  15993. },
  15994. "type": {
  15995. "type": "string",
  15996. "enum": ["mcp.browser.open.failed"]
  15997. },
  15998. "properties": {
  15999. "type": "object",
  16000. "properties": {
  16001. "mcpName": {
  16002. "type": "string"
  16003. },
  16004. "url": {
  16005. "type": "string"
  16006. }
  16007. },
  16008. "required": ["mcpName", "url"],
  16009. "additionalProperties": false
  16010. }
  16011. },
  16012. "required": ["id", "type", "properties"],
  16013. "additionalProperties": false
  16014. },
  16015. "EventCommandExecuted": {
  16016. "type": "object",
  16017. "properties": {
  16018. "id": {
  16019. "type": "string"
  16020. },
  16021. "type": {
  16022. "type": "string",
  16023. "enum": ["command.executed"]
  16024. },
  16025. "properties": {
  16026. "type": "object",
  16027. "properties": {
  16028. "name": {
  16029. "type": "string"
  16030. },
  16031. "sessionID": {
  16032. "type": "string"
  16033. },
  16034. "arguments": {
  16035. "type": "string"
  16036. },
  16037. "messageID": {
  16038. "type": "string"
  16039. }
  16040. },
  16041. "required": ["name", "sessionID", "arguments", "messageID"],
  16042. "additionalProperties": false
  16043. }
  16044. },
  16045. "required": ["id", "type", "properties"],
  16046. "additionalProperties": false
  16047. },
  16048. "EventProjectUpdated": {
  16049. "type": "object",
  16050. "properties": {
  16051. "id": {
  16052. "type": "string"
  16053. },
  16054. "type": {
  16055. "type": "string",
  16056. "enum": ["project.updated"]
  16057. },
  16058. "properties": {
  16059. "$ref": "#/components/schemas/Project"
  16060. }
  16061. },
  16062. "required": ["id", "type", "properties"],
  16063. "additionalProperties": false
  16064. },
  16065. "EventVcsBranchUpdated": {
  16066. "type": "object",
  16067. "properties": {
  16068. "id": {
  16069. "type": "string"
  16070. },
  16071. "type": {
  16072. "type": "string",
  16073. "enum": ["vcs.branch.updated"]
  16074. },
  16075. "properties": {
  16076. "type": "object",
  16077. "properties": {
  16078. "branch": {
  16079. "type": "string"
  16080. }
  16081. },
  16082. "additionalProperties": false
  16083. }
  16084. },
  16085. "required": ["id", "type", "properties"],
  16086. "additionalProperties": false
  16087. },
  16088. "EventWorkspaceReady": {
  16089. "type": "object",
  16090. "properties": {
  16091. "id": {
  16092. "type": "string"
  16093. },
  16094. "type": {
  16095. "type": "string",
  16096. "enum": ["workspace.ready"]
  16097. },
  16098. "properties": {
  16099. "type": "object",
  16100. "properties": {
  16101. "name": {
  16102. "type": "string"
  16103. }
  16104. },
  16105. "required": ["name"],
  16106. "additionalProperties": false
  16107. }
  16108. },
  16109. "required": ["id", "type", "properties"],
  16110. "additionalProperties": false
  16111. },
  16112. "EventWorkspaceFailed": {
  16113. "type": "object",
  16114. "properties": {
  16115. "id": {
  16116. "type": "string"
  16117. },
  16118. "type": {
  16119. "type": "string",
  16120. "enum": ["workspace.failed"]
  16121. },
  16122. "properties": {
  16123. "type": "object",
  16124. "properties": {
  16125. "message": {
  16126. "type": "string"
  16127. }
  16128. },
  16129. "required": ["message"],
  16130. "additionalProperties": false
  16131. }
  16132. },
  16133. "required": ["id", "type", "properties"],
  16134. "additionalProperties": false
  16135. },
  16136. "EventWorkspaceStatus": {
  16137. "type": "object",
  16138. "properties": {
  16139. "id": {
  16140. "type": "string"
  16141. },
  16142. "type": {
  16143. "type": "string",
  16144. "enum": ["workspace.status"]
  16145. },
  16146. "properties": {
  16147. "type": "object",
  16148. "properties": {
  16149. "workspaceID": {
  16150. "type": "string"
  16151. },
  16152. "status": {
  16153. "type": "string",
  16154. "enum": ["connected", "connecting", "disconnected", "error"]
  16155. }
  16156. },
  16157. "required": ["workspaceID", "status"],
  16158. "additionalProperties": false
  16159. }
  16160. },
  16161. "required": ["id", "type", "properties"],
  16162. "additionalProperties": false
  16163. },
  16164. "EventWorktreeReady": {
  16165. "type": "object",
  16166. "properties": {
  16167. "id": {
  16168. "type": "string"
  16169. },
  16170. "type": {
  16171. "type": "string",
  16172. "enum": ["worktree.ready"]
  16173. },
  16174. "properties": {
  16175. "type": "object",
  16176. "properties": {
  16177. "name": {
  16178. "type": "string"
  16179. },
  16180. "branch": {
  16181. "type": "string"
  16182. }
  16183. },
  16184. "required": ["name", "branch"],
  16185. "additionalProperties": false
  16186. }
  16187. },
  16188. "required": ["id", "type", "properties"],
  16189. "additionalProperties": false
  16190. },
  16191. "EventWorktreeFailed": {
  16192. "type": "object",
  16193. "properties": {
  16194. "id": {
  16195. "type": "string"
  16196. },
  16197. "type": {
  16198. "type": "string",
  16199. "enum": ["worktree.failed"]
  16200. },
  16201. "properties": {
  16202. "type": "object",
  16203. "properties": {
  16204. "message": {
  16205. "type": "string"
  16206. }
  16207. },
  16208. "required": ["message"],
  16209. "additionalProperties": false
  16210. }
  16211. },
  16212. "required": ["id", "type", "properties"],
  16213. "additionalProperties": false
  16214. },
  16215. "EventPtyCreated": {
  16216. "type": "object",
  16217. "properties": {
  16218. "id": {
  16219. "type": "string"
  16220. },
  16221. "type": {
  16222. "type": "string",
  16223. "enum": ["pty.created"]
  16224. },
  16225. "properties": {
  16226. "type": "object",
  16227. "properties": {
  16228. "info": {
  16229. "$ref": "#/components/schemas/Pty"
  16230. }
  16231. },
  16232. "required": ["info"],
  16233. "additionalProperties": false
  16234. }
  16235. },
  16236. "required": ["id", "type", "properties"],
  16237. "additionalProperties": false
  16238. },
  16239. "EventPtyUpdated": {
  16240. "type": "object",
  16241. "properties": {
  16242. "id": {
  16243. "type": "string"
  16244. },
  16245. "type": {
  16246. "type": "string",
  16247. "enum": ["pty.updated"]
  16248. },
  16249. "properties": {
  16250. "type": "object",
  16251. "properties": {
  16252. "info": {
  16253. "$ref": "#/components/schemas/Pty"
  16254. }
  16255. },
  16256. "required": ["info"],
  16257. "additionalProperties": false
  16258. }
  16259. },
  16260. "required": ["id", "type", "properties"],
  16261. "additionalProperties": false
  16262. },
  16263. "EventPtyExited": {
  16264. "type": "object",
  16265. "properties": {
  16266. "id": {
  16267. "type": "string"
  16268. },
  16269. "type": {
  16270. "type": "string",
  16271. "enum": ["pty.exited"]
  16272. },
  16273. "properties": {
  16274. "type": "object",
  16275. "properties": {
  16276. "id": {
  16277. "type": "string"
  16278. },
  16279. "exitCode": {
  16280. "type": "integer",
  16281. "minimum": 0
  16282. }
  16283. },
  16284. "required": ["id", "exitCode"],
  16285. "additionalProperties": false
  16286. }
  16287. },
  16288. "required": ["id", "type", "properties"],
  16289. "additionalProperties": false
  16290. },
  16291. "EventPtyDeleted": {
  16292. "type": "object",
  16293. "properties": {
  16294. "id": {
  16295. "type": "string"
  16296. },
  16297. "type": {
  16298. "type": "string",
  16299. "enum": ["pty.deleted"]
  16300. },
  16301. "properties": {
  16302. "type": "object",
  16303. "properties": {
  16304. "id": {
  16305. "type": "string"
  16306. }
  16307. },
  16308. "required": ["id"],
  16309. "additionalProperties": false
  16310. }
  16311. },
  16312. "required": ["id", "type", "properties"],
  16313. "additionalProperties": false
  16314. },
  16315. "EventMessageUpdated": {
  16316. "type": "object",
  16317. "properties": {
  16318. "id": {
  16319. "type": "string"
  16320. },
  16321. "type": {
  16322. "type": "string",
  16323. "enum": ["message.updated"]
  16324. },
  16325. "properties": {
  16326. "type": "object",
  16327. "properties": {
  16328. "sessionID": {
  16329. "type": "string"
  16330. },
  16331. "info": {
  16332. "$ref": "#/components/schemas/Message"
  16333. }
  16334. },
  16335. "required": ["sessionID", "info"],
  16336. "additionalProperties": false
  16337. }
  16338. },
  16339. "required": ["id", "type", "properties"],
  16340. "additionalProperties": false
  16341. },
  16342. "EventMessageRemoved": {
  16343. "type": "object",
  16344. "properties": {
  16345. "id": {
  16346. "type": "string"
  16347. },
  16348. "type": {
  16349. "type": "string",
  16350. "enum": ["message.removed"]
  16351. },
  16352. "properties": {
  16353. "type": "object",
  16354. "properties": {
  16355. "sessionID": {
  16356. "type": "string"
  16357. },
  16358. "messageID": {
  16359. "type": "string"
  16360. }
  16361. },
  16362. "required": ["sessionID", "messageID"],
  16363. "additionalProperties": false
  16364. }
  16365. },
  16366. "required": ["id", "type", "properties"],
  16367. "additionalProperties": false
  16368. },
  16369. "EventMessagePartUpdated": {
  16370. "type": "object",
  16371. "properties": {
  16372. "id": {
  16373. "type": "string"
  16374. },
  16375. "type": {
  16376. "type": "string",
  16377. "enum": ["message.part.updated"]
  16378. },
  16379. "properties": {
  16380. "type": "object",
  16381. "properties": {
  16382. "sessionID": {
  16383. "type": "string"
  16384. },
  16385. "part": {
  16386. "$ref": "#/components/schemas/Part"
  16387. },
  16388. "time": {
  16389. "type": "integer",
  16390. "minimum": 0
  16391. }
  16392. },
  16393. "required": ["sessionID", "part", "time"],
  16394. "additionalProperties": false
  16395. }
  16396. },
  16397. "required": ["id", "type", "properties"],
  16398. "additionalProperties": false
  16399. },
  16400. "EventMessagePartRemoved": {
  16401. "type": "object",
  16402. "properties": {
  16403. "id": {
  16404. "type": "string"
  16405. },
  16406. "type": {
  16407. "type": "string",
  16408. "enum": ["message.part.removed"]
  16409. },
  16410. "properties": {
  16411. "type": "object",
  16412. "properties": {
  16413. "sessionID": {
  16414. "type": "string"
  16415. },
  16416. "messageID": {
  16417. "type": "string"
  16418. },
  16419. "partID": {
  16420. "type": "string"
  16421. }
  16422. },
  16423. "required": ["sessionID", "messageID", "partID"],
  16424. "additionalProperties": false
  16425. }
  16426. },
  16427. "required": ["id", "type", "properties"],
  16428. "additionalProperties": false
  16429. },
  16430. "EventSessionCreated": {
  16431. "type": "object",
  16432. "properties": {
  16433. "id": {
  16434. "type": "string"
  16435. },
  16436. "type": {
  16437. "type": "string",
  16438. "enum": ["session.created"]
  16439. },
  16440. "properties": {
  16441. "type": "object",
  16442. "properties": {
  16443. "sessionID": {
  16444. "type": "string"
  16445. },
  16446. "info": {
  16447. "$ref": "#/components/schemas/Session"
  16448. }
  16449. },
  16450. "required": ["sessionID", "info"],
  16451. "additionalProperties": false
  16452. }
  16453. },
  16454. "required": ["id", "type", "properties"],
  16455. "additionalProperties": false
  16456. },
  16457. "EventSessionUpdated": {
  16458. "type": "object",
  16459. "properties": {
  16460. "id": {
  16461. "type": "string"
  16462. },
  16463. "type": {
  16464. "type": "string",
  16465. "enum": ["session.updated"]
  16466. },
  16467. "properties": {
  16468. "type": "object",
  16469. "properties": {
  16470. "sessionID": {
  16471. "type": "string"
  16472. },
  16473. "info": {
  16474. "$ref": "#/components/schemas/Session"
  16475. }
  16476. },
  16477. "required": ["sessionID", "info"],
  16478. "additionalProperties": false
  16479. }
  16480. },
  16481. "required": ["id", "type", "properties"],
  16482. "additionalProperties": false
  16483. },
  16484. "EventSessionDeleted": {
  16485. "type": "object",
  16486. "properties": {
  16487. "id": {
  16488. "type": "string"
  16489. },
  16490. "type": {
  16491. "type": "string",
  16492. "enum": ["session.deleted"]
  16493. },
  16494. "properties": {
  16495. "type": "object",
  16496. "properties": {
  16497. "sessionID": {
  16498. "type": "string"
  16499. },
  16500. "info": {
  16501. "$ref": "#/components/schemas/Session"
  16502. }
  16503. },
  16504. "required": ["sessionID", "info"],
  16505. "additionalProperties": false
  16506. }
  16507. },
  16508. "required": ["id", "type", "properties"],
  16509. "additionalProperties": false
  16510. },
  16511. "EventSessionNextAgentSwitched": {
  16512. "type": "object",
  16513. "properties": {
  16514. "id": {
  16515. "type": "string"
  16516. },
  16517. "type": {
  16518. "type": "string",
  16519. "enum": ["session.next.agent.switched"]
  16520. },
  16521. "properties": {
  16522. "type": "object",
  16523. "properties": {
  16524. "timestamp": {
  16525. "type": "number"
  16526. },
  16527. "sessionID": {
  16528. "type": "string"
  16529. },
  16530. "agent": {
  16531. "type": "string"
  16532. }
  16533. },
  16534. "required": ["timestamp", "sessionID", "agent"],
  16535. "additionalProperties": false
  16536. }
  16537. },
  16538. "required": ["id", "type", "properties"],
  16539. "additionalProperties": false
  16540. },
  16541. "EventSessionNextModelSwitched": {
  16542. "type": "object",
  16543. "properties": {
  16544. "id": {
  16545. "type": "string"
  16546. },
  16547. "type": {
  16548. "type": "string",
  16549. "enum": ["session.next.model.switched"]
  16550. },
  16551. "properties": {
  16552. "type": "object",
  16553. "properties": {
  16554. "timestamp": {
  16555. "type": "number"
  16556. },
  16557. "sessionID": {
  16558. "type": "string"
  16559. },
  16560. "model": {
  16561. "type": "object",
  16562. "properties": {
  16563. "id": {
  16564. "type": "string"
  16565. },
  16566. "providerID": {
  16567. "type": "string"
  16568. },
  16569. "variant": {
  16570. "type": "string"
  16571. }
  16572. },
  16573. "required": ["id", "providerID", "variant"],
  16574. "additionalProperties": false
  16575. }
  16576. },
  16577. "required": ["timestamp", "sessionID", "model"],
  16578. "additionalProperties": false
  16579. }
  16580. },
  16581. "required": ["id", "type", "properties"],
  16582. "additionalProperties": false
  16583. },
  16584. "PromptSource": {
  16585. "type": "object",
  16586. "properties": {
  16587. "start": {
  16588. "type": "number"
  16589. },
  16590. "end": {
  16591. "type": "number"
  16592. },
  16593. "text": {
  16594. "type": "string"
  16595. }
  16596. },
  16597. "required": ["start", "end", "text"],
  16598. "additionalProperties": false
  16599. },
  16600. "PromptFileAttachment": {
  16601. "type": "object",
  16602. "properties": {
  16603. "uri": {
  16604. "type": "string"
  16605. },
  16606. "mime": {
  16607. "type": "string"
  16608. },
  16609. "name": {
  16610. "type": "string"
  16611. },
  16612. "description": {
  16613. "type": "string"
  16614. },
  16615. "source": {
  16616. "$ref": "#/components/schemas/PromptSource"
  16617. }
  16618. },
  16619. "required": ["uri", "mime"],
  16620. "additionalProperties": false
  16621. },
  16622. "PromptAgentAttachment": {
  16623. "type": "object",
  16624. "properties": {
  16625. "name": {
  16626. "type": "string"
  16627. },
  16628. "source": {
  16629. "$ref": "#/components/schemas/PromptSource"
  16630. }
  16631. },
  16632. "required": ["name"],
  16633. "additionalProperties": false
  16634. },
  16635. "EventSessionNextPrompted": {
  16636. "type": "object",
  16637. "properties": {
  16638. "id": {
  16639. "type": "string"
  16640. },
  16641. "type": {
  16642. "type": "string",
  16643. "enum": ["session.next.prompted"]
  16644. },
  16645. "properties": {
  16646. "type": "object",
  16647. "properties": {
  16648. "timestamp": {
  16649. "type": "number"
  16650. },
  16651. "sessionID": {
  16652. "type": "string"
  16653. },
  16654. "prompt": {
  16655. "$ref": "#/components/schemas/Prompt"
  16656. }
  16657. },
  16658. "required": ["timestamp", "sessionID", "prompt"],
  16659. "additionalProperties": false
  16660. }
  16661. },
  16662. "required": ["id", "type", "properties"],
  16663. "additionalProperties": false
  16664. },
  16665. "EventSessionNextSynthetic": {
  16666. "type": "object",
  16667. "properties": {
  16668. "id": {
  16669. "type": "string"
  16670. },
  16671. "type": {
  16672. "type": "string",
  16673. "enum": ["session.next.synthetic"]
  16674. },
  16675. "properties": {
  16676. "type": "object",
  16677. "properties": {
  16678. "timestamp": {
  16679. "type": "number"
  16680. },
  16681. "sessionID": {
  16682. "type": "string"
  16683. },
  16684. "text": {
  16685. "type": "string"
  16686. }
  16687. },
  16688. "required": ["timestamp", "sessionID", "text"],
  16689. "additionalProperties": false
  16690. }
  16691. },
  16692. "required": ["id", "type", "properties"],
  16693. "additionalProperties": false
  16694. },
  16695. "EventSessionNextShellStarted": {
  16696. "type": "object",
  16697. "properties": {
  16698. "id": {
  16699. "type": "string"
  16700. },
  16701. "type": {
  16702. "type": "string",
  16703. "enum": ["session.next.shell.started"]
  16704. },
  16705. "properties": {
  16706. "type": "object",
  16707. "properties": {
  16708. "timestamp": {
  16709. "type": "number"
  16710. },
  16711. "sessionID": {
  16712. "type": "string"
  16713. },
  16714. "callID": {
  16715. "type": "string"
  16716. },
  16717. "command": {
  16718. "type": "string"
  16719. }
  16720. },
  16721. "required": ["timestamp", "sessionID", "callID", "command"],
  16722. "additionalProperties": false
  16723. }
  16724. },
  16725. "required": ["id", "type", "properties"],
  16726. "additionalProperties": false
  16727. },
  16728. "EventSessionNextShellEnded": {
  16729. "type": "object",
  16730. "properties": {
  16731. "id": {
  16732. "type": "string"
  16733. },
  16734. "type": {
  16735. "type": "string",
  16736. "enum": ["session.next.shell.ended"]
  16737. },
  16738. "properties": {
  16739. "type": "object",
  16740. "properties": {
  16741. "timestamp": {
  16742. "type": "number"
  16743. },
  16744. "sessionID": {
  16745. "type": "string"
  16746. },
  16747. "callID": {
  16748. "type": "string"
  16749. },
  16750. "output": {
  16751. "type": "string"
  16752. }
  16753. },
  16754. "required": ["timestamp", "sessionID", "callID", "output"],
  16755. "additionalProperties": false
  16756. }
  16757. },
  16758. "required": ["id", "type", "properties"],
  16759. "additionalProperties": false
  16760. },
  16761. "EventSessionNextStepStarted": {
  16762. "type": "object",
  16763. "properties": {
  16764. "id": {
  16765. "type": "string"
  16766. },
  16767. "type": {
  16768. "type": "string",
  16769. "enum": ["session.next.step.started"]
  16770. },
  16771. "properties": {
  16772. "type": "object",
  16773. "properties": {
  16774. "timestamp": {
  16775. "type": "number"
  16776. },
  16777. "sessionID": {
  16778. "type": "string"
  16779. },
  16780. "agent": {
  16781. "type": "string"
  16782. },
  16783. "model": {
  16784. "type": "object",
  16785. "properties": {
  16786. "id": {
  16787. "type": "string"
  16788. },
  16789. "providerID": {
  16790. "type": "string"
  16791. },
  16792. "variant": {
  16793. "type": "string"
  16794. }
  16795. },
  16796. "required": ["id", "providerID", "variant"],
  16797. "additionalProperties": false
  16798. },
  16799. "snapshot": {
  16800. "type": "string"
  16801. }
  16802. },
  16803. "required": ["timestamp", "sessionID", "agent", "model"],
  16804. "additionalProperties": false
  16805. }
  16806. },
  16807. "required": ["id", "type", "properties"],
  16808. "additionalProperties": false
  16809. },
  16810. "EventSessionNextStepEnded": {
  16811. "type": "object",
  16812. "properties": {
  16813. "id": {
  16814. "type": "string"
  16815. },
  16816. "type": {
  16817. "type": "string",
  16818. "enum": ["session.next.step.ended"]
  16819. },
  16820. "properties": {
  16821. "type": "object",
  16822. "properties": {
  16823. "timestamp": {
  16824. "type": "number"
  16825. },
  16826. "sessionID": {
  16827. "type": "string"
  16828. },
  16829. "finish": {
  16830. "type": "string"
  16831. },
  16832. "cost": {
  16833. "type": "number"
  16834. },
  16835. "tokens": {
  16836. "type": "object",
  16837. "properties": {
  16838. "input": {
  16839. "type": "integer",
  16840. "minimum": 0
  16841. },
  16842. "output": {
  16843. "type": "integer",
  16844. "minimum": 0
  16845. },
  16846. "reasoning": {
  16847. "type": "integer",
  16848. "minimum": 0
  16849. },
  16850. "cache": {
  16851. "type": "object",
  16852. "properties": {
  16853. "read": {
  16854. "type": "integer",
  16855. "minimum": 0
  16856. },
  16857. "write": {
  16858. "type": "integer",
  16859. "minimum": 0
  16860. }
  16861. },
  16862. "required": ["read", "write"],
  16863. "additionalProperties": false
  16864. }
  16865. },
  16866. "required": ["input", "output", "reasoning", "cache"],
  16867. "additionalProperties": false
  16868. },
  16869. "snapshot": {
  16870. "type": "string"
  16871. }
  16872. },
  16873. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  16874. "additionalProperties": false
  16875. }
  16876. },
  16877. "required": ["id", "type", "properties"],
  16878. "additionalProperties": false
  16879. },
  16880. "SessionErrorUnknown": {
  16881. "type": "object",
  16882. "properties": {
  16883. "type": {
  16884. "type": "string",
  16885. "enum": ["unknown"]
  16886. },
  16887. "message": {
  16888. "type": "string"
  16889. }
  16890. },
  16891. "required": ["type", "message"],
  16892. "additionalProperties": false
  16893. },
  16894. "EventSessionNextStepFailed": {
  16895. "type": "object",
  16896. "properties": {
  16897. "id": {
  16898. "type": "string"
  16899. },
  16900. "type": {
  16901. "type": "string",
  16902. "enum": ["session.next.step.failed"]
  16903. },
  16904. "properties": {
  16905. "type": "object",
  16906. "properties": {
  16907. "timestamp": {
  16908. "type": "number"
  16909. },
  16910. "sessionID": {
  16911. "type": "string"
  16912. },
  16913. "error": {
  16914. "$ref": "#/components/schemas/SessionErrorUnknown"
  16915. }
  16916. },
  16917. "required": ["timestamp", "sessionID", "error"],
  16918. "additionalProperties": false
  16919. }
  16920. },
  16921. "required": ["id", "type", "properties"],
  16922. "additionalProperties": false
  16923. },
  16924. "EventSessionNextTextStarted": {
  16925. "type": "object",
  16926. "properties": {
  16927. "id": {
  16928. "type": "string"
  16929. },
  16930. "type": {
  16931. "type": "string",
  16932. "enum": ["session.next.text.started"]
  16933. },
  16934. "properties": {
  16935. "type": "object",
  16936. "properties": {
  16937. "timestamp": {
  16938. "type": "number"
  16939. },
  16940. "sessionID": {
  16941. "type": "string"
  16942. }
  16943. },
  16944. "required": ["timestamp", "sessionID"],
  16945. "additionalProperties": false
  16946. }
  16947. },
  16948. "required": ["id", "type", "properties"],
  16949. "additionalProperties": false
  16950. },
  16951. "EventSessionNextTextDelta": {
  16952. "type": "object",
  16953. "properties": {
  16954. "id": {
  16955. "type": "string"
  16956. },
  16957. "type": {
  16958. "type": "string",
  16959. "enum": ["session.next.text.delta"]
  16960. },
  16961. "properties": {
  16962. "type": "object",
  16963. "properties": {
  16964. "timestamp": {
  16965. "type": "number"
  16966. },
  16967. "sessionID": {
  16968. "type": "string"
  16969. },
  16970. "delta": {
  16971. "type": "string"
  16972. }
  16973. },
  16974. "required": ["timestamp", "sessionID", "delta"],
  16975. "additionalProperties": false
  16976. }
  16977. },
  16978. "required": ["id", "type", "properties"],
  16979. "additionalProperties": false
  16980. },
  16981. "EventSessionNextTextEnded": {
  16982. "type": "object",
  16983. "properties": {
  16984. "id": {
  16985. "type": "string"
  16986. },
  16987. "type": {
  16988. "type": "string",
  16989. "enum": ["session.next.text.ended"]
  16990. },
  16991. "properties": {
  16992. "type": "object",
  16993. "properties": {
  16994. "timestamp": {
  16995. "type": "number"
  16996. },
  16997. "sessionID": {
  16998. "type": "string"
  16999. },
  17000. "text": {
  17001. "type": "string"
  17002. }
  17003. },
  17004. "required": ["timestamp", "sessionID", "text"],
  17005. "additionalProperties": false
  17006. }
  17007. },
  17008. "required": ["id", "type", "properties"],
  17009. "additionalProperties": false
  17010. },
  17011. "EventSessionNextReasoningStarted": {
  17012. "type": "object",
  17013. "properties": {
  17014. "id": {
  17015. "type": "string"
  17016. },
  17017. "type": {
  17018. "type": "string",
  17019. "enum": ["session.next.reasoning.started"]
  17020. },
  17021. "properties": {
  17022. "type": "object",
  17023. "properties": {
  17024. "timestamp": {
  17025. "type": "number"
  17026. },
  17027. "sessionID": {
  17028. "type": "string"
  17029. },
  17030. "reasoningID": {
  17031. "type": "string"
  17032. }
  17033. },
  17034. "required": ["timestamp", "sessionID", "reasoningID"],
  17035. "additionalProperties": false
  17036. }
  17037. },
  17038. "required": ["id", "type", "properties"],
  17039. "additionalProperties": false
  17040. },
  17041. "EventSessionNextReasoningDelta": {
  17042. "type": "object",
  17043. "properties": {
  17044. "id": {
  17045. "type": "string"
  17046. },
  17047. "type": {
  17048. "type": "string",
  17049. "enum": ["session.next.reasoning.delta"]
  17050. },
  17051. "properties": {
  17052. "type": "object",
  17053. "properties": {
  17054. "timestamp": {
  17055. "type": "number"
  17056. },
  17057. "sessionID": {
  17058. "type": "string"
  17059. },
  17060. "reasoningID": {
  17061. "type": "string"
  17062. },
  17063. "delta": {
  17064. "type": "string"
  17065. }
  17066. },
  17067. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17068. "additionalProperties": false
  17069. }
  17070. },
  17071. "required": ["id", "type", "properties"],
  17072. "additionalProperties": false
  17073. },
  17074. "EventSessionNextReasoningEnded": {
  17075. "type": "object",
  17076. "properties": {
  17077. "id": {
  17078. "type": "string"
  17079. },
  17080. "type": {
  17081. "type": "string",
  17082. "enum": ["session.next.reasoning.ended"]
  17083. },
  17084. "properties": {
  17085. "type": "object",
  17086. "properties": {
  17087. "timestamp": {
  17088. "type": "number"
  17089. },
  17090. "sessionID": {
  17091. "type": "string"
  17092. },
  17093. "reasoningID": {
  17094. "type": "string"
  17095. },
  17096. "text": {
  17097. "type": "string"
  17098. }
  17099. },
  17100. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17101. "additionalProperties": false
  17102. }
  17103. },
  17104. "required": ["id", "type", "properties"],
  17105. "additionalProperties": false
  17106. },
  17107. "EventSessionNextToolInputStarted": {
  17108. "type": "object",
  17109. "properties": {
  17110. "id": {
  17111. "type": "string"
  17112. },
  17113. "type": {
  17114. "type": "string",
  17115. "enum": ["session.next.tool.input.started"]
  17116. },
  17117. "properties": {
  17118. "type": "object",
  17119. "properties": {
  17120. "timestamp": {
  17121. "type": "number"
  17122. },
  17123. "sessionID": {
  17124. "type": "string"
  17125. },
  17126. "callID": {
  17127. "type": "string"
  17128. },
  17129. "name": {
  17130. "type": "string"
  17131. }
  17132. },
  17133. "required": ["timestamp", "sessionID", "callID", "name"],
  17134. "additionalProperties": false
  17135. }
  17136. },
  17137. "required": ["id", "type", "properties"],
  17138. "additionalProperties": false
  17139. },
  17140. "EventSessionNextToolInputDelta": {
  17141. "type": "object",
  17142. "properties": {
  17143. "id": {
  17144. "type": "string"
  17145. },
  17146. "type": {
  17147. "type": "string",
  17148. "enum": ["session.next.tool.input.delta"]
  17149. },
  17150. "properties": {
  17151. "type": "object",
  17152. "properties": {
  17153. "timestamp": {
  17154. "type": "number"
  17155. },
  17156. "sessionID": {
  17157. "type": "string"
  17158. },
  17159. "callID": {
  17160. "type": "string"
  17161. },
  17162. "delta": {
  17163. "type": "string"
  17164. }
  17165. },
  17166. "required": ["timestamp", "sessionID", "callID", "delta"],
  17167. "additionalProperties": false
  17168. }
  17169. },
  17170. "required": ["id", "type", "properties"],
  17171. "additionalProperties": false
  17172. },
  17173. "EventSessionNextToolInputEnded": {
  17174. "type": "object",
  17175. "properties": {
  17176. "id": {
  17177. "type": "string"
  17178. },
  17179. "type": {
  17180. "type": "string",
  17181. "enum": ["session.next.tool.input.ended"]
  17182. },
  17183. "properties": {
  17184. "type": "object",
  17185. "properties": {
  17186. "timestamp": {
  17187. "type": "number"
  17188. },
  17189. "sessionID": {
  17190. "type": "string"
  17191. },
  17192. "callID": {
  17193. "type": "string"
  17194. },
  17195. "text": {
  17196. "type": "string"
  17197. }
  17198. },
  17199. "required": ["timestamp", "sessionID", "callID", "text"],
  17200. "additionalProperties": false
  17201. }
  17202. },
  17203. "required": ["id", "type", "properties"],
  17204. "additionalProperties": false
  17205. },
  17206. "EventSessionNextToolCalled": {
  17207. "type": "object",
  17208. "properties": {
  17209. "id": {
  17210. "type": "string"
  17211. },
  17212. "type": {
  17213. "type": "string",
  17214. "enum": ["session.next.tool.called"]
  17215. },
  17216. "properties": {
  17217. "type": "object",
  17218. "properties": {
  17219. "timestamp": {
  17220. "type": "number"
  17221. },
  17222. "sessionID": {
  17223. "type": "string"
  17224. },
  17225. "callID": {
  17226. "type": "string"
  17227. },
  17228. "tool": {
  17229. "type": "string"
  17230. },
  17231. "input": {
  17232. "type": "object"
  17233. },
  17234. "provider": {
  17235. "type": "object",
  17236. "properties": {
  17237. "executed": {
  17238. "type": "boolean"
  17239. },
  17240. "metadata": {
  17241. "type": "object"
  17242. }
  17243. },
  17244. "required": ["executed"],
  17245. "additionalProperties": false
  17246. }
  17247. },
  17248. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17249. "additionalProperties": false
  17250. }
  17251. },
  17252. "required": ["id", "type", "properties"],
  17253. "additionalProperties": false
  17254. },
  17255. "ToolTextContent": {
  17256. "type": "object",
  17257. "properties": {
  17258. "type": {
  17259. "type": "string",
  17260. "enum": ["text"]
  17261. },
  17262. "text": {
  17263. "type": "string"
  17264. }
  17265. },
  17266. "required": ["type", "text"],
  17267. "additionalProperties": false
  17268. },
  17269. "ToolFileContent": {
  17270. "type": "object",
  17271. "properties": {
  17272. "type": {
  17273. "type": "string",
  17274. "enum": ["file"]
  17275. },
  17276. "uri": {
  17277. "type": "string"
  17278. },
  17279. "mime": {
  17280. "type": "string"
  17281. },
  17282. "name": {
  17283. "type": "string"
  17284. }
  17285. },
  17286. "required": ["type", "uri", "mime"],
  17287. "additionalProperties": false
  17288. },
  17289. "EventSessionNextToolProgress": {
  17290. "type": "object",
  17291. "properties": {
  17292. "id": {
  17293. "type": "string"
  17294. },
  17295. "type": {
  17296. "type": "string",
  17297. "enum": ["session.next.tool.progress"]
  17298. },
  17299. "properties": {
  17300. "type": "object",
  17301. "properties": {
  17302. "timestamp": {
  17303. "type": "number"
  17304. },
  17305. "sessionID": {
  17306. "type": "string"
  17307. },
  17308. "callID": {
  17309. "type": "string"
  17310. },
  17311. "structured": {
  17312. "type": "object"
  17313. },
  17314. "content": {
  17315. "type": "array",
  17316. "items": {
  17317. "anyOf": [
  17318. {
  17319. "$ref": "#/components/schemas/ToolTextContent"
  17320. },
  17321. {
  17322. "$ref": "#/components/schemas/ToolFileContent"
  17323. }
  17324. ]
  17325. }
  17326. }
  17327. },
  17328. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17329. "additionalProperties": false
  17330. }
  17331. },
  17332. "required": ["id", "type", "properties"],
  17333. "additionalProperties": false
  17334. },
  17335. "EventSessionNextToolSuccess": {
  17336. "type": "object",
  17337. "properties": {
  17338. "id": {
  17339. "type": "string"
  17340. },
  17341. "type": {
  17342. "type": "string",
  17343. "enum": ["session.next.tool.success"]
  17344. },
  17345. "properties": {
  17346. "type": "object",
  17347. "properties": {
  17348. "timestamp": {
  17349. "type": "number"
  17350. },
  17351. "sessionID": {
  17352. "type": "string"
  17353. },
  17354. "callID": {
  17355. "type": "string"
  17356. },
  17357. "structured": {
  17358. "type": "object"
  17359. },
  17360. "content": {
  17361. "type": "array",
  17362. "items": {
  17363. "anyOf": [
  17364. {
  17365. "$ref": "#/components/schemas/ToolTextContent"
  17366. },
  17367. {
  17368. "$ref": "#/components/schemas/ToolFileContent"
  17369. }
  17370. ]
  17371. }
  17372. },
  17373. "provider": {
  17374. "type": "object",
  17375. "properties": {
  17376. "executed": {
  17377. "type": "boolean"
  17378. },
  17379. "metadata": {
  17380. "type": "object"
  17381. }
  17382. },
  17383. "required": ["executed"],
  17384. "additionalProperties": false
  17385. }
  17386. },
  17387. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17388. "additionalProperties": false
  17389. }
  17390. },
  17391. "required": ["id", "type", "properties"],
  17392. "additionalProperties": false
  17393. },
  17394. "EventSessionNextToolFailed": {
  17395. "type": "object",
  17396. "properties": {
  17397. "id": {
  17398. "type": "string"
  17399. },
  17400. "type": {
  17401. "type": "string",
  17402. "enum": ["session.next.tool.failed"]
  17403. },
  17404. "properties": {
  17405. "type": "object",
  17406. "properties": {
  17407. "timestamp": {
  17408. "type": "number"
  17409. },
  17410. "sessionID": {
  17411. "type": "string"
  17412. },
  17413. "callID": {
  17414. "type": "string"
  17415. },
  17416. "error": {
  17417. "$ref": "#/components/schemas/SessionErrorUnknown"
  17418. },
  17419. "provider": {
  17420. "type": "object",
  17421. "properties": {
  17422. "executed": {
  17423. "type": "boolean"
  17424. },
  17425. "metadata": {
  17426. "type": "object"
  17427. }
  17428. },
  17429. "required": ["executed"],
  17430. "additionalProperties": false
  17431. }
  17432. },
  17433. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17434. "additionalProperties": false
  17435. }
  17436. },
  17437. "required": ["id", "type", "properties"],
  17438. "additionalProperties": false
  17439. },
  17440. "SessionNextRetry_error": {
  17441. "type": "object",
  17442. "properties": {
  17443. "message": {
  17444. "type": "string"
  17445. },
  17446. "statusCode": {
  17447. "type": "integer",
  17448. "minimum": 0
  17449. },
  17450. "isRetryable": {
  17451. "type": "boolean"
  17452. },
  17453. "responseHeaders": {
  17454. "type": "object",
  17455. "additionalProperties": {
  17456. "type": "string"
  17457. }
  17458. },
  17459. "responseBody": {
  17460. "type": "string"
  17461. },
  17462. "metadata": {
  17463. "type": "object",
  17464. "additionalProperties": {
  17465. "type": "string"
  17466. }
  17467. }
  17468. },
  17469. "required": ["message", "isRetryable"],
  17470. "additionalProperties": false
  17471. },
  17472. "EventSessionNextRetried": {
  17473. "type": "object",
  17474. "properties": {
  17475. "id": {
  17476. "type": "string"
  17477. },
  17478. "type": {
  17479. "type": "string",
  17480. "enum": ["session.next.retried"]
  17481. },
  17482. "properties": {
  17483. "type": "object",
  17484. "properties": {
  17485. "timestamp": {
  17486. "type": "number"
  17487. },
  17488. "sessionID": {
  17489. "type": "string"
  17490. },
  17491. "attempt": {
  17492. "type": "integer",
  17493. "minimum": 0
  17494. },
  17495. "error": {
  17496. "$ref": "#/components/schemas/SessionNextRetry_error"
  17497. }
  17498. },
  17499. "required": ["timestamp", "sessionID", "attempt", "error"],
  17500. "additionalProperties": false
  17501. }
  17502. },
  17503. "required": ["id", "type", "properties"],
  17504. "additionalProperties": false
  17505. },
  17506. "EventSessionNextCompactionStarted": {
  17507. "type": "object",
  17508. "properties": {
  17509. "id": {
  17510. "type": "string"
  17511. },
  17512. "type": {
  17513. "type": "string",
  17514. "enum": ["session.next.compaction.started"]
  17515. },
  17516. "properties": {
  17517. "type": "object",
  17518. "properties": {
  17519. "timestamp": {
  17520. "type": "number"
  17521. },
  17522. "sessionID": {
  17523. "type": "string"
  17524. },
  17525. "reason": {
  17526. "type": "string",
  17527. "enum": ["auto", "manual"]
  17528. }
  17529. },
  17530. "required": ["timestamp", "sessionID", "reason"],
  17531. "additionalProperties": false
  17532. }
  17533. },
  17534. "required": ["id", "type", "properties"],
  17535. "additionalProperties": false
  17536. },
  17537. "EventSessionNextCompactionDelta": {
  17538. "type": "object",
  17539. "properties": {
  17540. "id": {
  17541. "type": "string"
  17542. },
  17543. "type": {
  17544. "type": "string",
  17545. "enum": ["session.next.compaction.delta"]
  17546. },
  17547. "properties": {
  17548. "type": "object",
  17549. "properties": {
  17550. "timestamp": {
  17551. "type": "number"
  17552. },
  17553. "sessionID": {
  17554. "type": "string"
  17555. },
  17556. "text": {
  17557. "type": "string"
  17558. }
  17559. },
  17560. "required": ["timestamp", "sessionID", "text"],
  17561. "additionalProperties": false
  17562. }
  17563. },
  17564. "required": ["id", "type", "properties"],
  17565. "additionalProperties": false
  17566. },
  17567. "EventSessionNextCompactionEnded": {
  17568. "type": "object",
  17569. "properties": {
  17570. "id": {
  17571. "type": "string"
  17572. },
  17573. "type": {
  17574. "type": "string",
  17575. "enum": ["session.next.compaction.ended"]
  17576. },
  17577. "properties": {
  17578. "type": "object",
  17579. "properties": {
  17580. "timestamp": {
  17581. "type": "number"
  17582. },
  17583. "sessionID": {
  17584. "type": "string"
  17585. },
  17586. "text": {
  17587. "type": "string"
  17588. },
  17589. "include": {
  17590. "type": "string"
  17591. }
  17592. },
  17593. "required": ["timestamp", "sessionID", "text"],
  17594. "additionalProperties": false
  17595. }
  17596. },
  17597. "required": ["id", "type", "properties"],
  17598. "additionalProperties": false
  17599. },
  17600. "EventServerConnected": {
  17601. "type": "object",
  17602. "properties": {
  17603. "id": {
  17604. "type": "string"
  17605. },
  17606. "type": {
  17607. "type": "string",
  17608. "enum": ["server.connected"]
  17609. },
  17610. "properties": {
  17611. "type": "object",
  17612. "properties": {}
  17613. }
  17614. },
  17615. "required": ["id", "type", "properties"],
  17616. "additionalProperties": false
  17617. },
  17618. "EventGlobalDisposed": {
  17619. "type": "object",
  17620. "properties": {
  17621. "id": {
  17622. "type": "string"
  17623. },
  17624. "type": {
  17625. "type": "string",
  17626. "enum": ["global.disposed"]
  17627. },
  17628. "properties": {
  17629. "type": "object",
  17630. "properties": {}
  17631. }
  17632. },
  17633. "required": ["id", "type", "properties"],
  17634. "additionalProperties": false
  17635. },
  17636. "SessionInfo": {
  17637. "type": "object",
  17638. "properties": {
  17639. "id": {
  17640. "type": "string"
  17641. },
  17642. "parentID": {
  17643. "type": "string"
  17644. },
  17645. "projectID": {
  17646. "type": "string"
  17647. },
  17648. "workspaceID": {
  17649. "type": "string"
  17650. },
  17651. "path": {
  17652. "type": "string"
  17653. },
  17654. "agent": {
  17655. "type": "string"
  17656. },
  17657. "model": {
  17658. "type": "object",
  17659. "properties": {
  17660. "id": {
  17661. "type": "string"
  17662. },
  17663. "providerID": {
  17664. "type": "string"
  17665. },
  17666. "variant": {
  17667. "type": "string"
  17668. }
  17669. },
  17670. "required": ["id", "providerID", "variant"],
  17671. "additionalProperties": false
  17672. },
  17673. "time": {
  17674. "type": "object",
  17675. "properties": {
  17676. "created": {
  17677. "type": "number"
  17678. },
  17679. "updated": {
  17680. "type": "number"
  17681. },
  17682. "archived": {
  17683. "type": "number"
  17684. }
  17685. },
  17686. "required": ["created", "updated"],
  17687. "additionalProperties": false
  17688. },
  17689. "title": {
  17690. "type": "string"
  17691. }
  17692. },
  17693. "required": ["id", "projectID", "time", "title"],
  17694. "additionalProperties": false
  17695. },
  17696. "SessionDelivery": {
  17697. "type": "string",
  17698. "enum": ["immediate", "deferred"]
  17699. },
  17700. "SessionMessageAgentSwitched": {
  17701. "type": "object",
  17702. "properties": {
  17703. "id": {
  17704. "type": "string"
  17705. },
  17706. "metadata": {
  17707. "type": "object"
  17708. },
  17709. "time": {
  17710. "type": "object",
  17711. "properties": {
  17712. "created": {
  17713. "type": "number"
  17714. }
  17715. },
  17716. "required": ["created"],
  17717. "additionalProperties": false
  17718. },
  17719. "type": {
  17720. "type": "string",
  17721. "enum": ["agent-switched"]
  17722. },
  17723. "agent": {
  17724. "type": "string"
  17725. }
  17726. },
  17727. "required": ["id", "time", "type", "agent"],
  17728. "additionalProperties": false
  17729. },
  17730. "SessionMessageModelSwitched": {
  17731. "type": "object",
  17732. "properties": {
  17733. "id": {
  17734. "type": "string"
  17735. },
  17736. "metadata": {
  17737. "type": "object"
  17738. },
  17739. "time": {
  17740. "type": "object",
  17741. "properties": {
  17742. "created": {
  17743. "type": "number"
  17744. }
  17745. },
  17746. "required": ["created"],
  17747. "additionalProperties": false
  17748. },
  17749. "type": {
  17750. "type": "string",
  17751. "enum": ["model-switched"]
  17752. },
  17753. "model": {
  17754. "type": "object",
  17755. "properties": {
  17756. "id": {
  17757. "type": "string"
  17758. },
  17759. "providerID": {
  17760. "type": "string"
  17761. },
  17762. "variant": {
  17763. "type": "string"
  17764. }
  17765. },
  17766. "required": ["id", "providerID", "variant"],
  17767. "additionalProperties": false
  17768. }
  17769. },
  17770. "required": ["id", "time", "type", "model"],
  17771. "additionalProperties": false
  17772. },
  17773. "SessionMessageUser": {
  17774. "type": "object",
  17775. "properties": {
  17776. "id": {
  17777. "type": "string"
  17778. },
  17779. "metadata": {
  17780. "type": "object"
  17781. },
  17782. "time": {
  17783. "type": "object",
  17784. "properties": {
  17785. "created": {
  17786. "type": "number"
  17787. }
  17788. },
  17789. "required": ["created"],
  17790. "additionalProperties": false
  17791. },
  17792. "text": {
  17793. "type": "string"
  17794. },
  17795. "files": {
  17796. "type": "array",
  17797. "items": {
  17798. "$ref": "#/components/schemas/PromptFileAttachment"
  17799. }
  17800. },
  17801. "agents": {
  17802. "type": "array",
  17803. "items": {
  17804. "$ref": "#/components/schemas/PromptAgentAttachment"
  17805. }
  17806. },
  17807. "type": {
  17808. "type": "string",
  17809. "enum": ["user"]
  17810. }
  17811. },
  17812. "required": ["id", "time", "text", "type"],
  17813. "additionalProperties": false
  17814. },
  17815. "SessionMessageSynthetic": {
  17816. "type": "object",
  17817. "properties": {
  17818. "id": {
  17819. "type": "string"
  17820. },
  17821. "metadata": {
  17822. "type": "object"
  17823. },
  17824. "time": {
  17825. "type": "object",
  17826. "properties": {
  17827. "created": {
  17828. "type": "number"
  17829. }
  17830. },
  17831. "required": ["created"],
  17832. "additionalProperties": false
  17833. },
  17834. "sessionID": {
  17835. "type": "string"
  17836. },
  17837. "text": {
  17838. "type": "string"
  17839. },
  17840. "type": {
  17841. "type": "string",
  17842. "enum": ["synthetic"]
  17843. }
  17844. },
  17845. "required": ["id", "time", "sessionID", "text", "type"],
  17846. "additionalProperties": false
  17847. },
  17848. "SessionMessageShell": {
  17849. "type": "object",
  17850. "properties": {
  17851. "id": {
  17852. "type": "string"
  17853. },
  17854. "metadata": {
  17855. "type": "object"
  17856. },
  17857. "time": {
  17858. "type": "object",
  17859. "properties": {
  17860. "created": {
  17861. "type": "number"
  17862. },
  17863. "completed": {
  17864. "type": "number"
  17865. }
  17866. },
  17867. "required": ["created"],
  17868. "additionalProperties": false
  17869. },
  17870. "type": {
  17871. "type": "string",
  17872. "enum": ["shell"]
  17873. },
  17874. "callID": {
  17875. "type": "string"
  17876. },
  17877. "command": {
  17878. "type": "string"
  17879. },
  17880. "output": {
  17881. "type": "string"
  17882. }
  17883. },
  17884. "required": ["id", "time", "type", "callID", "command", "output"],
  17885. "additionalProperties": false
  17886. },
  17887. "SessionMessageAssistantText": {
  17888. "type": "object",
  17889. "properties": {
  17890. "type": {
  17891. "type": "string",
  17892. "enum": ["text"]
  17893. },
  17894. "text": {
  17895. "type": "string"
  17896. }
  17897. },
  17898. "required": ["type", "text"],
  17899. "additionalProperties": false
  17900. },
  17901. "SessionMessageAssistantReasoning": {
  17902. "type": "object",
  17903. "properties": {
  17904. "type": {
  17905. "type": "string",
  17906. "enum": ["reasoning"]
  17907. },
  17908. "id": {
  17909. "type": "string"
  17910. },
  17911. "text": {
  17912. "type": "string"
  17913. }
  17914. },
  17915. "required": ["type", "id", "text"],
  17916. "additionalProperties": false
  17917. },
  17918. "SessionMessageToolStatePending": {
  17919. "type": "object",
  17920. "properties": {
  17921. "status": {
  17922. "type": "string",
  17923. "enum": ["pending"]
  17924. },
  17925. "input": {
  17926. "type": "string"
  17927. }
  17928. },
  17929. "required": ["status", "input"],
  17930. "additionalProperties": false
  17931. },
  17932. "SessionMessageToolStateRunning": {
  17933. "type": "object",
  17934. "properties": {
  17935. "status": {
  17936. "type": "string",
  17937. "enum": ["running"]
  17938. },
  17939. "input": {
  17940. "type": "object"
  17941. },
  17942. "structured": {
  17943. "type": "object"
  17944. },
  17945. "content": {
  17946. "type": "array",
  17947. "items": {
  17948. "anyOf": [
  17949. {
  17950. "$ref": "#/components/schemas/ToolTextContent"
  17951. },
  17952. {
  17953. "$ref": "#/components/schemas/ToolFileContent"
  17954. }
  17955. ]
  17956. }
  17957. }
  17958. },
  17959. "required": ["status", "input", "structured", "content"],
  17960. "additionalProperties": false
  17961. },
  17962. "SessionMessageToolStateCompleted": {
  17963. "type": "object",
  17964. "properties": {
  17965. "status": {
  17966. "type": "string",
  17967. "enum": ["completed"]
  17968. },
  17969. "input": {
  17970. "type": "object"
  17971. },
  17972. "attachments": {
  17973. "type": "array",
  17974. "items": {
  17975. "$ref": "#/components/schemas/PromptFileAttachment"
  17976. }
  17977. },
  17978. "content": {
  17979. "type": "array",
  17980. "items": {
  17981. "anyOf": [
  17982. {
  17983. "$ref": "#/components/schemas/ToolTextContent"
  17984. },
  17985. {
  17986. "$ref": "#/components/schemas/ToolFileContent"
  17987. }
  17988. ]
  17989. }
  17990. },
  17991. "structured": {
  17992. "type": "object"
  17993. }
  17994. },
  17995. "required": ["status", "input", "content", "structured"],
  17996. "additionalProperties": false
  17997. },
  17998. "SessionMessageToolStateError": {
  17999. "type": "object",
  18000. "properties": {
  18001. "status": {
  18002. "type": "string",
  18003. "enum": ["error"]
  18004. },
  18005. "input": {
  18006. "type": "object"
  18007. },
  18008. "content": {
  18009. "type": "array",
  18010. "items": {
  18011. "anyOf": [
  18012. {
  18013. "$ref": "#/components/schemas/ToolTextContent"
  18014. },
  18015. {
  18016. "$ref": "#/components/schemas/ToolFileContent"
  18017. }
  18018. ]
  18019. }
  18020. },
  18021. "structured": {
  18022. "type": "object"
  18023. },
  18024. "error": {
  18025. "$ref": "#/components/schemas/SessionErrorUnknown"
  18026. }
  18027. },
  18028. "required": ["status", "input", "content", "structured", "error"],
  18029. "additionalProperties": false
  18030. },
  18031. "SessionMessageAssistantTool": {
  18032. "type": "object",
  18033. "properties": {
  18034. "type": {
  18035. "type": "string",
  18036. "enum": ["tool"]
  18037. },
  18038. "id": {
  18039. "type": "string"
  18040. },
  18041. "name": {
  18042. "type": "string"
  18043. },
  18044. "provider": {
  18045. "type": "object",
  18046. "properties": {
  18047. "executed": {
  18048. "type": "boolean"
  18049. },
  18050. "metadata": {
  18051. "type": "object"
  18052. }
  18053. },
  18054. "required": ["executed"],
  18055. "additionalProperties": false
  18056. },
  18057. "state": {
  18058. "anyOf": [
  18059. {
  18060. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18061. },
  18062. {
  18063. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18064. },
  18065. {
  18066. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18067. },
  18068. {
  18069. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18070. }
  18071. ]
  18072. },
  18073. "time": {
  18074. "type": "object",
  18075. "properties": {
  18076. "created": {
  18077. "type": "number"
  18078. },
  18079. "ran": {
  18080. "type": "number"
  18081. },
  18082. "completed": {
  18083. "type": "number"
  18084. },
  18085. "pruned": {
  18086. "type": "number"
  18087. }
  18088. },
  18089. "required": ["created"],
  18090. "additionalProperties": false
  18091. }
  18092. },
  18093. "required": ["type", "id", "name", "state", "time"],
  18094. "additionalProperties": false
  18095. },
  18096. "SessionMessageAssistant": {
  18097. "type": "object",
  18098. "properties": {
  18099. "id": {
  18100. "type": "string"
  18101. },
  18102. "metadata": {
  18103. "type": "object"
  18104. },
  18105. "time": {
  18106. "type": "object",
  18107. "properties": {
  18108. "created": {
  18109. "type": "number"
  18110. },
  18111. "completed": {
  18112. "type": "number"
  18113. }
  18114. },
  18115. "required": ["created"],
  18116. "additionalProperties": false
  18117. },
  18118. "type": {
  18119. "type": "string",
  18120. "enum": ["assistant"]
  18121. },
  18122. "agent": {
  18123. "type": "string"
  18124. },
  18125. "model": {
  18126. "type": "object",
  18127. "properties": {
  18128. "id": {
  18129. "type": "string"
  18130. },
  18131. "providerID": {
  18132. "type": "string"
  18133. },
  18134. "variant": {
  18135. "type": "string"
  18136. }
  18137. },
  18138. "required": ["id", "providerID", "variant"],
  18139. "additionalProperties": false
  18140. },
  18141. "content": {
  18142. "type": "array",
  18143. "items": {
  18144. "anyOf": [
  18145. {
  18146. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18147. },
  18148. {
  18149. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18150. },
  18151. {
  18152. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18153. }
  18154. ]
  18155. }
  18156. },
  18157. "snapshot": {
  18158. "type": "object",
  18159. "properties": {
  18160. "start": {
  18161. "type": "string"
  18162. },
  18163. "end": {
  18164. "type": "string"
  18165. }
  18166. },
  18167. "additionalProperties": false
  18168. },
  18169. "finish": {
  18170. "type": "string"
  18171. },
  18172. "cost": {
  18173. "type": "number"
  18174. },
  18175. "tokens": {
  18176. "type": "object",
  18177. "properties": {
  18178. "input": {
  18179. "type": "number"
  18180. },
  18181. "output": {
  18182. "type": "number"
  18183. },
  18184. "reasoning": {
  18185. "type": "number"
  18186. },
  18187. "cache": {
  18188. "type": "object",
  18189. "properties": {
  18190. "read": {
  18191. "type": "number"
  18192. },
  18193. "write": {
  18194. "type": "number"
  18195. }
  18196. },
  18197. "required": ["read", "write"],
  18198. "additionalProperties": false
  18199. }
  18200. },
  18201. "required": ["input", "output", "reasoning", "cache"],
  18202. "additionalProperties": false
  18203. },
  18204. "error": {
  18205. "$ref": "#/components/schemas/SessionErrorUnknown"
  18206. }
  18207. },
  18208. "required": ["id", "time", "type", "agent", "model", "content"],
  18209. "additionalProperties": false
  18210. },
  18211. "SessionMessageCompaction": {
  18212. "type": "object",
  18213. "properties": {
  18214. "type": {
  18215. "type": "string",
  18216. "enum": ["compaction"]
  18217. },
  18218. "reason": {
  18219. "type": "string",
  18220. "enum": ["auto", "manual"]
  18221. },
  18222. "summary": {
  18223. "type": "string"
  18224. },
  18225. "include": {
  18226. "type": "string"
  18227. },
  18228. "id": {
  18229. "type": "string"
  18230. },
  18231. "metadata": {
  18232. "type": "object"
  18233. },
  18234. "time": {
  18235. "type": "object",
  18236. "properties": {
  18237. "created": {
  18238. "type": "number"
  18239. }
  18240. },
  18241. "required": ["created"],
  18242. "additionalProperties": false
  18243. }
  18244. },
  18245. "required": ["type", "reason", "summary", "id", "time"],
  18246. "additionalProperties": false
  18247. },
  18248. "SessionMessage": {
  18249. "anyOf": [
  18250. {
  18251. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18252. },
  18253. {
  18254. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18255. },
  18256. {
  18257. "$ref": "#/components/schemas/SessionMessageUser"
  18258. },
  18259. {
  18260. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18261. },
  18262. {
  18263. "$ref": "#/components/schemas/SessionMessageShell"
  18264. },
  18265. {
  18266. "$ref": "#/components/schemas/SessionMessageAssistant"
  18267. },
  18268. {
  18269. "$ref": "#/components/schemas/SessionMessageCompaction"
  18270. }
  18271. ]
  18272. },
  18273. "EventTuiToastShow1": {
  18274. "type": "object",
  18275. "properties": {
  18276. "id": {
  18277. "type": "string"
  18278. },
  18279. "type": {
  18280. "type": "string",
  18281. "enum": ["tui.toast.show"]
  18282. },
  18283. "properties": {
  18284. "type": "object",
  18285. "properties": {
  18286. "title": {
  18287. "type": "string"
  18288. },
  18289. "message": {
  18290. "type": "string"
  18291. },
  18292. "variant": {
  18293. "type": "string",
  18294. "enum": ["info", "success", "warning", "error"]
  18295. },
  18296. "duration": {
  18297. "type": "integer",
  18298. "exclusiveMinimum": 0
  18299. }
  18300. },
  18301. "required": ["message", "variant"],
  18302. "additionalProperties": false
  18303. }
  18304. },
  18305. "required": ["id", "type", "properties"],
  18306. "additionalProperties": false
  18307. },
  18308. "BadRequestError": {
  18309. "type": "object",
  18310. "required": ["data", "errors", "success"],
  18311. "properties": {
  18312. "data": {},
  18313. "errors": {
  18314. "type": "array",
  18315. "items": {
  18316. "type": "object",
  18317. "additionalProperties": {}
  18318. }
  18319. },
  18320. "success": {
  18321. "type": "boolean",
  18322. "enum": [false]
  18323. }
  18324. }
  18325. }
  18326. }
  18327. },
  18328. "security": [],
  18329. "tags": [
  18330. {
  18331. "name": "control",
  18332. "description": "Control plane routes."
  18333. },
  18334. {
  18335. "name": "global",
  18336. "description": "Global server routes."
  18337. },
  18338. {
  18339. "name": "event",
  18340. "description": "Instance event stream route."
  18341. },
  18342. {
  18343. "name": "config",
  18344. "description": "Experimental HttpApi config routes."
  18345. },
  18346. {
  18347. "name": "experimental",
  18348. "description": "Experimental HttpApi read-only routes."
  18349. },
  18350. {
  18351. "name": "file",
  18352. "description": "Experimental HttpApi file routes."
  18353. },
  18354. {
  18355. "name": "instance",
  18356. "description": "Experimental HttpApi instance read routes."
  18357. },
  18358. {
  18359. "name": "mcp",
  18360. "description": "Experimental HttpApi MCP routes."
  18361. },
  18362. {
  18363. "name": "project",
  18364. "description": "Experimental HttpApi project routes."
  18365. },
  18366. {
  18367. "name": "pty",
  18368. "description": "Experimental HttpApi PTY routes."
  18369. },
  18370. {
  18371. "name": "question",
  18372. "description": "Question routes."
  18373. },
  18374. {
  18375. "name": "permission",
  18376. "description": "Experimental HttpApi permission routes."
  18377. },
  18378. {
  18379. "name": "provider",
  18380. "description": "Experimental HttpApi provider routes."
  18381. },
  18382. {
  18383. "name": "session",
  18384. "description": "Experimental HttpApi session routes."
  18385. },
  18386. {
  18387. "name": "sync",
  18388. "description": "Experimental HttpApi sync routes."
  18389. },
  18390. {
  18391. "name": "v2",
  18392. "description": "Experimental v2 routes."
  18393. },
  18394. {
  18395. "name": "v2 messages",
  18396. "description": "Experimental v2 message routes."
  18397. },
  18398. {
  18399. "name": "tui",
  18400. "description": "Experimental HttpApi TUI routes."
  18401. },
  18402. {
  18403. "name": "workspace",
  18404. "description": "Experimental HttpApi workspace routes."
  18405. },
  18406. {
  18407. "name": "pty",
  18408. "description": "PTY websocket route."
  18409. }
  18410. ]
  18411. }