openapi.json 539 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "Bad request",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "$ref": "#/components/schemas/BadRequestError"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "description": "Set authentication credentials",
  47. "summary": "Set auth credentials",
  48. "requestBody": {
  49. "content": {
  50. "application/json": {
  51. "schema": {
  52. "$ref": "#/components/schemas/Auth"
  53. }
  54. }
  55. }
  56. },
  57. "x-codeSamples": [
  58. {
  59. "lang": "js",
  60. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  61. }
  62. ]
  63. },
  64. "delete": {
  65. "tags": ["control"],
  66. "operationId": "auth.remove",
  67. "parameters": [
  68. {
  69. "name": "providerID",
  70. "in": "path",
  71. "schema": {
  72. "type": "string"
  73. },
  74. "required": true
  75. }
  76. ],
  77. "responses": {
  78. "200": {
  79. "description": "Successfully removed authentication credentials",
  80. "content": {
  81. "application/json": {
  82. "schema": {
  83. "type": "boolean",
  84. "description": "Successfully removed authentication credentials"
  85. }
  86. }
  87. }
  88. },
  89. "400": {
  90. "description": "Bad request",
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "$ref": "#/components/schemas/BadRequestError"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "description": "Remove authentication credentials",
  101. "summary": "Remove auth credentials",
  102. "x-codeSamples": [
  103. {
  104. "lang": "js",
  105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  106. }
  107. ]
  108. }
  109. },
  110. "/log": {
  111. "post": {
  112. "tags": ["control"],
  113. "operationId": "app.log",
  114. "parameters": [
  115. {
  116. "name": "directory",
  117. "in": "query",
  118. "schema": {
  119. "type": "string"
  120. },
  121. "required": false
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "schema": {
  127. "type": "string"
  128. },
  129. "required": false
  130. }
  131. ],
  132. "responses": {
  133. "200": {
  134. "description": "Log entry written successfully",
  135. "content": {
  136. "application/json": {
  137. "schema": {
  138. "type": "boolean",
  139. "description": "Log entry written successfully"
  140. }
  141. }
  142. }
  143. },
  144. "400": {
  145. "description": "Bad request",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "#/components/schemas/BadRequestError"
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "description": "Write a log entry to the server logs with specified level and metadata.",
  156. "summary": "Write log",
  157. "requestBody": {
  158. "content": {
  159. "application/json": {
  160. "schema": {
  161. "type": "object",
  162. "properties": {
  163. "service": {
  164. "type": "string",
  165. "description": "Service name for the log entry"
  166. },
  167. "level": {
  168. "type": "string",
  169. "enum": ["debug", "info", "error", "warn"],
  170. "description": "Log level"
  171. },
  172. "message": {
  173. "type": "string",
  174. "description": "Log message"
  175. },
  176. "extra": {
  177. "type": "object"
  178. }
  179. },
  180. "required": ["service", "level", "message"],
  181. "additionalProperties": false
  182. }
  183. }
  184. }
  185. },
  186. "x-codeSamples": [
  187. {
  188. "lang": "js",
  189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  190. }
  191. ]
  192. }
  193. },
  194. "/global/health": {
  195. "get": {
  196. "tags": ["global"],
  197. "operationId": "global.health",
  198. "parameters": [],
  199. "responses": {
  200. "200": {
  201. "description": "Health information",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "properties": {
  207. "healthy": {
  208. "type": "boolean",
  209. "enum": [true]
  210. },
  211. "version": {
  212. "type": "string"
  213. }
  214. },
  215. "required": ["healthy", "version"],
  216. "additionalProperties": false,
  217. "description": "Health information"
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "description": "Get health information about the OpenCode server.",
  224. "summary": "Get health",
  225. "x-codeSamples": [
  226. {
  227. "lang": "js",
  228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  229. }
  230. ]
  231. }
  232. },
  233. "/global/event": {
  234. "get": {
  235. "tags": ["global"],
  236. "operationId": "global.event",
  237. "parameters": [],
  238. "responses": {
  239. "200": {
  240. "description": "Event stream",
  241. "content": {
  242. "text/event-stream": {
  243. "schema": {
  244. "$ref": "#/components/schemas/GlobalEvent"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  251. "summary": "Get global events",
  252. "x-codeSamples": [
  253. {
  254. "lang": "js",
  255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  256. }
  257. ]
  258. }
  259. },
  260. "/global/config": {
  261. "get": {
  262. "tags": ["global"],
  263. "operationId": "global.config.get",
  264. "parameters": [],
  265. "responses": {
  266. "200": {
  267. "description": "Get global config info",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "$ref": "#/components/schemas/Config"
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  278. "summary": "Get global configuration",
  279. "x-codeSamples": [
  280. {
  281. "lang": "js",
  282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  283. }
  284. ]
  285. },
  286. "patch": {
  287. "tags": ["global"],
  288. "operationId": "global.config.update",
  289. "parameters": [],
  290. "responses": {
  291. "200": {
  292. "description": "Successfully updated global config",
  293. "content": {
  294. "application/json": {
  295. "schema": {
  296. "$ref": "#/components/schemas/Config"
  297. }
  298. }
  299. }
  300. },
  301. "400": {
  302. "description": "Bad request",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "$ref": "#/components/schemas/BadRequestError"
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "description": "Update global OpenCode configuration settings and preferences.",
  313. "summary": "Update global configuration",
  314. "requestBody": {
  315. "content": {
  316. "application/json": {
  317. "schema": {
  318. "$ref": "#/components/schemas/Config"
  319. }
  320. }
  321. }
  322. },
  323. "x-codeSamples": [
  324. {
  325. "lang": "js",
  326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  327. }
  328. ]
  329. }
  330. },
  331. "/global/dispose": {
  332. "post": {
  333. "tags": ["global"],
  334. "operationId": "global.dispose",
  335. "parameters": [],
  336. "responses": {
  337. "200": {
  338. "description": "Global disposed",
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "boolean",
  343. "description": "Global disposed"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  350. "summary": "Dispose instance",
  351. "x-codeSamples": [
  352. {
  353. "lang": "js",
  354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  355. }
  356. ]
  357. }
  358. },
  359. "/global/upgrade": {
  360. "post": {
  361. "tags": ["global"],
  362. "operationId": "global.upgrade",
  363. "parameters": [],
  364. "responses": {
  365. "200": {
  366. "description": "Upgrade result",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "anyOf": [
  371. {
  372. "type": "object",
  373. "properties": {
  374. "success": {
  375. "type": "boolean",
  376. "enum": [true]
  377. },
  378. "version": {
  379. "type": "string"
  380. }
  381. },
  382. "required": ["success", "version"],
  383. "additionalProperties": false
  384. },
  385. {
  386. "type": "object",
  387. "properties": {
  388. "success": {
  389. "type": "boolean",
  390. "enum": [false]
  391. },
  392. "error": {
  393. "type": "string"
  394. }
  395. },
  396. "required": ["success", "error"],
  397. "additionalProperties": false
  398. }
  399. ],
  400. "description": "Upgrade result"
  401. }
  402. }
  403. }
  404. },
  405. "400": {
  406. "description": "Bad request",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "$ref": "#/components/schemas/BadRequestError"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "description": "Upgrade opencode to the specified version or latest if not specified.",
  417. "summary": "Upgrade opencode",
  418. "requestBody": {
  419. "content": {
  420. "application/json": {
  421. "schema": {
  422. "type": "object",
  423. "properties": {
  424. "target": {
  425. "type": "string"
  426. }
  427. },
  428. "additionalProperties": false
  429. }
  430. }
  431. }
  432. },
  433. "x-codeSamples": [
  434. {
  435. "lang": "js",
  436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  437. }
  438. ]
  439. }
  440. },
  441. "/event": {
  442. "get": {
  443. "tags": ["event"],
  444. "operationId": "event.subscribe",
  445. "parameters": [
  446. {
  447. "name": "directory",
  448. "in": "query",
  449. "schema": {
  450. "type": "string"
  451. },
  452. "required": false
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "schema": {
  458. "type": "string"
  459. },
  460. "required": false
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "Event stream",
  466. "content": {
  467. "text/event-stream": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Event"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "description": "Get events",
  476. "summary": "Subscribe to events",
  477. "x-codeSamples": [
  478. {
  479. "lang": "js",
  480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  481. }
  482. ]
  483. }
  484. },
  485. "/config": {
  486. "get": {
  487. "tags": ["config"],
  488. "operationId": "config.get",
  489. "parameters": [
  490. {
  491. "name": "directory",
  492. "in": "query",
  493. "schema": {
  494. "type": "string"
  495. },
  496. "required": false
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "schema": {
  502. "type": "string"
  503. },
  504. "required": false
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "Get config info",
  510. "content": {
  511. "application/json": {
  512. "schema": {
  513. "$ref": "#/components/schemas/Config"
  514. }
  515. }
  516. }
  517. }
  518. },
  519. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  520. "summary": "Get configuration",
  521. "x-codeSamples": [
  522. {
  523. "lang": "js",
  524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  525. }
  526. ]
  527. },
  528. "patch": {
  529. "tags": ["config"],
  530. "operationId": "config.update",
  531. "parameters": [
  532. {
  533. "name": "directory",
  534. "in": "query",
  535. "schema": {
  536. "type": "string"
  537. },
  538. "required": false
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "schema": {
  544. "type": "string"
  545. },
  546. "required": false
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "Successfully updated config",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "$ref": "#/components/schemas/Config"
  556. }
  557. }
  558. }
  559. },
  560. "400": {
  561. "description": "Bad request",
  562. "content": {
  563. "application/json": {
  564. "schema": {
  565. "$ref": "#/components/schemas/BadRequestError"
  566. }
  567. }
  568. }
  569. }
  570. },
  571. "description": "Update OpenCode configuration settings and preferences.",
  572. "summary": "Update configuration",
  573. "requestBody": {
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/Config"
  578. }
  579. }
  580. }
  581. },
  582. "x-codeSamples": [
  583. {
  584. "lang": "js",
  585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  586. }
  587. ]
  588. }
  589. },
  590. "/config/providers": {
  591. "get": {
  592. "tags": ["config"],
  593. "operationId": "config.providers",
  594. "parameters": [
  595. {
  596. "name": "directory",
  597. "in": "query",
  598. "schema": {
  599. "type": "string"
  600. },
  601. "required": false
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "schema": {
  607. "type": "string"
  608. },
  609. "required": false
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "List of providers",
  615. "content": {
  616. "application/json": {
  617. "schema": {
  618. "type": "object",
  619. "properties": {
  620. "providers": {
  621. "type": "array",
  622. "items": {
  623. "$ref": "#/components/schemas/Provider"
  624. }
  625. },
  626. "default": {
  627. "type": "object",
  628. "additionalProperties": {
  629. "type": "string"
  630. }
  631. }
  632. },
  633. "required": ["providers", "default"],
  634. "additionalProperties": false,
  635. "description": "List of providers"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "description": "Get a list of all configured AI providers and their default models.",
  642. "summary": "List config providers",
  643. "x-codeSamples": [
  644. {
  645. "lang": "js",
  646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  647. }
  648. ]
  649. }
  650. },
  651. "/experimental/console": {
  652. "get": {
  653. "tags": ["experimental"],
  654. "operationId": "experimental.console.get",
  655. "parameters": [
  656. {
  657. "name": "directory",
  658. "in": "query",
  659. "schema": {
  660. "type": "string"
  661. },
  662. "required": false
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "schema": {
  668. "type": "string"
  669. },
  670. "required": false
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "Active Console provider metadata",
  676. "content": {
  677. "application/json": {
  678. "schema": {
  679. "$ref": "#/components/schemas/ConsoleState"
  680. }
  681. }
  682. }
  683. },
  684. "500": {
  685. "description": "InternalServerError",
  686. "content": {
  687. "application/json": {
  688. "schema": {
  689. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  696. "summary": "Get active Console provider metadata",
  697. "x-codeSamples": [
  698. {
  699. "lang": "js",
  700. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  701. }
  702. ]
  703. }
  704. },
  705. "/experimental/console/orgs": {
  706. "get": {
  707. "tags": ["experimental"],
  708. "operationId": "experimental.console.listOrgs",
  709. "parameters": [
  710. {
  711. "name": "directory",
  712. "in": "query",
  713. "schema": {
  714. "type": "string"
  715. },
  716. "required": false
  717. },
  718. {
  719. "name": "workspace",
  720. "in": "query",
  721. "schema": {
  722. "type": "string"
  723. },
  724. "required": false
  725. }
  726. ],
  727. "responses": {
  728. "200": {
  729. "description": "Switchable Console orgs",
  730. "content": {
  731. "application/json": {
  732. "schema": {
  733. "type": "object",
  734. "properties": {
  735. "orgs": {
  736. "type": "array",
  737. "items": {
  738. "type": "object",
  739. "properties": {
  740. "accountID": {
  741. "type": "string"
  742. },
  743. "accountEmail": {
  744. "type": "string"
  745. },
  746. "accountUrl": {
  747. "type": "string"
  748. },
  749. "orgID": {
  750. "type": "string"
  751. },
  752. "orgName": {
  753. "type": "string"
  754. },
  755. "active": {
  756. "type": "boolean"
  757. }
  758. },
  759. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  760. "additionalProperties": false
  761. }
  762. }
  763. },
  764. "required": ["orgs"],
  765. "additionalProperties": false,
  766. "description": "Switchable Console orgs"
  767. }
  768. }
  769. }
  770. },
  771. "500": {
  772. "description": "InternalServerError",
  773. "content": {
  774. "application/json": {
  775. "schema": {
  776. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  777. }
  778. }
  779. }
  780. }
  781. },
  782. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  783. "summary": "List switchable Console orgs",
  784. "x-codeSamples": [
  785. {
  786. "lang": "js",
  787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  788. }
  789. ]
  790. }
  791. },
  792. "/experimental/console/switch": {
  793. "post": {
  794. "tags": ["experimental"],
  795. "operationId": "experimental.console.switchOrg",
  796. "parameters": [
  797. {
  798. "name": "directory",
  799. "in": "query",
  800. "schema": {
  801. "type": "string"
  802. },
  803. "required": false
  804. },
  805. {
  806. "name": "workspace",
  807. "in": "query",
  808. "schema": {
  809. "type": "string"
  810. },
  811. "required": false
  812. }
  813. ],
  814. "responses": {
  815. "200": {
  816. "description": "Switch success",
  817. "content": {
  818. "application/json": {
  819. "schema": {
  820. "type": "boolean",
  821. "description": "Switch success"
  822. }
  823. }
  824. }
  825. }
  826. },
  827. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  828. "summary": "Switch active Console org",
  829. "requestBody": {
  830. "content": {
  831. "application/json": {
  832. "schema": {
  833. "type": "object",
  834. "properties": {
  835. "accountID": {
  836. "type": "string"
  837. },
  838. "orgID": {
  839. "type": "string"
  840. }
  841. },
  842. "required": ["accountID", "orgID"],
  843. "additionalProperties": false
  844. }
  845. }
  846. }
  847. },
  848. "x-codeSamples": [
  849. {
  850. "lang": "js",
  851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  852. }
  853. ]
  854. }
  855. },
  856. "/experimental/tool": {
  857. "get": {
  858. "tags": ["experimental"],
  859. "operationId": "tool.list",
  860. "parameters": [
  861. {
  862. "name": "directory",
  863. "in": "query",
  864. "schema": {
  865. "type": "string"
  866. },
  867. "required": false
  868. },
  869. {
  870. "name": "workspace",
  871. "in": "query",
  872. "schema": {
  873. "type": "string"
  874. },
  875. "required": false
  876. },
  877. {
  878. "name": "provider",
  879. "in": "query",
  880. "schema": {
  881. "type": "string"
  882. },
  883. "required": true
  884. },
  885. {
  886. "name": "model",
  887. "in": "query",
  888. "schema": {
  889. "type": "string"
  890. },
  891. "required": true
  892. }
  893. ],
  894. "responses": {
  895. "200": {
  896. "description": "Tools",
  897. "content": {
  898. "application/json": {
  899. "schema": {
  900. "$ref": "#/components/schemas/ToolList"
  901. }
  902. }
  903. }
  904. },
  905. "400": {
  906. "description": "Bad request",
  907. "content": {
  908. "application/json": {
  909. "schema": {
  910. "$ref": "#/components/schemas/BadRequestError"
  911. }
  912. }
  913. }
  914. }
  915. },
  916. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  917. "summary": "List tools",
  918. "x-codeSamples": [
  919. {
  920. "lang": "js",
  921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  922. }
  923. ]
  924. }
  925. },
  926. "/experimental/tool/ids": {
  927. "get": {
  928. "tags": ["experimental"],
  929. "operationId": "tool.ids",
  930. "parameters": [
  931. {
  932. "name": "directory",
  933. "in": "query",
  934. "schema": {
  935. "type": "string"
  936. },
  937. "required": false
  938. },
  939. {
  940. "name": "workspace",
  941. "in": "query",
  942. "schema": {
  943. "type": "string"
  944. },
  945. "required": false
  946. }
  947. ],
  948. "responses": {
  949. "200": {
  950. "description": "Tool IDs",
  951. "content": {
  952. "application/json": {
  953. "schema": {
  954. "$ref": "#/components/schemas/ToolIDs"
  955. }
  956. }
  957. }
  958. },
  959. "400": {
  960. "description": "Bad request",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/BadRequestError"
  965. }
  966. }
  967. }
  968. }
  969. },
  970. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  971. "summary": "List tool IDs",
  972. "x-codeSamples": [
  973. {
  974. "lang": "js",
  975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  976. }
  977. ]
  978. }
  979. },
  980. "/experimental/worktree": {
  981. "get": {
  982. "tags": ["experimental"],
  983. "operationId": "worktree.list",
  984. "parameters": [
  985. {
  986. "name": "directory",
  987. "in": "query",
  988. "schema": {
  989. "type": "string"
  990. },
  991. "required": false
  992. },
  993. {
  994. "name": "workspace",
  995. "in": "query",
  996. "schema": {
  997. "type": "string"
  998. },
  999. "required": false
  1000. }
  1001. ],
  1002. "responses": {
  1003. "200": {
  1004. "description": "List of worktree directories",
  1005. "content": {
  1006. "application/json": {
  1007. "schema": {
  1008. "type": "array",
  1009. "items": {
  1010. "type": "string"
  1011. },
  1012. "description": "List of worktree directories"
  1013. }
  1014. }
  1015. }
  1016. },
  1017. "400": {
  1018. "description": "WorktreeError",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/WorktreeError"
  1023. }
  1024. }
  1025. }
  1026. }
  1027. },
  1028. "description": "List all sandbox worktrees for the current project.",
  1029. "summary": "List worktrees",
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1034. }
  1035. ]
  1036. },
  1037. "post": {
  1038. "tags": ["experimental"],
  1039. "operationId": "worktree.create",
  1040. "parameters": [
  1041. {
  1042. "name": "directory",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. },
  1049. {
  1050. "name": "workspace",
  1051. "in": "query",
  1052. "schema": {
  1053. "type": "string"
  1054. },
  1055. "required": false
  1056. }
  1057. ],
  1058. "responses": {
  1059. "200": {
  1060. "description": "Worktree created",
  1061. "content": {
  1062. "application/json": {
  1063. "schema": {
  1064. "$ref": "#/components/schemas/Worktree"
  1065. }
  1066. }
  1067. }
  1068. },
  1069. "400": {
  1070. "description": "WorktreeError",
  1071. "content": {
  1072. "application/json": {
  1073. "schema": {
  1074. "$ref": "#/components/schemas/WorktreeError"
  1075. }
  1076. }
  1077. }
  1078. }
  1079. },
  1080. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1081. "summary": "Create worktree",
  1082. "requestBody": {
  1083. "content": {
  1084. "application/json": {
  1085. "schema": {
  1086. "$ref": "#/components/schemas/WorktreeCreateInput"
  1087. }
  1088. }
  1089. }
  1090. },
  1091. "x-codeSamples": [
  1092. {
  1093. "lang": "js",
  1094. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1095. }
  1096. ]
  1097. },
  1098. "delete": {
  1099. "tags": ["experimental"],
  1100. "operationId": "worktree.remove",
  1101. "parameters": [
  1102. {
  1103. "name": "directory",
  1104. "in": "query",
  1105. "schema": {
  1106. "type": "string"
  1107. },
  1108. "required": false
  1109. },
  1110. {
  1111. "name": "workspace",
  1112. "in": "query",
  1113. "schema": {
  1114. "type": "string"
  1115. },
  1116. "required": false
  1117. }
  1118. ],
  1119. "responses": {
  1120. "200": {
  1121. "description": "Worktree removed",
  1122. "content": {
  1123. "application/json": {
  1124. "schema": {
  1125. "type": "boolean",
  1126. "description": "Worktree removed"
  1127. }
  1128. }
  1129. }
  1130. },
  1131. "400": {
  1132. "description": "WorktreeError",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/WorktreeError"
  1137. }
  1138. }
  1139. }
  1140. }
  1141. },
  1142. "description": "Remove a git worktree and delete its branch.",
  1143. "summary": "Remove worktree",
  1144. "requestBody": {
  1145. "content": {
  1146. "application/json": {
  1147. "schema": {
  1148. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "x-codeSamples": [
  1154. {
  1155. "lang": "js",
  1156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1157. }
  1158. ]
  1159. }
  1160. },
  1161. "/experimental/worktree/reset": {
  1162. "post": {
  1163. "tags": ["experimental"],
  1164. "operationId": "worktree.reset",
  1165. "parameters": [
  1166. {
  1167. "name": "directory",
  1168. "in": "query",
  1169. "schema": {
  1170. "type": "string"
  1171. },
  1172. "required": false
  1173. },
  1174. {
  1175. "name": "workspace",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. }
  1182. ],
  1183. "responses": {
  1184. "200": {
  1185. "description": "Worktree reset",
  1186. "content": {
  1187. "application/json": {
  1188. "schema": {
  1189. "type": "boolean",
  1190. "description": "Worktree reset"
  1191. }
  1192. }
  1193. }
  1194. },
  1195. "400": {
  1196. "description": "WorktreeError",
  1197. "content": {
  1198. "application/json": {
  1199. "schema": {
  1200. "$ref": "#/components/schemas/WorktreeError"
  1201. }
  1202. }
  1203. }
  1204. }
  1205. },
  1206. "description": "Reset a worktree branch to the primary default branch.",
  1207. "summary": "Reset worktree",
  1208. "requestBody": {
  1209. "content": {
  1210. "application/json": {
  1211. "schema": {
  1212. "$ref": "#/components/schemas/WorktreeResetInput"
  1213. }
  1214. }
  1215. }
  1216. },
  1217. "x-codeSamples": [
  1218. {
  1219. "lang": "js",
  1220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1221. }
  1222. ]
  1223. }
  1224. },
  1225. "/experimental/session": {
  1226. "get": {
  1227. "tags": ["experimental"],
  1228. "operationId": "experimental.session.list",
  1229. "parameters": [
  1230. {
  1231. "name": "directory",
  1232. "in": "query",
  1233. "schema": {
  1234. "type": "string"
  1235. },
  1236. "required": false
  1237. },
  1238. {
  1239. "name": "workspace",
  1240. "in": "query",
  1241. "schema": {
  1242. "type": "string"
  1243. },
  1244. "required": false
  1245. },
  1246. {
  1247. "name": "roots",
  1248. "in": "query",
  1249. "schema": {
  1250. "anyOf": [
  1251. {
  1252. "type": "boolean"
  1253. },
  1254. {
  1255. "type": "string",
  1256. "enum": ["true", "false"]
  1257. }
  1258. ]
  1259. },
  1260. "required": false
  1261. },
  1262. {
  1263. "name": "start",
  1264. "in": "query",
  1265. "schema": {
  1266. "type": "number"
  1267. },
  1268. "required": false
  1269. },
  1270. {
  1271. "name": "cursor",
  1272. "in": "query",
  1273. "schema": {
  1274. "type": "number"
  1275. },
  1276. "required": false
  1277. },
  1278. {
  1279. "name": "search",
  1280. "in": "query",
  1281. "schema": {
  1282. "type": "string"
  1283. },
  1284. "required": false
  1285. },
  1286. {
  1287. "name": "limit",
  1288. "in": "query",
  1289. "schema": {
  1290. "type": "number"
  1291. },
  1292. "required": false
  1293. },
  1294. {
  1295. "name": "archived",
  1296. "in": "query",
  1297. "schema": {
  1298. "anyOf": [
  1299. {
  1300. "type": "boolean"
  1301. },
  1302. {
  1303. "type": "string",
  1304. "enum": ["true", "false"]
  1305. }
  1306. ]
  1307. },
  1308. "required": false
  1309. }
  1310. ],
  1311. "responses": {
  1312. "200": {
  1313. "description": "List of sessions",
  1314. "content": {
  1315. "application/json": {
  1316. "schema": {
  1317. "type": "array",
  1318. "items": {
  1319. "$ref": "#/components/schemas/GlobalSession"
  1320. },
  1321. "description": "List of sessions"
  1322. }
  1323. }
  1324. }
  1325. }
  1326. },
  1327. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1328. "summary": "List sessions",
  1329. "x-codeSamples": [
  1330. {
  1331. "lang": "js",
  1332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1333. }
  1334. ]
  1335. }
  1336. },
  1337. "/experimental/resource": {
  1338. "get": {
  1339. "tags": ["experimental"],
  1340. "operationId": "experimental.resource.list",
  1341. "parameters": [
  1342. {
  1343. "name": "directory",
  1344. "in": "query",
  1345. "schema": {
  1346. "type": "string"
  1347. },
  1348. "required": false
  1349. },
  1350. {
  1351. "name": "workspace",
  1352. "in": "query",
  1353. "schema": {
  1354. "type": "string"
  1355. },
  1356. "required": false
  1357. }
  1358. ],
  1359. "responses": {
  1360. "200": {
  1361. "description": "MCP resources",
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "type": "object",
  1366. "additionalProperties": {
  1367. "$ref": "#/components/schemas/McpResource"
  1368. },
  1369. "description": "MCP resources"
  1370. }
  1371. }
  1372. }
  1373. }
  1374. },
  1375. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1376. "summary": "Get MCP resources",
  1377. "x-codeSamples": [
  1378. {
  1379. "lang": "js",
  1380. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1381. }
  1382. ]
  1383. }
  1384. },
  1385. "/find": {
  1386. "get": {
  1387. "tags": ["file"],
  1388. "operationId": "find.text",
  1389. "parameters": [
  1390. {
  1391. "name": "directory",
  1392. "in": "query",
  1393. "schema": {
  1394. "type": "string"
  1395. },
  1396. "required": false
  1397. },
  1398. {
  1399. "name": "workspace",
  1400. "in": "query",
  1401. "schema": {
  1402. "type": "string"
  1403. },
  1404. "required": false
  1405. },
  1406. {
  1407. "name": "pattern",
  1408. "in": "query",
  1409. "schema": {
  1410. "type": "string"
  1411. },
  1412. "required": true
  1413. }
  1414. ],
  1415. "responses": {
  1416. "200": {
  1417. "description": "Matches",
  1418. "content": {
  1419. "application/json": {
  1420. "schema": {
  1421. "type": "array",
  1422. "items": {
  1423. "type": "object",
  1424. "properties": {
  1425. "path": {
  1426. "type": "object",
  1427. "properties": {
  1428. "text": {
  1429. "type": "string"
  1430. }
  1431. },
  1432. "required": ["text"],
  1433. "additionalProperties": false
  1434. },
  1435. "lines": {
  1436. "type": "object",
  1437. "properties": {
  1438. "text": {
  1439. "type": "string"
  1440. }
  1441. },
  1442. "required": ["text"],
  1443. "additionalProperties": false
  1444. },
  1445. "line_number": {
  1446. "type": "integer",
  1447. "minimum": 0
  1448. },
  1449. "absolute_offset": {
  1450. "type": "integer",
  1451. "minimum": 0
  1452. },
  1453. "submatches": {
  1454. "type": "array",
  1455. "items": {
  1456. "type": "object",
  1457. "properties": {
  1458. "match": {
  1459. "type": "object",
  1460. "properties": {
  1461. "text": {
  1462. "type": "string"
  1463. }
  1464. },
  1465. "required": ["text"],
  1466. "additionalProperties": false
  1467. },
  1468. "start": {
  1469. "type": "integer",
  1470. "minimum": 0
  1471. },
  1472. "end": {
  1473. "type": "integer",
  1474. "minimum": 0
  1475. }
  1476. },
  1477. "required": ["match", "start", "end"],
  1478. "additionalProperties": false
  1479. }
  1480. }
  1481. },
  1482. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1483. "additionalProperties": false
  1484. },
  1485. "description": "Matches"
  1486. }
  1487. }
  1488. }
  1489. }
  1490. },
  1491. "description": "Search for text patterns across files in the project using ripgrep.",
  1492. "summary": "Find text",
  1493. "x-codeSamples": [
  1494. {
  1495. "lang": "js",
  1496. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1497. }
  1498. ]
  1499. }
  1500. },
  1501. "/find/file": {
  1502. "get": {
  1503. "tags": ["file"],
  1504. "operationId": "find.files",
  1505. "parameters": [
  1506. {
  1507. "name": "directory",
  1508. "in": "query",
  1509. "schema": {
  1510. "type": "string"
  1511. },
  1512. "required": false
  1513. },
  1514. {
  1515. "name": "workspace",
  1516. "in": "query",
  1517. "schema": {
  1518. "type": "string"
  1519. },
  1520. "required": false
  1521. },
  1522. {
  1523. "name": "query",
  1524. "in": "query",
  1525. "schema": {
  1526. "type": "string"
  1527. },
  1528. "required": true
  1529. },
  1530. {
  1531. "name": "dirs",
  1532. "in": "query",
  1533. "schema": {
  1534. "type": "string",
  1535. "enum": ["true", "false"]
  1536. },
  1537. "required": false
  1538. },
  1539. {
  1540. "name": "type",
  1541. "in": "query",
  1542. "schema": {
  1543. "type": "string",
  1544. "enum": ["file", "directory"]
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "limit",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "integer",
  1553. "minimum": 1,
  1554. "maximum": 200
  1555. },
  1556. "required": false
  1557. }
  1558. ],
  1559. "responses": {
  1560. "200": {
  1561. "description": "File paths",
  1562. "content": {
  1563. "application/json": {
  1564. "schema": {
  1565. "type": "array",
  1566. "items": {
  1567. "type": "string"
  1568. },
  1569. "description": "File paths"
  1570. }
  1571. }
  1572. }
  1573. }
  1574. },
  1575. "description": "Search for files or directories by name or pattern in the project directory.",
  1576. "summary": "Find files",
  1577. "x-codeSamples": [
  1578. {
  1579. "lang": "js",
  1580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1581. }
  1582. ]
  1583. }
  1584. },
  1585. "/find/symbol": {
  1586. "get": {
  1587. "tags": ["file"],
  1588. "operationId": "find.symbols",
  1589. "parameters": [
  1590. {
  1591. "name": "directory",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": false
  1597. },
  1598. {
  1599. "name": "workspace",
  1600. "in": "query",
  1601. "schema": {
  1602. "type": "string"
  1603. },
  1604. "required": false
  1605. },
  1606. {
  1607. "name": "query",
  1608. "in": "query",
  1609. "schema": {
  1610. "type": "string"
  1611. },
  1612. "required": true
  1613. }
  1614. ],
  1615. "responses": {
  1616. "200": {
  1617. "description": "Symbols",
  1618. "content": {
  1619. "application/json": {
  1620. "schema": {
  1621. "type": "array",
  1622. "items": {
  1623. "$ref": "#/components/schemas/Symbol"
  1624. },
  1625. "description": "Symbols"
  1626. }
  1627. }
  1628. }
  1629. }
  1630. },
  1631. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1632. "summary": "Find symbols",
  1633. "x-codeSamples": [
  1634. {
  1635. "lang": "js",
  1636. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1637. }
  1638. ]
  1639. }
  1640. },
  1641. "/file": {
  1642. "get": {
  1643. "tags": ["file"],
  1644. "operationId": "file.list",
  1645. "parameters": [
  1646. {
  1647. "name": "directory",
  1648. "in": "query",
  1649. "schema": {
  1650. "type": "string"
  1651. },
  1652. "required": false
  1653. },
  1654. {
  1655. "name": "workspace",
  1656. "in": "query",
  1657. "schema": {
  1658. "type": "string"
  1659. },
  1660. "required": false
  1661. },
  1662. {
  1663. "name": "path",
  1664. "in": "query",
  1665. "schema": {
  1666. "type": "string"
  1667. },
  1668. "required": true
  1669. }
  1670. ],
  1671. "responses": {
  1672. "200": {
  1673. "description": "Files and directories",
  1674. "content": {
  1675. "application/json": {
  1676. "schema": {
  1677. "type": "array",
  1678. "items": {
  1679. "$ref": "#/components/schemas/FileNode"
  1680. },
  1681. "description": "Files and directories"
  1682. }
  1683. }
  1684. }
  1685. }
  1686. },
  1687. "description": "List files and directories in a specified path.",
  1688. "summary": "List files",
  1689. "x-codeSamples": [
  1690. {
  1691. "lang": "js",
  1692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1693. }
  1694. ]
  1695. }
  1696. },
  1697. "/file/content": {
  1698. "get": {
  1699. "tags": ["file"],
  1700. "operationId": "file.read",
  1701. "parameters": [
  1702. {
  1703. "name": "directory",
  1704. "in": "query",
  1705. "schema": {
  1706. "type": "string"
  1707. },
  1708. "required": false
  1709. },
  1710. {
  1711. "name": "workspace",
  1712. "in": "query",
  1713. "schema": {
  1714. "type": "string"
  1715. },
  1716. "required": false
  1717. },
  1718. {
  1719. "name": "path",
  1720. "in": "query",
  1721. "schema": {
  1722. "type": "string"
  1723. },
  1724. "required": true
  1725. }
  1726. ],
  1727. "responses": {
  1728. "200": {
  1729. "description": "File content",
  1730. "content": {
  1731. "application/json": {
  1732. "schema": {
  1733. "$ref": "#/components/schemas/FileContent"
  1734. }
  1735. }
  1736. }
  1737. }
  1738. },
  1739. "description": "Read the content of a specified file.",
  1740. "summary": "Read file",
  1741. "x-codeSamples": [
  1742. {
  1743. "lang": "js",
  1744. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1745. }
  1746. ]
  1747. }
  1748. },
  1749. "/file/status": {
  1750. "get": {
  1751. "tags": ["file"],
  1752. "operationId": "file.status",
  1753. "parameters": [
  1754. {
  1755. "name": "directory",
  1756. "in": "query",
  1757. "schema": {
  1758. "type": "string"
  1759. },
  1760. "required": false
  1761. },
  1762. {
  1763. "name": "workspace",
  1764. "in": "query",
  1765. "schema": {
  1766. "type": "string"
  1767. },
  1768. "required": false
  1769. }
  1770. ],
  1771. "responses": {
  1772. "200": {
  1773. "description": "File status",
  1774. "content": {
  1775. "application/json": {
  1776. "schema": {
  1777. "type": "array",
  1778. "items": {
  1779. "$ref": "#/components/schemas/File"
  1780. },
  1781. "description": "File status"
  1782. }
  1783. }
  1784. }
  1785. }
  1786. },
  1787. "description": "Get the git status of all files in the project.",
  1788. "summary": "Get file status",
  1789. "x-codeSamples": [
  1790. {
  1791. "lang": "js",
  1792. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1793. }
  1794. ]
  1795. }
  1796. },
  1797. "/instance/dispose": {
  1798. "post": {
  1799. "tags": ["instance"],
  1800. "operationId": "instance.dispose",
  1801. "parameters": [
  1802. {
  1803. "name": "directory",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "workspace",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": false
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Instance disposed",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "boolean",
  1826. "description": "Instance disposed"
  1827. }
  1828. }
  1829. }
  1830. }
  1831. },
  1832. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1833. "summary": "Dispose instance",
  1834. "x-codeSamples": [
  1835. {
  1836. "lang": "js",
  1837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1838. }
  1839. ]
  1840. }
  1841. },
  1842. "/path": {
  1843. "get": {
  1844. "tags": ["instance"],
  1845. "operationId": "path.get",
  1846. "parameters": [
  1847. {
  1848. "name": "directory",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": false
  1854. },
  1855. {
  1856. "name": "workspace",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string"
  1860. },
  1861. "required": false
  1862. }
  1863. ],
  1864. "responses": {
  1865. "200": {
  1866. "description": "Path",
  1867. "content": {
  1868. "application/json": {
  1869. "schema": {
  1870. "$ref": "#/components/schemas/Path"
  1871. }
  1872. }
  1873. }
  1874. }
  1875. },
  1876. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1877. "summary": "Get paths",
  1878. "x-codeSamples": [
  1879. {
  1880. "lang": "js",
  1881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1882. }
  1883. ]
  1884. }
  1885. },
  1886. "/vcs": {
  1887. "get": {
  1888. "tags": ["instance"],
  1889. "operationId": "vcs.get",
  1890. "parameters": [
  1891. {
  1892. "name": "directory",
  1893. "in": "query",
  1894. "schema": {
  1895. "type": "string"
  1896. },
  1897. "required": false
  1898. },
  1899. {
  1900. "name": "workspace",
  1901. "in": "query",
  1902. "schema": {
  1903. "type": "string"
  1904. },
  1905. "required": false
  1906. }
  1907. ],
  1908. "responses": {
  1909. "200": {
  1910. "description": "VCS info",
  1911. "content": {
  1912. "application/json": {
  1913. "schema": {
  1914. "$ref": "#/components/schemas/VcsInfo"
  1915. }
  1916. }
  1917. }
  1918. }
  1919. },
  1920. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1921. "summary": "Get VCS info",
  1922. "x-codeSamples": [
  1923. {
  1924. "lang": "js",
  1925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1926. }
  1927. ]
  1928. }
  1929. },
  1930. "/vcs/status": {
  1931. "get": {
  1932. "tags": ["instance"],
  1933. "operationId": "vcs.status",
  1934. "parameters": [
  1935. {
  1936. "name": "directory",
  1937. "in": "query",
  1938. "schema": {
  1939. "type": "string"
  1940. },
  1941. "required": false
  1942. },
  1943. {
  1944. "name": "workspace",
  1945. "in": "query",
  1946. "schema": {
  1947. "type": "string"
  1948. },
  1949. "required": false
  1950. }
  1951. ],
  1952. "responses": {
  1953. "200": {
  1954. "description": "VCS status",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "type": "array",
  1959. "items": {
  1960. "$ref": "#/components/schemas/VcsFileStatus"
  1961. },
  1962. "description": "VCS status"
  1963. }
  1964. }
  1965. }
  1966. }
  1967. },
  1968. "description": "Retrieve changed files in the current working tree without patches.",
  1969. "summary": "Get VCS status",
  1970. "x-codeSamples": [
  1971. {
  1972. "lang": "js",
  1973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1974. }
  1975. ]
  1976. }
  1977. },
  1978. "/vcs/diff": {
  1979. "get": {
  1980. "tags": ["instance"],
  1981. "operationId": "vcs.diff",
  1982. "parameters": [
  1983. {
  1984. "name": "directory",
  1985. "in": "query",
  1986. "schema": {
  1987. "type": "string"
  1988. },
  1989. "required": false
  1990. },
  1991. {
  1992. "name": "workspace",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "mode",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string",
  2004. "enum": ["git", "branch"]
  2005. },
  2006. "required": true
  2007. }
  2008. ],
  2009. "responses": {
  2010. "200": {
  2011. "description": "VCS diff",
  2012. "content": {
  2013. "application/json": {
  2014. "schema": {
  2015. "type": "array",
  2016. "items": {
  2017. "$ref": "#/components/schemas/VcsFileDiff"
  2018. },
  2019. "description": "VCS diff"
  2020. }
  2021. }
  2022. }
  2023. }
  2024. },
  2025. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2026. "summary": "Get VCS diff",
  2027. "x-codeSamples": [
  2028. {
  2029. "lang": "js",
  2030. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2031. }
  2032. ]
  2033. }
  2034. },
  2035. "/vcs/diff/raw": {
  2036. "get": {
  2037. "tags": ["instance"],
  2038. "operationId": "vcs.diff.raw",
  2039. "parameters": [
  2040. {
  2041. "name": "directory",
  2042. "in": "query",
  2043. "schema": {
  2044. "type": "string"
  2045. },
  2046. "required": false
  2047. },
  2048. {
  2049. "name": "workspace",
  2050. "in": "query",
  2051. "schema": {
  2052. "type": "string"
  2053. },
  2054. "required": false
  2055. }
  2056. ],
  2057. "responses": {
  2058. "200": {
  2059. "description": "Raw VCS diff",
  2060. "content": {
  2061. "text/x-diff; charset=utf-8": {
  2062. "schema": {
  2063. "type": "string"
  2064. }
  2065. }
  2066. }
  2067. }
  2068. },
  2069. "description": "Retrieve a raw patch for current uncommitted changes.",
  2070. "summary": "Get raw VCS diff",
  2071. "x-codeSamples": [
  2072. {
  2073. "lang": "js",
  2074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2075. }
  2076. ]
  2077. }
  2078. },
  2079. "/vcs/apply": {
  2080. "post": {
  2081. "tags": ["instance"],
  2082. "operationId": "vcs.apply",
  2083. "parameters": [
  2084. {
  2085. "name": "directory",
  2086. "in": "query",
  2087. "schema": {
  2088. "type": "string"
  2089. },
  2090. "required": false
  2091. },
  2092. {
  2093. "name": "workspace",
  2094. "in": "query",
  2095. "schema": {
  2096. "type": "string"
  2097. },
  2098. "required": false
  2099. }
  2100. ],
  2101. "responses": {
  2102. "200": {
  2103. "description": "VCS patch applied",
  2104. "content": {
  2105. "application/json": {
  2106. "schema": {
  2107. "type": "object",
  2108. "properties": {
  2109. "applied": {
  2110. "type": "boolean"
  2111. }
  2112. },
  2113. "required": ["applied"],
  2114. "additionalProperties": false,
  2115. "description": "VCS patch applied"
  2116. }
  2117. }
  2118. }
  2119. },
  2120. "400": {
  2121. "description": "VcsApplyError",
  2122. "content": {
  2123. "application/json": {
  2124. "schema": {
  2125. "$ref": "#/components/schemas/VcsApplyError"
  2126. }
  2127. }
  2128. }
  2129. }
  2130. },
  2131. "description": "Apply a raw patch to the current working tree.",
  2132. "summary": "Apply VCS patch",
  2133. "requestBody": {
  2134. "content": {
  2135. "application/json": {
  2136. "schema": {
  2137. "type": "object",
  2138. "properties": {
  2139. "patch": {
  2140. "type": "string"
  2141. }
  2142. },
  2143. "required": ["patch"],
  2144. "additionalProperties": false
  2145. }
  2146. }
  2147. }
  2148. },
  2149. "x-codeSamples": [
  2150. {
  2151. "lang": "js",
  2152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2153. }
  2154. ]
  2155. }
  2156. },
  2157. "/command": {
  2158. "get": {
  2159. "tags": ["instance"],
  2160. "operationId": "command.list",
  2161. "parameters": [
  2162. {
  2163. "name": "directory",
  2164. "in": "query",
  2165. "schema": {
  2166. "type": "string"
  2167. },
  2168. "required": false
  2169. },
  2170. {
  2171. "name": "workspace",
  2172. "in": "query",
  2173. "schema": {
  2174. "type": "string"
  2175. },
  2176. "required": false
  2177. }
  2178. ],
  2179. "responses": {
  2180. "200": {
  2181. "description": "List of commands",
  2182. "content": {
  2183. "application/json": {
  2184. "schema": {
  2185. "type": "array",
  2186. "items": {
  2187. "$ref": "#/components/schemas/Command"
  2188. },
  2189. "description": "List of commands"
  2190. }
  2191. }
  2192. }
  2193. }
  2194. },
  2195. "description": "Get a list of all available commands in the OpenCode system.",
  2196. "summary": "List commands",
  2197. "x-codeSamples": [
  2198. {
  2199. "lang": "js",
  2200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2201. }
  2202. ]
  2203. }
  2204. },
  2205. "/agent": {
  2206. "get": {
  2207. "tags": ["instance"],
  2208. "operationId": "app.agents",
  2209. "parameters": [
  2210. {
  2211. "name": "directory",
  2212. "in": "query",
  2213. "schema": {
  2214. "type": "string"
  2215. },
  2216. "required": false
  2217. },
  2218. {
  2219. "name": "workspace",
  2220. "in": "query",
  2221. "schema": {
  2222. "type": "string"
  2223. },
  2224. "required": false
  2225. }
  2226. ],
  2227. "responses": {
  2228. "200": {
  2229. "description": "List of agents",
  2230. "content": {
  2231. "application/json": {
  2232. "schema": {
  2233. "type": "array",
  2234. "items": {
  2235. "$ref": "#/components/schemas/Agent"
  2236. },
  2237. "description": "List of agents"
  2238. }
  2239. }
  2240. }
  2241. }
  2242. },
  2243. "description": "Get a list of all available AI agents in the OpenCode system.",
  2244. "summary": "List agents",
  2245. "x-codeSamples": [
  2246. {
  2247. "lang": "js",
  2248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2249. }
  2250. ]
  2251. }
  2252. },
  2253. "/skill": {
  2254. "get": {
  2255. "tags": ["instance"],
  2256. "operationId": "app.skills",
  2257. "parameters": [
  2258. {
  2259. "name": "directory",
  2260. "in": "query",
  2261. "schema": {
  2262. "type": "string"
  2263. },
  2264. "required": false
  2265. },
  2266. {
  2267. "name": "workspace",
  2268. "in": "query",
  2269. "schema": {
  2270. "type": "string"
  2271. },
  2272. "required": false
  2273. }
  2274. ],
  2275. "responses": {
  2276. "200": {
  2277. "description": "List of skills",
  2278. "content": {
  2279. "application/json": {
  2280. "schema": {
  2281. "type": "array",
  2282. "items": {
  2283. "type": "object",
  2284. "properties": {
  2285. "name": {
  2286. "type": "string"
  2287. },
  2288. "description": {
  2289. "type": "string"
  2290. },
  2291. "location": {
  2292. "type": "string"
  2293. },
  2294. "content": {
  2295. "type": "string"
  2296. }
  2297. },
  2298. "required": ["name", "location", "content"],
  2299. "additionalProperties": false
  2300. },
  2301. "description": "List of skills"
  2302. }
  2303. }
  2304. }
  2305. }
  2306. },
  2307. "description": "Get a list of all available skills in the OpenCode system.",
  2308. "summary": "List skills",
  2309. "x-codeSamples": [
  2310. {
  2311. "lang": "js",
  2312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2313. }
  2314. ]
  2315. }
  2316. },
  2317. "/lsp": {
  2318. "get": {
  2319. "tags": ["instance"],
  2320. "operationId": "lsp.status",
  2321. "parameters": [
  2322. {
  2323. "name": "directory",
  2324. "in": "query",
  2325. "schema": {
  2326. "type": "string"
  2327. },
  2328. "required": false
  2329. },
  2330. {
  2331. "name": "workspace",
  2332. "in": "query",
  2333. "schema": {
  2334. "type": "string"
  2335. },
  2336. "required": false
  2337. }
  2338. ],
  2339. "responses": {
  2340. "200": {
  2341. "description": "LSP server status",
  2342. "content": {
  2343. "application/json": {
  2344. "schema": {
  2345. "type": "array",
  2346. "items": {
  2347. "$ref": "#/components/schemas/LSPStatus"
  2348. },
  2349. "description": "LSP server status"
  2350. }
  2351. }
  2352. }
  2353. }
  2354. },
  2355. "description": "Get LSP server status",
  2356. "summary": "Get LSP status",
  2357. "x-codeSamples": [
  2358. {
  2359. "lang": "js",
  2360. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2361. }
  2362. ]
  2363. }
  2364. },
  2365. "/formatter": {
  2366. "get": {
  2367. "tags": ["instance"],
  2368. "operationId": "formatter.status",
  2369. "parameters": [
  2370. {
  2371. "name": "directory",
  2372. "in": "query",
  2373. "schema": {
  2374. "type": "string"
  2375. },
  2376. "required": false
  2377. },
  2378. {
  2379. "name": "workspace",
  2380. "in": "query",
  2381. "schema": {
  2382. "type": "string"
  2383. },
  2384. "required": false
  2385. }
  2386. ],
  2387. "responses": {
  2388. "200": {
  2389. "description": "Formatter status",
  2390. "content": {
  2391. "application/json": {
  2392. "schema": {
  2393. "type": "array",
  2394. "items": {
  2395. "$ref": "#/components/schemas/FormatterStatus"
  2396. },
  2397. "description": "Formatter status"
  2398. }
  2399. }
  2400. }
  2401. }
  2402. },
  2403. "description": "Get formatter status",
  2404. "summary": "Get formatter status",
  2405. "x-codeSamples": [
  2406. {
  2407. "lang": "js",
  2408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2409. }
  2410. ]
  2411. }
  2412. },
  2413. "/mcp": {
  2414. "get": {
  2415. "tags": ["mcp"],
  2416. "operationId": "mcp.status",
  2417. "parameters": [
  2418. {
  2419. "name": "directory",
  2420. "in": "query",
  2421. "schema": {
  2422. "type": "string"
  2423. },
  2424. "required": false
  2425. },
  2426. {
  2427. "name": "workspace",
  2428. "in": "query",
  2429. "schema": {
  2430. "type": "string"
  2431. },
  2432. "required": false
  2433. }
  2434. ],
  2435. "responses": {
  2436. "200": {
  2437. "description": "MCP server status",
  2438. "content": {
  2439. "application/json": {
  2440. "schema": {
  2441. "type": "object",
  2442. "additionalProperties": {
  2443. "$ref": "#/components/schemas/MCPStatus"
  2444. },
  2445. "description": "MCP server status"
  2446. }
  2447. }
  2448. }
  2449. }
  2450. },
  2451. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2452. "summary": "Get MCP status",
  2453. "x-codeSamples": [
  2454. {
  2455. "lang": "js",
  2456. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2457. }
  2458. ]
  2459. },
  2460. "post": {
  2461. "tags": ["mcp"],
  2462. "operationId": "mcp.add",
  2463. "parameters": [
  2464. {
  2465. "name": "directory",
  2466. "in": "query",
  2467. "schema": {
  2468. "type": "string"
  2469. },
  2470. "required": false
  2471. },
  2472. {
  2473. "name": "workspace",
  2474. "in": "query",
  2475. "schema": {
  2476. "type": "string"
  2477. },
  2478. "required": false
  2479. }
  2480. ],
  2481. "responses": {
  2482. "200": {
  2483. "description": "MCP server added successfully",
  2484. "content": {
  2485. "application/json": {
  2486. "schema": {
  2487. "type": "object",
  2488. "additionalProperties": {
  2489. "$ref": "#/components/schemas/MCPStatus"
  2490. },
  2491. "description": "MCP server added successfully"
  2492. }
  2493. }
  2494. }
  2495. },
  2496. "400": {
  2497. "description": "Bad request",
  2498. "content": {
  2499. "application/json": {
  2500. "schema": {
  2501. "$ref": "#/components/schemas/BadRequestError"
  2502. }
  2503. }
  2504. }
  2505. }
  2506. },
  2507. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2508. "summary": "Add MCP server",
  2509. "requestBody": {
  2510. "content": {
  2511. "application/json": {
  2512. "schema": {
  2513. "type": "object",
  2514. "properties": {
  2515. "name": {
  2516. "type": "string"
  2517. },
  2518. "config": {
  2519. "anyOf": [
  2520. {
  2521. "$ref": "#/components/schemas/McpLocalConfig"
  2522. },
  2523. {
  2524. "$ref": "#/components/schemas/McpRemoteConfig"
  2525. }
  2526. ]
  2527. }
  2528. },
  2529. "required": ["name", "config"],
  2530. "additionalProperties": false
  2531. }
  2532. }
  2533. }
  2534. },
  2535. "x-codeSamples": [
  2536. {
  2537. "lang": "js",
  2538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2539. }
  2540. ]
  2541. }
  2542. },
  2543. "/mcp/{name}/auth": {
  2544. "post": {
  2545. "tags": ["mcp"],
  2546. "operationId": "mcp.auth.start",
  2547. "parameters": [
  2548. {
  2549. "name": "name",
  2550. "in": "path",
  2551. "schema": {
  2552. "type": "string"
  2553. },
  2554. "required": true
  2555. },
  2556. {
  2557. "name": "directory",
  2558. "in": "query",
  2559. "schema": {
  2560. "type": "string"
  2561. },
  2562. "required": false
  2563. },
  2564. {
  2565. "name": "workspace",
  2566. "in": "query",
  2567. "schema": {
  2568. "type": "string"
  2569. },
  2570. "required": false
  2571. }
  2572. ],
  2573. "responses": {
  2574. "200": {
  2575. "description": "OAuth flow started",
  2576. "content": {
  2577. "application/json": {
  2578. "schema": {
  2579. "type": "object",
  2580. "properties": {
  2581. "authorizationUrl": {
  2582. "type": "string"
  2583. },
  2584. "oauthState": {
  2585. "type": "string"
  2586. }
  2587. },
  2588. "required": ["authorizationUrl", "oauthState"],
  2589. "additionalProperties": false,
  2590. "description": "OAuth flow started"
  2591. }
  2592. }
  2593. }
  2594. },
  2595. "400": {
  2596. "description": "McpUnsupportedOAuthError",
  2597. "content": {
  2598. "application/json": {
  2599. "schema": {
  2600. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2601. }
  2602. }
  2603. }
  2604. },
  2605. "404": {
  2606. "description": "Not found",
  2607. "content": {
  2608. "application/json": {
  2609. "schema": {
  2610. "$ref": "#/components/schemas/NotFoundError"
  2611. }
  2612. }
  2613. }
  2614. }
  2615. },
  2616. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2617. "summary": "Start MCP OAuth",
  2618. "x-codeSamples": [
  2619. {
  2620. "lang": "js",
  2621. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2622. }
  2623. ]
  2624. },
  2625. "delete": {
  2626. "tags": ["mcp"],
  2627. "operationId": "mcp.auth.remove",
  2628. "parameters": [
  2629. {
  2630. "name": "name",
  2631. "in": "path",
  2632. "schema": {
  2633. "type": "string"
  2634. },
  2635. "required": true
  2636. },
  2637. {
  2638. "name": "directory",
  2639. "in": "query",
  2640. "schema": {
  2641. "type": "string"
  2642. },
  2643. "required": false
  2644. },
  2645. {
  2646. "name": "workspace",
  2647. "in": "query",
  2648. "schema": {
  2649. "type": "string"
  2650. },
  2651. "required": false
  2652. }
  2653. ],
  2654. "responses": {
  2655. "200": {
  2656. "description": "OAuth credentials removed",
  2657. "content": {
  2658. "application/json": {
  2659. "schema": {
  2660. "type": "object",
  2661. "properties": {
  2662. "success": {
  2663. "type": "boolean",
  2664. "enum": [true]
  2665. }
  2666. },
  2667. "required": ["success"],
  2668. "additionalProperties": false,
  2669. "description": "OAuth credentials removed"
  2670. }
  2671. }
  2672. }
  2673. },
  2674. "404": {
  2675. "description": "Not found",
  2676. "content": {
  2677. "application/json": {
  2678. "schema": {
  2679. "$ref": "#/components/schemas/NotFoundError"
  2680. }
  2681. }
  2682. }
  2683. }
  2684. },
  2685. "description": "Remove OAuth credentials for an MCP server.",
  2686. "summary": "Remove MCP OAuth",
  2687. "x-codeSamples": [
  2688. {
  2689. "lang": "js",
  2690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2691. }
  2692. ]
  2693. }
  2694. },
  2695. "/mcp/{name}/auth/callback": {
  2696. "post": {
  2697. "tags": ["mcp"],
  2698. "operationId": "mcp.auth.callback",
  2699. "parameters": [
  2700. {
  2701. "name": "name",
  2702. "in": "path",
  2703. "schema": {
  2704. "type": "string"
  2705. },
  2706. "required": true
  2707. },
  2708. {
  2709. "name": "directory",
  2710. "in": "query",
  2711. "schema": {
  2712. "type": "string"
  2713. },
  2714. "required": false
  2715. },
  2716. {
  2717. "name": "workspace",
  2718. "in": "query",
  2719. "schema": {
  2720. "type": "string"
  2721. },
  2722. "required": false
  2723. }
  2724. ],
  2725. "responses": {
  2726. "200": {
  2727. "description": "OAuth authentication completed",
  2728. "content": {
  2729. "application/json": {
  2730. "schema": {
  2731. "$ref": "#/components/schemas/MCPStatus"
  2732. }
  2733. }
  2734. }
  2735. },
  2736. "400": {
  2737. "description": "Bad request",
  2738. "content": {
  2739. "application/json": {
  2740. "schema": {
  2741. "$ref": "#/components/schemas/BadRequestError"
  2742. }
  2743. }
  2744. }
  2745. },
  2746. "404": {
  2747. "description": "Not found",
  2748. "content": {
  2749. "application/json": {
  2750. "schema": {
  2751. "$ref": "#/components/schemas/NotFoundError"
  2752. }
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2758. "summary": "Complete MCP OAuth",
  2759. "requestBody": {
  2760. "content": {
  2761. "application/json": {
  2762. "schema": {
  2763. "type": "object",
  2764. "properties": {
  2765. "code": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["code"],
  2770. "additionalProperties": false
  2771. }
  2772. }
  2773. }
  2774. },
  2775. "x-codeSamples": [
  2776. {
  2777. "lang": "js",
  2778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2779. }
  2780. ]
  2781. }
  2782. },
  2783. "/mcp/{name}/auth/authenticate": {
  2784. "post": {
  2785. "tags": ["mcp"],
  2786. "operationId": "mcp.auth.authenticate",
  2787. "parameters": [
  2788. {
  2789. "name": "name",
  2790. "in": "path",
  2791. "schema": {
  2792. "type": "string"
  2793. },
  2794. "required": true
  2795. },
  2796. {
  2797. "name": "directory",
  2798. "in": "query",
  2799. "schema": {
  2800. "type": "string"
  2801. },
  2802. "required": false
  2803. },
  2804. {
  2805. "name": "workspace",
  2806. "in": "query",
  2807. "schema": {
  2808. "type": "string"
  2809. },
  2810. "required": false
  2811. }
  2812. ],
  2813. "responses": {
  2814. "200": {
  2815. "description": "OAuth authentication completed",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "$ref": "#/components/schemas/MCPStatus"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "400": {
  2825. "description": "McpUnsupportedOAuthError",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2830. }
  2831. }
  2832. }
  2833. },
  2834. "404": {
  2835. "description": "Not found",
  2836. "content": {
  2837. "application/json": {
  2838. "schema": {
  2839. "$ref": "#/components/schemas/NotFoundError"
  2840. }
  2841. }
  2842. }
  2843. }
  2844. },
  2845. "description": "Start OAuth flow and wait for callback (opens browser).",
  2846. "summary": "Authenticate MCP OAuth",
  2847. "x-codeSamples": [
  2848. {
  2849. "lang": "js",
  2850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2851. }
  2852. ]
  2853. }
  2854. },
  2855. "/mcp/{name}/connect": {
  2856. "post": {
  2857. "tags": ["mcp"],
  2858. "operationId": "mcp.connect",
  2859. "parameters": [
  2860. {
  2861. "name": "name",
  2862. "in": "path",
  2863. "schema": {
  2864. "type": "string"
  2865. },
  2866. "required": true
  2867. },
  2868. {
  2869. "name": "directory",
  2870. "in": "query",
  2871. "schema": {
  2872. "type": "string"
  2873. },
  2874. "required": false
  2875. },
  2876. {
  2877. "name": "workspace",
  2878. "in": "query",
  2879. "schema": {
  2880. "type": "string"
  2881. },
  2882. "required": false
  2883. }
  2884. ],
  2885. "responses": {
  2886. "200": {
  2887. "description": "MCP server connected successfully",
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "boolean",
  2892. "description": "MCP server connected successfully"
  2893. }
  2894. }
  2895. }
  2896. }
  2897. },
  2898. "description": "Connect an MCP server.",
  2899. "x-codeSamples": [
  2900. {
  2901. "lang": "js",
  2902. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "/mcp/{name}/disconnect": {
  2908. "post": {
  2909. "tags": ["mcp"],
  2910. "operationId": "mcp.disconnect",
  2911. "parameters": [
  2912. {
  2913. "name": "name",
  2914. "in": "path",
  2915. "schema": {
  2916. "type": "string"
  2917. },
  2918. "required": true
  2919. },
  2920. {
  2921. "name": "directory",
  2922. "in": "query",
  2923. "schema": {
  2924. "type": "string"
  2925. },
  2926. "required": false
  2927. },
  2928. {
  2929. "name": "workspace",
  2930. "in": "query",
  2931. "schema": {
  2932. "type": "string"
  2933. },
  2934. "required": false
  2935. }
  2936. ],
  2937. "responses": {
  2938. "200": {
  2939. "description": "MCP server disconnected successfully",
  2940. "content": {
  2941. "application/json": {
  2942. "schema": {
  2943. "type": "boolean",
  2944. "description": "MCP server disconnected successfully"
  2945. }
  2946. }
  2947. }
  2948. }
  2949. },
  2950. "description": "Disconnect an MCP server.",
  2951. "x-codeSamples": [
  2952. {
  2953. "lang": "js",
  2954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2955. }
  2956. ]
  2957. }
  2958. },
  2959. "/project": {
  2960. "get": {
  2961. "tags": ["project"],
  2962. "operationId": "project.list",
  2963. "parameters": [
  2964. {
  2965. "name": "directory",
  2966. "in": "query",
  2967. "schema": {
  2968. "type": "string"
  2969. },
  2970. "required": false
  2971. },
  2972. {
  2973. "name": "workspace",
  2974. "in": "query",
  2975. "schema": {
  2976. "type": "string"
  2977. },
  2978. "required": false
  2979. }
  2980. ],
  2981. "responses": {
  2982. "200": {
  2983. "description": "List of projects",
  2984. "content": {
  2985. "application/json": {
  2986. "schema": {
  2987. "type": "array",
  2988. "items": {
  2989. "$ref": "#/components/schemas/Project"
  2990. },
  2991. "description": "List of projects"
  2992. }
  2993. }
  2994. }
  2995. }
  2996. },
  2997. "description": "Get a list of projects that have been opened with OpenCode.",
  2998. "summary": "List all projects",
  2999. "x-codeSamples": [
  3000. {
  3001. "lang": "js",
  3002. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3003. }
  3004. ]
  3005. }
  3006. },
  3007. "/project/current": {
  3008. "get": {
  3009. "tags": ["project"],
  3010. "operationId": "project.current",
  3011. "parameters": [
  3012. {
  3013. "name": "directory",
  3014. "in": "query",
  3015. "schema": {
  3016. "type": "string"
  3017. },
  3018. "required": false
  3019. },
  3020. {
  3021. "name": "workspace",
  3022. "in": "query",
  3023. "schema": {
  3024. "type": "string"
  3025. },
  3026. "required": false
  3027. }
  3028. ],
  3029. "responses": {
  3030. "200": {
  3031. "description": "Current project information",
  3032. "content": {
  3033. "application/json": {
  3034. "schema": {
  3035. "$ref": "#/components/schemas/Project"
  3036. }
  3037. }
  3038. }
  3039. }
  3040. },
  3041. "description": "Retrieve the currently active project that OpenCode is working with.",
  3042. "summary": "Get current project",
  3043. "x-codeSamples": [
  3044. {
  3045. "lang": "js",
  3046. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3047. }
  3048. ]
  3049. }
  3050. },
  3051. "/project/git/init": {
  3052. "post": {
  3053. "tags": ["project"],
  3054. "operationId": "project.initGit",
  3055. "parameters": [
  3056. {
  3057. "name": "directory",
  3058. "in": "query",
  3059. "schema": {
  3060. "type": "string"
  3061. },
  3062. "required": false
  3063. },
  3064. {
  3065. "name": "workspace",
  3066. "in": "query",
  3067. "schema": {
  3068. "type": "string"
  3069. },
  3070. "required": false
  3071. }
  3072. ],
  3073. "responses": {
  3074. "200": {
  3075. "description": "Project information after git initialization",
  3076. "content": {
  3077. "application/json": {
  3078. "schema": {
  3079. "$ref": "#/components/schemas/Project"
  3080. }
  3081. }
  3082. }
  3083. }
  3084. },
  3085. "description": "Create a git repository for the current project and return the refreshed project info.",
  3086. "summary": "Initialize git repository",
  3087. "x-codeSamples": [
  3088. {
  3089. "lang": "js",
  3090. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3091. }
  3092. ]
  3093. }
  3094. },
  3095. "/project/{projectID}": {
  3096. "patch": {
  3097. "tags": ["project"],
  3098. "operationId": "project.update",
  3099. "parameters": [
  3100. {
  3101. "name": "projectID",
  3102. "in": "path",
  3103. "schema": {
  3104. "type": "string"
  3105. },
  3106. "required": true
  3107. },
  3108. {
  3109. "name": "directory",
  3110. "in": "query",
  3111. "schema": {
  3112. "type": "string"
  3113. },
  3114. "required": false
  3115. },
  3116. {
  3117. "name": "workspace",
  3118. "in": "query",
  3119. "schema": {
  3120. "type": "string"
  3121. },
  3122. "required": false
  3123. }
  3124. ],
  3125. "responses": {
  3126. "200": {
  3127. "description": "Updated project information",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/Project"
  3132. }
  3133. }
  3134. }
  3135. },
  3136. "400": {
  3137. "description": "Bad request",
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "$ref": "#/components/schemas/BadRequestError"
  3142. }
  3143. }
  3144. }
  3145. },
  3146. "404": {
  3147. "description": "Not found",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "$ref": "#/components/schemas/NotFoundError"
  3152. }
  3153. }
  3154. }
  3155. }
  3156. },
  3157. "description": "Update project properties such as name, icon, and commands.",
  3158. "summary": "Update project",
  3159. "requestBody": {
  3160. "content": {
  3161. "application/json": {
  3162. "schema": {
  3163. "type": "object",
  3164. "properties": {
  3165. "name": {
  3166. "type": "string"
  3167. },
  3168. "icon": {
  3169. "type": "object",
  3170. "properties": {
  3171. "url": {
  3172. "type": "string"
  3173. },
  3174. "override": {
  3175. "type": "string"
  3176. },
  3177. "color": {
  3178. "type": "string"
  3179. }
  3180. },
  3181. "additionalProperties": false
  3182. },
  3183. "commands": {
  3184. "type": "object",
  3185. "properties": {
  3186. "start": {
  3187. "type": "string",
  3188. "description": "Startup script to run when creating a new workspace (worktree)"
  3189. }
  3190. },
  3191. "additionalProperties": false
  3192. }
  3193. },
  3194. "additionalProperties": false
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "x-codeSamples": [
  3200. {
  3201. "lang": "js",
  3202. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3203. }
  3204. ]
  3205. }
  3206. },
  3207. "/pty/shells": {
  3208. "get": {
  3209. "tags": ["pty"],
  3210. "operationId": "pty.shells",
  3211. "parameters": [
  3212. {
  3213. "name": "directory",
  3214. "in": "query",
  3215. "schema": {
  3216. "type": "string"
  3217. },
  3218. "required": false
  3219. },
  3220. {
  3221. "name": "workspace",
  3222. "in": "query",
  3223. "schema": {
  3224. "type": "string"
  3225. },
  3226. "required": false
  3227. }
  3228. ],
  3229. "responses": {
  3230. "200": {
  3231. "description": "List of shells",
  3232. "content": {
  3233. "application/json": {
  3234. "schema": {
  3235. "type": "array",
  3236. "items": {
  3237. "type": "object",
  3238. "properties": {
  3239. "path": {
  3240. "type": "string"
  3241. },
  3242. "name": {
  3243. "type": "string"
  3244. },
  3245. "acceptable": {
  3246. "type": "boolean"
  3247. }
  3248. },
  3249. "required": ["path", "name", "acceptable"],
  3250. "additionalProperties": false
  3251. },
  3252. "description": "List of shells"
  3253. }
  3254. }
  3255. }
  3256. }
  3257. },
  3258. "description": "Get a list of available shells on the system.",
  3259. "summary": "List available shells",
  3260. "x-codeSamples": [
  3261. {
  3262. "lang": "js",
  3263. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3264. }
  3265. ]
  3266. }
  3267. },
  3268. "/pty": {
  3269. "get": {
  3270. "tags": ["pty"],
  3271. "operationId": "pty.list",
  3272. "parameters": [
  3273. {
  3274. "name": "directory",
  3275. "in": "query",
  3276. "schema": {
  3277. "type": "string"
  3278. },
  3279. "required": false
  3280. },
  3281. {
  3282. "name": "workspace",
  3283. "in": "query",
  3284. "schema": {
  3285. "type": "string"
  3286. },
  3287. "required": false
  3288. }
  3289. ],
  3290. "responses": {
  3291. "200": {
  3292. "description": "List of sessions",
  3293. "content": {
  3294. "application/json": {
  3295. "schema": {
  3296. "type": "array",
  3297. "items": {
  3298. "$ref": "#/components/schemas/Pty"
  3299. },
  3300. "description": "List of sessions"
  3301. }
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3307. "summary": "List PTY sessions",
  3308. "x-codeSamples": [
  3309. {
  3310. "lang": "js",
  3311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3312. }
  3313. ]
  3314. },
  3315. "post": {
  3316. "tags": ["pty"],
  3317. "operationId": "pty.create",
  3318. "parameters": [
  3319. {
  3320. "name": "directory",
  3321. "in": "query",
  3322. "schema": {
  3323. "type": "string"
  3324. },
  3325. "required": false
  3326. },
  3327. {
  3328. "name": "workspace",
  3329. "in": "query",
  3330. "schema": {
  3331. "type": "string"
  3332. },
  3333. "required": false
  3334. }
  3335. ],
  3336. "responses": {
  3337. "200": {
  3338. "description": "Created session",
  3339. "content": {
  3340. "application/json": {
  3341. "schema": {
  3342. "$ref": "#/components/schemas/Pty"
  3343. }
  3344. }
  3345. }
  3346. },
  3347. "400": {
  3348. "description": "Bad request",
  3349. "content": {
  3350. "application/json": {
  3351. "schema": {
  3352. "$ref": "#/components/schemas/BadRequestError"
  3353. }
  3354. }
  3355. }
  3356. }
  3357. },
  3358. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3359. "summary": "Create PTY session",
  3360. "requestBody": {
  3361. "content": {
  3362. "application/json": {
  3363. "schema": {
  3364. "type": "object",
  3365. "properties": {
  3366. "command": {
  3367. "type": "string"
  3368. },
  3369. "args": {
  3370. "type": "array",
  3371. "items": {
  3372. "type": "string"
  3373. }
  3374. },
  3375. "cwd": {
  3376. "type": "string"
  3377. },
  3378. "title": {
  3379. "type": "string"
  3380. },
  3381. "env": {
  3382. "type": "object",
  3383. "additionalProperties": {
  3384. "type": "string"
  3385. }
  3386. }
  3387. },
  3388. "additionalProperties": false
  3389. }
  3390. }
  3391. }
  3392. },
  3393. "x-codeSamples": [
  3394. {
  3395. "lang": "js",
  3396. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3397. }
  3398. ]
  3399. }
  3400. },
  3401. "/pty/{ptyID}": {
  3402. "get": {
  3403. "tags": ["pty"],
  3404. "operationId": "pty.get",
  3405. "parameters": [
  3406. {
  3407. "name": "ptyID",
  3408. "in": "path",
  3409. "schema": {
  3410. "type": "string",
  3411. "pattern": "^pty"
  3412. },
  3413. "required": true
  3414. },
  3415. {
  3416. "name": "directory",
  3417. "in": "query",
  3418. "schema": {
  3419. "type": "string"
  3420. },
  3421. "required": false
  3422. },
  3423. {
  3424. "name": "workspace",
  3425. "in": "query",
  3426. "schema": {
  3427. "type": "string"
  3428. },
  3429. "required": false
  3430. }
  3431. ],
  3432. "responses": {
  3433. "200": {
  3434. "description": "Session info",
  3435. "content": {
  3436. "application/json": {
  3437. "schema": {
  3438. "$ref": "#/components/schemas/Pty"
  3439. }
  3440. }
  3441. }
  3442. },
  3443. "404": {
  3444. "description": "NotFoundError",
  3445. "content": {
  3446. "application/json": {
  3447. "schema": {
  3448. "$ref": "#/components/schemas/NotFoundError"
  3449. }
  3450. }
  3451. }
  3452. }
  3453. },
  3454. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3455. "summary": "Get PTY session",
  3456. "x-codeSamples": [
  3457. {
  3458. "lang": "js",
  3459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3460. }
  3461. ]
  3462. },
  3463. "put": {
  3464. "tags": ["pty"],
  3465. "operationId": "pty.update",
  3466. "parameters": [
  3467. {
  3468. "name": "ptyID",
  3469. "in": "path",
  3470. "schema": {
  3471. "type": "string",
  3472. "pattern": "^pty"
  3473. },
  3474. "required": true
  3475. },
  3476. {
  3477. "name": "directory",
  3478. "in": "query",
  3479. "schema": {
  3480. "type": "string"
  3481. },
  3482. "required": false
  3483. },
  3484. {
  3485. "name": "workspace",
  3486. "in": "query",
  3487. "schema": {
  3488. "type": "string"
  3489. },
  3490. "required": false
  3491. }
  3492. ],
  3493. "responses": {
  3494. "200": {
  3495. "description": "Updated session",
  3496. "content": {
  3497. "application/json": {
  3498. "schema": {
  3499. "$ref": "#/components/schemas/Pty"
  3500. }
  3501. }
  3502. }
  3503. },
  3504. "400": {
  3505. "description": "Bad request",
  3506. "content": {
  3507. "application/json": {
  3508. "schema": {
  3509. "$ref": "#/components/schemas/BadRequestError"
  3510. }
  3511. }
  3512. }
  3513. }
  3514. },
  3515. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3516. "summary": "Update PTY session",
  3517. "requestBody": {
  3518. "content": {
  3519. "application/json": {
  3520. "schema": {
  3521. "type": "object",
  3522. "properties": {
  3523. "title": {
  3524. "type": "string"
  3525. },
  3526. "size": {
  3527. "type": "object",
  3528. "properties": {
  3529. "rows": {
  3530. "type": "integer",
  3531. "exclusiveMinimum": 0
  3532. },
  3533. "cols": {
  3534. "type": "integer",
  3535. "exclusiveMinimum": 0
  3536. }
  3537. },
  3538. "required": ["rows", "cols"],
  3539. "additionalProperties": false
  3540. }
  3541. },
  3542. "additionalProperties": false
  3543. }
  3544. }
  3545. }
  3546. },
  3547. "x-codeSamples": [
  3548. {
  3549. "lang": "js",
  3550. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3551. }
  3552. ]
  3553. },
  3554. "delete": {
  3555. "tags": ["pty"],
  3556. "operationId": "pty.remove",
  3557. "parameters": [
  3558. {
  3559. "name": "ptyID",
  3560. "in": "path",
  3561. "schema": {
  3562. "type": "string",
  3563. "pattern": "^pty"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Session removed",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "type": "boolean",
  3591. "description": "Session removed"
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "404": {
  3597. "description": "NotFoundError",
  3598. "content": {
  3599. "application/json": {
  3600. "schema": {
  3601. "$ref": "#/components/schemas/NotFoundError"
  3602. }
  3603. }
  3604. }
  3605. }
  3606. },
  3607. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3608. "summary": "Remove PTY session",
  3609. "x-codeSamples": [
  3610. {
  3611. "lang": "js",
  3612. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3613. }
  3614. ]
  3615. }
  3616. },
  3617. "/pty/{ptyID}/connect-token": {
  3618. "post": {
  3619. "tags": ["pty"],
  3620. "operationId": "pty.connectToken",
  3621. "parameters": [
  3622. {
  3623. "name": "ptyID",
  3624. "in": "path",
  3625. "schema": {
  3626. "type": "string",
  3627. "pattern": "^pty"
  3628. },
  3629. "required": true
  3630. },
  3631. {
  3632. "name": "directory",
  3633. "in": "query",
  3634. "schema": {
  3635. "type": "string"
  3636. },
  3637. "required": false
  3638. },
  3639. {
  3640. "name": "workspace",
  3641. "in": "query",
  3642. "schema": {
  3643. "type": "string"
  3644. },
  3645. "required": false
  3646. }
  3647. ],
  3648. "responses": {
  3649. "200": {
  3650. "description": "WebSocket connect token",
  3651. "content": {
  3652. "application/json": {
  3653. "schema": {
  3654. "type": "object",
  3655. "properties": {
  3656. "ticket": {
  3657. "type": "string"
  3658. },
  3659. "expires_in": {
  3660. "type": "integer",
  3661. "exclusiveMinimum": 0
  3662. }
  3663. },
  3664. "required": ["ticket", "expires_in"],
  3665. "additionalProperties": false,
  3666. "description": "WebSocket connect token"
  3667. }
  3668. }
  3669. }
  3670. },
  3671. "403": {
  3672. "description": "Forbidden",
  3673. "content": {
  3674. "application/json": {
  3675. "schema": {
  3676. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3677. }
  3678. }
  3679. }
  3680. },
  3681. "404": {
  3682. "description": "NotFoundError",
  3683. "content": {
  3684. "application/json": {
  3685. "schema": {
  3686. "$ref": "#/components/schemas/NotFoundError"
  3687. }
  3688. }
  3689. }
  3690. }
  3691. },
  3692. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3693. "summary": "Create PTY WebSocket token",
  3694. "x-codeSamples": [
  3695. {
  3696. "lang": "js",
  3697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3698. }
  3699. ]
  3700. }
  3701. },
  3702. "/question": {
  3703. "get": {
  3704. "tags": ["question"],
  3705. "operationId": "question.list",
  3706. "parameters": [
  3707. {
  3708. "name": "directory",
  3709. "in": "query",
  3710. "schema": {
  3711. "type": "string"
  3712. },
  3713. "required": false
  3714. },
  3715. {
  3716. "name": "workspace",
  3717. "in": "query",
  3718. "schema": {
  3719. "type": "string"
  3720. },
  3721. "required": false
  3722. }
  3723. ],
  3724. "responses": {
  3725. "200": {
  3726. "description": "List of pending questions",
  3727. "content": {
  3728. "application/json": {
  3729. "schema": {
  3730. "type": "array",
  3731. "items": {
  3732. "$ref": "#/components/schemas/QuestionRequest"
  3733. },
  3734. "description": "List of pending questions"
  3735. }
  3736. }
  3737. }
  3738. }
  3739. },
  3740. "description": "Get all pending question requests across all sessions.",
  3741. "summary": "List pending questions",
  3742. "x-codeSamples": [
  3743. {
  3744. "lang": "js",
  3745. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3746. }
  3747. ]
  3748. }
  3749. },
  3750. "/question/{requestID}/reply": {
  3751. "post": {
  3752. "tags": ["question"],
  3753. "operationId": "question.reply",
  3754. "parameters": [
  3755. {
  3756. "name": "requestID",
  3757. "in": "path",
  3758. "schema": {
  3759. "type": "string",
  3760. "pattern": "^que"
  3761. },
  3762. "required": true
  3763. },
  3764. {
  3765. "name": "directory",
  3766. "in": "query",
  3767. "schema": {
  3768. "type": "string"
  3769. },
  3770. "required": false
  3771. },
  3772. {
  3773. "name": "workspace",
  3774. "in": "query",
  3775. "schema": {
  3776. "type": "string"
  3777. },
  3778. "required": false
  3779. }
  3780. ],
  3781. "responses": {
  3782. "200": {
  3783. "description": "Question answered successfully",
  3784. "content": {
  3785. "application/json": {
  3786. "schema": {
  3787. "type": "boolean",
  3788. "description": "Question answered successfully"
  3789. }
  3790. }
  3791. }
  3792. },
  3793. "400": {
  3794. "description": "Bad request",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/BadRequestError"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "404": {
  3804. "description": "Not found",
  3805. "content": {
  3806. "application/json": {
  3807. "schema": {
  3808. "$ref": "#/components/schemas/NotFoundError"
  3809. }
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "description": "Provide answers to a question request from the AI assistant.",
  3815. "summary": "Reply to question request",
  3816. "requestBody": {
  3817. "content": {
  3818. "application/json": {
  3819. "schema": {
  3820. "type": "object",
  3821. "properties": {
  3822. "answers": {
  3823. "type": "array",
  3824. "items": {
  3825. "$ref": "#/components/schemas/QuestionAnswer"
  3826. },
  3827. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3828. }
  3829. },
  3830. "required": ["answers"],
  3831. "additionalProperties": false
  3832. }
  3833. }
  3834. }
  3835. },
  3836. "x-codeSamples": [
  3837. {
  3838. "lang": "js",
  3839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3840. }
  3841. ]
  3842. }
  3843. },
  3844. "/question/{requestID}/reject": {
  3845. "post": {
  3846. "tags": ["question"],
  3847. "operationId": "question.reject",
  3848. "parameters": [
  3849. {
  3850. "name": "requestID",
  3851. "in": "path",
  3852. "schema": {
  3853. "type": "string",
  3854. "pattern": "^que"
  3855. },
  3856. "required": true
  3857. },
  3858. {
  3859. "name": "directory",
  3860. "in": "query",
  3861. "schema": {
  3862. "type": "string"
  3863. },
  3864. "required": false
  3865. },
  3866. {
  3867. "name": "workspace",
  3868. "in": "query",
  3869. "schema": {
  3870. "type": "string"
  3871. },
  3872. "required": false
  3873. }
  3874. ],
  3875. "responses": {
  3876. "200": {
  3877. "description": "Question rejected successfully",
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "boolean",
  3882. "description": "Question rejected successfully"
  3883. }
  3884. }
  3885. }
  3886. },
  3887. "400": {
  3888. "description": "Bad request",
  3889. "content": {
  3890. "application/json": {
  3891. "schema": {
  3892. "$ref": "#/components/schemas/BadRequestError"
  3893. }
  3894. }
  3895. }
  3896. },
  3897. "404": {
  3898. "description": "Not found",
  3899. "content": {
  3900. "application/json": {
  3901. "schema": {
  3902. "$ref": "#/components/schemas/NotFoundError"
  3903. }
  3904. }
  3905. }
  3906. }
  3907. },
  3908. "description": "Reject a question request from the AI assistant.",
  3909. "summary": "Reject question request",
  3910. "x-codeSamples": [
  3911. {
  3912. "lang": "js",
  3913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3914. }
  3915. ]
  3916. }
  3917. },
  3918. "/permission": {
  3919. "get": {
  3920. "tags": ["permission"],
  3921. "operationId": "permission.list",
  3922. "parameters": [
  3923. {
  3924. "name": "directory",
  3925. "in": "query",
  3926. "schema": {
  3927. "type": "string"
  3928. },
  3929. "required": false
  3930. },
  3931. {
  3932. "name": "workspace",
  3933. "in": "query",
  3934. "schema": {
  3935. "type": "string"
  3936. },
  3937. "required": false
  3938. }
  3939. ],
  3940. "responses": {
  3941. "200": {
  3942. "description": "List of pending permissions",
  3943. "content": {
  3944. "application/json": {
  3945. "schema": {
  3946. "type": "array",
  3947. "items": {
  3948. "$ref": "#/components/schemas/PermissionRequest"
  3949. },
  3950. "description": "List of pending permissions"
  3951. }
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "description": "Get all pending permission requests across all sessions.",
  3957. "summary": "List pending permissions",
  3958. "x-codeSamples": [
  3959. {
  3960. "lang": "js",
  3961. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3962. }
  3963. ]
  3964. }
  3965. },
  3966. "/permission/{requestID}/reply": {
  3967. "post": {
  3968. "tags": ["permission"],
  3969. "operationId": "permission.reply",
  3970. "parameters": [
  3971. {
  3972. "name": "requestID",
  3973. "in": "path",
  3974. "schema": {
  3975. "type": "string",
  3976. "pattern": "^per"
  3977. },
  3978. "required": true
  3979. },
  3980. {
  3981. "name": "directory",
  3982. "in": "query",
  3983. "schema": {
  3984. "type": "string"
  3985. },
  3986. "required": false
  3987. },
  3988. {
  3989. "name": "workspace",
  3990. "in": "query",
  3991. "schema": {
  3992. "type": "string"
  3993. },
  3994. "required": false
  3995. }
  3996. ],
  3997. "responses": {
  3998. "200": {
  3999. "description": "Permission processed successfully",
  4000. "content": {
  4001. "application/json": {
  4002. "schema": {
  4003. "type": "boolean",
  4004. "description": "Permission processed successfully"
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "400": {
  4010. "description": "Bad request",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "$ref": "#/components/schemas/BadRequestError"
  4015. }
  4016. }
  4017. }
  4018. },
  4019. "404": {
  4020. "description": "Not found",
  4021. "content": {
  4022. "application/json": {
  4023. "schema": {
  4024. "$ref": "#/components/schemas/NotFoundError"
  4025. }
  4026. }
  4027. }
  4028. }
  4029. },
  4030. "description": "Approve or deny a permission request from the AI assistant.",
  4031. "summary": "Respond to permission request",
  4032. "requestBody": {
  4033. "content": {
  4034. "application/json": {
  4035. "schema": {
  4036. "type": "object",
  4037. "properties": {
  4038. "reply": {
  4039. "type": "string",
  4040. "enum": ["once", "always", "reject"]
  4041. },
  4042. "message": {
  4043. "type": "string"
  4044. }
  4045. },
  4046. "required": ["reply"],
  4047. "additionalProperties": false
  4048. }
  4049. }
  4050. }
  4051. },
  4052. "x-codeSamples": [
  4053. {
  4054. "lang": "js",
  4055. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4056. }
  4057. ]
  4058. }
  4059. },
  4060. "/provider": {
  4061. "get": {
  4062. "tags": ["provider"],
  4063. "operationId": "provider.list",
  4064. "parameters": [
  4065. {
  4066. "name": "directory",
  4067. "in": "query",
  4068. "schema": {
  4069. "type": "string"
  4070. },
  4071. "required": false
  4072. },
  4073. {
  4074. "name": "workspace",
  4075. "in": "query",
  4076. "schema": {
  4077. "type": "string"
  4078. },
  4079. "required": false
  4080. }
  4081. ],
  4082. "responses": {
  4083. "200": {
  4084. "description": "List of providers",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "type": "object",
  4089. "properties": {
  4090. "all": {
  4091. "type": "array",
  4092. "items": {
  4093. "$ref": "#/components/schemas/Provider"
  4094. }
  4095. },
  4096. "default": {
  4097. "type": "object",
  4098. "additionalProperties": {
  4099. "type": "string"
  4100. }
  4101. },
  4102. "connected": {
  4103. "type": "array",
  4104. "items": {
  4105. "type": "string"
  4106. }
  4107. }
  4108. },
  4109. "required": ["all", "default", "connected"],
  4110. "additionalProperties": false,
  4111. "description": "List of providers"
  4112. }
  4113. }
  4114. }
  4115. }
  4116. },
  4117. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4118. "summary": "List providers",
  4119. "x-codeSamples": [
  4120. {
  4121. "lang": "js",
  4122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4123. }
  4124. ]
  4125. }
  4126. },
  4127. "/provider/auth": {
  4128. "get": {
  4129. "tags": ["provider"],
  4130. "operationId": "provider.auth",
  4131. "parameters": [
  4132. {
  4133. "name": "directory",
  4134. "in": "query",
  4135. "schema": {
  4136. "type": "string"
  4137. },
  4138. "required": false
  4139. },
  4140. {
  4141. "name": "workspace",
  4142. "in": "query",
  4143. "schema": {
  4144. "type": "string"
  4145. },
  4146. "required": false
  4147. }
  4148. ],
  4149. "responses": {
  4150. "200": {
  4151. "description": "Provider auth methods",
  4152. "content": {
  4153. "application/json": {
  4154. "schema": {
  4155. "type": "object",
  4156. "additionalProperties": {
  4157. "type": "array",
  4158. "items": {
  4159. "$ref": "#/components/schemas/ProviderAuthMethod"
  4160. }
  4161. },
  4162. "description": "Provider auth methods"
  4163. }
  4164. }
  4165. }
  4166. }
  4167. },
  4168. "description": "Retrieve available authentication methods for all AI providers.",
  4169. "summary": "Get provider auth methods",
  4170. "x-codeSamples": [
  4171. {
  4172. "lang": "js",
  4173. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4174. }
  4175. ]
  4176. }
  4177. },
  4178. "/provider/{providerID}/oauth/authorize": {
  4179. "post": {
  4180. "tags": ["provider"],
  4181. "operationId": "provider.oauth.authorize",
  4182. "parameters": [
  4183. {
  4184. "name": "providerID",
  4185. "in": "path",
  4186. "schema": {
  4187. "type": "string"
  4188. },
  4189. "required": true
  4190. },
  4191. {
  4192. "name": "directory",
  4193. "in": "query",
  4194. "schema": {
  4195. "type": "string"
  4196. },
  4197. "required": false
  4198. },
  4199. {
  4200. "name": "workspace",
  4201. "in": "query",
  4202. "schema": {
  4203. "type": "string"
  4204. },
  4205. "required": false
  4206. }
  4207. ],
  4208. "responses": {
  4209. "200": {
  4210. "description": "Authorization URL and method",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4215. }
  4216. }
  4217. }
  4218. },
  4219. "400": {
  4220. "description": "ProviderAuthError",
  4221. "content": {
  4222. "application/json": {
  4223. "schema": {
  4224. "$ref": "#/components/schemas/ProviderAuthError1"
  4225. }
  4226. }
  4227. }
  4228. }
  4229. },
  4230. "description": "Start the OAuth authorization flow for a provider.",
  4231. "summary": "Start OAuth authorization",
  4232. "requestBody": {
  4233. "content": {
  4234. "application/json": {
  4235. "schema": {
  4236. "type": "object",
  4237. "properties": {
  4238. "method": {
  4239. "type": "number",
  4240. "description": "Auth method index"
  4241. },
  4242. "inputs": {
  4243. "type": "object",
  4244. "additionalProperties": {
  4245. "type": "string"
  4246. }
  4247. }
  4248. },
  4249. "required": ["method"],
  4250. "additionalProperties": false
  4251. }
  4252. }
  4253. }
  4254. },
  4255. "x-codeSamples": [
  4256. {
  4257. "lang": "js",
  4258. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4259. }
  4260. ]
  4261. }
  4262. },
  4263. "/provider/{providerID}/oauth/callback": {
  4264. "post": {
  4265. "tags": ["provider"],
  4266. "operationId": "provider.oauth.callback",
  4267. "parameters": [
  4268. {
  4269. "name": "providerID",
  4270. "in": "path",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": true
  4275. },
  4276. {
  4277. "name": "directory",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. },
  4284. {
  4285. "name": "workspace",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. }
  4292. ],
  4293. "responses": {
  4294. "200": {
  4295. "description": "OAuth callback processed successfully",
  4296. "content": {
  4297. "application/json": {
  4298. "schema": {
  4299. "type": "boolean",
  4300. "description": "OAuth callback processed successfully"
  4301. }
  4302. }
  4303. }
  4304. },
  4305. "400": {
  4306. "description": "ProviderAuthError",
  4307. "content": {
  4308. "application/json": {
  4309. "schema": {
  4310. "$ref": "#/components/schemas/ProviderAuthError1"
  4311. }
  4312. }
  4313. }
  4314. }
  4315. },
  4316. "description": "Handle the OAuth callback from a provider after user authorization.",
  4317. "summary": "Handle OAuth callback",
  4318. "requestBody": {
  4319. "content": {
  4320. "application/json": {
  4321. "schema": {
  4322. "type": "object",
  4323. "properties": {
  4324. "method": {
  4325. "type": "number",
  4326. "description": "Auth method index"
  4327. },
  4328. "code": {
  4329. "type": "string"
  4330. }
  4331. },
  4332. "required": ["method"],
  4333. "additionalProperties": false
  4334. }
  4335. }
  4336. }
  4337. },
  4338. "x-codeSamples": [
  4339. {
  4340. "lang": "js",
  4341. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4342. }
  4343. ]
  4344. }
  4345. },
  4346. "/session": {
  4347. "get": {
  4348. "tags": ["session"],
  4349. "operationId": "session.list",
  4350. "parameters": [
  4351. {
  4352. "name": "directory",
  4353. "in": "query",
  4354. "schema": {
  4355. "type": "string"
  4356. },
  4357. "required": false
  4358. },
  4359. {
  4360. "name": "workspace",
  4361. "in": "query",
  4362. "schema": {
  4363. "type": "string"
  4364. },
  4365. "required": false
  4366. },
  4367. {
  4368. "name": "scope",
  4369. "in": "query",
  4370. "schema": {
  4371. "type": "string",
  4372. "enum": ["project"]
  4373. },
  4374. "required": false
  4375. },
  4376. {
  4377. "name": "path",
  4378. "in": "query",
  4379. "schema": {
  4380. "type": "string"
  4381. },
  4382. "required": false
  4383. },
  4384. {
  4385. "name": "roots",
  4386. "in": "query",
  4387. "schema": {
  4388. "anyOf": [
  4389. {
  4390. "type": "boolean"
  4391. },
  4392. {
  4393. "type": "string",
  4394. "enum": ["true", "false"]
  4395. }
  4396. ]
  4397. },
  4398. "required": false
  4399. },
  4400. {
  4401. "name": "start",
  4402. "in": "query",
  4403. "schema": {
  4404. "type": "number"
  4405. },
  4406. "required": false
  4407. },
  4408. {
  4409. "name": "search",
  4410. "in": "query",
  4411. "schema": {
  4412. "type": "string"
  4413. },
  4414. "required": false
  4415. },
  4416. {
  4417. "name": "limit",
  4418. "in": "query",
  4419. "schema": {
  4420. "type": "number"
  4421. },
  4422. "required": false
  4423. }
  4424. ],
  4425. "responses": {
  4426. "200": {
  4427. "description": "List of sessions",
  4428. "content": {
  4429. "application/json": {
  4430. "schema": {
  4431. "type": "array",
  4432. "items": {
  4433. "$ref": "#/components/schemas/Session"
  4434. },
  4435. "description": "List of sessions"
  4436. }
  4437. }
  4438. }
  4439. }
  4440. },
  4441. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4442. "summary": "List sessions",
  4443. "x-codeSamples": [
  4444. {
  4445. "lang": "js",
  4446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4447. }
  4448. ]
  4449. },
  4450. "post": {
  4451. "tags": ["session"],
  4452. "operationId": "session.create",
  4453. "parameters": [
  4454. {
  4455. "name": "directory",
  4456. "in": "query",
  4457. "schema": {
  4458. "type": "string"
  4459. },
  4460. "required": false
  4461. },
  4462. {
  4463. "name": "workspace",
  4464. "in": "query",
  4465. "schema": {
  4466. "type": "string"
  4467. },
  4468. "required": false
  4469. }
  4470. ],
  4471. "responses": {
  4472. "200": {
  4473. "description": "Successfully created session",
  4474. "content": {
  4475. "application/json": {
  4476. "schema": {
  4477. "$ref": "#/components/schemas/Session"
  4478. }
  4479. }
  4480. }
  4481. },
  4482. "400": {
  4483. "description": "Bad request",
  4484. "content": {
  4485. "application/json": {
  4486. "schema": {
  4487. "$ref": "#/components/schemas/BadRequestError"
  4488. }
  4489. }
  4490. }
  4491. }
  4492. },
  4493. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4494. "summary": "Create session",
  4495. "requestBody": {
  4496. "content": {
  4497. "application/json": {
  4498. "schema": {
  4499. "type": "object",
  4500. "properties": {
  4501. "parentID": {
  4502. "type": "string",
  4503. "pattern": "^ses"
  4504. },
  4505. "title": {
  4506. "type": "string"
  4507. },
  4508. "agent": {
  4509. "type": "string"
  4510. },
  4511. "model": {
  4512. "type": "object",
  4513. "properties": {
  4514. "id": {
  4515. "type": "string"
  4516. },
  4517. "providerID": {
  4518. "type": "string"
  4519. },
  4520. "variant": {
  4521. "type": "string"
  4522. }
  4523. },
  4524. "required": ["id", "providerID"],
  4525. "additionalProperties": false
  4526. },
  4527. "permission": {
  4528. "$ref": "#/components/schemas/PermissionRuleset"
  4529. },
  4530. "workspaceID": {
  4531. "type": "string",
  4532. "pattern": "^wrk"
  4533. }
  4534. },
  4535. "additionalProperties": false
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "x-codeSamples": [
  4541. {
  4542. "lang": "js",
  4543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4544. }
  4545. ]
  4546. }
  4547. },
  4548. "/session/status": {
  4549. "get": {
  4550. "tags": ["session"],
  4551. "operationId": "session.status",
  4552. "parameters": [
  4553. {
  4554. "name": "directory",
  4555. "in": "query",
  4556. "schema": {
  4557. "type": "string"
  4558. },
  4559. "required": false
  4560. },
  4561. {
  4562. "name": "workspace",
  4563. "in": "query",
  4564. "schema": {
  4565. "type": "string"
  4566. },
  4567. "required": false
  4568. }
  4569. ],
  4570. "responses": {
  4571. "200": {
  4572. "description": "Get session status",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "type": "object",
  4577. "additionalProperties": {
  4578. "$ref": "#/components/schemas/SessionStatus"
  4579. },
  4580. "description": "Get session status"
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "400": {
  4586. "description": "Bad request",
  4587. "content": {
  4588. "application/json": {
  4589. "schema": {
  4590. "$ref": "#/components/schemas/BadRequestError"
  4591. }
  4592. }
  4593. }
  4594. }
  4595. },
  4596. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4597. "summary": "Get session status",
  4598. "x-codeSamples": [
  4599. {
  4600. "lang": "js",
  4601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4602. }
  4603. ]
  4604. }
  4605. },
  4606. "/session/{sessionID}": {
  4607. "get": {
  4608. "tags": ["session"],
  4609. "operationId": "session.get",
  4610. "parameters": [
  4611. {
  4612. "name": "sessionID",
  4613. "in": "path",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^ses"
  4617. },
  4618. "required": true
  4619. },
  4620. {
  4621. "name": "directory",
  4622. "in": "query",
  4623. "schema": {
  4624. "type": "string"
  4625. },
  4626. "required": false
  4627. },
  4628. {
  4629. "name": "workspace",
  4630. "in": "query",
  4631. "schema": {
  4632. "type": "string"
  4633. },
  4634. "required": false
  4635. }
  4636. ],
  4637. "responses": {
  4638. "200": {
  4639. "description": "Get session",
  4640. "content": {
  4641. "application/json": {
  4642. "schema": {
  4643. "$ref": "#/components/schemas/Session"
  4644. }
  4645. }
  4646. }
  4647. },
  4648. "400": {
  4649. "description": "Bad request",
  4650. "content": {
  4651. "application/json": {
  4652. "schema": {
  4653. "$ref": "#/components/schemas/BadRequestError"
  4654. }
  4655. }
  4656. }
  4657. },
  4658. "404": {
  4659. "description": "NotFoundError",
  4660. "content": {
  4661. "application/json": {
  4662. "schema": {
  4663. "$ref": "#/components/schemas/NotFoundError"
  4664. }
  4665. }
  4666. }
  4667. }
  4668. },
  4669. "description": "Retrieve detailed information about a specific OpenCode session.",
  4670. "summary": "Get session",
  4671. "x-codeSamples": [
  4672. {
  4673. "lang": "js",
  4674. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4675. }
  4676. ]
  4677. },
  4678. "delete": {
  4679. "tags": ["session"],
  4680. "operationId": "session.delete",
  4681. "parameters": [
  4682. {
  4683. "name": "sessionID",
  4684. "in": "path",
  4685. "schema": {
  4686. "type": "string",
  4687. "pattern": "^ses"
  4688. },
  4689. "required": true
  4690. },
  4691. {
  4692. "name": "directory",
  4693. "in": "query",
  4694. "schema": {
  4695. "type": "string"
  4696. },
  4697. "required": false
  4698. },
  4699. {
  4700. "name": "workspace",
  4701. "in": "query",
  4702. "schema": {
  4703. "type": "string"
  4704. },
  4705. "required": false
  4706. }
  4707. ],
  4708. "responses": {
  4709. "200": {
  4710. "description": "Successfully deleted session",
  4711. "content": {
  4712. "application/json": {
  4713. "schema": {
  4714. "type": "boolean",
  4715. "description": "Successfully deleted session"
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "400": {
  4721. "description": "Bad request",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/BadRequestError"
  4726. }
  4727. }
  4728. }
  4729. },
  4730. "404": {
  4731. "description": "NotFoundError",
  4732. "content": {
  4733. "application/json": {
  4734. "schema": {
  4735. "$ref": "#/components/schemas/NotFoundError"
  4736. }
  4737. }
  4738. }
  4739. }
  4740. },
  4741. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4742. "summary": "Delete session",
  4743. "x-codeSamples": [
  4744. {
  4745. "lang": "js",
  4746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4747. }
  4748. ]
  4749. },
  4750. "patch": {
  4751. "tags": ["session"],
  4752. "operationId": "session.update",
  4753. "parameters": [
  4754. {
  4755. "name": "sessionID",
  4756. "in": "path",
  4757. "schema": {
  4758. "type": "string",
  4759. "pattern": "^ses"
  4760. },
  4761. "required": true
  4762. },
  4763. {
  4764. "name": "directory",
  4765. "in": "query",
  4766. "schema": {
  4767. "type": "string"
  4768. },
  4769. "required": false
  4770. },
  4771. {
  4772. "name": "workspace",
  4773. "in": "query",
  4774. "schema": {
  4775. "type": "string"
  4776. },
  4777. "required": false
  4778. }
  4779. ],
  4780. "responses": {
  4781. "200": {
  4782. "description": "Successfully updated session",
  4783. "content": {
  4784. "application/json": {
  4785. "schema": {
  4786. "$ref": "#/components/schemas/Session"
  4787. }
  4788. }
  4789. }
  4790. },
  4791. "400": {
  4792. "description": "Bad request",
  4793. "content": {
  4794. "application/json": {
  4795. "schema": {
  4796. "$ref": "#/components/schemas/BadRequestError"
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "404": {
  4802. "description": "NotFoundError",
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "$ref": "#/components/schemas/NotFoundError"
  4807. }
  4808. }
  4809. }
  4810. }
  4811. },
  4812. "description": "Update properties of an existing session, such as title or other metadata.",
  4813. "summary": "Update session",
  4814. "requestBody": {
  4815. "content": {
  4816. "application/json": {
  4817. "schema": {
  4818. "type": "object",
  4819. "properties": {
  4820. "title": {
  4821. "type": "string"
  4822. },
  4823. "permission": {
  4824. "$ref": "#/components/schemas/PermissionRuleset"
  4825. },
  4826. "time": {
  4827. "type": "object",
  4828. "properties": {
  4829. "archived": {
  4830. "type": "number"
  4831. }
  4832. },
  4833. "additionalProperties": false
  4834. }
  4835. },
  4836. "additionalProperties": false
  4837. }
  4838. }
  4839. }
  4840. },
  4841. "x-codeSamples": [
  4842. {
  4843. "lang": "js",
  4844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4845. }
  4846. ]
  4847. }
  4848. },
  4849. "/session/{sessionID}/children": {
  4850. "get": {
  4851. "tags": ["session"],
  4852. "operationId": "session.children",
  4853. "parameters": [
  4854. {
  4855. "name": "sessionID",
  4856. "in": "path",
  4857. "schema": {
  4858. "type": "string",
  4859. "pattern": "^ses"
  4860. },
  4861. "required": true
  4862. },
  4863. {
  4864. "name": "directory",
  4865. "in": "query",
  4866. "schema": {
  4867. "type": "string"
  4868. },
  4869. "required": false
  4870. },
  4871. {
  4872. "name": "workspace",
  4873. "in": "query",
  4874. "schema": {
  4875. "type": "string"
  4876. },
  4877. "required": false
  4878. }
  4879. ],
  4880. "responses": {
  4881. "200": {
  4882. "description": "List of children",
  4883. "content": {
  4884. "application/json": {
  4885. "schema": {
  4886. "type": "array",
  4887. "items": {
  4888. "$ref": "#/components/schemas/Session"
  4889. },
  4890. "description": "List of children"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "400": {
  4896. "description": "Bad request",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/BadRequestError"
  4901. }
  4902. }
  4903. }
  4904. },
  4905. "404": {
  4906. "description": "NotFoundError",
  4907. "content": {
  4908. "application/json": {
  4909. "schema": {
  4910. "$ref": "#/components/schemas/NotFoundError"
  4911. }
  4912. }
  4913. }
  4914. }
  4915. },
  4916. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4917. "summary": "Get session children",
  4918. "x-codeSamples": [
  4919. {
  4920. "lang": "js",
  4921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4922. }
  4923. ]
  4924. }
  4925. },
  4926. "/session/{sessionID}/todo": {
  4927. "get": {
  4928. "tags": ["session"],
  4929. "operationId": "session.todo",
  4930. "parameters": [
  4931. {
  4932. "name": "sessionID",
  4933. "in": "path",
  4934. "schema": {
  4935. "type": "string",
  4936. "pattern": "^ses"
  4937. },
  4938. "required": true
  4939. },
  4940. {
  4941. "name": "directory",
  4942. "in": "query",
  4943. "schema": {
  4944. "type": "string"
  4945. },
  4946. "required": false
  4947. },
  4948. {
  4949. "name": "workspace",
  4950. "in": "query",
  4951. "schema": {
  4952. "type": "string"
  4953. },
  4954. "required": false
  4955. }
  4956. ],
  4957. "responses": {
  4958. "200": {
  4959. "description": "Todo list",
  4960. "content": {
  4961. "application/json": {
  4962. "schema": {
  4963. "type": "array",
  4964. "items": {
  4965. "$ref": "#/components/schemas/Todo"
  4966. },
  4967. "description": "Todo list"
  4968. }
  4969. }
  4970. }
  4971. },
  4972. "400": {
  4973. "description": "Bad request",
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "$ref": "#/components/schemas/BadRequestError"
  4978. }
  4979. }
  4980. }
  4981. },
  4982. "404": {
  4983. "description": "NotFoundError",
  4984. "content": {
  4985. "application/json": {
  4986. "schema": {
  4987. "$ref": "#/components/schemas/NotFoundError"
  4988. }
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4994. "summary": "Get session todos",
  4995. "x-codeSamples": [
  4996. {
  4997. "lang": "js",
  4998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4999. }
  5000. ]
  5001. }
  5002. },
  5003. "/session/{sessionID}/diff": {
  5004. "get": {
  5005. "tags": ["session"],
  5006. "operationId": "session.diff",
  5007. "parameters": [
  5008. {
  5009. "name": "sessionID",
  5010. "in": "path",
  5011. "schema": {
  5012. "type": "string",
  5013. "pattern": "^ses"
  5014. },
  5015. "required": true
  5016. },
  5017. {
  5018. "name": "directory",
  5019. "in": "query",
  5020. "schema": {
  5021. "type": "string"
  5022. },
  5023. "required": false
  5024. },
  5025. {
  5026. "name": "workspace",
  5027. "in": "query",
  5028. "schema": {
  5029. "type": "string"
  5030. },
  5031. "required": false
  5032. },
  5033. {
  5034. "name": "messageID",
  5035. "in": "query",
  5036. "schema": {
  5037. "type": "string",
  5038. "pattern": "^msg"
  5039. },
  5040. "required": false
  5041. }
  5042. ],
  5043. "responses": {
  5044. "200": {
  5045. "description": "Successfully retrieved diff",
  5046. "content": {
  5047. "application/json": {
  5048. "schema": {
  5049. "type": "array",
  5050. "items": {
  5051. "$ref": "#/components/schemas/SnapshotFileDiff"
  5052. },
  5053. "description": "Successfully retrieved diff"
  5054. }
  5055. }
  5056. }
  5057. }
  5058. },
  5059. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5060. "summary": "Get message diff",
  5061. "x-codeSamples": [
  5062. {
  5063. "lang": "js",
  5064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5065. }
  5066. ]
  5067. }
  5068. },
  5069. "/session/{sessionID}/message": {
  5070. "get": {
  5071. "tags": ["session"],
  5072. "operationId": "session.messages",
  5073. "parameters": [
  5074. {
  5075. "name": "sessionID",
  5076. "in": "path",
  5077. "schema": {
  5078. "type": "string",
  5079. "pattern": "^ses"
  5080. },
  5081. "required": true
  5082. },
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. },
  5099. {
  5100. "name": "limit",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "integer",
  5104. "minimum": 0,
  5105. "maximum": 9007199254740991
  5106. },
  5107. "required": false
  5108. },
  5109. {
  5110. "name": "before",
  5111. "in": "query",
  5112. "schema": {
  5113. "type": "string"
  5114. },
  5115. "required": false
  5116. }
  5117. ],
  5118. "responses": {
  5119. "200": {
  5120. "description": "List of messages",
  5121. "content": {
  5122. "application/json": {
  5123. "schema": {
  5124. "type": "array",
  5125. "items": {
  5126. "type": "object",
  5127. "properties": {
  5128. "info": {
  5129. "$ref": "#/components/schemas/Message"
  5130. },
  5131. "parts": {
  5132. "type": "array",
  5133. "items": {
  5134. "$ref": "#/components/schemas/Part"
  5135. }
  5136. }
  5137. },
  5138. "required": ["info", "parts"],
  5139. "additionalProperties": false
  5140. },
  5141. "description": "List of messages"
  5142. }
  5143. }
  5144. }
  5145. },
  5146. "400": {
  5147. "description": "Bad request",
  5148. "content": {
  5149. "application/json": {
  5150. "schema": {
  5151. "$ref": "#/components/schemas/BadRequestError"
  5152. }
  5153. }
  5154. }
  5155. },
  5156. "404": {
  5157. "description": "NotFoundError",
  5158. "content": {
  5159. "application/json": {
  5160. "schema": {
  5161. "$ref": "#/components/schemas/NotFoundError"
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5168. "summary": "Get session messages",
  5169. "x-codeSamples": [
  5170. {
  5171. "lang": "js",
  5172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5173. }
  5174. ]
  5175. },
  5176. "post": {
  5177. "tags": ["session"],
  5178. "operationId": "session.prompt",
  5179. "parameters": [
  5180. {
  5181. "name": "sessionID",
  5182. "in": "path",
  5183. "schema": {
  5184. "type": "string",
  5185. "pattern": "^ses"
  5186. },
  5187. "required": true
  5188. },
  5189. {
  5190. "name": "directory",
  5191. "in": "query",
  5192. "schema": {
  5193. "type": "string"
  5194. },
  5195. "required": false
  5196. },
  5197. {
  5198. "name": "workspace",
  5199. "in": "query",
  5200. "schema": {
  5201. "type": "string"
  5202. },
  5203. "required": false
  5204. }
  5205. ],
  5206. "responses": {
  5207. "200": {
  5208. "description": "Created message",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "type": "object",
  5213. "required": ["info", "parts"],
  5214. "properties": {
  5215. "info": {
  5216. "$ref": "#/components/schemas/AssistantMessage"
  5217. },
  5218. "parts": {
  5219. "type": "array",
  5220. "items": {
  5221. "$ref": "#/components/schemas/Part"
  5222. }
  5223. }
  5224. }
  5225. }
  5226. }
  5227. }
  5228. },
  5229. "400": {
  5230. "description": "Bad request",
  5231. "content": {
  5232. "application/json": {
  5233. "schema": {
  5234. "$ref": "#/components/schemas/BadRequestError"
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "404": {
  5240. "description": "NotFoundError",
  5241. "content": {
  5242. "application/json": {
  5243. "schema": {
  5244. "$ref": "#/components/schemas/NotFoundError"
  5245. }
  5246. }
  5247. }
  5248. }
  5249. },
  5250. "description": "Create and send a new message to a session, streaming the AI response.",
  5251. "summary": "Send message",
  5252. "requestBody": {
  5253. "content": {
  5254. "application/json": {
  5255. "schema": {
  5256. "type": "object",
  5257. "properties": {
  5258. "messageID": {
  5259. "type": "string",
  5260. "pattern": "^msg"
  5261. },
  5262. "model": {
  5263. "type": "object",
  5264. "properties": {
  5265. "providerID": {
  5266. "type": "string"
  5267. },
  5268. "modelID": {
  5269. "type": "string"
  5270. }
  5271. },
  5272. "required": ["providerID", "modelID"],
  5273. "additionalProperties": false
  5274. },
  5275. "agent": {
  5276. "type": "string"
  5277. },
  5278. "noReply": {
  5279. "type": "boolean"
  5280. },
  5281. "tools": {
  5282. "type": "object",
  5283. "additionalProperties": {
  5284. "type": "boolean"
  5285. }
  5286. },
  5287. "format": {
  5288. "$ref": "#/components/schemas/OutputFormat"
  5289. },
  5290. "system": {
  5291. "type": "string"
  5292. },
  5293. "variant": {
  5294. "type": "string"
  5295. },
  5296. "parts": {
  5297. "type": "array",
  5298. "items": {
  5299. "anyOf": [
  5300. {
  5301. "$ref": "#/components/schemas/TextPartInput"
  5302. },
  5303. {
  5304. "$ref": "#/components/schemas/FilePartInput"
  5305. },
  5306. {
  5307. "$ref": "#/components/schemas/AgentPartInput"
  5308. },
  5309. {
  5310. "$ref": "#/components/schemas/SubtaskPartInput"
  5311. }
  5312. ]
  5313. }
  5314. }
  5315. },
  5316. "required": ["parts"],
  5317. "additionalProperties": false
  5318. }
  5319. }
  5320. }
  5321. },
  5322. "x-codeSamples": [
  5323. {
  5324. "lang": "js",
  5325. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5326. }
  5327. ]
  5328. }
  5329. },
  5330. "/session/{sessionID}/message/{messageID}": {
  5331. "get": {
  5332. "tags": ["session"],
  5333. "operationId": "session.message",
  5334. "parameters": [
  5335. {
  5336. "name": "sessionID",
  5337. "in": "path",
  5338. "schema": {
  5339. "type": "string",
  5340. "pattern": "^ses"
  5341. },
  5342. "required": true
  5343. },
  5344. {
  5345. "name": "messageID",
  5346. "in": "path",
  5347. "schema": {
  5348. "type": "string",
  5349. "pattern": "^msg"
  5350. },
  5351. "required": true
  5352. },
  5353. {
  5354. "name": "directory",
  5355. "in": "query",
  5356. "schema": {
  5357. "type": "string"
  5358. },
  5359. "required": false
  5360. },
  5361. {
  5362. "name": "workspace",
  5363. "in": "query",
  5364. "schema": {
  5365. "type": "string"
  5366. },
  5367. "required": false
  5368. }
  5369. ],
  5370. "responses": {
  5371. "200": {
  5372. "description": "Message",
  5373. "content": {
  5374. "application/json": {
  5375. "schema": {
  5376. "type": "object",
  5377. "properties": {
  5378. "info": {
  5379. "$ref": "#/components/schemas/Message"
  5380. },
  5381. "parts": {
  5382. "type": "array",
  5383. "items": {
  5384. "$ref": "#/components/schemas/Part"
  5385. }
  5386. }
  5387. },
  5388. "required": ["info", "parts"],
  5389. "additionalProperties": false,
  5390. "description": "Message"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "400": {
  5396. "description": "Bad request",
  5397. "content": {
  5398. "application/json": {
  5399. "schema": {
  5400. "$ref": "#/components/schemas/BadRequestError"
  5401. }
  5402. }
  5403. }
  5404. },
  5405. "404": {
  5406. "description": "NotFoundError",
  5407. "content": {
  5408. "application/json": {
  5409. "schema": {
  5410. "$ref": "#/components/schemas/NotFoundError"
  5411. }
  5412. }
  5413. }
  5414. }
  5415. },
  5416. "description": "Retrieve a specific message from a session by its message ID.",
  5417. "summary": "Get message",
  5418. "x-codeSamples": [
  5419. {
  5420. "lang": "js",
  5421. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5422. }
  5423. ]
  5424. },
  5425. "delete": {
  5426. "tags": ["session"],
  5427. "operationId": "session.deleteMessage",
  5428. "parameters": [
  5429. {
  5430. "name": "sessionID",
  5431. "in": "path",
  5432. "schema": {
  5433. "type": "string",
  5434. "pattern": "^ses"
  5435. },
  5436. "required": true
  5437. },
  5438. {
  5439. "name": "messageID",
  5440. "in": "path",
  5441. "schema": {
  5442. "type": "string",
  5443. "pattern": "^msg"
  5444. },
  5445. "required": true
  5446. },
  5447. {
  5448. "name": "directory",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. },
  5455. {
  5456. "name": "workspace",
  5457. "in": "query",
  5458. "schema": {
  5459. "type": "string"
  5460. },
  5461. "required": false
  5462. }
  5463. ],
  5464. "responses": {
  5465. "200": {
  5466. "description": "Successfully deleted message",
  5467. "content": {
  5468. "application/json": {
  5469. "schema": {
  5470. "type": "boolean",
  5471. "description": "Successfully deleted message"
  5472. }
  5473. }
  5474. }
  5475. },
  5476. "400": {
  5477. "description": "Bad request",
  5478. "content": {
  5479. "application/json": {
  5480. "schema": {
  5481. "$ref": "#/components/schemas/BadRequestError"
  5482. }
  5483. }
  5484. }
  5485. },
  5486. "404": {
  5487. "description": "NotFoundError",
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "$ref": "#/components/schemas/NotFoundError"
  5492. }
  5493. }
  5494. }
  5495. }
  5496. },
  5497. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5498. "summary": "Delete message",
  5499. "x-codeSamples": [
  5500. {
  5501. "lang": "js",
  5502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5503. }
  5504. ]
  5505. }
  5506. },
  5507. "/session/{sessionID}/fork": {
  5508. "post": {
  5509. "tags": ["session"],
  5510. "operationId": "session.fork",
  5511. "parameters": [
  5512. {
  5513. "name": "sessionID",
  5514. "in": "path",
  5515. "schema": {
  5516. "type": "string",
  5517. "pattern": "^ses"
  5518. },
  5519. "required": true
  5520. },
  5521. {
  5522. "name": "directory",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. },
  5529. {
  5530. "name": "workspace",
  5531. "in": "query",
  5532. "schema": {
  5533. "type": "string"
  5534. },
  5535. "required": false
  5536. }
  5537. ],
  5538. "responses": {
  5539. "200": {
  5540. "description": "200",
  5541. "content": {
  5542. "application/json": {
  5543. "schema": {
  5544. "$ref": "#/components/schemas/Session"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "Bad request",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "$ref": "#/components/schemas/BadRequestError"
  5555. }
  5556. }
  5557. }
  5558. },
  5559. "404": {
  5560. "description": "NotFoundError",
  5561. "content": {
  5562. "application/json": {
  5563. "schema": {
  5564. "$ref": "#/components/schemas/NotFoundError"
  5565. }
  5566. }
  5567. }
  5568. }
  5569. },
  5570. "description": "Create a new session by forking an existing session at a specific message point.",
  5571. "summary": "Fork session",
  5572. "requestBody": {
  5573. "content": {
  5574. "application/json": {
  5575. "schema": {
  5576. "type": "object",
  5577. "properties": {
  5578. "messageID": {
  5579. "type": "string",
  5580. "pattern": "^msg"
  5581. }
  5582. },
  5583. "additionalProperties": false
  5584. }
  5585. }
  5586. }
  5587. },
  5588. "x-codeSamples": [
  5589. {
  5590. "lang": "js",
  5591. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5592. }
  5593. ]
  5594. }
  5595. },
  5596. "/session/{sessionID}/abort": {
  5597. "post": {
  5598. "tags": ["session"],
  5599. "operationId": "session.abort",
  5600. "parameters": [
  5601. {
  5602. "name": "sessionID",
  5603. "in": "path",
  5604. "schema": {
  5605. "type": "string",
  5606. "pattern": "^ses"
  5607. },
  5608. "required": true
  5609. },
  5610. {
  5611. "name": "directory",
  5612. "in": "query",
  5613. "schema": {
  5614. "type": "string"
  5615. },
  5616. "required": false
  5617. },
  5618. {
  5619. "name": "workspace",
  5620. "in": "query",
  5621. "schema": {
  5622. "type": "string"
  5623. },
  5624. "required": false
  5625. }
  5626. ],
  5627. "responses": {
  5628. "200": {
  5629. "description": "Aborted session",
  5630. "content": {
  5631. "application/json": {
  5632. "schema": {
  5633. "type": "boolean",
  5634. "description": "Aborted session"
  5635. }
  5636. }
  5637. }
  5638. },
  5639. "400": {
  5640. "description": "Bad request",
  5641. "content": {
  5642. "application/json": {
  5643. "schema": {
  5644. "$ref": "#/components/schemas/BadRequestError"
  5645. }
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5651. "summary": "Abort session",
  5652. "x-codeSamples": [
  5653. {
  5654. "lang": "js",
  5655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5656. }
  5657. ]
  5658. }
  5659. },
  5660. "/session/{sessionID}/init": {
  5661. "post": {
  5662. "tags": ["session"],
  5663. "operationId": "session.init",
  5664. "parameters": [
  5665. {
  5666. "name": "sessionID",
  5667. "in": "path",
  5668. "schema": {
  5669. "type": "string",
  5670. "pattern": "^ses"
  5671. },
  5672. "required": true
  5673. },
  5674. {
  5675. "name": "directory",
  5676. "in": "query",
  5677. "schema": {
  5678. "type": "string"
  5679. },
  5680. "required": false
  5681. },
  5682. {
  5683. "name": "workspace",
  5684. "in": "query",
  5685. "schema": {
  5686. "type": "string"
  5687. },
  5688. "required": false
  5689. }
  5690. ],
  5691. "responses": {
  5692. "200": {
  5693. "description": "200",
  5694. "content": {
  5695. "application/json": {
  5696. "schema": {
  5697. "type": "boolean",
  5698. "description": "200"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "400": {
  5704. "description": "Bad request",
  5705. "content": {
  5706. "application/json": {
  5707. "schema": {
  5708. "$ref": "#/components/schemas/BadRequestError"
  5709. }
  5710. }
  5711. }
  5712. },
  5713. "404": {
  5714. "description": "NotFoundError",
  5715. "content": {
  5716. "application/json": {
  5717. "schema": {
  5718. "$ref": "#/components/schemas/NotFoundError"
  5719. }
  5720. }
  5721. }
  5722. }
  5723. },
  5724. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5725. "summary": "Initialize session",
  5726. "requestBody": {
  5727. "content": {
  5728. "application/json": {
  5729. "schema": {
  5730. "type": "object",
  5731. "properties": {
  5732. "modelID": {
  5733. "type": "string"
  5734. },
  5735. "providerID": {
  5736. "type": "string"
  5737. },
  5738. "messageID": {
  5739. "type": "string",
  5740. "pattern": "^msg"
  5741. }
  5742. },
  5743. "required": ["modelID", "providerID", "messageID"],
  5744. "additionalProperties": false
  5745. }
  5746. }
  5747. }
  5748. },
  5749. "x-codeSamples": [
  5750. {
  5751. "lang": "js",
  5752. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5753. }
  5754. ]
  5755. }
  5756. },
  5757. "/session/{sessionID}/share": {
  5758. "post": {
  5759. "tags": ["session"],
  5760. "operationId": "session.share",
  5761. "parameters": [
  5762. {
  5763. "name": "sessionID",
  5764. "in": "path",
  5765. "schema": {
  5766. "type": "string",
  5767. "pattern": "^ses"
  5768. },
  5769. "required": true
  5770. },
  5771. {
  5772. "name": "directory",
  5773. "in": "query",
  5774. "schema": {
  5775. "type": "string"
  5776. },
  5777. "required": false
  5778. },
  5779. {
  5780. "name": "workspace",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. }
  5787. ],
  5788. "responses": {
  5789. "200": {
  5790. "description": "Successfully shared session",
  5791. "content": {
  5792. "application/json": {
  5793. "schema": {
  5794. "$ref": "#/components/schemas/Session"
  5795. }
  5796. }
  5797. }
  5798. },
  5799. "404": {
  5800. "description": "NotFoundError",
  5801. "content": {
  5802. "application/json": {
  5803. "schema": {
  5804. "$ref": "#/components/schemas/NotFoundError"
  5805. }
  5806. }
  5807. }
  5808. },
  5809. "500": {
  5810. "description": "InternalServerError",
  5811. "content": {
  5812. "application/json": {
  5813. "schema": {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5815. }
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5821. "summary": "Share session",
  5822. "x-codeSamples": [
  5823. {
  5824. "lang": "js",
  5825. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5826. }
  5827. ]
  5828. },
  5829. "delete": {
  5830. "tags": ["session"],
  5831. "operationId": "session.unshare",
  5832. "parameters": [
  5833. {
  5834. "name": "sessionID",
  5835. "in": "path",
  5836. "schema": {
  5837. "type": "string",
  5838. "pattern": "^ses"
  5839. },
  5840. "required": true
  5841. },
  5842. {
  5843. "name": "directory",
  5844. "in": "query",
  5845. "schema": {
  5846. "type": "string"
  5847. },
  5848. "required": false
  5849. },
  5850. {
  5851. "name": "workspace",
  5852. "in": "query",
  5853. "schema": {
  5854. "type": "string"
  5855. },
  5856. "required": false
  5857. }
  5858. ],
  5859. "responses": {
  5860. "200": {
  5861. "description": "Successfully unshared session",
  5862. "content": {
  5863. "application/json": {
  5864. "schema": {
  5865. "$ref": "#/components/schemas/Session"
  5866. }
  5867. }
  5868. }
  5869. },
  5870. "404": {
  5871. "description": "NotFoundError",
  5872. "content": {
  5873. "application/json": {
  5874. "schema": {
  5875. "$ref": "#/components/schemas/NotFoundError"
  5876. }
  5877. }
  5878. }
  5879. },
  5880. "500": {
  5881. "description": "InternalServerError",
  5882. "content": {
  5883. "application/json": {
  5884. "schema": {
  5885. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5886. }
  5887. }
  5888. }
  5889. }
  5890. },
  5891. "description": "Remove the shareable link for a session, making it private again.",
  5892. "summary": "Unshare session",
  5893. "x-codeSamples": [
  5894. {
  5895. "lang": "js",
  5896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5897. }
  5898. ]
  5899. }
  5900. },
  5901. "/session/{sessionID}/summarize": {
  5902. "post": {
  5903. "tags": ["session"],
  5904. "operationId": "session.summarize",
  5905. "parameters": [
  5906. {
  5907. "name": "sessionID",
  5908. "in": "path",
  5909. "schema": {
  5910. "type": "string",
  5911. "pattern": "^ses"
  5912. },
  5913. "required": true
  5914. },
  5915. {
  5916. "name": "directory",
  5917. "in": "query",
  5918. "schema": {
  5919. "type": "string"
  5920. },
  5921. "required": false
  5922. },
  5923. {
  5924. "name": "workspace",
  5925. "in": "query",
  5926. "schema": {
  5927. "type": "string"
  5928. },
  5929. "required": false
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "description": "Summarized session",
  5935. "content": {
  5936. "application/json": {
  5937. "schema": {
  5938. "type": "boolean",
  5939. "description": "Summarized session"
  5940. }
  5941. }
  5942. }
  5943. },
  5944. "400": {
  5945. "description": "Bad request",
  5946. "content": {
  5947. "application/json": {
  5948. "schema": {
  5949. "$ref": "#/components/schemas/BadRequestError"
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "404": {
  5955. "description": "NotFoundError",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/NotFoundError"
  5960. }
  5961. }
  5962. }
  5963. }
  5964. },
  5965. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5966. "summary": "Summarize session",
  5967. "requestBody": {
  5968. "content": {
  5969. "application/json": {
  5970. "schema": {
  5971. "type": "object",
  5972. "properties": {
  5973. "providerID": {
  5974. "type": "string"
  5975. },
  5976. "modelID": {
  5977. "type": "string"
  5978. },
  5979. "auto": {
  5980. "type": "boolean"
  5981. }
  5982. },
  5983. "required": ["providerID", "modelID"],
  5984. "additionalProperties": false
  5985. }
  5986. }
  5987. }
  5988. },
  5989. "x-codeSamples": [
  5990. {
  5991. "lang": "js",
  5992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5993. }
  5994. ]
  5995. }
  5996. },
  5997. "/session/{sessionID}/prompt_async": {
  5998. "post": {
  5999. "tags": ["session"],
  6000. "operationId": "session.prompt_async",
  6001. "parameters": [
  6002. {
  6003. "name": "sessionID",
  6004. "in": "path",
  6005. "schema": {
  6006. "type": "string",
  6007. "pattern": "^ses"
  6008. },
  6009. "required": true
  6010. },
  6011. {
  6012. "name": "directory",
  6013. "in": "query",
  6014. "schema": {
  6015. "type": "string"
  6016. },
  6017. "required": false
  6018. },
  6019. {
  6020. "name": "workspace",
  6021. "in": "query",
  6022. "schema": {
  6023. "type": "string"
  6024. },
  6025. "required": false
  6026. }
  6027. ],
  6028. "responses": {
  6029. "204": {
  6030. "description": "Prompt accepted"
  6031. },
  6032. "400": {
  6033. "description": "Bad request",
  6034. "content": {
  6035. "application/json": {
  6036. "schema": {
  6037. "$ref": "#/components/schemas/BadRequestError"
  6038. }
  6039. }
  6040. }
  6041. },
  6042. "404": {
  6043. "description": "NotFoundError",
  6044. "content": {
  6045. "application/json": {
  6046. "schema": {
  6047. "$ref": "#/components/schemas/NotFoundError"
  6048. }
  6049. }
  6050. }
  6051. }
  6052. },
  6053. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6054. "summary": "Send async message",
  6055. "requestBody": {
  6056. "content": {
  6057. "application/json": {
  6058. "schema": {
  6059. "type": "object",
  6060. "properties": {
  6061. "messageID": {
  6062. "type": "string",
  6063. "pattern": "^msg"
  6064. },
  6065. "model": {
  6066. "type": "object",
  6067. "properties": {
  6068. "providerID": {
  6069. "type": "string"
  6070. },
  6071. "modelID": {
  6072. "type": "string"
  6073. }
  6074. },
  6075. "required": ["providerID", "modelID"],
  6076. "additionalProperties": false
  6077. },
  6078. "agent": {
  6079. "type": "string"
  6080. },
  6081. "noReply": {
  6082. "type": "boolean"
  6083. },
  6084. "tools": {
  6085. "type": "object",
  6086. "additionalProperties": {
  6087. "type": "boolean"
  6088. }
  6089. },
  6090. "format": {
  6091. "$ref": "#/components/schemas/OutputFormat"
  6092. },
  6093. "system": {
  6094. "type": "string"
  6095. },
  6096. "variant": {
  6097. "type": "string"
  6098. },
  6099. "parts": {
  6100. "type": "array",
  6101. "items": {
  6102. "anyOf": [
  6103. {
  6104. "$ref": "#/components/schemas/TextPartInput"
  6105. },
  6106. {
  6107. "$ref": "#/components/schemas/FilePartInput"
  6108. },
  6109. {
  6110. "$ref": "#/components/schemas/AgentPartInput"
  6111. },
  6112. {
  6113. "$ref": "#/components/schemas/SubtaskPartInput"
  6114. }
  6115. ]
  6116. }
  6117. }
  6118. },
  6119. "required": ["parts"],
  6120. "additionalProperties": false
  6121. }
  6122. }
  6123. }
  6124. },
  6125. "x-codeSamples": [
  6126. {
  6127. "lang": "js",
  6128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6129. }
  6130. ]
  6131. }
  6132. },
  6133. "/session/{sessionID}/command": {
  6134. "post": {
  6135. "tags": ["session"],
  6136. "operationId": "session.command",
  6137. "parameters": [
  6138. {
  6139. "name": "sessionID",
  6140. "in": "path",
  6141. "schema": {
  6142. "type": "string",
  6143. "pattern": "^ses"
  6144. },
  6145. "required": true
  6146. },
  6147. {
  6148. "name": "directory",
  6149. "in": "query",
  6150. "schema": {
  6151. "type": "string"
  6152. },
  6153. "required": false
  6154. },
  6155. {
  6156. "name": "workspace",
  6157. "in": "query",
  6158. "schema": {
  6159. "type": "string"
  6160. },
  6161. "required": false
  6162. }
  6163. ],
  6164. "responses": {
  6165. "200": {
  6166. "description": "Created message",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "type": "object",
  6171. "required": ["info", "parts"],
  6172. "properties": {
  6173. "info": {
  6174. "$ref": "#/components/schemas/AssistantMessage"
  6175. },
  6176. "parts": {
  6177. "type": "array",
  6178. "items": {
  6179. "$ref": "#/components/schemas/Part"
  6180. }
  6181. }
  6182. }
  6183. }
  6184. }
  6185. }
  6186. },
  6187. "400": {
  6188. "description": "Bad request",
  6189. "content": {
  6190. "application/json": {
  6191. "schema": {
  6192. "$ref": "#/components/schemas/BadRequestError"
  6193. }
  6194. }
  6195. }
  6196. },
  6197. "404": {
  6198. "description": "NotFoundError",
  6199. "content": {
  6200. "application/json": {
  6201. "schema": {
  6202. "$ref": "#/components/schemas/NotFoundError"
  6203. }
  6204. }
  6205. }
  6206. }
  6207. },
  6208. "description": "Send a new command to a session for execution by the AI assistant.",
  6209. "summary": "Send command",
  6210. "requestBody": {
  6211. "content": {
  6212. "application/json": {
  6213. "schema": {
  6214. "type": "object",
  6215. "properties": {
  6216. "messageID": {
  6217. "type": "string",
  6218. "pattern": "^msg"
  6219. },
  6220. "agent": {
  6221. "type": "string"
  6222. },
  6223. "model": {
  6224. "type": "string"
  6225. },
  6226. "arguments": {
  6227. "type": "string"
  6228. },
  6229. "command": {
  6230. "type": "string"
  6231. },
  6232. "variant": {
  6233. "type": "string"
  6234. },
  6235. "parts": {
  6236. "type": "array",
  6237. "items": {
  6238. "type": "object",
  6239. "properties": {
  6240. "id": {
  6241. "type": "string",
  6242. "pattern": "^prt"
  6243. },
  6244. "type": {
  6245. "type": "string",
  6246. "enum": ["file"]
  6247. },
  6248. "mime": {
  6249. "type": "string"
  6250. },
  6251. "filename": {
  6252. "type": "string"
  6253. },
  6254. "url": {
  6255. "type": "string"
  6256. },
  6257. "source": {
  6258. "$ref": "#/components/schemas/FilePartSource"
  6259. }
  6260. },
  6261. "required": ["type", "mime", "url"],
  6262. "additionalProperties": false
  6263. }
  6264. }
  6265. },
  6266. "required": ["arguments", "command"],
  6267. "additionalProperties": false
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "x-codeSamples": [
  6273. {
  6274. "lang": "js",
  6275. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6276. }
  6277. ]
  6278. }
  6279. },
  6280. "/session/{sessionID}/shell": {
  6281. "post": {
  6282. "tags": ["session"],
  6283. "operationId": "session.shell",
  6284. "parameters": [
  6285. {
  6286. "name": "sessionID",
  6287. "in": "path",
  6288. "schema": {
  6289. "type": "string",
  6290. "pattern": "^ses"
  6291. },
  6292. "required": true
  6293. },
  6294. {
  6295. "name": "directory",
  6296. "in": "query",
  6297. "schema": {
  6298. "type": "string"
  6299. },
  6300. "required": false
  6301. },
  6302. {
  6303. "name": "workspace",
  6304. "in": "query",
  6305. "schema": {
  6306. "type": "string"
  6307. },
  6308. "required": false
  6309. }
  6310. ],
  6311. "responses": {
  6312. "200": {
  6313. "description": "Created message",
  6314. "content": {
  6315. "application/json": {
  6316. "schema": {
  6317. "type": "object",
  6318. "properties": {
  6319. "info": {
  6320. "$ref": "#/components/schemas/Message"
  6321. },
  6322. "parts": {
  6323. "type": "array",
  6324. "items": {
  6325. "$ref": "#/components/schemas/Part"
  6326. }
  6327. }
  6328. },
  6329. "required": ["info", "parts"],
  6330. "additionalProperties": false,
  6331. "description": "Created message"
  6332. }
  6333. }
  6334. }
  6335. },
  6336. "400": {
  6337. "description": "Bad request",
  6338. "content": {
  6339. "application/json": {
  6340. "schema": {
  6341. "$ref": "#/components/schemas/BadRequestError"
  6342. }
  6343. }
  6344. }
  6345. },
  6346. "404": {
  6347. "description": "NotFoundError",
  6348. "content": {
  6349. "application/json": {
  6350. "schema": {
  6351. "$ref": "#/components/schemas/NotFoundError"
  6352. }
  6353. }
  6354. }
  6355. }
  6356. },
  6357. "description": "Execute a shell command within the session context and return the AI's response.",
  6358. "summary": "Run shell command",
  6359. "requestBody": {
  6360. "content": {
  6361. "application/json": {
  6362. "schema": {
  6363. "type": "object",
  6364. "properties": {
  6365. "messageID": {
  6366. "type": "string",
  6367. "pattern": "^msg"
  6368. },
  6369. "agent": {
  6370. "type": "string"
  6371. },
  6372. "model": {
  6373. "type": "object",
  6374. "properties": {
  6375. "providerID": {
  6376. "type": "string"
  6377. },
  6378. "modelID": {
  6379. "type": "string"
  6380. }
  6381. },
  6382. "required": ["providerID", "modelID"],
  6383. "additionalProperties": false
  6384. },
  6385. "command": {
  6386. "type": "string"
  6387. }
  6388. },
  6389. "required": ["agent", "command"],
  6390. "additionalProperties": false
  6391. }
  6392. }
  6393. }
  6394. },
  6395. "x-codeSamples": [
  6396. {
  6397. "lang": "js",
  6398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6399. }
  6400. ]
  6401. }
  6402. },
  6403. "/session/{sessionID}/revert": {
  6404. "post": {
  6405. "tags": ["session"],
  6406. "operationId": "session.revert",
  6407. "parameters": [
  6408. {
  6409. "name": "sessionID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^ses"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Updated session",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "$ref": "#/components/schemas/Session"
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "400": {
  6446. "description": "Bad request",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/BadRequestError"
  6451. }
  6452. }
  6453. }
  6454. },
  6455. "404": {
  6456. "description": "NotFoundError",
  6457. "content": {
  6458. "application/json": {
  6459. "schema": {
  6460. "$ref": "#/components/schemas/NotFoundError"
  6461. }
  6462. }
  6463. }
  6464. }
  6465. },
  6466. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6467. "summary": "Revert message",
  6468. "requestBody": {
  6469. "content": {
  6470. "application/json": {
  6471. "schema": {
  6472. "type": "object",
  6473. "properties": {
  6474. "messageID": {
  6475. "type": "string",
  6476. "pattern": "^msg"
  6477. },
  6478. "partID": {
  6479. "type": "string",
  6480. "pattern": "^prt"
  6481. }
  6482. },
  6483. "required": ["messageID"],
  6484. "additionalProperties": false
  6485. }
  6486. }
  6487. }
  6488. },
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6493. }
  6494. ]
  6495. }
  6496. },
  6497. "/session/{sessionID}/unrevert": {
  6498. "post": {
  6499. "tags": ["session"],
  6500. "operationId": "session.unrevert",
  6501. "parameters": [
  6502. {
  6503. "name": "sessionID",
  6504. "in": "path",
  6505. "schema": {
  6506. "type": "string",
  6507. "pattern": "^ses"
  6508. },
  6509. "required": true
  6510. },
  6511. {
  6512. "name": "directory",
  6513. "in": "query",
  6514. "schema": {
  6515. "type": "string"
  6516. },
  6517. "required": false
  6518. },
  6519. {
  6520. "name": "workspace",
  6521. "in": "query",
  6522. "schema": {
  6523. "type": "string"
  6524. },
  6525. "required": false
  6526. }
  6527. ],
  6528. "responses": {
  6529. "200": {
  6530. "description": "Updated session",
  6531. "content": {
  6532. "application/json": {
  6533. "schema": {
  6534. "$ref": "#/components/schemas/Session"
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "400": {
  6540. "description": "Bad request",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/BadRequestError"
  6545. }
  6546. }
  6547. }
  6548. },
  6549. "404": {
  6550. "description": "NotFoundError",
  6551. "content": {
  6552. "application/json": {
  6553. "schema": {
  6554. "$ref": "#/components/schemas/NotFoundError"
  6555. }
  6556. }
  6557. }
  6558. }
  6559. },
  6560. "description": "Restore all previously reverted messages in a session.",
  6561. "summary": "Restore reverted messages",
  6562. "x-codeSamples": [
  6563. {
  6564. "lang": "js",
  6565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6566. }
  6567. ]
  6568. }
  6569. },
  6570. "/session/{sessionID}/permissions/{permissionID}": {
  6571. "post": {
  6572. "tags": ["session"],
  6573. "operationId": "permission.respond",
  6574. "parameters": [
  6575. {
  6576. "name": "sessionID",
  6577. "in": "path",
  6578. "schema": {
  6579. "type": "string",
  6580. "pattern": "^ses"
  6581. },
  6582. "required": true
  6583. },
  6584. {
  6585. "name": "permissionID",
  6586. "in": "path",
  6587. "schema": {
  6588. "type": "string",
  6589. "pattern": "^per"
  6590. },
  6591. "required": true
  6592. },
  6593. {
  6594. "name": "directory",
  6595. "in": "query",
  6596. "schema": {
  6597. "type": "string"
  6598. },
  6599. "required": false
  6600. },
  6601. {
  6602. "name": "workspace",
  6603. "in": "query",
  6604. "schema": {
  6605. "type": "string"
  6606. },
  6607. "required": false
  6608. }
  6609. ],
  6610. "responses": {
  6611. "200": {
  6612. "description": "Permission processed successfully",
  6613. "content": {
  6614. "application/json": {
  6615. "schema": {
  6616. "type": "boolean",
  6617. "description": "Permission processed successfully"
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "400": {
  6623. "description": "Bad request",
  6624. "content": {
  6625. "application/json": {
  6626. "schema": {
  6627. "$ref": "#/components/schemas/BadRequestError"
  6628. }
  6629. }
  6630. }
  6631. },
  6632. "404": {
  6633. "description": "NotFoundError",
  6634. "content": {
  6635. "application/json": {
  6636. "schema": {
  6637. "$ref": "#/components/schemas/NotFoundError"
  6638. }
  6639. }
  6640. }
  6641. }
  6642. },
  6643. "description": "Approve or deny a permission request from the AI assistant.",
  6644. "summary": "Respond to permission",
  6645. "deprecated": true,
  6646. "requestBody": {
  6647. "content": {
  6648. "application/json": {
  6649. "schema": {
  6650. "type": "object",
  6651. "properties": {
  6652. "response": {
  6653. "type": "string",
  6654. "enum": ["once", "always", "reject"]
  6655. }
  6656. },
  6657. "required": ["response"],
  6658. "additionalProperties": false
  6659. }
  6660. }
  6661. }
  6662. },
  6663. "x-codeSamples": [
  6664. {
  6665. "lang": "js",
  6666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6667. }
  6668. ]
  6669. }
  6670. },
  6671. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6672. "delete": {
  6673. "tags": ["session"],
  6674. "operationId": "part.delete",
  6675. "parameters": [
  6676. {
  6677. "name": "sessionID",
  6678. "in": "path",
  6679. "schema": {
  6680. "type": "string",
  6681. "pattern": "^ses"
  6682. },
  6683. "required": true
  6684. },
  6685. {
  6686. "name": "messageID",
  6687. "in": "path",
  6688. "schema": {
  6689. "type": "string",
  6690. "pattern": "^msg"
  6691. },
  6692. "required": true
  6693. },
  6694. {
  6695. "name": "partID",
  6696. "in": "path",
  6697. "schema": {
  6698. "type": "string",
  6699. "pattern": "^prt"
  6700. },
  6701. "required": true
  6702. },
  6703. {
  6704. "name": "directory",
  6705. "in": "query",
  6706. "schema": {
  6707. "type": "string"
  6708. },
  6709. "required": false
  6710. },
  6711. {
  6712. "name": "workspace",
  6713. "in": "query",
  6714. "schema": {
  6715. "type": "string"
  6716. },
  6717. "required": false
  6718. }
  6719. ],
  6720. "responses": {
  6721. "200": {
  6722. "description": "Successfully deleted part",
  6723. "content": {
  6724. "application/json": {
  6725. "schema": {
  6726. "type": "boolean",
  6727. "description": "Successfully deleted part"
  6728. }
  6729. }
  6730. }
  6731. },
  6732. "400": {
  6733. "description": "Bad request",
  6734. "content": {
  6735. "application/json": {
  6736. "schema": {
  6737. "$ref": "#/components/schemas/BadRequestError"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "404": {
  6743. "description": "NotFoundError",
  6744. "content": {
  6745. "application/json": {
  6746. "schema": {
  6747. "$ref": "#/components/schemas/NotFoundError"
  6748. }
  6749. }
  6750. }
  6751. }
  6752. },
  6753. "description": "Delete a part from a message.",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6758. }
  6759. ]
  6760. },
  6761. "patch": {
  6762. "tags": ["session"],
  6763. "operationId": "part.update",
  6764. "parameters": [
  6765. {
  6766. "name": "sessionID",
  6767. "in": "path",
  6768. "schema": {
  6769. "type": "string",
  6770. "pattern": "^ses"
  6771. },
  6772. "required": true
  6773. },
  6774. {
  6775. "name": "messageID",
  6776. "in": "path",
  6777. "schema": {
  6778. "type": "string",
  6779. "pattern": "^msg"
  6780. },
  6781. "required": true
  6782. },
  6783. {
  6784. "name": "partID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^prt"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "Successfully updated part",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "$ref": "#/components/schemas/Part"
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "400": {
  6821. "description": "Bad request",
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/BadRequestError"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "404": {
  6831. "description": "NotFoundError",
  6832. "content": {
  6833. "application/json": {
  6834. "schema": {
  6835. "$ref": "#/components/schemas/NotFoundError"
  6836. }
  6837. }
  6838. }
  6839. }
  6840. },
  6841. "description": "Update a part in a message.",
  6842. "requestBody": {
  6843. "content": {
  6844. "application/json": {
  6845. "schema": {
  6846. "$ref": "#/components/schemas/Part"
  6847. }
  6848. }
  6849. }
  6850. },
  6851. "x-codeSamples": [
  6852. {
  6853. "lang": "js",
  6854. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6855. }
  6856. ]
  6857. }
  6858. },
  6859. "/sync/start": {
  6860. "post": {
  6861. "tags": ["sync"],
  6862. "operationId": "sync.start",
  6863. "parameters": [
  6864. {
  6865. "name": "directory",
  6866. "in": "query",
  6867. "schema": {
  6868. "type": "string"
  6869. },
  6870. "required": false
  6871. },
  6872. {
  6873. "name": "workspace",
  6874. "in": "query",
  6875. "schema": {
  6876. "type": "string"
  6877. },
  6878. "required": false
  6879. }
  6880. ],
  6881. "responses": {
  6882. "200": {
  6883. "description": "Workspace sync started",
  6884. "content": {
  6885. "application/json": {
  6886. "schema": {
  6887. "type": "boolean",
  6888. "description": "Workspace sync started"
  6889. }
  6890. }
  6891. }
  6892. }
  6893. },
  6894. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6895. "summary": "Start workspace sync",
  6896. "x-codeSamples": [
  6897. {
  6898. "lang": "js",
  6899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6900. }
  6901. ]
  6902. }
  6903. },
  6904. "/sync/replay": {
  6905. "post": {
  6906. "tags": ["sync"],
  6907. "operationId": "sync.replay",
  6908. "parameters": [
  6909. {
  6910. "name": "directory",
  6911. "in": "query",
  6912. "schema": {
  6913. "type": "string"
  6914. },
  6915. "required": false
  6916. },
  6917. {
  6918. "name": "workspace",
  6919. "in": "query",
  6920. "schema": {
  6921. "type": "string"
  6922. },
  6923. "required": false
  6924. }
  6925. ],
  6926. "responses": {
  6927. "200": {
  6928. "description": "Replayed sync events",
  6929. "content": {
  6930. "application/json": {
  6931. "schema": {
  6932. "type": "object",
  6933. "properties": {
  6934. "sessionID": {
  6935. "type": "string"
  6936. }
  6937. },
  6938. "required": ["sessionID"],
  6939. "additionalProperties": false,
  6940. "description": "Replayed sync events"
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "400": {
  6946. "description": "Bad request",
  6947. "content": {
  6948. "application/json": {
  6949. "schema": {
  6950. "$ref": "#/components/schemas/BadRequestError"
  6951. }
  6952. }
  6953. }
  6954. }
  6955. },
  6956. "description": "Validate and replay a complete sync event history.",
  6957. "summary": "Replay sync events",
  6958. "requestBody": {
  6959. "content": {
  6960. "application/json": {
  6961. "schema": {
  6962. "type": "object",
  6963. "properties": {
  6964. "directory": {
  6965. "type": "string"
  6966. },
  6967. "events": {
  6968. "type": "array",
  6969. "minItems": 1,
  6970. "items": {
  6971. "type": "object",
  6972. "properties": {
  6973. "id": {
  6974. "type": "string"
  6975. },
  6976. "aggregateID": {
  6977. "type": "string"
  6978. },
  6979. "seq": {
  6980. "type": "integer",
  6981. "minimum": 0
  6982. },
  6983. "type": {
  6984. "type": "string"
  6985. },
  6986. "data": {
  6987. "type": "object"
  6988. }
  6989. },
  6990. "required": ["id", "aggregateID", "seq", "type", "data"],
  6991. "additionalProperties": false
  6992. }
  6993. }
  6994. },
  6995. "required": ["directory", "events"],
  6996. "additionalProperties": false
  6997. }
  6998. }
  6999. }
  7000. },
  7001. "x-codeSamples": [
  7002. {
  7003. "lang": "js",
  7004. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7005. }
  7006. ]
  7007. }
  7008. },
  7009. "/sync/steal": {
  7010. "post": {
  7011. "tags": ["sync"],
  7012. "operationId": "sync.steal",
  7013. "parameters": [
  7014. {
  7015. "name": "directory",
  7016. "in": "query",
  7017. "schema": {
  7018. "type": "string"
  7019. },
  7020. "required": false
  7021. },
  7022. {
  7023. "name": "workspace",
  7024. "in": "query",
  7025. "schema": {
  7026. "type": "string"
  7027. },
  7028. "required": false
  7029. }
  7030. ],
  7031. "responses": {
  7032. "200": {
  7033. "description": "Session stolen into workspace",
  7034. "content": {
  7035. "application/json": {
  7036. "schema": {
  7037. "type": "object",
  7038. "properties": {
  7039. "sessionID": {
  7040. "type": "string",
  7041. "pattern": "^ses"
  7042. }
  7043. },
  7044. "required": ["sessionID"],
  7045. "additionalProperties": false,
  7046. "description": "Session stolen into workspace"
  7047. }
  7048. }
  7049. }
  7050. },
  7051. "400": {
  7052. "description": "Bad request",
  7053. "content": {
  7054. "application/json": {
  7055. "schema": {
  7056. "$ref": "#/components/schemas/BadRequestError"
  7057. }
  7058. }
  7059. }
  7060. }
  7061. },
  7062. "description": "Update a session to belong to the current workspace through the sync event system.",
  7063. "summary": "Steal session into workspace",
  7064. "requestBody": {
  7065. "content": {
  7066. "application/json": {
  7067. "schema": {
  7068. "type": "object",
  7069. "properties": {
  7070. "sessionID": {
  7071. "type": "string",
  7072. "pattern": "^ses"
  7073. }
  7074. },
  7075. "required": ["sessionID"],
  7076. "additionalProperties": false
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "x-codeSamples": [
  7082. {
  7083. "lang": "js",
  7084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7085. }
  7086. ]
  7087. }
  7088. },
  7089. "/sync/history": {
  7090. "post": {
  7091. "tags": ["sync"],
  7092. "operationId": "sync.history.list",
  7093. "parameters": [
  7094. {
  7095. "name": "directory",
  7096. "in": "query",
  7097. "schema": {
  7098. "type": "string"
  7099. },
  7100. "required": false
  7101. },
  7102. {
  7103. "name": "workspace",
  7104. "in": "query",
  7105. "schema": {
  7106. "type": "string"
  7107. },
  7108. "required": false
  7109. }
  7110. ],
  7111. "responses": {
  7112. "200": {
  7113. "description": "Sync events",
  7114. "content": {
  7115. "application/json": {
  7116. "schema": {
  7117. "type": "array",
  7118. "items": {
  7119. "type": "object",
  7120. "properties": {
  7121. "id": {
  7122. "type": "string"
  7123. },
  7124. "aggregate_id": {
  7125. "type": "string"
  7126. },
  7127. "seq": {
  7128. "type": "integer",
  7129. "minimum": 0
  7130. },
  7131. "type": {
  7132. "type": "string"
  7133. },
  7134. "data": {
  7135. "type": "object"
  7136. }
  7137. },
  7138. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7139. "additionalProperties": false
  7140. },
  7141. "description": "Sync events"
  7142. }
  7143. }
  7144. }
  7145. },
  7146. "400": {
  7147. "description": "Bad request",
  7148. "content": {
  7149. "application/json": {
  7150. "schema": {
  7151. "$ref": "#/components/schemas/BadRequestError"
  7152. }
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "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.",
  7158. "summary": "List sync events",
  7159. "requestBody": {
  7160. "content": {
  7161. "application/json": {
  7162. "schema": {
  7163. "type": "object",
  7164. "additionalProperties": {
  7165. "type": "integer",
  7166. "minimum": 0
  7167. }
  7168. }
  7169. }
  7170. }
  7171. },
  7172. "x-codeSamples": [
  7173. {
  7174. "lang": "js",
  7175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7176. }
  7177. ]
  7178. }
  7179. },
  7180. "/api/session": {
  7181. "get": {
  7182. "tags": ["v2"],
  7183. "operationId": "v2.session.list",
  7184. "parameters": [
  7185. {
  7186. "name": "directory",
  7187. "in": "query",
  7188. "schema": {
  7189. "type": "string"
  7190. },
  7191. "required": false
  7192. },
  7193. {
  7194. "name": "workspace",
  7195. "in": "query",
  7196. "schema": {
  7197. "type": "string"
  7198. },
  7199. "required": false
  7200. },
  7201. {
  7202. "name": "limit",
  7203. "in": "query",
  7204. "schema": {
  7205. "type": "number"
  7206. },
  7207. "required": false
  7208. },
  7209. {
  7210. "name": "order",
  7211. "in": "query",
  7212. "schema": {
  7213. "type": "string",
  7214. "enum": ["asc", "desc"]
  7215. },
  7216. "required": false
  7217. },
  7218. {
  7219. "name": "path",
  7220. "in": "query",
  7221. "schema": {
  7222. "type": "string"
  7223. },
  7224. "required": false
  7225. },
  7226. {
  7227. "name": "roots",
  7228. "in": "query",
  7229. "schema": {
  7230. "anyOf": [
  7231. {
  7232. "type": "boolean"
  7233. },
  7234. {
  7235. "type": "string",
  7236. "enum": ["true", "false"]
  7237. }
  7238. ]
  7239. },
  7240. "required": false
  7241. },
  7242. {
  7243. "name": "start",
  7244. "in": "query",
  7245. "schema": {
  7246. "type": "number"
  7247. },
  7248. "required": false
  7249. },
  7250. {
  7251. "name": "search",
  7252. "in": "query",
  7253. "schema": {
  7254. "type": "string"
  7255. },
  7256. "required": false
  7257. },
  7258. {
  7259. "name": "cursor",
  7260. "in": "query",
  7261. "schema": {
  7262. "type": "string",
  7263. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7264. },
  7265. "required": false
  7266. }
  7267. ],
  7268. "responses": {
  7269. "200": {
  7270. "description": "V2SessionsResponse",
  7271. "content": {
  7272. "application/json": {
  7273. "schema": {
  7274. "$ref": "#/components/schemas/V2SessionsResponse"
  7275. }
  7276. }
  7277. }
  7278. },
  7279. "400": {
  7280. "description": "Bad request",
  7281. "content": {
  7282. "application/json": {
  7283. "schema": {
  7284. "$ref": "#/components/schemas/BadRequestError"
  7285. }
  7286. }
  7287. }
  7288. }
  7289. },
  7290. "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.",
  7291. "summary": "List v2 sessions",
  7292. "x-codeSamples": [
  7293. {
  7294. "lang": "js",
  7295. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7296. }
  7297. ]
  7298. }
  7299. },
  7300. "/api/session/{sessionID}/prompt": {
  7301. "post": {
  7302. "tags": ["v2"],
  7303. "operationId": "v2.session.prompt",
  7304. "parameters": [
  7305. {
  7306. "name": "sessionID",
  7307. "in": "path",
  7308. "schema": {
  7309. "type": "string",
  7310. "pattern": "^ses"
  7311. },
  7312. "required": true
  7313. },
  7314. {
  7315. "name": "directory",
  7316. "in": "query",
  7317. "schema": {
  7318. "type": "string"
  7319. },
  7320. "required": false
  7321. },
  7322. {
  7323. "name": "workspace",
  7324. "in": "query",
  7325. "schema": {
  7326. "type": "string"
  7327. },
  7328. "required": false
  7329. }
  7330. ],
  7331. "responses": {
  7332. "200": {
  7333. "description": "Session.Message",
  7334. "content": {
  7335. "application/json": {
  7336. "schema": {
  7337. "$ref": "#/components/schemas/SessionMessage"
  7338. }
  7339. }
  7340. }
  7341. }
  7342. },
  7343. "description": "Create a v2 session message and queue it for the agent loop.",
  7344. "summary": "Send v2 message",
  7345. "requestBody": {
  7346. "content": {
  7347. "application/json": {
  7348. "schema": {
  7349. "type": "object",
  7350. "properties": {
  7351. "prompt": {
  7352. "$ref": "#/components/schemas/Prompt"
  7353. },
  7354. "delivery": {
  7355. "$ref": "#/components/schemas/SessionDelivery"
  7356. }
  7357. },
  7358. "required": ["prompt"],
  7359. "additionalProperties": false
  7360. }
  7361. }
  7362. }
  7363. },
  7364. "x-codeSamples": [
  7365. {
  7366. "lang": "js",
  7367. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7368. }
  7369. ]
  7370. }
  7371. },
  7372. "/api/session/{sessionID}/compact": {
  7373. "post": {
  7374. "tags": ["v2"],
  7375. "operationId": "v2.session.compact",
  7376. "parameters": [
  7377. {
  7378. "name": "sessionID",
  7379. "in": "path",
  7380. "schema": {
  7381. "type": "string",
  7382. "pattern": "^ses"
  7383. },
  7384. "required": true
  7385. },
  7386. {
  7387. "name": "directory",
  7388. "in": "query",
  7389. "schema": {
  7390. "type": "string"
  7391. },
  7392. "required": false
  7393. },
  7394. {
  7395. "name": "workspace",
  7396. "in": "query",
  7397. "schema": {
  7398. "type": "string"
  7399. },
  7400. "required": false
  7401. }
  7402. ],
  7403. "responses": {
  7404. "204": {
  7405. "description": "<No Content>"
  7406. }
  7407. },
  7408. "description": "Compact a v2 session conversation.",
  7409. "summary": "Compact v2 session",
  7410. "x-codeSamples": [
  7411. {
  7412. "lang": "js",
  7413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7414. }
  7415. ]
  7416. }
  7417. },
  7418. "/api/session/{sessionID}/wait": {
  7419. "post": {
  7420. "tags": ["v2"],
  7421. "operationId": "v2.session.wait",
  7422. "parameters": [
  7423. {
  7424. "name": "sessionID",
  7425. "in": "path",
  7426. "schema": {
  7427. "type": "string",
  7428. "pattern": "^ses"
  7429. },
  7430. "required": true
  7431. },
  7432. {
  7433. "name": "directory",
  7434. "in": "query",
  7435. "schema": {
  7436. "type": "string"
  7437. },
  7438. "required": false
  7439. },
  7440. {
  7441. "name": "workspace",
  7442. "in": "query",
  7443. "schema": {
  7444. "type": "string"
  7445. },
  7446. "required": false
  7447. }
  7448. ],
  7449. "responses": {
  7450. "204": {
  7451. "description": "<No Content>"
  7452. }
  7453. },
  7454. "description": "Wait for a v2 session agent loop to become idle.",
  7455. "summary": "Wait for v2 session",
  7456. "x-codeSamples": [
  7457. {
  7458. "lang": "js",
  7459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7460. }
  7461. ]
  7462. }
  7463. },
  7464. "/api/session/{sessionID}/context": {
  7465. "get": {
  7466. "tags": ["v2"],
  7467. "operationId": "v2.session.context",
  7468. "parameters": [
  7469. {
  7470. "name": "sessionID",
  7471. "in": "path",
  7472. "schema": {
  7473. "type": "string",
  7474. "pattern": "^ses"
  7475. },
  7476. "required": true
  7477. },
  7478. {
  7479. "name": "directory",
  7480. "in": "query",
  7481. "schema": {
  7482. "type": "string"
  7483. },
  7484. "required": false
  7485. },
  7486. {
  7487. "name": "workspace",
  7488. "in": "query",
  7489. "schema": {
  7490. "type": "string"
  7491. },
  7492. "required": false
  7493. }
  7494. ],
  7495. "responses": {
  7496. "200": {
  7497. "description": "Success",
  7498. "content": {
  7499. "application/json": {
  7500. "schema": {
  7501. "type": "array",
  7502. "items": {
  7503. "$ref": "#/components/schemas/SessionMessage"
  7504. }
  7505. }
  7506. }
  7507. }
  7508. }
  7509. },
  7510. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7511. "summary": "Get v2 session context",
  7512. "x-codeSamples": [
  7513. {
  7514. "lang": "js",
  7515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7516. }
  7517. ]
  7518. }
  7519. },
  7520. "/api/session/{sessionID}/message": {
  7521. "get": {
  7522. "tags": ["v2 messages"],
  7523. "operationId": "v2.session.messages",
  7524. "parameters": [
  7525. {
  7526. "name": "sessionID",
  7527. "in": "path",
  7528. "schema": {
  7529. "type": "string",
  7530. "pattern": "^ses"
  7531. },
  7532. "required": true
  7533. },
  7534. {
  7535. "name": "directory",
  7536. "in": "query",
  7537. "schema": {
  7538. "type": "string"
  7539. },
  7540. "required": false
  7541. },
  7542. {
  7543. "name": "workspace",
  7544. "in": "query",
  7545. "schema": {
  7546. "type": "string"
  7547. },
  7548. "required": false
  7549. },
  7550. {
  7551. "name": "limit",
  7552. "in": "query",
  7553. "schema": {
  7554. "type": "number"
  7555. },
  7556. "required": false
  7557. },
  7558. {
  7559. "name": "order",
  7560. "in": "query",
  7561. "schema": {
  7562. "type": "string",
  7563. "enum": ["asc", "desc"]
  7564. },
  7565. "required": false
  7566. },
  7567. {
  7568. "name": "cursor",
  7569. "in": "query",
  7570. "schema": {
  7571. "type": "string",
  7572. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7573. },
  7574. "required": false
  7575. }
  7576. ],
  7577. "responses": {
  7578. "200": {
  7579. "description": "V2SessionMessagesResponse",
  7580. "content": {
  7581. "application/json": {
  7582. "schema": {
  7583. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7584. }
  7585. }
  7586. }
  7587. },
  7588. "400": {
  7589. "description": "Bad request",
  7590. "content": {
  7591. "application/json": {
  7592. "schema": {
  7593. "$ref": "#/components/schemas/BadRequestError"
  7594. }
  7595. }
  7596. }
  7597. }
  7598. },
  7599. "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.",
  7600. "summary": "Get v2 session messages",
  7601. "x-codeSamples": [
  7602. {
  7603. "lang": "js",
  7604. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7605. }
  7606. ]
  7607. }
  7608. },
  7609. "/api/model": {
  7610. "get": {
  7611. "tags": ["v2 models"],
  7612. "operationId": "v2.model.list",
  7613. "parameters": [],
  7614. "responses": {
  7615. "200": {
  7616. "description": "Success",
  7617. "content": {
  7618. "application/json": {
  7619. "schema": {
  7620. "type": "array",
  7621. "items": {
  7622. "$ref": "#/components/schemas/ModelV2Info"
  7623. }
  7624. }
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "description": "Retrieve available v2 models ordered by release date.",
  7630. "summary": "List v2 models",
  7631. "x-codeSamples": [
  7632. {
  7633. "lang": "js",
  7634. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  7635. }
  7636. ]
  7637. }
  7638. },
  7639. "/api/provider": {
  7640. "get": {
  7641. "tags": ["v2 providers"],
  7642. "operationId": "v2.provider.list",
  7643. "parameters": [],
  7644. "responses": {
  7645. "200": {
  7646. "description": "Success",
  7647. "content": {
  7648. "application/json": {
  7649. "schema": {
  7650. "type": "array",
  7651. "items": {
  7652. "$ref": "#/components/schemas/ProviderV2Info"
  7653. }
  7654. }
  7655. }
  7656. }
  7657. }
  7658. },
  7659. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  7660. "summary": "List v2 providers",
  7661. "x-codeSamples": [
  7662. {
  7663. "lang": "js",
  7664. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  7665. }
  7666. ]
  7667. }
  7668. },
  7669. "/api/provider/{providerID}": {
  7670. "get": {
  7671. "tags": ["v2 providers"],
  7672. "operationId": "v2.provider.get",
  7673. "parameters": [
  7674. {
  7675. "name": "providerID",
  7676. "in": "path",
  7677. "schema": {
  7678. "type": "string"
  7679. },
  7680. "required": true
  7681. }
  7682. ],
  7683. "responses": {
  7684. "200": {
  7685. "description": "ProviderV2.Info",
  7686. "content": {
  7687. "application/json": {
  7688. "schema": {
  7689. "$ref": "#/components/schemas/ProviderV2Info"
  7690. }
  7691. }
  7692. }
  7693. },
  7694. "404": {
  7695. "description": "NotFoundError",
  7696. "content": {
  7697. "application/json": {
  7698. "schema": {
  7699. "$ref": "#/components/schemas/NotFoundError"
  7700. }
  7701. }
  7702. }
  7703. }
  7704. },
  7705. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  7706. "summary": "Get v2 provider",
  7707. "x-codeSamples": [
  7708. {
  7709. "lang": "js",
  7710. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  7711. }
  7712. ]
  7713. }
  7714. },
  7715. "/tui/append-prompt": {
  7716. "post": {
  7717. "tags": ["tui"],
  7718. "operationId": "tui.appendPrompt",
  7719. "parameters": [
  7720. {
  7721. "name": "directory",
  7722. "in": "query",
  7723. "schema": {
  7724. "type": "string"
  7725. },
  7726. "required": false
  7727. },
  7728. {
  7729. "name": "workspace",
  7730. "in": "query",
  7731. "schema": {
  7732. "type": "string"
  7733. },
  7734. "required": false
  7735. }
  7736. ],
  7737. "responses": {
  7738. "200": {
  7739. "description": "Prompt processed successfully",
  7740. "content": {
  7741. "application/json": {
  7742. "schema": {
  7743. "type": "boolean",
  7744. "description": "Prompt processed successfully"
  7745. }
  7746. }
  7747. }
  7748. },
  7749. "400": {
  7750. "description": "Bad request",
  7751. "content": {
  7752. "application/json": {
  7753. "schema": {
  7754. "$ref": "#/components/schemas/BadRequestError"
  7755. }
  7756. }
  7757. }
  7758. }
  7759. },
  7760. "description": "Append prompt to the TUI.",
  7761. "summary": "Append TUI prompt",
  7762. "requestBody": {
  7763. "content": {
  7764. "application/json": {
  7765. "schema": {
  7766. "type": "object",
  7767. "properties": {
  7768. "text": {
  7769. "type": "string"
  7770. }
  7771. },
  7772. "required": ["text"],
  7773. "additionalProperties": false
  7774. }
  7775. }
  7776. }
  7777. },
  7778. "x-codeSamples": [
  7779. {
  7780. "lang": "js",
  7781. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7782. }
  7783. ]
  7784. }
  7785. },
  7786. "/tui/open-help": {
  7787. "post": {
  7788. "tags": ["tui"],
  7789. "operationId": "tui.openHelp",
  7790. "parameters": [
  7791. {
  7792. "name": "directory",
  7793. "in": "query",
  7794. "schema": {
  7795. "type": "string"
  7796. },
  7797. "required": false
  7798. },
  7799. {
  7800. "name": "workspace",
  7801. "in": "query",
  7802. "schema": {
  7803. "type": "string"
  7804. },
  7805. "required": false
  7806. }
  7807. ],
  7808. "responses": {
  7809. "200": {
  7810. "description": "Help dialog opened successfully",
  7811. "content": {
  7812. "application/json": {
  7813. "schema": {
  7814. "type": "boolean",
  7815. "description": "Help dialog opened successfully"
  7816. }
  7817. }
  7818. }
  7819. }
  7820. },
  7821. "description": "Open the help dialog in the TUI to display user assistance information.",
  7822. "summary": "Open help dialog",
  7823. "x-codeSamples": [
  7824. {
  7825. "lang": "js",
  7826. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7827. }
  7828. ]
  7829. }
  7830. },
  7831. "/tui/open-sessions": {
  7832. "post": {
  7833. "tags": ["tui"],
  7834. "operationId": "tui.openSessions",
  7835. "parameters": [
  7836. {
  7837. "name": "directory",
  7838. "in": "query",
  7839. "schema": {
  7840. "type": "string"
  7841. },
  7842. "required": false
  7843. },
  7844. {
  7845. "name": "workspace",
  7846. "in": "query",
  7847. "schema": {
  7848. "type": "string"
  7849. },
  7850. "required": false
  7851. }
  7852. ],
  7853. "responses": {
  7854. "200": {
  7855. "description": "Session dialog opened successfully",
  7856. "content": {
  7857. "application/json": {
  7858. "schema": {
  7859. "type": "boolean",
  7860. "description": "Session dialog opened successfully"
  7861. }
  7862. }
  7863. }
  7864. }
  7865. },
  7866. "description": "Open the session dialog.",
  7867. "summary": "Open sessions dialog",
  7868. "x-codeSamples": [
  7869. {
  7870. "lang": "js",
  7871. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7872. }
  7873. ]
  7874. }
  7875. },
  7876. "/tui/open-themes": {
  7877. "post": {
  7878. "tags": ["tui"],
  7879. "operationId": "tui.openThemes",
  7880. "parameters": [
  7881. {
  7882. "name": "directory",
  7883. "in": "query",
  7884. "schema": {
  7885. "type": "string"
  7886. },
  7887. "required": false
  7888. },
  7889. {
  7890. "name": "workspace",
  7891. "in": "query",
  7892. "schema": {
  7893. "type": "string"
  7894. },
  7895. "required": false
  7896. }
  7897. ],
  7898. "responses": {
  7899. "200": {
  7900. "description": "Theme dialog opened successfully",
  7901. "content": {
  7902. "application/json": {
  7903. "schema": {
  7904. "type": "boolean",
  7905. "description": "Theme dialog opened successfully"
  7906. }
  7907. }
  7908. }
  7909. }
  7910. },
  7911. "description": "Open the theme dialog.",
  7912. "summary": "Open themes dialog",
  7913. "x-codeSamples": [
  7914. {
  7915. "lang": "js",
  7916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7917. }
  7918. ]
  7919. }
  7920. },
  7921. "/tui/open-models": {
  7922. "post": {
  7923. "tags": ["tui"],
  7924. "operationId": "tui.openModels",
  7925. "parameters": [
  7926. {
  7927. "name": "directory",
  7928. "in": "query",
  7929. "schema": {
  7930. "type": "string"
  7931. },
  7932. "required": false
  7933. },
  7934. {
  7935. "name": "workspace",
  7936. "in": "query",
  7937. "schema": {
  7938. "type": "string"
  7939. },
  7940. "required": false
  7941. }
  7942. ],
  7943. "responses": {
  7944. "200": {
  7945. "description": "Model dialog opened successfully",
  7946. "content": {
  7947. "application/json": {
  7948. "schema": {
  7949. "type": "boolean",
  7950. "description": "Model dialog opened successfully"
  7951. }
  7952. }
  7953. }
  7954. }
  7955. },
  7956. "description": "Open the model dialog.",
  7957. "summary": "Open models dialog",
  7958. "x-codeSamples": [
  7959. {
  7960. "lang": "js",
  7961. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7962. }
  7963. ]
  7964. }
  7965. },
  7966. "/tui/submit-prompt": {
  7967. "post": {
  7968. "tags": ["tui"],
  7969. "operationId": "tui.submitPrompt",
  7970. "parameters": [
  7971. {
  7972. "name": "directory",
  7973. "in": "query",
  7974. "schema": {
  7975. "type": "string"
  7976. },
  7977. "required": false
  7978. },
  7979. {
  7980. "name": "workspace",
  7981. "in": "query",
  7982. "schema": {
  7983. "type": "string"
  7984. },
  7985. "required": false
  7986. }
  7987. ],
  7988. "responses": {
  7989. "200": {
  7990. "description": "Prompt submitted successfully",
  7991. "content": {
  7992. "application/json": {
  7993. "schema": {
  7994. "type": "boolean",
  7995. "description": "Prompt submitted successfully"
  7996. }
  7997. }
  7998. }
  7999. }
  8000. },
  8001. "description": "Submit the prompt.",
  8002. "summary": "Submit TUI prompt",
  8003. "x-codeSamples": [
  8004. {
  8005. "lang": "js",
  8006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8007. }
  8008. ]
  8009. }
  8010. },
  8011. "/tui/clear-prompt": {
  8012. "post": {
  8013. "tags": ["tui"],
  8014. "operationId": "tui.clearPrompt",
  8015. "parameters": [
  8016. {
  8017. "name": "directory",
  8018. "in": "query",
  8019. "schema": {
  8020. "type": "string"
  8021. },
  8022. "required": false
  8023. },
  8024. {
  8025. "name": "workspace",
  8026. "in": "query",
  8027. "schema": {
  8028. "type": "string"
  8029. },
  8030. "required": false
  8031. }
  8032. ],
  8033. "responses": {
  8034. "200": {
  8035. "description": "Prompt cleared successfully",
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "type": "boolean",
  8040. "description": "Prompt cleared successfully"
  8041. }
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "description": "Clear the prompt.",
  8047. "summary": "Clear TUI prompt",
  8048. "x-codeSamples": [
  8049. {
  8050. "lang": "js",
  8051. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8052. }
  8053. ]
  8054. }
  8055. },
  8056. "/tui/execute-command": {
  8057. "post": {
  8058. "tags": ["tui"],
  8059. "operationId": "tui.executeCommand",
  8060. "parameters": [
  8061. {
  8062. "name": "directory",
  8063. "in": "query",
  8064. "schema": {
  8065. "type": "string"
  8066. },
  8067. "required": false
  8068. },
  8069. {
  8070. "name": "workspace",
  8071. "in": "query",
  8072. "schema": {
  8073. "type": "string"
  8074. },
  8075. "required": false
  8076. }
  8077. ],
  8078. "responses": {
  8079. "200": {
  8080. "description": "Command executed successfully",
  8081. "content": {
  8082. "application/json": {
  8083. "schema": {
  8084. "type": "boolean",
  8085. "description": "Command executed successfully"
  8086. }
  8087. }
  8088. }
  8089. },
  8090. "400": {
  8091. "description": "Bad request",
  8092. "content": {
  8093. "application/json": {
  8094. "schema": {
  8095. "$ref": "#/components/schemas/BadRequestError"
  8096. }
  8097. }
  8098. }
  8099. }
  8100. },
  8101. "description": "Execute a TUI command.",
  8102. "summary": "Execute TUI command",
  8103. "requestBody": {
  8104. "content": {
  8105. "application/json": {
  8106. "schema": {
  8107. "type": "object",
  8108. "properties": {
  8109. "command": {
  8110. "type": "string"
  8111. }
  8112. },
  8113. "required": ["command"],
  8114. "additionalProperties": false
  8115. }
  8116. }
  8117. }
  8118. },
  8119. "x-codeSamples": [
  8120. {
  8121. "lang": "js",
  8122. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8123. }
  8124. ]
  8125. }
  8126. },
  8127. "/tui/show-toast": {
  8128. "post": {
  8129. "tags": ["tui"],
  8130. "operationId": "tui.showToast",
  8131. "parameters": [
  8132. {
  8133. "name": "directory",
  8134. "in": "query",
  8135. "schema": {
  8136. "type": "string"
  8137. },
  8138. "required": false
  8139. },
  8140. {
  8141. "name": "workspace",
  8142. "in": "query",
  8143. "schema": {
  8144. "type": "string"
  8145. },
  8146. "required": false
  8147. }
  8148. ],
  8149. "responses": {
  8150. "200": {
  8151. "description": "Toast notification shown successfully",
  8152. "content": {
  8153. "application/json": {
  8154. "schema": {
  8155. "type": "boolean",
  8156. "description": "Toast notification shown successfully"
  8157. }
  8158. }
  8159. }
  8160. }
  8161. },
  8162. "description": "Show a toast notification in the TUI.",
  8163. "summary": "Show TUI toast",
  8164. "requestBody": {
  8165. "content": {
  8166. "application/json": {
  8167. "schema": {
  8168. "type": "object",
  8169. "properties": {
  8170. "title": {
  8171. "type": "string"
  8172. },
  8173. "message": {
  8174. "type": "string"
  8175. },
  8176. "variant": {
  8177. "type": "string",
  8178. "enum": ["info", "success", "warning", "error"]
  8179. },
  8180. "duration": {
  8181. "type": "integer",
  8182. "exclusiveMinimum": 0
  8183. }
  8184. },
  8185. "required": ["message", "variant"],
  8186. "additionalProperties": false
  8187. }
  8188. }
  8189. }
  8190. },
  8191. "x-codeSamples": [
  8192. {
  8193. "lang": "js",
  8194. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8195. }
  8196. ]
  8197. }
  8198. },
  8199. "/tui/publish": {
  8200. "post": {
  8201. "tags": ["tui"],
  8202. "operationId": "tui.publish",
  8203. "parameters": [
  8204. {
  8205. "name": "directory",
  8206. "in": "query",
  8207. "schema": {
  8208. "type": "string"
  8209. },
  8210. "required": false
  8211. },
  8212. {
  8213. "name": "workspace",
  8214. "in": "query",
  8215. "schema": {
  8216. "type": "string"
  8217. },
  8218. "required": false
  8219. }
  8220. ],
  8221. "responses": {
  8222. "200": {
  8223. "description": "Event published successfully",
  8224. "content": {
  8225. "application/json": {
  8226. "schema": {
  8227. "type": "boolean",
  8228. "description": "Event published successfully"
  8229. }
  8230. }
  8231. }
  8232. },
  8233. "400": {
  8234. "description": "Bad request",
  8235. "content": {
  8236. "application/json": {
  8237. "schema": {
  8238. "$ref": "#/components/schemas/BadRequestError"
  8239. }
  8240. }
  8241. }
  8242. }
  8243. },
  8244. "description": "Publish a TUI event.",
  8245. "summary": "Publish TUI event",
  8246. "requestBody": {
  8247. "content": {
  8248. "application/json": {
  8249. "schema": {
  8250. "anyOf": [
  8251. {
  8252. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8253. },
  8254. {
  8255. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8256. },
  8257. {
  8258. "$ref": "#/components/schemas/EventTuiToastShow"
  8259. },
  8260. {
  8261. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8262. }
  8263. ]
  8264. }
  8265. }
  8266. }
  8267. },
  8268. "x-codeSamples": [
  8269. {
  8270. "lang": "js",
  8271. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8272. }
  8273. ]
  8274. }
  8275. },
  8276. "/tui/select-session": {
  8277. "post": {
  8278. "tags": ["tui"],
  8279. "operationId": "tui.selectSession",
  8280. "parameters": [
  8281. {
  8282. "name": "directory",
  8283. "in": "query",
  8284. "schema": {
  8285. "type": "string"
  8286. },
  8287. "required": false
  8288. },
  8289. {
  8290. "name": "workspace",
  8291. "in": "query",
  8292. "schema": {
  8293. "type": "string"
  8294. },
  8295. "required": false
  8296. }
  8297. ],
  8298. "responses": {
  8299. "200": {
  8300. "description": "Session selected successfully",
  8301. "content": {
  8302. "application/json": {
  8303. "schema": {
  8304. "type": "boolean",
  8305. "description": "Session selected successfully"
  8306. }
  8307. }
  8308. }
  8309. },
  8310. "400": {
  8311. "description": "Bad request",
  8312. "content": {
  8313. "application/json": {
  8314. "schema": {
  8315. "$ref": "#/components/schemas/BadRequestError"
  8316. }
  8317. }
  8318. }
  8319. },
  8320. "404": {
  8321. "description": "NotFoundError",
  8322. "content": {
  8323. "application/json": {
  8324. "schema": {
  8325. "$ref": "#/components/schemas/NotFoundError"
  8326. }
  8327. }
  8328. }
  8329. }
  8330. },
  8331. "description": "Navigate the TUI to display the specified session.",
  8332. "summary": "Select session",
  8333. "requestBody": {
  8334. "content": {
  8335. "application/json": {
  8336. "schema": {
  8337. "type": "object",
  8338. "properties": {
  8339. "sessionID": {
  8340. "type": "string",
  8341. "pattern": "^ses",
  8342. "description": "Session ID to navigate to"
  8343. }
  8344. },
  8345. "required": ["sessionID"],
  8346. "additionalProperties": false
  8347. }
  8348. }
  8349. }
  8350. },
  8351. "x-codeSamples": [
  8352. {
  8353. "lang": "js",
  8354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8355. }
  8356. ]
  8357. }
  8358. },
  8359. "/tui/control/next": {
  8360. "get": {
  8361. "tags": ["tui"],
  8362. "operationId": "tui.control.next",
  8363. "parameters": [
  8364. {
  8365. "name": "directory",
  8366. "in": "query",
  8367. "schema": {
  8368. "type": "string"
  8369. },
  8370. "required": false
  8371. },
  8372. {
  8373. "name": "workspace",
  8374. "in": "query",
  8375. "schema": {
  8376. "type": "string"
  8377. },
  8378. "required": false
  8379. }
  8380. ],
  8381. "responses": {
  8382. "200": {
  8383. "description": "Next TUI request",
  8384. "content": {
  8385. "application/json": {
  8386. "schema": {
  8387. "type": "object",
  8388. "properties": {
  8389. "path": {
  8390. "type": "string"
  8391. },
  8392. "body": {}
  8393. },
  8394. "required": ["path", "body"],
  8395. "additionalProperties": false,
  8396. "description": "Next TUI request"
  8397. }
  8398. }
  8399. }
  8400. }
  8401. },
  8402. "description": "Retrieve the next TUI request from the queue for processing.",
  8403. "summary": "Get next TUI request",
  8404. "x-codeSamples": [
  8405. {
  8406. "lang": "js",
  8407. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8408. }
  8409. ]
  8410. }
  8411. },
  8412. "/tui/control/response": {
  8413. "post": {
  8414. "tags": ["tui"],
  8415. "operationId": "tui.control.response",
  8416. "parameters": [
  8417. {
  8418. "name": "directory",
  8419. "in": "query",
  8420. "schema": {
  8421. "type": "string"
  8422. },
  8423. "required": false
  8424. },
  8425. {
  8426. "name": "workspace",
  8427. "in": "query",
  8428. "schema": {
  8429. "type": "string"
  8430. },
  8431. "required": false
  8432. }
  8433. ],
  8434. "responses": {
  8435. "200": {
  8436. "description": "Response submitted successfully",
  8437. "content": {
  8438. "application/json": {
  8439. "schema": {
  8440. "type": "boolean",
  8441. "description": "Response submitted successfully"
  8442. }
  8443. }
  8444. }
  8445. }
  8446. },
  8447. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8448. "summary": "Submit TUI response",
  8449. "requestBody": {
  8450. "content": {
  8451. "application/json": {
  8452. "schema": {}
  8453. }
  8454. }
  8455. },
  8456. "x-codeSamples": [
  8457. {
  8458. "lang": "js",
  8459. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8460. }
  8461. ]
  8462. }
  8463. },
  8464. "/experimental/workspace/adapter": {
  8465. "get": {
  8466. "tags": ["workspace"],
  8467. "operationId": "experimental.workspace.adapter.list",
  8468. "parameters": [
  8469. {
  8470. "name": "directory",
  8471. "in": "query",
  8472. "schema": {
  8473. "type": "string"
  8474. },
  8475. "required": false
  8476. },
  8477. {
  8478. "name": "workspace",
  8479. "in": "query",
  8480. "schema": {
  8481. "type": "string"
  8482. },
  8483. "required": false
  8484. }
  8485. ],
  8486. "responses": {
  8487. "200": {
  8488. "description": "Workspace adapters",
  8489. "content": {
  8490. "application/json": {
  8491. "schema": {
  8492. "type": "array",
  8493. "items": {
  8494. "type": "object",
  8495. "properties": {
  8496. "type": {
  8497. "type": "string"
  8498. },
  8499. "name": {
  8500. "type": "string"
  8501. },
  8502. "description": {
  8503. "type": "string"
  8504. }
  8505. },
  8506. "required": ["type", "name", "description"],
  8507. "additionalProperties": false
  8508. },
  8509. "description": "Workspace adapters"
  8510. }
  8511. }
  8512. }
  8513. }
  8514. },
  8515. "description": "List all available workspace adapters for the current project.",
  8516. "summary": "List workspace adapters",
  8517. "x-codeSamples": [
  8518. {
  8519. "lang": "js",
  8520. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8521. }
  8522. ]
  8523. }
  8524. },
  8525. "/experimental/workspace": {
  8526. "get": {
  8527. "tags": ["workspace"],
  8528. "operationId": "experimental.workspace.list",
  8529. "parameters": [
  8530. {
  8531. "name": "directory",
  8532. "in": "query",
  8533. "schema": {
  8534. "type": "string"
  8535. },
  8536. "required": false
  8537. },
  8538. {
  8539. "name": "workspace",
  8540. "in": "query",
  8541. "schema": {
  8542. "type": "string"
  8543. },
  8544. "required": false
  8545. }
  8546. ],
  8547. "responses": {
  8548. "200": {
  8549. "description": "Workspaces",
  8550. "content": {
  8551. "application/json": {
  8552. "schema": {
  8553. "type": "array",
  8554. "items": {
  8555. "$ref": "#/components/schemas/Workspace"
  8556. },
  8557. "description": "Workspaces"
  8558. }
  8559. }
  8560. }
  8561. }
  8562. },
  8563. "description": "List all workspaces.",
  8564. "summary": "List workspaces",
  8565. "x-codeSamples": [
  8566. {
  8567. "lang": "js",
  8568. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8569. }
  8570. ]
  8571. },
  8572. "post": {
  8573. "tags": ["workspace"],
  8574. "operationId": "experimental.workspace.create",
  8575. "parameters": [
  8576. {
  8577. "name": "directory",
  8578. "in": "query",
  8579. "schema": {
  8580. "type": "string"
  8581. },
  8582. "required": false
  8583. },
  8584. {
  8585. "name": "workspace",
  8586. "in": "query",
  8587. "schema": {
  8588. "type": "string"
  8589. },
  8590. "required": false
  8591. }
  8592. ],
  8593. "responses": {
  8594. "200": {
  8595. "description": "Workspace created",
  8596. "content": {
  8597. "application/json": {
  8598. "schema": {
  8599. "$ref": "#/components/schemas/Workspace"
  8600. }
  8601. }
  8602. }
  8603. },
  8604. "400": {
  8605. "description": "Bad request",
  8606. "content": {
  8607. "application/json": {
  8608. "schema": {
  8609. "$ref": "#/components/schemas/BadRequestError"
  8610. }
  8611. }
  8612. }
  8613. }
  8614. },
  8615. "description": "Create a workspace for the current project.",
  8616. "summary": "Create workspace",
  8617. "requestBody": {
  8618. "content": {
  8619. "application/json": {
  8620. "schema": {
  8621. "type": "object",
  8622. "properties": {
  8623. "id": {
  8624. "type": "string",
  8625. "pattern": "^wrk"
  8626. },
  8627. "type": {
  8628. "type": "string"
  8629. },
  8630. "branch": {
  8631. "anyOf": [
  8632. {
  8633. "type": "string"
  8634. },
  8635. {
  8636. "type": "null"
  8637. }
  8638. ]
  8639. },
  8640. "extra": {
  8641. "anyOf": [
  8642. {},
  8643. {
  8644. "type": "null"
  8645. }
  8646. ]
  8647. }
  8648. },
  8649. "required": ["type"],
  8650. "additionalProperties": false
  8651. }
  8652. }
  8653. }
  8654. },
  8655. "x-codeSamples": [
  8656. {
  8657. "lang": "js",
  8658. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8659. }
  8660. ]
  8661. }
  8662. },
  8663. "/experimental/workspace/sync-list": {
  8664. "post": {
  8665. "tags": ["workspace"],
  8666. "operationId": "experimental.workspace.syncList",
  8667. "parameters": [
  8668. {
  8669. "name": "directory",
  8670. "in": "query",
  8671. "schema": {
  8672. "type": "string"
  8673. },
  8674. "required": false
  8675. },
  8676. {
  8677. "name": "workspace",
  8678. "in": "query",
  8679. "schema": {
  8680. "type": "string"
  8681. },
  8682. "required": false
  8683. }
  8684. ],
  8685. "responses": {
  8686. "204": {
  8687. "description": "Workspace list synced"
  8688. }
  8689. },
  8690. "description": "Register missing workspaces returned by workspace adapters.",
  8691. "summary": "Sync workspace list",
  8692. "x-codeSamples": [
  8693. {
  8694. "lang": "js",
  8695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8696. }
  8697. ]
  8698. }
  8699. },
  8700. "/experimental/workspace/status": {
  8701. "get": {
  8702. "tags": ["workspace"],
  8703. "operationId": "experimental.workspace.status",
  8704. "parameters": [
  8705. {
  8706. "name": "directory",
  8707. "in": "query",
  8708. "schema": {
  8709. "type": "string"
  8710. },
  8711. "required": false
  8712. },
  8713. {
  8714. "name": "workspace",
  8715. "in": "query",
  8716. "schema": {
  8717. "type": "string"
  8718. },
  8719. "required": false
  8720. }
  8721. ],
  8722. "responses": {
  8723. "200": {
  8724. "description": "Workspace status",
  8725. "content": {
  8726. "application/json": {
  8727. "schema": {
  8728. "type": "array",
  8729. "items": {
  8730. "type": "object",
  8731. "properties": {
  8732. "workspaceID": {
  8733. "type": "string",
  8734. "pattern": "^wrk"
  8735. },
  8736. "status": {
  8737. "type": "string",
  8738. "enum": ["connected", "connecting", "disconnected", "error"]
  8739. }
  8740. },
  8741. "required": ["workspaceID", "status"],
  8742. "additionalProperties": false
  8743. },
  8744. "description": "Workspace status"
  8745. }
  8746. }
  8747. }
  8748. }
  8749. },
  8750. "description": "Get connection status for workspaces in the current project.",
  8751. "summary": "Workspace status",
  8752. "x-codeSamples": [
  8753. {
  8754. "lang": "js",
  8755. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8756. }
  8757. ]
  8758. }
  8759. },
  8760. "/experimental/workspace/{id}": {
  8761. "delete": {
  8762. "tags": ["workspace"],
  8763. "operationId": "experimental.workspace.remove",
  8764. "parameters": [
  8765. {
  8766. "name": "id",
  8767. "in": "path",
  8768. "schema": {
  8769. "type": "string",
  8770. "pattern": "^wrk"
  8771. },
  8772. "required": true
  8773. },
  8774. {
  8775. "name": "directory",
  8776. "in": "query",
  8777. "schema": {
  8778. "type": "string"
  8779. },
  8780. "required": false
  8781. },
  8782. {
  8783. "name": "workspace",
  8784. "in": "query",
  8785. "schema": {
  8786. "type": "string"
  8787. },
  8788. "required": false
  8789. }
  8790. ],
  8791. "responses": {
  8792. "200": {
  8793. "description": "Workspace removed",
  8794. "content": {
  8795. "application/json": {
  8796. "schema": {
  8797. "$ref": "#/components/schemas/Workspace"
  8798. }
  8799. }
  8800. }
  8801. },
  8802. "400": {
  8803. "description": "Bad request",
  8804. "content": {
  8805. "application/json": {
  8806. "schema": {
  8807. "$ref": "#/components/schemas/BadRequestError"
  8808. }
  8809. }
  8810. }
  8811. }
  8812. },
  8813. "description": "Remove an existing workspace.",
  8814. "summary": "Remove workspace",
  8815. "x-codeSamples": [
  8816. {
  8817. "lang": "js",
  8818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8819. }
  8820. ]
  8821. }
  8822. },
  8823. "/experimental/workspace/warp": {
  8824. "post": {
  8825. "tags": ["workspace"],
  8826. "operationId": "experimental.workspace.warp",
  8827. "parameters": [
  8828. {
  8829. "name": "directory",
  8830. "in": "query",
  8831. "schema": {
  8832. "type": "string"
  8833. },
  8834. "required": false
  8835. },
  8836. {
  8837. "name": "workspace",
  8838. "in": "query",
  8839. "schema": {
  8840. "type": "string"
  8841. },
  8842. "required": false
  8843. }
  8844. ],
  8845. "responses": {
  8846. "204": {
  8847. "description": "Session warped"
  8848. },
  8849. "400": {
  8850. "description": "WorkspaceWarpError | VcsApplyError",
  8851. "content": {
  8852. "application/json": {
  8853. "schema": {
  8854. "anyOf": [
  8855. {
  8856. "$ref": "#/components/schemas/WorkspaceWarpError"
  8857. },
  8858. {
  8859. "$ref": "#/components/schemas/VcsApplyError"
  8860. }
  8861. ]
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8868. "summary": "Warp session into workspace",
  8869. "requestBody": {
  8870. "content": {
  8871. "application/json": {
  8872. "schema": {
  8873. "type": "object",
  8874. "properties": {
  8875. "id": {
  8876. "anyOf": [
  8877. {
  8878. "type": "string",
  8879. "pattern": "^wrk"
  8880. },
  8881. {
  8882. "type": "null"
  8883. }
  8884. ]
  8885. },
  8886. "sessionID": {
  8887. "type": "string",
  8888. "pattern": "^ses"
  8889. },
  8890. "copyChanges": {
  8891. "type": "boolean"
  8892. }
  8893. },
  8894. "required": ["id", "sessionID"],
  8895. "additionalProperties": false
  8896. }
  8897. }
  8898. }
  8899. },
  8900. "x-codeSamples": [
  8901. {
  8902. "lang": "js",
  8903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8904. }
  8905. ]
  8906. }
  8907. },
  8908. "/pty/{ptyID}/connect": {
  8909. "get": {
  8910. "tags": ["pty"],
  8911. "operationId": "pty.connect",
  8912. "parameters": [
  8913. {
  8914. "name": "ptyID",
  8915. "in": "path",
  8916. "schema": {
  8917. "type": "string",
  8918. "pattern": "^pty"
  8919. },
  8920. "required": true
  8921. },
  8922. {
  8923. "name": "directory",
  8924. "in": "query",
  8925. "schema": {
  8926. "type": "string"
  8927. },
  8928. "required": false
  8929. },
  8930. {
  8931. "name": "workspace",
  8932. "in": "query",
  8933. "schema": {
  8934. "type": "string"
  8935. },
  8936. "required": false
  8937. }
  8938. ],
  8939. "responses": {
  8940. "200": {
  8941. "description": "Connected session",
  8942. "content": {
  8943. "application/json": {
  8944. "schema": {
  8945. "type": "boolean",
  8946. "description": "Connected session"
  8947. }
  8948. }
  8949. }
  8950. },
  8951. "403": {
  8952. "description": "Forbidden",
  8953. "content": {
  8954. "application/json": {
  8955. "schema": {
  8956. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8957. }
  8958. }
  8959. }
  8960. },
  8961. "404": {
  8962. "description": "Not found",
  8963. "content": {
  8964. "application/json": {
  8965. "schema": {
  8966. "$ref": "#/components/schemas/NotFoundError"
  8967. }
  8968. }
  8969. }
  8970. }
  8971. },
  8972. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8973. "summary": "Connect to PTY session",
  8974. "x-codeSamples": [
  8975. {
  8976. "lang": "js",
  8977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8978. }
  8979. ]
  8980. }
  8981. }
  8982. },
  8983. "components": {
  8984. "schemas": {
  8985. "Event": {
  8986. "anyOf": [
  8987. {
  8988. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8989. },
  8990. {
  8991. "$ref": "#/components/schemas/EventFileEdited"
  8992. },
  8993. {
  8994. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8995. },
  8996. {
  8997. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8998. },
  8999. {
  9000. "$ref": "#/components/schemas/EventLspUpdated"
  9001. },
  9002. {
  9003. "$ref": "#/components/schemas/EventMessagePartDelta"
  9004. },
  9005. {
  9006. "$ref": "#/components/schemas/EventPermissionAsked"
  9007. },
  9008. {
  9009. "$ref": "#/components/schemas/EventPermissionReplied"
  9010. },
  9011. {
  9012. "$ref": "#/components/schemas/EventSessionDiff"
  9013. },
  9014. {
  9015. "$ref": "#/components/schemas/EventSessionError"
  9016. },
  9017. {
  9018. "$ref": "#/components/schemas/EventInstallationUpdated"
  9019. },
  9020. {
  9021. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  9022. },
  9023. {
  9024. "$ref": "#/components/schemas/EventQuestionAsked"
  9025. },
  9026. {
  9027. "$ref": "#/components/schemas/EventQuestionReplied"
  9028. },
  9029. {
  9030. "$ref": "#/components/schemas/EventQuestionRejected"
  9031. },
  9032. {
  9033. "$ref": "#/components/schemas/EventTodoUpdated"
  9034. },
  9035. {
  9036. "$ref": "#/components/schemas/EventSessionStatus"
  9037. },
  9038. {
  9039. "$ref": "#/components/schemas/EventSessionIdle"
  9040. },
  9041. {
  9042. "$ref": "#/components/schemas/EventSessionCompacted"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/Event.tui.prompt.append"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/Event.tui.command.execute"
  9049. },
  9050. {
  9051. "$ref": "#/components/schemas/EventTuiToastShow1"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/Event.tui.session.select"
  9055. },
  9056. {
  9057. "$ref": "#/components/schemas/EventMcpToolsChanged"
  9058. },
  9059. {
  9060. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  9061. },
  9062. {
  9063. "$ref": "#/components/schemas/EventCommandExecuted"
  9064. },
  9065. {
  9066. "$ref": "#/components/schemas/EventProjectUpdated"
  9067. },
  9068. {
  9069. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  9070. },
  9071. {
  9072. "$ref": "#/components/schemas/EventWorkspaceReady"
  9073. },
  9074. {
  9075. "$ref": "#/components/schemas/EventWorkspaceFailed"
  9076. },
  9077. {
  9078. "$ref": "#/components/schemas/EventWorkspaceStatus"
  9079. },
  9080. {
  9081. "$ref": "#/components/schemas/EventWorktreeReady"
  9082. },
  9083. {
  9084. "$ref": "#/components/schemas/EventWorktreeFailed"
  9085. },
  9086. {
  9087. "$ref": "#/components/schemas/EventPtyCreated"
  9088. },
  9089. {
  9090. "$ref": "#/components/schemas/EventPtyUpdated"
  9091. },
  9092. {
  9093. "$ref": "#/components/schemas/EventPtyExited"
  9094. },
  9095. {
  9096. "$ref": "#/components/schemas/EventPtyDeleted"
  9097. },
  9098. {
  9099. "$ref": "#/components/schemas/EventMessageUpdated"
  9100. },
  9101. {
  9102. "$ref": "#/components/schemas/EventMessageRemoved"
  9103. },
  9104. {
  9105. "$ref": "#/components/schemas/EventMessagePartUpdated"
  9106. },
  9107. {
  9108. "$ref": "#/components/schemas/EventMessagePartRemoved"
  9109. },
  9110. {
  9111. "$ref": "#/components/schemas/EventSessionCreated"
  9112. },
  9113. {
  9114. "$ref": "#/components/schemas/EventSessionUpdated"
  9115. },
  9116. {
  9117. "$ref": "#/components/schemas/EventSessionDeleted"
  9118. },
  9119. {
  9120. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  9121. },
  9122. {
  9123. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  9124. },
  9125. {
  9126. "$ref": "#/components/schemas/EventSessionNextPrompted"
  9127. },
  9128. {
  9129. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  9130. },
  9131. {
  9132. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  9133. },
  9134. {
  9135. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9136. },
  9137. {
  9138. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9139. },
  9140. {
  9141. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9142. },
  9143. {
  9144. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9145. },
  9146. {
  9147. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9148. },
  9149. {
  9150. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9151. },
  9152. {
  9153. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9154. },
  9155. {
  9156. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9157. },
  9158. {
  9159. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9160. },
  9161. {
  9162. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9163. },
  9164. {
  9165. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9166. },
  9167. {
  9168. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9169. },
  9170. {
  9171. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9172. },
  9173. {
  9174. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9175. },
  9176. {
  9177. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9178. },
  9179. {
  9180. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9181. },
  9182. {
  9183. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9184. },
  9185. {
  9186. "$ref": "#/components/schemas/EventSessionNextRetried"
  9187. },
  9188. {
  9189. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9190. },
  9191. {
  9192. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9193. },
  9194. {
  9195. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9196. },
  9197. {
  9198. "$ref": "#/components/schemas/EventServerConnected"
  9199. },
  9200. {
  9201. "$ref": "#/components/schemas/EventGlobalDisposed"
  9202. }
  9203. ]
  9204. },
  9205. "OAuth": {
  9206. "type": "object",
  9207. "properties": {
  9208. "type": {
  9209. "type": "string",
  9210. "enum": ["oauth"]
  9211. },
  9212. "refresh": {
  9213. "type": "string"
  9214. },
  9215. "access": {
  9216. "type": "string"
  9217. },
  9218. "expires": {
  9219. "type": "integer",
  9220. "minimum": 0
  9221. },
  9222. "accountId": {
  9223. "type": "string"
  9224. },
  9225. "enterpriseUrl": {
  9226. "type": "string"
  9227. }
  9228. },
  9229. "required": ["type", "refresh", "access", "expires"],
  9230. "additionalProperties": false
  9231. },
  9232. "ApiAuth": {
  9233. "type": "object",
  9234. "properties": {
  9235. "type": {
  9236. "type": "string",
  9237. "enum": ["api"]
  9238. },
  9239. "key": {
  9240. "type": "string"
  9241. },
  9242. "metadata": {
  9243. "type": "object",
  9244. "additionalProperties": {
  9245. "type": "string"
  9246. }
  9247. }
  9248. },
  9249. "required": ["type", "key"],
  9250. "additionalProperties": false
  9251. },
  9252. "WellKnownAuth": {
  9253. "type": "object",
  9254. "properties": {
  9255. "type": {
  9256. "type": "string",
  9257. "enum": ["wellknown"]
  9258. },
  9259. "key": {
  9260. "type": "string"
  9261. },
  9262. "token": {
  9263. "type": "string"
  9264. }
  9265. },
  9266. "required": ["type", "key", "token"],
  9267. "additionalProperties": false
  9268. },
  9269. "Auth": {
  9270. "anyOf": [
  9271. {
  9272. "$ref": "#/components/schemas/OAuth"
  9273. },
  9274. {
  9275. "$ref": "#/components/schemas/ApiAuth"
  9276. },
  9277. {
  9278. "$ref": "#/components/schemas/WellKnownAuth"
  9279. }
  9280. ]
  9281. },
  9282. "PermissionRequest": {
  9283. "type": "object",
  9284. "properties": {
  9285. "id": {
  9286. "type": "string",
  9287. "pattern": "^per"
  9288. },
  9289. "sessionID": {
  9290. "type": "string",
  9291. "pattern": "^ses"
  9292. },
  9293. "permission": {
  9294. "type": "string"
  9295. },
  9296. "patterns": {
  9297. "type": "array",
  9298. "items": {
  9299. "type": "string"
  9300. }
  9301. },
  9302. "metadata": {
  9303. "type": "object"
  9304. },
  9305. "always": {
  9306. "type": "array",
  9307. "items": {
  9308. "type": "string"
  9309. }
  9310. },
  9311. "tool": {
  9312. "type": "object",
  9313. "properties": {
  9314. "messageID": {
  9315. "type": "string",
  9316. "pattern": "^msg"
  9317. },
  9318. "callID": {
  9319. "type": "string"
  9320. }
  9321. },
  9322. "required": ["messageID", "callID"],
  9323. "additionalProperties": false
  9324. }
  9325. },
  9326. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9327. "additionalProperties": false
  9328. },
  9329. "SnapshotFileDiff": {
  9330. "type": "object",
  9331. "properties": {
  9332. "file": {
  9333. "type": "string"
  9334. },
  9335. "patch": {
  9336. "type": "string"
  9337. },
  9338. "additions": {
  9339. "type": "number"
  9340. },
  9341. "deletions": {
  9342. "type": "number"
  9343. },
  9344. "status": {
  9345. "type": "string",
  9346. "enum": ["added", "deleted", "modified"]
  9347. }
  9348. },
  9349. "required": ["additions", "deletions"],
  9350. "additionalProperties": false
  9351. },
  9352. "ProviderAuthError": {
  9353. "type": "object",
  9354. "properties": {
  9355. "name": {
  9356. "type": "string",
  9357. "enum": ["ProviderAuthError"]
  9358. },
  9359. "data": {
  9360. "type": "object",
  9361. "properties": {
  9362. "providerID": {
  9363. "type": "string"
  9364. },
  9365. "message": {
  9366. "type": "string"
  9367. }
  9368. },
  9369. "required": ["providerID", "message"],
  9370. "additionalProperties": false
  9371. }
  9372. },
  9373. "required": ["name", "data"],
  9374. "additionalProperties": false
  9375. },
  9376. "UnknownError": {
  9377. "type": "object",
  9378. "properties": {
  9379. "name": {
  9380. "type": "string",
  9381. "enum": ["UnknownError"]
  9382. },
  9383. "data": {
  9384. "type": "object",
  9385. "properties": {
  9386. "message": {
  9387. "type": "string"
  9388. }
  9389. },
  9390. "required": ["message"],
  9391. "additionalProperties": false
  9392. }
  9393. },
  9394. "required": ["name", "data"],
  9395. "additionalProperties": false
  9396. },
  9397. "MessageOutputLengthError": {
  9398. "type": "object",
  9399. "properties": {
  9400. "name": {
  9401. "type": "string",
  9402. "enum": ["MessageOutputLengthError"]
  9403. },
  9404. "data": {
  9405. "type": "object",
  9406. "properties": {}
  9407. }
  9408. },
  9409. "required": ["name", "data"],
  9410. "additionalProperties": false
  9411. },
  9412. "MessageAbortedError": {
  9413. "type": "object",
  9414. "properties": {
  9415. "name": {
  9416. "type": "string",
  9417. "enum": ["MessageAbortedError"]
  9418. },
  9419. "data": {
  9420. "type": "object",
  9421. "properties": {
  9422. "message": {
  9423. "type": "string"
  9424. }
  9425. },
  9426. "required": ["message"],
  9427. "additionalProperties": false
  9428. }
  9429. },
  9430. "required": ["name", "data"],
  9431. "additionalProperties": false
  9432. },
  9433. "StructuredOutputError": {
  9434. "type": "object",
  9435. "properties": {
  9436. "name": {
  9437. "type": "string",
  9438. "enum": ["StructuredOutputError"]
  9439. },
  9440. "data": {
  9441. "type": "object",
  9442. "properties": {
  9443. "message": {
  9444. "type": "string"
  9445. },
  9446. "retries": {
  9447. "type": "integer",
  9448. "minimum": 0
  9449. }
  9450. },
  9451. "required": ["message", "retries"],
  9452. "additionalProperties": false
  9453. }
  9454. },
  9455. "required": ["name", "data"],
  9456. "additionalProperties": false
  9457. },
  9458. "ContextOverflowError": {
  9459. "type": "object",
  9460. "properties": {
  9461. "name": {
  9462. "type": "string",
  9463. "enum": ["ContextOverflowError"]
  9464. },
  9465. "data": {
  9466. "type": "object",
  9467. "properties": {
  9468. "message": {
  9469. "type": "string"
  9470. },
  9471. "responseBody": {
  9472. "type": "string"
  9473. }
  9474. },
  9475. "required": ["message"],
  9476. "additionalProperties": false
  9477. }
  9478. },
  9479. "required": ["name", "data"],
  9480. "additionalProperties": false
  9481. },
  9482. "APIError": {
  9483. "type": "object",
  9484. "properties": {
  9485. "name": {
  9486. "type": "string",
  9487. "enum": ["APIError"]
  9488. },
  9489. "data": {
  9490. "type": "object",
  9491. "properties": {
  9492. "message": {
  9493. "type": "string"
  9494. },
  9495. "statusCode": {
  9496. "type": "integer",
  9497. "minimum": 0
  9498. },
  9499. "isRetryable": {
  9500. "type": "boolean"
  9501. },
  9502. "responseHeaders": {
  9503. "type": "object",
  9504. "additionalProperties": {
  9505. "type": "string"
  9506. }
  9507. },
  9508. "responseBody": {
  9509. "type": "string"
  9510. },
  9511. "metadata": {
  9512. "type": "object",
  9513. "additionalProperties": {
  9514. "type": "string"
  9515. }
  9516. }
  9517. },
  9518. "required": ["message", "isRetryable"],
  9519. "additionalProperties": false
  9520. }
  9521. },
  9522. "required": ["name", "data"],
  9523. "additionalProperties": false
  9524. },
  9525. "QuestionOption": {
  9526. "type": "object",
  9527. "properties": {
  9528. "label": {
  9529. "type": "string",
  9530. "description": "Display text (1-5 words, concise)"
  9531. },
  9532. "description": {
  9533. "type": "string",
  9534. "description": "Explanation of choice"
  9535. }
  9536. },
  9537. "required": ["label", "description"],
  9538. "additionalProperties": false
  9539. },
  9540. "QuestionInfo": {
  9541. "type": "object",
  9542. "properties": {
  9543. "question": {
  9544. "type": "string",
  9545. "description": "Complete question"
  9546. },
  9547. "header": {
  9548. "type": "string",
  9549. "description": "Very short label (max 30 chars)"
  9550. },
  9551. "options": {
  9552. "type": "array",
  9553. "items": {
  9554. "$ref": "#/components/schemas/QuestionOption"
  9555. },
  9556. "description": "Available choices"
  9557. },
  9558. "multiple": {
  9559. "type": "boolean"
  9560. },
  9561. "custom": {
  9562. "type": "boolean"
  9563. }
  9564. },
  9565. "required": ["question", "header", "options"],
  9566. "additionalProperties": false
  9567. },
  9568. "QuestionTool": {
  9569. "type": "object",
  9570. "properties": {
  9571. "messageID": {
  9572. "type": "string",
  9573. "pattern": "^msg"
  9574. },
  9575. "callID": {
  9576. "type": "string"
  9577. }
  9578. },
  9579. "required": ["messageID", "callID"],
  9580. "additionalProperties": false
  9581. },
  9582. "QuestionRequest": {
  9583. "type": "object",
  9584. "properties": {
  9585. "id": {
  9586. "type": "string",
  9587. "pattern": "^que"
  9588. },
  9589. "sessionID": {
  9590. "type": "string",
  9591. "pattern": "^ses"
  9592. },
  9593. "questions": {
  9594. "type": "array",
  9595. "items": {
  9596. "$ref": "#/components/schemas/QuestionInfo"
  9597. },
  9598. "description": "Questions to ask"
  9599. },
  9600. "tool": {
  9601. "$ref": "#/components/schemas/QuestionTool"
  9602. }
  9603. },
  9604. "required": ["id", "sessionID", "questions"],
  9605. "additionalProperties": false
  9606. },
  9607. "QuestionAnswer": {
  9608. "type": "array",
  9609. "items": {
  9610. "type": "string"
  9611. }
  9612. },
  9613. "QuestionReplied": {
  9614. "type": "object",
  9615. "properties": {
  9616. "sessionID": {
  9617. "type": "string",
  9618. "pattern": "^ses"
  9619. },
  9620. "requestID": {
  9621. "type": "string",
  9622. "pattern": "^que"
  9623. },
  9624. "answers": {
  9625. "type": "array",
  9626. "items": {
  9627. "$ref": "#/components/schemas/QuestionAnswer"
  9628. }
  9629. }
  9630. },
  9631. "required": ["sessionID", "requestID", "answers"],
  9632. "additionalProperties": false
  9633. },
  9634. "QuestionRejected": {
  9635. "type": "object",
  9636. "properties": {
  9637. "sessionID": {
  9638. "type": "string",
  9639. "pattern": "^ses"
  9640. },
  9641. "requestID": {
  9642. "type": "string",
  9643. "pattern": "^que"
  9644. }
  9645. },
  9646. "required": ["sessionID", "requestID"],
  9647. "additionalProperties": false
  9648. },
  9649. "Todo": {
  9650. "type": "object",
  9651. "properties": {
  9652. "content": {
  9653. "type": "string",
  9654. "description": "Brief description of the task"
  9655. },
  9656. "status": {
  9657. "type": "string",
  9658. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9659. },
  9660. "priority": {
  9661. "type": "string",
  9662. "description": "Priority level of the task: high, medium, low"
  9663. }
  9664. },
  9665. "required": ["content", "status", "priority"],
  9666. "additionalProperties": false
  9667. },
  9668. "SessionStatus": {
  9669. "anyOf": [
  9670. {
  9671. "type": "object",
  9672. "properties": {
  9673. "type": {
  9674. "type": "string",
  9675. "enum": ["idle"]
  9676. }
  9677. },
  9678. "required": ["type"],
  9679. "additionalProperties": false
  9680. },
  9681. {
  9682. "type": "object",
  9683. "properties": {
  9684. "type": {
  9685. "type": "string",
  9686. "enum": ["retry"]
  9687. },
  9688. "attempt": {
  9689. "type": "integer",
  9690. "minimum": 0
  9691. },
  9692. "message": {
  9693. "type": "string"
  9694. },
  9695. "action": {
  9696. "type": "object",
  9697. "properties": {
  9698. "reason": {
  9699. "type": "string"
  9700. },
  9701. "provider": {
  9702. "type": "string"
  9703. },
  9704. "title": {
  9705. "type": "string"
  9706. },
  9707. "message": {
  9708. "type": "string"
  9709. },
  9710. "label": {
  9711. "type": "string"
  9712. },
  9713. "link": {
  9714. "type": "string"
  9715. }
  9716. },
  9717. "required": ["reason", "provider", "title", "message", "label"],
  9718. "additionalProperties": false
  9719. },
  9720. "next": {
  9721. "type": "integer",
  9722. "minimum": 0
  9723. }
  9724. },
  9725. "required": ["type", "attempt", "message", "next"],
  9726. "additionalProperties": false
  9727. },
  9728. {
  9729. "type": "object",
  9730. "properties": {
  9731. "type": {
  9732. "type": "string",
  9733. "enum": ["busy"]
  9734. }
  9735. },
  9736. "required": ["type"],
  9737. "additionalProperties": false
  9738. }
  9739. ]
  9740. },
  9741. "Event.tui.prompt.append": {
  9742. "type": "object",
  9743. "properties": {
  9744. "id": {
  9745. "type": "string"
  9746. },
  9747. "type": {
  9748. "type": "string",
  9749. "enum": ["tui.prompt.append"]
  9750. },
  9751. "properties": {
  9752. "type": "object",
  9753. "properties": {
  9754. "text": {
  9755. "type": "string"
  9756. }
  9757. },
  9758. "required": ["text"],
  9759. "additionalProperties": false
  9760. }
  9761. },
  9762. "required": ["id", "type", "properties"],
  9763. "additionalProperties": false
  9764. },
  9765. "Event.tui.command.execute": {
  9766. "type": "object",
  9767. "properties": {
  9768. "id": {
  9769. "type": "string"
  9770. },
  9771. "type": {
  9772. "type": "string",
  9773. "enum": ["tui.command.execute"]
  9774. },
  9775. "properties": {
  9776. "type": "object",
  9777. "properties": {
  9778. "command": {
  9779. "anyOf": [
  9780. {
  9781. "type": "string",
  9782. "enum": [
  9783. "session.list",
  9784. "session.new",
  9785. "session.share",
  9786. "session.interrupt",
  9787. "session.compact",
  9788. "session.page.up",
  9789. "session.page.down",
  9790. "session.line.up",
  9791. "session.line.down",
  9792. "session.half.page.up",
  9793. "session.half.page.down",
  9794. "session.first",
  9795. "session.last",
  9796. "prompt.clear",
  9797. "prompt.submit",
  9798. "agent.cycle"
  9799. ]
  9800. },
  9801. {
  9802. "type": "string"
  9803. }
  9804. ]
  9805. }
  9806. },
  9807. "required": ["command"],
  9808. "additionalProperties": false
  9809. }
  9810. },
  9811. "required": ["id", "type", "properties"],
  9812. "additionalProperties": false
  9813. },
  9814. "Event.tui.toast.show": {
  9815. "type": "object",
  9816. "properties": {
  9817. "id": {
  9818. "type": "string"
  9819. },
  9820. "type": {
  9821. "type": "string",
  9822. "enum": ["tui.toast.show"]
  9823. },
  9824. "properties": {
  9825. "type": "object",
  9826. "properties": {
  9827. "title": {
  9828. "type": "string"
  9829. },
  9830. "message": {
  9831. "type": "string"
  9832. },
  9833. "variant": {
  9834. "type": "string",
  9835. "enum": ["info", "success", "warning", "error"]
  9836. },
  9837. "duration": {
  9838. "type": "integer",
  9839. "exclusiveMinimum": 0
  9840. }
  9841. },
  9842. "required": ["message", "variant"],
  9843. "additionalProperties": false
  9844. }
  9845. },
  9846. "required": ["id", "type", "properties"],
  9847. "additionalProperties": false
  9848. },
  9849. "Event.tui.session.select": {
  9850. "type": "object",
  9851. "properties": {
  9852. "id": {
  9853. "type": "string"
  9854. },
  9855. "type": {
  9856. "type": "string",
  9857. "enum": ["tui.session.select"]
  9858. },
  9859. "properties": {
  9860. "type": "object",
  9861. "properties": {
  9862. "sessionID": {
  9863. "type": "string",
  9864. "pattern": "^ses",
  9865. "description": "Session ID to navigate to"
  9866. }
  9867. },
  9868. "required": ["sessionID"],
  9869. "additionalProperties": false
  9870. }
  9871. },
  9872. "required": ["id", "type", "properties"],
  9873. "additionalProperties": false
  9874. },
  9875. "Project": {
  9876. "type": "object",
  9877. "properties": {
  9878. "id": {
  9879. "type": "string"
  9880. },
  9881. "worktree": {
  9882. "type": "string"
  9883. },
  9884. "vcs": {
  9885. "type": "string",
  9886. "enum": ["git"]
  9887. },
  9888. "name": {
  9889. "type": "string"
  9890. },
  9891. "icon": {
  9892. "type": "object",
  9893. "properties": {
  9894. "url": {
  9895. "type": "string"
  9896. },
  9897. "override": {
  9898. "type": "string"
  9899. },
  9900. "color": {
  9901. "type": "string"
  9902. }
  9903. },
  9904. "additionalProperties": false
  9905. },
  9906. "commands": {
  9907. "type": "object",
  9908. "properties": {
  9909. "start": {
  9910. "type": "string",
  9911. "description": "Startup script to run when creating a new workspace (worktree)"
  9912. }
  9913. },
  9914. "additionalProperties": false
  9915. },
  9916. "time": {
  9917. "type": "object",
  9918. "properties": {
  9919. "created": {
  9920. "type": "integer",
  9921. "minimum": 0
  9922. },
  9923. "updated": {
  9924. "type": "integer",
  9925. "minimum": 0
  9926. },
  9927. "initialized": {
  9928. "type": "integer",
  9929. "minimum": 0
  9930. }
  9931. },
  9932. "required": ["created", "updated"],
  9933. "additionalProperties": false
  9934. },
  9935. "sandboxes": {
  9936. "type": "array",
  9937. "items": {
  9938. "type": "string"
  9939. }
  9940. }
  9941. },
  9942. "required": ["id", "worktree", "time", "sandboxes"],
  9943. "additionalProperties": false
  9944. },
  9945. "Pty": {
  9946. "type": "object",
  9947. "properties": {
  9948. "id": {
  9949. "type": "string",
  9950. "pattern": "^pty"
  9951. },
  9952. "title": {
  9953. "type": "string"
  9954. },
  9955. "command": {
  9956. "type": "string"
  9957. },
  9958. "args": {
  9959. "type": "array",
  9960. "items": {
  9961. "type": "string"
  9962. }
  9963. },
  9964. "cwd": {
  9965. "type": "string"
  9966. },
  9967. "status": {
  9968. "type": "string",
  9969. "enum": ["running", "exited"]
  9970. },
  9971. "pid": {
  9972. "type": "integer",
  9973. "exclusiveMinimum": 0
  9974. }
  9975. },
  9976. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9977. "additionalProperties": false
  9978. },
  9979. "OutputFormatText": {
  9980. "type": "object",
  9981. "properties": {
  9982. "type": {
  9983. "type": "string",
  9984. "enum": ["text"]
  9985. }
  9986. },
  9987. "required": ["type"],
  9988. "additionalProperties": false
  9989. },
  9990. "JSONSchema": {
  9991. "type": "object"
  9992. },
  9993. "OutputFormatJsonSchema": {
  9994. "type": "object",
  9995. "properties": {
  9996. "type": {
  9997. "type": "string",
  9998. "enum": ["json_schema"]
  9999. },
  10000. "schema": {
  10001. "$ref": "#/components/schemas/JSONSchema"
  10002. },
  10003. "retryCount": {
  10004. "type": "integer",
  10005. "minimum": 0
  10006. }
  10007. },
  10008. "required": ["type", "schema"],
  10009. "additionalProperties": false
  10010. },
  10011. "OutputFormat": {
  10012. "anyOf": [
  10013. {
  10014. "$ref": "#/components/schemas/OutputFormatText"
  10015. },
  10016. {
  10017. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  10018. }
  10019. ]
  10020. },
  10021. "UserMessage": {
  10022. "type": "object",
  10023. "properties": {
  10024. "id": {
  10025. "type": "string",
  10026. "pattern": "^msg"
  10027. },
  10028. "sessionID": {
  10029. "type": "string",
  10030. "pattern": "^ses"
  10031. },
  10032. "role": {
  10033. "type": "string",
  10034. "enum": ["user"]
  10035. },
  10036. "time": {
  10037. "type": "object",
  10038. "properties": {
  10039. "created": {
  10040. "type": "integer",
  10041. "minimum": 0
  10042. }
  10043. },
  10044. "required": ["created"],
  10045. "additionalProperties": false
  10046. },
  10047. "format": {
  10048. "$ref": "#/components/schemas/OutputFormat"
  10049. },
  10050. "summary": {
  10051. "type": "object",
  10052. "properties": {
  10053. "title": {
  10054. "type": "string"
  10055. },
  10056. "body": {
  10057. "type": "string"
  10058. },
  10059. "diffs": {
  10060. "type": "array",
  10061. "items": {
  10062. "$ref": "#/components/schemas/SnapshotFileDiff"
  10063. }
  10064. }
  10065. },
  10066. "required": ["diffs"],
  10067. "additionalProperties": false
  10068. },
  10069. "agent": {
  10070. "type": "string"
  10071. },
  10072. "model": {
  10073. "type": "object",
  10074. "properties": {
  10075. "providerID": {
  10076. "type": "string"
  10077. },
  10078. "modelID": {
  10079. "type": "string"
  10080. },
  10081. "variant": {
  10082. "type": "string"
  10083. }
  10084. },
  10085. "required": ["providerID", "modelID"],
  10086. "additionalProperties": false
  10087. },
  10088. "system": {
  10089. "type": "string"
  10090. },
  10091. "tools": {
  10092. "type": "object",
  10093. "additionalProperties": {
  10094. "type": "boolean"
  10095. }
  10096. }
  10097. },
  10098. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  10099. "additionalProperties": false
  10100. },
  10101. "AssistantMessage": {
  10102. "type": "object",
  10103. "properties": {
  10104. "id": {
  10105. "type": "string",
  10106. "pattern": "^msg"
  10107. },
  10108. "sessionID": {
  10109. "type": "string",
  10110. "pattern": "^ses"
  10111. },
  10112. "role": {
  10113. "type": "string",
  10114. "enum": ["assistant"]
  10115. },
  10116. "time": {
  10117. "type": "object",
  10118. "properties": {
  10119. "created": {
  10120. "type": "integer",
  10121. "minimum": 0
  10122. },
  10123. "completed": {
  10124. "type": "integer",
  10125. "minimum": 0
  10126. }
  10127. },
  10128. "required": ["created"],
  10129. "additionalProperties": false
  10130. },
  10131. "error": {
  10132. "anyOf": [
  10133. {
  10134. "$ref": "#/components/schemas/ProviderAuthError"
  10135. },
  10136. {
  10137. "$ref": "#/components/schemas/UnknownError"
  10138. },
  10139. {
  10140. "$ref": "#/components/schemas/MessageOutputLengthError"
  10141. },
  10142. {
  10143. "$ref": "#/components/schemas/MessageAbortedError"
  10144. },
  10145. {
  10146. "$ref": "#/components/schemas/StructuredOutputError"
  10147. },
  10148. {
  10149. "$ref": "#/components/schemas/ContextOverflowError"
  10150. },
  10151. {
  10152. "$ref": "#/components/schemas/APIError"
  10153. }
  10154. ]
  10155. },
  10156. "parentID": {
  10157. "type": "string",
  10158. "pattern": "^msg"
  10159. },
  10160. "modelID": {
  10161. "type": "string"
  10162. },
  10163. "providerID": {
  10164. "type": "string"
  10165. },
  10166. "mode": {
  10167. "type": "string"
  10168. },
  10169. "agent": {
  10170. "type": "string"
  10171. },
  10172. "path": {
  10173. "type": "object",
  10174. "properties": {
  10175. "cwd": {
  10176. "type": "string"
  10177. },
  10178. "root": {
  10179. "type": "string"
  10180. }
  10181. },
  10182. "required": ["cwd", "root"],
  10183. "additionalProperties": false
  10184. },
  10185. "summary": {
  10186. "type": "boolean"
  10187. },
  10188. "cost": {
  10189. "type": "number"
  10190. },
  10191. "tokens": {
  10192. "type": "object",
  10193. "properties": {
  10194. "total": {
  10195. "type": "number"
  10196. },
  10197. "input": {
  10198. "type": "number"
  10199. },
  10200. "output": {
  10201. "type": "number"
  10202. },
  10203. "reasoning": {
  10204. "type": "number"
  10205. },
  10206. "cache": {
  10207. "type": "object",
  10208. "properties": {
  10209. "read": {
  10210. "type": "number"
  10211. },
  10212. "write": {
  10213. "type": "number"
  10214. }
  10215. },
  10216. "required": ["read", "write"],
  10217. "additionalProperties": false
  10218. }
  10219. },
  10220. "required": ["input", "output", "reasoning", "cache"],
  10221. "additionalProperties": false
  10222. },
  10223. "structured": {},
  10224. "variant": {
  10225. "type": "string"
  10226. },
  10227. "finish": {
  10228. "type": "string"
  10229. }
  10230. },
  10231. "required": [
  10232. "id",
  10233. "sessionID",
  10234. "role",
  10235. "time",
  10236. "parentID",
  10237. "modelID",
  10238. "providerID",
  10239. "mode",
  10240. "agent",
  10241. "path",
  10242. "cost",
  10243. "tokens"
  10244. ],
  10245. "additionalProperties": false
  10246. },
  10247. "Message": {
  10248. "anyOf": [
  10249. {
  10250. "$ref": "#/components/schemas/UserMessage"
  10251. },
  10252. {
  10253. "$ref": "#/components/schemas/AssistantMessage"
  10254. }
  10255. ]
  10256. },
  10257. "TextPart": {
  10258. "type": "object",
  10259. "properties": {
  10260. "id": {
  10261. "type": "string",
  10262. "pattern": "^prt"
  10263. },
  10264. "sessionID": {
  10265. "type": "string",
  10266. "pattern": "^ses"
  10267. },
  10268. "messageID": {
  10269. "type": "string",
  10270. "pattern": "^msg"
  10271. },
  10272. "type": {
  10273. "type": "string",
  10274. "enum": ["text"]
  10275. },
  10276. "text": {
  10277. "type": "string"
  10278. },
  10279. "synthetic": {
  10280. "type": "boolean"
  10281. },
  10282. "ignored": {
  10283. "type": "boolean"
  10284. },
  10285. "time": {
  10286. "type": "object",
  10287. "properties": {
  10288. "start": {
  10289. "type": "integer",
  10290. "minimum": 0
  10291. },
  10292. "end": {
  10293. "type": "integer",
  10294. "minimum": 0
  10295. }
  10296. },
  10297. "required": ["start"],
  10298. "additionalProperties": false
  10299. },
  10300. "metadata": {
  10301. "type": "object"
  10302. }
  10303. },
  10304. "required": ["id", "sessionID", "messageID", "type", "text"],
  10305. "additionalProperties": false
  10306. },
  10307. "SubtaskPart": {
  10308. "type": "object",
  10309. "properties": {
  10310. "id": {
  10311. "type": "string",
  10312. "pattern": "^prt"
  10313. },
  10314. "sessionID": {
  10315. "type": "string",
  10316. "pattern": "^ses"
  10317. },
  10318. "messageID": {
  10319. "type": "string",
  10320. "pattern": "^msg"
  10321. },
  10322. "type": {
  10323. "type": "string",
  10324. "enum": ["subtask"]
  10325. },
  10326. "prompt": {
  10327. "type": "string"
  10328. },
  10329. "description": {
  10330. "type": "string"
  10331. },
  10332. "agent": {
  10333. "type": "string"
  10334. },
  10335. "model": {
  10336. "type": "object",
  10337. "properties": {
  10338. "providerID": {
  10339. "type": "string"
  10340. },
  10341. "modelID": {
  10342. "type": "string"
  10343. }
  10344. },
  10345. "required": ["providerID", "modelID"],
  10346. "additionalProperties": false
  10347. },
  10348. "command": {
  10349. "type": "string"
  10350. }
  10351. },
  10352. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10353. "additionalProperties": false
  10354. },
  10355. "ReasoningPart": {
  10356. "type": "object",
  10357. "properties": {
  10358. "id": {
  10359. "type": "string",
  10360. "pattern": "^prt"
  10361. },
  10362. "sessionID": {
  10363. "type": "string",
  10364. "pattern": "^ses"
  10365. },
  10366. "messageID": {
  10367. "type": "string",
  10368. "pattern": "^msg"
  10369. },
  10370. "type": {
  10371. "type": "string",
  10372. "enum": ["reasoning"]
  10373. },
  10374. "text": {
  10375. "type": "string"
  10376. },
  10377. "metadata": {
  10378. "type": "object"
  10379. },
  10380. "time": {
  10381. "type": "object",
  10382. "properties": {
  10383. "start": {
  10384. "type": "integer",
  10385. "minimum": 0
  10386. },
  10387. "end": {
  10388. "type": "integer",
  10389. "minimum": 0
  10390. }
  10391. },
  10392. "required": ["start"],
  10393. "additionalProperties": false
  10394. }
  10395. },
  10396. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10397. "additionalProperties": false
  10398. },
  10399. "FilePartSourceText": {
  10400. "type": "object",
  10401. "properties": {
  10402. "value": {
  10403. "type": "string"
  10404. },
  10405. "start": {
  10406. "type": "number"
  10407. },
  10408. "end": {
  10409. "type": "number"
  10410. }
  10411. },
  10412. "required": ["value", "start", "end"],
  10413. "additionalProperties": false
  10414. },
  10415. "FileSource": {
  10416. "type": "object",
  10417. "properties": {
  10418. "text": {
  10419. "$ref": "#/components/schemas/FilePartSourceText"
  10420. },
  10421. "type": {
  10422. "type": "string",
  10423. "enum": ["file"]
  10424. },
  10425. "path": {
  10426. "type": "string"
  10427. }
  10428. },
  10429. "required": ["text", "type", "path"],
  10430. "additionalProperties": false
  10431. },
  10432. "Range": {
  10433. "type": "object",
  10434. "properties": {
  10435. "start": {
  10436. "type": "object",
  10437. "properties": {
  10438. "line": {
  10439. "type": "integer",
  10440. "minimum": 0
  10441. },
  10442. "character": {
  10443. "type": "integer",
  10444. "minimum": 0
  10445. }
  10446. },
  10447. "required": ["line", "character"],
  10448. "additionalProperties": false
  10449. },
  10450. "end": {
  10451. "type": "object",
  10452. "properties": {
  10453. "line": {
  10454. "type": "integer",
  10455. "minimum": 0
  10456. },
  10457. "character": {
  10458. "type": "integer",
  10459. "minimum": 0
  10460. }
  10461. },
  10462. "required": ["line", "character"],
  10463. "additionalProperties": false
  10464. }
  10465. },
  10466. "required": ["start", "end"],
  10467. "additionalProperties": false
  10468. },
  10469. "SymbolSource": {
  10470. "type": "object",
  10471. "properties": {
  10472. "text": {
  10473. "$ref": "#/components/schemas/FilePartSourceText"
  10474. },
  10475. "type": {
  10476. "type": "string",
  10477. "enum": ["symbol"]
  10478. },
  10479. "path": {
  10480. "type": "string"
  10481. },
  10482. "range": {
  10483. "$ref": "#/components/schemas/Range"
  10484. },
  10485. "name": {
  10486. "type": "string"
  10487. },
  10488. "kind": {
  10489. "type": "integer",
  10490. "minimum": 0
  10491. }
  10492. },
  10493. "required": ["text", "type", "path", "range", "name", "kind"],
  10494. "additionalProperties": false
  10495. },
  10496. "ResourceSource": {
  10497. "type": "object",
  10498. "properties": {
  10499. "text": {
  10500. "$ref": "#/components/schemas/FilePartSourceText"
  10501. },
  10502. "type": {
  10503. "type": "string",
  10504. "enum": ["resource"]
  10505. },
  10506. "clientName": {
  10507. "type": "string"
  10508. },
  10509. "uri": {
  10510. "type": "string"
  10511. }
  10512. },
  10513. "required": ["text", "type", "clientName", "uri"],
  10514. "additionalProperties": false
  10515. },
  10516. "FilePartSource": {
  10517. "anyOf": [
  10518. {
  10519. "$ref": "#/components/schemas/FileSource"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/SymbolSource"
  10523. },
  10524. {
  10525. "$ref": "#/components/schemas/ResourceSource"
  10526. }
  10527. ]
  10528. },
  10529. "FilePart": {
  10530. "type": "object",
  10531. "properties": {
  10532. "id": {
  10533. "type": "string",
  10534. "pattern": "^prt"
  10535. },
  10536. "sessionID": {
  10537. "type": "string",
  10538. "pattern": "^ses"
  10539. },
  10540. "messageID": {
  10541. "type": "string",
  10542. "pattern": "^msg"
  10543. },
  10544. "type": {
  10545. "type": "string",
  10546. "enum": ["file"]
  10547. },
  10548. "mime": {
  10549. "type": "string"
  10550. },
  10551. "filename": {
  10552. "type": "string"
  10553. },
  10554. "url": {
  10555. "type": "string"
  10556. },
  10557. "source": {
  10558. "$ref": "#/components/schemas/FilePartSource"
  10559. }
  10560. },
  10561. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10562. "additionalProperties": false
  10563. },
  10564. "ToolStatePending": {
  10565. "type": "object",
  10566. "properties": {
  10567. "status": {
  10568. "type": "string",
  10569. "enum": ["pending"]
  10570. },
  10571. "input": {
  10572. "type": "object"
  10573. },
  10574. "raw": {
  10575. "type": "string"
  10576. }
  10577. },
  10578. "required": ["status", "input", "raw"],
  10579. "additionalProperties": false
  10580. },
  10581. "ToolStateRunning": {
  10582. "type": "object",
  10583. "properties": {
  10584. "status": {
  10585. "type": "string",
  10586. "enum": ["running"]
  10587. },
  10588. "input": {
  10589. "type": "object"
  10590. },
  10591. "title": {
  10592. "type": "string"
  10593. },
  10594. "metadata": {
  10595. "type": "object"
  10596. },
  10597. "time": {
  10598. "type": "object",
  10599. "properties": {
  10600. "start": {
  10601. "type": "integer",
  10602. "minimum": 0
  10603. }
  10604. },
  10605. "required": ["start"],
  10606. "additionalProperties": false
  10607. }
  10608. },
  10609. "required": ["status", "input", "time"],
  10610. "additionalProperties": false
  10611. },
  10612. "ToolStateCompleted": {
  10613. "type": "object",
  10614. "properties": {
  10615. "status": {
  10616. "type": "string",
  10617. "enum": ["completed"]
  10618. },
  10619. "input": {
  10620. "type": "object"
  10621. },
  10622. "output": {
  10623. "type": "string"
  10624. },
  10625. "title": {
  10626. "type": "string"
  10627. },
  10628. "metadata": {
  10629. "type": "object"
  10630. },
  10631. "time": {
  10632. "type": "object",
  10633. "properties": {
  10634. "start": {
  10635. "type": "integer",
  10636. "minimum": 0
  10637. },
  10638. "end": {
  10639. "type": "integer",
  10640. "minimum": 0
  10641. },
  10642. "compacted": {
  10643. "type": "integer",
  10644. "minimum": 0
  10645. }
  10646. },
  10647. "required": ["start", "end"],
  10648. "additionalProperties": false
  10649. },
  10650. "attachments": {
  10651. "type": "array",
  10652. "items": {
  10653. "$ref": "#/components/schemas/FilePart"
  10654. }
  10655. }
  10656. },
  10657. "required": ["status", "input", "output", "title", "metadata", "time"],
  10658. "additionalProperties": false
  10659. },
  10660. "ToolStateError": {
  10661. "type": "object",
  10662. "properties": {
  10663. "status": {
  10664. "type": "string",
  10665. "enum": ["error"]
  10666. },
  10667. "input": {
  10668. "type": "object"
  10669. },
  10670. "error": {
  10671. "type": "string"
  10672. },
  10673. "metadata": {
  10674. "type": "object"
  10675. },
  10676. "time": {
  10677. "type": "object",
  10678. "properties": {
  10679. "start": {
  10680. "type": "integer",
  10681. "minimum": 0
  10682. },
  10683. "end": {
  10684. "type": "integer",
  10685. "minimum": 0
  10686. }
  10687. },
  10688. "required": ["start", "end"],
  10689. "additionalProperties": false
  10690. }
  10691. },
  10692. "required": ["status", "input", "error", "time"],
  10693. "additionalProperties": false
  10694. },
  10695. "ToolState": {
  10696. "anyOf": [
  10697. {
  10698. "$ref": "#/components/schemas/ToolStatePending"
  10699. },
  10700. {
  10701. "$ref": "#/components/schemas/ToolStateRunning"
  10702. },
  10703. {
  10704. "$ref": "#/components/schemas/ToolStateCompleted"
  10705. },
  10706. {
  10707. "$ref": "#/components/schemas/ToolStateError"
  10708. }
  10709. ]
  10710. },
  10711. "ToolPart": {
  10712. "type": "object",
  10713. "properties": {
  10714. "id": {
  10715. "type": "string",
  10716. "pattern": "^prt"
  10717. },
  10718. "sessionID": {
  10719. "type": "string",
  10720. "pattern": "^ses"
  10721. },
  10722. "messageID": {
  10723. "type": "string",
  10724. "pattern": "^msg"
  10725. },
  10726. "type": {
  10727. "type": "string",
  10728. "enum": ["tool"]
  10729. },
  10730. "callID": {
  10731. "type": "string"
  10732. },
  10733. "tool": {
  10734. "type": "string"
  10735. },
  10736. "state": {
  10737. "$ref": "#/components/schemas/ToolState"
  10738. },
  10739. "metadata": {
  10740. "type": "object"
  10741. }
  10742. },
  10743. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10744. "additionalProperties": false
  10745. },
  10746. "StepStartPart": {
  10747. "type": "object",
  10748. "properties": {
  10749. "id": {
  10750. "type": "string",
  10751. "pattern": "^prt"
  10752. },
  10753. "sessionID": {
  10754. "type": "string",
  10755. "pattern": "^ses"
  10756. },
  10757. "messageID": {
  10758. "type": "string",
  10759. "pattern": "^msg"
  10760. },
  10761. "type": {
  10762. "type": "string",
  10763. "enum": ["step-start"]
  10764. },
  10765. "snapshot": {
  10766. "type": "string"
  10767. }
  10768. },
  10769. "required": ["id", "sessionID", "messageID", "type"],
  10770. "additionalProperties": false
  10771. },
  10772. "StepFinishPart": {
  10773. "type": "object",
  10774. "properties": {
  10775. "id": {
  10776. "type": "string",
  10777. "pattern": "^prt"
  10778. },
  10779. "sessionID": {
  10780. "type": "string",
  10781. "pattern": "^ses"
  10782. },
  10783. "messageID": {
  10784. "type": "string",
  10785. "pattern": "^msg"
  10786. },
  10787. "type": {
  10788. "type": "string",
  10789. "enum": ["step-finish"]
  10790. },
  10791. "reason": {
  10792. "type": "string"
  10793. },
  10794. "snapshot": {
  10795. "type": "string"
  10796. },
  10797. "cost": {
  10798. "type": "number"
  10799. },
  10800. "tokens": {
  10801. "type": "object",
  10802. "properties": {
  10803. "total": {
  10804. "type": "number"
  10805. },
  10806. "input": {
  10807. "type": "number"
  10808. },
  10809. "output": {
  10810. "type": "number"
  10811. },
  10812. "reasoning": {
  10813. "type": "number"
  10814. },
  10815. "cache": {
  10816. "type": "object",
  10817. "properties": {
  10818. "read": {
  10819. "type": "number"
  10820. },
  10821. "write": {
  10822. "type": "number"
  10823. }
  10824. },
  10825. "required": ["read", "write"],
  10826. "additionalProperties": false
  10827. }
  10828. },
  10829. "required": ["input", "output", "reasoning", "cache"],
  10830. "additionalProperties": false
  10831. }
  10832. },
  10833. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10834. "additionalProperties": false
  10835. },
  10836. "SnapshotPart": {
  10837. "type": "object",
  10838. "properties": {
  10839. "id": {
  10840. "type": "string",
  10841. "pattern": "^prt"
  10842. },
  10843. "sessionID": {
  10844. "type": "string",
  10845. "pattern": "^ses"
  10846. },
  10847. "messageID": {
  10848. "type": "string",
  10849. "pattern": "^msg"
  10850. },
  10851. "type": {
  10852. "type": "string",
  10853. "enum": ["snapshot"]
  10854. },
  10855. "snapshot": {
  10856. "type": "string"
  10857. }
  10858. },
  10859. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10860. "additionalProperties": false
  10861. },
  10862. "PatchPart": {
  10863. "type": "object",
  10864. "properties": {
  10865. "id": {
  10866. "type": "string",
  10867. "pattern": "^prt"
  10868. },
  10869. "sessionID": {
  10870. "type": "string",
  10871. "pattern": "^ses"
  10872. },
  10873. "messageID": {
  10874. "type": "string",
  10875. "pattern": "^msg"
  10876. },
  10877. "type": {
  10878. "type": "string",
  10879. "enum": ["patch"]
  10880. },
  10881. "hash": {
  10882. "type": "string"
  10883. },
  10884. "files": {
  10885. "type": "array",
  10886. "items": {
  10887. "type": "string"
  10888. }
  10889. }
  10890. },
  10891. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10892. "additionalProperties": false
  10893. },
  10894. "AgentPart": {
  10895. "type": "object",
  10896. "properties": {
  10897. "id": {
  10898. "type": "string",
  10899. "pattern": "^prt"
  10900. },
  10901. "sessionID": {
  10902. "type": "string",
  10903. "pattern": "^ses"
  10904. },
  10905. "messageID": {
  10906. "type": "string",
  10907. "pattern": "^msg"
  10908. },
  10909. "type": {
  10910. "type": "string",
  10911. "enum": ["agent"]
  10912. },
  10913. "name": {
  10914. "type": "string"
  10915. },
  10916. "source": {
  10917. "type": "object",
  10918. "properties": {
  10919. "value": {
  10920. "type": "string"
  10921. },
  10922. "start": {
  10923. "type": "integer",
  10924. "minimum": 0
  10925. },
  10926. "end": {
  10927. "type": "integer",
  10928. "minimum": 0
  10929. }
  10930. },
  10931. "required": ["value", "start", "end"],
  10932. "additionalProperties": false
  10933. }
  10934. },
  10935. "required": ["id", "sessionID", "messageID", "type", "name"],
  10936. "additionalProperties": false
  10937. },
  10938. "RetryPart": {
  10939. "type": "object",
  10940. "properties": {
  10941. "id": {
  10942. "type": "string",
  10943. "pattern": "^prt"
  10944. },
  10945. "sessionID": {
  10946. "type": "string",
  10947. "pattern": "^ses"
  10948. },
  10949. "messageID": {
  10950. "type": "string",
  10951. "pattern": "^msg"
  10952. },
  10953. "type": {
  10954. "type": "string",
  10955. "enum": ["retry"]
  10956. },
  10957. "attempt": {
  10958. "type": "integer",
  10959. "minimum": 0
  10960. },
  10961. "error": {
  10962. "$ref": "#/components/schemas/APIError"
  10963. },
  10964. "time": {
  10965. "type": "object",
  10966. "properties": {
  10967. "created": {
  10968. "type": "integer",
  10969. "minimum": 0
  10970. }
  10971. },
  10972. "required": ["created"],
  10973. "additionalProperties": false
  10974. }
  10975. },
  10976. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10977. "additionalProperties": false
  10978. },
  10979. "CompactionPart": {
  10980. "type": "object",
  10981. "properties": {
  10982. "id": {
  10983. "type": "string",
  10984. "pattern": "^prt"
  10985. },
  10986. "sessionID": {
  10987. "type": "string",
  10988. "pattern": "^ses"
  10989. },
  10990. "messageID": {
  10991. "type": "string",
  10992. "pattern": "^msg"
  10993. },
  10994. "type": {
  10995. "type": "string",
  10996. "enum": ["compaction"]
  10997. },
  10998. "auto": {
  10999. "type": "boolean"
  11000. },
  11001. "overflow": {
  11002. "type": "boolean"
  11003. },
  11004. "tail_start_id": {
  11005. "type": "string",
  11006. "pattern": "^msg"
  11007. }
  11008. },
  11009. "required": ["id", "sessionID", "messageID", "type", "auto"],
  11010. "additionalProperties": false
  11011. },
  11012. "Part": {
  11013. "anyOf": [
  11014. {
  11015. "$ref": "#/components/schemas/TextPart"
  11016. },
  11017. {
  11018. "$ref": "#/components/schemas/SubtaskPart"
  11019. },
  11020. {
  11021. "$ref": "#/components/schemas/ReasoningPart"
  11022. },
  11023. {
  11024. "$ref": "#/components/schemas/FilePart"
  11025. },
  11026. {
  11027. "$ref": "#/components/schemas/ToolPart"
  11028. },
  11029. {
  11030. "$ref": "#/components/schemas/StepStartPart"
  11031. },
  11032. {
  11033. "$ref": "#/components/schemas/StepFinishPart"
  11034. },
  11035. {
  11036. "$ref": "#/components/schemas/SnapshotPart"
  11037. },
  11038. {
  11039. "$ref": "#/components/schemas/PatchPart"
  11040. },
  11041. {
  11042. "$ref": "#/components/schemas/AgentPart"
  11043. },
  11044. {
  11045. "$ref": "#/components/schemas/RetryPart"
  11046. },
  11047. {
  11048. "$ref": "#/components/schemas/CompactionPart"
  11049. }
  11050. ]
  11051. },
  11052. "PermissionAction": {
  11053. "type": "string",
  11054. "enum": ["allow", "deny", "ask"]
  11055. },
  11056. "PermissionRule": {
  11057. "type": "object",
  11058. "properties": {
  11059. "permission": {
  11060. "type": "string"
  11061. },
  11062. "pattern": {
  11063. "type": "string"
  11064. },
  11065. "action": {
  11066. "$ref": "#/components/schemas/PermissionAction"
  11067. }
  11068. },
  11069. "required": ["permission", "pattern", "action"],
  11070. "additionalProperties": false
  11071. },
  11072. "PermissionRuleset": {
  11073. "type": "array",
  11074. "items": {
  11075. "$ref": "#/components/schemas/PermissionRule"
  11076. }
  11077. },
  11078. "Session": {
  11079. "type": "object",
  11080. "properties": {
  11081. "id": {
  11082. "type": "string",
  11083. "pattern": "^ses"
  11084. },
  11085. "slug": {
  11086. "type": "string"
  11087. },
  11088. "projectID": {
  11089. "type": "string"
  11090. },
  11091. "workspaceID": {
  11092. "type": "string",
  11093. "pattern": "^wrk"
  11094. },
  11095. "directory": {
  11096. "type": "string"
  11097. },
  11098. "path": {
  11099. "type": "string"
  11100. },
  11101. "parentID": {
  11102. "type": "string",
  11103. "pattern": "^ses"
  11104. },
  11105. "summary": {
  11106. "type": "object",
  11107. "properties": {
  11108. "additions": {
  11109. "type": "number"
  11110. },
  11111. "deletions": {
  11112. "type": "number"
  11113. },
  11114. "files": {
  11115. "type": "number"
  11116. },
  11117. "diffs": {
  11118. "type": "array",
  11119. "items": {
  11120. "$ref": "#/components/schemas/SnapshotFileDiff"
  11121. }
  11122. }
  11123. },
  11124. "required": ["additions", "deletions", "files"],
  11125. "additionalProperties": false
  11126. },
  11127. "cost": {
  11128. "type": "number"
  11129. },
  11130. "tokens": {
  11131. "type": "object",
  11132. "properties": {
  11133. "input": {
  11134. "type": "number"
  11135. },
  11136. "output": {
  11137. "type": "number"
  11138. },
  11139. "reasoning": {
  11140. "type": "number"
  11141. },
  11142. "cache": {
  11143. "type": "object",
  11144. "properties": {
  11145. "read": {
  11146. "type": "number"
  11147. },
  11148. "write": {
  11149. "type": "number"
  11150. }
  11151. },
  11152. "required": ["read", "write"],
  11153. "additionalProperties": false
  11154. }
  11155. },
  11156. "required": ["input", "output", "reasoning", "cache"],
  11157. "additionalProperties": false
  11158. },
  11159. "share": {
  11160. "type": "object",
  11161. "properties": {
  11162. "url": {
  11163. "type": "string"
  11164. }
  11165. },
  11166. "required": ["url"],
  11167. "additionalProperties": false
  11168. },
  11169. "title": {
  11170. "type": "string"
  11171. },
  11172. "agent": {
  11173. "type": "string"
  11174. },
  11175. "model": {
  11176. "type": "object",
  11177. "properties": {
  11178. "id": {
  11179. "type": "string"
  11180. },
  11181. "providerID": {
  11182. "type": "string"
  11183. },
  11184. "variant": {
  11185. "type": "string"
  11186. }
  11187. },
  11188. "required": ["id", "providerID"],
  11189. "additionalProperties": false
  11190. },
  11191. "version": {
  11192. "type": "string"
  11193. },
  11194. "time": {
  11195. "type": "object",
  11196. "properties": {
  11197. "created": {
  11198. "type": "integer",
  11199. "minimum": 0
  11200. },
  11201. "updated": {
  11202. "type": "integer",
  11203. "minimum": 0
  11204. },
  11205. "compacting": {
  11206. "type": "integer",
  11207. "minimum": 0
  11208. },
  11209. "archived": {
  11210. "type": "number"
  11211. }
  11212. },
  11213. "required": ["created", "updated"],
  11214. "additionalProperties": false
  11215. },
  11216. "permission": {
  11217. "$ref": "#/components/schemas/PermissionRuleset"
  11218. },
  11219. "revert": {
  11220. "type": "object",
  11221. "properties": {
  11222. "messageID": {
  11223. "type": "string",
  11224. "pattern": "^msg"
  11225. },
  11226. "partID": {
  11227. "type": "string",
  11228. "pattern": "^prt"
  11229. },
  11230. "snapshot": {
  11231. "type": "string"
  11232. },
  11233. "diff": {
  11234. "type": "string"
  11235. }
  11236. },
  11237. "required": ["messageID"],
  11238. "additionalProperties": false
  11239. }
  11240. },
  11241. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11242. "additionalProperties": false
  11243. },
  11244. "Prompt": {
  11245. "type": "object",
  11246. "properties": {
  11247. "text": {
  11248. "type": "string"
  11249. },
  11250. "files": {
  11251. "type": "array",
  11252. "items": {
  11253. "$ref": "#/components/schemas/PromptFileAttachment"
  11254. }
  11255. },
  11256. "agents": {
  11257. "type": "array",
  11258. "items": {
  11259. "$ref": "#/components/schemas/PromptAgentAttachment"
  11260. }
  11261. },
  11262. "references": {
  11263. "type": "array",
  11264. "items": {
  11265. "$ref": "#/components/schemas/PromptReferenceAttachment"
  11266. }
  11267. }
  11268. },
  11269. "required": ["text"],
  11270. "additionalProperties": false
  11271. },
  11272. "GlobalEvent": {
  11273. "type": "object",
  11274. "properties": {
  11275. "directory": {
  11276. "type": "string"
  11277. },
  11278. "project": {
  11279. "type": "string"
  11280. },
  11281. "workspace": {
  11282. "type": "string"
  11283. },
  11284. "payload": {
  11285. "anyOf": [
  11286. {
  11287. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11288. },
  11289. {
  11290. "$ref": "#/components/schemas/EventFileEdited"
  11291. },
  11292. {
  11293. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11294. },
  11295. {
  11296. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11297. },
  11298. {
  11299. "$ref": "#/components/schemas/EventLspUpdated"
  11300. },
  11301. {
  11302. "$ref": "#/components/schemas/EventMessagePartDelta"
  11303. },
  11304. {
  11305. "$ref": "#/components/schemas/EventPermissionAsked"
  11306. },
  11307. {
  11308. "$ref": "#/components/schemas/EventPermissionReplied"
  11309. },
  11310. {
  11311. "$ref": "#/components/schemas/EventSessionDiff"
  11312. },
  11313. {
  11314. "$ref": "#/components/schemas/EventSessionError"
  11315. },
  11316. {
  11317. "$ref": "#/components/schemas/EventInstallationUpdated"
  11318. },
  11319. {
  11320. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11321. },
  11322. {
  11323. "$ref": "#/components/schemas/EventQuestionAsked"
  11324. },
  11325. {
  11326. "$ref": "#/components/schemas/EventQuestionReplied"
  11327. },
  11328. {
  11329. "$ref": "#/components/schemas/EventQuestionRejected"
  11330. },
  11331. {
  11332. "$ref": "#/components/schemas/EventTodoUpdated"
  11333. },
  11334. {
  11335. "$ref": "#/components/schemas/EventSessionStatus"
  11336. },
  11337. {
  11338. "$ref": "#/components/schemas/EventSessionIdle"
  11339. },
  11340. {
  11341. "$ref": "#/components/schemas/EventSessionCompacted"
  11342. },
  11343. {
  11344. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11345. },
  11346. {
  11347. "$ref": "#/components/schemas/Event.tui.command.execute"
  11348. },
  11349. {
  11350. "$ref": "#/components/schemas/Event.tui.toast.show"
  11351. },
  11352. {
  11353. "$ref": "#/components/schemas/Event.tui.session.select"
  11354. },
  11355. {
  11356. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11357. },
  11358. {
  11359. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11360. },
  11361. {
  11362. "$ref": "#/components/schemas/EventCommandExecuted"
  11363. },
  11364. {
  11365. "$ref": "#/components/schemas/EventProjectUpdated"
  11366. },
  11367. {
  11368. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11369. },
  11370. {
  11371. "$ref": "#/components/schemas/EventWorkspaceReady"
  11372. },
  11373. {
  11374. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11375. },
  11376. {
  11377. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11378. },
  11379. {
  11380. "$ref": "#/components/schemas/EventWorktreeReady"
  11381. },
  11382. {
  11383. "$ref": "#/components/schemas/EventWorktreeFailed"
  11384. },
  11385. {
  11386. "$ref": "#/components/schemas/EventPtyCreated"
  11387. },
  11388. {
  11389. "$ref": "#/components/schemas/EventPtyUpdated"
  11390. },
  11391. {
  11392. "$ref": "#/components/schemas/EventPtyExited"
  11393. },
  11394. {
  11395. "$ref": "#/components/schemas/EventPtyDeleted"
  11396. },
  11397. {
  11398. "$ref": "#/components/schemas/EventMessageUpdated"
  11399. },
  11400. {
  11401. "$ref": "#/components/schemas/EventMessageRemoved"
  11402. },
  11403. {
  11404. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11405. },
  11406. {
  11407. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11408. },
  11409. {
  11410. "$ref": "#/components/schemas/EventSessionCreated"
  11411. },
  11412. {
  11413. "$ref": "#/components/schemas/EventSessionUpdated"
  11414. },
  11415. {
  11416. "$ref": "#/components/schemas/EventSessionDeleted"
  11417. },
  11418. {
  11419. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11420. },
  11421. {
  11422. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11423. },
  11424. {
  11425. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11426. },
  11427. {
  11428. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11429. },
  11430. {
  11431. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11432. },
  11433. {
  11434. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11435. },
  11436. {
  11437. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11438. },
  11439. {
  11440. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11441. },
  11442. {
  11443. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11444. },
  11445. {
  11446. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11447. },
  11448. {
  11449. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11450. },
  11451. {
  11452. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11453. },
  11454. {
  11455. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11456. },
  11457. {
  11458. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11459. },
  11460. {
  11461. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11462. },
  11463. {
  11464. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11465. },
  11466. {
  11467. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11468. },
  11469. {
  11470. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11471. },
  11472. {
  11473. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11474. },
  11475. {
  11476. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11477. },
  11478. {
  11479. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11480. },
  11481. {
  11482. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11483. },
  11484. {
  11485. "$ref": "#/components/schemas/EventSessionNextRetried"
  11486. },
  11487. {
  11488. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11489. },
  11490. {
  11491. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11492. },
  11493. {
  11494. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11495. },
  11496. {
  11497. "$ref": "#/components/schemas/EventServerConnected"
  11498. },
  11499. {
  11500. "$ref": "#/components/schemas/EventGlobalDisposed"
  11501. },
  11502. {
  11503. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11504. },
  11505. {
  11506. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11507. },
  11508. {
  11509. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11510. },
  11511. {
  11512. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11513. },
  11514. {
  11515. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11516. },
  11517. {
  11518. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11519. },
  11520. {
  11521. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11522. },
  11523. {
  11524. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11525. },
  11526. {
  11527. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11528. },
  11529. {
  11530. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11531. },
  11532. {
  11533. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11534. },
  11535. {
  11536. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11537. },
  11538. {
  11539. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11540. },
  11541. {
  11542. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11543. },
  11544. {
  11545. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11546. },
  11547. {
  11548. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11549. },
  11550. {
  11551. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11552. },
  11553. {
  11554. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11555. },
  11556. {
  11557. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11558. },
  11559. {
  11560. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11561. },
  11562. {
  11563. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11564. },
  11565. {
  11566. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11567. },
  11568. {
  11569. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11570. },
  11571. {
  11572. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11573. },
  11574. {
  11575. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11576. },
  11577. {
  11578. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11579. },
  11580. {
  11581. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11582. },
  11583. {
  11584. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11585. },
  11586. {
  11587. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11588. },
  11589. {
  11590. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11591. },
  11592. {
  11593. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11594. },
  11595. {
  11596. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11597. },
  11598. {
  11599. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11600. }
  11601. ]
  11602. }
  11603. },
  11604. "required": ["directory", "payload"],
  11605. "additionalProperties": false
  11606. },
  11607. "LogLevel": {
  11608. "type": "string",
  11609. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11610. "description": "Log level"
  11611. },
  11612. "ServerConfig": {
  11613. "type": "object",
  11614. "properties": {
  11615. "port": {
  11616. "type": "integer",
  11617. "exclusiveMinimum": 0
  11618. },
  11619. "hostname": {
  11620. "type": "string"
  11621. },
  11622. "mdns": {
  11623. "type": "boolean"
  11624. },
  11625. "mdnsDomain": {
  11626. "type": "string"
  11627. },
  11628. "cors": {
  11629. "type": "array",
  11630. "items": {
  11631. "type": "string"
  11632. }
  11633. }
  11634. },
  11635. "additionalProperties": false,
  11636. "description": "Server configuration for opencode serve and web commands"
  11637. },
  11638. "ReferenceConfigEntry": {
  11639. "anyOf": [
  11640. {
  11641. "type": "string"
  11642. },
  11643. {
  11644. "type": "object",
  11645. "properties": {
  11646. "repository": {
  11647. "type": "string",
  11648. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11649. },
  11650. "branch": {
  11651. "type": "string"
  11652. }
  11653. },
  11654. "required": ["repository"],
  11655. "additionalProperties": false
  11656. },
  11657. {
  11658. "type": "object",
  11659. "properties": {
  11660. "path": {
  11661. "type": "string",
  11662. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11663. }
  11664. },
  11665. "required": ["path"],
  11666. "additionalProperties": false
  11667. }
  11668. ]
  11669. },
  11670. "ReferenceConfig": {
  11671. "type": "object",
  11672. "additionalProperties": {
  11673. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11674. }
  11675. },
  11676. "PermissionActionConfig": {
  11677. "type": "string",
  11678. "enum": ["ask", "allow", "deny"]
  11679. },
  11680. "PermissionObjectConfig": {
  11681. "type": "object",
  11682. "additionalProperties": {
  11683. "$ref": "#/components/schemas/PermissionActionConfig"
  11684. }
  11685. },
  11686. "PermissionRuleConfig": {
  11687. "anyOf": [
  11688. {
  11689. "$ref": "#/components/schemas/PermissionActionConfig"
  11690. },
  11691. {
  11692. "$ref": "#/components/schemas/PermissionObjectConfig"
  11693. }
  11694. ]
  11695. },
  11696. "PermissionConfig": {
  11697. "anyOf": [
  11698. {
  11699. "$ref": "#/components/schemas/PermissionActionConfig"
  11700. },
  11701. {
  11702. "type": "object",
  11703. "properties": {
  11704. "read": {
  11705. "$ref": "#/components/schemas/PermissionRuleConfig"
  11706. },
  11707. "edit": {
  11708. "$ref": "#/components/schemas/PermissionRuleConfig"
  11709. },
  11710. "glob": {
  11711. "$ref": "#/components/schemas/PermissionRuleConfig"
  11712. },
  11713. "grep": {
  11714. "$ref": "#/components/schemas/PermissionRuleConfig"
  11715. },
  11716. "list": {
  11717. "$ref": "#/components/schemas/PermissionRuleConfig"
  11718. },
  11719. "bash": {
  11720. "$ref": "#/components/schemas/PermissionRuleConfig"
  11721. },
  11722. "task": {
  11723. "$ref": "#/components/schemas/PermissionRuleConfig"
  11724. },
  11725. "external_directory": {
  11726. "$ref": "#/components/schemas/PermissionRuleConfig"
  11727. },
  11728. "todowrite": {
  11729. "$ref": "#/components/schemas/PermissionActionConfig"
  11730. },
  11731. "question": {
  11732. "$ref": "#/components/schemas/PermissionActionConfig"
  11733. },
  11734. "webfetch": {
  11735. "$ref": "#/components/schemas/PermissionActionConfig"
  11736. },
  11737. "websearch": {
  11738. "$ref": "#/components/schemas/PermissionActionConfig"
  11739. },
  11740. "repo_clone": {
  11741. "$ref": "#/components/schemas/PermissionRuleConfig"
  11742. },
  11743. "repo_overview": {
  11744. "$ref": "#/components/schemas/PermissionRuleConfig"
  11745. },
  11746. "lsp": {
  11747. "$ref": "#/components/schemas/PermissionRuleConfig"
  11748. },
  11749. "doom_loop": {
  11750. "$ref": "#/components/schemas/PermissionActionConfig"
  11751. },
  11752. "skill": {
  11753. "$ref": "#/components/schemas/PermissionRuleConfig"
  11754. }
  11755. },
  11756. "additionalProperties": {
  11757. "$ref": "#/components/schemas/PermissionRuleConfig"
  11758. }
  11759. }
  11760. ]
  11761. },
  11762. "AgentConfig": {
  11763. "type": "object",
  11764. "properties": {
  11765. "model": {
  11766. "type": "string"
  11767. },
  11768. "variant": {
  11769. "type": "string"
  11770. },
  11771. "temperature": {
  11772. "type": "number"
  11773. },
  11774. "top_p": {
  11775. "type": "number"
  11776. },
  11777. "prompt": {
  11778. "type": "string"
  11779. },
  11780. "tools": {
  11781. "type": "object",
  11782. "additionalProperties": {
  11783. "type": "boolean"
  11784. }
  11785. },
  11786. "disable": {
  11787. "type": "boolean"
  11788. },
  11789. "description": {
  11790. "type": "string"
  11791. },
  11792. "mode": {
  11793. "type": "string",
  11794. "enum": ["subagent", "primary", "all"]
  11795. },
  11796. "hidden": {
  11797. "type": "boolean"
  11798. },
  11799. "options": {
  11800. "type": "object"
  11801. },
  11802. "color": {
  11803. "anyOf": [
  11804. {
  11805. "type": "string",
  11806. "pattern": "^#[0-9a-fA-F]{6}$"
  11807. },
  11808. {
  11809. "type": "string",
  11810. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11811. }
  11812. ],
  11813. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11814. },
  11815. "steps": {
  11816. "type": "integer",
  11817. "exclusiveMinimum": 0
  11818. },
  11819. "maxSteps": {
  11820. "type": "integer",
  11821. "exclusiveMinimum": 0
  11822. },
  11823. "permission": {
  11824. "$ref": "#/components/schemas/PermissionConfig"
  11825. }
  11826. },
  11827. "additionalProperties": {}
  11828. },
  11829. "ProviderConfig": {
  11830. "type": "object",
  11831. "properties": {
  11832. "api": {
  11833. "type": "string"
  11834. },
  11835. "name": {
  11836. "type": "string"
  11837. },
  11838. "env": {
  11839. "type": "array",
  11840. "items": {
  11841. "type": "string"
  11842. }
  11843. },
  11844. "id": {
  11845. "type": "string"
  11846. },
  11847. "npm": {
  11848. "type": "string"
  11849. },
  11850. "whitelist": {
  11851. "type": "array",
  11852. "items": {
  11853. "type": "string"
  11854. }
  11855. },
  11856. "blacklist": {
  11857. "type": "array",
  11858. "items": {
  11859. "type": "string"
  11860. }
  11861. },
  11862. "options": {
  11863. "type": "object",
  11864. "properties": {
  11865. "apiKey": {
  11866. "type": "string"
  11867. },
  11868. "baseURL": {
  11869. "type": "string"
  11870. },
  11871. "enterpriseUrl": {
  11872. "type": "string"
  11873. },
  11874. "setCacheKey": {
  11875. "type": "boolean"
  11876. },
  11877. "timeout": {
  11878. "anyOf": [
  11879. {
  11880. "type": "integer",
  11881. "exclusiveMinimum": 0
  11882. },
  11883. {
  11884. "type": "boolean",
  11885. "enum": [false]
  11886. }
  11887. ],
  11888. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11889. },
  11890. "chunkTimeout": {
  11891. "type": "integer",
  11892. "exclusiveMinimum": 0
  11893. }
  11894. },
  11895. "additionalProperties": {}
  11896. },
  11897. "models": {
  11898. "type": "object",
  11899. "additionalProperties": {
  11900. "type": "object",
  11901. "properties": {
  11902. "id": {
  11903. "type": "string"
  11904. },
  11905. "name": {
  11906. "type": "string"
  11907. },
  11908. "family": {
  11909. "type": "string"
  11910. },
  11911. "release_date": {
  11912. "type": "string"
  11913. },
  11914. "attachment": {
  11915. "type": "boolean"
  11916. },
  11917. "reasoning": {
  11918. "type": "boolean"
  11919. },
  11920. "temperature": {
  11921. "type": "boolean"
  11922. },
  11923. "tool_call": {
  11924. "type": "boolean"
  11925. },
  11926. "interleaved": {
  11927. "anyOf": [
  11928. {
  11929. "type": "boolean",
  11930. "enum": [true]
  11931. },
  11932. {
  11933. "type": "object",
  11934. "properties": {
  11935. "field": {
  11936. "type": "string",
  11937. "enum": ["reasoning_content", "reasoning_details"]
  11938. }
  11939. },
  11940. "required": ["field"],
  11941. "additionalProperties": false
  11942. }
  11943. ]
  11944. },
  11945. "cost": {
  11946. "type": "object",
  11947. "properties": {
  11948. "input": {
  11949. "type": "number"
  11950. },
  11951. "output": {
  11952. "type": "number"
  11953. },
  11954. "cache_read": {
  11955. "type": "number"
  11956. },
  11957. "cache_write": {
  11958. "type": "number"
  11959. },
  11960. "context_over_200k": {
  11961. "type": "object",
  11962. "properties": {
  11963. "input": {
  11964. "type": "number"
  11965. },
  11966. "output": {
  11967. "type": "number"
  11968. },
  11969. "cache_read": {
  11970. "type": "number"
  11971. },
  11972. "cache_write": {
  11973. "type": "number"
  11974. }
  11975. },
  11976. "required": ["input", "output"],
  11977. "additionalProperties": false
  11978. }
  11979. },
  11980. "required": ["input", "output"],
  11981. "additionalProperties": false
  11982. },
  11983. "limit": {
  11984. "type": "object",
  11985. "properties": {
  11986. "context": {
  11987. "type": "number"
  11988. },
  11989. "input": {
  11990. "type": "number"
  11991. },
  11992. "output": {
  11993. "type": "number"
  11994. }
  11995. },
  11996. "required": ["context", "output"],
  11997. "additionalProperties": false
  11998. },
  11999. "modalities": {
  12000. "type": "object",
  12001. "properties": {
  12002. "input": {
  12003. "type": "array",
  12004. "items": {
  12005. "type": "string",
  12006. "enum": ["text", "audio", "image", "video", "pdf"]
  12007. }
  12008. },
  12009. "output": {
  12010. "type": "array",
  12011. "items": {
  12012. "type": "string",
  12013. "enum": ["text", "audio", "image", "video", "pdf"]
  12014. }
  12015. }
  12016. },
  12017. "required": ["input", "output"],
  12018. "additionalProperties": false
  12019. },
  12020. "experimental": {
  12021. "type": "boolean"
  12022. },
  12023. "status": {
  12024. "type": "string",
  12025. "enum": ["alpha", "beta", "deprecated", "active"]
  12026. },
  12027. "provider": {
  12028. "type": "object",
  12029. "properties": {
  12030. "npm": {
  12031. "type": "string"
  12032. },
  12033. "api": {
  12034. "type": "string"
  12035. }
  12036. },
  12037. "additionalProperties": false
  12038. },
  12039. "options": {
  12040. "type": "object"
  12041. },
  12042. "headers": {
  12043. "type": "object",
  12044. "additionalProperties": {
  12045. "type": "string"
  12046. }
  12047. },
  12048. "variants": {
  12049. "type": "object",
  12050. "additionalProperties": {
  12051. "type": "object",
  12052. "properties": {
  12053. "disabled": {
  12054. "type": "boolean"
  12055. }
  12056. },
  12057. "additionalProperties": {}
  12058. },
  12059. "description": "Variant-specific configuration"
  12060. }
  12061. },
  12062. "additionalProperties": false
  12063. }
  12064. }
  12065. },
  12066. "additionalProperties": false
  12067. },
  12068. "McpLocalConfig": {
  12069. "type": "object",
  12070. "properties": {
  12071. "type": {
  12072. "type": "string",
  12073. "enum": ["local"],
  12074. "description": "Type of MCP server connection"
  12075. },
  12076. "command": {
  12077. "type": "array",
  12078. "items": {
  12079. "type": "string"
  12080. },
  12081. "description": "Command and arguments to run the MCP server"
  12082. },
  12083. "environment": {
  12084. "type": "object",
  12085. "additionalProperties": {
  12086. "type": "string"
  12087. }
  12088. },
  12089. "enabled": {
  12090. "type": "boolean"
  12091. },
  12092. "timeout": {
  12093. "type": "integer",
  12094. "exclusiveMinimum": 0
  12095. }
  12096. },
  12097. "required": ["type", "command"],
  12098. "additionalProperties": false
  12099. },
  12100. "McpOAuthConfig": {
  12101. "type": "object",
  12102. "properties": {
  12103. "clientId": {
  12104. "type": "string"
  12105. },
  12106. "clientSecret": {
  12107. "type": "string"
  12108. },
  12109. "scope": {
  12110. "type": "string"
  12111. },
  12112. "redirectUri": {
  12113. "type": "string"
  12114. }
  12115. },
  12116. "additionalProperties": false
  12117. },
  12118. "McpRemoteConfig": {
  12119. "type": "object",
  12120. "properties": {
  12121. "type": {
  12122. "type": "string",
  12123. "enum": ["remote"],
  12124. "description": "Type of MCP server connection"
  12125. },
  12126. "url": {
  12127. "type": "string",
  12128. "description": "URL of the remote MCP server"
  12129. },
  12130. "enabled": {
  12131. "type": "boolean"
  12132. },
  12133. "headers": {
  12134. "type": "object",
  12135. "additionalProperties": {
  12136. "type": "string"
  12137. }
  12138. },
  12139. "oauth": {
  12140. "anyOf": [
  12141. {
  12142. "$ref": "#/components/schemas/McpOAuthConfig"
  12143. },
  12144. {
  12145. "type": "boolean",
  12146. "enum": [false]
  12147. }
  12148. ],
  12149. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  12150. },
  12151. "timeout": {
  12152. "type": "integer",
  12153. "exclusiveMinimum": 0
  12154. }
  12155. },
  12156. "required": ["type", "url"],
  12157. "additionalProperties": false
  12158. },
  12159. "LayoutConfig": {
  12160. "type": "string",
  12161. "enum": ["auto", "stretch"],
  12162. "description": "@deprecated Always uses stretch layout."
  12163. },
  12164. "ImageAttachmentConfig": {
  12165. "type": "object",
  12166. "properties": {
  12167. "auto_resize": {
  12168. "type": "boolean"
  12169. },
  12170. "max_width": {
  12171. "type": "integer",
  12172. "exclusiveMinimum": 0
  12173. },
  12174. "max_height": {
  12175. "type": "integer",
  12176. "exclusiveMinimum": 0
  12177. },
  12178. "max_base64_bytes": {
  12179. "type": "integer",
  12180. "exclusiveMinimum": 0
  12181. }
  12182. },
  12183. "additionalProperties": false
  12184. },
  12185. "AttachmentConfig": {
  12186. "type": "object",
  12187. "properties": {
  12188. "image": {
  12189. "$ref": "#/components/schemas/ImageAttachmentConfig"
  12190. }
  12191. },
  12192. "additionalProperties": false
  12193. },
  12194. "Config": {
  12195. "type": "object",
  12196. "properties": {
  12197. "$schema": {
  12198. "type": "string"
  12199. },
  12200. "shell": {
  12201. "type": "string"
  12202. },
  12203. "logLevel": {
  12204. "$ref": "#/components/schemas/LogLevel"
  12205. },
  12206. "server": {
  12207. "$ref": "#/components/schemas/ServerConfig"
  12208. },
  12209. "command": {
  12210. "type": "object",
  12211. "additionalProperties": {
  12212. "type": "object",
  12213. "properties": {
  12214. "template": {
  12215. "type": "string"
  12216. },
  12217. "description": {
  12218. "type": "string"
  12219. },
  12220. "agent": {
  12221. "type": "string"
  12222. },
  12223. "model": {
  12224. "type": "string"
  12225. },
  12226. "subtask": {
  12227. "type": "boolean"
  12228. }
  12229. },
  12230. "required": ["template"],
  12231. "additionalProperties": false
  12232. }
  12233. },
  12234. "skills": {
  12235. "type": "object",
  12236. "properties": {
  12237. "paths": {
  12238. "type": "array",
  12239. "items": {
  12240. "type": "string"
  12241. }
  12242. },
  12243. "urls": {
  12244. "type": "array",
  12245. "items": {
  12246. "type": "string"
  12247. }
  12248. }
  12249. },
  12250. "additionalProperties": false
  12251. },
  12252. "reference": {
  12253. "$ref": "#/components/schemas/ReferenceConfig"
  12254. },
  12255. "watcher": {
  12256. "type": "object",
  12257. "properties": {
  12258. "ignore": {
  12259. "type": "array",
  12260. "items": {
  12261. "type": "string"
  12262. }
  12263. }
  12264. },
  12265. "additionalProperties": false
  12266. },
  12267. "snapshot": {
  12268. "type": "boolean"
  12269. },
  12270. "plugin": {
  12271. "type": "array",
  12272. "items": {
  12273. "anyOf": [
  12274. {
  12275. "type": "string"
  12276. },
  12277. {
  12278. "type": "array",
  12279. "prefixItems": [
  12280. {
  12281. "type": "string"
  12282. },
  12283. {
  12284. "type": "object"
  12285. }
  12286. ],
  12287. "maxItems": 2,
  12288. "minItems": 2
  12289. }
  12290. ]
  12291. }
  12292. },
  12293. "share": {
  12294. "type": "string",
  12295. "enum": ["manual", "auto", "disabled"]
  12296. },
  12297. "autoshare": {
  12298. "type": "boolean"
  12299. },
  12300. "autoupdate": {
  12301. "anyOf": [
  12302. {
  12303. "type": "boolean"
  12304. },
  12305. {
  12306. "type": "string",
  12307. "enum": ["notify"]
  12308. }
  12309. ],
  12310. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12311. },
  12312. "disabled_providers": {
  12313. "type": "array",
  12314. "items": {
  12315. "type": "string"
  12316. }
  12317. },
  12318. "enabled_providers": {
  12319. "type": "array",
  12320. "items": {
  12321. "type": "string"
  12322. }
  12323. },
  12324. "model": {
  12325. "type": "string"
  12326. },
  12327. "small_model": {
  12328. "type": "string"
  12329. },
  12330. "default_agent": {
  12331. "type": "string"
  12332. },
  12333. "username": {
  12334. "type": "string"
  12335. },
  12336. "mode": {
  12337. "type": "object",
  12338. "properties": {
  12339. "build": {
  12340. "$ref": "#/components/schemas/AgentConfig"
  12341. },
  12342. "plan": {
  12343. "$ref": "#/components/schemas/AgentConfig"
  12344. }
  12345. },
  12346. "additionalProperties": {
  12347. "$ref": "#/components/schemas/AgentConfig"
  12348. }
  12349. },
  12350. "agent": {
  12351. "type": "object",
  12352. "properties": {
  12353. "plan": {
  12354. "$ref": "#/components/schemas/AgentConfig"
  12355. },
  12356. "build": {
  12357. "$ref": "#/components/schemas/AgentConfig"
  12358. },
  12359. "general": {
  12360. "$ref": "#/components/schemas/AgentConfig"
  12361. },
  12362. "explore": {
  12363. "$ref": "#/components/schemas/AgentConfig"
  12364. },
  12365. "scout": {
  12366. "$ref": "#/components/schemas/AgentConfig"
  12367. },
  12368. "title": {
  12369. "$ref": "#/components/schemas/AgentConfig"
  12370. },
  12371. "summary": {
  12372. "$ref": "#/components/schemas/AgentConfig"
  12373. },
  12374. "compaction": {
  12375. "$ref": "#/components/schemas/AgentConfig"
  12376. }
  12377. },
  12378. "additionalProperties": {
  12379. "$ref": "#/components/schemas/AgentConfig"
  12380. }
  12381. },
  12382. "provider": {
  12383. "type": "object",
  12384. "additionalProperties": {
  12385. "$ref": "#/components/schemas/ProviderConfig"
  12386. }
  12387. },
  12388. "mcp": {
  12389. "type": "object",
  12390. "additionalProperties": {
  12391. "anyOf": [
  12392. {
  12393. "$ref": "#/components/schemas/McpLocalConfig"
  12394. },
  12395. {
  12396. "$ref": "#/components/schemas/McpRemoteConfig"
  12397. },
  12398. {
  12399. "type": "object",
  12400. "properties": {
  12401. "enabled": {
  12402. "type": "boolean"
  12403. }
  12404. },
  12405. "required": ["enabled"],
  12406. "additionalProperties": false
  12407. }
  12408. ]
  12409. }
  12410. },
  12411. "formatter": {
  12412. "anyOf": [
  12413. {
  12414. "type": "boolean"
  12415. },
  12416. {
  12417. "type": "object",
  12418. "additionalProperties": {
  12419. "type": "object",
  12420. "properties": {
  12421. "disabled": {
  12422. "type": "boolean"
  12423. },
  12424. "command": {
  12425. "type": "array",
  12426. "items": {
  12427. "type": "string"
  12428. }
  12429. },
  12430. "environment": {
  12431. "type": "object",
  12432. "additionalProperties": {
  12433. "type": "string"
  12434. }
  12435. },
  12436. "extensions": {
  12437. "type": "array",
  12438. "items": {
  12439. "type": "string"
  12440. }
  12441. }
  12442. },
  12443. "additionalProperties": false
  12444. }
  12445. }
  12446. ],
  12447. "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."
  12448. },
  12449. "lsp": {
  12450. "anyOf": [
  12451. {
  12452. "type": "boolean"
  12453. },
  12454. {
  12455. "type": "object",
  12456. "additionalProperties": {
  12457. "anyOf": [
  12458. {
  12459. "type": "object",
  12460. "properties": {
  12461. "disabled": {
  12462. "type": "boolean",
  12463. "enum": [true]
  12464. }
  12465. },
  12466. "required": ["disabled"],
  12467. "additionalProperties": false
  12468. },
  12469. {
  12470. "type": "object",
  12471. "properties": {
  12472. "command": {
  12473. "type": "array",
  12474. "items": {
  12475. "type": "string"
  12476. }
  12477. },
  12478. "extensions": {
  12479. "type": "array",
  12480. "items": {
  12481. "type": "string"
  12482. }
  12483. },
  12484. "disabled": {
  12485. "type": "boolean"
  12486. },
  12487. "env": {
  12488. "type": "object",
  12489. "additionalProperties": {
  12490. "type": "string"
  12491. }
  12492. },
  12493. "initialization": {
  12494. "type": "object"
  12495. }
  12496. },
  12497. "required": ["command"],
  12498. "additionalProperties": false
  12499. }
  12500. ]
  12501. }
  12502. }
  12503. ],
  12504. "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."
  12505. },
  12506. "instructions": {
  12507. "type": "array",
  12508. "items": {
  12509. "type": "string"
  12510. }
  12511. },
  12512. "layout": {
  12513. "$ref": "#/components/schemas/LayoutConfig"
  12514. },
  12515. "permission": {
  12516. "$ref": "#/components/schemas/PermissionConfig"
  12517. },
  12518. "tools": {
  12519. "type": "object",
  12520. "additionalProperties": {
  12521. "type": "boolean"
  12522. }
  12523. },
  12524. "attachment": {
  12525. "$ref": "#/components/schemas/AttachmentConfig"
  12526. },
  12527. "enterprise": {
  12528. "type": "object",
  12529. "properties": {
  12530. "url": {
  12531. "type": "string"
  12532. }
  12533. },
  12534. "additionalProperties": false
  12535. },
  12536. "tool_output": {
  12537. "type": "object",
  12538. "properties": {
  12539. "max_lines": {
  12540. "type": "integer",
  12541. "exclusiveMinimum": 0
  12542. },
  12543. "max_bytes": {
  12544. "type": "integer",
  12545. "exclusiveMinimum": 0
  12546. }
  12547. },
  12548. "additionalProperties": false
  12549. },
  12550. "compaction": {
  12551. "type": "object",
  12552. "properties": {
  12553. "auto": {
  12554. "type": "boolean"
  12555. },
  12556. "prune": {
  12557. "type": "boolean"
  12558. },
  12559. "tail_turns": {
  12560. "type": "integer",
  12561. "minimum": 0
  12562. },
  12563. "preserve_recent_tokens": {
  12564. "type": "integer",
  12565. "minimum": 0
  12566. },
  12567. "reserved": {
  12568. "type": "integer",
  12569. "minimum": 0
  12570. }
  12571. },
  12572. "additionalProperties": false
  12573. },
  12574. "experimental": {
  12575. "type": "object",
  12576. "properties": {
  12577. "disable_paste_summary": {
  12578. "type": "boolean"
  12579. },
  12580. "batch_tool": {
  12581. "type": "boolean"
  12582. },
  12583. "openTelemetry": {
  12584. "type": "boolean"
  12585. },
  12586. "primary_tools": {
  12587. "type": "array",
  12588. "items": {
  12589. "type": "string"
  12590. }
  12591. },
  12592. "continue_loop_on_deny": {
  12593. "type": "boolean"
  12594. },
  12595. "mcp_timeout": {
  12596. "type": "integer",
  12597. "exclusiveMinimum": 0
  12598. }
  12599. },
  12600. "additionalProperties": false
  12601. }
  12602. },
  12603. "additionalProperties": false
  12604. },
  12605. "Model": {
  12606. "type": "object",
  12607. "properties": {
  12608. "id": {
  12609. "type": "string"
  12610. },
  12611. "providerID": {
  12612. "type": "string"
  12613. },
  12614. "api": {
  12615. "type": "object",
  12616. "properties": {
  12617. "id": {
  12618. "type": "string"
  12619. },
  12620. "url": {
  12621. "type": "string"
  12622. },
  12623. "npm": {
  12624. "type": "string"
  12625. }
  12626. },
  12627. "required": ["id", "url", "npm"],
  12628. "additionalProperties": false
  12629. },
  12630. "name": {
  12631. "type": "string"
  12632. },
  12633. "family": {
  12634. "type": "string"
  12635. },
  12636. "capabilities": {
  12637. "type": "object",
  12638. "properties": {
  12639. "temperature": {
  12640. "type": "boolean"
  12641. },
  12642. "reasoning": {
  12643. "type": "boolean"
  12644. },
  12645. "attachment": {
  12646. "type": "boolean"
  12647. },
  12648. "toolcall": {
  12649. "type": "boolean"
  12650. },
  12651. "input": {
  12652. "type": "object",
  12653. "properties": {
  12654. "text": {
  12655. "type": "boolean"
  12656. },
  12657. "audio": {
  12658. "type": "boolean"
  12659. },
  12660. "image": {
  12661. "type": "boolean"
  12662. },
  12663. "video": {
  12664. "type": "boolean"
  12665. },
  12666. "pdf": {
  12667. "type": "boolean"
  12668. }
  12669. },
  12670. "required": ["text", "audio", "image", "video", "pdf"],
  12671. "additionalProperties": false
  12672. },
  12673. "output": {
  12674. "type": "object",
  12675. "properties": {
  12676. "text": {
  12677. "type": "boolean"
  12678. },
  12679. "audio": {
  12680. "type": "boolean"
  12681. },
  12682. "image": {
  12683. "type": "boolean"
  12684. },
  12685. "video": {
  12686. "type": "boolean"
  12687. },
  12688. "pdf": {
  12689. "type": "boolean"
  12690. }
  12691. },
  12692. "required": ["text", "audio", "image", "video", "pdf"],
  12693. "additionalProperties": false
  12694. },
  12695. "interleaved": {
  12696. "anyOf": [
  12697. {
  12698. "type": "boolean"
  12699. },
  12700. {
  12701. "type": "object",
  12702. "properties": {
  12703. "field": {
  12704. "type": "string",
  12705. "enum": ["reasoning_content", "reasoning_details"]
  12706. }
  12707. },
  12708. "required": ["field"],
  12709. "additionalProperties": false
  12710. }
  12711. ]
  12712. }
  12713. },
  12714. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12715. "additionalProperties": false
  12716. },
  12717. "cost": {
  12718. "type": "object",
  12719. "properties": {
  12720. "input": {
  12721. "type": "number"
  12722. },
  12723. "output": {
  12724. "type": "number"
  12725. },
  12726. "cache": {
  12727. "type": "object",
  12728. "properties": {
  12729. "read": {
  12730. "type": "number"
  12731. },
  12732. "write": {
  12733. "type": "number"
  12734. }
  12735. },
  12736. "required": ["read", "write"],
  12737. "additionalProperties": false
  12738. },
  12739. "tiers": {
  12740. "type": "array",
  12741. "items": {
  12742. "type": "object",
  12743. "properties": {
  12744. "input": {
  12745. "type": "number"
  12746. },
  12747. "output": {
  12748. "type": "number"
  12749. },
  12750. "cache": {
  12751. "type": "object",
  12752. "properties": {
  12753. "read": {
  12754. "type": "number"
  12755. },
  12756. "write": {
  12757. "type": "number"
  12758. }
  12759. },
  12760. "required": ["read", "write"],
  12761. "additionalProperties": false
  12762. },
  12763. "tier": {
  12764. "type": "object",
  12765. "properties": {
  12766. "type": {
  12767. "type": "string",
  12768. "enum": ["context"]
  12769. },
  12770. "size": {
  12771. "type": "number"
  12772. }
  12773. },
  12774. "required": ["type", "size"],
  12775. "additionalProperties": false
  12776. }
  12777. },
  12778. "required": ["input", "output", "cache", "tier"],
  12779. "additionalProperties": false
  12780. }
  12781. },
  12782. "experimentalOver200K": {
  12783. "type": "object",
  12784. "properties": {
  12785. "input": {
  12786. "type": "number"
  12787. },
  12788. "output": {
  12789. "type": "number"
  12790. },
  12791. "cache": {
  12792. "type": "object",
  12793. "properties": {
  12794. "read": {
  12795. "type": "number"
  12796. },
  12797. "write": {
  12798. "type": "number"
  12799. }
  12800. },
  12801. "required": ["read", "write"],
  12802. "additionalProperties": false
  12803. }
  12804. },
  12805. "required": ["input", "output", "cache"],
  12806. "additionalProperties": false
  12807. }
  12808. },
  12809. "required": ["input", "output", "cache"],
  12810. "additionalProperties": false
  12811. },
  12812. "limit": {
  12813. "type": "object",
  12814. "properties": {
  12815. "context": {
  12816. "type": "number"
  12817. },
  12818. "input": {
  12819. "type": "number"
  12820. },
  12821. "output": {
  12822. "type": "number"
  12823. }
  12824. },
  12825. "required": ["context", "output"],
  12826. "additionalProperties": false
  12827. },
  12828. "status": {
  12829. "type": "string",
  12830. "enum": ["alpha", "beta", "deprecated", "active"]
  12831. },
  12832. "options": {
  12833. "type": "object"
  12834. },
  12835. "headers": {
  12836. "type": "object",
  12837. "additionalProperties": {
  12838. "type": "string"
  12839. }
  12840. },
  12841. "release_date": {
  12842. "type": "string"
  12843. },
  12844. "variants": {
  12845. "type": "object",
  12846. "additionalProperties": {
  12847. "type": "object"
  12848. }
  12849. }
  12850. },
  12851. "required": [
  12852. "id",
  12853. "providerID",
  12854. "api",
  12855. "name",
  12856. "capabilities",
  12857. "cost",
  12858. "limit",
  12859. "status",
  12860. "options",
  12861. "headers",
  12862. "release_date"
  12863. ],
  12864. "additionalProperties": false
  12865. },
  12866. "Provider": {
  12867. "type": "object",
  12868. "properties": {
  12869. "id": {
  12870. "type": "string"
  12871. },
  12872. "name": {
  12873. "type": "string"
  12874. },
  12875. "source": {
  12876. "type": "string",
  12877. "enum": ["env", "config", "custom", "api"]
  12878. },
  12879. "env": {
  12880. "type": "array",
  12881. "items": {
  12882. "type": "string"
  12883. }
  12884. },
  12885. "key": {
  12886. "type": "string"
  12887. },
  12888. "options": {
  12889. "type": "object"
  12890. },
  12891. "models": {
  12892. "type": "object",
  12893. "additionalProperties": {
  12894. "$ref": "#/components/schemas/Model"
  12895. }
  12896. }
  12897. },
  12898. "required": ["id", "name", "source", "env", "options", "models"],
  12899. "additionalProperties": false
  12900. },
  12901. "ConsoleState": {
  12902. "type": "object",
  12903. "properties": {
  12904. "consoleManagedProviders": {
  12905. "type": "array",
  12906. "items": {
  12907. "type": "string"
  12908. }
  12909. },
  12910. "activeOrgName": {
  12911. "type": "string"
  12912. },
  12913. "switchableOrgCount": {
  12914. "type": "integer",
  12915. "minimum": 0
  12916. }
  12917. },
  12918. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12919. "additionalProperties": false
  12920. },
  12921. "effect_HttpApiError_InternalServerError": {
  12922. "type": "object",
  12923. "properties": {
  12924. "_tag": {
  12925. "type": "string",
  12926. "enum": ["InternalServerError"]
  12927. }
  12928. },
  12929. "required": ["_tag"],
  12930. "additionalProperties": false
  12931. },
  12932. "ToolListItem": {
  12933. "type": "object",
  12934. "properties": {
  12935. "id": {
  12936. "type": "string"
  12937. },
  12938. "description": {
  12939. "type": "string"
  12940. },
  12941. "parameters": {}
  12942. },
  12943. "required": ["id", "description", "parameters"],
  12944. "additionalProperties": false
  12945. },
  12946. "ToolList": {
  12947. "type": "array",
  12948. "items": {
  12949. "$ref": "#/components/schemas/ToolListItem"
  12950. }
  12951. },
  12952. "ToolIDs": {
  12953. "type": "array",
  12954. "items": {
  12955. "type": "string"
  12956. }
  12957. },
  12958. "WorktreeError": {
  12959. "type": "object",
  12960. "properties": {
  12961. "name": {
  12962. "type": "string",
  12963. "enum": [
  12964. "WorktreeNotGitError",
  12965. "WorktreeNameGenerationFailedError",
  12966. "WorktreeCreateFailedError",
  12967. "WorktreeStartCommandFailedError",
  12968. "WorktreeRemoveFailedError",
  12969. "WorktreeResetFailedError",
  12970. "WorktreeListFailedError"
  12971. ]
  12972. },
  12973. "data": {
  12974. "type": "object",
  12975. "properties": {
  12976. "message": {
  12977. "type": "string"
  12978. }
  12979. },
  12980. "required": ["message"],
  12981. "additionalProperties": false
  12982. }
  12983. },
  12984. "required": ["name", "data"],
  12985. "additionalProperties": false
  12986. },
  12987. "WorktreeCreateInput": {
  12988. "type": "object",
  12989. "properties": {
  12990. "name": {
  12991. "type": "string"
  12992. },
  12993. "startCommand": {
  12994. "type": "string",
  12995. "description": "Additional startup script to run after the project's start command"
  12996. }
  12997. },
  12998. "additionalProperties": false
  12999. },
  13000. "Worktree": {
  13001. "type": "object",
  13002. "properties": {
  13003. "name": {
  13004. "type": "string"
  13005. },
  13006. "branch": {
  13007. "type": "string"
  13008. },
  13009. "directory": {
  13010. "type": "string"
  13011. }
  13012. },
  13013. "required": ["name", "directory"],
  13014. "additionalProperties": false
  13015. },
  13016. "WorktreeRemoveInput": {
  13017. "type": "object",
  13018. "properties": {
  13019. "directory": {
  13020. "type": "string"
  13021. }
  13022. },
  13023. "required": ["directory"],
  13024. "additionalProperties": false
  13025. },
  13026. "WorktreeResetInput": {
  13027. "type": "object",
  13028. "properties": {
  13029. "directory": {
  13030. "type": "string"
  13031. }
  13032. },
  13033. "required": ["directory"],
  13034. "additionalProperties": false
  13035. },
  13036. "ProjectSummary": {
  13037. "type": "object",
  13038. "properties": {
  13039. "id": {
  13040. "type": "string"
  13041. },
  13042. "name": {
  13043. "type": "string"
  13044. },
  13045. "worktree": {
  13046. "type": "string"
  13047. }
  13048. },
  13049. "required": ["id", "worktree"],
  13050. "additionalProperties": false
  13051. },
  13052. "GlobalSession": {
  13053. "type": "object",
  13054. "properties": {
  13055. "id": {
  13056. "type": "string",
  13057. "pattern": "^ses"
  13058. },
  13059. "slug": {
  13060. "type": "string"
  13061. },
  13062. "projectID": {
  13063. "type": "string"
  13064. },
  13065. "workspaceID": {
  13066. "type": "string",
  13067. "pattern": "^wrk"
  13068. },
  13069. "directory": {
  13070. "type": "string"
  13071. },
  13072. "path": {
  13073. "type": "string"
  13074. },
  13075. "parentID": {
  13076. "type": "string",
  13077. "pattern": "^ses"
  13078. },
  13079. "summary": {
  13080. "type": "object",
  13081. "properties": {
  13082. "additions": {
  13083. "type": "number"
  13084. },
  13085. "deletions": {
  13086. "type": "number"
  13087. },
  13088. "files": {
  13089. "type": "number"
  13090. },
  13091. "diffs": {
  13092. "type": "array",
  13093. "items": {
  13094. "$ref": "#/components/schemas/SnapshotFileDiff"
  13095. }
  13096. }
  13097. },
  13098. "required": ["additions", "deletions", "files"],
  13099. "additionalProperties": false
  13100. },
  13101. "cost": {
  13102. "type": "number"
  13103. },
  13104. "tokens": {
  13105. "type": "object",
  13106. "properties": {
  13107. "input": {
  13108. "type": "number"
  13109. },
  13110. "output": {
  13111. "type": "number"
  13112. },
  13113. "reasoning": {
  13114. "type": "number"
  13115. },
  13116. "cache": {
  13117. "type": "object",
  13118. "properties": {
  13119. "read": {
  13120. "type": "number"
  13121. },
  13122. "write": {
  13123. "type": "number"
  13124. }
  13125. },
  13126. "required": ["read", "write"],
  13127. "additionalProperties": false
  13128. }
  13129. },
  13130. "required": ["input", "output", "reasoning", "cache"],
  13131. "additionalProperties": false
  13132. },
  13133. "share": {
  13134. "type": "object",
  13135. "properties": {
  13136. "url": {
  13137. "type": "string"
  13138. }
  13139. },
  13140. "required": ["url"],
  13141. "additionalProperties": false
  13142. },
  13143. "title": {
  13144. "type": "string"
  13145. },
  13146. "agent": {
  13147. "type": "string"
  13148. },
  13149. "model": {
  13150. "type": "object",
  13151. "properties": {
  13152. "id": {
  13153. "type": "string"
  13154. },
  13155. "providerID": {
  13156. "type": "string"
  13157. },
  13158. "variant": {
  13159. "type": "string"
  13160. }
  13161. },
  13162. "required": ["id", "providerID"],
  13163. "additionalProperties": false
  13164. },
  13165. "version": {
  13166. "type": "string"
  13167. },
  13168. "time": {
  13169. "type": "object",
  13170. "properties": {
  13171. "created": {
  13172. "type": "integer",
  13173. "minimum": 0
  13174. },
  13175. "updated": {
  13176. "type": "integer",
  13177. "minimum": 0
  13178. },
  13179. "compacting": {
  13180. "type": "integer",
  13181. "minimum": 0
  13182. },
  13183. "archived": {
  13184. "type": "number"
  13185. }
  13186. },
  13187. "required": ["created", "updated"],
  13188. "additionalProperties": false
  13189. },
  13190. "permission": {
  13191. "$ref": "#/components/schemas/PermissionRuleset"
  13192. },
  13193. "revert": {
  13194. "type": "object",
  13195. "properties": {
  13196. "messageID": {
  13197. "type": "string",
  13198. "pattern": "^msg"
  13199. },
  13200. "partID": {
  13201. "type": "string",
  13202. "pattern": "^prt"
  13203. },
  13204. "snapshot": {
  13205. "type": "string"
  13206. },
  13207. "diff": {
  13208. "type": "string"
  13209. }
  13210. },
  13211. "required": ["messageID"],
  13212. "additionalProperties": false
  13213. },
  13214. "project": {
  13215. "anyOf": [
  13216. {
  13217. "$ref": "#/components/schemas/ProjectSummary"
  13218. },
  13219. {
  13220. "type": "null"
  13221. }
  13222. ]
  13223. }
  13224. },
  13225. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  13226. "additionalProperties": false
  13227. },
  13228. "McpResource": {
  13229. "type": "object",
  13230. "properties": {
  13231. "name": {
  13232. "type": "string"
  13233. },
  13234. "uri": {
  13235. "type": "string"
  13236. },
  13237. "description": {
  13238. "type": "string"
  13239. },
  13240. "mimeType": {
  13241. "type": "string"
  13242. },
  13243. "client": {
  13244. "type": "string"
  13245. }
  13246. },
  13247. "required": ["name", "uri", "client"],
  13248. "additionalProperties": false
  13249. },
  13250. "Symbol": {
  13251. "type": "object",
  13252. "properties": {
  13253. "name": {
  13254. "type": "string"
  13255. },
  13256. "kind": {
  13257. "type": "integer",
  13258. "minimum": 0
  13259. },
  13260. "location": {
  13261. "type": "object",
  13262. "properties": {
  13263. "uri": {
  13264. "type": "string"
  13265. },
  13266. "range": {
  13267. "$ref": "#/components/schemas/Range"
  13268. }
  13269. },
  13270. "required": ["uri", "range"],
  13271. "additionalProperties": false
  13272. }
  13273. },
  13274. "required": ["name", "kind", "location"],
  13275. "additionalProperties": false
  13276. },
  13277. "FileNode": {
  13278. "type": "object",
  13279. "properties": {
  13280. "name": {
  13281. "type": "string"
  13282. },
  13283. "path": {
  13284. "type": "string"
  13285. },
  13286. "absolute": {
  13287. "type": "string"
  13288. },
  13289. "type": {
  13290. "type": "string",
  13291. "enum": ["file", "directory"]
  13292. },
  13293. "ignored": {
  13294. "type": "boolean"
  13295. }
  13296. },
  13297. "required": ["name", "path", "absolute", "type", "ignored"],
  13298. "additionalProperties": false
  13299. },
  13300. "FileContent": {
  13301. "type": "object",
  13302. "properties": {
  13303. "type": {
  13304. "type": "string",
  13305. "enum": ["text", "binary"]
  13306. },
  13307. "content": {
  13308. "type": "string"
  13309. },
  13310. "diff": {
  13311. "type": "string"
  13312. },
  13313. "patch": {
  13314. "type": "object",
  13315. "properties": {
  13316. "oldFileName": {
  13317. "type": "string"
  13318. },
  13319. "newFileName": {
  13320. "type": "string"
  13321. },
  13322. "oldHeader": {
  13323. "type": "string"
  13324. },
  13325. "newHeader": {
  13326. "type": "string"
  13327. },
  13328. "hunks": {
  13329. "type": "array",
  13330. "items": {
  13331. "type": "object",
  13332. "properties": {
  13333. "oldStart": {
  13334. "type": "integer",
  13335. "minimum": 0
  13336. },
  13337. "oldLines": {
  13338. "type": "integer",
  13339. "minimum": 0
  13340. },
  13341. "newStart": {
  13342. "type": "integer",
  13343. "minimum": 0
  13344. },
  13345. "newLines": {
  13346. "type": "integer",
  13347. "minimum": 0
  13348. },
  13349. "lines": {
  13350. "type": "array",
  13351. "items": {
  13352. "type": "string"
  13353. }
  13354. }
  13355. },
  13356. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  13357. "additionalProperties": false
  13358. }
  13359. },
  13360. "index": {
  13361. "type": "string"
  13362. }
  13363. },
  13364. "required": ["oldFileName", "newFileName", "hunks"],
  13365. "additionalProperties": false
  13366. },
  13367. "encoding": {
  13368. "type": "string",
  13369. "enum": ["base64"]
  13370. },
  13371. "mimeType": {
  13372. "type": "string"
  13373. }
  13374. },
  13375. "required": ["type", "content"],
  13376. "additionalProperties": false
  13377. },
  13378. "File": {
  13379. "type": "object",
  13380. "properties": {
  13381. "path": {
  13382. "type": "string"
  13383. },
  13384. "added": {
  13385. "type": "integer",
  13386. "minimum": 0
  13387. },
  13388. "removed": {
  13389. "type": "integer",
  13390. "minimum": 0
  13391. },
  13392. "status": {
  13393. "type": "string",
  13394. "enum": ["added", "deleted", "modified"]
  13395. }
  13396. },
  13397. "required": ["path", "added", "removed", "status"],
  13398. "additionalProperties": false
  13399. },
  13400. "Path": {
  13401. "type": "object",
  13402. "properties": {
  13403. "home": {
  13404. "type": "string"
  13405. },
  13406. "state": {
  13407. "type": "string"
  13408. },
  13409. "config": {
  13410. "type": "string"
  13411. },
  13412. "worktree": {
  13413. "type": "string"
  13414. },
  13415. "directory": {
  13416. "type": "string"
  13417. }
  13418. },
  13419. "required": ["home", "state", "config", "worktree", "directory"],
  13420. "additionalProperties": false
  13421. },
  13422. "VcsInfo": {
  13423. "type": "object",
  13424. "properties": {
  13425. "branch": {
  13426. "type": "string"
  13427. },
  13428. "default_branch": {
  13429. "type": "string"
  13430. }
  13431. },
  13432. "additionalProperties": false
  13433. },
  13434. "VcsFileStatus": {
  13435. "type": "object",
  13436. "properties": {
  13437. "file": {
  13438. "type": "string"
  13439. },
  13440. "additions": {
  13441. "type": "number"
  13442. },
  13443. "deletions": {
  13444. "type": "number"
  13445. },
  13446. "status": {
  13447. "type": "string",
  13448. "enum": ["added", "deleted", "modified"]
  13449. }
  13450. },
  13451. "required": ["file", "additions", "deletions", "status"],
  13452. "additionalProperties": false
  13453. },
  13454. "VcsFileDiff": {
  13455. "type": "object",
  13456. "properties": {
  13457. "file": {
  13458. "type": "string"
  13459. },
  13460. "patch": {
  13461. "type": "string"
  13462. },
  13463. "additions": {
  13464. "type": "number"
  13465. },
  13466. "deletions": {
  13467. "type": "number"
  13468. },
  13469. "status": {
  13470. "type": "string",
  13471. "enum": ["added", "deleted", "modified"]
  13472. }
  13473. },
  13474. "required": ["file", "additions", "deletions"],
  13475. "additionalProperties": false
  13476. },
  13477. "VcsApplyError": {
  13478. "type": "object",
  13479. "properties": {
  13480. "name": {
  13481. "type": "string",
  13482. "enum": ["VcsApplyError"]
  13483. },
  13484. "data": {
  13485. "type": "object",
  13486. "properties": {
  13487. "message": {
  13488. "type": "string"
  13489. },
  13490. "reason": {
  13491. "type": "string",
  13492. "enum": ["non-git", "not-clean"]
  13493. }
  13494. },
  13495. "required": ["message", "reason"],
  13496. "additionalProperties": false
  13497. }
  13498. },
  13499. "required": ["name", "data"],
  13500. "additionalProperties": false
  13501. },
  13502. "Command": {
  13503. "type": "object",
  13504. "properties": {
  13505. "name": {
  13506. "type": "string"
  13507. },
  13508. "description": {
  13509. "type": "string"
  13510. },
  13511. "agent": {
  13512. "type": "string"
  13513. },
  13514. "model": {
  13515. "type": "string"
  13516. },
  13517. "source": {
  13518. "type": "string",
  13519. "enum": ["command", "mcp", "skill"]
  13520. },
  13521. "template": {
  13522. "type": "string"
  13523. },
  13524. "subtask": {
  13525. "type": "boolean"
  13526. },
  13527. "hints": {
  13528. "type": "array",
  13529. "items": {
  13530. "type": "string"
  13531. }
  13532. }
  13533. },
  13534. "required": ["name", "template", "hints"],
  13535. "additionalProperties": false
  13536. },
  13537. "Agent": {
  13538. "type": "object",
  13539. "properties": {
  13540. "name": {
  13541. "type": "string"
  13542. },
  13543. "description": {
  13544. "type": "string"
  13545. },
  13546. "mode": {
  13547. "type": "string",
  13548. "enum": ["subagent", "primary", "all"]
  13549. },
  13550. "native": {
  13551. "type": "boolean"
  13552. },
  13553. "hidden": {
  13554. "type": "boolean"
  13555. },
  13556. "topP": {
  13557. "type": "number"
  13558. },
  13559. "temperature": {
  13560. "type": "number"
  13561. },
  13562. "color": {
  13563. "type": "string"
  13564. },
  13565. "permission": {
  13566. "$ref": "#/components/schemas/PermissionRuleset"
  13567. },
  13568. "model": {
  13569. "type": "object",
  13570. "properties": {
  13571. "modelID": {
  13572. "type": "string"
  13573. },
  13574. "providerID": {
  13575. "type": "string"
  13576. }
  13577. },
  13578. "required": ["modelID", "providerID"],
  13579. "additionalProperties": false
  13580. },
  13581. "variant": {
  13582. "type": "string"
  13583. },
  13584. "prompt": {
  13585. "type": "string"
  13586. },
  13587. "options": {
  13588. "type": "object"
  13589. },
  13590. "steps": {
  13591. "type": "number"
  13592. }
  13593. },
  13594. "required": ["name", "mode", "permission", "options"],
  13595. "additionalProperties": false
  13596. },
  13597. "LSPStatus": {
  13598. "type": "object",
  13599. "properties": {
  13600. "id": {
  13601. "type": "string"
  13602. },
  13603. "name": {
  13604. "type": "string"
  13605. },
  13606. "root": {
  13607. "type": "string"
  13608. },
  13609. "status": {
  13610. "type": "string",
  13611. "enum": ["connected", "error"]
  13612. }
  13613. },
  13614. "required": ["id", "name", "root", "status"],
  13615. "additionalProperties": false
  13616. },
  13617. "FormatterStatus": {
  13618. "type": "object",
  13619. "properties": {
  13620. "name": {
  13621. "type": "string"
  13622. },
  13623. "extensions": {
  13624. "type": "array",
  13625. "items": {
  13626. "type": "string"
  13627. }
  13628. },
  13629. "enabled": {
  13630. "type": "boolean"
  13631. }
  13632. },
  13633. "required": ["name", "extensions", "enabled"],
  13634. "additionalProperties": false
  13635. },
  13636. "MCPStatusConnected": {
  13637. "type": "object",
  13638. "properties": {
  13639. "status": {
  13640. "type": "string",
  13641. "enum": ["connected"]
  13642. }
  13643. },
  13644. "required": ["status"],
  13645. "additionalProperties": false
  13646. },
  13647. "MCPStatusDisabled": {
  13648. "type": "object",
  13649. "properties": {
  13650. "status": {
  13651. "type": "string",
  13652. "enum": ["disabled"]
  13653. }
  13654. },
  13655. "required": ["status"],
  13656. "additionalProperties": false
  13657. },
  13658. "MCPStatusFailed": {
  13659. "type": "object",
  13660. "properties": {
  13661. "status": {
  13662. "type": "string",
  13663. "enum": ["failed"]
  13664. },
  13665. "error": {
  13666. "type": "string"
  13667. }
  13668. },
  13669. "required": ["status", "error"],
  13670. "additionalProperties": false
  13671. },
  13672. "MCPStatusNeedsAuth": {
  13673. "type": "object",
  13674. "properties": {
  13675. "status": {
  13676. "type": "string",
  13677. "enum": ["needs_auth"]
  13678. }
  13679. },
  13680. "required": ["status"],
  13681. "additionalProperties": false
  13682. },
  13683. "MCPStatusNeedsClientRegistration": {
  13684. "type": "object",
  13685. "properties": {
  13686. "status": {
  13687. "type": "string",
  13688. "enum": ["needs_client_registration"]
  13689. },
  13690. "error": {
  13691. "type": "string"
  13692. }
  13693. },
  13694. "required": ["status", "error"],
  13695. "additionalProperties": false
  13696. },
  13697. "MCPStatus": {
  13698. "anyOf": [
  13699. {
  13700. "$ref": "#/components/schemas/MCPStatusConnected"
  13701. },
  13702. {
  13703. "$ref": "#/components/schemas/MCPStatusDisabled"
  13704. },
  13705. {
  13706. "$ref": "#/components/schemas/MCPStatusFailed"
  13707. },
  13708. {
  13709. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13710. },
  13711. {
  13712. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13713. }
  13714. ]
  13715. },
  13716. "McpUnsupportedOAuthError": {
  13717. "type": "object",
  13718. "properties": {
  13719. "error": {
  13720. "type": "string"
  13721. }
  13722. },
  13723. "required": ["error"],
  13724. "additionalProperties": false
  13725. },
  13726. "NotFoundError": {
  13727. "type": "object",
  13728. "required": ["name", "data"],
  13729. "properties": {
  13730. "name": {
  13731. "type": "string",
  13732. "enum": ["NotFoundError"]
  13733. },
  13734. "data": {
  13735. "type": "object",
  13736. "required": ["message"],
  13737. "properties": {
  13738. "message": {
  13739. "type": "string"
  13740. }
  13741. }
  13742. }
  13743. }
  13744. },
  13745. "effect_HttpApiError_Forbidden": {
  13746. "type": "object",
  13747. "properties": {
  13748. "_tag": {
  13749. "type": "string",
  13750. "enum": ["Forbidden"]
  13751. }
  13752. },
  13753. "required": ["_tag"],
  13754. "additionalProperties": false
  13755. },
  13756. "ProviderAuthMethod": {
  13757. "type": "object",
  13758. "properties": {
  13759. "type": {
  13760. "type": "string",
  13761. "enum": ["oauth", "api"]
  13762. },
  13763. "label": {
  13764. "type": "string"
  13765. },
  13766. "prompts": {
  13767. "type": "array",
  13768. "items": {
  13769. "anyOf": [
  13770. {
  13771. "type": "object",
  13772. "properties": {
  13773. "type": {
  13774. "type": "string",
  13775. "enum": ["text"]
  13776. },
  13777. "key": {
  13778. "type": "string"
  13779. },
  13780. "message": {
  13781. "type": "string"
  13782. },
  13783. "placeholder": {
  13784. "type": "string"
  13785. },
  13786. "when": {
  13787. "type": "object",
  13788. "properties": {
  13789. "key": {
  13790. "type": "string"
  13791. },
  13792. "op": {
  13793. "type": "string",
  13794. "enum": ["eq", "neq"]
  13795. },
  13796. "value": {
  13797. "type": "string"
  13798. }
  13799. },
  13800. "required": ["key", "op", "value"],
  13801. "additionalProperties": false
  13802. }
  13803. },
  13804. "required": ["type", "key", "message"],
  13805. "additionalProperties": false
  13806. },
  13807. {
  13808. "type": "object",
  13809. "properties": {
  13810. "type": {
  13811. "type": "string",
  13812. "enum": ["select"]
  13813. },
  13814. "key": {
  13815. "type": "string"
  13816. },
  13817. "message": {
  13818. "type": "string"
  13819. },
  13820. "options": {
  13821. "type": "array",
  13822. "items": {
  13823. "type": "object",
  13824. "properties": {
  13825. "label": {
  13826. "type": "string"
  13827. },
  13828. "value": {
  13829. "type": "string"
  13830. },
  13831. "hint": {
  13832. "type": "string"
  13833. }
  13834. },
  13835. "required": ["label", "value"],
  13836. "additionalProperties": false
  13837. }
  13838. },
  13839. "when": {
  13840. "type": "object",
  13841. "properties": {
  13842. "key": {
  13843. "type": "string"
  13844. },
  13845. "op": {
  13846. "type": "string",
  13847. "enum": ["eq", "neq"]
  13848. },
  13849. "value": {
  13850. "type": "string"
  13851. }
  13852. },
  13853. "required": ["key", "op", "value"],
  13854. "additionalProperties": false
  13855. }
  13856. },
  13857. "required": ["type", "key", "message", "options"],
  13858. "additionalProperties": false
  13859. }
  13860. ]
  13861. }
  13862. }
  13863. },
  13864. "required": ["type", "label"],
  13865. "additionalProperties": false
  13866. },
  13867. "ProviderAuthAuthorization": {
  13868. "type": "object",
  13869. "properties": {
  13870. "url": {
  13871. "type": "string"
  13872. },
  13873. "method": {
  13874. "type": "string",
  13875. "enum": ["auto", "code"]
  13876. },
  13877. "instructions": {
  13878. "type": "string"
  13879. }
  13880. },
  13881. "required": ["url", "method", "instructions"],
  13882. "additionalProperties": false
  13883. },
  13884. "ProviderAuthError1": {
  13885. "type": "object",
  13886. "properties": {
  13887. "name": {
  13888. "type": "string",
  13889. "enum": [
  13890. "BadRequest",
  13891. "ProviderAuthOauthMissing",
  13892. "ProviderAuthOauthCodeMissing",
  13893. "ProviderAuthOauthCallbackFailed",
  13894. "ProviderAuthValidationFailed"
  13895. ]
  13896. },
  13897. "data": {
  13898. "type": "object",
  13899. "properties": {
  13900. "providerID": {
  13901. "type": "string"
  13902. },
  13903. "field": {
  13904. "type": "string"
  13905. },
  13906. "message": {
  13907. "type": "string"
  13908. },
  13909. "kind": {
  13910. "type": "string"
  13911. }
  13912. },
  13913. "additionalProperties": false
  13914. }
  13915. },
  13916. "required": ["name", "data"],
  13917. "additionalProperties": false
  13918. },
  13919. "TextPartInput": {
  13920. "type": "object",
  13921. "properties": {
  13922. "id": {
  13923. "type": "string",
  13924. "pattern": "^prt"
  13925. },
  13926. "type": {
  13927. "type": "string",
  13928. "enum": ["text"]
  13929. },
  13930. "text": {
  13931. "type": "string"
  13932. },
  13933. "synthetic": {
  13934. "type": "boolean"
  13935. },
  13936. "ignored": {
  13937. "type": "boolean"
  13938. },
  13939. "time": {
  13940. "type": "object",
  13941. "properties": {
  13942. "start": {
  13943. "type": "integer",
  13944. "minimum": 0
  13945. },
  13946. "end": {
  13947. "type": "integer",
  13948. "minimum": 0
  13949. }
  13950. },
  13951. "required": ["start"],
  13952. "additionalProperties": false
  13953. },
  13954. "metadata": {
  13955. "type": "object"
  13956. }
  13957. },
  13958. "required": ["type", "text"],
  13959. "additionalProperties": false
  13960. },
  13961. "FilePartInput": {
  13962. "type": "object",
  13963. "properties": {
  13964. "id": {
  13965. "type": "string",
  13966. "pattern": "^prt"
  13967. },
  13968. "type": {
  13969. "type": "string",
  13970. "enum": ["file"]
  13971. },
  13972. "mime": {
  13973. "type": "string"
  13974. },
  13975. "filename": {
  13976. "type": "string"
  13977. },
  13978. "url": {
  13979. "type": "string"
  13980. },
  13981. "source": {
  13982. "$ref": "#/components/schemas/FilePartSource"
  13983. }
  13984. },
  13985. "required": ["type", "mime", "url"],
  13986. "additionalProperties": false
  13987. },
  13988. "AgentPartInput": {
  13989. "type": "object",
  13990. "properties": {
  13991. "id": {
  13992. "type": "string",
  13993. "pattern": "^prt"
  13994. },
  13995. "type": {
  13996. "type": "string",
  13997. "enum": ["agent"]
  13998. },
  13999. "name": {
  14000. "type": "string"
  14001. },
  14002. "source": {
  14003. "type": "object",
  14004. "properties": {
  14005. "value": {
  14006. "type": "string"
  14007. },
  14008. "start": {
  14009. "type": "integer",
  14010. "minimum": 0
  14011. },
  14012. "end": {
  14013. "type": "integer",
  14014. "minimum": 0
  14015. }
  14016. },
  14017. "required": ["value", "start", "end"],
  14018. "additionalProperties": false
  14019. }
  14020. },
  14021. "required": ["type", "name"],
  14022. "additionalProperties": false
  14023. },
  14024. "SubtaskPartInput": {
  14025. "type": "object",
  14026. "properties": {
  14027. "id": {
  14028. "type": "string",
  14029. "pattern": "^prt"
  14030. },
  14031. "type": {
  14032. "type": "string",
  14033. "enum": ["subtask"]
  14034. },
  14035. "prompt": {
  14036. "type": "string"
  14037. },
  14038. "description": {
  14039. "type": "string"
  14040. },
  14041. "agent": {
  14042. "type": "string"
  14043. },
  14044. "model": {
  14045. "type": "object",
  14046. "properties": {
  14047. "providerID": {
  14048. "type": "string"
  14049. },
  14050. "modelID": {
  14051. "type": "string"
  14052. }
  14053. },
  14054. "required": ["providerID", "modelID"],
  14055. "additionalProperties": false
  14056. },
  14057. "command": {
  14058. "type": "string"
  14059. }
  14060. },
  14061. "required": ["type", "prompt", "description", "agent"],
  14062. "additionalProperties": false
  14063. },
  14064. "V2SessionsResponse": {
  14065. "type": "object",
  14066. "properties": {
  14067. "items": {
  14068. "type": "array",
  14069. "items": {
  14070. "$ref": "#/components/schemas/SessionInfo"
  14071. }
  14072. },
  14073. "cursor": {
  14074. "type": "object",
  14075. "properties": {
  14076. "previous": {
  14077. "type": "string"
  14078. },
  14079. "next": {
  14080. "type": "string"
  14081. }
  14082. },
  14083. "additionalProperties": false
  14084. }
  14085. },
  14086. "required": ["items", "cursor"],
  14087. "additionalProperties": false
  14088. },
  14089. "V2SessionMessagesResponse": {
  14090. "type": "object",
  14091. "properties": {
  14092. "items": {
  14093. "type": "array",
  14094. "items": {
  14095. "$ref": "#/components/schemas/SessionMessage"
  14096. }
  14097. },
  14098. "cursor": {
  14099. "type": "object",
  14100. "properties": {
  14101. "previous": {
  14102. "type": "string"
  14103. },
  14104. "next": {
  14105. "type": "string"
  14106. }
  14107. },
  14108. "additionalProperties": false
  14109. }
  14110. },
  14111. "required": ["items", "cursor"],
  14112. "additionalProperties": false
  14113. },
  14114. "EventTuiPromptAppend": {
  14115. "type": "object",
  14116. "properties": {
  14117. "type": {
  14118. "type": "string",
  14119. "enum": ["tui.prompt.append"]
  14120. },
  14121. "properties": {
  14122. "type": "object",
  14123. "properties": {
  14124. "text": {
  14125. "type": "string"
  14126. }
  14127. },
  14128. "required": ["text"],
  14129. "additionalProperties": false
  14130. }
  14131. },
  14132. "required": ["type", "properties"],
  14133. "additionalProperties": false
  14134. },
  14135. "EventTuiCommandExecute": {
  14136. "type": "object",
  14137. "properties": {
  14138. "type": {
  14139. "type": "string",
  14140. "enum": ["tui.command.execute"]
  14141. },
  14142. "properties": {
  14143. "type": "object",
  14144. "properties": {
  14145. "command": {
  14146. "anyOf": [
  14147. {
  14148. "type": "string",
  14149. "enum": [
  14150. "session.list",
  14151. "session.new",
  14152. "session.share",
  14153. "session.interrupt",
  14154. "session.compact",
  14155. "session.page.up",
  14156. "session.page.down",
  14157. "session.line.up",
  14158. "session.line.down",
  14159. "session.half.page.up",
  14160. "session.half.page.down",
  14161. "session.first",
  14162. "session.last",
  14163. "prompt.clear",
  14164. "prompt.submit",
  14165. "agent.cycle"
  14166. ]
  14167. },
  14168. {
  14169. "type": "string"
  14170. }
  14171. ]
  14172. }
  14173. },
  14174. "required": ["command"],
  14175. "additionalProperties": false
  14176. }
  14177. },
  14178. "required": ["type", "properties"],
  14179. "additionalProperties": false
  14180. },
  14181. "EventTuiToastShow": {
  14182. "type": "object",
  14183. "properties": {
  14184. "type": {
  14185. "type": "string",
  14186. "enum": ["tui.toast.show"]
  14187. },
  14188. "properties": {
  14189. "type": "object",
  14190. "properties": {
  14191. "title": {
  14192. "type": "string"
  14193. },
  14194. "message": {
  14195. "type": "string"
  14196. },
  14197. "variant": {
  14198. "type": "string",
  14199. "enum": ["info", "success", "warning", "error"]
  14200. },
  14201. "duration": {
  14202. "type": "integer",
  14203. "exclusiveMinimum": 0
  14204. }
  14205. },
  14206. "required": ["message", "variant"],
  14207. "additionalProperties": false
  14208. }
  14209. },
  14210. "required": ["type", "properties"],
  14211. "additionalProperties": false
  14212. },
  14213. "EventTuiSessionSelect": {
  14214. "type": "object",
  14215. "properties": {
  14216. "type": {
  14217. "type": "string",
  14218. "enum": ["tui.session.select"]
  14219. },
  14220. "properties": {
  14221. "type": "object",
  14222. "properties": {
  14223. "sessionID": {
  14224. "type": "string",
  14225. "pattern": "^ses",
  14226. "description": "Session ID to navigate to"
  14227. }
  14228. },
  14229. "required": ["sessionID"],
  14230. "additionalProperties": false
  14231. }
  14232. },
  14233. "required": ["type", "properties"],
  14234. "additionalProperties": false
  14235. },
  14236. "Workspace": {
  14237. "type": "object",
  14238. "properties": {
  14239. "id": {
  14240. "type": "string",
  14241. "pattern": "^wrk"
  14242. },
  14243. "type": {
  14244. "type": "string"
  14245. },
  14246. "name": {
  14247. "type": "string"
  14248. },
  14249. "branch": {
  14250. "anyOf": [
  14251. {
  14252. "type": "string"
  14253. },
  14254. {
  14255. "type": "null"
  14256. }
  14257. ]
  14258. },
  14259. "directory": {
  14260. "anyOf": [
  14261. {
  14262. "type": "string"
  14263. },
  14264. {
  14265. "type": "null"
  14266. }
  14267. ]
  14268. },
  14269. "extra": {
  14270. "anyOf": [
  14271. {},
  14272. {
  14273. "type": "null"
  14274. }
  14275. ]
  14276. },
  14277. "projectID": {
  14278. "type": "string"
  14279. },
  14280. "timeUsed": {
  14281. "anyOf": [
  14282. {
  14283. "type": "number"
  14284. },
  14285. {
  14286. "type": "string",
  14287. "enum": ["NaN"]
  14288. },
  14289. {
  14290. "type": "string",
  14291. "enum": ["Infinity"]
  14292. },
  14293. {
  14294. "type": "string",
  14295. "enum": ["-Infinity"]
  14296. },
  14297. {
  14298. "type": "string",
  14299. "enum": ["Infinity", "-Infinity", "NaN"]
  14300. }
  14301. ]
  14302. }
  14303. },
  14304. "required": ["id", "type", "name", "projectID", "timeUsed"],
  14305. "additionalProperties": false
  14306. },
  14307. "WorkspaceWarpError": {
  14308. "type": "object",
  14309. "properties": {
  14310. "name": {
  14311. "type": "string",
  14312. "enum": ["WorkspaceWarpError"]
  14313. },
  14314. "data": {
  14315. "type": "object",
  14316. "properties": {
  14317. "message": {
  14318. "type": "string"
  14319. }
  14320. },
  14321. "required": ["message"],
  14322. "additionalProperties": false
  14323. }
  14324. },
  14325. "required": ["name", "data"],
  14326. "additionalProperties": false
  14327. },
  14328. "SyncEventMessageUpdated": {
  14329. "type": "object",
  14330. "properties": {
  14331. "type": {
  14332. "type": "string",
  14333. "enum": ["sync"]
  14334. },
  14335. "name": {
  14336. "type": "string",
  14337. "enum": ["message.updated.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. "sessionID": {
  14353. "type": "string",
  14354. "pattern": "^ses"
  14355. },
  14356. "info": {
  14357. "$ref": "#/components/schemas/Message"
  14358. }
  14359. },
  14360. "required": ["sessionID", "info"],
  14361. "additionalProperties": false
  14362. }
  14363. },
  14364. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14365. "additionalProperties": false
  14366. },
  14367. "SyncEventMessageRemoved": {
  14368. "type": "object",
  14369. "properties": {
  14370. "type": {
  14371. "type": "string",
  14372. "enum": ["sync"]
  14373. },
  14374. "name": {
  14375. "type": "string",
  14376. "enum": ["message.removed.1"]
  14377. },
  14378. "id": {
  14379. "type": "string"
  14380. },
  14381. "seq": {
  14382. "type": "number"
  14383. },
  14384. "aggregateID": {
  14385. "type": "string",
  14386. "enum": ["sessionID"]
  14387. },
  14388. "data": {
  14389. "type": "object",
  14390. "properties": {
  14391. "sessionID": {
  14392. "type": "string",
  14393. "pattern": "^ses"
  14394. },
  14395. "messageID": {
  14396. "type": "string",
  14397. "pattern": "^msg"
  14398. }
  14399. },
  14400. "required": ["sessionID", "messageID"],
  14401. "additionalProperties": false
  14402. }
  14403. },
  14404. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14405. "additionalProperties": false
  14406. },
  14407. "SyncEventMessagePartUpdated": {
  14408. "type": "object",
  14409. "properties": {
  14410. "type": {
  14411. "type": "string",
  14412. "enum": ["sync"]
  14413. },
  14414. "name": {
  14415. "type": "string",
  14416. "enum": ["message.part.updated.1"]
  14417. },
  14418. "id": {
  14419. "type": "string"
  14420. },
  14421. "seq": {
  14422. "type": "number"
  14423. },
  14424. "aggregateID": {
  14425. "type": "string",
  14426. "enum": ["sessionID"]
  14427. },
  14428. "data": {
  14429. "type": "object",
  14430. "properties": {
  14431. "sessionID": {
  14432. "type": "string",
  14433. "pattern": "^ses"
  14434. },
  14435. "part": {
  14436. "$ref": "#/components/schemas/Part"
  14437. },
  14438. "time": {
  14439. "type": "integer",
  14440. "minimum": 0
  14441. }
  14442. },
  14443. "required": ["sessionID", "part", "time"],
  14444. "additionalProperties": false
  14445. }
  14446. },
  14447. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14448. "additionalProperties": false
  14449. },
  14450. "SyncEventMessagePartRemoved": {
  14451. "type": "object",
  14452. "properties": {
  14453. "type": {
  14454. "type": "string",
  14455. "enum": ["sync"]
  14456. },
  14457. "name": {
  14458. "type": "string",
  14459. "enum": ["message.part.removed.1"]
  14460. },
  14461. "id": {
  14462. "type": "string"
  14463. },
  14464. "seq": {
  14465. "type": "number"
  14466. },
  14467. "aggregateID": {
  14468. "type": "string",
  14469. "enum": ["sessionID"]
  14470. },
  14471. "data": {
  14472. "type": "object",
  14473. "properties": {
  14474. "sessionID": {
  14475. "type": "string",
  14476. "pattern": "^ses"
  14477. },
  14478. "messageID": {
  14479. "type": "string",
  14480. "pattern": "^msg"
  14481. },
  14482. "partID": {
  14483. "type": "string",
  14484. "pattern": "^prt"
  14485. }
  14486. },
  14487. "required": ["sessionID", "messageID", "partID"],
  14488. "additionalProperties": false
  14489. }
  14490. },
  14491. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14492. "additionalProperties": false
  14493. },
  14494. "SyncEventSessionCreated": {
  14495. "type": "object",
  14496. "properties": {
  14497. "type": {
  14498. "type": "string",
  14499. "enum": ["sync"]
  14500. },
  14501. "name": {
  14502. "type": "string",
  14503. "enum": ["session.created.1"]
  14504. },
  14505. "id": {
  14506. "type": "string"
  14507. },
  14508. "seq": {
  14509. "type": "number"
  14510. },
  14511. "aggregateID": {
  14512. "type": "string",
  14513. "enum": ["sessionID"]
  14514. },
  14515. "data": {
  14516. "type": "object",
  14517. "properties": {
  14518. "sessionID": {
  14519. "type": "string",
  14520. "pattern": "^ses"
  14521. },
  14522. "info": {
  14523. "$ref": "#/components/schemas/Session"
  14524. }
  14525. },
  14526. "required": ["sessionID", "info"],
  14527. "additionalProperties": false
  14528. }
  14529. },
  14530. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14531. "additionalProperties": false
  14532. },
  14533. "SyncEventSessionUpdated": {
  14534. "type": "object",
  14535. "properties": {
  14536. "type": {
  14537. "type": "string",
  14538. "enum": ["sync"]
  14539. },
  14540. "name": {
  14541. "type": "string",
  14542. "enum": ["session.updated.1"]
  14543. },
  14544. "id": {
  14545. "type": "string"
  14546. },
  14547. "seq": {
  14548. "type": "number"
  14549. },
  14550. "aggregateID": {
  14551. "type": "string",
  14552. "enum": ["sessionID"]
  14553. },
  14554. "data": {
  14555. "type": "object",
  14556. "properties": {
  14557. "sessionID": {
  14558. "type": "string",
  14559. "pattern": "^ses"
  14560. },
  14561. "info": {
  14562. "type": "object",
  14563. "properties": {
  14564. "id": {
  14565. "anyOf": [
  14566. {
  14567. "type": "string",
  14568. "pattern": "^ses"
  14569. },
  14570. {
  14571. "type": "null"
  14572. }
  14573. ]
  14574. },
  14575. "slug": {
  14576. "anyOf": [
  14577. {
  14578. "type": "string"
  14579. },
  14580. {
  14581. "type": "null"
  14582. }
  14583. ]
  14584. },
  14585. "projectID": {
  14586. "anyOf": [
  14587. {
  14588. "type": "string"
  14589. },
  14590. {
  14591. "type": "null"
  14592. }
  14593. ]
  14594. },
  14595. "workspaceID": {
  14596. "anyOf": [
  14597. {
  14598. "type": "string",
  14599. "pattern": "^wrk"
  14600. },
  14601. {
  14602. "type": "null"
  14603. }
  14604. ]
  14605. },
  14606. "directory": {
  14607. "anyOf": [
  14608. {
  14609. "type": "string"
  14610. },
  14611. {
  14612. "type": "null"
  14613. }
  14614. ]
  14615. },
  14616. "path": {
  14617. "anyOf": [
  14618. {
  14619. "type": "string"
  14620. },
  14621. {
  14622. "type": "null"
  14623. }
  14624. ]
  14625. },
  14626. "parentID": {
  14627. "anyOf": [
  14628. {
  14629. "type": "string",
  14630. "pattern": "^ses"
  14631. },
  14632. {
  14633. "type": "null"
  14634. }
  14635. ]
  14636. },
  14637. "summary": {
  14638. "anyOf": [
  14639. {
  14640. "type": "object",
  14641. "properties": {
  14642. "additions": {
  14643. "type": "number"
  14644. },
  14645. "deletions": {
  14646. "type": "number"
  14647. },
  14648. "files": {
  14649. "type": "number"
  14650. },
  14651. "diffs": {
  14652. "type": "array",
  14653. "items": {
  14654. "$ref": "#/components/schemas/SnapshotFileDiff"
  14655. }
  14656. }
  14657. },
  14658. "required": ["additions", "deletions", "files"],
  14659. "additionalProperties": false
  14660. },
  14661. {
  14662. "type": "null"
  14663. }
  14664. ]
  14665. },
  14666. "cost": {
  14667. "anyOf": [
  14668. {
  14669. "type": "number"
  14670. },
  14671. {
  14672. "type": "null"
  14673. }
  14674. ]
  14675. },
  14676. "tokens": {
  14677. "anyOf": [
  14678. {
  14679. "type": "object",
  14680. "properties": {
  14681. "input": {
  14682. "type": "number"
  14683. },
  14684. "output": {
  14685. "type": "number"
  14686. },
  14687. "reasoning": {
  14688. "type": "number"
  14689. },
  14690. "cache": {
  14691. "type": "object",
  14692. "properties": {
  14693. "read": {
  14694. "type": "number"
  14695. },
  14696. "write": {
  14697. "type": "number"
  14698. }
  14699. },
  14700. "required": ["read", "write"],
  14701. "additionalProperties": false
  14702. }
  14703. },
  14704. "required": ["input", "output", "reasoning", "cache"],
  14705. "additionalProperties": false
  14706. },
  14707. {
  14708. "type": "null"
  14709. }
  14710. ]
  14711. },
  14712. "share": {
  14713. "type": "object",
  14714. "properties": {
  14715. "url": {
  14716. "anyOf": [
  14717. {
  14718. "type": "string"
  14719. },
  14720. {
  14721. "type": "null"
  14722. }
  14723. ]
  14724. }
  14725. },
  14726. "additionalProperties": false
  14727. },
  14728. "title": {
  14729. "anyOf": [
  14730. {
  14731. "type": "string"
  14732. },
  14733. {
  14734. "type": "null"
  14735. }
  14736. ]
  14737. },
  14738. "agent": {
  14739. "anyOf": [
  14740. {
  14741. "type": "string"
  14742. },
  14743. {
  14744. "type": "null"
  14745. }
  14746. ]
  14747. },
  14748. "model": {
  14749. "anyOf": [
  14750. {
  14751. "type": "object",
  14752. "properties": {
  14753. "id": {
  14754. "type": "string"
  14755. },
  14756. "providerID": {
  14757. "type": "string"
  14758. },
  14759. "variant": {
  14760. "type": "string"
  14761. }
  14762. },
  14763. "required": ["id", "providerID"],
  14764. "additionalProperties": false
  14765. },
  14766. {
  14767. "type": "null"
  14768. }
  14769. ]
  14770. },
  14771. "version": {
  14772. "anyOf": [
  14773. {
  14774. "type": "string"
  14775. },
  14776. {
  14777. "type": "null"
  14778. }
  14779. ]
  14780. },
  14781. "time": {
  14782. "type": "object",
  14783. "properties": {
  14784. "created": {
  14785. "anyOf": [
  14786. {
  14787. "type": "integer",
  14788. "minimum": 0
  14789. },
  14790. {
  14791. "type": "null"
  14792. }
  14793. ]
  14794. },
  14795. "updated": {
  14796. "anyOf": [
  14797. {
  14798. "type": "integer",
  14799. "minimum": 0
  14800. },
  14801. {
  14802. "type": "null"
  14803. }
  14804. ]
  14805. },
  14806. "compacting": {
  14807. "anyOf": [
  14808. {
  14809. "type": "integer",
  14810. "minimum": 0
  14811. },
  14812. {
  14813. "type": "null"
  14814. }
  14815. ]
  14816. },
  14817. "archived": {
  14818. "anyOf": [
  14819. {
  14820. "type": "number"
  14821. },
  14822. {
  14823. "type": "null"
  14824. }
  14825. ]
  14826. }
  14827. },
  14828. "additionalProperties": false
  14829. },
  14830. "permission": {
  14831. "anyOf": [
  14832. {
  14833. "$ref": "#/components/schemas/PermissionRuleset"
  14834. },
  14835. {
  14836. "type": "null"
  14837. }
  14838. ]
  14839. },
  14840. "revert": {
  14841. "anyOf": [
  14842. {
  14843. "type": "object",
  14844. "properties": {
  14845. "messageID": {
  14846. "type": "string",
  14847. "pattern": "^msg"
  14848. },
  14849. "partID": {
  14850. "type": "string",
  14851. "pattern": "^prt"
  14852. },
  14853. "snapshot": {
  14854. "type": "string"
  14855. },
  14856. "diff": {
  14857. "type": "string"
  14858. }
  14859. },
  14860. "required": ["messageID"],
  14861. "additionalProperties": false
  14862. },
  14863. {
  14864. "type": "null"
  14865. }
  14866. ]
  14867. }
  14868. },
  14869. "additionalProperties": false
  14870. }
  14871. },
  14872. "required": ["sessionID", "info"],
  14873. "additionalProperties": false
  14874. }
  14875. },
  14876. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14877. "additionalProperties": false
  14878. },
  14879. "SyncEventSessionDeleted": {
  14880. "type": "object",
  14881. "properties": {
  14882. "type": {
  14883. "type": "string",
  14884. "enum": ["sync"]
  14885. },
  14886. "name": {
  14887. "type": "string",
  14888. "enum": ["session.deleted.1"]
  14889. },
  14890. "id": {
  14891. "type": "string"
  14892. },
  14893. "seq": {
  14894. "type": "number"
  14895. },
  14896. "aggregateID": {
  14897. "type": "string",
  14898. "enum": ["sessionID"]
  14899. },
  14900. "data": {
  14901. "type": "object",
  14902. "properties": {
  14903. "sessionID": {
  14904. "type": "string",
  14905. "pattern": "^ses"
  14906. },
  14907. "info": {
  14908. "$ref": "#/components/schemas/Session"
  14909. }
  14910. },
  14911. "required": ["sessionID", "info"],
  14912. "additionalProperties": false
  14913. }
  14914. },
  14915. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14916. "additionalProperties": false
  14917. },
  14918. "SyncEventSessionNextAgentSwitched": {
  14919. "type": "object",
  14920. "properties": {
  14921. "type": {
  14922. "type": "string",
  14923. "enum": ["sync"]
  14924. },
  14925. "name": {
  14926. "type": "string",
  14927. "enum": ["session.next.agent.switched.1"]
  14928. },
  14929. "id": {
  14930. "type": "string"
  14931. },
  14932. "seq": {
  14933. "type": "number"
  14934. },
  14935. "aggregateID": {
  14936. "type": "string",
  14937. "enum": ["sessionID"]
  14938. },
  14939. "data": {
  14940. "type": "object",
  14941. "properties": {
  14942. "timestamp": {
  14943. "type": "number"
  14944. },
  14945. "sessionID": {
  14946. "type": "string",
  14947. "pattern": "^ses"
  14948. },
  14949. "agent": {
  14950. "type": "string"
  14951. }
  14952. },
  14953. "required": ["timestamp", "sessionID", "agent"],
  14954. "additionalProperties": false
  14955. }
  14956. },
  14957. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14958. "additionalProperties": false
  14959. },
  14960. "SyncEventSessionNextModelSwitched": {
  14961. "type": "object",
  14962. "properties": {
  14963. "type": {
  14964. "type": "string",
  14965. "enum": ["sync"]
  14966. },
  14967. "name": {
  14968. "type": "string",
  14969. "enum": ["session.next.model.switched.1"]
  14970. },
  14971. "id": {
  14972. "type": "string"
  14973. },
  14974. "seq": {
  14975. "type": "number"
  14976. },
  14977. "aggregateID": {
  14978. "type": "string",
  14979. "enum": ["sessionID"]
  14980. },
  14981. "data": {
  14982. "type": "object",
  14983. "properties": {
  14984. "timestamp": {
  14985. "type": "number"
  14986. },
  14987. "sessionID": {
  14988. "type": "string",
  14989. "pattern": "^ses"
  14990. },
  14991. "model": {
  14992. "type": "object",
  14993. "properties": {
  14994. "id": {
  14995. "type": "string"
  14996. },
  14997. "providerID": {
  14998. "type": "string"
  14999. },
  15000. "variant": {
  15001. "type": "string"
  15002. }
  15003. },
  15004. "required": ["id", "providerID", "variant"],
  15005. "additionalProperties": false
  15006. }
  15007. },
  15008. "required": ["timestamp", "sessionID", "model"],
  15009. "additionalProperties": false
  15010. }
  15011. },
  15012. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15013. "additionalProperties": false
  15014. },
  15015. "SyncEventSessionNextPrompted": {
  15016. "type": "object",
  15017. "properties": {
  15018. "type": {
  15019. "type": "string",
  15020. "enum": ["sync"]
  15021. },
  15022. "name": {
  15023. "type": "string",
  15024. "enum": ["session.next.prompted.1"]
  15025. },
  15026. "id": {
  15027. "type": "string"
  15028. },
  15029. "seq": {
  15030. "type": "number"
  15031. },
  15032. "aggregateID": {
  15033. "type": "string",
  15034. "enum": ["sessionID"]
  15035. },
  15036. "data": {
  15037. "type": "object",
  15038. "properties": {
  15039. "timestamp": {
  15040. "type": "number"
  15041. },
  15042. "sessionID": {
  15043. "type": "string",
  15044. "pattern": "^ses"
  15045. },
  15046. "prompt": {
  15047. "$ref": "#/components/schemas/Prompt"
  15048. }
  15049. },
  15050. "required": ["timestamp", "sessionID", "prompt"],
  15051. "additionalProperties": false
  15052. }
  15053. },
  15054. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15055. "additionalProperties": false
  15056. },
  15057. "SyncEventSessionNextSynthetic": {
  15058. "type": "object",
  15059. "properties": {
  15060. "type": {
  15061. "type": "string",
  15062. "enum": ["sync"]
  15063. },
  15064. "name": {
  15065. "type": "string",
  15066. "enum": ["session.next.synthetic.1"]
  15067. },
  15068. "id": {
  15069. "type": "string"
  15070. },
  15071. "seq": {
  15072. "type": "number"
  15073. },
  15074. "aggregateID": {
  15075. "type": "string",
  15076. "enum": ["sessionID"]
  15077. },
  15078. "data": {
  15079. "type": "object",
  15080. "properties": {
  15081. "timestamp": {
  15082. "type": "number"
  15083. },
  15084. "sessionID": {
  15085. "type": "string",
  15086. "pattern": "^ses"
  15087. },
  15088. "text": {
  15089. "type": "string"
  15090. }
  15091. },
  15092. "required": ["timestamp", "sessionID", "text"],
  15093. "additionalProperties": false
  15094. }
  15095. },
  15096. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15097. "additionalProperties": false
  15098. },
  15099. "SyncEventSessionNextShellStarted": {
  15100. "type": "object",
  15101. "properties": {
  15102. "type": {
  15103. "type": "string",
  15104. "enum": ["sync"]
  15105. },
  15106. "name": {
  15107. "type": "string",
  15108. "enum": ["session.next.shell.started.1"]
  15109. },
  15110. "id": {
  15111. "type": "string"
  15112. },
  15113. "seq": {
  15114. "type": "number"
  15115. },
  15116. "aggregateID": {
  15117. "type": "string",
  15118. "enum": ["sessionID"]
  15119. },
  15120. "data": {
  15121. "type": "object",
  15122. "properties": {
  15123. "timestamp": {
  15124. "type": "number"
  15125. },
  15126. "sessionID": {
  15127. "type": "string",
  15128. "pattern": "^ses"
  15129. },
  15130. "callID": {
  15131. "type": "string"
  15132. },
  15133. "command": {
  15134. "type": "string"
  15135. }
  15136. },
  15137. "required": ["timestamp", "sessionID", "callID", "command"],
  15138. "additionalProperties": false
  15139. }
  15140. },
  15141. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15142. "additionalProperties": false
  15143. },
  15144. "SyncEventSessionNextShellEnded": {
  15145. "type": "object",
  15146. "properties": {
  15147. "type": {
  15148. "type": "string",
  15149. "enum": ["sync"]
  15150. },
  15151. "name": {
  15152. "type": "string",
  15153. "enum": ["session.next.shell.ended.1"]
  15154. },
  15155. "id": {
  15156. "type": "string"
  15157. },
  15158. "seq": {
  15159. "type": "number"
  15160. },
  15161. "aggregateID": {
  15162. "type": "string",
  15163. "enum": ["sessionID"]
  15164. },
  15165. "data": {
  15166. "type": "object",
  15167. "properties": {
  15168. "timestamp": {
  15169. "type": "number"
  15170. },
  15171. "sessionID": {
  15172. "type": "string",
  15173. "pattern": "^ses"
  15174. },
  15175. "callID": {
  15176. "type": "string"
  15177. },
  15178. "output": {
  15179. "type": "string"
  15180. }
  15181. },
  15182. "required": ["timestamp", "sessionID", "callID", "output"],
  15183. "additionalProperties": false
  15184. }
  15185. },
  15186. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15187. "additionalProperties": false
  15188. },
  15189. "SyncEventSessionNextStepStarted": {
  15190. "type": "object",
  15191. "properties": {
  15192. "type": {
  15193. "type": "string",
  15194. "enum": ["sync"]
  15195. },
  15196. "name": {
  15197. "type": "string",
  15198. "enum": ["session.next.step.started.1"]
  15199. },
  15200. "id": {
  15201. "type": "string"
  15202. },
  15203. "seq": {
  15204. "type": "number"
  15205. },
  15206. "aggregateID": {
  15207. "type": "string",
  15208. "enum": ["sessionID"]
  15209. },
  15210. "data": {
  15211. "type": "object",
  15212. "properties": {
  15213. "timestamp": {
  15214. "type": "number"
  15215. },
  15216. "sessionID": {
  15217. "type": "string",
  15218. "pattern": "^ses"
  15219. },
  15220. "agent": {
  15221. "type": "string"
  15222. },
  15223. "model": {
  15224. "type": "object",
  15225. "properties": {
  15226. "id": {
  15227. "type": "string"
  15228. },
  15229. "providerID": {
  15230. "type": "string"
  15231. },
  15232. "variant": {
  15233. "type": "string"
  15234. }
  15235. },
  15236. "required": ["id", "providerID", "variant"],
  15237. "additionalProperties": false
  15238. },
  15239. "snapshot": {
  15240. "type": "string"
  15241. }
  15242. },
  15243. "required": ["timestamp", "sessionID", "agent", "model"],
  15244. "additionalProperties": false
  15245. }
  15246. },
  15247. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15248. "additionalProperties": false
  15249. },
  15250. "SyncEventSessionNextStepEnded": {
  15251. "type": "object",
  15252. "properties": {
  15253. "type": {
  15254. "type": "string",
  15255. "enum": ["sync"]
  15256. },
  15257. "name": {
  15258. "type": "string",
  15259. "enum": ["session.next.step.ended.1"]
  15260. },
  15261. "id": {
  15262. "type": "string"
  15263. },
  15264. "seq": {
  15265. "type": "number"
  15266. },
  15267. "aggregateID": {
  15268. "type": "string",
  15269. "enum": ["sessionID"]
  15270. },
  15271. "data": {
  15272. "type": "object",
  15273. "properties": {
  15274. "timestamp": {
  15275. "type": "number"
  15276. },
  15277. "sessionID": {
  15278. "type": "string",
  15279. "pattern": "^ses"
  15280. },
  15281. "finish": {
  15282. "type": "string"
  15283. },
  15284. "cost": {
  15285. "type": "number"
  15286. },
  15287. "tokens": {
  15288. "type": "object",
  15289. "properties": {
  15290. "input": {
  15291. "type": "number"
  15292. },
  15293. "output": {
  15294. "type": "number"
  15295. },
  15296. "reasoning": {
  15297. "type": "number"
  15298. },
  15299. "cache": {
  15300. "type": "object",
  15301. "properties": {
  15302. "read": {
  15303. "type": "number"
  15304. },
  15305. "write": {
  15306. "type": "number"
  15307. }
  15308. },
  15309. "required": ["read", "write"],
  15310. "additionalProperties": false
  15311. }
  15312. },
  15313. "required": ["input", "output", "reasoning", "cache"],
  15314. "additionalProperties": false
  15315. },
  15316. "snapshot": {
  15317. "type": "string"
  15318. }
  15319. },
  15320. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  15321. "additionalProperties": false
  15322. }
  15323. },
  15324. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15325. "additionalProperties": false
  15326. },
  15327. "SyncEventSessionNextStepFailed": {
  15328. "type": "object",
  15329. "properties": {
  15330. "type": {
  15331. "type": "string",
  15332. "enum": ["sync"]
  15333. },
  15334. "name": {
  15335. "type": "string",
  15336. "enum": ["session.next.step.failed.1"]
  15337. },
  15338. "id": {
  15339. "type": "string"
  15340. },
  15341. "seq": {
  15342. "type": "number"
  15343. },
  15344. "aggregateID": {
  15345. "type": "string",
  15346. "enum": ["sessionID"]
  15347. },
  15348. "data": {
  15349. "type": "object",
  15350. "properties": {
  15351. "timestamp": {
  15352. "type": "number"
  15353. },
  15354. "sessionID": {
  15355. "type": "string",
  15356. "pattern": "^ses"
  15357. },
  15358. "error": {
  15359. "$ref": "#/components/schemas/SessionErrorUnknown"
  15360. }
  15361. },
  15362. "required": ["timestamp", "sessionID", "error"],
  15363. "additionalProperties": false
  15364. }
  15365. },
  15366. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15367. "additionalProperties": false
  15368. },
  15369. "SyncEventSessionNextTextStarted": {
  15370. "type": "object",
  15371. "properties": {
  15372. "type": {
  15373. "type": "string",
  15374. "enum": ["sync"]
  15375. },
  15376. "name": {
  15377. "type": "string",
  15378. "enum": ["session.next.text.started.1"]
  15379. },
  15380. "id": {
  15381. "type": "string"
  15382. },
  15383. "seq": {
  15384. "type": "number"
  15385. },
  15386. "aggregateID": {
  15387. "type": "string",
  15388. "enum": ["sessionID"]
  15389. },
  15390. "data": {
  15391. "type": "object",
  15392. "properties": {
  15393. "timestamp": {
  15394. "type": "number"
  15395. },
  15396. "sessionID": {
  15397. "type": "string",
  15398. "pattern": "^ses"
  15399. }
  15400. },
  15401. "required": ["timestamp", "sessionID"],
  15402. "additionalProperties": false
  15403. }
  15404. },
  15405. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15406. "additionalProperties": false
  15407. },
  15408. "SyncEventSessionNextTextDelta": {
  15409. "type": "object",
  15410. "properties": {
  15411. "type": {
  15412. "type": "string",
  15413. "enum": ["sync"]
  15414. },
  15415. "name": {
  15416. "type": "string",
  15417. "enum": ["session.next.text.delta.1"]
  15418. },
  15419. "id": {
  15420. "type": "string"
  15421. },
  15422. "seq": {
  15423. "type": "number"
  15424. },
  15425. "aggregateID": {
  15426. "type": "string",
  15427. "enum": ["sessionID"]
  15428. },
  15429. "data": {
  15430. "type": "object",
  15431. "properties": {
  15432. "timestamp": {
  15433. "type": "number"
  15434. },
  15435. "sessionID": {
  15436. "type": "string",
  15437. "pattern": "^ses"
  15438. },
  15439. "delta": {
  15440. "type": "string"
  15441. }
  15442. },
  15443. "required": ["timestamp", "sessionID", "delta"],
  15444. "additionalProperties": false
  15445. }
  15446. },
  15447. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15448. "additionalProperties": false
  15449. },
  15450. "SyncEventSessionNextTextEnded": {
  15451. "type": "object",
  15452. "properties": {
  15453. "type": {
  15454. "type": "string",
  15455. "enum": ["sync"]
  15456. },
  15457. "name": {
  15458. "type": "string",
  15459. "enum": ["session.next.text.ended.1"]
  15460. },
  15461. "id": {
  15462. "type": "string"
  15463. },
  15464. "seq": {
  15465. "type": "number"
  15466. },
  15467. "aggregateID": {
  15468. "type": "string",
  15469. "enum": ["sessionID"]
  15470. },
  15471. "data": {
  15472. "type": "object",
  15473. "properties": {
  15474. "timestamp": {
  15475. "type": "number"
  15476. },
  15477. "sessionID": {
  15478. "type": "string",
  15479. "pattern": "^ses"
  15480. },
  15481. "text": {
  15482. "type": "string"
  15483. }
  15484. },
  15485. "required": ["timestamp", "sessionID", "text"],
  15486. "additionalProperties": false
  15487. }
  15488. },
  15489. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15490. "additionalProperties": false
  15491. },
  15492. "SyncEventSessionNextReasoningStarted": {
  15493. "type": "object",
  15494. "properties": {
  15495. "type": {
  15496. "type": "string",
  15497. "enum": ["sync"]
  15498. },
  15499. "name": {
  15500. "type": "string",
  15501. "enum": ["session.next.reasoning.started.1"]
  15502. },
  15503. "id": {
  15504. "type": "string"
  15505. },
  15506. "seq": {
  15507. "type": "number"
  15508. },
  15509. "aggregateID": {
  15510. "type": "string",
  15511. "enum": ["sessionID"]
  15512. },
  15513. "data": {
  15514. "type": "object",
  15515. "properties": {
  15516. "timestamp": {
  15517. "type": "number"
  15518. },
  15519. "sessionID": {
  15520. "type": "string",
  15521. "pattern": "^ses"
  15522. },
  15523. "reasoningID": {
  15524. "type": "string"
  15525. }
  15526. },
  15527. "required": ["timestamp", "sessionID", "reasoningID"],
  15528. "additionalProperties": false
  15529. }
  15530. },
  15531. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15532. "additionalProperties": false
  15533. },
  15534. "SyncEventSessionNextReasoningDelta": {
  15535. "type": "object",
  15536. "properties": {
  15537. "type": {
  15538. "type": "string",
  15539. "enum": ["sync"]
  15540. },
  15541. "name": {
  15542. "type": "string",
  15543. "enum": ["session.next.reasoning.delta.1"]
  15544. },
  15545. "id": {
  15546. "type": "string"
  15547. },
  15548. "seq": {
  15549. "type": "number"
  15550. },
  15551. "aggregateID": {
  15552. "type": "string",
  15553. "enum": ["sessionID"]
  15554. },
  15555. "data": {
  15556. "type": "object",
  15557. "properties": {
  15558. "timestamp": {
  15559. "type": "number"
  15560. },
  15561. "sessionID": {
  15562. "type": "string",
  15563. "pattern": "^ses"
  15564. },
  15565. "reasoningID": {
  15566. "type": "string"
  15567. },
  15568. "delta": {
  15569. "type": "string"
  15570. }
  15571. },
  15572. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15573. "additionalProperties": false
  15574. }
  15575. },
  15576. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15577. "additionalProperties": false
  15578. },
  15579. "SyncEventSessionNextReasoningEnded": {
  15580. "type": "object",
  15581. "properties": {
  15582. "type": {
  15583. "type": "string",
  15584. "enum": ["sync"]
  15585. },
  15586. "name": {
  15587. "type": "string",
  15588. "enum": ["session.next.reasoning.ended.1"]
  15589. },
  15590. "id": {
  15591. "type": "string"
  15592. },
  15593. "seq": {
  15594. "type": "number"
  15595. },
  15596. "aggregateID": {
  15597. "type": "string",
  15598. "enum": ["sessionID"]
  15599. },
  15600. "data": {
  15601. "type": "object",
  15602. "properties": {
  15603. "timestamp": {
  15604. "type": "number"
  15605. },
  15606. "sessionID": {
  15607. "type": "string",
  15608. "pattern": "^ses"
  15609. },
  15610. "reasoningID": {
  15611. "type": "string"
  15612. },
  15613. "text": {
  15614. "type": "string"
  15615. }
  15616. },
  15617. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15618. "additionalProperties": false
  15619. }
  15620. },
  15621. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15622. "additionalProperties": false
  15623. },
  15624. "SyncEventSessionNextToolInputStarted": {
  15625. "type": "object",
  15626. "properties": {
  15627. "type": {
  15628. "type": "string",
  15629. "enum": ["sync"]
  15630. },
  15631. "name": {
  15632. "type": "string",
  15633. "enum": ["session.next.tool.input.started.1"]
  15634. },
  15635. "id": {
  15636. "type": "string"
  15637. },
  15638. "seq": {
  15639. "type": "number"
  15640. },
  15641. "aggregateID": {
  15642. "type": "string",
  15643. "enum": ["sessionID"]
  15644. },
  15645. "data": {
  15646. "type": "object",
  15647. "properties": {
  15648. "timestamp": {
  15649. "type": "number"
  15650. },
  15651. "sessionID": {
  15652. "type": "string",
  15653. "pattern": "^ses"
  15654. },
  15655. "callID": {
  15656. "type": "string"
  15657. },
  15658. "name": {
  15659. "type": "string"
  15660. }
  15661. },
  15662. "required": ["timestamp", "sessionID", "callID", "name"],
  15663. "additionalProperties": false
  15664. }
  15665. },
  15666. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15667. "additionalProperties": false
  15668. },
  15669. "SyncEventSessionNextToolInputDelta": {
  15670. "type": "object",
  15671. "properties": {
  15672. "type": {
  15673. "type": "string",
  15674. "enum": ["sync"]
  15675. },
  15676. "name": {
  15677. "type": "string",
  15678. "enum": ["session.next.tool.input.delta.1"]
  15679. },
  15680. "id": {
  15681. "type": "string"
  15682. },
  15683. "seq": {
  15684. "type": "number"
  15685. },
  15686. "aggregateID": {
  15687. "type": "string",
  15688. "enum": ["sessionID"]
  15689. },
  15690. "data": {
  15691. "type": "object",
  15692. "properties": {
  15693. "timestamp": {
  15694. "type": "number"
  15695. },
  15696. "sessionID": {
  15697. "type": "string",
  15698. "pattern": "^ses"
  15699. },
  15700. "callID": {
  15701. "type": "string"
  15702. },
  15703. "delta": {
  15704. "type": "string"
  15705. }
  15706. },
  15707. "required": ["timestamp", "sessionID", "callID", "delta"],
  15708. "additionalProperties": false
  15709. }
  15710. },
  15711. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15712. "additionalProperties": false
  15713. },
  15714. "SyncEventSessionNextToolInputEnded": {
  15715. "type": "object",
  15716. "properties": {
  15717. "type": {
  15718. "type": "string",
  15719. "enum": ["sync"]
  15720. },
  15721. "name": {
  15722. "type": "string",
  15723. "enum": ["session.next.tool.input.ended.1"]
  15724. },
  15725. "id": {
  15726. "type": "string"
  15727. },
  15728. "seq": {
  15729. "type": "number"
  15730. },
  15731. "aggregateID": {
  15732. "type": "string",
  15733. "enum": ["sessionID"]
  15734. },
  15735. "data": {
  15736. "type": "object",
  15737. "properties": {
  15738. "timestamp": {
  15739. "type": "number"
  15740. },
  15741. "sessionID": {
  15742. "type": "string",
  15743. "pattern": "^ses"
  15744. },
  15745. "callID": {
  15746. "type": "string"
  15747. },
  15748. "text": {
  15749. "type": "string"
  15750. }
  15751. },
  15752. "required": ["timestamp", "sessionID", "callID", "text"],
  15753. "additionalProperties": false
  15754. }
  15755. },
  15756. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15757. "additionalProperties": false
  15758. },
  15759. "SyncEventSessionNextToolCalled": {
  15760. "type": "object",
  15761. "properties": {
  15762. "type": {
  15763. "type": "string",
  15764. "enum": ["sync"]
  15765. },
  15766. "name": {
  15767. "type": "string",
  15768. "enum": ["session.next.tool.called.1"]
  15769. },
  15770. "id": {
  15771. "type": "string"
  15772. },
  15773. "seq": {
  15774. "type": "number"
  15775. },
  15776. "aggregateID": {
  15777. "type": "string",
  15778. "enum": ["sessionID"]
  15779. },
  15780. "data": {
  15781. "type": "object",
  15782. "properties": {
  15783. "timestamp": {
  15784. "type": "number"
  15785. },
  15786. "sessionID": {
  15787. "type": "string",
  15788. "pattern": "^ses"
  15789. },
  15790. "callID": {
  15791. "type": "string"
  15792. },
  15793. "tool": {
  15794. "type": "string"
  15795. },
  15796. "input": {
  15797. "type": "object"
  15798. },
  15799. "provider": {
  15800. "type": "object",
  15801. "properties": {
  15802. "executed": {
  15803. "type": "boolean"
  15804. },
  15805. "metadata": {
  15806. "type": "object"
  15807. }
  15808. },
  15809. "required": ["executed"],
  15810. "additionalProperties": false
  15811. }
  15812. },
  15813. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15814. "additionalProperties": false
  15815. }
  15816. },
  15817. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15818. "additionalProperties": false
  15819. },
  15820. "SyncEventSessionNextToolProgress": {
  15821. "type": "object",
  15822. "properties": {
  15823. "type": {
  15824. "type": "string",
  15825. "enum": ["sync"]
  15826. },
  15827. "name": {
  15828. "type": "string",
  15829. "enum": ["session.next.tool.progress.1"]
  15830. },
  15831. "id": {
  15832. "type": "string"
  15833. },
  15834. "seq": {
  15835. "type": "number"
  15836. },
  15837. "aggregateID": {
  15838. "type": "string",
  15839. "enum": ["sessionID"]
  15840. },
  15841. "data": {
  15842. "type": "object",
  15843. "properties": {
  15844. "timestamp": {
  15845. "type": "number"
  15846. },
  15847. "sessionID": {
  15848. "type": "string",
  15849. "pattern": "^ses"
  15850. },
  15851. "callID": {
  15852. "type": "string"
  15853. },
  15854. "structured": {
  15855. "type": "object"
  15856. },
  15857. "content": {
  15858. "type": "array",
  15859. "items": {
  15860. "anyOf": [
  15861. {
  15862. "$ref": "#/components/schemas/ToolTextContent"
  15863. },
  15864. {
  15865. "$ref": "#/components/schemas/ToolFileContent"
  15866. }
  15867. ]
  15868. }
  15869. }
  15870. },
  15871. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15872. "additionalProperties": false
  15873. }
  15874. },
  15875. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15876. "additionalProperties": false
  15877. },
  15878. "SyncEventSessionNextToolSuccess": {
  15879. "type": "object",
  15880. "properties": {
  15881. "type": {
  15882. "type": "string",
  15883. "enum": ["sync"]
  15884. },
  15885. "name": {
  15886. "type": "string",
  15887. "enum": ["session.next.tool.success.1"]
  15888. },
  15889. "id": {
  15890. "type": "string"
  15891. },
  15892. "seq": {
  15893. "type": "number"
  15894. },
  15895. "aggregateID": {
  15896. "type": "string",
  15897. "enum": ["sessionID"]
  15898. },
  15899. "data": {
  15900. "type": "object",
  15901. "properties": {
  15902. "timestamp": {
  15903. "type": "number"
  15904. },
  15905. "sessionID": {
  15906. "type": "string",
  15907. "pattern": "^ses"
  15908. },
  15909. "callID": {
  15910. "type": "string"
  15911. },
  15912. "structured": {
  15913. "type": "object"
  15914. },
  15915. "content": {
  15916. "type": "array",
  15917. "items": {
  15918. "anyOf": [
  15919. {
  15920. "$ref": "#/components/schemas/ToolTextContent"
  15921. },
  15922. {
  15923. "$ref": "#/components/schemas/ToolFileContent"
  15924. }
  15925. ]
  15926. }
  15927. },
  15928. "provider": {
  15929. "type": "object",
  15930. "properties": {
  15931. "executed": {
  15932. "type": "boolean"
  15933. },
  15934. "metadata": {
  15935. "type": "object"
  15936. }
  15937. },
  15938. "required": ["executed"],
  15939. "additionalProperties": false
  15940. }
  15941. },
  15942. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15943. "additionalProperties": false
  15944. }
  15945. },
  15946. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15947. "additionalProperties": false
  15948. },
  15949. "SyncEventSessionNextToolFailed": {
  15950. "type": "object",
  15951. "properties": {
  15952. "type": {
  15953. "type": "string",
  15954. "enum": ["sync"]
  15955. },
  15956. "name": {
  15957. "type": "string",
  15958. "enum": ["session.next.tool.failed.1"]
  15959. },
  15960. "id": {
  15961. "type": "string"
  15962. },
  15963. "seq": {
  15964. "type": "number"
  15965. },
  15966. "aggregateID": {
  15967. "type": "string",
  15968. "enum": ["sessionID"]
  15969. },
  15970. "data": {
  15971. "type": "object",
  15972. "properties": {
  15973. "timestamp": {
  15974. "type": "number"
  15975. },
  15976. "sessionID": {
  15977. "type": "string",
  15978. "pattern": "^ses"
  15979. },
  15980. "callID": {
  15981. "type": "string"
  15982. },
  15983. "error": {
  15984. "$ref": "#/components/schemas/SessionErrorUnknown"
  15985. },
  15986. "provider": {
  15987. "type": "object",
  15988. "properties": {
  15989. "executed": {
  15990. "type": "boolean"
  15991. },
  15992. "metadata": {
  15993. "type": "object"
  15994. }
  15995. },
  15996. "required": ["executed"],
  15997. "additionalProperties": false
  15998. }
  15999. },
  16000. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  16001. "additionalProperties": false
  16002. }
  16003. },
  16004. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16005. "additionalProperties": false
  16006. },
  16007. "SyncEventSessionNextRetried": {
  16008. "type": "object",
  16009. "properties": {
  16010. "type": {
  16011. "type": "string",
  16012. "enum": ["sync"]
  16013. },
  16014. "name": {
  16015. "type": "string",
  16016. "enum": ["session.next.retried.1"]
  16017. },
  16018. "id": {
  16019. "type": "string"
  16020. },
  16021. "seq": {
  16022. "type": "number"
  16023. },
  16024. "aggregateID": {
  16025. "type": "string",
  16026. "enum": ["sessionID"]
  16027. },
  16028. "data": {
  16029. "type": "object",
  16030. "properties": {
  16031. "timestamp": {
  16032. "type": "number"
  16033. },
  16034. "sessionID": {
  16035. "type": "string",
  16036. "pattern": "^ses"
  16037. },
  16038. "attempt": {
  16039. "type": "number"
  16040. },
  16041. "error": {
  16042. "$ref": "#/components/schemas/SessionNextRetry_error"
  16043. }
  16044. },
  16045. "required": ["timestamp", "sessionID", "attempt", "error"],
  16046. "additionalProperties": false
  16047. }
  16048. },
  16049. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16050. "additionalProperties": false
  16051. },
  16052. "SyncEventSessionNextCompactionStarted": {
  16053. "type": "object",
  16054. "properties": {
  16055. "type": {
  16056. "type": "string",
  16057. "enum": ["sync"]
  16058. },
  16059. "name": {
  16060. "type": "string",
  16061. "enum": ["session.next.compaction.started.1"]
  16062. },
  16063. "id": {
  16064. "type": "string"
  16065. },
  16066. "seq": {
  16067. "type": "number"
  16068. },
  16069. "aggregateID": {
  16070. "type": "string",
  16071. "enum": ["sessionID"]
  16072. },
  16073. "data": {
  16074. "type": "object",
  16075. "properties": {
  16076. "timestamp": {
  16077. "type": "number"
  16078. },
  16079. "sessionID": {
  16080. "type": "string",
  16081. "pattern": "^ses"
  16082. },
  16083. "reason": {
  16084. "type": "string",
  16085. "enum": ["auto", "manual"]
  16086. }
  16087. },
  16088. "required": ["timestamp", "sessionID", "reason"],
  16089. "additionalProperties": false
  16090. }
  16091. },
  16092. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16093. "additionalProperties": false
  16094. },
  16095. "SyncEventSessionNextCompactionDelta": {
  16096. "type": "object",
  16097. "properties": {
  16098. "type": {
  16099. "type": "string",
  16100. "enum": ["sync"]
  16101. },
  16102. "name": {
  16103. "type": "string",
  16104. "enum": ["session.next.compaction.delta.1"]
  16105. },
  16106. "id": {
  16107. "type": "string"
  16108. },
  16109. "seq": {
  16110. "type": "number"
  16111. },
  16112. "aggregateID": {
  16113. "type": "string",
  16114. "enum": ["sessionID"]
  16115. },
  16116. "data": {
  16117. "type": "object",
  16118. "properties": {
  16119. "timestamp": {
  16120. "type": "number"
  16121. },
  16122. "sessionID": {
  16123. "type": "string",
  16124. "pattern": "^ses"
  16125. },
  16126. "text": {
  16127. "type": "string"
  16128. }
  16129. },
  16130. "required": ["timestamp", "sessionID", "text"],
  16131. "additionalProperties": false
  16132. }
  16133. },
  16134. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16135. "additionalProperties": false
  16136. },
  16137. "SyncEventSessionNextCompactionEnded": {
  16138. "type": "object",
  16139. "properties": {
  16140. "type": {
  16141. "type": "string",
  16142. "enum": ["sync"]
  16143. },
  16144. "name": {
  16145. "type": "string",
  16146. "enum": ["session.next.compaction.ended.1"]
  16147. },
  16148. "id": {
  16149. "type": "string"
  16150. },
  16151. "seq": {
  16152. "type": "number"
  16153. },
  16154. "aggregateID": {
  16155. "type": "string",
  16156. "enum": ["sessionID"]
  16157. },
  16158. "data": {
  16159. "type": "object",
  16160. "properties": {
  16161. "timestamp": {
  16162. "type": "number"
  16163. },
  16164. "sessionID": {
  16165. "type": "string",
  16166. "pattern": "^ses"
  16167. },
  16168. "text": {
  16169. "type": "string"
  16170. },
  16171. "include": {
  16172. "type": "string"
  16173. }
  16174. },
  16175. "required": ["timestamp", "sessionID", "text"],
  16176. "additionalProperties": false
  16177. }
  16178. },
  16179. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16180. "additionalProperties": false
  16181. },
  16182. "EventServerInstanceDisposed": {
  16183. "type": "object",
  16184. "properties": {
  16185. "id": {
  16186. "type": "string"
  16187. },
  16188. "type": {
  16189. "type": "string",
  16190. "enum": ["server.instance.disposed"]
  16191. },
  16192. "properties": {
  16193. "type": "object",
  16194. "properties": {
  16195. "directory": {
  16196. "type": "string"
  16197. }
  16198. },
  16199. "required": ["directory"],
  16200. "additionalProperties": false
  16201. }
  16202. },
  16203. "required": ["id", "type", "properties"],
  16204. "additionalProperties": false
  16205. },
  16206. "EventFileEdited": {
  16207. "type": "object",
  16208. "properties": {
  16209. "id": {
  16210. "type": "string"
  16211. },
  16212. "type": {
  16213. "type": "string",
  16214. "enum": ["file.edited"]
  16215. },
  16216. "properties": {
  16217. "type": "object",
  16218. "properties": {
  16219. "file": {
  16220. "type": "string"
  16221. }
  16222. },
  16223. "required": ["file"],
  16224. "additionalProperties": false
  16225. }
  16226. },
  16227. "required": ["id", "type", "properties"],
  16228. "additionalProperties": false
  16229. },
  16230. "EventFileWatcherUpdated": {
  16231. "type": "object",
  16232. "properties": {
  16233. "id": {
  16234. "type": "string"
  16235. },
  16236. "type": {
  16237. "type": "string",
  16238. "enum": ["file.watcher.updated"]
  16239. },
  16240. "properties": {
  16241. "type": "object",
  16242. "properties": {
  16243. "file": {
  16244. "type": "string"
  16245. },
  16246. "event": {
  16247. "type": "string",
  16248. "enum": ["add", "change", "unlink"]
  16249. }
  16250. },
  16251. "required": ["file", "event"],
  16252. "additionalProperties": false
  16253. }
  16254. },
  16255. "required": ["id", "type", "properties"],
  16256. "additionalProperties": false
  16257. },
  16258. "EventLspClientDiagnostics": {
  16259. "type": "object",
  16260. "properties": {
  16261. "id": {
  16262. "type": "string"
  16263. },
  16264. "type": {
  16265. "type": "string",
  16266. "enum": ["lsp.client.diagnostics"]
  16267. },
  16268. "properties": {
  16269. "type": "object",
  16270. "properties": {
  16271. "serverID": {
  16272. "type": "string"
  16273. },
  16274. "path": {
  16275. "type": "string"
  16276. }
  16277. },
  16278. "required": ["serverID", "path"],
  16279. "additionalProperties": false
  16280. }
  16281. },
  16282. "required": ["id", "type", "properties"],
  16283. "additionalProperties": false
  16284. },
  16285. "EventLspUpdated": {
  16286. "type": "object",
  16287. "properties": {
  16288. "id": {
  16289. "type": "string"
  16290. },
  16291. "type": {
  16292. "type": "string",
  16293. "enum": ["lsp.updated"]
  16294. },
  16295. "properties": {
  16296. "type": "object",
  16297. "properties": {}
  16298. }
  16299. },
  16300. "required": ["id", "type", "properties"],
  16301. "additionalProperties": false
  16302. },
  16303. "EventMessagePartDelta": {
  16304. "type": "object",
  16305. "properties": {
  16306. "id": {
  16307. "type": "string"
  16308. },
  16309. "type": {
  16310. "type": "string",
  16311. "enum": ["message.part.delta"]
  16312. },
  16313. "properties": {
  16314. "type": "object",
  16315. "properties": {
  16316. "sessionID": {
  16317. "type": "string",
  16318. "pattern": "^ses"
  16319. },
  16320. "messageID": {
  16321. "type": "string",
  16322. "pattern": "^msg"
  16323. },
  16324. "partID": {
  16325. "type": "string",
  16326. "pattern": "^prt"
  16327. },
  16328. "field": {
  16329. "type": "string"
  16330. },
  16331. "delta": {
  16332. "type": "string"
  16333. }
  16334. },
  16335. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  16336. "additionalProperties": false
  16337. }
  16338. },
  16339. "required": ["id", "type", "properties"],
  16340. "additionalProperties": false
  16341. },
  16342. "EventPermissionAsked": {
  16343. "type": "object",
  16344. "properties": {
  16345. "id": {
  16346. "type": "string"
  16347. },
  16348. "type": {
  16349. "type": "string",
  16350. "enum": ["permission.asked"]
  16351. },
  16352. "properties": {
  16353. "$ref": "#/components/schemas/PermissionRequest"
  16354. }
  16355. },
  16356. "required": ["id", "type", "properties"],
  16357. "additionalProperties": false
  16358. },
  16359. "EventPermissionReplied": {
  16360. "type": "object",
  16361. "properties": {
  16362. "id": {
  16363. "type": "string"
  16364. },
  16365. "type": {
  16366. "type": "string",
  16367. "enum": ["permission.replied"]
  16368. },
  16369. "properties": {
  16370. "type": "object",
  16371. "properties": {
  16372. "sessionID": {
  16373. "type": "string",
  16374. "pattern": "^ses"
  16375. },
  16376. "requestID": {
  16377. "type": "string",
  16378. "pattern": "^per"
  16379. },
  16380. "reply": {
  16381. "type": "string",
  16382. "enum": ["once", "always", "reject"]
  16383. }
  16384. },
  16385. "required": ["sessionID", "requestID", "reply"],
  16386. "additionalProperties": false
  16387. }
  16388. },
  16389. "required": ["id", "type", "properties"],
  16390. "additionalProperties": false
  16391. },
  16392. "EventSessionDiff": {
  16393. "type": "object",
  16394. "properties": {
  16395. "id": {
  16396. "type": "string"
  16397. },
  16398. "type": {
  16399. "type": "string",
  16400. "enum": ["session.diff"]
  16401. },
  16402. "properties": {
  16403. "type": "object",
  16404. "properties": {
  16405. "sessionID": {
  16406. "type": "string",
  16407. "pattern": "^ses"
  16408. },
  16409. "diff": {
  16410. "type": "array",
  16411. "items": {
  16412. "$ref": "#/components/schemas/SnapshotFileDiff"
  16413. }
  16414. }
  16415. },
  16416. "required": ["sessionID", "diff"],
  16417. "additionalProperties": false
  16418. }
  16419. },
  16420. "required": ["id", "type", "properties"],
  16421. "additionalProperties": false
  16422. },
  16423. "EventSessionError": {
  16424. "type": "object",
  16425. "properties": {
  16426. "id": {
  16427. "type": "string"
  16428. },
  16429. "type": {
  16430. "type": "string",
  16431. "enum": ["session.error"]
  16432. },
  16433. "properties": {
  16434. "type": "object",
  16435. "properties": {
  16436. "sessionID": {
  16437. "type": "string",
  16438. "pattern": "^ses"
  16439. },
  16440. "error": {
  16441. "anyOf": [
  16442. {
  16443. "$ref": "#/components/schemas/ProviderAuthError"
  16444. },
  16445. {
  16446. "$ref": "#/components/schemas/UnknownError"
  16447. },
  16448. {
  16449. "$ref": "#/components/schemas/MessageOutputLengthError"
  16450. },
  16451. {
  16452. "$ref": "#/components/schemas/MessageAbortedError"
  16453. },
  16454. {
  16455. "$ref": "#/components/schemas/StructuredOutputError"
  16456. },
  16457. {
  16458. "$ref": "#/components/schemas/ContextOverflowError"
  16459. },
  16460. {
  16461. "$ref": "#/components/schemas/APIError"
  16462. }
  16463. ]
  16464. }
  16465. },
  16466. "additionalProperties": false
  16467. }
  16468. },
  16469. "required": ["id", "type", "properties"],
  16470. "additionalProperties": false
  16471. },
  16472. "EventInstallationUpdated": {
  16473. "type": "object",
  16474. "properties": {
  16475. "id": {
  16476. "type": "string"
  16477. },
  16478. "type": {
  16479. "type": "string",
  16480. "enum": ["installation.updated"]
  16481. },
  16482. "properties": {
  16483. "type": "object",
  16484. "properties": {
  16485. "version": {
  16486. "type": "string"
  16487. }
  16488. },
  16489. "required": ["version"],
  16490. "additionalProperties": false
  16491. }
  16492. },
  16493. "required": ["id", "type", "properties"],
  16494. "additionalProperties": false
  16495. },
  16496. "EventInstallationUpdate-available": {
  16497. "type": "object",
  16498. "properties": {
  16499. "id": {
  16500. "type": "string"
  16501. },
  16502. "type": {
  16503. "type": "string",
  16504. "enum": ["installation.update-available"]
  16505. },
  16506. "properties": {
  16507. "type": "object",
  16508. "properties": {
  16509. "version": {
  16510. "type": "string"
  16511. }
  16512. },
  16513. "required": ["version"],
  16514. "additionalProperties": false
  16515. }
  16516. },
  16517. "required": ["id", "type", "properties"],
  16518. "additionalProperties": false
  16519. },
  16520. "EventQuestionAsked": {
  16521. "type": "object",
  16522. "properties": {
  16523. "id": {
  16524. "type": "string"
  16525. },
  16526. "type": {
  16527. "type": "string",
  16528. "enum": ["question.asked"]
  16529. },
  16530. "properties": {
  16531. "$ref": "#/components/schemas/QuestionRequest"
  16532. }
  16533. },
  16534. "required": ["id", "type", "properties"],
  16535. "additionalProperties": false
  16536. },
  16537. "EventQuestionReplied": {
  16538. "type": "object",
  16539. "properties": {
  16540. "id": {
  16541. "type": "string"
  16542. },
  16543. "type": {
  16544. "type": "string",
  16545. "enum": ["question.replied"]
  16546. },
  16547. "properties": {
  16548. "$ref": "#/components/schemas/QuestionReplied"
  16549. }
  16550. },
  16551. "required": ["id", "type", "properties"],
  16552. "additionalProperties": false
  16553. },
  16554. "EventQuestionRejected": {
  16555. "type": "object",
  16556. "properties": {
  16557. "id": {
  16558. "type": "string"
  16559. },
  16560. "type": {
  16561. "type": "string",
  16562. "enum": ["question.rejected"]
  16563. },
  16564. "properties": {
  16565. "$ref": "#/components/schemas/QuestionRejected"
  16566. }
  16567. },
  16568. "required": ["id", "type", "properties"],
  16569. "additionalProperties": false
  16570. },
  16571. "EventTodoUpdated": {
  16572. "type": "object",
  16573. "properties": {
  16574. "id": {
  16575. "type": "string"
  16576. },
  16577. "type": {
  16578. "type": "string",
  16579. "enum": ["todo.updated"]
  16580. },
  16581. "properties": {
  16582. "type": "object",
  16583. "properties": {
  16584. "sessionID": {
  16585. "type": "string",
  16586. "pattern": "^ses"
  16587. },
  16588. "todos": {
  16589. "type": "array",
  16590. "items": {
  16591. "$ref": "#/components/schemas/Todo"
  16592. }
  16593. }
  16594. },
  16595. "required": ["sessionID", "todos"],
  16596. "additionalProperties": false
  16597. }
  16598. },
  16599. "required": ["id", "type", "properties"],
  16600. "additionalProperties": false
  16601. },
  16602. "EventSessionStatus": {
  16603. "type": "object",
  16604. "properties": {
  16605. "id": {
  16606. "type": "string"
  16607. },
  16608. "type": {
  16609. "type": "string",
  16610. "enum": ["session.status"]
  16611. },
  16612. "properties": {
  16613. "type": "object",
  16614. "properties": {
  16615. "sessionID": {
  16616. "type": "string",
  16617. "pattern": "^ses"
  16618. },
  16619. "status": {
  16620. "$ref": "#/components/schemas/SessionStatus"
  16621. }
  16622. },
  16623. "required": ["sessionID", "status"],
  16624. "additionalProperties": false
  16625. }
  16626. },
  16627. "required": ["id", "type", "properties"],
  16628. "additionalProperties": false
  16629. },
  16630. "EventSessionIdle": {
  16631. "type": "object",
  16632. "properties": {
  16633. "id": {
  16634. "type": "string"
  16635. },
  16636. "type": {
  16637. "type": "string",
  16638. "enum": ["session.idle"]
  16639. },
  16640. "properties": {
  16641. "type": "object",
  16642. "properties": {
  16643. "sessionID": {
  16644. "type": "string",
  16645. "pattern": "^ses"
  16646. }
  16647. },
  16648. "required": ["sessionID"],
  16649. "additionalProperties": false
  16650. }
  16651. },
  16652. "required": ["id", "type", "properties"],
  16653. "additionalProperties": false
  16654. },
  16655. "EventSessionCompacted": {
  16656. "type": "object",
  16657. "properties": {
  16658. "id": {
  16659. "type": "string"
  16660. },
  16661. "type": {
  16662. "type": "string",
  16663. "enum": ["session.compacted"]
  16664. },
  16665. "properties": {
  16666. "type": "object",
  16667. "properties": {
  16668. "sessionID": {
  16669. "type": "string",
  16670. "pattern": "^ses"
  16671. }
  16672. },
  16673. "required": ["sessionID"],
  16674. "additionalProperties": false
  16675. }
  16676. },
  16677. "required": ["id", "type", "properties"],
  16678. "additionalProperties": false
  16679. },
  16680. "EventMcpToolsChanged": {
  16681. "type": "object",
  16682. "properties": {
  16683. "id": {
  16684. "type": "string"
  16685. },
  16686. "type": {
  16687. "type": "string",
  16688. "enum": ["mcp.tools.changed"]
  16689. },
  16690. "properties": {
  16691. "type": "object",
  16692. "properties": {
  16693. "server": {
  16694. "type": "string"
  16695. }
  16696. },
  16697. "required": ["server"],
  16698. "additionalProperties": false
  16699. }
  16700. },
  16701. "required": ["id", "type", "properties"],
  16702. "additionalProperties": false
  16703. },
  16704. "EventMcpBrowserOpenFailed": {
  16705. "type": "object",
  16706. "properties": {
  16707. "id": {
  16708. "type": "string"
  16709. },
  16710. "type": {
  16711. "type": "string",
  16712. "enum": ["mcp.browser.open.failed"]
  16713. },
  16714. "properties": {
  16715. "type": "object",
  16716. "properties": {
  16717. "mcpName": {
  16718. "type": "string"
  16719. },
  16720. "url": {
  16721. "type": "string"
  16722. }
  16723. },
  16724. "required": ["mcpName", "url"],
  16725. "additionalProperties": false
  16726. }
  16727. },
  16728. "required": ["id", "type", "properties"],
  16729. "additionalProperties": false
  16730. },
  16731. "EventCommandExecuted": {
  16732. "type": "object",
  16733. "properties": {
  16734. "id": {
  16735. "type": "string"
  16736. },
  16737. "type": {
  16738. "type": "string",
  16739. "enum": ["command.executed"]
  16740. },
  16741. "properties": {
  16742. "type": "object",
  16743. "properties": {
  16744. "name": {
  16745. "type": "string"
  16746. },
  16747. "sessionID": {
  16748. "type": "string",
  16749. "pattern": "^ses"
  16750. },
  16751. "arguments": {
  16752. "type": "string"
  16753. },
  16754. "messageID": {
  16755. "type": "string",
  16756. "pattern": "^msg"
  16757. }
  16758. },
  16759. "required": ["name", "sessionID", "arguments", "messageID"],
  16760. "additionalProperties": false
  16761. }
  16762. },
  16763. "required": ["id", "type", "properties"],
  16764. "additionalProperties": false
  16765. },
  16766. "EventProjectUpdated": {
  16767. "type": "object",
  16768. "properties": {
  16769. "id": {
  16770. "type": "string"
  16771. },
  16772. "type": {
  16773. "type": "string",
  16774. "enum": ["project.updated"]
  16775. },
  16776. "properties": {
  16777. "$ref": "#/components/schemas/Project"
  16778. }
  16779. },
  16780. "required": ["id", "type", "properties"],
  16781. "additionalProperties": false
  16782. },
  16783. "EventVcsBranchUpdated": {
  16784. "type": "object",
  16785. "properties": {
  16786. "id": {
  16787. "type": "string"
  16788. },
  16789. "type": {
  16790. "type": "string",
  16791. "enum": ["vcs.branch.updated"]
  16792. },
  16793. "properties": {
  16794. "type": "object",
  16795. "properties": {
  16796. "branch": {
  16797. "type": "string"
  16798. }
  16799. },
  16800. "additionalProperties": false
  16801. }
  16802. },
  16803. "required": ["id", "type", "properties"],
  16804. "additionalProperties": false
  16805. },
  16806. "EventWorkspaceReady": {
  16807. "type": "object",
  16808. "properties": {
  16809. "id": {
  16810. "type": "string"
  16811. },
  16812. "type": {
  16813. "type": "string",
  16814. "enum": ["workspace.ready"]
  16815. },
  16816. "properties": {
  16817. "type": "object",
  16818. "properties": {
  16819. "name": {
  16820. "type": "string"
  16821. }
  16822. },
  16823. "required": ["name"],
  16824. "additionalProperties": false
  16825. }
  16826. },
  16827. "required": ["id", "type", "properties"],
  16828. "additionalProperties": false
  16829. },
  16830. "EventWorkspaceFailed": {
  16831. "type": "object",
  16832. "properties": {
  16833. "id": {
  16834. "type": "string"
  16835. },
  16836. "type": {
  16837. "type": "string",
  16838. "enum": ["workspace.failed"]
  16839. },
  16840. "properties": {
  16841. "type": "object",
  16842. "properties": {
  16843. "message": {
  16844. "type": "string"
  16845. }
  16846. },
  16847. "required": ["message"],
  16848. "additionalProperties": false
  16849. }
  16850. },
  16851. "required": ["id", "type", "properties"],
  16852. "additionalProperties": false
  16853. },
  16854. "EventWorkspaceStatus": {
  16855. "type": "object",
  16856. "properties": {
  16857. "id": {
  16858. "type": "string"
  16859. },
  16860. "type": {
  16861. "type": "string",
  16862. "enum": ["workspace.status"]
  16863. },
  16864. "properties": {
  16865. "type": "object",
  16866. "properties": {
  16867. "workspaceID": {
  16868. "type": "string",
  16869. "pattern": "^wrk"
  16870. },
  16871. "status": {
  16872. "type": "string",
  16873. "enum": ["connected", "connecting", "disconnected", "error"]
  16874. }
  16875. },
  16876. "required": ["workspaceID", "status"],
  16877. "additionalProperties": false
  16878. }
  16879. },
  16880. "required": ["id", "type", "properties"],
  16881. "additionalProperties": false
  16882. },
  16883. "EventWorktreeReady": {
  16884. "type": "object",
  16885. "properties": {
  16886. "id": {
  16887. "type": "string"
  16888. },
  16889. "type": {
  16890. "type": "string",
  16891. "enum": ["worktree.ready"]
  16892. },
  16893. "properties": {
  16894. "type": "object",
  16895. "properties": {
  16896. "name": {
  16897. "type": "string"
  16898. },
  16899. "branch": {
  16900. "type": "string"
  16901. }
  16902. },
  16903. "required": ["name"],
  16904. "additionalProperties": false
  16905. }
  16906. },
  16907. "required": ["id", "type", "properties"],
  16908. "additionalProperties": false
  16909. },
  16910. "EventWorktreeFailed": {
  16911. "type": "object",
  16912. "properties": {
  16913. "id": {
  16914. "type": "string"
  16915. },
  16916. "type": {
  16917. "type": "string",
  16918. "enum": ["worktree.failed"]
  16919. },
  16920. "properties": {
  16921. "type": "object",
  16922. "properties": {
  16923. "message": {
  16924. "type": "string"
  16925. }
  16926. },
  16927. "required": ["message"],
  16928. "additionalProperties": false
  16929. }
  16930. },
  16931. "required": ["id", "type", "properties"],
  16932. "additionalProperties": false
  16933. },
  16934. "EventPtyCreated": {
  16935. "type": "object",
  16936. "properties": {
  16937. "id": {
  16938. "type": "string"
  16939. },
  16940. "type": {
  16941. "type": "string",
  16942. "enum": ["pty.created"]
  16943. },
  16944. "properties": {
  16945. "type": "object",
  16946. "properties": {
  16947. "info": {
  16948. "$ref": "#/components/schemas/Pty"
  16949. }
  16950. },
  16951. "required": ["info"],
  16952. "additionalProperties": false
  16953. }
  16954. },
  16955. "required": ["id", "type", "properties"],
  16956. "additionalProperties": false
  16957. },
  16958. "EventPtyUpdated": {
  16959. "type": "object",
  16960. "properties": {
  16961. "id": {
  16962. "type": "string"
  16963. },
  16964. "type": {
  16965. "type": "string",
  16966. "enum": ["pty.updated"]
  16967. },
  16968. "properties": {
  16969. "type": "object",
  16970. "properties": {
  16971. "info": {
  16972. "$ref": "#/components/schemas/Pty"
  16973. }
  16974. },
  16975. "required": ["info"],
  16976. "additionalProperties": false
  16977. }
  16978. },
  16979. "required": ["id", "type", "properties"],
  16980. "additionalProperties": false
  16981. },
  16982. "EventPtyExited": {
  16983. "type": "object",
  16984. "properties": {
  16985. "id": {
  16986. "type": "string"
  16987. },
  16988. "type": {
  16989. "type": "string",
  16990. "enum": ["pty.exited"]
  16991. },
  16992. "properties": {
  16993. "type": "object",
  16994. "properties": {
  16995. "id": {
  16996. "type": "string",
  16997. "pattern": "^pty"
  16998. },
  16999. "exitCode": {
  17000. "type": "integer",
  17001. "minimum": 0
  17002. }
  17003. },
  17004. "required": ["id", "exitCode"],
  17005. "additionalProperties": false
  17006. }
  17007. },
  17008. "required": ["id", "type", "properties"],
  17009. "additionalProperties": false
  17010. },
  17011. "EventPtyDeleted": {
  17012. "type": "object",
  17013. "properties": {
  17014. "id": {
  17015. "type": "string"
  17016. },
  17017. "type": {
  17018. "type": "string",
  17019. "enum": ["pty.deleted"]
  17020. },
  17021. "properties": {
  17022. "type": "object",
  17023. "properties": {
  17024. "id": {
  17025. "type": "string",
  17026. "pattern": "^pty"
  17027. }
  17028. },
  17029. "required": ["id"],
  17030. "additionalProperties": false
  17031. }
  17032. },
  17033. "required": ["id", "type", "properties"],
  17034. "additionalProperties": false
  17035. },
  17036. "EventMessageUpdated": {
  17037. "type": "object",
  17038. "properties": {
  17039. "id": {
  17040. "type": "string"
  17041. },
  17042. "type": {
  17043. "type": "string",
  17044. "enum": ["message.updated"]
  17045. },
  17046. "properties": {
  17047. "type": "object",
  17048. "properties": {
  17049. "sessionID": {
  17050. "type": "string",
  17051. "pattern": "^ses"
  17052. },
  17053. "info": {
  17054. "$ref": "#/components/schemas/Message"
  17055. }
  17056. },
  17057. "required": ["sessionID", "info"],
  17058. "additionalProperties": false
  17059. }
  17060. },
  17061. "required": ["id", "type", "properties"],
  17062. "additionalProperties": false
  17063. },
  17064. "EventMessageRemoved": {
  17065. "type": "object",
  17066. "properties": {
  17067. "id": {
  17068. "type": "string"
  17069. },
  17070. "type": {
  17071. "type": "string",
  17072. "enum": ["message.removed"]
  17073. },
  17074. "properties": {
  17075. "type": "object",
  17076. "properties": {
  17077. "sessionID": {
  17078. "type": "string",
  17079. "pattern": "^ses"
  17080. },
  17081. "messageID": {
  17082. "type": "string",
  17083. "pattern": "^msg"
  17084. }
  17085. },
  17086. "required": ["sessionID", "messageID"],
  17087. "additionalProperties": false
  17088. }
  17089. },
  17090. "required": ["id", "type", "properties"],
  17091. "additionalProperties": false
  17092. },
  17093. "EventMessagePartUpdated": {
  17094. "type": "object",
  17095. "properties": {
  17096. "id": {
  17097. "type": "string"
  17098. },
  17099. "type": {
  17100. "type": "string",
  17101. "enum": ["message.part.updated"]
  17102. },
  17103. "properties": {
  17104. "type": "object",
  17105. "properties": {
  17106. "sessionID": {
  17107. "type": "string",
  17108. "pattern": "^ses"
  17109. },
  17110. "part": {
  17111. "$ref": "#/components/schemas/Part"
  17112. },
  17113. "time": {
  17114. "type": "integer",
  17115. "minimum": 0
  17116. }
  17117. },
  17118. "required": ["sessionID", "part", "time"],
  17119. "additionalProperties": false
  17120. }
  17121. },
  17122. "required": ["id", "type", "properties"],
  17123. "additionalProperties": false
  17124. },
  17125. "EventMessagePartRemoved": {
  17126. "type": "object",
  17127. "properties": {
  17128. "id": {
  17129. "type": "string"
  17130. },
  17131. "type": {
  17132. "type": "string",
  17133. "enum": ["message.part.removed"]
  17134. },
  17135. "properties": {
  17136. "type": "object",
  17137. "properties": {
  17138. "sessionID": {
  17139. "type": "string",
  17140. "pattern": "^ses"
  17141. },
  17142. "messageID": {
  17143. "type": "string",
  17144. "pattern": "^msg"
  17145. },
  17146. "partID": {
  17147. "type": "string",
  17148. "pattern": "^prt"
  17149. }
  17150. },
  17151. "required": ["sessionID", "messageID", "partID"],
  17152. "additionalProperties": false
  17153. }
  17154. },
  17155. "required": ["id", "type", "properties"],
  17156. "additionalProperties": false
  17157. },
  17158. "EventSessionCreated": {
  17159. "type": "object",
  17160. "properties": {
  17161. "id": {
  17162. "type": "string"
  17163. },
  17164. "type": {
  17165. "type": "string",
  17166. "enum": ["session.created"]
  17167. },
  17168. "properties": {
  17169. "type": "object",
  17170. "properties": {
  17171. "sessionID": {
  17172. "type": "string",
  17173. "pattern": "^ses"
  17174. },
  17175. "info": {
  17176. "$ref": "#/components/schemas/Session"
  17177. }
  17178. },
  17179. "required": ["sessionID", "info"],
  17180. "additionalProperties": false
  17181. }
  17182. },
  17183. "required": ["id", "type", "properties"],
  17184. "additionalProperties": false
  17185. },
  17186. "EventSessionUpdated": {
  17187. "type": "object",
  17188. "properties": {
  17189. "id": {
  17190. "type": "string"
  17191. },
  17192. "type": {
  17193. "type": "string",
  17194. "enum": ["session.updated"]
  17195. },
  17196. "properties": {
  17197. "type": "object",
  17198. "properties": {
  17199. "sessionID": {
  17200. "type": "string",
  17201. "pattern": "^ses"
  17202. },
  17203. "info": {
  17204. "$ref": "#/components/schemas/Session"
  17205. }
  17206. },
  17207. "required": ["sessionID", "info"],
  17208. "additionalProperties": false
  17209. }
  17210. },
  17211. "required": ["id", "type", "properties"],
  17212. "additionalProperties": false
  17213. },
  17214. "EventSessionDeleted": {
  17215. "type": "object",
  17216. "properties": {
  17217. "id": {
  17218. "type": "string"
  17219. },
  17220. "type": {
  17221. "type": "string",
  17222. "enum": ["session.deleted"]
  17223. },
  17224. "properties": {
  17225. "type": "object",
  17226. "properties": {
  17227. "sessionID": {
  17228. "type": "string",
  17229. "pattern": "^ses"
  17230. },
  17231. "info": {
  17232. "$ref": "#/components/schemas/Session"
  17233. }
  17234. },
  17235. "required": ["sessionID", "info"],
  17236. "additionalProperties": false
  17237. }
  17238. },
  17239. "required": ["id", "type", "properties"],
  17240. "additionalProperties": false
  17241. },
  17242. "EventSessionNextAgentSwitched": {
  17243. "type": "object",
  17244. "properties": {
  17245. "id": {
  17246. "type": "string"
  17247. },
  17248. "type": {
  17249. "type": "string",
  17250. "enum": ["session.next.agent.switched"]
  17251. },
  17252. "properties": {
  17253. "type": "object",
  17254. "properties": {
  17255. "timestamp": {
  17256. "type": "number"
  17257. },
  17258. "sessionID": {
  17259. "type": "string",
  17260. "pattern": "^ses"
  17261. },
  17262. "agent": {
  17263. "type": "string"
  17264. }
  17265. },
  17266. "required": ["timestamp", "sessionID", "agent"],
  17267. "additionalProperties": false
  17268. }
  17269. },
  17270. "required": ["id", "type", "properties"],
  17271. "additionalProperties": false
  17272. },
  17273. "EventSessionNextModelSwitched": {
  17274. "type": "object",
  17275. "properties": {
  17276. "id": {
  17277. "type": "string"
  17278. },
  17279. "type": {
  17280. "type": "string",
  17281. "enum": ["session.next.model.switched"]
  17282. },
  17283. "properties": {
  17284. "type": "object",
  17285. "properties": {
  17286. "timestamp": {
  17287. "type": "number"
  17288. },
  17289. "sessionID": {
  17290. "type": "string",
  17291. "pattern": "^ses"
  17292. },
  17293. "model": {
  17294. "type": "object",
  17295. "properties": {
  17296. "id": {
  17297. "type": "string"
  17298. },
  17299. "providerID": {
  17300. "type": "string"
  17301. },
  17302. "variant": {
  17303. "type": "string"
  17304. }
  17305. },
  17306. "required": ["id", "providerID", "variant"],
  17307. "additionalProperties": false
  17308. }
  17309. },
  17310. "required": ["timestamp", "sessionID", "model"],
  17311. "additionalProperties": false
  17312. }
  17313. },
  17314. "required": ["id", "type", "properties"],
  17315. "additionalProperties": false
  17316. },
  17317. "PromptSource": {
  17318. "type": "object",
  17319. "properties": {
  17320. "start": {
  17321. "type": "number"
  17322. },
  17323. "end": {
  17324. "type": "number"
  17325. },
  17326. "text": {
  17327. "type": "string"
  17328. }
  17329. },
  17330. "required": ["start", "end", "text"],
  17331. "additionalProperties": false
  17332. },
  17333. "PromptFileAttachment": {
  17334. "type": "object",
  17335. "properties": {
  17336. "uri": {
  17337. "type": "string"
  17338. },
  17339. "mime": {
  17340. "type": "string"
  17341. },
  17342. "name": {
  17343. "type": "string"
  17344. },
  17345. "description": {
  17346. "type": "string"
  17347. },
  17348. "source": {
  17349. "$ref": "#/components/schemas/PromptSource"
  17350. }
  17351. },
  17352. "required": ["uri", "mime"],
  17353. "additionalProperties": false
  17354. },
  17355. "PromptAgentAttachment": {
  17356. "type": "object",
  17357. "properties": {
  17358. "name": {
  17359. "type": "string"
  17360. },
  17361. "source": {
  17362. "$ref": "#/components/schemas/PromptSource"
  17363. }
  17364. },
  17365. "required": ["name"],
  17366. "additionalProperties": false
  17367. },
  17368. "PromptReferenceAttachment": {
  17369. "type": "object",
  17370. "properties": {
  17371. "name": {
  17372. "type": "string"
  17373. },
  17374. "kind": {
  17375. "type": "string",
  17376. "enum": ["local", "git", "invalid"]
  17377. },
  17378. "uri": {
  17379. "type": "string"
  17380. },
  17381. "repository": {
  17382. "type": "string"
  17383. },
  17384. "branch": {
  17385. "type": "string"
  17386. },
  17387. "target": {
  17388. "type": "string"
  17389. },
  17390. "targetUri": {
  17391. "type": "string"
  17392. },
  17393. "problem": {
  17394. "type": "string"
  17395. },
  17396. "source": {
  17397. "$ref": "#/components/schemas/PromptSource"
  17398. }
  17399. },
  17400. "required": ["name", "kind"],
  17401. "additionalProperties": false
  17402. },
  17403. "EventSessionNextPrompted": {
  17404. "type": "object",
  17405. "properties": {
  17406. "id": {
  17407. "type": "string"
  17408. },
  17409. "type": {
  17410. "type": "string",
  17411. "enum": ["session.next.prompted"]
  17412. },
  17413. "properties": {
  17414. "type": "object",
  17415. "properties": {
  17416. "timestamp": {
  17417. "type": "number"
  17418. },
  17419. "sessionID": {
  17420. "type": "string",
  17421. "pattern": "^ses"
  17422. },
  17423. "prompt": {
  17424. "$ref": "#/components/schemas/Prompt"
  17425. }
  17426. },
  17427. "required": ["timestamp", "sessionID", "prompt"],
  17428. "additionalProperties": false
  17429. }
  17430. },
  17431. "required": ["id", "type", "properties"],
  17432. "additionalProperties": false
  17433. },
  17434. "EventSessionNextSynthetic": {
  17435. "type": "object",
  17436. "properties": {
  17437. "id": {
  17438. "type": "string"
  17439. },
  17440. "type": {
  17441. "type": "string",
  17442. "enum": ["session.next.synthetic"]
  17443. },
  17444. "properties": {
  17445. "type": "object",
  17446. "properties": {
  17447. "timestamp": {
  17448. "type": "number"
  17449. },
  17450. "sessionID": {
  17451. "type": "string",
  17452. "pattern": "^ses"
  17453. },
  17454. "text": {
  17455. "type": "string"
  17456. }
  17457. },
  17458. "required": ["timestamp", "sessionID", "text"],
  17459. "additionalProperties": false
  17460. }
  17461. },
  17462. "required": ["id", "type", "properties"],
  17463. "additionalProperties": false
  17464. },
  17465. "EventSessionNextShellStarted": {
  17466. "type": "object",
  17467. "properties": {
  17468. "id": {
  17469. "type": "string"
  17470. },
  17471. "type": {
  17472. "type": "string",
  17473. "enum": ["session.next.shell.started"]
  17474. },
  17475. "properties": {
  17476. "type": "object",
  17477. "properties": {
  17478. "timestamp": {
  17479. "type": "number"
  17480. },
  17481. "sessionID": {
  17482. "type": "string",
  17483. "pattern": "^ses"
  17484. },
  17485. "callID": {
  17486. "type": "string"
  17487. },
  17488. "command": {
  17489. "type": "string"
  17490. }
  17491. },
  17492. "required": ["timestamp", "sessionID", "callID", "command"],
  17493. "additionalProperties": false
  17494. }
  17495. },
  17496. "required": ["id", "type", "properties"],
  17497. "additionalProperties": false
  17498. },
  17499. "EventSessionNextShellEnded": {
  17500. "type": "object",
  17501. "properties": {
  17502. "id": {
  17503. "type": "string"
  17504. },
  17505. "type": {
  17506. "type": "string",
  17507. "enum": ["session.next.shell.ended"]
  17508. },
  17509. "properties": {
  17510. "type": "object",
  17511. "properties": {
  17512. "timestamp": {
  17513. "type": "number"
  17514. },
  17515. "sessionID": {
  17516. "type": "string",
  17517. "pattern": "^ses"
  17518. },
  17519. "callID": {
  17520. "type": "string"
  17521. },
  17522. "output": {
  17523. "type": "string"
  17524. }
  17525. },
  17526. "required": ["timestamp", "sessionID", "callID", "output"],
  17527. "additionalProperties": false
  17528. }
  17529. },
  17530. "required": ["id", "type", "properties"],
  17531. "additionalProperties": false
  17532. },
  17533. "EventSessionNextStepStarted": {
  17534. "type": "object",
  17535. "properties": {
  17536. "id": {
  17537. "type": "string"
  17538. },
  17539. "type": {
  17540. "type": "string",
  17541. "enum": ["session.next.step.started"]
  17542. },
  17543. "properties": {
  17544. "type": "object",
  17545. "properties": {
  17546. "timestamp": {
  17547. "type": "number"
  17548. },
  17549. "sessionID": {
  17550. "type": "string",
  17551. "pattern": "^ses"
  17552. },
  17553. "agent": {
  17554. "type": "string"
  17555. },
  17556. "model": {
  17557. "type": "object",
  17558. "properties": {
  17559. "id": {
  17560. "type": "string"
  17561. },
  17562. "providerID": {
  17563. "type": "string"
  17564. },
  17565. "variant": {
  17566. "type": "string"
  17567. }
  17568. },
  17569. "required": ["id", "providerID", "variant"],
  17570. "additionalProperties": false
  17571. },
  17572. "snapshot": {
  17573. "type": "string"
  17574. }
  17575. },
  17576. "required": ["timestamp", "sessionID", "agent", "model"],
  17577. "additionalProperties": false
  17578. }
  17579. },
  17580. "required": ["id", "type", "properties"],
  17581. "additionalProperties": false
  17582. },
  17583. "EventSessionNextStepEnded": {
  17584. "type": "object",
  17585. "properties": {
  17586. "id": {
  17587. "type": "string"
  17588. },
  17589. "type": {
  17590. "type": "string",
  17591. "enum": ["session.next.step.ended"]
  17592. },
  17593. "properties": {
  17594. "type": "object",
  17595. "properties": {
  17596. "timestamp": {
  17597. "type": "number"
  17598. },
  17599. "sessionID": {
  17600. "type": "string",
  17601. "pattern": "^ses"
  17602. },
  17603. "finish": {
  17604. "type": "string"
  17605. },
  17606. "cost": {
  17607. "type": "number"
  17608. },
  17609. "tokens": {
  17610. "type": "object",
  17611. "properties": {
  17612. "input": {
  17613. "type": "number"
  17614. },
  17615. "output": {
  17616. "type": "number"
  17617. },
  17618. "reasoning": {
  17619. "type": "number"
  17620. },
  17621. "cache": {
  17622. "type": "object",
  17623. "properties": {
  17624. "read": {
  17625. "type": "number"
  17626. },
  17627. "write": {
  17628. "type": "number"
  17629. }
  17630. },
  17631. "required": ["read", "write"],
  17632. "additionalProperties": false
  17633. }
  17634. },
  17635. "required": ["input", "output", "reasoning", "cache"],
  17636. "additionalProperties": false
  17637. },
  17638. "snapshot": {
  17639. "type": "string"
  17640. }
  17641. },
  17642. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17643. "additionalProperties": false
  17644. }
  17645. },
  17646. "required": ["id", "type", "properties"],
  17647. "additionalProperties": false
  17648. },
  17649. "SessionErrorUnknown": {
  17650. "type": "object",
  17651. "properties": {
  17652. "type": {
  17653. "type": "string",
  17654. "enum": ["unknown"]
  17655. },
  17656. "message": {
  17657. "type": "string"
  17658. }
  17659. },
  17660. "required": ["type", "message"],
  17661. "additionalProperties": false
  17662. },
  17663. "EventSessionNextStepFailed": {
  17664. "type": "object",
  17665. "properties": {
  17666. "id": {
  17667. "type": "string"
  17668. },
  17669. "type": {
  17670. "type": "string",
  17671. "enum": ["session.next.step.failed"]
  17672. },
  17673. "properties": {
  17674. "type": "object",
  17675. "properties": {
  17676. "timestamp": {
  17677. "type": "number"
  17678. },
  17679. "sessionID": {
  17680. "type": "string",
  17681. "pattern": "^ses"
  17682. },
  17683. "error": {
  17684. "$ref": "#/components/schemas/SessionErrorUnknown"
  17685. }
  17686. },
  17687. "required": ["timestamp", "sessionID", "error"],
  17688. "additionalProperties": false
  17689. }
  17690. },
  17691. "required": ["id", "type", "properties"],
  17692. "additionalProperties": false
  17693. },
  17694. "EventSessionNextTextStarted": {
  17695. "type": "object",
  17696. "properties": {
  17697. "id": {
  17698. "type": "string"
  17699. },
  17700. "type": {
  17701. "type": "string",
  17702. "enum": ["session.next.text.started"]
  17703. },
  17704. "properties": {
  17705. "type": "object",
  17706. "properties": {
  17707. "timestamp": {
  17708. "type": "number"
  17709. },
  17710. "sessionID": {
  17711. "type": "string",
  17712. "pattern": "^ses"
  17713. }
  17714. },
  17715. "required": ["timestamp", "sessionID"],
  17716. "additionalProperties": false
  17717. }
  17718. },
  17719. "required": ["id", "type", "properties"],
  17720. "additionalProperties": false
  17721. },
  17722. "EventSessionNextTextDelta": {
  17723. "type": "object",
  17724. "properties": {
  17725. "id": {
  17726. "type": "string"
  17727. },
  17728. "type": {
  17729. "type": "string",
  17730. "enum": ["session.next.text.delta"]
  17731. },
  17732. "properties": {
  17733. "type": "object",
  17734. "properties": {
  17735. "timestamp": {
  17736. "type": "number"
  17737. },
  17738. "sessionID": {
  17739. "type": "string",
  17740. "pattern": "^ses"
  17741. },
  17742. "delta": {
  17743. "type": "string"
  17744. }
  17745. },
  17746. "required": ["timestamp", "sessionID", "delta"],
  17747. "additionalProperties": false
  17748. }
  17749. },
  17750. "required": ["id", "type", "properties"],
  17751. "additionalProperties": false
  17752. },
  17753. "EventSessionNextTextEnded": {
  17754. "type": "object",
  17755. "properties": {
  17756. "id": {
  17757. "type": "string"
  17758. },
  17759. "type": {
  17760. "type": "string",
  17761. "enum": ["session.next.text.ended"]
  17762. },
  17763. "properties": {
  17764. "type": "object",
  17765. "properties": {
  17766. "timestamp": {
  17767. "type": "number"
  17768. },
  17769. "sessionID": {
  17770. "type": "string",
  17771. "pattern": "^ses"
  17772. },
  17773. "text": {
  17774. "type": "string"
  17775. }
  17776. },
  17777. "required": ["timestamp", "sessionID", "text"],
  17778. "additionalProperties": false
  17779. }
  17780. },
  17781. "required": ["id", "type", "properties"],
  17782. "additionalProperties": false
  17783. },
  17784. "EventSessionNextReasoningStarted": {
  17785. "type": "object",
  17786. "properties": {
  17787. "id": {
  17788. "type": "string"
  17789. },
  17790. "type": {
  17791. "type": "string",
  17792. "enum": ["session.next.reasoning.started"]
  17793. },
  17794. "properties": {
  17795. "type": "object",
  17796. "properties": {
  17797. "timestamp": {
  17798. "type": "number"
  17799. },
  17800. "sessionID": {
  17801. "type": "string",
  17802. "pattern": "^ses"
  17803. },
  17804. "reasoningID": {
  17805. "type": "string"
  17806. }
  17807. },
  17808. "required": ["timestamp", "sessionID", "reasoningID"],
  17809. "additionalProperties": false
  17810. }
  17811. },
  17812. "required": ["id", "type", "properties"],
  17813. "additionalProperties": false
  17814. },
  17815. "EventSessionNextReasoningDelta": {
  17816. "type": "object",
  17817. "properties": {
  17818. "id": {
  17819. "type": "string"
  17820. },
  17821. "type": {
  17822. "type": "string",
  17823. "enum": ["session.next.reasoning.delta"]
  17824. },
  17825. "properties": {
  17826. "type": "object",
  17827. "properties": {
  17828. "timestamp": {
  17829. "type": "number"
  17830. },
  17831. "sessionID": {
  17832. "type": "string",
  17833. "pattern": "^ses"
  17834. },
  17835. "reasoningID": {
  17836. "type": "string"
  17837. },
  17838. "delta": {
  17839. "type": "string"
  17840. }
  17841. },
  17842. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17843. "additionalProperties": false
  17844. }
  17845. },
  17846. "required": ["id", "type", "properties"],
  17847. "additionalProperties": false
  17848. },
  17849. "EventSessionNextReasoningEnded": {
  17850. "type": "object",
  17851. "properties": {
  17852. "id": {
  17853. "type": "string"
  17854. },
  17855. "type": {
  17856. "type": "string",
  17857. "enum": ["session.next.reasoning.ended"]
  17858. },
  17859. "properties": {
  17860. "type": "object",
  17861. "properties": {
  17862. "timestamp": {
  17863. "type": "number"
  17864. },
  17865. "sessionID": {
  17866. "type": "string",
  17867. "pattern": "^ses"
  17868. },
  17869. "reasoningID": {
  17870. "type": "string"
  17871. },
  17872. "text": {
  17873. "type": "string"
  17874. }
  17875. },
  17876. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17877. "additionalProperties": false
  17878. }
  17879. },
  17880. "required": ["id", "type", "properties"],
  17881. "additionalProperties": false
  17882. },
  17883. "EventSessionNextToolInputStarted": {
  17884. "type": "object",
  17885. "properties": {
  17886. "id": {
  17887. "type": "string"
  17888. },
  17889. "type": {
  17890. "type": "string",
  17891. "enum": ["session.next.tool.input.started"]
  17892. },
  17893. "properties": {
  17894. "type": "object",
  17895. "properties": {
  17896. "timestamp": {
  17897. "type": "number"
  17898. },
  17899. "sessionID": {
  17900. "type": "string",
  17901. "pattern": "^ses"
  17902. },
  17903. "callID": {
  17904. "type": "string"
  17905. },
  17906. "name": {
  17907. "type": "string"
  17908. }
  17909. },
  17910. "required": ["timestamp", "sessionID", "callID", "name"],
  17911. "additionalProperties": false
  17912. }
  17913. },
  17914. "required": ["id", "type", "properties"],
  17915. "additionalProperties": false
  17916. },
  17917. "EventSessionNextToolInputDelta": {
  17918. "type": "object",
  17919. "properties": {
  17920. "id": {
  17921. "type": "string"
  17922. },
  17923. "type": {
  17924. "type": "string",
  17925. "enum": ["session.next.tool.input.delta"]
  17926. },
  17927. "properties": {
  17928. "type": "object",
  17929. "properties": {
  17930. "timestamp": {
  17931. "type": "number"
  17932. },
  17933. "sessionID": {
  17934. "type": "string",
  17935. "pattern": "^ses"
  17936. },
  17937. "callID": {
  17938. "type": "string"
  17939. },
  17940. "delta": {
  17941. "type": "string"
  17942. }
  17943. },
  17944. "required": ["timestamp", "sessionID", "callID", "delta"],
  17945. "additionalProperties": false
  17946. }
  17947. },
  17948. "required": ["id", "type", "properties"],
  17949. "additionalProperties": false
  17950. },
  17951. "EventSessionNextToolInputEnded": {
  17952. "type": "object",
  17953. "properties": {
  17954. "id": {
  17955. "type": "string"
  17956. },
  17957. "type": {
  17958. "type": "string",
  17959. "enum": ["session.next.tool.input.ended"]
  17960. },
  17961. "properties": {
  17962. "type": "object",
  17963. "properties": {
  17964. "timestamp": {
  17965. "type": "number"
  17966. },
  17967. "sessionID": {
  17968. "type": "string",
  17969. "pattern": "^ses"
  17970. },
  17971. "callID": {
  17972. "type": "string"
  17973. },
  17974. "text": {
  17975. "type": "string"
  17976. }
  17977. },
  17978. "required": ["timestamp", "sessionID", "callID", "text"],
  17979. "additionalProperties": false
  17980. }
  17981. },
  17982. "required": ["id", "type", "properties"],
  17983. "additionalProperties": false
  17984. },
  17985. "EventSessionNextToolCalled": {
  17986. "type": "object",
  17987. "properties": {
  17988. "id": {
  17989. "type": "string"
  17990. },
  17991. "type": {
  17992. "type": "string",
  17993. "enum": ["session.next.tool.called"]
  17994. },
  17995. "properties": {
  17996. "type": "object",
  17997. "properties": {
  17998. "timestamp": {
  17999. "type": "number"
  18000. },
  18001. "sessionID": {
  18002. "type": "string",
  18003. "pattern": "^ses"
  18004. },
  18005. "callID": {
  18006. "type": "string"
  18007. },
  18008. "tool": {
  18009. "type": "string"
  18010. },
  18011. "input": {
  18012. "type": "object"
  18013. },
  18014. "provider": {
  18015. "type": "object",
  18016. "properties": {
  18017. "executed": {
  18018. "type": "boolean"
  18019. },
  18020. "metadata": {
  18021. "type": "object"
  18022. }
  18023. },
  18024. "required": ["executed"],
  18025. "additionalProperties": false
  18026. }
  18027. },
  18028. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  18029. "additionalProperties": false
  18030. }
  18031. },
  18032. "required": ["id", "type", "properties"],
  18033. "additionalProperties": false
  18034. },
  18035. "ToolTextContent": {
  18036. "type": "object",
  18037. "properties": {
  18038. "type": {
  18039. "type": "string",
  18040. "enum": ["text"]
  18041. },
  18042. "text": {
  18043. "type": "string"
  18044. }
  18045. },
  18046. "required": ["type", "text"],
  18047. "additionalProperties": false
  18048. },
  18049. "ToolFileContent": {
  18050. "type": "object",
  18051. "properties": {
  18052. "type": {
  18053. "type": "string",
  18054. "enum": ["file"]
  18055. },
  18056. "uri": {
  18057. "type": "string"
  18058. },
  18059. "mime": {
  18060. "type": "string"
  18061. },
  18062. "name": {
  18063. "type": "string"
  18064. }
  18065. },
  18066. "required": ["type", "uri", "mime"],
  18067. "additionalProperties": false
  18068. },
  18069. "EventSessionNextToolProgress": {
  18070. "type": "object",
  18071. "properties": {
  18072. "id": {
  18073. "type": "string"
  18074. },
  18075. "type": {
  18076. "type": "string",
  18077. "enum": ["session.next.tool.progress"]
  18078. },
  18079. "properties": {
  18080. "type": "object",
  18081. "properties": {
  18082. "timestamp": {
  18083. "type": "number"
  18084. },
  18085. "sessionID": {
  18086. "type": "string",
  18087. "pattern": "^ses"
  18088. },
  18089. "callID": {
  18090. "type": "string"
  18091. },
  18092. "structured": {
  18093. "type": "object"
  18094. },
  18095. "content": {
  18096. "type": "array",
  18097. "items": {
  18098. "anyOf": [
  18099. {
  18100. "$ref": "#/components/schemas/ToolTextContent"
  18101. },
  18102. {
  18103. "$ref": "#/components/schemas/ToolFileContent"
  18104. }
  18105. ]
  18106. }
  18107. }
  18108. },
  18109. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  18110. "additionalProperties": false
  18111. }
  18112. },
  18113. "required": ["id", "type", "properties"],
  18114. "additionalProperties": false
  18115. },
  18116. "EventSessionNextToolSuccess": {
  18117. "type": "object",
  18118. "properties": {
  18119. "id": {
  18120. "type": "string"
  18121. },
  18122. "type": {
  18123. "type": "string",
  18124. "enum": ["session.next.tool.success"]
  18125. },
  18126. "properties": {
  18127. "type": "object",
  18128. "properties": {
  18129. "timestamp": {
  18130. "type": "number"
  18131. },
  18132. "sessionID": {
  18133. "type": "string",
  18134. "pattern": "^ses"
  18135. },
  18136. "callID": {
  18137. "type": "string"
  18138. },
  18139. "structured": {
  18140. "type": "object"
  18141. },
  18142. "content": {
  18143. "type": "array",
  18144. "items": {
  18145. "anyOf": [
  18146. {
  18147. "$ref": "#/components/schemas/ToolTextContent"
  18148. },
  18149. {
  18150. "$ref": "#/components/schemas/ToolFileContent"
  18151. }
  18152. ]
  18153. }
  18154. },
  18155. "provider": {
  18156. "type": "object",
  18157. "properties": {
  18158. "executed": {
  18159. "type": "boolean"
  18160. },
  18161. "metadata": {
  18162. "type": "object"
  18163. }
  18164. },
  18165. "required": ["executed"],
  18166. "additionalProperties": false
  18167. }
  18168. },
  18169. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  18170. "additionalProperties": false
  18171. }
  18172. },
  18173. "required": ["id", "type", "properties"],
  18174. "additionalProperties": false
  18175. },
  18176. "EventSessionNextToolFailed": {
  18177. "type": "object",
  18178. "properties": {
  18179. "id": {
  18180. "type": "string"
  18181. },
  18182. "type": {
  18183. "type": "string",
  18184. "enum": ["session.next.tool.failed"]
  18185. },
  18186. "properties": {
  18187. "type": "object",
  18188. "properties": {
  18189. "timestamp": {
  18190. "type": "number"
  18191. },
  18192. "sessionID": {
  18193. "type": "string",
  18194. "pattern": "^ses"
  18195. },
  18196. "callID": {
  18197. "type": "string"
  18198. },
  18199. "error": {
  18200. "$ref": "#/components/schemas/SessionErrorUnknown"
  18201. },
  18202. "provider": {
  18203. "type": "object",
  18204. "properties": {
  18205. "executed": {
  18206. "type": "boolean"
  18207. },
  18208. "metadata": {
  18209. "type": "object"
  18210. }
  18211. },
  18212. "required": ["executed"],
  18213. "additionalProperties": false
  18214. }
  18215. },
  18216. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  18217. "additionalProperties": false
  18218. }
  18219. },
  18220. "required": ["id", "type", "properties"],
  18221. "additionalProperties": false
  18222. },
  18223. "SessionNextRetry_error": {
  18224. "type": "object",
  18225. "properties": {
  18226. "message": {
  18227. "type": "string"
  18228. },
  18229. "statusCode": {
  18230. "type": "number"
  18231. },
  18232. "isRetryable": {
  18233. "type": "boolean"
  18234. },
  18235. "responseHeaders": {
  18236. "type": "object",
  18237. "additionalProperties": {
  18238. "type": "string"
  18239. }
  18240. },
  18241. "responseBody": {
  18242. "type": "string"
  18243. },
  18244. "metadata": {
  18245. "type": "object",
  18246. "additionalProperties": {
  18247. "type": "string"
  18248. }
  18249. }
  18250. },
  18251. "required": ["message", "isRetryable"],
  18252. "additionalProperties": false
  18253. },
  18254. "EventSessionNextRetried": {
  18255. "type": "object",
  18256. "properties": {
  18257. "id": {
  18258. "type": "string"
  18259. },
  18260. "type": {
  18261. "type": "string",
  18262. "enum": ["session.next.retried"]
  18263. },
  18264. "properties": {
  18265. "type": "object",
  18266. "properties": {
  18267. "timestamp": {
  18268. "type": "number"
  18269. },
  18270. "sessionID": {
  18271. "type": "string",
  18272. "pattern": "^ses"
  18273. },
  18274. "attempt": {
  18275. "type": "number"
  18276. },
  18277. "error": {
  18278. "$ref": "#/components/schemas/SessionNextRetry_error"
  18279. }
  18280. },
  18281. "required": ["timestamp", "sessionID", "attempt", "error"],
  18282. "additionalProperties": false
  18283. }
  18284. },
  18285. "required": ["id", "type", "properties"],
  18286. "additionalProperties": false
  18287. },
  18288. "EventSessionNextCompactionStarted": {
  18289. "type": "object",
  18290. "properties": {
  18291. "id": {
  18292. "type": "string"
  18293. },
  18294. "type": {
  18295. "type": "string",
  18296. "enum": ["session.next.compaction.started"]
  18297. },
  18298. "properties": {
  18299. "type": "object",
  18300. "properties": {
  18301. "timestamp": {
  18302. "type": "number"
  18303. },
  18304. "sessionID": {
  18305. "type": "string",
  18306. "pattern": "^ses"
  18307. },
  18308. "reason": {
  18309. "type": "string",
  18310. "enum": ["auto", "manual"]
  18311. }
  18312. },
  18313. "required": ["timestamp", "sessionID", "reason"],
  18314. "additionalProperties": false
  18315. }
  18316. },
  18317. "required": ["id", "type", "properties"],
  18318. "additionalProperties": false
  18319. },
  18320. "EventSessionNextCompactionDelta": {
  18321. "type": "object",
  18322. "properties": {
  18323. "id": {
  18324. "type": "string"
  18325. },
  18326. "type": {
  18327. "type": "string",
  18328. "enum": ["session.next.compaction.delta"]
  18329. },
  18330. "properties": {
  18331. "type": "object",
  18332. "properties": {
  18333. "timestamp": {
  18334. "type": "number"
  18335. },
  18336. "sessionID": {
  18337. "type": "string",
  18338. "pattern": "^ses"
  18339. },
  18340. "text": {
  18341. "type": "string"
  18342. }
  18343. },
  18344. "required": ["timestamp", "sessionID", "text"],
  18345. "additionalProperties": false
  18346. }
  18347. },
  18348. "required": ["id", "type", "properties"],
  18349. "additionalProperties": false
  18350. },
  18351. "EventSessionNextCompactionEnded": {
  18352. "type": "object",
  18353. "properties": {
  18354. "id": {
  18355. "type": "string"
  18356. },
  18357. "type": {
  18358. "type": "string",
  18359. "enum": ["session.next.compaction.ended"]
  18360. },
  18361. "properties": {
  18362. "type": "object",
  18363. "properties": {
  18364. "timestamp": {
  18365. "type": "number"
  18366. },
  18367. "sessionID": {
  18368. "type": "string",
  18369. "pattern": "^ses"
  18370. },
  18371. "text": {
  18372. "type": "string"
  18373. },
  18374. "include": {
  18375. "type": "string"
  18376. }
  18377. },
  18378. "required": ["timestamp", "sessionID", "text"],
  18379. "additionalProperties": false
  18380. }
  18381. },
  18382. "required": ["id", "type", "properties"],
  18383. "additionalProperties": false
  18384. },
  18385. "EventServerConnected": {
  18386. "type": "object",
  18387. "properties": {
  18388. "id": {
  18389. "type": "string"
  18390. },
  18391. "type": {
  18392. "type": "string",
  18393. "enum": ["server.connected"]
  18394. },
  18395. "properties": {
  18396. "type": "object",
  18397. "properties": {}
  18398. }
  18399. },
  18400. "required": ["id", "type", "properties"],
  18401. "additionalProperties": false
  18402. },
  18403. "EventGlobalDisposed": {
  18404. "type": "object",
  18405. "properties": {
  18406. "id": {
  18407. "type": "string"
  18408. },
  18409. "type": {
  18410. "type": "string",
  18411. "enum": ["global.disposed"]
  18412. },
  18413. "properties": {
  18414. "type": "object",
  18415. "properties": {}
  18416. }
  18417. },
  18418. "required": ["id", "type", "properties"],
  18419. "additionalProperties": false
  18420. },
  18421. "SessionInfo": {
  18422. "type": "object",
  18423. "properties": {
  18424. "id": {
  18425. "type": "string",
  18426. "pattern": "^ses"
  18427. },
  18428. "parentID": {
  18429. "type": "string",
  18430. "pattern": "^ses"
  18431. },
  18432. "projectID": {
  18433. "type": "string"
  18434. },
  18435. "workspaceID": {
  18436. "type": "string",
  18437. "pattern": "^wrk"
  18438. },
  18439. "path": {
  18440. "type": "string"
  18441. },
  18442. "agent": {
  18443. "type": "string"
  18444. },
  18445. "model": {
  18446. "type": "object",
  18447. "properties": {
  18448. "id": {
  18449. "type": "string"
  18450. },
  18451. "providerID": {
  18452. "type": "string"
  18453. },
  18454. "variant": {
  18455. "type": "string"
  18456. }
  18457. },
  18458. "required": ["id", "providerID", "variant"],
  18459. "additionalProperties": false
  18460. },
  18461. "cost": {
  18462. "type": "number"
  18463. },
  18464. "tokens": {
  18465. "type": "object",
  18466. "properties": {
  18467. "input": {
  18468. "type": "number"
  18469. },
  18470. "output": {
  18471. "type": "number"
  18472. },
  18473. "reasoning": {
  18474. "type": "number"
  18475. },
  18476. "cache": {
  18477. "type": "object",
  18478. "properties": {
  18479. "read": {
  18480. "type": "number"
  18481. },
  18482. "write": {
  18483. "type": "number"
  18484. }
  18485. },
  18486. "required": ["read", "write"],
  18487. "additionalProperties": false
  18488. }
  18489. },
  18490. "required": ["input", "output", "reasoning", "cache"],
  18491. "additionalProperties": false
  18492. },
  18493. "time": {
  18494. "type": "object",
  18495. "properties": {
  18496. "created": {
  18497. "type": "number"
  18498. },
  18499. "updated": {
  18500. "type": "number"
  18501. },
  18502. "archived": {
  18503. "type": "number"
  18504. }
  18505. },
  18506. "required": ["created", "updated"],
  18507. "additionalProperties": false
  18508. },
  18509. "title": {
  18510. "type": "string"
  18511. }
  18512. },
  18513. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  18514. "additionalProperties": false
  18515. },
  18516. "SessionDelivery": {
  18517. "type": "string",
  18518. "enum": ["immediate", "deferred"]
  18519. },
  18520. "SessionMessageAgentSwitched": {
  18521. "type": "object",
  18522. "properties": {
  18523. "id": {
  18524. "type": "string"
  18525. },
  18526. "metadata": {
  18527. "type": "object"
  18528. },
  18529. "time": {
  18530. "type": "object",
  18531. "properties": {
  18532. "created": {
  18533. "type": "number"
  18534. }
  18535. },
  18536. "required": ["created"],
  18537. "additionalProperties": false
  18538. },
  18539. "type": {
  18540. "type": "string",
  18541. "enum": ["agent-switched"]
  18542. },
  18543. "agent": {
  18544. "type": "string"
  18545. }
  18546. },
  18547. "required": ["id", "time", "type", "agent"],
  18548. "additionalProperties": false
  18549. },
  18550. "SessionMessageModelSwitched": {
  18551. "type": "object",
  18552. "properties": {
  18553. "id": {
  18554. "type": "string"
  18555. },
  18556. "metadata": {
  18557. "type": "object"
  18558. },
  18559. "time": {
  18560. "type": "object",
  18561. "properties": {
  18562. "created": {
  18563. "type": "number"
  18564. }
  18565. },
  18566. "required": ["created"],
  18567. "additionalProperties": false
  18568. },
  18569. "type": {
  18570. "type": "string",
  18571. "enum": ["model-switched"]
  18572. },
  18573. "model": {
  18574. "type": "object",
  18575. "properties": {
  18576. "id": {
  18577. "type": "string"
  18578. },
  18579. "providerID": {
  18580. "type": "string"
  18581. },
  18582. "variant": {
  18583. "type": "string"
  18584. }
  18585. },
  18586. "required": ["id", "providerID", "variant"],
  18587. "additionalProperties": false
  18588. }
  18589. },
  18590. "required": ["id", "time", "type", "model"],
  18591. "additionalProperties": false
  18592. },
  18593. "SessionMessageUser": {
  18594. "type": "object",
  18595. "properties": {
  18596. "id": {
  18597. "type": "string"
  18598. },
  18599. "metadata": {
  18600. "type": "object"
  18601. },
  18602. "time": {
  18603. "type": "object",
  18604. "properties": {
  18605. "created": {
  18606. "type": "number"
  18607. }
  18608. },
  18609. "required": ["created"],
  18610. "additionalProperties": false
  18611. },
  18612. "text": {
  18613. "type": "string"
  18614. },
  18615. "files": {
  18616. "type": "array",
  18617. "items": {
  18618. "$ref": "#/components/schemas/PromptFileAttachment"
  18619. }
  18620. },
  18621. "agents": {
  18622. "type": "array",
  18623. "items": {
  18624. "$ref": "#/components/schemas/PromptAgentAttachment"
  18625. }
  18626. },
  18627. "references": {
  18628. "type": "array",
  18629. "items": {
  18630. "$ref": "#/components/schemas/PromptReferenceAttachment"
  18631. }
  18632. },
  18633. "type": {
  18634. "type": "string",
  18635. "enum": ["user"]
  18636. }
  18637. },
  18638. "required": ["id", "time", "text", "type"],
  18639. "additionalProperties": false
  18640. },
  18641. "SessionMessageSynthetic": {
  18642. "type": "object",
  18643. "properties": {
  18644. "id": {
  18645. "type": "string"
  18646. },
  18647. "metadata": {
  18648. "type": "object"
  18649. },
  18650. "time": {
  18651. "type": "object",
  18652. "properties": {
  18653. "created": {
  18654. "type": "number"
  18655. }
  18656. },
  18657. "required": ["created"],
  18658. "additionalProperties": false
  18659. },
  18660. "sessionID": {
  18661. "type": "string",
  18662. "pattern": "^ses"
  18663. },
  18664. "text": {
  18665. "type": "string"
  18666. },
  18667. "type": {
  18668. "type": "string",
  18669. "enum": ["synthetic"]
  18670. }
  18671. },
  18672. "required": ["id", "time", "sessionID", "text", "type"],
  18673. "additionalProperties": false
  18674. },
  18675. "SessionMessageShell": {
  18676. "type": "object",
  18677. "properties": {
  18678. "id": {
  18679. "type": "string"
  18680. },
  18681. "metadata": {
  18682. "type": "object"
  18683. },
  18684. "time": {
  18685. "type": "object",
  18686. "properties": {
  18687. "created": {
  18688. "type": "number"
  18689. },
  18690. "completed": {
  18691. "type": "number"
  18692. }
  18693. },
  18694. "required": ["created"],
  18695. "additionalProperties": false
  18696. },
  18697. "type": {
  18698. "type": "string",
  18699. "enum": ["shell"]
  18700. },
  18701. "callID": {
  18702. "type": "string"
  18703. },
  18704. "command": {
  18705. "type": "string"
  18706. },
  18707. "output": {
  18708. "type": "string"
  18709. }
  18710. },
  18711. "required": ["id", "time", "type", "callID", "command", "output"],
  18712. "additionalProperties": false
  18713. },
  18714. "SessionMessageAssistantText": {
  18715. "type": "object",
  18716. "properties": {
  18717. "type": {
  18718. "type": "string",
  18719. "enum": ["text"]
  18720. },
  18721. "text": {
  18722. "type": "string"
  18723. }
  18724. },
  18725. "required": ["type", "text"],
  18726. "additionalProperties": false
  18727. },
  18728. "SessionMessageAssistantReasoning": {
  18729. "type": "object",
  18730. "properties": {
  18731. "type": {
  18732. "type": "string",
  18733. "enum": ["reasoning"]
  18734. },
  18735. "id": {
  18736. "type": "string"
  18737. },
  18738. "text": {
  18739. "type": "string"
  18740. }
  18741. },
  18742. "required": ["type", "id", "text"],
  18743. "additionalProperties": false
  18744. },
  18745. "SessionMessageToolStatePending": {
  18746. "type": "object",
  18747. "properties": {
  18748. "status": {
  18749. "type": "string",
  18750. "enum": ["pending"]
  18751. },
  18752. "input": {
  18753. "type": "string"
  18754. }
  18755. },
  18756. "required": ["status", "input"],
  18757. "additionalProperties": false
  18758. },
  18759. "SessionMessageToolStateRunning": {
  18760. "type": "object",
  18761. "properties": {
  18762. "status": {
  18763. "type": "string",
  18764. "enum": ["running"]
  18765. },
  18766. "input": {
  18767. "type": "object"
  18768. },
  18769. "structured": {
  18770. "type": "object"
  18771. },
  18772. "content": {
  18773. "type": "array",
  18774. "items": {
  18775. "anyOf": [
  18776. {
  18777. "$ref": "#/components/schemas/ToolTextContent"
  18778. },
  18779. {
  18780. "$ref": "#/components/schemas/ToolFileContent"
  18781. }
  18782. ]
  18783. }
  18784. }
  18785. },
  18786. "required": ["status", "input", "structured", "content"],
  18787. "additionalProperties": false
  18788. },
  18789. "SessionMessageToolStateCompleted": {
  18790. "type": "object",
  18791. "properties": {
  18792. "status": {
  18793. "type": "string",
  18794. "enum": ["completed"]
  18795. },
  18796. "input": {
  18797. "type": "object"
  18798. },
  18799. "attachments": {
  18800. "type": "array",
  18801. "items": {
  18802. "$ref": "#/components/schemas/PromptFileAttachment"
  18803. }
  18804. },
  18805. "content": {
  18806. "type": "array",
  18807. "items": {
  18808. "anyOf": [
  18809. {
  18810. "$ref": "#/components/schemas/ToolTextContent"
  18811. },
  18812. {
  18813. "$ref": "#/components/schemas/ToolFileContent"
  18814. }
  18815. ]
  18816. }
  18817. },
  18818. "structured": {
  18819. "type": "object"
  18820. }
  18821. },
  18822. "required": ["status", "input", "content", "structured"],
  18823. "additionalProperties": false
  18824. },
  18825. "SessionMessageToolStateError": {
  18826. "type": "object",
  18827. "properties": {
  18828. "status": {
  18829. "type": "string",
  18830. "enum": ["error"]
  18831. },
  18832. "input": {
  18833. "type": "object"
  18834. },
  18835. "content": {
  18836. "type": "array",
  18837. "items": {
  18838. "anyOf": [
  18839. {
  18840. "$ref": "#/components/schemas/ToolTextContent"
  18841. },
  18842. {
  18843. "$ref": "#/components/schemas/ToolFileContent"
  18844. }
  18845. ]
  18846. }
  18847. },
  18848. "structured": {
  18849. "type": "object"
  18850. },
  18851. "error": {
  18852. "$ref": "#/components/schemas/SessionErrorUnknown"
  18853. }
  18854. },
  18855. "required": ["status", "input", "content", "structured", "error"],
  18856. "additionalProperties": false
  18857. },
  18858. "SessionMessageAssistantTool": {
  18859. "type": "object",
  18860. "properties": {
  18861. "type": {
  18862. "type": "string",
  18863. "enum": ["tool"]
  18864. },
  18865. "id": {
  18866. "type": "string"
  18867. },
  18868. "name": {
  18869. "type": "string"
  18870. },
  18871. "provider": {
  18872. "type": "object",
  18873. "properties": {
  18874. "executed": {
  18875. "type": "boolean"
  18876. },
  18877. "metadata": {
  18878. "type": "object"
  18879. }
  18880. },
  18881. "required": ["executed"],
  18882. "additionalProperties": false
  18883. },
  18884. "state": {
  18885. "anyOf": [
  18886. {
  18887. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18888. },
  18889. {
  18890. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18891. },
  18892. {
  18893. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18894. },
  18895. {
  18896. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18897. }
  18898. ]
  18899. },
  18900. "time": {
  18901. "type": "object",
  18902. "properties": {
  18903. "created": {
  18904. "type": "number"
  18905. },
  18906. "ran": {
  18907. "type": "number"
  18908. },
  18909. "completed": {
  18910. "type": "number"
  18911. },
  18912. "pruned": {
  18913. "type": "number"
  18914. }
  18915. },
  18916. "required": ["created"],
  18917. "additionalProperties": false
  18918. }
  18919. },
  18920. "required": ["type", "id", "name", "state", "time"],
  18921. "additionalProperties": false
  18922. },
  18923. "SessionMessageAssistant": {
  18924. "type": "object",
  18925. "properties": {
  18926. "id": {
  18927. "type": "string"
  18928. },
  18929. "metadata": {
  18930. "type": "object"
  18931. },
  18932. "time": {
  18933. "type": "object",
  18934. "properties": {
  18935. "created": {
  18936. "type": "number"
  18937. },
  18938. "completed": {
  18939. "type": "number"
  18940. }
  18941. },
  18942. "required": ["created"],
  18943. "additionalProperties": false
  18944. },
  18945. "type": {
  18946. "type": "string",
  18947. "enum": ["assistant"]
  18948. },
  18949. "agent": {
  18950. "type": "string"
  18951. },
  18952. "model": {
  18953. "type": "object",
  18954. "properties": {
  18955. "id": {
  18956. "type": "string"
  18957. },
  18958. "providerID": {
  18959. "type": "string"
  18960. },
  18961. "variant": {
  18962. "type": "string"
  18963. }
  18964. },
  18965. "required": ["id", "providerID", "variant"],
  18966. "additionalProperties": false
  18967. },
  18968. "content": {
  18969. "type": "array",
  18970. "items": {
  18971. "anyOf": [
  18972. {
  18973. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18974. },
  18975. {
  18976. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18977. },
  18978. {
  18979. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18980. }
  18981. ]
  18982. }
  18983. },
  18984. "snapshot": {
  18985. "type": "object",
  18986. "properties": {
  18987. "start": {
  18988. "type": "string"
  18989. },
  18990. "end": {
  18991. "type": "string"
  18992. }
  18993. },
  18994. "additionalProperties": false
  18995. },
  18996. "finish": {
  18997. "type": "string"
  18998. },
  18999. "cost": {
  19000. "type": "number"
  19001. },
  19002. "tokens": {
  19003. "type": "object",
  19004. "properties": {
  19005. "input": {
  19006. "type": "number"
  19007. },
  19008. "output": {
  19009. "type": "number"
  19010. },
  19011. "reasoning": {
  19012. "type": "number"
  19013. },
  19014. "cache": {
  19015. "type": "object",
  19016. "properties": {
  19017. "read": {
  19018. "type": "number"
  19019. },
  19020. "write": {
  19021. "type": "number"
  19022. }
  19023. },
  19024. "required": ["read", "write"],
  19025. "additionalProperties": false
  19026. }
  19027. },
  19028. "required": ["input", "output", "reasoning", "cache"],
  19029. "additionalProperties": false
  19030. },
  19031. "error": {
  19032. "$ref": "#/components/schemas/SessionErrorUnknown"
  19033. }
  19034. },
  19035. "required": ["id", "time", "type", "agent", "model", "content"],
  19036. "additionalProperties": false
  19037. },
  19038. "SessionMessageCompaction": {
  19039. "type": "object",
  19040. "properties": {
  19041. "type": {
  19042. "type": "string",
  19043. "enum": ["compaction"]
  19044. },
  19045. "reason": {
  19046. "type": "string",
  19047. "enum": ["auto", "manual"]
  19048. },
  19049. "summary": {
  19050. "type": "string"
  19051. },
  19052. "include": {
  19053. "type": "string"
  19054. },
  19055. "id": {
  19056. "type": "string"
  19057. },
  19058. "metadata": {
  19059. "type": "object"
  19060. },
  19061. "time": {
  19062. "type": "object",
  19063. "properties": {
  19064. "created": {
  19065. "type": "number"
  19066. }
  19067. },
  19068. "required": ["created"],
  19069. "additionalProperties": false
  19070. }
  19071. },
  19072. "required": ["type", "reason", "summary", "id", "time"],
  19073. "additionalProperties": false
  19074. },
  19075. "SessionMessage": {
  19076. "anyOf": [
  19077. {
  19078. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  19079. },
  19080. {
  19081. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  19082. },
  19083. {
  19084. "$ref": "#/components/schemas/SessionMessageUser"
  19085. },
  19086. {
  19087. "$ref": "#/components/schemas/SessionMessageSynthetic"
  19088. },
  19089. {
  19090. "$ref": "#/components/schemas/SessionMessageShell"
  19091. },
  19092. {
  19093. "$ref": "#/components/schemas/SessionMessageAssistant"
  19094. },
  19095. {
  19096. "$ref": "#/components/schemas/SessionMessageCompaction"
  19097. }
  19098. ]
  19099. },
  19100. "ModelV2Info": {
  19101. "type": "object",
  19102. "properties": {
  19103. "id": {
  19104. "type": "string"
  19105. },
  19106. "apiID": {
  19107. "type": "string"
  19108. },
  19109. "providerID": {
  19110. "type": "string"
  19111. },
  19112. "family": {
  19113. "type": "string"
  19114. },
  19115. "name": {
  19116. "type": "string"
  19117. },
  19118. "endpoint": {
  19119. "anyOf": [
  19120. {
  19121. "type": "object",
  19122. "properties": {
  19123. "type": {
  19124. "type": "string",
  19125. "enum": ["unknown"]
  19126. }
  19127. },
  19128. "required": ["type"],
  19129. "additionalProperties": false
  19130. },
  19131. {
  19132. "type": "object",
  19133. "properties": {
  19134. "type": {
  19135. "type": "string",
  19136. "enum": ["openai/responses"]
  19137. },
  19138. "url": {
  19139. "type": "string"
  19140. },
  19141. "websocket": {
  19142. "type": "boolean"
  19143. }
  19144. },
  19145. "required": ["type", "url"],
  19146. "additionalProperties": false
  19147. },
  19148. {
  19149. "type": "object",
  19150. "properties": {
  19151. "type": {
  19152. "type": "string",
  19153. "enum": ["openai/completions"]
  19154. },
  19155. "url": {
  19156. "type": "string"
  19157. },
  19158. "reasoning": {
  19159. "anyOf": [
  19160. {
  19161. "type": "object",
  19162. "properties": {
  19163. "type": {
  19164. "type": "string",
  19165. "enum": ["reasoning_content"]
  19166. }
  19167. },
  19168. "required": ["type"],
  19169. "additionalProperties": false
  19170. },
  19171. {
  19172. "type": "object",
  19173. "properties": {
  19174. "type": {
  19175. "type": "string",
  19176. "enum": ["reasoning_details"]
  19177. }
  19178. },
  19179. "required": ["type"],
  19180. "additionalProperties": false
  19181. }
  19182. ]
  19183. }
  19184. },
  19185. "required": ["type", "url"],
  19186. "additionalProperties": false
  19187. },
  19188. {
  19189. "type": "object",
  19190. "properties": {
  19191. "type": {
  19192. "type": "string",
  19193. "enum": ["anthropic/messages"]
  19194. },
  19195. "url": {
  19196. "type": "string"
  19197. }
  19198. },
  19199. "required": ["type", "url"],
  19200. "additionalProperties": false
  19201. },
  19202. {
  19203. "type": "object",
  19204. "properties": {
  19205. "type": {
  19206. "type": "string",
  19207. "enum": ["aisdk"]
  19208. },
  19209. "package": {
  19210. "type": "string"
  19211. },
  19212. "url": {
  19213. "type": "string"
  19214. }
  19215. },
  19216. "required": ["type", "package"],
  19217. "additionalProperties": false
  19218. }
  19219. ]
  19220. },
  19221. "capabilities": {
  19222. "type": "object",
  19223. "properties": {
  19224. "tools": {
  19225. "type": "boolean"
  19226. },
  19227. "input": {
  19228. "type": "array",
  19229. "items": {
  19230. "type": "string"
  19231. }
  19232. },
  19233. "output": {
  19234. "type": "array",
  19235. "items": {
  19236. "type": "string"
  19237. }
  19238. }
  19239. },
  19240. "required": ["tools", "input", "output"],
  19241. "additionalProperties": false
  19242. },
  19243. "options": {
  19244. "type": "object",
  19245. "properties": {
  19246. "headers": {
  19247. "type": "object",
  19248. "additionalProperties": {
  19249. "type": "string"
  19250. }
  19251. },
  19252. "body": {
  19253. "type": "object"
  19254. },
  19255. "aisdk": {
  19256. "type": "object",
  19257. "properties": {
  19258. "provider": {
  19259. "type": "object"
  19260. },
  19261. "request": {
  19262. "type": "object"
  19263. }
  19264. },
  19265. "required": ["provider", "request"],
  19266. "additionalProperties": false
  19267. },
  19268. "variant": {
  19269. "type": "string"
  19270. }
  19271. },
  19272. "required": ["headers", "body", "aisdk"],
  19273. "additionalProperties": false
  19274. },
  19275. "variants": {
  19276. "type": "array",
  19277. "items": {
  19278. "type": "object",
  19279. "properties": {
  19280. "id": {
  19281. "type": "string"
  19282. },
  19283. "headers": {
  19284. "type": "object",
  19285. "additionalProperties": {
  19286. "type": "string"
  19287. }
  19288. },
  19289. "body": {
  19290. "type": "object"
  19291. },
  19292. "aisdk": {
  19293. "type": "object",
  19294. "properties": {
  19295. "provider": {
  19296. "type": "object"
  19297. },
  19298. "request": {
  19299. "type": "object"
  19300. }
  19301. },
  19302. "required": ["provider", "request"],
  19303. "additionalProperties": false
  19304. }
  19305. },
  19306. "required": ["id", "headers", "body", "aisdk"],
  19307. "additionalProperties": false
  19308. }
  19309. },
  19310. "time": {
  19311. "type": "object",
  19312. "properties": {
  19313. "released": {
  19314. "anyOf": [
  19315. {
  19316. "type": "number"
  19317. },
  19318. {
  19319. "type": "string",
  19320. "enum": ["NaN"]
  19321. },
  19322. {
  19323. "type": "string",
  19324. "enum": ["Infinity"]
  19325. },
  19326. {
  19327. "type": "string",
  19328. "enum": ["-Infinity"]
  19329. },
  19330. {
  19331. "type": "string",
  19332. "enum": ["Infinity", "-Infinity", "NaN"]
  19333. }
  19334. ]
  19335. }
  19336. },
  19337. "required": ["released"],
  19338. "additionalProperties": false
  19339. },
  19340. "cost": {
  19341. "type": "array",
  19342. "items": {
  19343. "type": "object",
  19344. "properties": {
  19345. "tier": {
  19346. "type": "object",
  19347. "properties": {
  19348. "type": {
  19349. "type": "string",
  19350. "enum": ["context"]
  19351. },
  19352. "size": {
  19353. "type": "integer"
  19354. }
  19355. },
  19356. "required": ["type", "size"],
  19357. "additionalProperties": false
  19358. },
  19359. "input": {
  19360. "type": "number"
  19361. },
  19362. "output": {
  19363. "type": "number"
  19364. },
  19365. "cache": {
  19366. "type": "object",
  19367. "properties": {
  19368. "read": {
  19369. "type": "number"
  19370. },
  19371. "write": {
  19372. "type": "number"
  19373. }
  19374. },
  19375. "required": ["read", "write"],
  19376. "additionalProperties": false
  19377. }
  19378. },
  19379. "required": ["input", "output", "cache"],
  19380. "additionalProperties": false
  19381. }
  19382. },
  19383. "status": {
  19384. "type": "string",
  19385. "enum": ["alpha", "beta", "deprecated", "active"]
  19386. },
  19387. "enabled": {
  19388. "type": "boolean"
  19389. },
  19390. "limit": {
  19391. "type": "object",
  19392. "properties": {
  19393. "context": {
  19394. "type": "integer"
  19395. },
  19396. "input": {
  19397. "type": "integer"
  19398. },
  19399. "output": {
  19400. "type": "integer"
  19401. }
  19402. },
  19403. "required": ["context", "output"],
  19404. "additionalProperties": false
  19405. }
  19406. },
  19407. "required": [
  19408. "id",
  19409. "apiID",
  19410. "providerID",
  19411. "name",
  19412. "endpoint",
  19413. "capabilities",
  19414. "options",
  19415. "variants",
  19416. "time",
  19417. "cost",
  19418. "status",
  19419. "enabled",
  19420. "limit"
  19421. ],
  19422. "additionalProperties": false
  19423. },
  19424. "ProviderV2Info": {
  19425. "type": "object",
  19426. "properties": {
  19427. "id": {
  19428. "type": "string"
  19429. },
  19430. "name": {
  19431. "type": "string"
  19432. },
  19433. "enabled": {
  19434. "anyOf": [
  19435. {
  19436. "type": "boolean",
  19437. "enum": [false]
  19438. },
  19439. {
  19440. "type": "object",
  19441. "properties": {
  19442. "via": {
  19443. "type": "string",
  19444. "enum": ["env"]
  19445. },
  19446. "name": {
  19447. "type": "string"
  19448. }
  19449. },
  19450. "required": ["via", "name"],
  19451. "additionalProperties": false
  19452. },
  19453. {
  19454. "type": "object",
  19455. "properties": {
  19456. "via": {
  19457. "type": "string",
  19458. "enum": ["auth"]
  19459. },
  19460. "service": {
  19461. "type": "string"
  19462. }
  19463. },
  19464. "required": ["via", "service"],
  19465. "additionalProperties": false
  19466. },
  19467. {
  19468. "type": "object",
  19469. "properties": {
  19470. "via": {
  19471. "type": "string",
  19472. "enum": ["custom"]
  19473. },
  19474. "data": {
  19475. "type": "object"
  19476. }
  19477. },
  19478. "required": ["via", "data"],
  19479. "additionalProperties": false
  19480. }
  19481. ]
  19482. },
  19483. "env": {
  19484. "type": "array",
  19485. "items": {
  19486. "type": "string"
  19487. }
  19488. },
  19489. "endpoint": {
  19490. "anyOf": [
  19491. {
  19492. "type": "object",
  19493. "properties": {
  19494. "type": {
  19495. "type": "string",
  19496. "enum": ["unknown"]
  19497. }
  19498. },
  19499. "required": ["type"],
  19500. "additionalProperties": false
  19501. },
  19502. {
  19503. "type": "object",
  19504. "properties": {
  19505. "type": {
  19506. "type": "string",
  19507. "enum": ["openai/responses"]
  19508. },
  19509. "url": {
  19510. "type": "string"
  19511. },
  19512. "websocket": {
  19513. "type": "boolean"
  19514. }
  19515. },
  19516. "required": ["type", "url"],
  19517. "additionalProperties": false
  19518. },
  19519. {
  19520. "type": "object",
  19521. "properties": {
  19522. "type": {
  19523. "type": "string",
  19524. "enum": ["openai/completions"]
  19525. },
  19526. "url": {
  19527. "type": "string"
  19528. },
  19529. "reasoning": {
  19530. "anyOf": [
  19531. {
  19532. "type": "object",
  19533. "properties": {
  19534. "type": {
  19535. "type": "string",
  19536. "enum": ["reasoning_content"]
  19537. }
  19538. },
  19539. "required": ["type"],
  19540. "additionalProperties": false
  19541. },
  19542. {
  19543. "type": "object",
  19544. "properties": {
  19545. "type": {
  19546. "type": "string",
  19547. "enum": ["reasoning_details"]
  19548. }
  19549. },
  19550. "required": ["type"],
  19551. "additionalProperties": false
  19552. }
  19553. ]
  19554. }
  19555. },
  19556. "required": ["type", "url"],
  19557. "additionalProperties": false
  19558. },
  19559. {
  19560. "type": "object",
  19561. "properties": {
  19562. "type": {
  19563. "type": "string",
  19564. "enum": ["anthropic/messages"]
  19565. },
  19566. "url": {
  19567. "type": "string"
  19568. }
  19569. },
  19570. "required": ["type", "url"],
  19571. "additionalProperties": false
  19572. },
  19573. {
  19574. "type": "object",
  19575. "properties": {
  19576. "type": {
  19577. "type": "string",
  19578. "enum": ["aisdk"]
  19579. },
  19580. "package": {
  19581. "type": "string"
  19582. },
  19583. "url": {
  19584. "type": "string"
  19585. }
  19586. },
  19587. "required": ["type", "package"],
  19588. "additionalProperties": false
  19589. }
  19590. ]
  19591. },
  19592. "options": {
  19593. "type": "object",
  19594. "properties": {
  19595. "headers": {
  19596. "type": "object",
  19597. "additionalProperties": {
  19598. "type": "string"
  19599. }
  19600. },
  19601. "body": {
  19602. "type": "object"
  19603. },
  19604. "aisdk": {
  19605. "type": "object",
  19606. "properties": {
  19607. "provider": {
  19608. "type": "object"
  19609. },
  19610. "request": {
  19611. "type": "object"
  19612. }
  19613. },
  19614. "required": ["provider", "request"],
  19615. "additionalProperties": false
  19616. }
  19617. },
  19618. "required": ["headers", "body", "aisdk"],
  19619. "additionalProperties": false
  19620. }
  19621. },
  19622. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  19623. "additionalProperties": false
  19624. },
  19625. "EventTuiToastShow1": {
  19626. "type": "object",
  19627. "properties": {
  19628. "id": {
  19629. "type": "string"
  19630. },
  19631. "type": {
  19632. "type": "string",
  19633. "enum": ["tui.toast.show"]
  19634. },
  19635. "properties": {
  19636. "type": "object",
  19637. "properties": {
  19638. "title": {
  19639. "type": "string"
  19640. },
  19641. "message": {
  19642. "type": "string"
  19643. },
  19644. "variant": {
  19645. "type": "string",
  19646. "enum": ["info", "success", "warning", "error"]
  19647. },
  19648. "duration": {
  19649. "type": "integer",
  19650. "exclusiveMinimum": 0
  19651. }
  19652. },
  19653. "required": ["message", "variant"],
  19654. "additionalProperties": false
  19655. }
  19656. },
  19657. "required": ["id", "type", "properties"],
  19658. "additionalProperties": false
  19659. },
  19660. "BadRequestError": {
  19661. "type": "object",
  19662. "required": ["name", "data"],
  19663. "properties": {
  19664. "name": {
  19665. "type": "string",
  19666. "enum": ["BadRequest"]
  19667. },
  19668. "data": {
  19669. "type": "object",
  19670. "required": ["message"],
  19671. "properties": {
  19672. "message": {
  19673. "type": "string"
  19674. },
  19675. "kind": {
  19676. "type": "string",
  19677. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  19678. }
  19679. }
  19680. }
  19681. }
  19682. }
  19683. }
  19684. },
  19685. "security": [],
  19686. "tags": [
  19687. {
  19688. "name": "control",
  19689. "description": "Control plane routes."
  19690. },
  19691. {
  19692. "name": "global",
  19693. "description": "Global server routes."
  19694. },
  19695. {
  19696. "name": "event",
  19697. "description": "Instance event stream route."
  19698. },
  19699. {
  19700. "name": "config",
  19701. "description": "Experimental HttpApi config routes."
  19702. },
  19703. {
  19704. "name": "experimental",
  19705. "description": "Experimental HttpApi read-only routes."
  19706. },
  19707. {
  19708. "name": "file",
  19709. "description": "Experimental HttpApi file routes."
  19710. },
  19711. {
  19712. "name": "instance",
  19713. "description": "Experimental HttpApi instance read routes."
  19714. },
  19715. {
  19716. "name": "mcp",
  19717. "description": "Experimental HttpApi MCP routes."
  19718. },
  19719. {
  19720. "name": "project",
  19721. "description": "Experimental HttpApi project routes."
  19722. },
  19723. {
  19724. "name": "pty",
  19725. "description": "Experimental HttpApi PTY routes."
  19726. },
  19727. {
  19728. "name": "question",
  19729. "description": "Question routes."
  19730. },
  19731. {
  19732. "name": "permission",
  19733. "description": "Experimental HttpApi permission routes."
  19734. },
  19735. {
  19736. "name": "provider",
  19737. "description": "Experimental HttpApi provider routes."
  19738. },
  19739. {
  19740. "name": "session",
  19741. "description": "Experimental HttpApi session routes."
  19742. },
  19743. {
  19744. "name": "sync",
  19745. "description": "Experimental HttpApi sync routes."
  19746. },
  19747. {
  19748. "name": "v2",
  19749. "description": "Experimental v2 routes."
  19750. },
  19751. {
  19752. "name": "v2 messages",
  19753. "description": "Experimental v2 message routes."
  19754. },
  19755. {
  19756. "name": "v2 models",
  19757. "description": "Experimental v2 model routes."
  19758. },
  19759. {
  19760. "name": "v2 providers",
  19761. "description": "Experimental v2 provider routes."
  19762. },
  19763. {
  19764. "name": "tui",
  19765. "description": "Experimental HttpApi TUI routes."
  19766. },
  19767. {
  19768. "name": "workspace",
  19769. "description": "Experimental HttpApi workspace routes."
  19770. },
  19771. {
  19772. "name": "pty",
  19773. "description": "PTY websocket route."
  19774. }
  19775. ]
  19776. }